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

We recommend using uv to manage your virtual environment and the dependencies, as well as using Python 3.14:

uv venv --python 3.14

Activate the environment:

  • Linux/MacOS

    source .venv/bin/activate
    
  • Windows

    .venv\Scripts\activate
    

With the virtual environment activated, make sure to install the optional dependencies:

uv sync --all-extras

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.

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 with the setup commands explained above (especifically, uv sync --all-extras). 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).

Metadata

Release files for bam-masterdata 0.13.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bam-masterdata 0.13.3
File Size Uploaded
bam_masterdata-0.13.3.tar.gz 2.4 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for bam-masterdata 0.13.3
File Interpreter ABI Platform
bam_masterdata-0.13.3-py3-none-any.whl Python 3 none any Details

Total release size: 2.9 MB

Release files / bam_masterdata-0.13.3.tar.gz

Download URL bam_masterdata-0.13.3.tar.gz
Size 2.4 MB
Tags Source
SHA-256 checksum
How to use checksums
06407187dd54455838d8300e2c5b8f6a7c9e6c6d78b7d4ce8626870ccf9b6c8c
BLAKE2b-256 checksum
How to use checksums
e6120df2bb3cee12b3920dd0ea74eb63bbb9dea0b88bc7bcdd2fe98923848a2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / bam_masterdata-0.13.3-py3-none-any.whl

Download URL bam_masterdata-0.13.3-py3-none-any.whl
Size 553.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a4feeedbfacfb0cbee53e5846dd1c92700ebfe8eb9eb11aeb8ab3e02463b7b6c
BLAKE2b-256 checksum
How to use checksums
ea9026dc86443736db5b0c9d17cb1212dd35f14b21ceca74cbb4c828979ea145
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

0.14.0

2 release files

This release

0.13.3 This release

2 release files

0.13.2

2 release files

0.12.0

2 release files

0.11.6

2 release files

0.11.5

2 release files

0.11.4

2 release files

0.11.3

2 release files

0.11.1

2 release files

0.10.0

2 release files

0.9.0

2 release files

0.8.6

2 release files

0.8.5

2 release files

0.8.4

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.0

2 release 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