Skip to content

Commit

Permalink
Finish 2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-eschle committed Nov 19, 2018
2 parents 22434e8 + 546bef9 commit 8f83674
Show file tree
Hide file tree
Showing 13 changed files with 167 additions and 293 deletions.
Binary file removed .spyderproject
Binary file not shown.
40 changes: 19 additions & 21 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,20 @@ python:
- '3.5'
- '3.6'
- '3.7-dev'
matrix:
include:
- os: osx
language: generic
#matrix:
# include:
# - os: osx
# language: generic

cache: pip
sudo: required

#matrix:
# allow_failures:
# - python: '2.7'
# - python: '3.5'
# - python: '3.6'
matrix:
allow_failures:
- python: '2.7'
- python: '3.5'
- python: '3.6'
- python: '3.7-dev'


addons:
Expand Down Expand Up @@ -58,8 +59,6 @@ before_install:
- export PATH="$HOME/anaconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
#- conda update conda -y
#- conda update anaconda -y

- conda info -a
- conda config --add channels https://conda.anaconda.org/nlesc/label/dev
Expand All @@ -73,21 +72,20 @@ before_install:
- conda install -y coverage > tmp.txt && echo "alive"
- conda install -y future > tmp.txt && echo "alive"
- pip install coveralls > tmp.txt && echo "alive"
#- pip install future

install:

- pip install xgboost > tmp.txt && echo "alive"

- pip uninstall pandas -y || echo pandas not installed
- conda install pandas -y
- if [[ "MAYOU_PYTHON_VERSION" == 2.7 ]] ; then
conda install pandas py-xgboost -y;
else
pip install xgboost > tmp.txt && echo "alive";
fi
#- pip uninstall pandas -y || echo pandas not installed
#- pip install xgboost > tmp.txt && echo "alive"
#- pip install -U -r requirements.txt
#- pip install -U rootpy root_numpy
# - pip install .[root] --no-dependencies
- pip install git+https://github.com/REPlegacy/rep
- ls
- pwd
- pip install .[all]
- pip install git+https://github.com/REPlegacy/rep -U
- pip install .[all] --process-dependency-links
script:

#- python -m unittest discover
Expand Down
96 changes: 0 additions & 96 deletions README.md

This file was deleted.

44 changes: 15 additions & 29 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
|Code Health| |Build Status| |PyPI version| |Dependency Status|
|Code Health| |Build Status| |PyPI version|

raredecay
=========
Expand Down Expand Up @@ -34,10 +34,10 @@ Want to test whether your reweighting did overfit? Use train\_similar:

.. code:: python
import raredecay as rd
import raredecay as rd
mc_data = rd.data.HEPDataStorage(df, weights=*pd.Series weights*, target=0)
real_data = rd.data.HEPDataStorage(df, weights=*pd.Series weights*, target=1)
mc_data = rd.data.HEPDataStorage(df, weights=*pd.Series weights*, target=0)
real_data = rd.data.HEPDataStorage(df, weights=*pd.Series weights*, target=1)
score = rd.score.train_similar(mc_data, real_data, old_mc_weights=1 *or whatever weights the mc had before*)
Expand All @@ -59,36 +59,31 @@ The API as well as the documentation:
Setup and installation
----------------------

Anaconda
~~~~~~~~

Easiest way: use conda to install everything (except of the rep, which
has to be upgraded with pip for some functionalities)

::

conda install raredecay -c mayou36

PyPI
~~~~

The package with all extras requires root\_numpy as well as rootpy (and
therefore a ROOT installation with python-bindings) to be installed on
your system. If that is not the case, some functions won't work.

If you want to install all the extra, first install the very newest
version of REP (may also needed with conda install) (the -U can be
omitted, but is recommended to have the newest dependencies):
Recommended installation (requires ROOT):


::

pip install -U https://github.com/yandex/rep/archive/stratifiedkfold.zip
pip install raredecay[all] --process-dependency-links

Then, install the raredecay package (without ROOT-support) via
Anaconda
~~~~~~~~

Easiest way: use conda to install everything (except of the rep, which
has to be upgraded with pip for some functionalities)

::

pip install raredecay
conda install raredecay -c mayou36



To make sure you can convert ROOT-NTuples, use

Expand All @@ -99,15 +94,6 @@ To make sure you can convert ROOT-NTuples, use
or, instead of root/additionally (comma separated) ``reweight`` or
``reweight`` for the specific functionalities.

In order to have all functionalities, use

::

pip install raredecay[all]

As it is a young package still under developement, it may receive
regular updates and improvements and it is probably a good idea to
regularly download the newest package.

.. |Code Health| image:: https://landscape.io/github/mayou36/raredecay/master/landscape.svg?style=flat
:target: https://landscape.io/github/mayou36/raredecay/master
Expand Down
6 changes: 3 additions & 3 deletions raredecay/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@

# Python 2 backwards compatibility overhead END

import raredecay.reweight, raredecay.config, raredecay.data, raredecay.ml, raredecay.score
from . import reweight, config, data, ml, score
import raredecay.settings, raredecay.stat

__all__ = ["reweight", "config", "data", "ml", "score", "settings", "stat"]
__all__ = ["reweight", "config", "data", "ml", "score", "settings", "stat", "meta_config", "globals_"]

__author__ = "Jonas Eschle 'Mayou36'"
__version__ = '2.0.2'
__version__ = '2.1.0'
Loading

0 comments on commit 8f83674

Please sign in to comment.