Skip to content

Commit 00942e5

Browse files
committed
refactor
1 parent b8f2195 commit 00942e5

1 file changed

Lines changed: 13 additions & 18 deletions

File tree

Makefile

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
# under the License.
1717

1818

19-
help: ## Display this help
19+
help: # Display this help
2020
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-20s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
2121

2222
POETRY_VERSION = 2.1.1
23-
install-poetry: ## Ensure Poetry is installed and the correct version is being used.
23+
install-poetry: # Ensure Poetry is installed and the correct version is being used.
2424
@if ! command -v poetry &> /dev/null; then \
2525
echo "Poetry could not be found. Installing..."; \
2626
pip install --user poetry==$(POETRY_VERSION); \
@@ -34,21 +34,21 @@ install-poetry: ## Ensure Poetry is installed and the correct version is being
3434
fi \
3535
fi
3636

37-
install-dependencies: ## Install dependencies including dev, docs, and all extras
37+
install-dependencies: # Install dependencies including dev, docs, and all extras
3838
poetry install --all-extras
3939

4040
install: | install-poetry install-dependencies
4141

42-
check-license: ## Check license headers
42+
check-license: # Check license headers
4343
./dev/check-license
4444

45-
lint: ## lint
45+
lint: # lint
4646
poetry run pre-commit run --all-files
4747

48-
test: ## Run all unit tests, can add arguments with PYTEST_ARGS="-vv"
48+
test: # Run all unit tests, can add arguments with PYTEST_ARGS="-vv"
4949
poetry run pytest tests/ -m "(unmarked or parametrize) and not integration" ${PYTEST_ARGS}
5050

51-
test-integration: | test-integration-setup test-integration-exec ## Run all integration tests, can add arguments with PYTEST_ARGS="-vv"
51+
test-integration: | test-integration-setup test-integration-exec # Run all integration tests, can add arguments with PYTEST_ARGS="-vv"
5252

5353
test-integration-setup: # Prepare the environment for integration
5454
docker compose -f dev/docker-compose-integration.yml kill
@@ -58,7 +58,7 @@ test-integration-setup: # Prepare the environment for integration
5858
docker compose -f dev/docker-compose-integration.yml cp ./dev/provision.py spark-iceberg:/opt/spark/provision.py
5959
docker compose -f dev/docker-compose-integration.yml exec -T spark-iceberg ipython ./provision.py
6060

61-
test-integration-exec: # Execute integration tests, can add arguments with PYTEST_ARGS="-vv"
61+
test-integration-exec: # Execute integration tests, can add arguments with PYTEST_ARGS="-vv"
6262
poetry run pytest tests/ -v -m integration ${PYTEST_ARGS}
6363

6464
test-integration-rebuild:
@@ -70,34 +70,29 @@ test-s3: # Run tests marked with s3, can add arguments with PYTEST_ARGS="-vv"
7070
sh ./dev/run-minio.sh
7171
poetry run pytest tests/ -m s3 ${PYTEST_ARGS}
7272

73-
test-adls: ## Run tests marked with adls, can add arguments with PYTEST_ARGS="-vv"
73+
test-adls: # Run tests marked with adls, can add arguments with PYTEST_ARGS="-vv"
7474
sh ./dev/run-azurite.sh
7575
poetry run pytest tests/ -m adls ${PYTEST_ARGS}
7676

77-
test-gcs: ## Run tests marked with gcs, can add arguments with PYTEST_ARGS="-vv"
77+
test-gcs: # Run tests marked with gcs, can add arguments with PYTEST_ARGS="-vv"
7878
sh ./dev/run-gcs-server.sh
7979
poetry run pytest tests/ -m gcs ${PYTEST_ARGS}
8080

8181
test-coverage-unit: # Run test with coverage for unit tests, can add arguments with PYTEST_ARGS="-vv"
8282
poetry run coverage run --source=pyiceberg/ --data-file=.coverage.unit -m pytest tests/ -v -m "(unmarked or parametrize) and not integration" ${PYTEST_ARGS}
8383

84-
test-coverage-integration: # Run test with coverage for integration tests, can add arguments with PYTEST_ARGS="-vv"
85-
docker compose -f dev/docker-compose-integration.yml kill
86-
docker compose -f dev/docker-compose-integration.yml rm -f
87-
docker compose -f dev/docker-compose-integration.yml up -d
88-
sleep 10
89-
docker compose -f dev/docker-compose-integration.yml cp ./dev/provision.py spark-iceberg:/opt/spark/provision.py
84+
test-coverage-integration: test-integration-setup # Run test with coverage for integration tests, can add arguments with PYTEST_ARGS="-vv"
9085
docker compose -f dev/docker-compose-integration.yml exec -T spark-iceberg ipython ./provision.py
9186
poetry run coverage run --source=pyiceberg/ --data-file=.coverage.integration -m pytest tests/ -v -m integration ${PYTEST_ARGS}
9287

93-
test-coverage: | test-coverage-unit test-coverage-integration test-s3 test-adls test-gcs ## Run all tests with coverage including unit and integration tests
88+
test-coverage: | test-coverage-unit test-coverage-integration test-s3 test-adls test-gcs # Run all tests with coverage including unit and integration tests
9489
poetry run coverage combine .coverage.unit .coverage.integration
9590
poetry run coverage report -m --fail-under=90
9691
poetry run coverage html
9792
poetry run coverage xml
9893

9994

100-
clean: ## Clean up the project Python working environment
95+
clean: # Clean up the project Python working environment
10196
@echo "Cleaning up Cython and Python cached files"
10297
@rm -rf build dist *.egg-info
10398
@find . -name "*.so" -exec echo Deleting {} \; -delete

0 commit comments

Comments
 (0)