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

[WIP] ✨ Try out plot-config (rebased after plot_pfid) #284

Closed
wants to merge 53 commits into from

Conversation

jsnel
Copy link
Member

@jsnel jsnel commented Aug 21, 2024

This is a rebase of the plot_config branch after the plot_pfid function was merged into main.

Copy link
Contributor

Binder 👈 Launch a binder notebook on branch jsnel/pyglotaran-extras/plot_pfid_and_config


from __future__ import annotations

import inspect

Check notice

Code scanning / CodeQL

Module is imported with 'import' and 'import from' Note

Module 'inspect' is imported with both 'import' and 'import from'.
Copy link

codecov bot commented Aug 21, 2024

Codecov Report

Attention: Patch coverage is 95.24838% with 22 lines in your changes missing coverage. Please review.

Project coverage is 58.01%. Comparing base (b880df9) to head (9734619).
Report is 27 commits behind head on main.

Files with missing lines Patch % Lines
pyglotaran_extras/config/config.py 94.33% 6 Missing and 3 partials ⚠️
pyglotaran_extras/config/plot_config.py 95.85% 4 Missing and 5 partials ⚠️
pyglotaran_extras/plotting/plot_svd.py 80.00% 2 Missing ⚠️
tests/io/test_load_data.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #284       +/-   ##
===========================================
+ Coverage   44.77%   58.01%   +13.24%     
===========================================
  Files          27       31        +4     
  Lines        1043     1603      +560     
  Branches      162      290      +128     
===========================================
+ Hits          467      930      +463     
- Misses        568      657       +89     
- Partials        8       16        +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

✨ Add PlotLabelOverRideValue and PlotLabelOverRideMap
🩹 Fix mutation of  input values in plot config
🚇👌 Use non editable install in CI (closer to user how users run it)
This prevents the folloing warning when running the tests:

RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (`matplotlib.pyplot.figure`) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParam `figure.max_open_warning`). Consider using `matplotlib.pyplot.close()`.
👌 Make Config.reload lazy (only reloaded when files changed)
👌 Make Config.reload respect plot_config_context
This allows users to pass a tuple of kwarg names (exclude_from_config) that should be ignored when generating the json schema
jsnel and others added 24 commits August 21, 2024 23:59
Correcting `PlotLabelOverRideMap` -> `PlotLabelOverrideMap`
It should be Overdue not OverDue  (in OverDueDeprecationError). The word "overdue" is a single word and should not be split into "Over" and "Due" in the class name.
Makes the test more readable, more clear what the test should test and remove a lot of redundant info, and avoid ugly indentation.
🧹 Remove hard coded paths in favor of fixtures
This ensures that if matplotlib injects a newline because the label is to long to fit it still gets replaced
This ensures consistent behaviour in notebooks and scripts.
♻️ Factor out yaml string and markdown method adding into a decorator
Posix and windows have different python installation folder layouts, which caused tests fail since the correct importlib path couldn't be determined on posix systems
@jsnel jsnel force-pushed the plot_pfid_and_config branch from 3aa3f62 to 5a1b6ed Compare August 21, 2024 21:59
@jsnel jsnel force-pushed the plot_pfid_and_config branch from 5d50160 to 9734619 Compare August 21, 2024 22:00
@jsnel jsnel changed the title [WIP] ✨ Added plot_pfid (on top of wip plot-config branch) [WIP] ✨ Try out plot-config (rebased after plot_pfid) Aug 24, 2024
@s-weigand
Copy link
Member

Both PRs (#283 , #288) got merged so this can be closed

@s-weigand s-weigand closed this Aug 25, 2024
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