The BAM Masterdata repository contains the masterdata schemas defined at BAM and provides utility functions for working with them.
If you want to install it, do:
pip install bam-masterdataIf you want to develop locally this package, clone the project and enter in the workspace folder:
git clone https://github.com/BAMresearch/bam-masterdata.git
cd bam-masterdataCreate a virtual environment (you can use Python>3.9) in your workspace:
python3 -m venv .venv
source .venv/bin/activateRun the following script depending on your OS:
- Linux/MacOS:
./scripts/install_python_dependencies.sh
- Windows:
scripts/install_python_dependencies.bat
Note: This script installs the required dependencies for development, testing, and documentation, using uv and pip.
You can locally run the tests by doing:
python -m pytest -sv testswhere the -s and -v options toggle the output verbosity.
You can also generate a local coverage report:
python -m pytest --cov=src testsWe use Ruff for formatting and linting the code following the rules specified in the pyproject.toml. You can run locally:
ruff check .This will produce an output with the specific issues found. In order to auto-fix them, run:
ruff format .If some issues are not possible to fix automatically, you will need to visit the file and fix them by hand.
To view the documentation locally, make sure to have installed the extra packages (this is part of the scripts/install_python_dependencies.*, so if you ran this script before, you don't need to do it again now):
uv pip install -e '[docu]'Note: This command installs mkdocs, mkdocs-material, and other documentation-related dependencies.
The first time, build the server:
mkdocs buildRun the documentation server:
mkdocs serveThe output looks like:
INFO - Building documentation...
INFO - Cleaning site directory
INFO - [14:07:47] Watching paths for changes: 'docs', 'mkdocs.yml'
INFO - [14:07:47] Serving on http://127.0.0.1:8000/Simply click on http://127.0.0.1:8000/. The changes in the md files of the documentation are immediately reflected when the files are saved (the local web will automatically refresh).
The main code developers are:
| Name | |
|---|---|
| Carlos Madariaga | [email protected] |
| Lucas Zimmermann | [email protected] |
| Dr. Jose M. Pizarro | [email protected] |