Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(mypy): fix cache cleanup #15072

Merged
merged 2 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion api/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ twine_repository_url ?= $(pypi_test_upload_url)

# Defined separately than the clean target so the wheel file doesn’t have to
# depend on a PHONY target
clean_cmd = $(SHX) rm -rf build .coverage coverage.xml '*.egg-info' '**/__pycache__' '**/*.pyc' 'src/**/.mypy_cache'
clean_cmd = $(SHX) rm -rf build .coverage coverage.xml '*.egg-info'
clean_cache_cmd = $(SHX) rm -rf '**/__pycache__' '**/*.pyc' '**/.mypy_cache'
clean_wheel_cmd = $(clean_cmd) dist/*.whl
clean_sdist_cmd = $(clean_cmd) dist/*.tar.gz
clean_all_cmd = $(clean_cmd) dist
Expand All @@ -85,6 +86,7 @@ setup-ot2:
.PHONY: clean
clean: docs-clean
$(clean_all_cmd)
$(clean_cache_cmd)

.PHONY: teardown
teardown:
Expand Down
6 changes: 4 additions & 2 deletions hardware/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ ot_sources := $(ot_py_sources)

# Defined separately than the clean target so the wheel file doesn’t have to
# depend on a PHONY target
clean_cmd = $(SHX) rm -rf build dist .coverage coverage.xml '*.egg-info' '**/__pycache__' '**/*.pyc' '**/.mypy_cache'
clean_cmd = $(SHX) rm -rf build dist .coverage coverage.xml '*.egg-info'
clean_cache_cmd = $(SHX) rm -rf '**/__pycache__' '**/*.pyc' '**/.mypy_cache'

.PHONY: all
all: clean wheel
Expand All @@ -69,7 +70,8 @@ teardown:

.PHONY: clean
clean:
-$(clean_cmd)
$(clean_cmd)
$(clean_cache_cmd)

dist/opentrons_hardware-%-py2.py3-none-any.whl: export OPENTRONS_PROJECT=$(project_rs_default)
dist/opentrons_hardware-%-py2.py3-none-any.whl: setup.py $(ot_sources)
Expand Down
4 changes: 3 additions & 1 deletion robot-server/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ ot_sources := $(ot_py_sources)

# Defined separately than the clean target so the wheel file doesn’t have to
# depend on a PHONY target
clean_cmd = $(SHX) rm -rf build .coverage coverage.xml '*.egg-info' '**/__pycache__' '**/*.pyc' 'robot_server/**/.mypy_cache'
clean_cmd = $(SHX) rm -rf build .coverage coverage.xml '*.egg-info'
clean_cache_cmd = $(SHX) rm -rf '**/__pycache__' '**/*.pyc' '**/.mypy_cache'
clean_wheel_cmd = $(clean_cmd) dist/*.whl
clean_sdist_cmd = $(clean_cmd) dist/*.tar.gz
clean_all_cmd = $(clean_cmd) dist
Expand Down Expand Up @@ -92,6 +93,7 @@ setup-ot2:
.PHONY: clean
clean:
$(clean_all_cmd)
$(clean_cache_cmd)

.PHONY: teardown
teardown:
Expand Down
4 changes: 3 additions & 1 deletion server-utils/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ ot_sources := $(ot_py_sources)

# Defined separately than the clean target so the wheel file doesn’t have to
# depend on a PHONY target
clean_cmd = $(SHX) rm -rf build .coverage coverage.xml '*.egg-info' '**/__pycache__' '**/*.pyc' 'server_utils/**/.mypy_cache'
clean_cmd = $(SHX) rm -rf build .coverage coverage.xml '*.egg-info'
clean_cache_cmd = $(SHX) rm -rf '**/__pycache__' '**/*.pyc' '**/.mypy_cache'
clean_wheel_cmd = $(clean_cmd) dist/*.whl
clean_sdist_cmd = $(clean_cmd) dist/*.tar.gz
clean_all_cmd = $(clean_cmd) dist
Expand All @@ -65,6 +66,7 @@ setup:
.PHONY: clean
clean:
$(clean_all_cmd)
$(clean_cache_cmd)

.PHONY: teardown
teardown:
Expand Down
4 changes: 3 additions & 1 deletion shared-data/python/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ tests ?= tests
twine_auth_args := --username $(pypi_username) --password $(pypi_password)
twine_repository_url ?= $(pypi_test_upload_url)

clean_cmd = $(SHX) rm -rf build $(BUILD_DIR) .coverage coverage.xml '*.egg-info' ' **/__pycache__' '**/*.pyc' 'opentrons_shared_data/**/.mypy_cache'
clean_cmd = $(SHX) rm -rf build $(BUILD_DIR) .coverage coverage.xml '*.egg-info'
clean_cache_cmd = $(SHX) rm -rf '**/__pycache__' '**/*.pyc' '**/.mypy_cache'

.PHONY: all
all: clean sdist wheel
Expand All @@ -74,6 +75,7 @@ teardown-py:
.PHONY: clean
clean:
$(clean_cmd)
$(clean_cache_cmd)

.PHONY: wheel
wheel: export OPENTRONS_PROJECT=$(project_rs_default)
Expand Down
Loading