Skip to main content

BAM Masterdata

CI Status Coverage PyPI versions Python supported versions

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-masterdata

Development

If 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-masterdata

Create a virtual environment (you can use Python>3.9) in your workspace:

python3 -m venv .venv
source .venv/bin/activate

Run the following script depending on your OS:

  • Linux/MacOS:
    ./tools/scripts/install_python_dependencies.sh
    
  • Windows:
    tools/scripts/install_python_dependencies.bat
    

Note: This script installs the required dependencies for development, testing, and documentation, using uv and pip.

Run the tests

You can locally run the tests by doing:

python -m pytest -sv tests

where the -s and -v options toggle the output verbosity.

You can also generate a local coverage report:

python -m pytest --cov=src tests

Run auto-formatting and linting

We 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.

Pre-commit hooks (recommended)

We use pre-commit to run fast checks automatically on every commit (formatting, linting, secrets scanning, and a repository-specific policy check).

Install once:

pip install pre-commit
pre-commit install

(Optional) Run on the whole repo:

pre-commit run --all-files

Secrets baseline: the repository uses .secrets.baseline. If you add new secrets intentionally (rare), update the baseline:

detect-secrets scan > .secrets.baseline

Documentation on Github pages

To view the documentation locally, make sure to have installed the extra packages (this is part of the tools/scripts/install_python_dependencies.*, so if you ran this script before, you don't need to do it again now):

uv pip install -e '[dev]'

Note: This command installs the zensical dependency.

The first time, build the server:

zensical build

Run the documentation server:

zensical serve

The output looks like:

Serving .../site on http://localhost:8000
Build started
No issues found

Simply click on http://localhost:8000. The changes in the md files of the documentation are immediately reflected when the files are saved (the local web will automatically refresh).

Main contributors

The main code developers are:

Name E-mail
Carlos Madariaga carlos.madariaga@bam.de
Lucas Zimmermann lucas.zimmermann@bam.de
Dr. Jose M. Pizarro jose.pizarro-blanco@bam.de

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bam_masterdata-0.11.1.tar.gz (2.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bam_masterdata-0.11.1-py3-none-any.whl (526.7 kB view details)

Uploaded Python 3

File details

Details for the file bam_masterdata-0.11.1.tar.gz.

File metadata

  • Download URL: bam_masterdata-0.11.1.tar.gz
  • Upload date:
  • Size: 2.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for bam_masterdata-0.11.1.tar.gz
Algorithm Hash digest
SHA256 ac24274aa9c841ea48c0a7adcd1d36f7c89adc9b58740c516dd5513e336d449c
MD5 07a13454a163643ae8de1876038fda57
BLAKE2b-256 057ad67f949ae347d6b6fc413412a9655dec5c31b1299ab7b7e076f96f8183a8

See more details on using hashes here.

File details

Details for the file bam_masterdata-0.11.1-py3-none-any.whl.

File metadata

  • Download URL: bam_masterdata-0.11.1-py3-none-any.whl
  • Upload date:
  • Size: 526.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for bam_masterdata-0.11.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7aa52d284ff4a847f7ba94de55f763ac421172412488165fc47f44b834898b24
MD5 9c982b7d48963e810ce46f650aa76f91
BLAKE2b-256 12eb8dd5c63284bcd3a4fa1c7791e3dd2ae07b9d5dfef9e1b2bfedf4156a3b37

See more details on using hashes here.

Release history Release notifications | RSS feed

0.13.1

2 files

0.13.0

2 files

0.12.0

2 files

0.11.6

2 files

0.11.5

2 files

0.11.4

2 files

0.11.3

2 files

This release

0.11.1 This release

2 files

0.10.0

2 files

0.9.0

2 files

0.8.6

2 files

0.8.5

2 files

0.8.4

2 files

0.8.3

2 files

0.8.2

2 files

0.8.1

2 files

0.8.0

2 files

0.7.0

2 files

0.6.3

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.0

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

0.1.1

2 files

0.1.0

2 files

0.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page