y0
(pronounced "why not?") is Python code for causal inferencing.
This is a fork of the y0 package. The goal of the fork is to have a fixed codebase for reference by a printed book. If you are interested in y0, you are encouraged to visit the original repository.
See the notebooks in the notebooks directory to get started.
Install directly from GitHub with:
$ pip install git+https://github.com/altdeep/y0.git
To install in development mode, use the following:
$ git clone git+https://github.com/altdeep/y0.git
$ cd y0
$ pip install -e .
The code in this package is licensed under the BSD-3-Clause license.
Contributions are appreciated, especially if there are errors relevant to books, courses, or other pedagogical materials. But for developing the ideas in this repo, you are encouraged to contribute to the original repo
This package was created with @audreyfeldroy's cookiecutter package using @cthoyt's cookiecutter-python-package template.
After cloning the repository and installing tox
with pip install tox
, the unit tests in the tests/
folder can be
run reproducibly with:
$ tox
Additionally, these tests are automatically re-run with each commit in a GitHub Action.
After installing the package in development mode and installing
tox
with pip install tox
, the commands for making a new release are contained within the finish
environment
in tox.ini
. Run the following from the shell:
$ tox -e finish
This script does the following:
- Uses BumpVersion to switch the version number in the
setup.cfg
andsrc/y0/version.py
to not have the-dev
suffix - Packages the code in both a tar archive and a wheel
- Uploads to PyPI using
twine
. Be sure to have a.pypirc
file configured to avoid the need for manual input at this step - Push to GitHub. You'll need to make a release going with the commit where the version was bumped.
- Bump the version to the next patch. If you made big changes and want to bump the version by minor, you can
use
tox -e bumpversion minor
after.