Closed
Conversation
…otaran.model (#734) * Changed calculate_matrix function to return xarrays * Added relation and constraint to basemodel * Added functions to apply relations and constraints * Removed LabelAndMatrix class * Added relations and constraints tests to base model * Added penalties to base model * Adapted models to changes * Address xarray deprecation warnings Fixed DeprecationWarning: Using a DataArray object to construct a variable is ambiguous, please extract the data using the .data property. This will raise a TypeError in 0.19.0. Co-authored-by: Jörn Weißenborn <joern.weissenborn@gmail.com> Co-authored-by: Joris Snellenburg <jsnel@users.noreply.github.com>
* 🔧 Allowed mypy to run on a subset of glotaran modules that will be checked are: - utils - plugin_system - deprecation * 🔧 Partially activated docstring QA tools and fixed issues modules that will be checked are: - utils - plugin_system - deprecation
This PR removes models like kinetic-image in favor of independent megacomplex model. Therefor, there are a lot of internal changes. Key Changes for users: * use `default-megacomplex` instead of `model-type` in yml spec * simulations can now be done by setting `global_megacomplex` in a dataset model * heterogenous dataset models can be analyzed in one optimization, e.g. a spectral and a temporal dataset * the user now needs to set `group=true` in a scheme to have a grouped analysis.
* Added benchmark for Problem class * removed print * ♻️ 'Refactored by Sourcery' * 🧹 Moved glotaran/analysis/test/test_relations.py to benchmark/pytest/analysis/test_problem.py Use 'pytest benchmark/pytest/' to run the benchmarks * Numerous performance tweaks * Don't weight data with ones if no weight supplied * Fic duplicate call to create result_dataset * Removed dead code * Switched back to pure numpy in problem * Fixed example * Cleanunp * Update glotaran/analysis/problem_ungrouped.py Co-authored-by: Sebastian Weigand <s.weigand.phy@gmail.com> * Update glotaran/analysis/problem_ungrouped.py Co-authored-by: Sebastian Weigand <s.weigand.phy@gmail.com> * Update glotaran/analysis/util.py Co-authored-by: Sebastian Weigand <s.weigand.phy@gmail.com> Co-authored-by: Sourcery AI <> Co-authored-by: s-weigand <s.weigand.phy@gmail.com>
* Added Full Model functionality (also known as spectrotemporal models) * Added finalizing functions for full models and changed spectral decay test to full model test * Added flake8-print to precommit * Fixed parameter history and set correct optizemet parameter prior to resultdata creation * Don't apply clp relations and constraints on full models * Added auto inference of grouping * Update glotaran/test/test_spectral_decay_full_model.py * Correction of cost calculation Co-authored-by: Joris Snellenburg <jsnel@users.noreply.github.com> Co-authored-by: Sebastian Weigand <s.weigand.phy@gmail.com>
* Small fix for baseline megacomplex * Save baseline as name 'baseline'
* Added SpectralShapeGaussian. * Replaced property energy_spectrum of SpectralMegacomplex with invert and axis_scale. * Made invert and axis_scale dataset properties. * Added guard and meaningful exception message for spectral skewness * Fixed scaling * Made SpectralShapeSkewedGaussian decendent of SpectralShapeGaussian and added fallback for skewness == 0. * Move sanatize.py to utils module and correct typo sanatize -> sanitize (incl rename to sanitize.py) * Move regex patterns to seperate module in utils * Add sanity_scientific_notation_conversion Convert scientific notation string (e.g. 1E7) to proper floats * Fixed spectral megacomplex test parameters and added test for inverted axis * Removed model_item._from_list * Added convenience in model_item.from_dict for automatically convert float or int typed properties which are parsed as strings. * Made amplitude of shape optional Co-authored-by: Joris Snellenburg <jsnel@users.noreply.github.com>
Various fixes and improvements to the glotaran command line interface. * Changed CLI save plugin to folder * Added outputformat option to CLI * Added basic test for CLI * Rename CLI entrypoint to main and add more CLI tests * 👌 CLI use same default for non_negative_least_squares as scheme * 👌 CLI dedent pluginlist output * 🩹 CLI fixed result outformat accepting none supported formats Co-authored-by: Joris Snellenburg <jsnel@users.noreply.github.com> Co-authored-by: s-weigand <s.weigand.phy@gmail.com>
* ✨ Added 'deprecate_dict_entry' to deprecate dict keys and/or values * 🧹📚 Changed Warns OverDueDeprecation to Raises and added missing Raises OverDueDeprecation to deprecate_module_attribute and deprecate_submodule * 🩹🧪 Reimplemented check_deprecations and with deprecate_dict_entry and renamed it to 'model_spec_deprecations' This change also ensures that the deprecation warning is thrown when users calls 'load_model' so python will show the warning * ♻️🧪 Changed deprecation_warning_on_call_test_helper to test for file emitting the warning and return the WarningsRecorder * 📚 Added docs for deprecate_dict_entry * 🧹 Removed unused record variables * 🧪 Added test for deprecated 'spectral_constraints' * 👌 Changed DeprecationWarning to GlotaranApiDeprecationWarning (GlotaranApiDeprecationWarning is a subclass of UserWarning so it won't be filtered automatically by python) * 📚 Updated docs to reflect the usage of GlotaranApiDeprecationWarning
If the feature/projects PR had been merged into staging targeting the commit it was rebased onto at the time: d2b297b
Contributor
Contributor
Sourcery Code Quality Report✅ Merging this PR will increase code quality in the affected files by 0.66%.
Here are some functions in these files that still need a tune-up:
Legend and ExplanationThe emojis denote the absolute quality of the code:
The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request. Please see our documentation here for details on how these metrics are calculated. We are actively working on this report - lots more documentation and extra metrics to come! Help us improve this quality report! |
|
Kudos, SonarCloud Quality Gate passed!
|
Member
Author
|
This was an experimental PR which has been superseded by a number of other smaller PRs: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.








Analysis of feature/projects had it been merged into staging targeting the commit it branched off from