Skip to content

Commit 2f53537

Browse files
committed
update apo qmd file and workflow
1 parent d3158b1 commit 2f53537

File tree

2 files changed

+24
-14
lines changed

2 files changed

+24
-14
lines changed

.github/workflows/apo_sim.yml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ jobs:
1717
strategy:
1818
matrix:
1919
script: [
20-
'scripts/irm/irm_apo_coverage.py',
20+
'scripts/irm/apo.py',
21+
'scripts/irm/apos.py',
2122
]
2223

2324
steps:
@@ -47,28 +48,37 @@ jobs:
4748
with:
4849
ref: ${{ env.TARGET_BRANCH }}
4950

51+
- name: Install uv
52+
uses: astral-sh/setup-uv@v5
53+
with:
54+
version: "0.7.8"
55+
5056
- name: Set up Python
5157
uses: actions/setup-python@v5
5258
with:
53-
python-version: '3.12'
59+
python-version-file: "monte-cover/pyproject.toml"
5460

55-
- name: Install dependencies
61+
- name: Install Monte-Cover
5662
run: |
57-
python -m pip install --upgrade pip
58-
pip install -r requirements.txt
63+
cd monte-cover
64+
uv venv
65+
uv sync
5966
6067
- name: Install DoubleML from correct branch
6168
run: |
62-
pip uninstall -y doubleml
63-
pip install "doubleml @ git+https://github.com/DoubleML/doubleml-for-py@${{ env.DML_BRANCH }}"
69+
source monte-cover/.venv/bin/activate
70+
uv pip uninstall doubleml
71+
uv pip install "doubleml @ git+https://github.com/DoubleML/doubleml-for-py@${{ env.DML_BRANCH }}"
6472
6573
- name: Set up Git configuration
6674
run: |
6775
git config --global user.name 'github-actions'
6876
git config --global user.email '[email protected]'
6977
7078
- name: Run scripts
71-
run: python ${{ matrix.script }}
79+
run: |
80+
source monte-cover/.venv/bin/activate
81+
uv run ${{ matrix.script }}
7282
7383
- name: Commit any existing changes
7484
run: |

doc/irm/apo.qmd

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ The simulations are based on the the [make_irm_data_discrete_treatments](https:
3030

3131
```{python}
3232
#| echo: false
33-
metadata_file = '../../results/irm/irm_apo_coverage_metadata.csv'
33+
metadata_file = '../../results/irm/apo_metadata.csv'
3434
metadata_df = pd.read_csv(metadata_file)
3535
print(metadata_df.T.to_string(header=False))
3636
```
@@ -41,7 +41,7 @@ print(metadata_df.T.to_string(header=False))
4141
#| echo: false
4242
4343
# set up data
44-
df_apo = pd.read_csv("../../results/irm/irm_apo_coverage_apo.csv", index_col=None)
44+
df_apo = pd.read_csv("../../results/irm/apo_coverage.csv", index_col=None)
4545
4646
assert df_apo["repetition"].nunique() == 1
4747
n_rep_apo = df_apo["repetition"].unique()[0]
@@ -88,7 +88,7 @@ The non-uniform results (coverage, ci length and bias) refer to averaged values
8888

8989
```{python}
9090
#| echo: false
91-
metadata_file = '../../results/irm/irm_apo_coverage_metadata.csv'
91+
metadata_file = '../../results/irm/apos_metadata.csv'
9292
metadata_df = pd.read_csv(metadata_file)
9393
print(metadata_df.T.to_string(header=False))
9494
```
@@ -99,7 +99,7 @@ print(metadata_df.T.to_string(header=False))
9999
#| echo: false
100100
101101
# set up data
102-
df_apos = pd.read_csv("../../results/irm/irm_apo_coverage_apos.csv", index_col=None)
102+
df_apos = pd.read_csv("../../results/irm/apos_coverage.csv", index_col=None)
103103
104104
assert df_apos["repetition"].nunique() == 1
105105
n_rep_apos = df_apos["repetition"].unique()[0]
@@ -144,7 +144,7 @@ The non-uniform results (coverage, ci length and bias) refer to averaged values
144144

145145
```{python}
146146
#| echo: false
147-
metadata_file = '../../results/irm/irm_apo_coverage_metadata.csv'
147+
metadata_file = '../../results/irm/apos_metadata.csv'
148148
metadata_df = pd.read_csv(metadata_file)
149149
print(metadata_df.T.to_string(header=False))
150150
```
@@ -155,7 +155,7 @@ print(metadata_df.T.to_string(header=False))
155155
#| echo: false
156156
157157
# set up data
158-
df_contrast = pd.read_csv("../../results/irm/irm_apo_coverage_apos_contrast.csv", index_col=None)
158+
df_contrast = pd.read_csv("../../results/irm/apos_causal_contrast.csv", index_col=None)
159159
160160
assert df_contrast["repetition"].nunique() == 1
161161
n_rep_contrast = df_contrast["repetition"].unique()[0]

0 commit comments

Comments
 (0)