Skip to content
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

improve minimization and tests #7

Merged
merged 23 commits into from
Oct 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ __pycache__
dist
.python-version
.coverage*
pysource_minimize_testing/
.mutmut-cache
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## v0.5.0 (2023-10-20)

### Feat

- support for 3.12

### Fix

- fixed various bugs

## v0.4.0 (2023-09-21)

### Feat

- implemented cli
- support for python 3.7 - 3.11
- progress callback for minimize
3 changes: 2 additions & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@ def mypy(session):
session.run("mypy", "pysource_minimize", "tests")


@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11"])
@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"])
def test(session):
session.run_always("poetry", "install", "--with=dev", external=True)
session.env["COVERAGE_PROCESS_START"] = str(
Path(__file__).parent / "pyproject.toml"
)
session.env["TOP"] = str(Path(__file__).parent)
args = [] if session.posargs else ["-n", "auto", "-v"]
session.install("attrs") # some bug with pytest-subtests

session.run("pytest", *args, "tests", *session.posargs)

Expand Down
266 changes: 117 additions & 149 deletions poetry.lock

Large diffs are not rendered by default.

18 changes: 16 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
[tool.poetry]
name = "pysource-minimize"
version = "0.4.0"
version = "0.5.0"
description = "minimize python source code"
authors = ["Frank Hoffmann"]
license = "MIT"
readme = "README.md"
packages = [{include = "pysource_minimize"}]

[tool.commitizen]
changelog_incremental = true
major_version_zero = true
tag_format = "v$major.$minor.$patch$prerelease"
update_changelog_on_bump = true
version_files = [
"pysource_minimize/__init__.py:version"
]
version_provider = "poetry"

[tool.poetry.dependencies]
python = "^3.7"
asttokens = "^2.0.8"
Expand All @@ -21,7 +31,7 @@ pytest-xdist = {extras = ["psutil"], version = "^3.1.0"}
coverage-enable-subprocess = "^1.0"
coverage = "^6.5.0"
mypy = "^1.2.0"
pysource-codegen = "^0.3.0"
pysource-codegen = "^0.4.1"

[tool.poetry.scripts]
pysource-minimize = "pysource_minimize.__main__:main"
Expand All @@ -36,8 +46,12 @@ parallel = true
branch = true
data_file = "$TOP/.coverage"

[tool.coverage.report]
exclude_lines = ["assert False", "raise NotImplemented"]

[tool.black]
force-exclude = "tests/.*_samples"
skip_magic_trailing_comma = true

[tool.mypy]
exclude="tests/.*_samples"
7 changes: 7 additions & 0 deletions pysource_minimize/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
from ._minimize import minimize
from ._minimize import StopMinimization


__all__ = ("minimize", "StopMinimization")


version = "0.5.0"
Loading