Skip to main content

Lemaitre

The LemaitreModels package family: certified, differentiable, parametric models of binary-black-hole spacetimes, one scientific domain per repository, all installing under the shared lemaitre namespace.

import lemaitre as lm

lm.initial_data.conformally_flat_puncture.solver.solver_3d   # the CF production 3-D xCFC solver
lm.initial_data.conformally_flat_puncture.parametric         # the certified/differentiable ROM
lm.initial_data.curved_puncture                              # the curved-puncture successor

This repository is the core: it owns the lemaitre namespace root and ships nothing else. It has no runtime dependencies, so every sibling can depend on it without inheriting a solver stack.

The family

The namespace is two levels deep, and exactly one distribution owns each level.

namespace distribution repository
lemaitre lemaitre Lemaitre (this repo)
lemaitre.initial_data LM-initial-data LM-initial-data — the umbrella
lemaitre.initial_data.conformally_flat_puncture LMID-conformally-flat-puncture LMID-conformally-flat-puncture
lemaitre.initial_data.curved_puncture LMID-curved-puncture LMID-curved-puncture
lemaitre.inspiral LM-inspiral LM-inspiral — the umbrella
lemaitre.inspiral.radiative_puncture (not packaged yet) LMI-radiative-puncture
lemaitre.ringdown LM-ringdown LM-ringdownnot packaged yet

Each domain is a git submodule of this repository; each installs, tests and releases independently. pkgutil.extend_path merges the lemaitre/ directories found on sys.path into one package, and a PEP 562 __getattr__ imports subpackages lazily, so import lemaitre alone is enough to reach any installed member.

Install

git clone --recurse-submodules git@github.com:LemaitreModels/Lemaitre.git
cd Lemaitre

E="--config-settings editable_mode=compat"
pip install -e . $E                                            # the core
pip install -e LM-initial-data $E                              # the initial-data umbrella
pip install -e LM-initial-data/LMID-conformally-flat-puncture $E
pip install -e LM-initial-data/LMID-curved-puncture $E
pip install -e LM-inspiral $E                                  # the inspiral umbrella

python -c "import lemaitre as lm; lm.initial_data.conformally_flat_puncture"   # smoke check

Installing a leaf pulls its own dependencies (jax, numpy, scipy, matplotlib for the puncture models) plus the core and umbrella it declares. Install only the members you need — they are independent distributions.

editable_mode=compat is not optional. setuptools' modern editable mode installs each distribution behind a meta-path finder, and PathFinder runs before those, so the leaves' bare lemaitre/initial_data/ directories win as PEP 420 namespace portions and the umbrella's real __init__.py is never loaded. Direct imports still work; lm.initial_data.<model> does not. Normal (non-editable) installs are unaffected.

Working across the submodules

The family is one superproject and one submodule per domain, nested two deep (LemaitreLM-initial-dataLMID-*). The ordering rule is asymmetric, and it is the whole discipline.

Committing and pushing: innermost → outermost. Push a leaf before committing the pointer that names it — a superproject commit recording a SHA nobody can fetch breaks the clone for everyone but its author.

git -C LM-initial-data/LMID-curved-puncture commit -m "..."      # 1. the leaf
git -C LM-initial-data/LMID-curved-puncture push origin main
git -C LM-initial-data add LMID-curved-puncture                  # 2. the umbrella
git -C LM-initial-data commit -m "Advance the curved-puncture submodule to ..."
git -C LM-initial-data push origin main
git add LM-initial-data                                          # 3. the superproject
git commit -m "Advance the initial-data umbrella to ..." && git push origin main

Pulling: outermost → innermost. The superproject tells the submodules where to go, never the reverse: git pull && git submodule update --init --recursive.

A submodule commit is not a change until its parent records it. The pointer must be staged in every parent up the chain, or the work is invisible to a fresh clone. git submodule status --recursive from the root flags a stale pointer with a leading +.

Set this up once, and git enforces the first rule for you instead of leaving it to discipline:

git config push.recurseSubmodules on-demand   # or 'check' to refuse rather than auto-push
git config submodule.recurse true             # pull/checkout/switch recurse
git config status.submoduleSummary true       # `git status` says which submodule moved
git config diff.submodule log                 # pointer diffs render as commit subjects

Pointer-bump commit messages should say what moved and why (old → new plus a line of content): that message is the only thing a reader of the superproject history sees. A leaf's main can also advance without any parent noticing — git submodule foreach --recursive 'git fetch -q && git status -sb | head -1' spots leaves that have drifted ahead of the recorded pointer.

License

GPL-3.0 (see LICENSE).

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lemaitre-0.1.0.tar.gz (43.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lemaitre-0.1.0-py3-none-any.whl (29.2 kB view details)

Uploaded Python 3

File details

Details for the file lemaitre-0.1.0.tar.gz.

File metadata

  • Download URL: lemaitre-0.1.0.tar.gz
  • Upload date:
  • Size: 43.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for lemaitre-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6cf2bfa1ec2c3f8bd0cd8abe5309df8b613c70cdb97759ac6fd4f8366a65860e
MD5 ab6375fb2d886877c84c4d12deae2531
BLAKE2b-256 fc54f5eb5792e7d537f672c36c9e12d50f6425c40cb4a522a1a32355d80ae5b1

See more details on using hashes here.

File details

Details for the file lemaitre-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: lemaitre-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 29.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for lemaitre-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8684cfe1060ddf29b687df6d69f32e8c2980edca6000bb98e0929d18d154ec3f
MD5 01ee5e3390d5a253f335766e322cd325
BLAKE2b-256 9966ce815e4af8ab6718b60092e1255603554f484e402dc873128e4b0a6cca90

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page