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
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ indent_size = 4
indent_size = 2

[*.{md,rst}]
trim_trailing_whitespace = false
trim_trailing_whitespace = false
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[flake8]
max-line-length = 88
extend-ignore = E203
extend-ignore = E203
2 changes: 1 addition & 1 deletion .gitattribute
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ LICENSE text eol=lf
.gitignore text eol=lf
.gitattribute text eol=lf
.flake8 text eol=lf
.pylintrc text eol=lf
.pylintrc text eol=lf
33 changes: 33 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
version: 2
updates:
# Enable version updates for Python dependencies
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "04:00"
open-pull-requests-limit: 10
reviewers:
- "PermutaTriangle"
assignees:
- "PermutaTriangle"
commit-message:
prefix: "deps"
include: "scope"

# Enable version updates for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "04:00"
open-pull-requests-limit: 5
reviewers:
- "PermutaTriangle"
assignees:
- "PermutaTriangle"
commit-message:
prefix: "ci"
include: "scope"
40 changes: 40 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "CodeQL"

on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master ]
schedule:
- cron: '30 2 * * 1' # Weekly on Mondays at 02:30 UTC

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'python' ]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
54 changes: 36 additions & 18 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,21 @@ jobs:
fail-fast: false
matrix:
include:
- python: 3.8
# Linting and type checking (run on Python 3.11)
- python: "3.11"
toxenv: flake8
os: ubuntu-latest
- python: 3.8
- python: "3.11"
toxenv: mypy
os: ubuntu-latest
- python: 3.8
- python: "3.11"
toxenv: pylint
os: ubuntu-latest
- python: 3.8
- python: "3.11"
toxenv: black
os: ubuntu-latest

- python: 3.7
toxenv: py37
os: ubuntu-latest
# Python version testing (Linux)
- python: 3.8
toxenv: py38
os: ubuntu-latest
Expand All @@ -34,28 +33,47 @@ jobs:
- python: "3.10"
toxenv: py310
os: ubuntu-latest
- python: pypy-3.7
toxenv: pypy37
- python: "3.11"
toxenv: py311
os: ubuntu-latest
- python: "3.12"
toxenv: py312
os: ubuntu-latest
- python: "3.13"
toxenv: py313
os: ubuntu-latest
- python: pypy-3.8
toxenv: pypy38
os: ubuntu-latest
- python: pypy-3.9
toxenv: pypy39
os: ubuntu-latest
- python: pypy-3.10
toxenv: pypy310
os: ubuntu-latest

- python: 3.8
toxenv: py38
# Cross-platform testing (Python 3.11)
- python: "3.11"
toxenv: py311
os: macos-latest
- python: 3.8
toxenv: py38
- python: "3.11"
toxenv: py311
os: windows-latest

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
python-version: ${{ matrix.python }}
allow-prereleases: true
- name: install dependencies
run: python -m pip install --upgrade pip tox
run: |
python -m pip install --upgrade pip setuptools
python -m pip install tox
- name: run
env:
TOXENV: ${{ matrix.toxenv }}
run: tox
- name: setup
run: python setup.py install
run: python setup.py install
65 changes: 62 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ target/
profile_default/
ipython_config.py

# pyenv
.python-version
# pyenv (but we want to track our .python-version file)
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
Expand Down Expand Up @@ -142,4 +142,63 @@ dmypy.json
.vscode/

# Program's output
tilingsgui/exports/
tilingsgui/exports/
exports/

# macOS
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# Windows
*.stackdump

# Linux
*~

# Temporary/backup files
*.tmp
*.temp
*.bak
*.swp
*.swo
*~

# IDE specific files (additional)
.idea/
*.iml
*.ipr
*.iws
.vscode/settings.json
.vscode/launch.json
.vscode/tasks.json

# Pre-commit
.pre-commit-config.yaml.bak

# Ruff cache (modern Python linter)
.ruff_cache/

# Modern type checkers
.pyright/

# Coverage.py
.coverage.*
coverage.xml
htmlcov/

# Duplicate files (with version numbers or " 2" suffix)
*" 2".*
* 2.*

