Skip to content

Commit

Permalink
📝 Prettify documentation (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
falexwolf committed Sep 2, 2022
1 parent 1552eae commit e423eab
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 28 deletions.
39 changes: 22 additions & 17 deletions docs/tutorials/1-rds-setup.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -56,28 +56,26 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Two users within an organization are collaborating on this project across several notebooks.\n",
"Two users within an organization are collaborating on several projects:\n",
"\n",
"- test-user1: project lead, performs wetlab experiments\n",
"- test-user2: data scientist, performs computational analysis"
"- `test-user1`: Project lead, performs wetlab experiments.\n",
"- `test-user2`: Data scientist, performs computational analysis."
]
},
{
"cell_type": "code",
"execution_count": null,
"cell_type": "markdown",
"metadata": {},
"outputs": [],
"source": [
"!lndb login test-user1"
"The first user logs in to register the projects."
]
},
{
"cell_type": "markdown",
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"Register a few projects.\n",
"\n",
"We use [Schmidt22](https://www.science.org/doi/10.1126/science.abj4008) as the project in this R&D team simulation."
"!lndb login test-user1"
]
},
{
Expand All @@ -86,10 +84,10 @@
"metadata": {},
"outputs": [],
"source": [
"_ = ln.db.insert.project(\n",
"ln.db.insert.project(\n",
" proj_id=\"P001\",\n",
" name=\"Optimizing gRNA transfection in primary human T cells\",\n",
")"
");"
]
},
{
Expand All @@ -98,10 +96,10 @@
"metadata": {},
"outputs": [],
"source": [
"_ = ln.db.insert.project(\n",
"ln.db.insert.project(\n",
" proj_id=\"P002\",\n",
" name=\"T cell enrichment from human PBMCs\",\n",
")"
");"
]
},
{
Expand All @@ -110,13 +108,20 @@
"metadata": {},
"outputs": [],
"source": [
"_ = ln.db.insert.project(\n",
"ln.db.insert.project(\n",
" proj_id=\"P003\",\n",
" name=(\n",
" \"CRISPR activation screens to decode stimulation responses in\"\n",
" \" primary human T cells\"\n",
" ),\n",
")"
");"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The 3rd project here is based on [Schmidt _et al._, Science (2022)](https://www.science.org/doi/10.1126/science.abj4008)."
]
}
],
Expand Down
15 changes: 9 additions & 6 deletions docs/tutorials/get-started.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"source": [
"As a first-time user, sign up your email so that LaminDB can link you to data & analyses.\n",
"\n",
"On the command line, run `lndb signup <email>`. For example: `lndb signup tuser1@foo.com`.[^github]\n",
"On the command line, run `lndb signup <email>`.[^github]\n",
"\n",
"[^github]: Consider using your GitHub-associated email and handle=username if you have one!"
]
Expand Down Expand Up @@ -67,7 +67,7 @@
"metadata": {},
"outputs": [],
"source": [
"!lndb login test-user1 # test user 1 has handle test-user1"
"!lndb login test-user1"
]
},
{
Expand All @@ -85,7 +85,9 @@
"source": [
"For this first tutorial, we init a local instance with storage in `mydata/` and a local SQlite database for managing it.\n",
"\n",
"You can also directly pass `s3://my-bucket` to `--storage` or a Postgres URL to `--db`."
"You can also directly pass `s3://my-bucket` to `--storage` or a Postgres URL to `--db`.\n",
"\n",
"We mount 3 default modules for biological entities (`bionty`), a generic wetlab (`wetlab`), and a generic bioinformatics pipline (`bfx`) for this instance."
]
},
{
Expand All @@ -95,7 +97,7 @@
"metadata": {},
"outputs": [],
"source": [
"!lndb init --storage mydata --schema bionty,wetlab,bfx # default bio entity and wetlab schema modules"
"!lndb init --storage mydata --schema bionty,wetlab,bfx"
]
},
{
Expand All @@ -104,7 +106,8 @@
"metadata": {},
"source": [
"In this local setup, all instance data is in `mydata/` and all metadata in the SQLite file `mydata/mydata.lndb`.\n",
"Settings persist in `~/.lndb/*.env` and can be accessed via [`db.settings`](https://lamin.ai/docs/lndb-setup/lndb_setup.settings)."
"\n",
"Settings persist in `~/.lndb/instance-mydata.env` (and `~/.lndb/user-....env`) and can be accessed via [`lamindb.settings`](https://lamin.ai/docs/lndb-setup/lndb_setup.settings)."
]
},
{
Expand Down Expand Up @@ -266,7 +269,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.13"
"version": "3.9.12"
},
"nbproject": {
"dependency": {
Expand Down
14 changes: 10 additions & 4 deletions docs/tutorials/introspect.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,13 @@
"id": "964d7a0b",
"metadata": {},
"source": [
"We currently offer a simple way of introspecting the overall schema:"
"You can draw the overall schema that is active in your DB instance using {func}`~lamindb.schema.draw`.\n",
"\n",
"It is the union of the default and customized schema modules that you mounted to your instance. Here, for example,\n",
"\n",
"- schema-core: https://lamin.ai/docs/lnschema-core/api\n",
"- schema-bionty: https://lamin.ai/docs/lnschema-bionty/api\n",
"- schema-wetlab: https://lamin.ai/docs/lnschema-wetlab/api"
]
},
{
Expand Down Expand Up @@ -93,7 +99,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.9.13 ('py39')",
"display_name": "Python 3.9.12 ('base1')",
"language": "python",
"name": "python3"
},
Expand All @@ -107,7 +113,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.13"
"version": "3.9.12"
},
"nbproject": {
"id": "7j8LCaTr0H1c",
Expand All @@ -118,7 +124,7 @@
},
"vscode": {
"interpreter": {
"hash": "ae1fefc8646a06dd2e75004cd934adda7c5727b046986a772e3b44b0ffba9754"
"hash": "2775e555cdc2d728c54aa22130c79afb1fa4da64f22f2fc6dcc2aa346c4e0672"
}
}
},
Expand Down
7 changes: 6 additions & 1 deletion lamindb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
db
schema
settings
datasets
nb
dev
To retrieve settings, use `lamindb.settings <https://lamin.ai/docs/lndb-setup/lndb_setup.settings>`__.
"""
from . import _check_versions

Expand All @@ -27,3 +27,8 @@
from . import dev # noqa
from . import schema # noqa
from ._nb import nb # noqa

settings.__doc__ = """Settings.
This re-exports `lndb_setup.settings <https://lamin.ai/docs/lndb-setup/lndb_setup.settings>`__.
"""

0 comments on commit e423eab

Please sign in to comment.