Skip to content

Commit

Permalink
Thesis Submission (#8)
Browse files Browse the repository at this point in the history
State of the project at submission of thesis in November.
  • Loading branch information
buddejul authored Nov 19, 2024
1 parent 85911cb commit 8b17b6a
Show file tree
Hide file tree
Showing 87 changed files with 8,123 additions and 491 deletions.
48 changes: 29 additions & 19 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,50 @@ name: main
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
# yamllint disable-line rule:truthy
# yamllint disable rule:line-length
on:
push:
branches: [main]
pull_request:
branches: ['*']
branches: ["*"]
jobs:
run-tests:
name: Run tests for ${{ matrix.os }} on ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# Currently only developing on windows.
os: [windows-latest]
# os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.12']
os: [windows-latest]
python-version: ["3.12"]
steps:
- uses: actions/checkout@v3
- name: create build environment
uses: mamba-org/provision-with-micromamba@main
- uses: actions/checkout@v4
- name: Install TinyTex
uses: r-lib/actions/setup-tinytex@v2
- name: Install additional LaTeX packages
run: |
tlmgr update --self
tlmgr install a4wide beamer biber biblatex caption eurosym grfext minibox moreverb ntgclass relsize setspace xfrac
tlmgr list --only-installed
- name: Install conda environment with micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment.yml
environment-name: gha-testing
cache-env: true
extra-specs: |
python=${{ matrix.python-version }}
- name: run pytest
create-args: python=${{ matrix.python-version }}
cache-environment: true
micromamba-version: 1.5.6-0
- name: Run full test suite on MacOS and Linux
shell: bash -l {0}
run: |
micromamba activate thesis
pytest -v --cov=./ --cov-report=xml
if: runner.os != 'Windows'
- name: Run test suite on Windows
shell: bash -l {0}
run: |
micromamba activate gha-testing
pytest --cov-report=xml --cov=./
- name: Upload coverage report.
if: runner.os == 'Linux' && matrix.python-version == '3.12'
micromamba activate thesis
pytest -v --cov=./ --cov-report=xml
if: runner.os == 'Windows'
- name: Upload coverage reports
if: runner.os == 'Windows' && matrix.python-version == '3.12'
uses: codecov/codecov-action@v3
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
.pytask

# bld
bld/
/bld/

# latex
*.aux
Expand All @@ -28,6 +28,8 @@ bld/
*.toc
*.snm
*.nav
*.lof
*.lot

# Jupyter notebooks
*.ipynb
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ repos:
rev: v4.4.0
hooks:
- id: check-added-large-files
args: [--maxkb=25]
args: [--maxkb=5000]
- id: check-case-conflict
- id: check-merge-conflict
- id: check-vcs-permalinks
Expand Down
56 changes: 56 additions & 0 deletions .vscode/ltex.dictionary.en-US.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
Budde
MTE
complier
compliers
instrument-compliers
complier-LATE
LATEs
subsampling
monotonicity
DGPs
MTRs
Subsampling
estimand
linprog
estimands
Monotonicity

covariates
functionals
OLS
Slutsky
Hadamard
MSTs
misspecified

Estimands
Complier
TODO
optimagic
COBYLA
Imbens-Manski
reparameterization

nonparametric
Nonparametric

subsample
Ivmte
Bei
Econometrica
Compliers
nondifferentiable
RDD
DiD

exogenously
piecewise

pyvmte
Pyvmte
ivmte
Gurobi

Freyberger
Rheinische
Friedrich-Wilhelms-Universität
21 changes: 21 additions & 0 deletions .vscode/ltex.hiddenFalsePositives.en-US.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{"rule":"UPPERCASE_SENTENCE_START","sentence":"^\\Qbreaklines=true, postbreak=, numbers=left, numbersep=5pt, numberstyle=, basicstyle=\\E$"}
{"rule":"MORFOLOGIK_RULE_EN_US","sentence":"^\\Qbreaklines=true, postbreak=, numbers=left, numbersep=5pt, numberstyle=, basicstyle=\\E$"}
{"rule":"WHITESPACE_RULE","sentence":"^\\Qver@etex.sty3000/12/31\\E$"}
{"rule":"MORFOLOGIK_RULE_EN_US","sentence":"^\\Qcompat=1.18\\E$"}

{"rule":"MASS_AGREEMENT","sentence":"^\\QMST maintain the following assumptions, which guarantee a \"valid\" instrument\\E$"}
{"rule":"MASS_AGREEMENT","sentence":"^\\QMST maintain the following assumptions, which guarantee a “valid” instrument\\E$"}
{"rule":"HE_VERB_AGR","sentence":"^\\QTo address this, MST propose a two-way estimator that is guaranteed to exist.\\E$"}
{"rule":"NO_COMMA_BEFORE_INDIRECT_QUESTION","sentence":"^\\QIn particular, we know \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q, where \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q is easy to estimate.\\E$"}
{"rule":"MORFOLOGIK_RULE_EN_US","sentence":"^\\QOne potential source of information could be solving the estimation problem at hand under increasing relaxations as well as comparing the degree of conservativeness to an initial (biased) bootstrap estimate of the standard error.\\E$"}

{"rule":"IF_IS","sentence":"^\\QThe directional derivative in our case is given by \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q if \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q if \\E(?:Dummy|Ina|Jimmy-)[0-9]+$"}
{"rule":"IF_IS","sentence":"^\\QThe directional derivative in our case is given by \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q if \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q if \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q if \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q.\\E$"}
{"rule":"IF_IS","sentence":"^\\QIn particular, consider the estimator \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q if \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q if \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q if \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q.\\E$"}
{"rule":"IF_IS","sentence":"^\\QIn particular, consider the estimator \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q if \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q if \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q if \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q, where \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q is an estimator of the asymptotic standard deviation of \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q.\\E$"}
{"rule":"IF_IS","sentence":"^\\QHence, I construct the following estimator which takes into account both variability in estimating \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q and \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q: \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q if \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q if \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q if \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q.\\E$"}

{"rule":"IF_IS","sentence":"^\\QThe directional derivative for our case when \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q is known is given by \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q if \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q if \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q if \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q.\\E$"}
{"rule":"EN_A_VS_AN","sentence":"^\\QI report results for a lower-order, and hence more restrictive polynomial of degree \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q as well as an \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Qth order polynomial similar to the numerical example in \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q.\\E$"}

{"rule":"MASS_AGREEMENT","sentence":"^\\QMST provide no distributional results.\\E$"}
27 changes: 27 additions & 0 deletions compress_dir.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash
# A bash script to copy results from marvin for a specific job.
# Usage: ./copy_from_marvin.sh <job_id>
# The script will create a directory with the job_id and copy the results from marvin
# to that directory.

if [ "$#" -ne 1 ]; then
echo "Usage: $0 <job_id>"
exit 1
fi

JOBID=$1
USER=s93jbudd_hpc

DATE=$(date +%d-%m-%Y" "%H:%M:%S)

DIR_SOURCE="./marvin/$JOBID"

cd C:/Users/budde/projects/thesis/src/thesis/ || exit

# Create a directory with the job_id
mkdir -p $DIR_SOURCE

# Compress
tar -czf $DIR_SOURCE.tar.gz $DIR_SOURCE

echo "[$DATE] Results compressed: $JOBID"
25 changes: 25 additions & 0 deletions copy_from_marvin.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash
# A bash script to copy results from marvin for a specific job.
# Usage: ./copy_from_marvin.sh <job_id>
# The script will create a directory with the job_id and copy the results from marvin
# to that directory.

if [ "$#" -ne 1 ]; then
echo "Usage: $0 <job_id>"
exit 1
fi

JOBID=$1
USER=s93jbudd_hpc

DATE=$(date +%d-%m-%Y" "%H:%M:%S)

DIR_TARGET="./marvin/$JOBID"

cd C:/Users/budde/projects/thesis/src/thesis/ || exit

# Create a directory with the job_id
mkdir -p $DIR_TARGET

# Copy the results from marvin
scp -r -C $USER@marvin.hpc.uni-bonn.de:/lustre/scratch/data/$USER-thesis/thesis/bld/ $DIR_TARGET
25 changes: 25 additions & 0 deletions copy_from_marvin_v2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash
# A bash script to copy results from marvin for a specific job.
# Usage: ./copy_from_marvin.sh <job_id>
# The script will create a directory with the job_id and copy the results from marvin
# to that directory.

if [ "$#" -ne 1 ]; then
echo "Usage: $0 <job_id>"
exit 1
fi

JOBID=$1
USER=s93jbudd_hpc

DATE=$(date +%d-%m-%Y" "%H:%M:%S)

DIR_TARGET="./marvin/$JOBID"

cd C:/Users/budde/projects/thesis/src/thesis/ || exit

# Create a directory with the job_id
mkdir -p $DIR_TARGET

# Copy the results from marvin
scp -r -C $USER@marvin.hpc.uni-bonn.de:/lustre/scratch/data/$USER-thesis/thesis_v2/thesis/bld/ $DIR_TARGET
15 changes: 3 additions & 12 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,15 @@ dependencies:

# Python template project dependencies
- statsmodels
- numpy
- numpy >= 2.0
- pandas >=2.2
- plotly >=5.2.0,<6

# R template project dependencies
# Currently we are not using R hence we do not need to install these dependencies.
# - pytask-r >=0.4.1
# - pyreadr
# - r-plyr
# - r-precommit
# - r-yaml
# - r-forcats

# Install project
- pip:
- -e .
- pdbp
- kaleido==0.1.0.post1
- kaleido
- joblib
- git+https://github.com/buddejul/pyvmte
- git+https://github.com/buddejul/pyvmte@im_crit
- coptpy
Loading

0 comments on commit 8b17b6a

Please sign in to comment.