-
Notifications
You must be signed in to change notification settings - Fork 113
File reading function moved to new parent class & pathlib support #348
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
Conversation
`BaseReader.read_from_location` returns an iterable for lines in file. | File format | ASCII | Binary | Skeleton? | BaseReader implemented | | ----------- | ----- | ------ | --------- | ------------------------- | | `amf` | xml | | x | x | | `dxf` | x | x | x | x | | `las` | | x | x | x | | `obj` | x | | | x | | `off` | x | | | x | | `ply` | x | x | | For ASCII | | `stl` | x | x | | Not yet | | `urdef` | xml | | | Not yet | | `xml` | x | | | Needs whole file to parse?| | `xml_cli` | x | | | Needs whole file to parse?|
|
I will look into adding the same functionality for binary files, either keep this PR open until that is done or merge this and I'll submit a new PR later on. Questions
|
moved into corresponding modules instead of keeping them in separate files
Small spelling mistake in docstring
|
I updated questions in above comment. :) |
updated docstring of 3 plane intersection
Licini
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
My thoughts on questions : )
|
There's usually checks in the different modules, e.g. |
That's should be fine then, as long as user be informed the reason of breaking |
Update `Frame`, `Transformation`
|
Per IRL discussion with @brgcode, binary ply has not been implemented, so that test will be commented out. The code needs to be cleaned up, travis errors fixed but it's slowly getting there. |
`BaseReader.read_from_location` returns an iterable for lines in file. | File format | ASCII | Binary | Skeleton? | BaseReader implemented | | ----------- | ----- | ------ | --------- | ------------------------- | | `amf` | xml | | x | x | | `dxf` | x | x | x | x | | `las` | | x | x | x | | `obj` | x | | | x | | `off` | x | | | x | | `ply` | x | x | | For ASCII | | `stl` | x | x | | Not yet | | `urdef` | xml | | | Not yet | | `xml` | x | | | Needs whole file to parse?| | `xml_cli` | x | | | Needs whole file to parse?|
|
Oh and sorry about the amount of commits. Didn’t know a rebase would show up like that on GitHub. I’ll merge next time. |
|
@gonzalocasas can we merge this? |
|
@gonzalocasas, @brgcode |
gonzalocasas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to review this in detail, but the rebase thing gets a lot in the way. There are a few things that are not clear to me, some naming things that should change before merging, the removal of tests, and other remarks; but really, the length of the current PR makes it tricky to review. If merging master back into this branch does not get rid of all the spurious diffs, then I would suggest you create a new clean branch, and cherry pick your changes on top of a clean status.
| header = next(self.content) | ||
| if not header.lower() == 'off': | ||
| return | ||
| raise Exception('Import failed') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import failed is not very clear, we're not really importing, we're opening files (which will then might be imported into something), so I would be more explicit and limited to this module's functionality in the error message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to #418.
|
I’ll open a fresh one (and go through the comments). |
|
I replied to some. The ones I didn’t reply to I agree to completly. I’ll move over your comments to new PR. Thanks for reviewing. |
tetov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All unresolved issues moved to #418.
BaseReader.read_from_locationreturns an iterable for lines in file.amfdxflasobjoffplystlurdfxmlxml_cliWhat type of change is this?
Checklist
CHANGELOG.mdfile in theUnreleasedsection under the most fitting heading:Added,Changed,Removed.invoke test).compas.datastructures.Mesh.