-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update repo's layout #627
Update repo's layout #627
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just left some minor comments. This is looking good, @GuillemBarroso.
Codecov Report
@@ Coverage Diff @@
## master #627 +/- ##
=======================================
Coverage 86.63% 86.63%
=======================================
Files 69 69
Lines 7750 7750
=======================================
Hits 6714 6714
Misses 1036 1036 |
3c8f445
to
518183f
Compare
except ModuleNotFoundError: | ||
import importlib_metadata | ||
|
||
__version__ = importlib_metadata.version("ansys-dpf-core") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use __name__
here. It avoids hardcoding the namespace of the package:
__version__ = importlib_metadata.version("ansys-dpf-core") | |
__version__ = importlib_metadata.version(__name__.replace(".", "-")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I had this before. However, I was getting the following error in the Test docstrings
step: "importlib.metadata.PackageNotFoundError: core".
With @germa89 we realized that this was fixed by hard-coding the name. I will try to investigate this a bit more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normally I would agree with @jorgepiloto ... but in this case, for some reason, we needed to provide the hardcoded package name to avoid import issues.
This reverts commit d045a7c.
b60980b
to
74a90e8
Compare
Closing this PR as I was trying to do too many things at once. In the new PRs I will go one step at a time. |
Fix #296.
Using the dev guide recommendations and other PyAnsys repos, I tried to address issue #296.
Changes:
ansys/dpf/core
insidesrc/
directory.tox.ini
and.pre-commit-config.yaml
.pyproject.toml
instead ofsetup.py
pyproject.toml
handles the version as well, I have removed the_version.py
and added the server versions in__init__.py
.The only change that will be needed after this is to rename the branch
master
tomain
.