From a1f2c98ae53f44fff1d1cb8060a122897f2bc4b9 Mon Sep 17 00:00:00 2001 From: Jeong-Yoon Lee Date: Tue, 13 Aug 2019 14:48:20 -0700 Subject: [PATCH 1/3] add .readthedocs.yml. rename docs/requirements-docs.txt to docs/requirements.txt --- .readthedocs.yml | 15 ++++ Makefile | 87 ------------------- ...requirements-docs.txt => requirements.txt} | 0 3 files changed, 15 insertions(+), 87 deletions(-) create mode 100644 .readthedocs.yml delete mode 100644 Makefile rename docs/{requirements-docs.txt => requirements.txt} (100%) diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 00000000..9e6e3066 --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,15 @@ +# Required +version: 2 + +# Build documentation in the docs/ directory with Sphinx +sphinx: + configuration: docs/conf.py + +# Optionally build your docs in additional formats such as PDF and ePub +formats: all + +# Optionally set the version of Python and requirements required to build your docs +python: + version: 3.6 + install: + - requirements: docs/requirements.txt \ No newline at end of file diff --git a/Makefile b/Makefile deleted file mode 100644 index 91257970..00000000 --- a/Makefile +++ /dev/null @@ -1,87 +0,0 @@ -# disable builtin and suffix rules -MAKEFLAGS += --no-builtin-rules -.SUFFIXES: - -.PHONY: help clean deps lint test coverage docs release install jenkins - -help: - @echo "clean - remove all build, test, coverage and Python artifacts" - @echo "clean-build - remove build artifacts" - @echo "clean-pyc - remove Python file artifacts" - @echo "clean-test - remove test and coverage artifacts" - @echo "lint - check style with flake8" - @echo "test - run tests quickly with the default Python" - @echo "coverage - check code coverage quickly with the default Python" - @echo "docs - generate Sphinx HTML documentation, including API docs" - @echo "deps - force update of requirements specs" - @echo "release - package and upload a release" - @echo "install - install the package to the active Python's site-packages" - -env: - virtualenv --setuptools $@ - $@/bin/pip install -U "setuptools>=19,<20" - $@/bin/pip install -U "pip>=7,<8" - $@/bin/pip install -U "pip-tools==1.6.4" - -# sentinel file to ensure installed requirements match current specs -env/.requirements: requirements.txt requirements-test.txt docs/requirements-docs.txt | env - $|/bin/pip-sync $^ - touch $@ - -clean: clean-build clean-pyc clean-test - -clean-build: - rm -fr build/ - rm -fr dist/ - rm -fr .eggs/ - find . -name '*.egg-info' -exec rm -fr {} + - find . -name '*.egg' -exec rm -fr {} + - -clean-pyc: - find . -name '*.pyc' -exec rm -f {} + - find . -name '*.pyo' -exec rm -f {} + - find . -name '*~' -exec rm -f {} + - find . -name '__pycache__' -exec rm -fr {} + - -clean-test: - rm -f .coverage - rm -fr htmlcov/ - -lint: env/.requirements - env/bin/flake8 hello-world tests - -test: env/.requirements - env/bin/python setup.py test $(TEST_ARGS) - -# tests that emit artifacts jenkins/phabricator look for -jenkins: env/.requirements - env/bin/py.test -s --tb short --cov-config .coveragerc --cov hello-world --cov-report term-missing --cov-report xml \ - --junitxml junit.xml \ - tests - -coverage: env/.requirements test - env/bin/coverage run --source hello-world setup.py test - env/bin/coverage report -m - env/bin/coverage html - open htmlcov/index.html - -docs: env/.requirements - rm -f docs/hello-world.rst - rm -f docs/modules.rst - env/bin/sphinx-apidoc -o docs/ hello-world - PATH=$(PATH):$(CURDIR)/env/bin $(MAKE) -C docs clean - PATH=$(PATH):$(CURDIR)/env/bin $(MAKE) -C docs html - # open docs/_build/html/index.html - -release: env/.requirements clean - env/bin/fullrelease - -install: clean - python setup.py install - -deps: - @touch requirements.in requirements-test.in docs/requirements-docs.in - $(MAKE) requirements.txt requirements-test.txt docs/requirements-docs.txt - -requirements.txt requirements-test.txt docs/requirements-docs.txt: %.txt: %.in | env - $|/bin/pip-compile --no-index $^ diff --git a/docs/requirements-docs.txt b/docs/requirements.txt similarity index 100% rename from docs/requirements-docs.txt rename to docs/requirements.txt From 745f2e868999a4098ecffe7ae8f41a2c4b489df5 Mon Sep 17 00:00:00 2001 From: Jeong-Yoon Lee Date: Tue, 13 Aug 2019 15:15:12 -0700 Subject: [PATCH 2/3] add pypi version badge and replace the logo image URL with the absolute path --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8d213cbc..d70e9858 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,10 @@
- +
------------------------------------------------------ +[![PyPI Version](https://badge.fury.io/py/causalml.svg)](https://pypi.org/project/causalml/) [![Build Status](https://travis-ci.com/uber/causalml.svg?token=t7jFKh1sKGtbqHWp2sGn&branch=master)](https://travis-ci.com/uber/causalml) [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/3015/badge)](https://bestpractices.coreinfrastructure.org/projects/3015) From 6a28b5ea87c5d1c6c1d8fc5123a5ca95b0b230cc Mon Sep 17 00:00:00 2001 From: Jeong-Yoon Lee Date: Tue, 13 Aug 2019 15:22:49 -0700 Subject: [PATCH 3/3] update the version to 0.2.1 to update pypi --- causalml/__init__.py | 2 +- docs/changelog.rst | 2 +- docs/conf.py | 2 +- setup.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/causalml/__init__.py b/causalml/__init__.py index 9d82eefe..98a8ea2a 100644 --- a/causalml/__init__.py +++ b/causalml/__init__.py @@ -1,2 +1,2 @@ name = 'causalml' -__version__ = '0.2.0' +__version__ = '0.2.1' diff --git a/docs/changelog.rst b/docs/changelog.rst index 6cd396e6..55337595 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -3,7 +3,7 @@ Changelog ========= -0.2.0 (unreleased) +0.2.0 (2019-08-12) ------------------ - Add `optimize.PolicyLearner` based on Athey and Wager 2017 :cite:`athey2017efficient` diff --git a/docs/conf.py b/docs/conf.py index 99dd7095..0d8f472b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -77,7 +77,7 @@ # the built documents. # # The short X.Y version. -# version = causalml.__version__ +version = causalml.__version__ # The full version, including alpha/beta/rc tags. # release = causalml.__version__ diff --git a/setup.py b/setup.py index de5c5ee4..c98b9a53 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ setup( name="causalml", - version="0.2.0", + version="0.2.1", author="Huigang Chen, Totte Harinen, Jeong-Yoon Lee, Mike Yung, Zhenyu Zhao", author_email="", description="Python Package for Uplift Modeling and Causal Inference with Machine Learning Algorithms",