Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changelog and py312 #327

Merged
merged 16 commits into from
Oct 20, 2023
4 changes: 2 additions & 2 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: true
fail-fast: false
matrix:
python-version: ["3.7", "3.9", "3.11"]
python-version: ["3.7", "3.9", "3.11", "3.12"]
pydantic-version: ["1", "2"]

steps:
Expand Down
15 changes: 15 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ Changelog
..
.. Bug Fixes
.. +++++++++
..
.. Misc.
.. +++++


Unreleased
-------------------
Expand All @@ -24,12 +28,23 @@ Breaking Changes

New Features
++++++++++++
- (:pr:`326`, :pr:`327`) New protocol option ``occupations_and_eigenvalues`` added to
``WavefunctionProperties`` to store lightweight fields.

Enhancements
++++++++++++
- (:pr:`322`) Allow ``util.which`` to raise a clearer error when handling pyenv shims. Improve docs.

Bug Fixes
+++++++++
- (:pr:`325`, :issue:`324`) Ensure ``util.measure_coordinates`` isn't returning NaN angles just
because floating-point errors are outside arccos's ``[-1, 1]`` bounds.
- (:pr:`315`) Stop resetting numpy print formatting.

Misc.
+++++
- (:pr:`320`) Reset ``black`` formatting to 2022.
- (:pr:`327`) Enable Python v3.12 in poetry.


0.26.0 / 2023-07-31
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]

[tool.poetry.dependencies]
numpy = [
{ version = ">=1.12.0", python = "3.8" },
{ version = ">=1.24.1", python = ">=3.9" },
{ version = ">=1.26.1", python = ">=3.9,<3.13" },
]
python = "^3.7"
pint = ">=0.10.0"
Expand All @@ -38,7 +39,7 @@ 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", optional = true },
{ version = ">=1.9.0", python = ">=3.9,<3.13", optional = true },
]
pytest = { version = "^7.2.2", optional = true }

Expand Down
6 changes: 3 additions & 3 deletions qcelemental/models/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ class WavefunctionProtocolEnum(str, Enum):

all = "all"
orbitals_and_eigenvalues = "orbitals_and_eigenvalues"
eigenvalues_and_occupations = "eigenvalues_and_occupations"
occupations_and_eigenvalues = "occupations_and_eigenvalues"
return_results = "return_results"
none = "none"

Expand Down Expand Up @@ -703,8 +703,8 @@ def _wavefunction_protocol(cls, value, values):
]
elif wfnp == "orbitals_and_eigenvalues":
return_keep = ["orbitals_a", "orbitals_b", "eigenvalues_a", "eigenvalues_b"]
elif wfnp == "eigenvalues_and_occupations":
return_keep = ["eigenvalues_a", "eigenvalues_b", "occupations_a", "occupations_b"]
elif wfnp == "occupations_and_eigenvalues":
return_keep = ["occupations_a", "occupations_b", "eigenvalues_a", "eigenvalues_b"]
else:
raise ValueError(f"Protocol `wavefunction:{wfnp}` is not understood.")

Expand Down
4 changes: 2 additions & 2 deletions qcelemental/tests/test_model_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,13 +308,13 @@ def test_wavefunction_return_result_pointer(wavefunction_data_fixture):
),
("return_results", True, ["orbitals_a", "fock_a", "fock_b"], ["orbitals_a", "fock_a"]),
(
"eigenvalues_and_occupations",
"occupations_and_eigenvalues",
True,
["orbitals_a", "orbitals_b", "occupations_a", "occupations_b", "eigenvalues_a", "eigenvalues_b"],
["occupations_a", "eigenvalues_a"],
),
(
"eigenvalues_and_occupations",
"occupations_and_eigenvalues",
False,
["orbitals_a", "orbitals_b", "occupations_a", "occupations_b", "eigenvalues_a", "eigenvalues_b"],
["occupations_a", "occupations_b", "eigenvalues_a", "eigenvalues_b"],
Expand Down