Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,7 @@ venv.bak/


src/dags/_version.py
docs/source/_build/
docs/_build/

# MyST build outputs
_build
12 changes: 8 additions & 4 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
---
version: 2
build:
os: ubuntu-lts-latest
os: ubuntu-24.04
tools:
python: '3.13'
nodejs: '20'
jobs:
create_environment:
- asdf plugin add pixi
- asdf install pixi latest
- asdf global pixi latest
install:
- pixi install -e docs
build:
html:
- pixi run -e docs sphinx-build -T -b html docs/source $READTHEDOCS_OUTPUT/html
post_build:
# Jupyter Book 2.0 builds site content to _build/html.
# For ReadTheDocs, we build and then copy to the expected output location.
- mkdir --parents $READTHEDOCS_OUTPUT/html/
- BASE_URL="/$READTHEDOCS_LANGUAGE/$READTHEDOCS_VERSION" pixi run -e docs docs
- cp -a docs/_build/html/. "$READTHEDOCS_OUTPUT/html" && rm -r docs/_build
2 changes: 2 additions & 0 deletions binder/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dags
numpy
20 changes: 0 additions & 20 deletions docs/Makefile

This file was deleted.

File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 6 additions & 7 deletions docs/source/getting_started.md → docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def y(x): # depends on x because parameter is named "x"

### Creating a Combined Function

The main entry point is {func}`~dags.concatenate_functions`:
The main entry point is `concatenate_functions`:

```python
import dags
Expand Down Expand Up @@ -91,7 +91,7 @@ result = combined() # {"a": ..., "b": ..., "c": ...}

## Inspecting the DAG

Use {func}`~dags.create_dag` to create and inspect the dependency graph:
Use `create_dag` to create and inspect the dependency graph:

```python
import dags
Expand All @@ -108,7 +108,7 @@ print(list(dag.edges())) # [('income', 'tax'), ('tax', 'net_income'), ...]

## Finding Dependencies

Use {func}`~dags.get_ancestors` to find all functions that a target depends on:
Use `get_ancestors` to find all functions that a target depends on:

```python
ancestors = dags.get_ancestors(
Expand All @@ -122,7 +122,7 @@ ancestors = dags.get_ancestors(

### Getting Function Arguments

{func}`~dags.get_free_arguments` returns the parameter names of a function:
`get_free_arguments` returns the parameter names of a function:

```python
def my_func(a, b, c=1):
Expand All @@ -134,7 +134,7 @@ args = dags.get_free_arguments(my_func)

### Getting Type Annotations

{func}`~dags.get_annotations` returns type annotations:
`get_annotations` returns type annotations:

```python
def my_func(a: int, b: float) -> float:
Expand All @@ -146,7 +146,7 @@ annotations = dags.get_annotations(my_func)

## Renaming Arguments

Use {func}`~dags.rename_arguments` to change parameter names:
Use `rename_arguments` to change parameter names:

```python
def original(x, y):
Expand All @@ -162,4 +162,3 @@ This is useful when integrating functions from different sources that use differ

- Learn about [common usage patterns](usage_patterns.md) from real projects
- Explore [tree structures](tree.md) for nested data
- See the complete [API reference](api.md)
13 changes: 1 addition & 12 deletions docs/source/index.md → docs/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# dags

```{image} _static/images/logo.svg
:width: 400
:width: 400px
:align: center
```

Expand Down Expand Up @@ -56,14 +56,3 @@ Or with conda:
```bash
conda install -c conda-forge dags
```

## Table of Contents

```{toctree}
:maxdepth: 2

getting_started
usage_patterns
tree
api
```
36 changes: 0 additions & 36 deletions docs/make.bat

This file was deleted.

32 changes: 32 additions & 0 deletions docs/myst.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
# Jupyter Book 2.0 configuration
# See: https://jupyterbook.org/
version: 1
project:
id: dags
title: dags
description: >-
Tools to create executable DAGs from interdependent functions.
authors:
- name: Janos Gabler
email: [email protected]
- name: Tobias Raabe
keywords:
- dag
- directed acyclic graph
- functions
- python
github: https://github.com/OpenSourceEconomics/dags
jupyter: true
toc:
- file: index.md
- file: getting_started.md
- file: usage_patterns.ipynb
- file: tree.md
error_rules:
- rule: link-resolves
severity: ignore
site:
template: book-theme
options:
logo_text: dags
135 changes: 0 additions & 135 deletions docs/source/api.md

This file was deleted.

Loading