Skip to content

Commit

Permalink
CU-86956du3q: [TEMP] Remove tests from main workflow (for faster iter…
Browse files Browse the repository at this point in the history
…ation) and add args to output upon regression checking
  • Loading branch information
mart-r committed Aug 21, 2024
1 parent ba35759 commit 4bf3089
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
9 changes: 0 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,6 @@ jobs:
- name: Lint
run: |
flake8 medcat
- name: Test
run: |
all_files=$(git ls-files | grep '^tests/.*\.py$' | grep -v '/__init__\.py$' | sed 's/\.py$//' | sed 's/\//./g')
num_files=$(echo "$all_files" | wc -l)
midpoint=$((num_files / 2))
first_half_nl=$(echo "$all_files" | head -n $midpoint)
second_half_nl=$(echo "$all_files" | tail -n +$(($midpoint + 1)))
timeout 25m python -m unittest ${first_half_nl[@]}
timeout 25m python -m unittest ${second_half_nl[@]}
- name: Regression
# NOTE: This will create a model pack based on some data included within the tests/resources/regression/creation/ folder
# it will then train on some self-supervised as well as supervised training data and save the model.
Expand Down
2 changes: 2 additions & 0 deletions medcat/utils/regression/regression_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ def main(model_pack_dir: Path, test_suite_file: Path,
'If set, a non-zero exit status is returned unless all cases are successfull (100%). '
'This can be useful for (e.g) CI workflow integration.',
action='store_true')
import sys
print("ARGS", sys.argv[1:])
args = parser.parse_args()
if not args.silent:
logger.addHandler(logging.StreamHandler())
Expand Down

0 comments on commit 4bf3089

Please sign in to comment.