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

refactor: use manifest project #47

Merged
merged 6 commits into from
Sep 24, 2024
Merged

Conversation

antazoey
Copy link
Member

What I did

This code is a good candidate for Ape's 0.8's manifest-based project

How I did it

How to verify it

run:

uvicorn main:app

then run

ape run client

not sure why i cant get tests to run

Checklist

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

main.py Outdated Show resolved Hide resolved
@antazoey
Copy link
Member Author

I verified the tests still pass
(they don't run in CI yet)

main.py Show resolved Hide resolved
@@ -178,19 +178,11 @@ async def compile_project(project_root: Path, manifest: PackageManifest):
# Create a contracts directory
contracts_dir = project_root / "contracts"
contracts_dir.mkdir()
project = Project.from_manifest(manifest)
Copy link
Member Author

@antazoey antazoey Sep 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw when it comes time to add the dependencies, you can do it like this:

project = Project.from_manifest(manifest, config_override={"dependencies": [{"pypi": "snekmate"}]})

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can config_override accept a list of DependencyAPI objects? that's how I was thinking to parse the incoming dependency specifications

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think you can pass in objects as well but you dont have to: itll validate them if you use raw dicts

@antazoey antazoey merged commit af9b6ce into main Sep 24, 2024
1 check passed
@antazoey antazoey deleted the refactor/use-manifest-project branch September 24, 2024 19:35
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