Skip to content

Commit

Permalink
Add just target for regenerating poetry lock file
Browse files Browse the repository at this point in the history
  • Loading branch information
sea-kelp committed Feb 26, 2024
1 parent 00ba558 commit cfe2374
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ To run the project locally:
4. `Commit changes?`: `y`
3. Run `just up` and visit http://localhost:3000!

To re-generate the poetry lock file (if you need to update dependencies in pyproject.toml):
1. Run `just lock`
2. Include the modified `poetry.lock` file in your commit


## Deployment

Expand Down
2 changes: 2 additions & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ services:
FLASK_DEBUG: 1
SQLALCHEMY_WARN_20: 1
volumes:
- ./poetry.lock:/usr/src/app/poetry.lock
- ./pyproject.toml:/usr/src/app/pyproject.toml
- ./OpenOversight:/usr/src/app/OpenOversight
- oo-assets:/usr/src/app/OpenOversight/app/static/dist
ports:
Expand Down
4 changes: 4 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ import +args:
lint:
pre-commit run --all-files

# Generate poetry lockfile
lock:
just run --no-deps web poetry lock

# Run Flask-Migrate tasks in the web container
db +migrateargs:
just run --no-deps web flask db {{ migrateargs }}
Expand Down

0 comments on commit cfe2374

Please sign in to comment.