Skip to content
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

V1 Refactor RC #327

Merged
merged 218 commits into from
Oct 28, 2024
Merged

V1 Refactor RC #327

merged 218 commits into from
Oct 28, 2024

Conversation

e-lo
Copy link
Collaborator

@e-lo e-lo commented Apr 13, 2023

This PR contains refactors, bug fixes, performance enhancement, and features for v1 of network_wrangler documented in notebook/releaseoverviewv1.ipynb including:

Features

  1. I/O and Mutation Speed
  2. Implicit and fast validation
  3. Flexible serialization formats
  4. Improved stability
  5. Selection flexibility for transit based on any feature or by link or node
  6. More flexible and fast transition to geodataframes for (almost) any data part
  7. Easy data clipping to geographic bounds
  8. Scripts for actions you might want to execute from command line (i.e. data conversion/clipping/etc)
  9. Logging + Error descriptions
  10. Additional project card types: add/delete transit
  11. Scripts to create example data from OSM...anywhere

Tech Overhead Investment

  1. Separation of causes prevents circular reference collisions, limits import bloat, and improves legibility/organization.
    • Project card functionality in project card repo
    • Separate modules for separate functionality
  2. Reliability achieved through more testable code and expanding test coverage with more test cases and also anti-patterns
    • Testable code
    • Test coverage
  3. Explicit data models that make complex data structures obvious and easy to validate
    • Legible
    • Self-documenting
    • Flexible
    • Validatable
  4. Clean code principles that make code easier to test and maintain
    • more functions that do a single thing...and do it well
    • classes that are small - functions that access or manipulate them
  5. Documentation
    • consistent and detailed functional documentation
    • consistent type hints
    • usage for modules and classes
    • overall documentation leverages the flexible and less bloated MkDocs package
  6. Removes less-well-maintained dependencies
    • Replaces Partridge with internal functionality

Speed

  1. Makes the heavy shapes.geojson optional and doesn't read it in for operations that don't directly involve it.
  2. Leverages pandera for speedy, vector-based data model validation for dataframes
  3. Replaces row-based calculations for blank geographic values with vector-based calculations
  4. Provides flexibility for I/O serialization formats that are faster – like Parquet.

@e-lo e-lo self-assigned this Apr 13, 2023
@e-lo e-lo marked this pull request as draft April 13, 2023 20:52
e-lo added 20 commits April 27, 2023 15:02
- removed project card.py
- refactored selection, graph, subnet, segment from roadway network
- refactored project changes apply from roadway network
- refactored shapes, links and nodes specs from roadway network
+ varia bug fixes
transit selection tests passing
- generalize transit property change projects to be any attribute in table
- update required link attr
- pep8
- refactor time --> timespan
…n formats

- Remove LocationReferences from required part of schema that we fill in. Jump straight to geometries.
- Make link geometry creation a vector operation —> speeds up significantly 30-100 times as fast
- Added - Accessor for link true-shapes
- Add clipping functionality for roadway and transit
- Accidentally deleted 'ref' from st paul roadway links b/c wasn't in data model even though it is used.
- Added to data model since it is a key OSM field as optional and updated example network to include it.
- Updated error checking for the dict query to make sure it is explicitly telling you the field doesn't exist in the df you are querying
Also:
- try to fix benchmarking/coverage reports #394
- Fix bug in build osm roadnet.py
Fixes #395 and tests it as well
Also:
- link to notebooks that have additional details/info
- add info about using included conda env and installing optional dependencies
- change name of quickstart to intro since it is actually fairly in depth
- include docs build as part of release and push to avoid a pull clash
- update checkout/python action versions for 4 and 5
- separate prerelease and release workflows
- prerelease workflow pushes on any main push and wont collide with versions
- fix typo referring to other repo
- make pyproject.toml dependencies recursive so tests also includes docs and viz
- using coverage.xml
@e-lo e-lo merged commit 6e87f8c into develop Oct 28, 2024
1 check passed
@e-lo e-lo deleted the selection-refactor branch October 28, 2024 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment