File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -131,6 +131,11 @@ jobs:
131131 docker push $DOCKER_BUILD_REPOSITORY:amd64
132132 #docker tag $DOCKER_BUILD_REPOSITORY:arm64-$SHORT_SHA $DOCKER_BUILD_REPOSITORY:arm64
133133 #docker push $DOCKER_BUILD_REPOSITORY:arm64
134+ - name : Extract version from __version__.py
135+ id : extract-version
136+ run : |
137+ VERSION=$(grep -oP "(?<=^__version__ = ')[^']+" prepline_general/__version__.py)
138+ echo "VERSION=$VERSION" >> $GITHUB_ENV
134139 - name : Push multiarch manifest
135140 run : |
136141 #docker manifest create ${DOCKER_REPOSITORY}:latest $DOCKER_BUILD_REPOSITORY:amd64 $DOCKER_BUILD_REPOSITORY:arm64
@@ -139,7 +144,6 @@ jobs:
139144 #docker manifest create ${DOCKER_REPOSITORY}:$SHORT_SHA $DOCKER_BUILD_REPOSITORY:amd64 $DOCKER_BUILD_REPOSITORY:arm64
140145 docker manifest create ${DOCKER_REPOSITORY}:$SHORT_SHA $DOCKER_BUILD_REPOSITORY:amd64
141146 docker manifest push $DOCKER_REPOSITORY:$SHORT_SHA
142- VERSION=$(grep -m1 version preprocessing-pipeline-family.yaml | cut -d ' ' -f2)
143147 #docker manifest create ${DOCKER_REPOSITORY}:$VERSION $DOCKER_BUILD_REPOSITORY:amd64 $DOCKER_BUILD_REPOSITORY:arm64
144148 docker manifest create ${DOCKER_REPOSITORY}:$VERSION $DOCKER_BUILD_REPOSITORY:amd64
145149 docker manifest push ${DOCKER_REPOSITORY}:$VERSION
Original file line number Diff line number Diff line change @@ -136,7 +136,6 @@ check-version:
136136# Fail if syncing version would produce changes
137137 scripts/version-sync.sh -c \
138138 -s CHANGELOG.md \
139- -f preprocessing-pipeline-family.yaml release \
140139 -f ${PACKAGE_NAME}/api/app.py release \
141140 -f ${PACKAGE_NAME}/api/general.py release
142141
@@ -145,6 +144,5 @@ check-version:
145144version-sync :
146145 scripts/version-sync.sh \
147146 -s CHANGELOG.md \
148- -f preprocessing-pipeline-family.yaml release \
149147 -f ${PACKAGE_NAME} /api/app.py release \
150148 -f ${PACKAGE_NAME} /api/general.py release
Original file line number Diff line number Diff line change 1+ __version__ = "0.0.85" # pragma: no cover
Original file line number Diff line number Diff line change 3333from starlette .datastructures import Headers
3434from starlette .types import Send
3535
36+ from prepline_general .__version__ import __version__ as API_VERSION
3637from prepline_general .api .models .form_params import GeneralFormParams
3738from prepline_general .api .filetypes import get_validated_mimetype
3839from unstructured .documents .elements import Element
@@ -602,7 +603,7 @@ def return_content_type(filename: str):
602603
603604
604605@router .get ("/general/v0/general" , include_in_schema = False )
605- @router .get ("/general/v0.0.84 /general" , include_in_schema = False )
606+ @router .get (f "/general/{ API_VERSION } /general" , include_in_schema = False )
606607async def handle_invalid_get_request ():
607608 raise HTTPException (
608609 status_code = status .HTTP_405_METHOD_NOT_ALLOWED , detail = "Only POST requests are supported."
@@ -617,7 +618,7 @@ async def handle_invalid_get_request():
617618 description = "Description" ,
618619 operation_id = "partition_parameters" ,
619620)
620- @router .post ("/general/v0.0.84 /general" , include_in_schema = False )
621+ @router .post (f "/general/{ API_VERSION } /general" , include_in_schema = False )
621622def general_partition (
622623 request : Request ,
623624 # cannot use annotated type here because of a bug described here:
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments