From 1eac69d609539ddfb28ed15a3d4f5cc0d37a4778 Mon Sep 17 00:00:00 2001 From: Mark Date: Thu, 8 Jun 2023 16:29:12 +0100 Subject: [PATCH] chore: remove precommit and extra requirements.txt --- .pre-commit-config.yaml | 13 ------------- environment.yml | 3 +++ hooks/pre-commit | 7 ------- pipeline.yaml | 6 +----- requirements.txt | 7 ------- 5 files changed, 4 insertions(+), 32 deletions(-) delete mode 100644 .pre-commit-config.yaml delete mode 100755 hooks/pre-commit delete mode 100644 requirements.txt diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml deleted file mode 100644 index c53a80ac7b..0000000000 --- a/.pre-commit-config.yaml +++ /dev/null @@ -1,13 +0,0 @@ -repos: -- repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.3.0 - hooks: - - id: trailing-whitespace - - id: end-of-file-fixer - - id: check-added-large-files - -- repo: https://github.com/psf/black - rev: 22.3.0 - hooks: - - id: black - - id: black-jupyter diff --git a/environment.yml b/environment.yml index ab8b8f1a34..40139c70f7 100644 --- a/environment.yml +++ b/environment.yml @@ -44,3 +44,6 @@ dependencies: - huggingface-hub>=0.8.1 - langchain==0.0.151 - openai==0.27.5 + - black==22.3.0 + - black[jupyter]==22.3.0 + - pre-commit==2.19.0 diff --git a/hooks/pre-commit b/hooks/pre-commit deleted file mode 100755 index ecfb4aa4f3..0000000000 --- a/hooks/pre-commit +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -# If any command fails, exit immediately with that command's exit status -set -eo pipefail - -echo "Running scalastyle.." -sbt scalastyle test:scalastyle diff --git a/pipeline.yaml b/pipeline.yaml index af6b4a01a2..f8fad30053 100644 --- a/pipeline.yaml +++ b/pipeline.yaml @@ -65,11 +65,7 @@ jobs: scriptLocation: inlineScript scriptType: bash inlineScript: 'sbt scalastyle test:scalastyle' - - task: UsePythonVersion@00 - inputs: - versionSpec: '3.8' - - script: pip install -r requirements.txt - displayName: 'Install requirements' + - template: templates/conda.yml - bash: | black --diff --color . && black --check -q . displayName: 'Python Style Check' diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 9f88147702..0000000000 --- a/requirements.txt +++ /dev/null @@ -1,7 +0,0 @@ -# Copyright (C) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See LICENSE in project root for information. - -# Required to auto-format python code -black==22.3.0 -black[jupyter]==22.3.0 -pre-commit==2.19.0