Skip to content

Commit

Permalink
Backport notebook changes from main branch (#4846)
Browse files Browse the repository at this point in the history
* Bumped forge config file to commit hash 638047f in mooc notebooks (#4818)

* Update docs nnotebooks to point to d9f6cb8 forge config (#4823)

---------

Co-authored-by: Mohameth François SY <[email protected]>
  • Loading branch information
imsdu and MFSY authored Apr 5, 2024
1 parent eca7692 commit 897baad
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
"metadata": {},
"outputs": [],
"source": [
"r = requests.get('https://raw.githubusercontent.com/BlueBrain/nexus/ef830192d4e7bb95f9351c4bdab7b0114c27e2f0/docs/src/main/paradox/docs/getting-started/notebooks/rdfmodel/jsonldcontext.json')\n",
"r = requests.get('https://raw.githubusercontent.com/BlueBrain/nexus/d9f6cb83a27149c29bc604f3c34ea00c9ad64e67/docs/src/main/paradox/docs/getting-started/notebooks/rdfmodel/jsonldcontext.json')\n",
"dirpath = './rdfmodel'\n",
"Path(dirpath).mkdir(parents=True, exist_ok=True)\n",
"with open(f'{dirpath}/jsonldcontext.json', 'w') as outfile:\n",
Expand All @@ -168,7 +168,7 @@
"metadata": {},
"outputs": [],
"source": [
"forge = KnowledgeGraphForge(\"https://raw.githubusercontent.com/BlueBrain/nexus/ef830192d4e7bb95f9351c4bdab7b0114c27e2f0/docs/src/main/paradox/docs/getting-started/notebooks/forge.yml\",\n",
"forge = KnowledgeGraphForge(\"https://raw.githubusercontent.com/BlueBrain/nexus/d9f6cb83a27149c29bc604f3c34ea00c9ad64e67/docs/src/main/paradox/docs/getting-started/notebooks/forge.yml\",\n",
" bucket=f\"{ORG}/{PROJECT}\",\n",
" endpoint=ENDPOINT,\n",
" token=TOKEN)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
"metadata": {},
"outputs": [],
"source": [
"r = requests.get('https://raw.githubusercontent.com/BlueBrain/nexus/ef830192d4e7bb95f9351c4bdab7b0114c27e2f0/docs/src/main/paradox/docs/getting-started/notebooks/rdfmodel/jsonldcontext.json')\n",
"r = requests.get('https://raw.githubusercontent.com/BlueBrain/nexus/d9f6cb83a27149c29bc604f3c34ea00c9ad64e67/docs/src/main/paradox/docs/getting-started/notebooks/rdfmodel/jsonldcontext.json')\n",
"dirpath = './rdfmodel'\n",
"Path(dirpath).mkdir(parents=True, exist_ok=True)\n",
"with open(f'{dirpath}/jsonldcontext.json', 'w') as outfile:\n",
Expand All @@ -159,7 +159,7 @@
"metadata": {},
"outputs": [],
"source": [
"forge = KnowledgeGraphForge(\"https://raw.githubusercontent.com/BlueBrain/nexus/ef830192d4e7bb95f9351c4bdab7b0114c27e2f0/docs/src/main/paradox/docs/getting-started/notebooks/forge.yml\",\n",
"forge = KnowledgeGraphForge(\"https://raw.githubusercontent.com/BlueBrain/nexus/d9f6cb83a27149c29bc604f3c34ea00c9ad64e67/docs/src/main/paradox/docs/getting-started/notebooks/forge.yml\",\n",
" bucket=f\"{ORG}/{PROJECT}\",\n",
" endpoint=\"https://sandbox.bluebrainnexus.io/v1\",\n",
" token=TOKEN)"
Expand Down Expand Up @@ -483,7 +483,7 @@
"metadata": {},
"outputs": [],
"source": [
"allen_nm_mapping = DictionaryMapping.load(\"https://raw.githubusercontent.com/BlueBrain/nexus/ef830192d4e7bb95f9351c4bdab7b0114c27e2f0/docs/src/main/paradox/docs/getting-started/notebooks/mappings/allen_morphology_dataset.hjson\") # TODO\n",
"allen_nm_mapping = DictionaryMapping.load(\"https://raw.githubusercontent.com/BlueBrain/nexus/d9f6cb83a27149c29bc604f3c34ea00c9ad64e67/docs/src/main/paradox/docs/getting-started/notebooks/mappings/allen_morphology_dataset.hjson\") # TODO\n",
"nm_allen_resources = forge.map(nm_allen_metadata, allen_nm_mapping)"
]
},
Expand All @@ -501,7 +501,7 @@
"metadata": {},
"outputs": [],
"source": [
"allen_ephys_mapping = DictionaryMapping.load(\"https://raw.githubusercontent.com/BlueBrain/nexus/ef830192d4e7bb95f9351c4bdab7b0114c27e2f0/docs/src/main/paradox/docs/getting-started/notebooks/mappings/allen_ephys_dataset.hjson\") # TODO\n",
"allen_ephys_mapping = DictionaryMapping.load(\"https://raw.githubusercontent.com/BlueBrain/nexus/d9f6cb83a27149c29bc604f3c34ea00c9ad64e67/docs/src/main/paradox/docs/getting-started/notebooks/mappings/allen_ephys_dataset.hjson\") # TODO\n",
"nephys_allen_resources = forge.map(nm_allen_metadata, allen_ephys_mapping)"
]
},
Expand All @@ -519,7 +519,7 @@
"metadata": {},
"outputs": [],
"source": [
"mouselight_nm_mapping = DictionaryMapping.load(\"https://raw.githubusercontent.com/BlueBrain/nexus/ef830192d4e7bb95f9351c4bdab7b0114c27e2f0/docs/src/main/paradox/docs/getting-started/notebooks/mappings/mouselight_dataset.hjson\") # TODO\n",
"mouselight_nm_mapping = DictionaryMapping.load(\"https://raw.githubusercontent.com/BlueBrain/nexus/d9f6cb83a27149c29bc604f3c34ea00c9ad64e67/docs/src/main/paradox/docs/getting-started/notebooks/mappings/mouselight_dataset.hjson\") # TODO\n",
"nm_mouselight_resources = forge.map(nm_mouselight_metadata, mouselight_nm_mapping)"
]
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
type: DataDownload
contentSize:
{
unitCode: f"bytes"
value: x._bytes
}
digest:
{
algorithm: x._digest._algorithm
value: x._digest._value
}
encodingFormat: x._mediaType
name: x._filename
contentUrl: x._self
atLocation:
{
type: Location
store:
{
id: x._storage["@id"]
}
location: x._location if '_location' in x else None
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
"metadata": {},
"outputs": [],
"source": [
"r = requests.get('https://raw.githubusercontent.com/BlueBrain/nexus/ef830192d4e7bb95f9351c4bdab7b0114c27e2f0/docs/src/main/paradox/docs/getting-started/notebooks/rdfmodel/jsonldcontext.json')\n",
"r = requests.get('https://raw.githubusercontent.com/BlueBrain/nexus/d9f6cb83a27149c29bc604f3c34ea00c9ad64e67/docs/src/main/paradox/docs/getting-started/notebooks/rdfmodel/jsonldcontext.json')\n",
"dirpath = './rdfmodel'\n",
"Path(dirpath).mkdir(parents=True, exist_ok=True)\n",
"with open(f'{dirpath}/jsonldcontext.json', 'w') as outfile:\n",
Expand All @@ -162,11 +162,10 @@
"metadata": {},
"outputs": [],
"source": [
"forge = KnowledgeGraphForge(\"https://raw.githubusercontent.com/BlueBrain/nexus/ef830192d4e7bb95f9351c4bdab7b0114c27e2f0/docs/src/main/paradox/docs/getting-started/notebooks/forge.yml\",\n",
"forge = KnowledgeGraphForge(\"https://raw.githubusercontent.com/BlueBrain/nexus/d9f6cb83a27149c29bc604f3c34ea00c9ad64e67/docs/src/main/paradox/docs/getting-started/notebooks/forge.yml\",\n",
" bucket=f\"{ORG}/{PROJECT}\",\n",
" endpoint=\"https://sandbox.bluebrainnexus.io/v1\",\n",
" token=TOKEN,\n",
" file_resource_mapping='https://raw.githubusercontent.com/BlueBrain/nexus-forge/5580e906eb1df9e3b3970a735b82f609207df717/examples/configurations/nexus-store/file-to-resource-mapping.hjson'))"
" token=TOKEN)"
]
},
{
Expand Down Expand Up @@ -334,7 +333,7 @@
"metadata": {},
"outputs": [],
"source": [
"allen_nm_mapping = DictionaryMapping.load(\"https://raw.githubusercontent.com/BlueBrain/nexus/ef830192d4e7bb95f9351c4bdab7b0114c27e2f0/docs/src/main/paradox/docs/getting-started/notebooks/mappings/allen_morphology_dataset.hjson\")\n",
"allen_nm_mapping = DictionaryMapping.load(\"https://raw.githubusercontent.com/BlueBrain/nexus/d9f6cb83a27149c29bc604f3c34ea00c9ad64e67/docs/src/main/paradox/docs/getting-started/notebooks/mappings/allen_morphology_dataset.hjson\")\n",
"nm_allen_resources = forge.map(nm_allen_metadata, allen_nm_mapping, na='')"
]
},
Expand All @@ -351,7 +350,7 @@
"metadata": {},
"outputs": [],
"source": [
"allen_ephys_mapping = DictionaryMapping.load(\"https://raw.githubusercontent.com/BlueBrain/nexus/ef830192d4e7bb95f9351c4bdab7b0114c27e2f0/docs/src/main/paradox/docs/getting-started/notebooks/mappings/allen_ephys_dataset.hjson\")\n",
"allen_ephys_mapping = DictionaryMapping.load(\"https://raw.githubusercontent.com/BlueBrain/nexus/d9f6cb83a27149c29bc604f3c34ea00c9ad64e67/docs/src/main/paradox/docs/getting-started/notebooks/mappings/allen_ephys_dataset.hjson\")\n",
"nephys_allen_resources = forge.map(nm_allen_metadata, allen_ephys_mapping, na='')"
]
},
Expand Down

0 comments on commit 897baad

Please sign in to comment.