Skip to content

feat: improve load_partial with base_path argument #391

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

s3bc40
Copy link

@s3bc40 s3bc40 commented Mar 27, 2025

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 moccasin
compile_ 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 like no_vvm and base_path. And I also modified loads_partial to accept base_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

  • Add **kwargs argument to load_partial function
  • Add base_path argument to loads_partial function and set it for _loads_partial_vvm
  • Update docs/api/load_contracts.md
  • Fix CONTRIBUTING.md spelling error
    • Install prod requirements (in the pyproject.tom) -> Install prod requirements (in the pyproject.toml)

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

- Add ``**kwargs`` argument to load_partial function
- Add ``base_path`` argument to loads_partial function and set it for ``_loads_partial_vvm``
- Update docs/api/load_contracts.md
- Fix CONTRIBUTING.md seplling error
    - ``Install prod requirements (in the pyproject.tom)`` -> ``Install prod requirements (in the pyproject.toml)``
@s3bc40
Copy link
Author

s3bc40 commented Mar 27, 2025

Draft the PR since the issue might be more complex to make VVM vyper to take into account the mox lib path system.

from snekmate.auth import ownable as ow # does not work in VVM
from lib.pypi.snekmate.auth import ownable as ow # it works

Maybe something to do in the VVM project or Mox side...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant