Skip to content

Commit

Permalink
Merge pull request #34 from alan-turing-institute/fix-build
Browse files Browse the repository at this point in the history
Fix build
  • Loading branch information
jack89roberts committed Jan 2, 2024
2 parents 2c61763 + 526a324 commit 8b833b4
Show file tree
Hide file tree
Showing 11 changed files with 83 additions and 182 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pythonapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
if: matrix.depsize == 'full'
shell: bash
run: |
pip install .[all,tests]
pip install .[extras,tests]
- name: Install minimal dependencies
if: matrix.depsize == 'minimal'
Expand Down
25 changes: 25 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.11"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# We recommend specifying your dependencies to enable reproducible builds:
# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- method: pip
path: .
extra_requirements:
- docs
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,21 @@ colours (e.g. with `distinctipy.color_swatch`) or examples you will need `matplo
with the optional flag:

```bash
python -m pip install distinctipy[optional]
python -m pip install distinctipy[extras]
```

⚠️ Warning ⚠️ Previous versions of distinctipy (before 1.3) used `[optional]` instead of `[extras]`.

Or install them separately:

```bash
python -m pip install matplotlib pandas
```

For developers, to install the stack needed to run tests, generate docs etc. use the `[all]` flag:
For developers, to install the stack needed to run tests, generate docs etc. use:

```bash
python -m pip install distinctipy[all]
python -m pip install distinctipy[extras,tests,docs]
```

## Usage and Examples
Expand Down
4 changes: 2 additions & 2 deletions distinctipy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
[(0, 1, 0), (1, 0, 1), (0, 0.5, 1), (1, 0.5, 0), (0.5, 0.75, 0.5)]
"""
# flake8: noqa
from importlib.metadata import version

name = "distinctipy"

__version__ = "1.3.1"
__version__ = version(__name__)

# Expose these module names and their internals in the top-level API
__external__ = ["distinctipy"]
Expand Down
50 changes: 50 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
[build-system]
requires = ["setuptools >= 61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "distinctipy"
version = "1.3.2"
authors = [
{name = "Jack Roberts", email = "jroberts@turing.ac.uk"},
]
description = "A lightweight package for generating visually distinct colours."
readme = "README.md"
requires-python = ">=3.7"
keywords = ["color", "colour", "palette", "colormap", "colorblind", "colourblind"]
license = {file = "LICENSE"}
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Topic :: Multimedia :: Graphics",
"Topic :: Scientific/Engineering :: Visualization",
"Topic :: Utilities",
"Framework :: Matplotlib",
]
dependencies = ["numpy>=1.16.3"]

[project.optional-dependencies]
extras = [
"pandas>=0.24.2",
"matplotlib>=3.1.0",

]
tests = [
"black==22.6.0",
"codecov>=2.0.15",
"coverage>=5.3.1",
"flake8==4.0.1",
"isort==5.10.1",
"pytest>=4.6.0",
"pytest-cov>=2.9.0",
]
docs = [
"sphinx-rtd-theme>=0.2.3",
"nbsphinx>=0.8.0",
"ipython>=7.34.0",
]

[project.urls]
Homepage = "https://github.com/alan-turing-institute/distinctipy"
Documentation = "https://distinctipy.readthedocs.io/"
4 changes: 0 additions & 4 deletions requirements.txt

This file was deleted.

3 changes: 0 additions & 3 deletions requirements/docs.txt

This file was deleted.

2 changes: 0 additions & 2 deletions requirements/optional.txt

This file was deleted.

1 change: 0 additions & 1 deletion requirements/runtime.txt

This file was deleted.

7 changes: 0 additions & 7 deletions requirements/tests.txt

This file was deleted.

159 changes: 0 additions & 159 deletions setup.py

This file was deleted.

0 comments on commit 8b833b4

Please sign in to comment.