Metadata-Version: 2.3
Name: optional_dependencies
Version: 0.1.0rc2
Summary: Construct Checks for Optional Dependencies
Project-URL: Bug Tracker, https://github.com/GalacticDynamics/optional_dependencies/issues
Project-URL: Changelog, https://github.com/GalacticDynamics/optional_dependencies/releases
Project-URL: Discussions, https://github.com/GalacticDynamics/optional_dependencies/discussions
Project-URL: Homepage, https://github.com/GalacticDynamics/optional_dependencies
Author-email: GalacticDynamics Maintainers <nstarman@users.noreply.github.com>
License: Copyright 2024 GalacticDynamics Maintainers
        
        Permission is hereby granted, free of charge, to any person obtaining a copy of
        this software and associated documentation files (the "Software"), to deal in
        the Software without restriction, including without limitation the rights to
        use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
        of the Software, and to permit persons to whom the Software is furnished to do
        so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Classifier: Development Status :: 1 - Planning
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Classifier: Typing :: Typed
Requires-Python: >=3.8
Requires-Dist: packaging
Provides-Extra: dev
Requires-Dist: pytest-cov>=3; extra == 'dev'
Requires-Dist: pytest>=6; extra == 'dev'
Provides-Extra: docs
Requires-Dist: furo>=2023.08.17; extra == 'docs'
Requires-Dist: myst-parser>=0.13; extra == 'docs'
Requires-Dist: sphinx-autodoc-typehints; extra == 'docs'
Requires-Dist: sphinx-copybutton; extra == 'docs'
Requires-Dist: sphinx>=7.0; extra == 'docs'
Provides-Extra: test
Requires-Dist: pytest-cov>=3; extra == 'test'
Requires-Dist: pytest>=6; extra == 'test'
Description-Content-Type: text/markdown

<h1 align='center'> optional_dependencies </h1>
<h2 align="center">Construct Checks for Optional Dependencies</h2>

## Installation

[![PyPI platforms][pypi-platforms]][pypi-link]
[![PyPI version][pypi-version]][pypi-link]

<!-- [![Conda-Forge][conda-badge]][conda-link] -->

```bash
pip install optional_dependencies
```

## Documentation

This package allows for easy construction of checks for optional dependencies.
As every Python project can have its own unique set of optional dependencies,
`optional_dependencies` provides an
[`enum.Enum`](https://docs.python.org/3/library/enum.html) base class for
enumerating the optional dependencies.

```python
from optional_dependencies import OptionalDependencyEnum, auto

# Note that `auto` is just a re-export of enum.auto


class OptDeps(OptionalDependencyEnum):
    PACKAGING = auto()


OptDeps.PACKAGING
# <OptDeps.PACKAGING: <Version('...')>>

OptDeps.PACKAGING.is_installed
# True

OptDeps.PACKAGING.version
# <Version('...')>
```

## Citation

[![DOI][zenodo-badge]][zenodo-link]

If you found this library to be useful and want to support the development and
maintenance of lower-level code libraries for the scientific community, please
consider citing this work.

## Development

[![codecov][codecov-badge]][codecov-link]
[![Actions Status][actions-badge]][actions-link]

We welcome contributions!

<!-- prettier-ignore-start -->

[actions-badge]:            https://github.com/GalacticDynamics/optional_dependencies/workflows/CI/badge.svg
[actions-link]:             https://github.com/GalacticDynamics/optional_dependencies/actions
[codecov-badge]:            https://codecov.io/gh/GalacticDynamics/optional_deps/graph/badge.svg
[codecov-link]:             https://codecov.io/gh/GalacticDynamics/optional_deps
[pypi-link]:                https://pypi.org/project/optional_dependencies/
[pypi-platforms]:           https://img.shields.io/pypi/pyversions/optional_dependencies
[pypi-version]:             https://img.shields.io/pypi/v/optional_dependencies

<!-- prettier-ignore-end -->
