Skip to content

LibDoc Model Version3 - #3720

Merged
mkorpela merged 8 commits into
masterfrom
topic/libdoc_model
Oct 20, 2020
Merged

mkorpela merged 8 commits into
masterfrom
topic/libdoc_model

Conversation

@Snooz82

@Snooz82 Snooz82 commented Oct 18, 2020

Copy link
Copy Markdown
Member

No description provided.

Comment thread atest/robot/libdoc/invalid_usage.robot Resolved
Comment thread src/robot/libdocpkg/model.py Resolved
Comment thread src/robot/libdocpkg/specbuilder.py Resolved
Comment thread src/robot/libdocpkg/xmlwriter.py Resolved
@Snooz82
Snooz82 force-pushed the topic/libdoc_model branch from 74981bf to 3ada45c Compare October 19, 2020 20:05
@Snooz82
Snooz82 marked this pull request as ready for review October 19, 2020 20:07
@Snooz82

Snooz82 commented Oct 19, 2020

Copy link
Copy Markdown
Member Author

@pekkaklarck
That one should now be ready for review.

JSON Ex/Import and JSONSpec will be done in separate task.

Also the "removal" of the enum values and the real datatype will be a separate task.

@pekkaklarck pekkaklarck left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks great! Most of the comments are about style and I was about to merge the code as-is. Noticed a bug in reading type information from specs in the end so at least the needs to be still fixed.

Comment thread atest/robot/libdoc/LibDocLib.py Resolved
Comment thread atest/robot/libdoc/html_output.robot Resolved
Comment thread atest/robot/libdoc/invalid_usage.robot Resolved
Comment thread src/robot/libdocpkg/consoleviewer.py Resolved
Comment thread src/robot/libdocpkg/model.py Resolved
Comment thread src/robot/libdocpkg/specbuilder.py Resolved
Comment thread src/robot/libdocpkg/specbuilder.py Resolved
Comment thread src/robot/libdocpkg/specbuilder.py Resolved
@mkorpela

Copy link
Copy Markdown
Member

Done and will work on top this.

@mkorpela
mkorpela merged commit bd29c77 into master Oct 20, 2020
'kind': a.kind,
'required': a.required,
'repr': unicode(a)
} for a in self.args]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

In my earlier comment I meant that _convert_arguments could be removed and the list comprehension it contained could be just used where it was called. _arg_to_dict was fine as it was. Sorry for not being clear about that. Good thing is that the code is fine like this as well.

type_elem = arg.find('type')
if type_elem is not None:
if not spec.types:
spec.types = {}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It occurred to me that this if could be avoided by using spec = ArgumentSpec(types={}) earlier.

if type_elem is not None:
if not spec.types:
spec.types = {}
spec.types[name] = type_elem.text

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Great that the bug with setting type info is fixed. It would have been good to add a test validating the fix as well but I assume you are going to add more round-trip tests in the future.

@Snooz82
Snooz82 deleted the topic/libdoc_model branch October 20, 2020 20:07
vokiput pushed a commit to vokiput/robotframework that referenced this pull request Dec 27, 2020
* model changed, xmlwriter, htmlwriter, specbuilder use argspec

* added/fixed atest mostly

* fixed review comments

* fixed atest

* fixed dictionary order

* added all atests, added javabuilder

* final switched Libdoc to Version 3 formats

* final review fix
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.

3 participants