From 65bef246733fb3103a660f2a7dd9794292031075 Mon Sep 17 00:00:00 2001 From: Deepak <56668629+deepakmaroo@users.noreply.github.com> Date: Wed, 8 Apr 2026 15:05:08 +0200 Subject: [PATCH 1/2] Replaced directory.rmdir() with shutil.rmtree(directory) --- src/simdb/remote/apis/v1_2/simulations.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/simdb/remote/apis/v1_2/simulations.py b/src/simdb/remote/apis/v1_2/simulations.py index eb39cc0..b8e486f 100644 --- a/src/simdb/remote/apis/v1_2/simulations.py +++ b/src/simdb/remote/apis/v1_2/simulations.py @@ -2,6 +2,7 @@ import datetime import itertools import tarfile +import shutil from io import BytesIO from pathlib import Path from typing import Annotated, List, Optional, Tuple @@ -391,7 +392,7 @@ def delete(self, sim_id: str, user: User) -> SimulationDeleteResponse: if first_file.uri.path is not None: directory = first_file.uri.path.parent if directory != Path() and directory != Path("/"): - directory.rmdir() + shutil.rmtree(directory) return SimulationDeleteResponse( deleted=DeletedSimulation(simulation=simulation.uuid, files=files) ) From 4aa1d9d55b5c40101a770fe12f30cedd08c15380 Mon Sep 17 00:00:00 2001 From: Deepak <56668629+deepakmaroo@users.noreply.github.com> Date: Wed, 8 Apr 2026 16:17:35 +0200 Subject: [PATCH 2/2] Added swegger API documentation under developer guide --- docs/developer_guide.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/developer_guide.md b/docs/developer_guide.md index df67b49..d3e5259 100644 --- a/docs/developer_guide.md +++ b/docs/developer_guide.md @@ -45,6 +45,23 @@ simdb_server This will start a server on port 5000. You can test this server is running by opening http://localhost:5000 in a browser. +## Swagger API documentation + +SimDB provides interactive Swagger API documentation for each API version. The documentation is automatically generated and accessible at different endpoints depending on the API version you want to explore. + +### Accessing API documentation + +- **v1.2 API**: http://localhost:5000/v1.2/docs +- **v1.2 API at ITER**: https://simdb.iter.org/scenarios/api/v1.2/docs + +### API version differences + +Each API version may have different endpoints and functionality: + +- **v1.2**: Latest API with improved performance and additional features + +Always check the appropriate version documentation for your use case. + ## Linting and formatting SimDB uses [Ruff](https://docs.astral.sh/ruff/) for both linting and code