Skip to content

Commit 965a764

Browse files
authored
Update docs location (#311)
* Update README.md * pydantic pin, changelog update * clear up numpy deprecation * actually commit * clear skips and warnings * need lower bound? * reorganize extras * modern scipy? * syntax * sep scipy * tidy
1 parent f7e404c commit 965a764

File tree

8 files changed

+62
-23
lines changed

8 files changed

+62
-23
lines changed

.github/workflows/CI.yaml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ jobs:
1010
test:
1111
runs-on: ubuntu-latest
1212
strategy:
13+
fail-fast: true
1314
matrix:
14-
python-version: ["3.7", "3.11"]
15+
python-version: ["3.7", "3.9", "3.11"]
1516
pydantic-version: ["1", "2"]
1617

1718
steps:
@@ -31,9 +32,13 @@ jobs:
3132
- name: Sed replace pydantic on repo
3233
run: |
3334
sed -i 's/^pydantic *= *">*= *\([0-9.]*\)"/pydantic = "^\1"/' pyproject.toml
34-
if: ${{ matrix.pydantic-version == 1 }}
35-
- name: Install repo with poetry
36-
run: poetry install --no-interaction --no-ansi
35+
if: matrix.pydantic-version == '1'
36+
- name: Install repo with poetry (full deps)
37+
if: matrix.python-version != '3.9'
38+
run: poetry install --no-interaction --no-ansi --all-extras
39+
- name: Install repo with poetry (min deps)
40+
if: matrix.python-version == '3.9'
41+
run: poetry install --no-interaction --no-ansi --extras test
3742
- name: Run tests
3843
run: poetry run pytest -rws -v --cov=qcelemental --color=yes --cov-report=xml
3944
- name: Upload coverage to Codecov

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
[![Build Status](https://github.com/MolSSI/QCElemental/workflows/CI/badge.svg?branch=master)](https://github.com/MolSSI/QCElemental/actions?query=workflow%3ACI)
44
[![codecov](https://img.shields.io/codecov/c/github/MolSSI/QCElemental.svg?logo=Codecov&logoColor=white)](https://codecov.io/gh/MolSSI/QCElemental)
5-
[![Documentation Status](https://img.shields.io/github/workflow/status/MolSSI/QCElemental/CI/master?label=docs&logo=readthedocs&logoColor=white)](http://docs.qcarchive.molssi.org/projects/qcelemental/en/latest/)
5+
[![Documentation Status](https://img.shields.io/github/actions/workflow/status/MolSSI/QCElemental/CI.yaml?label=docs&logo=readthedocs&logoColor=white)](https://molssi.github.io/QCElemental/)
66
[![Chat on Slack](https://img.shields.io/badge/chat-on_slack-green.svg?longCache=true&style=flat&logo=slack)](https://join.slack.com/t/qcarchive/shared_invite/enQtNDIzNTQ2OTExODk0LTE3MWI0YzBjNzVhNzczNDM0ZTA5MmQ1ODcxYTc0YTA1ZDQ2MTk1NDhlMjhjMmQ0YWYwOGMzYzJkZTM2NDlmOGM)
77
![python](https://img.shields.io/badge/python-3.7+-blue.svg)
88

9-
**Documentation:** [Read The Docs](http://docs.qcarchive.molssi.org/projects/qcelemental/en/latest/index.html)
9+
**Documentation:** [GitHub Pages](https://molssi.github.io/QCElemental/)
1010

1111
Core data structures for Quantum Chemistry. QCElemental also contains physical constants and periodic table data from NIST and molecule handlers.
1212

docs/changelog.rst

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Changelog
22
=========
33

4-
.. X.Y.0 / 2022-MM-DD
4+
.. X.Y.0 / 2023-MM-DD
55
.. -------------------
66
..
77
.. Breaking Changes
@@ -22,6 +22,22 @@ Unreleased
2222
Breaking Changes
2323
++++++++++++++++
2424

25+
New Features
26+
++++++++++++
27+
28+
Enhancements
29+
++++++++++++
30+
31+
Bug Fixes
32+
+++++++++
33+
34+
35+
0.26.0 / 2023-07-31
36+
-------------------
37+
38+
Breaking Changes
39+
++++++++++++++++
40+
2541
- (:pr:`308`) Fix CI Pipelines. Dropped Python3.6. Bring CI pipelines into harmony with local dev experience. Lint and format entire code base. Accelerate CI pipelines. Update setup.py to correctly define extras packages. Breaking change due to dropped support for Python3.6. No code functionality was altered.
2642
- Dropped support for dead Python 3.6. Minimum supported Python is now 3.7.
2743
- Updated CONTRIBUTING.md to contain detailed instructions for developers on how to contribute.
@@ -36,12 +52,22 @@ Enhancements
3652
- (:pr:`310`) Modernize DevOps Tooling
3753
- Added `/scripts` directory to root of project that contains scripts for testing, formatting code, and building docs.
3854
- Updated build system from `setuptools` to modern `pyproject.toml` specification using `poetry` for the build backend.
39-
- Removed complicated versioning code in favor of single source of truth in `pyproject.toml`. Using standard library `importlib` for looking up package version in `__init__.py` file.
55+
- Removed complicated versioning code in favor of single source of truth in `pyproject.toml`. Using standard library `importlib` for looking up package version in `__init__.py` file.
4056
- Added `build_docs.sh` script to `/scrips` and removed `Makefile` from `/docs`. Flattened `/docs` file structure.
4157
- Removed `travis-ci` code from `devtools`
4258
- Removed LGTM code (they no longer exist as a project).
4359
- Bring all package directories under `black`, `isort`, and `autoflake` control.
4460

61+
Bug Fixes
62+
+++++++++
63+
- (:pr:`305`) Initialize `Molecule.extras` as empty dictionary.
64+
- (:pr:`311`) Update docs location from RTD to GH pages. Resolve escape char warnings. Update changelog.
65+
- (:pr:`311`) Clear up NumPy "Conversion of an array with ndim > 0 to a scalar is deprecated" in
66+
`util.measure_coordinates` called by `Molecule.measure`.
67+
- (:pr:`314`) Import `pydantic.v1` from pydantic v2 so that QCElemental can work with any >=1.8.2 pydantic
68+
until QCElemental is updated for v2.
69+
70+
4571
0.25.1 / 2022-10-31
4672
-------------------
4773

pyproject.toml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ build-backend = "poetry.core.masonry.api"
55

66
[tool.poetry]
77
name = "qcelemental"
8-
version = "0.25.1"
8+
version = "0.26.0"
99
description = "Core data structures for Quantum Chemistry."
10-
authors = ["The QCArchive Development Team <qcarchive@molsii.org>"]
10+
authors = ["The QCArchive Development Team <qcarchive@molssi.org>"]
1111
license = "BSD-3-Clause"
1212
readme = "README.md"
1313
homepage = "https://github.com/MolSSI/QCElemental"
@@ -32,12 +32,20 @@ numpy = [
3232
python = "^3.7"
3333
pint = ">=0.10.0"
3434
pydantic = ">=1.8.2"
35-
nglview = { extras = ["viz"], version = "^3.0.3" }
36-
ipykernel = { version = "<6.0.0", extras = ["viz"] }
35+
nglview = { version = "^3.0.3", optional = true }
36+
ipykernel = { version = "<6.0.0", optional = true }
3737
importlib-metadata = { version = ">=4.8", python = "<3.8" }
38-
networkx = { version = "<3.0", extras = ["align"] }
39-
pytest = { extras = ["test"], version = "^7.2.2" }
38+
networkx = { version = "<3.0", optional = true }
39+
scipy = [
40+
{ version = ">=1.6.0", python = "<3.9", optional = true },
41+
{ version = ">=1.9.0", python = ">=3.9", optional = true },
42+
]
43+
pytest = { version = "^7.2.2", optional = true }
4044

45+
[tool.poetry.extras]
46+
viz = ["nglview", "ipykernel"]
47+
align = ["networkx", "scipy"]
48+
test = ["pytest"]
4149

4250
[tool.poetry.group.dev.dependencies]
4351
black = ">=23.1.0"
@@ -62,7 +70,6 @@ sphinx-autodoc-typehints = "^1.22"
6270
line-length = 120
6371
target-version = ['py37']
6472

65-
6673
[tool.isort]
6774
force_grid_wrap = 0
6875
include_trailing_comma = true

qcelemental/models/results.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,16 @@ class AtomicResultProperties(ProtoModel):
4444
nuclear_repulsion_energy: Optional[float] = Field(None, description="The nuclear repulsion energy.")
4545
return_energy: Optional[float] = Field(
4646
None,
47-
description="The energy of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\ =\ :attr:`~qcelemental.models.DriverEnum.energy` computations.",
47+
description=f"The energy of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.energy` computations.",
4848
)
4949
return_gradient: Optional[Array[float]] = Field(
5050
None,
51-
description="The gradient of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\ =\ :attr:`~qcelemental.models.DriverEnum.gradient` computations.",
51+
description=f"The gradient of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.gradient` computations.",
5252
units="E_h/a0",
5353
)
5454
return_hessian: Optional[Array[float]] = Field(
5555
None,
56-
description="The Hessian of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\ =\ :attr:`~qcelemental.models.DriverEnum.hessian` computations.",
56+
description=f"The Hessian of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.hessian` computations.",
5757
units="E_h/a0^2",
5858
)
5959

qcelemental/tests/test_molecule.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,7 @@ def test_molecule_repeated_hashing():
536536
([0, 1, 2, 3], 180.0),
537537
([[0, 1, 2, 3]], [180.0]),
538538
([[1, 3], [3, 1], [1, 2, 3]], [6.3282716, 6.3282716, 149.51606694803903]),
539+
([[0, 1, 2, 3], [3, 2, 1, 0]], [180.0, 180.0]),
539540
],
540541
)
541542
def test_measurements(measure, result):

qcelemental/tests/test_utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def test_unnp(inp, expected):
145145
def test_distance():
146146
def _test_distance(p1, p2, value):
147147
tmp = qcel.util.compute_distance(p1, p2)
148-
assert compare_values(value, float(tmp))
148+
assert compare_values(value, tmp[0])
149149

150150
_test_distance([0, 0, 0], [0, 0, 1], 1.0)
151151
_test_distance([0, 0, 0], [0, 0, 0], 0.0)
@@ -160,7 +160,7 @@ def _test_distance(p1, p2, value):
160160
def test_angle():
161161
def _test_angle(p1, p2, p3, value, degrees=True):
162162
tmp = qcel.util.compute_angle(p1, p2, p3, degrees=degrees)
163-
assert compare_values(value, float(tmp))
163+
assert compare_values(value, tmp[0])
164164

165165
# Check all 90 degree domains
166166
p1 = [5, 0, 0]
@@ -194,7 +194,7 @@ def _test_angle(p1, p2, p3, value, degrees=True):
194194
def test_dihedral1():
195195
def _test_dihedral(p1, p2, p3, p4, value, degrees=True):
196196
tmp = qcel.util.compute_dihedral(p1, p2, p3, p4, degrees=degrees)
197-
assert compare_values(value, float(tmp), label="test_dihedral1")
197+
assert compare_values(value, tmp[0], label="test_dihedral1")
198198

199199
p1 = [0, 0, 0]
200200
p2 = [0, 2, 0]
@@ -231,7 +231,7 @@ def test_dihedral2():
231231

232232
def _test_dihedral(p1, p2, p3, p4, value, degrees=True):
233233
tmp = qcel.util.compute_dihedral(p1, p2, p3, p4, degrees=degrees)
234-
assert compare_values(value, float(tmp), label="test_dihedral1")
234+
assert compare_values(value, tmp[0], label="test_dihedral1")
235235

236236
p0 = [24.969, 13.428, 30.692]
237237
p1 = [24.044, 12.661, 29.808]

qcelemental/util/misc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def measure_coordinates(coordinates, measurements, degrees=False):
175175
raise KeyError(f"Unrecognized number of arguments for measurement {num}, found {len(m)}, expected 2-4.")
176176

177177
val = func(*[coordinates[x] for x in m], **kwargs)
178-
ret.append(float(val))
178+
ret.append(val[0])
179179

180180
if single:
181181
return ret[0]

0 commit comments

Comments
 (0)