Skip to content

Commit

Permalink
Merge pull request #50 from NIGMS/test-linting
Browse files Browse the repository at this point in the history
Test linting
  • Loading branch information
kyleoconnell-NIH authored Oct 30, 2024
2 parents c8fbe78 + 35357e1 commit d55a8bd
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 5,201 deletions.
88 changes: 0 additions & 88 deletions CheckLinks.py

This file was deleted.

157 changes: 19 additions & 138 deletions docs/HowToMountABucketWithGcsfuse.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,10 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"id": "1eb9b734-f956-424d-9b7a-240f7075aa49",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[core]\n",
"account = 25874201052-compute@developer.gserviceaccount.com\n",
"disable_usage_reporting = True\n",
"project = keen-clarity-352623\n",
"\n",
"Your active configuration is: [default]\n",
"\n",
"\n",
"To take a quick anonymous survey, run:\n",
" $ gcloud survey\n",
"\n"
]
}
],
"outputs": [],
"source": [
"# Pre-check steps: check account and project\n",
"!gcloud config list\n",
Expand All @@ -43,18 +25,10 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"id": "5310328f-53ef-430c-92b3-86a7fec33149",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"gs://test_user_managed_gcsfuse/us-states.txt\n"
]
}
],
"outputs": [],
"source": [
"#afterwards check permission with the following command(replace with your bucket name)\n",
"#If you can't list the contents..add the compute engine service account to your bucket permissions..or whichever account listed in the above command\n",
Expand All @@ -63,7 +37,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"id": "aa57c680-d4af-4688-8c1a-a6d613e7f8ce",
"metadata": {},
"outputs": [],
Expand All @@ -74,90 +48,43 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"id": "12b590c0-c77e-4c47-ba02-2ff912b91059",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"2022/08/15 17:34:22.729724 Start gcsfuse/0.41.4 (Go version go1.17.6) for app \"\" using mount point: /home/jupyter/gcs\n",
"2022/08/15 17:34:22.749754 Opening GCS connection...\n",
"2022/08/15 17:34:22.836734 Mounting file system \"test_user_managed_gcsfuse\"...\n",
"2022/08/15 17:34:22.959908 File system has been successfully mounted.\n"
]
}
],
"outputs": [],
"source": [
"#mount the bucket contents to the folder above(replace with your bucket name)\n",
"!gcsfuse test_user_managed_gcsfuse /home/jupyter/gcs"
]
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"id": "026f4f16-5cc8-4656-a637-523e83a80661",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"us-states.txt\n"
]
}
],
"outputs": [],
"source": [
"#list files with terminal\n",
"!ls /home/jupyter/gcs"
]
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"id": "90101b0e-08f6-4672-97fb-08d9d6eaf714",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"name,post_abbr\n",
"Alabama,AL\n",
"Alaska,AK\n",
"Arizona,AZ\n",
"Arkansas,AR\n",
"California,CA\n",
"Colorado,CO\n",
"Connecticut,CT\n",
"Delaware,DE\n",
"Florida,FL\n"
]
}
],
"outputs": [],
"source": [
"#interact with file with terminal\n",
"!head /home/jupyter/gcs/us-states.txt"
]
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"id": "5fbb978e-9ab7-4383-925c-182d23dceb2b",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'/home/jupyter'"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"#list and interact with bucket contents with python in python notebook\n",
"import os\n",
Expand All @@ -167,7 +94,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": null,
"id": "bd1c9077-c393-4338-ab62-190f74ac9d89",
"metadata": {},
"outputs": [],
Expand All @@ -177,72 +104,26 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": null,
"id": "874e7100-cc3f-42cd-8311-4f4ce89791cd",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'/home/jupyter/gcs'"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"os.getcwd()"
]
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": null,
"id": "b0dc1d68-d2e5-4a39-859a-a1a470e627fc",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['us-states.txt']"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"os.listdir()"
]
}
],
"metadata": {
"environment": {
"kernel": "python3",
"name": "common-cpu.m94",
"type": "gcloud",
"uri": "gcr.io/deeplearning-platform-release/base-cpu:m94"
},
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.12"
}
},
"metadata": {},
"nbformat": 4,
"nbformat_minor": 5
}
Loading

0 comments on commit d55a8bd

Please sign in to comment.