Skip to content

Commit

Permalink
Update tests structre
Browse files Browse the repository at this point in the history
Signed-off-by: Elron Bandel <[email protected]>
  • Loading branch information
elronbandel committed Jan 29, 2024
1 parent 461998a commit 98a7d2d
Show file tree
Hide file tree
Showing 34 changed files with 18 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test_catalog.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test Catalog
name: Test Catalog Code

on:
push:
Expand All @@ -7,7 +7,7 @@ on:
branches: [ main ]

jobs:
run-all-preperation-snnipets:
run-catalog-artifacts-tests:

runs-on: ubuntu-latest
env:
Expand All @@ -30,5 +30,5 @@ jobs:
- name: Generate Report
env:
HUGGINGFACE_HUB_TOKEN: ${{ secrets.UNITXT_READ_HUGGINGFACE_HUB_FOR_TESTS }}
run: unittest-parallel -t . -s tests -p *test_preperation.py -j 10 --level test
run: coverage run --omit=*/src -m unittest discover -s tests/catalog -p "test_*.py"

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [ main ]

jobs:
run-full-unit-tests-suit:
run-full-unit-tests-suite:

runs-on: ubuntu-latest
env:
Expand All @@ -30,7 +30,7 @@ jobs:
- name: Generate Report
env:
HUGGINGFACE_HUB_TOKEN: ${{ secrets.UNITXT_READ_HUGGINGFACE_HUB_FOR_TESTS }}
run: coverage run --omit=*/test_preparation.py -m unittest
run: coverage run --omit=*/preperation -m unittest discover -s tests/library -p "test_*.py"

- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v2
8 changes: 5 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ target-version = "py38"
"src/unitxt/metric.py" = ["F811", "F401"]
"src/unitxt/dataset.py" = ["F811", "F401"]
"src/unitxt/blocks.py" = ["F811", "F401"]
"tests/test_loaders.py" = ["N802", "N803"]
"tests/test_dataclass.py" = ["F811"]
"tests/library/test_loaders.py" = ["N802", "N803"]
"tests/library/test_dataclass.py" = ["F811"]
"src/unitxt/validate.py" = ["B024"]
"src/unitxt/type_utils.py" = ["C901"]
"src/unitxt/dataclass.py" = ["C901"]
Expand Down Expand Up @@ -91,7 +91,9 @@ line-ending = "auto"
[tool.ruff.lint.pydocstyle]
convention = "google"


[tool.coverage.run]
omit = [
"*/test_preparation.py"
"preperation/*",
"docs/*"
]
4 changes: 4 additions & 0 deletions tests/catalog/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from src.unitxt import artifact, logging_utils

logging_utils.enable_explicit_format()
artifact.enable_artifact_caching = False
File renamed without changes.
4 changes: 4 additions & 0 deletions tests/library/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from src.unitxt import artifact, logging_utils

logging_utils.enable_explicit_format()
artifact.enable_artifact_caching = False
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 98a7d2d

Please sign in to comment.