pytere


Namepytere JSON
Version 0.6.0 PyPI version JSON
download
home_pagehttps://github.com/astariul/pytere
SummaryA Python Template Repository
upload_time2023-09-14 12:53:57
maintainer
docs_urlNone
authorNicolas REMOND
requires_python>=3.8
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <h1 align="center">pytere</h1>
<p align="center">
Python Template repository
</p>

<p align="center">
    <a href="https://github.com/astariul/pytere/releases"><img src="https://img.shields.io/github/release/astariul/pytere.svg" alt="GitHub release" /></a>
    <a href="https://github.com/astariul/pytere/actions/workflows/pytest.yaml"><img src="https://github.com/astariul/pytere/actions/workflows/pytest.yaml/badge.svg" alt="Test status" /></a>
    <a href="https://github.com/astariul/pytere/actions/workflows/lint.yaml"><img src="https://github.com/astariul/pytere/actions/workflows/lint.yaml/badge.svg" alt="Lint status" /></a>
    <img src=".github/badges/coverage.svg" alt="Coverage status" />
    <a href="https://astariul.github.io/pytere"><img src="https://img.shields.io/website?down_message=failing&label=docs&up_color=green&up_message=passing&url=https%3A%2F%2Fastariul.github.io%2Fpytere" alt="Docs" /></a>
    <br>
    <a href="https://github.com/psf/black"><img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="black" /></a>
    <a href="https://github.com/astral-sh/ruff"><img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json" alt="ruff" /></a>
    <a href="https://github.com/pre-commit/pre-commit"><img src="https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white" alt="pre-commit"></a>
    <a href="https://github.com/astariul/pytere/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="licence" /></a>
</p>

<p align="center">
  <a href="#description">Description</a> •
  <a href="#install">Install</a> •
  <a href="#usage">Usage</a> •
  <a href="#use-this-template">Use this template</a> •
  <a href="#faq">FAQ</a> •
  <a href="#contribute">Contribute</a>
  <br>
  <a href="https://astariul.github.io/pytere/" target="_blank">Documentation</a>
</p>


<h2 align="center">Description</h2>

**`pytere`** stands for **Py**thon **te**mplate **re**pository.

It's just a template repository for python, with the following features :

* 📚 Beautiful documentation with [Material for Mkdocs](https://squidfunk.github.io/mkdocs-material/), published as a Github page with [mike](https://github.com/jimporter/mike) automatically
* ✨ Modern code style checks with [black](https://github.com/psf/black) and [ruff](https://github.com/astral-sh/ruff)
* 🅿️ Easy development with [pre-commit hooks](https://pre-commit.com/)
* ✅ Tests with [pytest](https://docs.pytest.org/) and coverage without external tools
* :octocat: CI with [Github actions](https://github.com/features/actions)
* 📝 Issues & PR templates
* 🤖 Stale bot & Dependabot
* 🚀 Releases automatically published to PyPi


<h2 align="center">Install</h2>

Install `pytere` by running :


```
pip install pytere
```

---

For development, you can install it locally by first cloning the repository :

```
git clone https://github.com/astariul/pytere.git
cd pytere
pip install -e .
```


<h2 align="center">Usage</h2>

`pytere` does not contain any useful code because it's a template repository.  
But you can check if the package is correctly installed with :

```python
from pytere import is_odd

print(is_odd(2))  # False
```


<h2 align="center">Use this template</h2>

To use this template, click the button "Use this template" :

<p align="center">
  <a href="https://github.com/astariul/pytere/generate"><img src="https://img.shields.io/badge/%20-Use%20this%20template-green?style=for-the-badge&color=347d39" alt="Use template" /></a>
</p>

It will prompt you to create a new Github repository.

Then replace the content  in your freshly created repository, with your own package name, own code, and update the links to point to your own repository.  
More details in the [documentation](https://astariul.github.io/pytere/latest/usage/).


<h2 align="center">FAQ</h2>

#### ❓ **Why creating yet another template, there is already plenty on the internet ?**

True, but I couldn't find one that entirely satisfies my needs and uses
the tools I want.

For example, a lot of templates use **Sphinx** for the documentation, but I'm much more comfortable with **MkDocs**. Or the test coverage was provided by an external tool, but I wanted everything in Github. Etc...  
Hence the creation of this repository.

#### ❓ **Can I use this template for a private repository ?**

Absolutely !

But some things might not work (for example the release badge), and you might want to remove some features (like automatically pushing to PyPi, or publishing the documentation to Github page)

<h2 align="center">Contribute</h2>

To contribute, install the package locally, create your own branch, add your code (and tests, and documentation), and open a PR !

### Pre-commit hooks

Pre-commit hooks are set to check the code added whenever you commit something.

If you never ran the hooks before, install it with :

```bash
pre-commit install
```

---

Then you can just try to commit your code. If your code does not meet the quality required by linters, it will not be committed. You can just fix your code and try to commit again !

---

You can manually run the pre-commit hooks with :

```bash
pre-commit run --all-files
```

### Tests

When you contribute, you need to make sure all the unit-tests pass. You should also add tests if necessary !

You can run the tests with :

```bash
pytest
```

---

Tests are not included in the pre-commit hooks, because running the tests might be slow, and for the sake of developpers we want the pre-commit hooks to be fast !

Pre-commit hooks will not run the tests, but it will automatically update the coverage badge !

### Documentation

The documentation should be kept up-to-date. You can visualize the documentation locally by running :

```bash
mkdocs serve
```



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/astariul/pytere",
    "name": "pytere",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "",
    "author": "Nicolas REMOND",
    "author_email": "remondnicola@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/89/6b/6729276a43929b5a2ae0966a451b7fca88426a9427d71044e877ea504eed/pytere-0.6.0.tar.gz",
    "platform": null,
    "description": "<h1 align=\"center\">pytere</h1>\n<p align=\"center\">\nPython Template repository\n</p>\n\n<p align=\"center\">\n    <a href=\"https://github.com/astariul/pytere/releases\"><img src=\"https://img.shields.io/github/release/astariul/pytere.svg\" alt=\"GitHub release\" /></a>\n    <a href=\"https://github.com/astariul/pytere/actions/workflows/pytest.yaml\"><img src=\"https://github.com/astariul/pytere/actions/workflows/pytest.yaml/badge.svg\" alt=\"Test status\" /></a>\n    <a href=\"https://github.com/astariul/pytere/actions/workflows/lint.yaml\"><img src=\"https://github.com/astariul/pytere/actions/workflows/lint.yaml/badge.svg\" alt=\"Lint status\" /></a>\n    <img src=\".github/badges/coverage.svg\" alt=\"Coverage status\" />\n    <a href=\"https://astariul.github.io/pytere\"><img src=\"https://img.shields.io/website?down_message=failing&label=docs&up_color=green&up_message=passing&url=https%3A%2F%2Fastariul.github.io%2Fpytere\" alt=\"Docs\" /></a>\n    <br>\n    <a href=\"https://github.com/psf/black\"><img src=\"https://img.shields.io/badge/code%20style-black-000000.svg\" alt=\"black\" /></a>\n    <a href=\"https://github.com/astral-sh/ruff\"><img src=\"https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json\" alt=\"ruff\" /></a>\n    <a href=\"https://github.com/pre-commit/pre-commit\"><img src=\"https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white\" alt=\"pre-commit\"></a>\n    <a href=\"https://github.com/astariul/pytere/blob/main/LICENSE\"><img src=\"https://img.shields.io/badge/License-MIT-yellow.svg\" alt=\"licence\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"#description\">Description</a> \u2022\n  <a href=\"#install\">Install</a> \u2022\n  <a href=\"#usage\">Usage</a> \u2022\n  <a href=\"#use-this-template\">Use this template</a> \u2022\n  <a href=\"#faq\">FAQ</a> \u2022\n  <a href=\"#contribute\">Contribute</a>\n  <br>\n  <a href=\"https://astariul.github.io/pytere/\" target=\"_blank\">Documentation</a>\n</p>\n\n\n<h2 align=\"center\">Description</h2>\n\n**`pytere`** stands for **Py**thon **te**mplate **re**pository.\n\nIt's just a template repository for python, with the following features :\n\n* \ud83d\udcda Beautiful documentation with [Material for Mkdocs](https://squidfunk.github.io/mkdocs-material/), published as a Github page with [mike](https://github.com/jimporter/mike) automatically\n* \u2728 Modern code style checks with [black](https://github.com/psf/black) and [ruff](https://github.com/astral-sh/ruff)\n* \ud83c\udd7f\ufe0f Easy development with [pre-commit hooks](https://pre-commit.com/)\n* \u2705 Tests with [pytest](https://docs.pytest.org/) and coverage without external tools\n* :octocat: CI with [Github actions](https://github.com/features/actions)\n* \ud83d\udcdd Issues & PR templates\n* \ud83e\udd16 Stale bot & Dependabot\n* \ud83d\ude80 Releases automatically published to PyPi\n\n\n<h2 align=\"center\">Install</h2>\n\nInstall `pytere` by running :\n\n\n```\npip install pytere\n```\n\n---\n\nFor development, you can install it locally by first cloning the repository :\n\n```\ngit clone https://github.com/astariul/pytere.git\ncd pytere\npip install -e .\n```\n\n\n<h2 align=\"center\">Usage</h2>\n\n`pytere` does not contain any useful code because it's a template repository.  \nBut you can check if the package is correctly installed with :\n\n```python\nfrom pytere import is_odd\n\nprint(is_odd(2))  # False\n```\n\n\n<h2 align=\"center\">Use this template</h2>\n\nTo use this template, click the button \"Use this template\" :\n\n<p align=\"center\">\n  <a href=\"https://github.com/astariul/pytere/generate\"><img src=\"https://img.shields.io/badge/%20-Use%20this%20template-green?style=for-the-badge&color=347d39\" alt=\"Use template\" /></a>\n</p>\n\nIt will prompt you to create a new Github repository.\n\nThen replace the content  in your freshly created repository, with your own package name, own code, and update the links to point to your own repository.  \nMore details in the [documentation](https://astariul.github.io/pytere/latest/usage/).\n\n\n<h2 align=\"center\">FAQ</h2>\n\n#### \u2753 **Why creating yet another template, there is already plenty on the internet ?**\n\nTrue, but I couldn't find one that entirely satisfies my needs and uses\nthe tools I want.\n\nFor example, a lot of templates use **Sphinx** for the documentation, but I'm much more comfortable with **MkDocs**. Or the test coverage was provided by an external tool, but I wanted everything in Github. Etc...  \nHence the creation of this repository.\n\n#### \u2753 **Can I use this template for a private repository ?**\n\nAbsolutely !\n\nBut some things might not work (for example the release badge), and you might want to remove some features (like automatically pushing to PyPi, or publishing the documentation to Github page)\n\n<h2 align=\"center\">Contribute</h2>\n\nTo contribute, install the package locally, create your own branch, add your code (and tests, and documentation), and open a PR !\n\n### Pre-commit hooks\n\nPre-commit hooks are set to check the code added whenever you commit something.\n\nIf you never ran the hooks before, install it with :\n\n```bash\npre-commit install\n```\n\n---\n\nThen you can just try to commit your code. If your code does not meet the quality required by linters, it will not be committed. You can just fix your code and try to commit again !\n\n---\n\nYou can manually run the pre-commit hooks with :\n\n```bash\npre-commit run --all-files\n```\n\n### Tests\n\nWhen you contribute, you need to make sure all the unit-tests pass. You should also add tests if necessary !\n\nYou can run the tests with :\n\n```bash\npytest\n```\n\n---\n\nTests are not included in the pre-commit hooks, because running the tests might be slow, and for the sake of developpers we want the pre-commit hooks to be fast !\n\nPre-commit hooks will not run the tests, but it will automatically update the coverage badge !\n\n### Documentation\n\nThe documentation should be kept up-to-date. You can visualize the documentation locally by running :\n\n```bash\nmkdocs serve\n```\n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A Python Template Repository",
    "version": "0.6.0",
    "project_urls": {
        "Homepage": "https://github.com/astariul/pytere"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d483bab57b6440e6a2e841c930988a1db26fe6f998f713753a2b54ef74757dca",
                "md5": "d17c4f4be39129db3eb2f13ab8d31473",
                "sha256": "19f4c221bddeac636fb8c4935903591a9b9174952741a78c6c02897a08365e0c"
            },
            "downloads": -1,
            "filename": "pytere-0.6.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d17c4f4be39129db3eb2f13ab8d31473",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 4683,
            "upload_time": "2023-09-14T12:53:56",
            "upload_time_iso_8601": "2023-09-14T12:53:56.509939Z",
            "url": "https://files.pythonhosted.org/packages/d4/83/bab57b6440e6a2e841c930988a1db26fe6f998f713753a2b54ef74757dca/pytere-0.6.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "896b6729276a43929b5a2ae0966a451b7fca88426a9427d71044e877ea504eed",
                "md5": "6b2bb404d4948f102ddfb81c593069d3",
                "sha256": "cb51cfc20ab2ae69421be26588b07bfbf637a087e99657351b92f2130dc546d6"
            },
            "downloads": -1,
            "filename": "pytere-0.6.0.tar.gz",
            "has_sig": false,
            "md5_digest": "6b2bb404d4948f102ddfb81c593069d3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 5761,
            "upload_time": "2023-09-14T12:53:57",
            "upload_time_iso_8601": "2023-09-14T12:53:57.979033Z",
            "url": "https://files.pythonhosted.org/packages/89/6b/6729276a43929b5a2ae0966a451b7fca88426a9427d71044e877ea504eed/pytere-0.6.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-14 12:53:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "astariul",
    "github_project": "pytere",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pytere"
}
        
Elapsed time: 0.10959s