Skip to content

Commit

Permalink
update scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
rfl-urbaniak committed Sep 9, 2024
1 parent 4256351 commit 4c6cb8a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
21 changes: 15 additions & 6 deletions scripts/clean.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
#!/bin/bash
set -euxo pipefail

# isort suspended till the CI-vs-local issue is resolved
# isort cities/ tests/
# isort suspended as conflicting with black
# nbqa isort docs/guides/


# this sometimes conflicts with black but does some
# preliminary import sorting
# and is then overriden by black
isort cities/ tests/

black ./cities/ ./tests/ ./docs/guides/

black docs/guides/

black cities/ tests/
autoflake --remove-all-unused-imports --in-place --recursive ./cities ./tests

nbqa autoflake --remove-all-unused-imports --recursive --in-place docs/guides/
# nbqa isort docs/guides/
nbqa black docs/guides/
nbqa autoflake --nbqa-shell --remove-all-unused-imports --recursive --in-place docs/guides/

#nbqa black docs/guides/

6 changes: 3 additions & 3 deletions scripts/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ set -euxo pipefail

mypy --ignore-missing-imports cities/
#isort --check --diff cities/ tests/
black --check cities/ tests/
black --check cities/ tests/ docs/guides/
flake8 cities/ tests/ --ignore=E203,W503 --max-line-length=127


nbqa autoflake -v --recursive --check docs/guides/
nbqa autoflake --nbqa-shell -v --recursive --check docs/guides/
#nbqa isort --check docs/guides/
nbqa black --check docs/guides/

2 changes: 1 addition & 1 deletion scripts/test_notebooks.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

INCLUDED_NOTEBOOKS="docs/guides/ docs/testing_notebooks/"
INCLUDED_NOTEBOOKS="docs/guides/ " # docs/testing_notebooks/" will revert when the pyro-ppl 1.9 bug is fixed

CI=1 pytest -v --nbval-lax --dist loadscope -n auto $INCLUDED_NOTEBOOKS

0 comments on commit 4c6cb8a

Please sign in to comment.