Add module checklist

parent e9bbb366
# Module Checklist for ESDW 1
Here's a list of the things you should make sure you've completed in your
module.
## In your code
- [ ] Complete the main goals of your project
- [ ] Add docstrings in the
[numpydoc](https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt) format
- [ ] Add nosetests (can you get 100% coverage?)
(Optional)
- [ ] Add an example (strongly recommended!)
- [ ] Make your repository installable by organizing it and creating a
`setup.py` (see below)
## In the E-CAM Classical-MD-Modules repository
- [ ] Change the module link name (originally `.. _ost_example:` at the top
of the file; change the `ost_example` part)
- [ ] Add a brief description (a couple lines) at the top of your module
- [ ] Add a detailed description in the "Purpose of Module" section. Feel
free to include references here.
- [ ] Add an example, if you have one
- [ ] Un-comment the lines under "IF YOUR MODULE IS IN A SEPARATE
REPOSITORY" in "Testing" and in "Source Code"
- [ ] Add the GitLab URL for your module to the "Source Code" section.
---
<!-- BREAK -->
## Organizing your module directory (and `setup.py`)
To organize your modules, we recommend the following directory structure
```None
module_on_git/
setup.py
examples/
module_name/
__init__.py
source_code.py
tests/
__init__.py
test_source_code.py
docs/ # optional
```
(Technicality: in Python, a "module" is a file. What we're calling a module
is, in Python, called a "package.")
In the above `module_on_git` is the same as the name of your GitLab
repository, and `module_name` is the name you'll import your module with in
Python (i.e., `import module_name`). Often these are the same.
Of course `source_code.py` is whatever you name your source files, and
`test_source_code.py` is the test (and there's likely to be more that one of
each of those).
The `__init__.py` should consists of imports of things you want to have in
the main namespace. For example, if you want to be able to access a class
`MyClass` as `module_name.MyClass`, you would add the line:
```python
from source_code import MyClass
```
The other names, like `examples`, `docs`, should be exactly as they are
there `setup.py`.
To prepare a `setup.py` file, you can download the example at:
* https://github.com/dwhswenson/OPSPiggybacker/blob/master/setup.py
Modify that to have your name, your email address, and your module's name.
Once that's done, you should be able to install your newly created package
by switching to the directory that contains `setup.py` and running:
```
python setup.py develop
```
After that completes, test that your module was successful set up by
switching to your home directory, starting Python, and importing your
package.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment