-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from lsst/tickets/DM-35347
DM-35347: Switch to pyproject.toml
- Loading branch information
Showing
35 changed files
with
468 additions
and
472 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Reformat code with isort/black | ||
4b97dad9311110ee7a3d30332af50242053bd543 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
## Checklist | ||
|
||
- [ ] ran Jenkins | ||
- [ ] added a release note for user-visible changes to `doc/changes` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/sphgeom/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: Check Python formatting | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
call-workflow: | ||
uses: lsst/rubin_workflows/.github/workflows/formatting.yaml@main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.3.0 | ||
hooks: | ||
- id: check-yaml | ||
args: | ||
- "--unsafe" | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- repo: https://github.com/psf/black | ||
rev: 22.3.0 | ||
hooks: | ||
- id: black | ||
# It is recommended to specify the latest version of Python | ||
# supported by your project here, or alternatively use | ||
# pre-commit's default_language_version, see | ||
# https://pre-commit.com/#top_level-default_language_version | ||
language_version: python3.8 | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.10.1 | ||
hooks: | ||
- id: isort | ||
name: isort (python) | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 4.0.1 | ||
hooks: | ||
- id: flake8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,81 @@ | ||
[build-system] | ||
build-backend = "setuptools.build_meta" | ||
requires = [ | ||
"setuptools >= 46.6.0", | ||
"setuptools", | ||
"lsst-versions >= 1.3.0", | ||
"wheel", | ||
"pybind11 >= 2.5.0", | ||
"numpy >= 1.18", | ||
"lsst-versions", | ||
] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "lsst-sphgeom" | ||
description = "A spherical geometry library." | ||
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 :: POSIX :: Linux", | ||
"Operating System :: MacOS :: MacOS X", | ||
"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 = [ | ||
"numpy >=1.18", | ||
"healpy" | ||
] | ||
dynamic = ["version"] | ||
|
||
[project.urls] | ||
"Homepage" = "https://github.com/lsst/sphgeom" | ||
|
||
[project.optional-dependencies] | ||
test = [ | ||
"pytest >= 3.2", | ||
"flake8 >= 3.7.5", | ||
"pytest-flake8 >= 1.0.4", | ||
] | ||
yaml = ["pyyaml >= 5.1"] | ||
|
||
[tool.setuptools.packages.find] | ||
where = ["python"] | ||
|
||
[tool.setuptools] | ||
zip-safe = false | ||
license-files = ["LICENSE"] | ||
|
||
[tool.setuptools.dynamic] | ||
version = { attr = "lsst_versions.get_lsst_version" } | ||
|
||
[tool.black] | ||
line-length = 110 | ||
target-version = ["py38"] | ||
|
||
[tool.isort] | ||
profile = "black" | ||
line_length = 110 | ||
|
||
[tool.lsst_versions] | ||
write_to = "python/lsst/sphgeom/version.py" | ||
|
||
[tool.pytest.ini_options] | ||
addopts = "--flake8" | ||
flake8-ignore = ["E133", "E226", "E228", "N802", "N803", "N806", "N812", "N815", "N816", "W503"] | ||
|
||
[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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
import pkgutil | ||
|
||
__path__ = pkgutil.extend_path(__path__, __name__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.