Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
88 changes: 85 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ lz4_flex = "0.11.6"
ndarray = "0.15.4"
ndarray-npy = "0.8.1"
num = "0.4.1"
pyo3 = "0.29.0"
tar = "0.4.46"
thiserror = "1.0.63"
yaml-rust2 = "0.8"
Expand Down
1 change: 1 addition & 0 deletions crates/dekoder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ When using our code please cite
- [eko](https://crates.io/crates/eko) - Core EKO utilities
- [ekore](https://crates.io/crates/ekore) - Anomalous dimensions and operator matrix elements
- [ekore_capi](https://crates.io/crates/ekore_capi) - C API for ekore
- [ekore_py](https://crates.io/crates/ekore_py) - Python API for ekore

## License

Expand Down
1 change: 1 addition & 0 deletions crates/eko/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ When using our code please cite
- [eko](https://crates.io/crates/eko) - Core EKO utilities
- [ekore](https://crates.io/crates/ekore) - Anomalous dimensions and operator matrix elements
- [ekore_capi](https://crates.io/crates/ekore_capi) - C API for ekore
- [ekore_py](https://crates.io/crates/ekore_py) - Python API for ekore

## License

Expand Down
1 change: 1 addition & 0 deletions crates/ekore/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ When using our code please cite
- [eko](https://crates.io/crates/eko) - Core EKO utilities
- [ekore](https://crates.io/crates/ekore) - Anomalous dimensions and operator matrix elements
- [ekore_capi](https://crates.io/crates/ekore_capi) - C API for ekore
- [ekore_py](https://crates.io/crates/ekore_py) - Python API for ekore

## License

Expand Down
1 change: 1 addition & 0 deletions crates/ekore_capi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ When using our code please cite
- [eko](https://crates.io/crates/eko) - Core EKO utilities
- [ekore](https://crates.io/crates/ekore) - Anomalous dimensions and operator matrix elements
- [ekore_capi](https://crates.io/crates/ekore_capi) - C API for ekore
- [ekore_py](https://crates.io/crates/ekore_py) - Python API for ekore

## License

Expand Down
24 changes: 24 additions & 0 deletions crates/ekore_py/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[package]
name = "ekore_py"
description = "Python API for the ekore crate"
readme = "README.md"

authors.workspace = true
categories.workspace = true
edition.workspace = true
keywords.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
version.workspace = true
exclude = ["tests"]

[package.metadata.docs.rs]
rustdoc-args = ["--html-in-header", "doc-header.html"]
Comment thread
AkshatRai07 marked this conversation as resolved.

[lib]
name = "ekore_py"
crate-type = ["cdylib"]

[dependencies]
pyo3.workspace = true
Comment thread
AkshatRai07 marked this conversation as resolved.
Outdated
24 changes: 24 additions & 0 deletions crates/ekore_py/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# ekore

Python API for the [ekore](https://crates.io/crates/ekore) crate which is a part of the [EKO](https://github.com/NNPDF/eko) framework.

This crate exposes the anomalous dimensions and operator matrix elements from `ekore` through PyO3, making them callable from Python. The Python extension module is built and packaged using [maturin](https://github.com/PyO3/maturin).
Comment thread
AkshatRai07 marked this conversation as resolved.
Outdated

## Citation policy

When using our code please cite

- our DOI: [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3874237.svg)](https://doi.org/10.5281/zenodo.3874237)
- our paper: [![arXiv](https://img.shields.io/badge/arXiv-2202.02338-b31b1b?labelColor=222222)](https://arxiv.org/abs/2202.02338)

## Crates in the eko framework

- [dekoder](https://crates.io/crates/dekoder) - Reading and writing EKO output files
- [eko](https://crates.io/crates/eko) - Core EKO utilities
- [ekore](https://crates.io/crates/ekore) - Anomalous dimensions and operator matrix elements
- [ekore_capi](https://crates.io/crates/ekore_capi) - C API for ekore
- [ekore_py](https://crates.io/crates/ekore_py) - Python API for ekore

## License

[GPL-3.0-or-later](https://github.com/NNPDF/eko/blob/master/LICENSE)
13 changes: 13 additions & 0 deletions crates/ekore_py/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[build-system]
requires = ["maturin>=1.1,<2.0"]
build-backend = "maturin"

[project]
name = "ekore_py"
requires-python = ">=3.11"
classifiers = [
"Programming Language :: Rust",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
dynamic = ["version"]
13 changes: 13 additions & 0 deletions crates/ekore_py/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
use pyo3::prelude::*;

/// A Python module implemented in Rust.
#[pymodule]
mod ekore_py {
Comment thread
AkshatRai07 marked this conversation as resolved.
use pyo3::prelude::*;

/// Formats the sum of two numbers as string.
#[pyfunction]
fn sum_as_string(a: usize, b: usize) -> PyResult<String> {
Ok((a + b).to_string())
}
Comment thread
AkshatRai07 marked this conversation as resolved.
Outdated
}
2 changes: 1 addition & 1 deletion crates/release.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
["dekoder", "ekore", "eko", "ekore_capi"]
["dekoder", "ekore", "eko", "ekore_capi", "ekore_py"]
Loading