Skip to content

Adopt pyproject.toml #2

@stefnotch

Description

@stefnotch

This project currently uses a requirements.txt file for specifying dependencies, and politely tells us students to create a virtual environment.
That is absolutely the correct way of doing it today. 🎉

However, the requirements.txt file comes with a number of shortcomings (main one being that there's no separation between "dependencies that I'm using" and "dependencies of dependencies")1.

The Python world is currently fixing this, by very recently having adopted

Those files are currently being implemented in the various Python package managers. Notably

With that in mind, I would love it if eventually, we would be using a pyproject.toml in this repository!

Big Limitation

One of the dependencies is no longer in active development, and does not work with the new pyproject.toml standard. It seems like it won't ever be updated.
rusty1s/pytorch_cluster#185

Tangential Note

On that note, if you haven't tried out uv for Python, I can wholeheartedly recommend it. It's super fast, implements official Python standards, and automatically creates virtual environments. ✨

With that, the whole step instructions in the Readme can be shortened down to:

  1. Install UV
  2. Install all necessary dependencies with uv sync
  3. Run the code with uv run make_dataset.py (or select the interpreter in Pycharm, as per usual)

Footnotes

  1. If that dependency management stuff doesn't immediately make sense, I'm happy to properly explain it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions