From efaadd558841e9d6a551e6f5f67b80a94f5b5297 Mon Sep 17 00:00:00 2001 From: Erik B Knudsen Date: Thu, 16 May 2024 10:46:20 +0200 Subject: [PATCH 1/4] avoid special characters in tags --- src/CAD_to_OpenMC/assembly.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/CAD_to_OpenMC/assembly.py b/src/CAD_to_OpenMC/assembly.py index 8c39b9b..a5e69bc 100644 --- a/src/CAD_to_OpenMC/assembly.py +++ b/src/CAD_to_OpenMC/assembly.py @@ -13,6 +13,7 @@ import math import sys +from unidecode import unidecode from datetime import datetime from pymoab import core, types @@ -315,7 +316,7 @@ def import_stp_files( s = gmsh.model.getEntityName(3, vid) part = s.split("/")[-1] g = re.match(r"^([^\s_@]+)", part) - tag = g[0] + tag = unidecode(g[0]) if self.verbose > 1: print( f"INFO: Tagging volume #{vid} label:{s} with material {tag}" From 0d1dbc0c7a34ac1992eaa53a5be2d040f5e171cb Mon Sep 17 00:00:00 2001 From: Erik B Knudsen Date: Fri, 28 Jun 2024 12:28:52 +0200 Subject: [PATCH 2/4] pin numpy to below 2.0 --- pyproject.toml | 1 + requirements.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4041f08..05d2e46 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,6 +16,7 @@ classifiers = [ ] dependencies=[ 'gmsh', + 'nympy<2.0a0', 'pyparsing', 'cadquery>=2', 'cadquery-ocp>=7', diff --git a/requirements.txt b/requirements.txt index dc5fe49..a8ea364 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ gmsh pyparsing cadquery>=2.2.0 cadquery-ocp>=7.7.0 -numpy +numpy<2.0a<2.0a00 trimesh networkx Cython From 380f79d9aac09323e961a9f08cb5bf13fcf14a4a Mon Sep 17 00:00:00 2001 From: Erik B Knudsen Date: Mon, 1 Jul 2024 14:50:49 +0200 Subject: [PATCH 3/4] fix miscommit --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index a8ea364..ede32b8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ gmsh pyparsing cadquery>=2.2.0 cadquery-ocp>=7.7.0 -numpy<2.0a<2.0a00 +numpy<2.0a0 trimesh networkx Cython From a190d167bb7e8f5a903e052ce26d76bd6825251e Mon Sep 17 00:00:00 2001 From: Erik B Knudsen Date: Mon, 1 Jul 2024 15:00:38 +0200 Subject: [PATCH 4/4] also make sure unidecode is present --- pyproject.toml | 1 + requirements.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 05d2e46..573aa75 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,6 +23,7 @@ dependencies=[ 'numpy', 'networkx', 'trimesh', + 'unidecode', ] [project.urls] diff --git a/requirements.txt b/requirements.txt index ede32b8..c645dd9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,4 +5,5 @@ cadquery-ocp>=7.7.0 numpy<2.0a0 trimesh networkx +unidecode Cython