Skip to content

Updates to Nomenclature of Output Files#881

Open
sambuddhac wants to merge 26 commits intodevelopfrom
sambuddhac-patch-14
Open

Updates to Nomenclature of Output Files#881
sambuddhac wants to merge 26 commits intodevelopfrom
sambuddhac-patch-14

Conversation

@sambuddhac
Copy link
Collaborator

@sambuddhac sambuddhac commented Nov 17, 2025

This PR attempts at a better, more intuitive, and logical nomenclature for out files as well as establishes naming conventions and guidelines for future new output files.

Description

This PR attempts at a better, more intuitive, and logical nomenclature for out files as well as establishes naming conventions and guidelines for future new output files, starting from renaming the one for writing output of capacity reserve margin prices.

All the files that are written when some settings switch is ON, the output filenames follow the "SnakeConvention.csv" format. For filenames that have only one word, the convention is "Word.csv" format.

What type of PR is this? (check all applicable)

  • Feature
  • Bug Fix
  • Documentation Update
  • Code Refactor
  • Performance Improvements

Related Tickets & Documents

Checklist

  • Code changes are sufficiently documented; i.e. new functions contain docstrings and .md files under /docs/src have been updated if necessary.
  • The latest changes on the target branch have been incorporated, so that any conflicts are taken care of before merging. This can be accomplished either by merging in the target branch (e.g. 'git merge develop') or by rebasing on top of the target branch (e.g. 'git rebase develop'). Please do not hesitate to reach out to the GenX development team if you need help with this.
  • Code has been tested to ensure all functionality works as intended.
  • CHANGELOG.md has been updated (if this is a 'notable' change).
  • I consent to the release of this PR's code under the GNU General Public license.

How this can be tested

Post-approval checklist for GenX core developers

After the PR is approved

  • Check that the latest changes on the target branch are incorporated, either via merge or rebase
  • Remember to squash and merge if incorporating into develop

This PR attempts at a better, more intuitive, and logical nomenclature for out files as well as establishes naming conventions and guidelines for future new output files.
@sambuddhac sambuddhac requested a review from lbonaldo November 17, 2025 18:03
@sambuddhac sambuddhac linked an issue Nov 17, 2025 that may be closed by this pull request
@sambuddhac sambuddhac marked this pull request as ready for review November 24, 2025 14:46
Copilot AI review requested due to automatic review settings November 24, 2025 14:46
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the naming convention for output CSV files from snake_case (e.g., capacity.csv, power_balance.csv) to PascalCase (e.g., Capacity.csv, PowerBalance.csv) to establish a more intuitive and consistent naming standard across the codebase.

Key Changes

  • Established PascalCase naming convention for output files: single-word files use "Word.csv" format, multi-word files use "WordWordWord.csv" format
  • Updated approximately 30+ output file references across multiple modules including capacity, emissions, storage, transmission, reserves, and VRE storage
  • Updated internal references to maintain consistency with time series reconstruction functions

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/write_outputs/write_vre_stor.jl Renamed 8 VRE storage output files from snake_case to PascalCase (e.g., vre_stor_capacity.csvVreStorCapacity.csv)
src/write_outputs/write_storagedual.jl Renamed storage dual output from storagebal_duals.csv to StoragebalDuals.csv
src/write_outputs/write_storage.jl Updated temporal data output from storage to Storage
src/write_outputs/write_reliability.jl Renamed reliability output from reliability.csv to Reliability.csv
src/write_outputs/write_power_balance.jl Updated time series reconstruction reference to PowerBalance (note: main output filename not changed in this file)
src/write_outputs/write_power.jl Updated temporal data output from power to Power
src/write_outputs/write_nse.jl Renamed non-served energy output from nse.csv to NSE.csv for full mode
src/write_outputs/write_emissions.jl Renamed emissions output from emissions.csv to Emissions.csv
src/write_outputs/write_curtailment.jl Updated temporal data output from curtailment to Curtailment
src/write_outputs/write_costs.jl Renamed costs output from costs.csv to Costs.csv
src/write_outputs/write_charge.jl Updated temporal data output from charge to Charge
src/write_outputs/write_capacityfactor.jl Renamed capacity factor outputs from capacityfactor.csv to CapacityFactor.csv and fusion_net_capacity_factor.csv to FusionNetCapacityFactor.csv
src/write_outputs/write_capacity.jl Renamed capacity output from capacity.csv to Capacity.csv
src/write_outputs/ucommit/write_ucommit.jl Updated unit commitment outputs from start, commit, shutdown to Start, Commit, Shutdown
src/write_outputs/transmission/write_transmission_losses.jl Renamed transmission losses from tlosses.csv to TLosses.csv
src/write_outputs/transmission/write_transmission_flows.jl Renamed transmission flows from flow.csv to Flow.csv
src/write_outputs/transmission/write_nw_expansion.jl Renamed network expansion from network_expansion.csv to NetworkExpansion.csv
src/write_outputs/reserves/write_rsv.jl Renamed reserves output from reserves.csv to Reserves.csv
src/write_outputs/reserves/write_reg.jl Renamed regulation reserves from reg.csv to Reg.csv
src/write_outputs/min_max_capacity_requirement/write_minimum_capacity_requirement.jl Renamed from MinCapReq_prices_and_penalties.csv to MinCapReqPricesAndPenalties.csv
src/write_outputs/min_max_capacity_requirement/write_maximum_capacity_requirement.jl Renamed from MaxCapReq_prices_and_penalties.csv to MaxCapReqPricesAndPenalties.csv
src/write_outputs/capacity_reserve_margin/write_reserve_margin.jl Contains critical bugs: Attempted to rename from ReserveMargin.csv to ReserveMarginPricec.csv but introduced typos in variable names
CHANGELOG.md Added entry documenting the naming convention fix

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

end
dfResMar = DataFrame(temp_ResMar, :auto)
CSV.write(joinpath(path, "ReserveMargin.csv"), dfResMar)
dfResMarPricec = DataFrame(temp_ResMar_Pricec, :auto)
Copy link

Copilot AI Nov 24, 2025

Choose a reason for hiding this comment

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

Typo in variable name: temp_ResMar_Pricec should be temp_ResMar_Prices. The variable is defined as temp_ResMar_Prices on lines 2 and 4, but referenced incorrectly here with a 'c' at the end instead of 's'.

Suggested change
dfResMarPricec = DataFrame(temp_ResMar_Pricec, :auto)
dfResMarPricec = DataFrame(temp_ResMar_Prices, :auto)

Copilot uses AI. Check for mistakes.
Comment on lines +6 to +7
dfResMarPricec = DataFrame(temp_ResMar_Pricec, :auto)
CSV.write(joinpath(path, "ReserveMarginPricec.csv"), dfResMarPricec)
Copy link

Copilot AI Nov 24, 2025

Choose a reason for hiding this comment

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

Typo in both variable name and filename: dfResMarPricec should be dfResMarPrices, and filename should be ReserveMarginPrices.csv (not ReserveMarginPricec.csv). The variable is defined as temp_ResMar_Prices on lines 2 and 4, but here both the DataFrame variable name and the output filename have incorrect 'c' instead of 's' at the end.

Suggested change
dfResMarPricec = DataFrame(temp_ResMar_Pricec, :auto)
CSV.write(joinpath(path, "ReserveMarginPricec.csv"), dfResMarPricec)
dfResMarPrices = DataFrame(temp_ResMar_Prices, :auto)
CSV.write(joinpath(path, "ReserveMarginPrices.csv"), dfResMarPrices)

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Naming conventions for output files

1 participant