Skip to content

Commit

Permalink
Merge pull request #167 from LSSTDESC/u/stuart/docs_changes_plarsen
Browse files Browse the repository at this point in the history
Changes suggested by Patricia Larsen
  • Loading branch information
stuartmcalpine authored Nov 28, 2024
2 parents 955bda0 + 9e7cc74 commit d359800
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@ ensure by doing

.. code-block:: bash
chmod 600 .pgpass
chmod 600 ~/.pgpass
3 changes: 2 additions & 1 deletion docs/source/tutorial_notebooks/datasets_deeper_look.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
"source": [
"# Come up with a random owner name to avoid clashes\n",
"from random import randint\n",
"OWNER = \"tutorial_\" + str(randint(0,int(1e6)))\n",
"import os\n",
"OWNER = \"tutorial_\" + os.environ.get('USER') + '_' + str(randint(0,int(1e6)))\n",
"\n",
"import dataregistry\n",
"print(f\"Working with dataregistry version: {dataregistry.__version__} as random owner {OWNER}\")"
Expand Down
3 changes: 2 additions & 1 deletion docs/source/tutorial_notebooks/pipelines.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"source": [
"# Come up with a random owner name to avoid clashes\n",
"from random import randint\n",
"OWNER = \"tutorial_\" + str(randint(0,int(1e6)))\n",
"import os\n",
"OWNER = \"tutorial_\" + os.environ.get('USER') + '_' + str(randint(0,int(1e6)))\n",
"\n",
"import dataregistry\n",
"print(f\"Working with dataregistry version: {dataregistry.__version__} as random owner {OWNER}\")"
Expand Down
3 changes: 2 additions & 1 deletion docs/source/tutorial_notebooks/production_schema.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
"source": [
"# Come up with a random owner name to avoid clashes\n",
"from random import randint\n",
"OWNER = \"tutorial_\" + str(randint(0,int(1e6)))\n",
"import os\n",
"OWNER = \"tutorial_\" + os.environ.get('USER') + '_' + str(randint(0,int(1e6)))\n",
"\n",
"import dataregistry\n",
"print(f\"Working with dataregistry version: {dataregistry.__version__} as random owner {OWNER}\")"
Expand Down
3 changes: 2 additions & 1 deletion docs/source/tutorial_notebooks/query_datasets.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
"source": [
"# Come up with a random owner name to avoid clashes\n",
"from random import randint\n",
"OWNER = \"tutorial_\" + str(randint(0,int(1e6)))\n",
"import os\n",
"OWNER = \"tutorial_\" + os.environ.get('USER') + '_' + str(randint(0,int(1e6)))\n",
"\n",
"import dataregistry\n",
"print(f\"Working with dataregistry version: {dataregistry.__version__} as random owner {OWNER}\")"
Expand Down
7 changes: 5 additions & 2 deletions docs/source/tutorial_notebooks/register_datasets.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
"source": [
"# Come up with a random owner name to avoid clashes\n",
"from random import randint\n",
"OWNER = \"tutorial_\" + str(randint(0,int(1e6)))\n",
"import os\n",
"OWNER = \"tutorial_\" + os.environ.get('USER') + '_' + str(randint(0,int(1e6)))\n",
"\n",
"import dataregistry\n",
"print(f\"Working with dataregistry version: {dataregistry.__version__} as random owner {OWNER}\")"
Expand Down Expand Up @@ -157,7 +158,9 @@
"id": "d22523db-ae92-4474-bb96-5ad98a404d61",
"metadata": {},
"source": [
"For these tutorials, there is a stand alone working (`tutorial_working`) and production (`tutorial_production`) tutorial schema that we will connect to as to not interupt the default DESC schemas with random entries. If you are practicing using the `dataregistry` outwith these tutorial notebooks, feel free to also use the tutorial schemas for your entries. "
"For these tutorials, there is a stand alone working (`tutorial_working`) and production (`tutorial_production`) tutorial schema that we will connect to as to not interupt the default DESC schemas with random entries. If you are practicing using the `dataregistry` outwith these tutorial notebooks, feel free to also use the tutorial schemas for your entries.\n",
"\n",
"Note the `reg_reader` has write access to the tutorial schema, for testing within these notebooks, however only the `reg_writer` account can write to the working schema."
]
},
{
Expand Down
6 changes: 4 additions & 2 deletions docs/source/tutorial_python.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ The ``dataregistry`` package
============================

The tutorials for the ``dataregistry`` package come in the form of Jupyter
Notebooks.
Notebooks (hosted in the ``docs/source/tutorial_notebooks`` directory in the
repository).

These tutorial notebooks can be run interactively at NERSC (see :ref:`here
<interactive-notebooks>` for more info), or serve as standalone reference
material by viewing the notebooks on GitHub.
material by `viewing the notebooks on GitHub
<https://github.com/LSSTDESC/dataregistry/blob/main/docs/source/tutorial_notebooks/>`__.

1) Getting started with the data registry
-----------------------------------------
Expand Down

0 comments on commit d359800

Please sign in to comment.