Skip to content

Commit

Permalink
Modernize package configuration and update test workflow file
Browse files Browse the repository at this point in the history
  • Loading branch information
tomicapretto committed Jan 26, 2025
1 parent 5967601 commit 8970d02
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 70 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,35 +15,32 @@ jobs:

name: Set up Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v2
- name: Checkout source
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
uses: actions/setup-python@v4
with:
channels: conda-forge,defaults
channel-priority: true
python-version: ${{ matrix.python-version }}
auto-update-conda: true

- name: Install dev environment & flexitext
shell: bash -l {0}
run: |
conda install pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
python -m pip install --upgrade pip
pip install .
python --version
conda list
pip install .[dev]
pip freeze
- name: Run linters
shell: bash -l {0}
run: |
python -m black -l 100 flexitext --check
echo "Success!"
echo "Checking code style with pylint..."
python -m pylint flexitext/
- name: Run tests
shell: bash -l {0}
run: |
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion MANIFEST.in

This file was deleted.

5 changes: 3 additions & 2 deletions flexitext/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from .flexitext import FlexiText, flexitext
from importlib.metadata import version

from .flexitext import FlexiText, flexitext
from .style import Style

from .version import __version__
__version__ = version("flexitext")

__all__ = ["flexitext", "FlexiText", "Style"]
5 changes: 0 additions & 5 deletions flexitext/version.py

This file was deleted.

42 changes: 41 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,43 @@
[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools>=61.0", "setuptools_scm>=8"]

[tool.setuptools_scm]


[project]
name = "flexitext"
description = "Draw styled text in Matplotlib"
requires-python = ">=3.6"
dependencies = ["matplotlib>=3.4"]
readme = "README.md"
license = {file = "LICENSE"}
dynamic = ["version"]
maintainers = [{ name = "Tomás Capretto", email = "[email protected]" }]
classifiers = ["Framework :: Matplotlib"]

[project.optional-dependencies]
dev = [
"black==24.10.0",
"pylint==3.3.3",
"pytest-cov>=2.6.1",
"pytest>=4.4.0",
]


[project.urls]
homepage = "https://tomicapretto.com/flexitext"
documentation = "https://tomicapretto.com/flexitext"
repository = "https://github.com/tomicapretto/flexitext"
changelog = "https://github.com/tomicapretto/flexitext/blob/main/CHANGELOG.md"


[tool.setuptools]
packages = ["flexitext"]

[tool.setuptools.package-data]
"*" = ["*.txt", "*.md"]

[tool.black]
line-length = 100
target-version = ["py310"]
target-version = ["py311"]
4 changes: 0 additions & 4 deletions requirements-dev.txt

This file was deleted.

1 change: 0 additions & 1 deletion requirements.txt

This file was deleted.

4 changes: 0 additions & 4 deletions setup.cfg

This file was deleted.

42 changes: 0 additions & 42 deletions setup.py

This file was deleted.

0 comments on commit 8970d02

Please sign in to comment.