Clean up generated code#7
Merged
RyanMarcus merged 1 commit intoMay 27, 2026
Merged
Conversation
Clean up generated code by adding some spacing and sorting includes Update contributors
nh13
referenced
this pull request
in fg-labs/prmi
May 28, 2026
…src/upstream/ Establishes the Cargo workspace shape that the v0.1 stack will build on: * Root `Cargo.toml` declares `prmi` + `prmi-sys` members and a shared `workspace.dependencies` block. * `prmi/Cargo.toml` ships the upstream-dependency set (log, byteorder, rayon, plus the rmi_lib-inherited indicatif/json/bytesize/superslice/ tabular crates that Marcus's source references). * `prmi/src/lib.rs` is a stub declaring `pub mod upstream;`. Fulcrum- authored modules (encoding, fasta, sa, sidecar, train, index, cli) land in subsequent PRs. * `prmi-sys/Cargo.toml` + `prmi-sys/src/lib.rs` are placeholders so the workspace member set is stable from PR #1 onward; the actual FFI surface lands in PR #7 (`feat/v0.1-prmi-sys`). Marcus's primitives move from the original repo layout (`src/`, `rmi_lib/`, `tests/`) into `prmi/src/upstream/`: * `prmi/src/upstream/models/` — LinearModel, LinearSplineModel, LogLinearModel, RobustLinearModel, RMITrainingData, Model trait, ModelInput, ModelParam, TrainingKey, stdlib/utils helpers. Fulcrum extensions added (`weighted_slr`, `LinearModel::new_weighted`, `LinearSplineModel::new_weighted`) for the upcoming priors PR. * `prmi/src/upstream/train/` — `lower_bound_correction.rs` (with the Fulcrum Option-returning accessors `next_real`/`prev_real`/ `next_index_real`/`prev_index_real` plus the `*_is_real` bools that disambiguate sentinel entries), `two_layer.rs` (kept verbatim, unused by the Fulcrum trainer but preserved for upstream parity), `mod.rs`. * `prmi/src/upstream/mod.rs` re-exports the model primitives and marks the module `#[allow(clippy::all, unused_*, dead_code)]` so inherited code does not pollute the workspace lint surface. Per-file copyright headers (`// Copyright Ryan Marcus 2020` plus `// Modified by Fulcrum Genomics 2026` where applicable) identify inherited vs new code. `LICENSE-FORK-NOTICE.md` documents the lineage. Pruned from Marcus's original layout (replaced by prmi v0.1 design): * `src/main.rs`, `src/load.rs` — the standalone `rmi` optimizer binary. * `rmi_lib/src/{cache_fix, codegen, optimizer}.rs` — codegen + tuning machinery for the upstream binary, not used by the prmi trainer. * `rmi_lib/src/models/{balanced_radix, cubic_spline, histogram, normal, radix}.rs` — RMI model variants outside prmi's v0.1 scope. * `rmi_lib/src/train/multi_layer.rs` — multi-layer trainer; prmi's cleanroom trainer (PR #4a) is single-L1-L2. * `tests/` — Marcus's RMI binary CLI tests; prmi tests in PR #2+. * `.drone.yml`, `COPYING`, `example_param_grid.json` — Marcus's CI config (replaced by `.github/workflows/ci.yml` in PR #8) and optimizer-specific artefacts. Workspace builds clean (`cargo build --workspace`) and the 3 unit tests inherited from upstream models pass.
nh13
referenced
this pull request
in fg-labs/prmi
May 28, 2026
…src/upstream/ (#2) Establishes the Cargo workspace shape that the v0.1 stack will build on: * Root `Cargo.toml` declares `prmi` + `prmi-sys` members and a shared `workspace.dependencies` block. * `prmi/Cargo.toml` ships the upstream-dependency set (log, byteorder, rayon, plus the rmi_lib-inherited indicatif/json/bytesize/superslice/ tabular crates that Marcus's source references). * `prmi/src/lib.rs` is a stub declaring `pub mod upstream;`. Fulcrum- authored modules (encoding, fasta, sa, sidecar, train, index, cli) land in subsequent PRs. * `prmi-sys/Cargo.toml` + `prmi-sys/src/lib.rs` are placeholders so the workspace member set is stable from PR #1 onward; the actual FFI surface lands in PR #7 (`feat/v0.1-prmi-sys`). Marcus's primitives move from the original repo layout (`src/`, `rmi_lib/`, `tests/`) into `prmi/src/upstream/`: * `prmi/src/upstream/models/` — LinearModel, LinearSplineModel, LogLinearModel, RobustLinearModel, RMITrainingData, Model trait, ModelInput, ModelParam, TrainingKey, stdlib/utils helpers. Fulcrum extensions added (`weighted_slr`, `LinearModel::new_weighted`, `LinearSplineModel::new_weighted`) for the upcoming priors PR. * `prmi/src/upstream/train/` — `lower_bound_correction.rs` (with the Fulcrum Option-returning accessors `next_real`/`prev_real`/ `next_index_real`/`prev_index_real` plus the `*_is_real` bools that disambiguate sentinel entries), `two_layer.rs` (kept verbatim, unused by the Fulcrum trainer but preserved for upstream parity), `mod.rs`. * `prmi/src/upstream/mod.rs` re-exports the model primitives and marks the module `#[allow(clippy::all, unused_*, dead_code)]` so inherited code does not pollute the workspace lint surface. Per-file copyright headers (`// Copyright Ryan Marcus 2020` plus `// Modified by Fulcrum Genomics 2026` where applicable) identify inherited vs new code. `LICENSE-FORK-NOTICE.md` documents the lineage. Pruned from Marcus's original layout (replaced by prmi v0.1 design): * `src/main.rs`, `src/load.rs` — the standalone `rmi` optimizer binary. * `rmi_lib/src/{cache_fix, codegen, optimizer}.rs` — codegen + tuning machinery for the upstream binary, not used by the prmi trainer. * `rmi_lib/src/models/{balanced_radix, cubic_spline, histogram, normal, radix}.rs` — RMI model variants outside prmi's v0.1 scope. * `rmi_lib/src/train/multi_layer.rs` — multi-layer trainer; prmi's cleanroom trainer (PR #4a) is single-L1-L2. * `tests/` — Marcus's RMI binary CLI tests; prmi tests in PR #2+. * `.drone.yml`, `COPYING`, `example_param_grid.json` — Marcus's CI config (replaced by `.github/workflows/ci.yml` in PR #8) and optimizer-specific artefacts. Workspace builds clean (`cargo build --workspace`) and the 3 unit tests inherited from upstream models pass.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add #pragma once header guards to C++ output - this is the primary syntactic change as it allows for safe inclusion of the generated headers in multiple files.
Clean up generated code by adding some spacing and sorting includes - makes generated code (slightly) easier to read.
Update contributors.
A side-effect of the PR is to eliminate trailing whitespace in the touched files.