Commit graph

8964 commits

Author SHA1 Message Date
Mouse Reeve
621cfa7ed2
Merge pull request #2970 from hughrun/move
Add `Move` activity for user migration
2023-11-01 17:14:34 -07:00
Mouse Reeve
6f9c7f39fb Adds reverse migration for populate sort title
This doesn't impact much, it just allows you to reverse the migration,
which you would probably (hopefully) only want ot do in development.
2023-11-01 16:24:47 -07:00
Hugh Rundle
c486b9c37e
pylint fixes 2023-10-30 21:47:19 +11:00
Hugh Rundle
df43a8e2c5
Use django-file-resubmit plugin
- save cover images to cache when checking author and work for existing records
- fixes #2760
2023-10-30 19:43:39 +11:00
Mouse Reeve
941efb3f72
Merge pull request #3068 from hughrun/3066
make options consistent in celery
2023-10-29 17:30:40 -07:00
Hugh Rundle
d2b2cc0521
make options consistent in celery
- changes 'broadcasts' to 'broadcast' in Celery page in admin section
- re-orders celery queues on admin page to be in English alphabetical order (other than priority levels) - this makes them consistent with the Flower interface
- fixes #3066
2023-10-29 11:55:06 +11:00
Hugh Rundle
853b5f28a4
add defaults of None to optional AWS values
fixes #2989
2023-10-29 11:29:49 +11:00
Hugh Rundle
935779b5e3
Merge pull request #3064 from hughrun/user-migrate
stop pylint constantly whining in user-migration branch
2023-10-28 06:53:25 +11:00
Hugh Rundle
25a2615d5f
stop pylint constantly whining 2023-10-28 06:51:26 +11:00
Hugh Rundle
50ac691126
add alt tag 2023-10-28 06:28:43 +11:00
Hugh Rundle
4d35fd45df
template and migration fixes 2023-10-27 22:22:58 +11:00
Hugh Rundle
6f3b1b565f
fixes to move layout and notifs
- make Move notifications less complicated
- moved users cannot do anything other than unmove or log out
- refactor translations for moved users
2023-10-27 22:00:04 +11:00
Adeodato Simó
1952bb6ddc
fix mypy issues
The three "ignore" directives are:

  - avoid unreadable boilerplate from inherited `Field` methods; and:
  - https://github.com/typeddjango/django-stubs/issues/285#issuecomment-600029858
