polyany 0.3.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.
- polyany-0.3.0/.github/dependabot.yml +10 -0
- polyany-0.3.0/.github/labeler.yml +39 -0
- polyany-0.3.0/.github/pull_request_template.md +19 -0
- polyany-0.3.0/.github/workflows/bumpversion.yml +37 -0
- polyany-0.3.0/.github/workflows/docs.yml +32 -0
- polyany-0.3.0/.github/workflows/pr_label.yml +15 -0
- polyany-0.3.0/.github/workflows/release.yml +25 -0
- polyany-0.3.0/.github/workflows/tests.yml +53 -0
- polyany-0.3.0/.gitignore +235 -0
- polyany-0.3.0/.pre-commit-config.yaml +45 -0
- polyany-0.3.0/.python-version +1 -0
- polyany-0.3.0/CHANGELOG.md +35 -0
- polyany-0.3.0/LICENSE +28 -0
- polyany-0.3.0/PKG-INFO +90 -0
- polyany-0.3.0/README.md +66 -0
- polyany-0.3.0/docs/api.md +5 -0
- polyany-0.3.0/docs/assets/logo_purple.svg +21 -0
- polyany-0.3.0/docs/assets/logo_white.svg +21 -0
- polyany-0.3.0/docs/assets/polyany_logo.png +0 -0
- polyany-0.3.0/docs/css/extra.css +23 -0
- polyany-0.3.0/docs/getting_started.md +348 -0
- polyany-0.3.0/docs/index.md +82 -0
- polyany-0.3.0/docs/installation.md +66 -0
- polyany-0.3.0/docs/javascript/mathjax.js +19 -0
- polyany-0.3.0/docs/overrides/partials/header.html +124 -0
- polyany-0.3.0/mkdocs.yml +126 -0
- polyany-0.3.0/pyproject.toml +138 -0
- polyany-0.3.0/src/polyany/__init__.py +3 -0
- polyany-0.3.0/src/polyany/exponents.py +23 -0
- polyany-0.3.0/src/polyany/polynomial.py +904 -0
- polyany-0.3.0/src/polyany/py.typed +0 -0
- polyany-0.3.0/src/polyany/types.py +10 -0
- polyany-0.3.0/tests/__init__.py +0 -0
- polyany-0.3.0/tests/smoke_test.py +5 -0
- polyany-0.3.0/tests/test_creation.py +153 -0
- polyany-0.3.0/tests/test_operations.py +461 -0
- polyany-0.3.0/uv.lock +1075 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
bug:
|
|
2
|
+
- head-branch:
|
|
3
|
+
- "^fix"
|
|
4
|
+
|
|
5
|
+
CI:
|
|
6
|
+
- changed-files:
|
|
7
|
+
- any-glob-to-any-file:
|
|
8
|
+
- .github/**
|
|
9
|
+
- .pre-commit-config.yaml
|
|
10
|
+
- head-branch:
|
|
11
|
+
- "^ci"
|
|
12
|
+
- "^pre-commit-ci"
|
|
13
|
+
|
|
14
|
+
dependencies:
|
|
15
|
+
- changed-files:
|
|
16
|
+
- any-glob-to-any-file:
|
|
17
|
+
- uv.lock
|
|
18
|
+
- head-branch:
|
|
19
|
+
- "^build(deps)"
|
|
20
|
+
|
|
21
|
+
documentation:
|
|
22
|
+
- changed-files:
|
|
23
|
+
- any-glob-to-any-file:
|
|
24
|
+
- docs/**
|
|
25
|
+
- mkdocs.yml
|
|
26
|
+
- readme.md
|
|
27
|
+
- head-branch:
|
|
28
|
+
- "^docs"
|
|
29
|
+
|
|
30
|
+
enhancement:
|
|
31
|
+
- head-branch:
|
|
32
|
+
- "^feat"
|
|
33
|
+
|
|
34
|
+
tests:
|
|
35
|
+
- changed-files:
|
|
36
|
+
- any-glob-to-any-file:
|
|
37
|
+
- tests/**
|
|
38
|
+
- head-branch:
|
|
39
|
+
- "^test"
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# ๐ Description
|
|
2
|
+
|
|
3
|
+
Implements the `foo` method to support XYZ functionality. Also adds corresponding tests, documentation, and some minor refactors.
|
|
4
|
+
|
|
5
|
+
Related issue: #123
|
|
6
|
+
|
|
7
|
+
# ๐ฏ Objectives
|
|
8
|
+
|
|
9
|
+
1. Implement the `foo` method
|
|
10
|
+
2. Ensure full test coverage
|
|
11
|
+
3. Document the new method
|
|
12
|
+
4. Refactor existing code
|
|
13
|
+
|
|
14
|
+
# โ
Tasks
|
|
15
|
+
|
|
16
|
+
- [ ] Implementation
|
|
17
|
+
- [ ] Tests
|
|
18
|
+
- [ ] Documentation
|
|
19
|
+
- [ ] Refactoring
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: Bump and Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
bump-version:
|
|
9
|
+
if: "!startsWith(github.event.head_commit.message, 'bump:')"
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
name: "Bump version and create changelog with commitizen"
|
|
12
|
+
steps:
|
|
13
|
+
- name: Check out
|
|
14
|
+
uses: actions/checkout@v4
|
|
15
|
+
with:
|
|
16
|
+
token: "${{ secrets.PERSONAL_ACCESS_TOKEN }}"
|
|
17
|
+
fetch-depth: 0
|
|
18
|
+
- name: Create bump and changelog
|
|
19
|
+
uses: commitizen-tools/commitizen-action@master
|
|
20
|
+
with:
|
|
21
|
+
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
|
|
22
|
+
changelog_increment_filename: body.md
|
|
23
|
+
- name: Install uv
|
|
24
|
+
uses: astral-sh/setup-uv@v6
|
|
25
|
+
- name: Build
|
|
26
|
+
run: uv build
|
|
27
|
+
- name: Release
|
|
28
|
+
uses: softprops/action-gh-release@605f567f95cfaf9465d68c7dbf509f374691fb12
|
|
29
|
+
with:
|
|
30
|
+
body_path: "body.md"
|
|
31
|
+
tag_name: ${{ env.REVISION }}
|
|
32
|
+
files: |
|
|
33
|
+
dist/*.tar.gz
|
|
34
|
+
dist/*.whl
|
|
35
|
+
overwrite_files: false
|
|
36
|
+
env:
|
|
37
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: Documentation
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches: [main]
|
|
5
|
+
paths:
|
|
6
|
+
- src/**
|
|
7
|
+
- docs/**
|
|
8
|
+
- mkdocs.yml
|
|
9
|
+
permissions:
|
|
10
|
+
contents: write
|
|
11
|
+
jobs:
|
|
12
|
+
deploy:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
- name: Configure Git Credentials
|
|
17
|
+
run: |
|
|
18
|
+
git config user.name github-actions[bot]
|
|
19
|
+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
|
20
|
+
- uses: astral-sh/setup-uv@v6
|
|
21
|
+
with:
|
|
22
|
+
version: "0.7.17"
|
|
23
|
+
python-version: "3.13"
|
|
24
|
+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
|
|
25
|
+
- uses: actions/cache@v4
|
|
26
|
+
with:
|
|
27
|
+
key: mkdocs-material-${{ env.cache_id }}
|
|
28
|
+
path: .cache
|
|
29
|
+
restore-keys: |
|
|
30
|
+
mkdocs-material-
|
|
31
|
+
- run: uv sync --only-group docs
|
|
32
|
+
- run: uv run mkdocs gh-deploy --force
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
name: "Pull Request Labeler"
|
|
2
|
+
on:
|
|
3
|
+
pull_request_target:
|
|
4
|
+
types: [opened, synchronize]
|
|
5
|
+
|
|
6
|
+
jobs:
|
|
7
|
+
labeler:
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
pull-requests: write
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/labeler@v5
|
|
14
|
+
with:
|
|
15
|
+
sync-labels: true
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name: Upload Python Package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "*"
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
pypi:
|
|
10
|
+
name: Publish to PyPI
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
environment:
|
|
13
|
+
name: pypi_release
|
|
14
|
+
permissions:
|
|
15
|
+
id-token: write
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
- uses: astral-sh/setup-uv@v6
|
|
19
|
+
- run: uv build
|
|
20
|
+
- name: Smoke test (wheel)
|
|
21
|
+
run: uv run --isolated --no-project --with dist/*.whl tests/smoke_test.py
|
|
22
|
+
- name: Smoke test (source distribution)
|
|
23
|
+
run: uv run --isolated --no-project --with dist/*.tar.gz tests/smoke_test.py
|
|
24
|
+
- name: Publish
|
|
25
|
+
run: uv publish --trusted-publishing always
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
name: Tests and Coverage
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches: [main]
|
|
5
|
+
pull_request:
|
|
6
|
+
branches: [main]
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
changes:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
permissions:
|
|
12
|
+
pull-requests: read
|
|
13
|
+
# Set job outputs to values from filter step
|
|
14
|
+
outputs:
|
|
15
|
+
code: ${{ steps.filter.outputs.code }}
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
- uses: dorny/paths-filter@v3
|
|
19
|
+
id: filter
|
|
20
|
+
with:
|
|
21
|
+
filters: |
|
|
22
|
+
code:
|
|
23
|
+
- 'src/**'
|
|
24
|
+
- 'tests/**'
|
|
25
|
+
test:
|
|
26
|
+
needs: changes
|
|
27
|
+
if: ${{ needs.changes.outputs.code == 'true' }}
|
|
28
|
+
strategy:
|
|
29
|
+
fail-fast: false
|
|
30
|
+
matrix:
|
|
31
|
+
python-version:
|
|
32
|
+
- "3.11"
|
|
33
|
+
- "3.12"
|
|
34
|
+
- "3.13"
|
|
35
|
+
runs-on: ubuntu-latest
|
|
36
|
+
|
|
37
|
+
steps:
|
|
38
|
+
- name: Check out repository code
|
|
39
|
+
uses: actions/checkout@v4
|
|
40
|
+
|
|
41
|
+
- name: Install uv
|
|
42
|
+
uses: astral-sh/setup-uv@v6
|
|
43
|
+
with:
|
|
44
|
+
version: "0.7.17"
|
|
45
|
+
python-version: ${{ matrix.python-version }}
|
|
46
|
+
|
|
47
|
+
- name: Test with Python ${{ matrix.python-version }}
|
|
48
|
+
run: uv run --frozen pytest --doctest-modules --cov=src --cov-branch --cov-report=xml
|
|
49
|
+
|
|
50
|
+
- name: Upload coverage reports to Codecov
|
|
51
|
+
uses: codecov/codecov-action@v5
|
|
52
|
+
with:
|
|
53
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
polyany-0.3.0/.gitignore
ADDED
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
# Created by https://www.toptal.com/developers/gitignore/api/windows,linux,visualstudiocode,python
|
|
2
|
+
# Edit at https://www.toptal.com/developers/gitignore?templates=windows,linux,visualstudiocode,python
|
|
3
|
+
|
|
4
|
+
### Linux ###
|
|
5
|
+
*~
|
|
6
|
+
|
|
7
|
+
# temporary files which can be created if a process still has a handle open of a deleted file
|
|
8
|
+
.fuse_hidden*
|
|
9
|
+
|
|
10
|
+
# KDE directory preferences
|
|
11
|
+
.directory
|
|
12
|
+
|
|
13
|
+
# Linux trash folder which might appear on any partition or disk
|
|
14
|
+
.Trash-*
|
|
15
|
+
|
|
16
|
+
# .nfs files are created when an open file is removed but is still being accessed
|
|
17
|
+
.nfs*
|
|
18
|
+
|
|
19
|
+
### Python ###
|
|
20
|
+
# Byte-compiled / optimized / DLL files
|
|
21
|
+
__pycache__/
|
|
22
|
+
*.py[cod]
|
|
23
|
+
*$py.class
|
|
24
|
+
|
|
25
|
+
# C extensions
|
|
26
|
+
*.so
|
|
27
|
+
|
|
28
|
+
# Distribution / packaging
|
|
29
|
+
.Python
|
|
30
|
+
build/
|
|
31
|
+
develop-eggs/
|
|
32
|
+
dist/
|
|
33
|
+
downloads/
|
|
34
|
+
eggs/
|
|
35
|
+
.eggs/
|
|
36
|
+
lib/
|
|
37
|
+
lib64/
|
|
38
|
+
parts/
|
|
39
|
+
sdist/
|
|
40
|
+
var/
|
|
41
|
+
wheels/
|
|
42
|
+
share/python-wheels/
|
|
43
|
+
*.egg-info/
|
|
44
|
+
.installed.cfg
|
|
45
|
+
*.egg
|
|
46
|
+
MANIFEST
|
|
47
|
+
|
|
48
|
+
# PyInstaller
|
|
49
|
+
# Usually these files are written by a python script from a template
|
|
50
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
51
|
+
*.manifest
|
|
52
|
+
*.spec
|
|
53
|
+
|
|
54
|
+
# Installer logs
|
|
55
|
+
pip-log.txt
|
|
56
|
+
pip-delete-this-directory.txt
|
|
57
|
+
|
|
58
|
+
# Unit test / coverage reports
|
|
59
|
+
htmlcov/
|
|
60
|
+
.tox/
|
|
61
|
+
.nox/
|
|
62
|
+
.coverage
|
|
63
|
+
.coverage.*
|
|
64
|
+
.cache
|
|
65
|
+
nosetests.xml
|
|
66
|
+
coverage.xml
|
|
67
|
+
*.cover
|
|
68
|
+
*.py,cover
|
|
69
|
+
.hypothesis/
|
|
70
|
+
.pytest_cache/
|
|
71
|
+
cover/
|
|
72
|
+
|
|
73
|
+
# Translations
|
|
74
|
+
*.mo
|
|
75
|
+
*.pot
|
|
76
|
+
|
|
77
|
+
# Django stuff:
|
|
78
|
+
*.log
|
|
79
|
+
local_settings.py
|
|
80
|
+
db.sqlite3
|
|
81
|
+
db.sqlite3-journal
|
|
82
|
+
|
|
83
|
+
# Flask stuff:
|
|
84
|
+
instance/
|
|
85
|
+
.webassets-cache
|
|
86
|
+
|
|
87
|
+
# Scrapy stuff:
|
|
88
|
+
.scrapy
|
|
89
|
+
|
|
90
|
+
# Sphinx documentation
|
|
91
|
+
docs/_build/
|
|
92
|
+
|
|
93
|
+
# PyBuilder
|
|
94
|
+
.pybuilder/
|
|
95
|
+
target/
|
|
96
|
+
|
|
97
|
+
# Jupyter Notebook
|
|
98
|
+
.ipynb_checkpoints
|
|
99
|
+
|
|
100
|
+
# IPython
|
|
101
|
+
profile_default/
|
|
102
|
+
ipython_config.py
|
|
103
|
+
|
|
104
|
+
# pyenv
|
|
105
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
106
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
107
|
+
# .python-version
|
|
108
|
+
|
|
109
|
+
# pipenv
|
|
110
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
111
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
112
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
113
|
+
# install all needed dependencies.
|
|
114
|
+
#Pipfile.lock
|
|
115
|
+
|
|
116
|
+
# poetry
|
|
117
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
118
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
119
|
+
# commonly ignored for libraries.
|
|
120
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
121
|
+
#poetry.lock
|
|
122
|
+
|
|
123
|
+
# pdm
|
|
124
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
125
|
+
#pdm.lock
|
|
126
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
127
|
+
# in version control.
|
|
128
|
+
# https://pdm.fming.dev/#use-with-ide
|
|
129
|
+
.pdm.toml
|
|
130
|
+
|
|
131
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
132
|
+
__pypackages__/
|
|
133
|
+
|
|
134
|
+
# Celery stuff
|
|
135
|
+
celerybeat-schedule
|
|
136
|
+
celerybeat.pid
|
|
137
|
+
|
|
138
|
+
# SageMath parsed files
|
|
139
|
+
*.sage.py
|
|
140
|
+
|
|
141
|
+
# Environments
|
|
142
|
+
.env
|
|
143
|
+
.venv
|
|
144
|
+
env/
|
|
145
|
+
venv/
|
|
146
|
+
ENV/
|
|
147
|
+
env.bak/
|
|
148
|
+
venv.bak/
|
|
149
|
+
|
|
150
|
+
# Spyder project settings
|
|
151
|
+
.spyderproject
|
|
152
|
+
.spyproject
|
|
153
|
+
|
|
154
|
+
# Rope project settings
|
|
155
|
+
.ropeproject
|
|
156
|
+
|
|
157
|
+
# mkdocs documentation
|
|
158
|
+
/site
|
|
159
|
+
|
|
160
|
+
# mypy
|
|
161
|
+
.mypy_cache/
|
|
162
|
+
.dmypy.json
|
|
163
|
+
dmypy.json
|
|
164
|
+
|
|
165
|
+
# Pyre type checker
|
|
166
|
+
.pyre/
|
|
167
|
+
|
|
168
|
+
# pytype static type analyzer
|
|
169
|
+
.pytype/
|
|
170
|
+
|
|
171
|
+
# Cython debug symbols
|
|
172
|
+
cython_debug/
|
|
173
|
+
|
|
174
|
+
# PyCharm
|
|
175
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
176
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
177
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
178
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
179
|
+
#.idea/
|
|
180
|
+
|
|
181
|
+
### Python Patch ###
|
|
182
|
+
# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
|
|
183
|
+
poetry.toml
|
|
184
|
+
|
|
185
|
+
# ruff
|
|
186
|
+
.ruff_cache/
|
|
187
|
+
|
|
188
|
+
# LSP config files
|
|
189
|
+
pyrightconfig.json
|
|
190
|
+
|
|
191
|
+
### VisualStudioCode ###
|
|
192
|
+
.vscode/*
|
|
193
|
+
!.vscode/tasks.json
|
|
194
|
+
!.vscode/launch.json
|
|
195
|
+
!.vscode/extensions.json
|
|
196
|
+
!.vscode/*.code-snippets
|
|
197
|
+
|
|
198
|
+
# Local History for Visual Studio Code
|
|
199
|
+
.history/
|
|
200
|
+
|
|
201
|
+
# Built Visual Studio Code Extensions
|
|
202
|
+
*.vsix
|
|
203
|
+
|
|
204
|
+
### VisualStudioCode Patch ###
|
|
205
|
+
# Ignore all local history of files
|
|
206
|
+
.history
|
|
207
|
+
.ionide
|
|
208
|
+
|
|
209
|
+
### Windows ###
|
|
210
|
+
# Windows thumbnail cache files
|
|
211
|
+
Thumbs.db
|
|
212
|
+
Thumbs.db:encryptable
|
|
213
|
+
ehthumbs.db
|
|
214
|
+
ehthumbs_vista.db
|
|
215
|
+
|
|
216
|
+
# Dump file
|
|
217
|
+
*.stackdump
|
|
218
|
+
|
|
219
|
+
# Folder config file
|
|
220
|
+
[Dd]esktop.ini
|
|
221
|
+
|
|
222
|
+
# Recycle Bin used on file shares
|
|
223
|
+
$RECYCLE.BIN/
|
|
224
|
+
|
|
225
|
+
# Windows Installer files
|
|
226
|
+
*.cab
|
|
227
|
+
*.msi
|
|
228
|
+
*.msix
|
|
229
|
+
*.msm
|
|
230
|
+
*.msp
|
|
231
|
+
|
|
232
|
+
# Windows shortcuts
|
|
233
|
+
*.lnk
|
|
234
|
+
|
|
235
|
+
# End of https://www.toptal.com/developers/gitignore/api/windows,linux,visualstudiocode,python
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
ci:
|
|
2
|
+
autoupdate_commit_msg: "ci(pre-commit): pre-commit autoupdate"
|
|
3
|
+
skip: [pyright]
|
|
4
|
+
|
|
5
|
+
repos:
|
|
6
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
7
|
+
rev: v6.0.0
|
|
8
|
+
hooks:
|
|
9
|
+
- id: trailing-whitespace
|
|
10
|
+
- id: end-of-file-fixer
|
|
11
|
+
- id: check-added-large-files
|
|
12
|
+
- id: check-yaml
|
|
13
|
+
args:
|
|
14
|
+
- --unsafe
|
|
15
|
+
|
|
16
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
17
|
+
rev: v0.12.8
|
|
18
|
+
hooks:
|
|
19
|
+
- id: ruff-check
|
|
20
|
+
args: [--fix]
|
|
21
|
+
exclude: ^tests/
|
|
22
|
+
- id: ruff-format
|
|
23
|
+
|
|
24
|
+
- repo: https://github.com/RobertCraigie/pyright-python
|
|
25
|
+
rev: v1.1.403
|
|
26
|
+
hooks:
|
|
27
|
+
- id: pyright
|
|
28
|
+
|
|
29
|
+
- repo: https://github.com/jsh9/pydoclint
|
|
30
|
+
rev: 0.6.7
|
|
31
|
+
hooks:
|
|
32
|
+
- id: pydoclint
|
|
33
|
+
args:
|
|
34
|
+
- --style=numpy
|
|
35
|
+
- --check-return-types=False
|
|
36
|
+
- --check-class-attributes=False
|
|
37
|
+
- --skip-checking-raises=True
|
|
38
|
+
|
|
39
|
+
- repo: https://github.com/commitizen-tools/commitizen
|
|
40
|
+
rev: v4.8.3
|
|
41
|
+
hooks:
|
|
42
|
+
- id: commitizen
|
|
43
|
+
stages: [commit-msg]
|
|
44
|
+
- id: commitizen-branch
|
|
45
|
+
stages: [pre-push]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.13
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
## 0.3.0 (2025-08-13)
|
|
2
|
+
|
|
3
|
+
### Feat
|
|
4
|
+
|
|
5
|
+
- multiplication and division (#40)
|
|
6
|
+
|
|
7
|
+
## 0.2.0 (2025-08-06)
|
|
8
|
+
|
|
9
|
+
### Feat
|
|
10
|
+
|
|
11
|
+
- partial derivatives (#31)
|
|
12
|
+
- zeros polynomial (#29)
|
|
13
|
+
- add method to prune empty monomials (#27)
|
|
14
|
+
- addition/subtraction (#19)
|
|
15
|
+
- **exponents**: sparse representation (#20)
|
|
16
|
+
- add method to shift variables (#8)
|
|
17
|
+
- add comparison and equality operators (#5)
|
|
18
|
+
- add quadratic form creation method (#4)
|
|
19
|
+
- evaluate polynomial at a point using __call__
|
|
20
|
+
- add univariate polynomial method
|
|
21
|
+
|
|
22
|
+
### Fix
|
|
23
|
+
|
|
24
|
+
- **prune**: return zeros polynomial when all coefficients are zero (#30)
|
|
25
|
+
- polynomial evaluation without constant terms (#24)
|
|
26
|
+
- get python builtin in degree attribute
|
|
27
|
+
- remove squeeze in coefficients conversion
|
|
28
|
+
|
|
29
|
+
### Refactor
|
|
30
|
+
|
|
31
|
+
- simplify internal representation to full polynomial
|
|
32
|
+
|
|
33
|
+
### Perf
|
|
34
|
+
|
|
35
|
+
- full_exponents algorithm (#15)
|
polyany-0.3.0/LICENSE
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025, Cristiano Marcos Agulhari and Esdras Battosti da Silva
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
9
|
+
list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
16
|
+
contributors may be used to endorse or promote products derived from
|
|
17
|
+
this software without specific prior written permission.
|
|
18
|
+
|
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
20
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
21
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
22
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
23
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
24
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
25
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
26
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
27
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
28
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
polyany-0.3.0/PKG-INFO
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: polyany
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: A Python package for algebraic manipulation of multivariate polynomials
|
|
5
|
+
Project-URL: Homepage, https://rolmip.github.io/polyany/
|
|
6
|
+
Project-URL: Documentation, https://rolmip.github.io/polyany/
|
|
7
|
+
Project-URL: Repository, https://github.com/rolmip/polyany
|
|
8
|
+
Project-URL: Issues, https://github.com/rolmip/polyany/issues
|
|
9
|
+
Author-email: Cristiano Agulhari <agulhari@utfpr.edu.br>, Esdras Battosti <esdras.2019@alunos.utfpr.edu.br>
|
|
10
|
+
License-Expression: BSD-3-Clause
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: algebra,multivariate,polynomials
|
|
13
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
14
|
+
Classifier: Operating System :: MacOS
|
|
15
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
16
|
+
Classifier: Operating System :: POSIX
|
|
17
|
+
Classifier: Operating System :: Unix
|
|
18
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
19
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
20
|
+
Classifier: Topic :: Scientific/Engineering :: Mathematics
|
|
21
|
+
Requires-Python: >=3.11
|
|
22
|
+
Requires-Dist: numpy>=2.3.1
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
|
|
25
|
+
<h1 align="center">
|
|
26
|
+
<img src="docs/assets/polyany_logo.png" alt="PolyAny Logo" height="200">
|
|
27
|
+
</h1><br>
|
|
28
|
+
|
|
29
|
+
<p align="center">
|
|
30
|
+
<img src="https://img.shields.io/badge/status-pre--alpha-orange" alt="Static Badge">
|
|
31
|
+
<a href="https://codecov.io/gh/rolmip/polyany">
|
|
32
|
+
<img src="https://codecov.io/gh/rolmip/polyany/graph/badge.svg?token=XMNXDY6AZ7" alt="codecov">
|
|
33
|
+
</a>
|
|
34
|
+
<a href="https://github.com/rolmip/polyany/actions/workflows/tests.yml">
|
|
35
|
+
<img src="https://github.com/rolmip/polyany/actions/workflows/tests.yml/badge.svg" alt="Tests">
|
|
36
|
+
</a>
|
|
37
|
+
<a href="https://github.com/pre-commit/pre-commit">
|
|
38
|
+
<img src="https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit" alt="pre-commit">
|
|
39
|
+
</a>
|
|
40
|
+
<a href="https://results.pre-commit.ci/latest/github/rolmip/polyany/main">
|
|
41
|
+
<img src="https://results.pre-commit.ci/badge/github/rolmip/polyany/main.svg" alt="pre-commit.ci status">
|
|
42
|
+
</a>
|
|
43
|
+
|
|
44
|
+
<p align="center">
|
|
45
|
+
<strong>A Python package for algebraic manipulation of multivariate polynomials.</strong>
|
|
46
|
+
</p>
|
|
47
|
+
|
|
48
|
+
> ๐ง **This package is under active development.**
|
|
49
|
+
>
|
|
50
|
+
> It is not yet stable or ready for production use. **Expect breaking changes!**
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## โจ Overview
|
|
55
|
+
|
|
56
|
+
PolyAny provides a flexible framework for representing and manipulating multivariate polynomials using structured, non-symbolic representations.
|
|
57
|
+
|
|
58
|
+
Unlike symbolic engines, PolyAny operates directly on the algebraic structure of polynomials (coefficients and exponents), enabling integration with numerical libraries and efficient structural transformations.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## ๐ง Features (planned)
|
|
63
|
+
|
|
64
|
+
- Polynomial creation from multiple formats (list, tuples, NumPy arrays, quadratic forms, ...)
|
|
65
|
+
- Support for multivariate expressions
|
|
66
|
+
- Algebraic operations: addition, multiplication, truncation, homogenization, ...
|
|
67
|
+
- Polynomial exporting into LaTeX code
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## ๐ฆ Installation
|
|
72
|
+
|
|
73
|
+
> โ ๏ธ Not yet available in PyPI.
|
|
74
|
+
|
|
75
|
+
For local development, see the [instructions in the documentation](https://rolmip.github.io/polyany/installation/#how-to-contribute)
|
|
76
|
+
|
|
77
|
+
## ๐ License
|
|
78
|
+
|
|
79
|
+
This project is open-source and licensed under the BSD-3-Clause.
|
|
80
|
+
|
|
81
|
+
## ๐ฅ Contributors
|
|
82
|
+
|
|
83
|
+
PolyAny is maintained by the **ROLMIP** developers:
|
|
84
|
+
|
|
85
|
+
* [Cristiano Agulhari](mailto:agulhari@utfpr.edu.br)
|
|
86
|
+
* [Esdras Battosti](mailto:esdras.2019@alunos.utfpr.edu.br)
|
|
87
|
+
|
|
88
|
+
## ๐งช Status
|
|
89
|
+
|
|
90
|
+
This repository is part of the early foundation of **RolmiPy**, a Python implementation of ROLMIP.
|