OpenAdaptAI / OpenAdapt

Open Source Generative Process Automation (i.e. Generative RPA). AI-First Process Automation with Large ([Language (LLMs) / Action (LAMs) / Multimodal (LMMs)] / Visual Language (VLMs)) Models
https://www.OpenAdapt.AI
MIT License
975 stars 134 forks source link

Document pyenv #508

Open abrichr opened 1 year ago

abrichr commented 1 year ago

Feature request

If the user doesn't have the required Python version already installed (e.g. Python 3.10 at time of writing), poetry install will fail.

We would like to document the steps required in this case.

According to https://python-poetry.org/docs/managing-environments/ Poetry is compatible with pyenv:

https://github.com/pyenv/pyenv#getting-pyenv

Motivation

Ease of use for users without the required Python version installed.

Checklist - [X] Modify `README.md` ✓ https://github.com/OpenAdaptAI/OpenAdapt/commit/9385bce62d35c94126f88c7eb6776b6276d2dbb2 - [X] Check `README.md` ✗ - [X] Modify `README.md` ✓ https://github.com/OpenAdaptAI/OpenAdapt/commit/daed95e2c896debbb7f1df42b7089510e805e851 - [X] Check `README.md` ✗ - [X] Modify `README.md` ✓ https://github.com/OpenAdaptAI/OpenAdapt/commit/7e1b66ca5435ee8b3d525f382235109bf2dc3e4b - [X] Check `README.md` ✗ - [X] Modify `README.md` ! No changes made - [X] Check `README.md` ✗ - [X] Check `README.md` ✗ - [X] Check `README.md` ✗ ![Flowchart](http://24.199.78.105:8082/public/7cfb0744f51ec0e2cf8c0cf17de8dc63a2dd3bf619e151bb44bca586ec8ca3e6_508_flowchart.svg)
sweep-ai[bot] commented 1 year ago

Here's the PR! https://github.com/OpenAdaptAI/OpenAdapt/pull/517.

Sweep Basic Tier: I'm using GPT-4. You have 5 GPT-4 tickets left for the month and 3 for the day.

For more GPT-4 tickets, visit our payment portal. For a one week free trial, try Sweep Pro (unlimited GPT-4 tickets).

Actions (click)

Sandbox Execution ✓

Here are the sandbox execution logs prior to making any changes:

Sandbox logs for 5708256
pre-commit install 1/6 ✓
pre-commit installed at .git/hooks/pre-commit
trunk init 2/6 ✓
⡿ Downloading Trunk 1.17.2...
⡿ Downloading Trunk 1.17.2...
⢿ Downloading Trunk 1.17.2...
⣻ Downloading Trunk 1.17.2...
⣽ Downloading Trunk 1.17.2...
⣾ Downloading Trunk 1.17.2...
⣷ Downloading Trunk 1.17.2...
✔ Downloading Trunk 1.17.2... done
⡿ Verifying Trunk sha256...
✔ Verifying Trunk sha256... done
⡿ Unpacking Trunk...
✔ Unpacking Trunk... done

✔ 18 linters were enabled (.trunk/trunk.yaml)
  actionlint 1.6.26 (2 github-workflow files)
  bandit 1.7.5 (75 python files)
  black 23.9.1 (75 python files)
  checkov 3.0.32 (8 yaml files)
  flake8 6.1.0 (75 python files)
  git-diff-check (111 files)
  isort 5.12.0 (75 python files)
  markdownlint 0.37.0 (6 markdown files) (created .markdownlint.yaml)
  osv-scanner 1.4.3 (1 lockfile file)
  oxipng 9.0.0 (8 png files)
  prettier 3.0.3 (6 markdown, 8 yaml files)
  ruff 0.1.5 (75 python files) (created ruff.toml)
  shellcheck 0.9.0 (2 shell files) (created .shellcheckrc)
  shfmt 3.6.0 (2 shell files)
  taplo 0.8.1 (1 toml file)
  trivy 0.47.0 (8 yaml files)
  trufflehog 3.62.1 (111 files)
  yamllint 1.33.0 (8 yaml files) (created .yamllint.yaml)
Next Steps
 1. Read documentation
    Our documentation can be found at https://docs.trunk.io
 2. Get help and give feedback
    Join the Trunk community at https://slack.trunk.io
trunk fmt README.md || exit 0 3/6 ✓
 ✔ Formatted README.md
