Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
f630415
Adjust boiler plate text following committee meeting, add TODO
dannyadair Aug 7, 2025
c347c02
Add TODO
dannyadair Aug 7, 2025
8c7e2ee
Add linting support and github action to run it
dannyadair Aug 7, 2025
3e9ea53
Move constitution to separate directory, ignore html/pdf
dannyadair Aug 7, 2025
b7ac615
Tidy up formatting with prettier
dannyadair Aug 7, 2025
2b0e8fc
Add .gitignore
dannyadair Aug 7, 2025
ce93780
Add lawyer question re: "disciplinary process"
dannyadair Aug 7, 2025
ced7087
Fix typo
dannyadair Aug 8, 2025
022055b
Add note about buggy github rendering
dannyadair Aug 12, 2025
6adf36b
Fix styling
dannyadair Aug 13, 2025
c8d8674
Link to weasyprint website
dannyadair Aug 13, 2025
6d6f414
Adjust TODO.md - lawyer questions, term limits, GM elects committee only
dannyadair Aug 20, 2025
06788cf
Fix typo (missing space)
dannyadair Aug 20, 2025
735d71b
Delete 3.2. and 3.3. (no term limits)
dannyadair Aug 20, 2025
c59cd7b
Add process change: Review constitution every 3 years
dannyadair Aug 21, 2025
971ae7f
Update TODO following latest committee meeting and lawyer's advice
dannyadair Sep 20, 2025
0f53f39
Uncheck pending committee decision
dannyadair Sep 20, 2025
3500cf5
Implement proposed changes
dannyadair Sep 20, 2025
744c79a
Remove "or intends" (to register as a charity)
dannyadair Sep 22, 2025
14bb3e3
Fix important apostrophe placement
dannyadair Sep 22, 2025
bfdb95a
Update TODO
dannyadair Sep 22, 2025
5b84d86
Update TODO (all done except procedural changes)
dannyadair Sep 25, 2025
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
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[*.{css,js,json,less,md,py,rst,sass,scss,svg.j2,xml,yaml,yml}]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.{json,yml,yaml,rst,md}]
indent_size = 2
36 changes: 36 additions & 0 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: pre-commit

on:
pull_request:
branches:
- "main*"
push:
branches:
- "main"

jobs:
pre-commit:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Get python version
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: Install pre-commit
run: pip install pre-commit
- name: Run pre-commit
run: pre-commit run --all-files --show-diff-on-failure --color=always
- name: Check that all files generated by pre-commit are in git
run: |
newfiles="$(git ls-files --others --exclude-from=.gitignore)"
if [ "$newfiles" != "" ] ; then
echo "Please check-in the following files:"
echo "$newfiles"
exit 1
fi
Empty file added .gitignore
Empty file.
48 changes: 48 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
default_language_version:
python: python3
node: "22.9.0"
repos:
- repo: local
hooks:
- id: prettier
name: prettier (with plugin-xml)
entry: prettier
args:
- --write
- --list-different
- --ignore-unknown
types: [text]
files: \.(css|htm|html|js|json|jsx|less|md|scss|toml|ts|xml|yaml|yml)$
language: node
additional_dependencies:
- "prettier@3.3.3"
- "@prettier/plugin-xml@3.4.1"
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: debug-statements
- id: fix-encoding-pragma
args: ["--remove"]
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-symlinks
- id: check-xml
- id: mixed-line-ending
args: ["--fix=lf"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.8
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/PyCQA/pylint
rev: v3.3.4
hooks:
- id: pylint
- id: pylint
additional_dependencies:
- "pdfbaker"
34 changes: 20 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,44 @@
# Python New Zealand - Rules

Official rules of [Python New Zealand](https://python.nz).<br>
This repository holds the authoritative source code of the documents and tracks changes to them.
Official rules of [Python New Zealand](https://python.nz).<br> This repository holds the
authoritative source code of the documents and tracks changes to them.

* Constitution
* Bylaws
* Code of Conduct
- [Constitution](constitution/constitution.md)
- Bylaws
- Code of Conduct

## How to create documents

### Constitution

This is Markdown source code to produce HTML (for https://python.nz) and PDF (for printing)<br>
*Note: On github.com, bullet points will show in addition to numbering (styling is ignored)*
This is Markdown source code to produce HTML (for https://python.nz) and PDF (for
printing)<br> _Note: On github.com, bullet points will show in addition to numbering
(styling is ignored). Also, clauses following a bullet list wrongly remain at the same
indentation level as the bullet list - this seems to be a rendering bug in github. The
HTML/PDF results look fine._

#### Create HTML

Use [pandoc](https://pandoc.org):

```
pandoc -s constitution.md -o constitution.html -c constitution.css -V "pagetitle:Constitution"
```
(`-s` standalone = embed external CSS, `pagetitle` to suppress title warning without inserting another headline)

(`-s` standalone = embed external CSS, `pagetitle` to suppress title warning without
inserting another headline)

#### Table of Contents

Optionally, `--toc` will also create a table of contents with headline links (handy but not fit for PDF)
Optionally, `--toc` will also create a table of contents with headline links (handy but
not fit for PDF)

```
pandoc -s constitution.md -o constitution.html -c constitution.css -V "pagetitle:Constitution" --toc
```

#### Create PDF

Use [weasyprint](https://weasyprint.org) or similar, or just print from your browser:
```
weasyprint constitution.html constitution.pdf
```

Just print the HTML from your browser to a PDF file.<br> If you want to use a dedicated
conversion tool instead, check that it does the job correctly (the numbering of bullets
and sub bullets is where [weasyprint](https://weasyprint.org/) failed)
14 changes: 14 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Procedural changes and other consequences

In order to actually follow our new constitution, we'll need to make some changes.

- [ ] (Vice) President -> (Vice) Chairperson (email / alias, 1Password, website,
HelloClub)
- [ ] Upon adoption at GM: confirm existing life members
- [ ] Upon adoption at GM: confirm existing membership fees
- [ ] Election process: only officers are elected by GM, positions within committee
- [ ] Election process: must FIRST confirm they would stand if elected
- [ ] Election process: must FIRST certify that they're not ineligible
- [ ] Election process: counting scrutineers are 2 members who are not nominees
- [ ] Election process create a bylaw for implementation details?
- [ ] Charity return: Constitution needs review every 3 years
Loading
Loading