-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add messages implementation for python
- Loading branch information
1 parent
57feb26
commit 18b7d09
Showing
62 changed files
with
2,240 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
--- | ||
name: test-python | ||
|
||
on: # yamllint disable-line rule:truthy | ||
push: | ||
branches: | ||
- main | ||
- renovate/** | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 20 | ||
strategy: | ||
matrix: | ||
python-version: | ||
- "3.8" | ||
- "3.9" | ||
- "3.10" | ||
- "3.11" | ||
- "pypy3.8" | ||
- "pypy3.9" | ||
- "pypy3.10" | ||
os: | ||
- ubuntu-latest | ||
- windows-latest | ||
- macos-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -U setuptools | ||
pip install tox tox-gh-actions codecov | ||
- name: Test with tox | ||
working-directory: ./python | ||
run: | | ||
tox | ||
codecov | ||
- name: Build checking | ||
working-directory: ./python | ||
if: "matrix.python-version == '3.11'" | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | ||
run: | | ||
python -m pip install --upgrade build twine | ||
python -m build | ||
twine check dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
*.rej | ||
*.py[cod] | ||
/.env | ||
*.orig | ||
**/__pycache__ | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Packages | ||
*.egg | ||
*.egg-info | ||
dist | ||
build | ||
_build | ||
eggs | ||
parts | ||
bin | ||
var | ||
sdist | ||
develop-eggs | ||
.installed.cfg | ||
lib | ||
lib64 | ||
|
||
# Installer logs | ||
pip-log.txt | ||
|
||
# Unit test / coverage reports | ||
.coverage | ||
.tox | ||
nosetests.xml | ||
|
||
# Translations | ||
*.mo | ||
|
||
# Mr Developer | ||
.mr.developer.cfg | ||
.project | ||
.pydevproject | ||
.pytest_cache | ||
.ropeproject | ||
|
||
# Sublime | ||
/*.sublime-* | ||
|
||
#PyCharm | ||
/.idea | ||
|
||
# virtualenv | ||
/.Python | ||
/lib | ||
/include | ||
/share | ||
/local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
--- | ||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 23.3.0 | ||
hooks: | ||
- id: black | ||
args: | ||
- "python/src" | ||
- "python/tests" | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
name: isort (python) | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: check-added-large-files | ||
- id: check-toml | ||
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks | ||
rev: v2.9.0 | ||
hooks: | ||
- id: pretty-format-toml | ||
args: [--autofix] | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.7.0 | ||
hooks: | ||
- id: pyupgrade | ||
args: ["--py38-plus"] | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v1.4.1 | ||
hooks: | ||
- id: mypy | ||
additional_dependencies: [types-setuptools, types-certifi] | ||
- repo: https://github.com/tox-dev/tox-ini-fmt | ||
rev: "1.3.1" | ||
hooks: | ||
- id: tox-ini-fmt | ||
- repo: https://github.com/adrienverge/yamllint.git | ||
rev: v1.32.0 | ||
hooks: | ||
- id: yamllint | ||
args: [--format, parsable, --strict] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Messages | ||
|
||
Cucumber Messages for Python https://github.com/cucumber/messages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
[build-system] | ||
build-backend = "setuptools.build_meta" | ||
requires = ["setuptools", "wheel"] | ||
|
||
[project] | ||
authors = [ | ||
{name = "Cucumber Limited", email = "[email protected]"} | ||
] | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Framework :: Gherkin", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: POSIX", | ||
"Operating System :: Microsoft :: Windows", | ||
"Operating System :: MacOS :: MacOS X", | ||
"Topic :: Utilities", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11" | ||
] | ||
dependencies = [ | ||
"importlib_resources", | ||
"pydantic>=2.0.3" | ||
] | ||
description = "Cucumber Messages is a message protocol for representing results and other information from Cucumber. " | ||
license = {text = "MIT"} | ||
maintainers = [ | ||
{name = "Konstantin Goloveshko", email = "[email protected]"} | ||
] | ||
name = "messages" | ||
readme = {file = "README.md", content-type = "text/markdown"} | ||
requires-python = ">=3.8" | ||
urls = {Repository = "https://github.com/cucumber/messages"} | ||
version = "0.1.0" | ||
|
||
[project.entry-points] | ||
|
||
[project.scripts] | ||
|
||
[tool.black] | ||
line-length = 120 | ||
target-version = ["py38", "py39", "py310", "py311"] | ||
verbose = true | ||
|
||
[tool.isort] | ||
line_length = 120 | ||
multi_line_output = 3 | ||
profile = "black" | ||
|
||
[tool.mypy] | ||
files = "src/messages/**/*.py" | ||
install_types = true | ||
non_interactive = true | ||
plugins = [ | ||
"pydantic.mypy" | ||
] | ||
show_error_codes = true | ||
warn_return_any = true | ||
warn_unused_configs = true | ||
|
||
[[tool.mypy.overrides]] | ||
ignore_missing_imports = true | ||
module = [ | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[pytest] | ||
testpaths = tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[options] | ||
include_package_data = True | ||
packages = find: | ||
package_dir = | ||
=src | ||
|
||
[options.packages.find] | ||
where = src | ||
[options.package_data] | ||
messages.samples = | ||
* | ||
|
||
[options.extras_require] | ||
test = | ||
tox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from .messages import * |
Oops, something went wrong.