Skip to content

[FEATURE] Improve requirements #155

@mjspeck

Description

@mjspeck
Contributor

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

Activity

mjspeck

mjspeck commented on Feb 7, 2024

@mjspeck
ContributorAuthor

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

linked a pull request that will close this issue on Feb 7, 2024
joshbickett

joshbickett commented on Feb 9, 2024

@joshbickett
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

mjspeck commented on Feb 9, 2024

@mjspeck
ContributorAuthor

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

joshbickett commented on Feb 9, 2024

@joshbickett
Contributor

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

mjspeck

mjspeck commented on Feb 9, 2024

@mjspeck
ContributorAuthor

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

joshbickett

joshbickett commented on Feb 9, 2024

@joshbickett
Contributor

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

mjspeck

mjspeck commented on Feb 9, 2024

@mjspeck
ContributorAuthor

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

joshbickett commented on Feb 9, 2024

@joshbickett
Contributor

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

mjspeck

mjspeck commented on Feb 9, 2024

@mjspeck
ContributorAuthor

Thank you! My PR should be pretty straightforward

1 remaining item

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @mjspeck@joshbickett

      Issue actions

        [FEATURE] Improve requirements · Issue #155 · OthersideAI/self-operating-computer