-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
78ef6f0
commit 70194ac
Showing
7 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Mother Dough | ||
|
||
A mother dough for baking the most delicious python project. | ||
Inspired by [Kenneth's blog](https://www.kennethreitz.org/essays/repository-structure-and-python). | ||
|
||
## Structure | ||
TODO: describe file structure here | ||
|
||
How should I name directories and packages? | ||
[PEP8](https://www.python.org/dev/peps/pep-0008/#package-and-module-names) discourages the use of underscores in package names. | ||
Although Guido in the [Google Style doc](https://google.github.io/styleguide/pyguide.html?showone=Naming#Naming) recommends underscores for longer names. In either case, packages should be lowercase. | ||
|
||
## Setup.py | ||
|
||
Why bother? [setup.py](http://setuptools.readthedocs.io/en/latest/setuptools.html#basic-use) allows you to pip install your repo as a package so you can test and reuse code across your module without relative paths. For example, | ||
`from motherdough import ferment` works anywhere in your project (even tests). To install your repo as a package, run: | ||
|
||
```bash | ||
pip install -e . | ||
``` | ||
pip uses the setup.py file settings to install the package. | ||
|
||
## Development Style Guide | ||
|
||
A good set of [best practices](https://gist.github.com/sloria/7001839) to follow | ||
|
||
### Automatic Style Checks | ||
* [pycodestyle](https://github.com/PyCQA/pycodestyle): enforces PEP8, without being too picky. | ||
* [pylint](https://www.pylint.org/): covers much more than PEP8, but is absurdly picky out-of-the-box (not always with good reason). |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
def howdy(): | ||
return "hi" |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
def ferment(): | ||
return "fermented" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
""" | ||
Describes code as a package that pip can install | ||
""" | ||
|
||
from setuptools import setup, find_packages | ||
|
||
setup( | ||
# does not impact import name | ||
name='python-mother-dough' | ||
packages=find_packages(exclude=('tests', 'docs')), | ||
) |
Empty file.