Skip to content

Commit

Permalink
Merge pull request #175 from altheaden/switch-to-pyproject
Browse files Browse the repository at this point in the history
Migrate setup configuration to `pyproject.toml`
  • Loading branch information
xylar authored Jul 17, 2024
2 parents ea9098f + e99e41e commit 911c417
Show file tree
Hide file tree
Showing 7 changed files with 109 additions and 84 deletions.
16 changes: 16 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[flake8]
# https://pep8.readthedocs.io/en/latest/intro.html#error-codes
ignore =
# line break after operator
W504
# Max width of Github code review is 79 characters
max-line-length = 79
max-complexity = 18
per-file-ignores =
*/__init__.py: F401
exclude =
.git,
docs,
.idea,
.mypy_cache,
.pytest_cache,
6 changes: 0 additions & 6 deletions MANIFEST.in

This file was deleted.

2 changes: 2 additions & 0 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ requirements:
host:
- python >=3.8
- pip
- setuptools >=60
- setuptools-scm >=8.0
run:
- python >=3.8
- importlib_resources
Expand Down
87 changes: 87 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
[project]
name = "mache"
dynamic = ["version"]
authors = [
{ name="Xylar Asay-Davis", email="[email protected]" },
{ name="Althea Denlinger", email="[email protected]" }
]
description = "A package for providing configuration data related to E3SM supported machines."
license = {file = "LICENSE"}
readme = "README.md"
requires-python = ">=3.8"
classifiers = [
# these are only for searching/browsing projects on PyPI
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",

"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
]

dependencies = [
"importlib_resources",
"jinja2",
"lxml",
"pyyaml",
"progressbar2",
]

[project.optional-dependencies]
docs = [
# building documentation
"sphinx",
"sphinx_rtd_theme",
"myst-parser",
"sphinx-multiversion",
"rst-to-myst",
]

dev = [
# linting and testing
"pip",
"pytest",
"isort",
"flake8",
"mypy",
"pre-commit",
]

[tool.isort]
multi_line_output = "3"
include_trailing_comma = true
force_grid_wrap = "0"
use_parentheses = true
line_length = "79"
skip = "e3sm_diags/e3sm_diags_driver.py"

[tool.mypy]
python_version = "3.10"
check_untyped_defs = true
ignore_missing_imports = true
warn_unused_ignores = true
warn_redundant_casts = true
warn_unused_configs = true

[build-system]
requires = [
"setuptools>=60",
"setuptools-scm>=8.0",
]
build-backend = "setuptools.build_meta"

[tool.setuptools.packages.find]
exclude = ["docs*", "conda*"]

[tool.setuptools.dynamic]
version = { attr = "mache.version.__version__" }

# evolution of options.entry-points
[project.scripts]
mache = "mache.__main__:main"

[project.urls]
Documentation = "https://docs.e3sm.org/mache"
"Bug Tracker" = "https://github.com/E3SM-Project/mache/issues"
74 changes: 0 additions & 74 deletions setup.cfg

This file was deleted.

4 changes: 0 additions & 4 deletions setup.py

This file was deleted.

4 changes: 4 additions & 0 deletions spec-file.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ pyyaml
progressbar2
rsync

# Building
setuptools >=60
setuptools-scm >=8.0

# Linting and testing
pip
pytest
Expand Down

0 comments on commit 911c417

Please sign in to comment.