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.6.tar.gz (58.3 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.6-py3-none-any.whl (75.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pysm3-3.4.6.tar.gz
  • Upload date:
  • Size: 58.3 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.6.tar.gz
Algorithm Hash digest
SHA256 e491922ed3cc3de98f8ba273f6b1cfdfd5fadad8a359e8939a39cf0cd29c2397
MD5 b36f957fb6422bc3d1b426a75b153179
BLAKE2b-256 56bb1bcd5cc127334308204362ec0c27540cacb4935b0d0e9b992f4fe406cdf5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pysm3-3.4.6-py3-none-any.whl
  • Upload date:
  • Size: 75.2 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 4183006ffc16e4a5a95026bfe99f30ec1e00bc06ca742a86ee0e4f554d6331db
MD5 6921d2af218aebde549371ffa3e9d19f
BLAKE2b-256 242fe8ea08536efc62ba7347c8ca7a1ec3f32846bfe71dd55061faa4db7fb313

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