Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 7 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 2.0
version: 2.1

build_and_test: &build_and_test_steps
- checkout
Expand All @@ -11,27 +11,21 @@ build_and_test: &build_and_test_steps


jobs:
StyleCheck:
pre-commit:
docker:
- image: cimg/python:3.11
steps:
- checkout
- run: python --version ; pip --version ; pwd ; ls -l
- run: pip install black codespell ruff
- run: codespell -L queenland,uint,assertin
- run: ruff check
- run: black . --check
- run: pipx run pre-commit run --all-files --show-diff-on-failure


Python3:
pytest:
docker:
- image: cimg/python:3.11
- image: cimg/python:3.13
steps: *build_and_test_steps


workflows:
version: 2
build:
jobs:
- StyleCheck
- Python3
- pre-commit
- pytest
70 changes: 70 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Learn more about this config here: https://pre-commit.com/

# To enable these pre-commit hooks run:
# `pipx install pre-commit` or `brew install pre-commit`
# Then in the project root directory run `pre-commit install`

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-added-large-files
- id: check-ast
# - id: check-builtin-literals
- id: check-case-conflict
- id: check-docstring-first
exclude: "test_s2gs/test_all.py$"
# - id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-toml
- id: check-vcs-permalinks
- id: check-xml
- id: check-yaml
- id: debug-statements
- id: destroyed-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- id: file-contents-sorter
- id: fix-byte-order-marker
- id: forbid-new-submodules
- id: forbid-submodules
#- id: mixed-line-ending
# args:
# - --fix=lf
#- id: name-tests-test
#- id: pretty-format-json
# exclude: fe/jsconfig.json
- id: requirements-txt-fixer
- id: sort-simple-yaml
- id: trailing-whitespace

- repo: https://github.com/MarcoGorelli/auto-walrus
rev: 0.3.4
hooks:
- id: auto-walrus

- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
- id: codespell # See pyproject.toml for args
additional_dependencies:
- tomli

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.13.2
hooks:
- id: ruff-check
# - id: ruff-format

- repo: https://github.com/tox-dev/pyproject-fmt
rev: v2.6.0
hooks:
- id: pyproject-fmt

- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.24.1
hooks:
- id: validate-pyproject
1 change: 0 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -214,4 +214,3 @@ Changed Stuff (non-backwards compatible!):
* is_build flag marking abilities that create units
* build_unit indicating the unit type that is built
* build_time indicating the build time for the ability

1 change: 0 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -327,4 +327,3 @@ and kept this project going.
.. _phpsc2replay: http://code.google.com/p/phpsc2replay/
.. _sc2replay-csharp: https://github.com/ascendedguard/sc2replay-csharp
.. _s2protocol: https://github.com/Blizzard/s2protocol

2 changes: 1 addition & 1 deletion docs/source/articles/addingnewdatapacks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Adding new Datapacks
=======================

TODO
TODO
2 changes: 1 addition & 1 deletion docs/source/dataobjects.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ Build
--------------------------

.. autoclass:: Build
:members:
:members:
1 change: 0 additions & 1 deletion docs/source/events/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ All of the gamplay and state information contained in the replay is packed into
game
message
tracker

2 changes: 1 addition & 1 deletion docs/source/factories.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ DoubleCachedSC2Factory
--------------------------

.. autoclass:: DoubleCachedSC2Factory
:members:
:members:
1 change: 0 additions & 1 deletion docs/source/mainobjects.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@ Game Summary

.. autoclass:: GameSummary
:members:

2 changes: 1 addition & 1 deletion docs/source/sc2reader.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
SC2Reader
======================

The replay factory
The replay factory
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,6 @@ lint.ignore = [
"F841", # Run `ruff --select=F841 --fix .`
]
lint.mccabe.max-complexity = 34

[tool.codespell]
ignore-words-list = "queenland"
Loading