From dc139af4a7e9141c0407bfc8c95d0634767f6dea Mon Sep 17 00:00:00 2001
From: Odair M <odairmario45@gmail.com>
Date: Fri, 26 Aug 2022 17:44:12 -0300
Subject: [PATCH] feat: add pre commit to generate the requirements.txt

---
 .pre-commit-config.yaml  |  8 ++++++++
 Pipfile.lock             |  3 +--
 generate-requeriments.sh |  2 ++
 requirements.txt         | 32 ++++++++++++++++++++++++++++++++
 4 files changed, 43 insertions(+), 2 deletions(-)
 create mode 100755 generate-requeriments.sh
 create mode 100644 requirements.txt

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index b045b4a..a19478a 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -15,3 +15,11 @@ repos:
     rev: 22.6.0
     hooks:
     - id: black
+  - repo: local
+    hooks:
+      - id: pipenv-generetate-requirements
+        name: Generate requirements.txt
+        description: This hook generate the requirements.txt based on pipfile
+        entry: generate-requeriments.sh
+        language: script
+        files: ^Pipfile(\.lock)?$
diff --git a/Pipfile.lock b/Pipfile.lock
index b82aa19..9c4497d 100644
--- a/Pipfile.lock
+++ b/Pipfile.lock
@@ -1,5 +1,4 @@
-{
-    "_meta": {
+{ "_meta": {
         "hash": {
             "sha256": "97cfbbc6f54a64a57f10f1b46f188f74bff43a0a22e9d4e5d4c31ccae8f3caa5"
         },
diff --git a/generate-requeriments.sh b/generate-requeriments.sh
new file mode 100755
index 0000000..ad05737
--- /dev/null
+++ b/generate-requeriments.sh
@@ -0,0 +1,2 @@
+#!/usr/bin/sh
+pipenv lock -r > requirements.txt
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..1964518
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,32 @@
+#
+# These requirements were autogenerated by pipenv
+# To regenerate from the project's Pipfile, run:
+#
+#    pipenv lock --requirements
+#
+
+-i https://pypi.org/simple
+alabaster==0.7.12
+babel==2.10.3; python_version >= '3.6'
+certifi==2022.6.15; python_version >= '3.6'
+charset-normalizer==2.1.1; python_version >= '3.6'
+docutils==0.17.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
+idna==3.3; python_version >= '3.5'
+imagesize==1.4.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
+jinja2==3.1.2; python_version >= '3.7'
+markupsafe==2.1.1; python_version >= '3.7'
+packaging==21.3; python_version >= '3.6'
+pygments==2.13.0; python_version >= '3.6'
+pyparsing==3.0.9; python_full_version >= '3.6.8'
+pytz==2022.2.1
+requests==2.28.1; python_version >= '3.7' and python_version < '4'
+snowballstemmer==2.2.0
+sphinx-rtd-theme==1.0.0
+sphinx==5.1.1
+sphinxcontrib-applehelp==1.0.2; python_version >= '3.5'
+sphinxcontrib-devhelp==1.0.2; python_version >= '3.5'
+sphinxcontrib-htmlhelp==2.0.0; python_version >= '3.6'
+sphinxcontrib-jsmath==1.0.1; python_version >= '3.5'
+sphinxcontrib-qthelp==1.0.3; python_version >= '3.5'
+sphinxcontrib-serializinghtml==1.1.5; python_version >= '3.5'
+urllib3==1.26.12; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5' and python_version < '4'
-- 
GitLab