Skip to main content

PySM generates full-sky simulations of Galactic emissions in intensity and polarization

Project description

CI Tests Documentation Status PyPI Conda Astropy JOSS

PySM 3

PySM generates full-sky simulations of Galactic emissions in intensity and polarization relevant to CMB experiments. It is a large refactor of PySM 2 focused on reducing memory usage, improving performance and run in parallel with MPI.

See the documentation at https://pysm3.readthedocs.io

Contributor guidelines, coding standards, and testing expectations are documented in AGENTS.md (Repository Guidelines).

See changes in CHANGES.rst in the repository.

Install

See the documentation

  • Install with pip install . or with pip install .[test] to also install the requirements for running tests

  • Optionally, if you have an MPI environment available and you would like to test the MPI capabilities of PySM, install mpi4py and libsharp, check the documentation link above for more details.

  • This repository uses Git LFS for Jupyter notebook files (*.ipynb). Ensure Git LFS is installed and run git lfs pull after cloning to fetch large files.

  • Check code style with uv run flake8 src/pysm3 --count --max-line-length=100

  • Test with uv run pytest -v

  • Building docs requires pandoc, not the python package, the actual pandoc command line tool, install it with conda or your package manager

  • Build docs locally with uv run --extra docs sphinx-build -W -b html docs docs/_build/html

Support

For any question or issue with the software open an issue.

Release

  1. Review CHANGES.rst and move the entries you want to ship out of the Unreleased section into a dated <version> (<YYYY-MM-DD>) heading. Commit the changelog update (and any other release-related changes).

  2. Ensure the working tree is clean and up to date with git status and git pull.

  3. Create or refresh a local environment using uv:

    uv venv .venv
    uv pip install --python .venv/bin/python pip hatch
    uv pip install --python .venv/bin/python -e .[test]

    Activate it for the remaining steps with source .venv/bin/activate.

  4. Run the test suite (at least pytest) to verify the release build.

  5. Create the annotated release tag, e.g. git tag -a 3.4.3 -m "Release 3.4.3".

  6. Confirm Hatch picks up the tagged version:

    hatch version

    The output should match the tag (no .dev suffix).

  7. Build the distribution artifacts:

    hatch build
  8. Publish to PyPI using your API token. Hatch reads credentials from ~/.pypirc (username __token__). Alternatively export HATCH_INDEX_USER=__token__ and HATCH_INDEX_AUTH=<pypi-token> before running:

    hatch publish --no-prompt
  9. Update the conda-forge/pysm3-feedstock recipe for the new release (or merge the bot PR if it already exists) so the conda package is published as well.

  10. Push the tag (and any commits) to GitHub:

    git push --tags
  11. Draft the GitHub release notes referencing the matching CHANGES.rst entry and announce the release as needed.

Project details


Download files

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

Source Distribution

pysm3-3.4.5.tar.gz (58.2 kB view details)

Uploaded Source

Built Distribution

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

pysm3-3.4.5-py3-none-any.whl (75.1 kB view details)

Uploaded Python 3

File details

Details for the file pysm3-3.4.5.tar.gz.

File metadata

  • Download URL: pysm3-3.4.5.tar.gz
  • Upload date:
  • Size: 58.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.5 cpython/3.13.6 HTTPX/0.28.1

File hashes

Hashes for pysm3-3.4.5.tar.gz
Algorithm Hash digest
SHA256 34649d98735ff92feb7a39a988ccb68629cd920a8358ecb0f35f60341370e322
MD5 3788622dbf0cebd07f064d42665e00dd
BLAKE2b-256 99b5d77c0a3054c4fc7327bf9436634d50dbed8b95901ad07a087f6d1a6868c8

See more details on using hashes here.

File details

Details for the file pysm3-3.4.5-py3-none-any.whl.

File metadata

  • Download URL: pysm3-3.4.5-py3-none-any.whl
  • Upload date:
  • Size: 75.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.5 cpython/3.13.6 HTTPX/0.28.1

File hashes

Hashes for pysm3-3.4.5-py3-none-any.whl
Algorithm Hash digest
SHA256 51f9609be02aefffe4e0bd941278330d5afbfbc8b7e062eedb709166cab9495e
MD5 3828cd618ead1f21bb0f4e0e69f15cd8
BLAKE2b-256 76261173918bba8eed67a23c33eec2efea3709712302fdeb954b88168460c8c2

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 Pingdom Monitoring Sentry Error logging StatusPage Status page