-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
poetry to setuptools; min py38 (#361)
* Update pyproject.toml * Update CI.yaml * Update pyproject.toml * Update pyproject.toml * Update pyproject.toml * Update pyproject.toml * Update pyproject.toml * Update CI.yaml * Update CI.yaml * Update pyproject.toml * Update Lint.yml * Update pyproject.toml * Update pyproject.toml * Update pyproject.toml * Update CI.yaml * Update README.md * Update test.sh * Update format.sh * Update build_docs.sh * Update changelog.rst * Update PULL_REQUEST_TEMPLATE.md * Update CONTRIBUTING.md * Update .github/workflows/CI.yaml
- Loading branch information
Showing
10 changed files
with
112 additions
and
126 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
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 |
---|---|---|
|
@@ -17,7 +17,7 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] | ||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] | ||
pydantic-version: ["2"] | ||
runs-on: [ubuntu-latest, windows-latest] | ||
name: "🐍 ${{ matrix.python-version }} • ${{ matrix.pydantic-version }} • ${{ matrix.runs-on }}" | ||
|
@@ -30,16 +30,14 @@ jobs: | |
python-version: ${{ matrix.python-version }} | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
- name: Install poetry | ||
run: pip install poetry | ||
- name: Install repo with poetry (full deps) | ||
if: matrix.python-version != '3.9' | ||
run: poetry install --no-interaction --no-ansi --all-extras | ||
- name: Install repo with poetry (min deps) | ||
if: matrix.python-version == '3.9' | ||
run: poetry install --no-interaction --no-ansi --extras test | ||
- name: Install QCElemental (full deps) | ||
if: matrix.python-version != '3.8' && matrix.python-version != '3.10' | ||
run: pip install '.[test,viz,align,standard]' | ||
- name: Install QCElemental (min deps) | ||
if: matrix.python-version == '3.8' || matrix.python-version == '3.10' | ||
run: pip install '.[test]' | ||
- name: Run tests | ||
run: poetry run pytest -rws -v --cov=qcelemental --color=yes --cov-report=xml #-k "not pubchem_multiout_g" | ||
run: pytest -rws -v --cov=qcelemental --color=yes --cov-report=xml #-k "not pubchem_multiout_g" | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 # NEEDS UPDATE TO v3 https://github.com/codecov/codecov-action | ||
- name: QCSchema Examples Deploy | ||
|
@@ -64,12 +62,10 @@ jobs: | |
python-version: "3.10" | ||
- name: Setup Graphviz | ||
uses: ts-graphviz/setup-graphviz@v2 | ||
- name: Install poetry | ||
run: pip install poetry | ||
- name: Install repo | ||
run: poetry install --no-interaction --no-ansi | ||
run: pip install '.[docs]' | ||
- name: Build Documentation | ||
run: bash scripts/build_docs.sh | ||
run: sphinx-build docs/ build/docs | ||
- name: GitHub Pages Deploy | ||
uses: JamesIves/[email protected] | ||
if: github.event_name == 'push' && github.repository == 'MolSSI/QCElemental' && ( startsWith( github.ref, 'refs/tags/' ) || github.ref == 'refs/heads/master' ) | ||
|
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
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
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,126 +1,103 @@ | ||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" | ||
requires = ["setuptools>=61.0", "setuptools-scm>=8.0"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project.urls] | ||
homepage = "https://github.com/MolSSI/QCElemental" | ||
changelog = "https://github.com/MolSSI/QCElemental/docs/changelog.rst" | ||
documentation = "http://docs.qcarchive.molssi.org/projects/qcelemental/en/latest/" | ||
issues = "https://github.com/MolSSI/QCElemental/issues" | ||
|
||
[tool.poetry] | ||
[project] | ||
name = "qcelemental" | ||
version = "0.28.0" | ||
#version = "0.28.0" | ||
dynamic = ["version"] | ||
requires-python = ">=3.8" | ||
description = "Core data structures for Quantum Chemistry." | ||
authors = ["The QCArchive Development Team <[email protected]>"] | ||
license = "BSD-3-Clause" | ||
authors = [ | ||
{ name="The QCArchive Development Team", email="[email protected]" }, | ||
] | ||
license = { file="LICENSE" } | ||
readme = "README.md" | ||
homepage = "https://github.com/MolSSI/QCElemental" | ||
documentation = "http://docs.qcarchive.molssi.org/projects/qcelemental/en/latest/" | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Intended Audience :: Science/Research", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: Python :: 3.13", | ||
"Framework :: Pydantic", | ||
"Framework :: Pydantic :: 2", | ||
] | ||
|
||
[tool.poetry.dependencies] | ||
numpy = [ | ||
{ version = ">=1.12.0", python = "3.8" }, | ||
{ version = ">=1.26.1,<2.0", python = ">=3.9,<3.10" }, | ||
{ version = ">=1.26.1", python = ">=3.9,<3.13" }, | ||
] | ||
packaging = [ | ||
{ version = ">=24.0", python = ">=3.7,<3.8" }, | ||
{ version = ">=24.1", python = ">=3.8" }, | ||
] | ||
# qcel is compatible with most any numpy, v1 or v2, but numpy v2 only works with pint >=0.24, which is only available for py >=3.10 | ||
python = "^3.7.1" | ||
pint = [ | ||
{ version = ">=0.10", python = ">=3.7,<3.9" }, | ||
{ version = ">=0.23", python = ">=3.9,<3.10" }, | ||
{ version = ">=0.24", python = ">=3.10,<3.13" }, | ||
dependencies = [ | ||
"numpy >=1.12.0; python_version=='3.8'", | ||
"numpy >=1.26.1; python_version>='3.9'", | ||
"pint >=0.10; python_version=='3.8'", | ||
"pint >=0.24; python_version>='3.9'", | ||
"pydantic >=2.0", | ||
] | ||
pydantic = ">=2.0" | ||
nglview = { version = "^3.0.3", optional = true } | ||
ipykernel = { version = "<6.0.0", optional = true } | ||
importlib-metadata = { version = ">=4.8", python = "<3.8" } | ||
networkx = { version = "<3.0", optional = true } | ||
scipy = [ | ||
{ version = ">=1.6.0", python = "<3.9", optional = true }, | ||
{ version = ">=1.9.0", python = ">=3.9,<3.13", optional = true }, | ||
] | ||
pytest = { version = "^7.2.2", optional = true } | ||
|
||
[tool.poetry.extras] | ||
viz = ["nglview", "ipykernel"] | ||
align = ["networkx", "scipy"] | ||
test = ["pytest"] | ||
|
||
# Note that all the versions below are a farce for poetry's benefit. | ||
# One needs a fairly recent sphinx, pydantic, and autodoc-pydantic for a | ||
# successful docs build, and that likely requires py 3.9." | ||
|
||
[tool.poetry.group.dev.dependencies] | ||
black = ">=22.1.0,<23.0a0" | ||
mypy = "^1.1.1" | ||
isort = "5.11.5" | ||
flake8 = [ | ||
{ version = "<6.0.0", python = "<3.8.1" }, | ||
{ version = "6.0.0", python = ">=3.8.1,<4.0.0" } | ||
] | ||
pre-commit = [ | ||
{ version = "<3.2.0", python = "<3.9" }, | ||
{ version = "^3.8.0", python = ">=3.9,<4.0.0" } | ||
] | ||
pytest-cov = "^4.0.0" | ||
autoflake = "^2.0.2" | ||
jsonschema = { version = "^4.23.0", python = ">=3.8,<4.0.0" } | ||
msgpack = { version = "^1.0.8", python = ">=3.8,<4.0.0" } | ||
numpydoc = [ | ||
{ version = "^1.5.0", python = "<3.9" }, | ||
{ version = "^1.8.0", python = ">=3.9,<4.0.0" } | ||
[project.optional-dependencies] | ||
standard = [ | ||
"msgpack", | ||
"jsonschema", | ||
] | ||
docutils = [ | ||
{ version = "<0.19", python = "<3.9" }, | ||
{ version = "0.20.1", python = ">=3.9,<4.0.0" } | ||
viz = [ | ||
"nglview", # !py38 # insufficient on pypi as also need `dot`. python-graphviz sufficient in conda. | ||
"setuptools; python_version>='3.12'", # nglview needs pkg_resources | ||
"ipykernel <6.0", | ||
] | ||
sphinx = [ | ||
{ version = "<6.0.0", python = "<3.9" }, | ||
{ version = "^7.0.0", python = ">=3.9,<4.0.0" } | ||
align = [ | ||
"networkx <3.0", | ||
"scipy", | ||
] | ||
sphinxcontrib-napoleon = "^0.7" | ||
sphinx-rtd-theme = [ | ||
{ version = "^1.2.0", python = "<3.9" }, | ||
{ version = "^2.0.0", python = ">=3.9,<4.0.0" } | ||
test = [ | ||
"pytest", | ||
"pytest-cov", | ||
"codecov", | ||
] | ||
autodoc-pydantic = [ | ||
{ version = "^2.0.0", python = "<3.8" }, | ||
{ version = "^2.1.0", python = ">=3.8,<4.0" } | ||
lint = [ | ||
"pre-commit", | ||
"black >=22.1.0,<23.0a0", # if running outside of pre-commit | ||
"isort ==5.11.5", # if running outside of pre-commit | ||
# "mypy", | ||
# "autoflake", | ||
# "flake8", | ||
] | ||
sphinx-automodapi = [ | ||
{ version = "^0.15.0", python = "<3.8" }, | ||
{ version = "^0.17.0", python = ">=3.8,<4.0.0" } | ||
docs = [ # probably >=py39 | ||
"numpydoc", | ||
"docutils", | ||
"sphinx >=7.0.0", | ||
"sphinxcontrib-napoleon", | ||
"sphinx-rtd-theme", | ||
"autodoc-pydantic", | ||
"sphinx-automodapi", | ||
"sphinx-autodoc-typehints", | ||
"pydantic ==2.5.0", # for now | ||
"pydantic-settings ==2.2.0", # for now | ||
] | ||
sphinx-autodoc-typehints = [ | ||
{ version = "^1.22", python = "<3.10" }, | ||
{ version = "^2.3", python = ">=3.10,<4.0.0" } | ||
] | ||
graphviz = "^0.20.0" # insufficient on pypi as also need `dot`. python-graphviz sufficient in conda. | ||
|
||
#[tool.poetry.dependencies] | ||
#packaging = ">=24.1" | ||
#pytest = { version = "^7.2.2", optional = true } | ||
|
||
#[tool.poetry.group.dev.dependencies] | ||
#msgpack = "^1.0.8" | ||
# { version = "^1.22", python = "<3.10" }, | ||
# { version = "^2.3", python = ">=3.10,<4.0.0" } | ||
#] | ||
|
||
[tool.black] | ||
line-length = 120 | ||
target-version = ['py37'] | ||
target-version = ['py38'] | ||
|
||
[tool.isort] | ||
force_grid_wrap = 0 | ||
include_trailing_comma = true | ||
profile = "black" | ||
line_length = 120 | ||
multi_line_output = 3 | ||
use_parentheses = true | ||
|
||
[tool.coverage.run] | ||
branch = true | ||
|
@@ -135,3 +112,13 @@ init_forbid_extra = true | |
init_typed = true | ||
warn_required_dynamic_aliases = true | ||
warn_untyped_fields = true | ||
|
||
[tool.setuptools] | ||
packages = ["qcelemental"] | ||
|
||
[tool.setuptools.package-data] | ||
|
||
[tool.setuptools_scm] | ||
|
||
[tool.versioningit.vcs] | ||
default-tag = "0.0.99" # useful for CI/shallow clones |
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,3 +1,3 @@ | ||
set -xe | ||
# Run tests | ||
poetry run sphinx-build docs/ build/docs | ||
sphinx-build docs/ build/docs |
Oops, something went wrong.