Poetry.lock and pyproject.toml

Whenever I create new Python projects for my students I’m greeted with two files I’m unfamiliar with: poetry.lock and pyproject.toml. Are there any negative consequences to deleting these files before publishing the project? None of the Python projects I imported over from the Curriculum Hub had them, so they seem vestigial to me.

1 Like

These files sort out what libraries your project is using. It’s helpful to keep them, otherwise students may have to attempt to install the libraries by themselves.

Is it just me, or does having the poetry.lock file included make these repls take longer to load? These files did not get included last year in my students’ projects. Obviously what we’re doing (mostly single file programs in an introductory programming class) do not use poetry.lock or the other file. Is there a way to not include them in new projects?

If you want to hide these files from students, you can create a .replit file and put the following in it:
hidden = ["poetry.lock, "pyproject.toml"]

Strange. .replit and replit.nix are meant to be editable config files but they are hidden by default. poetry.lock and pyproject.toml (if using only for poetry) are not meant to be edited directly, but they aren’t hidden.