Skip to content

Commit

Permalink
Update dependencies (#1061)
Browse files Browse the repository at this point in the history
Source python venv in husky pre-commit
Add python venv docs to README and remove unneeded backtick
  • Loading branch information
hdavey-gds authored Jan 17, 2025
1 parent 175ea10 commit 75e8957
Show file tree
Hide file tree
Showing 4 changed files with 1,671 additions and 1,639 deletions.
2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
source venvlocal/bin/activate

for cmd in reindent isort black pyupgrade mypy pydocstyle flake8; do
command -v "$cmd" >/dev/null 2>&1 || { echo >&2 "Install $cmd (Follow instructions from 'Set up husky hooks' section of Readme.md file)"; exit 2; }
done
Expand Down
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,11 @@ To install the hooks run

`npm run husky:install`

`python3 -m venv venvlocal` (Run only if venv doesn't exist already)
`python3 -m venv venvlocal` (Creates a [python venv](https://docs.python.org/3/library/venv.html) in the local directory [venvlocal/](venvlocal) - run only if this venv doesn't exist already)

`source venvlocal/bin/activate`
`source venvlocal/bin/activate` (Adds the venv directory to your PATH so running `python` will use the venv python and the packages it installed)

`pip install -r athena-scripts/raw_stage_optimisation_solution/scripts/requirements.txt` (Only need to be run first time)

`
`pip install -r athena-scripts/raw_stage_optimisation_solution/scripts/requirements.txt` (Installs packages from [requirements.txt](athena-scripts/raw_stage_optimisation_solution/scripts/requirements.txt) - only needs to be run first time)

After this, the hooks defined under the [.husky](.husky) directory will automatically run when you commit or push.*
The [lint-staged](https://github.com/okonet/lint-staged) library is used to only run certain tasks if certain files are modified.
Expand Down
Loading

0 comments on commit 75e8957

Please sign in to comment.