Skip to content

Commit 2738a7b

Browse files
committed
switch from generating openapi client to pulling it in from branch
1 parent ef79c7f commit 2738a7b

File tree

3 files changed

+47
-7
lines changed

3 files changed

+47
-7
lines changed
+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Client freeze test
2+
on: push
3+
4+
jobs:
5+
client-freeze-test:
6+
runs-on: ubuntu-latest
7+
8+
steps:
9+
- uses: actions/checkout@v4
10+
11+
- uses: actions/checkout@v4
12+
with:
13+
repository: populationgenomics/metamist
14+
ref: metamist-legacy-client/b142392
15+
path: metamist-legacy-client
16+
17+
- name: "Copy python api files"
18+
run: |
19+
cp -R metamist-legacy-client/api/ metamist/api/
20+
cp -R metamist-legacy-client/metamist/api/ metamist/api/
21+
cp -R metamist-legacy-client/metamist/apis/ metamist/apis/
22+
cp -R metamist-legacy-client/metamist/model/ metamist/model/
23+
cp -R metamist-legacy-client/metamist/models/ metamist/models/
24+
cp metamist-legacy-client/metamist/*.py metamist/
25+
26+
- name: "List"
27+
run: |
28+
ls -la metamist
29+
ls -la metamist/api
30+
ls -la metamist/apis
31+
ls -la metamist/models
32+
ls -la metamist/model

.github/workflows/deploy.yaml

+15
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,21 @@ jobs:
8181
-f deploy/api/Dockerfile \
8282
.
8383
84+
- uses: actions/checkout@v4
85+
with:
86+
repository: populationgenomics/metamist
87+
ref: metamist-legacy-client/b142392
88+
path: metamist-legacy-client
89+
90+
- name: "Copy python api files"
91+
run: |
92+
cp -R metamist-legacy-client/api/ metamist/api/
93+
cp -R metamist-legacy-client/metamist/api/ metamist/api/
94+
cp -R metamist-legacy-client/metamist/apis/ metamist/apis/
95+
cp -R metamist-legacy-client/metamist/model/ metamist/model/
96+
cp -R metamist-legacy-client/metamist/models/ metamist/models/
97+
cp metamist-legacy-client/metamist/*.py metamist/
98+
8499
- name: "build deployable API"
85100
run: |
86101
export OPENAPI_COMMAND="java -jar openapi-generator-cli.jar"

regenerate_api.py

-7
Original file line numberDiff line numberDiff line change
@@ -344,13 +344,6 @@ def main():
344344
try:
345345
assert_server_is_accessible()
346346

347-
# Generate the installable Python API
348-
generate_api_and_copy(
349-
'python',
350-
copy_python_files_from,
351-
['--template-dir', 'openapi-templates'],
352-
)
353-
354347
# Generate the Typescript API for React application
355348
generate_api_and_copy(
356349
'typescript-axios',

0 commit comments

Comments
 (0)