Remove old configuration and constants systems#1129
Merged
Conversation
…ttps://github.com/ImperialCollegeLondon/virtual_rainforest into 1091-remove-old-configuration-and-constants-systems
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1129 +/- ##
===========================================
+ Coverage 87.74% 94.39% +6.65%
===========================================
Files 90 78 -12
Lines 7803 7035 -768
===========================================
- Hits 6847 6641 -206
+ Misses 956 394 -562 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
sallymatson
reviewed
Nov 4, 2025
| {name = "Jacob Cook", email = "j.cook17@imperial.ac.uk"}, | ||
| {name = "Vivienne Groner", email = "v.groner@imperial.ac.uk"}, | ||
| {name = "Taran Rallings", email = "t.rallings@imperial.ac.uk"}, | ||
| {name = "Sally Matson", email = "sally.matson21@imperial.ac.uk"}, |
sallymatson
reviewed
Nov 4, 2025
| Data compilation | ||
| ~~~~~~~~~~~~~~~~ | ||
|
|
||
| The :meth:`_compile_data` method is then run to compile the different individual |
sallymatson
approved these changes
Nov 4, 2025
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.
Description
This PR:
Then there's some stuff with getting rid of the old configuration system:
The
variables.pyfile also used JSON Schema in loading and validating thevariables.tomlfile. I've replaced that with pydantic validators and remove thejsonschemapackage from the project. There is a lot of overlap between the new pydantic loader classes for variables and the existingVariabledataclass, but for the moment I've kept them separate. The issue will be how to handle thepost_initattributes if we move to a single pydantic class.Fixes #1091
Type of change
Key checklist
pre-commitchecks:$ pre-commit run -a$ poetry run pytestFurther checks