Conversation
|
SonarCloud Quality Gate failed.
|
Codecov Report
@@ Coverage Diff @@
## main #869 +/- ##
=======================================
+ Coverage 86.0% 86.9% +0.8%
=======================================
Files 92 99 +7
Lines 4981 5314 +333
Branches 939 980 +41
=======================================
+ Hits 4287 4618 +331
+ Misses 547 544 -3
- Partials 147 152 +5
Continue to review full report at Codecov.
|
|
Benchmark is done. Checkout the benchmark result page. Benchmark diff v0.5.1 vs. mainParametrized benchmark signatures: BenchmarkOptimize.time_optimize(index_dependent, grouped, weight)Benchmark diff main vs. PRParametrized benchmark signatures: BenchmarkOptimize.time_optimize(index_dependent, grouped, weight) |
2ec7757 to
4589886
Compare
a95c120 to
c6576b9
Compare
|
SonarCloud Quality Gate failed.
|
3e9f55b to
0757349
Compare
|
After rebasing, please sit together @s-weigand and @joernweissenborn and try to turn one or two of the examples into a project. e.g. this one |
0757349 to
6a038f5
Compare
See https://peps.python.org/pep-3134/ (Thnx sourcery :D)
…tors 🧪 Added additional tests for generators
c08644d to
2eef676
Compare
|
Took a while but I fixed all issues I still had with this PR (we will leave the test poisoning for a different PR). @jsnel for a quick usability test in binder Save the dataset from the testing data to the file which gets imported from glotaran.io import save_dataset
from glotaran.testing.simulated_data.sequential_spectral_decay import (
DATASET as dummy_data,
)
save_dataset(dummy_data, "testdata.nc", allow_overwrite=True)Create project skeleton from glotaran.project import Project
EXAMPLE_DIR = "my_project"
EXAMPLE_DATA = "testdata.nc"
gtap = Project.open(EXAMPLE_DIR) # open a project
gtap.import_data(EXAMPLE_DATA, name="dataset_1", ignore_existing=True)
gtap.generate_model(
model_name="simple_model",
generator_name="decay_sequential",
generator_arguments={"nr_compartments": 3, "irf": True},
ignore_existing=True,
)
gtap.generate_parameters("simple_model", parameters_name="simple_params", ignore_existing=True)Edit the parameters label,value,expression,minimum,maximum,non-negative,vary,standard-error
irf.center,0.3,None,,,False,True,None
irf.width,0.1,None,,,False,True,None
rates.species_1,0.5,None,,,False,True,None
rates.species_2,0.3,None,,,False,True,None
rates.species_3,0.1,None,,,False,True,NoneOptimize the model # Note: For now, you need to open the generated models in an editor and change the starting values.
gtap.optimize(
model_name="simple_model",
parameters_name="simple_params",
maximum_number_function_evaluations=1,
result_name="simple_result",
) # optimize the model parameters
result = gtap.load_result("simple_result") # load the result
result_path = gtap.get_result_path("simple_result") # convenience for e.g. plotting@joernweissenborn I also fixed some naming consistency issues please also check my changes. |
|
lgtm, if the tests are working again |
|
Kudos, SonarCloud Quality Gate passed!
|
s-weigand
left a comment
There was a problem hiding this comment.
Should be fine to merge now











This PR adds a basic
Projectclass.The
Projectclass is intended to serve as a standard API topyglotaran.Add the moment, using
pyglotaranas a python package requires alot of imports from different sub packages. This ok because our current API is kind of a "super user" API. The nature of it is that it changes alot, which is not user friendly. On the other hand side, we now have a deprecation framework, which is very useful but slows down development.The
Projectclass mitigates this. It is designed as a user API, escpeicially with having GUIs and stuff in mind. It is meant to be a representation of the actual iterative process of global target analysis.Details
The
Projectclass as implemented in this PR is basically a kind of "API aggregator" plus a KISS principle based "database" calledProjectRegistry.It is essentially a collection of a project file plus
This folders are represented by
ProjectRegistryobjects. They work by leveraging the io plugin system andpathlib.A worwflow in looks like this:
Checklist
Closes issues
closes #XXXX