Skip to content

Commit 5bc4da1

Browse files
author
Shane Borden
committed
Revert "update make process"
This reverts commit 17e1725.
1 parent 17e1725 commit 5bc4da1

File tree

4 files changed

+19
-158
lines changed

4 files changed

+19
-158
lines changed

Makefile

Lines changed: 18 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,11 @@
1-
SHELL := /bin/bash
2-
3-
# -----------------------------------------------------------------------------
4-
# Display Formatting and Colors
5-
# -----------------------------------------------------------------------------
6-
BLUE := $(shell printf "\033[1;34m")
7-
GREEN := $(shell printf "\033[1;32m")
8-
RED := $(shell printf "\033[1;31m")
9-
YELLOW := $(shell printf "\033[1;33m")
10-
NC := $(shell printf "\033[0m")
11-
INFO := $(shell printf "$(BLUE)$(NC)")
12-
OK := $(shell printf "$(GREEN)$(NC)")
13-
WARN := $(shell printf "$(YELLOW)$(NC)")
14-
ERROR := $(shell printf "$(RED)$(NC)")
15-
16-
# =============================================================================
17-
# Configuration and Environment Variables
18-
# =============================================================================
191
.DEFAULT_GOAL:=help
202
.ONESHELL:
21-
.EXPORT_ALL_VARIABLES:
22-
MAKEFLAGS += --no-print-directory
23-
24-
USING_NPM = $(shell python3 -c "if __import__('pathlib').Path('package-lock.json').exists(): print('yes')")
25-
ENV_PREFIX =.venv/bin/
26-
VENV_EXISTS = $(shell python3 -c "if __import__('pathlib').Path('.venv/bin/activate').exists(): print('yes')")
27-
NODE_MODULES_EXISTS = $(shell python3 -c "if __import__('pathlib').Path('node_modules').exists(): print('yes')")
28-
BUILD_DIR =dist
29-
COLLECTOR_PACKAGE =sql-scripts
30-
BASE_DIR =$(shell pwd)
31-
3+
VENV_EXISTS=$(shell python3 -c "if __import__('pathlib').Path('.venv/bin/activate').exists(): print('yes')")
4+
VERSION := $(shell grep -m 1 current_version .bumpversion.cfg | tr -s ' ' | tr -d '"' | tr -d "'" | cut -d' ' -f3)
5+
BUILD_DIR=dist
6+
COLLECTOR_PACKAGE=sql-scripts
7+
BASE_DIR=$(shell pwd)
8+
329
.EXPORT_ALL_VARIABLES:
3310

3411
ifndef VERBOSE
@@ -38,46 +15,15 @@ endif
3815
REPO_INFO ?= $(shell git config --get remote.origin.url)
3916
COMMIT_SHA ?= git-$(shell git rev-parse --short HEAD)
4017

41-
# =============================================================================
42-
# Help and Documentation
43-
# =============================================================================
44-
4518
help: ## Display this help
4619
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z0-9_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
4720

