In particular, SealedDate's class methods always return an instance
of the class they're invoked through (i.e., `SealedDate.from_date_parts`
intentionally never returns `MonthSeal` or `YearSeal`).
To propertly annotate this, a type variable is needed (or the much
simpler `Self` in Python 3.11).
Note that Django forms _already_ have suppport for partial date data; we
just need to extend it when converting to Python (using SealedDate instead
of returning an error).
* Remove duplicate Review object under `rating` property
This was preventing validation, since `rating` is not a valid property
(`review` is, which is created from book.html already).
* Drop `bestRating` property in ratings, since it defaults to 5
See <https://schema.org/bestRating> ("If bestRating is omitted,
5 is assumed").
* Create Rating object (and its enclosing Review) in book/rating.html
* Use `position` property for Book objects in a series
`volumeNumber`, previously used, is only valid for objects of type
PublicationVolume (which series members are not).
* Give URL of book series when setting of `isPartOf`
* series.html: Add empty BookSeries object
---------
Co-authored-by: Adeodato Simó <dato@users.noreply.github.com>
This scripts reads VERSION (should be semantic version), automatically
suggest a "minor" version update, and ask for input to use either suggestion, or a new value.
creates a pull request with updated VERSION and creates a tag for the new version.
This removes the content of VERSION from settings.py and moves it into a seperate file which makes it easier to update versionnumbers via script in the future.
`cover` comes as a JSON dict, but the code was looking for URL as
an attribute.
(This commit leaves the attribute access in place, just in case
`cover` is updated to serialize as Document proper.)
This is a follow-up to b564e514f ("Handle parsed dates that already
have a timezone on import"), which was applied to `date_added` only.
(Appart from consistency, this will allow to apply future parsing fixes
more easily.)