From b8144ed8ad0626f20e1d7e77f275a54c4e39990a Mon Sep 17 00:00:00 2001 From: Erfan Nariman Date: Mon, 21 Sep 2020 20:57:34 +0200 Subject: [PATCH 1/9] generate pip in pre-commit --- .pre-commit-config.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 309e22e71a523..572fd4d9f7fd7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -30,3 +30,10 @@ repos: - id: isort language: python_venv exclude: ^pandas/__init__\.py$|^pandas/core/api\.py$ +- repo: local + hooks: + - id: pip_to_conda + name: Generate pip dependency from conda + language: python_venv + entry: ./scripts/generate_pip_deps_from_conda.py --compare + types: [python] \ No newline at end of file From b165e8fbe3c6ecd0da2796f65308000be8b07233 Mon Sep 17 00:00:00 2001 From: Erfan Nariman Date: Mon, 21 Sep 2020 21:02:40 +0200 Subject: [PATCH 2/9] add entry: --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 572fd4d9f7fd7..c263d91902125 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -35,5 +35,5 @@ repos: - id: pip_to_conda name: Generate pip dependency from conda language: python_venv - entry: ./scripts/generate_pip_deps_from_conda.py --compare + entry: python scripts/generate_pip_deps_from_conda.py --compare types: [python] \ No newline at end of file From 0ceb56b404285ef75b943c4c948be31477a7d7d0 Mon Sep 17 00:00:00 2001 From: Erfan Nariman Date: Mon, 21 Sep 2020 21:04:46 +0200 Subject: [PATCH 3/9] added files --- .pre-commit-config.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c263d91902125..9c791e164d632 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -36,4 +36,5 @@ repos: name: Generate pip dependency from conda language: python_venv entry: python scripts/generate_pip_deps_from_conda.py --compare - types: [python] \ No newline at end of file + types: [python] + files: scripts/generate*.py \ No newline at end of file From 181c56a246b635b26c290cd1b8fd3b1dfe50f762 Mon Sep 17 00:00:00 2001 From: Erfan Nariman Date: Mon, 21 Sep 2020 21:39:22 +0200 Subject: [PATCH 4/9] local pre-commit pip from conda --- .pre-commit-config.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9c791e164d632..a0a4ffcf8dc8a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -34,7 +34,5 @@ repos: hooks: - id: pip_to_conda name: Generate pip dependency from conda - language: python_venv entry: python scripts/generate_pip_deps_from_conda.py --compare - types: [python] - files: scripts/generate*.py \ No newline at end of file + language: python_venv \ No newline at end of file From 72ee219eba58c5f4161eed2414d7f11b7034054d Mon Sep 17 00:00:00 2001 From: Erfan Nariman Date: Mon, 21 Sep 2020 21:50:12 +0200 Subject: [PATCH 5/9] add description --- .pre-commit-config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a0a4ffcf8dc8a..dcea7ad6d51ff 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -34,5 +34,6 @@ repos: hooks: - id: pip_to_conda name: Generate pip dependency from conda + description: This hook checks if the conda environment.yml and requirements-dev.txt are equal entry: python scripts/generate_pip_deps_from_conda.py --compare language: python_venv \ No newline at end of file From a31706e127a6e39fd6e99ba6fa248f070afdfef8 Mon Sep 17 00:00:00 2001 From: Erfan Nariman Date: Wed, 23 Sep 2020 00:53:51 +0200 Subject: [PATCH 6/9] using args --- .pre-commit-config.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2dd2a9ba9fbb3..2cd8124617c0c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -35,5 +35,6 @@ repos: - id: pip_to_conda name: Generate pip dependency from conda description: This hook checks if the conda environment.yml and requirements-dev.txt are equal - entry: python scripts/generate_pip_deps_from_conda.py --compare language: python_venv + entry: python scripts/generate_pip_deps_from_conda.py + args: [--compare] From 680d8762f26770141712c6c017a5c5dd8a187b48 Mon Sep 17 00:00:00 2001 From: Erfan Nariman Date: Wed, 23 Sep 2020 23:08:36 +0200 Subject: [PATCH 7/9] fix for pass filenames --- .pre-commit-config.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2cd8124617c0c..81c25b3a09294 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -35,6 +35,7 @@ repos: - id: pip_to_conda name: Generate pip dependency from conda description: This hook checks if the conda environment.yml and requirements-dev.txt are equal - language: python_venv - entry: python scripts/generate_pip_deps_from_conda.py - args: [--compare] + language: system + entry: python -m scripts.generate_pip_deps_from_conda + pass_filenames: false + args: ["--compare"] From 0260f12221da200ebed15ea6d1e48e6a65dd0d25 Mon Sep 17 00:00:00 2001 From: Erfan Nariman Date: Thu, 24 Sep 2020 10:44:48 +0200 Subject: [PATCH 8/9] removed compare arg --- .pre-commit-config.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 81c25b3a09294..e914fd73a61ee 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -38,4 +38,3 @@ repos: language: system entry: python -m scripts.generate_pip_deps_from_conda pass_filenames: false - args: ["--compare"] From aded3cecdf78f7a0c8b862a21fffa90a438e4cd6 Mon Sep 17 00:00:00 2001 From: Erfan Nariman Date: Thu, 24 Sep 2020 22:42:45 +0200 Subject: [PATCH 9/9] added files --- .pre-commit-config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e914fd73a61ee..6a6bf5f8882c3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -37,4 +37,5 @@ repos: description: This hook checks if the conda environment.yml and requirements-dev.txt are equal language: system entry: python -m scripts.generate_pip_deps_from_conda + files: ^environment.yml$ pass_filenames: false