Git Product home page Git Product logo

cookiecutter-sveetch-djangoapp's People

Contributors

sveetch avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

thehawk3r synw

cookiecutter-sveetch-djangoapp's Issues

Tasks for 0.6.0 version

Taken from cookiecutter-sveetch-python 0.4.0 changelog, here is a list of tasks to improve project template. Some of original tasks have been removed (useless) and some few added.

  • [cookie] Started this history changelog;
  • [cookie] Added _cookiecutter_sveetch_python_version variable to
    cookiecutter.json for versioning template;
  • [cookie] Upgraded to cookiecutter>=2.3.0;
  • [cookie] Added Makefile task project to create projects in dist/;
  • [cookie] Added a new option init_git_repository to enabled for automatic GIT
    repository initialization on created project;
  • [cookie] Added a post hook to manage API files removing and GIT initialization
    depending options;
  • [cookie] Removed requirement to jinja2-time;
  • [template] Fixed project test configuration;
  • [template] Removed support for Python 3.6 and 3.7;
  • [template] Updated .readthedocs.yml file to follow service deprecations changes;
  • [template] Added cookiebaked.json to include used context in created project;
  • [template] Defined project_urls option in package setup;
  • [template] Removed deprecated encoding file start;
  • [template] Fixed command line documentation;
  • [template] Upgraded application __init__.py to the modern way to load version;
  • [template] Upgraded documentation to a new theme, improved sphinx_reload script and
    moved it into docs/;
  • [template] Improved Makefile (better variable names and enabled ANSI color usage on
    task titles);
  • [template] Included README in docs/index.rst instead of managing the same content
    twice;
  • [template] Don't test all supported Python version in Tox config, only the min and
    max ones;
  • [template] Splited extra requirements into various accurate extra spaces (dev,
    quality, release, etc..) to avoid making Tox installing useless stuff (like Flake8)
    for testing;
  • [template] Improved flake task to include statistics and running everything (code
    and tests) in a single job;
  • [template] Fixed exceptions.py to define class names named from package instead
    of dummy MyApp;

Create package sample

Create repository sveetch-djangoapp-sample and package release for a sample from this cookie template.

Frontend cleaning tasks are not conditionnated

When creating a project without Frontend options, some frontend cleaning tasks are still present in Makefile from meta task clean:

  • clean-frontend-install
  • clean-frontend-build

Makefile should lack of condition around these names in clean task so they don't appear in resulting Makefile without frontend option.

Cookiecutter version support

Since we are waiting for cookiecutter 2.x release to leverage support version we are still fixed to 1.7.x, so we should add a note about this on README.

Option to rewrite relative package imports to absolute

This template is fine to build packaged applications however it could be more useful if it could be able to generate code with absolute path.

Relative import in code makes it not so easy to include generated application code into an existing Django project (when the application code is just copied and pasted into a project tree). It can work for some project but there is many case when it won't and for this, using absolute import path would makes it easier.

It would need two things:

  • Rewrite all package relative imports to absolute starting with application module name;
  • Optional prefix to add before the application module name for projects which hold their application inside another module instead of being directly defined in sys.path;

So for a package with application name dummy , these relative paths from module dummy/sample.py:

import .foo
from .bar import ping

(so it imports dummy/foo.py and dummy/bar.py)

Would be turned to:

import dummy.foo
from dummy.bar import ping

And if optional prefix project is given it would be turned to:

import project.dummy.foo
from project.dummy.bar import ping

This should be applied to application code since test already used absolute path, however it is the package application absolute path so the prefix would be missing, but it would require a different rewriter to apply, i consider this is not important for now.

Concerns

Relative path may be not so simple to resolve in some cases, it need to be studied.

Alternative

I though some Python would already exists for this kind of import rewriting but it seems not. I searched on isort, something has been thinked in an issue but it is still opened and not implemented.

I've also found a tool like https://github.com/MarcoGorelli/absolufy-imports but it is not maintained anymore, maybe we could at least use some part of its code.

Add makefile tasks to build PO and MO files

Actually the Makefile from generated package does not include any useful task to create or update PO and MO files from application.

Since README says package will include every useful commands, these tasks should be shipped in Makefile.

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.