Skip to main content

This package aims to offer helper functions that simplify model building and evaluation

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

DMQCLib

PyPI - Version Anaconda-Server Badge Check Package codecov CodeFactor

The DMQCLib package offers helper functions and classes that simplify model building and evaluation for the AIQC project.

Installation

The package is indexed on PyPI and Anaconda.org, allowing you to install it using either pip or conda.

Using pip:

pip install dmqclib

Using conda:

conda install takayasaito::dmqclib 

Contribution

Package Manager

You can create a new environment using any package management system, such as conda and mamba.

Additionally, using uv is recommended when contributing modifications to the package.

After the installation of uv, running uv sync inside the project will create the environment.

Example of Environment Setup

For example, the following commands create a new conda environment with mamba and set up the library environment with uv:

mamba create -n aiqc -c conda-forge python=3.12
mamba activate aiqc
mamba install uv

cd /your/path/to/dmqclib
uv sync

Unit Test

You may need to install the library in editable mode at least once before running unit tests.

uv pip install -e .

After the library installation, you can run unit tests with pytest.

uv run pytest -v

Python Linter

To lint the code under the src folder with ruff, use the following command:

uvx ruff check src

and the unit test code under the tests folder:

uvx ruff check tests

Alternatively, to lint the code with flake8, use the following command:

uvx flake8 src --max-line-length=100

Code Formatter

To format the code under the src folder with ruff, use the following command:

uvx ruff format src

and the unit test code under the tests folder:

uvx ruff format tests

Alternatively, to format the code with black, use the following command:

uvx black src

Deployment

Release to PyPI

The GitHub Action (.github/workflows/publish_to_pypi.yaml) automatically publishes the package to PyPI whenever a GitHub release is created.

Alternatively, you can manually publish the package to PyPI:

uv build
uv publish --token pypi-xxxx-xxxx-xxxx-xxxx

Release to Anaconda.org

Unlike using a GitHub Action for PyPI, publishing to Anaconda.org is a manual process.

You’ll need the following tools:

  • conda-build
  • anaconda-client
  • grayskull

Install them (preferably in a dedicated environment):

conda install -c conda-forge conda-build anaconda-client grayskull

1. Generate the conda recipe with Grayskull

From the project root, run:

grayskull pypi dmqclib

This creates a meta.yaml file in the dmqclib/ directory.

2. Build the package

cd dmqclib
conda build .
cd ..

This creates a .conda package in your local conda-bld directory (e.g., ~/miniconda3/conda-bld/noarch/).

3. Upload to Anaconda.org

anaconda login
anaconda upload /full/path/to/conda-bld/noarch/dmqclib-<version>-<build>.conda

4. Keep the recipe under version control

cp dmqclib/meta.yaml conda/meta.yaml
rm -r dmqclib

Project details


Download files

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

Source Distribution

dmqclib-0.2.5.tar.gz (3.6 MB view details)

Uploaded Source

Built Distribution

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

dmqclib-0.2.5-py3-none-any.whl (35.3 kB view details)

Uploaded Python 3

File details

Details for the file dmqclib-0.2.5.tar.gz.

File metadata

  • Download URL: dmqclib-0.2.5.tar.gz
  • Upload date:
  • Size: 3.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for dmqclib-0.2.5.tar.gz
Algorithm Hash digest
SHA256 b264c0775eb9b631a8a96be02787c7464ac8ed2c2abaec346faae84b519e8417
MD5 919d97f766ff9c1c02e6322ca0ecb98d
BLAKE2b-256 13b66eeb53d1798f1ec9b18157d26e201bd2c6f0f4461fb50b2dcbd16b19f02e

See more details on using hashes here.

Provenance

The following attestation bundles were made for dmqclib-0.2.5.tar.gz:

Publisher: publish_to_pypi.yml on AIQC-Hub/dmqclib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dmqclib-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: dmqclib-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 35.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for dmqclib-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 97f3fbba2a1a0d301d63a9e3feedf826b3a9e332d18af3e36ac093e8784e3c47
MD5 42a46dd67b9b86eb13f5494780e33b4e
BLAKE2b-256 176e2b10e61d8cd4832c5008bf1b9712f7ba0fe279f499ca2f214fd0bcf6ab2a

See more details on using hashes here.

Provenance

The following attestation bundles were made for dmqclib-0.2.5-py3-none-any.whl:

Publisher: publish_to_pypi.yml on AIQC-Hub/dmqclib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page