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

Deploy command #173

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

Deploy command #173

wants to merge 6 commits into from

Conversation

bboynton97
Copy link
Contributor

📥 Pull Request

This PR creates a new CLI command that zips the user's code and uploads it to their AgentStack.sh account to be built and deployed.

@bboynton97 bboynton97 marked this pull request as draft December 30, 2024 19:21


def deploy():
bearer_token = get_stored_token()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

add a deploy stub to /cli that manages the CLI interaction and logging, then use the deploy function from this file

files = list(Path('.').rglob('*.py'))

with tempfile.NamedTemporaryFile(suffix='.zip') as tmp:
with zipfile.ZipFile(tmp.name, 'w') as zf:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Might be worth just building the project into a whl (which is essentially a zip file) since we already have a pyproject.toml file available in user projects (pip build). pip install user-project.whl after uploading it will install dependencies, too.

https://packaging.python.org/en/latest/tutorials/packaging-projects/#generating-distribution-archives

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