Skip to content

Commit 7a3226e

Browse files
committed
First commit
Signed-off-by: Bernát Gábor <[email protected]>
0 parents  commit 7a3226e

File tree

17 files changed

+629
-0
lines changed

17 files changed

+629
-0
lines changed

.github/workflows/check.yml

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
name: check
2+
on:
3+
push:
4+
pull_request:
5+
schedule:
6+
- cron: "0 8 * * *"
7+
8+
jobs:
9+
pre-commit:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-python@v2
14+
- uses: pre-commit/[email protected]
15+
16+
test:
17+
name: test ${{ matrix.py }} - ${{ matrix.os }}
18+
runs-on: ${{ matrix.os }}-latest
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
os:
23+
- Ubuntu
24+
- Windows
25+
- MacOs
26+
py:
27+
- 3.10.0-beta.2
28+
- 3.9
29+
- 3.8
30+
- 3.7
31+
- 3.6
32+
- pypy3
33+
steps:
34+
- name: Setup python for tox
35+
uses: actions/setup-python@v2
36+
with:
37+
python-version: 3.9
38+
- name: Install tox
39+
run: python -m pip install tox
40+
- uses: actions/checkout@v2
41+
- name: Setup python for test ${{ matrix.py }}
42+
uses: actions/setup-python@v2
43+
with:
44+
python-version: ${{ matrix.py }}
45+
- name: Pick environment to run
46+
run: |
47+
import subprocess; import json; import os
48+
major, minor, impl = json.loads(subprocess.check_output(["python", "-c", "import json; import sys; import platform; print(json.dumps([sys.version_info[0], sys.version_info[1], platform.python_implementation()]));"], universal_newlines=True))
49+
with open(os.environ["GITHUB_ENV"], "a") as file_handler:
50+
file_handler.write("TOXENV=" + (f'py{major}{minor}' if impl == "CPython" else f'pypy{major}') + "\n")
51+
shell: python
52+
- name: Setup test suite
53+
run: tox -vv --notest
54+
- name: Run test suite
55+
run: tox --skip-pkg-install
56+
env:
57+
PYTEST_ADDOPTS: "-vv --durations=20"
58+
CI_RUN: "yes"
59+
60+
check:
61+
name: check ${{ matrix.tox_env }} - ${{ matrix.os }}
62+
runs-on: ${{ matrix.os }}-latest
63+
strategy:
64+
fail-fast: false
65+
matrix:
66+
os:
67+
- Ubuntu
68+
- Windows
69+
tox_env:
70+
- type
71+
- dev
72+
- pkg_desc
73+
exclude:
74+
- { os: Windows, tox_env: pkg_desc }
75+
76+
steps:
77+
- uses: actions/checkout@v2
78+
- name: Setup python
79+
uses: actions/setup-python@v2
80+
with:
81+
python-version: 3.9
82+
- name: Install tox
83+
run: python -m pip install tox
84+
- name: Run check for ${{ matrix.tox_env }}
85+
run: python -m tox -e ${{ matrix.tox_env }}
86+
env:
87+
UPGRADE_ADVISORY: "yes"
88+
89+
publish:
90+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
91+
needs: [check, test, pre-commit]
92+
runs-on: ubuntu-latest
93+
steps:
94+
- name: Setup python to build package
95+
uses: actions/setup-python@v2
96+
with:
97+
python-version: 3.9
98+
- name: Install build
99+
run: python -m pip install 'build>=0.4'
100+
- uses: actions/checkout@v2
101+
- name: Build package
102+
run: python -m build -s -w . -o dist
103+
- name: Publish to PyPi
104+
uses: pypa/gh-action-pypi-publish@master
105+
with:
106+
skip_existing: true
107+
user: __token__
108+
password: ${{ secrets.pypi_password }}

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.idea
2+
*.egg-info/
3+
.tox/
4+
.coverage*
5+
coverage.xml
6+
.*_cache
7+
__pycache__
8+
**.pyc
9+
build
10+
dist
11+
src/pytest_devpi/version.py

