Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: DifferentiableUniverseInitiative/jax_cosmo
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.1rc1
Choose a base ref
...
head repository: DifferentiableUniverseInitiative/jax_cosmo
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 6,219 additions and 2,626 deletions.
  1. +110 −0 .all-contributorsrc
  2. +31 −0 .github/workflows/main.yml
  3. +13 −15 .github/workflows/pythonpackage.yml
  4. +3 −0 .gitignore
  5. +12 −0 .pre-commit-config.yaml
  6. +26 −0 CHANGELOG.md
  7. +128 −0 CODE_OF_CONDUCT.md
  8. +142 −0 CONTRIBUTING.md
  9. +1 −1 LICENSE
  10. +66 −27 README.md
  11. +139 −0 design.md
  12. +20 −0 docs/Makefile
  13. +7 −0 docs/api/jax_cosmo.angular_cl.rst
  14. +7 −0 docs/api/jax_cosmo.background.rst
  15. +7 −0 docs/api/jax_cosmo.bias.rst
  16. +7 −0 docs/api/jax_cosmo.constants.rst
  17. +7 −0 docs/api/jax_cosmo.jax_utils.rst
  18. +7 −0 docs/api/jax_cosmo.power.rst
  19. +7 −0 docs/api/jax_cosmo.probes.rst
  20. +7 −0 docs/api/jax_cosmo.redshift.rst
  21. +18 −0 docs/api/jax_cosmo.rst
  22. +26 −0 docs/api/jax_cosmo.scipy.rst
  23. +7 −0 docs/api/jax_cosmo.transfer.rst
  24. +7 −0 docs/api/jax_cosmo.utils.rst
  25. +8 −0 docs/api/modules.rst
  26. +79 −0 docs/conf.py
  27. +36 −0 docs/index.rst
  28. +596 −0 docs/notebooks/CCL_comparison.ipynb
  29. +1,156 −0 docs/notebooks/jax-cosmo-intro.ipynb
  30. +7 −0 docs/requirements.txt
  31. +18 −6 jax_cosmo/__init__.py
  32. +171 −116 jax_cosmo/angular_cl.py
  33. +495 −299 jax_cosmo/background.py
  34. +48 −10 jax_cosmo/bias.py
  35. +6 −6 jax_cosmo/constants.py
  36. +190 −126 jax_cosmo/core.py
  37. +23 −21 jax_cosmo/jax_utils.py
  38. +0 −18 jax_cosmo/kernels.py
  39. +58 −24 jax_cosmo/likelihood.py
  40. +0 −126 jax_cosmo/nonlinear.py
  41. +12 −9 jax_cosmo/parameters.py
  42. +253 −52 jax_cosmo/power.py
  43. +244 −126 jax_cosmo/probes.py
  44. +122 −64 jax_cosmo/redshift.py
  45. +145 −142 jax_cosmo/scipy/integrate.py
  46. +431 −19 jax_cosmo/scipy/interpolate.py
  47. +8 −5 jax_cosmo/scipy/ode.py
  48. +389 −0 jax_cosmo/sparse.py
  49. +151 −134 jax_cosmo/transfer.py
  50. +4 −5 jax_cosmo/utils.py
  51. +1 −0 notebooks
  52. +0 −614 notebooks/CCL_comparison.ipynb
  53. +0 −546 notebooks/jax-cosmo-intro.ipynb
  54. +29 −25 setup.py
  55. +197 −44 tests/test_angular_cl.py
  56. +198 −31 tests/test_background.py
  57. +37 −0 tests/test_likelihood.py
  58. +142 −15 tests/test_power.py
  59. +86 −0 tests/test_sparse.py
  60. +74 −0 tests/test_spline.py
