-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move build configuration into
pyproject.toml
- Loading branch information
1 parent
05f83ad
commit 3c302e1
Showing
6 changed files
with
138 additions
and
138 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,11 @@ | ||
# flake8 does not support pyproject.toml (https://github.com/PyCQA/flake8/issues/234) | ||
|
||
[flake8] | ||
select = F, W, E, C | ||
# We should set max line length lower eventually | ||
max-line-length = 130 | ||
exclude = | ||
docs, | ||
.tox, | ||
.eggs, | ||
build |
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 |
---|---|---|
@@ -1,5 +1,111 @@ | ||
# pyproject.toml | ||
[project] | ||
name = 'romanisim' | ||
description = 'Nancy Grace Roman Space Telescope WFI Simulator' | ||
readme = 'README.md' | ||
requires-python = '>=3.8' | ||
license = { file = 'LICENSE' } | ||
authors = [{ name = 'STScI', email = '[email protected]' }] | ||
classifiers = [ | ||
'Intended Audience :: Science/Research', | ||
'Topic :: Scientific/Engineering :: Astronomy', | ||
'License :: OSI Approved :: BSD License', | ||
'Operating System :: MacOS :: MacOS X', | ||
'Operating System :: POSIX', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3 :: Only', | ||
'Programming Language :: Python :: 3.8', | ||
'Programming Language :: Python :: 3.9', | ||
] | ||
dependencies = [ | ||
'astropy>=5.0.4', | ||
'asdf>=2.9.2', | ||
'crds>=10.3.1', | ||
'gwcs>=0.16.1', | ||
'jsonschema>=3.0.2', | ||
'galsim>=2.3', | ||
'romancal>=0.7', | ||
] | ||
dynamic = ['version'] | ||
|
||
[project.optional-dependencies] | ||
docs = [ | ||
'sphinx', | ||
'sphinx-automodapi', | ||
'sphinx-rtd-theme', | ||
'stsci-rtd-theme', | ||
'sphinx-astropy', | ||
'sphinx-asdf >=0.1.1', | ||
'tomli; python_version <"3.11"' | ||
] | ||
test = [ | ||
'ci-watson >=0.3.0', | ||
'colorama >=0.4.1', | ||
'getch >=1.0.0', | ||
'pytest >=4.6.0', | ||
'pytest-openfiles >=0.5.0', | ||
'pytest-doctestplus >=0.10.0', | ||
'pytest-cov >=2.9.0', | ||
'codecov >=1.6.0', | ||
'flake8 >=3.6.0', | ||
] | ||
|
||
[project.urls] | ||
'Tracker' = 'https://github.com/spacetelescope/romanisim/issues' | ||
'Documentation' = 'https://romanisim.readthedocs.io/en/stable/' | ||
'Source Code' = 'https://github.com/spacetelescope/romanisim' | ||
|
||
[project.entry-points] | ||
'asdf.extensions' = { jwst_pipeline = 'jwst.transforms.integration:get_extensions' } | ||
asdf_extensions = { jwst_datamodel = 'jwst.datamodels.extension:DataModelExtension' } | ||
'asdf.resource_mappings' = { jwst_pipeline = 'jwst.transforms.integration:get_resource_mappings' } | ||
'stpipe.steps' = { jwst = 'jwst.stpipe.integration:get_steps' } | ||
pytest11 = { report_crds_context = 'pytest_crds.plugin' } | ||
|
||
[build-system] | ||
requires = ["setuptools>=38.2.5", | ||
"wheel", | ||
"setuptools_scm"] | ||
requires = [ | ||
'setuptools >=61', | ||
'setuptools_scm[toml] >=3.4', | ||
'wheel', | ||
] | ||
build-backend = 'setuptools.build_meta' | ||
|
||
[tool.setuptools_scm] | ||
|
||
[tool.setuptools] | ||
zip-safe = false | ||
|
||
[tool.setuptools.packages.find] | ||
exclude = ['examples'] | ||
|
||
[tool.pytest.ini_options] | ||
minversion = 4.6 | ||
norecursedirs = [ | ||
'docs/_build', | ||
'docs/exts', | ||
'scripts', | ||
'.tox', | ||
] | ||
doctest_plus = 'enabled' | ||
doctest_rst = 'enabled' | ||
|
||
[tool.coverage] | ||
run = { omit = [ | ||
'romanisim/conftest.py', | ||
'romanisim/setup.py', | ||
'romanisim/tests/test*', | ||
'docs/*', | ||
# And list these again for running against installed version | ||
'*/romanisim/conftest.py', | ||
'*/romanisim/tests/test*', | ||
'*/romanisim/regtest/test*', | ||
'*/romanisim/*/tests/*', | ||
'*/docs/*', | ||
] } | ||
report = { exclude_lines = [ | ||
'pragma: no cover', | ||
'if self.debug:', | ||
'except ImportError', | ||
'raise AssertionError', | ||
'raise NotImplementedError', | ||
'if __name__ == "__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 |
---|---|---|
@@ -1,18 +1,7 @@ | ||
#!/usr/bin/env python | ||
import os | ||
import pkgutil | ||
import subprocess | ||
import sys | ||
from setuptools import setup, find_packages, Extension, Command | ||
from setuptools.command.test import test as TestCommand | ||
from glob import glob | ||
from os.path import basename | ||
from pathlib import Path | ||
|
||
scripts = [s for s in glob('scripts/*') if basename(s) != '__pycache__'] | ||
from setuptools import setup | ||
|
||
setup( | ||
setup_requires=["setuptools_scm"], | ||
packages=find_packages(exclude=["examples"]), | ||
scripts=scripts, | ||
use_scm_version=True, | ||
include_package_data=True,) | ||
scripts = [str(s) for s in Path('scripts/').iterdir() if s.is_file() and s.name != '__pycache__'] | ||
|
||
setup(scripts=scripts) |
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