Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
9c0f1d1
update coverage link
SvenKlaassen Jan 13, 2025
19304b2
Remove sklearn data dtype version fix
SvenKlaassen Jan 20, 2025
0cfd6a1
add Global Regressor and Classifier to api documentation
SvenKlaassen Jan 20, 2025
526461a
fix typo in api
SvenKlaassen Jan 20, 2025
fe43205
Merge pull request #211 from DoubleML/s-maintenance
SvenKlaassen Jan 20, 2025
60eba3d
add api/generated to gitignore
SvenKlaassen Jan 24, 2025
004da39
Update heterogeneity.rst
SvenKlaassen Jan 24, 2025
7a9b807
update sensitivity guides to remove warnings
SvenKlaassen Jan 24, 2025
743bd93
adjust figure path for sensitivity docs
SvenKlaassen Jan 24, 2025
e899584
Delete sim_inf.rst
SvenKlaassen Jan 24, 2025
020b3f3
update and PyPI icon
SvenKlaassen Jan 24, 2025
9160d49
Update requirements.txt
SvenKlaassen Jan 24, 2025
76992b8
Merge branch 'dev' into s-update-docs
SvenKlaassen Jan 24, 2025
0c9b14d
fix R 0.5.3 release notes
SvenKlaassen Jan 24, 2025
97d813e
add edit page button
SvenKlaassen Jan 24, 2025
51d5b1a
fix pydata-sphinx-theme version to 0.15.3
SvenKlaassen Jan 24, 2025
0b7ed5a
add version switcher
SvenKlaassen Jan 27, 2025
47691d9
update logo
SvenKlaassen Jan 27, 2025
59b46c0
add version warning
SvenKlaassen Jan 27, 2025
dc210e3
fix version for switcher
SvenKlaassen Jan 27, 2025
6d14a78
use capital letters for tabs
SvenKlaassen Jan 27, 2025
465b894
update spelling
SvenKlaassen Jan 27, 2025
80ca8e4
Update conf.py
SvenKlaassen Jan 27, 2025
f6f8107
add dev docker container
SvenKlaassen Jan 29, 2025
d3596e6
Merge pull request #214 from DoubleML/s-add-devcontainer
SvenKlaassen Jan 29, 2025
e1c8f8e
update guide
SvenKlaassen Jan 29, 2025
e4b2df1
update banner
SvenKlaassen Jan 29, 2025
2640bd6
add option to execute notebooks to makefile
SvenKlaassen Jan 29, 2025
832b7fb
update test build workflows to include arguments to execute notebooks
SvenKlaassen Jan 29, 2025
c324da6
update test workflows
SvenKlaassen Jan 29, 2025
1d458df
update api documentation
SvenKlaassen Jan 29, 2025
ab56bd8
set nbsphinx_execute to auto in deploy workflows
SvenKlaassen Jan 29, 2025
45aa80d
build docu with sphinx in test workflows
SvenKlaassen Jan 29, 2025
4721be2
Update NBSPHINX_EXECUTE default value to 'auto' in test and deploy wo…
SvenKlaassen Jan 29, 2025
6f71249
set NBSPHINX_EXECUTE to auto in deploy workflows
SvenKlaassen Jan 29, 2025
6a38d3c
add nbsphinx_execute to linkcheck
SvenKlaassen Jan 29, 2025
0444705
add NBSPHINX_EXECUTE default to Makefile
SvenKlaassen Jan 30, 2025
caea0ac
fix broken link
SvenKlaassen Jan 30, 2025
32598ca
remove .idea
SvenKlaassen Jan 30, 2025
4a0c67e
add default value without dispatch
SvenKlaassen Jan 30, 2025
de92636
fix broken link in cate plr
SvenKlaassen Jan 30, 2025
8ed15a1
fix link in gate notebook
SvenKlaassen Jan 30, 2025
a37f1cd
fix example link
SvenKlaassen Jan 31, 2025
753fa49
update release notes to remove duplicate target names
SvenKlaassen Jan 31, 2025
36fc3ad
Merge pull request #213 from DoubleML/s-update-docs
SvenKlaassen Jan 31, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions .devcontainer/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
FROM ubuntu:24.04

# Set non-interactive mode to avoid prompts
ENV DEBIAN_FRONTEND=noninteractive

# Update package list and install dependencies
RUN apt-get update && \
apt-get install -y \
software-properties-common \
graphviz \
wget \
dirmngr \
gnupg \
apt-transport-https \
ca-certificates \
git \
cmake

