Skip to content

Commit

Permalink
Merge pull request #442 from diana-hep/python3-only
Browse files Browse the repository at this point in the history
MadMiner v0.8.0
  • Loading branch information
johannbrehmer authored Apr 27, 2021
2 parents 0aac1e0 + 3e59c9b commit dd75659
Show file tree
Hide file tree
Showing 64 changed files with 1,142 additions and 1,183 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ services:
- docker
language: python
python:
- '2.7'
- '3.5'
- '3.6'
- '3.7'
- '3.8'
install:
- pip install -q --no-cache-dir -e .
- travis_wait pip install -q --no-cache-dir -e .
script:
- pytest tests/test_imports.py
- pytest -s tests/test_ratio_estimation.py
- pytest -s tests/test_nuisance.py
jobs:
Expand Down
10 changes: 2 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,10 @@ FROM rootproject/root-ubuntu
USER root

RUN apt-get update && apt-get install -y \
python-dev \
python-tk \
python3-tk \
python3-pip

# Python2 pip is not longer shiped with Ubuntu (20.04+)
RUN curl "https://bootstrap.pypa.io/get-pip.py" --output get-pip.py && \
python get-pip.py

RUN pip install --upgrade --no-cache-dir pip && \
pip install --upgrade --no-cache-dir madminer
RUN pip3 install --upgrade --no-cache-dir pip && \
pip3 install --upgrade --no-cache-dir madminer

WORKDIR /home/
21 changes: 9 additions & 12 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
# import sys
# sys.path.insert(0, os.path.abspath('.'))

import os
from pathlib import Path

# -- Project information -----------------------------------------------------

info = {}
project_folder = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
with open(os.path.join(project_folder, 'madminer', '__info__.py')) as f:
project_folder = Path(__file__).parent.parent
with open(project_folder.joinpath('madminer', '__info__.py')) as f:
exec(f.read(), info)

project = 'MadMiner'
Expand All @@ -40,8 +40,7 @@
# needs_sphinx = '1.0'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.viewcode',
Expand All @@ -56,7 +55,6 @@
# You can specify multiple suffix as a list of string:
#
source_suffix = ['.rst', '.md']
#source_suffix = '.rst'

# Markdown support
from recommonmark.parser import CommonMarkParser
Expand Down Expand Up @@ -107,11 +105,11 @@
#
# The default sidebars (for documents that don't match any pattern) are
# defined by theme itself. Builtin themes are using these templates by
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
# 'searchbox.html']``.
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html', 'searchbox.html']``.
#
# html_sidebars = {"toc.rst"}
html_sidebars = { '**': ['globaltoc.html', 'relations.html', 'sourcelink.html', 'searchbox.html'] }
html_sidebars = {
'**': ['globaltoc.html', 'relations.html', 'sourcelink.html', 'searchbox.html'],
}


# -- Options for HTMLHelp output ---------------------------------------------
Expand Down Expand Up @@ -154,8 +152,7 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'madminer', 'MadMiner Documentation',
[authors], 1)
(master_doc, 'madminer', 'MadMiner Documentation', [authors], 1),
]


Expand Down
6 changes: 2 additions & 4 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
## Simulator dependencies

Make sure the following tools are installed and running:
- MadGraph (we've tested our setup with MG5_aMC v2.6.2 and v2.6.5). See
[https://launchpad.net/mg5amcnlo](https://launchpad.net/mg5amcnlo) for installation instructions. Note that MadGraph
requires a Fortran compiler as well as Python 2.6 or 2.7. (Note that you can still run most MadMiner analysis steps
with Python 3.)
- MadGraph (we've tested our setup with MG5_aMC v2.8.0+). See [https://launchpad.net/mg5amcnlo](https://launchpad.net/mg5amcnlo)
for installation instructions. Note that MadGraph requires a Fortran compiler as well as Python 3.6+.
- For the analysis of systematic uncertainties, LHAPDF6 has to be installed with Python support (see also
[the documentation of MadGraph's systematics tool](https://cp3.irmp.ucl.ac.be/projects/madgraph/wiki/Systematics)).

Expand Down
1 change: 0 additions & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ dependencies:
- h5py
- scipy>=1.0.0
- scikit-learn>=0.19.0
- six
- pytorch>=1.0.0
- pytest
- pip
Expand Down
2 changes: 1 addition & 1 deletion madminer/__info__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__authors__ = ", ".join(["Johann Brehmer", "Felix Kling", "Irina Espejo", "Sinclert Perez", "Kyle Cranmer"])

__version__ = "0.7.7"
__version__ = "0.8.0"
15 changes: 13 additions & 2 deletions madminer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,20 @@
from .analysis import DataAnalyzer
from .core import MadMiner
from .delphes import DelphesReader
from .fisherinformation import FisherInformation, InformationGeometry, profile_information, project_information
from .fisherinformation import (
FisherInformation,
InformationGeometry,
profile_information,
project_information,
)
from .lhe import LHEReader
from .likelihood import HistoLikelihood, NeuralLikelihood, fix_params, project_log_likelihood, profile_log_likelihood
from .likelihood import (
HistoLikelihood,
NeuralLikelihood,
fix_params,
project_log_likelihood,
profile_log_likelihood,
)
from .limits import AsymptoticLimits
from .ml import (
ParameterizedRatioEstimator,
Expand Down
Loading

0 comments on commit dd75659

Please sign in to comment.