Skip to content

Commit

Permalink
Merge pull request #260 from lsst/tickets/DM-35347
Browse files Browse the repository at this point in the history
DM-35347: Switch to pyproject.toml
  • Loading branch information
mwittgen committed Jul 14, 2022
2 parents d1a5d7e + f593743 commit 835a13a
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 64 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,9 @@ 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"
cache-dependency-path: "setup.cfg"

- name: Install dependencies
run: |
Expand All @@ -95,7 +93,7 @@ jobs:
- name: Build and create distribution
run: |
python -m build --skip-dependency-check --sdist --wheel
python -m build --skip-dependency-check
- name: Upload
uses: pypa/gh-action-pypi-publish@release/v1
Expand Down
8 changes: 6 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
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
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 22.1.0
rev: 22.3.0
hooks:
- id: black
# It is recommended to specify the latest version of Python
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
3 changes: 0 additions & 3 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
extends: default

ignore: |
/tests/config/dbAuth/badDbAuth2.yaml
rules:
document-start: {present: false}
line-length:
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include doc/lsst.pipe.base/*.rst
63 changes: 62 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,64 @@
[build-system]
requires = ["setuptools", "lsst-versions"]
requires = ["setuptools", "lsst-versions >= 1.3.0"]
build-backend = "setuptools.build_meta"

[project]
name = "lsst-pipe-base"
description = "Pipeline infrastructure for the Rubin Science Pipelines."
license = {text = "GPLv3+ License"}
readme = "README.md"
authors = [
{name="Rubin Observatory Data Management", email="dm-admin@lists.lsst.org"},
]
classifiers = [
"Intended Audience :: Science/Research",
"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",
]
keywords=["lsst"]
dependencies = [
"lsst-resources [s3]",
"lsst-utils",
"lsst-daf-butler",
"lsst-pex-config",
"pydantic",
"networkx",
"pyyaml >= 5.1",
"numpy >= 1.17",
]

dynamic = ["version"]

[project.urls]
"Homepage" = "https://github.com/lsst/pipe_base"

[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"]

[tool.setuptools.package-data]
"lsst.pipe.base" = ["py.typed"]

[tool.setuptools.dynamic]
version = { attr = "lsst_versions.get_lsst_version" }

[tool.towncrier]
package = "lsst.pipe.base"
package_dir = "python"
Expand Down Expand Up @@ -51,3 +108,7 @@ line_length = 110

[tool.lsst_versions]
write_to = "python/lsst/pipe/base/version.py"

[tool.pytest.ini_options]
addopts = "--flake8"
flake8-ignore = ["E203", "W503", "N802", "N803", "N806", "N812", "N815", "N816"]
54 changes: 0 additions & 54 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,59 +1,5 @@
[metadata]
name = lsst-pipe-base
description = Pipeline infrastructure for the Rubin Science Pipelines
author = Rubin Observatory Data Management
author_email = dm-admin@lists.lsst.org
url = https://github.com/lsst/pipe_base
classifiers =
Intended Audience :: Science/Research
License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Operating System :: OS Independent
Programming Language :: Python :: 3
Programming Language :: Python :: 3.8
Topic :: Scientific/Engineering :: Astronomy
long_description = file: README.md
long_description_content_type = text/markdown
version = attr: lsst.pipe.base.__version__
license = GPLv3+ License

[options]
zip_safe = True
package_dir=
=python
packages=find:
setup_requires =
setuptools >=46.0
install_requires =
lsst-resources
lsst-utils
lsst-daf-butler
lsst-pex-config
pydantic
networkx
pyyaml >= 5.1
numpy >= 1.17
boto3
botocore
tests_require =
pytest >= 3.2
flake8 >= 3.7.5
pytest-flake8 >= 1.0.4
pytest-openfiles >= 0.5.0
moto

[options.packages.find]
where=python

[options.package_data]
lsst.pipe.base = py.typed

[flake8]
max-line-length = 110
max-doc-length = 79
ignore = E203, W503, N802, N803, N806, N812, N815, N816
exclude = __init__.py

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

0 comments on commit 835a13a

Please sign in to comment.