cosmology.api

The Cosmology API standard

https://github.com/cosmology-api/cosmology.api

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.9%) to scientific vocabulary

Keywords

api cosmology
Last synced: 8 months ago · JSON representation ·

Repository

The Cosmology API standard

Basic Info
Statistics
  • Stars: 7
  • Watchers: 2
  • Forks: 2
  • Open Issues: 12
  • Releases: 5
Topics
api cosmology
Created over 3 years ago · Last pushed 9 months ago
Metadata Files
Readme Changelog License Citation Authors

README.rst

Cosmology API
=============

There are a lot of (Python) cosmology libraries out there, from big projects --
including `Astropy `_,
`CLASS `_, and `CAMB
`_ -- down to small personal scripts.
These libraries perform many of the same tasks, but they all have different
interfaces, and different ways of doing things. This makes it hard to switch
between libraries, and nearly impossible to write code that works with multiple
libraries.

The Cosmology API for Python solves this problem, providing detailed interfaces
for cosmology codes, from individual methods and functions up to fully-featured
cosmology objects, even whole libraries. Best of all, using the Cosmology API
does not require any run-time dependencies, even this library!

With the Cosmology API you can **write code that works with anything that
implements the API**, i.e many different cosmology libraries. We provide the
easy-to-use, well-defined descriptions, you can build functions that work with
any supporting library. For example

.. skip: next
.. code-block:: python

   # No implementation, just a description of the interface!
   from cosmology.api import StandardCosmology


   def flat_angular_diameter_distance(
       cosmo: StandardCosmology[Array, Array], z: Array
   ) -> Array:
       # Do some cosmology with any object that implements the API
       if cosmo.Omega_k != 0:
           raise ValueError("This function only works for flat cosmologies")
       return cosmo.comoving_distance(z) / (1 + z)

Owner

  • Name: Cosmology API
  • Login: cosmology-api
  • Kind: organization

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: Cosmology API
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Nathaniel
    family-names: Starkman
    email: n.starkman@mail.utoronto.ca
    affiliation: University of Toronto
    orcid: 'https://orcid.org/0000-0003-3954-3291'
  - given-names: Nicolas
    family-names: Tessore
    email: n.tessore@ucl.ac.uk
    affiliation: University College London
    orcid: 'https://orcid.org/0000-0002-9696-7931'
repository-code: 'https://github.com/cosmology-api/cosmology.api'
url: 'https://cosmology.readthedocs.io/projects/api/en/latest/'
repository: 'https://github.com/cosmology-api/'
abstract: >-
  The Cosmology API for Python provides detailed interfaces
  for cosmology codes, from individual methods and functions
  up to fully-featured cosmology objects, even whole
  libraries.
keywords:
  - python
  - cosmology
  - astrophysics
  - science
  - static typing
  - API
license: BSD-3-Clause
commit: 35bec523aea8f707a7f7da8835dbe03b4240aa0d
version: v0.1.0
date-released: '2023-05-17'

GitHub Events

Total
  • Create event: 12
  • Release event: 2
  • Issues event: 19
  • Watch event: 2
  • Delete event: 12
  • Issue comment event: 44
  • Push event: 30
  • Pull request review event: 19
  • Pull request review comment event: 5
  • Pull request event: 23
  • Fork event: 1
Last Year
  • Create event: 12
  • Release event: 2
  • Issues event: 19
  • Watch event: 2
  • Delete event: 12
  • Issue comment event: 44
  • Push event: 30
  • Pull request review event: 19
  • Pull request review comment event: 5
  • Pull request event: 23
  • Fork event: 1

Issues and Pull Requests

Last synced: 8 months ago

All Time
  • Total issues: 12
  • Total pull requests: 12
  • Average time to close issues: 9 days
  • Average time to close pull requests: 6 days
  • Total issue authors: 1
  • Total pull request authors: 4
  • Average comments per issue: 0.67
  • Average comments per pull request: 2.17
  • Merged pull requests: 7
  • Bot issues: 0
  • Bot pull requests: 4
Past Year
  • Issues: 12
  • Pull requests: 12
  • Average time to close issues: 9 days
  • Average time to close pull requests: 6 days
  • Issue authors: 1
  • Pull request authors: 4
  • Average comments per issue: 0.67
  • Average comments per pull request: 2.17
  • Merged pull requests: 7
  • Bot issues: 0
  • Bot pull requests: 4
Top Authors
Issue Authors
  • ntessore (12)
Pull Request Authors
  • pre-commit-ci[bot] (9)
  • ntessore (7)
  • dependabot[bot] (2)
  • paddyroddy (1)
Top Labels
Issue Labels
Pull Request Labels
infrastructure (10) dependencies (2) github_actions (2) Docs (2) GitHub (1) no-changelog-entry-needed (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 692 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 5
  • Total maintainers: 2
pypi.org: cosmology.api

Cosmology API standard

  • Documentation: https://cosmology.api.readthedocs.io/
  • License: BSD 3-Clause License Copyright (c) 2022, Nathaniel Starkman and Nicolas Tessore All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  • Latest release: 0.3.2
    published 12 months ago
  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 692 Last month
Rankings
Dependent packages count: 10.0%
Average: 17.2%
Downloads: 19.9%
Dependent repos count: 21.7%
Maintainers (2)
Last synced: 9 months ago

Dependencies

.github/workflows/ci_tests.yml actions
  • actions/github-script v3 composite
.github/workflows/label_pr.yml actions
  • actions/labeler v2 composite
.github/workflows/dependency-review.yml actions
  • actions/checkout v4 composite
  • actions/dependency-review-action v3 composite
.github/workflows/publish.yml actions
pyproject.toml pypi