Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/LorenFrankLab/spyglass in…
Browse files Browse the repository at this point in the history
…to dev
  • Loading branch information
CBroz1 committed Nov 7, 2023
2 parents f547efd + 1e66ad4 commit 13f8e13
Show file tree
Hide file tree
Showing 7 changed files with 223 additions and 93 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/test-package-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,19 @@ jobs:
# - name: Run tests
# run: pytest --doctest-modules -v --pyargs spyglass
publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
needs: [test-package]
environment:
name: pypi
url: https://pypi.org/p/spyglass-neuro
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v3
with:
name: dist
path: dist/
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
11 changes: 9 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,18 @@
"files.trimFinalNewlines": true,
"editor.multiCursorModifier": "ctrlCmd",
"autoDocstring.docstringFormat": "numpy",
"python.formatting.provider": "none",
"remote.SSH.remoteServerListenOnSocket": true,
"git.confirmSync": false,
"python.analysis.typeCheckingMode": "off",
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
},
},
"isort.args": [
"--profile",
"black"
],
}
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

- Migrate `config` helper scripts to Spyglass codebase. #662
- Revise contribution guidelines. #655
- Minor bug fixes. #656, #657, #659, #651
- 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 before 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 before importing Spyglass.
#
# ```python
# import datajoint as dj
# dj.load('/path/to/config')
# import spyglass
# ```

# ### Running your own database
#
Expand Down
Loading

0 comments on commit 13f8e13

Please sign in to comment.