-
Notifications
You must be signed in to change notification settings - Fork 27
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
naming & directories #19
Comments
Happy to use named and not * imports for this. For Brian we use * because we want to encourage absolute beginners, and because with lots of unit names it makes sense, but it's not the right approach here. I'm happy with spikeloc because I don't see it as being a heavily overloaded name, but still descriptive enough. No strong feelings about directory structure so happy to go with @tfiers suggestion unless @synek or @ghoshm want to argue otherwise? |
I think it makes sense to name the directory something self-explanatory, and Regarding In general, I don't think we should break open source conventions to "make things easier" for people. One of the goals of this project (I assume) is that participants learn how to collaborate on Github, and that includes learning the conventions of open source. If we teach them that code goes into |
I still have no strong feelings! |
My proposal is to just stick with what we already have because it's there and I'd like to make progress! OK with everyone? |
This is part of my review of the already merged #2; so see there for context.
Package name: spikeloc sounds good.
I solved the described problem (descriptive package name vs not wanting to have a long name repeated lots in a notebook using it) in my own PhD project by using an import alias:
import voltage_to_wiring_sim as v
(and thenv.simulate(…
).You can then go as descriptive as you want (tab-completion in jupyter obsoletes typing long names in full).
Maybe go all the way in descriptiveness with
shared_code_for_comob_snn_soundloc_project
? :pInstead of an import alias we can also go Brian-y and do
from [our_package] import *
, which is generally considered unpythonic, but for a jupyter notebook and homemade code with carefully curated automatic exports is fine. On the other hand, the big advantage of having namespaced objects is tab-completion:v.<tab>
, and you get a list of the functions and types you can use. I.e. free api discoverability. (Has proved very useful, even if you wrote the package yourself!).Directory names:
I propose naming the top level dir for shared code
shared-code
(orcommon-code
,code
, sth like that).Someone reading the directory names then knows what's what (
notebooks
,shared-code
,web
).The
pyproject.toml
/setup.py
and package directory can then go inside that folder:For
notebooks/
, I was thinking people can also contribute just markdown filesinstead of an
.ipynb
: JupyterBook builds these as well.(They extended the common markdown with cross-references, citations, etc: 'MyST').
Use case I'm thinking of is e.g. someone doing a small lit review on a sub-topic.
(We could even draft parts of the paper, or the whole thing, in .md files compiled by JupyterBook).
Given that (namely that there's not only Jupyter Notebooks), maybe the dir name should change.
(
notes
,work
,output
,research-morsels
? :p). Butnotebooks/
is probablyfine even when there's
.md
s in there.The text was updated successfully, but these errors were encountered: