Skip to content
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

restructure package #11

Merged
merged 4 commits into from
Jul 11, 2024
Merged

restructure package #11

merged 4 commits into from
Jul 11, 2024

Conversation

jcharkow
Copy link
Collaborator

@jcharkow jcharkow commented Jul 10, 2024

Cleanup package - remove old code and simplify organization
This will make autogenerating the API for the docs easier

  1. Remove plotting ability from pyopenms_viz object in favor of plotting directly from pandas
  2. Remove plotting folder, put in main folder
  3. Remove files from old interface
  4. Rename backends: MSPlotly, MSBokeh and MSMatplotlib

@jcharkow jcharkow requested a review from singjc July 10, 2024 21:36
Copy link
Collaborator

@singjc singjc left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

Just some minor comments / fixes.

Before removing the datastructures, I'm not sure if we still maybe want to keep them even thought they're not used. Just as templates? Or alternative, they can just be moved into the documentation? @axelwalter, what do you think?

For entry points, it's a personal preference, but I would prefer if they were all lower case.

if backend == "bokeh":
try:
module = importlib.import_module("pyopenms_viz.plotting._bokeh")
Copy link
Collaborator

Choose a reason for hiding this comment

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

This needs to be updated, remove the .plotting since it's no longer a submodule directory

elif backend == "matplotlib":
try:
module = importlib.import_module("pyopenms_viz.plotting._matplotlib")
Copy link
Collaborator

Choose a reason for hiding this comment

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

This needs to be updated, same reason as above.

elif backend == "plotly":
try:
module = importlib.import_module("pyopenms_viz.plotting._plotly")
Copy link
Collaborator

Choose a reason for hiding this comment

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

This needs to be updated, same reason as above.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes will fix this, however it is strange that the plotting still seems to work with this bug?

Comment on lines +25 to +27
"MSBokeh = pyopenms_viz._bokeh",
"MSPlotly = pyopenms_viz._plotly",
"MSMatplotlib = pyopenms_viz._matplotlib",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm personally not in favour of using a mixed-case for the entry points. I prefer using snake_case, I think it's also just easier, so a user doesn't have to worry/think about whether certain letters need to be capitalized or not.

@axelwalter
Copy link
Collaborator

About the datastructures. If I understand correctly all columns which affect the plot are specified by the user now (e.g. x, y, by columns). And I will do the same for columns such as custom peak color in the spectrum plot. I like this approach which does not assume any columns are named correctly. If that is the case everywhere I would vote for removing the datastructures.

@jcharkow jcharkow merged commit bd6a5af into main Jul 11, 2024
@jcharkow jcharkow deleted the cleanup branch July 11, 2024 15:37
@jcharkow jcharkow restored the cleanup branch July 11, 2024 15:38
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.

3 participants