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

[FEATURE] Improve requirements #155

Open
mjspeck opened this issue Feb 7, 2024 · 9 comments · May be fixed by #157
Open

[FEATURE] Improve requirements #155

mjspeck opened this issue Feb 7, 2024 · 9 comments · May be fixed by #157
Labels
enhancement New feature or request

Comments

@mjspeck
Copy link

mjspeck commented Feb 7, 2024

Is your feature request related to a problem? Please describe.

A cleaner way to manage dependencies is crucial at the beginning of a project to reduce technical debt and allow collaboration and development. The current requirements.txt has a ton of pinned dependencies which is not optimal and very difficult to update.

Describe the solution you'd like

I propose using a dependency manager like Poetry or PDM (my preference) to handle this and to replace the current requirements.txt. This would mean a few files would be added:

  • pyproject.toml
  • pdm.lock

And some removed:

  • requirements.txt
  • setup.py
@mjspeck mjspeck added the enhancement New feature or request label Feb 7, 2024
@mjspeck
Copy link
Author

mjspeck commented Feb 7, 2024

If this sounds useful, I'm happy to implement it myself and post a PR.

mjspeck added a commit to mjspeck/self-operating-computer that referenced this issue Feb 7, 2024
@mjspeck mjspeck linked a pull request Feb 7, 2024 that will close this issue
2 tasks
mjspeck added a commit to mjspeck/self-operating-computer that referenced this issue Feb 8, 2024
mjspeck added a commit to mjspeck/self-operating-computer that referenced this issue Feb 8, 2024
We no longer have a `requirements.txt` file

Refs: OthersideAI#155
mjspeck added a commit to mjspeck/self-operating-computer that referenced this issue Feb 8, 2024
@joshbickett
Copy link
Contributor

@mjspeck this could make sense. Is it sufficient that pip install self-operating-computer downloads what's required or is there an issue with that for you?

@mjspeck
Copy link
Author

mjspeck commented Feb 9, 2024

I haven't had issues on my side. I just think long term it will be better to deal with this now. Leaving the issue lingering will make it harder to deal with and dependency hell is something to avoid at all costs IMO.

@joshbickett
Copy link
Contributor

@mjspeck I am curious for the reason for removing setup.py

@mjspeck
Copy link
Author

mjspeck commented Feb 9, 2024

It's just not necessary anymore. Everything defined in setup.py can be defined in the pyproject.toml.

@joshbickett
Copy link
Contributor

joshbickett commented Feb 9, 2024

@mjspeck Does pyproject.toml upload to PyPI to be indexed? That's what setup.py does

@mjspeck
Copy link
Author

mjspeck commented Feb 9, 2024

You don't need setup.py for that. You can still use python -m build to build and then twine to upload, or, as I'd suggest, just use pdm for this: https://pdm-project.org/latest/usage/publish/

@joshbickett
Copy link
Contributor

@mjspeck ok, thanks for the input. I'll take a closer look at this switch

@mjspeck
Copy link
Author

mjspeck commented Feb 9, 2024

Thank you! My PR should be pretty straightforward

mjspeck added a commit to mjspeck/self-operating-computer that referenced this issue Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants