Giter Site home page Giter Site logo

mgancita / cookiecutter-pypackage Goto Github PK

View Code? Open in Web Editor NEW
9.0 3.0 4.0 645 KB

Cookiecutter to create a Python package. Powered by Poetry, GitHub actions, and MkDocs-Material.

Home Page: https://mgancita.github.io/cookiecutter-pypackage/

License: MIT License

Python 100.00%
packaging cookiecutter-template cookiecutter-python3 poetry github-actions mkdocs-material

cookiecutter-pypackage's People

Contributors

makanu avatar mgancita avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cookiecutter-pypackage's Issues

Entry Point Script Feature

I missed a feature in the template yesterday, which I plan to integrate. If you are interested I will open another PR when I am finished.

The Feature is the following: The template at the moment only provides a package as a lib. from time to time I develop small cli tools, which needs an entrypoint script. I would integrate this feature into the slugs and add a question into the initialization process.

Updateing the CI workflows

I realized that not all workflows are using the poetry.lock as dependency management (publish workflows installing mkdocs via pip). So I worked through it and also optimized it for cached installation.

On https://github.com/MaKaNu/boxsup-pytorch/blob/development/.github/workflows/code_quality_checks.yml you can inspect my newest installation of it. On first glance it looks like more boilerplate code, but instead reduces boilerplate and runner runtime significant. Also makes it simple to run different checks in parallel jobs. The main trick: it uses my composition action https://github.com/MaKaNu/poetry-setup-composite-action/

Is there a good way to do automated docs?

Feature Request:

I started with cookiecutter because I was intrigued by the idea of self documenting code. After finally successful integrate your template with a way to complicated example (Pyside6 App ;) ) I searched for an option to generate Markdown out of docstrings. After several not working solutions I finally found an Option with Sphinx which worked without a flaw and was easy to implement.

I have to included the necessary steps to a github action workflow, but I think it would be not that difficult. At the end the process will be put before the mkdocs step to create the *.md files and transfer them into a subdirectory of the doc directory.

As you like to implement this I will start a PR in a few days, after implementing it.

The Solution would be based on solution of following stackoverflow entry

Which actual License is the License slug pointing at?

I recognized that the GPLv3-only License you set as an Option is not recognized by License Tag in the README.md. After watching inside my License text and compared it to actual GPLv3 there are a few significant changes. Since the GPLv3 only allows copies of the License without changes to it I asked myself which License the slug actual represents. I couldn't find a matching version.

Add documentation

  • Update "index" page
  • Add "Getting Started"
  • Add "How to protect branches"
  • Add "How to setup gh-pages"
  • Add "How to publish package"
    • Add secrets
    • Sign-up for test pypi
    • Pre-release
    • How to use extra-index-url
    • Sign-up for real pypi
    • Release

Missing informations

I tried first the originial pypackage template for cookiecutters and was disapointed about the usage with travis ci. So I searched for a template with github actions instead and found yours. I think I like most of the added Features but need to inform about a few of them. Specific poetry and the usage is something I need to learn if I want to use this template. It would be nice to have a updated version of the README to have a better understanding or at least a good starting point to reproduce the intendance of the template.

Explaination of how to manage sub pages

At the moment my tests are running fine. And Deployment of documentation works kind of. But I struggle with following setup:

You doc folder only includes the index.md and other markdowns in subdirectories and nothing more.

In my test scenario it looks kinda similar:

  • index.md
  • rules (dir)
    • basic.md
  • packages (dir)
    • rainbowdrinkinggame.md
    • tests.md

Linking to the subpages works and they are displayed as usual, but I am unable to create the navigation bar at the top and left of the pages. I now you linked the documentation and I could figure it out by reading the linked section, follow the getting started and reading something about mkdocs.yml. That was the hint I needed and it took me a few deployments. The first time I read you documentation I completely overread this part. If this information is more prominent and links maybe against mkdoc/setup instead it would be easier for newcomers like I was ;)

Working API Key for Test PyPI

You mentioned in the documentation, that you had issues with an API Key for Test PyPI. I just followed the information you have written down until the point where you wrote to enter username and password for the PyPI account. As I created an API Key for my Account I realized the information to use the API key. Their [Website][1] quotes:

  • set username to __token__
  • set password to the token with the prefix pypi-

So instead of using username and password as you mentioned I used the token as described. And what should I say it worked. If you might confirm my success for any of your packages, we could change the documentation.

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.