2023-10-24 18:14:05 -03:00
Adeodato Simó
170d1fe205
fix pylint issues (minus no-else-return) 2023-10-24 17:41:07 -03:00
Adeodato Simó
737ac8e908
Implement PartialDateField using SealedDate and a custom descriptor 2023-10-24 17:30:15 -03:00
Adeodato Simó
9752819bdb
Add support for parsing partial isoformats back 2023-10-24 17:30:13 -03:00
Adeodato Simó
4b47646e28
Fix typing hints in sealed_date module
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).
2023-10-24 17:29:04 -03:00
Adeodato Simó
5f619d7a39
Implement SealedDateFormField to preserves partial dates
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).
2023-10-24 17:29:00 -03:00
Adeodato Simó
777c8b4549
naturalday_partial filter for working with SealedDate 2023-10-24 04:32:27 -03:00
Adeodato Simó
46d80d56a5
Rename SealedDate.__str__ to partial_isoformat
Django uses `str(date)` for backends other than PostgreSQL, so do not
break "YYYY-MM-DD" formatting, just in case.
2023-10-24 04:32:27 -03:00
Adeodato Simó
a9c605ea97
Add SealedDate class for globally-stable, maybe-incomplete dates 2023-10-24 04:32:27 -03:00
Adeodato Simó
52a979da2d
Add failing test case for "January 1st" offset bug 2023-10-24 04:32:27 -03:00
Hugh Rundle
5592a8e08b
Merge pull request #3061 from hughrun/user-migrate
minor pylint and mypy fixes
2023-10-23 21:32:36 +11:00
Hugh Rundle
f30555be0f
minor pylint and mypy fixes 2023-10-23 21:30:17 +11:00
Hugh Rundle
f662e4e049
Merge pull request #3060 from hughrun/user-migrate
Fix texts & linting plus minor bugfixes
2023-10-23 20:54:41 +11:00
Hugh Rundle
e29c93a1e9
complete jobs more sensibly
- fix tuple in tar export I accidentally broke by following pylint blindly
- just use job.set_status to complete jobs since it does everything we need
- fix/avoid Celery "not JSON deserializable" error by not saving whole job including user value
2023-10-23 20:44:52 +11:00
Hugh Rundle
ddec2dbaa9
fix tar types notification docstring 2023-10-23 20:43:49 +11:00
Hugh Rundle
b8fc5c9b7a
fix tests 2023-10-23 20:42:56 +11:00
Hugh Rundle
8477d0b89d
Merge branch 'main' into user-migration 2023-10-22 18:47:41 +11:00
Hugh Rundle
afb5c01947
Merge pull request #3058 from hughrun/user-migrate
oops import Any
2023-10-22 17:57:57 +11:00
Hugh Rundle
2b6852e7a0
oops import Any 2023-10-22 17:56:46 +11:00
Hugh Rundle
d05cf8e59b
Merge pull request #3057 from hughrun/user-migrate
once more into the linting breach!
2023-10-22 17:50:58 +11:00
Hugh Rundle
b6b55b2e65
once more into the linting breach! 2023-10-22 17:49:26 +11:00
Hugh Rundle
c5e536aeaa
Merge pull request #3056 from hughrun/user-migrate
fix tests and linting
2023-10-22 17:27:57 +11:00
Hugh Rundle
07ef12ce8e
fix tests and linting 2023-10-22 17:26:27 +11:00
Hugh Rundle
0c846ca31f
Merge pull request #3055 from hughrun/user-migrate
formatting and linting fixes
2023-10-22 16:56:20 +11:00
Hugh Rundle
0a2efeb5aa
Merge branch 'user-migration' into user-migrate 2023-10-22 16:55:00 +11:00
Hugh Rundle
6222088f15
Merge branch 'user-migrate' of github.com:hughrun/bookwyrm into user-migrate 2023-10-22 16:53:32 +11:00
Hugh Rundle
fd1ebf5f71
formatting and pylint fixes 2023-10-22 16:52:29 +11:00
Hugh Rundle
11a726b40b
Merge pull request #3037 from hughrun/user-migrate
complete most outstanding user migrate tasks
2023-10-22 15:40:22 +11:00
Hugh Rundle
c0a5e55f7f
Merge branch 'user-migration' into user-migrate 2023-10-22 15:38:06 +11:00
Hugh Rundle
b34a491172
run black 2023-10-22 15:34:25 +11:00
Hugh Rundle
a27c652501
admin view for user imports
- makes user_import_time_limit a site setting rather than a value in settings.py (note this applies to exports as well as imports)
- admins can change user_import_time_limit from UI
- admins can cancel stuck user imports
- disabling new imports also disables user imports
2023-10-22 15:07:49 +11:00
Hugh Rundle
836127f369
cooldown period for user exports
add USER_EXPORT_COOLDOWN_HOURS setting for controlling user exports and imports
2023-10-22 10:49:13 +11:00
Hugh Rundle
20114b0059
add notifs and error handling for user export/import 2023-10-22 09:03:28 +11:00
Jascha Ezra Urbach
c9e6dcc2d9
Merge pull request #3053 from bookwyrm-social/develop
Release 0.7.0
2023-10-21 18:30:45 +02:00
Jascha Ezra Urbach
00bf2903bc
Bumped version number to 0.7.0 (#3052) 2023-10-21 18:29:45 +02:00
Adeodato Simó
698e74a496
Minor vocabulary fixes and structured data improvements (#3036)
* 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>
2023-10-21 17:53:24 +02:00
Jascha Ezra Urbach
695c67a714
Merge pull request #3051 from bookwyrm-social/jaschaurbach-patch-1
Update bump-version.sh
2023-10-21 17:28:55 +02:00
Jascha Ezra Urbach
abb6bcd199
Update bump-version.sh
just a little fix
2023-10-21 17:28:44 +02:00