Conversation
mdenker
left a comment
There was a problem hiding this comment.
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.
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?
|
|
||
| VERSION = odmltables.VERSION | ||
|
|
||
| # reformatting requirements files to be automatically included in docu |
There was a problem hiding this comment.
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.
Will this actually also work for non-installed packages?
|
|
||
| import odmltables | ||
|
|
||
| VERSION = odmltables.VERSION |
There was a problem hiding this comment.
Maybe:
| VERSION = odmltables.VERSION | |
| VERSION = odmltables.__version__ |
| # 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.
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.
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
srcfolder 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?