algebrax 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 (57) hide show
  1. algebrax-0.1.0/.coveragerc +7 -0
  2. algebrax-0.1.0/.github/dependabot.yml +11 -0
  3. algebrax-0.1.0/.github/workflows/codacy-coverage-reporter.yml +17 -0
  4. algebrax-0.1.0/.github/workflows/publish-docs.yml +31 -0
  5. algebrax-0.1.0/.github/workflows/publish.yml +34 -0
  6. algebrax-0.1.0/.github/workflows/test-beta.yml +42 -0
  7. algebrax-0.1.0/.github/workflows/test.yml +59 -0
  8. algebrax-0.1.0/.gitignore +888 -0
  9. algebrax-0.1.0/AGENTS.md +60 -0
  10. algebrax-0.1.0/CHANGELOG.md +1 -0
  11. algebrax-0.1.0/LICENSE +21 -0
  12. algebrax-0.1.0/PERSONA.md +36 -0
  13. algebrax-0.1.0/PKG-INFO +49 -0
  14. algebrax-0.1.0/PRINCIPLES.md +69 -0
  15. algebrax-0.1.0/README.md +19 -0
  16. algebrax-0.1.0/TELEMETRY.md +91 -0
  17. algebrax-0.1.0/TOOLS.md +65 -0
  18. algebrax-0.1.0/benchmarks/benchmark_flatten.py +64 -0
  19. algebrax-0.1.0/benchmarks/benchmark_matrix_multiplication.py +87 -0
  20. algebrax-0.1.0/cz.toml +7 -0
  21. algebrax-0.1.0/docs/concepts.md +311 -0
  22. algebrax-0.1.0/docs/examples/algebra.md +498 -0
  23. algebrax-0.1.0/docs/examples/algebra_2.md +320 -0
  24. algebrax-0.1.0/docs/index.md +488 -0
  25. algebrax-0.1.0/pyproject.toml +179 -0
  26. algebrax-0.1.0/src/algebrax/__init__.py +257 -0
  27. algebrax-0.1.0/src/algebrax/analysis.py +253 -0
  28. algebrax-0.1.0/src/algebrax/automata.py +131 -0
  29. algebrax-0.1.0/src/algebrax/converters.py +392 -0
  30. algebrax-0.1.0/src/algebrax/group.py +71 -0
  31. algebrax-0.1.0/src/algebrax/lattice.py +409 -0
  32. algebrax-0.1.0/src/algebrax/matrix/__init__.py +35 -0
  33. algebrax-0.1.0/src/algebrax/matrix/academic.py +282 -0
  34. algebrax-0.1.0/src/algebrax/matrix/core.py +443 -0
  35. algebrax-0.1.0/src/algebrax/probability.py +383 -0
  36. algebrax-0.1.0/src/algebrax/semiring.py +937 -0
  37. algebrax-0.1.0/src/algebrax/sparsity.py +171 -0
  38. algebrax-0.1.0/src/algebrax/transforms.py +347 -0
  39. algebrax-0.1.0/src/algebrax/trie.py +147 -0
  40. algebrax-0.1.0/src/algebrax/typing.py +72 -0
  41. algebrax-0.1.0/tests/algebra/test_analysis.py +76 -0
  42. algebrax-0.1.0/tests/algebra/test_automata.py +30 -0
  43. algebrax-0.1.0/tests/algebra/test_converters.py +225 -0
  44. algebrax-0.1.0/tests/algebra/test_coverage.py +374 -0
  45. algebrax-0.1.0/tests/algebra/test_group.py +37 -0
  46. algebrax-0.1.0/tests/algebra/test_lattice.py +145 -0
  47. algebrax-0.1.0/tests/algebra/test_matrix_academic.py +121 -0
  48. algebrax-0.1.0/tests/algebra/test_matrix_core.py +106 -0
  49. algebrax-0.1.0/tests/algebra/test_matrix_power.py +76 -0
  50. algebrax-0.1.0/tests/algebra/test_matrix_structure.py +125 -0
  51. algebrax-0.1.0/tests/algebra/test_probability.py +283 -0
  52. algebrax-0.1.0/tests/algebra/test_semiring.py +170 -0
  53. algebrax-0.1.0/tests/algebra/test_sparsity.py +126 -0
  54. algebrax-0.1.0/tests/algebra/test_transforms.py +168 -0
  55. algebrax-0.1.0/tests/algebra/test_trie.py +155 -0
  56. algebrax-0.1.0/uv.lock +1234 -0
  57. algebrax-0.1.0/zensical.toml +131 -0
