feat: improve load_partial with base_path argument #391
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.
What I did
Related issue #389
The idea is to have access to the base_path in
interpret.load_partial()
to add it to_load_partial_vvm
. So that moccasincompile_
function can specify the base path of its contract without breaking the import system with VVM.How I did it
I changed the methods signatures by adding
**kwargs
to allow other arguments likeno_vvm
andbase_path
. And I also modifiedloads_partial
to acceptbase_path
. I also updated the corresponding doc and fixed an error in the contribution file.How to verify it
I have run
pytest tests/unitary -x
without an issue but maybe it needs another level of verification.Description for the changelog
**kwargs
argument to load_partial functionbase_path
argument to loads_partial function and set it for_loads_partial_vvm
Install prod requirements (in the pyproject.tom)
->Install prod requirements (in the pyproject.toml)
Cute Animal Picture