Skip to content

Commit

Permalink
add init to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bw4sz committed Aug 7, 2024
1 parent 7d7197b commit 602b577
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ jobs:
fail-fast: false
matrix:
python-version:
- "3.12"
- "3.11"
- "3.10"

os:
- "ubuntu-latest"
Expand Down
5 changes: 1 addition & 4 deletions milliontrees/datasets/milliontrees_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,7 @@ def check_init(self):
# Check metadata
assert len(self.metadata_array.shape) == 2
assert len(self.metadata_fields) == self.metadata_array.shape[1]

# Check that it is not both classification and detection
assert not (self.is_classification and self.is_detection)


# For convenience, include y in metadata_fields if y_size == 1
if self.y_size == 1:
assert 'y' in self.metadata_fields
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ tqdm>=4.53.0
scikit-learn>=0.20.0
scipy>=1.5.4
albumentations>=0.5.2
pytest>=6.2.1
pytest>=6.2.1
bumpversion
Empty file added tests/__init__.py
Empty file.

0 comments on commit 602b577

Please sign in to comment.