PCMSolver / pcmsolver

An API for the Polarizable Continuum Model
http://pcmsolver.readthedocs.io/
GNU Lesser General Public License v3.0
32 stars 21 forks source link

help the reimport problem #184

Closed loriab closed 3 years ago

loriab commented 3 years ago

Description

Motivation and Context

If you run the parse file function twice with the same import pcmsolver, it gives a keyword already defined error with getkw. This causes trouble with psiapi and even worse with running a multiple pcm job with qcschema b/c the pcm input gets reparsed. @robertodr worked on this some. I may have opined that reload is never the answer. Nonetheless, the proposed changes do help. Has this already been tried and found troublesome?

How Has This Been Tested?

Screenshots (if appropriate):

Todos

Types of changes

Questions

Status

loriab commented 3 years ago

CI error is unrelated, I think:

  File "/home/travis/.local/lib/python3.5/site-packages/virtualenv/__init__.py", line 3, in <module>
    from .run import cli_run, session_via_cli
  File "/home/travis/.local/lib/python3.5/site-packages/virtualenv/run/__init__.py", line 12, in <module>
    from .plugin.activators import ActivationSelector
  File "/home/travis/.local/lib/python3.5/site-packages/virtualenv/run/plugin/activators.py", line 6, in <module>
    from .base import ComponentBuilder
  File "/home/travis/.local/lib/python3.5/site-packages/virtualenv/run/plugin/base.py", line 9, in <module>
    from importlib_metadata import entry_points
  File "/home/travis/.local/lib/python3.5/site-packages/importlib_metadata/__init__.py", line 43, in <module>
    class PackageNotFoundError(ModuleNotFoundError):
NameError: name 'ModuleNotFoundError' is not defined

In local testing back on v1.2.1, I also get the following warnings, which you may well have already addressed in the meantime.

/home/psilocaluser/toolchainconda/envs/py38/lib//python3.8/site-packages/pcmsolver/pyparsing.py:798
/home/psilocaluser/toolchainconda/envs/py38/lib//python3.8/site-packages/pcmsolver/pyparsing.py:798
  /home/psilocaluser/toolchainconda/envs/py38/lib//python3.8/site-packages/pcmsolver/pyparsing.py:798: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.9 it will stop working
    collections.MutableMapping.register(ParseResults)

/home/psilocaluser/toolchainconda/envs/py38/lib//python3.8/site-packages/pcmsolver/pyparsing.py:2389
/home/psilocaluser/toolchainconda/envs/py38/lib//python3.8/site-packages/pcmsolver/pyparsing.py:2389
  /home/psilocaluser/toolchainconda/envs/py38/lib//python3.8/site-packages/pcmsolver/pyparsing.py:2389: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.9 it will stop working
    elif isinstance(exprs, collections.Sequence):
robertodr commented 3 years ago

CI is in a sorry state. The changes look good, I'll switch to GitHub actions to get meaningful feedback from CI again. The warnings look familiar: I have accumulated patches here and there, but never merged them :'(

loriab commented 3 years ago

CI is in a sorry state. The changes look good, I'll switch to GitHub actions to get meaningful feedback from CI again. The warnings look familiar: I have accumulated patches here and there, but never merged them :'(

np, I have limping Travis-CI repos, too. I'm thinking pb11 is a good model for all arch + compiled + GHA CI, if it isn't already on your radar.

robertodr commented 3 years ago

I have this template: https://github.com/MRChemSoft/mrchem/blob/master/.github/workflows/build-test.yml

codecov[bot] commented 3 years ago

Codecov Report

Merging #184 (a231544) into master (bd4f67a) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #184   +/-   ##
=======================================
  Coverage   74.09%   74.09%           
=======================================
  Files         243      243           
  Lines       17144    17144           
=======================================
  Hits        12703    12703           
  Misses       4441     4441           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update bd4f67a...a231544. Read the comment docs.

robertodr commented 3 years ago

I need to synchronize some changes in the Fortran interface before making a new release.