-
Notifications
You must be signed in to change notification settings - Fork 0
fix: Improve Makefile Docker recipes and add optional UV support #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
5870e54
feat: Add PYTHON and PIP variables to Makefile for UV support
efcaguab 332bd9f
fix: Add docker-volume dependency to docker-compose recipes
efcaguab c817bf3
feat: Add justfile for local development
efcaguab 0413bee
fix: Minor fixes to Makefile and justfile
efcaguab 166605a
fix: Add codespell to pre-commit hook dependencies
efcaguab 6e3cdfc
docs: Update CONTRIBUTING.md to clarify usage of justfile commands
efcaguab File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,97 @@ | ||
| # Justfile - Thin wrapper for local development | ||
| # Adjusts PYTHON and PIP variables for venv, then calls Make recipes | ||
| # Use: `just install`, `just test`, `just reqs`, etc. | ||
|
|
||
| set shell := ["bash", "-c"] | ||
|
|
||
|
|
||
| VENV_NAME := ".venv" | ||
| PYTHON := VENV_NAME / "bin" / "python" | ||
| PIP := "uv pip" | ||
|
|
||
| [private] | ||
| default: | ||
| just --list | ||
|
|
||
| # Create virtual environment | ||
| venv: | ||
| make venv | ||
|
|
||
| # Upgrade pip | ||
| upgrade-pip: | ||
| make upgrade-pip PYTHON="{{ PYTHON }}" PIP="{{ PIP }}" | ||
|
|
||
| # Install and only test dependencies | ||
| install-test: upgrade-pip | ||
| make install-test PYTHON="{{ PYTHON }}" PIP="{{ PIP }}" | ||
|
|
||
| # Install the package in editable mode & all dependencies for local development | ||
| install: upgrade-pip | ||
| make install PYTHON="{{ PYTHON }}" PIP="{{ PIP }}" | ||
|
|
||
| # Run all unit tests exporting coverage.xml report | ||
| test: | ||
| make test PYTHON="{{ PYTHON }}" PIP="{{ PIP }}" | ||
|
|
||
| # Install and pre-commit hooks | ||
| hooks: | ||
| make hooks PYTHON="{{ PYTHON }}" PIP="{{ PIP }}" | ||
|
|
||
| # Auto-format python source files according with PEP8 | ||
| format: | ||
| make format PYTHON="{{ PYTHON }}" PIP="{{ PIP }}" | ||
|
|
||
| # Lint python source files | ||
| lint: | ||
| make lint PYTHON="{{ PYTHON }}" PIP="{{ PIP }}" | ||
|
|
||
| # Use Codespell to do spell checking | ||
| codespell: | ||
| make codespell PYTHON="{{ PYTHON }}" PIP="{{ PIP }}" | ||
|
|
||
| # Perform type-checking | ||
| typecheck: | ||
| make typecheck PYTHON="{{ PYTHON }}" PIP="{{ PIP }}" | ||
|
|
||
| # Use pip-audit to scan for known vulnerabilities | ||
| audit: | ||
| make audit PYTHON="{{ PYTHON }}" PIP="{{ PIP }}" | ||
|
|
||
| # Run all pre-commit hooks | ||
| pre-commit: | ||
| make pre-commit PYTHON="{{ PYTHON }}" PIP="{{ PIP }}" | ||
|
|
||
| # Run the standard set of checks performed in CI | ||
| all: lint codespell typecheck audit test | ||
|
|
||
| # Compile requirements.txt with pip-tools | ||
| reqs: | ||
| make reqs PYTHON="{{ PYTHON }}" PIP="{{ PIP }}" | ||
|
|
||
| # Upgrade requirements.txt with pip-tools | ||
| reqs-upgrade: | ||
| make reqs-upgrade PYTHON="{{ PYTHON }}" PIP="{{ PIP }}" | ||
|
|
||
| # Docker: Build docker images | ||
| docker-build: | ||
| make docker-build | ||
|
|
||
| # Docker: Create the docker volume for GCP | ||
| docker-volume: | ||
| make docker-volume | ||
|
|
||
| # Docker: Authenticate to google cloud and configure the project | ||
| docker-gcp: | ||
| make docker-gcp | ||
|
|
||
| # Docker: Run tests using prod image, exporting coverage.xml report | ||
| docker-ci-test: | ||
| make docker-ci-test | ||
|
|
||
| # Docker: Enter interactive dev container shell | ||
| docker-shell: | ||
| make docker-shell | ||
|
|
||
| # Clean local caches and build artifacts | ||
| clean: | ||
| make clean |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.