NREL / mappymatch

Pure-python package for map matching
http://mappymatch.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
57 stars 19 forks source link

Moving function into class method. #152

Closed Rowlando13 closed 1 year ago

Rowlando13 commented 1 year ago

Add examples and cleanup inconsistencies in code base.

Rowlando13 commented 1 year ago

I am going through will the goal of making our examples repository more robust. @nreinicke I came upon a design pattern that seemed inconsistent but did not want to change and deprecate without input. The geofence_from_trace function seems like it should be a class method and that the Geofence class should be a full class instead of a named tuple. For example the Trace class has a lot of .from.. methods to help with its creation from a bunch of formats.

nreinicke commented 1 year ago

@Rowlando13 - sorry for the late reply but I agree with your idea of moving the geofence_from_trace method into a class method on the Geofence class. I also like the idea of making the Geofence a generic class since it really doesn't need to inherit from a NamedTuple.

Rowlando13 commented 1 year ago

No worries on the time delay. I did not work on anything for 6 weeks when I was busy. Life happens. Sounds good to me.

Rowlando13 commented 1 year ago

Moved functions into class methods. Made constants in UPPER_CASE. Updated docs. Finally got some time and finished this. The docs are a lot better. Did not get to the examples but will do that on another branch.

Rowlando13 commented 1 year ago

@nreinicke . Finally ready for review.

Rowlando13 commented 1 year ago

Also, I have a pypi account and the packaging is setup for another release. So if you give me permissions, I will release it on pypi.