Skip to content
This repository was archived by the owner on Jan 23, 2026. It is now read-only.

[main < T load, parse] Implement xml.load and xml.parse - #329

Merged
antoniofilipovic merged 30 commits into
mainfrom
T-add-xml-load-and-parse
Sep 7, 2023
Merged

[main < T load, parse] Implement xml.load and xml.parse#329
antoniofilipovic merged 30 commits into
mainfrom
T-add-xml-load-and-parse

Conversation

@mpintaric55334

Copy link
Copy Markdown
Contributor

Description

Please briefly explain the changes you made here.

Pull request type

  • Bugfix
  • Algorithm/Module
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

Related issues

Delete if this PR doesn't resolve any issues. Link the issue if it does.

######################################

Reviewer checklist (the reviewer checks this part)

Module/Algorithm

######################################

@antepusic antepusic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks solid and does the job, just make sure to do this:

  • change the tests to return something with a guaranteed order, not maps whose items’ ordering is not guaranteed
  • format Python code

Comment thread python/xml_module.py Outdated
Comment thread python/xml_module.py Outdated
Comment thread python/xml_module.py
Comment thread python/xml_module.py Outdated
Comment thread python/xml_module.py Outdated
Comment thread python/xml_module.py Outdated
@antepusic

antepusic commented Aug 28, 2023

Copy link
Copy Markdown
Contributor

@antoniofilipovic The tests use example XMLs from a third-party website. Thinking about reliability, I think it’s better to make our own example XMLs and host them on some Memgraph repo.

@antoniofilipovic antoniofilipovic added status: change PR reviewed - needs changes and removed status: ready PR is ready for review labels Aug 29, 2023
@mpintaric55334

Copy link
Copy Markdown
Contributor Author

@antepusic @antoniofilipovic shouldnt the map order always be same in tests?

@mpintaric55334 mpintaric55334 added status: ready PR is ready for review and removed status: change PR reviewed - needs changes labels Aug 29, 2023

@antepusic antepusic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

About map order: The map contains elements from children, whose value is taken from the ElementTree parsed by .fromstring.

result[children_name] = [
    parse_element(child, simple) for child in children
]

After checking, I think their ordering is consistent so the tests are fine in that respect.

Comment thread python/xml_module.py
@antepusic antepusic added status: discuss it PR commented - needs discussion status: change PR reviewed - needs changes and removed status: ready PR is ready for review labels Aug 30, 2023
@antoniofilipovic

Copy link
Copy Markdown
Contributor

mple XMLs from a third-party website. Thinking about reliability, I think it’s better to make our own example XMLs and host them on some Memgraph repo.

@antepusic I wouldn't do that for now. If it starts failing, we can check then.

@antoniofilipovic

Copy link
Copy Markdown
Contributor

About map order: The map contains elements from children, whose value is taken from the ElementTree parsed by .fromstring.

result[children_name] = [
    parse_element(child, simple) for child in children
]

After checking, I think their ordering is consistent so the tests are fine in that respect.

@antepusic so is PR ready to be merged or not?

@antepusic

Copy link
Copy Markdown
Contributor

It’s ready then! 🚀

@antepusic antepusic added status: ship it PR approved type: module and removed status: change PR reviewed - needs changes status: discuss it PR commented - needs discussion labels Aug 30, 2023
@mpintaric55334
mpintaric55334 force-pushed the T-add-xml-load-and-parse branch from 47d9152 to 2b310e5 Compare September 6, 2023 14:36
@antoniofilipovic
antoniofilipovic merged commit 6000bbb into main Sep 7, 2023
@antoniofilipovic
antoniofilipovic deleted the T-add-xml-load-and-parse branch September 7, 2023 10:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants