Skip to content

Commit

Permalink
πŸ“ Add storage FAQ draft (#43)
Browse files Browse the repository at this point in the history
* πŸ“ Add storage FAQ draft

* 🍱 Actually add it

* πŸ’š Fix

* πŸ’š Fix

* πŸ’š Fix

* πŸ’š Fix
  • Loading branch information
falexwolf authored Aug 7, 2023
1 parent 8135e72 commit 1e52912
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ lamin_examples_docs/
lamindb_docs.zip
pytorch_lamin_mnist_docs.zip
redun_lamin_fasta_docs.zip
lamin_usecases_docs*
docs*

# macOS
.DS_Store
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ repos:
language_version: python3
args:
- --max-line-length=88
- --ignore=E203
- --ignore=E203,W503
exclude: |
(?x)(
__init__.py
Expand Down
19 changes: 19 additions & 0 deletions docs/faq/storage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Storage FAQ

1. What is default storage? How do I find out about default storage?

2. Where is my SQLite file? What happens if I move the `.lndb` file around?

3. What is the `.lamindb/` folder? Will there be multiple `.lamindb/` folders if I have multiple storage locations?

4. What happens if I move files around? What should I do if I want to bulk migrate files to another storage (let’s say another s3 bucket)?

5. When should I pass `key=` and when should I rely on cryptic ids to register a file? What’s the recommended process to register a file?

6. Will I never be able to find my file if I don’t give it a description? (should this even be allowed?)

7. What should I do if I have a local file and want to upload it to S3? (Shall I register a File first and upload it with `.save`, or shall I upload outside of Lamin before registering it?)

8. How to update a file in storage? What’s the process to update file records after I moved files around or updated files?

9. How do I version a file? Do I always make a new file record and a new transform if I want to track the parent files?
20 changes: 19 additions & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@ def install(session: nox.Session) -> None:
```
"""

FAQ_MATCH = """\
```
"""

FAQ_APPEND = """\
faq/storage
```
"""


OTHER_TOPICS_ORIG = """
```{toctree}
:hidden:
Expand Down Expand Up @@ -79,9 +89,17 @@ def pull_artifacts(session):
pull_from_s3_and_unpack("lamindb_docs.zip")
Path("lamindb_docs/README.md").rename("README.md")
for path in Path("lamindb_docs").glob("*"):
if path.name == "index.md" or "/storage/" in path.as_posix():
if (
path.name == "index.md"
or "/storage/" in path.as_posix()
or path.name == "faq" # directory treated below
):
continue
path.rename(Path("docs") / path.name)
# lamindb faq
for path in Path("lamindb_docs/faq").glob("*"):
path.rename(Path("docs/faq") / path.name)
replace_content("docs/faq.md", {FAQ_MATCH: FAQ_APPEND})
# lamindb guide
replace_content("docs/guide.md", {OTHER_TOPICS_ORIG: "\n\n"})
# integrations
Expand Down

0 comments on commit 1e52912

Please sign in to comment.