Skip to content

Commit

Permalink
Merge branch 'main' into ia_nla
Browse files Browse the repository at this point in the history
  • Loading branch information
ntessore committed Mar 19, 2024
2 parents 6da74db + 685d462 commit a8161fa
Show file tree
Hide file tree
Showing 53 changed files with 2,453 additions and 583 deletions.
13 changes: 13 additions & 0 deletions .commitlint.rules.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
rules: {
"header-max-length": [2, "always", 65],
"subject-case": [0, "always", "sentence-case"],
"scope-enum": [2, "always", ["all", "core", "fields", "galaxies",
"lensing", "math", "observations", "points",
"shapes", "shells", "user"]],
"scope-case": [0, "always", "lower-case"],
"type-enum": [2, "always", ["API", "BUG", "DEP", "DEV", "DOC", "ENH",
"MNT", "REV", "STY", "TST", "TYP", "REL"]],
"type-case": [0, "always", "upper-case"],
}
}
2 changes: 2 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[flake8]
ignore = E226,E501,E741
2 changes: 2 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ updates:
directory: "/"
schedule:
interval: "weekly"
commit-message:
prefix: "DEV"
2 changes: 2 additions & 0 deletions .github/test-constraints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--prefer-binary
--only-binary numpy,scipy,healpy,healpix
17 changes: 0 additions & 17 deletions .github/workflows/build.yml

This file was deleted.

15 changes: 0 additions & 15 deletions .github/workflows/publish.yml

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Pull Request

on:
pull_request:
branches:
- main
types:
- opened
- edited
- synchronize

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
lint-pr:
name: Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: CondeNast/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
commitlintRulesPath: ".commitlint.rules.js"
commitTitleMatch: false
ignoreCommits: true
19 changes: 19 additions & 0 deletions .github/workflows/pull_request_review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Pull Request Review

on:
pull_request_review:
branches:
- main
types:
- submitted

jobs:
approved:
name: Approved
if: github.event.review.state == 'approved'
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Add Reviewed-By
uses: ntessore/add-reviewed-by-action@v1
20 changes: 20 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Release

on:
release:
types:
- published

jobs:
publish:
name: Publish on PyPI
runs-on: ubuntu-latest
environment:
name: publish
url: https://pypi.org/p/glass
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- run: pipx run build
- uses: pypa/[email protected]
42 changes: 42 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Test

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
style:
name: Style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pipx run flake8 glass
tests:
name: Tests
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- run: pip install -c .github/test-constraints.txt '.[test]'
- run: pytest --pyargs glass
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pipx run build
docs:
name: Docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pipx run --spec '.[docs]' sphinx-build -W -b html docs _build/html
31 changes: 0 additions & 31 deletions .github/workflows/tox.yml

This file was deleted.

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
glass/_version.py

.*.swp
.DS_Store
__pycache__
docs/_build
.tox
build
dist
4 changes: 3 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ repos:
- repo: https://github.com/pycqa/flake8
rev: 4.0.1
hooks:
- id: flake8
- id: flake8
additional_dependencies:
- flake8-print
5 changes: 5 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.11"

python:
install:
- method: pip
Expand Down
82 changes: 77 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,77 @@ All notable changes to the project are documented in this file. The format is
based on [Keep a Changelog](https://keepachangelog.com).


[Unreleased]
------------
[2023.7] (1 Aug 2023)
----------------------

### Added

* Function `getcl()` to return angular power spectra by index from
a list using GLASS ordering.
* New `linear_windows()` and `cubic_windows()` window functions for
shells.

### Changed

* The `gaussian_phz()` function now accepts bounds using `lower=`
and `upper=` keyword parameters.
* The `partition()` function now returns an array of weights to
approximate the given function by the windows.


[2023.6] (30 Jun 2023)
-----------------------

### Added

- `deflect()` applies deflections to positions
- `from_convergence()` returns other lensing fields given the convergence
- A new `glass.ext` namespace, reserved for extensions

### Changed

- The `glass` module is no longer a namespace package
- The point sampling functions `positions_from_delta()` and
`uniform_positions()` now return an iterator
- `ellipticity_gaussian()` and `ellipticity_intnorm()` accept array inputs
- Use pyproject.toml for packaging

### Deprecated

- `shear_from_convergence()` is deprecated in favour of `from_convergence()`

### Removed

- The `glass.all` meta-module is no longer necessary

### Fixed

- Incorrect extrapolation in `glass.core.array.trapz_product()`, causing a bug
in `glass.points.effective_bias()`


[2023.5] (31 May 2023)
-----------------------

### Added

- Allow dimensional input to the sampling functions in `glass.points` (#80)
- The `redshifts_from_nz()` function supports `count` arrays (#83)

### Changed

- Position sampling returns counts alongside points (#80)
- `redshifts_from_nz()` no longer returns `gal_pop` (#83)
- Move core functionality that is used by other, user-facing modules into the
`glass.core` module (#88)

### Removed

- Remove profiling functions (#89)


[2023.2] - 1 Mar 2023
---------------------

### Added

Expand Down Expand Up @@ -46,13 +115,16 @@ based on [Keep a Changelog](https://keepachangelog.com).
`glass.shells` module.


[2023.1] - 2023-01-31
---------------------
[2023.1] - 31 Jan 2023
----------------------

### Added

- Initial wide release for GLASS paper


[Unreleased]: https://github.com/glass-dev/glass/compare/v2023.1...HEAD
[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
[2023.5]: https://github.com/glass-dev/glass/compare/v2023.2...v2023.5
[2023.2]: https://github.com/glass-dev/glass/compare/v2023.1...v2023.2
[2023.1]: https://github.com/glass-dev/glass/releases/tag/v2023.1
21 changes: 12 additions & 9 deletions CITATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,26 @@ Citation
If you use GLASS simulations or the GLASS library in your research, please cite
the GLASS paper in your publications.

Here is the bibliography entry from [NASA/ADS](https://ui.adsabs.harvard.edu/abs/2023arXiv230201942T):
Here is the bibliography entry from [NASA/ADS]:

```bib
@ARTICLE{2023arXiv230201942T,
author = {{Tessore}, Nicolas and {Loureiro}, Arthur and {Joachimi}, Benjamin and {von Wietersheim-Kramsta}, Maximilian},
@ARTICLE{2023OJAp....6E..11T,
author = {{Tessore}, Nicolas and {Loureiro}, Arthur and {Joachimi}, Benjamin and {von Wietersheim-Kramsta}, Maximilian and {Jeffrey}, Niall},
title = "{GLASS: Generator for Large Scale Structure}",
journal = {arXiv e-prints},
journal = {The Open Journal of Astrophysics},
keywords = {Astrophysics - Cosmology and Nongalactic Astrophysics},
year = 2023,
month = feb,
eid = {arXiv:2302.01942},
pages = {arXiv:2302.01942},
doi = {10.48550/arXiv.2302.01942},
month = mar,
volume = {6},
eid = {11},
pages = {11},
doi = {10.21105/astro.2302.01942},
archivePrefix = {arXiv},
eprint = {2302.01942},
primaryClass = {astro-ph.CO},
adsurl = {https://ui.adsabs.harvard.edu/abs/2023arXiv230201942T},
adsurl = {https://ui.adsabs.harvard.edu/abs/2023OJAp....6E..11T},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
```

[NASA/ADS]: https://ui.adsabs.harvard.edu/abs/2023OJAp....6E..11T
Loading

0 comments on commit a8161fa

Please sign in to comment.