mirror of
https://github.com/kuhyx/utils.git
synced 2026-11-10 19:27:16 +01:00
Root scaffold: README, LICENSE, per-subdirectory CI for utils monorepo
This commit is contained in:
commit
e1d54ff75e
24
.github/workflows/crdt-sync-precommit.yml
vendored
Normal file
24
.github/workflows/crdt-sync-precommit.yml
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
name: crdt-sync pre-commit
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths: ['crdt-sync/**']
|
||||
pull_request:
|
||||
branches: [main]
|
||||
paths: ['crdt-sync/**']
|
||||
|
||||
jobs:
|
||||
pre-commit:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.12"
|
||||
- name: Install dependencies
|
||||
working-directory: crdt-sync
|
||||
run: pip install -r requirements.txt
|
||||
- uses: pre-commit/action@v3.0.1
|
||||
with:
|
||||
extra_args: --config crdt-sync/.pre-commit-config.yaml --all-files
|
||||
33
.github/workflows/crdt-sync-tests.yml
vendored
Normal file
33
.github/workflows/crdt-sync-tests.yml
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
name: crdt-sync tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths: ['crdt-sync/**']
|
||||
pull_request:
|
||||
branches: [main]
|
||||
paths: ['crdt-sync/**']
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: crdt-sync
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.10", "3.11", "3.12"]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: pip install -r requirements.txt
|
||||
|
||||
- name: Run tests with coverage
|
||||
run: python -m pytest -v
|
||||
24
.github/workflows/gatelock-precommit.yml
vendored
Normal file
24
.github/workflows/gatelock-precommit.yml
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
name: gatelock pre-commit
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths: ['gatelock/**']
|
||||
pull_request:
|
||||
branches: [main]
|
||||
paths: ['gatelock/**']
|
||||
|
||||
jobs:
|
||||
pre-commit:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.12"
|
||||
- name: Install dependencies
|
||||
working-directory: gatelock
|
||||
run: pip install -r requirements.txt
|
||||
- uses: pre-commit/action@v3.0.1
|
||||
with:
|
||||
extra_args: --config gatelock/.pre-commit-config.yaml --all-files
|
||||
33
.github/workflows/gatelock-tests.yml
vendored
Normal file
33
.github/workflows/gatelock-tests.yml
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
name: gatelock tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths: ['gatelock/**']
|
||||
pull_request:
|
||||
branches: [main]
|
||||
paths: ['gatelock/**']
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: gatelock
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.10", "3.11", "3.12"]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: pip install -r requirements.txt
|
||||
|
||||
- name: Run tests with coverage
|
||||
run: python -m pytest -v
|
||||
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2026 Krzysztof Rudnicki
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
52
README.md
Normal file
52
README.md
Normal file
@ -0,0 +1,52 @@
|
||||
# utils
|
||||
|
||||
Shared libraries used across kuhyx's other projects. Each subdirectory is a
|
||||
formerly-standalone repo, folded in here with full commit history preserved
|
||||
(see each subdirectory's own `git log` for its pre-merge history).
|
||||
|
||||
## crdt_sync_dart/
|
||||
|
||||
Dart/Flutter CRDT sync library (pub package name: `crdt_sync`, not published
|
||||
to pub.dev — consumed via a git dependency). Mirrors `crdt-sync` (below)
|
||||
module-for-module and test-for-test. Not yet consumed by any app; planned
|
||||
for screen-locker's workout sync.
|
||||
|
||||
Consume via:
|
||||
```yaml
|
||||
dependencies:
|
||||
crdt_sync:
|
||||
git:
|
||||
url: https://github.com/kuhyx/utils
|
||||
ref: crdt_sync_dart-v0.1.0
|
||||
path: crdt_sync_dart
|
||||
```
|
||||
|
||||
## crdt-sync/
|
||||
|
||||
Python CRDT sync library (package: `crdt_sync`, not published to PyPI). Same
|
||||
design as `crdt_sync_dart` (HLC clocks, per-field LWW, sticky-delete
|
||||
tombstones). Not yet consumed by any app.
|
||||
|
||||
Consume via:
|
||||
```
|
||||
crdt-sync @ git+https://github.com/kuhyx/utils@crdt-sync-v0.1.0#subdirectory=crdt-sync
|
||||
```
|
||||
|
||||
## guard-lib/
|
||||
|
||||
Bash tamper-resistance primitives (`guardctl`: chattr + bind-mount + systemd
|
||||
watcher + pacman hooks). Not a package — installed by running
|
||||
`guard-lib/install.sh` as root, which copies files onto the system
|
||||
(`/usr/local/bin`, `/usr/local/lib/guard-lib`, systemd units, pacman hooks).
|
||||
Consumed by `steam-backlog-enforcer` (expects a `guard-lib/install.sh`
|
||||
sibling clone) and referenced by `screen-locker`.
|
||||
|
||||
## gatelock/
|
||||
|
||||
Python lock-window + HMAC log-integrity backend (package: `gatelock`, not
|
||||
published to PyPI). Consumed via pip by `screen-locker`, `diet-guard`, and
|
||||
`wake-alarm`:
|
||||
|
||||
```
|
||||
gatelock @ git+https://github.com/kuhyx/utils@gatelock-v0.1.0#subdirectory=gatelock
|
||||
```
|
||||
Loading…
Reference in New Issue
Block a user