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

requirement.txt file is outdated #324

Closed
demeringo opened this issue Sep 28, 2024 · 7 comments
Closed

requirement.txt file is outdated #324

demeringo opened this issue Sep 28, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@demeringo
Copy link
Collaborator

demeringo commented Sep 28, 2024

Bug description

Since we use poetry for dependency management, requirement.txt file is desynchronized with actual project dependencies.

I suspect it leads to false alerts by depndendabots.

To Reproduce

Expected behavior

Either get rid of requirement.txt or keep it up to date by making poetry update it.

JSON OUTPUT

Additional context

Not sure if there is any purpose to keep the requirement.txt file or if it remains there only by accident / historical reasons as it was used before we started to use Poetry.

It may still be used by the serverless deployment (which does not work at the moment #153 , so I am not sure if we should get complely rid of it or relocate it to a dedicated repository).

@demeringo demeringo added the bug Something isn't working label Sep 28, 2024
@da-ekchajzer
Copy link
Collaborator

The requirements.txt is used in clever-cloud for the public endpoint. Could we make a GitHub action that updates automatically the requirements.txt every time poetry dependency are updated ?

@da-ekchajzer
Copy link
Collaborator

Why is there a Pipfile it the repo ? Why do we need it ? Is the "pyproject.toml" enought ?

@demeringo
Copy link
Collaborator Author

demeringo commented Oct 2, 2024

Yes in theory the Poetry files ("pyproject.toml" and "poetry.lock") should be sufficient.

And I also believe that the pipfile is not needed once we use Poetry, but I would appreciate the view of @bamthomas or @samuelrince or other with experience in Python... I feel a bit rusty ;-)

For clever-cloud deployment:
If needed for clever-cloud deployment we should be able to generate the requirement.txt file on the fly.
My understanding is that this deployment is done manually today. We should document (and maybe automate the entire clever cloud deployment via an action). @AirLoren , do you have some info about how it is done ?

For the serverless deployment:
According to the docs of serverless framework, there is no impact if we remove the requirement.txt (the frameworks plugin supports Poetry if no requirement is found).

@samuelrince
Copy link
Member

samuelrince commented Oct 2, 2024

Indeed, I don't think we need the Pipfile anymore. To generate a requirements.txt file, there is an official Poetry plugin.

@bamthomas
Copy link
Collaborator

Exacrly @demeringo it was just for the sake of migration and possible rollback but we should be done now :)

@da-ekchajzer
Copy link
Collaborator

Ok i will take charge of :

  1. Cleaning the repo (removing requirements.txt and pipfile
  2. Make a GitHub action that generates the requirements.txt when we push on the run-clever and dev-clever

Thanks for your feedbacks

@da-ekchajzer
Copy link
Collaborator

Everything is available on dev branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants