-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
WIP: Fix various issues with config file loading, parsing & generation #123
Draft
julianeisel
wants to merge
2
commits into
JakubAndrysek:main
Choose a base branch
from
julianeisel:temp-blender-fixes
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
Reviewer's Guide by SourceryThis pull request addresses several issues related to Doxygen configuration, XML parsing, and file handling. It improves the robustness of the config loading, parsing, and generation process by adding better error handling, input path merging, and output directory creation. Sequence diagram for XML parsing with error handlingsequenceDiagram
participant Node
participant ElementTree
participant File
Node->>ElementTree: parse(xml_file)
alt Successful parsing
ElementTree-->>Node: Return parsed XML
else ParseError
ElementTree-->>Node: Throw ParseError
Node->>File: Read file contents
File-->>Node: Return file data
Node->>ElementTree: fromstring(contents with UTF-8 replacement)
ElementTree-->>Node: Return parsed XML
end
Node->>Node: find('compounddef')
Class diagram showing Node class changesclassDiagram
class Node {
-_dirname: str
-_xml: Element
-_kind: Kind
-_visibility: Visibility
+__init__(xml_file, xml, project, parser, parent)
+_check_for_children()
+_parse_inner_into_node(refid, fallback_name)
+_check_attrs()
note for Node "Added error handling for XML parsing
and new helper method for child nodes"
}
class DoxygenRunner {
-doxygenSource: str
-tempDoxyFolder: str
-doxyConfigFile: str
+setDoxyCfg(doxyCfgNew: dict)
+merge_doxygen_input(doxyCfg: dict)
+getDoxygenRunFolder()
note for DoxygenRunner "Added input path merging
and working directory handling"
}
Flow diagram for config file loading and mergingflowchart TD
A[Start Config Loading] --> B{Has doxy-cfg-file?}
B -->|Yes| C[Load base config]
B -->|No| D[Use default config]
C --> E[Apply mandatory overrides]
D --> E
E --> F{Has src-dirs?}
F -->|Yes| G[Merge INPUT paths]
F -->|No| H[Use existing INPUT]
G --> I[Update config]
H --> I
I --> J[Set output directory]
J --> K[End Config Loading]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Includes changes proposed in !124.
I'm throwing this here for initial discussion together with !124. I'm planning to submit each fix individually (or as multiple commits).
Summary by Sourcery
Improve handling of config files and XML parsing.
New Features:
Bug Fixes:
Enhancements:
src-dirs
with the "INPUT" paths from thedoxy-cfg-file
.GENERATE_XML
,GENERATE_HTML
, andGENERATE_LATEX
in the Doxygen config.