-
Notifications
You must be signed in to change notification settings - Fork 8
Add ekore_py #554
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
AkshatRai07
wants to merge
20
commits into
master
Choose a base branch
from
ekore-py
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add ekore_py #554
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
4e3562a
Init commit
AkshatRai07 da1f566
Add constants
AkshatRai07 5215f4f
Add constants tests
AkshatRai07 e8d580e
Add CI
AkshatRai07 8afef9f
Fix README
AkshatRai07 688d5d2
Linked doc-header
AkshatRai07 2823918
Added ad_ps and Cache
AkshatRai07 e988dd3
Added ad_ps tests
AkshatRai07 f4cf839
Added ad_us
AkshatRai07 07a5bb4
Added ad_us tests
AkshatRai07 ce5becf
Added ome_us
AkshatRai07 601ce5c
Added ome_us tests
AkshatRai07 8b2d604
Added header docs
AkshatRai07 674cd1f
Added macros to remove code duplication
AkshatRai07 7b6ae24
Fixed numpy module error
AkshatRai07 ec2cb73
Added CD for pyapi
AkshatRai07 9d53214
Updated Changelog
AkshatRai07 5cdc0af
Added MacOS in tests
AkshatRai07 ca1b100
Merge branch 'master' into ekore-py
AkshatRai07 9b80248
Update README.md
felixhekhorn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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"] | ||
|
|
||
| [lib] | ||
| name = "ekore_py" | ||
| crate-type = ["cdylib"] | ||
|
|
||
| [dependencies] | ||
| pyo3.workspace = true | ||
|
AkshatRai07 marked this conversation as resolved.
Outdated
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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). | ||
|
AkshatRai07 marked this conversation as resolved.
Outdated
|
||
|
|
||
| ## Citation policy | ||
|
|
||
| When using our code please cite | ||
|
|
||
| - our DOI: [](https://doi.org/10.5281/zenodo.3874237) | ||
| - our paper: [](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) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 { | ||
|
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()) | ||
| } | ||
|
AkshatRai07 marked this conversation as resolved.
Outdated
|
||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| ["dekoder", "ekore", "eko", "ekore_capi"] | ||
| ["dekoder", "ekore", "eko", "ekore_capi", "ekore_py"] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.