SimLogger
See the docs! - https://joey-kilgore.github.io/SimLogger/index.html Logger and python data archiving
Archive your python objects simply and easiy, and never worry about overwriting files.
All data is defined with 3 key components
simTag - tag unique for each simulation (like naming the experiment)
objTag - tag unique for each object (like the variable within the experiments)
date-time - this is automatically added by SimLogger to help ensure unqiueness of files
With that you can save your data easily!
from SimLogger import SimLogger
simTag = 'sampleSimulation'
objTag = 'sampleArray'
sampleArray = [1,2,3,4]
SimLogger.saveObj(simTag, objTag, sampleArray, makeNote=True)
# Outputs
# 2024-06-25 10:44:44,063 [INFO ] Logger Loaded
# 2024-06-25 10:44:44,064 [INFO ] OBJECT,sampleSimulation,sampleArray,data/obj/sampleSimulation_sampleArray_2024-06-25_10-44-44.pkl
#
# additionally a file is saved: data/obj/sampleSimulation_sampleArray_2024-06-25_10-44-44.pkl
And you can load your data later using a uniqueId
uniqueId - unique identifier that goes to the python pkl file (almost always is simTag_objTag)
from SimLogger import SimLogger
sampleArrayLoaded = SimLogger.getObjectFromuniqueId('sampleSimulation_sampleArray')
print(sampleArrayLoaded)
# Ouptuts
# [1, 2, 3, 4]
Installation
Install the python package
pip install SimLogger
To utilize the FigLogger you will need to register your machine ssh keys with kachery
Run the following command and follow the instructions
kachery-cloud-init
To utilize SimNotify you will need to create a notify channel so that your phone (or device) can be linked to where the notifications will be sent.
Go to https://notify.run/ and click create a channel
Scan the QR code and subscribe/enable notifications (you may need to check your system settings to ensure these are turned on)
Copy the link generated, and set the config files on your machine to this link by running:
notify-run configure <paste-link-here>
Now you should be able to run the python script:
from SimLogger import SimNotify
endpoint = "<paste-link-here>"
SimNotify.sendNotification("Hello World", endpoint=endpoint)
Development
install all dependencies (including linting and testing) with:
pip install -e '.[lint,test,doc]
run tests with:
pytest tests/
run linting + formatting + etc with:
pre-commit run --all-files
Metadata
Release files for SimLogger 0.4.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| simlogger-0.4.2.tar.gz | 14.3 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| simlogger-0.4.2-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 14.3 MB
Release files / simlogger-0.4.2.tar.gz
| Download URL | simlogger-0.4.2.tar.gz |
|---|---|
| Size | 14.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
18fd857d9686d7f44e098ab7923231720700966995ce11212178bef9ffd34c9d
|
|
BLAKE2b-256 checksum How to use checksums |
f38c180fd5258436c830709208fdae087060449c1f376c8ddb009d7b27f1a82a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.27.0
|
Release files / simlogger-0.4.2-py2.py3-none-any.whl
| Download URL | simlogger-0.4.2-py2.py3-none-any.whl |
|---|---|
| Size | 18.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
b5a5852e6a7903af04d602610b01e6791122bcde2d54ccf4200b6ae34653af09
|
|
BLAKE2b-256 checksum How to use checksums |
108b792a022bba0d828774358f7d0d3a74ede986b03aae7ebc0afea834a61a67
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.27.0
|