Lakat-OS / lakat-py

bare bones python implementation of Lakat
0 stars 1 forks source link

Document usage & configuration/SSH/DB... #6

Open peter-lyons-kehl opened 11 months ago

peter-lyons-kehl commented 11 months ago

@leomarlo Please document and/or add examples of usage, config, SSH, DB...

1.

python main.py 
Traceback (most recent call last):
  File "/share/pkehl/GIT/lakat-py/main.py", line 3, in <module>
    from lakat.branch import _newBranch
ModuleNotFoundError: No module named 'lakat.branch'

2.

python test.py 
Traceback (most recent call last):
  File "/share/pkehl/GIT/lakat-py/test.py", line 25, in <module>
    pub_key = get_public_key_from_file(key_file_prefix=key_file_prefix)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/share/pkehl/GIT/lakat-py/utils/signing/sign.py", line 63, in get_public_key_from_file
    with open(public_key_path, "rb") as key_file:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/share/pkehl/GIT/lakat-py/.ssh/lakat_public_key.pem'
leomarlo commented 11 months ago

Hi @peter-kehl, thanks a lot for your comment and feedback. I'm in the process of refactoring the code and both the main.py and test.py are not anymore entrypoints to the project. I will rework this repo over the next week and add documentation. The main purpose at this point of the python implementation is kind of a rapid-prototyping environment and to understand what is needed for the Rust implementation. But your remark is noted and I will inform you as soon as the documentation of the updated repo is there. Meanwhile test_compare.ipynb is the place to start playing around. Basically, I download the article history of a wiki-article. If it has been downloaded before it will be pulled from a file-cache. Then a branch can be created, which creates a few entries in the key-value db. Then a few submits are send, which again creates entries in the database. However, I will rewrite and document most of this. So hopefully in one or at most two weeks it should be running. Will keep you posted here.