Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #105267 > unrolled thread

Python boilerplate

Started byFernando Felix do Nascimento Junior <fernandojr.ifcg@live.com>
First post2016-03-19 05:43 -0700
Last post2016-03-19 12:28 -0500
Articles 4 — 3 participants

Back to article view | Back to comp.lang.python


Contents

  Python boilerplate Fernando Felix do Nascimento Junior <fernandojr.ifcg@live.com> - 2016-03-19 05:43 -0700
    Re: Python boilerplate Fernando Felix do Nascimento Junior <fernandojr.ifcg@live.com> - 2016-03-20 16:36 -0700
      Re: Python boilerplate Chris Warrick <kwpolska@gmail.com> - 2016-03-21 17:03 +0100
    Re: Python boilerplate Sam <python@net153.net> - 2016-03-19 12:28 -0500

#105267 — Python boilerplate

FromFernando Felix do Nascimento Junior <fernandojr.ifcg@live.com>
Date2016-03-19 05:43 -0700
SubjectPython boilerplate
Message-ID<17c30829-4d9e-49ab-ad93-acc217a55aee@googlegroups.com>
A simple boilerplate for those who don't know the structure of a project. https://goo.gl/lJRvS6

## Features

* Build and distribute with setuptools
* Check code style with flake8
* Make and run tests with pytest
* Run tests on every Python version with tox
* Code coverage with coverage.py

## Structure

Structure of the project in tree format.

├── CONTRIBUTING.md
├── LICENSE
├── Makefile
├── MANIFEST.in
├── module_name.py
├── README.md
├── requirements
│   ├── dev.txt
│   └── prod.txt
├── requirements.txt
├── setup.cfg
├── setup.py
├── tests.py
└── tox.ini

Fernando Felix

[toc] | [next] | [standalone]


#105317

FromFernando Felix do Nascimento Junior <fernandojr.ifcg@live.com>
Date2016-03-20 16:36 -0700
Message-ID<61c94e82-8bcc-4855-a856-468bcadfe486@googlegroups.com>
In reply to#105267
@all

I released version 1.0.0 with a tiny glossary and explanation of each file in the boilerplate.

@Chris

I made the boilerplate with intent that everyone can understand, download and use quickly. So, I didn't put extra dependence like cookiecutter (that depends jinja, that depends markupsafe) to **just** replace fields and then run the project.

I also preferred to use .md instead .rst because it's more clean in my opinion and used by default in platforms like GitHub and Stackoverflow. See mkdocs to generate documentation with markdown.

In same way, I choose pytest because the default test framework is verbose and its CamelCase sux.

About entry_points maybe I'll consider it too, but I didn't understand why packages are best than modules... both can be reusable and not every project needs packages.

I looked your release shell script. It's very nice. In Flask GitHub repository has a pretty nice too. See it ~scripts/make-release.py.


Thanks,

[toc] | [prev] | [next] | [standalone]


#105367

FromChris Warrick <kwpolska@gmail.com>
Date2016-03-21 17:03 +0100
Message-ID<mailman.445.1458576196.12893.python-list@python.org>
In reply to#105317
On 21 March 2016 at 00:36, Fernando Felix do Nascimento Junior
<fernandojr.ifcg@live.com> wrote:
> I made the boilerplate with intent that everyone can understand, download and use quickly. So, I didn't put extra dependence like cookiecutter (that depends jinja, that depends markupsafe) to **just** replace fields and then run the project.

I used “replace manually” before, and it was painful.

> I also preferred to use .md instead .rst because it's more clean in my opinion and used by default in platforms like GitHub and Stackoverflow. See mkdocs to generate documentation with markdown.

The vast majority of the Python community uses Sphinx and reST. In
fact, that’s the only thing accepted on readthedocs.org, which is a
popular documentation platform.

> I didn't understand why packages are best than modules... both can be reusable and not every project needs packages.

It might not need it today, but it will probably grow. At which point
you will notice that a module is not enough. You can also easily
separate code with packages.

-- 
Chris Warrick <https://chriswarrick.com/>
PGP: 5EAAEA16

[toc] | [prev] | [next] | [standalone]


#105349

FromSam <python@net153.net>
Date2016-03-19 12:28 -0500
Message-ID<mailman.436.1458559712.12893.python-list@python.org>
In reply to#105267
On 03/19/2016 07:43 AM, Fernando Felix do Nascimento Junior wrote:
> A simple boilerplate for those who don't know the structure of a project. https://goo.gl/lJRvS6
>
> ## Features
>
> * Build and distribute with setuptools
> * Check code style with flake8
> * Make and run tests with pytest
> * Run tests on every Python version with tox
> * Code coverage with coverage.py
>
> ## Structure
>
> Structure of the project in tree format.
>
> ├── CONTRIBUTING.md
> ├── LICENSE
> ├── Makefile
> ├── MANIFEST.in
> ├── module_name.py
> ├── README.md
> ├── requirements
> │   ├── dev.txt
> │   └── prod.txt
> ├── requirements.txt
> ├── setup.cfg
> ├── setup.py
> ├── tests.py
> └── tox.ini
>
> Fernando Felix
>


There is this too: https://pypi.python.org/pypi/python_boilerplate_template


--Sam

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web