Skip to content

Commit dd75659

Browse files
Merge pull request #442 from diana-hep/python3-only
MadMiner v0.8.0
2 parents 0aac1e0 + 3e59c9b commit dd75659

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1142
-1183
lines changed

.travis.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,13 @@ services:
77
- docker
88
language: python
99
python:
10-
- '2.7'
11-
- '3.5'
1210
- '3.6'
11+
- '3.7'
12+
- '3.8'
1313
install:
1414
- pip install -q --no-cache-dir -e .
1515
- travis_wait pip install -q --no-cache-dir -e .
1616
script:
17-
- pytest tests/test_imports.py
1817
- pytest -s tests/test_ratio_estimation.py
1918
- pytest -s tests/test_nuisance.py
2019
jobs:

Dockerfile

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,10 @@ FROM rootproject/root-ubuntu
44
USER root
55

66
RUN apt-get update && apt-get install -y \
7-
python-dev \
8-
python-tk \
97
python3-tk \
108
python3-pip
119

12-
# Python2 pip is not longer shiped with Ubuntu (20.04+)
13-
RUN curl "https://bootstrap.pypa.io/get-pip.py" --output get-pip.py && \
14-
python get-pip.py
15-
16-
RUN pip install --upgrade --no-cache-dir pip && \
17-
pip install --upgrade --no-cache-dir madminer
10+
RUN pip3 install --upgrade --no-cache-dir pip && \
11+
pip3 install --upgrade --no-cache-dir madminer
1812

1913
WORKDIR /home/

docs/conf.py

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
# import sys
1616
# sys.path.insert(0, os.path.abspath('.'))
1717

18-
import os
18+
from pathlib import Path
1919

2020
# -- Project information -----------------------------------------------------
2121

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

2727
project = 'MadMiner'
@@ -40,8 +40,7 @@
4040
# needs_sphinx = '1.0'
4141

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

6159
# Markdown support
6260
from recommonmark.parser import CommonMarkParser
@@ -107,11 +105,11 @@
107105
#
108106
# The default sidebars (for documents that don't match any pattern) are
109107
# defined by theme itself. Builtin themes are using these templates by
110-
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
111-
# 'searchbox.html']``.
108+
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html', 'searchbox.html']``.
112109
#
113-
# html_sidebars = {"toc.rst"}
114-
html_sidebars = { '**': ['globaltoc.html', 'relations.html', 'sourcelink.html', 'searchbox.html'] }
110+
html_sidebars = {
111+
'**': ['globaltoc.html', 'relations.html', 'sourcelink.html', 'searchbox.html'],
112+
}
115113

116114

117115
# -- Options for HTMLHelp output ---------------------------------------------
@@ -154,8 +152,7 @@
154152
# One entry per manual page. List of tuples
155153
# (source start file, name, description, authors, manual section).
156154
man_pages = [
157-
(master_doc, 'madminer', 'MadMiner Documentation',
158-
[authors], 1)
155+
(master_doc, 'madminer', 'MadMiner Documentation', [authors], 1),
159156
]
160157

161158

docs/installation.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
## Simulator dependencies
44

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

environment.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ dependencies:
1010
- h5py
1111
- scipy>=1.0.0
1212
- scikit-learn>=0.19.0
13-
- six
1413
- pytorch>=1.0.0
1514
- pytest
1615
- pip

madminer/__info__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
__authors__ = ", ".join(["Johann Brehmer", "Felix Kling", "Irina Espejo", "Sinclert Perez", "Kyle Cranmer"])
22

3-
__version__ = "0.7.7"
3+
__version__ = "0.8.0"

madminer/__init__.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,20 @@
22
from .analysis import DataAnalyzer
33
from .core import MadMiner
44
from .delphes import DelphesReader
5-
from .fisherinformation import FisherInformation, InformationGeometry, profile_information, project_information
5+
from .fisherinformation import (
6+
FisherInformation,
7+
InformationGeometry,
8+
profile_information,
9+
project_information,
10+
)
611
from .lhe import LHEReader
7-
from .likelihood import HistoLikelihood, NeuralLikelihood, fix_params, project_log_likelihood, profile_log_likelihood
12+
from .likelihood import (
13+
HistoLikelihood,
14+
NeuralLikelihood,
15+
fix_params,
16+
project_log_likelihood,
17+
profile_log_likelihood,
18+
)
819
from .limits import AsymptoticLimits
920
from .ml import (
1021
ParameterizedRatioEstimator,

0 commit comments

Comments
 (0)