-
Notifications
You must be signed in to change notification settings - Fork 10
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 project setup #126
base: master
Are you sure you want to change the base?
Update project setup #126
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.
I think that's a great idea to change to toml. I made a few comments, but could test the install on my system yet due to bad internet. Will report back.
import importlib.metadata | ||
# this need to be at the begining because some sub module will need the version | ||
__version__ = importlib.metadata.version("odmltables") | ||
VERSION = __version__ |
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.
It seems VERSION
is only used in two instances (to print the --version
info for the CLI, and as a title for the GUI window). Maybe one could substitute a odmltables.__version__
in those instances and remove the VERSION
variable alltogether?
@@ -33,25 +32,25 @@ | |||
output, error = process.communicate() | |||
|
|||
import odmltables | |||
|
|||
VERSION = odmltables.VERSION | |||
|
|||
# reformatting requirements files to be automatically included in docu |
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.
Is this still something necessary, putting deps into the documentation?
|
||
import importlib.metadata | ||
# this need to be at the begining because some sub module will need the version | ||
__version__ = importlib.metadata.version("odmltables") |
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.
Will this actually also work for non-installed packages?
@@ -33,25 +32,25 @@ | |||
output, error = process.communicate() | |||
|
|||
import odmltables | |||
|
|||
VERSION = odmltables.VERSION |
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.
Maybe:
VERSION = odmltables.VERSION | |
VERSION = odmltables.__version__ |
import subprocess | ||
import os | ||
|
||
import tomllib | ||
|
||
# If extensions (or modules to document with autodoc) are in another directory, | ||
# add these directories to sys.path here. If the directory is relative to the | ||
# documentation root, use os.path.abspath to make it absolute, like shown here. | ||
#sys.path.insert(0, os.path.abspath('.')) | ||
sys.path.insert(0, os.path.abspath('../src')) | ||
sys.path.insert(0, os.path.abspath('../../python-odml/')) |
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.
Do you know if this is needed? Seems like a hack of some sort....?
@@ -74,7 +74,7 @@ odmltables/gui/graphics/*.dvi | |||
odmltables/gui/graphics/*.ps |
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.
All lines from 67-76 should have src/odmltables/gui/...
Update: I can confirm that I was able to install the plain and GUI versions using the new configuation. |
Co-authored-by: Michael Denker <m.denker@fz-juelich.de>
Co-authored-by: Michael Denker <m.denker@fz-juelich.de>
Hi @JuliaSprenger, would you have time to solve the (very simple) merge conflict in the imports of |
This PR switches from a setup.py approach to a pyproject.toml approach for defining package metadata and dependencies.
In addition it uses the
src
folder organization to separate source from other files.For everything to still work smoothly I also had to make some minor adjustments to the code and the documentation. The corresponding documentation is here
@mdenker What do you think of this?