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

0.8/pydantic2 (Sourcery refactored) #1369

Closed
wants to merge 151 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
151 commits
Select commit Hold shift + click to select a range
bc97571
Implement model.item with pydantic.
joernweissenborn Dec 4, 2022
7b794f8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 5, 2022
645975d
Create model.library
joernweissenborn Dec 5, 2022
a8ab614
Redesign megacomplex and dataset model.
joernweissenborn Dec 17, 2022
bc1d869
Implemented experiment model.
joernweissenborn Dec 17, 2022
d0ea1ed
Create library from megacomplex.
joernweissenborn Jan 5, 2023
ec28457
Library create datamodels for megacomplex.
joernweissenborn Jan 5, 2023
c71721d
Add DataModel.from_dict.
joernweissenborn Jan 5, 2023
7899171
Add ExperimentModel.from_dict
joernweissenborn Jan 5, 2023
e735ada
Adapted experiment items to new item types.
joernweissenborn Jan 5, 2023
7e9c868
Add validation logic for items.
joernweissenborn Jan 5, 2023
7e77d9e
Remove old model and items.
joernweissenborn Jan 5, 2023
5c2e09e
Move dataset scale to ExperimentModel
joernweissenborn Jan 6, 2023
d464a2f
Move weight to data_model.
joernweissenborn Jan 6, 2023
c2028c9
Resolve parameters.
joernweissenborn Jan 6, 2023
93e3df3
Remove link_clp.
joernweissenborn Jan 6, 2023
a73b568
Rewrite optimization test models.
joernweissenborn Jan 6, 2023
8115364
Adapt data provider.
joernweissenborn Jan 6, 2023
ac5e915
Also resolve resolved items.
joernweissenborn Jan 7, 2023
f5a4fbe
Created OptimizationData.
joernweissenborn Jan 27, 2023
72be264
Created OptimizationMatrix
joernweissenborn Jan 28, 2023
930af5b
Added OptimizationEstimation
joernweissenborn Jan 28, 2023
41363ee
Refactored tests.
joernweissenborn Jan 29, 2023
02684d3
Added penalty
joernweissenborn Jan 29, 2023
eec2250
Create OptimizationObjective.
joernweissenborn Jan 29, 2023
f325fc7
Created Optimization
joernweissenborn Jan 29, 2023
187f5e7
Subtract number of clp from dgrees of freedom.
joernweissenborn Jan 29, 2023
a958cb0
Make parameter type optional float for handy constant.
joernweissenborn Jan 29, 2023
1eb6eeb
Finetuning.
joernweissenborn Jan 30, 2023
382a20d
Added test for OptimizationObjective
joernweissenborn Jan 30, 2023
44bca3c
Remove weights from linked data.
joernweissenborn Jan 30, 2023
a2cfb94
Refactored simulation.
joernweissenborn Jan 30, 2023
efdf6f6
Added first test for optimization.
joernweissenborn Jan 30, 2023
a368460
Added OptimnizationMatrix.from_global_data.
joernweissenborn Jan 31, 2023
a569360
Add global path to Objective.
joernweissenborn Jan 31, 2023
315d3a6
Added test for penalties.
joernweissenborn Jan 31, 2023
5186489
Added optimization test for global model.
joernweissenborn Jan 31, 2023
b61b5ec
Added test for multiple experiments.
joernweissenborn Jan 31, 2023
59efdea
Cleanup.
joernweissenborn Jan 31, 2023
4bbe690
Added model issue guard to optimization
joernweissenborn Jan 31, 2023
f4b1ffb
Added Optimization.dry_run
joernweissenborn Jan 31, 2023
a0948a4
Renamed clp_labels to clp_axis.
joernweissenborn Jan 31, 2023
f94c6c0
Tempery deactivated mypy and darglint precommit checks.
joernweissenborn Feb 1, 2023
7b48327
Added test for megacomplex result.
joernweissenborn Feb 3, 2023
4798ca0
Added Parameters.close_or_equal
joernweissenborn Feb 4, 2023
6e9a244
Fixed resolving of none library items.
joernweissenborn Feb 4, 2023
c38cdc3
Fixed result resolving of clp.
joernweissenborn Feb 4, 2023
f215a78
Fixed datamodel model dimension for None case.
joernweissenborn Feb 4, 2023
e4fa9e3
Support item iteration over Annoted types.
joernweissenborn Feb 6, 2023
b14778b
Make OptimizationResult pydantic model
joernweissenborn Feb 7, 2023
14edfed
Created Activation item
joernweissenborn Jan 30, 2023
53e7877
Add item Kinetic.
joernweissenborn Feb 1, 2023
dc6bcf1
Add KineticMegacomplex
joernweissenborn Feb 1, 2023
ea20504
Refactored if parameter calculation.
joernweissenborn Feb 3, 2023
1d3dc7a
Refactored kinetic megacomplex calculation.
joernweissenborn Feb 3, 2023
7dad053
Ported tests from k matrix to kinetic item.
joernweissenborn Feb 3, 2023
d4bdeda
Added tests for gaussian action.
joernweissenborn Feb 3, 2023
d7d0f41
Added test for kinetic megacomplex
joernweissenborn Feb 4, 2023
b76d581
Adapted baseline megacomplex
joernweissenborn Feb 4, 2023
28dae9a
Adapted clp guide megacomplex
joernweissenborn Feb 4, 2023
6e947e6
Adapted coherent artifact.
joernweissenborn Feb 4, 2023
8c94431
Adapdet damped oscillation megacomplex
joernweissenborn Feb 6, 2023
7f2f45b
Adapted spectral megacomplex.
joernweissenborn Feb 6, 2023
3963a72
Add resultdata for kinetic megacomplex.
joernweissenborn Feb 6, 2023
a2359f3
Removed decay megacomplex
joernweissenborn Feb 6, 2023
0f9df73
Added register_as to megacomplexes
joernweissenborn Feb 6, 2023
ac512c5
Created basic new scheme.
joernweissenborn Feb 6, 2023
20772e5
Add new result class.
joernweissenborn Feb 7, 2023
10a7463
Changend name of experiment.validate to avoid pydantiv conflict
joernweissenborn Feb 7, 2023
2b0fe3a
Added basic test for scheme.
joernweissenborn Feb 7, 2023
682369d
Remove old scheme and result.
joernweissenborn Feb 7, 2023
564e5c8
Removed model related things from plugin and io.
joernweissenborn Feb 8, 2023
6f83257
Remove folder plugin.
joernweissenborn Feb 8, 2023
7703c33
Cleanded Model from YML io.
joernweissenborn Feb 8, 2023
b02c28f
Reimplemented load_scheme.
joernweissenborn Feb 8, 2023
789d51b
Fix activation.
joernweissenborn Feb 8, 2023
bf2619c
Fix baseline register
joernweissenborn Feb 8, 2023
2b9bd27
Fix kinetic megacomplex
joernweissenborn Feb 8, 2023
d70e8ca
Fix OptimizationMatrix
joernweissenborn Feb 8, 2023
3f4da66
Fix scheme
joernweissenborn Feb 8, 2023
1523450
Merge Kinetic part with megacomplex.
joernweissenborn Feb 8, 2023
ea593b4
Remove library.
joernweissenborn Feb 9, 2023
44970c0
Remove OptimizationGroup
joernweissenborn Feb 10, 2023
815134d
Renamed megacomplex to model.
joernweissenborn Feb 10, 2023
968a42b
Adapted optimization to latest changes.
joernweissenborn Feb 10, 2023
290d42f
Rename megacomplex plugins to models.
joernweissenborn Feb 10, 2023
7182330
Adapted scheme test.
joernweissenborn Feb 10, 2023
8e00bc2
Removed obsolete yml tests.
joernweissenborn Feb 10, 2023
93b0d1c
Make scheme library use get_annotated_type
joernweissenborn Feb 10, 2023
b0e002f
Enable per activation coherent_artifact
joernweissenborn Feb 11, 2023
d9d67e5
Rename model to element.
joernweissenborn Feb 17, 2023
a41ae90
Made scheme experiments dict.
joernweissenborn Feb 17, 2023
bcb9a9f
Create Result.save
joernweissenborn Feb 17, 2023
561b512
Updated nix flake.
joernweissenborn Aug 18, 2023
5de6cdc
Added ExtendableElement.
joernweissenborn Sep 1, 2023
a7eb023
Cleanup.
joernweissenborn Sep 1, 2023
75f2d08
Made kinetic element extendable
joernweissenborn Sep 1, 2023
be7a8d4
Remove generators,
joernweissenborn Sep 1, 2023
4659901
Remove dataclass helpers.
joernweissenborn Sep 1, 2023
a2b41e8
Remove project.
joernweissenborn Sep 1, 2023
1fadbab
Remove benchmark.
joernweissenborn Sep 1, 2023
deb8243
Remove cli.
joernweissenborn Sep 1, 2023
04b2fca
Fixed flake init.
joernweissenborn Sep 30, 2023
4b62a7a
Adapted test for full model.
joernweissenborn Sep 30, 2023
ccd95c1
Adapt simulated data.
joernweissenborn Oct 1, 2023
1c4e05a
Cleanup.
joernweissenborn Oct 1, 2023
c930100
More cleanup.
joernweissenborn Oct 1, 2023
f9bb72e
Add test for Result.save
joernweissenborn Oct 6, 2023
72a0ab5
Fix simulation test.
joernweissenborn Oct 6, 2023
b2e2df4
Update flake.
joernweissenborn Oct 6, 2023
92bfb7e
Fix typing of ArrayLike.
joernweissenborn Oct 6, 2023
8c9e83f
Change element scale to dict.
joernweissenborn Oct 14, 2023
9de1f78
Add parameters from expressions tp initial parameters.
joernweissenborn Oct 14, 2023
62fae03
Add fitted data to result.
joernweissenborn Oct 14, 2023
0e74f1e
Fixed mypy override issues.
joernweissenborn Oct 14, 2023
0480f2d
Fix pydantic-field mypy errors.
joernweissenborn Oct 14, 2023
31d24f7
Fixed damped oscillation issues.
joernweissenborn Oct 14, 2023
b2cb780
Fix datamodel creation.
joernweissenborn Oct 14, 2023
3e73ce5
Fix get parameter dependencies.
joernweissenborn Oct 14, 2023
2f96fb8
Fix mypy errors in coherent-artifact.
joernweissenborn Oct 14, 2023
ad3bfc6
Add scale to result data.
joernweissenborn Oct 14, 2023
54c0519
Fixed mypy issues in kinetic element.
joernweissenborn Oct 14, 2023
7eebb3f
Fixed mypy errors in activation.
joernweissenborn Oct 14, 2023
0b42fb3
Fixed mypy issues in spectral.
joernweissenborn Oct 14, 2023
cd5d83b
Small fixes.
joernweissenborn Oct 14, 2023
18f5930
Cleanup yml io.
joernweissenborn Oct 14, 2023
6b560ee
Fix project mypy issues.
joernweissenborn Oct 14, 2023
b2881fd
Fix mypy errors in optimization.
joernweissenborn Oct 14, 2023
c648185
Fix mypy issues for model.
joernweissenborn Oct 14, 2023
cf66ce6
Final mypy fixes.
jsnel Oct 14, 2023
c58222d
Precommit fixes.
joernweissenborn Oct 14, 2023
6b1b751
Add allow_overwrite to Result.save.
joernweissenborn Oct 14, 2023
1aa3d6a
Fix bug with nested extensions.
joernweissenborn Oct 15, 2023
a2211d6
Fix clp constraints (#1366)
jsnel Oct 17, 2023
9f62fbe
Autoconvert to pydantic 2.
joernweissenborn Oct 17, 2023
142c23b
Replace missing clasing with any.
joernweissenborn Oct 17, 2023
211988d
Adapted typing for pydantic 2.
joernweissenborn Oct 17, 2023
d671497
Check if Factory is needed
jsnel Oct 17, 2023
1d86119
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 17, 2023
cf167a7
🩹 Fix assignment of literal type to type attribute
s-weigand Oct 19, 2023
99e74be
🩹 Use RootModel instead of BaseModel and __root__
s-weigand Oct 20, 2023
4cf056d
🩹 Replace deprecated parse_obj with model_validate
s-weigand Oct 20, 2023
5b52160
🩹 Fix accessing of element data_model_type
s-weigand Oct 20, 2023
c2465ca
🩹 Undefined -> PydanticUndefined
s-weigand Oct 20, 2023
143a9bf
🩹 Adjust to removal of ModelField
s-weigand Oct 20, 2023
2d96f5d
🧪🩹 Adapt to schema changes
s-weigand Oct 20, 2023
53220c0
🧪🩹 Fix pydantic validation error in test
s-weigand Oct 20, 2023
be3f0c3
🧪🩹 Fix definition MockElementWithDataModel.data_model_type
s-weigand Oct 20, 2023
792bfb2
🧹 Replace .dict with .model_dump
s-weigand Oct 20, 2023
ac85e89
🧹 Replace .copy with .model_copy
s-weigand Oct 20, 2023
cb2e2c2
'Refactored by Sourcery'
Oct 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@ LICENSE @glotaran/pyglotaran_creators
# /docs/**/*.md @glotaran/maintainers @glotaran/pyglotaran_creators

# analysis module:
/glotaran/analysis/ @jsnel @joernweissenborn
# /glotaran/analysis/ @jsnel @joernweissenborn

# builtin module:
/glotaran/builtin/io/* @glotaran/admins
/glotaran/builtin/io/ascii @jsnel @glotaran/maintainers
/glotaran/builtin/io/pandas @glotaran/maintainers
/glotaran/builtin/io/netCDF @glotaran/maintainers
/glotaran/builtin/io/sdt @glotaran/maintainers
/glotaran/builtin/megacomplexes/ @jsnel @joernweissenborn
# /glotaran/builtin/megacomplexes/ @jsnel @joernweissenborn

# cli
/glotaran/cli/ @jsnel @glotaran/admins
# cli (deprecated)
# /glotaran/cli/ @jsnel @glotaran/admins

# examples # Removed in PR #866
# /glotaran/examples/ @jsnel @glotaran/maintainers
Expand Down
63 changes: 32 additions & 31 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ default_language_version:
repos:
# Formatters
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-ast
- id: check-builtin-literals
Expand All @@ -19,7 +19,7 @@ repos:
args: [--remove]

- repo: https://github.com/asottile/pyupgrade
rev: v3.10.1
rev: v3.15.0
hooks:
- id: pyupgrade
types: [file]
Expand All @@ -36,7 +36,7 @@ repos:
types_or: [python, pyi]

- repo: https://github.com/psf/black
rev: 23.7.0
rev: 23.9.1
hooks:
- id: black
types: [file]
Expand All @@ -52,7 +52,7 @@ repos:
minimum_pre_commit_version: 2.9.0

- repo: https://github.com/asottile/setup-cfg-fmt
rev: v2.4.0
rev: v2.5.0
hooks:
- id: setup-cfg-fmt
args: [--include-version-classifiers]
Expand Down Expand Up @@ -103,24 +103,24 @@ repos:
args:
- "--count"

- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
alias: flake8-docs
args:
- "--select=D,DAR"
- "--count"
name: "flake8 lint docstrings"
exclude: "docs|setup.py|tests?/|glotaran/builtin/megacomplexes|glotaran/cli|benchmark|glotaran/builtin/io/ascii"
additional_dependencies: [flake8-docstrings, darglint==1.8.0]
# - repo: https://github.com/PyCQA/flake8
# rev: 6.0.0
# hooks:
# - id: flake8
# alias: flake8-docs
# args:
# - "--select=D,DAR"
# - "--count"
# name: "flake8 lint docstrings"
# exclude: "docs|setup.py|tests?/|glotaran/builtin/megacomplexes|glotaran/cli|benchmark|glotaran/builtin/io/ascii"
# additional_dependencies: [flake8-docstrings, darglint==1.8.0]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
rev: v1.6.0
hooks:
- id: mypy
exclude: "docs|benchmark/|.*/tests?/.*"
additional_dependencies: [types-all, types-attrs]
additional_dependencies: [types-all, types-attrs, pydantic]

- repo: https://github.com/econchick/interrogate
rev: 1.5.0
Expand All @@ -131,28 +131,29 @@ repos:
additional_dependencies: [click<8]

- repo: https://github.com/rstcheck/rstcheck
rev: "v6.1.2"
rev: "v6.2.0"
hooks:
- id: rstcheck
additional_dependencies: [sphinx]
exclude: "^docs/source/_templates"

- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: rst-backticks
- id: python-check-blanket-noqa
exclude: "docs|tests?"
- id: python-check-blanket-type-ignore
exclude: "docs|tests?"
- id: python-use-type-annotations
- id: rst-directive-colons
- id: rst-inline-touching-normal
# - repo: https://github.com/pre-commit/pygrep-hooks
# rev: v1.10.0
# hooks:
# - id: rst-backticks
# - id: python-check-blanket-noqa
# exclude: "docs|tests?"
# - id: python-check-blanket-type-ignore
# exclude: "docs|tests?"
# - id: python-use-type-annotations
# - id: rst-directive-colons
# - id: rst-inline-touching-normal

- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
rev: v2.2.6
hooks:
- id: codespell
types: [file]
types_or: [python, pyi, markdown, rst, jupyter]
args: [-L doas]
args:
- --ignore-words-list=glotaran,doas,projectio
160 changes: 0 additions & 160 deletions benchmark/asv.conf.json

This file was deleted.

1 change: 0 additions & 1 deletion benchmark/benchmarks/__init__.py

This file was deleted.

59 changes: 0 additions & 59 deletions benchmark/benchmarks/integration/ex_two_datasets/benchmark.py

This file was deleted.

Loading
Loading