-
Notifications
You must be signed in to change notification settings - Fork 5
Beaker & PyTeal deprecation #34
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
Conversation
@CiottiGiorgio i'd suggest holding this off until #33 is merged. PR will align examples with examples available on ts generator, the remaining steps on this pr would just imply fixing some merge conflicts (replacing non puya with puya). |
Thank you for heads up. |
# Conflicts: # examples/__main__.py # examples/helloworld/application.json # examples/helloworld/helloworld.py # examples/lifecycle/application.json # examples/lifecycle/lifecycle.py # examples/minimal/application.json # examples/minimal/minimal.py # examples/smart_contracts/artifacts/hello_world/hello_world_client.py # examples/smart_contracts/artifacts/lifecycle/lifecycle_client.py # examples/smart_contracts/artifacts/minimal/minimal_client.py # examples/smart_contracts/artifacts/state/state_client.py # examples/state/application.json # examples/state/state.py # examples/tests/test_hello_world_client.py # examples/tests/test_lifecycle_client.py # examples/tests/test_minimal_client.py # examples/tests/test_state_client.py # examples/tests/test_voting_client.py # examples/voting/application.json # examples/voting/client.py # examples/voting/voting.py # poetry.lock # pyproject.toml # scripts/update_approvals.py # tests/test_generator.py
# Conflicts: # examples/helloworld/test_client.py # examples/lifecycle/test_client.py # examples/smart_contracts/artifacts/hello_world/hello_world_client.py # examples/smart_contracts/artifacts/lifecycle/lifecycle_client.py # examples/smart_contracts/artifacts/minimal/minimal_client.py # examples/smart_contracts/artifacts/state/state_client.py # examples/state/test_client.py # examples/voting/client.py # examples/voting/test_client.py # poetry.lock # pyproject.toml # scripts/update_approvals.py # tests/test_generator.py
# Conflicts: # examples/smart_contracts/artifacts/hello_world/hello_world_client.py # examples/smart_contracts/artifacts/lifecycle/lifecycle_client.py # examples/smart_contracts/artifacts/minimal/minimal_client.py # examples/smart_contracts/artifacts/state/state_client.py # examples/tests/test_lifecycle_client.py # examples/voting/client.py # poetry.lock # pyproject.toml
@aorumbayev I noticed how the dev dependency for the latest compiler and algopy language bumped Python to 3.12. |
@CiottiGiorgio good point will double check in an hour or so if it's an issue (intent was likely to bump it only on dev dependencies) |
This happened on my side when I installed puya and algopy on this branch as dev deps. Looking forward to know if this causes issues but I'll look more into having two python version requirements for dev group and main group. |
50415f7
to
d3ecdf4
Compare
Coverage Report
|
…use it was manually recompiled with a version of puya that contains the bugfix
This PR is waiting for this fix (algorandfoundation/puya#389) to make it into a release of puya because at the moment the state contract is manually recompiled using a nightly release. |
pyproject.toml
Outdated
setuptools = "^75.8.0" | ||
pytest-sugar = "^1.0.0" | ||
inflection = "^0.5.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@CiottiGiorgio do you really need an whole dependency for a single to camel case use case? Also looks like the dependency is not actively maintained https://github.com/jpvanhal/inflection (no commits since 2020)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@CiottiGiorgio see utils.py file in src, there are various formatters and sanitizers you can reuse, for instance you can make to_camel_case by reusing the to_pascal_case method and making first char lowercase?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def to_camel_case(value: str) -> str:
pascal_case = to_pascal_case(value)
return pascal_case[0].lower() + pascal_case[1:]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch
Review comments and bugfixes are addressed. Ready for a last pass of review if necessary |
This PR consists of replacing the smart contracts in the
examples
folder with new ones written in Algorand Python.