preciser AGENTS.md

This commit is contained in:
markusro committed 2026-10-16 22:36:08 +02:00
1 parent d8d7b9853a
commit c9af33bff0
1 file changed
+14 -13
+14 -13
View File
@@ -4,16 +4,17 @@
This is the front end part of GUI for controlling NMR spectrometers. On "Start", the experiment script executes and creates XML job files. A backend, not in this code, executes these jobs sequentially adn writes the results as XML files. The front end consumes these result files using the result script. This is the front end part of GUI for controlling NMR spectrometers. On "Start", the experiment script executes and creates XML job files. A backend, not in this code, executes these jobs sequentially adn writes the results as XML files. The front end consumes these result files using the result script.
## Guidelines ## Guidelines
1. Use the .venv python3 environment 1. Prefer the system python and notify the user if libraries and packages are missing. Use uv for the python3 environment only if system packages are missing and the user does not want to install the needed packages.
5. Old code was ported from gtk2 and python2.7. This code has to work on python 3.11 and above, as well as GTK3 2. Old code was ported from gtk2 and python2.7. This code has to work on python 3.11 and above, as well as GTK3
2. Be aware the targeted Debian versions are bookworm, trixie, and forky. 3. Be aware the targeted Debian versions are bookworm, trixie, and forky.
3. Only use packages and libraries available in Debian bookworm, trixie, and forky. Make sure that the code is compatible with all of these versions. 4. Only use packages and libraries available in Debian bookworm, trixie, and forky. Make sure that the code is compatible with all of these versions.
3. Do not commit changes (with git) or write commit messages without asking the user. 5. Do not commit changes (with git) or write commit messages without asking the user.
4. Try to minimize code changes, do not use elaborate checks for defensive programming. Ask the user if something should be tested with unit tests. 6. Try to minimize code changes, do not use elaborate checks for defensive programming. Ask the user if something should be tested with unit tests.
6. Use the python unittest module for unit tests, not pytest 7. Use the python unittest module for unit tests, not pytest
7. Functions for the experiment script belong to the src/damaris/experiments/Experiment.py file 8. Functions for the experiment script belong to the src/damaris/experiments/Experiment.py file
8. Functions for the result script belong in the files in the src/damaris/data/ folder 9. Functions for the result script belong in the files in the src/damaris/data/ folder
9. The gitea workflow can be found at .gitea/workflows/debian-build.yml 10. The gitea workflow can be found at .gitea/workflows/debian-build.yml
10. to not edit anything in "build", it is regenerated 11. Do not edit anything in "build", it is regenerated
11. Use sphinx for documentation, autodoc and autosummary is used for references of all classes, functions and modules. 12. Use sphinx for documentation, autodoc and autosummary is used for references of all classes, functions and modules.
12. If a new function/method is created document a short usage the doc/api_reference.rst and a longer explanation in doc/manual.rst 13. If a new function/method is created document a short usage in doc/api_reference.rst and a longer explanation in doc/manual.rst
14. Do not use the Makefile in ./doc/, Doxygen is not used anymore.