110 changes: 110 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
{
"files": [
"README.md"
],
"imageSize": 100,
"commit": false,
"contributors": [
{
"login": "EiffL",
"name": "Francois Lanusse",
"avatar_url": "https://avatars0.githubusercontent.com/u/861591?v=4",
"profile": "http://flanusse.net",
"contributions": [
"code"
]
},
{
"login": "santiagocasas",
"name": "Santiago Casas",
"avatar_url": "https://avatars0.githubusercontent.com/u/6987716?v=4",
"profile": "http://www.cosmostat.org/people/santiago-casas",
"contributions": [
"bug",
"code"
]
},
{
"login": "austinpeel",
"name": "Austin Peel",
"avatar_url": "https://avatars0.githubusercontent.com/u/17024310?v=4",
"profile": "https://github.com/austinpeel",
"contributions": [
"code"
]
},
{
"login": "minaskar",
"name": "Minas Karamanis",
"avatar_url": "https://avatars2.githubusercontent.com/u/23280751?v=4",
"profile": "https://minaskaramanis.com",
"contributions": [
"code"
]
},
{
"login": "dkirkby",
"name": "David Kirkby",
"avatar_url": "https://avatars1.githubusercontent.com/u/185007?v=4",
"profile": "https://faculty.sites.uci.edu/dkirkby/",
"contributions": [
"code",
"bug"
]
},
{
"login": "aboucaud",
"name": "Alexandre Boucaud",
"avatar_url": "https://avatars0.githubusercontent.com/u/3065310?v=4",
"profile": "https://aboucaud.github.io",
"contributions": [
"code"
]
},
{
"login": "dlanzieri",
"name": "Denise Lanzieri",
"avatar_url": "https://avatars.githubusercontent.com/u/72620117?v=4",
"profile": "https://www.cosmostat.org/people/denise-lanzieri",
"contributions": [
"code"
]
},
{
"login": "jecampagne",
"name": "jecampagne",
"avatar_url": "https://avatars.githubusercontent.com/u/20539759?v=4",
"profile": "https://github.com/jecampagne",
"contributions": [
"bug"
]
},
{
"login": "eelregit",
"name": "Yin Li",
"avatar_url": "https://avatars.githubusercontent.com/u/7311098?v=4",
"profile": "https://github.com/eelregit",
"contributions": [
"code",
"bug"
]
},
{
"login": "mihir-r-kondapalli",
"name": "mihir-r-kondapalli",
"avatar_url": "https://avatars.githubusercontent.com/u/90729208?v=4",
"profile": "https://github.com/mihir-r-kondapalli",
"contributions": [
"bug"
]
}
],
"contributorsPerLine": 7,
"projectName": "jax_cosmo",
"projectOwner": "DifferentiableUniverseInitiative",
"repoType": "github",
"repoHost": "https://github.com",
"skipCi": true,
"commitType": "docs",
"commitConvention": "angular"
}
31 changes: 31 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This is a basic workflow to help you get started with Actions

name: Style

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

# Runs a single command using the runners shell
- name: python-format-action
shell: bash -l {0}
run: |
pip install black reorder-python-imports
find . -name "*.py" | xargs reorder-python-imports
black --check .
28 changes: 13 additions & 15 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
@@ -15,30 +15,28 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
python-version: [3.8, 3.9]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: setup-conda
uses: s-weigand/setup-conda@v1.0.2

- uses: conda-incubator/setup-miniconda@v2
with:
# Wether to activate the conda base env (Default: 'true')
activate-conda: true
# If conda should be updated before running other commands (Default: 'false')
update-conda: false
# Python version which should be installed with conda (default: 'Default')
python-version: ${{ matrix.python-version }}
# Additional channels like 'conda-forge' which can be used to install packages
conda-channels: conda-forge
channels: conda-forge,defaults
channel-priority: strict
show-channel-urls: true
auto-update-conda: true

- name: Install dependencies
shell: bash -l {0}
run: |
conda install pytest
conda config --set always_yes yes
conda install pytest pip
conda install -c conda-forge pyccl
pip install .
- name: Test with pytest
shell: bash -l {0}
run: |
pytest
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -127,3 +127,6 @@ dmypy.json

# Pyre type checker
.pyre/

docs/notebooks/dev
notebooks/dev
12 changes: 12 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
repos:
- repo: https://github.com/psf/black
rev: 22.12.0
hooks:
- id: black
language_version: python3.10

- repo: https://github.com/asottile/reorder_python_imports
rev: v3.9.0
hooks:
- id: reorder-python-imports

26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Change log

<!--
Remember to align the itemized text with the first line of an item within a list.
Categories for updates can be:
* Changes
* Bugs
* Breaking Changes
* Deprecations
-->

## jax-cosmo v0.1.0 (Feb 5th 2023)

- Changes:
- Official v0.1.0 release of the code.

## jax-cosmo v0.1rc10 (Unreleased)

- Changes:
- Transferred contributing information to CONTRIBUTING.md

## jax-cosmo v0.1rc9 (Jan 20th 2022)

- Changes:
- Updated dark energy EOS computation for stability reasons
128 changes: 128 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
francois.lanusse@gmail.com.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
Loading