Skip to content

refactor: move the FastAPI server to pylinkage-editor - #48

Merged
HugoFara merged 1 commit into
mainfrom
refactor/remove-api-server
Sep 12, 2026
Merged

HugoFara merged 1 commit into
mainfrom
refactor/remove-api-server

Conversation

@HugoFara

Copy link
Copy Markdown
Owner

Summary

Removes api/, the [api] extra and task api. The FastAPI server was the backend of pylinkage-editor and nothing else; it now lives there as server/, with pylinkage as a dependency (HugoFara/pylinkage-editor#2). This repository is a library again.

Closes #46.

Why remove rather than deprecate

The deprecation policy in docs/source/deprecations.md covers public names. api/ was not one:

  • It was never in the wheel (packages = ["src/pylinkage"]). pip install pylinkage[api] installed fastapi and uvicorn for code that was not there. There is no installed user to break.
  • It was api.main:app, a top-level package that only resolved from a checkout — not pylinkage.anything.
  • It had one consumer, the editor, whose only coupling is a proxy to localhost:8000.

Dropping the extra is not breaking either: pip warns does not provide the extra 'api' and continues.

Anyone running it from a checkout: cd pylinkage-editor/server && uv run pylinkage-editor-server replaces uv run task api. That's in the changelog under ### Removed.

Also

  • The CONTRIBUTING section "Running the Web App" described a frontend/ directory and a task frontend, neither of which existed. Replaced with a pointer to the editor repository.
  • README's pylinkage-editor entry says where the backend lives.
  • uv.lock loses the fastapi/uvicorn/starlette subtree.

Sequencing

The editor's server depends on crank_angle_limits (#47, merged). Its CI will fail until 1.2.0 is on PyPI, so: merge this → cut 1.2.0 → merge the editor PR.

Verification

  • ruff, mypy clean; uv sync resolves.
  • No remaining references to api/, task api or the extra outside the changelog.

api/ was the backend of pylinkage-editor and nothing else. It was never
part of the wheel, so pip install pylinkage[api] installed fastapi and
uvicorn for code that was not there, and anyone setting up the editor
had to find the server by reading this repository's source (#46). It
now lives in pylinkage-editor/server with pylinkage as a dependency,
and this repository is a library again.

Removed with it: the [api] extra, task api, and a CONTRIBUTING section
that still described a frontend/ directory and a task frontend, neither
of which existed. README and CONTRIBUTING point at the editor instead.

Not a breaking change: no public name goes away. pip warns on an
unknown extra and continues.

Closes #46.
@HugoFara HugoFara added the code issue Code is not wrong, but something is off label Sep 12, 2026
@HugoFara
HugoFara merged commit 2d50ce5 into main Sep 12, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code issue Code is not wrong, but something is off

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document Update: server mode

1 participant