diff --git a/.idea/fastApiUnicado.iml b/.idea/fastApiUnicado.iml index 2c80e1269497d12e018fd6afa29982e56b0fb70d..ba8dfea4410631cdad6c13d1396f9c4446e86110 100644 --- a/.idea/fastApiUnicado.iml +++ b/.idea/fastApiUnicado.iml @@ -7,4 +7,7 @@ <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> </component> + <component name="PackageRequirementsSettings"> + <option name="removeUnused" value="true" /> + </component> </module> \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 9e3a0a98729c4a1c028858c5f53079bc0a969570..8a5b69e27df43096ee93b49ab0ee9588951348a7 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,9 +4,9 @@ <option name="autoReloadType" value="SELECTIVE" /> </component> <component name="ChangeListManager"> - <list default="true" id="ade4f2dd-968a-4099-9236-831254f6eb55" name="Changes" comment="bugfix utf-8 special char writing"> + <list default="true" id="ade4f2dd-968a-4099-9236-831254f6eb55" name="Changes" comment="add config for available modules and a small script to generate add exampale settings of modules"> + <change beforePath="$PROJECT_DIR$/.idea/fastApiUnicado.iml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/fastApiUnicado.iml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" /> </list> <option name="SHOW_DIALOG" value="false" /> <option name="HIGHLIGHT_CONFLICTS" value="true" /> @@ -19,6 +19,7 @@ <option value="FastAPI main" /> <option value="FastAPI test_main" /> <option value="Python Script" /> + <option value="Setup Script" /> </list> </option> </component> @@ -294,7 +295,7 @@ <workItem from="1725608860034" duration="12274000" /> <workItem from="1725871510924" duration="595000" /> <workItem from="1725956023581" duration="4552000" /> - <workItem from="1725970370723" duration="652000" /> + <workItem from="1725970370723" duration="1430000" /> </task> <task id="LOCAL-00001" summary="add update_Modules"> <option name="closed" value="true" /> @@ -368,7 +369,15 @@ <option name="project" value="LOCAL" /> <updated>1724139560160</updated> </task> - <option name="localTasksCounter" value="10" /> + <task id="LOCAL-00010" summary="add config for available modules and a small script to generate add exampale settings of modules"> + <option name="closed" value="true" /> + <created>1725971455637</created> + <option name="number" value="00010" /> + <option name="presentableId" value="LOCAL-00010" /> + <option name="project" value="LOCAL" /> + <updated>1725971455637</updated> + </task> + <option name="localTasksCounter" value="11" /> <servers /> </component> <component name="TypeScriptGeneratedFilesManager"> @@ -407,7 +416,8 @@ <MESSAGE value="added saving of the new config xml file" /> <MESSAGE value="add reset to default" /> <MESSAGE value="bugfix utf-8 special char writing" /> - <option name="LAST_COMMIT_MESSAGE" value="bugfix utf-8 special char writing" /> + <MESSAGE value="add config for available modules and a small script to generate add exampale settings of modules" /> + <option name="LAST_COMMIT_MESSAGE" value="add config for available modules and a small script to generate add exampale settings of modules" /> </component> <component name="com.intellij.coverage.CoverageDataManagerImpl"> <SUITE FILE_PATH="coverage/fastApiUnicado$fastApiUnicado.coverage" NAME="fastApiUnicado Coverage Results" MODIFIED="1725971234697" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="" /> diff --git a/main.py b/main.py index 95bdc13cd7e1d7d9eba2580266ea1964232725ad..87770460ab314d43ad44018aa10d9734bdd712e7 100644 --- a/main.py +++ b/main.py @@ -68,7 +68,7 @@ async def get_conv_modules(): @app.get("/modules") async def get_modules(): - with open("test", "r") as fp: + with open("tmp/modules", "r") as fp: modules = json.load(fp) return modules @@ -77,7 +77,7 @@ async def get_modules(): @app.put("/modules/update") async def update_modules(item:Modules): print(jsonable_encoder(item)) - with open("test", "w") as fp: + with open("tmp/modules", "w") as fp: json.dump(jsonable_encoder(item), fp) return item diff --git a/tmp/modules b/tmp/modules new file mode 100644 index 0000000000000000000000000000000000000000..8bca2044e84d941403947dd23542e7b6b9c3b7bc --- /dev/null +++ b/tmp/modules @@ -0,0 +1 @@ +{"groups": [{"name": "models from branches", "loop": "true", "loopsize": 1, "modules": ["initialSizing", "wingDesign", "createMissionXML", "systemsDesign", "calculatePolar", "calculatePerformance", "propulsionIntegration", "missionAnalysis", "weightAndBalanceAnalysis", "propulsionDesign"]}, {"name": "test1", "loop": "true", "loopsize": 1, "modules": ["landingGearDesign", "estimateDOC", "initialSizing", "cpacsInterface", "calculatePerformance"]}, {"name": "copy of test1", "loop": "true", "loopsize": 1, "modules": ["estimateDOC", "landingGearDesign", "initialSizing", "cpacsInterface", "calculatePerformance"]}]} \ No newline at end of file