diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6dd84e0..c32638c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -34,7 +34,8 @@ jobs: pip install git+https://github.com/MP-Gadget/pfft-python pip install git+https://github.com/MP-Gadget/pmesh pip install git+https://github.com/ASKabalan/fastpm-python --no-build-isolation - pip install .[test] + pip install -r requirements-test.txt + pip install . - name: Run Single Device Tests run: | diff --git a/.gitignore b/.gitignore index baef139..aa8eb07 100644 --- a/.gitignore +++ b/.gitignore @@ -132,3 +132,6 @@ dmypy.json # Pyre type checker .pyre/ + +# Hide version file +_version.py diff --git a/LICENSE b/LICENSE index 5a4e0e3..d642186 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2021 Differentiable Universe Initiative +Copyright (c) 2021-2025 Differentiable Universe Initiative Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..24805f4 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,2 @@ +prune notebooks +prune tests diff --git a/README.md b/README.md index 28a40c3..47041ab 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,18 @@ # JaxPM -[![Tests](https://github.com/DifferentiableUniverseInitiative/JaxPM/actions/workflows/tests.yml/badge.svg)](https://github.com/DifferentiableUniverseInitiative/JaxPM/actions/workflows/tests.yml) +[![PyPI version](https://img.shields.io/pypi/v/jaxpm)](https://pypi.org/project/jaxpm/) [![Tests](https://github.com/DifferentiableUniverseInitiative/JaxPM/actions/workflows/tests.yml/badge.svg)](https://github.com/DifferentiableUniverseInitiative/JaxPM/actions/workflows/tests.yml) [![All Contributors](https://img.shields.io/badge/all_contributors-5-orange.svg?style=flat-square)](#contributors-) JAX-powered Cosmological Particle-Mesh N-body Solver +## Install + +Basic installation can be done using pip: +```bash +pip install jaxpm +``` +For more advanced installation for optimized distribution on gpu clusters, please install jaxDecomp first. See instructions [here](https://github.com/DifferentiableUniverseInitiative/jaxDecomp). + + ## Goals Provide a modern infrastructure to support differentiable PM N-body simulations using JAX: diff --git a/pyproject.toml b/pyproject.toml index 80377f9..a41096d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = ["setuptools", "wheel", "setuptools-scm"] build-backend = "setuptools.build_meta" [project] -name = "JaxPM" +name = "jaxpm" dynamic = ["version"] description = "A simple Particle-Mesh implementation in JAX" authors = [{ name = "JaxPM developers" }] @@ -13,19 +13,6 @@ license = { file = "LICENSE" } urls = { "Homepage" = "https://github.com/DifferentiableUniverseInitiative/JaxPM" } dependencies = ["jax_cosmo", "jax>=0.4.30", "jaxdecomp>=0.2.2"] -[project.optional-dependencies] -test = [ - "jax>=0.4.30", - "numpy", - "jax_cosmo", - "jaxdecomp>=0.2.2", - "pytest>=8.0.0", - "pfft-python @ git+https://github.com/MP-Gadget/pfft-python", - "pmesh @ git+https://github.com/MP-Gadget/pmesh", - "fastpm @ git+https://github.com/ASKabalan/fastpm-python", - "diffrax" -] - [tool.setuptools] packages = ["jaxpm"] diff --git a/requirements-test.txt b/requirements-test.txt new file mode 100644 index 0000000..4fa2ce6 --- /dev/null +++ b/requirements-test.txt @@ -0,0 +1,5 @@ +pytest>=8.0.0 +diffrax +pfft-python @ git+https://github.com/MP-Gadget/pfft-python +pmesh @ git+https://github.com/MP-Gadget/pmesh +fastpm @ git+https://github.com/ASKabalan/fastpm-python