Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | new methods in combox.silo.ComboxSilo -- node_get, node_set. noddicts. | Siddharth Ravikumar | 2015-03-31 | 2 | -0/+149 | |
| | | | | | | | | These methods will be used to manage the dictionaries in the db related to the zarking shards. modified: combox/silo.py modified: tests/silo_test.py | |||||
* | ComboxSilo is now going to have dictionaries that track information about ↵ | Siddharth Ravikumar | 2015-03-31 | 2 | -2/+18 | |
| | | | | | | | the shards. modified: combox/events.py modified: combox/silo.py | |||||
* | updated TODO.org | Siddharth Ravikumar | 2015-03-31 | 1 | -0/+2 | |
| | ||||||
* | updated TODO.org | Siddharth Ravikumar | 2015-03-26 | 1 | -2/+8 | |
| | ||||||
* | combox.events.NodDirMonitor: corrected typo in docstring. | Siddharth Ravikumar | 2015-03-26 | 1 | -1/+1 | |
| | ||||||
* | fleshed out combox.events.NodDirMonitor.housekeep method. | Siddharth Ravikumar | 2015-03-26 | 2 | -3/+120 | |
| | | | | | | | wrote tests for it too :~( modified: combox/events.py modified: tests/events_test.py | |||||
* | updated TODO.org | Siddharth Ravikumar | 2015-03-26 | 1 | -1/+1 | |
| | ||||||
* | new function combox.file.node_paths: returns the abs. path of ↵ | Siddharth Ravikumar | 2015-03-19 | 2 | -0/+57 | |
| | | | | | | | shards/directories in node directories. modified: combox/file.py modified: tests/file_test.py | |||||
* | combox/file.py: edited docstring of the node_path method. | Siddharth Ravikumar | 2015-03-19 | 1 | -2/+3 | |
| | ||||||
* | In tests, the code that purges the files/directories in `purge_list' is now ↵ | Siddharth Ravikumar | 2015-03-19 | 3 | -15/+18 | |
| | | | | | | | | a function. modified: tests/events_test.py modified: tests/file_test.py modified: tests/utils.py | |||||
* | updated TODO.org | Siddharth Ravikumar | 2015-03-19 | 1 | -0/+2 | |
| | ||||||
* | combox/silo.py: All access to DB are now inside a critcal section. | Siddharth Ravikumar | 2015-03-19 | 1 | -11/+17 | |
| | | | | | | | This just means, only one damn Thread is allowed to access the DB at a time. We are using thread.Lock to achieve this. | |||||
* | updated TODO.org: wrote on_moved method (NodeDirMonitor) | Siddharth Ravikumar | 2015-03-18 | 1 | -2/+4 | |
| | ||||||
* | fleshed out the on_move method in combox.events.NodeDirMonitor | Siddharth Ravikumar | 2015-03-18 | 2 | -2/+76 | |
| | | | | | | | As usual, wrote correponding tests for it; zarking TDD or whatever :~| modified: combox/events.py modified: tests/events_test.py | |||||
* | tests/events_test.py: paths in `purge_list' is purged after executing each ↵ | Siddharth Ravikumar | 2015-03-18 | 1 | -7/+8 | |
| | | | | test method. | |||||
* | combox/silo.py: modded remove method in ComboxSilo | Siddharth Ravikumar | 2015-03-18 | 1 | -1/+5 | |
| | | | | | The statement that removes the key from db is now put in a try-catch f#*king block. | |||||
* | updated TODO.org | Siddharth Ravikumar | 2015-03-18 | 1 | -2/+2 | |
| | ||||||
* | updated on_created, on_modified, on_deleted methods in NodeDirMonitor. | Siddharth Ravikumar | 2015-03-13 | 1 | -0/+15 | |
| | | | | | | | Now they check if the event.src_path is a shard or a directory before doing anything. modified: combox/events.py | |||||
* | Added `shardp' method to combox.events.NodeDirMonitor + test for it. | Siddharth Ravikumar | 2015-03-13 | 2 | -0/+21 | |
| | | | | | modified: combox/events.py modified: tests/events_test.py | |||||
* | updated on_delete method in combox.events.NodeDirMonitor | Siddharth Ravikumar | 2015-03-06 | 1 | -1/+1 | |
| | | | | | | | Now the method deletes the corresponding file in the combox directory only if has not already been deleted. modified: combox/events.py | |||||
* | updated TODO.org | Siddharth Ravikumar | 2015-03-06 | 1 | -1/+1 | |
| | ||||||
* | updated the on_delete method in the combox.events.ComboxDirMonitor class. | Siddharth Ravikumar | 2015-03-06 | 1 | -2/+5 | |
| | | | | | | | It now deletes the directory or file shard in the node directories only if they were not already deleted. modified: combox/events.py | |||||
* | modded combox.file.node_path function. | Siddharth Ravikumar | 2015-03-06 | 3 | -5/+9 | |
| | | | | | | | | | | | It has a third argument (boolean) which tells whether `cb_path' (the first argument) is a file or not. Updated the test for node_path function + code wherever node_path was used. modified: combox/events.py modified: combox/file.py modified: tests/file_test.py | |||||
* | updated TODO.org - flesh out on_delete method (NodeDirMonitor) | Siddharth Ravikumar | 2015-03-04 | 1 | -2/+4 | |
| | ||||||
* | all the sleep calls are 1 sec long in tests.events_test | Siddharth Ravikumar | 2015-03-04 | 1 | -5/+5 | |
| | ||||||
* | fleshed out the on_delete method in combox.events.NodeDirMonitor | Siddharth Ravikumar | 2015-03-04 | 2 | -4/+28 | |
| | | | | | | | As usual, wrote correponding tests for it :| modified: combox/events.py modified: tests/events_test.py | |||||
* | fixed combox.file.cb_path | Siddharth Ravikumar | 2015-03-04 | 1 | -1/+1 | |
| | | | | | | instead of using `path.isfile' to check if the path is a shard file or not, it is checked if the path endswidth 'shard.N' where `N' is a number. | |||||
* | renamed combox.file.rm_dir -> combox.file.rm_path | Siddharth Ravikumar | 2015-03-04 | 2 | -7/+21 | |
| | | | | | | | | rm_path deletes a file or an empty directory. updated the test for it too. modified: tests/file_test.py | |||||
* | combox.file.mk_nodedir uses mk_dir to create a directory. | Siddharth Ravikumar | 2015-03-04 | 1 | -4/+1 | |
| | ||||||
* | combox.file.rm_nodedir uses the rm_dir function to remove directories. | Siddharth Ravikumar | 2015-03-04 | 1 | -4/+1 | |
| | ||||||
* | new function combox.file.mk_dir | Siddharth Ravikumar | 2015-03-04 | 2 | -0/+30 | |
| | | | | | | | wrote test for it too. modified: combox/file.py modified: tests/file_test.py | |||||
* | new function combox.file.rm_dir | Siddharth Ravikumar | 2015-03-04 | 2 | -0/+18 | |
| | | | | | | | also wrote test for it. modified: combox/file.py modified: tests/file_test.py | |||||
* | updated TODO.org | Siddharth Ravikumar | 2015-03-04 | 1 | -2/+4 | |
| | ||||||
* | combox/events.py: fixed the silo bug. | Siddharth Ravikumar | 2015-03-04 | 1 | -3/+16 | |
| | | | | | | | | In both the ComboxDirMonitor and the NodeDirMonitor all the methods -- housekeep, on_created, on_moved, on_deleted, on_modified -- called the silo_update method before doing anything. The silo_update() method re-reads the silo from disk. | |||||
* | updated TODO.org | Siddharth Ravikumar | 2015-02-26 | 1 | -0/+6 | |
| | ||||||
* | added TODO.org - moved combox TODO here. | Siddharth Ravikumar | 2015-02-26 | 1 | -0/+39 | |
| | ||||||
* | fleshed out the NodeDirMonitor's on_modified method + wrote tests for it. | Siddharth Ravikumar | 2015-02-26 | 2 | -2/+64 | |
| | | | | | modified: combox/events.py modified: tests/events_test.py | |||||
* | updated tests.utils.shardedp - nows additionally checks if shard exists. | Siddharth Ravikumar | 2015-02-26 | 1 | -1/+1 | |
| | ||||||
* | modded combox.file.hash_file function -- added new arg `file_content' | Siddharth Ravikumar | 2015-02-26 | 2 | -4/+9 | |
| | | | | | | | | | | - `file_content' is set to None by default - If `file_content' is not None, hash of this is returned. Updated the test for hash_file function. modified: combox/file.py modified: tests/file_test.py | |||||
* | updated combox.silo.ComboxSilo.stale method - added new arg fhash | Siddharth Ravikumar | 2015-02-26 | 2 | -4/+7 | |
| | | | | | | | | - the arg `fhash' is set to None by default. - if `fhash' is not None, it is considered as file's current hash. modified: combox/silo.py modified: tests/silo_test.py | |||||
* | updated tests.crypto_test.TestCrypto.test_convenience_crypto | Siddharth Ravikumar | 2015-02-26 | 1 | -1/+5 | |
| | | | | | Added code to test the new arg `write' in the decrypt_and_glue function. | |||||
* | modded combox.crypto.decrypt_and_glue - added new arg called `write' | Siddharth Ravikumar | 2015-02-26 | 1 | -4/+7 | |
| | | | | | - 'write' is set to True by set default. - If `write' is set, then the reconstructed file content is written to disk. | |||||
* | updated combox.events.ComboxDirMonitor.on_create method | Siddharth Ravikumar | 2015-02-25 | 1 | -3/+6 | |
| | | | | | | | | Now the file shards or directory is created in the node directories only if they don't already exist; if they exist that means this file was created from another computer (also running combox). modified: combox/events.py | |||||
* | tests/file_test.py: corrected typo in the docstring of test_cbpath method. | Siddharth Ravikumar | 2015-02-25 | 1 | -1/+1 | |
| | ||||||
* | new function combox.file.node_path. | Siddharth Ravikumar | 2015-02-25 | 2 | -0/+41 | |
| | | | | | | | | | | | | | This function takes the path to the file in the combox and returns the path of its first shard in the node directory. If the the given argument is a directory (inside the combox directory), the function returns the corresponding path of the directory under the first node directory. Test for the function was also written. modified: combox/file.py modified: tests/file_test.py | |||||
* | New combox.events.NodeDirMonitor class defined. | Siddharth Ravikumar | 2015-02-20 | 2 | -8/+134 | |
| | | | | | | | | | | At the moment only the on_created method of this class is kinda fleshed out. The tests for this class is at tests.events_test.TestEvents.test_NDM modified: combox/events.py modified: tests/events_test.py | |||||
* | modded tests/events_test.TestEvents.teardown method | Siddharth Ravikumar | 2015-02-20 | 1 | -1/+3 | |
| | | | | This method now checks if the `silo.db' exists before deleting it. | |||||
* | Refactored combox.crypto.split_and_encrypt function. | Siddharth Ravikumar | 2015-02-20 | 1 | -5/+12 | |
| | | | | Now it accepts an optional third argument `fcontent' (defaults to None) which contains the contents of the file `fpath'. | |||||
* | Refactored combox.file.cb_path to accept a file or a directory under a node ↵ | Siddharth Ravikumar | 2015-02-20 | 2 | -6/+23 | |
| | | | | | | | | | | | directory. It returns the path of the respective file or directory in the combox directory. Also updated the test for this function at tests.file_test.TestFile.test_cbpath modified: combox/file.py modified: tests/file_test.py | |||||
* | combox/events.py: now the silo.db is purged after every test method in ↵ | Siddharth Ravikumar | 2015-02-19 | 1 | -7/+2 | |
| | | | | EventsTest class. |