Skip to content

Commit fc8adff

Browse files
Merge branch 'main' into joss
2 parents 477438b + d3d5f45 commit fc8adff

29 files changed

+887
-314
lines changed

Dockerfile

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ RUN npm run build
1111
# Python backend stage
1212
FROM python:3.11-slim
1313

14+
# Build argument for version (can be set at build time)
15+
ARG VERSION=0.1.0
16+
1417
# Install system dependencies
1518
RUN apt-get update && apt-get install -y \
1619
gcc \
@@ -23,22 +26,20 @@ WORKDIR /app
2326
COPY requirements.txt .
2427
RUN pip install --no-cache-dir -r requirements.txt
2528

26-
# Install python core package
27-
RUN pip install .
29+
# Copy source code and package configuration
30+
COPY pyproject.toml .
31+
COPY src/ ./src/
32+
33+
# Install python core package with setuptools-scm version override
34+
RUN SETUPTOOLS_SCM_PRETEND_VERSION_FOR_FUEL_CYCLE_SIM=${VERSION} pip install .
2835

2936
# Install gunicorn for production WSGI server
3037
RUN pip install gunicorn
31-
32-
# Copy backend source code
33-
COPY src/ ./src/
3438
# COPY *.py ./
3539

3640
# Copy built frontend from previous stage
3741
COPY --from=frontend-build /app/dist ./dist
3842

39-
# Create necessary directories
40-
RUN mkdir -p saved_graphs plots
41-
4243
# Create non-root user for security
4344
RUN useradd --create-home --shell /bin/bash app \
4445
&& chown -R app:app /app

pyproject.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "fuel-cycle-sim"
7-
version = "0.1.0"
7+
dynamic = ["version"]
88
description = "A Python package for fuel cycle simulation with pathsim integration"
99
readme = "README.md"
1010
license = {file = "LICENSE"}
@@ -24,7 +24,7 @@ classifiers = [
2424
]
2525
requires-python = ">=3.8"
2626
dependencies = [
27-
"pathsim>=0.8.0",
27+
"pathsim>=0.8.2",
2828
"matplotlib>=3.7.0",
2929
"numpy>=1.24.0",
3030
"plotly>=6.0",
@@ -46,8 +46,8 @@ Issues = "https://github.com/yourusername/fuel-cycle-sim/issues"
4646
packages = ["fuel_cycle_sim"]
4747
package-dir = {"fuel_cycle_sim" = "src/python"}
4848

49-
[tool.setuptools_scm]
50-
write_to = "src/python/_version.py"
51-
5249
[tool.setuptools.package-data]
5350
fuel_cycle_sim = ["templates/*"]
51+
52+
[tool.setuptools_scm]
53+
write_to = "src/python/_version.py"

0 commit comments

Comments
 (0)