Skip to content
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

Merged
merged 2 commits into from
Apr 10, 2017

Conversation

rhyolight
Copy link
Member

@rhyolight rhyolight commented Apr 10, 2017

Fixes #3529

Added "Contributing" guide, points to CONTRIBUTING.md.
Added style guides for python, c, and cmake.

@rhyolight rhyolight requested a review from scottpurdy April 10, 2017 18:07
@rhyolight
Copy link
Member Author

@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.

@rhyolight
Copy link
Member Author

cc @marionleborgne

Copy link
Contributor

@scottpurdy scottpurdy left a 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
Copy link
Contributor

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# ----------------------------------------------------------------------
```

In the date, include any years in which the code was modified, e.g. "2006-2009", "2006, 2008, 2010".
Copy link
Contributor

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`.
Copy link
Contributor

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.

@rhyolight
Copy link
Member Author

Thank you @scottpurdy

@rhyolight rhyolight merged commit ec0cbd4 into numenta:master Apr 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants