Skip to content

Commit

Permalink
💚 Attempt fix (#136)
Browse files Browse the repository at this point in the history
Co-authored-by: Sunny Sun <[email protected]>
  • Loading branch information
falexwolf and sunnyosun authored Aug 2, 2024
1 parent ac11dfe commit 73997f3
Show file tree
Hide file tree
Showing 25 changed files with 101 additions and 95 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,7 @@ jobs:
- name: Cache postgres use
if: steps.cache-postgres.outputs.cache-hit == 'true'
run: docker image load --input ~/postgres.tar

- name: install Python deps
run: pip install -U laminci

- run: pip install "laminci@git+https://x-access-token:${{ secrets.LAMIN_BUILD_DOCS }}@github.com/laminlabs/laminci"
- name: install postgres graphviz
run: sudo apt-get -y install graphviz
- uses: aws-actions/configure-aws-credentials@v1
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/doc-changes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: doc-changes

on:
pull_request_target:
branches:
- main
types:
- closed

jobs:
latest-changes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- run: pip install "laminci[doc-changes]@git+https://x-access-token:${{ secrets.LAMIN_BUILD_DOCS }}@github.com/laminlabs/laminci"
- run: laminci doc-changes
env:
repo_token: ${{ secrets.GITHUB_TOKEN }}
docs_token: ${{ secrets.LAMIN_BUILD_DOCS }}
changelog_file: lamin-docs/docs/changelog/soon/usecases.md
2 changes: 0 additions & 2 deletions .github/workflows/latest-changes.jinja2

This file was deleted.

25 changes: 0 additions & 25 deletions .github/workflows/latest-changes.yml

This file was deleted.

4 changes: 2 additions & 2 deletions docs/analysis-flow.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
"outputs": [],
"source": [
"# pip install 'lamindb[jupyter,bionty]'\n",
"# !pip install 'lamindb[jupyter,bionty]'\n",
"!lamin init --storage ./analysis-usecase --schema bionty"
]
},
Expand Down Expand Up @@ -363,7 +363,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.1.-1"
"version": "3.10.13"
},
"nbproject": {
"id": "eNef4Arw8nNM",
Expand Down
2 changes: 1 addition & 1 deletion docs/analysis-registries.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.1.-1"
"version": "3.10.13"
},
"nbproject": {
"id": "hsPU1OENv0LS",
Expand Down
4 changes: 2 additions & 2 deletions docs/bulkrna.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
},
"outputs": [],
"source": [
"# pip install 'lamindb[jupyter,bionty]'\n",
"# !pip install 'lamindb[jupyter,bionty]'\n",
"!lamin init --storage test-bulkrna --schema bionty"
]
},
Expand Down Expand Up @@ -489,7 +489,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.1.-1"
"version": "3.10.13"
},
"nbproject": {
"id": "s5V0dNMVwL9i",
Expand Down
18 changes: 16 additions & 2 deletions docs/cell_marker.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -355,13 +355,27 @@
"For any given entity, we can choose from a number of versions:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"tags": [
"hide-output"
]
},
"outputs": [],
"source": [
"bt.CellMarker.list_source()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"bt.Source.filter(entity=\"CellMarker\").df()"
"# only lists the sources that are currently used\n",
"bt.CellMarker.list_source(currently_used=True).df()"
]
},
{
Expand All @@ -378,7 +392,7 @@
"outputs": [],
"source": [
"source = bt.Source.filter(\n",
" source=\"cellmarker\", version=\"2.0\", organism=\"human\"\n",
" name=\"cellmarker\", version=\"2.0\", organism=\"human\"\n",
").one()\n",
"public = bt.CellMarker.public(source=source)\n",
"public"
Expand Down
2 changes: 1 addition & 1 deletion docs/celltypist.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@
" record = public_records_dict[row[\"ontology_id\"]]\n",
" try:\n",
" record.add_synonym(row[\"ct_name\"])\n",
" except SystemExit:\n",
" except ValueError:\n",
" pass"
]
},
Expand Down
4 changes: 2 additions & 2 deletions docs/enrichr.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
},
"outputs": [],
"source": [
"# pip install 'lamindb[jupyter,bionty]'\n",
"# !pip install 'lamindb[jupyter,bionty]'\n",
"!lamin init --storage ./use-cases-registries --schema bionty"
]
},
Expand Down Expand Up @@ -330,7 +330,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.1.-1"
"version": "3.10.13"
},
"nbproject": {
"id": "6oxEIEduvo6w",
Expand Down
2 changes: 1 addition & 1 deletion docs/facs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.1.-1"
"version": "3.10.13"
},
"nbproject": {
"id": "OWuTtS4SApon",
Expand Down
2 changes: 1 addition & 1 deletion docs/facs2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@
"outputs": [],
"source": [
"collection_v2 = ln.Collection(\n",
" [artifact, collection_v1.artifacts[0]], is_new_version_of=collection_v1, version=\"2\"\n",
" [artifact, collection_v1.ordered_artifacts[0]], is_new_version_of=collection_v1, version=\"2\"\n",
")\n",
"collection_v2.describe()"
]
Expand Down
20 changes: 17 additions & 3 deletions docs/gene.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -447,13 +447,27 @@
"For any given entity, we can choose from a number of versions:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"tags": [
"hide-output"
]
},
"outputs": [],
"source": [
"bt.Gene.list_source().df()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"bt.Source.filter(entity=\"Gene\").df()"
"# only lists the sources that are currently used\n",
"bt.Gene.list_source(currently_used=True).df()"
]
},
{
Expand All @@ -470,7 +484,7 @@
"outputs": [],
"source": [
"source = bt.Source.filter(\n",
" source=\"ensembl\", version=\"release-110\", organism=\"human\"\n",
" name=\"ensembl\", version=\"release-112\", organism=\"human\"\n",
").one()\n",
"public = bt.Gene.public(source=source)\n",
"public"
Expand Down Expand Up @@ -513,7 +527,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.1.-1"
"version": "3.10.13"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion docs/multimodal.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.1.-1"
"version": "3.10.13"
},
"nbproject": {
"id": "yMWSFirS6qv2",
Expand Down
31 changes: 4 additions & 27 deletions docs/project-flow.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -50,30 +50,6 @@
"```"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Setup"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Init a test instance:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Install the `lamindb` Python package:\n",
"```shell\n",
"pip install 'lamindb[jupyter,bionty,aws]'\n",
"```"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -84,6 +60,7 @@
},
"outputs": [],
"source": [
"# !pip install 'lamindb[jupyter,bionty,aws]'\n",
"!lamin init --storage ./mydata"
]
},
Expand Down Expand Up @@ -423,7 +400,7 @@
"outputs": [],
"source": [
"transform = ln.Transform.search(\"Project flow\").first()\n",
"transform.parents.df()"
"transform.predecessors.df()"
]
},
{
Expand All @@ -432,7 +409,7 @@
"metadata": {},
"outputs": [],
"source": [
"transform.view_parents()"
"transform.view_lineage()"
]
},
{
Expand Down Expand Up @@ -663,7 +640,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.1.-1"
"version": "3.10.13"
},
"nbproject": {
"id": "1LCd8kco9lZU",
Expand Down
2 changes: 1 addition & 1 deletion docs/rdf-sparql.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"metadata": {},
"outputs": [],
"source": [
"# pip install 'lamindb[aws,bionty]'\n",
"# !pip install 'lamindb[aws,bionty]'\n",
"!lamin load laminlabs/cellxgene"
]
},
Expand Down
7 changes: 3 additions & 4 deletions docs/scrna.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
},
"outputs": [],
"source": [
"# pip install 'lamindb[jupyter,aws,bionty]'\n",
"# !pip install 'lamindb[jupyter,aws,bionty]' \n",
"!lamin init --storage ./test-scrna --schema bionty"
]
},
Expand All @@ -74,7 +74,6 @@
"import lamindb as ln\n",
"import bionty as bt\n",
"\n",
"ln.settings.verbosity = \"hint\"\n",
"ln.settings.transform.stem_uid = \"Nv48yAceNSh8\"\n",
"ln.settings.transform.version = \"1\"\n",
"ln.track()"
Expand Down Expand Up @@ -274,7 +273,7 @@
"metadata": {},
"outputs": [],
"source": [
"collection.artifacts"
"collection.ordered_artifacts"
]
},
{
Expand Down Expand Up @@ -310,7 +309,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.1.-1"
"version": "3.10.13"
},
"nbproject": {
"id": "Nv48yAceNSh8",
Expand Down
7 changes: 3 additions & 4 deletions docs/scrna2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
"import lamindb as ln\n",
"import bionty as bt\n",
"\n",
"ln.settings.verbosity = \"hint\"\n",
"ln.settings.transform.stem_uid = \"ManDYgmftZ8C\"\n",
"ln.settings.transform.version = \"1\"\n",
"ln.track()"
Expand Down Expand Up @@ -185,7 +184,7 @@
" # search the public ontology and use the ontology id of the top match\n",
" ontology_id = bionty.search(name).iloc[0].ontology_id\n",
" # create a record by loading the top match from bionty\n",
" record = bt.CellType.from_public(ontology_id=ontology_id)\n",
" record = bt.CellType.from_source(ontology_id=ontology_id)\n",
" name_mapper[name] = record.name # map the original name to standardized name\n",
" record.save()\n",
" record.add_synonym(name)"
Expand Down Expand Up @@ -291,7 +290,7 @@
"outputs": [],
"source": [
"collection_v2 = ln.Collection(\n",
" [artifact, collection_v1.artifacts[0]],\n",
" [artifact, collection_v1.ordered_artifacts.first()],\n",
" is_new_version_of=collection_v1,\n",
")\n",
"collection_v2.save()"
Expand Down Expand Up @@ -346,7 +345,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.1.-1"
"version": "3.10.13"
},
"nbproject": {
"id": "ManDYgmftZ8C",
Expand Down
Loading

0 comments on commit 73997f3

Please sign in to comment.