Git Product home page Git Product logo

cookiecutter-sveetch-python's People

Contributors

sveetch avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

cookiecutter-sveetch-python's Issues

Improve README

Copy the new README structure from the djangoapp cookiecutter.

Stop building RTD documentation from package install

Currently, the requirement file in docs/ directory (that is used only by RTD in their building config) use the package extra dev requirement:

https://github.com/sveetch/cookiecutter-sveetch-python/blob/master/%7B%7Bcookiecutter.package_name%7D%7D/docs/requirements.txt#L1

This is wrong, because it force RTD to install application package to get dev requirement. Since the first RTD build job is to clone repository, it does not have any sense to use the package in the RTD building process because it does not reflect what could be in a new version from the repository (either master or any other branch).

Commonly this does not make troubles, but once there is build failure related to requirement or package, it make things really hard to debug.

Solution

  • Assume documentation build is something out of package setup and remove "doc" extra requirements from setup.cfg;
  • Move doc requirements directly in docs/requirements.txt;
  • Update Makefile to include additional docs/requirements.txt after all package setup requirements;

PACKAGE_NAME in Makefile maybe wrong

It is used in clean-install command to remove the egg-info file.

But in a egg-info file name the character - is replace by _, which is not done in the package name created from the cookiecutter.

New variable PACKAGE_SLUG=echo $(PACKAGE_NAME) | tr '-' '_'`` should be added and used in clean-install instead of `PACKAGE_NAME`.

Move to "modern packaging" config with 'pyproject.toml'

Since pyproject.toml have been largely adopted since the introduction in a PEP, this is time to move, even setuptools now is starting to warn about setup.cfg, so there is no more a real choice.

The TOML config file is the official new way to go since it has been validated in a PEP. However it seems not totally ready yet because of some very common packages having troubles with it:

There is a summary of common packaging tools that does not support yet the TOML config:

https://github.com/flying-sheep/awesome-python-packaging

In opposite, there is a few package now that does not support setup.cfg or even their proprietary config file like .flake8. Black is one these package, it only supports for TOML configuration and nothing else, which currently would requires to have a pyproject.toml to hold its configuration.

The benefits of TOML files are just not enough yet to migrate to it, this issue will still remain opened until Python ecosystem has resolved it, especially Flake and PIP.

Other useful discussion links related to this subject:

Define 'project_urls' option in package config

This should be something like this in a setup.py:

    project_urls={
        "Changelog": "https://github.com/THE_REPO/THE_PACKAGE/blob/main/CHANGELOG.rst",
        "Issue Tracker": "https://github.com/THE_REPO/THE_PACKAGE/issues",
        "Discussions": "https://github.com/THE_REPO/THE_PACKAGE/discussions",
        "Documentation": "https://THE_PACKAGE.readthedocs.io/",
    },

But to adapt to setup.cfg or pyproject.toml format (depending adopted pkg configuration at the moment of working on this issue)

Remove deprecated encoding file start

The encoding file start is deprecated:

# -*- coding: utf-8 -*-

It's useless since Python3, only for Python2 that is out of scope now. Remove this from every modules.

Tasks for 0.4.0

Todo cookie

  • Use private setting like _cookie_sveetch_python_version in cookiecutter.json to write the current cookie version
  • Add make project to build in dist/
  • Add cookiebaked.json ?

Todo template

  • #12
  • #11
  • #9
  • Upgrade application __init__.py to the modern way to load version;
  • Upgrade documentation to a new theme, improved sphinx_reload script and move it into docs/
  • Improve Makefile (suffix bin path variables with _BIN and add missing var PYTHON_BIN)
  • Include README in docs/index instead of duplicating it
  • Don't test all supported Python version in tox config, only the min and max
  • Split extra requirements into various accurate extra spaces (dev, quality, release, etc..) to avoid making Tox installing useless stuff (like Flake8) for testing;
  • Flake task should be something like $(FLAKE_BIN) --statistics --show-source $(APPLICATION_NAME) tests (add statistics and use a single job for app and tests lint)

Finally

  • Update repository sample with 0.4.0

CLI for hello

With arguments for "name", format (plain or html) and possible "container" (only for html).

Then test it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.