Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify file structure #51

Merged
merged 6 commits into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.2.0
current_version = 0.0.0
files = setup.py alea/__init__.py
commit = True
tag = True
36 changes: 36 additions & 0 deletions .github/workflows/pypi_install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# PyPI upload alea after a release (or manually).
## Mostly based on https://github.com/marketplace/actions/pypi-publish
name: PyPI

on:
workflow_dispatch:
release:
types: [ created ]

jobs:
build:
runs-on: ubuntu-latest
steps:
# Setup steps
- name: Setup python
uses: actions/setup-python@v4.2.0
with:
python-version: '3.8'

- name: Checkout repo
uses: actions/checkout@v3

- name: Install dependencies
run: pip install wheel

- name: Build package
run: python setup.py sdist bdist_wheel

- name: Publish a Python distribution to PyPI
# Do the publishing
# Might want to add but does not work on workflow_dispatch :
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: ${{ secrets.token }}
password: ${{ secrets.pypi_password }}
38 changes: 15 additions & 23 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,28 +1,20 @@
alea.egg-info/
alea/__pycache__/
alea/likelihoods/__pycache__/
build/
dist/
src/
pdf_cache
sbatch_submission
__pycache__
.ipynb_checkpoints
*.egg-info
*.eggs
*.svg
*.swp
*sbatch_submission*
*.log
*pdf_cache*
*.tar.gz
development_scripts/*hdf
.vscode
*/jobs/*
*png
*pdf
*.png
*.pdf
*.ipynb
!notebooks/*.ipynb
*.h5
*.hdf5
!examples/*.h5
*submission_*
*root*
*.ipynb_checkpoints*
*.session.vim*
*.env*
__pycache__/
*ipynb
!examples/*.ipynb
debug.py
!templates/*.h5
!templates/*.hdf5
docs/build
build
Empty file added HISTORY.md
Empty file.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# alea
# Alea
A tool to perform toyMC-based inference constructions

`alea` is a public version of previously private XENON likelihood definition and inference construction code (""binference"" that used the blueice repo https://github.com/JelleAalbers/blueice.
`alea` is a public package inherited the spirits of previously private XENON likelihood definition and inference construction code `binference` that based on the blueice repo https://github.com/JelleAalbers/blueice.

Binference was developed for XENON1T WIMP searches by Knut Dundas Morå, and for the first XENONnT results by Robert Hammann, Knut Dundas Morå and Tim Wolf
Binference was developed for XENON1T WIMP searches by Knut Dundas Morå, and for the first XENONnT results by Robert Hammann, Knut Dundas Morå and Tim Wolf.
20 changes: 14 additions & 6 deletions alea/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
from alea import likelihoods
__version__ = '0.0.0'
dachengx marked this conversation as resolved.
Show resolved Hide resolved
dachengx marked this conversation as resolved.
Show resolved Hide resolved

from alea import plotting
from alea import simulators
from alea import template_source
from alea import toymc_running
from alea import utils
from . import model
from .model import *
dachengx marked this conversation as resolved.
Show resolved Hide resolved

from . import models

from . import utils
from .utils import *
dachengx marked this conversation as resolved.
Show resolved Hide resolved

from . import parameters
from .parameters import *
dachengx marked this conversation as resolved.
Show resolved Hide resolved

from . import simulators
from .simulators import *
dachengx marked this conversation as resolved.
Show resolved Hide resolved
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import h5py
import numpy as np
import scipy.stats as sps
from alea.plotting import pdf_plotter
from alea._plotting import pdf_plotter
from alea.simulators import simulate_interpolated
from blueice.inference import bestfit_scipy, one_parameter_interval
from blueice.likelihood import LogLikelihoodSum
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading