MagPy is a Docker-based stack for managing data retrieval, manipulation and visualisation.
MagPy was created as means to automatically archive content created on WorldAnvil.com, so it comes with a backbone of treating every object as having a Universal Unique Identifier (UUID). To facilitate change tracking, hash_reg dictionary is used. In its simplest form it comprises of UUID: SHA1(JSONStringObject) key-pair entries. Whenever the current value of SHA1() differs for the given UUID, the object is saved and commited for push to the remote repository and the hash_reg is updated with the new value.
To lower the server load, MagPy will use the lower output "beacon" API calls to find out if the object has changed. Only then, will it follow up with a "full" API call to retrieve the changed object and calculate the SHA1() hash.
- Valid RSA-type identification private key named
id_rsaconnected to the GitHub account. This is placed inside thegitworker/.sshdirectory, from which it is added to thessh-agentwheninitiate-gitworker.shscript is run. gitworker.pyscript, which will:- retrieve an object with a diistinct UUID
- calculate a SHA1 hash of the JSONString of the object
- compare the SHA1 hash to that stored in
hash_reg - in the event of difference between SHA1 hashes:
- the object will be saved to gitworker/repo// file
- the new SHA1 hash will replace the existing SHA1 hash for that particular UUID
- the modified file will be
git push-ed to the remote GitHub repository
- Feature: data is
git push-ed to remote GitHub repository based on change of the SHA1 hash of the object - Version 0.1 created