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

Routes pre-packaged to App at Build Time #316

Merged
merged 30 commits into from
May 24, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
31e3685
#301: created stub project for pat track's static tasks
epicstar Dec 11, 2016
36480ce
Merge remote-tracking branch 'origin/default' into feature/staticRoutes
epicstar Dec 11, 2016
48a5f7f
#301: add gt-shapefile to repo as maven dependency
epicstar Dec 11, 2016
5be073f
#301: move versions of kotlin and geotools to build.gradle root
epicstar Dec 11, 2016
8ed51d5
#301: add junit to tests
epicstar Dec 11, 2016
96c1f63
#301: add route lines to project
epicstar Dec 28, 2016
a8ee440
#301: change how kotlin dependency works in project
epicstar Dec 28, 2016
f76b96e
#301: fix build
epicstar Dec 28, 2016
d61107f
#301: move gradle repositories to top level gradle.build
epicstar Jan 15, 2017
2e7fdcd
#301: create helper function to investigate consuming Port Authority …
epicstar Feb 5, 2017
e19876e
#301: add shapefilereader-1.0, add unit tests
epicstar Feb 26, 2017
b2dfe95
merge with default branch
epicstar Mar 1, 2017
ad7de70
merge with default branch
epicstar Mar 1, 2017
94e18fa
Merge branch 'default' into feature/staticRoutes
epicstar Mar 4, 2017
158317e
move views and models into its own module
epicstar Mar 4, 2017
1e2860e
add rest of moved classes to module
epicstar Mar 4, 2017
12bc454
remove unneeded files kotlin files, fix app build
epicstar Mar 5, 2017
21970f0
#309, #301: move truetime API url as a secrets property, now can get …
epicstar Mar 11, 2017
df59a8a
improve gitignore to not include cache in assets folder
epicstar Mar 11, 2017
9306617
update retrolambda to latest versions
epicstar Mar 27, 2017
1519ab3
#309, #301: patterns now in abstractdatamanager, wrap AssetManager un…
epicstar Mar 27, 2017
6551b20
#309, #301: remove dependencies on shapefilereader
epicstar Mar 27, 2017
5b9937d
#309, #301: remove more shapefilereader files
epicstar Mar 27, 2017
3cd37cd
added symlink to testFiles again
epicstar Mar 27, 2017
1b698c8
remove unneeded test file
epicstar Apr 1, 2017
1e8aa5b
remove unneeded downloadutils static methods
epicstar Apr 1, 2017
abe600c
remove deprecation warning by changing HttpException to be from retro…
epicstar Apr 1, 2017
4afe264
#301: makes sure patterns are now getting data from disk or prepackag…
epicstar Apr 1, 2017
a3a5194
#301: wrapper around assetmanager now correctly gets prepackaged data…
epicstar Apr 1, 2017
4ba567d
#301: Rename SourceOfTruth to StaticData
epicstar May 24, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
.gradle
*.iml
/.idea/*
*assets/cache
.DS_Store
/app/.DS_Store
apks/
/app/apks
/app/src/debug/res/values/google_maps_api.xml
/app/src/release/res/values/google_maps_api.xml
/app/build/
/build/
build/
/local.properties
/captures
/secrets.properties
/secrets.properties
10 changes: 3 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ apply plugin: 'com.github.ben-manes.versions'

android.buildTypes.each { type ->
type.buildConfigField 'String', 'PAT_API_KEY', keys.truetime.release // variable defined in `../build.gradle`
type.buildConfigField 'String', "PAT_API_BASE_URL", "\"${baseUrls.truetime}\""
}

android {
Expand Down Expand Up @@ -48,6 +49,8 @@ repositories {

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile project(path: ':pat-static')

repositories {
mavenCentral()
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
Expand All @@ -70,13 +73,6 @@ dependencies {
compile "io.reactivex:rxandroid:${versions.rx.java}"
compile "io.reactivex:rxjava:${versions.rx.java}"
compile "com.github.pwittchen:reactivenetwork:${versions.rx.network}"

compile "com.squareup.retrofit2:retrofit:${versions.square.retrofit}"
compile "com.squareup.retrofit2:converter-gson:${versions.square.retrofit}"
compile "com.squareup.retrofit2:adapter-rxjava:${versions.square.retrofit}"
compile "org.glassfish:javax.annotation:${versions.java.annotation}"
compile "com.squareup.okhttp3:okhttp:${versions.square.okHttp}"

compile "com.jakewharton.timber:timber:${versions.square.timber}"

debugCompile "com.squareup.leakcanary:leakcanary-android:${versions.square.leakCanary}"
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
package rectangledbmi.com.pittsburghrealtimetracker.patterns;

import com.google.android.gms.maps.model.LatLng;
import com.rectanglel.patstatic.patterns.polylines.PolylineView;
import com.rectanglel.patstatic.patterns.response.Ptr;

import java.util.List;

import rectangledbmi.com.pittsburghrealtimetracker.patterns.polylines.PolylineView;
import rectangledbmi.com.pittsburghrealtimetracker.patterns.response.Ptr;

/**
* <p>Data Transfer Object that transfers meta info for {@link com.google.android.gms.maps.model.Polyline}
* creation from the {@link rectangledbmi.com.pittsburghrealtimetracker.patterns.PatternViewModel}
* creation from the {@link PatternViewModel}
* to the {@link PolylineView}.</p>
*
* <p>The contract of this class should be that if {@link #isSelected()} is `false`, {@link #getPatterns()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,26 @@
import java.util.Map;
import java.util.Set;

import rectangledbmi.com.pittsburghrealtimetracker.model.PatApiService;
import rectangledbmi.com.pittsburghrealtimetracker.patterns.response.Pt;
import rectangledbmi.com.pittsburghrealtimetracker.patterns.response.Ptr;
import com.rectanglel.patstatic.model.PatApiService;
import com.rectanglel.patstatic.patterns.polylines.PolylineView;
import com.rectanglel.patstatic.patterns.response.Pt;
import com.rectanglel.patstatic.patterns.response.Ptr;
import com.rectanglel.patstatic.patterns.stops.StopView;
import rectangledbmi.com.pittsburghrealtimetracker.patterns.stops.either.EitherStopState;
import rectangledbmi.com.pittsburghrealtimetracker.patterns.stops.either.MapState;
import rectangledbmi.com.pittsburghrealtimetracker.patterns.stops.rendering.StopRenderRequest;
import rectangledbmi.com.pittsburghrealtimetracker.patterns.stops.selection.StopRenderState;
import rectangledbmi.com.pittsburghrealtimetracker.patterns.stops.rendering.StopRequestAccumulator;
import rectangledbmi.com.pittsburghrealtimetracker.patterns.stops.selection.StopSelection;

import rectangledbmi.com.pittsburghrealtimetracker.patterns.stops.either.MapState;
import rectangledbmi.com.pittsburghrealtimetracker.patterns.stops.either.FullStopSelectionState;

import rectangledbmi.com.pittsburghrealtimetracker.patterns.stops.StopRenderState;
import rectangledbmi.com.pittsburghrealtimetracker.patterns.stops.StopSelection;
import rectangledbmi.com.pittsburghrealtimetracker.selection.Route;
import rx.Observable;
import timber.log.Timber;

/**
* <p>Contains the logic of the {@link rectangledbmi.com.pittsburghrealtimetracker.patterns.polylines.PolylineView} for pre-processing the patternSelections.</p>
* <p>Contains the logic of the {@link PolylineView} for pre-processing the patternSelections.</p>
* <p>Created by epicstar on 7/18/16.</p>
*
* @author Jeremy Jao
Expand Down Expand Up @@ -76,7 +80,7 @@ private static Observable<PatternSelection> createPatternSelection(PatApiService
}

/**
* <p>Gets an observable so the {@link rectangledbmi.com.pittsburghrealtimetracker.patterns.polylines.PolylineView} can listen to actions to create, show,
* <p>Gets an observable so the {@link PolylineView} can listen to actions to create, show,
* or make a {@link com.google.android.gms.maps.model.Polyline} disappear.</p>
* <p>{@link PatternSelection#getPatterns()} will be `null` if {@link PatternSelection#isSelected()}
* is `false`. Otherwise, it will be not be `null` unless the polyline data was unable to </p>
Expand Down Expand Up @@ -104,7 +108,7 @@ public Observable<PatternSelection> getPatternSelections() {
}

/**
* <p>Gets an observable so the {@link rectangledbmi.com.pittsburghrealtimetracker.patterns.stops.StopView} only needs
* <p>Gets an observable so the {@link StopView} only needs
* to implement an {@link rx.Observer} can listen to changes to the state of visible stops.</p>
* <p>Internally, this will store state changes to map camera and selection changes such that
* the only items being emitted will be whether or not a stop will show or not.</p>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package rectangledbmi.com.pittsburghrealtimetracker.patterns.stops.selection;
package rectangledbmi.com.pittsburghrealtimetracker.patterns.stops;

import rectangledbmi.com.pittsburghrealtimetracker.patterns.response.Pt;
import com.rectanglel.patstatic.patterns.response.Pt;

/**
* <p>Rendering info for holding selection states for stops</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package rectangledbmi.com.pittsburghrealtimetracker.patterns.stops.selection;
package rectangledbmi.com.pittsburghrealtimetracker.patterns.stops;

import java.util.Collection;
import com.rectanglel.patstatic.patterns.response.Pt;

import rectangledbmi.com.pittsburghrealtimetracker.patterns.response.Pt;
import java.util.Collection;

/**
* <p>Immediate selection info for getStopRenderRequests.</p>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package rectangledbmi.com.pittsburghrealtimetracker.patterns.stops.either;

import rectangledbmi.com.pittsburghrealtimetracker.patterns.PatternViewModel;
import rx.Observable;

/**
* <p>Workaround for emitting a zoom or selection state from {@link rx.Observable#merge(Iterable)}
* in {@link rectangledbmi.com.pittsburghrealtimetracker.patterns.PatternViewModel#getStopRenderRequests(Observable)}</p>
* in {@link PatternViewModel#getStopRenderRequests(Observable)}</p>
* <p>Created by epicstar on 10/9/16.</p>
*
* @param <T> the class type that is encapsulated in this interface
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package rectangledbmi.com.pittsburghrealtimetracker.patterns.stops.either;


import java.util.HashMap;
import java.util.Map;

import rectangledbmi.com.pittsburghrealtimetracker.patterns.stops.selection.StopRenderState;
import rectangledbmi.com.pittsburghrealtimetracker.patterns.stops.StopRenderState;

/**
* <p>DTO for the full selection state for stops.</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package rectangledbmi.com.pittsburghrealtimetracker.patterns.stops.rendering;

import rectangledbmi.com.pittsburghrealtimetracker.patterns.response.Pt;
import com.rectanglel.patstatic.patterns.response.Pt;

/**
* <p>Rendering info for getStopRenderRequests</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@

import rectangledbmi.com.pittsburghrealtimetracker.patterns.stops.either.FullStopSelectionState;
import rectangledbmi.com.pittsburghrealtimetracker.patterns.stops.either.MapState;
import rx.Observable;

/**
* <p>DTO for {@link rectangledbmi.com.pittsburghrealtimetracker.patterns.PatternViewModel#getStopRenderRequests(Observable)}
* <p>DTO for a pattern view model
* to store the selection state, map state, and immediate changes for stop visibility.</p>
* <p>Created by epicstar on 10/8/16.</p>
* @author Jeremy Jao
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
import java.util.HashSet;
import java.util.concurrent.TimeUnit;

import rectangledbmi.com.pittsburghrealtimetracker.model.PatApiService;
import rectangledbmi.com.pittsburghrealtimetracker.patterns.response.Pt;
import rectangledbmi.com.pittsburghrealtimetracker.vehicles.response.Vehicle;
import com.rectanglel.patstatic.model.PatApiService;
import com.rectanglel.patstatic.patterns.response.Pt;
import com.rectanglel.patstatic.predictions.PredictionsType;
import com.rectanglel.patstatic.vehicles.response.Vehicle;

import rx.Single;
import timber.log.Timber;

Expand Down
Loading