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

Major Code Refactor: Clean Up Parameters #39

Open
wants to merge 70 commits into
base: main
Choose a base branch
from

Conversation

jcharkow
Copy link
Collaborator

Major code refactor, organize parameters better in _config file.
Format code as dataclasses for cleaner implementation
Remove kwargs popping

first attempt incorperatro refactor_ui changes into _core

change MSPlot to dataclass and made appropriate changes

set up reliance on config (SpectrumConfig, ChromatogramConfig...)
get rid of arguments and kwargs, instead store in the class.
Makes it less confusing as to what need to call what with now for the
most part just need to call things with "self"
this makes the interface more readable when we are combining multiple
plots into a single figure. E.g. marginal plots e.g. mirror spectrum
plot
figure or axes is a class variable (dependent on backend)
plot() method does not return anything --> legends directly created from
plot
to clean up what has to be passed allow for all variables to be part of
config except for the dataframe because that is what it is called on.

working for bokeh chromatogram currrently
rename figure to canvas for consistency across backends
for bokeh since canvas is a figure object make self.fig and self.canvas
linked
having difficulties currently with tooltips
bug relative intensity was not being applied, update snapshot. also
update axis labels
found bug in the old snapshot with coloring that fixed
spectrum tests are stange so re-design them
new snapshots look reasonable so update them
update chromatogram snapshots because now it uses the linewidth argument
plotly tooltips index does not seem reproducible with the "by" column so remove this from the
chromatogram plot and update snapshots.
remove index from tooltips
manual looking and they look fine
note: had an error where when using a binning of "auto" and "sturges" or
binning of True (e.g. whenever use the pd.cut method) it seems that the
inveral object is never really gotten rid of properly and this causes an
error in plotly graphing. Could not figure out the error so switched to
using numpy
seems that previous updates were not saved? or just very minor
differences
for spectrum strangely the files produced were .json instead of .html
and this is because the plotly backend was used by mistake. Fix this by
fixing the conftest.py bug

snapshots verified manually and look good
seems that bokeh snapshots currently do not get checked correctly. Will
have to look into this.

however bokeh snapshots seem to be working as expected
update doc to reflect new config
@jcharkow jcharkow marked this pull request as ready for review December 18, 2024 17:35
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.

Bokeh LinePlot linewidth not being set properly
1 participant