48-
# =============================================================================
49-
# Developer Utils
50-
# =============================================================================
51-
install-pipx: ## Install pipx
52-
@python3 -m pip install --upgrade --user pipx
53-
54-
install-hatch: ## Install Hatch, UV, and Ruff
55-
@sh ./tools/install-hatch.sh
56-
57-
configure-hatch: ## Configure Hatch defaults
58-
@hatch config set dirs.env.virtual .direnv
59-
@hatch config set dirs.env.pip-compile .direnv
60-
61-
upgrade-hatch: ## Update Hatch, UV, and Ruff
62-
@hatch self update
63-
21+
.PHONY: install
6422
install: ## Install the project in dev mode.
65-
@if [ "$(VENV_EXISTS)" ]; then echo "=> Removing existing virtual environment"; $(MAKE) destroy-venv; fi
66-
@$(MAKE) clean
67-
@if ! hatch --version > /dev/null; then echo '=> Installing `hatch`'; $(MAKE) install-hatch ; fi
68-
@echo "=> Creating Python environments..."
69-
@$(MAKE) configure-hatch
70-
@hatch env create local
71-
@echo "=> Install complete! Note: If you want to re-install re-run 'make install'"
72-
# .venv/bin/pip install -U wheel setuptools cython pip mypy sqlfluff && .venv/bin/pip install -U -r requirements.txt -r requirements-docs.txt
73-
74-
.PHONY: upgrade
75-
upgrade: ## Upgrade all dependencies to the latest stable versions
76-
@echo "=> Updating all dependencies"
77-
@echo "=> Python Dependencies Updated"
78-
@hatch run lint:pre-commit autoupdate
79-
@echo "=> Updated Pre-commit"
80-
@$(MAKE) install
23+
@if [ "$(VENV_EXISTS)" ]; then source .venv/bin/activate; fi
24+
@if [ ! "$(VENV_EXISTS)" ]; then python3 -m venv .venv && source .venv/bin/activate; fi
25+
.venv/bin/pip install -U wheel setuptools cython pip mypy sqlfluff && .venv/bin/pip install -U -r requirements.txt -r requirements-docs.txt
26+
@echo "=> Build environment installed successfully. ** If you want to re-install or update, 'make install'"
8127

8228
.PHONY: clean
8329
clean: ## Cleanup temporary build artifacts
@@ -92,21 +38,6 @@ clean: ## Cleanup temporary build a
9238
@find . -name '.ipynb_checkpoints' -exec rm -rf {} + >/dev/null 2>&1
9339
@echo "${OK} Working directory cleaned"
9440

95-
deep-clean: clean destroy-venv destroy-node_modules ## Clean everything up
96-
@hatch python remove all
97-
@echo "=> Hatch environments pruned and python installations trimmed"
98-
@uv cache clean
99-
@echo "=> UV Cache cleaned successfully"
100-
101-
destroy-venv: ## Destroy the virtual environment
102-
@hatch env prune
103-
@hatch env remove lint
104-
@rm -Rf .venv
105-
@rm -Rf .direnv
106-
107-
destroy-node_modules: ## Destroy the node environment
108-
@rm -rf node_modules .astro
109-
11041
.PHONY: clean-sqlscripts
11142
clean-sqlscripts:
11243
@echo "=> Cleaning previous build artifacts for sql scripts..."
@@ -163,14 +94,6 @@ package-sqlscripts:
16394
.PHONY: build
16495
build: build-sqlscripts ## Build and package the collectors
16596

166-
.PHONY: pre-release
167-
pre-release: ## bump the version and create the release tag
168-
make docs
169-
make clean
170-
hatch run local:bump2version $(increment)
171-
head .bumpversion.cfg | grep ^current_version
172-
make build
173-
17497

17598
###############
17699
# docs #
@@ -200,4 +123,10 @@ docs: ## generate HTML documentation and serve it to the browser
200123
./.venv/bin/mkdocs build
201124
./.venv/bin/mkdocs serve
202125

203-
126+
.PHONY: pre-release
127+
pre-release: ## bump the version and create the release tag
128+
make gen-docs
129+
make clean
130+
.venv/bin/bump2version $(increment)
131+
head .bumpversion.cfg | grep ^current_version
132+
make build

site/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,5 +206,5 @@ <h4 class="modal-title" id="keyboardModalLabel">Keyboard Shortcuts</h4>
206206

207207
<!--
208208
MkDocs version : 1.6.1
209-
Build Date UTC : 2025-09-18 15:17:47.666795+00:00
209+
Build Date UTC : 2025-04-25 19:16:19.425824+00:00
210210
-->

site/sitemap.xml.gz

0 Bytes
Binary file not shown.

tools/install-hatch.sh

Lines changed: 0 additions & 68 deletions
This file was deleted.

0 commit comments

Comments
 (0)