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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ COPY pyproject.toml .
COPY src/ ./src/

# Install python core package with setuptools-scm version override
RUN SETUPTOOLS_SCM_PRETEND_VERSION_FOR_FUEL_CYCLE_SIM=${VERSION} pip install .
RUN SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PATHVIEW=${VERSION} pip install .

# Install gunicorn for production WSGI server
RUN pip install gunicorn
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Fuel Cycle Simulator
An interactive visual tool built with React Flow and a python (Flask) backend to simulate fuel cycle components.
# PathView
An interactive visual tool built with React Flow and a python (Flask) backend for system modelling using PathSim.

# Required Installations
Make sure the following are installed on your system:
Expand All @@ -9,7 +9,7 @@ Make sure the following are installed on your system:

# Project Structure
```bash
fuel-cycle-sim/
pathview/

├── package.json # Frontend (React) dependencies

Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = "fuel-cycle-sim"
project = "pathview"
copyright = "2025, Tasnim Zulfiqar, James Dark, Remi Delaporte-Mathurin"
author = "Tasnim Zulfiqar, James Dark, Remi Delaporte-Mathurin"

Expand Down
30 changes: 15 additions & 15 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.. fuel-cycle-sim documentation master file, created by
.. pathview documentation master file, created by
sphinx-quickstart on Wed Jul 23 14:07:29 2025.

==========================================
Fuel Cycle Simulator (name will change...)
==========================================
========
PathView
========

An interactive visual tool for modeling and simulating nuclear fuel cycle components using React Flow frontend and Python Flask backend.

Expand All @@ -24,16 +24,16 @@ An interactive visual tool for modeling and simulating nuclear fuel cycle compon
Statement of Need
===============================

Fusion fuel cycle modeling is a critical aspect of nuclear engineering that requires sophisticated tools to analyze material flows, reactor performance, and waste management strategies. The Fuel Cycle Simulator addresses the need for:
System modeling is a critical aspect of nuclear engineering that requires sophisticated tools to analyze material flows, reactor performance, and waste management strategies. PathView addresses the need for:

**Accessibility**
Traditional fuel cycle simulation tools are often complex, proprietary, or require extensive training. This tool provides an intuitive visual interface that makes fuel cycle modeling accessible to students, researchers, and professionals.
Traditional system simulation tools are often complex, proprietary, or require extensive training. This tool provides an intuitive visual interface that makes system modeling accessible to students, researchers, and professionals.

**Interactivity**
Static models and command-line tools limit exploration and understanding. Our interactive visual approach allows users to build, modify, and experiment with fuel cycle scenarios in real-time.
Static models and command-line tools limit exploration and understanding. Our interactive visual approach allows users to build, modify, and experiment with system scenarios in real-time.

**Educational Value**
The visual nature of the tool makes it ideal for teaching fuel cycle concepts, allowing students to see the connections between different components and understand material flows.
The visual nature of the tool makes it ideal for teaching system concepts, allowing students to see the connections between different components and understand material flows.

**Research Flexibility**
Researchers need tools that can be easily modified and extended. The open-source nature and modular architecture enable customization for specific research needs.
Expand All @@ -48,7 +48,7 @@ Installation Guide
System Requirements
-------------------

Before installing the Fuel Cycle Simulator, ensure your system meets the following requirements:
Before installing PathView, ensure your system meets the following requirements:

**Required Software:**
- Node.js 18+ and npm
Expand All @@ -67,9 +67,9 @@ Installation Steps
1. **Clone the Repository**

.. code-block:: bash
git clone https://github.com/yourusername/fuel-cycle-sim.git
cd fuel-cycle-sim

git clone https://github.com/festim-dev/pathview.git
cd pathview

2. **Install Frontend Dependencies**

Expand Down Expand Up @@ -127,7 +127,7 @@ Example Usage
Quick Start Example
-------------------

Here's a simple example to get you started with the Fuel Cycle Simulator:
Here's a simple example to get you started with PathView:

WIP

Expand Down Expand Up @@ -159,7 +159,7 @@ WIP
Community Guidelines
===============================

Welcome to the Fuel Cycle Simulator community! We're committed to fostering an inclusive, collaborative environment for all contributors.
Welcome to the PathView community! We're committed to fostering an inclusive, collaborative environment for all contributors.

Code of Conduct
----------------
Expand Down Expand Up @@ -218,7 +218,7 @@ Communication Channels
Support
===============================

If you need help with the Fuel Cycle Simulator, here are the best ways to get support:
If you need help with PathView, here are the best ways to get support:

- **Documentation**: Start with this documentation
- **GitHub Issues**: For bugs and feature requests
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "fuel-cycle-sim",
"name": "pathview",
"private": true,
"version": "0.0.0",
"type": "module",
Expand Down Expand Up @@ -33,4 +33,4 @@
"globals": "^16.0.0",
"vite": "^6.3.5"
}
}
}
18 changes: 9 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ requires = ["setuptools>=61.0", "wheel", "setuptools-scm[toml] >= 7.0.5"]
build-backend = "setuptools.build_meta"

[project]
name = "fuel-cycle-sim"
name = "pathview"
dynamic = ["version"]
description = "A Python package for fuel cycle simulation with pathsim integration"
description = "A Graphical User Interface for System Simulation"
readme = "README.md"
license = {file = "LICENSE"}
authors = [
Expand Down Expand Up @@ -37,17 +37,17 @@ dev = [


[project.urls]
Homepage = "https://github.com/yourusername/fuel-cycle-sim"
Documentation = "https://fuel-cycle-sim.readthedocs.io/"
Repository = "https://github.com/yourusername/fuel-cycle-sim.git"
Issues = "https://github.com/yourusername/fuel-cycle-sim/issues"
Homepage = "https://github.com/festim-dev/pathview"
Documentation = "https://pathview.readthedocs.io/"
Repository = "https://github.com/festim-dev/pathview.git"
Issues = "https://github.com/festim-dev/pathview/issues"

[tool.setuptools]
packages = ["fuel_cycle_sim"]
package-dir = {"fuel_cycle_sim" = "src/python"}
packages = ["pathview"]
package-dir = {"pathview" = "src/python"}

[tool.setuptools.package-data]
fuel_cycle_sim = ["templates/*"]
pathview = ["templates/*"]

[tool.setuptools_scm]
write_to = "src/python/_version.py"
4 changes: 2 additions & 2 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import { nodeTypes, nodeDynamicHandles } from './nodeConfig.js';
import LogDock from './components/LogDock.jsx';

import { createFunctionNode } from './components/nodes/FunctionNode.jsx';

Check failure on line 27 in src/App.jsx

View workflow job for this annotation

GitHub Actions / test (20.x, 3.11)

'createFunctionNode' is defined but never used. Allowed unused vars must match /^[A-Z_]/u

Check failure on line 27 in src/App.jsx

View workflow job for this annotation

GitHub Actions / test (20.x, 3.10)

'createFunctionNode' is defined but never used. Allowed unused vars must match /^[A-Z_]/u

// * Declaring variables *

Expand Down Expand Up @@ -71,7 +71,7 @@
}, []);

const onDragStart = (event, nodeType) => {
setType(nodeType);

Check failure on line 74 in src/App.jsx

View workflow job for this annotation

GitHub Actions / test (20.x, 3.11)

'setType' is not defined

Check failure on line 74 in src/App.jsx

View workflow job for this annotation

GitHub Actions / test (20.x, 3.10)

'setType' is not defined
event.dataTransfer.setData('text/plain', nodeType);
event.dataTransfer.effectAllowed = 'move';
};
Expand Down Expand Up @@ -299,7 +299,7 @@
setNodes((nds) => [...nds, newNode]);
setNodeCounter((count) => count + 1);
},
[screenToFlowPosition, type, nodeCounter, fetchDefaultValues, setDefaultValues, setNodes, setNodeCounter],

Check warning on line 302 in src/App.jsx

View workflow job for this annotation

GitHub Actions / test (20.x, 3.11)

React Hook useCallback has an unnecessary dependency: 'setDefaultValues'. Either exclude it or remove the dependency array

Check warning on line 302 in src/App.jsx

View workflow job for this annotation

GitHub Actions / test (20.x, 3.10)

React Hook useCallback has an unnecessary dependency: 'setDefaultValues'. Either exclude it or remove the dependency array
);

// Function to save a graph to computer with "Save As" dialog
Expand Down Expand Up @@ -1056,7 +1056,7 @@
return () => {
document.removeEventListener('keydown', handleKeyDown);
};
}, [selectedEdge, selectedNode, copiedNode, duplicateNode, setCopyFeedback]);

Check warning on line 1059 in src/App.jsx

View workflow job for this annotation

GitHub Actions / test (20.x, 3.11)

React Hook useEffect has missing dependencies: 'deleteSelectedEdge' and 'deleteSelectedNode'. Either include them or remove the dependency array

Check warning on line 1059 in src/App.jsx

View workflow job for this annotation

GitHub Actions / test (20.x, 3.10)

React Hook useEffect has missing dependencies: 'deleteSelectedEdge' and 'deleteSelectedNode'. Either include them or remove the dependency array

return (
<div style={{ width: '100vw', height: '100vh', display: 'flex', flexDirection: 'column' }}>
Expand Down Expand Up @@ -1176,12 +1176,12 @@
onClick={() => {
// Display version information and help
const pathsimVersion = versionInfo?.pathsim_version || 'Loading...';
const fcsVersion = versionInfo?.fuel_cycle_sim_version || 'Loading...';
const fcsVersion = versionInfo?.pathview_version || 'Loading...';

const message = `Help documentation coming soon!\n\n` +
`Version Information:\n` +
`• PathSim: ${pathsimVersion}\n` +
`• Fuel Cycle Sim: ${fcsVersion}\n\n`;
`• PathView: ${fcsVersion}\n\n`;

alert(message);
}}
Expand Down
18 changes: 8 additions & 10 deletions src/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
import io
from contextlib import redirect_stdout, redirect_stderr

from fuel_cycle_sim.convert_to_python import convert_graph_to_python
from fuel_cycle_sim.pathsim_utils import make_pathsim_model, map_str_to_object
from pathview.convert_to_python import convert_graph_to_python
from pathview.pathsim_utils import make_pathsim_model, map_str_to_object
from pathsim.blocks import Scope, Spectrum

# Sphinx imports for docstring processing
Expand Down Expand Up @@ -131,15 +131,13 @@ def serve_frontend():
if os.getenv("FLASK_ENV") == "production":
return app.send_static_file("index.html")
else:
return jsonify({"message": "Fuel Cycle Simulator API", "status": "running"})
return jsonify({"message": "PathView API", "status": "running"})


# Health check endpoint for Cloud Run
@app.route("/health", methods=["GET"])
def health_check():
return jsonify(
{"status": "healthy", "message": "Fuel Cycle Simulator Backend is running"}
), 200
return jsonify({"status": "healthy", "message": "PathView Backend is running"}), 200


# Version information endpoint
Expand All @@ -151,22 +149,22 @@ def get_version():

pathsim_version = getattr(pathsim, "__version__", "Unknown")

import fuel_cycle_sim
import pathview

fcs_version = getattr(fuel_cycle_sim, "__version__", "Unknown")
fcs_version = getattr(pathview, "__version__", "Unknown")

return jsonify(
{
"pathsim_version": pathsim_version,
"fuel_cycle_sim_version": fcs_version,
"pathview_version": fcs_version,
"status": "success",
}
), 200
except Exception as e:
return jsonify(
{
"pathsim_version": "Unknown",
"fuel_cycle_sim_version": "Unknown",
"pathview_version": "Unknown",
"status": "error",
"error": str(e),
}
Expand Down
8 changes: 1 addition & 7 deletions src/python/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
"""
Fuel Cycle Simulation Package

A Python package for fuel cycle simulation with pathsim integration.
"""

from importlib import metadata

try:
__version__ = metadata.version("fuel_cycle_sim")
__version__ = metadata.version("pathview")
except Exception:
__version__ = "unknown"

Expand Down
2 changes: 1 addition & 1 deletion src/python/pathsim_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ def get_parameters_for_block_class(block_class, node, eval_namespace):
if k == "self":
continue
# Skip 'operations' for Adder, as it is handled separately
# https://github.com/festim-dev/fuel-cycle-sim/issues/73
# https://github.com/festim-dev/pathview/issues/73
if k in ["operations"]:
continue
user_input = node["data"][k]
Expand Down
2 changes: 1 addition & 1 deletion src/python/templates/template_with_macros.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from pathsim import Simulation, Connection
import numpy as np
import matplotlib.pyplot as plt
import fuel_cycle_sim
import pathview
{# Import macros #}
{% from 'block_macros.py' import create_block, create_integrator_block, create_bubbler_block, create_connections, create_event -%}

Expand Down
4 changes: 2 additions & 2 deletions test/test_backend.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from fuel_cycle_sim.pathsim_utils import auto_block_construction, make_connections
from fuel_cycle_sim.custom_pathsim_blocks import (
from pathview.pathsim_utils import auto_block_construction, make_connections
from pathview.custom_pathsim_blocks import (
Process,
Splitter2,
Splitter3,
Expand Down
2 changes: 1 addition & 1 deletion test/test_convert_python.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from fuel_cycle_sim import convert_graph_to_python
from pathview import convert_graph_to_python
import json
import pytest
from pathlib import Path
Expand Down
2 changes: 1 addition & 1 deletion test/test_custom_blocks.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pathsim.blocks
from pathsim import Simulation, Connection
from fuel_cycle_sim.custom_pathsim_blocks import Bubbler
from pathview.custom_pathsim_blocks import Bubbler


def test_bubbler():
Expand Down
2 changes: 1 addition & 1 deletion test/test_events.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from fuel_cycle_sim.pathsim_utils import make_events
from pathview.pathsim_utils import make_events


events_data = [
Expand Down
2 changes: 1 addition & 1 deletion test/test_examples.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from fuel_cycle_sim.pathsim_utils import make_pathsim_model
from pathview.pathsim_utils import make_pathsim_model
import json

import pytest
Expand Down
Loading