Skip to content
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
22 changes: 1 addition & 21 deletions .github/actions/build-package/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,6 @@ description: Build python package with bundled frontend
runs:
using: composite
steps:
- name: Setup Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 22
cache: npm
cache-dependency-path: frontend/app/package-lock.json

- name: Build SvelteKit frontend
shell: bash
working-directory: frontend/app
run: |
npm ci
npm run build

- name: Build and inspect Python package
id: baipp
uses: hynek/build-and-inspect-python-package@ebd3b6c6d32b78607276633a23bdd4481bd23ca8 # v2.18.0

- name: Verify frontend bundled in wheel
shell: bash
run: |
unzip -l "${{ steps.baipp.outputs.dist }}"/pypsa_app-*.whl | grep -q "static/app/index.html" \
|| { echo "wheel missing built frontend (static/app/index.html)"; exit 1; }
uses: hynek/build-and-inspect-python-package@ebd3b6c6d32b78607276633a23bdd4481bd23ca8 # v2.18.0
12 changes: 0 additions & 12 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,6 @@ updates:
patterns: ["*"]
update-types: ["minor", "patch"]

- package-ecosystem: "npm"
directory: "/frontend/app"
schedule:
interval: "weekly"
cooldown:
default-days: 7
semver-major-days: 14
groups:
npm:
patterns: ["*"]
update-types: ["minor", "patch"]

- package-ecosystem: "docker"
directory: "/"
schedule:
Expand Down
46 changes: 22 additions & 24 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ on:
branches: ["main"]
pull_request:
branches: ["main"]
schedule:
- cron: '24 21 * * 5'
schedule: #Re-scan regularly in case the set of codeql rules changes
- cron: "24 21 * * 5"

jobs:
analyze:
Expand Down Expand Up @@ -45,8 +45,6 @@ jobs:
include:
- language: actions
build-mode: none
- language: javascript-typescript
build-mode: none
- language: python
build-mode: none
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift'
Expand All @@ -59,33 +57,33 @@ jobs:
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3

# Add any setup steps before running the `github/codeql-action/init` action.
# This includes steps like installing compilers or runtimes (`actions/setup-node`
# or others). This is typically only required for manual builds.
# - name: Setup runtime (example)
# uses: actions/setup-example@v1
# Add any setup steps before running the `github/codeql-action/init` action.
# This includes steps like installing compilers or runtimes (`actions/setup-node`
# or others). This is typically only required for manual builds.
# - name: Setup runtime (example)
# uses: actions/setup-example@v1

# Initializes the CodeQL tools for scanning.
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- name: Run manual build steps
if: matrix.build-mode == 'manual'
shell: bash
Expand All @@ -98,6 +96,6 @@ jobs:
exit 1

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
with:
category: "/language:${{matrix.language}}"
28 changes: 8 additions & 20 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
ci:
autoupdate_schedule: quarterly
autofix_prs: false
skip: [svelte-check]

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand All @@ -18,49 +17,38 @@ repos:
- id: check-case-conflict
- id: mixed-line-ending

# Python - Ruff
# Python - Ruff
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.9
hooks:
# Run the linter
- id: ruff
args: [--fix]
# Run the formatter
# Run the formatter
- id: ruff-format

# Find common spelling mistakes in comments and docstrings
# Find common spelling mistakes in comments and docstrings
- repo: https://github.com/codespell-project/codespell
rev: v2.4.2
hooks:
- id: codespell
args: ['--ignore-regex=(\b[A-Z]+\b)', '--ignore-words-list=fom']
args: ['--ignore-regex=(\b[A-Z]+\b)', "--ignore-words-list=fom"]
types_or: [python, rst, markdown]

# Do YAML formatting
# Do YAML formatting
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.16.0
hooks:
- id: pretty-format-yaml
args: [--autofix, --indent, '2', --preserve-quotes]
args: [--autofix, --indent, "2", --preserve-quotes]

# Detect secrets
# Detect secrets
- repo: https://github.com/gitleaks/gitleaks
rev: v8.30.0
hooks:
- id: gitleaks

# Svelte/TypeScript - check types and Svelte warnings
- repo: local
hooks:
- id: svelte-check
name: svelte-check
entry: bash -c 'cd frontend/app && npm run check'
language: system
files: ^frontend/app/src/
types_or: [svelte, ts, javascript]
pass_filenames: false

# Lint Github Actions
# Lint Github Actions
- repo: https://github.com/rhysd/actionlint
rev: v1.7.12
hooks:
Expand Down
10 changes: 1 addition & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,7 @@ API docs available at [`http://localhost:8000/docs`](http://localhost:8000/docs)

### Frontend

Applies to both modes. Requires Node.js 22.x.

```bash
cd frontend/app
npm install
npm run dev
```

App available at [`http://localhost:5173`](http://localhost:5173).
Currently non-existent.

## Running Tests

Expand Down
2 changes: 0 additions & 2 deletions frontend/app/.npmrc

This file was deleted.

16 changes: 0 additions & 16 deletions frontend/app/components.json

This file was deleted.

Loading
Loading