Skip to content

Changing visibility of ekore and Splitting constants.rs#543

Merged
felixhekhorn merged 6 commits into
masterfrom
ekore-visibility
Jun 30, 2026
Merged

Changing visibility of ekore and Splitting constants.rs#543
felixhekhorn merged 6 commits into
masterfrom
ekore-visibility

Conversation

@AkshatRai07

Copy link
Copy Markdown
Collaborator

This PR fixes #539, and is a pre-requisite to #537.

  • Changed visibility of functions and modules in ekore crate. pub was converted to pub(super), and if that resulted in error it was converted to pub(crate).
  • Split constants.rs to 3 files:
    • math_constants.rs with all the Zeta function values.
    • qcd_constants.rs with all QCD constants.
    • pid.rs with the rest of the constants, with PID_* and MAX_ORDER_* being the only public constants (are/will be exposed publicly in the future).

Copilot AI review requested due to automatic review settings June 26, 2026 15:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@AkshatRai07

Copy link
Copy Markdown
Collaborator Author

I was a bit confused in placing of MAX_ORDER_* constants, they aren't mathematical nor confined to QCD, so added them in pid.rs because other public constants are present in that.

Second, there was a warning in cargo build --workspace:

   Compiling ekore v0.0.1 (/home/akshatrai/Documents/GSoC/eko/crates/ekore)
warning: variants `Sm2o`, `Sm3o`, and `Sm21o` are never constructed
  --> crates/ekore/src/harmonics/cache.rs:41:5
   |
 9 | pub(crate) enum K {
   |                 - variants in this enum
...
41 |     Sm2o,
   |     ^^^^
...
45 |     Sm3o,
   |     ^^^^
...
49 |     Sm21o,
   |     ^^^^^
   |
   = note: `K` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
   = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default

warning: `ekore` (lib) generated 1 warning
   Compiling eko v0.0.1 (/home/akshatrai/Documents/GSoC/eko/crates/eko)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.56s

This is not a pre-commit issue, just a warning that these three things, Sm2o, Sm3o, and Sm21o are used nowhere in the ekore crate except at their declarations and K.

@felixhekhorn felixhekhorn left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Please add a Changelog entry
  • I'm not sure yet what to do with the unused functions ... let's discuss tomorrow; most likely we will just drop them

Comment thread crates/ekore/src/pid.rs Outdated
@felixhekhorn felixhekhorn added refactor Refactor code rust Rust extension related gsoc26 labels Jun 30, 2026
@AkshatRai07

Copy link
Copy Markdown
Collaborator Author

So Sm1o was also unused but compiler was not giving warning about that until I removed the other 3 functions.

@felixhekhorn

Copy link
Copy Markdown
Collaborator

I change my mind again: let's keep the functions! sorry 😇 can you please just revert 0bece9e ? We need them when we port

to Rust.

Here comes a math statement: at a given order in the coupling (e.g. $a_s^3$ -> as3.py), we explore a given set of special functions, in particular a given set of harmonic sums. In this case: $a_s^3$ explores harmonic sum up to weight 3. Specifically, here we need $S_3, S_{-3},S_{-2,1}$, etc. (i.e. the indices sum in absolute value to 3) and "up to" implies we also need lower order ones, e.g. $S_{-2}$. The polarized and unpolarized anomalous dimensions explore two different spaces (some of which is related by "odd" <-> "even"). Here we see an explicit example thereof.

@AkshatRai07

Copy link
Copy Markdown
Collaborator Author

All 4 functions are back now

felixhekhorn
felixhekhorn approved these changes Jun 30, 2026
@felixhekhorn felixhekhorn merged commit 94f593a into master Jun 30, 2026
14 checks passed
@felixhekhorn felixhekhorn deleted the ekore-visibility branch June 30, 2026 12:19
This was referenced Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gsoc26 refactor Refactor code rust Rust extension related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Split crates/ekore/src/constants.rs

3 participants