diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..a09b406 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,43 @@ +name: CI + +on: + push: + branches: + - main + pull_request: + +jobs: + validate: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.13' + + - name: Validate Python backend syntax + run: python -m py_compile VentusFlowWebGUI/backend/process_input.py + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install frontend dependencies + working-directory: VentusFlowWebGUI + run: npm install --no-fund --no-audit + + - name: Build frontend + working-directory: VentusFlowWebGUI + run: npm run build + + - name: Check for generated files in the working tree + run: | + if git ls-files --others --exclude-standard | grep -E '(^|/)(\.DS_Store|node_modules|dist|\.venv|__pycache__)(/|$)|(\.pyc|\.pyo)$' >/dev/null; then + echo 'Generated files detected in the repo. Remove them before committing.' + exit 1 + fi diff --git a/.gitignore b/.gitignore index 063ffc2..fdd927c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,11 @@ /.DS_Store /result /.venv/ +**/.venv/ /node_modules/ +**/node_modules/ /dist/ +**/dist/ **/.DS_Store **/__pycache__/ *.pyc diff --git a/README.md b/README.md index 2d93fa2..6ef7542 100644 --- a/README.md +++ b/README.md @@ -63,10 +63,11 @@ Ziel von **VentusFlowWebGUI** ist es, ein einfaches grafisches Werkzeug bereitzu ```bash # Klone das Repository -git clone https://github.com/malte-code/VentusFlowWebGUI.git -cd VentusFlowWebGUI +git clone https://github.com/malte-code/VentusFlow.git +cd VentusFlow -# Installiere Node.js-Abhängigkeiten +# Installiere die Frontend-Abhängigkeiten +cd VentusFlowWebGUI npm install # Starte die Anwendung mit Server im Entwicklungsmodus @@ -75,16 +76,37 @@ npm start # Starte nur das Frontend im Entwicklungsmodus npm run dev -# Alternativ: Baue die Anwendung (npm install notwendig) oder starte sie im Produktionsmodus (ein Build befindet sich in /dist) +# Alternativ: Build der Anwendung für Produktion npm run build + +# Optional: Produktions-Preview mit Server-Start npm run serve +``` -# Wenn Remote-Cluster-Funktionen genutzt werden sollen, aktualisiere ssh-agent Pfad im serve-Script-Eintrag der package.json Datei (lauffähiger Build wird mitgeliefert) +Nach dem Start ist die Anwendung unter `http://localhost:3000` (oder einem anderen Port, der in der Konsole angezeigt wird) erreichbar. -# Aktualisiere SSH-Config in index.html unter: Server Connection Setting +### 3. Projektstruktur + +```text +VentusFlow/ +├── README.md +├── LICENSE +├── VentusFlowWebGUI/ +│ ├── backend/ +│ │ ├── process_input.py +│ │ ├── server.js +│ │ └── simulation_parameters.json +│ ├── frontend/ +│ ├── package.json +│ └── dist/ +├── offshorewindpark_VentusFlow/ +│ ├── system/ +│ ├── constant/ +│ └── Allpre +└── .github/ ``` -Nach dem Start ist die Anwendung unter `http://localhost:3000` (oder einem anderen Port, der in der Konsole angezeigt wird) erreichbar. +> Das Repository enthält sowohl die WebGUI als auch den zugehörigen OpenFOAM-Case/Simulationsteil. Die eigentliche Web-App wird in `VentusFlowWebGUI/` gestartet. ### 3. Voreinstellungen der OpenFOAM Umgebung