Skip to content

Commit

Permalink
Merge pull request #27 from naviqore/NAV-190-Document-Python-Viewer-C…
Browse files Browse the repository at this point in the history
…lient

DOC: NAV-190 - Add quick description of python viewer and client.
  • Loading branch information
munterfi authored Sep 23, 2024
2 parents 6c3e5a8 + 419ed18 commit 09d7024
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 3 deletions.
1 change: 1 addition & 0 deletions Writerside/d.tree
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
<toc-element topic="simple-raptor.md"/>
<toc-element topic="extended-raptor.md"/>
<toc-element topic="raptor-xx.md"/>
<toc-element topic="viewer-and-client.md"/>
</toc-element>
<toc-element topic="results-and-discussion.md">
<toc-element topic="deployment.md"/>
Expand Down
Binary file added Writerside/images/public_transit_viewer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion Writerside/topics/implementation/implementation.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
- [Public Transit Service](public-transit-service.md)
- [Simple RAPTOR](simple-raptor.md)
- [Extended RAPTOR](extended-raptor.md)
- [RaptorXX](raptor-xx.md)
- [RAPTOR++](raptor-xx.md)
- [Viewer and Client](viewer-and-client.md)
29 changes: 29 additions & 0 deletions Writerside/topics/implementation/viewer-and-client.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Client and Viewer

To demonstrate potential applications of our public transit service, we developed two Python packages.

## Client

The `public-transit-client` package was created to encapsulate the entire interaction with the Spring REST API, offering
pythonic functions and typed class objects for both request and response parameters. This package was built
using `poetry` and published to [PyPI](https://pypi.org/project/public-transit-client/), adhering to best practices,
including the inclusion of the `py.typed` file to support type hinting. The client is designed for both frontend
applications that integrate with the routing service and researchers who need to perform bulk routing requests directly
from Python without relying on a graphical user interface.

## Viewer

The second package, `public-transit-viewer`, is a mockup frontend application built using Streamlit, an open-source
Python framework designed for quickly building and deploying data-driven web applications with minimal effort. It
leverages the `public-transit-client` package to communicate with the Java-based public transit service. The viewer
provides a graphical interface to easily request connections and visualize results, making it useful for both
demonstration and debugging purposes. The viewer is published as image on
the [GitHub Container Registry](https://github.com/naviqore/public-transit-viewer/pkgs/container/public-transit-viewer)
for easy deployment.

![Viewer: Connections and Isolines](public_transit_viewer.png)

While Streamlit allowed us to rapidly develop the application, its limited potential for customization and linear,
non-modular code structure makes it less ideal for a fully custom, branded frontend. For projects requiring a more
powerful and customizable user interface, we would recommend using a JavaScript framework. However, given the objectives
of this study, Streamlit's simplicity and rapid development capabilities made it an adequate choice for our needs.
2 changes: 0 additions & 2 deletions Writerside/topics/interim-review.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Interim Review

# Interim Review

The interim review checks whether each team is on track with their software project:

> Is there a serious walking skeleton (architecture prototype)?
Expand Down

0 comments on commit 09d7024

Please sign in to comment.