From 56482061ec706d5d9b1c171d3a6362ad87fced64 Mon Sep 17 00:00:00 2001 From: Francois Lanusse Date: Sat, 7 Feb 2026 16:02:59 +0100 Subject: [PATCH 1/3] Update docs: replace Black with Ruff, move changelog to GitHub Releases - README: replace Black badge with Ruff badge - CONTRIBUTING: replace all Black references with Ruff, add venv setup, fix typos (donwload, -set-upstream, stray backtick), remove CHANGELOG.md update step from PR checklist - CHANGELOG: point to GitHub Releases instead of inline changelog Co-Authored-By: Claude Opus 4.6 --- CHANGELOG.md | 34 +--------------------------------- CONTRIBUTING.md | 33 +++++++++++++++------------------ README.md | 2 +- 3 files changed, 17 insertions(+), 52 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aadb1b01..9a56956c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,35 +1,3 @@ # Change log -## JAX-GalSim 0.0.1 (Unreleased) - -* Changes - * Added simplified versions of basic objects, with no support of Chromatic objects yet: - * `GSObjects` and `gsparams` - * `Sum` - * `Position`, `PositionD` and `PositionI` - * `Transformation` - * `Shear` - * `Convolve` - * `InterpolatedImage` and `Interpolant` - * `PhotonArray` - * `Sensor` - * `AngleUnit`, `Angle`, and `CelestialCoord` - * `BaseDeviate` and child classes - * `BaseNoise` and child classes - * Added implementation of fundamental operations: - * `drawImage` - * `drawReal` - * `drawFFT` - * `drawKImage` - * `makePhot` - * `drawPhot` - * Added implementation of simple light profiles: - * `Gaussian`, `Exponential`, `Pixel`, `Box`, `Moffat`, `Spergel`, `DeltaFunction` - * Added implementation of simple WCS: - * `PixelScale`, `OffsetWCS`, `JacobianWCS`, `AffineTransform`, `ShearWCS`, `OffsetShearWCS`, `GSFitsWCS`, `FitsWCS`, `TanWCS` - * Added automated suite of tests using the reference GalSim and LSSTDESC-Coord test suites - * Added support for the `galsim.fits` module - * Added a `from_galsim` method to convert from GalSim objects to JAX-GalSim objects - -* Caveats - * Real space convolution are not yet implemented in `drawImage``. +See [GitHub Releases](https://github.com/GalSim-developers/JAX-GalSim/releases) for the changelog. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7546c8ae..0f316c60 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,10 +17,12 @@ Once you have some code you wish to contribute, you can follow this procedure to ```bash git clone --recurse-submodules https://github.com/YOUR_USERNAME/JAX-GalSim cd JAX-GalSim - pip install --user -e . + python -m venv .venv && source .venv/bin/activate + pip install -e ".[dev]" + pre-commit install ``` - This will install your local fork in editable mode, meaning you can directly modify source files in this folder without having to reinstall the package for them to be taken into account. Note the option `--recurse-submodules` needed to donwload the submodules required to run the tests. + This will install your local fork in editable mode, meaning you can directly modify source files in this folder without having to reinstall the package for them to be taken into account. Note the option `--recurse-submodules` needed to download the submodules required to run the tests. - Open a branch for your developments: @@ -36,10 +38,10 @@ Once you have some code you wish to contribute, you can follow this procedure to - Once you are happy with your modifications, commit them, and push your changes to GitHub: - ```python + ```bash git add file_I_changed.py git commit -m "a message that describes your modifications" - git push -set-upstream origin name-that-describes-my-feature + git push --set-upstream origin name-that-describes-my-feature ``` - From your GitHub interface, you should now be able to open a Pull Request to the JAX-GalSim repository. @@ -68,15 +70,18 @@ Before submitting your PR, have a look at the procedure documented below. Ideally there should be some new unit tests for the new functionality, unless the work is completely covered by existing unit tests. -- Make sure your code conforms to the [Black](https://github.com/psf/black) style: +- Make sure your code passes linting and formatting: ```bash - black . + ruff check . --fix + ruff format . ``` - If you haven't installed it already, you can install Black with `pip install black`. + Or simply run the pre-commit hooks: -- Update CHANGELOG.md to mention your change. + ```bash + pre-commit run --all-files + ``` - Make sure any new files have BSD license at the top. @@ -114,17 +119,9 @@ git rebase -i ### Code Style -In this project we follow the [Black](https://github.com/psf/black) code formatting guidelines` (Any color you like...) This means that all code should be automatically formatted using Black and CI will fail if that's not the case. - -You can install Black locally like so: - -```bash -pip install black -``` - -And run it manually from the root directory of your local clone with `black .` +This project uses [Ruff](https://github.com/astral-sh/ruff) for linting and formatting. Pre-commit hooks run Ruff automatically on every commit. -We highly recommend installing `pre-commit`, which will take care of running Black for you before any commit you make: +We highly recommend installing `pre-commit`, which will take care of running the checks for you before any commit you make: ```bash pip install pre-commit diff --git a/README.md b/README.md index 8a765ef1..fb0dd02a 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ **JAX port of GalSim, for parallelized, GPU accelerated, and differentiable galaxy image simulations.** -[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](code_of_conduct.md) [![Python package](https://github.com/GalSim-developers/JAX-GalSim/actions/workflows/python_package.yaml/badge.svg)](https://github.com/GalSim-developers/JAX-GalSim/actions/workflows/python_package.yaml) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/GalSim-developers/JAX-GalSim/main.svg)](https://results.pre-commit.ci/latest/github/GalSim-developers/JAX-GalSim/main) [![CodSpeed Badge](https://img.shields.io/endpoint?url=https://codspeed.io/badge.json)](https://codspeed.io/GalSim-developers/JAX-GalSim) +[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](code_of_conduct.md) [![Python package](https://github.com/GalSim-developers/JAX-GalSim/actions/workflows/python_package.yaml/badge.svg)](https://github.com/GalSim-developers/JAX-GalSim/actions/workflows/python_package.yaml) [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/GalSim-developers/JAX-GalSim/main.svg)](https://results.pre-commit.ci/latest/github/GalSim-developers/JAX-GalSim/main) [![CodSpeed Badge](https://img.shields.io/endpoint?url=https://codspeed.io/badge.json)](https://codspeed.io/GalSim-developers/JAX-GalSim) **Disclaimer**: This project is still in an early development phase, **please use the [reference GalSim implementation](https://github.com/GalSim-developers/GalSim) for any scientific applications.** From 624bc2874ec9e027e0ee15f6a1598f47a0986186 Mon Sep 17 00:00:00 2001 From: Francois Lanusse Date: Sat, 7 Feb 2026 16:13:18 +0100 Subject: [PATCH 2/3] Fixing the versionning scm --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6780330a..12a9200c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,7 +32,7 @@ home = "https://github.com/GalSim-developers/JAX-GalSim" [tool.setuptools.packages.find] include = ["jax_galsim*"] -[tool.setuptools-scm] +[tool.setuptools_scm] write_to = "jax_galsim/_version.py" fallback_version = "0.0.1.dev0" From eddd75cb5ae212d2e893f3d17e7159f06239ea02 Mon Sep 17 00:00:00 2001 From: "Matthew R. Becker" Date: Sat, 7 Feb 2026 14:23:56 -0600 Subject: [PATCH 3/3] Apply suggestion from @beckermr --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a56956c..9aa34e09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,3 @@ -# Change log +# Changelog See [GitHub Releases](https://github.com/GalSim-developers/JAX-GalSim/releases) for the changelog.