Skip to content

Commit

Permalink
Switch to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Wittgen committed Jul 7, 2022
1 parent 7a9cd81 commit a9bb67c
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 55 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ matrix.python-version }}
cache: "pip"

- name: Install yaml
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: 3.8
cache: "pip"
Expand All @@ -77,8 +77,7 @@ jobs:
- name: Build and create distribution
run: |
pip install -v -e .
python -m build --sdist --wheel
python -m build --skip-dependency-check
- name: Upload
uses: pypa/gh-action-pypi-publish@release/v1
Expand Down
6 changes: 5 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
rev: v4.3.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
Expand All @@ -19,3 +19,7 @@ repos:
hooks:
- id: isort
name: isort (python)
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
hooks:
- id: flake8
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include doc/lsst.pex.config/*.rst
55 changes: 54 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,56 @@
[build-system]
requires = ["setuptools", "lsst-versions"]
requires = ["setuptools", "lsst-versions", "pyyaml >=5.1", "numpy >= 1.17"]
build-backend = "setuptools.build_meta"

[project]
name = "pex-config"
description = "A flexible configuration system using Python files."
license = {text = "BSD 3-Clause License"}
readme = "README.md"
authors = [
{name="Rubin Observatory Data Management", email="dm-admin@lists.lsst.org"},
]
classifiers = [
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Scientific/Engineering :: Astronomy",
]
dependencies = [
"pyyaml >=5.1",
"numpy >= 1.17",
]
dynamic = ["version"]

[project.urls]
"Homepage" = "https://github.com/lsst/pex-config"

[project.optional-dependencies]
test = [
"pytest >= 3.2",
"flake8 >= 3.7.5",
"pytest-flake8 >= 1.0.4",
"pytest-openfiles >= 0.5.0",
]

[tool.setuptools.packages.find]
where = ["python"]

[tool.setuptools]
zip-safe = true
license-files = ["COPYRIGHT", "LICENSE", "gpl-v3.0.txt", "bsd_license.txt"]

[tool.setuptools.package-data]
"lsst.pex.config" = ["py.typed"]

[tool.setuptools.dynamic]
version = { attr = "lsst.pex.config.__version__" }

[tool.black]
line-length = 110
target-version = ["py38"]
Expand All @@ -12,3 +61,7 @@ line_length = 110

[tool.lsst_versions]
write_to = "python/lsst/pex/config/version.py"

[tool.pytest.ini_options]
addopts = "--flake8"
flake8-ignore = ["W503","E203","N802", "N803", "N806", "N812", "N815", "N816"]
48 changes: 0 additions & 48 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,47 +1,3 @@
[metadata]
name = lsst-pex-config
description = A flexible configuration system using Python files.
author = Rubin Observatory Data Management
author_email = dm-admin@lists.lsst.org
url = https://github.com/lsst/pex_config
license = GPLv3+ License, BSD 3-Clause License
classifiers =
Intended Audience :: Science/Research
License :: OSI Approved :: BSD License
License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Operating System :: OS Independent
Programming Language :: Python :: 3
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Topic :: Scientific/Engineering :: Astronomy
long_description = file: README.rst
long_description_content_type = text/x-rst

license_files = LICENSE, gpl-v3.0.txt, bsd_license.txt

keywords =
lsst

[options]
zip_safe = True
package_dir=
=python
packages=find:
install_requires =
pyyaml >=5.1
numpy >= 1.17
tests_requires =
flake8 >= 3.7.5
pytest-flake8 >= 1.0.4
pytest-openfiles >= 0.5.0

[options.packages.find]
where=python

[options.package_data]
lsst.pex.config = py.typed

# The ignore list for flake8 itself when run on the command line is distinct
# from the ignore list used by the pytest-flake8 plugin. This provides more
# control over testing but does require that the lists are kept in sync
Expand All @@ -59,7 +15,3 @@ exclude =
testLib.py,
ticket1914.py
tests/config/filename.py

[tool:pytest]
addopts = --flake8
flake8-ignore = W503 E203 N802 N803 N806 N812 N815 N816

0 comments on commit a9bb67c

Please sign in to comment.