Skip to content

Commit

Permalink
Merge pull request #249 from loriab/working18
Browse files Browse the repository at this point in the history
add using_web and maintenance
  • Loading branch information
Lnaden authored Jan 29, 2021
2 parents 683ab2e + cddeb41 commit 217e650
Show file tree
Hide file tree
Showing 14 changed files with 34 additions and 10 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2018-2020, The Molecular Sciences Software Institute
Copyright (c) 2018-2021, The Molecular Sciences Software Institute
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.DEFAULT_GOAL := all
isort = isort -rc qcelemental
isort = isort --float-to-top qcelemental
black = black qcelemental
autoflake = autoflake -ir --remove-all-unused-imports --ignore-init-module-imports --remove-unused-variables qcelemental

Expand Down
18 changes: 17 additions & 1 deletion docs/source/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Changelog
=========

.. X.Y.0 / 2020-MM-DD
.. X.Y.0 / 2021-MM-DD
.. -------------------
..
.. New Features
Expand All @@ -14,6 +14,22 @@ Changelog
.. +++++++++
0.18.0 / 2021-MM-DD
-------------------

New Features
++++++++++++

Enhancements
++++++++++++
- (:pr:`246`) Removes types deprecated in NumPy v1.20.0.

Bug Fixes
+++++++++
- (:pr:`244`) Fixes where in code validation throws if ``center_data`` missing from ``BasisSet`` model.
- (:pr:`1000`) Fixes web tests that weren't marked.


0.17.0 / 2020-10-01
-------------------

Expand Down
1 change: 1 addition & 0 deletions qcelemental/checkup_data/cfour_primary_masses.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# DATA ATMSS from ~line 150 of cfour/joda/pertable.f

# fmt: off

cfour_primary_masses = [
1.007825035E+00,
4.00260324E+00,
Expand Down
1 change: 1 addition & 0 deletions qcelemental/checkup_data/periodictable.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"""

# fmt: off

_temp_element = [
"GHOST", "HYDROGEN", "HELIUM", "LITHIUM", "BERYLLIUM", "BORON", "CARBON", "NITROGEN", "OXYGEN", "FLUORINE", "NEON",
"SODIUM", "MAGNESIUM", "ALUMINUM", "SILICON", "PHOSPHORUS", "SULFUR", "CHLORINE", "ARGON", "POTASSIUM", "CALCIUM",
Expand Down
1 change: 1 addition & 0 deletions qcelemental/data/alvarez_2008_covalent_radii.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

# fmt: off

alvarez_2008_covalent_radii = {
'title':
'Covalent radii revisited',
Expand Down
1 change: 1 addition & 0 deletions qcelemental/data/mantina_2009_vanderwaals_radii.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"""

# fmt: off

mantina_2009_vanderwaals_radii = {
'title':
'Consistent van der Waals Radii for the Whole Main Group',
Expand Down
1 change: 0 additions & 1 deletion qcelemental/info/data/dft_data_blob.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
File Authors: QCElemental Authors
"""


data_blob = {
"version": "1.4a2.dev215",
"functionals": {
Expand Down
2 changes: 1 addition & 1 deletion qcelemental/molparse/from_arrays.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ def from_arrays(
geom = []
else:
raise ValidationError("""For domain 'qm', `geom` must be provided.""")
if domain == "efp" and (geom_hints is None or np.asarray(geom_hints).size == 0):
if domain == "efp" and (geom_hints is None or np.asarray(geom_hints, dtype=object).size == 0):
if missing_enabled_return == "none":
return {}
elif missing_enabled_return == "minimal":
Expand Down
8 changes: 4 additions & 4 deletions qcelemental/molparse/pubchem.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ def __str__(self):

def get_sdf(self):
"""Function to return the SDF (structure-data file) of the PubChem object."""
from urllib.request import urlopen, Request
from urllib.parse import quote
from urllib.error import URLError
from urllib.parse import quote
from urllib.request import Request, urlopen

if len(self.dataSDF) == 0:
url = "https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/{}/SDF?record_type=3d".format(
Expand Down Expand Up @@ -125,9 +125,9 @@ def get_pubchem_results(name):
input string. Builds a PubChemObj object if found.
"""
from urllib.request import urlopen
from urllib.parse import quote
from urllib.error import URLError
from urllib.parse import quote
from urllib.request import urlopen

if name.isdigit():
print("\tSearching PubChem database for CID {}".format(name))
Expand Down
2 changes: 1 addition & 1 deletion qcelemental/physical_constants/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from .ureg import build_units_registry

if TYPE_CHECKING:
from pint import quantity, UnitRegistry # lgtm: [py/unused-import]
from pint import UnitRegistry, quantity # lgtm: [py/unused-import]


class PhysicalConstantsContext:
Expand Down
1 change: 1 addition & 0 deletions qcelemental/physical_constants/ureg.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""

# We only want the ureg builder exposed

__all__ = ["build_units_registry"]


Expand Down
3 changes: 3 additions & 0 deletions qcelemental/tests/test_molparse_pubchem.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ def test_pubchem_4c():
assert compare_molrecs(fullans, final["qm"], tnm() + ": full")


@using_web
def test_pubchem_error_d():
subject = """
pubchem:-55
Expand All @@ -115,6 +116,7 @@ def test_pubchem_error_d():
qcelemental.molparse.from_string(subject, return_processed=True)


@using_web
def test_pubchem_error_e():
# no 3D structure available
subject = """
Expand All @@ -127,6 +129,7 @@ def test_pubchem_error_e():
qcelemental.molparse.from_string(subject)


@using_web
def test_pubchem_error_f():
subject = """
pubchem: 100000000000000
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
],
zip_safe=False,
long_description=long_description,
Expand Down

0 comments on commit 217e650

Please sign in to comment.