.pre-commit-config.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.0.1
4+
hooks:
5+
- id: check-ast
6+
- id: check-builtin-literals
7+
- id: check-docstring-first
8+
- id: check-merge-conflict
9+
- id: check-yaml
10+
- id: check-toml
11+
- id: debug-statements
12+
- id: end-of-file-fixer
13+
- id: trailing-whitespace
14+
- repo: https://github.com/asottile/pyupgrade
15+
rev: v2.19.4
16+
hooks:
17+
- id: pyupgrade
18+
- repo: https://github.com/PyCQA/isort
19+
rev: 5.8.0
20+
hooks:
21+
- id: isort
22+
- repo: https://github.com/psf/black
23+
rev: 21.6b0
24+
hooks:
25+
- id: black
26+
- repo: https://github.com/asottile/blacken-docs
27+
rev: v1.10.0
28+
hooks:
29+
- id: blacken-docs
30+
additional_dependencies: [ black==21.6b0 ]
31+
- repo: https://github.com/pre-commit/pygrep-hooks
32+
rev: v1.9.0
33+
hooks:
34+
- id: rst-backticks
35+
- repo: https://github.com/asottile/setup-cfg-fmt
36+
rev: v1.17.0
37+
hooks:
38+
- id: setup-cfg-fmt
39+
args: [--min-py3-version, "3.6", "--max-py-version", "3.10"]
40+
- repo: https://github.com/tox-dev/tox-ini-fmt
41+
rev: "0.5.0"
42+
hooks:
43+
- id: tox-ini-fmt
44+
args: ["-p", "fix"]
45+
- repo: https://github.com/PyCQA/flake8
46+
rev: "3.9.2"
47+
hooks:
48+
- id: flake8
49+
additional_dependencies: [
50+
"flake8-bugbear == 21.4.3",
51+
"flake8-unused-arguments == 0.0.6",
52+
"flake8-comprehensions == 3.5.0",
53+
"flake8-spellcheck == 0.24.0",
54+
"flake8-pytest-style == 1.4.2",
55+
]

