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
Export and merge functions #17
base: master
Are you sure you want to change the base?
Export and merge functions #17
Commits on Feb 3, 2017
-
Configuration menu - View commit details
-
Copy full SHA for 2dbc7cf - Browse repository at this point
Copy the full SHA 2dbc7cfView commit details -
Split collections and item classes into separate files and out of bas…
…e.py The new attribute system will involve meta classes other helper objects I prefer to keep separate from the objects that use them for neatness.
Configuration menu - View commit details
-
Copy full SHA for 2014840 - Browse repository at this point
Copy the full SHA 2014840View commit details -
Changed Collection subclassing to use class attribute
Rather than specify which data model the collection is a 'collection' of in an overridden __init__ - now subclasses override the object_class class attribute with the correct data model. Not hugely important, stylistic choice - prefer avoiding super calls.
Configuration menu - View commit details
-
Copy full SHA for 16373b7 - Browse repository at this point
Copy the full SHA 16373b7View commit details -
Collection objects are permanent parts of Popolo object
Previously a MembershipCollection object would be generated on request on accessing the membership property. Now this is generated and assigned at creation. Reason: collections need to be permanent so that changes to their objects can be repackaged into a file.
Configuration menu - View commit details
-
Copy full SHA for b12f3c6 - Browse repository at this point
Copy the full SHA b12f3c6View commit details -
Amend PopoloObject to prepare for read/write data objects
In new system, rather than the properties of a PopoloObject being defined as @property-ed functions accessing properties of self.data - this will be replaced by the 'Attribute' class - that given a attribute will control getting and setting to self.data. Subclasses of Attribute control different ways of talking to data e.g. talking to data that is a date. A small meta-class is used for PopoloObject to avoid repetition in definitions. e.g. person = Property(attr=person) can be expressed as person = Property()
Configuration menu - View commit details
-
Copy full SHA for c7f0caf - Browse repository at this point
Copy the full SHA c7f0cafView commit details -
PopoloObject subclasses moved to new attribute system
Almost all previous @property-ed functions replaced with Attribute object. Functionality for 'getting' and default values are identical to old arrangement.
Configuration menu - View commit details
-
Copy full SHA for bc36884 - Browse repository at this point
Copy the full SHA bc36884View commit details -
Created 'twitter' setter for Person object.
When a new 'twitter' value is set, if a url - the link value is set - and the username is also extracted for contact details. If not a url, just updates the contact details.
Configuration menu - View commit details
-
Copy full SHA for 2cbccd5 - Browse repository at this point
Copy the full SHA 2cbccd5View commit details
Commits on Feb 6, 2017
-
Changed defaults for date properties to use .PAST or .FUTURE
Date fields for Person and Organization were set to default to None rather than the vague .PAST and .FUTURE from approxdate. This has been changed to bring it into sync with other Membership and Event objects. Person Test updated to reflect this change.
Configuration menu - View commit details
-
Copy full SHA for 82a95a5 - Browse repository at this point
Copy the full SHA 82a95a5View commit details -
Popolo objects can now export to json (to_json) or direct to a file name.
Configuration menu - View commit details
-
Copy full SHA for 240d637 - Browse repository at this point
Copy the full SHA 240d637View commit details -
Two popolo objects can now be merged. Each collectiontype has a value that must be made 'unique' (either name or id). In a collision, the 'larger' will be kept (assumed more information) and all refs to discarded ids replaced. More complex functionality e.g. the bigger person object picking up all possible alternate names of the smaller one, can be specified by overriding the absorb function.
Configuration menu - View commit details
-
Copy full SHA for 72c2801 - Browse repository at this point
Copy the full SHA 72c2801View commit details -
Configuration menu - View commit details
-
Copy full SHA for d6c7d73 - Browse repository at this point
Copy the full SHA d6c7d73View commit details -
Date attributes will now accept datetime objects being 'set'
Datetime objects will be reduced to just their date, then converted to isoformat
Configuration menu - View commit details
-
Copy full SHA for d5366c5 - Browse repository at this point
Copy the full SHA d5366c5View commit details -
Add safeguards to prevent objects sharing attributes.
Exposed json_data as something that can be accessed, but that is not independent of child objects. New objects are based on a deepcopy of the incoming dict.
Configuration menu - View commit details
-
Copy full SHA for 400691f - Browse repository at this point
Copy the full SHA 400691fView commit details -
Added test suite with tests for property setting and file saving.
Updated person tests with test for __gt__ and __lt__
Configuration menu - View commit details
-
Copy full SHA for 7b6166a - Browse repository at this point
Copy the full SHA 7b6166aView commit details -
Assigning a null contact_detail will now delete the row rather than a…
…ssigning 'none'.
Configuration menu - View commit details
-
Copy full SHA for 2520cfd - Browse repository at this point
Copy the full SHA 2520cfdView commit details -
Removed unused ability to specify which field is used to match Relate…
…dAttributes Originally this was so you could build RelatedAttributes on something other than an ID field. This was never necessary, so removed to tidy up.
Configuration menu - View commit details
-
Copy full SHA for 461cedf - Browse repository at this point
Copy the full SHA 461cedfView commit details -
Added processing for handling of saving vague-dates and date ranges.
These features will also be useful in the approx_dates package directly, and will be ported there at some point.
Configuration menu - View commit details
-
Copy full SHA for 63a87e9 - Browse repository at this point
Copy the full SHA 63a87e9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 270f68a - Browse repository at this point
Copy the full SHA 270f68aView commit details
Commits on Jan 30, 2018
-
Created effective_start_date and effective_end_date properties
Returns either unique time from membership or that from overall legislative period.
Configuration menu - View commit details
-
Copy full SHA for 04a8729 - Browse repository at this point
Copy the full SHA 04a8729View commit details
Commits on Jan 31, 2018
-
Nicer way of getting a wikidata, parlparse, etc for an individual.
Configuration menu - View commit details
-
Copy full SHA for c4a39a5 - Browse repository at this point
Copy the full SHA c4a39a5View commit details -
Updated hash id system for memberships
Replaces with a cross-platform compatible hashing method so membership ids are generated consistently
Configuration menu - View commit details
-
Copy full SHA for ba755f7 - Browse repository at this point
Copy the full SHA ba755f7View commit details -
Will absorb gender of 'other' when self has none.
Configuration menu - View commit details
-
Copy full SHA for 6df1ea7 - Browse repository at this point
Copy the full SHA 6df1ea7View commit details
Commits on Jan 22, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 7db9f3c - Browse repository at this point
Copy the full SHA 7db9f3cView commit details -
Configuration menu - View commit details
-
Copy full SHA for ccbd20d - Browse repository at this point
Copy the full SHA ccbd20dView commit details