Skip to content

Commit

Permalink
Merge pull request #11 from lpin0002/developer
Browse files Browse the repository at this point in the history
Developer
  • Loading branch information
LiamCPinchbeck authored Sep 2, 2024
2 parents ebdb403 + fc71858 commit 5beeb1c
Show file tree
Hide file tree
Showing 17 changed files with 979 additions and 911 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Publish Python Package

on:
push:
branches:
- main

jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x' # Replace with your desired Python version

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build the package
run: |
python -m build
- name: Publish to Test PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.DEFINITELY_NOT_TEST_PYPI_API_TOKEN }}
run: |
python -m twine upload --repository testpypi dist/*
id: testpypi_upload

- name: Publish to PyPI
if: ${{ steps.testpypi_upload.conclusion == 'success' }}
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.DEFINITELY_NOT_PYPI_API_TOKEN }}
run: |
python -m twine upload dist/*
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
project = 'GammaBayes'
copyright = '2023, Liam Pinchbeck'
author = 'Liam Pinchbeck'
release = '0.0.42'
release = '0.1.7'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Expand Down
9 changes: 4 additions & 5 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@ Welcome to GammaBayes's documentation!
tutorials/Simulations
tutorials/DarkMatter
tutorials/ParameterClasses
tutorials/NuisanceParameterMarginalisation
tutorials/HyperparameterInference
tutorials/MultiObservationNuisanceParameterMarginalisation
tutorials/HyperparmeterInference
tutorials/UsefulUtils
tutorials/PlannedDevelopments
tutorials/API
.. tutorials/UsefulUtils
.. tutorials/PlannedDevelopments
.. tutorials/API
Expand Down
Empty file removed docs/tutorials/API.ipynb
Empty file.
28 changes: 14 additions & 14 deletions docs/tutorials/BinningGeometries.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# `GammaBinning` attributes"
"## `GammaBinning` attributes"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## `axes`"
"### `axes`"
]
},
{
Expand Down Expand Up @@ -134,7 +134,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## `lon_res` and `lat_res`"
"### `lon_res` and `lat_res`"
]
},
{
Expand Down Expand Up @@ -168,7 +168,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## `axes_mesh`"
"### `axes_mesh`"
]
},
{
Expand Down Expand Up @@ -202,7 +202,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## `axes_dim`"
"### `axes_dim`"
]
},
{
Expand Down Expand Up @@ -236,7 +236,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## `spatial_axes`"
"### `spatial_axes`"
]
},
{
Expand Down Expand Up @@ -275,7 +275,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## `spatial_centre`"
"### `spatial_centre`"
]
},
{
Expand Down Expand Up @@ -312,14 +312,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# `GammaBinning` methods"
"## `GammaBinning` methods"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## `to_dict`"
"### `to_dict`"
]
},
{
Expand Down Expand Up @@ -362,7 +362,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## `from_params`"
"### `from_params`"
]
},
{
Expand Down Expand Up @@ -428,14 +428,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# `GammaBinning` behaviours"
"## `GammaBinning` behaviours"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Equality"
"### Equality"
]
},
{
Expand Down Expand Up @@ -469,7 +469,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Containment"
"### Containment"
]
},
{
Expand Down Expand Up @@ -575,7 +575,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Next tutorial"
"#### Next tutorial"
]
},
{
Expand Down
9 changes: 8 additions & 1 deletion docs/tutorials/DataClasses.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@
"I can see how this may be a further complication to the time-poor researcher hence few classes must depend on this data structure but I do think it is handy and it is the default for most of the simulation classes within the pipeline."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## `GammaObs`"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -866,7 +873,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# `GammaObsCube`"
"## `GammaObsCube`"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/Exposure.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Multiple exposures"
"## Multiple exposures"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/HighLevelInference.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# The cool stuff"
"## The cool stuff"
]
},
{
Expand Down
853 changes: 851 additions & 2 deletions docs/tutorials/HyperParameterInference.ipynb

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions docs/tutorials/InstrumentResponseFunctions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# `IRF_LogLikelihood`"
"## `IRF_LogLikelihood`"
]
},
{
Expand Down Expand Up @@ -175,7 +175,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Point Spread Function"
"### Point Spread Function"
]
},
{
Expand Down Expand Up @@ -278,7 +278,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Energy Dispersion"
"### Energy Dispersion"
]
},
{
Expand Down Expand Up @@ -377,7 +377,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Effective Area"
"### Effective Area"
]
},
{
Expand Down Expand Up @@ -454,7 +454,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## As an observational likelihood"
"### As an observational likelihood"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# The posterior and evidence"
"## The posterior and evidence"
]
},
{
Expand Down Expand Up @@ -175,7 +175,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# The likelihood and nuisance marginalisation"
"## The likelihood and nuisance marginalisation"
]
},
{
Expand Down Expand Up @@ -268,7 +268,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# An overview"
"## An overview"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Multi-observation inference"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"...under construction..."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": []
}
],
"metadata": {
"language_info": {
"name": "python"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Loading

0 comments on commit 5beeb1c

Please sign in to comment.