Skip to content

Commit

Permalink
Revert "chore: Move test requirements to optional dependencies in pyp…
Browse files Browse the repository at this point in the history
…roject.toml (#263)"

This reverts commit 73262bc.

revert 263 chore: Move test requirements to optional dependencies in pyproject.toml

Signed-off-by: Dmitry Sorokin <dmd40in@gmail.com>
  • Loading branch information
DimedS committed Aug 17, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent c975e56 commit 6acf0be
Showing 15 changed files with 266 additions and 303 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/check-plugin.yml
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ jobs:
- name: Install dependencies
run: |
cd ${{ inputs.plugin }}
pip install ".[test]"
pip install . -r test_requirements.txt # TODO(deepyaman): Define `test` extra and `pip install .[test]`
- name: pip freeze
run: pip freeze
- name: Run unit tests for Linux / all plugins
@@ -84,7 +84,7 @@ jobs:
run: |
cd ${{ inputs.plugin }}
pip install git+https://github.com/kedro-org/kedro@main
pip install ".[test]"
pip install . -r test_requirements.txt # TODO(deepyaman): Define `test` extra and `pip install .[test]`
pip freeze
- name: Install pre-commit hooks
run: |
@@ -148,7 +148,7 @@ jobs:
run: |
cd ${{ inputs.plugin }}
pip install git+https://github.com/kedro-org/kedro@main
pip install ".[test]"
pip install . -r test_requirements.txt # TODO(deepyaman): Define `test` extra and `pip install .[test]`
- name: pip freeze
run: pip freeze
- name: Run end to end tests
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -14,6 +14,7 @@ repos:
- id: check-case-conflict # Check for files that would conflict in case-insensitive filesystems
- id: check-merge-conflict # Check for files that contain merge conflict strings.
- id: debug-statements # Check for debugger imports and py37+ `breakpoint()` calls in python source.
- id: requirements-txt-fixer # Sorts entries in requirements.txt
- id: flake8
files: ^(kedro-datasets/kedro_datasets/|kedro-airflow/kedro_airflow/|kedro-docker/kedro_docker/|kedro-telemetry/kedro_telemetry/)
args:
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ install-pip-setuptools:
python -m pip install -U pip setuptools wheel

lint:
pre-commit run trailing-whitespace --all-files && pre-commit run end-of-file-fixer --all-files && pre-commit run check-yaml --all-files && pre-commit run check-added-large-files --all-files && pre-commit run check-case-conflict --all-files && pre-commit run check-merge-conflict --all-files && pre-commit run debug-statements --all-files && pre-commit run flake8 --all-files && pre-commit run isort-$(plugin) --all-files --hook-stage manual && pre-commit run black-$(plugin) --all-files --hook-stage manual && pre-commit run secret_scan --all-files --hook-stage manual && pre-commit run bandit --all-files --hook-stage manual && pre-commit run pylint-$(plugin) --all-files --hook-stage manual && pre-commit run pylint-$(plugin)-features --all-files --hook-stage manual && pre-commit run pylint-$(plugin)-tests --all-files --hook-stage manual
pre-commit run trailing-whitespace --all-files && pre-commit run end-of-file-fixer --all-files && pre-commit run check-yaml --all-files && pre-commit run check-added-large-files --all-files && pre-commit run check-case-conflict --all-files && pre-commit run check-merge-conflict --all-files && pre-commit run debug-statements --all-files && pre-commit run requirements-txt-fixer --all-files && pre-commit run flake8 --all-files && pre-commit run isort-$(plugin) --all-files --hook-stage manual && pre-commit run black-$(plugin) --all-files --hook-stage manual && pre-commit run secret_scan --all-files --hook-stage manual && pre-commit run bandit --all-files --hook-stage manual && pre-commit run pylint-$(plugin) --all-files --hook-stage manual && pre-commit run pylint-$(plugin)-features --all-files --hook-stage manual && pre-commit run pylint-$(plugin)-tests --all-files --hook-stage manual

test:
cd $(plugin) && pytest tests --cov-config pyproject.toml --numprocesses 4 --dist loadfile
@@ -35,7 +35,7 @@ clean:
find . -regex ".*\.egg-info" -exec rm -rf {} +;\

install-test-requirements:
cd $(plugin) && pip install ".[test]"
cd $(plugin) && pip install -r test_requirements.txt

install-pre-commit: install-test-requirements
pre-commit install --install-hooks
2 changes: 1 addition & 1 deletion kedro-airflow/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -77,7 +77,7 @@ We use a branching model that helps us keep track of branches in a logical, cons
To run E2E tests you need to install the test requirements which includes `behave`, do this using the following command:

```bash
pip install ".[test]"
pip install -r test_requirements.txt
```

### Running checks locally
3 changes: 2 additions & 1 deletion kedro-airflow/features/environment.py
Original file line number Diff line number Diff line change
@@ -50,7 +50,8 @@ def call(cmd, print_output=False):

# pip install us
call([context.python, "-m", "pip", "install", "-U", "pip", "pip-tools"])
call([context.pip, "install", ".[test]"])
call([context.pip, "install", "-r", "test_requirements.txt"])
call([context.pip, "install", "."])

context.temp_dir = Path(tempfile.mkdtemp())

17 changes: 0 additions & 17 deletions kedro-airflow/pyproject.toml
Original file line number Diff line number Diff line change
@@ -22,23 +22,6 @@ Source = "https://github.com/kedro-org/kedro-plugins/tree/main/kedro-airflow"
Documentation = "https://github.com/kedro-org/kedro-plugins/blob/main/kedro-airflow/README.md"
Tracker = "https://github.com/kedro-org/kedro-plugins/issues"

[project.optional-dependencies]
test = [
"apache-airflow<3.0",
"bandit>=1.6.2, <2.0",
"behave",
"black~=22.0",
"flake8",
"pre-commit>=1.17.0, <2.0",
"pylint>=2.5.2, <3.0",
"pytest",
"pytest-cov",
"pytest-mock",
"pytest-xdist",
"trufflehog>=2.1.0, <3.0",
"wheel"
]

[project.entry-points."kedro.project_commands"]
airflow = "kedro_airflow.plugin:commands"

13 changes: 13 additions & 0 deletions kedro-airflow/test_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apache-airflow<3.0
bandit>=1.6.2, <2.0
behave
black~=22.0
flake8
pre-commit>=1.17.0, <2.0
pylint>=2.5.2, <3.0
pytest
pytest-cov
pytest-mock
pytest-xdist
trufflehog>=2.1.0, <3.0
wheel
Loading

0 comments on commit 6acf0be

Please sign in to comment.