Re-checking autofixed files...

Checked 1 file
✔ No issues
trunk check --fix --print-failures README.md 4/6 ✓
  ISSUES  
README.md:1:0
   1:0  low  First line in a file should be a top-level heading           markdownlint/MD041
   5:0  low  Heading levels should only increment by one level at a time  markdownlint/MD001
   5:0  low  Trailing punctuation in heading                              markdownlint/MD026
   7:0  low  Trailing punctuation in heading                              markdownlint/MD026
   9:0  low  Trailing punctuation in heading                              markdownlint/MD026
  82:0  low  Fenced code blocks should have a language specified          markdownlint/MD040
 102:0  low  Fenced code blocks should have a language specified          markdownlint/MD040
 108:0  low  Fenced code blocks should have a language specified          markdownlint/MD040
 131:0  low  Fenced code blocks should have a language specified          markdownlint/MD040
 143:0  low  Fenced code blocks should have a language specified          markdownlint/MD040
 151:0  low  Link fragments should be valid                               markdownlint/MD051
 200:0  low  Link fragments should be valid                               markdownlint/MD051
 240:0  low  Trailing punctuation in heading                              markdownlint/MD026
 263:0  low  Fenced code blocks should have a language specified          markdownlint/MD040
 287:0  low  Fenced code blocks should have a language specified          markdownlint/MD040
Checked 1 file
15 existing issues
trunk fmt README.md || exit 0 5/6 ✓
Checked 1 file
✔ No issues
trunk check --fix --print-failures README.md 6/6 ✓
Checked 1 file
✔ No issues

Sandbox passed on the latest main, so sandbox checks will be enabled for this issue.

Install Sweep Configs: Pull Request

Step 1: 🔎 Searching

I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.

Some code snippets I looked at (click to expand). If some file is missing from here, you can mention the path in the ticket description. https://github.com/OpenAdaptAI/OpenAdapt/blob/5708256fab70ba8f661b900d72ed9c76b8662c0a/README.md#L5-L115 https://github.com/OpenAdaptAI/OpenAdapt/blob/5708256fab70ba8f661b900d72ed9c76b8662c0a/install/install_openadapt.ps1#L185-L289 https://github.com/OpenAdaptAI/OpenAdapt/blob/5708256fab70ba8f661b900d72ed9c76b8662c0a/install/install_openadapt.ps1#L140-L235 https://github.com/OpenAdaptAI/OpenAdapt/blob/5708256fab70ba8f661b900d72ed9c76b8662c0a/install/install_openadapt.sh#L35-L140 https://github.com/OpenAdaptAI/OpenAdapt/blob/5708256fab70ba8f661b900d72ed9c76b8662c0a/install/install_openadapt.ps1#L1-L55
I also found the following external resources that might be helpful: **Summaries of links found in the content:** https://github.com/pyenv/pyenv#getting-pyenv: The page is about the GitHub repository for pyenv, a tool for simple Python version management. The page provides information on how to install and use pyenv to switch between multiple versions of Python. It explains how pyenv works by intercepting Python commands using shim executables and determining the specified Python version. The page also covers topics such as understanding PATH and shims, locating Pyenv-provided Python installations, and uninstalling Python versions. Additionally, it mentions that pyenv is compatible with Poetry, a tool for dependency management in Python projects. The user's specific problem is related to using pyenv with Poetry to handle the case when the required Python version is not already installed. https://python-poetry.org/docs/managing-environments: The page titled "Managing environments" in the Poetry documentation provides information on how to manage project environments using Poetry. It explains that Poetry makes project environment isolation one of its core features, meaning it works isolated from the global Python installation. By default, Poetry uses the Python version used during its installation to create the virtual environment for the current project. However, if this Python version is not compatible with the project's python range, Poetry will try to find a compatible version or prompt the user to activate one explicitly. The page also mentions that Poetry is compatible with `pyenv`, a tool for managing different Python versions. It provides an example workflow for using `pyenv` to manage different Python versions and activate the desired version for a project. Additionally, the page explains how to switch between environments, display environment information, list associated environments, and delete environments. Overall, the page provides the necessary information for users without the required Python version to manage project environments using Poetry.

Step 2: ⌨️ Coding

trunk fmt README.md || exit 0 1/2 ✓
 ✔ Formatted README.md
Re-checking autofixed files...

Checked 1 file
✔ No issues
trunk check --fix --print-failures README.md 2/2 ❌ (`1`)
  ISSUES  
