Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
mssiwek committed Feb 19, 2024
2 parents b26b848 + 0048ed7 commit 96b4d69
Show file tree
Hide file tree
Showing 151 changed files with 11,984 additions and 10,739 deletions.
43 changes: 0 additions & 43 deletions .github/publish_to_pypi.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.10']
python-version: ['3.11']

steps:
- name: Set up Python ${{ matrix.python-version }}
Expand Down
73 changes: 73 additions & 0 deletions .github/workflows/publish_to_pypi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Build and publish Python distributions to PyPI
on:
release:
types: [published]

jobs:

build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest]
steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v3
with:
python-version: 3.11

- name: Build wheels
uses: pypa/[email protected]
env:
# Skip CPython 3.6, 3.7, 3.8, 3.12
CIBW_SKIP: cp36-* cp37-* cp38-* cp312-* pp*

- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl

make_sdist:
name: Make SDist
runs-on: ubuntu-latest
steps:
- name: git checkout repository main
uses: actions/checkout@v3

- name: check github reference for tags
run: |
echo "github.ref = ${{ github.ref }}, github.ref_type = ${{ github.ref_type }}"
echo "github.repository = ${{ github.repository }}, github.event_name = ${{ github.event_name }} "
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"

- name: Install pypa/build
run: python -m pip install build --user

- name: Build a source tarball
run: python -m build --sdist --outdir dist/ .

- uses: actions/upload-artifact@v3
with:
path: ./dist/*.tar.gz

pypi-publish:
needs: ['build_wheels', 'make_sdist']
environment: 'publish'

name: upload release to PyPI
runs-on: ubuntu-latest
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/download-artifact@v3

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages_dir: artifact/
14 changes: 5 additions & 9 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,17 @@ version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-20.04
os: ubuntu-22.04
tools:
python: "3.9"
# You can also specify other tool versions:
# nodejs: "16"
# rust: "1.55"
# golang: "1.17"
jobs:
post_install:
- python setup.py build_ext -i
- python setup.py develop

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py
# fail_on_warning: true

# If using Sphinx, optionally build your docs in additional formats such as PDF
formats:
Expand All @@ -28,6 +27,3 @@ python:
install:
- requirements: docs/requirements.txt
- requirements: requirements.txt

# conda:
# environment: docs/requirements.yaml
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@
[![GitHub version](https://badge.fury.io/gh/nanograv%2Fholodeck.svg)](https://badge.fury.io/gh/nanograv%2Fholodeck)
[![build](https://github.com/nanograv/holodeck/actions/workflows/unit-tests-ci.yaml/badge.svg)](https://github.com/nanograv/holodeck/actions/workflows/unit-tests-ci.yaml)
[![codecov](https://codecov.io/gh/nanograv/holodeck/branch/main/graph/badge.svg?token=K63WQH3ED9)](https://codecov.io/gh/nanograv/holodeck)
[![Documentation Status](https://readthedocs.org/projects/holodeck-gw/badge/?version=main)](https://holodeck-gw.readthedocs.io/en/main/?badge=main)
[![Documentation Status](https://readthedocs.org/projects/holodeck-gw/badge/?version=main)](https://readthedocs.org/projects/holodeck-gw/)

*Massive Black-Hole Binary Population Synthesis for Gravitational Wave Calculations ≋●≋●≋*

This package, which is actively under development, is aimed at providing a comprehensive framework for MBH binary population synthesis. The framework includes modules to perform pop synth using a variety of methodologies to get a handle on both statistical and systematic uncertainties. Currently, binary populations can be synthesis based on: cosmological hydrodynamic simulations (Illustris), semi-analytic/semi-empirical models (SAMs), and observational catalogs of local galaxies and/or quasars.
<img src="docs/media/holodeck_logo.png" width="260" alt="holodeck logo">

This package is aimed at providing a comprehensive framework for MBH binary population synthesis. The framework includes modules to perform pop synth using a variety of methodologies to get a handle on both statistical and systematic uncertainties. Currently, binary populations can be synthesis based on: cosmological hydrodynamic simulations (Illustris), semi-analytic/semi-empirical models (SAMs), and observational catalogs of local galaxies and/or quasars.

## Installation

The `holodeck` framework is currently under substantial, active development. It will not be available on `pypi` (`pip`) or via `conda` install until it has stabilized. Currently `holodeck` requires `python >= 3.8`, and tests are run on versions `3.8`, `3.9`, `3.10`.
The `holodeck` framework is currently under substantial, active development. It will not be available on `pypi` (`pip`) or via `conda` install until it has stabilized. Currently `holodeck` requires `python >= 3.9`, and tests are run on versions `3.9`, `3.10`, `3.11`.

The recommended installation for active development is to:

Expand Down Expand Up @@ -53,18 +55,18 @@ To-do items and changes to the API should be included in the [CHANGELOG.md](./CH

Contributions are not only welcome but encouraged, anywhere from new modules/customizations to bug-fixes to improved documentation and usage examples. The git workflow is based around a `main` branch which is intended to be (relatively) stable and operational, and an actively developed `dev` branch. New development should be performed in "feature" branches (made off of the `dev` branch), and then incorporated via pull-request (back into the `dev` branch).

### Testing:
### Testing

(Unit)tests should be developed in two ways: for basic functions/behaviors, standard unit-tests can be placed in the `holodeck/tests/` directory. More complex functionality should be tested in notebooks (in `notebooks/`) where they can also be used as demonstrations/tutorials for that behavior. The python script `scripts/convert_notebook_tests.py` converts target notebooks into python scripts in the `holodeck/tests/` directory, which can then be run by `pytest`. The script `scripts/tester.sh` will run the conversion script and then run `pytest`.
(Unit)tests should be developed in two ways: for basic functions/behaviors, standard unit-tests can be placed in the `holodeck/tests/` directory. More complex functionality should be tested in notebooks (in `notebooks/`) where they can also be used as demonstrations/tutorials for that behavior. The python script `scripts/convert_notebook_tests.py` converts target notebooks into python scripts in the `holodeck/tests/` directory, which can then be run by `pytest`. The script `scripts/holotest.sh` will run the conversion script and then run `pytest`.


### Formatting:
### Formatting

New code should generally abide by PEP8 formatting, with [`numpy` style docstrings](https://numpydoc.readthedocs.io/en/latest/format.html). Exceptions are:

* lines may be broken at either 100 or 120 columns

### Notebooks:
### Notebooks

Please strip all notebook outputs before commiting notebook changes. The [`nbstripout`](https://github.com/kynan/nbstripout) package is an excellent option to automatically strip all notebook output only in git commits (i.e. it doesn't change your notebooks in-place). You can also use `nbconvert` to strip output in place: `jupyter nbconvert --clear-output --inplace <NOTEBOOK-NAME>.ipynb`.

Expand Down
Loading

0 comments on commit 96b4d69

Please sign in to comment.