-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[NUP-2399] Added style guides to new guide #3528
Conversation
@scottpurdy I fixed quite a few markdown issues, but I did not fully review the content for accuracy. I did remove things that were obviously obsolete. |
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.
Not sure if you're looking for content review but I put a few things in. I'd like the guides to go to a repo-agnostic location on numenta.org at some point but this is a nice improvement over the wiki!
|
||
## File Layout | ||
|
||
### Executables |
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.
We have changed this. Now, executables should be specified in setup.py
but are otherwise just functions somewhere in the project.
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.
You could put a link to here:
http://setuptools.readthedocs.io/en/latest/setuptools.html#automatic-script-creation
# ---------------------------------------------------------------------- | ||
``` | ||
|
||
In the date, include any years in which the code was modified, e.g. "2006-2009", "2006, 2008, 2010". |
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.
I think we avoid the comma-separated list since it can get very long. I think the recommendation should always be "YYYY" for single year or "YYYY-YYYY" for the first and last year of modification.
|
||
### Tests | ||
|
||
Do not include tests in source files. All tests should be in a tests package inside the top-level Python package. So in NuPIC, `nupic.tests` should contain all tests. This allows test utilities and base tests to be imported by tests. Nothing outside `nupic.tests` should import modules inside `nupic.tests`. |
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.
We also backed off on this and just have a "tests" directory outside the top level Python namespace.
Thank you @scottpurdy |
Fixes #3529
Added "Contributing" guide, points to CONTRIBUTING.md.
Added style guides for python, c, and cmake.