Skip to content

Commit

Permalink
basic setup
Browse files Browse the repository at this point in the history
  • Loading branch information
stefankeidel committed Jan 4, 2025
1 parent 15e1e5b commit d7e51b2
Show file tree
Hide file tree
Showing 7 changed files with 93 additions and 6 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,20 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12"]
poetry-version: ["latest", "main", "1.6.1"]
python-version: ["3.11", "3.12", "3.13"]
poetry-version: ["1.6.1"]
os: [ubuntu-22.04, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Run image
- name: Install poetry
uses: abatilo/actions-poetry@v4
with:
poetry-version: ${{ matrix.poetry-version }}
- name: View poetry --help
run: poetry --help
- name: Install poetry deps
run: poetry install --with test
- name: Run pytest
run: poetry run pytest
Empty file added kirkbot/__init__.py
Empty file.
11 changes: 11 additions & 0 deletions kirkbot/cli.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import click

@click.command()
@click.option('--count', default=1, help='Number of greetings.')
def hello(count):
"""Simple program that greets NAME for a total of COUNT times."""
for x in range(count):
click.echo(f"Hello world!")

if __name__ == '__main__':
hello()
62 changes: 61 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,23 @@ readme = "README.md"

[tool.poetry.dependencies]
python = ">=3.11,<3.13"
click = "^8.1.8"


[tool.poetry.group.dev.dependencies]
ruff = "^0.8.5"
pudb = "^2024.1.3"
ipython = "^8.31.0"

[tool.poetry.group.dev]
optional = true

[tool.poetry.group.test.dependencies]
pytest = "^8.3.4"

[tool.poetry.group.test]
optional = true

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
Empty file added tests/__init__.py
Empty file.
4 changes: 4 additions & 0 deletions tests/test_noop.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import pytest

def test_noop():
assert True

0 comments on commit d7e51b2

Please sign in to comment.