This repository was archived by the owner on Nov 3, 2026. It is now read-only.
Repository navigation
Create makefile for ease developer set-up #563
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| .PHONY: help dev-install install-python pre-commit setup-env setup test lint docs clean tox run-tests | ||
|
|
||
| help: | ||
| @echo "AIT-Core Development Makefile" | ||
| @echo "=============================" | ||
| @echo "" | ||
| @echo "Available targets:" | ||
| @echo " setup-env - Create and activate poetry virtual environment" | ||
| @echo " dev-install - Install package with development dependencies" | ||
| @echo " install-python - Install all required Python versions via pyenv" | ||
| @echo " pre-commit - Install pre-commit and pre-push hooks" | ||
| @echo " setup - Run full development setup (setup-env + dev-install + pre-commit + install-python)" | ||
| @echo " test - Run test suite with pytest" | ||
| @echo " tox - Run full tox build (tests, docs, linting)" | ||
| @echo " lint - Run linting pipeline" | ||
| @echo " docs - Build documentation" | ||
| @echo " clean - Remove build artifacts" | ||
| @echo "" | ||
| @echo "Before running 'make setup', ensure you have:" | ||
| @echo " - poetry installed" | ||
| @echo " - pyenv installed" | ||
| @echo "" | ||
| @echo "After setup, remember to set AIT_CONFIG:" | ||
| @echo " export AIT_CONFIG=/path/to/ait-core/config/config.yaml" | ||
|
|
||
| setup-env: | ||
| @echo "Installing package with poetry..." | ||
| poetry install | ||
|
|
||
| dev-install: | ||
| @echo "Installing package with development dependencies..." | ||
| poetry install | ||
|
|
||
| install-python: | ||
| @echo "Installing required Python versions via pyenv..." | ||
| cat .python-version | xargs -I{} pyenv install --skip-existing {} | ||
|
|
||
| pre-commit: | ||
| @echo "Installing pre-commit and pre-push hooks..." | ||
| pre-commit install && pre-commit install -t pre-push | ||
|
|
||
| setup: setup-env dev-install pre-commit install-python | ||
| @echo "" | ||
| @echo "Development setup complete!" | ||
| @echo "" | ||
| @echo "Remember to set AIT_CONFIG:" | ||
| @echo " export AIT_CONFIG=$$(pwd)/config/config.yaml" | ||
| @echo "" | ||
| @echo "Consider adding this to your shell RC file or virtual environment config." | ||
|
|
||
| test: | ||
| @echo "Running test suite with pytest..." | ||
| pytest | ||
|
|
||
| tox: | ||
| @echo "Running full tox build..." | ||
| tox | ||
|
|
||
| lint: | ||
| @echo "Running linting pipeline..." | ||
| tox -e lint | ||
|
|
||
| docs: | ||
| @echo "Building documentation..." | ||
| poetry run build_sphinx | ||
| @echo "" | ||
| @echo "Documentation built. Open doc/build/html/index.html to view." | ||
|
|
||
| clean: | ||
| @echo "Cleaning build artifacts..." | ||
| rm -rf build/ | ||
| rm -rf dist/ | ||
| rm -rf *.egg-info | ||
| rm -rf doc/build/ | ||
| rm -rf .tox/ | ||
| rm -rf .pytest_cache/ | ||
| find . -type d -name __pycache__ -exec rm -rf {} + | ||
| find . -type f -name '*.pyc' -delete | ||
| find . -type f -name '*.pyo' -delete | ||
|
|
||
| run-tests: | ||
| @echo "Running tests for specific Python version (e.g., make run-tests PY=py310)..." | ||
| tox -e $(or $(PY),py310) | ||
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forcing the pre-commit setup eh? 😢 Prolly for the best tho...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, indeed! 😈
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Developers will just need to run
make setupto be up in running. 👍🏼