Skip to content

Commit

Permalink
Merge branch 'develop' into add_doc
Browse files Browse the repository at this point in the history
  • Loading branch information
brash6 committed Apr 22, 2024
2 parents e6e0a36 + 43c118b commit e748ef6
Show file tree
Hide file tree
Showing 17 changed files with 668 additions and 388 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/code-cov.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: CI-code-cov

on:
push:
branches: [ main ]
pull_request:
branches:
- main
- develop

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11' # Specify the Python version you want to use

- name: Install Package in Editable Mode with Python Dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
r-version: '4.3.2' # Use the R version you prefer

- name: Install R packages
uses: r-lib/actions/setup-r-dependencies@v2
with:
cache: true
cache-version: 1
dependencies: 'NA'
install-pandoc: false
packages: |
grf
causalweight
mediation
- name: Install plmed package
run: |
R -e "pak::pkg_install('ohines/plmed')"
- name: Install Pytest and Coverage
run: |
pip install pytest pytest-cov
- name: Run tests with coverage
run: |
pytest --cov=med_bench --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
# token: ${{ secrets.CODECOV_TOKEN }}
token: 'e4829e41-01da-4d08-9e04-04443da957e3'
slug: judithabk6/med_bench

4 changes: 3 additions & 1 deletion .github/workflows/tests-with-R.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
branches:
- main
- develop

jobs:
test:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/tests-without-R.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
branches:
- main
- develop

jobs:
test:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,6 @@ dmypy.json
# Pyre type checker
.pyre/

# DS_STORE files
src/.DS_Store
.DS_Store
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![codecov](https://codecov.io/gh/judithabk6/med_bench/graph/badge.svg?token=PASB71N41D)](https://codecov.io/gh/judithabk6/med_bench)

# med_bench

**med_bench** is a Python package designed to wrap the most common estimators for causal mediation analysis in a single framework. We additionally allow for some flexibility in the choice of nuisance parameters models.
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
'rpy2>=2.9.4',
'scipy>=1.5.2',
'seaborn>=0.11.1',
'matplotlib>=3.3.2'
'matplotlib>=3.3.2',
"pytest"
],
classifiers=[
'Programming Language :: Python :: 3',
Expand Down
Loading

0 comments on commit e748ef6

Please sign in to comment.