@@ -0,0 +1,7 @@
1
+ [run]
2
+ branch = True
3
+ relative_files = True
4
+ omit =
5
+ .venv/*
6
+ docs/*
7
+ tests/*
@@ -0,0 +1,11 @@
1
+ # To get started with Dependabot version updates, you'll need to specify which
2
+ # package ecosystems to update and where the package manifests are located.
3
+ # Please see the documentation for all configuration options:
4
+ # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5
+
6
+ version: 2
7
+ updates:
8
+ - package-ecosystem: "pip" # See documentation for possible values
9
+ directory: "/" # Location of package manifests
10
+ schedule:
11
+ interval: "weekly"
@@ -0,0 +1,17 @@
1
+ name: Codacy Coverage Reporter
2
+ on: ["push"]
3
+ jobs:
4
+ codacy-coverage-reporter:
5
+ runs-on: ubuntu-latest
6
+ name: codacy-coverage-reporter
7
+ steps:
8
+ - uses: actions/checkout@v6
9
+ - name: Run codacy-coverage-reporter
10
+ uses: codacy/codacy-coverage-reporter-action@v1.3.0
11
+ with:
12
+ #project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
13
+ # or
14
+ api-token: ${{ secrets.CODACY_API_TOKEN }}
15
+ coverage-reports: <PATH_TO_REPORT>
16
+ # or a comma-separated list for multiple reports
17
+ # coverage-reports: <PATH_TO_REPORT>, <PATH_TO_REPORT>
@@ -0,0 +1,31 @@
1
+ name: Publish Docs
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ permissions:
9
+ contents: read
10
+ pages: write
11
+ id-token: write
12
+
13
+ jobs:
14
+ deploy:
15
+ environment:
16
+ name: github-pages
17
+ url: ${{ steps.deployment.outputs.page_url }}
18
+ runs-on: ubuntu-latest
19
+ steps:
20
+ - uses: actions/configure-pages@v5
21
+ - uses: actions/checkout@v6
22
+ - uses: actions/setup-python@v6
23
+ with:
24
+ python-version: 3.x
25
+ - run: pip install zensical mkdocstrings-python
26
+ - run: zensical build --clean
27
+ - uses: actions/upload-pages-artifact@v4
28
+ with:
29
+ path: site/
30
+ - uses: actions/deploy-pages@v4
31
+ id: deployment
@@ -0,0 +1,34 @@
1
+ # This workflow will upload a Python Package using Twine when a release is created
2
+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3
+
4
+ # This workflow uses actions that are not certified by GitHub.
5
+ # They are provided by a third-party and are governed by
6
+ # separate terms of service, privacy policy, and support
7
+ # documentation.
8
+
9
+ name: Publish
10
+ on:
11
+ release:
12
+ types: [published]
13
+ permissions:
14
+ contents: read
15
+ jobs:
16
+ deploy:
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - uses: actions/checkout@v6
20
+ - name: Set up Python
21
+ uses: actions/setup-python@v6
22
+ with:
23
+ python-version: '3.x'
24
+ - name: Install dependencies
25
+ run: |
26
+ python -m pip install --upgrade pip
27
+ pip install build
28
+ - name: Build package
29
+ run: python -m build
30
+ - name: Publish package
31
+ uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc
32
+ with:
33
+ user: __token__
34
+ password: ${{ secrets.PYPI_API_TOKEN }}
@@ -0,0 +1,42 @@
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
3
+
4
+ name: Test (Beta)
5
+
6
+ on:
7
+ push:
8
+ branches: [ "main" ]
9
+ pull_request:
10
+ branches: [ "main" ]
11
+
12
+ jobs:
13
+ build:
14
+ runs-on: ubuntu-latest
15
+ strategy:
16
+ fail-fast: false
17
+ matrix:
18
+ # https://github.com/actions/python-versions/blob/main/versions-manifest.json
19
+ python-version: [ "3.15.0-alpha.2" ]
20
+ steps:
21
+ - uses: actions/checkout@v6
22
+ - name: Set up Python ${{ matrix.python-version }}
23
+ uses: actions/setup-python@v6
24
+ with:
25
+ python-version: ${{ matrix.python-version }}
26
+ - name: Install dependencies
27
+ run: |
28
+ python -m pip install --upgrade pip
29
+ python -m pip install --upgrade setuptools wheel
30
+ python -m pip install .
31
+ if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
32
+ - name: Lint with flake8
33
+ run: |
34
+ python -m pip install flake8
35
+ # stop the build if there are Python syntax errors or undefined names
36
+ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
37
+ # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
38
+ flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
39
+ - name: Test with pytest
40
+ run: |
41
+ python -m pip install . --group test
42
+ pytest tests README.md --cov=src --cov-branch --cov-report=xml --junitxml=junit.xml -o junit_family=legacy
@@ -0,0 +1,59 @@
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
3
+
4
+ name: Test
5
+
6
+ on:
7
+ push:
8
+ branches: [ "main" ]
9
+ pull_request:
10
+ branches: [ "main" ]
11
+
12
+ jobs:
13
+ build:
14
+ runs-on: ubuntu-latest
15
+ strategy:
16
+ fail-fast: false
17
+ matrix:
18
+ python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
19
+ steps:
20
+ - uses: actions/checkout@v6
21
+ - name: Set up Python ${{ matrix.python-version }}
22
+ uses: actions/setup-python@v6
23
+ with:
24
+ python-version: ${{ matrix.python-version }}
25
+ - name: Install dependencies
26
+ run: |
27
+ python -m pip install --upgrade pip
28
+ python -m pip install --upgrade setuptools wheel
29
+ python -m pip install .
30
+ if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
31
+ - name: Lint with flake8
32
+ run: |
33
+ python -m pip install flake8
34
+ # stop the build if there are Python syntax errors or undefined names
35
+ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
36
+ # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
37
+ flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
38
+ - name: Test with pytest
39
+ run: |
40
+ python -m pip install . --group test
41
+ pytest tests README.md --cov=src --cov-branch --cov-report=xml --junitxml=junit.xml -o junit_family=legacy
42
+ - name: Upload coverage reports to Codecov
43
+ uses: codecov/codecov-action@v5
44
+ with:
45
+ token: ${{ secrets.CODECOV_TOKEN }}
46
+ - name: Upload test results to Codecov
47
+ if: ${{ !cancelled() }}
48
+ uses: codecov/test-results-action@v1
49
+ with:
50
+ token: ${{ secrets.CODECOV_TOKEN }}
51
+ - name: Run codacy-coverage-reporter
52
+ uses: codacy/codacy-coverage-reporter-action@v1.3.0
53
+ with:
54
+ #project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
55
+ # or
56
+ api-token: ${{ secrets.CODACY_API_TOKEN }}
57
+ coverage-reports: coverage.xml
58
+ # or a comma-separated list for multiple reports
59
+ # coverage-reports: <PATH_TO_REPORT>, <PATH_TO_REPORT>