From 5d893575d6c7d43fc9850bd1cba4894696ea080e Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 31 Jul 2026 19:00:41 +0000 Subject: [PATCH 1/2] build: Replace Makefile with justfile Migrate the primary development tasks from make to just: - Add a justfile with the build, format, lint, test, watch, and version recipes, keeping the quiet output of the Makefile's @-prefixed rules. - Install just in CI via the shared setup action and in the devcontainer. - Point the workflows, the postgenerate npm script, the README, and .editorconfig at just. The tag message in the version recipe is now the version, as intended. In the Makefile, `-m "$(poetry version -s)"` was expanded by make rather than the shell, so it produced an empty message. --- .devcontainer/Dockerfile | 5 +++++ .devcontainer/devcontainer.json | 1 + .editorconfig | 4 ++-- .github/actions/setup/action.yml | 8 ++++++++ .github/workflows/_build.yml | 2 +- .github/workflows/check.yml | 4 ++-- .github/workflows/format.yml | 2 +- .github/workflows/version.yml | 2 +- Makefile | 27 --------------------------- README.rst | 13 +++++++------ justfile | 25 +++++++++++++++++++++++++ package.json | 2 +- 12 files changed, 54 insertions(+), 41 deletions(-) delete mode 100644 Makefile create mode 100644 justfile diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index de3d9301..86685398 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -5,6 +5,8 @@ FROM mcr.microsoft.com/vscode/devcontainers/python:${VARIANT} ARG NODE_VERSION="24" ARG POETRY_VERSION="1.8.2" ARG POETRY_SRC="https://install.python-poetry.org" +ARG JUST_VERSION="1.57.0" +ARG JUST_SRC="https://just.systems/install.sh" # https://github.com/microsoft/vscode-dev-containers/blob/main/containers/go/.devcontainer/base.Dockerfile ENV USERNAME=vscode @@ -25,6 +27,9 @@ RUN curl -fsSL -o install-poetry.py "${POETRY_SRC}" \ && python install-poetry.py --version $POETRY_VERSION \ && rm install-poetry.py +RUN mkdir -p .local/bin \ + && curl -fsSL "${JUST_SRC}" | bash -s -- --tag "${JUST_VERSION}" --to /home/vscode/.local/bin + RUN mkdir -p .config/git \ && echo ".vscode/*" >> .config/git/ignore \ && echo "*.code-workspace" >> .config/git/ignore \ diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 0d6bb46e..a7acd733 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -4,6 +4,7 @@ "build": { "dockerfile": "Dockerfile", "args": { + "JUST_VERSION": "1.57.0", "NODE_VERSION": "24", "POETRY_VERSION": "1.8.2", "VARIANT": "3.12" diff --git a/.editorconfig b/.editorconfig index 2e0d78c1..c2e9c672 100644 --- a/.editorconfig +++ b/.editorconfig @@ -11,5 +11,5 @@ indent_size = 2 [*.py] indent_size = 4 -[Makefile] -indent_style = tab +[justfile] +indent_size = 4 diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 7ca55902..8f000cae 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -11,6 +11,10 @@ inputs: description: The Poetry version. required: false default: '1.8.2' + just_version: + description: The just version. + required: false + default: '1.57.0' install_dependencies: description: Install dependencies. required: false @@ -36,6 +40,10 @@ runs: ~/.local/bin ~/.local/share/pypoetry ~/Library/Application Support/pypoetry + - name: Setup just + uses: extractions/setup-just@v4 + with: + just-version: ${{ inputs.just_version }} - name: Setup Python uses: actions/setup-python@v5 with: diff --git a/.github/workflows/_build.yml b/.github/workflows/_build.yml index bca79cf0..8324ef2f 100644 --- a/.github/workflows/_build.yml +++ b/.github/workflows/_build.yml @@ -37,7 +37,7 @@ jobs: with: python_version: ${{ inputs.python_version }} - name: Build - run: make build + run: just build - name: Upload artifact uses: actions/upload-artifact@v7 if: inputs.upload_artifact == 'true' diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 82a1dff6..f756a8dd 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -36,7 +36,7 @@ jobs: - name: Setup Node.js uses: ./.github/actions/setup-node - name: Test - run: make test + run: just test lint: name: Lint (Python ${{ matrix.python }}) runs-on: ubuntu-latest @@ -55,7 +55,7 @@ jobs: with: python_version: ${{ matrix.python }} - name: Lint - run: make lint + run: just lint build: name: Build (Python ${{ matrix.python }} on ${{ matrix.os_name }}) uses: ./.github/workflows/_build.yml diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 6545c77e..3e8d2855 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -32,7 +32,7 @@ jobs: - name: Setup Node.js uses: ./.github/actions/setup-node - name: Format - run: make format + run: just format - name: Format with Prettier run: npm run format - name: Commit diff --git a/.github/workflows/version.yml b/.github/workflows/version.yml index d966596a..f12c5dff 100644 --- a/.github/workflows/version.yml +++ b/.github/workflows/version.yml @@ -34,4 +34,4 @@ jobs: - name: Cut ${{ github.event.inputs.version }} version run: | poetry version "${{ github.event.inputs.version }}" - make version + just version diff --git a/Makefile b/Makefile deleted file mode 100644 index b77a4ce6..00000000 --- a/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -all: build - -build: - @rm -rf dist - @poetry build - -format: - @poetry run black . - -lint: - @poetry run pylint ./seam ./test - @poetry run black --check . - @poetry run rstcheck README.rst - -test: - @poetry run pytest --cov=./seam - -watch: - @poetry run ptw - -version: - @git add pyproject.toml - @git commit -m "$$(poetry version -s)" - @git tag --sign "v$$(poetry version -s)" -m "$(poetry version -s)" - @git push --follow-tags - -.PHONY: build format lint test watch version diff --git a/README.rst b/README.rst index 948a6443..d3f7c52e 100644 --- a/README.rst +++ b/README.rst @@ -452,9 +452,9 @@ Run each command below in a separate terminal window: :: - $ make watch + $ just watch -Primary development tasks are defined in the ``Makefile``. +Primary development tasks are defined in the ``justfile``. Source Code ~~~~~~~~~~~ @@ -471,7 +471,7 @@ Clone the project with Requirements ~~~~~~~~~~~~ -You will need `Python 3`_ and Poetry_ and Node.js_ with npm_. +You will need `Python 3`_ and Poetry_ and Node.js_ with npm_ and just_. Install the development dependencies with @@ -480,6 +480,7 @@ Install the development dependencies with $ poetry install $ npm install +.. _just: https://just.systems/ .. _Node.js: https://nodejs.org/ .. _npm: https://www.npmjs.com/ .. _Poetry: https://poetry.eustace.io/ @@ -492,20 +493,20 @@ Lint code with :: - $ make lint + $ just lint Run tests with :: - $ make test + $ just test Run tests on changes with :: - $ make watch + $ just watch Publishing ~~~~~~~~~~ diff --git a/justfile b/justfile new file mode 100644 index 00000000..2b4b6962 --- /dev/null +++ b/justfile @@ -0,0 +1,25 @@ +default: build + +@build: + rm -rf dist + poetry build + +@format: + poetry run black . + +@lint: + poetry run pylint ./seam ./test + poetry run black --check . + poetry run rstcheck README.rst + +@test: + poetry run pytest --cov=./seam + +@watch: + poetry run ptw + +@version: + git add pyproject.toml + git commit -m "$(poetry version -s)" + git tag --sign "v$(poetry version -s)" -m "$(poetry version -s)" + git push --follow-tags diff --git a/package.json b/package.json index bfa2768f..1a816343 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "scripts": { "generate": "tsx codegen/smith.ts", "pregenerate": "node generate-readme-toc.js", - "postgenerate": "make format", + "postgenerate": "just format", "typecheck": "tsc", "lint": "eslint .", "postlint": "prettier --check --ignore-path .gitignore --ignore-path .prettierignore .", From 80e07310aceaad3a34f4618d360d4cac882de47a Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 31 Jul 2026 20:54:40 +0000 Subject: [PATCH 2/2] build: Install just from apt in the devcontainer The base image resolves to Debian trixie, which packages just, so drop the install script and version pin in favor of apt. --- .devcontainer/Dockerfile | 9 ++++----- .devcontainer/devcontainer.json | 1 - 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 86685398..c06a52f4 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -5,8 +5,6 @@ FROM mcr.microsoft.com/vscode/devcontainers/python:${VARIANT} ARG NODE_VERSION="24" ARG POETRY_VERSION="1.8.2" ARG POETRY_SRC="https://install.python-poetry.org" -ARG JUST_VERSION="1.57.0" -ARG JUST_SRC="https://just.systems/install.sh" # https://github.com/microsoft/vscode-dev-containers/blob/main/containers/go/.devcontainer/base.Dockerfile ENV USERNAME=vscode @@ -20,6 +18,10 @@ RUN bash /tmp/library-scripts/node-debian.sh "${NVM_DIR}" "${NODE_VERSION}" "${U && apt-get clean -y && rm -rf /var/lib/apt/lists/* \ && rm -rf /tmp/library-scripts +RUN apt-get update -y \ + && apt-get install -y --no-install-recommends just \ + && apt-get clean -y && rm -rf /var/lib/apt/lists/* + USER vscode WORKDIR /home/vscode @@ -27,9 +29,6 @@ RUN curl -fsSL -o install-poetry.py "${POETRY_SRC}" \ && python install-poetry.py --version $POETRY_VERSION \ && rm install-poetry.py -RUN mkdir -p .local/bin \ - && curl -fsSL "${JUST_SRC}" | bash -s -- --tag "${JUST_VERSION}" --to /home/vscode/.local/bin - RUN mkdir -p .config/git \ && echo ".vscode/*" >> .config/git/ignore \ && echo "*.code-workspace" >> .config/git/ignore \ diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index a7acd733..0d6bb46e 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -4,7 +4,6 @@ "build": { "dockerfile": "Dockerfile", "args": { - "JUST_VERSION": "1.57.0", "NODE_VERSION": "24", "POETRY_VERSION": "1.8.2", "VARIANT": "3.12"