Skip to content
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

feat: Add --code option to ape console #2370

Merged
merged 6 commits into from
Nov 4, 2024

Conversation

antazoey
Copy link
Member

@antazoey antazoey commented Nov 1, 2024

What I did

-c | --code option for ape console for executing programs from strings similar to python -c

Hey - this is a cool thing I made. It is helping me currently test the performance of some Ape-isms as I work to improve the speed of the framework but also think it is worth sharing with the rest of the world.

How I did it

Using cool IPython stuff!

How to verify it

ape console -c 'project.name'
Out[1]: 'my-project'
ape console -c 'x = 3\nx + 1'
Out[1]: 4
ape console -c 'networks.active_provider.name'
Out[1]: 'test'

Checklist

  • All changes are completed
  • New test cases have been added
  • Documentation has been updated

@antazoey antazoey marked this pull request as draft November 1, 2024 21:50
@antazoey antazoey marked this pull request as ready for review November 1, 2024 22:20
fubuloubu
fubuloubu previously approved these changes Nov 1, 2024
@antazoey antazoey merged commit 75e0d8e into ApeWorX:main Nov 4, 2024
16 checks passed
@antazoey antazoey deleted the feat/console-code branch November 4, 2024 13:38
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.

2 participants