Skip to content

Commit ca955c3

Browse files
committed
Modernize CI, update dependencies, and add security policy
Replaces Travis CI with GitHub Actions workflows, adds CodeQL analysis, and introduces Dependabot configuration for automated dependency updates. Updates Python support to 3.8+ in setup.py and pyproject.toml, modernizes pre-commit hooks, and expands .gitignore for better cross-platform and tool coverage. Adds SECURITY.md and .python-version, removes .travis.yml, and makes minor docstring and formatting improvements throughout the codebase.
1 parent 6a1718d commit ca955c3

Some content is hidden

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

60 files changed

+321
-136
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ indent_size = 4
1212
indent_size = 2
1313

1414
[*.{md,rst}]
15-
trim_trailing_whitespace = false
15+
trim_trailing_whitespace = false

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[flake8]
22
max-line-length = 88
3-
extend-ignore = E203
3+
extend-ignore = E203

.gitattribute

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ LICENSE text eol=lf
1818
.gitignore text eol=lf
1919
.gitattribute text eol=lf
2020
.flake8 text eol=lf
21-
.pylintrc text eol=lf
21+
.pylintrc text eol=lf

.github/dependabot.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
version: 2
2+
updates:
3+
# Enable version updates for Python dependencies
4+
- package-ecosystem: "pip"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
day: "monday"
9+
time: "04:00"
10+
open-pull-requests-limit: 10
11+
reviewers:
12+
- "PermutaTriangle"
13+
assignees:
14+
- "PermutaTriangle"
15+
commit-message:
16+
prefix: "deps"
17+
include: "scope"
18+
19+
# Enable version updates for GitHub Actions
20+
- package-ecosystem: "github-actions"
21+
directory: "/"
22+
schedule:
23+
interval: "weekly"
24+
day: "monday"
25+
time: "04:00"
26+
open-pull-requests-limit: 5
27+
reviewers:
28+
- "PermutaTriangle"
29+
assignees:
30+
- "PermutaTriangle"
31+
commit-message:
32+
prefix: "ci"
33+
include: "scope"

.github/workflows/codeql.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ master, develop ]
6+
pull_request:
7+
branches: [ master ]
8+
schedule:
9+
- cron: '30 2 * * 1' # Weekly on Mondays at 02:30 UTC
10+
11+
jobs:
12+
analyze:
13+
name: Analyze
14+
runs-on: ubuntu-latest
15+
permissions:
16+
actions: read
17+
contents: read
18+
security-events: write
19+
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
language: [ 'python' ]
24+
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v4
28+
29+
- name: Initialize CodeQL
30+
uses: github/codeql-action/init@v3
31+
with:
32+
languages: ${{ matrix.language }}
33+
34+
- name: Autobuild
35+
uses: github/codeql-action/autobuild@v3
36+
37+
- name: Perform CodeQL Analysis
38+
uses: github/codeql-action/analyze@v3
39+
with:
40+
category: "/language:${{matrix.language}}"

.github/workflows/test.yml

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,21 @@ jobs:
99
fail-fast: false
1010
matrix:
1111
include:
12-
- python: 3.8
12+
# Linting and type checking (run on Python 3.11)
13+
- python: "3.11"
1314
toxenv: flake8
1415
os: ubuntu-latest
15-
- python: 3.8
16+
- python: "3.11"
1617
toxenv: mypy
1718
os: ubuntu-latest
18-
- python: 3.8
19+
- python: "3.11"
1920
toxenv: pylint
2021
os: ubuntu-latest
21-
- python: 3.8
22+
- python: "3.11"
2223
toxenv: black
2324
os: ubuntu-latest
2425

25-
- python: 3.7
26-
toxenv: py37
27-
os: ubuntu-latest
26+
# Python version testing (Linux)
2827
- python: 3.8
2928
toxenv: py38
3029
os: ubuntu-latest
@@ -34,28 +33,45 @@ jobs:
3433
- python: "3.10"
3534
toxenv: py310
3635
os: ubuntu-latest
37-
- python: pypy-3.7
38-
toxenv: pypy37
36+
- python: "3.11"
37+
toxenv: py311
38+
os: ubuntu-latest
39+
- python: "3.12"
40+
toxenv: py312
41+
os: ubuntu-latest
42+
- python: "3.13"
43+
toxenv: py313
44+
os: ubuntu-latest
45+
- python: pypy-3.8
46+
toxenv: pypy38
47+
os: ubuntu-latest
48+
- python: pypy-3.9
49+
toxenv: pypy39
50+
os: ubuntu-latest
51+
- python: pypy-3.10
52+
toxenv: pypy310
3953
os: ubuntu-latest
4054

