Package to improve the development of transparent, replicable data processing pipelines
Project description
damast: Creation of reproducible data processing pipelines
The main purpose of this library is to faciliate the reusability of data and data processing pipelines. For this, damast introduces a means to associate metadata with data frames and enables consistency checking.
To ensure semantic consistency, transformation steps in a pipeline can be annotated with allowed data ranges for inputs and outputs, as well as units.
class LatLonTransformer(PipelineElement):
"""
The LatLonTransformer will consume a lat(itude) and a lon(gitude) column and perform
cyclic normalization. It will add four columns to a dataframe, namely lat_x, lat_y, lon_x, lon_y.
"""
@damast.core.describe("Lat/Lon cyclic transformation")
@damast.core.input({
"lat": {"unit": "deg"},
"lon": {"unit": "deg"}
})
@damast.core.output({
"lat_x": {"value_range": MinMax(-1.0, 1.0)},
"lat_y": {"value_range": MinMax(-1.0, 1.0)},
"lon_x": {"value_range": MinMax(-1.0, 1.0)},
"lon_y": {"value_range": MinMax(-1.0, 1.0)}
})
def transform(self, df: AnnotatedDataFrame) -> AnnotatedDataFrame:
lat_cyclic_transformer = CycleTransformer(features=["lat"], n=180.0)
lon_cyclic_transformer = CycleTransformer(features=["lon"], n=360.0)
_df = lat_cyclic_transformer.fit_transform(df=df)
_df = lon_cyclic_transformer.fit_transform(df=_df)
return _df
For detailed examples, check the documentation at: https://simula.github.io/damast
Installation and Development Setup
Firstly, you will want to create you an isolated development environment for Python, that being conda or venv-based. The following will go through a venv based setup.
Let us assume you operate with a 'workspace' directory for this project:
cd workspace
Here, you will create a virtual environment. Get an overview over venv (command):
python -m venv --help
Create your venv and activate it:
python -m venv damast-venv
source damast-venv/bin/activate
Clone the repo and install:
git clone https://github.com/simula/damast
cd damast
pip install -e ".[test,dev]"
or alternatively:
pip install damast[test,dev]
Docker Container
If you prefer to work or start with a docker container you can build it using the provided Dockerfile
docker build -t damast:latest -f Dockerfile .
To enter the container:
docker run -it --rm damast:latest /bin/bash
Usage
To get the usage documentation it is easiest to check the published documentation here.
Otherwise, you can also locally generate the latest documentation once you installed the package:
tox -e build_docs
Then open the documentation with a browser:
<yourbrowser> _build/html/index.html
Testing
Install the project and use the predefined default test environment:
tox -e py
Contributing
This project is open to contributions. For details on how to contribute please check the Contribution Guidelines
License
This project is licensed under the BSD-3-Clause License.
Copyright
Copyright (c) 2023-2025 Simula Research Laboratory, Oslo, Norway
Acknowledgments
This work has been derived from work that is part of the T-SAR project Some derived work is mainly part of the specific data processing for the 'maritime' domain.
The development of this library is part of the EU-project AI4COPSEC which receives funding from the Horizon Europe framework programme under Grant Agreement N. 101190021.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file damast-0.1.11.tar.gz.
File metadata
- Download URL: damast-0.1.11.tar.gz
- Upload date:
- Size: 83.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63e2ac94318fc75a07eb609cb88f0ed0c60ccdfbeec6515c53fa77771c66cdf2
|
|
| MD5 |
cfdb2c62577867f55e34b5ab50e29a4f
|
|
| BLAKE2b-256 |
f810940f57db4b83a1e9a47d5b16a4dde8891a28bfe86625a8812d95d2a306a2
|
Provenance
The following attestation bundles were made for damast-0.1.11.tar.gz:
Publisher:
build-wheel.yml on simula/damast
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
damast-0.1.11.tar.gz -
Subject digest:
63e2ac94318fc75a07eb609cb88f0ed0c60ccdfbeec6515c53fa77771c66cdf2 - Sigstore transparency entry: 366272313
- Sigstore integration time:
-
Permalink:
simula/damast@73eb7375620d1c82d3f12dc9bd3451375940639e -
Branch / Tag:
refs/heads/main - Owner: https://github.com/simula
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-wheel.yml@73eb7375620d1c82d3f12dc9bd3451375940639e -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file damast-0.1.11-py3-none-any.whl.
File metadata
- Download URL: damast-0.1.11-py3-none-any.whl
- Upload date:
- Size: 99.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fed0cac7b9e31e870dd26b41e22f12182197a90aa53af47bf881ddc4cfede3e4
|
|
| MD5 |
f20361f9a4780e171d34bc55d5860aa1
|
|
| BLAKE2b-256 |
070a6439be32a37773d197b89dd3416e42583f6c888426861f39059dc93638ad
|
Provenance
The following attestation bundles were made for damast-0.1.11-py3-none-any.whl:
Publisher:
build-wheel.yml on simula/damast
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
damast-0.1.11-py3-none-any.whl -
Subject digest:
fed0cac7b9e31e870dd26b41e22f12182197a90aa53af47bf881ddc4cfede3e4 - Sigstore transparency entry: 366272335
- Sigstore integration time:
-
Permalink:
simula/damast@73eb7375620d1c82d3f12dc9bd3451375940639e -
Branch / Tag:
refs/heads/main - Owner: https://github.com/simula
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-wheel.yml@73eb7375620d1c82d3f12dc9bd3451375940639e -
Trigger Event:
workflow_dispatch
-
Statement type: