Skip to content

Commit 0d747a8

Browse files
initial commit
0 parents  commit 0d747a8

46 files changed

Lines changed: 4627 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
8+
jobs:
9+
quality:
10+
runs-on: ubuntu-latest
11+
env:
12+
TICTACTOE_HEADLESS: "1"
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Set up Python
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: "3.12"
19+
- name: Install dependencies
20+
run: |
21+
python -m pip install --upgrade pip
22+
python -m pip install -r requirements.txt
23+
- name: Run linters
24+
run: |
25+
python -m black --check src tests
26+
python -m ruff check src tests
27+
- name: Type checking
28+
run: python -m mypy src
29+
- name: Run tests (non-GUI)
30+
run: python -m pytest -m "not gui"
31+
- name: Build and smoke-test wheel
32+
run: |
33+
python -m build --wheel
34+
python -m pip install dist/*.whl --force-reinstall
35+
python -c "import tictactoe; print(tictactoe.__version__)"

.gitignore

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
.venv/
2+
__pycache__/
3+
*.py[cod]
4+
*.pyo
5+
*.pyd
6+
*.so
7+
.Python
8+
9+
# IDE / Editor
10+
.vscode/
11+
.idea/
12+
*.swp
13+
*.swo
14+
*~
15+
16+
# Type checkers / Linters
17+
.mypy_cache/
18+
.ruff_cache/
19+
.pytype/
20+
21+
# Testing
22+
.tox/
23+
24+
# Logs
25+
*.log
26+
27+
# Distribution / packaging
28+
build/
29+
dist/
30+
*.egg-info/
31+
*.egg
32+
33+
# Installer logs
34+
pip-log.txt
35+
pip-delete-this-directory.txt
36+
37+
# Unit test / coverage reports
38+
.pytest_cache/
39+
.coverage
40+
.coverage.*
41+
htmlcov/
42+
43+
# Environment files
44+
.env
45+
.env.*
46+
47+
# macOS noise
48+
.DS_Store

.pre-commit-config.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
default_language_version:
2+
python: python3
3+
minimum_pre_commit_version: "3.5.0"
4+
5+
repos:
6+
- repo: https://github.com/pre-commit/pre-commit-hooks
7+
rev: v5.0.0
8+
hooks:
9+
- id: end-of-file-fixer
10+
- id: trailing-whitespace
11+
- id: check-yaml
12+
- id: check-toml
13+
- repo: https://github.com/psf/black
14+
rev: 24.8.0
15+
hooks:
16+
- id: black
17+
language_version: python3
18+
- repo: https://github.com/astral-sh/ruff-pre-commit
19+
rev: v0.6.7
20+
hooks:
21+
- id: ruff
22+
args: [ "--fix" ]
23+
- repo: https://github.com/pre-commit/mirrors-mypy
24+
rev: v1.11.2
25+
hooks:
26+
- id: mypy
27+
additional_dependencies:
28+
- types-colorama
29+
- repo: local
30+
hooks:
31+
- id: pytest-non-gui-commit
32+
name: pytest (non-gui suite)
33+
entry: python -m pytest -m "not gui"
34+
language: system
35+
pass_filenames: false
36+
stages: [ pre-commit ]
37+
- id: pytest-non-gui
38+
name: pytest (non-gui suite)
39+
entry: python -m pytest -m "not gui"
40+
language: system
41+
pass_filenames: false
42+
stages: [ pre-push ]
43+
- id: tox-lint-type
44+
name: tox lint+type
45+
entry: python -m tox -e lint,type
46+
language: system
47+
pass_filenames: false
48+
stages: [ pre-push ]

LICENSE

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Copyright (c) 2025 Arthur van Acker
2+
3+
Permission to use, copy, modify, and/or distribute this software for any
4+
purpose with or without fee is hereby granted.
5+
6+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
7+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
8+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
9+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
10+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
11+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
12+
PERFORMANCE OF THIS SOFTWARE.

0 commit comments

Comments
 (0)