Skip to content
Merged
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
558 changes: 399 additions & 159 deletions Cargo.lock

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,16 @@ console = "0.16.2"
dialoguer = "0.12.0"
edit-distance = "2.2.2"
flate2 = "1.1.2"
jupyter-protocol = "1.0.0"
jupyter-protocol = "2.0.1"

lazy-regex = "3.4.1"
nbformat = "1.0.0"
nbformat = "3.0.0"
pyproject-toml = "0.13.7"
reqwest = { version = "0.12.20", features = ["blocking"] }
reqwest = { version = "0.13.3", features = ["blocking"] }
rustpython-parser = "0.4.0"

serde = { version = "1", features = ["derive"] }
strum = { version = "0.27.1", features = ["derive", "strum_macros"] }
strum = { version = "0.28.0", features = ["derive", "strum_macros"] }
tera = "1.20.1"

tokio = { version = "1.45", features = [
Expand All @@ -72,7 +72,7 @@ tokio = { version = "1.45", features = [
"sync",
] }

toml = "0.9.2"
toml = "1.1.2"
tracing = { version = "0", features = ["attributes"] }
tracing-error = "0"
tracing-subscriber = "0"
Expand Down
2 changes: 1 addition & 1 deletion docs/src/config/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Default Value: `true`
## api_content_path
The relative path from the site root (see [site_root](#siteroot)) to where the api docs are located. This is tracked separately because this needs to be reflected in the generated links (they need to be relative to the site root, not the current working directory for example).

The full place where the docs will get placed is determined by joining `api_content_path` to `site_root` along with whatever intermediate path is required for the SSG (e.g. for zola, this is `content`). Meaning that by default the docs will be placed in `./docs/api/` for makrdown and `./docs/content/api/` for zola.
The full place where the docs will get placed is determined by joining `api_content_path` to `site_root` along with whatever intermediate path is required for the SSG (e.g. for zola, this is `content`). Meaning that by default the docs will be placed in `./docs/api/` for markdown and `./docs/content/api/` for zola.

Default value: `api`

Expand Down
928 changes: 598 additions & 330 deletions pixi.lock

Large diffs are not rendered by default.

14 changes: 11 additions & 3 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ platforms = ["win-64", "linux-64"]
version = "0.1.0"

[tasks]
test = "cargo test --all"
cov-ci = "cargo llvm-cov --locked --all-features --lcov --output-path lcov.info"
cov-open = "cargo llvm-cov --locked --all-features --open"
test = "cargo test --all"
test-clean = { depends-on = ["clean", "test"] }
cov-ci = "cargo llvm-cov --locked --all-features --lcov --output-path lcov.info"
cov-open = "cargo llvm-cov --locked --all-features --open"


[dependencies]
rust = ">=1.92.0,<1.93"
cargo-llvm-cov = ">=0.6.23,<0.7"
gcc = ">=15.2.0,<15.3"

[feature.docs.dependencies]
mdbook = ">=0.5.2,<0.6"
Expand Down Expand Up @@ -99,6 +101,12 @@ pr = { depends-on = [
"gh-create-pr",
] }


clean-cargo = "pixi run cargo clean"
clean-pixi = "pixi clean"

clean = { depends-on = ["clean-cargo", "clean-pixi"] }

[environments]
default = { features = ["default", "dev", "zola", "docs"] }
test = { features = ["default", "zola"] }
Expand Down
2 changes: 1 addition & 1 deletion src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ pub struct CliArgs {
#[arg(long, short)]
pub api_content_path: Option<PathBuf>,

/// The path to where the notbook output should be placed relative to the site_root
/// The path to where the notebook output should be placed relative to the site_root
/// output will specifically be placed in `./<site_root>/<notebook_content_path>/`
/// `user-guide/` by default. If you want the output to be the site root set this to the empty string
#[arg(long)]
Expand Down
10 changes: 5 additions & 5 deletions src/parsing/python/jupyter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ pub fn parse_notebook_file(path: &Path) -> Result<Vec<Cell>> {

// Parse the notebook
let notebook = match parse_notebook(&notebook_json)? {
Notebook::V4(notebook) => notebook,
Notebook::Legacy(notebook) => {
upgrade_legacy_notebook(notebook).map_err(|err| eyre!(err))?
}
};
Notebook::V4(notebook) => Ok(notebook),
Notebook::Legacy(notebook) => upgrade_legacy_notebook(notebook).map_err(|err| eyre!(err)),
Notebook::V4QuirksMode(v4_quirks) => Ok(v4_quirks.repair()),
Notebook::V3(_) | _ => Err(eyre!("unupported notebook version")),
}?;

let metadata = notebook.metadata;

Expand Down
4 changes: 3 additions & 1 deletion src/parsing/sphinx/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ pub enum PyRole {
}
#[derive(Debug, PartialEq, EnumString)]
#[strum(serialize_all = "camelCase")]
pub enum RstRole {}
pub enum RstRole {
Directive,
}

#[derive(Debug)]
pub struct ExternalSphinxRef {
Expand Down
6 changes: 4 additions & 2 deletions src/render/jupyter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ pub fn rank_media_types(media: &MediaType) -> usize {
| MediaType::VegaV4(_)
| MediaType::VegaV5(_)
| MediaType::Vdom(_)
| MediaType::Other(_) => 0,
| MediaType::Other(_)
| _ => 0,
}
}

Expand Down Expand Up @@ -102,7 +103,8 @@ pub fn render_jupyter_display_data(cell_nr: usize, data: Media) -> Result<Option
| MediaType::VegaV4(_)
| MediaType::VegaV5(_)
| MediaType::Vdom(_)
| MediaType::Other(_) => unreachable!(),
| MediaType::Other(_)
| &_ => unreachable!(),
});
richest.transpose()
}
Expand Down
Loading