Skip to content

Commit add97fc

Browse files
Boilerplate, CI (#10)
* chore(python): establish canonical .sis/ project identity files Add .sis/project_name.txt and .sis/script_info_lines.txt across all 10 Python repositories to define canonical short project names and script information headers: - asynkio; - CLASP.Python; - Diagnosticism.Python; - libCLImate.Python; - libpath.Python; - p99.Python; - py2be; - Quench.Python; - recls.Python; - woad.Python; * docs: complete AUTHORS.md and NEWS.md for all Python projects * docs(python): align README Dependencies, taglines, and version narratives Polish active Python library docs for standardisation: - move py2be tagline before badge row; - normalise Dependencies to Efferent / Development Dependencies / Afferent; - populate CLASP.Python Dependencies and Diagnosticism afferent consumers; - sync libCLImate.Python package version to 0.0.1 with CHANGES/NEWS; - remove CHANGES previous-versions placeholders and asynkio TODO T.B.C. * chore(python): standardise editor and VCS boilerplate across projects Align .gitattributes, .gitignore, .editorconfig, .vimrc, and .vscode/settings.json across all 10 Python projects: - Linguist attributes for Python / shell / vimrc; - Synesis Python ignore set including .venv and tool caches; - EditorConfig matching .vscode indent/EOL/newline rules (no trailing-blank-line policy); - Vim and VS Code python rulers unified at [ 50, 60, 76, 120 ]. * chore(python): adopt PEP 621 hybrid packaging for Dual-tier libraries Add pyproject.toml alongside setup.py/setup.cfg so Dual-tier Python libraries keep Python 2.7 installability while modern tooling uses PEP 621: - migrate CLASP.Python, Diagnosticism.Python, and py2be to hybrid form; - add universal wheel setup.cfg; sync classifiers through 3.14; - fix CLASP.Python project URL casing; verify libCLImate and woad hybrids. * chore(python): complete MANIFEST.in for active library sdists Ensure active Python libraries package AUTHORS, NEWS, and other standard docs in sdists: - refresh MANIFEST.in for asynkio, CLASP.Python, Diagnosticism.Python, py2be; - add MANIFEST.in for libCLImate.Python and woad.Python; - fix missing final newline on CLASP.Python MANIFEST.in. * chore(python): sync dist helper scripts across active libraries Align packaging helper scripts for active Python libraries: - fix CLASP.Python egg-info cleanup to pyclasp.egg-info; - add build_dist.sh and build_dist_uv.sh for woad.Python; - remove obsolete asynkio/build_egg.sh and empty py2be/requirements.txt. * ci(python): standardise python-package.yml push and PR triggers Align active Python libraries to the Synesis canonical CI branch set: - on.push.branches: master, dev, boilerplate, idiomatic, rc1, rc2, rc3; - unfiltered pull_request:; - drop ad-hoc branches and path globs from asynkio and Dual workflows. * ci(python): modernise python-package.yml jobs and wheel smoke Bring active Python CI jobs in line with the libCLImate/woad gold form: - setup-python@v5, editable install, pytest on 3.x; - wheel build/install smoke asserting package __version__; - retain Dual build-py27 container jobs with legacy unittest paths; - add asynkio wheel smoke on the 3.11+ matrix. * test(python): standardise run_all_unit_tests.sh with .sis identity Align active Python libraries on the misc-dev-scripts unit-test helper: - refresh or add run_all_unit_tests.sh in all six active projects; - load .sis/project_name.txt and show script_info_lines.txt on --help; - use unittest discover -s tests (pytest preference for asynkio); - update the misc-dev-scripts Python template to match. * chore(python): prefer project .venv in run_all_unit_tests.sh discovery Discover `$Dir/.venv/bin/python` before PATH so bare helper runs avoid Apple/Xcode python3 (too old for asynkio; unsuitable for local install/test). * ci(clasp): add failing ruff lint job for Dual-tier CI Introduce ruff as the Dual lint gate for CLASP.Python: - add [tool.ruff] (py38, E/F; E501 ignored pending wrap pass) and an optional extra; - add a Lint (ruff) job on python-package.yml before the build matrix; - apply low-churn E/F fixes (re-exports, type/`is`, None checks, unused imports, semicolons) so ruff check . exits 0; * chore(python): bump active library versions past last published tags Raise asynkio, CLASP.Python, Diagnosticism.Python, libCLImate.Python, py2be, and woad.Python one patch above the latest published tag (or prior local floor) so packaging/CI modernisation is releasable; sync package metadata, smoke asserts, CHANGES.md, and NEWS.md.
1 parent e843bbe commit add97fc

39 files changed

Lines changed: 655 additions & 109 deletions

‎.editorconfig‎

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
root = true
2+
3+
# Language indent/EOL/charset overlap with .vscode/settings.json.
4+
# Rulers, renderWhitespace, detectIndentation, mergeEditor, and
5+
# language-server settings cannot be expressed here — they stay in
6+
# settings.json.
7+
8+
[*]
9+
charset = utf-8
10+
end_of_line = lf
11+
indent_size = 2
12+
indent_style = tab
13+
insert_final_newline = true
14+
trim_trailing_whitespace = true
15+
16+
# [json]
17+
[*.json]
18+
indent_size = 2
19+
indent_style = space
20+
21+
# [markdown]
22+
[*.md]
23+
indent_size = 2
24+
indent_style = space
25+
26+
# [python]
27+
[*.py]
28+
indent_size = 4
29+
indent_style = space
30+
31+
# [shellscript]
32+
[*.{bash,sh,zsh}]
33+
indent_size = 2
34+
indent_style = space
35+
36+
# [toml]
37+
[*.toml]
38+
indent_size = 2
39+
indent_style = tab
40+
41+
# [yaml]
42+
[*.{yaml,yml}]
43+
indent_size = 2
44+
indent_style = space

‎.gitattributes‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
2-
*.py linguist-language=Python
3-
1+
*.c linguist-language=C
2+
*.cpp linguist-language=C++
3+
*.h linguist-language=C
4+
*.hpp linguist-language=C++
45
*.html linguist-detectable=false
6+
*.py linguist-language=Python
57
*.sh linguist-detectable=false
68
*.vimrc linguist-detectable=false
9+
makefile linguist-detectable=false

‎.github/workflows/python-package.yml‎

Lines changed: 55 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2-
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
1+
# This workflow will install Python dependencies, run tests, and smoke
2+
# the sdist/wheel on a range of Python versions.
3+
#
4+
# Created: 14th September 2026
5+
# Updated: 14th September 2026
6+
#
37

48
name: Python package
59

@@ -9,13 +13,42 @@ on:
913
- master
1014
- dev
1115
- boilerplate
16+
- idiomatic
17+
- rc1
18+
- rc2
19+
- rc3
1220
pull_request:
13-
branches:
14-
- master
15-
- dev
16-
- boilerplate
21+
22+
permissions:
23+
contents: read
24+
25+
defaults:
26+
run:
27+
shell: bash
1728

1829
jobs:
30+
lint:
31+
name: Lint (ruff)
32+
runs-on: ubuntu-latest
33+
34+
steps:
35+
- name: Checking out code
36+
uses: actions/checkout@v4
37+
38+
- name: Set up Python
39+
uses: actions/setup-python@v5
40+
with:
41+
python-version: "3.14"
42+
43+
- name: Install dependencies
44+
run: |
45+
python -m pip install --upgrade pip
46+
python -m pip install ruff
47+
48+
- name: Lint with ruff
49+
run: |
50+
ruff check .
51+
1952
build:
2053

2154
runs-on: ubuntu-latest
@@ -32,24 +65,30 @@ jobs:
3265
- "3.14"
3366

3467
steps:
35-
- uses: actions/checkout@v4
68+
- name: Checking out code
69+
uses: actions/checkout@v4
70+
3671
- name: Set up Python ${{ matrix.python-version }}
37-
uses: actions/setup-python@v3
72+
uses: actions/setup-python@v5
3873
with:
3974
python-version: ${{ matrix.python-version }}
75+
4076
- name: Install dependencies
4177
run: |
4278
python -m pip install --upgrade pip
43-
python -m pip install flake8
44-
- name: Lint with flake8
79+
python -m pip install pytest
80+
python -m pip install -e .
81+
82+
- name: Test with pytest
4583
run: |
46-
# stop the build if there are Python syntax errors or undefined names
47-
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
48-
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
49-
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
50-
- name: Test with unittest
84+
pytest
85+
86+
- name: Build and install smoke
5187
run: |
52-
python tests/run_unittest.py
88+
python -m pip install build
89+
python -m build
90+
python -m pip install dist/pyclasp-*.whl
91+
python -c "import pyclasp; assert pyclasp.__version__ == '0.8.13'; print(pyclasp.__version__)"
5392
5493
build-py27:
5594

‎.gitignore‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,30 @@
22
# directories (by name)
33

44
/.bin/
5+
/.pytest_cache/
6+
/.ruff_cache/
7+
/.venv/
58

69
build/
710
dist/
811
dist-old/
912
scratch/
1013

1114
*.egg-info/
12-
**/__pycache__/
15+
1316

1417
# directories (by pattern)
1518

19+
**/__pycache__/
20+
21+
1622
# files (by name)
1723

1824
.DS_Store
1925

26+
notes.txt
27+
28+
2029
# files (by pattern)
2130

2231
*~
@@ -26,4 +35,3 @@ scratch/
2635
*.swp
2736
*.tmp
2837
*.zip
29-

‎.sis/project_name.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CLASP.Python

‎.sis/script_info_lines.txt‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CLASP.Python is a Command-Line Argument Sorting and Parsing library for Python
2+
Copyright (c) 2019-2026, Matthew Wilson and Synesis Information Systems
3+
Copyright (c) 2019, Matthew Wilson and Synesis Software

‎.vimrc‎

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,57 @@
1+
" Synesis Python project .vimrc — aligned with .vscode/settings.json (Python)
12

3+
set nocompatible
4+
filetype indent plugin on
5+
syntax enable
6+
set autoindent
7+
set backspace=indent,eol,start
8+
set hlsearch
9+
set incsearch
10+
set number
11+
12+
" files.insertFinalNewline
13+
set eol
14+
set fixeol
15+
16+
" editor.renderWhitespace: all
17+
set list
18+
set listchars=tab:->,trail:-,extends:>,precedes:<,nbsp:+
19+
20+
" editor.detectIndentation: false — global defaults match [python] (editor.tabSize: 4, insertSpaces: true)
21+
set colorcolumn=76
222
set expandtab
323
set shiftwidth=4
424
set softtabstop=4
525
set tabstop=4
6-
set tw=0
726

27+
" colorcolumn draws a full-column tint in Vim (not a VS Code-style 1px line).
28+
" Keep it subtle via the ColorColumn highlight group; reapply after colorscheme changes.
29+
if has('termguicolors')
30+
" set termguicolors
31+
endif
32+
33+
function! s:ConfigureColorColumn() abort
34+
highlight ColorColumn ctermbg=236 guibg=#2a2a2a cterm=NONE gui=NONE
35+
endfunction
36+
37+
call s:ConfigureColorColumn()
38+
autocmd ColorScheme * call s:ConfigureColorColumn()
39+
40+
" files.trimTrailingWhitespace
41+
autocmd BufWritePre * %s/\s\+$//e
42+
43+
augroup sis_python
44+
autocmd!
45+
46+
" [json] / [markdown] / [yaml]
47+
autocmd FileType json,markdown,yaml setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2
48+
49+
" [python] — match .vscode [python] tabSize 4 / insertSpaces true / rulers 50,60,76,120
50+
autocmd FileType python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 colorcolumn=50,60,76,120
51+
52+
" [shellscript]
53+
autocmd FileType sh,bash,zsh setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 colorcolumn=60,76
54+
55+
" [toml]
56+
autocmd FileType toml setlocal noexpandtab tabstop=2 shiftwidth=2 softtabstop=2
57+
augroup END

‎.vscode/settings.json‎

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,42 @@
22
"[json]": {
33
"editor.tabSize": 2,
44
},
5+
"[markdown]": {
6+
"editor.insertSpaces": true,
7+
"editor.tabSize": 2,
8+
},
59
"[python]": {
610
"diffEditor.ignoreTrimWhitespace": false,
711
"editor.insertSpaces": true,
8-
"editor.rulers": [ 60, 76 ],
12+
"editor.rulers": [ 50, 60, 76, 120 ],
913
"editor.tabSize": 4,
1014
},
15+
"[shellscript]": {
16+
"editor.insertSpaces": true,
17+
"editor.rulers": [ 60, 76 ],
18+
"editor.tabSize": 2,
19+
},
1120
"[toml]": {
1221
"editor.insertSpaces": false,
1322
"editor.tabSize": 2,
1423
},
24+
"[yaml]": {
25+
"editor.insertSpaces": true,
26+
"editor.tabSize": 2,
27+
},
1528
"editor.detectIndentation": false,
1629
"editor.insertSpaces": false,
1730
"editor.renderWhitespace": "all",
1831
"editor.rulers": [ 76 ],
1932
"editor.tabSize": 2,
20-
"files.insertFinalNewline": true,
21-
"files.trimTrailingWhitespace": true,
22-
"git.mergeEditor": false,
2333
"files.exclude": {
24-
"**/__pycache__": true,
2534
"**/*.egg-info": true,
2635
"**/*.swp": true,
36+
"**/__pycache__": true,
2737
},
2838
"files.insertFinalNewline": true,
2939
"files.trimTrailingWhitespace": true,
40+
"git.mergeEditor": false,
3041
"python.analysis.typeCheckingMode": "standard",
3142
"python.languageServer": "Pylance",
3243
}

‎AUTHORS.md‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# CLASP.Python - Authors <!-- omit in toc -->
2+
3+
4+
## Major Contributors
5+
6+
| Name | GitHub |
7+
| ----------- | --------------------------------- |
8+
| Matt Wilson | [mwsis](https://github.com/mwsis) |
9+
10+
11+
## Defect reports, fixes and suggestions (for which we are very grateful)
12+
13+
| Name | GitHub |
14+
| ------- | ------ |
15+
| \<none> | |
16+
17+
18+
Contributions are welcomed.
19+
20+
21+
<!-- ########################### end of file ########################### -->

‎CHANGES.md‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1-
# **CLASP.Python** Changes <!-- omit from toc -->
1+
# CLASP.Python - Changes <!-- omit in toc -->
2+
3+
4+
## 0.8.13 - 14th September 2026
5+
6+
* packaging, documentation, and CI modernisation (PEP 621 hybrid, canonical CI, **ruff**, helper scripts);
27

38

49
## 0.8.12 - 28th July 2026
510

6-
* fixed falsy default values causing `MissingValueException` for option arguments;
11+
* fixed falsey default values causing `MissingValueException` for option arguments;
712
* fixed failure message to be passed to `MissingValueException`;
813

914

@@ -164,10 +169,5 @@
164169
* ~ ensured internal methods named with leading underscore;
165170

166171

167-
## previous versions
168-
169-
None specified.
170-
171-
172172
<!-- ########################### end of file ########################### -->
173173

0 commit comments

Comments
 (0)