Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
224 commits
Select commit Hold shift + click to select a range
76f60df
add dr param
Trophime Jun 11, 2025
a5075b0
change R[01]n to rInt/rExt
Trophime Jun 11, 2025
2ecc980
fix syntax
Trophime Jun 11, 2025
edfc0d7
create from_yaml constructor
Trophime Jun 19, 2025
ed6a071
fix yaml with str or custom field objects
Trophime Jun 20, 2025
c6e0d6c
add pytest from claude - need more work
Trophime Jun 20, 2025
d786d97
up version since API breaks
Trophime Jun 20, 2025
098a4f2
up package version
Trophime Jun 20, 2025
1459b73
up tests
Trophime Jun 20, 2025
2426760
factorize dump method
Trophime Jun 20, 2025
0a5c6fb
up with fixing pytest
Trophime Jun 25, 2025
c57b453
fix supra
Trophime Jun 25, 2025
0103195
up with pytest for msite
Trophime Jun 25, 2025
d139bc1
fix pytest
Trophime Jun 25, 2025
1e91fe8
move test to tests
Trophime Jun 25, 2025
dc6bc35
finalize pytest for msite ans supras
Trophime Jun 25, 2025
4c86e94
Merge branch 'simplify' of github.com:MagnetDB/python_magnetgeo into …
Trophime Jun 26, 2025
9b47a63
newupstream 0.7.0
Trophime Jul 3, 2025
a59bdf2
add Probe object
Trophime Jul 4, 2025
4f8cd21
add missing pandas
Trophime Jul 4, 2025
ea410df
add probes featues
Trophime Jul 4, 2025
3ff4991
fix from_yaml
Trophime Aug 8, 2025
358cc40
fix from_yaml
Trophime Aug 8, 2025
44b46e4
fix pytest
Trophime Aug 8, 2025
68c75fa
up
Trophime Aug 8, 2025
744460d
cleanup main structures
Trophime Aug 9, 2025
d2c2fd5
add getObject to perform yaml.load without problem
Trophime Aug 9, 2025
113e3c9
cleanup
Trophime Aug 9, 2025
5cc8818
remove setstate from tests
Trophime Aug 9, 2025
9dc2d82
simplified load objects
Trophime Aug 9, 2025
c9f54f2
rewrite simpler tests
Trophime Aug 9, 2025
85a2230
rename new tests
Trophime Aug 9, 2025
6e5ebe3
fix new tests
Trophime Aug 9, 2025
0188e80
simplify intersect method
Trophime Aug 9, 2025
772846b
clean for debian packaging
Trophime Aug 9, 2025
c158c85
restore and update rst README
Trophime Aug 9, 2025
77ca3f0
Correct optionnal params for Bitters
Trophime Aug 20, 2025
1e72028
refactor test with ring
Trophime Sep 27, 2025
9e0b2e4
migrate simple class
Trophime Sep 28, 2025
f89a0ef
migrate Probe
Trophime Sep 28, 2025
b4f07f1
prepare migration for complex class
Trophime Sep 28, 2025
921bb53
migrate currentleads
Trophime Sep 28, 2025
c1a95da
rename Shape2D to Contour2D
Trophime Sep 28, 2025
2f57808
add more validation method
Trophime Sep 28, 2025
e4cef92
up refactor tests
Trophime Sep 28, 2025
c8488da
add backup files to gitignore
Trophime Sep 28, 2025
74d5d1e
remove old Shape2D
Trophime Sep 28, 2025
f457221
prepare 0.9.0 version
Trophime Sep 28, 2025
09a42ff
change shape field name to contour2d
Trophime Sep 28, 2025
a072528
add test for refactor tierod
Trophime Sep 28, 2025
b77d9a1
prepare 0.9.0 release
Trophime Sep 28, 2025
a80d32f
remove old test for tierod
Trophime Sep 28, 2025
bed2cbd
refactor coolingslit
Trophime Sep 28, 2025
b643980
refactor Bitter
Trophime Sep 28, 2025
3d5ccc7
up
Trophime Sep 28, 2025
2a336a5
disable legacy checks
Trophime Sep 29, 2025
59618e8
refactor Bitters
Trophime Sep 29, 2025
c67b2fe
fix Bitters refactor
Trophime Sep 29, 2025
db53b64
add Supra refactor
Trophime Sep 29, 2025
e56437e
refactor done
Trophime Sep 29, 2025
86f0003
add validation
Trophime Sep 29, 2025
a5fa222
add test for refactored Supra[s]
Trophime Sep 29, 2025
ab65a46
up with tests
Trophime Sep 30, 2025
c453a63
rename fields for clarity
Trophime Sep 30, 2025
83f57c9
up with tests
Trophime Sep 30, 2025
c2a0bf1
fix tests
Trophime Oct 1, 2025
0b257eb
add get_manet method
Trophime Oct 1, 2025
ffaae1a
add validation in init
Trophime Oct 1, 2025
ea52b7d
reorganize tests
Trophime Oct 1, 2025
64f5adf
fix currentleads tests
Trophime Oct 1, 2025
10ed69a
up old tests
Trophime Oct 1, 2025
c65c797
up with new field names and fix
Trophime Oct 1, 2025
05916e5
up with old tests
Trophime Oct 1, 2025
83d96cc
fixed adding proper inline defs
Trophime Oct 1, 2025
c732ecf
up README
Trophime Oct 1, 2025
74a49fe
make sure to oad objects in init
Trophime Oct 1, 2025
b0b7ccc
start fixing geometric validation
Trophime Oct 1, 2025
e561ef5
make sure that object are loaded directly in init
Trophime Oct 1, 2025
ddd88aa
up tests
Trophime Oct 1, 2025
e0dd2ae
Simplify bounding box - fix test
Trophime Oct 1, 2025
82d5d58
create objects when init for assembly of magnets
Trophime Oct 1, 2025
fd5e988
up with old tests - still missing fixes in yaml
Trophime Oct 1, 2025
e4ce5bc
fix old tests
Trophime Oct 2, 2025
02c0730
add more checks
Trophime Oct 2, 2025
ee32b72
fix tests with new checks
Trophime Oct 2, 2025
f393e87
set version to 1.0.0
Trophime Oct 2, 2025
313a263
make 1.0.0 version the default
Trophime Oct 2, 2025
fac71c5
fix docstring
Trophime Oct 2, 2025
33c664d
add claude prompts for refactoring guidelines
Trophime Oct 2, 2025
32786f4
fix tests
Trophime Oct 3, 2025
7183aae
add docstrings
Trophime Oct 3, 2025
edf2348
add docstrings
Trophime Oct 3, 2025
5118550
switch to pyproject.toml
Trophime Oct 3, 2025
db5f44d
switch to pyproject.toml install
Trophime Oct 3, 2025
5ddc985
implement medium priority tasks
Trophime Oct 3, 2025
95d1e25
make sure pyproject is in archive tarball
Trophime Oct 3, 2025
4c58151
use load_nested_list methods with tuple of class objects
Trophime Oct 3, 2025
4d9962c
downgrade requirement on pytest for bookworm
Trophime Oct 3, 2025
5510c98
cleanup docs
Trophime Oct 3, 2025
b5f3b26
Merge pull request #9 from MagnetDB/refactor_ring
Trophime Oct 3, 2025
73f56e5
Remove chevron from requirements
Trophime Oct 5, 2025
7cbac26
add missing description
Trophime Oct 5, 2025
3cc248f
Merge branch 'refactor_ring' of github.com:Trophime/python_magnetgeo …
Trophime Oct 5, 2025
61e9aae
up with doc
Trophime Oct 5, 2025
c04bb9e
make coolingslit name optional
Trophime Oct 5, 2025
6ec00bd
add nano and vim-nox for github integration
Trophime Oct 5, 2025
0d7a2ae
addshape consider HR and HL case
Trophime Oct 6, 2025
9023e90
make detail field an enum in Supra
Trophime Oct 6, 2025
e84bf84
fix test for detail
Trophime Oct 6, 2025
ec17792
split SupraStructure into hts submodule
Trophime Oct 6, 2025
1c295a6
support lazzy loading in init
Trophime Oct 6, 2025
574d6e2
revert splitting SupraStructure
Trophime Oct 6, 2025
aca71bd
simply split SupraStructure
Trophime Oct 6, 2025
4176f00
up docs
Trophime Oct 6, 2025
978f1ce
add pandas as requires
Trophime Oct 6, 2025
6e2e73f
comment out badges
Trophime Oct 6, 2025
4003924
cleanup
Trophime Oct 6, 2025
3afb0e4
add pands as required
Trophime Oct 6, 2025
de1051d
add _basedir field to YAMLObjectBase
Trophime Oct 7, 2025
c1fff93
Add a Profile class
Trophime Oct 7, 2025
e87e402
do not serialize _basedir
Trophime Oct 7, 2025
8f785b8
remove uneeded types
Trophime Oct 7, 2025
f511d86
fix adding _basedir
Trophime Oct 7, 2025
560b02b
remove add _basedir in base classes
Trophime Oct 7, 2025
5cd1fab
explicitly add _basedir member
Trophime Oct 8, 2025
1cb43c4
create enums.py to avoid circular import
Trophime Oct 8, 2025
c82bb34
rewrite test for ring/helices radius checks
Trophime Oct 9, 2025
febdfc4
add validation test for groove
Trophime Oct 9, 2025
20189c6
fix helix pytest for Groove
Trophime Oct 9, 2025
53683c1
better exceptions
Trophime Oct 12, 2025
f52df39
Merge branch 'refactor_ring' of github.com:MagnetDB/python_magnetgeo …
Trophime Oct 12, 2025
05af528
add start_hole diameter
Trophime Oct 24, 2025
bebea10
rename Bitter sections
Trophime Oct 24, 2025
43c133b
fix sphinx doc generation
Trophime Oct 24, 2025
9865abc
apply blake formatter
Trophime Oct 24, 2025
4574338
Add TODO list
Trophime Oct 24, 2025
162d08e
add languagetool vscode extension
Trophime Oct 24, 2025
abde3fb
up changelog
Trophime Oct 24, 2025
7607e83
Merge pull request #10 from MagnetDB/refactor_ring
Trophime Nov 7, 2025
a5c2ffd
remove name validation
Trophime Nov 7, 2025
ff4c0db
Merge branch 'main' into refactor_claude
Trophime Jan 20, 2026
e53e85e
add probes to Screen
Trophime Jan 21, 2026
e0bf09f
update value for test validation
Trophime Jan 21, 2026
63f8f22
Fix ruff warnings
Trophime Jan 21, 2026
28f1491
Merge branch 'refactor_claude' into refactor_ring
Trophime Jan 21, 2026
4b2e7b7
Merge pull request #12 from MagnetDB/refactor_ring
Trophime Jan 21, 2026
3870dbc
Up with Profile class for bumps on hcut
Trophime Jan 21, 2026
f2ecade
rename tests.old to tests.cfg
Trophime Jan 23, 2026
62c3b9a
rename tests.old
Trophime Jan 23, 2026
7b10abf
Merge branch 'refactor_claude' into refactor_ring
Trophime Jan 23, 2026
fab642a
add tests for Profile
Trophime Jan 23, 2026
c6d8fbf
up examples
Trophime Jan 23, 2026
3c2fb4d
add yaml test files
Trophime Jan 23, 2026
b7481bb
up for Profile class
Trophime Jan 23, 2026
908d670
add logging supprt
Trophime Jan 23, 2026
20ad511
use trixie as base OS for dev
Trophime Jan 23, 2026
a5b5b9f
add github action to run pytest
Trophime Jan 23, 2026
6dc62af
add notes on logging implementation by claude
Trophime Jan 23, 2026
1f5b713
name can be undefined in yaml files
Trophime Jan 26, 2026
48ac90b
add dry-run constructor check to get of loaded yaml files
Trophime Jan 26, 2026
dce1a59
add dry-run constructor check to get of loaded yaml files
Trophime Jan 26, 2026
6930395
cleanup
Trophime Jan 26, 2026
1d98840
remove probes
Trophime Jan 26, 2026
726b497
remove tool.uv section
Trophime Jan 26, 2026
18ca20b
add container files
Trophime Jan 26, 2026
670fb32
add recipe for singularity
Trophime Jan 26, 2026
205f27e
update helper scripts
Trophime Jan 26, 2026
26efd7b
add test for profile
Trophime Jan 26, 2026
7570194
update examples
Trophime Jan 26, 2026
8439411
cleanup for logging
Trophime Jan 26, 2026
0ec405d
up to 1.0.0-6
Trophime Jan 26, 2026
3d588f7
Remove rst readme
Trophime Jan 26, 2026
1d84e20
Merge branch 'refactor_ring' of github.com:MagnetDB/python_magnetgeo …
Trophime Jan 26, 2026
b86bec3
Merge branch 'refactor_claude' into refactor_ring
Trophime Jan 26, 2026
523aa3c
add helper to create helix yml for magnetdb
Trophime Jan 27, 2026
d5d6989
fix shape from_dict
Trophime Jan 27, 2026
e3b43ba
track yaml files to be loaded
Trophime Jan 27, 2026
408b8fc
move examples and add helpers in pyproject
Trophime Jan 27, 2026
ffaca24
add note on installed scripts
Trophime Jan 27, 2026
23cbe4a
use command for magnetdb
Trophime Jan 27, 2026
12628e1
Merge branch 'refactor_claude' of github.com:MagnetDB/python_magnetge…
Trophime Jan 27, 2026
7c67908
up docstring
Trophime Jan 27, 2026
15d9cd1
update changelog
Trophime Jan 27, 2026
239c86d
Merge branch 'refactor_claude' of github.com:MagnetDB/python_magnetge…
Trophime Jan 27, 2026
5d07eee
fix syntax
Trophime Jan 27, 2026
26b0507
use a python venv for ci on debian
Trophime Jan 27, 2026
f0b5e74
fix debian FTBS
Trophime Jan 27, 2026
4a39236
rename dump to write_to_yaml
Trophime Jan 27, 2026
d3b36ad
up
Trophime Jan 28, 2026
0ad7bb2
Merge branch 'refactor_claude' of github.com:MagnetDB/python_magnetge…
Trophime Jan 28, 2026
be11e75
switch to argparse
Trophime Jan 28, 2026
1c4ef44
Merge branch 'refactor_claude' of github.com:MagnetDB/python_magnetge…
Trophime Jan 28, 2026
85e0c1b
up debian packaging config files
Trophime Jan 28, 2026
c8fb56f
add helper to check ymal files
Trophime Jan 29, 2026
71660d7
update yaml examples for latest version
Trophime Jan 29, 2026
0b69af3
add visualisation feature
Trophime Jan 29, 2026
09dce90
ignore pngs
Trophime Jan 29, 2026
a6c1966
add check helper for yaml files
Trophime Jan 29, 2026
62fae5e
getObject form either json or yml file
Trophime Feb 2, 2026
ade788b
save complete yaml file to {model3d.cad}.yaml
Trophime Feb 2, 2026
279a862
Merge branch 'refactor_claude' of github.com:MagnetDB/python_magnetge…
Trophime Feb 2, 2026
52b9c43
Merge branch 'refactor_claude' of github.com:Trophime/python_magnetge…
Trophime Feb 2, 2026
5b7afc0
up infos
Trophime Feb 2, 2026
1fde35e
up singularity recipe
Trophime Feb 2, 2026
7ac9a1c
up for pyproject.toml
Trophime Feb 2, 2026
16e324f
use trixie as base platform
Trophime Feb 2, 2026
2c446a0
add matplotlib as suggested
Trophime Feb 2, 2026
fbc631d
Merge branch 'refactor_claude' of github.com:Trophime/python_magnetge…
Trophime Feb 2, 2026
046dfa7
up with lazzy loading
Trophime Feb 3, 2026
be23b95
make log messages more explicit
Trophime Feb 4, 2026
a6bd7cd
up
Trophime Feb 4, 2026
462e0c8
fix test insert data
Trophime Feb 4, 2026
71256c3
use consistant notation for start_diameter_hole
Trophime Feb 4, 2026
fd0a1a3
fix to_yaml for nested objects
Trophime Feb 4, 2026
2df22ed
add test for newest magnet
Trophime Feb 4, 2026
930d485
fix tags in to_yaml for nested objects
Trophime Feb 4, 2026
a0de098
ensure that inner and outer bore cannot be set to 0
Trophime Feb 5, 2026
bb7848d
fix pytest warnings
Trophime Feb 5, 2026
e287082
Fix missing exceptions exports
Trophime Feb 5, 2026
bebb5fa
add getNdbpancakes
Trophime Feb 5, 2026
3252251
add support for logging
Trophime Feb 5, 2026
21625db
convet rst to md
Trophime Feb 7, 2026
118e629
add helper script to convert ymal to new format
Trophime Feb 7, 2026
89d4b52
Merge branch 'refactor_claude' of github.com:Trophime/python_magnetge…
Trophime Feb 7, 2026
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
15 changes: 2 additions & 13 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:bookworm
FROM debian:trixie

