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

[PLT-0] Improve Overall Dev-X By Using Rye #1492

Merged
merged 6 commits into from
Apr 8, 2024

Conversation

adrian-chang
Copy link
Contributor

@adrian-chang adrian-chang commented Mar 18, 2024

Overall Goal: Improve Dev-X
Overall Strategy:

  • Use rye as a baseline tool for all SDK Development
    • poetry can be used also as standard pyproject.toml
  • Enforces same Python / Virtual Env / Package management etc. during development versus opinionated / unstructured approach per developer.
  • Refreshed CONTRIB.MD to standard CONTRIBUTING.md.
  • Eliminates use of setuptools / setup.py
  • Update README.MD and CONTRIB.MD to reflect use of rye
  • Make labelbox package follow src/ folder convention
  • Simplify development steps (rye run unit, rye run lint, rye run integration) is all that is needed. Nothing else
  • Make repo a monorepo by starting a libs/ folder for future SDK modules outside of labelbox
    ** See comment of Support subprojects in a poetry project python-poetry/poetry#2270, lack of monorepo support of poetry, well at least natively
  • Streamline github action for deployment
  • Drop tests from being in a python module environment
  • Make CI integration tests use pypi built package, not local code
  • Update readthedocs creation
  • Test publish to pypi

TODO:

  • (Eventually) Fix Readthe Docs

@adrian-chang adrian-chang force-pushed the achang/plt-0-use-rye branch 7 times, most recently from fe77c43 to bb7878c Compare March 21, 2024 00:39
@adrian-chang adrian-chang force-pushed the achang/plt-0-use-rye branch 3 times, most recently from d7d1e8e to 51c84a6 Compare March 23, 2024 03:01
@adrian-chang adrian-chang force-pushed the achang/plt-0-use-rye branch 2 times, most recently from cdb9c57 to 2f1f859 Compare March 24, 2024 06:48
@adrian-chang adrian-chang force-pushed the achang/plt-0-use-rye branch from 8fe7612 to 8a1175e Compare March 24, 2024 21:07
@adrian-chang adrian-chang force-pushed the achang/plt-0-use-rye branch from 3b5b05c to 9b63b4b Compare March 25, 2024 03:51
@adrian-chang adrian-chang marked this pull request as ready for review March 25, 2024 03:51
@adrian-chang adrian-chang requested a review from a team as a code owner March 25, 2024 03:51
@itssujan
Copy link

itssujan commented Apr 2, 2024

I havent ever used rye before.. couple of qns.

  1. Is it an alternative to poetry? why not poetry?
  2. On their website they say "Rye is still a very experimental tool" ..so is it stable and used widely in the industry?

Copy link
Contributor

@vbrodsky vbrodsky left a comment

Choose a reason for hiding this comment

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

Very good! Left some questions

.github/workflows/publish.yml Show resolved Hide resolved
.github/workflows/publish.yml Show resolved Hide resolved
.github/workflows/python-package-prod.yml Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
DA_GCP_LABELBOX_API_KEY: ${{ secrets[matrix.da-test-key] }}
LABELBOX_TEST_ENVIRON: prod
run: |
rye add labelbox --path ./$(find ./dist/ -name *.tar.gz) --sync
Copy link

Choose a reason for hiding this comment

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

Just adding it as a review comment so that it doesnt get missed out

I havent ever used rye before.. couple of qns.

Is it an alternative to poetry? why not poetry?
On their website they say "Rye is still a very experimental tool" ..so is it stable and used widely in the industry?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

https://alpopkes.com/posts/python/packaging_tools/

^ look at the comparison, I personally don't want to deal with inconsistent environments (poetry doesn't solve the python-version problem, you'd have to use pyenv, something else)

https://astral.sh/blog/uv -> for corporate sponsorship

Star History Chart](https://star-history.com/#astral-sh/rye&python-poetry/poetry&Date) -> popularity, well I mean the creator did make Flask (if that is meaningful reputation wise).

https://rye-up.com/philosophy/

You can use poetry since, by definition, the pyproject.toml files are pep standard. Not against poetry, in fact, I've used / use it in other projects outside of LB.

example (open ai): https://github.com/openai/openai-python/blob/main/requirements.lock, codeinterpreter-api (https://github.com/shroominic/codeinterpreter-api/blob/main/requirements.lock)

To your point, there is some language (last year) indicating a more experimental attitude towards the work but the recent website updates are starting to eliminate this language.

@adrian-chang adrian-chang force-pushed the achang/plt-0-use-rye branch 6 times, most recently from 827d1e6 to d9a63dd Compare April 4, 2024 22:18
@adrian-chang adrian-chang force-pushed the achang/plt-0-use-rye branch from d9a63dd to 68d47ae Compare April 5, 2024 23:33
@adrian-chang adrian-chang force-pushed the achang/plt-0-use-rye branch from ca4b4f9 to 9b710b4 Compare April 6, 2024 06:21
@adrian-chang adrian-chang merged commit d9d54d0 into develop Apr 8, 2024
22 checks passed
@adrian-chang adrian-chang deleted the achang/plt-0-use-rye branch April 8, 2024 19:21
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.

5 participants