Skip to content

Commit

Permalink
Remove requirements files (#1511)
Browse files Browse the repository at this point in the history
* Remove mentions to spark

Signed-off-by: Eduardo Apolinario <[email protected]>

* Remove mentions to requirements.txt and dev-requirements.txt

Signed-off-by: Eduardo Apolinario <[email protected]>

* Remove plugins requirements.

Signed-off-by: Eduardo Apolinario <[email protected]>

* Remove all_requirements target from plugins makefile

Signed-off-by: Eduardo Apolinario <[email protected]>

* Use dev-requirements.in in lint gh action job

Signed-off-by: Eduardo Apolinario <[email protected]>

* Revert "Remove all_requirements target from plugins makefile"

This reverts commit 50cbb4d.

Signed-off-by: Eduardo Apolinario <[email protected]>

* Revert "Remove plugins requirements."

This reverts commit eae945c.

Signed-off-by: Eduardo Apolinario <[email protected]>

---------

Signed-off-by: Eduardo Apolinario <[email protected]>
Co-authored-by: Eduardo Apolinario <[email protected]>
Signed-off-by: Eduardo Apolinario <[email protected]>
  • Loading branch information
eapolinario and eapolinario committed Feb 28, 2023
1 parent 54e66cb commit 46a8f22
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 1,190 deletions.
17 changes: 5 additions & 12 deletions .github/workflows/pythonbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,7 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.7", "3.8", "3.9", "3.10"]
spark-version-suffix: ["", "-spark2"]
exclude:
- python-version: 3.8
spark-version-suffix: "-spark2"
- python-version: 3.9
spark-version-suffix: "-spark2"
- python-version: 3.10
spark-version-suffix: "-spark2"
# Ignore this test because we failed to install docker-py
# docker-py will install pywin32==227, whereas pywin only added support for python 3.10 in version 301.
# For more detail, see https://github.com/flyteorg/flytekit/pull/856#issuecomment-1067152855
Expand All @@ -42,10 +35,10 @@ jobs:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements files
key: ${{ format('{0}-pip-{1}', runner.os, hashFiles('dev-requirements.txt', format('requirements{0}.txt', matrix.spark-version-suffix))) }}
key: ${{ format('{0}-pip-{1}', runner.os, hashFiles('dev-requirements.in', 'requirements.in')) }}
- name: Install dependencies
run: |
make setup${{ matrix.spark-version-suffix }}
make setup
pip freeze
- name: Test with coverage
run: |
Expand Down Expand Up @@ -148,13 +141,13 @@ jobs:
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/dev-requirements.txt') }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/dev-requirements.in') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip==21.2.4
pip install -r dev-requirements.txt
python -m pip install --upgrade pip
pip install -r dev-requirements.in
- name: Lint
run: |
make lint
Expand Down
20 changes: 2 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@ update_boilerplate:

.PHONY: setup
setup: install-piptools ## Install requirements
pip-sync requirements.txt dev-requirements.txt

.PHONY: setup-spark2
setup-spark2: install-piptools ## Install requirements
pip-sync requirements-spark2.txt dev-requirements.txt
pip install -r dev-requirements.in

.PHONY: fmt
fmt: ## Format code with black and isort
Expand All @@ -53,18 +49,6 @@ test: lint unit_test
unit_test:
pytest -m "not sandbox_test" tests/flytekit/unit

requirements-spark2.txt: export CUSTOM_COMPILE_COMMAND := make requirements-spark2.txt
requirements-spark2.txt: requirements-spark2.in install-piptools
$(PIP_COMPILE) $<

requirements.txt: export CUSTOM_COMPILE_COMMAND := make requirements.txt
requirements.txt: requirements.in install-piptools
$(PIP_COMPILE) $<

dev-requirements.txt: export CUSTOM_COMPILE_COMMAND := make dev-requirements.txt
dev-requirements.txt: dev-requirements.in requirements.txt install-piptools
$(PIP_COMPILE) $<

doc-requirements.txt: export CUSTOM_COMPILE_COMMAND := make doc-requirements.txt
doc-requirements.txt: doc-requirements.in install-piptools
$(PIP_COMPILE) $<
Expand All @@ -74,7 +58,7 @@ ${MOCK_FLYTE_REPO}/requirements.txt: ${MOCK_FLYTE_REPO}/requirements.in install-
$(PIP_COMPILE) $<

.PHONY: requirements
requirements: requirements.txt dev-requirements.txt requirements-spark2.txt doc-requirements.txt ${MOCK_FLYTE_REPO}/requirements.txt ## Compile requirements
requirements: doc-requirements.txt ${MOCK_FLYTE_REPO}/requirements.txt ## Compile requirements

# TODO: Change this in the future to be all of flytekit
.PHONY: coverage
Expand Down
3 changes: 1 addition & 2 deletions dev-requirements.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-c requirements.txt
-r requirements.in

git+https://github.com/flyteorg/pytest-flyte@main#egg=pytest-flyte
coverage[toml]
Expand All @@ -12,7 +12,6 @@ codespell
google-cloud-bigquery
google-cloud-bigquery-storage
IPython
tensorflow
grpcio-status<1.49.0
keyrings.alt

Expand Down
Loading

0 comments on commit 46a8f22

Please sign in to comment.