Skip to content

Commit b2b9533

Browse files
initial skeleton (#1)
1 parent f860f37 commit b2b9533

13 files changed

Lines changed: 427 additions & 1 deletion

File tree

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# This workflow will install Python dependencies, run tests, and smoke
2+
# the sdist/wheel on a range of Python versions.
3+
#
4+
# Created: 15th August 2026
5+
# Updated: 15th August 2026
6+
#
7+
8+
name: Python package
9+
10+
on:
11+
push:
12+
branches:
13+
- boilerplate
14+
- dev
15+
- idiomatic
16+
- master
17+
- rc1
18+
- rc2
19+
- rc3
20+
pull_request:
21+
22+
permissions:
23+
contents: read
24+
25+
defaults:
26+
run:
27+
shell: bash
28+
29+
jobs:
30+
build:
31+
32+
runs-on: ubuntu-latest
33+
strategy:
34+
fail-fast: false
35+
matrix:
36+
python-version:
37+
- "3.8"
38+
- "3.9"
39+
- "3.10"
40+
- "3.11"
41+
- "3.12"
42+
- "3.13"
43+
- "3.14"
44+
45+
steps:
46+
- name: Checking out code
47+
uses: actions/checkout@v4
48+
49+
- name: Set up Python ${{ matrix.python-version }}
50+
uses: actions/setup-python@v5
51+
with:
52+
python-version: ${{ matrix.python-version }}
53+
54+
- name: Install dependencies
55+
run: |
56+
python -m pip install --upgrade pip
57+
python -m pip install pytest
58+
python -m pip install -e .
59+
60+
- name: Test with pytest
61+
run: |
62+
pytest
63+
64+
- name: Build and install smoke
65+
run: |
66+
python -m pip install build
67+
python -m build
68+
python -m pip install dist/woad-*.whl
69+
python -c "import woad; assert woad.__version__ == '0.0.0'; print(woad.__version__)"
70+
71+
build-py27:
72+
73+
runs-on: ubuntu-latest
74+
container:
75+
image: python:2.7-slim
76+
steps:
77+
- uses: actions/checkout@v4
78+
- name: Compile library modules
79+
run: |
80+
python -m compileall woad
81+
- name: Test with unittest
82+
run: |
83+
python -m unittest discover -s tests
84+
env:
85+
PYTHONPATH: ${{ github.workspace }}

‎.gitignore‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# directories (by name)
2+
3+
/.venv/
4+
5+
build/
6+
dist/
7+
scratch/
8+
9+
*.egg-info/
10+
11+
12+
# directories (by pattern)
13+
14+
15+
# files (by name)
16+
17+
.DS_Store
18+
19+
20+
# files (by pattern)
21+
22+
*~
23+
*.pyc
24+
*.pyo
25+
*.swo
26+
*.swp
27+
*.tmp
28+
*.zip

‎AUTHORS.md‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# woad.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: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# woad.Python - Changes <!-- omit in toc -->
2+
3+
4+
## 0.0.0 - 15th August 2026
5+
6+
* initial project scaffolding;
7+
* **Python** **2.7** and **3.8+** compatibility;
8+
9+
10+
<!-- ########################### end of file ########################### -->

‎LICENSE‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
woad.Python - BSD 3-Clause License
2+
3+
Copyright (c) 2026, Matthew Wilson and Synesis Information Systems
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are met:
8+
9+
1. Redistributions of source code must retain the above copyright notice,
10+
this list of conditions and the following disclaimer.
11+
12+
2. Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
16+
3. Neither the name of the copyright holder nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
24+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30+
POSSIBILITY OF SUCH DAMAGE.

‎README.md‎

Lines changed: 99 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,99 @@
1-
# woad.Python
1+
# woad.Python <!-- omit in toc -->
2+
3+
Minimal ANSI terminal colour codes, for Python
4+
5+
![Language](https://img.shields.io/badge/Python-3776AB?style=flat&logo=python&logoColor=white)
6+
[![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
7+
[![PyPI](https://img.shields.io/pypi/v/woad.svg)](https://pypi.org/project/woad/)
8+
[![GitHub release](https://img.shields.io/github/v/release/synesissoftware/woad.Python.svg)](https://github.com/synesissoftware/woad.Python/releases/latest)
9+
[![Last Commit](https://img.shields.io/github/last-commit/synesissoftware/woad.Python)](https://github.com/synesissoftware/woad.Python/commits/master)
10+
[![CI](https://github.com/synesissoftware/woad.Python/actions/workflows/python-package.yml/badge.svg)](https://github.com/synesissoftware/woad.Python/actions/workflows/python-package.yml)
11+
![Python](https://img.shields.io/badge/Python-2.7%20%7C%203.8+-lightgrey)
12+
13+
14+
## Table of Contents <!-- omit in toc -->
15+
16+
- [Introduction](#introduction)
17+
- [Installation](#installation)
18+
- [Components](#components)
19+
- [Project Information](#project-information)
20+
- [Where to get help](#where-to-get-help)
21+
- [Contribution guidelines](#contribution-guidelines)
22+
- [Dependencies](#dependencies)
23+
- [Efferent (fan-out)](#efferent-fan-out)
24+
- [Development Dependencies](#development-dependencies)
25+
- [Afferent (fan-in)](#afferent-fan-in)
26+
- [Related projects](#related-projects)
27+
- [License](#license)
28+
29+
30+
## Introduction
31+
32+
**woad** provides the smallest useful set of fixed ANSI SGR colour sequences for library authors. It is not a console or TUI framework.
33+
34+
**woad.Python** is the **Python** implementation. It supports **Python 2.7** and **Python 3.8+**.
35+
36+
37+
## Installation
38+
39+
Install via **pip**:
40+
41+
```
42+
pip install woad
43+
```
44+
45+
Use via **import**:
46+
47+
```Python
48+
import woad
49+
```
50+
51+
52+
## Components
53+
54+
**woad.Python** currently ships the **`woad`** package and version metadata (`woad.__version__`). Colour codes, TTY/stream gating, and Windows virtual-terminal opt-in are not implemented in this 0.0.0 skeleton.
55+
56+
57+
## Project Information
58+
59+
60+
### Where to get help
61+
62+
[GitHub Page](https://github.com/synesissoftware/woad.Python "GitHub Page")
63+
64+
65+
### Contribution guidelines
66+
67+
Defect reports, feature requests, and pull requests are welcome on https://github.com/synesissoftware/woad.Python.
68+
69+
70+
### Dependencies
71+
72+
73+
#### Efferent (fan-out)
74+
75+
None.
76+
77+
78+
#### Development Dependencies
79+
80+
* [**pytest**](https://docs.pytest.org/)
81+
82+
83+
#### Afferent (fan-in)
84+
85+
None (currently).
86+
87+
88+
### Related projects
89+
90+
* [**woad.Ruby**](https://github.com/synesissoftware/woad.Ruby/)
91+
* [**woad.Rust**](https://github.com/synesissoftware/woad.Rust/)
92+
93+
94+
### License
95+
96+
**woad.Python** is released under the 3-clause BSD license. See [LICENSE](./LICENSE) for details.
97+
98+
99+
<!-- ########################### end of file ########################### -->

‎TODO.md‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# woad.Python - TODO <!-- omit in toc -->
2+
3+
4+
## Functional improvements
5+
6+
* [ ] SGR colour and reset codes;
7+
* [ ] TTY-conditional colour codes (process and per-stream);
8+
* [ ] Windows virtual-terminal gating (OS build + `GetConsoleMode`);
9+
10+
11+
## Performance improvements
12+
13+
* \<none>
14+
15+
16+
## Packaging improvements
17+
18+
* \<none>
19+
20+
21+
<!-- ########################### end of file ########################### -->

‎pyproject.toml‎

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
[build-system]
2+
build-backend = "setuptools.build_meta"
3+
requires = [
4+
"setuptools>=61.0",
5+
]
6+
7+
8+
[project]
9+
authors = [
10+
{ email = "matthew@synesis.com.au", name = "Matt Wilson" },
11+
]
12+
classifiers = [
13+
"Intended Audience :: Developers",
14+
"License :: OSI Approved :: BSD License",
15+
"Natural Language :: English",
16+
"Operating System :: OS Independent",
17+
"Programming Language :: Python",
18+
"Programming Language :: Python :: 2",
19+
"Programming Language :: Python :: 2.7",
20+
"Programming Language :: Python :: 3",
21+
"Programming Language :: Python :: 3.8",
22+
"Programming Language :: Python :: 3.9",
23+
"Programming Language :: Python :: 3.10",
24+
"Programming Language :: Python :: 3.11",
25+
"Programming Language :: Python :: 3.12",
26+
"Programming Language :: Python :: 3.13",
27+
"Programming Language :: Python :: 3.14",
28+
"Topic :: Software Development :: Libraries",
29+
"Topic :: Terminals",
30+
]
31+
dependencies = [
32+
]
33+
description = "Minimal ANSI terminal colour codes, for Python"
34+
keywords = [
35+
"ansi",
36+
"colour",
37+
"sgr",
38+
"terminal",
39+
"tty",
40+
]
41+
license = { text = "BSD-3-Clause" }
42+
name = "woad"
43+
readme = "README.md"
44+
requires-python = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, !=3.6.*, !=3.7.*"
45+
version = "0.0.0"
46+
47+
[project.urls]
48+
"Bug Tracker" = "https://github.com/synesissoftware/woad.Python/issues"
49+
Changelog = "https://github.com/synesissoftware/woad.Python/blob/master/CHANGES.md"
50+
Homepage = "https://github.com/synesissoftware/woad.Python"
51+
Repository = "https://github.com/synesissoftware/woad.Python"
52+
53+
54+
[tool.setuptools.packages.find]
55+
exclude = [
56+
"examples*",
57+
"tests*",
58+
]
59+
include = [
60+
"woad",
61+
"woad.*",
62+
]

‎setup.cfg‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[bdist_wheel]
2+
universal = 1

0 commit comments

Comments
 (0)