Skip to content

Commit

Permalink
chore(mypy): fix cache cleanup (#15072)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahiuchingau authored May 29, 2024
1 parent 12ee271 commit 538b774
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
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

0 comments on commit 538b774

Please sign in to comment.