Code Monkey home page Code Monkey logo

zillionare / python-project-wizard Goto Github PK

View Code? Open in Web Editor NEW
119.0 3.0 96.0 1.05 MB

A tool for creating skeleton python project, built with popular develop tools and conform to best practice.

Home Page: https://zillionare.github.io/python-project-wizard/

License: BSD 3-Clause "New" or "Revised" License

Python 85.47% Smarty 2.80% Shell 11.73%
cookiecutter cookiecutter-template starter-kit startertemplate template boilerplate boilerplate-template scaffold python flake8

python-project-wizard's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

python-project-wizard's Issues

let tox to install package under testing by poetry

now tox in ppw will install package under testing by itself, using pip, this will somehow cause dep resolving again. Since poetry is introduced, it's better to let poetry do the chores and tox should depends on poetry to create the testing env.

How to import modules in CookieCutter's style?

  • Date you used Cookiecutter PyPackage:today
  • Cookiecutter version used, if any:2.1.1
  • Python version, if any:3.9
  • Operating System:Windows11

Description

I want to develop something with ppw,however I can't import modules which is named to {{…}} in intellij idea with python plugin.
图片
how to solve this problem?

What I Did

Paste the command(s) you ran and the output.

config repo secrets by script

it's tedious to config repo's secrets, especially when you have many to be configured. This should be automated by scripts -- using github cli gh.

ModuleNotFoundError: No module named 'pkg_resources'

  • Date you used Cookiecutter PyPackage:
  • Cookiecutter version used, if any:
  • Python version, if any:
  • Operating System:

Description

ModuleNotFoundError: No module named 'pkg_resources'

What I Did

Paste the command(s) you ran and the output.

broken url of history

url in mail notification " please check change history at https://..." is wrong, it should contains version number, otherwise, it'll reach 404 page

CI doesn't support 3.10

when use python 3.10, at

        with:
          python-version: ${{ matrix.python-versions }}

3.10 is recognized as 3.1 thus the action failed

mkdocs colour toggle option

  • Date you used Cookiecutter PyPackage: 15/6/21
  • Python version, if any: 3.7
  • Operating System: Ubuntu

Description

Hi I was trying to setup a dark mode light mode toogle as per the mkdocs documentation so I basically replaced the following in mkdocs.yml

   palette:
     primary: light blue

with this

  palette:
    - scheme: default
      primary: indigo
      accent: indigo
      toggle:
        icon: material/toggle-switch-off-outline
        name: Switch to dark mode
    - scheme: slate
      primary: red
      accent: red
      toggle:
        icon: material/toggle-switch
        name: Switch to light mode

However, this doesn't work and the toggle is not displayed. Do you have an idea as to why this happens?

ppw init_dev failed

version 1.3.2

exception:

  EnvCommandError

  Command ['/home/aaron/miniconda3/envs/cheese/bin/python', '-m', 'pip', 'install', '--use-pep517', '--disable-pip-version-check', '--isolated', '--no-input', '--prefix', '/home/aaron/miniconda3/envs/cheese', '--no-deps', '/home/aaron/.cache/pypoetry/artifacts/a5/c6/8e/787aeae2abb2e89ea98a95e4a3122303096e22cdb2a47ef6a483e106d1/fire-0.4.0.tar.gz'] errored with the following return code 1, and output: 
  Processing /home/aaron/.cache/pypoetry/artifacts/a5/c6/8e/787aeae2abb2e89ea98a95e4a3122303096e22cdb2a47ef6a483e106d1/fire-0.4.0.tar.gz
    Installing build dependencies: started
    Installing build dependencies: finished with status 'error'
    error: subprocess-exited-with-error
    
    × pip subprocess to install build dependencies did not run successfully.
    │ exit code: 1
    ╰─> [2 lines of output]
        ERROR: Could not find a version that satisfies the requirement setuptools>=40.8.0 (from versions: none)
        ERROR: No matching distribution found for setuptools>=40.8.0
        [end of output]
    
    note: This error originates from a subprocess, and is likely not a problem with pip.
  error: subprocess-exited-with-error
  
  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  

  at ~/miniconda3/envs/cheese/lib/python3.8/site-packages/poetry/utils/env.py:1540 in _run
      1536│                 output = subprocess.check_output(
      1537│                     command, stderr=subprocess.STDOUT, env=env, **kwargs
      1538│                 )
      1539│         except CalledProcessError as e:
    → 1540│             raise EnvCommandError(e, input=input_)
      1541│ 
      1542│         return decode(output)
      1543│ 
      1544│     def execute(self, bin: str, *args: str, **kwargs: Any) -> int:

The following error occurred when trying to handle this error:


  PoetryException

  Failed to install /home/aaron/.cache/pypoetry/artifacts/a5/c6/8e/787aeae2abb2e89ea98a95e4a3122303096e22cdb2a47ef6a483e106d1/fire-0.4.0.tar.gz

  at ~/miniconda3/envs/cheese/lib/python3.8/site-packages/poetry/utils/pip.py:58 in pip_install
       54│ 
       55│     try:
       56│         return environment.run_pip(*args)
       57│     except EnvCommandError as e:
    →  58│         raise PoetryException(f"Failed to install {path.as_posix()}") from e

seems it's python-fire's issue

add email notification upon build success

add email notification when build success, using 'dawidd6/action-send-mail@v3'

this action requires the following secrets to be configured:

gh secret set BUILD_NOTIFY_MAIL_SERVER --body $BUILD_NOTIFY_MAIL_SERVER
gh secret set BUILD_NOTIFY_MAIL_FROM --body $BUILD_NOTIFY_MAIL_FROM
gh secret set BUILD_NOTIFY_MAIL_PASSWORD --body $BUILD_NOTIFY_MAIL_PASSWORD
gh secret set BUILD_NOTIFY_MAIL_RCPT --body $BUILD_NOTIFY_MAIL_RCPT

gh is a tool created by github

doc: toc baselevel should start with 2

according to HTML's spec, each document should have only one H1/Article, so your markdown should contains only on '#' and toc should started with '2'.

merge test, dev and doc into one

currently ppw seperate extra dependency into test, dev and doc. Poetry prefer to using dev alone and it could be best practice

Support for fast-forwarding with Cruft

Hi,

This looks like a neat offshoot of cookiecutter! I'm wondering if you would consider integrating the capabilities of cruft into the ppw package?

cruft works by fast-forwarding projects from cookiecutter templates to reflect upstream changes in the template, i.e.: if the boilerplate has advanced and added features, cruft will apply those changes (to the best of its ability; will generate diff files otherwise).

A feature based on this would be a neat way of differentiating/empowering ppw (e.g. $ ppw fast-forward <local-clone>).

start github dev CI on every push

1.1 only enables github dev CI on limited branches, for example, master, release, main. However, dev CI should be enabled by default on all branches.

add .docstring.tpl to project

vscode extension autoDocstring has been installed more than 2.2M. Since ppw provide mkdocs, mkdocstrings, it should suggest this extension to user and provide the template.

add package version to github workflow

Sometimes we need to get python package version from github workflow CI.

steps:
  - name: Set the value
    id: step_one
    run: |
      echo "action_state=yellow" >> $GITHUB_ENV
  - name: Use the value
    id: step_two
    run: |
      echo "${{ env.action_state }}" # This will output 'yellow'

project_slug.py can cause circle import issue

the main entry point created by ppw before was {{project_slug}}.py, however, sometimes cause circular import issue by:

from {{project_slug}} import {{project_slug}}

change {{poject_slug}}.py to app.py

Changelog generator failed

while running generate change log step of workflow 'release & publish', it failed to
generator change log if 0.1.0 doesn't exist.

By default we don't specify since_tag for user, however, the action seems specify 0.1.0
by default, which cause the problem.

the actions:

      - name: generate change log
        uses: heinrichreimer/[email protected]
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          issues: true
          issuesWoLabels: true
          pullRequests: true
          prWoLabels: true
          unreleased: true
          # no scineTag here by default. User should add and change at each release
          addSections: '{"documentation":{"prefix":"**Documentation:**","labels":["documentation"]}}'
          output: CHANGELOG.md

call stack:

/usr/local/bundle/gems/github_changelog_generator-1.15.0/lib/github_changelog_generator/generator/generator_tags.rb:138:in `filter_since_tag': Error: can't find tag 0, specified with --since-tag option. (GitHubChangelogGenerator::ChangelogGeneratorError)
	from /usr/local/bundle/gems/github_changelog_generator-1.15.0/lib/github_changelog_generator/generator/generator_tags.rb:120:in `get_filtered_tags'
	from /usr/local/bundle/gems/github_changelog_generator-1.15.0/lib/github_changelog_generator/generator/generator_tags.rb:15:in `fetch_and_filter_tags'
	from /usr/local/bundle/gems/github_changelog_generator-1.15.0/lib/github_changelog_generator/generator/generator.rb:46:in `compound_changelog'
	from /usr/local/bundle/gems/github_changelog_generator-1.15.0/lib/github_changelog_generator.rb:35:in `run'
	from /usr/local/bundle/gems/github_changelog_generator-1.15.0/bin/github_changelog_generator:5:in `<top (required)>'
	from /usr/local/bundle/bin/github_changelog_generator:23:in `load'
	from /usr/local/bundle/bin/github_changelog_generator:23:in `<main>'
Fetching tags... 100/100

update codespell to latest version

codespell v1.16.0 can cause the following issue when python == 3.8:

RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode

upgrade to 2.2 could solve the problem

Unittest support

Multiple issues with this cookiecutter

1- using unittest is not supported, tox command is using pytest regardless.
2- dev requirements placed into installation requirements

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.