File tree Expand file tree Collapse file tree 6 files changed +20
-6
lines changed
frontend/app/src/lib/components Expand file tree Collapse file tree 6 files changed +20
-6
lines changed Original file line number Diff line number Diff line change 6666htmlcov /
6767
6868# Docker
69- .dockerignore
7069compose /compose.prod.yaml
7170compose /.env
7271
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ ENV PATH="/root/.local/bin:$PATH"
1919
2020COPY pyproject.toml uv.lock MANIFEST.in ./
2121COPY src/ src/
22+ COPY .git/ .git/
2223
2324# Sync dependencies with uv
2425RUN uv sync --frozen --extra full --no-dev
Original file line number Diff line number Diff line change 1616 // Version info
1717 let versionData = $state (null );
1818
19+ // Format version for display (remove .post1. and git hash)
20+ function formatVersion (version ) {
21+ if (! version) return version;
22+ return version .replace (/ \. post\d + \. / , ' .' ).split (' +' )[0 ];
23+ }
24+
1925 onMount (async () => {
2026 // Try to load from localStorage first for instant display
2127 try {
5965 <Tooltip .Root >
6066 <Tooltip .Trigger >
6167 <Badge variant =" default" >
62- v{versionData .backend }
68+ v{formatVersion ( versionData .backend ) }
6369 </Badge >
6470 </Tooltip .Trigger >
6571 <Tooltip .Content side =" bottom" class =" bg-popover text-popover-foreground" >
Original file line number Diff line number Diff line change 1515 let pypsaVersion = cachedVersion .pypsa ;
1616 let appVersion = cachedVersion .app ;
1717
18+ // Format version for display (remove .post1. and git hash)
19+ function formatVersion (version ) {
20+ if (! version) return version;
21+ return version .replace (/ \. post\d + \. / , ' .' ).split (' +' )[0 ];
22+ }
23+
1824 // Get the current page path to highlight active nav item
1925 const currentPath = $derived ($page .url .pathname );
2026
121127 class =" text-xs bg-primary text-primary-foreground px-2 py-0.5 rounded font-normal cursor-help"
122128 title ="PyPSA Framework v {pypsaVersion }"
123129 >
124- v{appVersion }
130+ v{formatVersion ( appVersion ) }
125131 </span >
126132 {/if }
127133 </a >
Original file line number Diff line number Diff line change 11[project ]
22name = " pypsa-app"
3- version = " 0.1.0-alpha.1"
43description = " tbd"
4+ dynamic = [" version" ]
55authors = [
66 {
name =
" Lukas Trippe" ,
email =
" [email protected] " }
77]
@@ -52,7 +52,7 @@ Repository = "https://github.com/PyPSA/pypsa-app"
5252Issues = " https://github.com/PyPSA/pypsa-app/issues"
5353
5454[build-system ]
55- requires = [" setuptools>=61 " , " wheel " ]
55+ requires = [" setuptools>=64 " , " setuptools_scm>=8 " ]
5656build-backend = " setuptools.build_meta"
5757
5858[tool .setuptools ]
@@ -63,3 +63,6 @@ where = ["src"]
6363
6464[tool .setuptools .package-data ]
6565"pypsa_app.backend" = [" static/**/*" ]
66+
67+ [tool .setuptools_scm ]
68+ version_scheme = " no-guess-dev"
You can’t perform that action at this time.
0 commit comments