Server/Download

From Dycapo Project

Jump to: navigation, search

Contents

Dycapo v0.7.0

Download dycapo-v0.7.0.

Release Notes

2010-08-30 Daniel Graziotin <daniel DOT graziotin AT acm DOT org>

Dycapo v0.7.0 is the seventh prototype version on which we are building our Protocol. It will be the last version supporting XML-RPC.

Dycapo v0.7.0 incorporates and shows:

  • Adoption of Dycapo Protocol [1]
  • A first attempt of conversion to RESTful Dycapo Protocol (some features are still missing)
  • Integration of Dycapo models with Django models
  • Authentication system
  • Registration System
  • Password change system
  • A a Geo-location based search Algorithm
  • Geo-location methods for Persons
  • Insertion of a trip by a driver
  • Start of a trip by a driver
  • Search of a trip by a passenger
  • Send a ride request to a driver
  • Let the driver accept the ride request
  • Inform the passenger about the status of his/her request
  • Inform the
  • Let the passenger inform the system that the driver picked him/she
  • Let the passenger inform the system that the he/she arrived to destination
  • Let the driver finish a Trip
  • A full set of tests

Changes since v0.6.0

  • All XML-RPC functionalities have been separated from the server functionalitites
  • A first experiment of a RESTful implementation of the Protocol now lives in rest module.
  • Just a search method is missing

Dycapo v0.6.0

Download dycapo-v0.6.0.

Release Notes

2010-08-05 Daniel Graziotin <daniel DOT graziotin AT acm DOT org>

Dycapo v0.6.0 is the sixth prototype version on which we are building our APIs. It is a bugfix release that also includes the first complete draft of the APIs.

Dycapo v0.6.0 incorporates and shows:

  • Adoption of Dycapo Protocol [2]
  • The introduction of API [3]
  • Integration of Dycapo models with Django models
  • Authentication system
  • Registration System
  • Password change system
  • A a Geo-location based search Algorithm
  • Geo-location methods for Persons
  • Insertion of a trip by a driver
  • Start of a trip by a driver
  • Search of a trip by a passenger
  • Send a ride request to a driver
  • Let the driver accept the ride request
  • Inform the passenger about the status of his/her request
  • Inform the
  • Let the passenger inform the system that the driver picked him/she
  • Let the passenger inform the system that the he/she arrived to destination
  • Let the driver finish a Trip
  • A full set of tests


Changes since v0.5.0

IMPORTANT: Dycapo Server has just switched license. We moved from Gnu Affero Public License v3 to Apache License Version 2.0

IMPORTANT: ALL xml-rpc mehthod names have changed to more suitable names. See the APIs for more information.

accept_ride_request => acceptRide add_trip => insertTrip cancel_requested_ride => cancelRide change_password => changePassword check_requested_ride => statusRide check_ride_requests => getRides finish_ride => finishRide finish_trip => finishTrip get_position => getPosition refuse_ride_request => refuseRide register => register request_ride => requestRide search_trip => searchRide start_ride => startRide start_trip => startTrip update_position => setPosition

API will contain some suggestions on how will the methods be renamed when Dycapo Protocol will switch to a RESTful protocol

server/models/location.py

* fixed some bugs passing from Python 2.5 to Python 2.6

rider.py

* renamed to passenger.py

docs/

* Updated some Apache configurations

templates/

* Added a tiny styled webpage that welcomes user to Dycapo Server