# Install locale packages
RUN apt-get update && \
apt-get install -y locales && \
locale-gen en_US.UTF-8 && \
update-locale LANG=en_US.UTF-8

# Set environment variables for locale
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8

# Install Python 3.12
RUN add-apt-repository ppa:deadsnakes/ppa && \
apt-get update && \
apt-get install -y python3.12 python3.12-venv python3.12-dev python3-pip python3-full && \
apt-get clean && rm -rf /var/lib/apt/lists/*

# Set Python 3.12 as the default for both python and python3
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1 && \
update-alternatives --install /usr/bin/python python /usr/bin/python3.12 1

# Add R repository and install R
RUN wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | tee /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc && \
add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu noble-cran40/' && \
apt-get update && \
apt-get install -y r-base r-base-dev zlib1g-dev libicu-dev pandoc make libcurl4-openssl-dev libssl-dev

# Install Python packages
COPY requirements.txt /tmp/requirements.txt
RUN python -m venv /opt/venv && \
/opt/venv/bin/python -m pip install --upgrade pip && \
/opt/venv/bin/pip install -r /tmp/requirements.txt

# Set the virtual environment as the default Python environment
ENV PATH="/opt/venv/bin:$PATH"

# Check out the repo containing the Python package DoubleML (dev)
RUN git clone https://github.com/DoubleML/doubleml-for-py.git /doubleml-for-py
WORKDIR /doubleml-for-py
RUN /opt/venv/bin/pip uninstall -y DoubleML && \
/opt/venv/bin/pip install -e .[rdd]

# Create a directory for R user libraries and set the default R user library path
RUN mkdir -p /usr/local/lib/R/site-library
ENV R_LIBS_USER=/usr/local/lib/R/site-library

# Install R packages and Jupyter kernel
RUN Rscript -e "install.packages('remotes')" && \
Rscript -e "remotes::install_github('DoubleML/doubleml-for-r', dependencies = TRUE)" && \
Rscript -e "install.packages(c('ggplot2', 'IRkernel', 'xgboost', 'hdm', 'reshape2', 'gridExtra', 'igraph', 'mlr3filters', 'mlr3measures', 'did', dependencies=TRUE))" && \
Rscript -e "IRkernel::installspec()"

# Set the working directory
WORKDIR /workspace

46 changes: 46 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"name": "DoubleML Documentation Development",
"dockerFile": "Dockerfile.dev", // Path to your Dockerfile
"context": "..", // Context for the build (root of your project)
"workspaceFolder": "/workspace", // Folder inside the container for your project
// Customizations for VS Code
"customizations": {
"vscode": {
"extensions": [
"ms-python.python", // Python extension for VS Code
"ms-azuretools.vscode-docker", // Docker integration for VS Code
"njpwerner.autodocstring", // Optional: Auto-generate docstrings
"ms-python.black-formatter", // Optional: Black formatter
"streetsidesoftware.code-spell-checker", // Optional: Spell checker
"github.copilot" // Add GitHub Copilot extension
"GitHub.github-vscode-theme", // GitHub theme
"github.vscode-github-actions" // GitHub Actions extension
"ms-toolsai.jupyter", // Jupyter extension
"charliermarsh.ruff" // Ruff extension
],
"settings": {
"python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python", // Poetry virtual environment path
"editor.formatOnSave": true, // Auto-format code when saving
"editor.codeActionsOnSave": {
"source.organizeImports": true // Auto-organize imports on save
},
"python.linting.enabled": true, // Enable linting
"python.linting.flake8Enabled": false, // Disable Flake8 for linting
"python.linting.ruffEnabled": true, // Enable Ruff for linting
"python.formatting.provider": "black", // Use Black for formatting
"python.testing.pytestEnabled": false, // Enable Pytest for testing
"python.testing.pytestArgs": [],
"python.testing.unittestEnabled": false,
"files.exclude": {
"**/__pycache__": true, // Hide __pycache__ directories
"**/*.pyc": true, // Hide .pyc files
"**/.DS_Store": true // Hide .DS_Store files (macOS)
}
}
}
},
"mounts": [
"source=${localWorkspaceFolder},target=/workspace,type=bind" // Mount your local workspace into the container
],
"remoteUser": "root" // Set the user inside the container
}
64 changes: 64 additions & 0 deletions .devcontainer/guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Build Documentation with Development Container

This guide shows how to use WSL2 (Windows Subsystem for Linux), Docker Desktop, Visual Studio Code (VS Code), and how to work with Development Containers in VS Code on a Windows machine.

