Reorganizing models and enabling "other" models#12
Open
akutuva21 wants to merge 30 commits intoRuleWorld:masterfrom
Open
Reorganizing models and enabling "other" models#12akutuva21 wants to merge 30 commits intoRuleWorld:masterfrom
akutuva21 wants to merge 30 commits intoRuleWorld:masterfrom
Conversation
- Create \`Examples\`, \`Published\`, and \`Tutorials\` root directories. - Move \`Contributed/BNGPlayground_Examples\` to \`Examples\`. - Move published model subdirectories (e.g., PyBioNetGen models, Contributed/Hlavacek2018, Contributed/Mitra2019, Validation models like Korwek2023, MyrtleBeach) to \`Published\`. - Move remaining items in \`Contributed/BNGPlayground_Validation\` and \`BNGPlayground_PublicRuntime\` to \`Tutorials\`. - Update \`metadata-schema.yaml\` to add explicit domains (\`compartments\`, \`energy\`, \`wacky\`, \`mechanistic-modeling\`, etc.). - Update \`metadata.yaml\` files previously labeled as \`other\` with the new, specific categories. - Update \`scripts/generate-manifest.js\` and \`scripts/validate-metadata.js\` with new \`SEARCH_ROOTS\` and categories. - Regenerate \`manifest.json\`. Co-authored-by: akutuva21 <44119804+akutuva21@users.noreply.github.com>
…969453 chore: Restructure RuleHub directories and improve metadata categories
Fixes a prototype pollution vulnerability in the `setNested` utility function within `scripts/generate-manifest.js`. The fix explicitly skips and filters out dangerous property names (`__proto__`, `constructor`, `prototype`) during both object traversal and final assignment. Co-authored-by: akutuva21 <44119804+akutuva21@users.noreply.github.com>
* Refactor `scripts/validate-metadata.js` to export `parseScalar` and conditionally execute `main()`. * Add `scripts/tests/validate-metadata.test.js` covering all behavior. Co-authored-by: akutuva21 <44119804+akutuva21@users.noreply.github.com>
Removed the `# FIX: Add Autoinducer dynamics` comment from `Examples/biology/quorumsensingcircuit/quorum-sensing-circuit.bngl` as the implementation for production and degradation is already present below it. Co-authored-by: akutuva21 <44119804+akutuva21@users.noreply.github.com>
Removed the '# FIX: Add resource dynamics' comment as the resource regeneration and decay rules are already implemented correctly in the model. Co-authored-by: akutuva21 <44119804+akutuva21@users.noreply.github.com>
Updated `setNested` to accept an array of parts instead of a dotted path string, avoiding redundant string splitting. Tested with a 100,000 iteration benchmark on `parseMetadataYaml`, measuring ~20% improvement (from ~1.25s to ~0.98s). Co-authored-by: akutuva21 <44119804+akutuva21@users.noreply.github.com>
- Refactor `scripts/validate-metadata.js` to only run `main()` if executed directly. - Export `validateMetadataFile` to allow testing it in isolation. - Add comprehensive test suite in `tests/validate-metadata.test.js` covering valid files, missing files, and invalid configuration scenarios using temporary directory fixtures. Co-authored-by: akutuva21 <44119804+akutuva21@users.noreply.github.com>
Refactored generate-manifest.js to allow importing internal functions and added comprehensive unit tests for buildEntry using node:test. Co-authored-by: akutuva21 <44119804+akutuva21@users.noreply.github.com>
Co-authored-by: akutuva21 <44119804+akutuva21@users.noreply.github.com>
Updated `ds3()` in `sp_fourier_synthesizer.bngl` to use the exact derivative of the 3rd harmonic trigonometric identity instead of an approximation. Cleaned up corresponding comments. Co-authored-by: akutuva21 <44119804+akutuva21@users.noreply.github.com>
Extracted the duplicated listModelFiles function from scripts/generate-manifest.js and scripts/validate-metadata.js into a shared utility module (scripts/utils.js). This improves code maintainability and adheres to DRY principles. Co-authored-by: akutuva21 <44119804+akutuva21@users.noreply.github.com>
…-9077399113245613909 Fix: Remove Autoinducer dynamics FIX comment
…2033588725295054439 Remove resolved FIX comment in eco_food_web_chaos_3sp.bngl
…438250706711219829 🧪 Add generate-manifest.js testing coverage
…3267491605790 ⚡ perf(manifest): optimize setNested path handling
…-16219869687540900783 🧪 [testing] add tests for parseScalar in validate-metadata.js
…6954674524457256 🧪 testing: add tests for validateMetadataFile
…451205665425511 🧹 Refactor: Extract listModelFiles function into a shared utility module
…67357569153273 Implement 3rd harmonic using trigonometric identity
…-yaml-7716385411393383498
…411393383498 🧪 test: add unit tests for custom parseMetadataYaml function
…-15072088604429859966 🔒 Fix Prototype Pollution in setNested
Member
Author
|
Added other security fixes and small edits suggested by Jules |
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.
This PR refactors the RuleHub directory structure and updates metadata categories according to the latest requirements.
Key Changes
Published,Examples, andTutorials.Examplesdirectory.PyBioNetGenpublished models toPublished/PyBioNetGen.AuthorYearformat fromContributed/toPublished/.BNGPlayground_Validationmodels based on their origin (published vs. tutorials)."category: other".mechanistic-modeling,feature-demos,compartments,wacky,energy, etc.) to themetadata-schema.yaml.metadata.yamlfiles.generate-manifest.jsandvalidate-metadata.jsmodified to scan the new root directories.