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
54 changes: 26 additions & 28 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,31 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
cooldown:
default-days: 7
semver-major-days: 14
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
cooldown:
default-days: 7

- package-ecosystem: "uv"
directory: "/"
schedule:
interval: "weekly"
cooldown:
default-days: 7
semver-major-days: 14
- package-ecosystem: "uv"
directory: "/"
schedule:
interval: "weekly"
cooldown:
default-days: 7
semver-major-days: 14

- package-ecosystem: "npm"
directory: "/frontend/app"
schedule:
interval: "weekly"
cooldown:
default-days: 7
semver-major-days: 14
- package-ecosystem: "npm"
directory: "/frontend/app"
schedule:
interval: "weekly"
cooldown:
default-days: 7
semver-major-days: 14

- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "weekly"
cooldown:
default-days: 7
semver-major-days: 14
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "weekly"
cooldown:
default-days: 7
71 changes: 4 additions & 67 deletions frontend/app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"tailwind-variants": "3.2.2",
"tailwindcss": "4.3.0",
"tw-animate-css": "1.4.0",
"typescript": "5.9.3",
"typescript": "6.0.3",
"vite": "7.3.3"
},
"dependencies": {
Expand Down
8 changes: 6 additions & 2 deletions src/pypsa_app/backend/alembic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ def run_migrations() -> None:
with engine.connect() as conn:
insp = inspect(conn)
if insp.has_table("alembic_version"):
before = conn.execute(text("SELECT version_num FROM alembic_version")).scalar()
before = conn.execute(
text("SELECT version_num FROM alembic_version")
).scalar()
if before and before not in known:
wrote = None
if insp.has_table("app_info"):
Expand All @@ -48,7 +50,9 @@ def run_migrations() -> None:
command.upgrade(cfg, "head")

with engine.begin() as conn:
after = conn.execute(text("SELECT version_num FROM alembic_version")).scalar()
after = conn.execute(
text("SELECT version_num FROM alembic_version")
).scalar()
if after != before and inspect(conn).has_table("app_info"):
conn.execute(
text(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def _decode(value: object) -> object:
return value
return value


# revision identifiers, used by Alembic.
revision: str = "0003"
down_revision: str | None = "0002"
Expand Down Expand Up @@ -76,7 +77,9 @@ def upgrade() -> None:
history = _decode(raw)
if not isinstance(history, list):
continue
cleaned = [v.removesuffix("+00:00") if isinstance(v, str) else v for v in history]
cleaned = [
v.removesuffix("+00:00") if isinstance(v, str) else v for v in history
]
if cleaned != history:
bind.execute(
sa.text(
Expand Down
Empty file.
3 changes: 2 additions & 1 deletion src/pypsa_app/backend/services/explore.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ def _build_explore_defaults(n: Any) -> dict[str, Any]:
)

try:
supported_branches = {"Line", "Link", "Transformer", "Process"}
# TODO: re-add "Process" once PyPSA PydeckPlotter supports process_* kwargs
supported_branches = {"Line", "Link", "Transformer"}
for c in n.branch_components:
if c not in supported_branches:
continue
Expand Down
8 changes: 2 additions & 6 deletions src/pypsa_app/backend/services/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,7 @@ def _calculate_file_hash(file_path: Path) -> str:
return sha256_hash.hexdigest()


def _apply_network_metadata(
network: Network, file_path: Path, file_hash: str
) -> None:
def _apply_network_metadata(network: Network, file_path: Path, file_hash: str) -> None:
"""Read the file at file_path and copy its metadata onto network."""
service = NetworkService(file_path, use_cache=False)
info = service.extract_database_info()
Expand Down Expand Up @@ -400,9 +398,7 @@ def register_network_in_place(
if not file_path.is_file() or file_path.suffix != ".nc":
msg = f"Expected an existing .nc file, got: {file_path}"
raise ValueError(msg)
return import_network_file(
file_path, file_path.name, user_id, db, is_external=True
)
return import_network_file(file_path, file_path.name, user_id, db, is_external=True)


def load_service(
Expand Down
Loading
Loading