-
Notifications
You must be signed in to change notification settings - Fork 61
docs: adding mapping between code elements and database tables #242
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
base: unstable
Are you sure you want to change the base?
Conversation
WalkthroughAdds a new documentation page mapping database tables to model sets/parameters and updates an existing documentation file to include that new fragment in the Sets section. No code or behavior changes. Changes
Sequence Diagram(s)(omitted — changes are documentation-only and do not introduce new runtime control flow) Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Pre-merge checks✅ Passed checks (3 passed)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used🧠 Learnings (1)📚 Learning: 2025-10-30T14:37:44.260ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
🔇 Additional comments (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (2)
docs/source/db_model_comparison.rstdocs/source/mathematical_formulation.rst
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: setup and test (windows-latest, 3.12)
- GitHub Check: setup and test (macos-latest, 3.12)
- GitHub Check: setup and test (windows-latest, 3.13)
🔇 Additional comments (4)
docs/source/mathematical_formulation.rst (1)
143-147: Include directive placement and syntax look good.The relative path is correct since both files are in the same directory. The external RST fragment will be properly expanded during documentation build. Note that the "New tables:" and "New tables End." text are informal markers; they won't generate formal RST elements but serve as visual delimiters.
docs/source/db_model_comparison.rst (3)
1-309: Excellent documentation structure and comprehensive mappings.The new documentation file is well-organized with clear section hierarchy, consistent CSV table formatting, and appropriate use of RST roles (
:math:,:code:,:header:,:widths:). The mappings between database tables and model elements are systematically categorized, and the "Notes" column provides helpful context for each mapping. The summary statistics block (lines 314-318) offers useful reference information.
299-309: "Database Tables Without Direct Model Mapping" section aids clarity.This section (lines 299-309) appropriately documents tables like
myopic_efficiency,time_manual, andsector_labelthat don't have direct model mappings. This helps users understand the full database schema and identifies less-commonly-used tables, which improves documentation completeness.
51-51: The line 51 use oftech_uncapis correct and matches the actual codebase definition. Verification of the Python codebase showstech_uncapis consistently defined and used throughout (e.g.,temoa/core/model.py:266,temoa/types/model_types.py:181). No instances oftech_unlim_capexist in the model code, so if the existing documentation uses that variant, the existing documentation is outdated—not the new mapping document.
| ":math:`\text{TISA}_{r,i,t}`", "limit_tech_input_split_annual", "limit_tech_input_split_annual", "average annual technology input fuel ratio; annual tech input splits" | ||
| ":math:`\text{TOS}_{r,t,o}`", "limit_tech_output_split", "limit_tech_output_split", "technology output fuel ratio at time slice level; tech output split constraints" | ||
| ":math:`\text{TISA}_{r,i,t}`", "limit_tech_output_split_annual", "limit_tech_output_split_annual", "average annual technology output fuel ratio; annual tech output splits" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick | 🔵 Trivial
Clarify mathematical notation for output split average parameter.
Line 188 repeats the same mathematical notation \text{TISA}_{r,i,t} for limit_tech_output_split_annual as line 186 uses for input split. Consider clarifying whether output split should use different notation (e.g., TOSA for output vs TISA for input) to maintain clarity, or add a note explaining why they share notation. This improves alignment with the parameter descriptions in the existing mathematical formulation documentation.
🤖 Prompt for AI Agents
In docs/source/db_model_comparison.rst around lines 186 to 188, the LaTeX math
notation for the annual output-split parameter is duplicated as
\text{TISA}_{r,i,t} (same as the input-split), which is confusing; change the
math string for limit_tech_output_split_annual to a distinct notation (e.g.,
\text{TOSA}_{r,t,o} or \text{TOSA}_{r,o,t} consistent with the ordering used for
limit_tech_output_split) and update the accompanying short description to
mention "average annual technology output fuel ratio; annual tech output
splits", or alternatively add a brief note explaining why input and output
annual splits intentionally share the same notation if that was deliberate.
Co-authored-by: jdecarolis <jdecarolis@cmu.edu>
7ef6acb to
43d4c8e
Compare
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.