Repository navigation
Pre-publication polish: usable step-by-step pipeline, GridStudio docs, Apache-2.0 - #3
Merged
Merged
Conversation
…ADME.md docs/_build/ (70 files of Sphinx HTML) and output/ were committed even though they are build products; they are now untracked and output/ is ignored. The files stay on disk. readme.md is renamed to README.md because pyproject.toml points at README.md, so packages built on a case-sensitive file system had an empty long description. The content is unchanged in this commit. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ty control Step-by-step use of the transmission pipeline silently produced a grid with no generators and no loads unless the caller copied each stage's result onto the graph by hand. The stages now do that themselves: - BusTypeAllocator.allocate(), CapacityAllocator.allocate(), LoadAllocator.allocate() / allocate_reactive() and GenerationDispatcher.dispatch() write bus_type, pg_max, pl, ql and pg to the graph as well as returning them (update_graph=False keeps the old return-only behaviour). - A stage that needs an attribute no node has raises a ValueError naming the stage to run first, instead of returning an empty result. Distribution feeders overshot the requested totals because negative shares were redrawn without renormalising (median 1.7x the requested load at 200 nodes). Shares are now rescaled so loads sum to total_load_mw and generation to total_gen_mw; match_totals=False gives the earlier values. Topology for a given seed is unchanged. Progress messages go through the "powergrid_synth" logger instead of print. synthesize() and synthesize_distribution() take verbose=False, and powergrid_synth.set_verbosity() sets the level for the package. Also: - Unknown export formats and a missing pandapower are reported before the pipeline runs, not after. - synthesize(export_formats=None) writes no files. - Reference mode stores base_kv_map on the graph so a later export matches the one synthesize() makes. - Missing-dependency errors give an install command that works (the package is not on PyPI). - SchweetzerFeederGenerator is renamed SchweitzerFeederGenerator; the old name still works with a DeprecationWarning. - __version__ is 0.2.0. tests/test_usability.py covers the new behaviour (28 tests). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…licence README: rewritten around a working install command, a description of the attributes on the returned graphs, and step-by-step examples that produce a complete grid. UCTE is dropped from the export formats (pypowsybl's writer needs UCTE node codes and fails on synthetic grids), AC power-flow convergence is stated as not guaranteed, and the two references with non-resolving DOIs / wrong journal are corrected. Docs: titles, links and Colab URLs point at mshyang/GridStudio; the non-existent `pip install powergridsynth` is removed; broken :doc: references and a stale autodoc entry are fixed. Examples: repository URLs and the renamed feeder generator class are updated in the notebooks; nothing else in them changes. Packaging: licence is Apache-2.0 with a LICENSE file (the README said MIT with no file to back it); the version is read from powergrid_synth.__version__; the [export] extra gains xlsxwriter and openpyxl, without which Excel export failed; project URLs, keywords and classifiers are filled in. The import and distribution name stay powergrid_synth. CI: checkout and setup-python actions moved to current major versions. CHANGELOG.md records the 0.2.0 changes. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
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.
Pre-publication pass over usability and clarity. The import and distribution name stay
powergrid_synth; the project is presented as GridStudio.The three commits are separable and easier to read one at a time. The first is almost entirely the removal of 70 built documentation files.
What changes for users
Step-by-step pipeline now produces a complete grid. Before, each stage returned a dict and the caller had to copy it onto the graph with
networkx.set_node_attributes. Skipping that gave a grid with no generators and no loads, with no error. Now:BusTypeAllocator.allocate(),CapacityAllocator.allocate(),LoadAllocator.allocate(),LoadAllocator.allocate_reactive()andGenerationDispatcher.dispatch()storebus_type,pg_max,pl,qlandpgon the graph and still return them.update_graph=Falserestores return-only behaviour.ValueErrorthat names the stage to run first.Distribution feeders meet the requested totals. Negative shares were redrawn without renormalising, so loads overshot the request (median 1.7 times
total_load_mwat 200 nodes with default parameters). Shares are now rescaled. Power values for a given seed change; topology does not.match_totals=Falsegives the earlier values.Output is controllable. Messages go through the
powergrid_synthlogger.synthesize()andsynthesize_distribution()acceptverbose=False, andpowergrid_synth.set_verbosity("silent" | "warning" | "info" | "debug")sets the package level. Per-iteration detail moved todebug.Smaller fixes
synthesize(export_formats=None)writes no files.base_kv_mapon the graph, so a later export matches the onesynthesize()makes.[export]extra (xlsxwriterandopenpyxlwere missing).SchweetzerFeederGeneratoris renamedSchweitzerFeederGenerator; the old name still works and warns.Docs, examples and packaging
mshyang/GridStudio; the instruction topip install powergridsynth(no such package) is gone; broken:doc:references fixed.LICENSEfile. The README said MIT and there was no licence file.powergrid_synth.__version__(now 0.2.0);readme.mdrenamedREADME.mdso built packages get a long description on case-sensitive file systems.docs/_build/andoutput/are no longer tracked.CHANGELOG.mdadded.Verification
[export]): 214 pass, 5 skipped.README.mdanddocs/README.mdwere executed.License-Expression: Apache-2.0and theLICENSEfile.Not done, for the reviewer to weigh
pegase9241_test,rte7k_from_source_file(and their Colab copies) and thegrid2graphnotebook. Their only edits are URLs and the class rename.LICENSEis the unmodified Apache text with no copyright line and there is noNOTICE;authorsis not set inpyproject.toml. The package description no longer says it is maintained by the AI Energy Lab at TU Delft, while the docs home page still mentions LF Energy and AI-EFFECT.synthesize()still writesoutput/synthetic_grid.jsonby default.demos/is listed in.gitignorebut tracked; the RTE andgrid2graphnotebooks are 10 to 20 MB each. Neither is touched here.🤖 Generated with Claude Code