-
Notifications
You must be signed in to change notification settings - Fork 1
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
Adding a mechanism to regenerate expected values #35
Open
mmesiti
wants to merge
9
commits into
NilsNiggemann:master
Choose a base branch
from
mmesiti:exp-val-regen-tools
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
The output values computed in the tests, and compared to the expected results, can be regenerated by setting the environment variable "PMFRG_REGEN_EXPECTED_RESULTS" to any value when running the tests.
and some tests for readme
- Missing `using Pkg` at the beginning now added - Using type instead of value when creating new methods for example_Obs
mmesiti
force-pushed
the
exp-val-regen-tools
branch
from
October 30, 2024 10:02
562e86f
to
f5b2b86
Compare
The project/deps objects that are created at the beginning of the automatically generated ExampleObservable.jl file belong to the Pkg API which is not very stable, so if they are read by different julia version they might let to a crash of the test suite. The representation of the proj/deps objects has been sandwiched in an if statement that allows the objects to be created only if the julia VERSION is the one used when generating the values. Also, the code has been refactored in smaller functions.
projec/deps objects not create any more in ExampleObservables.jl, since the Pkg API is unstable. Making a copy of the Manifest to be stored alongside ExampleObservables.jl.
Some methods were defined twice because the regenerated file was not cleaned before re-running the test suite. Also, minor tweaks for readability and to the documentation (including tests)
mmesiti
force-pushed
the
exp-val-regen-tools
branch
from
November 8, 2024 21:13
11bf23d
to
a779e5a
Compare
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.
From #34 :
Creating this PR for feedback.
Notable things:
(quasi-)drop-in replacement ofExampleObservables.jl
, that contains:information about the packages and their dependencies (dumped fromPkg.project()
andPkg.dependencies()
) (a bit overkill, perhaps, but part of the dump is surely useful)git hash-object Manifest.toml
)example_Obs
that has been called during the test run.at the moment the versions are pinned to the known working ones with[compat]
.Things done:
format()
on it (see last commit)[compat]
constraintsThings still to do, possibly:
perhaps clean the dump ofNo, usingPkg.project()
andPkg.dependencies()
?Pkg.project()
andPkg.dependencies()
is actually a bad idea because the Pkg API is not stable and can break between Julia versions.Manifest.toml
is a better tool for the job, because it allow format changes (there's amanifest_format
field for the version for this).JuliaFormatter
as yet another dependency in the[extras]
- unless you are against it.This PR does the following:
[compat]
constraints fromProject.toml
and updates the expected values.