Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove setup.cfg and setup.py in favour of pyproj.toml #173

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions .flake8

This file was deleted.

57 changes: 53 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

[tool.black]
line-length = 79
target-version = ["py37", "py38", "py39", "py310"]
target-version = ["py38", "py39", "py310", "py311"]
include = '\.pyi?$'

[project]
Expand Down Expand Up @@ -53,6 +53,23 @@ requires = ["setuptools>=45"]
# Defined by PEP 517
build-backend = "setuptools.build_meta"

[tool.setuptools.package-data]
mypkg = [
"etc/test_data/*.txt",
"tests/results/*.npz",
"tests/results/imagerepo.json"
]

[tool.pytest.ini_options]
minversion = "6.0"
addopts = ["-ra", "--showlocals", "--strict-markers", "--strict-config"]
xfail_strict = true
filterwarnings = ["error"]
log_cli_level = "info"
testpaths = [
"tephi",
]

[tool.repo-review]
# These are a list of the currently failing tests:
ignore = [
Expand All @@ -64,9 +81,6 @@ ignore = [

# TODO: exceptions that still need investigating are below. Might be fixable, or might become permanent (above):

# https://learn.scientific-python.org/development/guides/pytest/#PP301
"PP301", # Has pytest in pyproject

# https://learn.scientific-python.org/development/guides/gha-basic/#GH212
"GH212", # Require GHA update grouping

Expand Down Expand Up @@ -176,6 +190,41 @@ known-first-party = ["tephi"]
"ERA001", # Has commented out code
]

[tool.tox]
legacy_tox_ini = """
[tox]
requires =
tox-conda
minversion = 3.15
base_python = py311
envlist=py{38,39,310,311}

[testenv]
description = invoke pytest to run automated tests
deps =
pytest
pytest-cov
filelock
requests
imagehash
conda_env = requirements/dev.yml
commands =
pytest --cov tephi --cov-report term-missing {posargs}

[testenv:{docs,doctests}]
description =
invoke sphinx-build to build the docs/run the doctests
setenv =
DOCSDIR = {toxinidir}/docs/source
BUILDDIR = {toxinidir}/docs/_build
conda_env = requirements/rtd.yml
commands =
sphinx-apidoc -o "{env:DOCSDIR}/api" tephi tephi/tests
sphinx-build -W --keep-going -b html -d "{env:BUILDDIR}/doctrees" "{env:DOCSDIR}" "{env:BUILDDIR}/html" {posargs}
# when running the doctests, also check that any snippets in the
# docs are representative of the module output
doctests: sphinx-build -b doctest -d "{env:BUILDDIR}/doctrees" "{env:DOCSDIR}" "{env:BUILDDIR}/doctest" {posargs}
"""

[tool.ruff.lint.pydocstyle]
convention = "numpy"
70 changes: 0 additions & 70 deletions setup.cfg

This file was deleted.

11 changes: 0 additions & 11 deletions setup.py

This file was deleted.

32 changes: 0 additions & 32 deletions tox.ini

This file was deleted.

Loading