Feature post feedback for the occupancy #181 #191

Merged
merged 40 commits into from Jul 24, 2016

Projects

None yet

2 participants

@pietercolpaert
Member
pietercolpaert commented Jul 15, 2016 edited

The first feature to be able to add an occupancy score is to be able to receive and store feedback. See also issue #181

To do before this pull request can be merged:

  • Fix style
  • Add RDFa tags in the HTML pages of the terms. The RDFa tags should contain an rdfs:label and rdfs:comment. Furthermore, it would be cool if it would also be linked to an image file that can be used. Fixes #187
  • The README.md should be enhanced with how to optionally set up mongodb, configure it and thus add occupancy support.
  • Make sure that when the rate limit is hit, the HTTP error code will be 429 Too Many Requests
  • On successful POST, a 201 created should be returned. The Location header should then redirect the user to an overview of the processed feedback (e.g., we could redirect them to a vehicle request?), not a 200.
  • Need to add validation before POST request to see whether the data is put in the right format (let's be forgiving here)
  • Make MongoDB connection string configurable through dotenv?
StanCallewaert and others added some commits Jul 14, 2016
@StanCallewaert StanCallewaert Post request to /feedback/occupancy with vehicle, from, to and occupa…
…ncy variables. Information is logged. One can not do more than one post request in one minute.
739b577
@StanCallewaert StanCallewaert Finish feedback-post
cb1dc0a
@pietercolpaert pietercolpaert Merge branch 'development' of https://github.com/StanCallewaert/iRail
…into feature-postfeedback
6da0b0a
@pietercolpaert @StyleCIBot pietercolpaert Applied fixes from StyleCI 9b2a37b
@pietercolpaert pietercolpaert Merge pull request #190 from iRail/analysis-8KovpD
Applied fixes from StyleCI
baef971
@pietercolpaert pietercolpaert Tabs to spaces 2f25c2f
@StanCallewaert StanCallewaert When a second request to the POST of occupancy is made, a "429 Too Ma…
…ny Requests" will be returned.

If the request is succesful however a "201 created" will be returned and the user will be redirected to the GET vehicle he posted to.
9d71de1
StanCallewaert and others added some commits Jul 18, 2016
@StanCallewaert StanCallewaert Merge branch 'feature-postfeedback' of https://github.com/iRail/iRail
…into feature/postfeedback

# Conflicts:
#	api/.htaccess
#	api/APIPost.php
6014324
@pietercolpaert pietercolpaert Merge pull request #194 from StanCallewaert/feature/postfeedback
Feedback post request done except for RDFa
553fc1d
@pietercolpaert @StyleCIBot pietercolpaert Applied fixes from StyleCI
0b35bb6
@pietercolpaert pietercolpaert Merge pull request #195 from iRail/analysis-8wOmoN
Applied fixes from StyleCI
f4f26b5
@StanCallewaert StanCallewaert Add 405 when GET request to the occupancy feedback URL is done. 7279fc2
@StanCallewaert StanCallewaert Changed scope, from now on structure is the table that combines the n…
…mbs and survey data. The README.md file changed for this reason.
695a616
@StanCallewaert StanCallewaert Typo: structure needs to be structural cc8e954
@StanCallewaert StanCallewaert Should have changed the name of the table too (another typo). e8c048f
@pietercolpaert pietercolpaert Merge pull request #196 from StanCallewaert/feature/postfeedback
Add 405 when GET request to the occupancy feedback URL is done
90f1fde
@StanCallewaert StanCallewaert Feedback will be posted to the feedback and occupancy table. 6163ac6
@pietercolpaert pietercolpaert Merge pull request #198 from StanCallewaert/feature/postfeedback
Post data pushed to the feedback and occupancy table
c1c26c6
@pietercolpaert @StyleCIBot pietercolpaert Applied fixes from StyleCI
9f8f870
@pietercolpaert pietercolpaert Merge pull request #201 from iRail/analysis-zYO7WA
Applied fixes from StyleCI
2f96845
@pietercolpaert pietercolpaert Fix README.md aa85726
@pietercolpaert pietercolpaert Fixed RDFa in #191
a346083
@StanCallewaert StanCallewaert Check if the URI of the occupancy of the POST-request exists 8fadc6a
@StanCallewaert StanCallewaert Created environment configuration file for mongodb. 627c79c
@StanCallewaert StanCallewaert Changed README.md for MongoDB enviroment variables setup. e891209
pietercolpaert added some commits Jul 22, 2016
@pietercolpaert pietercolpaert Merge pull request #205 from StanCallewaert/feature/postfeedback
Enviroment config file and validation occupancy URI
6da6cc5
@pietercolpaert @StyleCIBot pietercolpaert Applied fixes from StyleCI
5e5d318
@pietercolpaert pietercolpaert Merge pull request #206 from iRail/analysis-Xa69xB
Applied fixes from StyleCI
cc92edc
@pietercolpaert pietercolpaert spitsgids to occupancy, fix syntax error, added mongodb name to env a…
…nd first fix for connection URI
b90f339
@pietercolpaert @StyleCIBot pietercolpaert Applied fixes from StyleCI
45331ef
@pietercolpaert pietercolpaert Merge pull request #207 from iRail/analysis-8Q3Ay3
Applied fixes from StyleCI
4060acb
@pietercolpaert
Member

@StanCallewaert a last (I hope) task that needs to be done: when a trip crosses midnight, it's the service date that needs to be added of the previous day. I don't know whether it's a good rule to say that everything before 4am is from the previous day... When checking out our development server over here - http://analytics.spitsgids.be/connections/?departureTime=2016-07-22T06:00 - it seems to be quite random and I'm starting to doubt whether there is a bug in our GTFS files...

  • URI for connections after midnight need to have the service day as date and not the date of the connection itself
@pietercolpaert
Member
pietercolpaert commented Jul 23, 2016 edited
  • Can we put .env in the root directory instead of the api directory? Makes more sense
pietercolpaert added some commits Jul 24, 2016
@pietercolpaert pietercolpaert Merge pull request #211 from StanCallewaert/feature/postfeedback
Changed to new id and .env changed to root directory
ee0b655
@pietercolpaert @StyleCIBot pietercolpaert Applied fixes from StyleCI
d111711
@pietercolpaert pietercolpaert Merge pull request #212 from iRail/analysis-qo7PkN
Applied fixes from StyleCI
6fda525
@pietercolpaert pietercolpaert merged commit b1056e2 into development Jul 24, 2016

2 checks passed

continuous-integration/styleci/pr The StyleCI analysis has passed
Details
continuous-integration/styleci/push The StyleCI analysis has passed
Details
@pietercolpaert pietercolpaert deleted the feature-postfeedback branch Jul 24, 2016
@pietercolpaert
Member

Still many things to be fixed, but I'll create issues for these

@Haroenv Haroenv added a commit to Haroenv/iRail that referenced this pull request Aug 15, 2016
@Haroenv Haroenv add RDFa to unknown à la #191 432ae7f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment