Skip to content

Add api_prefix to public API#339

Merged
rwb27 merged 1 commit into
mainfrom
api-prefix-in-api
May 13, 2026
Merged

Add api_prefix to public API#339
rwb27 merged 1 commit into
mainfrom
api-prefix-in-api

Conversation

@rwb27
Copy link
Copy Markdown
Collaborator

@rwb27 rwb27 commented May 12, 2026

I've removed the leading _ from ThingServer.api_prefix in line with settings_folder and application_config, both of which are also taken from ThingServer._config. I have added all three of those properties, as well as things and debug to the Public API page of the docs.

In so doing, I've discovered the docstring for ThingServer.things is out of date, so it's updated too.

I realise _api_prefix is in the release candidate and used by the OFM, so I've left that symbol in with a DeprecationWarning. I'm equally happy to just get rid of it, if that doesn't complicate things - it's only in v0.2.0-rc1.

OFM Feature Branch: v3-labthings-rename-api-prefix

@barecheck
Copy link
Copy Markdown

barecheck Bot commented May 12, 2026

Barecheck - Code coverage report

Total: 96.86%

Your code coverage diff: 0.00% ▴

Uncovered files and lines
FileLines
src/labthings_fastapi/server/__init__.py305, 319-322

Comment thread src/labthings_fastapi/server/__init__.py Outdated
@rwb27 rwb27 force-pushed the api-prefix-in-api branch 2 times, most recently from 3a0a2bb to 027a616 Compare May 12, 2026 19:56
I've removed the leading `_` from `ThingServer.api_prefix` in line with `settings_folder` and `application_config`. I have added all three of those properties, as well as `things`, to the Public API page of the docs.

In so doing, I've discovered the docstring for ThingServer.things is out of date, so it's updated too.
@rwb27 rwb27 force-pushed the api-prefix-in-api branch from 027a616 to e1b64f7 Compare May 13, 2026 14:14
@rwb27 rwb27 requested a review from julianstirling May 13, 2026 14:20
@rwb27
Copy link
Copy Markdown
Collaborator Author

rwb27 commented May 13, 2026

@julianstirling I've removed the backwards-compatibility as discussed. Unfortunately as OFM now uses v0.2.0-rc1 that job fails, so I'd be keen to get rc2 (or even just v0.2.0) out and update OFM as soon as we can, so that job passes again for other PRs. The feature branch on OFM exists and passes in both places.

Copy link
Copy Markdown
Contributor

@julianstirling julianstirling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update

@rwb27 rwb27 merged commit 0e5841d into main May 13, 2026
14 of 16 checks passed
@rwb27 rwb27 deleted the api-prefix-in-api branch May 13, 2026 14:46
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