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

DM-35347: Switch to pyproject.toml #196

Merged
merged 1 commit into from
Jul 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,9 @@ jobs:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip"
cache-dependency-path: "setup.cfg"

- name: Install dependencies
run: |
Expand All @@ -92,7 +90,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
13 changes: 13 additions & 0 deletions .github/workflows/docstyle.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Run docstyle

on:
push:
branches:
- main
pull_request:

jobs:
call-workflow:
uses: lsst/rubin_workflows/.github/workflows/docstyle.yaml@main
with:
args: "python/lsst/ctrl/mpexec/"
11 changes: 11 additions & 0 deletions .github/workflows/yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Lint YAML Files

on:
push:
branches:
- main
pull_request:

jobs:
call-workflow:
uses: lsst/rubin_workflows/.github/workflows/yamllint.yaml@main
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
16 changes: 16 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
extends: default

rules:
document-start: {present: false}
line-length:
max: 132
allow-non-breakable-words: true
allow-non-breakable-inline-mappings: true
ignore: |
/.github/workflows/lint.yaml
truthy:
# "on" as a key in workflows confuses things
ignore: |
/.github/workflows/
indentation:
indent-sequences: consistent
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include doc/lsst.ctrl.mpexec/*.rst
78 changes: 76 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,65 @@
[build-system]
requires = ["setuptools", "lsst-versions"]
requires = ["setuptools", "lsst-versions >= 1.3.0"]
build-backend = "setuptools.build_meta"

[project]
name = "lsst-ctrl-mpexec"
description = "Pipeline execution infrastructure for the Rubin Observatory LSST Science Pipelines."
license = {text = "GPLv3+ License"}
readme = "README.rst"
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.9",
"Programming Language :: Python :: 3.10",
"Topic :: Scientific/Engineering :: Astronomy",
]
keywords = ["lsst"]
dependencies = [
"lsst-utils",
"lsst-daf-butler",
"lsst-pex-config",
"lsst-pipe-base",
"click",
"astropy",
"pydantic",
"networkx",
"psutil"
]
dynamic = ["version"]

[project.urls]
mwittgen marked this conversation as resolved.
Show resolved Hide resolved
"Homepage" = "https://github.com/lsst/ctrl_mpexec"

[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.ctrl.mpexec" = ["py.typed"]

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

[project.scripts]
pipetask = "lsst.ctrl.mpexec.cli.pipetask:main"

[tool.towncrier]
package = "lsst.ctrl.mpexec"
package_dir = "python"
Expand All @@ -10,7 +68,6 @@ build-backend = "setuptools.build_meta"
title_format = "Multi-Processing Executor {version} {project_date}"
issue_format = "`{issue} <https://jira.lsstcorp.org/browse/{issue}>`_"


[[tool.towncrier.type]]
directory = "feature"
name = "New Features"
Expand Down Expand Up @@ -51,3 +108,20 @@ line_length = 110

[tool.lsst_versions]
write_to = "python/lsst/ctrl/mpexec/version.py"

[tool.pytest.ini_options]
addopts = "--flake8"
flake8-ignore = ["W503", "E203", "N802", "N803", "N806", "N812", "N815", "N816"]
# The matplotlib test may not release font files.
# Some unit tests open registry database in setUpClass.
open_files_ignore = ["*.ttf", "gen3.sqlite3"]

[tool.pydocstyle]
convention = "numpy"
# Our coding style does not require docstrings for magic methods (D105)
# Our docstyle documents __init__ at the class level (D107)
# We allow methods to inherit docstrings and this is not compatible with D102.
# Docstring at the very first line is not required
# D200, D205 and D400 all complain if the first sentence of the docstring does
# not fit on one line.
add-ignore = ["D107", "D105", "D102", "D100", "D200", "D205", "D400"]
58 changes: 0 additions & 58 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,57 +1,3 @@
[metadata]
name = lsst-ctrl-mpexec
description = Pipeline execution infrastructure for the Rubin Science Pipelines
author = Rubin Observatory Data Management
url = https://github.com/lsst/ctrl_mpexec
author_email = dm-admin@lists.lsst.org
license = GPLv3+ License
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.9
Programming Language :: Python :: 3.10
Topic :: Scientific/Engineering :: Astronomy
long_description = file: README.rst
long_description_content_type = text/x-rst

keywords =
lsst

[options]
zip_safe = True
package_dir=
=python
packages=find:
setup_requires =
setuptools >=46.0
install_requires =
lsst-utils
lsst-daf-butler
lsst-pex-config
lsst-pipe-base
click
astropy
pydantic
networkx
psutil
tests_require =
pytest >= 3.2
flake8 >= 3.7.5
pytest-flake8 >= 1.0.4
pytest-openfiles >= 0.5.0

[options.packages.find]
where=python

[options.package_data]
lsst.ctrl.mpexec = py.typed

[options.entry_points]
console_scripts =
pipetask = lsst.ctrl.mpexec.cli.pipetask:main

[flake8]
max-line-length = 110
max-doc-length = 79
Expand All @@ -62,7 +8,3 @@ exclude =
**/*/__init__.py,
**/*/version.py,
tests/.tests

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