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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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