Data cleaning package
version: 0.2.1
This repository collects python modules to clean and prepare data for downstream analyses or presentation in reports. For example, the module contains functionality to created formatted publication ready baseline tables or supplementary excel tables.
Please consult the package documentation.
Installation
At present, the repository is undergoing development and no packages exist yet
on PyPy or in Conda.
Therefore it is recommended that it is installed in either of the two ways
listed below.
First, clone this repository and then cd to the root of the repository.
git clone git@gitlab.com:SchmidtAF/clean-data.git
cd clean-data
Installation using conda dependencies
A conda environment is provided in a yaml file in the directory
./resources/conda/.
A new conda environment called clean-data can be built using the command:
# From the root of the repository
conda env create --file ./resources/conda/envs/conda_create.yaml
To add to an existing environment use:
# From the root of the repository
conda env update --file ./resources/conda/envs/conda_update.yaml
Next the package can be installed:
make install
Development
For development work, install the package in editable mode with Git commit hooks configured:
make install-dev
This command installs the package in editable mode and configures Git commit
hooks, allowing you to run git pull to update the repository or switch
branches without reinstalling.
Alternatively, you can install manually:
python -m pip install -e .
python .setup_git_hooks.py
Git Hooks Configuration
When setting up a development environment, the setup-hooks command
configures Git hooks to enforce conventional commit message formatting and
spell check using codespell.
To view the commit message format requirements, run:
./.githooks/commit-msg -help
For frequent use, add this function to your shell configuration (~/.bashrc
or ~/.zshrc):
commit-format-help() {
local git_root
git_root=$(git rev-parse --show-toplevel 2>/dev/null)
if [ -z "$git_root" ]; then
echo "Error: Not inside a git repository"
return 1
fi
local hook_path="$git_root/.githooks/commit-msg"
if [ ! -f "$hook_path" ]; then
echo "Error: commit-msg hook not found"
return 1
fi
"$hook_path" --help
}
If you have already installed the package in editable mode without running
_setup_git_hooks.py, you can configure the hooks manually at any time by
running:
_setup_git_hooks.py
Validating the package
After installing the package from GitLab, you may wish to run the test suite to confirm everything is working as expected:
# From the root of the repository
pytest tests
Usage
Please have a look at the examples in resources for some possible recipes.
Metadata
Release files for clean-data-schmidtaf 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| clean_data_schmidtaf-0.2.1.tar.gz | 74.5 kB | Without provenance | Details for clean_data_schmidtaf-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| clean_data_schmidtaf-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for clean_data_schmidtaf-0.2.1-py3-none-any.whl |
Total release size: 150.1 kB
Release files / clean_data_schmidtaf-0.2.1.tar.gz
| Download URL | clean_data_schmidtaf-0.2.1.tar.gz |
|---|---|
| Size | 74.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2662354c3c8431e9b616b930538494c3f1d7d47822ce05adb3d52cb05c06cb68
|
|
BLAKE2b-256 checksum How to use checksums |
f34444d3b9c285d2c83e19c25ea5a9b0d444d24bae96c5c41bd64bf76f346eef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / clean_data_schmidtaf-0.2.1-py3-none-any.whl
| Download URL | clean_data_schmidtaf-0.2.1-py3-none-any.whl |
|---|---|
| Size | 75.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3c2037ed01eadea7da2f7a8108dcbeef207d493c99c8ad23133d2fd30208c897
|
|
BLAKE2b-256 checksum How to use checksums |
980cafcf7b3dc615d726280e2ea24ccd680f28e11d10118fbd132af391b17f05
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Security for clean-data-schmidtaf 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.