Skip to content

Commit

Permalink
Update makefile, test script and workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ma-sadeghi committed Nov 2, 2021
1 parent 8fdf9b5 commit 51b2500
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,4 @@ jobs:
run:
pytest examples/
--nbval-lax
--ignore="examples/paper_recreations/Blunt et al. (2013)"
--ignore="examples/paper_recreations/Wu et al. (2010)"

1 change: 0 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ jobs:
pytest .
--cov=.
--cov-report=xml
--ignore=scripts

- name: Upload coverage to Codecov
if: (matrix.python-version == 3.8) && (matrix.os == 'ubuntu-latest')
Expand Down
16 changes: 14 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
.SILENT: clean
.PHONY: clean
.SILENT: clean nbtest test
.PHONY: clean nbtest test

clean:
echo "Cleaning up the repo..."
python bin/clean

nbtest:
echo "Running example notebooks..."
pytest examples --nbval-lax \
--ignore="examples/paper_recreations/Blunt et al. (2013)" \
--ignore="examples/paper_recreations/Wu et al. (2010)"

test:
echo "Running unit tests..."
pytest --ignore=scripts

3 changes: 2 additions & 1 deletion bin/test
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ if 'cov' in sys.argv:
if 'nbval' in sys.argv:
args.append('--nbval')

if 'ignore-examples' in sys.argv:
if 'min' in sys.argv:
args.extend(['--ignore=examples/'])
args.extend(['--ignore=scripts/'])

exit_code = pytest.main(args)
exit(exit_code)

0 comments on commit 51b2500

Please sign in to comment.