Skip to content

Better versioning #515

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## 0.0.86
## 0.0.87
* Patch various CVEs
* Enable pytest concurrency
* Enable Claude Code
* Use Python 3.12 for testing
* Define version in one place

## 0.0.86
* Patch various CVEs
Expand Down
6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,12 @@ check-version:
scripts/version-sync.sh -c \
-s CHANGELOG.md \
-f preprocessing-pipeline-family.yaml release \
-f ${PACKAGE_NAME}/api/app.py release \
-f ${PACKAGE_NAME}/api/general.py release
-f prepline_general/api/__version__.py release \

## version-sync: update references to version with most recent version from CHANGELOG.md
.PHONY: version-sync
version-sync:
scripts/version-sync.sh \
-s CHANGELOG.md \
-f preprocessing-pipeline-family.yaml release \
-f ${PACKAGE_NAME}/api/app.py release \
-f ${PACKAGE_NAME}/api/general.py release
-f prepline_general/api/__version__.py release \
1 change: 1 addition & 0 deletions prepline_general/api/__version__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "0.0.87" # pragma: no cover
3 changes: 2 additions & 1 deletion prepline_general/api/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@

from .general import router as general_router
from .openapi import set_custom_openapi
from prepline_general.api import __version__ as api_version

logger = logging.getLogger("unstructured_api")

app = FastAPI(
title="Unstructured Pipeline API",
summary="Partition documents with the Unstructured library",
version="0.0.86",
version=str(api_version),
docs_url="/general/docs",
openapi_url="/general/openapi.json",
servers=[
Expand Down
5 changes: 3 additions & 2 deletions prepline_general/api/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
elements_from_json,
)
from unstructured_inference.models.base import UnknownModelException
from prepline_general.api import __version__ as api_version

app = FastAPI()
router = APIRouter()
Expand Down Expand Up @@ -600,7 +601,7 @@ def return_content_type(filename: str):


@router.get("/general/v0/general", include_in_schema=False)
@router.get("/general/v0.0.86/general", include_in_schema=False)
@router.get(f"/general/{api_version}/general", include_in_schema=False)
async def handle_invalid_get_request():
raise HTTPException(
status_code=status.HTTP_405_METHOD_NOT_ALLOWED, detail="Only POST requests are supported."
Expand All @@ -615,7 +616,7 @@ async def handle_invalid_get_request():
description="Description",
operation_id="partition_parameters",
)
@router.post("/general/v0.0.86/general", include_in_schema=False)
@router.post(f"/general/{api_version}/general", include_in_schema=False)
def general_partition(
request: Request,
# cannot use annotated type here because of a bug described here:
Expand Down
2 changes: 1 addition & 1 deletion preprocessing-pipeline-family.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
name: general
version: 0.0.86
version: 0.0.87
Loading