Skip to content

Make Pasteup an installable package and rename it everywhere - #1

Merged
ftymoshchuk merged 2 commits into
mainfrom
claude/affectionate-dirac-bdukrw
Oct 16, 2026
Merged

ftymoshchuk merged 2 commits into
mainfrom
claude/affectionate-dirac-bdukrw

Conversation

@ftymoshchuk

Copy link
Copy Markdown
Owner

Turns the imported Image Grid App code into Pasteup. It can be installed with pip install . and started with a pasteup command, and it says Pasteup everywhere a user looks. There are two commits: a structural move, then the rename.

Make it installable (9068c3a)

  • Layout. The code moves from image_grid_app/app (a top-level package named app, which would collide once installed) to src/pasteup. The tests move to tests/.
  • Configuration. pyproject.toml replaces requirements.txt, requirements-dev.txt and ruff.toml. It keeps the same pinned dependencies, adds a dev extra 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.
  • The pasteup command (also python -m pasteup) serves the app on 127.0.0.1:8000. It takes --host, --port, --reload and --version. Listening on any other host prints a warning that points to SECURITY.md.
  • Tests import the installed package. The UI tests read the template and script through importlib.resources, so they also prove both files ship.
  • CI now does a regular, not editable, install before testing. A file missing from the built package fails the build.

Rename to Pasteup (a342ce1)

  • The page title, heading and window label say Pasteup. The API docs show Pasteup with the package version.
  • IMAGE_GRID_INPUT_FOLDER and IMAGE_GRID_ALLOWED_HOSTS become PASTEUP_INPUT_FOLDER and PASTEUP_ALLOWED_HOSTS.
  • The theme preference key becomes pasteup-theme.
  • The README now opens with what Pasteup does, then how to install, run and develop it. The separate app README is folded in, and SECURITY.md uses the pasteup command.

Behaviour changes

  • Start the app with pasteup instead of cd image_grid_app && uvicorn app.main:app.
  • To prefill your folder, set PASTEUP_INPUT_FOLDER; the old IMAGE_GRID_* variables are not read any more.
  • A theme chosen in the old app has to be picked once more.

Testing

  • On Python 3.11 and 3.13, using a regular install exactly as CI does it, ruff check . is clean and pytest passes 136 tests (the original 130, plus 4 for the command and 2 for packaged assets and the title). The tests import from site-packages, not src/.
  • The first commit passes its 135 tests on its own.
  • The built wheel holds the templates, CSS, JS, LICENSE and the pasteup entry point. Its metadata lists Apache-2.0, Python ≥ 3.11 and the pinned dependencies.
  • End to end, I started the installed pasteup command and drove it in headless Chromium:
    • the tab, heading and API docs read Pasteup 0.1.0
    • PASTEUP_INPUT_FOLDER prefills the field
    • a scan and a generation with video produced page_001.jpg and preview.mp4
    • the theme is saved under pasteup-theme
    • there were no script errors

🤖 Generated with Claude Code

https://claude.ai/code/session_01E6aBDEnU4vqKQ4F9cnJMrL


Generated by Claude Code

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
@ftymoshchuk
ftymoshchuk merged commit fbebdd3 into main Oct 16, 2026
2 checks passed
@ftymoshchuk
ftymoshchuk deleted the claude/affectionate-dirac-bdukrw branch October 16, 2026 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants