This release is a pre-release and may not be stable for production use.
Ifotools
Collection of useful interferometer functions.
PDF Documentation
A PDF with the overview of the functions and their docstring can be found:
https://ifosim.gitlab.io/ifotools/ifotools.pdf
Layout
The overall package is called ifotools, in which submodules(folders) can be
created. Every folder should have an __init__.py file inside (can be empty).
For now the suggestion is to put virgo related functions under
src/ifotools/virgo
examples should contain notebooks explaining how the functions can be used.
tests should contain pytest compatible tests (see
https://pytest-with-eric.com/ and
https://docs.pytest.org/en/stable/getting-started.html)
Optimally the folder structure in all three (src, tests, examples) should
be identical.
Installation
Clone the repository
git clone git@gitlab.com:ifosim/ifotools.git
cd ifotools
Conda (prefered)
Install via pip in any conda/python environment.
conda create -n ifotools --file environment.yml
pip install -e . --no-deps --no-build-isolation
Pip
pip install -e .[test,lint,dev]
SSH keys
The above requires you to have an ssh key added to your gitlab account:
- https://gitlab.nikhef.nl/-/user_settings/ssh_keys
- https://docs.gitlab.com/user/ssh/#what-are-ssh-keys
Alternatively you can do
git clone https://gitlab.com/ifosim/ifotools.git
But you may have to enter your username and password when pushing and pulling.
To test:
python -c 'import ifotools'
Updating
Just run
git pull
in the repo root folder and it should update.
Where to add code
You can just add python files in src/ifotools. You can also add folders, as
long as they have an __init__.py inside.
Imports
It would be cleanest to use absolute imports inside the package e.g.
from ifotools.sympy_helpers import print_expression_eval
and not
from .sympy_helpers import ****
Formatting and linting
It is a good habit to use ruff (pip install ruff/conda install -c conda-forge ruff) and run:
ruff check --fix my_file.py
ruff format my_file.py
This will help you spot common mistakes and format all files in the same way.
VS code can automate this by adding the following to your workspace settings
{
"[python]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": "explicit",
"source.organizeImports": "explicit"
},
},
"notebook.formatOnSave.enabled": true,
"notebook.codeActionsOnSave": {
"notebook.source.fixAll": "explicit",
"notebook.source.organizeImports": "explicit"
},
}
Dependencies
Dependencies are listed in the pyproject.toml. There is a conda environment.yml file which can be generated from the pyproject.toml file via python scripts/generate_environment_files.py. Please make sure they keep in sync.
Metadata
Release files for ifotools 1.0a10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ifotools-1.0a10.tar.gz | 3.4 MB | Details |
Release files / ifotools-1.0a10.tar.gz
| Download URL | ifotools-1.0a10.tar.gz |
|---|---|
| Size | 3.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
426dc96fcf575be9f67a8c8a026e9ac68804cc4f352d8766e079696b7936977b
|
|
BLAKE2b-256 checksum How to use checksums |
2fd155e7225b5d637e01b243a73aa49ccc814b7e74c9360958f3ab8d9d149d66
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|