diff --git a/.gitignore b/.gitignore index 71b51f82..37a9b111 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ __pycache__ # Other generated files */version.py +*/_version.py */cython_version.py htmlcov .coverage diff --git a/pyproject.toml b/pyproject.toml index 0889579c..d4edb45e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,49 @@ [build-system] -requires = ["setuptools", - "setuptools_scm", - "wheel"] -build-backend = 'setuptools.build_meta' +requires = ["hatchling", +"hatch-vcs"] +build-backend = "hatchling.build" + +[project] +name = "ccdproc" +dynamic = ["version"] +description = "Astropy affiliated package" +readme = "README.rst" +license = "BSD-3-clause" +requires-python = ">=3.8" +authors = [ + { name = "Steve Crawford", email = "ccdproc@gmail.com" }, + { name = "Matt Craig" }, + { name = "and Michael Seifert" }, +] +dependencies = [ + "astropy>=5.0.1", + "astroscrappy>=1.0.8", + "numpy>=1.21", + "reproject>=0.7", + "scikit-image", + "scipy", +] + +[project.optional-dependencies] +docs = [ + "matplotlib", + "sphinx-astropy", +] +test = [ + "memory_profiler", + "pytest-astropy>=0.10.0", +] + +[project.urls] +Homepage = "http://ccdproc.readthedocs.io/" + +[tool.hatch.version] +source = "vcs" + +[tool.hatch.build.hooks.vcs] +version-file = "ccdproc/_version.py" + +[tool.hatch.build.targets.sdist] +include = [ + "/ccdproc", +] diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 93c3b091..00000000 --- a/setup.cfg +++ /dev/null @@ -1,117 +0,0 @@ - -[tool:pytest] -minversion = 2.2 -testpaths = "ccdproc" "docs" -norecursedirs = build docs/_build -doctest_plus = enabled -addopts = --doctest-rst --color=yes -filterwarnings= - error - ignore:numpy\.ufunc size changed:RuntimeWarning - ignore:numpy.ndarray size changed:RuntimeWarning - ignore:`np.bool` is a deprecated alias for the builtin `bool`:DeprecationWarning -markers = - data_size(N): set dimension of square data array for ccd_data fixture - data_scale(s): set the scale of the normal distribution used to generate data - data_mean(m): set the center of the normal distribution used to generate data - -[metadata] -name = ccdproc -description = Astropy affiliated package -long_description = This is a package for reducing optical/IR CCD data that relies on astropy -author = Steve Crawford, Matt Craig, and Michael Seifert -author_email = ccdproc@gmail.com -license = BSD -url = http://ccdproc.readthedocs.io/ -edit_on_github = False -github_project = astropy/ccdproc - -[options] -packages = find: -zip_safe = False -setup_requires = setuptools_scm -install_requires = numpy>=1.21 - astropy>=5.0.1 - scipy - astroscrappy>=1.0.8 - reproject>=0.7 - scikit-image -python_requires = >=3.8 - -[options.package_data] -* = data/* - -[options.extras_require] -test = - pytest-astropy>=0.10.0 - memory_profiler -docs = - sphinx-astropy - matplotlib - - -[pycodestyle] -# PEP8 errors/warnings: -# (partially) taken from -# https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes -# E101 - mix of tabs and spaces -# E111 - 4 spaces per indentation level -# E112 - 4 spaces per indentation level -# E113 - 4 spaces per indentation level -# E221 - multiple spaces before operator -# E222 - multiple spaces after operator -# E223 - tab before operator -# E224 - tab after operator -# E225 - missing whitespace around operator -# E241 - multiple whitespace after ',' -# E242 - tab after ',' -# E251 - unexpected spaces around keyword / parameter equals -# E271 - multiple spaces after keyword -# E272 - multiple spaces before keyword -# E303 - too many blank lines -# E304 - blank lines found after function decorator -# E502 - the backslash is redundant between brackets -# E703 - statement ends with a semicolon -# E901 - SyntaxError or IndentationError -# E902 - IOError -# W191 - indentation contains tabs -# W291 - trailing whitespace -# W292 - no newline at end of file -# W293 - blank line contains whitespace -# W391 - blank line at end of file -select = E101,E111,E112,E113,E221,E222,E223,E224,E225,E241,E242,E251,E271,E272,E303,E304,E502,E703,E901,E902,W191,W291,W292,W293,W391 - -# PEP errors to ignore -# ignore = ... - -# Excluding files that are directly copied from the package template or -# generated -exclude = _astropy_init.py,version.py - -[entry_points] - -[flake8] -max-line-length = 100 - -[coverage:run] -source = ccdproc -omit = - */ccdproc/__init__* - */ccdproc/conftest.py - */ccdproc/*setup* - */ccdproc/*/tests/* - */ccdproc/tests/* - -[coverage:report] -exclude_lines = - # Have to re-enable the standard pragma - pragma: no cover - # Don't complain about packages we have installed - except ImportError - # Don't complain if tests don't hit assertions - raise AssertionError - raise NotImplementedError - # Don't complain about script hooks - def main\(.*\): - # Ignore branches that don't pertain to this version of Python - pragma: py{ignore_python_version}