# Temporary export files
*.json.tmp
tilings_export.json

# Development files that shouldn't be committed
hamstur.py
2025-MODERNIZATION-PLAN.md
2 changes: 1 addition & 1 deletion .isort.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ multi_line_output=3
include_trailing_comma=True
force_grid_wrap=0
use_parentheses=True
line_length=88
line_length=88
20 changes: 18 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
repos:
- repo: https://github.com/psf/black
rev: 22.10.0
rev: 24.8.0
hooks:
- id: black
- id: black
language_version: python3.11

- repo: https://github.com/pycqa/flake8
rev: 7.1.1
hooks:
- id: flake8
additional_dependencies: [flake8-isort]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: check-merge-conflict
6 changes: 3 additions & 3 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[MASTER]

ignore-patterns=test_.*?py
init-hook="from pylint.config import find_pylintrc; import os, sys; sys.path.append(os.path.dirname(find_pylintrc())+'/tilingsgui')"
init-hook="import os, sys; sys.path.append(os.path.join(os.path.dirname(__file__), 'tilingsgui'))"
max-args=10
max-module-lines=1200
disable=too-few-public-methods,too-many-lines
good-names=r,c,x,y,h,w,i,j,k,n,x1,x2,y1,y2,g,b,dx,dy
disable=too-few-public-methods,too-many-lines,too-many-positional-arguments
good-names=r,c,x,y,h,w,i,j,k,n,x1,x2,y1,y2,g,b,dx,dy
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.11
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

25 changes: 19 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,24 @@ Pyperclip requires clipboard tools that might not come pre-installed.

sudo apt-get install xclip

Without them the app still works but pasting won’t.
Without them the app still works but pasting won't.

Note for macOS
~~~~~~~~~~~~~~

PyObjC is automatically installed on macOS systems for proper Cocoa/OpenGL integration with pyglet 2.0+. If you encounter OpenGL surface errors, ensure PyObjC is installed:

.. code:: sh

pip install pyobjc-core pyobjc-framework-Cocoa

This is handled automatically during normal installation.

**PyPy Users**: PyObjC doesn't support PyPy. TilingsGUI automatically configures pyglet to use shadow context disabled mode for PyPy compatibility on macOS.

Known issues
------------
*
*

Report a bug
~~~~~~~~~~~~
Expand Down Expand Up @@ -79,9 +92,9 @@ The following two inputs are two ways of producing the same initial tiling.
.. code::

1432_12345

{"class_module": "tilings.tiling", "comb_class": "Tiling", "obstructions": [{"patt": [0, 3, 2, 1], "pos": [[0, 0], [0, 0], [0, 0], [0, 0]]}, {"patt": [0, 1, 2, 3, 4], "pos": [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0]]}], "requirements": [], "assumptions": []}

The initial tiling in question would be the following.

.. code:: sh
Expand All @@ -90,7 +103,7 @@ The initial tiling in question would be the following.
|1|
+-+
1: Av(0321, 01234)


Cell insertion
~~~~~~~~~~~~~~
Expand Down Expand Up @@ -131,7 +144,7 @@ By clicking a point of a requirement, we pass its gridded permutation along with

Fusion
~~~~~~
Let ``c_r`` and ``c_c`` be the row and column respectively of the clicked cell. There are 4 types of fusions available. Fusion with ``row=c_r``, |fusion_r|, fusion with ``col=c_c``, |fusion_c|, component fusion with ``row=c_r``, |fusion_comp_r|, and component fusion with ``col=c_c``, |fusion_comp_c|. If the fusion are invalid, then exceptions are caught and nothing happens.
Let ``c_r`` and ``c_c`` be the row and column respectively of the clicked cell. There are 4 types of fusions available. Fusion with ``row=c_r``, |fusion_r|, fusion with ``col=c_c``, |fusion_c|, component fusion with ``row=c_r``, |fusion_comp_r|, and component fusion with ``col=c_c``, |fusion_comp_c|. If the fusion are invalid, then exceptions are caught and nothing happens.

Fusion:

Expand Down
Loading