-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from bradendubois/beta
Full release onto main for PyPI "launch"
- Loading branch information
Showing
2,098 changed files
with
273 additions
and
4,262,433 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,19 +11,19 @@ jobs: | |
test: | ||
strategy: | ||
matrix: | ||
report-coverage: [ false ] | ||
python-version: [ 3.8, 3.9 ] | ||
os: | ||
- ubuntu-latest | ||
- ubuntu-18.04 | ||
- ubuntu-16.04 | ||
- macos-latest | ||
- windows-latest | ||
python-version: [ 3.8, 3.9 ] | ||
report-coverage: [ false ] | ||
|
||
# Special matrix job to report coverage only once | ||
include: | ||
- python-version: 3.9 | ||
os: ubuntu-latest | ||
- os: ubuntu-latest | ||
python-version: 3.9 | ||
report-coverage: true | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
@@ -57,13 +57,57 @@ jobs: | |
uses: AndreMiras/coveralls-python-action@develop | ||
if: ${{ matrix.report-coverage }} | ||
|
||
release: | ||
# Tag and create a new release - handled by semantic-release | ||
tag: | ||
runs-on: ubuntu-latest | ||
needs: test | ||
needs: test # Only consider creating a release if all tests pass | ||
|
||
# Only create a release on main / beta | ||
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/beta' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Create Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: npx semantic-release | ||
|
||
# Package and upload to PyPI | ||
pypi: | ||
runs-on: ubuntu-latest | ||
needs: tag # Need to get the latest version number, which may change based on semantic-release | ||
|
||
# Only upload to PyPI on main | ||
if: github.ref == 'refs/heads/main' | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install flake8 pytest coverage coveralls | ||
pip install -r requirements.txt | ||
- name: Get Version Number | ||
uses: oprypin/find-latest-tag@v1 | ||
id: tag | ||
with: | ||
repository: ${{ github.repository }} | ||
releases-only: true | ||
|
||
- name: Build PyPI Package | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
env: | ||
SEMANTIC_VERSION: ${{ steps.tag.outputs.tag }} | ||
|
||
- name: PyPI Publish | ||
uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include do/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<h1 align="center" style="border-bottom: none;">probability-code</h1> | ||
<h1 align="center" style="border-bottom: none;">do-calculus</h1> | ||
<h3 align="center">A Python implementation of the <i>do-calculus</i> of Judea Pearl et. al.</h3> | ||
<p align="center"> | ||
<a href="https://github.com/bradendubois/probability-code/actions?query=workflow%3ATest+branch%3Amain"> | ||
|
@@ -7,17 +7,24 @@ | |
<a href='https://coveralls.io/github/bradendubois/probability-code?branch=main'> | ||
<img src='https://coveralls.io/repos/github/bradendubois/probability-code/badge.svg?branch=main' alt='Coverage Status' /> | ||
</a> | ||
<a href="https://pypi.org/project/do-calculus/"> | ||
<img alt="" src="https://pypip.in/v/do-calculus/badge.svg"> | ||
</a> | ||
<a href="https://pypi.org/project/do-calculus/"> | ||
<img alt="" src="https://pypip.in/wheel/do-calculus/badge.svg"> | ||
</a> | ||
<a href="https://github.com/semantic-release/semantic-release"> | ||
<img alt="semantic-release" src="https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg"> | ||
</a> | ||
</p> | ||
|
||
## Resources | ||
|
||
* **Documentation / Wiki**: https://github.com/bradendubois/probability-code/wiki | ||
* **Source code**: https://github.com/bradendubois/probability-code | ||
* **Releases**: https://github.com/bradendubois/probability-code/releases | ||
* **Bug reports**: https://github.com/bradendubois/probability-code/issues | ||
* **Documentation / Wiki**: [github.com/bradendubois/probability-code/wiki](https://github.com/bradendubois/probability-code/wiki) | ||
* **Source Code**: [github.com/bradendubois/probability-code](https://github.com/bradendubois/probability-code) | ||
* **PyPI**: [pypi.org/project/do-calculus/](https://pypi.org/project/do-calculus/) | ||
* **Releases**: [github.com/bradendubois/probability-code/releases](https://github.com/bradendubois/probability-code/releases) | ||
* **Bug reports**: [github.com/bradendubois/probability-code/issues](https://github.com/bradendubois/probability-code/issues) | ||
* **Contact**: [[email protected]](mailto:[email protected]) | ||
|
||
See the [wiki](https://github.com/bradendubois/probability-code/wiki) to get started. |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Debug | ||
|
||
This is just a large directory of debug info I move here to root through, test files to make, etc. | ||
This is here so that it can be added to the Git repo and move across machines, etc. but is not included when packaged to PyPI. | ||
|
||
- **Nothing** in this subdirectory should ever be imported/required elsewhere. | ||
- **Nothing** in this directory is likely to work as-is. | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
__all__ = [ | ||
"api", | ||
"config", | ||
"probability", | ||
"util", | ||
"API", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
__all__ = [ | ||
"backdoor_paths", | ||
"deconfounding_sets", | ||
"joint_distribution_table", | ||
"probability_query" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 4 additions & 3 deletions
7
src/api/joint_distribution_table.py → do/api/joint_distribution_table.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
__all__ = [ | ||
"config_manager", | ||
"primary_configuration", | ||
"settings" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
cache_computation_results: true | ||
minimize_backdoor_sets: true | ||
output_levels_of_precision: 5 | ||
regression_levels_of_precision: 5 | ||
topological_sort_variables: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
from src.config.config_manager import settings_yml | ||
from .config_manager import settings_yml | ||
|
||
|
||
class Settings: | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
__all__ = [ | ||
"structures" | ||
] |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# # | ||
######################################################### | ||
# Causal Graph # | ||
# # | ||
# Author: Braden Dubois ([email protected]) # | ||
|
@@ -9,9 +9,10 @@ | |
from numpy import empty | ||
from math import floor, ceil | ||
|
||
from src.config.settings import Settings | ||
from src.probability.structures.VariableStructures import Variable, Outcome, Intervention | ||
from src.util.ProbabilityExceptions import MissingTableRow | ||
from .VariableStructures import Variable, Outcome, Intervention | ||
|
||
from ...config.settings import Settings | ||
from ...util.ProbabilityExceptions import MissingTableRow | ||
|
||
|
||
class ConditionalProbabilityTable: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
__all__ = [ | ||
"BackdoorController", | ||
"CausalGraph", | ||
"ConditionalProbabilityTable", | ||
"Graph", | ||
"Probability_Engine", | ||
"VariableStructures" | ||
] |
Oops, something went wrong.