-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add script to generate replay files and generated replay files
- Loading branch information
1 parent
4718d26
commit 29ac11a
Showing
11 changed files
with
108 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"cookiecutter": { | ||
"project_name": "My FastAgency App", | ||
"project_slug": "my_fastagency_app", | ||
"app_type": "fastapi+mesop", | ||
"python_version": "3.10" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"cookiecutter": { | ||
"project_name": "My FastAgency App", | ||
"project_slug": "my_fastagency_app", | ||
"app_type": "fastapi+mesop", | ||
"python_version": "3.11" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"cookiecutter": { | ||
"project_name": "My FastAgency App", | ||
"project_slug": "my_fastagency_app", | ||
"app_type": "fastapi+mesop", | ||
"python_version": "3.12" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"cookiecutter": { | ||
"project_name": "My FastAgency App", | ||
"project_slug": "my_fastagency_app", | ||
"app_type": "mesop", | ||
"python_version": "3.10" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"cookiecutter": { | ||
"project_name": "My FastAgency App", | ||
"project_slug": "my_fastagency_app", | ||
"app_type": "mesop", | ||
"python_version": "3.11" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"cookiecutter": { | ||
"project_name": "My FastAgency App", | ||
"project_slug": "my_fastagency_app", | ||
"app_type": "mesop", | ||
"python_version": "3.12" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"cookiecutter": { | ||
"project_name": "My FastAgency App", | ||
"project_slug": "my_fastagency_app", | ||
"app_type": "nats+fastapi+mesop", | ||
"python_version": "3.10" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"cookiecutter": { | ||
"project_name": "My FastAgency App", | ||
"project_slug": "my_fastagency_app", | ||
"app_type": "nats+fastapi+mesop", | ||
"python_version": "3.11" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"cookiecutter": { | ||
"project_name": "My FastAgency App", | ||
"project_slug": "my_fastagency_app", | ||
"app_type": "nats+fastapi+mesop", | ||
"python_version": "3.12" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import json | ||
from pathlib import Path | ||
|
||
PROJECT_NAME = "My FastAgency App" | ||
PROJECT_SLUG = "my_fastagency_app" | ||
|
||
APP_TYPES = ["fastapi+mesop", "mesop", "nats+fastapi+mesop"] | ||
|
||
PYTHON_VERSIONS = ["3.12", "3.11", "3.10"] | ||
|
||
|
||
def generate_cookiecutter_replay(): | ||
for app_type in APP_TYPES: | ||
for python_version in PYTHON_VERSIONS: | ||
print(f"Generating cookiecutter replay for {app_type} with Python {python_version}") | ||
cookiecutter_replay = { | ||
"cookiecutter": { | ||
"project_name": PROJECT_NAME, | ||
"project_slug": PROJECT_SLUG, | ||
"app_type": app_type, | ||
"python_version": python_version, | ||
} | ||
} | ||
|
||
# Write to cookiecutter replay file | ||
replay_file = Path(__file__).parent.parent.resolve() / "cookiecutter_replay" / f"{app_type}_{python_version}.json" | ||
|
||
with open(replay_file, "w") as f: | ||
json.dump(cookiecutter_replay, f, indent=4) | ||
|
||
|
||
if __name__ == "__main__": | ||
generate_cookiecutter_replay() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
python3 scripts/generate_cookiecutter_replay.py |