Skip to content

Commit

Permalink
Make local DB file names more friendly
Browse files Browse the repository at this point in the history
  • Loading branch information
kgodlewski committed Jan 15, 2025
1 parent a4e6a39 commit 67463b8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/neptune_scale/storage/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,9 @@ def _init_run(


def _safe_filename(project: str, run_id: str) -> str:
# URLEncode the project name and run ID to avoid issues with special characters
filename = quote(f"{project}-{run_id}.db", safe="")
# 1. replace '/' with '__' in project name
# 2. URLEncode the project name and run ID to avoid issues with special characters
filename = quote(f"{project.replace('/', '_')}_{run_id}.db", safe="")
return filename


Expand Down

0 comments on commit 67463b8

Please sign in to comment.