README.md:86:0
   1:0  low  First line in a file should be a top-level heading           markdownlint/MD041
   5:0  low  Heading levels should only increment by one level at a time  markdownlint/MD001
   5:0  low  Trailing punctuation in heading                              markdownlint/MD026
   7:0  low  Trailing punctuation in heading                              markdownlint/MD026
   9:0  low  Trailing punctuation in heading                              markdownlint/MD026
  86:0  low  Fenced code blocks should have a language specified          markdownlint/MD040
  90:0  low  Fenced code blocks should have a language specified          markdownlint/MD040
  94:0  low  Fenced code blocks should have a language specified          markdownlint/MD040
 102:0  low  Fenced code blocks should have a language specified          markdownlint/MD040
 122:0  low  Fenced code blocks should have a language specified          markdownlint/MD040
 128:0  low  Fenced code blocks should have a language specified          markdownlint/MD040
 151:0  low  Fenced code blocks should have a language specified          markdownlint/MD040
 163:0  low  Fenced code blocks should have a language specified          markdownlint/MD040
 171:0  low  Link fragments should be valid                               markdownlint/MD051
 220:0  low  Link fragments should be valid                               markdownlint/MD051
 260:0  low  Trailing punctuation in heading                              markdownlint/MD026
 283:0  low  Fenced code blocks should have a language specified          markdownlint/MD040
 307:0  low  Fenced code blocks should have a language specified          markdownlint/MD040
Checked 1 file
15 existing issues
✖ 3 new issues

  1. Review all link fragments in the README.md file. A link fragment is the part of a URL that follows a '#' character and it is used to link to a specific section within a page. The markdown linter has flagged some link fragments as invalid, which means they do not correspond to any section in the target page. These link fragments should be corrected or removed.

  2. Adjust the heading levels and punctuation in the README.md file. The markdown linter requires that heading levels only increment by one level at a time. For example, a level 2 heading (e.g., "## Heading") should not be directly followed by a level 4 heading (e.g., "#### Heading"). Instead, a level 3 heading (e.g., "### Heading") should be used. Additionally, headings should not have trailing punctuation. Any trailing punctuation in headings should be removed.

trunk fmt README.md || exit 0 1/2 ✓
 ✔ Formatted README.md
Re-checking autofixed files...

Checked 1 file
✔ No issues
trunk check --fix --print-failures README.md 2/2 ❌ (`1`)
  ISSUES  
README.md:9:0
   1:0  low  First line in a file should be a top-level heading           markdownlint/MD041
   9:0  low  Heading levels should only increment by one level at a time  markdownlint/MD001
  21:0  low  Trailing punctuation in heading                              markdownlint/MD026
  80:0  low  Multiple headings with the same content                      markdownlint/MD024
 195:0  low  Multiple headings with the same content                      markdownlint/MD024
 199:0  low  Fenced code blocks should have a language specified          markdownlint/MD040
 207:0  low  Link fragments should be valid                               markdownlint/MD051
 225:0  low  Multiple headings with the same content                      markdownlint/MD024
 256:0  low  Link fragments should be valid                               markdownlint/MD051
 296:0  low  Trailing punctuation in heading                              markdownlint/MD026
 319:0  low  Fenced code blocks should have a language specified          markdownlint/MD040
 343:0  low  Fenced code blocks should have a language specified          markdownlint/MD040
Checked 1 file
8 existing issues
✖ 4 new issues

trunk fmt README.md || exit 0 1/2 ✓
 ✔ Formatted README.md
Re-checking autofixed files...

Checked 1 file
✔ No issues
trunk check --fix --print-failures README.md 2/2 ❌ (`1`)
  ISSUES  
README.md:72:0
   1:0  low  First line in a file should be a top-level heading   markdownlint/MD041
  72:0  low  Multiple headings with the same content              markdownlint/MD024
 202:0  low  Multiple headings with the same content              markdownlint/MD024
 233:0  low  Link fragments should be valid                       markdownlint/MD051
 273:0  low  Trailing punctuation in heading                      markdownlint/MD026
 292:0  low  Multiple headings with the same content              markdownlint/MD024
 300:0  low  Multiple headings with the same content              markdownlint/MD024
 309:0  low  Fenced code blocks should have a language specified  markdownlint/MD040
 333:0  low  Fenced code blocks should have a language specified  markdownlint/MD040
