Skip to content

A template for new Python projects. Ready for pytest for tests, pdoc for automatic documentation from docstrings, setup.py and automatic tests on every push, automatic PyPI package publishing & documentation building via GH Pages on new releases.

License

Notifications You must be signed in to change notification settings

SKevo18/python-project-template

Repository files navigation

Python project template

A template for new Python projects.

Features

  • Automatically builds PDoc documentation & uploads package to PyPI on new GitHub release, thanks to GitHub actions;
  • Tests with pyTest before uploading to PyPI (or you can test manually with workflow-dispatch);
  • Ready-to-go setup.py file;
  • Scripts to build documentation and compile as a Python package;
  • A to-do list below;
  • Possibly more ;)

Your to-do list

  • Edit # FIXME lines to match your project;
    • setup.py
      • Package name
      • License
      • Version
      • Author
      • Author email
      • Description
      • Keywords
      • Classifiers
      • Repository URL
  • Setup virtualenv (scripts/setup_virtualenv_windows.ps1 for Windows);
  • Rename python_project_template folder and start writing your source code;
  • Add your dependencies to requirements.txt;
  • Update .gitingore with your stuff;
  • Replace this README.md file with a fancier one;
  • Upload code to your GitHub repository;
  • Turn on GitHub pages and use documentation as your pages branch;
  • Add your editior to .gitignore;
  • Add your PyPI API key to GitHub secrets (PYPI_API_TOKEN);
  • When your are done, make a new release at GitHub to build documentation and upload to PyPI;
    • Don't forget to bump version in setup.py everytime you do a new release!!!

Generated documentation example: https://cwkevo.github.io/python-project-template

That should be it. Happy coding!

If you have any questions or found a bug, please open a new issue in this repository.

About

A template for new Python projects. Ready for pytest for tests, pdoc for automatic documentation from docstrings, setup.py and automatic tests on every push, automatic PyPI package publishing & documentation building via GH Pages on new releases.

Topics

Resources

License

Stars

Watchers

Forks