Skip to content

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