CHANGELOG.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Changelog
2+
3+
## [Unreleased](https://github.com/gaborbernat/pytest-devpi/tree/HEAD)
4+
5+
## [0.1.0](https://github.com/gaborbernat/pytest-devpi/tree/0.1.0) (2021-06-17)
6+
7+
[Full Changelog](https://github.com/gaborbernat/pytest-devpi/compare/0.2.1...0.3.0)
8+
9+
**Merged pull requests:**
10+
11+
- Drop Python 2 support [\#6](https://github.com/gaborbernat/pytest-devpi/issues/7)
12+
13+
## [0.2.1](https://github.com/gaborbernat/pytest-devpi/tree/0.2.1) (2020-10-23)
14+
15+
[Full Changelog](https://github.com/gaborbernat/pytest-devpi/compare/0.2.0...0.2.1)
16+
17+
**Implemented enhancements:**
18+
19+
- add session level support [\#6](https://github.com/gaborbernat/pytest-devpi/issues/6)
20+
21+
## [0.2.0](https://github.com/gaborbernat/pytest-devpi/tree/0.2.0) (2020-08-04)
22+
23+
[Full Changelog](https://github.com/gaborbernat/pytest-devpi/compare/0.1.3...0.2.0)
24+
25+
## [0.1.3](https://github.com/gaborbernat/pytest-devpi/tree/0.1.3) (2019-09-03)
26+
27+
[Full Changelog](https://github.com/gaborbernat/pytest-devpi/compare/0.1.2...0.1.3)
28+
29+
**Implemented enhancements:**
30+
31+
- allow force on, document flags [\#3](https://github.com/gaborbernat/pytest-devpi/pull/3) ([gaborbernat](https://github.com/gaborbernat))
32+
33+
**Merged pull requests:**
34+
35+
- Remove PyPy special cases [\#4](https://github.com/gaborbernat/pytest-devpi/pull/4) ([vtbassmatt](https://github.com/vtbassmatt))
36+
37+
## [0.1.2](https://github.com/gaborbernat/pytest-devpi/tree/0.1.2) (2018-11-29)
38+
39+
[Full Changelog](https://github.com/gaborbernat/pytest-devpi/compare/0.1.1...0.1.2)
40+
41+
## [0.1.1](https://github.com/gaborbernat/pytest-devpi/tree/0.1.1) (2018-11-15)
42+
43+
[Full Changelog](https://github.com/gaborbernat/pytest-devpi/compare/0.1.0...0.1.1)
44+
45+
**Closed issues:**
46+
47+
- How to use “pytest\_print” [\#1](https://github.com/gaborbernat/pytest-devpi/issues/1)
48+
49+
**Merged pull requests:**
50+
51+
- Update setup.py [\#2](https://github.com/gaborbernat/pytest-devpi/pull/2) ([shashanksingh28](https://github.com/shashanksingh28))
52+
53+
## [0.1.0](https://github.com/gaborbernat/pytest-devpi/tree/0.1.0) (2018-04-14)
54+
55+
[Full Changelog](https://github.com/gaborbernat/pytest-devpi/compare/727896d18cab117ad84010086cbc4c9a16d9e8f7...0.1.0)
56+
57+
58+
59+
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*

CODE_OF_CONDUCT.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making
6+
participation in our project and our community a harassment-free experience for everyone, regardless of age, body size,
7+
disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race,
8+
religion, or sexual identity and orientation.
9+
10+
## Our Standards
11+
12+
Examples of behavior that contributes to creating a positive environment include:
13+
14+
- Using welcoming and inclusive language
15+
- Being respectful of differing viewpoints and experiences
16+
- Gracefully accepting constructive criticism
17+
- Focusing on what is best for the community
18+
- Showing empathy towards other community members
19+
20+
Examples of unacceptable behavior by participants include:
21+
22+
- The use of sexualized language or imagery and unwelcome sexual attention or advances
23+
- Trolling, insulting/derogatory comments, and personal or political attacks
24+
- Public or private harassment
25+
- Publishing others' private information, such as a physical or electronic address, without explicit permission
26+
- Other conduct which could reasonably be considered inappropriate in a professional setting
27+
28+
## Our Responsibilities
29+
30+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take
31+
appropriate and fair corrective action in response to any instances of unacceptable behavior.
32+
33+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits,
34+
issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any
35+
contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
36+
37+
## Scope
38+
39+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the
40+
project or its community. Examples of representing a project or community include using an official project e-mail
41+
address, posting via an official social media account, or acting as an appointed representative at an online or offline
42+
event. Representation of a project may be further defined and clarified by project maintainers.
43+
44+
## Enforcement
45+
46+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at
47+
[email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems
48+
appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter
49+
of an incident. Further details of specific enforcement policies may be posted separately.
50+
51+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent
52+
repercussions as determined by other members of the project's leadership.
53+
54+
## Attribution
55+
56+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at
57+
[https://www.contributor-covenant.org/version/1/4/code-of-conduct.html][version]
58+
59+
[homepage]: https://www.contributor-covenant.org/
60+
[version]: https://www.contributor-covenant.org/version/1/4/

LICENSE.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
Permission is hereby granted, free of charge, to any person obtaining a
3+
copy of this software and associated documentation files (the
4+
"Software"), to deal in the Software without restriction, including
5+
without limitation the rights to use, copy, modify, merge, publish,
6+
distribute, sublicense, and/or sell copies of the Software, and to
7+
permit persons to whom the Software is furnished to do so, subject to
8+
the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included
11+
in all copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
14+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
15+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
16+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
17+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
18+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
19+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# pytest-devpi
2+
3+
[![PyPI](https://img.shields.io/pypi/v/pytest-devpi?style=flat-square)](https://pypi.org/project/pytest-devpi)
4+
[![PyPI - Implementation](https://img.shields.io/pypi/implementation/pytest-devpi?style=flat-square)](https://pypi.org/project/pytest-devpi)
5+
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pytest-devpi?style=flat-square)](https://pypi.org/project/pytest-devpi)
6+
[![PyPI - Downloads](https://img.shields.io/pypi/dm/pytest-devpi?style=flat-square)](https://pypistats.org/packages/pytest-devpi)
7+
[![PyPI - License](https://img.shields.io/pypi/l/pytest-devpi?style=flat-square)](https://opensource.org/licenses/MIT)
8+
[![check](https://github.com/gaborbernat/pytest-devpi/workflows/check/badge.svg)](https://github.com/gaborbernat/pytest-devpi/actions?query=workflow%3Acheck)
9+
[![Code style:
10+
black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/psf/black)
11+
12+
Create a devpi instance for your pytest suite.
13+
14+
## install
15+
16+
```sh
17+
pip install pytest-devpi
18+
```

pyproject.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[build-system]
2+
requires = ["setuptools >= 44", "wheel >= 0.30", "setuptools_scm[toml]>=3.4"]
3+
build-backend = 'setuptools.build_meta'
4+
5+
[tool.black]
6+
line-length = 120
7+
8+
[tool.isort]
9+
profile = "black"
10+
known_first_party = ["pytest_devpi"]
11+
12+
[tool.setuptools_scm]
13+
write_to = "src/pytest_devpi/version.py"
14+
write_to_template = """
15+
\"\"\" Version information \"\"\"
16+
17+
__version__ = "{version}"
18+
"""

0 commit comments

Comments
 (0)