Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
simoneponcioni committed Sep 13, 2024
2 parents 6d2eae7 + e30818f commit c22fb81
Show file tree
Hide file tree
Showing 171 changed files with 19,369 additions and 3,771 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build-gcc.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build Docker Container
name: Build Docker Container - gcc

on:
push:
Expand All @@ -10,6 +10,9 @@ jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Delete huge unnecessary tools folder
run: rm -rf /opt/hostedtoolcache
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand All @@ -26,12 +29,11 @@ jobs:
name: Build and push
uses: docker/build-push-action@v5
with:
context: "{{defaultContext}}:02_CODE"
context: "{{defaultContext}}:02_CODE/docker_apptainer_hpc"
file: Dockerfile.ubuntu24.04.gcc
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/hfe_development_gcc:latest
build-args: |
GITHUB_USERNAME=${{ secrets.USERNAME_ADMIN }}
GITHUB_TOKEN=${{ secrets.TOKEN_ADMIN }}
USER_UID=1000
USER_GID=1000
8 changes: 5 additions & 3 deletions .github/workflows/build-ifort.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build Docker Container
name: Build Docker Container - ifort

on:
push:
Expand All @@ -10,6 +10,9 @@ jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Delete huge unnecessary tools folder
run: rm -rf /opt/hostedtoolcache
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand All @@ -26,12 +29,11 @@ jobs:
name: Build and push
uses: docker/build-push-action@v5
with:
context: "{{defaultContext}}:02_CODE"
context: "{{defaultContext}}:02_CODE/docker_apptainer_hpc"
file: Dockerfile.ubuntu24.04.ifort
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/hfe_development_ifort:latest
build-args: |
GITHUB_USERNAME=${{ secrets.USERNAME_ADMIN }}
GITHUB_TOKEN=${{ secrets.TOKEN_ADMIN }}
USER_UID=1000
USER_GID=1000
53 changes: 53 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Documentation

on: [push, pull_request, workflow_dispatch]

permissions:
contents: write

jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5

- name: Set up Python virtual environment
run: |
python -m venv venv
source venv/bin/activate
pip install --upgrade pip
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libglu1-mesa
- name: Clone and install pyhexspline
run: |
git clone https://github.com/artorg-unibe-ch/spline_mesher.git
cd spline_mesher
../venv/bin/pip install -e .
- name: Install Python dependencies
run: |
source venv/bin/activate
pip install sphinx sphinx_rtd_theme myst_parser matplotlib numpy gmsh vtk coloredlogs fast_simplification SimpleITK hydra-core pyvista pandas psutil scipy numba
- name: Sphinx build
run: |
source venv/bin/activate
sphinx-build 02_CODE/src/docs/ 02_CODE/src/docs/_build
- name: Create .nojekyll file
run: |
touch 02_CODE/src/docs/_build/.nojekyll
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: 02_CODE/src/docs/_build
force_orphan: true
39 changes: 0 additions & 39 deletions .github/workflows/python-app.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/todo_to_issue.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Run TODO to Issue"
name: "TODO to Issue"
on: ["push"]
jobs:
build:
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ outputs/
04_SIMULATIONS/
!04_SIMULATIONS/simulations_directory.text
99_TEMP/
QMSKI/DSC_PAPER/
out/
QMSKI/*
out/*

multirun/

Expand Down
9 changes: 4 additions & 5 deletions 02_CODE/docker_apptainer_hpc/Dockerfile.ubuntu24.04.gcc
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,18 @@ ENV PATH="/opt/miniconda/bin:$PATH"
RUN conda create -n hfe-essentials python=3.12
SHELL ["conda", "run", "-n", "hfe-essentials", "/bin/bash", "-c"]
# Copy hfe requirements.txt and install requirements
COPY ./requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY ./requirements.text .
RUN pip install --no-cache-dir -r requirements.text
RUN pip install -U scikit-image
RUN pip install imutils

# Set GitHub username and personal access token
ARG GITHUB_USERNAME
ARG GITHUB_TOKEN
ARG USER_UID=1000
ARG USER_GID=1000

# Install the meshing package # TODO: reactivate when github action is cloning from public repo
RUN git clone https://${GITHUB_USERNAME}:${GITHUB_TOKEN}@github.com/artorg-unibe-ch/spline_mesher.git ./pyhexspline/spline_mesher
# Install the meshing package
RUN git clone https://${GITHUB_USERNAME}:@github.com/artorg-unibe-ch/spline_mesher.git ./pyhexspline/spline_mesher
WORKDIR ./pyhexspline/spline_mesher
RUN pip install -e .

Expand Down
7 changes: 3 additions & 4 deletions 02_CODE/docker_apptainer_hpc/Dockerfile.ubuntu24.04.ifort
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,18 @@ ENV PATH="/opt/miniconda/bin:$PATH"
RUN conda create -n hfe-essentials python=3.12
SHELL ["conda", "run", "-n", "hfe-essentials", "/bin/bash", "-c"]
# Copy hfe requirements.txt and install requirements
COPY ./requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY ./requirements.text .
RUN pip install --no-cache-dir -r requirements.text
RUN pip install -U scikit-image
RUN pip install imutils

# Set GitHub username and personal access token
ARG GITHUB_USERNAME
ARG GITHUB_TOKEN
ARG USER_UID=1000
ARG USER_GID=1000

# Install the meshing package
RUN git clone https://${GITHUB_USERNAME}:${GITHUB_TOKEN}@github.com/artorg-unibe-ch/spline_mesher.git ./pyhexspline/spline_mesher
RUN git clone https://${GITHUB_USERNAME}:@github.com/artorg-unibe-ch/spline_mesher.git ./pyhexspline/spline_mesher
WORKDIR ./pyhexspline/spline_mesher
RUN pip install -e .

Expand Down
16 changes: 16 additions & 0 deletions 02_CODE/docker_apptainer_hpc/requirements.text
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
coloredlogs==15.0.1
Cython==3.0.9
fast_simplification==0.1.7
hydra-core==1.3.2
matplotlib==3.8.3
numba==0.59.1
numpy==1.26.4
omegaconf==2.3.0
pandas==2.2.2
psutil==5.9.8
pyvista==0.43.4
PyYAML==6.0.1
scipy==1.13.0
setuptools==70.3.0
SimpleITK==2.3.1
vtk==9.3.0
Binary file added 02_CODE/docs/smooth_mesh_graph_abstract_v1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 0 additions & 3 deletions 02_CODE/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@ numpy==1.26.4
omegaconf==2.3.0
pandas==2.2.2
psutil==5.9.8
# pyhexspline==0.1.0
# pyhexspline.egg==info
pyvista==0.43.4
PyYAML==6.0.1
PyYAML==6.0.1
scipy==1.13.0
setuptools==70.3.0
SimpleITK==2.3.1
Expand Down
Empty file added 02_CODE/src/__init__.py
Empty file.
3 changes: 3 additions & 0 deletions 02_CODE/src/docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.swp
/_build
/doctrees
20 changes: 20 additions & 0 deletions 02_CODE/src/docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
Binary file added 02_CODE/src/docs/_build/doctrees/aim2fe.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added 02_CODE/src/docs/_build/doctrees/imutils.doctree
Binary file not shown.
Binary file added 02_CODE/src/docs/_build/doctrees/index.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added 02_CODE/src/docs/_build/doctrees/modules.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 4 additions & 0 deletions 02_CODE/src/docs/_build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: a565ca8934d45de2233f702231a97bae
tags: 645f666f9bcd5a90fca523b33c5a78b7
Loading

0 comments on commit c22fb81

Please sign in to comment.