Skip to content

Commit d04a380

Browse files
authored
fix circular import in docs (#286)
* fix circular docs import * lint * pytest restriction hurting env solution * restrict multi-CI runs on branches on upstream * proper py310 * update pip protocol * finalize
1 parent cabec4a commit d04a380

File tree

13 files changed

+47
-13
lines changed

13 files changed

+47
-13
lines changed

.github/workflows/CI.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: CI
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
48

59
jobs:
610
build:
@@ -16,7 +20,7 @@ jobs:
1620
python-version: 3.6
1721
label: minpy
1822
- conda-env: base-cf
19-
python-version: 3.9
23+
python-version: "3.10"
2024
label: full
2125
env:
2226
PYVER: ${{ matrix.cfg.python-version }}

.github/workflows/Lint.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: Format
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
48

59
jobs:
610
build:

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ srd121, respectively ([details](raw_data/README.md)) in a renewable manner
1717
This project also contains a generator, validator, and translator for [Molecule
1818
QCSchema](https://molssi-qc-schema.readthedocs.io/en/latest/auto_topology.html).
1919

20+
It is intended to keep the QCElemental code compatible with Python 3.6+
21+
as long as dependencies allow. Packages are assured for Python 3.8+.
22+
23+
2024
### Periodic Table
2125

2226
A variety of periodic table quantities are available using virtually any alias:

devtools/conda-envs/base-cf.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ dependencies:
1515
- nglview
1616

1717
# Testing
18-
- pytest>=4.0.0
18+
- pytest
1919
- pytest-cov
2020
- codecov
2121
- scipy # tests an aspect of a helper fn not used by qcel functionality

devtools/conda-envs/base.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ dependencies:
1717
- nglview
1818

1919
# Testing
20-
- pytest>=4.0.0
20+
- pytest
2121
- pytest-cov
2222
- codecov
2323
- scipy # tests an aspect of a helper fn not used by qcel functionality

devtools/conda-envs/docs-cf.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ dependencies:
2020
- sphinx_rtd_theme
2121

2222
# testing
23-
- pytest>=4.0.0
23+
- pytest
2424
- pytest-cov
2525
- codecov
2626

2727
- pip:
28-
- git+git://github.com/MolSSI/qcarchive-sphinx-theme#egg=qcarchive_sphinx_theme
28+
- git+https://github.com/MolSSI/qcarchive-sphinx-theme#egg=qcarchive_sphinx_theme

docs/requirements.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ dependencies:
1515
- graphviz
1616

1717
- pip:
18-
- git+git://github.com/MolSSI/qcarchive-sphinx-theme#egg=qcarchive_sphinx_theme
18+
- git+https://github.com/MolSSI/qcarchive-sphinx-theme#egg=qcarchive_sphinx_theme

docs/source/changelog.rst

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

4-
.. X.Y.0 / 2021-MM-DD
4+
.. X.Y.0 / 2022-MM-DD
55
.. -------------------
66
..
77
.. Breaking Changes
@@ -16,6 +16,25 @@ Changelog
1616
.. Bug Fixes
1717
.. +++++++++
1818
19+
20+
0.25.0 / 2022-MM-DD
21+
-------------------
22+
23+
Breaking Changes
24+
++++++++++++++++
25+
26+
New Features
27+
++++++++++++
28+
29+
Enhancements
30+
++++++++++++
31+
32+
Bug Fixes
33+
+++++++++
34+
- (:pr:`286`) Sphinx autodocumentation with typing of ``qcelemental.testing.compare_recursive`` no longer
35+
warns about circular import.
36+
37+
1938
0.24.0 / 2021-11-18
2039
-------------------
2140

qcelemental/models/basemodels.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import numpy as np
66
from pydantic import BaseModel, BaseSettings
77

8-
from qcelemental.testing import compare_recursive
98
from qcelemental.util import deserialize, serialize
109
from qcelemental.util.autodocs import AutoPydanticDocGenerator
1110

@@ -186,6 +185,8 @@ def compare(self, other: Union["ProtoModel", BaseModel], **kwargs) -> bool:
186185
bool
187186
True if the objects match.
188187
"""
188+
from ..testing import compare_recursive
189+
189190
return compare_recursive(self, other, **kwargs)
190191

191192

qcelemental/models/procedures.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from enum import Enum
22
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple
33

4-
from pydantic import Field, constr, validator, conlist
4+
from pydantic import Field, conlist, constr, validator
55

66
from ..util import provenance_stamp
77
from .basemodels import ProtoModel

0 commit comments

Comments
 (0)