diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8e8a53b9..2f638a51 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,6 +21,21 @@ jobs: - name: Checkout source uses: actions/checkout@v4 + - name: Replace stable version with the release version + run: |- + # store the release tag + tag="${{ github.ref_name }}" + + # regex patterns + badge_pattern="s#(readthedocs\.org/projects/glass/badge/\?version=)stable#\1${tag}#g" + url_pattern="s#(glass\.readthedocs\.io.*?)/stable#\1/${tag}#g" + + # perform the replacements + sed --in-place --regexp-extended \ + --expression "$badge_pattern" \ + --expression "$url_pattern" \ + ${{ github.workspace }}/README.md + - name: Build SDist and wheel run: pipx run build diff --git a/CHANGELOG.md b/CHANGELOG.md index 4db2d737..8ef08157 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,23 @@ # Changelog -All notable changes to the project are documented in this file. The format is -based on [Keep a Changelog](https://keepachangelog.com). +All functional changes to the project are documented in this file. + +## [2024.2] (15 Nov 2024) + +- gh-188: add docstrings to all functions and tidy docs (#381) +- gh-336: support Python 3.13 (#337) +- gh-358: add static types support (#368) +- gh-131: rename `gaussian_gls` to `discretized_cls` (#345) +- gh-328: efficient resampling in `ellipticity_ryden04` (#341) +- gh-137: deprecate `redshifts_from_nz` in favor of `redshifts` (#333) +- gh-328: fix shape mismatch bug in ellipticity_ryden04 (#332) +- gh-315: add broadcasting rule in ellipticity_ryden04 + tests (#317) +- gh-198: enforce `python>3.8` & `numpy>1.21` (#326) +- gh-260: remove glass.core.constants (#261) +- gh-107: add all public functions/classes under glass namespace (#221) +- gh-168: move examples into repository (#169) +- gh-156: add FITS catalogue writer tool (#158) ## [2024.1] (16 Jul 2024) @@ -143,6 +158,7 @@ based on [Keep a Changelog](https://keepachangelog.com). - Initial wide release for GLASS paper +[2024.2]: https://github.com/glass-dev/glass/compare/v2024.1...v2024.2 [2024.1]: https://github.com/glass-dev/glass/compare/v2023.7...v2024.1 [2023.7]: https://github.com/glass-dev/glass/compare/v2023.6...v2023.7 [2023.6]: https://github.com/glass-dev/glass/compare/v2023.5...v2023.6 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 09f78990..efd3b302 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -78,7 +78,7 @@ rendering documentation on its website. The configuration file (`conf.py`) for `sphinx` can be found [under the `docs` folder](https://github.com/glass-dev/glass/blob/main/docs/conf.py). The documentation is deployed on -[here](https://glass.readthedocs.io/en/latest/). +[here](https://glass.readthedocs.io/latest/). Ideally, with the addition of every new feature to _GLASS_, documentation should be added using comments, docstrings, and `.rst` files. @@ -101,12 +101,12 @@ any browser by opening the `index.html` file. ## Releases -To release a new version of _GLASS_, there should be a commit titled -`REL: glass yyyy.mm` that includes the following changes: +To release a new version of _GLASS_, there should be a commit that includes the +following changes: -- The changelog trailers since the last release are parsed into the - [changelog](CHANGELOG.md) under a section titled `[yyyy.mm] (DD Mon YYYY)`. A - new link to the changeset is added at the bottom of the file. +- The changes since the last release are added to the [changelog](CHANGELOG.md) + under a section titled `[yyyy.mm] (DD Mon YYYY)`. A new link to the changeset + is added at the bottom of the file. - The [release notes](docs/manual/releases.rst) are updated with the new version. The release notes should translate the changelog entries into prose that can be understood by non-developer users of the code. If there are @@ -129,14 +129,12 @@ PyPI. _GLASS_ follows [CalVer](https://calver.org). There is no difference between releases that increment the year and releases that increment the month; in particular, releases that increment the month may introduce breaking changes. -The version is generate dynamically through VCS using -[`hatch-vcs`](https://github.com/ofek/hatch-vcs). -The target is to have a new _GLASS_ release at the beginning of each month, as -long as there have been changes. +The current version number is automatically inferred from the last release +(i.e., git tag), subsequent unreleased commits, and local changes, if any. -The current version number is automatically inferred from the last release (i.e. -git tag), subsequent unreleased commits, and local changes, if any. +The target is to have a new _GLASS_ release once there are significant changes +to the code's functionality. ## Nox diff --git a/README.md b/README.md index 42fbcbd6..d050615f 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![PyPI](https://img.shields.io/pypi/v/glass)](https://pypi.org/project/glass) -[![Documentation](https://readthedocs.org/projects/glass/badge/?version=latest)](https://glass.readthedocs.io/latest) +[![Documentation](https://readthedocs.org/projects/glass/badge/?version=stable)](https://glass.readthedocs.io/stable) [![LICENSE](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) @@ -80,7 +80,7 @@ e.g. a design decision or API change, you can use our [Discussions] page. We also have a public [Slack workspace] for discussions about the project. -[documentation]: https://glass.readthedocs.io/ -[examples]: https://glass.readthedocs.io/projects/examples/ +[documentation]: https://glass.readthedocs.io/stable +[examples]: https://glass.readthedocs.io/stable/examples.html [Discussions]: https://github.com/orgs/glass-dev/discussions [Slack workspace]: https://glass-dev.github.io/slack diff --git a/docs/manual/first-steps.rst b/docs/manual/first-steps.rst index f1ff2ded..37e899e9 100644 --- a/docs/manual/first-steps.rst +++ b/docs/manual/first-steps.rst @@ -1,6 +1,4 @@ First steps =========== -The best way to get started with *GLASS* is to follow the examples__. - -__ https://glass.readthedocs.io/projects/examples/ +The best way to get started with *GLASS* is to follow the :doc:`/examples`. diff --git a/docs/manual/releases.rst b/docs/manual/releases.rst index 69c0e3d0..8356625f 100644 --- a/docs/manual/releases.rst +++ b/docs/manual/releases.rst @@ -5,8 +5,44 @@ Release notes These notes document the changes between individual *GLASS* releases. -2024.1 (16 Jul 2024) ---------------------- +2024.2 (15 Nov 2024) +-------------------- + +* All GLASS user functionality is now available directly from the main + ``glass`` namespace. No more imports! + +* Changes to the functions dealing with Gaussian spectra: + + * ``gaussian_gls()`` was renamed to :func:`glass.discretized_cls`, which + better reflects what the function does. + + * The implicit call to :func:`glass.discretized_cls` was removed from + :func:`glass.lognormal_gls`. Call :func:`glass.discretized_cls` explicitly + with the desired ``ncorr=``, ``lmax=``, and ``nside=`` parameters. + +* ``redshifts_from_nz()`` is deprecated in favour of :func:`glass.redshifts`, + as the former is almost never the right choice: the two-point statistics in a + linear bias model are coming from the shells, so the redshift distribution is + implicitly the same as the radial profile of the shells. + +* Several fixes to :func:`glass.ellipticity_ryden04`. + +* Added a FITS catalogue writer tool :func:`glass.write_catalog`. + +* Much improved documentation with docstring for all functions. + +* Examples now live in the main GLASS repository and documentation. + +* GLASS is now fully typed and passes mypy. + +* Python 3.13 is now supported. Python 3.8 and NumPy 1.21 are no longer + supported. + +* The ``glass.core.constants`` module was removed. + + +2024.1 (16 Jul 2024) +-------------------- * Further changes to the :func:`~glass.shells.partition()` function. diff --git a/glass/fields.py b/glass/fields.py index e433dc51..df80bb01 100644 --- a/glass/fields.py +++ b/glass/fields.py @@ -62,7 +62,12 @@ def iternorm( Yields ------ - The index, vector, and standard deviation for iterative sampling. + index + The index for iterative sampling. + vector + The vector for iterative sampling. + standard_deviation + The standard deviation for iterative sampling. Raises ------ @@ -144,6 +149,7 @@ def cls2cov( Yields ------ + matrix The covariance matrix for iterative sampling. Raises @@ -361,6 +367,7 @@ def generate_gaussian( Yields ------ + fields The Gaussian random fields. Raises @@ -450,6 +457,7 @@ def generate_lognormal( Yields ------ + fields The lognormal random fields. """ diff --git a/glass/points.py b/glass/points.py index 831c083a..6ab73b8a 100644 --- a/glass/points.py +++ b/glass/points.py @@ -342,11 +342,11 @@ def uniform_positions( Yields ------ - lon: + lon Columns of longitudes for the sampled points. - lat: + lat Columns of latitudes for the sampled points. - count: + count The number of sampled points. For array inputs, an array of counts with the same shape is returned. diff --git a/glass/user.py b/glass/user.py index 58f1860e..7d5e3db5 100644 --- a/glass/user.py +++ b/glass/user.py @@ -190,6 +190,7 @@ def write_catalog( Yields ------ + writer The writer object. """ diff --git a/pyproject.toml b/pyproject.toml index 91ca810b..4efdff62 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,7 +68,7 @@ test = [ [project.urls] Changelog = "https://glass.readthedocs.io/stable/manual/releases.html" -Documentation = "https://glass.readthedocs.io/" +Documentation = "https://glass.readthedocs.io/stable" Homepage = "https://github.com/glass-dev/glass" Issues = "https://github.com/glass-dev/glass/issues"