Checked 1 file
5 existing issues
✖ 4 new issues

trunk fmt README.md || exit 0 1/2 ✓
 ✔ Formatted README.md
Re-checking autofixed files...

Checked 1 file
✔ No issues
trunk check --fix --print-failures README.md 2/2 ❌ (`1`)
  ISSUES  
README.md:72:0
   1:0  low  First line in a file should be a top-level heading   markdownlint/MD041
  72:0  low  Multiple headings with the same content              markdownlint/MD024
 202:0  low  Multiple headings with the same content              markdownlint/MD024
 233:0  low  Link fragments should be valid                       markdownlint/MD051
 273:0  low  Trailing punctuation in heading                      markdownlint/MD026
 292:0  low  Multiple headings with the same content              markdownlint/MD024
 300:0  low  Multiple headings with the same content              markdownlint/MD024
 309:0  low  Fenced code blocks should have a language specified  markdownlint/MD040
 333:0  low  Fenced code blocks should have a language specified  markdownlint/MD040
Checked 1 file
5 existing issues
✖ 4 new issues

trunk fmt README.md || exit 0 1/2 ✓
 ✔ Formatted README.md
Re-checking autofixed files...

Checked 1 file
✔ No issues
trunk check --fix --print-failures README.md 2/2 ❌ (`1`)
  ISSUES  
README.md:9:0
   1:0  low  First line in a file should be a top-level heading           markdownlint/MD041
   9:0  low  Heading levels should only increment by one level at a time  markdownlint/MD001
  21:0  low  Trailing punctuation in heading                              markdownlint/MD026
  80:0  low  Multiple headings with the same content                      markdownlint/MD024
 195:0  low  Multiple headings with the same content                      markdownlint/MD024
 199:0  low  Fenced code blocks should have a language specified          markdownlint/MD040
 207:0  low  Link fragments should be valid                               markdownlint/MD051
 225:0  low  Multiple headings with the same content                      markdownlint/MD024
 256:0  low  Link fragments should be valid                               markdownlint/MD051
 296:0  low  Trailing punctuation in heading                              markdownlint/MD026
 319:0  low  Fenced code blocks should have a language specified          markdownlint/MD040
 343:0  low  Fenced code blocks should have a language specified          markdownlint/MD040
Checked 1 file
8 existing issues
✖ 4 new issues

trunk fmt README.md || exit 0 1/2 ✓
 ✔ Formatted README.md
Re-checking autofixed files...

Checked 1 file
✔ No issues
trunk check --fix --print-failures README.md 2/2 ❌ (`1`)
  ISSUES  
README.md:86:0
   1:0  low  First line in a file should be a top-level heading           markdownlint/MD041
   5:0  low  Heading levels should only increment by one level at a time  markdownlint/MD001
   5:0  low  Trailing punctuation in heading                              markdownlint/MD026
   7:0  low  Trailing punctuation in heading                              markdownlint/MD026
   9:0  low  Trailing punctuation in heading                              markdownlint/MD026
  86:0  low  Fenced code blocks should have a language specified          markdownlint/MD040
  90:0  low  Fenced code blocks should have a language specified          markdownlint/MD040
  94:0  low  Fenced code blocks should have a language specified          markdownlint/MD040
 102:0  low  Fenced code blocks should have a language specified          markdownlint/MD040
 122:0  low  Fenced code blocks should have a language specified          markdownlint/MD040
 128:0  low  Fenced code blocks should have a language specified          markdownlint/MD040
 151:0  low  Fenced code blocks should have a language specified          markdownlint/MD040
 163:0  low  Fenced code blocks should have a language specified          markdownlint/MD040
 171:0  low  Link fragments should be valid                               markdownlint/MD051
 220:0  low  Link fragments should be valid                               markdownlint/MD051
 260:0  low  Trailing punctuation in heading                              markdownlint/MD026
 283:0  low  Fenced code blocks should have a language specified          markdownlint/MD040
 307:0  low  Fenced code blocks should have a language specified          markdownlint/MD040
Checked 1 file
15 existing issues
✖ 3 new issues


Step 3: 🔁 Code Review

I have finished reviewing the code for completeness. I did not find errors for sweep/add-pyenv-documentation.


🎉 Latest improvements to Sweep:


💡 To recreate the pull request edit the issue title or description. To tweak the pull request, leave a comment on the pull request. Join Our Discord