Skip to content

Conversation

@JuliaSprenger
Copy link
Collaborator

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?

Copy link
Member

@mdenker mdenker left a 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__
Copy link
Member

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?


VERSION = odmltables.VERSION

# reformatting requirements files to be automatically included in docu
Copy link
Member

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")
Copy link
Member

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?


import odmltables

VERSION = odmltables.VERSION
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe:

Suggested change
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/'))
Copy link
Member

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....?

odmltables/gui/graphics/*.aux
odmltables/gui/graphics/*.pdf
odmltables/gui/graphics/*.dvi
odmltables/gui/graphics/*.ps
Copy link
Member

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/...

@mdenker
Copy link
Member

mdenker commented May 23, 2023

Update: I can confirm that I was able to install the plain and GUI versions using the new configuation.

JuliaSprenger and others added 2 commits May 23, 2023 22:10
Co-authored-by: Michael Denker <[email protected]>
Co-authored-by: Michael Denker <[email protected]>
@mdenker
Copy link
Member

mdenker commented Apr 19, 2024

Hi @JuliaSprenger, would you have time to solve the (very simple) merge conflict in the imports of odml_table.py so we can merge this PR? I could then take care of making a new release (maybe 1.0.2?) to resolve #133.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants