https://github.com/12rambau/pytest-copie

The pytest plugin for your copier templates πŸ“’

https://github.com/12rambau/pytest-copie

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • β—‹
    CITATION.cff file
  • βœ“
    codemeta.json file
    Found codemeta.json file
  • βœ“
    .zenodo.json file
    Found .zenodo.json file
  • β—‹
    DOI references
  • β—‹
    Academic publication links
  • β—‹
    Committers with academic emails
  • β—‹
    Institutional organization owner
  • β—‹
    JOSS paper metadata
  • β—‹
    Scientific vocabulary similarity
    Low similarity (12.8%) to scientific vocabulary

Keywords

copier pytest pytest-plugin python

Keywords from Contributors

interactive projection sequences packaging investing serializer measurement cycles charts network-simulation
Last synced: 6 months ago · JSON representation

Repository

The pytest plugin for your copier templates πŸ“’

Basic Info
Statistics
  • Stars: 21
  • Watchers: 3
  • Forks: 8
  • Open Issues: 6
  • Releases: 11
Topics
copier pytest pytest-plugin python
Created over 2 years ago · Last pushed 6 months ago
Metadata Files
Readme Contributing License Code of conduct Authors

README.rst

pytest-copie
============

.. |license| image:: https://img.shields.io/badge/License-MIT-yellow.svg?logo=opensourceinitiative&logoColor=white
    :target: LICENSE
    :alt: License: MIT

.. |commit| image:: https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg?logo=git&logoColor=white
   :target: https://conventionalcommits.org
   :alt: conventional commit

.. |ruff| image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
   :target: https://github.com/astral-sh/ruff
   :alt: ruff badge

.. |prettier| image:: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?logo=prettier&logoColor=white
   :target: https://github.com/prettier/prettier
   :alt: prettier badge

.. |pre-commmit| image:: https://img.shields.io/badge/pre--commit-active-yellow?logo=pre-commit&logoColor=white
    :target: https://pre-commit.com/
    :alt: pre-commit

.. |pypi| image:: https://img.shields.io/pypi/v/pytest-copie?color=blue&logo=pypi&logoColor=white
    :target: https://pypi.org/project/pytest-copie/
    :alt: PyPI version

.. |conda| image:: https://img.shields.io/conda/v/conda-forge/pytest-copie?logo=condaforge&logoColor=white&color=blue
   :target: https://anaconda.org/conda-forge/pytest-copie
   :alt: Conda

.. |build| image:: https://img.shields.io/github/actions/workflow/status/12rambau/pytest-copie/unit.yaml?logo=github&logoColor=white
    :target: https://github.com/12rambau/pytest-copie/actions/workflows/unit.yaml
    :alt: build

.. |coverage| image:: https://img.shields.io/codecov/c/github/12rambau/pytest-copie?logo=codecov&logoColor=white
    :target: https://codecov.io/gh/12rambau/pytest-copie
    :alt: Test Coverage

.. |docs| image:: https://img.shields.io/readthedocs/pytest-copie?logo=readthedocs&logoColor=white
    :target: https://pytest-copie.readthedocs.io/en/latest/
    :alt: Documentation Status

|license| |commit| |ruff| |prettier| |pre-commmit| |pypi| |build| |coverage| |docs| |conda|

Overview
--------

pytest-copie is a `pytest `__ plugin that comes with a ``copie`` fixture which is a wrapper on top the `copier `__ API for generating projects. It helps you verify that your template is working as expected and takes care of cleaning up after running the tests. :ledger:

It is an adaptation of the `pytest-cookies `__ plugin for `copier `__ templates.

It’s here to help templates designers to check that everything works as expected on the generated files including (but not limited to):

-   linting operations
-   testing operations
-   packaging operations
-   documentation operations
-   …

Installation
------------

**pytest-copie** is available on `PyPI `__ and can be installed with `pip `__:

.. code-block:: console

    pip install pytest-copie

Usage
-----

The ``copie`` fixture will allow you to ``copy`` a template and run tests against it. It will also clean up the generated project after the tests have been run.

.. code-block:: python

    def test_template(copie):
        res = copie.copy(extra_answers={"repo_name": "helloworld"})

        assert res.exit_code == 0
        assert res.exception is None
        assert result.project_dir.is_dir()

Context and template location can be fully customized, see our `documentation `__ for more details.

Credits
-------

This package was created with `Copier `__ and the `@12rambau/pypackage `__ 0.1.16 project template.

Owner

  • Name: Rambaud Pierrick
  • Login: 12rambau
  • Kind: user
  • Location: Rome, Italy
  • Company: FAO @openforis

Materials engineer turned Software Engineer and Python enthusiast for Earth Observation applications

GitHub Events

Total
  • Create event: 8
  • Release event: 2
  • Issues event: 5
  • Watch event: 6
  • Delete event: 4
  • Issue comment event: 21
  • Push event: 15
  • Pull request review comment event: 10
  • Pull request review event: 13
  • Pull request event: 16
  • Fork event: 3
Last Year
  • Create event: 8
  • Release event: 2
  • Issues event: 5
  • Watch event: 6
  • Delete event: 4
  • Issue comment event: 21
  • Push event: 15
  • Pull request review comment event: 10
  • Pull request review event: 13
  • Pull request event: 16
  • Fork event: 3

Committers

Last synced: over 1 year ago

All Time
  • Total Commits: 71
  • Total Committers: 5
  • Avg Commits per committer: 14.2
  • Development Distribution Score (DDS): 0.225
Past Year
  • Commits: 71
  • Committers: 5
  • Avg Commits per committer: 14.2
  • Development Distribution Score (DDS): 0.225
Top Committers
Name Email Commits
Rambaud Pierrick 1****u 55
Pierrick Rambaud p****d@l****m 6
Genevieve Buckley 3****y 5
dependabot[bot] 4****] 4
Thomas Schmelzer t****r@g****m 1
Committer Domains (Top 20 + Academic)
ldc.com: 1

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 31
  • Total pull requests: 77
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 19 days
  • Total issue authors: 7
  • Total pull request authors: 10
  • Average comments per issue: 0.45
  • Average comments per pull request: 1.08
  • Merged pull requests: 71
  • Bot issues: 2
  • Bot pull requests: 7
Past Year
  • Issues: 1
  • Pull requests: 13
  • Average time to close issues: 22 minutes
  • Average time to close pull requests: 21 days
  • Issue authors: 1
  • Pull request authors: 5
  • Average comments per issue: 0.0
  • Average comments per pull request: 1.15
  • Merged pull requests: 9
  • Bot issues: 1
  • Bot pull requests: 3
Top Authors
Issue Authors
  • 12rambau (16)
  • GenevieveBuckley (4)
  • msharp9 (3)
  • github-actions[bot] (2)
  • nicokant (1)
  • tschm (1)
  • sjvrijn (1)
  • airibarne (1)
Pull Request Authors
  • 12rambau (52)
  • dependabot[bot] (12)
  • GenevieveBuckley (5)
  • davidbrownell (4)
  • sjvrijn (2)
  • santacodes (2)
  • anjos (2)
  • lkubb (2)
  • tschm (2)
  • thisIsMikeKane (1)
Top Labels
Issue Labels
documentation (1)
Pull Request Labels
dependencies (12) github_actions (2)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 6,049 last-month
  • Total dependent packages: 1
  • Total dependent repositories: 0
  • Total versions: 10
  • Total maintainers: 1
pypi.org: pytest-copie

The pytest plugin for your copier templates πŸ“’

  • Versions: 10
  • Dependent Packages: 1
  • Dependent Repositories: 0
  • Downloads: 6,049 Last month
Rankings
Dependent packages count: 7.5%
Average: 38.5%
Dependent repos count: 69.6%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/release.yaml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/unit.yaml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • codecov/codecov-action v3 composite
  • pre-commit/action v3.0.0 composite
pyproject.toml pypi
  • copier *
  • deprecated >=1.2.14
  • pytest *
.github/workflows/pypackage_check.yaml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • rishabhgupta/git-action-issue v2 composite