From 8c5658dd040ac31f7d2c7a373fe9f6a6857ac4c9 Mon Sep 17 00:00:00 2001 From: Zach Burnett Date: Fri, 15 Mar 2024 15:03:11 -0400 Subject: [PATCH] [SCSB-145] require Python 3.10 (#392) * require Python 3.10 * find other instances of Python 3.9 --- .github/workflows/ci.yml | 2 +- .github/workflows/ci_cron.yml | 1 - .readthedocs.yml | 2 +- pyproject.toml | 116 ++++++++++++++++++---------------- 4 files changed, 62 insertions(+), 59 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b0ba2b6b..32812c1b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,9 +17,9 @@ jobs: uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 with: envs: | - - linux: py39-xdist - linux: py310-xdist - linux: py311-xdist - macos: py311-xdist - linux: py311-xdist-cov coverage: codecov + - linux: py312-xdist diff --git a/.github/workflows/ci_cron.yml b/.github/workflows/ci_cron.yml index be330843..4324706a 100644 --- a/.github/workflows/ci_cron.yml +++ b/.github/workflows/ci_cron.yml @@ -20,6 +20,5 @@ jobs: if: (github.repository == 'spacetelescope/rad' && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'Weekly CI'))) with: envs: | - - macos: py39-xdist - macos: py310-xdist - linux: py312-devdeps-xdist diff --git a/.readthedocs.yml b/.readthedocs.yml index bae83524..f99e25ba 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -5,7 +5,7 @@ build: apt_packages: - graphviz tools: - python: "3.9" + python: "3.11" sphinx: configuration: docs/conf.py diff --git a/pyproject.toml b/pyproject.toml index 0bd6827f..d9ee7ee4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,81 +1,96 @@ [project] -name = 'rad' -description = 'Roman Attribute Dictionary' -readme = { file = 'README.md', content-type = 'text/markdown' } -requires-python = '>=3.9' -license = { file = 'LICENSE' } -authors = [{ name = 'STScI', email = 'help@stsci.edu' }] +name = "rad" +description = "Roman Attribute Dictionary" +requires-python = ">=3.10" +authors = [ + { name = "STScI", email = "help@stsci.edu" }, +] classifiers = [ - 'Intended Audience :: Science/Research', - 'Topic :: Scientific/Engineering :: Astronomy', - 'License :: OSI Approved :: BSD License', - 'Programming Language :: Python :: 3', + "Intended Audience :: Science/Research", + "Topic :: Scientific/Engineering :: Astronomy", + "License :: OSI Approved :: BSD License", + "Programming Language :: Python :: 3", ] dependencies = [ - 'asdf >=2.14.2', - 'asdf-astropy >=0.5.0', + "asdf >=2.14.2", + "asdf-astropy >=0.5.0", +] +dynamic = [ + "version", ] -dynamic = ['version'] + +[project.readme] +file = "README.md" +content-type = "text/markdown" + +[project.license] +file = "LICENSE" [project.optional-dependencies] test = [ - 'pytest>=4.6.0', - 'pytest-doctestplus>=0.11.1', - 'crds>=11.16.16', + "pytest>=4.6.0", + "pytest-doctestplus>=0.11.1", + "crds>=11.16.16", ] docs = [ - 'sphinx', - 'sphinx-asdf>=0.1.3', - 'sphinx-astropy', - 'sphinx-rtd-theme', - 'astropy>=5.0.4', - 'graphviz', - 'matplotlib', - 'docutils', - 'tomli; python_version <"3.11"', - 'importlib-metadata', + "sphinx", + "sphinx-asdf>=0.1.3", + "sphinx-astropy", + "sphinx-rtd-theme", + "astropy>=5.0.4", + "graphviz", + "matplotlib", + "docutils", + "tomli; python_version <\"3.11\"", + "importlib-metadata", ] [project.urls] -'Bug Tracker' = 'https://github.com/spacetelescope/rad/issues' -'Source Code' = 'https://github.com/spacetelescope/rad' +"Bug Tracker" = "https://github.com/spacetelescope/rad/issues" +"Source Code" = "https://github.com/spacetelescope/rad" -[project.entry-points] -'asdf.resource_mappings' = { 'rad' = 'rad.integration:get_resource_mappings' } +[project.entry-points."asdf.resource_mappings"] +rad = "rad.integration:get_resource_mappings" [build-system] -requires = ["setuptools >=61", "setuptools_scm[toml] >=3.4", "wheel"] +requires = [ + "setuptools >=61", + "setuptools_scm[toml] >=3.4", + "wheel", +] build-backend = "setuptools.build_meta" [tool.setuptools_scm] write_to = "src/rad/_version.py" [tool.setuptools.packages.find] -where = ['src'] +where = [ + "src", +] [tool.package-data] -'rad.resources' = [ - 'manifests/*.yaml', - 'schemas/*.yaml', - 'schemas/**/*.yaml', +"rad.resources" = [ + "manifests/*.yaml", + "schemas/*.yaml", + "schemas/**/*.yaml", ] [tool.pytest.ini_options] minversion = 4.6 doctest_plus = true doctest_rst = true -text_file_format = 'rst' -addopts = '--show-capture=no' +text_file_format = "rst" +addopts = "--show-capture=no" testpaths = [ - 'tests', - 'src/rad/resources/schemas', + "tests", + "src/rad/resources/schemas", ] filterwarnings = [ "error::ResourceWarning", ] -asdf_schema_tests_enabled = 'true' -asdf_schema_skip_tests = 'src/rad/resources/schemas/rad_schema-1.0.0.yaml' -asdf_schema_root = 'src/rad/resources/schemas' +asdf_schema_tests_enabled = "true" +asdf_schema_skip_tests = "src/rad/resources/schemas/rad_schema-1.0.0.yaml" +asdf_schema_root = "src/rad/resources/schemas" [tool.isort] profile = "black" @@ -84,21 +99,10 @@ line_length = 130 [tool.black] line-length = 130 -force-exclude = ''' -^/( - ( - \.eggs - | \.git - | \.pytest_cache - | \.tox - )/ -) -''' +force-exclude = "^/(\n (\n \\.eggs\n | \\.git\n | \\.pytest_cache\n | \\.tox\n )/\n)\n" [tool.ruff] line-length = 130 [tool.codespell] -skip="*.pdf,*.fits,*.asdf,.tox,build,./tags,.git,docs/_build" -# ignore-words-list=""" -# """ +skip = "*.pdf,*.fits,*.asdf,.tox,build,./tags,.git,docs/_build"