-
Notifications
You must be signed in to change notification settings - Fork 52
Startup quickfixes #1430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Startup quickfixes #1430
Changes from 5 commits
d652e22
73f72f1
5daa67a
10773cc
934dbed
6680983
644bfd3
06a1675
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,4 +39,5 @@ dependencies: | |
| - pip: | ||
| - ghostipy # for common_filter | ||
| - mountainsort4 | ||
| - kachery-cloud | ||
| - . | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,4 +39,5 @@ dependencies: | |
| - pip: | ||
| - ghostipy # for common_filter | ||
| - mountainsort4 | ||
| - kachery-cloud | ||
| - .[dlc] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,4 +39,5 @@ dependencies: | |
| - pip: | ||
| - ghostipy # for common_filter | ||
| - mountainsort4 | ||
| - kachery-cloud | ||
| - .[moseq-cpu] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,4 +39,5 @@ dependencies: | |
| - pip: | ||
| - ghostipy # for common_filter | ||
| - mountainsort4 | ||
| - kachery-cloud | ||
| - .[moseq-gpu] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -502,30 +502,48 @@ | |
| "metadata": {}, | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line #17. "database.host": "lmf-db.cin.ucsf.edu", Do we want this to be specific to our database? Reply via ReviewNB
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, sorry. this should be the |
||
| "outputs": [], | ||
| "source": [ | ||
| "import os\n", | ||
| "import datajoint as dj\n", | ||
| "from spyglass.settings import SpyglassConfig\n", | ||
| "\n", | ||
| "# change to the root directory of the project\n", | ||
| "if os.path.basename(os.getcwd()) == \"notebooks\":\n", | ||
| " os.chdir(\"..\")\n", | ||
| "username = \"your username\" # replace with username made for you in the spyglass database\n", | ||
| "initial_password = (\n", | ||
| " \"your initial password\" # replace with the initial password given to you\n", | ||
| ")\n", | ||
| "new_password = (\n", | ||
| " \"your new password\" # replace with the new password you want to set\n", | ||
| ")\n", | ||
| "spyglass_base_dir = \"/path/like/stelmo/nwb/\" # replace with a path on your system where spyglass can store NWB files\n", | ||
| "database_host = \"address like: 'localhost' or 'lmf-db.cin.ucsf.edu'\"\n", | ||
| "\n", | ||
| "# connect to the database\n", | ||
| "dj.conn()\n", | ||
| "\n", | ||
| "# change your password\n", | ||
| "dj.admin.set_password()\n", | ||
| "dj.config.update(\n", | ||
| " {\n", | ||
| " \"database.host\": \"lmf-db.cin.ucsf.edu\",\n", | ||
edeno marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| " \"database.user\": username,\n", | ||
| " \"database.password\": initial_password,\n", | ||
| " \"database.port\": 3306,\n", | ||
| " }\n", | ||
| ")\n", | ||
| "\n", | ||
| "dj.conn() # connect to the database\n", | ||
| "\n", | ||
| "# change your password from the initial password\n", | ||
| "dj.admin.set_password(new_password, update_config=True)\n", | ||
| "\n", | ||
| "# save the configuration\n", | ||
| "SpyglassConfig().save_dj_config(\n", | ||
| " save_method=\"local\", # global or local\n", | ||
| " base_dir=\"/path/like/stelmo/nwb/\",\n", | ||
| " database_user=\"your username\",\n", | ||
| " database_password=\"your password\", # remove this line for shared machines\n", | ||
| " database_host=\"localhost or lmf-db.cin.ucsf.edu\", # only list one\n", | ||
| " save_method=\"global\", # global or local\n", | ||
| " base_dir=spyglass_base_dir,\n", | ||
| " database_user=username,\n", | ||
| " database_password=new_password,\n", | ||
| " database_host=database_host, # only list one\n", | ||
| " database_port=3306,\n", | ||
| " set_password=False,\n", | ||
| ")" | ||
| ")\n", | ||
| "\n", | ||
| "# ensure the configuration is saved for future use\n", | ||
| "dj.config.save_global()\n", | ||
| "dj.config.save_local()" | ||
| ] | ||
| }, | ||
| { | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -5,7 +5,7 @@ | |||||||||||
| # extension: .py | ||||||||||||
| # format_name: light | ||||||||||||
| # format_version: '1.5' | ||||||||||||
| # jupytext_version: 1.17.0 | ||||||||||||
| # jupytext_version: 1.17.2 | ||||||||||||
| # kernelspec: | ||||||||||||
| # display_name: spyglass | ||||||||||||
| # language: python | ||||||||||||
|
|
@@ -426,30 +426,48 @@ | |||||||||||
| # | ||||||||||||
|
|
||||||||||||
| # + | ||||||||||||
| import os | ||||||||||||
| import datajoint as dj | ||||||||||||
| from spyglass.settings import SpyglassConfig | ||||||||||||
|
|
||||||||||||
| # change to the root directory of the project | ||||||||||||
| if os.path.basename(os.getcwd()) == "notebooks": | ||||||||||||
CBroz1 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||
| os.chdir("..") | ||||||||||||
| username = "your username" # replace with username made for you in the spyglass database | ||||||||||||
| initial_password = ( | ||||||||||||
| "your initial password" # replace with the initial password given to you | ||||||||||||
| ) | ||||||||||||
| new_password = ( | ||||||||||||
| "your new password" # replace with the new password you want to set | ||||||||||||
| ) | ||||||||||||
| spyglass_base_dir = "/path/like/stelmo/nwb/" # replace with a path on your system where spyglass can store NWB files | ||||||||||||
| database_host = "address like: 'localhost' or 'lmf-db.cin.ucsf.edu'" | ||||||||||||
|
|
||||||||||||
|
|
||||||||||||
| # connect to the database | ||||||||||||
| dj.conn() | ||||||||||||
| dj.config.update( | ||||||||||||
| { | ||||||||||||
| "database.host": "lmf-db.cin.ucsf.edu", | ||||||||||||
edeno marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||
| "database.user": username, | ||||||||||||
| "database.password": initial_password, | ||||||||||||
| "database.port": 3306, | ||||||||||||
| } | ||||||||||||
| ) | ||||||||||||
|
|
||||||||||||
| dj.conn() # connect to the database | ||||||||||||
|
|
||||||||||||
| # change your password | ||||||||||||
| dj.admin.set_password() | ||||||||||||
| # change your password from the initial password | ||||||||||||
| dj.admin.set_password(new_password, update_config=True) | ||||||||||||
|
|
||||||||||||
| # save the configuration | ||||||||||||
| SpyglassConfig().save_dj_config( | ||||||||||||
| save_method="local", # global or local | ||||||||||||
| base_dir="/path/like/stelmo/nwb/", | ||||||||||||
| database_user="your username", | ||||||||||||
| database_password="your password", # remove this line for shared machines | ||||||||||||
| database_host="localhost or lmf-db.cin.ucsf.edu", # only list one | ||||||||||||
| save_method="global", # global or local | ||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would remove this line, let it use the default, global |
||||||||||||
| base_dir=spyglass_base_dir, | ||||||||||||
| database_user=username, | ||||||||||||
| database_password=new_password, | ||||||||||||
| database_host=database_host, # only list one | ||||||||||||
| database_port=3306, | ||||||||||||
| set_password=False, | ||||||||||||
| ) | ||||||||||||
|
|
||||||||||||
| # ensure the configuration is saved for future use | ||||||||||||
| dj.config.save_global() | ||||||||||||
| dj.config.save_local() | ||||||||||||
CBroz1 marked this conversation as resolved.
Show resolved
Hide resolved
Comment on lines
+469
to
+470
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because
Suggested change
|
||||||||||||
| # - | ||||||||||||
|
|
||||||||||||
| # <details><summary>Legacy config</summary> | ||||||||||||
|
|
||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,6 +44,7 @@ dependencies = [ | |
| # "ghostipy", # removed from list bc M1 users need to install pyfftw first | ||
| "hdmf>=3.4.6", | ||
| "ipympl", | ||
| "kachery-cloud", | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this need to be in |
||
| "matplotlib", | ||
| "ndx_franklab_novela>=0.1.0", | ||
| "ndx-pose", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.