the uni-directional config template repo for all downstream repos
- config template: fork this repo to inherit the standardised configuration to start a new repo
- config sync: clone this template repo to the same parent folder of a project repo and run
just config - shared lib: clone this template repo to the same parent folder of a project repo and run
just shared - repo specific configs: explicitly annotated with comments and keep during merge
# * <-- repo specific config# * repo specific config -->
To start using the base configs, you will need to install the following system packages:
MacOs:
packages:
brew install uv just watchexec
Windows:
git bash:
winget install --id Git.Git -e --source wingetpackages:
scoop install uv just watchexec
- uv - python version & dependency/virtualenv manager
@1.8 - just - programmatic command runner
@1.25 - watchexec - file watcher
@1.25 - bash - the shell for running just commands (available on MacOS by default)
Other tooling:
- VSCode - IDE for sharing extensions with configs
- aws-connect - BP AWS Token Broker CLI (not used after migrating to Azure)
System Bin Dependencies:
- pyenv > python-build
- azure-blob-storage > requests > urllib3
To view the list of available commands, simply run just in your terminal. Commands that require setups:
/artefactsholds all large file assets, e.g. model, image, data/outputholds all temporary outputs that would be ignored by git/notebookfor any .ipynb notebooks (VSCode recommended for handling .env)/src/sharedshared libraries across repos
To update python version the following items would need to be updated to use the same version:
.python-version- local development python versionpyproject.toml-[project]requires-pythonversion range for dependency resolutionruff.toml-target-versionpython legacy and future features checkazure-pipelines.yml-variables:PYTHON_VERSIONci python versionDockerfile-FROM python:production python version
We use Python 3.10 instead of newer versions for the following reasons:
- use the same version of python in all our repos as much as possible
- could be updated to Python 3.11 now
- pipeline(src)
__main__.py- the entrypoint file forjust runorpython -m srcin Docker imageargs.py- cli arguments definition for input parametersprocess.py- the available processes of the pipelinevalidators.py- pydantic validatorstypes.py- type definitions
check pytest.ini
- type checker - mypy
- notebook clean commit - nbstripout
- pre-commit hooks - pre-commit
- dotenv cli - python-dotenv
- linter & formatter - ruff
code vulnerability scanner- banditdoc site generation- sphinxdocker image scan- docker scout
the files are folded by these categories in VSCode
.vscode- shared VSCode extensions and settings
justfile- scripted command for development.editorconfig- editor config.pre-commit-config.yaml- pre-commit config.python-version- pyenv local python versioncspell.config.yaml- code spell config for VSCode extension
.env-cache- local dev env vars that would go into.env.env-template- shared dev env vars that would go into.env
pyproject.toml- dependency specification.coveragerc- pytest coverage config.gitattributes- git attributes.gitignore- gitignoreazure-pipeline.yml- azure pipeline configDockerfile- Dockerfile for production buildsmypy.ini- mypy type safety check configpytest.ini- pytest configruff.toml- ruff linter, formatter config
README.md- documentation*.md- further documentations