diff --git a/.github/python-check-autogen.yml b/.github/python-check-autogen.yml deleted file mode 100644 index 04dee6c5..00000000 --- a/.github/python-check-autogen.yml +++ /dev/null @@ -1,60 +0,0 @@ -name: Check python autogenerated code is in sync -on: - push: - branches: - - "main" - paths-ignore: - - "LICENSE*" - - "**.gitignore" - - "**.md" - - "**.txt" - - ".github/ISSUE_TEMPLATE/**" - - ".github/dependabot.yml" - - "docs/**" - pull_request: - paths: - - "clients/python/src/mr_openapi/**" - - "api/openapi/model-registry.yaml" - -jobs: - check-autogen: - name: Check autogenerated code is in sync - runs-on: ubuntu-latest - steps: - - name: Check out the repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.12" - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: "20" - - name: Upgrade pip - run: | - pip install --constraint=.github/workflows/constraints.txt pip - pip --version - - name: Install Poetry - run: | - pipx install --pip-args=--constraint=${{ github.workspace }}/.github/workflows/constraints.txt poetry - poetry --version - - name: Install openapi-generator-cli - run: | - make bin/openapi-generator-cli - - name: Generate Python client - working-directory: clients/python - run: | - make clean install tidy - - name: Check if there are uncommitted file changes - run: | - clean=$(git status --porcelain) - if [[ -z "$clean" ]]; then - echo "Empty git status --porcelain: $clean" - else - echo "Uncommitted file changes detected: $clean" - git diff - exit 1 - fi diff --git a/clients/python/Makefile b/clients/python/Makefile index dd687ac5..f4b8f32d 100644 --- a/clients/python/Makefile +++ b/clients/python/Makefile @@ -5,7 +5,7 @@ IMG_VERSION ?= latest .PHONY: install install: ../../bin/openapi-generator-cli generate -i ../../api/openapi/model-registry.yaml -g python -o src/ --package-name mr_openapi --additional-properties=library=asyncio,generateSourceCodeOnly=true,useOneOfDiscriminatorLookup=true --template-dir templates/ - mv src/mr_openapi{_,/}README.md + mv src/mr_openapi_README.md src/mr_openapi/README.md git apply patches/* poetry install