USER root

Expand All @@ -24,7 +24,7 @@ RUN apt-get update \
&& apt-get -y install --no-install-recommends apt-utils dialog 2>&1 \
# \
# Verify git, process tools, lsb-release (useful for CLI installs) installed\
&& apt-get -y install git iproute2 procps lsb-release \
&& apt-get -y install git git-lfs vim-nox nano iproute2 procps lsb-release \
#\
# Install C++ tools\
&& apt-get -y install build-essential \
Expand Down Expand Up @@ -52,17 +52,6 @@ RUN apt-get update \
&& ssh-keyscan github.com >> ~vscode/.ssh/known_hosts \
&& chown -R vscode.$USER_GID ~vscode/.ssh

# install prerequistes from Lncmi debian repo
RUN apt update \
&& apt-get install -y lsb-release \
&& apt-get install -y debian-keyring \
&& cp /usr/share/keyrings/debian-maintainers.gpg /etc/apt/trusted.gpg.d \
&& echo "deb http://euler.lncmig.local/~christophe.trophime@LNCMIG.local/debian/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/lncmi.list \
&& apt update \
&& apt-get -y install python3-chevron

# Install latest gsh dev version (support for BoundingBox) ?
#RUN python3 -m pip install -i https://gmsh.info/python-packages --force-reinstall --no-cache-dir gmsh-dev