41-
- python: 3.8
42-
toxenv: py38
55+
# Cross-platform testing (Python 3.11)
56+
- python: "3.11"
57+
toxenv: py311
4358
os: macos-latest
44-
- python: 3.8
45-
toxenv: py38
59+
- python: "3.11"
60+
toxenv: py311
4661
os: windows-latest
4762

4863
runs-on: ${{ matrix.os }}
4964
steps:
50-
- uses: actions/checkout@v2
51-
- uses: actions/setup-python@v2
65+
- uses: actions/checkout@v4
66+
- uses: actions/setup-python@v5
5267
with:
53-
python-version: ${{ matrix.python }}
68+
python-version: ${{ matrix.python }}
69+
allow-prereleases: true
5470
- name: install dependencies
5571
run: python -m pip install --upgrade pip tox
5672
- name: run
5773
env:
5874
TOXENV: ${{ matrix.toxenv }}
5975
run: tox
6076
- name: setup
61-
run: python setup.py install
77+
run: python setup.py install

.gitignore

Lines changed: 62 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ target/
8686
profile_default/
8787
ipython_config.py
8888

89-
# pyenv
90-
.python-version
89+
# pyenv (but we want to track our .python-version file)
90+
# .python-version
9191

9292
# pipenv
9393
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
@@ -142,4 +142,63 @@ dmypy.json
142142
.vscode/
143143

144144
# Program's output
145-
tilingsgui/exports/
145+
tilingsgui/exports/
146+
exports/
147+
148+
# macOS
149+
.DS_Store
150+
.DS_Store?
151+
._*
152+
.Spotlight-V100
153+
.Trashes
154+
ehthumbs.db
155+
Thumbs.db
156+
157+
# Windows
158+
*.stackdump
159+
160+
# Linux
161+
*~
162+
163+
# Temporary/backup files
164+
*.tmp
165+
*.temp
166+
*.bak
167+
*.swp
168+
*.swo
169+
*~
170+
171+
# IDE specific files (additional)
172+
.idea/
173+
*.iml
174+
*.ipr
175+
*.iws
176+
.vscode/settings.json
177+
.vscode/launch.json
178+
.vscode/tasks.json
179+
180+
# Pre-commit
181+
.pre-commit-config.yaml.bak
182+
183+
# Ruff cache (modern Python linter)
184+
.ruff_cache/
185+
186+
# Modern type checkers
187+
.pyright/
188+
189+
# Coverage.py
190+
.coverage.*
191+
coverage.xml
192+
htmlcov/
193+
194+
# Duplicate files (with version numbers or " 2" suffix)
195+
*" 2".*
196+
* 2.*
197+
198+
# Temporary export files
199+
*.json.tmp
200+
tilings_export.json
201+
202+
# Development files that shouldn't be committed
203+
hamstur.py
204+
2025-MODERNIZATION-PLAN.md

.isort.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ multi_line_output=3
55
include_trailing_comma=True
66
force_grid_wrap=0
77
use_parentheses=True
8-
line_length=88
8+
line_length=88

.pre-commit-config.yaml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
repos:
22
- repo: https://github.com/psf/black
3-
rev: 22.10.0
3+
rev: 24.8.0
44
hooks:
5-
- id: black
5+
- id: black
6+
language_version: python3.11
7+
8+
- repo: https://github.com/pycqa/flake8
9+
rev: 7.1.1
10+
hooks:
11+
- id: flake8
12+
additional_dependencies: [flake8-isort]
13+
14+
- repo: https://github.com/pre-commit/pre-commit-hooks
15+
rev: v4.6.0
16+
hooks:
17+
- id: trailing-whitespace
18+
- id: end-of-file-fixer
19+
- id: check-yaml
20+
- id: check-added-large-files
21+
- id: check-merge-conflict

.pylintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ init-hook="from pylint.config import find_pylintrc; import os, sys; sys.path.app
55
max-args=10
66
max-module-lines=1200
77
disable=too-few-public-methods,too-many-lines
8-
good-names=r,c,x,y,h,w,i,j,k,n,x1,x2,y1,y2,g,b,dx,dy
8+
good-names=r,c,x,y,h,w,i,j,k,n,x1,x2,y1,y2,g,b,dx,dy

0 commit comments

Comments
 (0)