Skip to content

Commit

Permalink
Merge pull request #105 from wizaye/wizaye
Browse files Browse the repository at this point in the history
[Feature]: Add a python file to update requirements.txt automatically.
  • Loading branch information
suryanshsk authored Oct 9, 2024
2 parents 4239e99 + a68e755 commit 708af91
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions auto_update_requirements.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import subprocess

def generate_requirements():
try:
subprocess.check_call(["pipreqs", ".", "--force"])
print("requirements.txt generated successfully.")
except subprocess.CalledProcessError as e:
print(f"Error generating requirements.txt: {e}")

def main():
generate_requirements()

if __name__ == "__main__":
main()

#install pipreqs if not installed with the commands below
#pip install pipreqs

0 comments on commit 708af91

Please sign in to comment.