Requirements:
- [VS Code](https://code.visualstudio.com/)
- [WSL2](https://learn.microsoft.com/en-us/windows/wsl/install)
- [Docker Desktop](https://docs.docker.com/desktop/setup/install/windows-install/)

## Verify installations & Setup

You can verify the installations in a terminal:

```bash
code --version
wsl --version
docker --version
```

### Configure Docker to Use WSL2

See [Docker Desktop Documentation](https://docs.docker.com/desktop/features/wsl/#turn-on-docker-desktop-wsl-2).
- Open Docker Desktop.
- Go to **Settings > General** and make sure **Use the WSL 2 based engine** is checked.
- Under **Settings > Resources > WSL Integration**, ensure that your desired Linux distribution(s) are selected for integration with Docker.

### Install Extensions

- Open Visual Studio Code.
- Press `Ctrl+Shift+X` to open the Extensions view.
- Search and install (includes WSL and Dev Containers Extensions):
- [Remote Development Extension Pack](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack)

VS Code Documentations:
- [Developing in WSL](https://code.visualstudio.com/docs/remote/wsl)
- [Developing inside a Container](https://code.visualstudio.com/docs/devcontainers/containers)


## Build & Open the Development Container

- Open the project `doubleml-docs` in VS code:

```bash
code .
```

- Open the Command Palette (`Ctrl+Shift+P`).
- Type `Remote-Containers: Reopen Folder in Container`.
- VS Code will build the new container(this may take some time) and open the project in it.


## Build the documentation

You can build the documentation via

```bash
cd doc
make html
```

Open the directory in WSL with
```bash
explorer.exe .
```
2 changes: 1 addition & 1 deletion .github/workflows/deploy_docu_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:

- name: Build docu with sphinx
run: |
make -C doc html # build docu
make -C doc html

- name: Deploy to dev
uses: JamesIves/github-pages-deploy-action@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy_docu_stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:

- name: Build docu with sphinx
run: |
make -C doc html # build docu
make -C doc html

- name: Deploy to stable
uses: JamesIves/github-pages-deploy-action@v4
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/test_build_docu_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ on:
description: 'Branch in https://github.com/DoubleML/doubleml-for-r'
required: true
default: 'main'
nbsphinx-execute:
description: 'Execute notebooks with nbsphinx'
required: false
default: 'auto'
schedule:
- cron: "0 9 * * 1,3,5"

Expand Down Expand Up @@ -113,7 +117,7 @@ jobs:

- name: Build docu with sphinx
run: |
make -C doc html # build docu
make -C doc html NBSPHINX_EXECUTE=${{ github.event.inputs.nbsphinx-execute || 'auto' }}

- name: Check for broken links / URLs
run: |
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/test_build_docu_released.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ on:
- main
- dev
workflow_dispatch:
inputs:
nbsphinx-execute:
description: 'Execute notebooks with nbsphinx'
required: false
default: 'auto'
schedule:
- cron: "0 9 * * 1,3,5"

Expand Down Expand Up @@ -74,9 +79,10 @@ jobs:

- name: Build docu with sphinx
run: |
make -C doc html # build docu
make -C doc html NBSPHINX_EXECUTE=${{ github.event.inputs.nbsphinx-execute || 'auto' }}

- name: Check for broken links / URLs

run: |
make -C doc linkcheck

Expand Down
8 changes: 0 additions & 8 deletions .idea/.gitignore

This file was deleted.

12 changes: 0 additions & 12 deletions .idea/doubleml-docs.iml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/inspectionProfiles/profiles_settings.xml

This file was deleted.

4 changes: 0 additions & 4 deletions .idea/misc.xml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

9 changes: 0 additions & 9 deletions .idea/rGraphicsSettings.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/rSettings.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

3 changes: 3 additions & 0 deletions doc/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
_build

# Ignore generated API documentation
api/generated/
5 changes: 5 additions & 0 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build
NBSPHINX_EXECUTE = auto

# Add NBSPHINX_EXECUTE to SPHINXOPTS
SPHINXOPTS += -D nbsphinx_execute=$(NBSPHINX_EXECUTE)


# Put it first so that "make" without argument is like "make help".
help:
Expand Down
13 changes: 13 additions & 0 deletions doc/_static/switcher.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[
{
"name": "dev",
"version": "dev",
"url": "https://docs.doubleml.org/dev/"
},
{
"name": "stable",
"version": "stable",
"url": "https://docs.doubleml.org/stable/",
"preferred": true
}
]
Loading