senryu-bot 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. senryu_bot-0.1.0/.github/workflows/ci.yml +30 -0
  2. senryu_bot-0.1.0/.github/workflows/release.yml +81 -0
  3. senryu_bot-0.1.0/.github/workflows/wheels.yml +30 -0
  4. senryu_bot-0.1.0/.gitignore +9 -0
  5. senryu_bot-0.1.0/Cargo.lock +3408 -0
  6. senryu_bot-0.1.0/Cargo.toml +36 -0
  7. senryu_bot-0.1.0/LICENSE +24 -0
  8. senryu_bot-0.1.0/PKG-INFO +114 -0
  9. senryu_bot-0.1.0/PYPI_TRUSTED_PUBLISHING.txt +9 -0
  10. senryu_bot-0.1.0/README.md +95 -0
  11. senryu_bot-0.1.0/THIRD_PARTY_NOTICES.md +33 -0
  12. senryu_bot-0.1.0/_senryu_source.zip +0 -0
  13. senryu_bot-0.1.0/pyproject.toml +33 -0
  14. senryu_bot-0.1.0/python/senryu_bot/__init__.py +19 -0
  15. senryu_bot-0.1.0/python/senryu_bot/py.typed +0 -0
  16. senryu_bot-0.1.0/sample.config.toml +36 -0
  17. senryu_bot-0.1.0/scripts/restore_source.py +71 -0
  18. senryu_bot-0.1.0/source_parts/part00.txt +1 -0
  19. senryu_bot-0.1.0/source_parts/part01.txt +1 -0
  20. senryu_bot-0.1.0/source_parts/part02.txt +1 -0
  21. senryu_bot-0.1.0/source_parts/part03.txt +1 -0
  22. senryu_bot-0.1.0/source_parts/part04.txt +1 -0
  23. senryu_bot-0.1.0/source_parts/part05.txt +1 -0
  24. senryu_bot-0.1.0/source_parts/part06.txt +1 -0
  25. senryu_bot-0.1.0/source_parts/part07.txt +1 -0
  26. senryu_bot-0.1.0/source_parts/part08.txt +1 -0
  27. senryu_bot-0.1.0/src/backup.rs +64 -0
  28. senryu_bot-0.1.0/src/bot.rs +205 -0
  29. senryu_bot-0.1.0/src/commands.rs +355 -0
  30. senryu_bot-0.1.0/src/config.rs +283 -0
  31. senryu_bot-0.1.0/src/crypto.rs +82 -0
  32. senryu_bot-0.1.0/src/db.rs +800 -0
  33. senryu_bot-0.1.0/src/detector.rs +361 -0
  34. senryu_bot-0.1.0/src/health.rs +37 -0
  35. senryu_bot-0.1.0/src/lib.rs +29 -0
  36. senryu_bot-0.1.0/src/metrics.rs +70 -0
  37. senryu_bot-0.1.0/src/models.rs +33 -0
  38. senryu_bot-0.1.0/src/state.rs +149 -0
@@ -0,0 +1,30 @@
1
+ name: ci
2
+
3
+ on:
4
+ push:
5
+ branches: ["main"]
6
+ pull_request:
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ check:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+ - uses: actions/setup-python@v5
15
+ with:
16
+ python-version: "3.12"
17
+ - name: Restore complete source
18
+ run: python scripts/restore_source.py
19
+ - uses: dtolnay/rust-toolchain@stable
20
+ - name: Install maturin
21
+ run: python -m pip install --upgrade pip maturin
22
+ - name: Cargo check
23
+ run: cargo check --all-targets
24
+ - name: Rust tests
25
+ run: cargo test --lib
26
+ - name: Build portable Linux wheel
27
+ uses: PyO3/maturin-action@v1
28
+ with:
29
+ manylinux: "2_28"
30
+ args: --release --out dist --compatibility pypi
@@ -0,0 +1,81 @@
1
+ name: release
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ push:
6
+ tags:
7
+ - "v*"
8
+ branches:
9
+ - "release/**"
10
+
11
+ jobs:
12
+ build-wheels:
13
+ name: Build wheels (${{ matrix.os }})
14
+ runs-on: ${{ matrix.os }}
15
+ strategy:
16
+ fail-fast: false
17
+ matrix:
18
+ os: [ubuntu-latest, windows-latest, macos-latest]
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+ - uses: actions/setup-python@v5
22
+ with:
23
+ python-version: "3.12"
24
+ - name: Restore complete source
25
+ run: python scripts/restore_source.py
26
+ - uses: dtolnay/rust-toolchain@stable
27
+ - name: Install maturin
28
+ if: runner.os != 'Linux'
29
+ run: python -m pip install --upgrade pip maturin
30
+ - name: Check Rust
31
+ run: cargo check --all-targets
32
+ - name: Run Rust tests
33
+ run: cargo test --lib
34
+ - name: Build portable Linux wheel
35
+ if: runner.os == 'Linux'
36
+ uses: PyO3/maturin-action@v1
37
+ with:
38
+ manylinux: "2_28"
39
+ args: --release --out dist --compatibility pypi
40
+ - name: Build wheel
41
+ if: runner.os != 'Linux'
42
+ run: maturin build --release --out dist --compatibility pypi
43
+ - uses: actions/upload-artifact@v4
44
+ with:
45
+ name: wheels-${{ matrix.os }}
46
+ path: dist/*
47
+
48
+ build-sdist:
49
+ name: Build sdist
50
+ runs-on: ubuntu-latest
51
+ steps:
52
+ - uses: actions/checkout@v4
53
+ - uses: actions/setup-python@v5
54
+ with:
55
+ python-version: "3.12"
56
+ - name: Restore complete source
57
+ run: python scripts/restore_source.py
58
+ - uses: dtolnay/rust-toolchain@stable
59
+ - name: Install maturin
60
+ run: python -m pip install --upgrade pip maturin
61
+ - name: Build sdist
62
+ run: maturin sdist --out dist
63
+ - uses: actions/upload-artifact@v4
64
+ with:
65
+ name: sdist
66
+ path: dist/*
67
+
68
+ publish:
69
+ name: Publish to PyPI
70
+ needs: [build-wheels, build-sdist]
71
+ runs-on: ubuntu-latest
72
+ permissions:
73
+ id-token: write
74
+ steps:
75
+ - uses: actions/download-artifact@v4
76
+ with:
77
+ pattern: "*"
78
+ path: dist
79
+ merge-multiple: true
80
+ - name: Publish package distributions to PyPI
81
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,30 @@
1
+ name: wheels
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ push:
6
+ tags: ["v*"]
7
+
8
+ jobs:
9
+ build:
10
+ strategy:
11
+ matrix:
12
+ os: [ubuntu-latest, windows-latest, macos-latest]
13
+ runs-on: ${{ matrix.os }}
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ - uses: actions/setup-python@v5
17
+ with:
18
+ python-version: "3.12"
19
+ - uses: dtolnay/rust-toolchain@stable
20
+ - run: pip install maturin
21
+ - run: cargo check --all-targets
22
+ - run: cargo test --lib
23
+ - if: runner.os == 'Linux'
24
+ run: maturin build --release --out dist --manylinux auto
25
+ - if: runner.os != 'Linux'
26
+ run: maturin build --release --out dist
27
+ - uses: actions/upload-artifact@v4
28
+ with:
29
+ name: wheels-${{ matrix.os }}
30
+ path: dist/*
@@ -0,0 +1,9 @@
1
+ /target
2
+ /dist
3
+ /.venv
4
+ __pycache__/
5
+ *.pyc
6
+ data/
7
+ senryu_bot.toml
8
+ config.toml
9
+ .env