Repository navigation
Make Pasteup an installable package and rename it everywhere - #1
Merged
Merged
Conversation
The code moves from image_grid_app/app, a top-level package named `app`, to src/pasteup, and the tests to the repository root. Installing used to mean cloning, `cd image_grid_app` and running uvicorn on a module path; a package called `app` would also collide with anything else of that name once installed. - pyproject.toml replaces requirements.txt, requirements-dev.txt and ruff.toml: the same pinned dependencies, a `dev` extra for the test tools, and the ruff and pytest settings. Built with hatchling, which ships the templates and static files inside the package. - `pasteup` (also `python -m pasteup`) serves the app on 127.0.0.1:8000, with --host, --port, --reload and --version. Listening anywhere else prints a warning pointing at SECURITY.md. - Tests import the installed package; the UI string tests read the template and script through importlib.resources, so they now also prove both ship. - CI does a regular, not editable, install before testing, so a file left out of the built package fails the build. No behaviour changes beyond how it is installed and started. The visible "Image Grid App" naming is renamed in the next commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E6aBDEnU4vqKQ4F9cnJMrL
The visible name, settings and docs still said Image Grid App. - The page title, heading and window label read Pasteup, and the API docs show Pasteup with the package version. - Environment variables become PASTEUP_INPUT_FOLDER and PASTEUP_ALLOWED_HOSTS. The old IMAGE_GRID_* names are not read any more; nothing outside this project used them. - The theme preference is stored under `pasteup-theme`, so a theme chosen in the old app is asked for once more. - The README now opens with what Pasteup does, then how to install it and start it with `pasteup`, and how to develop on it. The separate app README is folded in: its project layout and its notes on how mullion loads images were the only parts not already covered. SECURITY.md shows the `pasteup` command. Function names such as compose_image_grids describe what the code does, not the project, and stay as they are. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E6aBDEnU4vqKQ4F9cnJMrL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Turns the imported Image Grid App code into Pasteup. It can be installed with
pip install .and started with apasteupcommand, and it says Pasteup everywhere a user looks. There are two commits: a structural move, then the rename.Make it installable (
9068c3a)image_grid_app/app(a top-level package namedapp, which would collide once installed) tosrc/pasteup. The tests move totests/.pyproject.tomlreplacesrequirements.txt,requirements-dev.txtandruff.toml. It keeps the same pinned dependencies, adds adevextra for the test tools, and holds the ruff and pytest settings. It is built with hatchling, which ships the templates and static files inside the package.pasteupcommand (alsopython -m pasteup) serves the app on 127.0.0.1:8000. It takes--host,--port,--reloadand--version. Listening on any other host prints a warning that points to SECURITY.md.importlib.resources, so they also prove both files ship.Rename to Pasteup (
a342ce1)IMAGE_GRID_INPUT_FOLDERandIMAGE_GRID_ALLOWED_HOSTSbecomePASTEUP_INPUT_FOLDERandPASTEUP_ALLOWED_HOSTS.pasteup-theme.pasteupcommand.Behaviour changes
pasteupinstead ofcd image_grid_app && uvicorn app.main:app.PASTEUP_INPUT_FOLDER; the oldIMAGE_GRID_*variables are not read any more.Testing
ruff check .is clean andpytestpasses 136 tests (the original 130, plus 4 for the command and 2 for packaged assets and the title). The tests import from site-packages, notsrc/.pasteupentry point. Its metadata lists Apache-2.0, Python ≥ 3.11 and the pinned dependencies.pasteupcommand and drove it in headless Chromium:PASTEUP_INPUT_FOLDERprefills the fieldpage_001.jpgandpreview.mp4pasteup-theme🤖 Generated with Claude Code
https://claude.ai/code/session_01E6aBDEnU4vqKQ4F9cnJMrL
Generated by Claude Code