Skip to content

Commit

Permalink
Merge branch 'main' into paddy/issue-124
Browse files Browse the repository at this point in the history
  • Loading branch information
paddyroddy authored Nov 15, 2024
2 parents 83f6c12 + 0dd2fb9 commit d5e47ac
Show file tree
Hide file tree
Showing 10 changed files with 99 additions and 27 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
20 changes: 18 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand Down
22 changes: 10 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://readthedocs.io>
[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.
Expand All @@ -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
Expand All @@ -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

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- Essentials -->

[![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)

<!-- Code -->
Expand Down Expand Up @@ -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
4 changes: 1 addition & 3 deletions docs/manual/first-steps.rst
Original file line number Diff line number Diff line change
@@ -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`.
40 changes: 38 additions & 2 deletions docs/manual/releases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
10 changes: 9 additions & 1 deletion glass/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
------
Expand Down Expand Up @@ -144,6 +149,7 @@ def cls2cov(
Yields
------
matrix
The covariance matrix for iterative sampling.
Raises
Expand Down Expand Up @@ -361,6 +367,7 @@ def generate_gaussian(
Yields
------
fields
The Gaussian random fields.
Raises
Expand Down Expand Up @@ -450,6 +457,7 @@ def generate_lognormal(
Yields
------
fields
The lognormal random fields.
"""
Expand Down
6 changes: 3 additions & 3 deletions glass/points.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions glass/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ def write_catalog(
Yields
------
writer
The writer object.
"""
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit d5e47ac

Please sign in to comment.