Skip to content

Commit 4ed210e

Browse files
committed
Merge branch 'tony/upload-floderstruct-classification' of https://github.com/roboflow/roboflow-python into tony/upload-floderstruct-classification
2 parents 5bc64a6 + 6177ea4 commit 4ed210e

File tree

4 files changed

+15
-8
lines changed

4 files changed

+15
-8
lines changed

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,4 @@ The `roboflow` command line tool (`roboflow/roboflowpy.py`) provides:
112112
- API keys are stored in `~/.config/roboflow/config.json` (Unix) or `~/roboflow/config.json` (Windows)
113113
- The SDK supports both hosted inference (Roboflow platform) and local inference (via Roboflow Inference)
114114
- Pre-commit hooks automatically run formatting and linting checks
115-
- Test files intentionally excluded from linting: `tests/manual/debugme.py`
115+
- Test files intentionally excluded from linting: `tests/manual/debugme.py`

tests/datasets/corrosion-singlelabel-classification/README.dataset.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@ https://universe.roboflow.com/classification/synthetic-corrosion-dataset
33

44
Provided by Roboflow
55
License: CC BY 4.0
6-

tests/test_project.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from unittest.mock import patch
2-
import os
32

43
import requests
54
import responses
@@ -462,7 +461,7 @@ def test_classification_dataset_upload(self):
462461
classification_folder = "tests/datasets/corrosion-singlelabel-classification"
463462
# Parse with classification flag to get inferred annotations
464463
parsed_dataset = folderparser.parsefolder(classification_folder, is_classification=True)
465-
464+
466465
# Create a mock project with classification type
467466
self.project.type = "classification"
468467
annotation_calls = []
@@ -509,10 +508,18 @@ def test_classification_edge_cases(self):
509508
{"file": "root_img.jpg", "split": "train", "dirname": "/"},
510509
{"file": "dot_img.jpg", "split": "train", "dirname": "/."},
511510
# These should get annotations from folder structure
512-
{"file": "nested.jpg", "split": "train", "dirname": "/train/defects/rust/severe",
513-
"annotationfile": {"type": "classification_folder", "classification_label": "severe"}},
514-
{"file": "normal.jpg", "split": "train", "dirname": "/train/good",
515-
"annotationfile": {"type": "classification_folder", "classification_label": "good"}},
511+
{
512+
"file": "nested.jpg",
513+
"split": "train",
514+
"dirname": "/train/defects/rust/severe",
515+
"annotationfile": {"type": "classification_folder", "classification_label": "severe"},
516+
},
517+
{
518+
"file": "normal.jpg",
519+
"split": "train",
520+
"dirname": "/train/good",
521+
"annotationfile": {"type": "classification_folder", "classification_label": "good"},
522+
},
516523
]
517524
self.project.type = "classification"
518525
annotation_calls = []

tests/util/test_folderparser.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import json
22
import unittest
33
from os.path import abspath, dirname
4+
45
from roboflow.util import folderparser
56

67
thisdir = dirname(abspath(__file__))

0 commit comments

Comments
 (0)