Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Ifotools

Collection of useful interferometer functions.

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:

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.0a5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ifotools 1.0a5
File Size Uploaded
ifotools-1.0a5.tar.gz 3.4 MB Details

Release files / ifotools-1.0a5.tar.gz

Download URL ifotools-1.0a5.tar.gz
Size 3.4 MB
Tags Source
SHA-256 checksum
How to use checksums
c19b9ecc183858b8dcf8b71822489a75dbfc585ff7534866cddd9d96c3df364f
BLAKE2b-256 checksum
How to use checksums
c55abd38d3d32f04721f65ef62ee20c91cb31cea0f8be444ba21ac03cdb6c53b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page