tests/*

* Changed method names to new API names

Dycapo v0.5.0

Download dycapo-v0.5.0.

Release Notes

2010-06-10 Daniel Graziotin <daniel DOT graziotin AT acm DOT org>

Dycapo v0.5.0 is the fifth prototype version on which we are building our APIs.

Dycapo v0.5.0 incorporates and shows:

  • Adoption of Dycapo Protocol [4]
  • The introduction of API [5]
  • Integration of Dycapo models with Django models
  • Authentication system
  • Registration System
  • Password change system
  • A a Geo-location based search Algorithm
  • Geo-location methods for Persons
  • Insertion of a trip by a driver
  • Start of a trip by a driver
  • Search of a trip by a passenger
  • Send a ride request to a driver
  • Let the driver accept the ride request
  • Inform the passenger about the status of his/her request
  • Inform the
  • Let the passenger inform the system that the driver picked him/she
  • Let the passenger inform the system that the he/she arrived to destination
  • Let the driver finish a Trip
  • A full set of tests

Changes since v0.4.0

General:

  • Dycapo now requires Django 1.2.x in order to function properly, as I am using

some of the new query features of Django

  • Every xml-rpc function has been optimized in terms of query and Python code

(thanks to Davide "vad" Setti for helping in this)

  • Added lots of safety and privacy checks for all methods. Lots of.
  • Refactoring of all code, using also a dedicated branch. Many refactoring
 and optimization done.
  • Added Django 1.2.x compatibility for all models' to_xmlrpc() methods
  • Added some indexex on attributes
  • Added a new permission for user to be used for registrations.

server/response_codes.py

  • Deleted ERROR, now using just POSITIVE and NEGATIVE as responses, for
 simplicity
  • Added many other response messages

server/models/participation.py

  • Added attributes holding information on the deletion of a ride request
  • Added attributes holding information on the refusal of a ride request

server/matching.py

  • The matching algorithm now uses a single function with a single for loop

instead of three for loops.

server/driver.py

  • add_trip() is now deprecated
  • Added add_trip_exp(Trip trip) that should become add_trip() replacement
  • Tests make use of this new function
  • Added refuse_ride_request(trip, person), for refusing a passenger ride request
  • Added relative tests

server/common.py

  • get_position(person) now performs privacy checks (ie: to know the position
 of a person, the requesting person must be in an active participation with
 him/she)

tests/test_registration.py

  • New test suite, tests the registration methods

tests/test_password_change.py

  • New test suite, tests the possibility to change password method

tests/test_multiple_matching.py

  • Added another passenger to check the new introduced methods

Dycapo v0.4.0

Download dycapo-v0.4.0.

Release Notes

2010-05-22 Daniel Graziotin <daniel DOT graziotin AT acm DOT org>

Dycapo v0.4.0 is the fourth prototype version on which we are building our APIs.

Dycapo v0.4.0 incorporates and shows:

  • Adoption of Dycapo Protocol [6]
  • The introduction of API [7]
  • Integration of Dycapo models with Django models
  • Authentication system
  • A a Geo-location based search Algorithm
  • Geo-location methods for Persons
  • Insertion of a trip by a driver
  • Start of a trip by a driver
  • Search of a trip by a rider
  • Send a ride request to a driver
  • Let the driver accept the ride request
  • Let the rider inform the system that the driver picked him/she
  • Let the rider inform the system that the he/she arrived to destination
  • Let the driver finish a Trip
  • A full set of tests

Changes since v0.3.0

tests/

  • All new XML-RPC methods covered

tests/test_multiple_matching.py

  • methods to check the geolocation based algorithm of Dycapo

server/utils.py

  • Bugs fixed

server/rider.py

  • Added start_ride(trip) method, that informs the system that a Ride has

been started

  • Added finish_ride(trip) method, that informs the system that a Ride

has been finished

server/models/prefs.py

  • Overridden save() method that checks for duplicates in the Database and

saves space

server/models/mode.py

  • Added a reference to Person for checking for duplicates in the Database and

saving space

server/models/location.py

  • Added factory method get_location_from_geopy_point(point) that given a Geopy

Point, it returns the corresponding Dycapo Location object

  • Added get_box_around(diagonal_meters) method that given a diagonal, it returns

a GeoRSS box around the location

  • Added complete_fields() method that acts as a wrapper to the methods for

completing missing attributes of a Location, using geocoding

server/matching.py

  • Enhanced get_trips_destination_near_location(destination) that now uses

Location.get_box_around() to compute a dynamic delta of latitude and longitude

  • Enhanced get_trips_destination_near_location(destination) that also looks for

trips with empty seats

server/driver.py

  • Enhanced add_trip() method that now re-uses Mode objects if already present

in the Database instead of creating a new one each time

  • Fixed bugs in check_ride_requests(trip) method

Dycapo v0.3.0

Download dycapo-v0.3.0.

Release Notes

2010-05-11 Daniel Graziotin <daniel DOT graziotin AT acm DOT org>

Dycapo v0.3.0 is the third prototype version on which we are building our APIs.

Dycapo v0.3.0 incorporates and shows:

  • Adoption of Dycapo Protocol [8]
  • The introduction of API [9]
  • Integration of Dycapo models with Django models
  • Authentication system
  • Insertion of a trip by a driver
  • Start of a trip by a driver
  • Search of a trip by a rider
  • A first prototype of a Geo-location based search Algorithm
  • Geo-location methods for Persons
  • Send a ride request to a driver
  • Let the driver accept the ride request
  • Let the driver finish a Trip
  • A complete rewritten testing framework


Changes since v0.2.0

General:

  • Dycapo Protocol fully adopted
  • Code cleaner and refactored

server/utils.py

  • Code cleaner, matching functions refactored in another file

server/driver.py

  • Added finish_trip method

server/rider.py

  • search_trip re-written, using a new algorithm with functions located in

server/matching.py

server/matching.py

  • This new module holds all the matching functions of the search_trip()

geo-located algorithm

  • get_trips_destination_near_location(location) returns all the active Trips

with a destination *around* a given Location

  • exclude_trips_driver_closest_to_destination(trips, rider) excludes from a

QuerySet of Trips all the Trips in which the driver is closer to the rider to the destination

  • exclude_trips_driver_not_approaching_rider(trips, rider) excludes from a

QuerySet of Trips all the Trips in which the driver is getting away from the rider. This method uses the recent locations of the Driver and some maths functions written by myself

  • get_proximity_factor(person, position) given a person and a location, it

determines if the person is approaching it or getting away from it, by retrieving some recent locations of the person and computing their distance from the location. The set of ordered distances is then given to location_proximity_factor that retrives the factor

  • location_proximity_factor(distances) given a list of distances, it computes

the approaching factor which is a natural number in (-inf , +inf) If factor > 0, the numbers in list tend to decrease If factor == 0, the numbers in list tend to stay around the same value If factor < 0, the numbers in list tend to increase.

  • location_distance_factor(distance1, distance2) given two distances,

returns 1 if the first distance is greater than the second one. Returns -1 if the first distance is less than the second one. Returns 0 if they are equal.

server/models.py

  • this file does not exist anymore, models are now in server/models folder

server/models/participation.py

  • added locations field, to hold all the locations of each Person during a Trip

server/models/location.py

  • added distance(location) method, that returns the distance in KMs from the

current location to a given one

server/models/trip.py

  • added get_destination() method, that returns the Location representing the

destination of the Trip

  • added get_participations() method, returns all the Participations of the Trip

server/models/person.py

  • added get_recent_locations(max_results) method, returning the

last *max_results* Locations of the Person

  • added is_participating() method, that returns True if the Person is

Participating to a Trip

  • added get_active_participation() method, that returns the active Participation

of the Person, if any

  • added get_participating_trip() that returns the Trip in which the Person

is participating, if any

tests/

  • Completely rewritten testing framework, using py.test [10]
  • There are currently 26 XML-RPC tests, covering driver functions, rider

functions, simple matching and complex matchings

Dycapo v0.2.0

Download dycapo-v0.2.0.

Release Notes

2010-04-21 Daniel Graziotin <daniel DOT graziotin AT gmail DOT com>

Dycapo v0.2.0 is the second prototype version on which we are beginning to build our APIs.

Dycapo v0.2.0 incorporates and shows:

  • Adoption of Dycapo Protocol [11]
  • The introduction of API [12]
  • Integration of Dycapo models with Django models
  • Authentication system
  • Insertion of a trip by a driver
  • Start of a trip by a driver
  • Search of a trip by a rider
  • Send a ride request to a driver
  • Let the driver accept the ride request
  • Geolocation methods of Persons
  • A complete testing framework

Changes since v0.1.0

General:

  • OpenTrip left out for Dycapo Protocol (which is based on OpenTrip anyway)
  • Added reStructured Text [13] documentation in XML-RPC methods

server/utils.py

  • Methods regarding OpenTrip ids deleted


server/common.py

  • Added Geolocation methods for Persons: update_position() and get_position()

server/driver.py

  • Methods updated to support Response objects also in case of some errors

rider.py

  • Methods updated to support Response objects also in case of some errors

server/models.py

  • Dycapo Protocol [14] fully adopted
  • All to_xmlrpc() methods now use copy.deepcopy() for safe object.__dict__ copy operations
  • WAYPOINT_CHOICES now has 'posi' attribute, to indicate that a Location is representing the position of a Person
  • Deleted 'intersection' and 'address' attributes to Location (redundancy reasons).
  • Deleted all attributes regarding GeoRSS but georss_point
  • Added geocoding and reverse geocoding methods to Location (using Geopy)
  • Added functionalities to avoid redundancy when trying to add Location objects
  • Deleted 'alias' and 'userid' attributes to Person (redundancy reasons)
  • Deleted 'content' attribute in Trip. It was a String, now it is just returned when constructing xml-rpc representations of Trips
  • Added has_vacany() and update_vacancy() methods to Trip
  • Added requested_position, accepted_position, started_position, finished_position attributes to Participation, that will hold the position of the user when he/she does Participation operations (safety reasons)

Dycapo v0.1.0

Download dycapo-v0.1.0.

Release Notes

2010-04-03 Daniel Graziotin <daniel DOT graziotin AT gmail DOT com>

Dycapo v0.1.0 is the first prototype version on which we are beginning to build our APIs.

Dycapo v0.1.0 incorporates and shows:

* The introduction of an open Protocol heavily inspired by OpenTrip Core [15] based on XML-RPC calls
* Integration of Dycapo models with Django models
* Authentication system
* Insertion of a trip by a driver
* Start of a trip by a driver
* Search of a trip by a rider
* Send a ride request to a driver
* Let the driver accept the ride request
* A complete testing framework

Changes since 0.0.2

General
* sqlite no more included, we make use of MySQL for testing (dump is included)
* docs/ directory is cleaner
* SemVer [16] adopted
* Refactoring
* Return values adjusted thanks to new Response object, now used eveywhere
* Use of get_xmlrpc_user() and new RPC4DJANGO feature to get the logged in user
tests/:
* Use of the new Response object
* More verbose, clearer
* Refactoring
* Can be configured throught a file, settings.py
server/models.py
* New Response object, the default returning value of every XML-RPC call. Acts as an Envelope, like in Soap.
server/response_codes.py (NEW)
* Contains the default codes and strings to be returned from Response objects
server/utils.py
* util function get_xmlrpc_user(), that returns the Person object making the XML-RPC call
server/rider.py
* Better documentation


Dycapo 0.0.2

Download dycapo-0.0.2.

Release Notes

2010-01-10 Daniel Graziotin <daniel DOT graziotin AT gmail DOT com>

Dycapo 0.0.2 is just for _showing_out_some_functionalities_ of the system and testing the underlying technologies. Dycapo 0.0.2 incorporates and shows:

* OpenTrip Core adoption and OpenTrip Dynamic data structures proposal (in Django Model format)
* Use of XML-RPC with Django (rpc4django over HTTP and HTTPS)
* (Sort of) integration of Dycapo models with Django and rpc4django
* Authentication
* Insertion of a trip by a driver
* Start of a trip by a driver
* Search of a trip by a rider
* Send a ride request to a driver
* Let the driver accept the ride request

No one exported XML-RPC function will surely be included in the final API! No one exported XML-RPC function is either optimized or completely working!

Code is (somewhat) documented. Expect a completely better work for 0.1.0 :)


Changes since 0.0.1

Some refactoring to make the code cleaner. Lots of bugs fixed. Test suite rewritten and (finally) fully working.

models.py:

* added utility methods (i.e. __unicode__ and to_xmlrpc)
* use of OpenTrip id proposal instead of Django id
* addition of fields to Participation model, regarding a ride request and a request accepted

trip.py: this module has been splitted in four files:

* driver.py - holds all the XML-RPC methods that a Driver needs.
* rider.py - holds all the XML-RPC methods that a Rider needs.
* commin.py - will hold all the XML-RPC methods shared by Rider and Driver
* utils.py - holds some utility functions.

driver.py (formerly trip.py):

* added check_ride_requests(trip) - checks for ride requests
* added accept_ride_request(trip, person) - for accepting a Rider

rider.py (formerly trip.py):

* added request_ride(trip) - sends a ride request to a trip

tests/:

* Cleaner code and better organization
* Added test_all_simple.py - creates a Driver and a Rider with the same destination as target
* test_all.py - creates 3 drivers and 5 riders with random locations as target

Dycapo 0.0.1

Download dycapo-0.0.1.

Release Notes

2009-12-26 Daniel Graziotin <daniel DOT graziotin AT gmail DOT com>


Dycapo 0.0.1 is just for _showing_out_some_functionalities_ of the system and testing the underlying technologies. Dycapo 0.0.1 incorporates and shows:

* OpenTrip Core adoption and OpenTrip Dynamic data structures proposal (in Django Model format)
* Use of XML-RPC with Django (rpc4django over HTTP and HTTPS)
* (Sort of) integration of Dycapo models with Django and rpc4django
* Authentication
* Insertion of a trip by a driver
* Start of a trip by a driver
* Search of a trip by a rider
* Accepting a ride

No one exported XML-RPC function will surely be included in the final API! No one exported XML-RPC function is either optimized or completely working!

Code is (somewhat) documented. Expect a completely better work for 0.1.0 :)