psi-rking / optking

optking: A molecular geometry optimization program
BSD 3-Clause "New" or "Revised" License
20 stars 14 forks source link

maybe fix build from src #76

Closed loriab closed 2 years ago

loriab commented 2 years ago

I was looking at the docs build fail over at the psi4 PR, https://github.com/psi4/psi4/actions/runs/3154641501/jobs/5132460787#step:9:9 (message copied below)

[  6%] Performing build step for 'optking_external'
[  6%] Installing Psi4-detected BLAS/LAPACK
-- Install configuration: "Debug"
[  6%] Built target lapack_external
running build
running build_py
running egg_info
writing OptKing.egg-info/PKG-INFO
writing dependency_links to OptKing.egg-info/dependency_links.txt
writing requirements to OptKing.egg-info/requires.txt
writing top-level names to OptKing.egg-info/top_level.txt
reading manifest file 'OptKing.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'README.md'
adding license file 'LICENSE'
writing manifest file 'OptKing.egg-info/SOURCES.txt'
/usr/share/miniconda/envs/test/lib/python3.8/site-packages/setuptools/command/build_py.py:[20](https://github.com/psi4/psi4/actions/runs/3154641501/jobs/5132460787#step:9:21)2: SetuptoolsDeprecationWarning:     Installing 'optking.tests.psi4inputs.psiAPIversions' as data is deprecated, please list it in `packages`.
    !!

    ############################
    # Package would be ignored #
    ############################
    Python recognizes 'optking.tests.psi4inputs.psiAPIversions' as an importable package,
    but it is not listed in the `packages` configuration of setuptools.

    'optking.tests.psi4inputs.psiAPIversions' has been automatically added to the distribution only
    because it may contain data files, but this behavior is likely to change
    in future versions of setuptools (and therefore is considered deprecated).

    Please make sure that 'optking.tests.psi4inputs.psiAPIversions' is included as a package by using
    the `packages` configuration field or the proper discovery methods
    (for example by using `find_namespace_packages(...)`/`find_namespace:`
    instead of `find_packages(...)`/`find:`).

    You can read more about "package discovery" and "data files" on setuptools
    documentation page.

!!

  check.warn(importable)

It's the only CI track that's building optking from src rather than using the c-f package. So one fix would be to edit docs-cf.yaml and switch to the conda pkg. Or we could use this as an opportunity to appease Py packaging and fix the message above. Firstly, like much of Py packaging I don't really understand the message above or why there are so many tools for essentially a copy-paste operation or why they keep changing/developing it. I just play along. I think the proposed changes in this PR might squelch the message (maybe will need another dunder init in tests/psi4file/psi4psithon, too). If you want, you could edit in the psi4 the external/optking/CM file and replace "master" with "loriab-patch-1" to try this out. Another workaround would be to not have tests as an importable module (that is, remove tests/init.py). I've had good success with this at Psi4 when it started complaining alot about tests with the same name. Caveat is that you need to require pytest >=7 and use a special mode, https://github.com/psi4/psi4/blob/master/pytest.ini#L2-L9 . You can still import utilities fns for tests but it'd be from util import fn, not from ..util import fn.

Anyway, those are a few guesses at forward paths. Let me know if I can be any help.

codecov[bot] commented 2 years ago

Codecov Report

Base: 84.01% // Head: 84.00% // Decreases project coverage by -0.01% :warning:

Coverage data is based on head (f58e174) compared to base (765fe07). Patch has no changes to coverable lines.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #76 +/- ## ========================================== - Coverage 84.01% 84.00% -0.02% ========================================== Files 34 34 Lines 6676 6675 -1 ========================================== - Hits 5609 5607 -2 - Misses 1067 1068 +1 ``` | [Impacted Files](https://codecov.io/gh/psi-rking/optking/pull/76?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Rollin+King) | Coverage Δ | | |---|---|---| | [optking/IRCfollowing.py](https://codecov.io/gh/psi-rking/optking/pull/76/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Rollin+King#diff-b3B0a2luZy9JUkNmb2xsb3dpbmcucHk=) | `96.06% <0.00%> (-0.79%)` | :arrow_down: | | [optking/dimerfrag.py](https://codecov.io/gh/psi-rking/optking/pull/76/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Rollin+King#diff-b3B0a2luZy9kaW1lcmZyYWcucHk=) | `86.82% <0.00%> (+0.12%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Rollin+King). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Rollin+King)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.