Skip to content

Commit

Permalink
Merge pull request #1 from shafayetShafee/att-atc-smd
Browse files Browse the repository at this point in the history
Added support for computing smd for causal estimand ATT and ATC, added CI workflow.
  • Loading branch information
shafayetShafee authored Aug 13, 2024
2 parents bae6200 + 3c55a2c commit 4c3a610
Show file tree
Hide file tree
Showing 7 changed files with 1,050 additions and 50 deletions.
60 changes: 59 additions & 1 deletion .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,62 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}

- name: Build documentation
run: poetry run make html --directory docs/
run: poetry run make html --directory docs/


cd:
permissions:
id-token: write
contents: write
# Only run this job if the "ci" job passes
needs: ci

# Only run this job if new work is pushed to "main"
if: github.event_name == 'push' && github.ref == 'refs/heads/main'

# Set up operating system
runs-on: ubuntu-latest

# Define job steps
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"

- name: Check-out repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Use Python Semantic Release to prepare release
id: release
uses: python-semantic-release/python-semantic-release@v8.3.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: steps.release.outputs.released == 'true'
with:
repository-url: https://test.pypi.org/legacy/
password: ${{ secrets.TEST_PYPI_API_TOKEN }}

- name: Test install from TestPyPI
run: |
pip install \
--index-url https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple \
skmiscpy
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: steps.release.outputs.released == 'true'
with:
password: ${{ secrets.PYPI_API_TOKEN }}

- name: Publish package distributions to GitHub Releases
uses: python-semantic-release/upload-to-gh-release@main
if: steps.release.outputs.released == 'true'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v0.3.0 (13/08/2024)

- Added support for computing SMD for ATC and ATT causal estimand in case of binary treatment.

## v0.2.0 (12/08/2024)

- Changed the modules structure.
Expand Down
676 changes: 660 additions & 16 deletions docs/example.ipynb

Large diffs are not rendered by default.

180 changes: 179 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "skmiscpy"
version = "0.2.0"
version = "0.3.0"
description = "Contains a few functions useful for data-analysis, causal inference etc."
authors = ["Shafayet Khan Shafee"]
license = "MIT"
Expand All @@ -26,7 +26,16 @@ sphinx-autoapi = "^3.2.1"
sphinx-rtd-theme = "^2.0.0"
linkify-it-py = "^2.0.3"
sphinx-immaterial = "^0.12.2"
python-semantic-release = "^9.8.6"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.semantic_release]
version_toml = [
"pyproject.toml:tool.poetry.version",
] # version location
branch = "main" # branch to make releases of
changelog_file = "CHANGELOG.md" # changelog file
build_command = "pip install poetry && poetry build" # build dists
Loading

0 comments on commit 4c3a610

Please sign in to comment.