py-struct
is a yeoman-generator for Python
projects using setuptools
. Projects created with py-struct
are ready for publication to pypi
and conda
. The generator creates a package barebone that support:
- a standard
setup.py
,MANIFEST.in
. - project automationg
tox
. - static code analysis and reports using
pylint
. - a unit-test suite using
pytest/unittest
, -
build.sh
forconda
packages, - documentation with
readthedocs.io
andsphinx
, - custom README.md, and VERSIONS.md files,
-
.gitignore
,.gitattributes
,coveragerc
,
The resulting folder-structure looks like this:
.
├── build.sh
├── credentials.json
├── docs
│ ├── Makefile
│ └── source
│ ├── conf.py
│ ├── examples.rst
│ ├── index.rst
│ ├── modules.rst
│ └── tutorial.rst
├── emptyproject.py
├── gitattributes
├── gitignore
├── __init__.py
├── LICENSE
├── MANIFEST.in
├── prepare_environment.sh
├── pylintrc
├── README.rst
├── run_test.sh
├── setup.py
├── test.py
├── tree
└── VERSIONS.md
Yeoman comes with npm
, so install it first and then call:
npm install -g yo
npm install -g generator-py-struct
Once you have the package, you can create a scaffold using:
yo py-struct
This builds the skeleton. Afterwards modify the sources and documentation and build both using:
./prepare_environment.sh
cd docs && make html
- Cristian Rincón cristian.o.rincon.b@gmail.com