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

dev experience tweaks #138

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

dev experience tweaks #138

wants to merge 3 commits into from

Conversation

sestinj
Copy link

@sestinj sestinj commented Aug 15, 2023

Hi there! Was playing around with smol-dev (thinking of integrating with Continue soon : )) and came across a few bumps when setting up, so figured I might just share the changes I made for myself. Open to leaving out anything that you think doesn't belong, but here's what I edited:

  • Add dependency for python-dotenv and use to load OPENAI_API_KEY env variable. Then in prompts.py added call to load_dotenv and set openai.api_key explicitly
  • README: Replace python with python3, because there is a dependency on python3 anyway so being specific can't hurt. In my case on Mac, python3 works but python does not.
  • README: Add step to activate the virtual environment with poetry shell (otherwise following the exact steps listed in "In Git Repo Mode" doesn't work)
  • README: Add note to update .example.env and move to .env
  • README: Add note about debugging in VS Code
  • VS Code debugging pre-configuration: launch.json specifies how to debug main.py, and is setup to automatically make sure poetry install has been run prior (via tasks.json). And settings.json sets the default python interpreter to be the one from poetry.
  • Added python requirement for >=3.9, <4.0 because otherwise errors are thrown when using poetry add due to requirements of other depended upon packages (see error msg below)

*It's notable that I removed .vscode from the .gitignore, which means that someone with a prior settings.json mighta accidentally commit that if they don't notice, but there would first be merge conflicts to warn them and this file isn't meant to be secret, so should be okay.

If this is a lot for one PR let me know, happy to leave things out or split them up!


Error when trying poetry add prior to changing the python requirement

The current project's Python requirement (>=3.8) is not compatible with some of the required packages Python requirement:
  - agent-protocol requires Python >=3.7,<4.0.0, so it will not be satisfied for Python >=4.0.0
  - agent-protocol requires Python >=3.7,<4.0.0, so it will not be satisfied for Python >=4.0.0

Because no versions of agent-protocol match >0.2.3,<0.2.4 || >0.2.4,<0.3.0
 and agent-protocol (0.2.4) requires Python >=3.7,<4.0.0, agent-protocol is forbidden.
So, because agent-protocol (0.2.3) requires Python >=3.7,<4.0.0
 and smol-dev depends on agent-protocol (^0.2.3), version solving failed.

  • Check your dependencies Python requirement: The Python requirement can be specified via the `python` or `markers` properties
    
    For agent-protocol, a possible solution would be to set the `python` property to ">=3.8,<4.0.0"
    For agent-protocol, a possible solution would be to set the `python` property to ">=3.8,<4.0.0"

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.

1 participant