From ffb9d065efed359fa6bfd3905e64a90ef9fe0375 Mon Sep 17 00:00:00 2001 From: Bradley Wojcik Date: Sun, 25 Feb 2024 09:38:14 -0500 Subject: [PATCH] update tooling, update readme, begin v1 beta push --- .flake8 | 2 -- .gitignore | 8 ++++++++ .pre-commit-config.yaml | 33 ++++++++++++--------------------- README.md | 13 ++++++++++--- docs/changelog.md | 9 +++++++++ justfile | 27 +++++++++++++++++---------- pyproject.toml | 13 +++---------- src/euchre/__init__.py | 2 +- 8 files changed, 60 insertions(+), 47 deletions(-) delete mode 100644 .flake8 diff --git a/.flake8 b/.flake8 deleted file mode 100644 index d67402c..0000000 --- a/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -extend-ignore = D1, D2, E1, E2, E3, E501, W1, W2, W3, W5 diff --git a/.gitignore b/.gitignore index ffedb9e..1de6a7e 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,14 @@ __pycache__/ build/ dist/ +# tool cache +.mypy_cache +.pytest_cache +.ruff_cache + # test .coverage coverage.xml + +# homebrew +formula.rb diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 564d387..731615e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,29 +9,26 @@ repos: - id: check-yaml - id: check-toml - id: check-added-large-files - - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.1.6 + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.2.2 hooks: + # run the linter - id: ruff args: [--fix, --exit-non-zero-on-fix] - - repo: https://github.com/psf/black - rev: 23.11.0 - hooks: - - id: black - - repo: https://github.com/PyCQA/flake8 - rev: 6.1.0 - hooks: - - id: flake8 - - repo: https://github.com/PyCQA/isort - rev: 5.12.0 + # run the formatter + - id: ruff-format + - repo: https://github.com/dosisod/refurb + rev: v1.28.0 hooks: - - id: isort + - id: refurb + # additional_dependencies: + # - mypy<1.7 # SEE: https://github.com/dosisod/refurb/issues/305 - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.27.1 + rev: 0.28.0 hooks: - id: check-github-workflows - repo: https://github.com/gitleaks/gitleaks - rev: v8.18.1 + rev: v8.18.2 hooks: - id: gitleaks # - repo: https://github.com/pre-commit/mirrors-prettier @@ -43,9 +40,3 @@ repos: # hooks: # - id: semgrep # args: ["--config", "auto", "--error", "--skip-unknown-extensions"] - - repo: https://github.com/dosisod/refurb - rev: v1.24.0 - hooks: - - id: refurb - # additional_dependencies: - # - mypy<1.7 # SEE: https://github.com/dosisod/refurb/issues/305 diff --git a/README.md b/README.md index 205674c..9276ed0 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ # euchre-cli -[![build status](https://img.shields.io/github/actions/workflow/status/boldandbrad/euchre-cli/python-test.yml?branch=main&logo=github)] +[![build status](https://img.shields.io/github/actions/workflow/status/boldandbrad/euchre-cli/python-test.yml?branch=main&logo=github)](https://github.com/boldandbrad/euchre-cli/actions/workflows/python-test.yml?query=branch%3Amain+) [![codecov](https://codecov.io/gh/boldandbrad/euchre-cli/branch/main/graph/badge.svg)](https://codecov.io/gh/boldandbrad/euchre-cli) [![docs](https://img.shields.io/website?down_message=down&label=docs&up_message=online&url=https%3A%2F%2Fboldandbrad.github.io%2Feuchre-cli%2F)](https://boldandbrad.github.io/euchre-cli/) [![PyPI](https://img.shields.io/pypi/v/euchre-cli)](https://pypi.org/project/euchre-cli/) @@ -25,7 +25,7 @@ * James Barbret - logo design -## Planned Features +## Roadmap ### Release 1.x @@ -45,6 +45,7 @@ ### Future +* TUI version * Play multiple cards at once if they are the highest remaining cards * Ability to go alone * Go alone with help mode @@ -55,4 +56,10 @@ * 'Ace no face' mode * Three handed euchre mode * Install with homebrew on mac and linux ? -* Install with Chocolatey on windows ? +* Install with Chocolatey/Scoop on windows ? + +### Probably never but would be cool, right? 🤷 + +* Ability to connect to and play with your friends online +* Integrate this into a larger tool called "cards-cli" or something with other + available card games. diff --git a/docs/changelog.md b/docs/changelog.md index 9e6bd48..b30c0d9 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -9,6 +9,15 @@ and this project adheres to ## Unreleased +### Added + +- Add Readme build-status badge link to github actions + +### Updated + +- Further consolidate dev tooling with ruff +- Update Roadmap in Readme + ## [0.7.0] - 2024-02-19 ### Added diff --git a/justfile b/justfile index 80dd6db..90f0d59 100644 --- a/justfile +++ b/justfile @@ -2,32 +2,39 @@ venv: . .venv/bin/activate -# install euchre-cli from local -install: - pip install -q ."[test]" +# install dev dependencies +dev-deps: + pip install ."[dev]" -# install euchre-cli via flit -flit-install: - pip install flit - flit install +# install test dependencies +test-deps: + pip install ."[test]" + +# install euchre-cli from local +install: dev-deps + pip install . # install editable dev-install: pip install -q -e . +# install euchre-cli via flit +flit-install: dev-deps + flit install + # lint and format lint: pre-commit run --show-diff-on-failure --all-files # run all tests -test: install +test: test-deps pytest # run all tests with coverage -test-cov: install +test-cov: test-deps pytest -v --cov-report xml --cov euchre -# build dist +# build distribution build: flit build diff --git a/pyproject.toml b/pyproject.toml index 8ed2a96..43f6624 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,26 +30,19 @@ test = [ "pytest-mock", ] dev = [ - "black", - "flake8", - "flit", - "isort", + "ruff", + "refurb", "pre-commit", "homebrew-pypi-poet", - "refurb", ] [tool.flit.module] name = "euchre" -[tool.isort] -profile = "black" -skip = ["src/euchre/abstract/__init__.py"] - [tool.pytest.ini_options] minversion = "6.0" testpaths = ["tests"] -[tool.ruff] +[tool.ruff.lint] # Never enforce `E501` (line length violations). ignore = ["E501"] diff --git a/src/euchre/__init__.py b/src/euchre/__init__.py index 6f444cd..32d57e9 100644 --- a/src/euchre/__init__.py +++ b/src/euchre/__init__.py @@ -1,4 +1,4 @@ """Play euchre in your terminal.""" # release version -__version__ = "0.7.0" +__version__ = "1.0.0b1"