-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Prepare ThinkDSP for PyPI packaging #134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
de5a0d1
9506a4e
775e700
0aef5ad
9ce669c
5c52f19
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| name: publish | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - "v*" | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.10" | ||
| - name: Build sdist and wheel | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| python -m pip install build | ||
| python -m build | ||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: dist | ||
| path: dist/* | ||
|
|
||
| publish: | ||
| needs: build | ||
| runs-on: ubuntu-latest | ||
| environment: | ||
| name: pypi | ||
| url: https://pypi.org/p/thinkdsp | ||
| permissions: | ||
| id-token: write | ||
| steps: | ||
| - uses: actions/download-artifact@v4 | ||
| with: | ||
| name: dist | ||
| path: dist | ||
| - uses: pypa/gh-action-pypi-publish@release/v1 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,25 @@ | ||
| .ipynb_checkpoints/ | ||
| .DS_Store | ||
|
|
||
| # Python | ||
| __pycache__/ | ||
| *.py[cod] | ||
| *.pyd | ||
| .python-version | ||
| *.egg-info/ | ||
| .eggs/ | ||
|
|
||
| # Virtual environments | ||
| .venv/ | ||
| venv/ | ||
|
|
||
| # Packaging/build | ||
| build/ | ||
| dist/ | ||
| .pytest_cache/ | ||
| .coverage | ||
| coverage.xml | ||
| htmlcov/ | ||
|
|
||
| # Poetry | ||
| poetry.lock |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| MIT License | ||
|
|
||
| Copyright (c) 2013 Allen B. Downey | ||
|
|
||
| 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. |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,20 +1,39 @@ | ||||||
| [tool.poetry] | ||||||
| name = "thinkdsp" | ||||||
| version = "0.1.0" | ||||||
| description = "" | ||||||
| version = "0.1.1" | ||||||
| description = "DSP utilities from the Think DSP book" | ||||||
| authors = ["Allen Downey <allen.downey@olin.edu>"] | ||||||
| maintainers = ["Kim Maxim <maksimkim005@gmail.com>"] | ||||||
| readme = "README.md" | ||||||
| license = "MIT" | ||||||
| packages = [{ include = "thinkdsp", from = "src" }] | ||||||
| include = ["LICENSE"] | ||||||
| exclude = ["book", "code", ".devcontainer", ".github"] | ||||||
| classifiers = [ | ||||||
| "Development Status :: 3 - Alpha", | ||||||
| "Intended Audience :: Education", | ||||||
| "License :: OSI Approved :: MIT License", | ||||||
| "Programming Language :: Python :: 3", | ||||||
| "Programming Language :: Python :: 3 :: Only", | ||||||
| "Topic :: Multimedia :: Sound/Audio :: Analysis", | ||||||
| "Topic :: Scientific/Engineering :: Mathematics", | ||||||
| ] | ||||||
|
|
||||||
| [tool.poetry.dependencies] | ||||||
| python = "^3.8" | ||||||
| jupyter = "^1.0.0" | ||||||
| numpy = "^1.19.4" | ||||||
| matplotlib = "^3.3.3" | ||||||
| seaborn = "^0.11.0" | ||||||
| pandas = "^1.1.4" | ||||||
| scipy = "^1.5.4" | ||||||
| python = ">=3.9,<4.0" | ||||||
| numpy = ">=1.22.4,<3.0" | ||||||
| scipy = ">=1.13.0,<2.0" | ||||||
|
||||||
| scipy = ">=1.13.0,<2.0" | |
| scipy = ">=1.5.4,<2.0" |
Copilot
AI
Feb 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The matplotlib version constraint ">=3.8.0,<4.0" is quite restrictive. Matplotlib 3.8.0 was released in September 2023, which means users with older Python 3.9-3.11 installations may not be able to use this package. Consider using a more permissive constraint like ">=3.3.3,<4.0" to align with the original requirements seen in the repository, unless matplotlib 3.8.0 features are specifically required.
| matplotlib = ">=3.8.0,<4.0" | |
| matplotlib = ">=3.3.3,<4.0" |
Copilot
AI
Feb 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pandas version constraint uses "^1.1.4" which means ">=1.1.4,<2.0.0". However, pandas 1.1.4 was released in 2020 and is quite old. This package may not be compatible with pandas 2.x which was released in April 2023. Consider testing compatibility with pandas 2.x and updating the constraint to ">=1.1.4,<3.0" if compatible, or explicitly documenting the pandas 2.x incompatibility.
| pandas = { version = "^1.1.4", optional = true } | |
| pandas = { version = ">=1.1.4,<3.0", optional = true } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The numpy version constraint ">=1.22.4,<3.0" is reasonable, but NumPy 1.22.4 was released in 2022 and requires Python 3.8+. Since the minimum Python version is set to 3.9, consider aligning the numpy minimum version with what's typically available for Python 3.9 environments. NumPy 1.22 dropped support for deprecated functions that might be used in older code. Verify that all numpy usage in the codebase is compatible with numpy 1.22+, particularly the np.fromstring usage (deprecated in favor of np.frombuffer).