Because this project will be contributing to the Bookwyrm project, we’ll be using the Anti-Capitalist License although the AGPL 3.0 License has won the second question.
What’s next?
We have forked Bookwyrm to our Codeberg organisation. If you send your Codeberg username on the Matrix, we’ll add you this organisation.
These are the current questions we need to answer to work on the Bookwyrm project:
Identify the structure of the codebase (where is the frontend, backend, database schema, etc.)? Collect the information about this in the wiki.
What data needs to be included in an account archive? See this issue
Reach out to the Bookwyrm project. Their Matrix room is this.
How do we set up a test environment? Who wants to set up a test environment? See discussion on Matrix
Should we use ActivityPub as the format for archives?
These are the current questions we need to answer in order to work on the Bookwyrm project.
Anyone should pick whichever question or task they most want to work and we’ll figure out what to do about those questions that nobody works on later on.
For quick communications, use the Matrix room.
If you have a large discussion on a technical topic, open an issue in the Codeberg repository.
This week we began reviewing the bookwyrm source code. The results of this review is being collected on our wiki in the form of an FAQ. Thanks Valery Briz, @tomat0 and @Ryuno-Ki for working on this.
We also created and discussed several issues to organize our work.
What should be the goal of our work?
This has by now crystallized roughly three possible options for us:
We can base our work on @hugh’s. This means we’ll use plain JSON in the archive, add the media in the form of a tar or zip to the archive, and create an activity
We can follow Mastodon’s approach and use ActivityPub objects (actor, inbox, outbox, likes, followers, following) in the archive, together with media attachements. This would be a more limited archive, because not all bookwyrm activity is actually serialized as ActivityPub yet.
We can make Bookwyrm Groups federated. This would allow groups to be included and permit Group membership across instances.
Which option do you prefer? All of these have, I think, roughly equal effort associated with them as far as I can tell from here now.
During the previous week, we have decided how we will implement the account migration and successfully set up the test environment for our work. There are now two staging instances of Bookwyrm (linked below) which can be used to import/export data to and from each other.
Decision 1
In our first proper, in-project decision, we had the choice between:
Build based on hugh’s work, debug their code and improve it.
Use ActivityPub as archive. This would be somewhat compatible with other ActivityPub software.
Federate Bookwyrm groups. Which is a prerequisite for adding them to the archive.
We decided to base our work on hugh’s development. For this we setup staging instances now:
For the next twenty-four hours, these invite links will be valid to generate an unlimited number of test accounts on both instances. Afterwards, you can contact the admin (either @Tomat0 or @CSDUMMI) to generate a new invite link if the need be.
While testing with this new instance, @dannymate and @CSDUMMI found and analyzed a bug in the exporting function created by hugh. The issue can be found here.
Between the two staging instances, we need to test hugh’s current import/export functionality and come up with a range of test-cases to identify problems.
@Tomat0 and @CSDUMMI have written a wiki page on how to set up a staging instance of Bookwyrm yourself.
With the decision to begin basing our work upon Hugh’s code, we began using the staging instances to begin testing, debugging, and fixing the code.
One of the bugs fixed by @dannymate involved a case in which import/export would fail for accounts without an avatar.
@Ryuno-Ki began drafting the documentation on the Wiki for “Views”, explaining the various Django views Bookwyrm makes use of and their purpose.
Hugh has created a PR which adds import functionality for readthroughs, saved lists, and follows. This code likely has bugs that need to be tested and ironed out.
What’s next?
The steps we should aim to tackle in the coming week should include:
As discussed in Issue #1, we have decided upon using a tar format for the importer which will allow for all relevant files and images to be transferred, even when the exporting instance is offline. It is a top priority thatwebeginwork on creating this tar formatfor use.
As per Issue #3, the code currently performs import/export directly in the request-response loop which is suspected to run the risk of creating timeouts, especially on larger accounts. We should instead implement task scheduling (via Celery) for the import/export functionality.
The PR created by Hugh should be tested and reviewed for any bugs or missing functionality. This can be done on the staging instances.
Continue work on the documentation, hopefully finishing up the page related to Django Views. We should also begin drafting documentation pertaining to Celery and Bookwyrm’s usage of it.
While we can experiment with different ways of generating the archive and creating archive files (tars), we are blocked from implementing a completely self-contained archive until #15 is completed.
Having #17 completed would also be a huge help here.
@dannymate makes progress on the Export PoC and made SubTasks generic #17
Deployment of Hugh’s #15 to facilitate further code reviews. There were group discussions around the export download mechanism, tarfile data inclusion and unit testing.
Our goals
This week, we should merge #15. There are a few conditions that need to meet for that:
All code reviews need to resolved
Several manual tests must have been completed, including:
A test that a no-op archive (exporting & importing into the same account) does not result in any change to the account (and does not throw an error)
A test that a full archive (export from an account with books, readthroughs, saved lists, follows, blocks, comments and reviews) to an empty account, recreates all of the archive (without error)
#17 should be rebased on #15 and deployed to test instances.
We should start developing unit tests for the behavior implemented by #15.
The development of the tar archive should be halted in favour of work on these goal this week, as the work on creating self-contained tar archives is very dependent on these above goals.
All export and import logic has been moved to celery tasks and merged by @dannymate and @CSDUMMI.
What’s next?
The current state of the export-import branch needs to be tested on the staging server.
Documentation for the export-import branch (in the form of docstrings) should be added and reviewed
All media files fetched from the origin server during imports should be added to a tar archive
A pull request needs to be created to bookwyrm with our changes in export-import. We should reach out to bookwyrm maintainers and create a draft of the PR text.
@CSDUMMI is making progress with tar.gz exports in #29
End of the Sprint
In the check-up video conference, we discussed the end of this sprint.
The PR to Bookwyrm will be made by the 27th of August.
We will focus on the necessary remaining tasks to create either a PR or Draft PR.
Our PR will have some issues or improvements, that we couldn’t implement but do not consider crucial. All of these, that we have considered, will be listed in the PR for Bookwyrm’s consideration.