Skip to content

Commit

Permalink
Add setup specificity
Browse files Browse the repository at this point in the history
  • Loading branch information
CBroz1 committed Nov 3, 2023
1 parent c97d8e2 commit 1848da3
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- Migrate `config` helper scripts to Spyglass codebase. #662
- Revise contribution guidelines. #655
- Minor bug fixes. #656, #657, #659, #651, #671
- Add setup instruction specificity.

## [0.4.2] (October 10, 2023)

Expand Down
33 changes: 29 additions & 4 deletions notebooks/00_Setup.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@
"1. [Python 3.9](https://wiki.python.org/moin/BeginnersGuide/Download).\n",
"2. [mamba](https://mamba.readthedocs.io/en/latest/installation.html) as a\n",
" replacement for conda. Spyglass installation is significantly faster with\n",
" mamba.\n",
" mamba. \n",
" ```bash\n",
" wget \"https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh\"\n",
" bash Miniforge3-$(uname)-$(uname -m).sh\n",
" ```\n",
"3. [VS Code](https://code.visualstudio.com/docs/python/python-tutorial) with\n",
" relevant python extensions, including\n",
" [Jupyter](https://code.visualstudio.com/docs/datascience/jupyter-notebooks).\n",
Expand Down Expand Up @@ -119,14 +123,26 @@
"id": "580d3feb",
"metadata": {},
"source": [
"Members of the Frank Lab can run the `dj_config.py` helper script to generate\n",
"a config like the one below. Outside users should copy/paste `dj_local_conf_example` and adjust values accordingly.\n",
"Members of the Frank Lab will need to use DataJoint 0.14.2 (currently in\n",
"pre-release) in order to change their password on the MySQL 8 server. DataJoint\n",
"0.14.2\n",
"\n",
"```bash\n",
"git clone https://github.com/datajoint/datajoint-python\n",
"pip install ./datajoint-python\n",
"```\n",
"\n",
"Members of the lab can run the `dj_config.py` helper script to generate a config\n",
"like the one below. \n",
"\n",
"```bash\n",
"cd spyglass\n",
"python config/dj_config.py <username> <base_path> <output_filename>\n",
"```\n",
"\n",
"Outside users should copy/paste `dj_local_conf_example` and adjust values\n",
"accordingly.\n",
"\n",
"The base path (formerly `SPYGLASS_BASE_DIR`) is the directory where all data\n",
"will be saved. See also\n",
"[docs](https://lorenfranklab.github.io/spyglass/0.4/installation/) for more\n",
Expand Down Expand Up @@ -172,7 +188,16 @@
" }\n",
" }\n",
"}\n",
"```\n"
"```\n",
"\n",
"If you see an error saying `Could not find SPYGLASS_BASE_DIR`, try loading your\n",
"config befor importing Spyglass.\n",
"\n",
"```python\n",
"import datajoint as dj\n",
"dj.load('/path/to/config')\n",
"import spyglass\n",
"```"
]
},
{
Expand Down
30 changes: 27 additions & 3 deletions notebooks/py_scripts/00_Setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.15.2
# jupytext_version: 1.14.5
# kernelspec:
# display_name: Python 3 (ipykernel)
# language: python
Expand Down Expand Up @@ -39,6 +39,10 @@
# 2. [mamba](https://mamba.readthedocs.io/en/latest/installation.html) as a
# replacement for conda. Spyglass installation is significantly faster with
# mamba.
# ```bash
# wget "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
# bash Miniforge3-$(uname)-$(uname -m).sh
# ```
# 3. [VS Code](https://code.visualstudio.com/docs/python/python-tutorial) with
# relevant python extensions, including
# [Jupyter](https://code.visualstudio.com/docs/datascience/jupyter-notebooks).
Expand Down Expand Up @@ -96,14 +100,26 @@
# ### Existing Database
#

# Members of the Frank Lab can run the `dj_config.py` helper script to generate
# a config like the one below. Outside users should copy/paste `dj_local_conf_example` and adjust values accordingly.
# Members of the Frank Lab will need to use DataJoint 0.14.2 (currently in
# pre-release) in order to change their password on the MySQL 8 server. DataJoint
# 0.14.2
#
# ```bash
# git clone https://github.com/datajoint/datajoint-python
# pip install ./datajoint-python
# ```
#
# Members of the lab can run the `dj_config.py` helper script to generate a config
# like the one below.
#
# ```bash
# # cd spyglass
# python config/dj_config.py <username> <base_path> <output_filename>
# ```
#
# Outside users should copy/paste `dj_local_conf_example` and adjust values
# accordingly.
#
# The base path (formerly `SPYGLASS_BASE_DIR`) is the directory where all data
# will be saved. See also
# [docs](https://lorenfranklab.github.io/spyglass/0.4/installation/) for more
Expand Down Expand Up @@ -151,6 +167,14 @@
# }
# ```
#
# If you see an error saying `Could not find SPYGLASS_BASE_DIR`, try loading your
# config befor importing Spyglass.

Check failure on line 171 in notebooks/py_scripts/00_Setup.py

View workflow job for this annotation

GitHub Actions / Check for spelling errors

befor ==> before
#
# ```python
# import datajoint as dj
# dj.load('/path/to/config')
# import spyglass
# ```

# ### Running your own database
#
Expand Down

0 comments on commit 1848da3

Please sign in to comment.