Skip to main content

Neurosymbolic PyPI package classifier selector.

Project description

classipypi

PyPI pdm-managed pre-commit.ci status Supported Python versions

Neural PyPI package 'Trove classifier' selector.

Motivation

PyPI 'Trove classifiers' are used in setup.py or pyproject.toml files to convey to PyPI users the conditions under which the package has been used or tested, the topic of the software, etc. such as

  • Operating System :: POSIX :: Linux
  • Topic :: Software Development :: Libraries
  • Intended Audience :: Developers

Installation

pip install classipypi

Usage

ls

usage: classipypi ls [-h] [-i [INCLUDE ...]] [-e [EXCLUDE ...]] [-t] [-g]

Configure input filtering and output display.

options:
  -h, --help            show this help message and exit
  -i [INCLUDE ...], --include [INCLUDE ...]
                        Strings to filter tags for.
                        (default: [])
  -e [EXCLUDE ...], --exclude [EXCLUDE ...]
                        Strings to filter tags against.
                        (default: [])
  -t, --toml            Whether to display the tags as a TOML-compatible list.
                        (default: False)
  -g, --group           Whether to display tags grouped by section.
                        (default: False)

For example, to show the Development Status tags (but skip any with "Alpha" in):

classipypi ls -i "Development Status" -e Alpha
Development Status :: 1 - Planning
Development Status :: 4 - Beta
Development Status :: 5 - Production/Stable
Development Status :: 6 - Mature
Development Status :: 7 - Inactive

sel

Use -q or --query to select classifiers based on a description:

classipypi -q "3D scientific visualisation tool"
usage: classipypi sel [-h] [-q QUERY] [-s SOURCE] [-t] [-g]

Configure source and y.

options:
  -h, --help            show this help message and exit
  -q QUERY, --query QUERY
                        The query string.
                        (default: None)
  -s SOURCE, --source SOURCE
                        The source code.
                        (default: None)
  -t, --toml            Whether to display the tags as a TOML-compatible list.
                        (default: False)
  -g, --group           Whether to display tags grouped by section.
                        (default: False)

Use -s or --source to select classifiers based on source code:

classipypi --source ./local_package_repo/

Development

  • To set up pre-commit hooks (to keep the CI bot happy) run pre-commit install-hooks so all git commits trigger the pre-commit checks. I use Conventional Commits. This runs black, flake8, autopep8, pyupgrade, etc.

  • To set up a dev env, I first create a new conda environment and use it in PDM with which python > .pdm-python. To use virtualenv environment instead of conda, skip that. Run pdm install and a .venv will be created if no Python binary path is found in .pdm-python.

  • To run tests, run pdm run python -m pytest and the PDM environment will be used to run the test suite.

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

classipypi-0.0.7.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

classipypi-0.0.7-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file classipypi-0.0.7.tar.gz.

File metadata

  • Download URL: classipypi-0.0.7.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.10.1 CPython/3.10.4

File hashes

Hashes for classipypi-0.0.7.tar.gz
Algorithm Hash digest
SHA256 bcd5ed44b68ccc25af9447f5bc5453e9f18ab8908192d34f613ed7913af832ab
MD5 94d16be66e3cabdf5336fc468ce8a073
BLAKE2b-256 08a567408a624bd2171d58d935f999373a91a092886bf3ca6aaa798f8cf1d607

See more details on using hashes here.

File details

Details for the file classipypi-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: classipypi-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.10.1 CPython/3.10.4

File hashes

Hashes for classipypi-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 a31b36f0ac020771430c737f5479d31f61440d8f7c2711eda8b52b76188a56ba
MD5 b44a6493ccd756cb10f64cd5e16e7d43
BLAKE2b-256 1fcf8078204e3183c75147cd87b5efaf8d13422e7dcacbca3ff1640ddc543f4c

See more details on using hashes here.

Supported by

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