Package: arroba
arrobaPython implementation ofBlueskyPDSandAT Protocol, including data repository, Merkle search tree, andcom.atproto.sync XRPC methods.Arrobais the Spanish word for the@ character("at sign").Install fromPyPIwithpip install arroba.License: This project is placed into the public domain.UsageChangelogRelease instructionsUsageSeeapp.pyfor the minimal wrapper code needed to run a fully functional PDS based on arroba, for testing with theATProto federation sandbox.Environment variables:APPVIEW_HOST, defaultapi.bsky-sandbox.devBGS_HOST, defaultbgs.bsky-sandbox.devPLC_HOST, defaultplc.bsky-sandbox.devPDS_HOST, where you're running your PDSREPO_DID, repo user's DID, defaults to contents ofrepo_didfileREPO_HANDLE, repo user's domain handle, defaults todid:plc:*.jsonfileREPO_PASSWORD, repo user's password, defaults to contents ofrepo_passwordfileREPO_PRIVKEY, repo user's private key in PEM format, defaults to contents ofprivkey.pemfileREPO_TOKEN, static token to use as bothaccessJwtandrefreshJwt, defaults to contents ofrepo_tokenfile. Not required to be an actual JWT.More docs to come!Changelog0.4 - 2023-09-19Migrate toATProto repo v3. Specifically, the existingsubscribeRepossequence number is reused as the newrevfield in commits. (Discussion.).Add newdidmodule with utilities to create and resolvedid:plcs and resolvedid:webs.Add newutil.service_jwtfunction that generatesATProto inter-service JWTs.Repo:Add newsigning_key/rotation_keyattributes. Generate store, and load both indatastore_storage.Removeformat_init_commit, migrate existing calls toformat_commit.Storage:Renameread_from_seq=>read_blocks_by_seq(and inMemoryStorageandDatastoreStorage), add newread_commits_by_seqmethod.Mergeload_repodid/handlekwargs intodid_or_handle.XRPCs:MakesubscribeReposcheck storage for all new commits every time it wakes up.As part of this, replacexrpc_sync.enqueue_commitwith newsend_new_commitsfunction that takes no parameters.Drop bundledapp.bsky/com.atprotolexicons, uselexrpc's instead.0.3 - 2023-08-29Big milestone: arroba is successfully federating with theATProto sandbox! Seeapp.pyfor the minimal demo code needed to wrap arroba in a fully functional PDS.Add Google Cloud Datastore implementation of repo storage.Implementcom.atprotoXRPC methods needed to federate with sandbox, including most ofrepoandsync.Notably, includessubscribeReposserver side over websocket....and much more.0.2 - 2023-05-18Implement repo and commit chain in new Repo class, including pluggable storage. This completes the first pass at all PDS data structures. Next release will include initial implementations of thecom.atproto.sync.*XRPC methods.0.1 - 2023-04-30Initial release! Still very in progress. MST, Walker, and Diff classes are mostly complete and working. Repo, commits, and sync XRPC methods are still in progress.Release instructionsHere's how to package, test, and ship a new release.Run the unit tests.sourcelocal/bin/activate.csh
python3-munittestdiscoverBump the version number inpyproject.tomlanddocs/conf.py.git grepthe old version number to make sure it only appears in the changelog. Change the current changelog entry inREADME.mdfor this new version fromunreleasedto the current date.Build the docs. If you added any new modules, add them to the appropriate file(s) indocs/source/. Then run./docs/build.sh. Check that the generated HTML looks fine by openingdocs/_build/html/index.htmland looking around.setenvverX.Y
gitcommit-am"release v$ver"Upload totest.pypi.orgfor testing.python3-mbuild
twineupload-rpypitestdist/arroba-$ver*Install from test.pypi.org.cd/tmp
python3-mvenvlocalsourcelocal/bin/activate.csh# make sure we force pip to use the uploaded versionpip3uninstallarroba
pip3install--upgradepip
pip3install-ihttps://test.pypi.org/simple--extra-index-urlhttps://pypi.org/simplearroba==$verdeactivateSmoke test that the code trivially loads and runs.sourcelocal/bin/activate.csh
python3# TODO: test codedeactivateTag the release in git. In the tag message editor, delete the generated comments at bottom, leave the first line blank (to omit the release "title" in github), put### Notable changeson the second line, then copy and paste this version's changelog contents below it.gittag-av$ver--cleanup=verbatim
gitpush&&gitpush--tagsClick here to draft a new release on GitHub.EntervX.Yin theTag versionbox. LeaveRelease titleempty. Copy### Notable changesand the changelog contents into the description text box.Upload topypi.org!twineuploaddist/arroba-$ver*Wait for the docs to build on Read the Docs, then check that they look ok.On theVersions page, check that the new version is active, If it's not, activate it in theActivate a Versionsection.