Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions docs/developer_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/simdb/remote/apis/v1_2/simulations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
)
Expand Down
Loading