danilop / yas3fs

YAS3FS (Yet Another S3-backed File System) is a Filesystem in Userspace (FUSE) interface to Amazon S3. It was inspired by s3fs but rewritten from scratch to implement a distributed cache synchronized by Amazon SNS notifications. A web console is provided to easily monitor the nodes of a cluster.
http://danilop.github.io/yas3fs
MIT License
643 stars 98 forks source link

An attempt at splitting __init__'s classes into their own files #170

Closed liath closed 5 years ago

liath commented 6 years ago

Per https://github.com/danilop/yas3fs/issues/123

I split all classes into their own files for the most part except for like LinkedList being in FSCache since that's the only place it is used.

I thought about maybe putting all the FS stuff in a folder to group it up. Which would switch the imports as going from:

from .FSCache import FSCache
from .FSData import FSData
from .FSRange import FSRange
from .PartOfFSData import PartOfFSData

To:

from .fs import FSCache, FSData, FSRange, PartOfFSData

Idk, I'm not really sure how to structure a python project.

liath commented 6 years ago

I added a skeleton for unit tests too. I'll try to get basic functionality coverage in for everything in another PR.

liath commented 6 years ago

Just noticed this had a waiting conflict /shrug Should be good now :)

jazzl0ver commented 5 years ago

Yeah, looks like you were working with the old code and now requested to merge that old code with the current one. For example, your version of code:

__init.py__:139
    parser.add_argument('--cache-path', metavar='PATH', default='',
help='local path to use for disk cache (default is /tmp/yas3fs/BUCKET/PATH)')

The latest version is:

__init.py__:3229
    parser.add_argument('--cache-path', metavar='PATH', default='',
help='local path to use for disk cache (default is /tmp/yas3fs-BUCKET-PATH-random)')

And this does not seem to be the only difference.

Do I understand it incorrectly?

liath commented 5 years ago

Ah, must have messed up a merge. I can recreate from latest. I don't think there were that many differences.

jazzl0ver commented 5 years ago

There were a lot of differences! Thanks!