# Clean up
RUN apt-get autoremove -y \
Expand Down
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance",
"ms-python.black-formatter"
"ms-python.black-formatter",
"adamvoss.vscode-languagetool"
]
}
},
Expand Down
72 changes: 72 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Run Tests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test:
runs-on: ubuntu-24.04
strategy:
matrix:
python-version: ['3.11', '3.12']

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"

- name: Run pytest
run: |
pytest --cov=python_magnetgeo --cov-report=xml --cov-report=term

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
if: matrix.python-version == '3.11'
with:
file: ./coverage.xml
flags: unittests
fail_ci_if_error: false

test-debian:
runs-on: ubuntu-24.04
container:
image: debian:stable
strategy:
matrix:
python-version: ['3.13']

steps:
- name: Install system dependencies
run: |
apt-get update
apt-get install -y python${{ matrix.python-version }} python3-venv git

- name: Checkout code
uses: actions/checkout@v4

- name: Create virtual environment
run: |
python${{ matrix.python-version }} -m venv venv

- name: Install dependencies in virtual environment
run: |
. venv/bin/activate
python -m pip install --upgrade pip
pip install -e ".[dev]"

- name: Run pytest in virtual environment
run: |
. venv/bin/activate
pytest --cov=python_magnetgeo --cov-report=xml --cov-report=term
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ wheels/
.installed.cfg
*.egg

# Sphinx docs
docs/_build
docs/_statics

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
Expand Down Expand Up @@ -91,6 +95,7 @@ celerybeat-schedule

# virtualenv
.venv
env/
venv/
ENV/

Expand Down Expand Up @@ -121,5 +126,17 @@ ENV/

*~
*.orig
*.backup
*log
\#*\#

# ut track this specific test file
!tests.cfg/*.yaml

# container
*.sif
*.simg

# images
*.png

11 changes: 11 additions & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Credits
---

# Development Lead

- Christophe Trophime \<<christophe.trophime@lncmi.cnrs.fr>\>

# Contributors

None yet. Why not be the first?
13 changes: 0 additions & 13 deletions AUTHORS.rst

This file was deleted.

Loading