Skip to content

Commit 251fa3f

Browse files
authored
infra: simplify Makefile and uv (#2996)
<!-- Thanks for opening a pull request! --> <!-- In the case this PR will resolve an issue, please replace ${GITHUB_ISSUE_ID} below with the actual Github issue id. --> <!-- Closes #${GITHUB_ISSUE_ID} --> # Rationale for this change * Simplify the Makefile by leveraging `uv run --group` to auto-install dependencies on demand, eliminating the need for separate install targets. Dependencies are automatically installed on first use * Add `.PHONY` declarations - Prevents issues if files with target names exist * Add `.DEFAULT_GOAL := help` - Running `make` without arguments now shows the help message ## Are these changes tested? ## Are there any user-facing changes? <!-- In the case of user-facing changes, please add the changelog label. -->
1 parent d587aab commit 251fa3f

File tree

4 files changed

+15
-17
lines changed

4 files changed

+15
-17
lines changed

.github/workflows/python-ci-docs.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ jobs:
4141
python-version: 3.12
4242
- name: Install UV
4343
uses: astral-sh/setup-uv@v7
44-
- name: Install
45-
run: make docs-install
4644
- name: Build docs
4745
run: make docs-build
4846
- name: Run linters

.github/workflows/python-release-docs.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ jobs:
3636
python-version: ${{ matrix.python }}
3737
- name: Install UV
3838
uses: astral-sh/setup-uv@v7
39-
- name: Install docs
40-
run: make docs-install
4139
- name: Build docs
4240
run: make docs-build
4341
- name: Copy

Makefile

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17+
.PHONY: help install install-uv check-license lint \
18+
test test-integration test-integration-setup test-integration-exec test-integration-cleanup test-integration-rebuild \
19+
test-s3 test-adls test-gcs test-coverage coverage-report \
20+
docs-serve docs-build notebook notebook-infra \
21+
clean uv-lock uv-lock-check
22+
23+
.DEFAULT_GOAL := help
1724
# ========================
1825
# Configuration Variables
1926
# ========================
@@ -149,29 +156,23 @@ coverage-report: ## Combine and report coverage
149156

150157
##@ Documentation
151158

152-
docs-install: ## Install docs dependencies (included in default groups)
153-
uv sync $(PYTHON_ARG) --group docs
154-
155159
docs-serve: ## Serve local docs preview (hot reload)
156-
uv run $(PYTHON_ARG) mkdocs serve -f mkdocs/mkdocs.yml --livereload
160+
uv run $(PYTHON_ARG) --group docs mkdocs serve -f mkdocs/mkdocs.yml --livereload
157161

158162
docs-build: ## Build the static documentation site
159-
uv run $(PYTHON_ARG) mkdocs build -f mkdocs/mkdocs.yml --strict
163+
uv run $(PYTHON_ARG) --group docs mkdocs build -f mkdocs/mkdocs.yml --strict
160164

161165
# ========================
162166
# Experimentation
163167
# ========================
164168

165169
##@ Experimentation
166170

167-
notebook-install: ## Install notebook dependencies
168-
uv sync $(PYTHON_ARG) --all-extras --group notebook
169-
170-
notebook: notebook-install ## Launch notebook for experimentation
171-
uv run jupyter lab --notebook-dir=notebooks
171+
notebook: ## Launch notebook for experimentation
172+
uv run $(PYTHON_ARG) --all-extras --group notebook jupyter lab --notebook-dir=notebooks
172173

173-
notebook-infra: notebook-install test-integration-setup ## Launch notebook with integration test infra (Spark, Iceberg Rest Catalog, object storage, etc.)
174-
uv run jupyter lab --notebook-dir=notebooks
174+
notebook-infra: test-integration-setup ## Launch notebook with integration test infra (Spark, Iceberg Rest Catalog, object storage, etc.)
175+
uv run $(PYTHON_ARG) --all-extras --group notebook jupyter lab --notebook-dir=notebooks
175176

176177
# ===================
177178
# Project Maintenance
@@ -189,6 +190,8 @@ clean: ## Remove build artifacts and caches
189190
@find . -name "*.pyo" -exec echo Deleting {} \; -delete
190191
@echo "Cleaning up Jupyter notebook checkpoints..."
191192
@find . -name ".ipynb_checkpoints" -exec echo Deleting {} \; -exec rm -rf {} +
193+
@echo "Cleaning up coverage files..."
194+
@rm -rf .coverage .coverage.* htmlcov/ coverage.xml
192195
@echo "Cleanup complete."
193196

194197
uv-lock: ## Regenerate uv.lock file from pyproject.toml

mkdocs/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,5 @@ The pyiceberg docs are stored in `docs/`.
2222
## Running docs locally
2323

2424
```sh
25-
make docs-install
2625
make docs-serve
2726
```

0 commit comments

Comments
 (0)