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

Merge code from upstream repo #3

Open
wants to merge 343 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
343 commits
Select commit Hold shift + click to select a range
445f47a
Add python_requires keyword in setup.py (#207)
tomschr Dec 7, 2019
f2c23f6
Fix #208: Introduce VersionInfo.isvalid() function (#209)
tomschr Dec 10, 2019
177f080
Improve docstrings according to PEP257 (#212)
tomschr Jan 19, 2020
5755f9a
Improve pysemver subcommands (#214)
tomschr Jan 19, 2020
b5ccad6
Fix #210: how to deal with invalid versions (#215)
tomschr Jan 19, 2020
3f92aa5
Create semver version 2.9.1 (#219)
tomschr Feb 16, 2020
6878916
Fix #224: Replace super() call (#226)
tomschr Feb 29, 2020
6669ba0
Integrate better doctest integration into pytest
tomschr Mar 14, 2020
158f19f
Merge pull request #228 from tomschr/feature/integrate-doctests
tomschr Mar 16, 2020
1e6a251
Add version information in some functions
tomschr Mar 16, 2020
34f038d
Merge pull request #230 from tomschr/feature/minor-fix4docs
tomschr Mar 19, 2020
5b8bb16
Fix #225: Deprecate module level functions
tomschr Mar 15, 2020
c9b2a7f
Merge pull request #229 from tomschr/feature/deprecationwarning
tomschr Apr 16, 2020
b145931
Fix #235: Shift focus on semver.VersionInfo.*
tomschr Apr 17, 2020
9691b41
Merge pull request #235 from tomschr/feature/doc-focus-on-versioninfo
tomschr Apr 20, 2020
14cd842
Fix #236: add missing deprecated functions
tomschr Apr 21, 2020
4482f8c
Get rid of _compare_by_keys, adapt comparison operators
tomschr Apr 21, 2020
1c8fc74
Remove _to_dict() function
tomschr Apr 21, 2020
d69e7c4
Merge pull request #239 from tomschr/bugfix/236-deprecate-others
tomschr Apr 23, 2020
ec6588e
Implement __getitem__ for #138
tomschr Apr 26, 2020
7057dc5
Fix #244: Allow list & str for comparison
tomschr Apr 26, 2020
5b04960
Implement of VersionInfo.next_version() function
tomschr Feb 23, 2020
8d4336e
Merge pull request #222 from tomschr/feature/221-bump-prerelease-and-…
tomschr May 1, 2020
2ef2eea
Merge pull request #243 from tomschr/feature/138-add-__getitem__
tomschr May 1, 2020
22ff5af
Merge pull request #245 from tomschr/bugfix/244-missing-list-and-str
tomschr May 5, 2020
1ff9360
Release 2.10.0
tomschr Apr 23, 2020
25f5423
Merge pull request #246 from tomschr/release/2.10.0
tomschr May 5, 2020
8697b8e
Add __all__ to provide explict index of semver
tomschr Apr 26, 2020
6e7291b
Merge pull request #242 from tomschr/feature/__all__
tomschr May 10, 2020
230d61a
Simplify openSUSE installation
tomschr May 11, 2020
cf18005
Merge pull request #250 from tomschr/feature/doc-install
tomschr May 11, 2020
f55559a
Fix #251: Correct return type for next_version() (#254)
tlaferriere May 13, 2020
1f0d49b
Fix #252: Correct wrong str type in docstring (#253)
tomschr May 13, 2020
028f6b1
Doc: Add version rule to avoid surpises
tomschr May 10, 2020
cfcbec7
Make docstrings consistent
tomschr May 13, 2020
0733da7
Merge pull request #249 from tomschr/feature/doc-release-policy
tomschr May 13, 2020
f264183
Merge pull request #256 from tomschr/feature/docstring-consistency
tomschr May 13, 2020
52ba0d6
Release 2.10.1
tomschr May 13, 2020
69d1cf2
Merge pull request #257 from tomschr/release/2.10.1
tomschr May 13, 2020
f332326
Fix #260 __getitem__ returning `None` on falsy parts
tlaferriere Jun 10, 2020
7fe1bd9
Doc: Add missing "install" for openSUSE
tomschr Jun 10, 2020
e8b388d
Merge pull request #263 from tomschr/bugfix/doc-missing-install
tomschr Jun 10, 2020
4841d6f
Increase coverage (#268)
tlaferriere Jun 12, 2020
772a7a6
Deprecate `max_ver` and `min_ver` (#264)
tlaferriere Jun 15, 2020
af5456f
Prepare 2.10.2 release (#271)
tomschr Jun 15, 2020
e2532b2
Merge pull request #272 from tomschr/release/2.10.2
tomschr Jun 15, 2020
9088f50
Doc: Mention Sphinx directive for docstrings
tomschr Jul 22, 2020
3689e27
Merge pull request #278 from tomschr/feature/doc-contrib
tomschr Jul 22, 2020
9332d92
Turn VersionInfo.parse into classmethod to allow subclasses (#277)
Anvil Oct 16, 2020
db870f2
Add author and update changelog for #276/#277 (#286)
tomschr Oct 16, 2020
20e5c4f
Fix #274: String Types Py2 vs. Py3 compatibility (#275)
tomschr Oct 17, 2020
dd110f1
Prepare 2.11.0 release (#288) (#289)
tomschr Oct 17, 2020
0309c63
Fix #291: Disallow negative numbers in VersionInfo (#292)
tomschr Oct 19, 2020
49229d9
Prepare 2.12.0 release (#293) (#294)
tomschr Oct 19, 2020
db55f27
Ensure equal versions have equal hashes (#283)
sbrudenell Oct 20, 2020
90bf1be
Document how to create subclass from VersionInfo (#287)
tomschr Oct 20, 2020
4090b94
Prepare 2.13.0 release (#295) (#295)
tomschr Oct 20, 2020
fc92fb4
Fix #176: Create semver 3.0.0-dev.1
tomschr Oct 17, 2020
fe64de2
Rework .gitignore file
tomschr Oct 19, 2020
24bcdfd
Improve semver documentation
tomschr Oct 18, 2020
cbd4335
Configure and add Towncrier files
tomschr Oct 19, 2020
5e02f12
Merge pull request #290 from tomschr/feature/3.0.0-alpha0
tomschr Oct 26, 2020
ae8a961
Doc: Disable sphinx-argparse
tomschr Oct 26, 2020
1930e3e
Merge pull request #298 from tomschr/feature/fix-rtd-1
tomschr Oct 26, 2020
8a91525
Remove sphinx from requirements.txt
tlaferriere Oct 26, 2020
b3f53b4
Merge pull request #300 from tlaferriere/297-fix-docs
tomschr Oct 26, 2020
1dab57f
Create 3.0.0-dev.1 Release
tomschr Oct 26, 2020
ddf2b30
Merge pull request #301 from tomschr/release/3.0.0-dev.1
tomschr Oct 26, 2020
b0f854d
Create semver package
tlaferriere Oct 23, 2020
2123413
Support PEP-561 py.typed
tomschr Oct 31, 2020
d1cf906
add changelog.d/304.trivial.rst
tomschr Nov 1, 2020
edfbbe9
Distinguish between changlog for version 2 and 3
tomschr Oct 30, 2020
bb2cb90
Document migration from semver2 to semver3
tomschr Oct 30, 2020
7d00884
Improve API documentation
tomschr Oct 30, 2020
ff07c90
Merge pull request #306 from tomschr/feature/169-package
tomschr Nov 1, 2020
8b22c6f
Create 3.0.0-dev.2
tomschr Nov 1, 2020
5d192da
Add missing #213 type information in CHANGELOG
tomschr Nov 1, 2020
6a5ba32
Use literal strings in setup.cfg
tomschr Nov 1, 2020
e7558a9
Merge pull request #307 from tomschr/release/3.0.0-dev.2
tomschr Nov 1, 2020
f0ed470
Add CONTRIBUTING.rst in root folder
tomschr Nov 1, 2020
42bf3e2
Correct CONTRIBUTING text
tomschr Nov 1, 2020
02418ce
Merge pull request #308 from tomschr/feature/contribution
tomschr Nov 1, 2020
dcdcd2a
Fix #310: Correct API documentation
tomschr Nov 3, 2020
ff204d7
Remove already inserted changelog.d entry
tomschr Nov 3, 2020
a6a8115
Tox: skip installation for changelog target
tomschr Nov 3, 2020
40c26e5
Add changelog.d entry file for #313
tomschr Nov 3, 2020
cd0f04c
Merge pull request #313 from tomschr/feature/tox-changelog
tomschr Nov 3, 2020
073e314
Merge pull request #311 from tomschr/bugfix/310-api-doc
tomschr Nov 4, 2020
a8dd4ea
Fix #312: Rework Usage section
tomschr Nov 3, 2020
44708ef
Merge pull request #314 from tomschr/bugfix/312-usage-doc
tomschr Nov 4, 2020
6793320
Fix #316: Return NotImplemented for comparisons
tomschr Nov 7, 2020
c75737d
Merge pull request #318 from tomschr/bugfix/316-notimplemented
tomschr Nov 8, 2020
3031da4
Introduce stages in .travis.yml
tomschr Nov 8, 2020
dc1e110
Merge pull request #319 from tomschr/feature/travis-stages
tomschr Nov 8, 2020
201d783
Fix #309: Make some functions private
tomschr Nov 4, 2020
13ad4ab
Merge pull request #320 from tomschr/feature/309-private-functions
tomschr Nov 10, 2020
2818cdb
Fix #181: create issue templates
tomschr Nov 10, 2020
608ce3c
Merge pull request #321 from python-semver/feature/181-gh-issue-templ…
tomschr Nov 10, 2020
aa58f62
Fix #322: Implement GitHub Action
tomschr Nov 11, 2020
2d8197a
Merge pull request #323 from tomschr/feature/322-gh-action
tomschr Nov 12, 2020
3a58a65
Add Gitter badge to README
tomschr Nov 11, 2020
79ca600
Merge pull request #324 from tomschr/feature/gitter-in-readme
tomschr Nov 12, 2020
d3d7b22
Improve batches in README
tomschr Nov 12, 2020
f509b74
Merge pull request #325 from tomschr/feature/readme-batches
tomschr Nov 12, 2020
4eb6fa6
Clean changelog
tomschr Nov 21, 2020
453d154
Merge pull request #326 from tomschr/bugfix/clean-changelog
tomschr Nov 21, 2020
bc3f96a
Amend Contributing with link to GH Discussion page
tomschr Dec 11, 2020
07cacb5
Change README (Gitter -> GH Discussions)
tomschr Dec 11, 2020
b5d8f78
Merge pull request #331 from tomschr/feature/add-gh-discussions
tomschr Dec 11, 2020
1986860
Create dependabot.yml
tomschr Dec 11, 2020
e7b0c08
Add config.yml for GitHub issues
tomschr Dec 17, 2020
d81b8af
Merge pull request #333 from tomschr/feature/issues-config.yml
tomschr Dec 17, 2020
acb0fea
Merge pull request #332 from python-semver/feature/dependabot
tomschr Dec 17, 2020
4aff99e
Create codeql-analysis.yml
tomschr Dec 17, 2020
0db94e6
Update codeql-analysis.yml
tomschr Dec 17, 2020
4631fa6
Merge pull request #334 from python-semver/feature/code-analysis
tomschr Dec 17, 2020
f74e3a3
Improve documentation for semver max/min; fix #337
mzjp2 Apr 21, 2021
0398baa
Fix type definition problem
tomschr Apr 22, 2021
e93b6de
Merge pull request #337 from mzjp2/fix/doc-max-suggestion
tomschr Apr 28, 2021
4d2df08
Start supporting Python 3.10
tomschr Jan 10, 2022
dd8f5f3
Merge pull request #347 from python-semver/feature/tests-for-py310
tomschr Jan 11, 2022
221bfba
Fix #315: Create 3.0.0-dev.3
tomschr Jan 19, 2022
47f9f34
Update changelog
tomschr Jan 19, 2022
8293ee0
Merge pull request #348 from tomschr/release/3.0.0-dev.3
tomschr Jan 20, 2022
769083c
Improve release procedure
tomschr Jan 21, 2022
098dccf
Split usage section into different files
tomschr Jan 22, 2022
6b6cba8
Merge pull request #350 from tomschr/feature/docs-put-usage-in-dir
tomschr Jan 23, 2022
68553fe
Add missing changelog file for #350
tomschr Jan 23, 2022
838527b
Introduce new topics for doc
tomschr Jan 23, 2022
53f721a
Merge pull request #351 from tomschr/feature/rework-doc
tomschr Jan 23, 2022
73bd190
Describe Pydantic and semver in "Advanced topics"
tomschr Jan 27, 2022
bafd212
Merge pull request #353 from tomschr/feature/343-pydantic-into-doc
tomschr Jan 28, 2022
0c4985c
Describe conversion between PyPI and semver
tomschr Jan 25, 2022
54a1af6
Merge pull request #352 from tomschr/feature/335-pypi-to-semver
tomschr Jan 31, 2022
57690e8
Use HTTPS instead of HTTP for the website URL
b0uh Feb 24, 2022
340b4f9
Merge pull request #355 from b0uh/fix/use-https
tomschr Feb 24, 2022
ffe686a
Add topic to read version from file
tomschr Feb 24, 2022
d063887
Merge pull request #356 from tomschr/feature/340-doc-version-file-open
tomschr Feb 24, 2022
2aeb61b
Allow optional minor and patch parts (#359)
OidaTiftla May 24, 2022
b5317af
Support matching 'equal' when no operator is provided (#362)
jmi2k Jul 4, 2022
3eae18c
Fix #365: Improve pyproject.toml
tomschr Nov 8, 2020
c83c562
Merge pull request #361 from tomschr/feature/pyproject.toml
tomschr Oct 4, 2022
f7a6eda
CI: Update GH Actions
tomschr Nov 10, 2022
98e845c
Add missing Optional type annotation
tomschr Nov 10, 2022
2a3d18d
Merge pull request #366 from tomschr/gha-update
tomschr Nov 10, 2022
62a2fef
CI: Raise version for GH Actions
tomschr Nov 16, 2022
5d60614
Revert "CI: Raise version for GH Actions"
tomschr Nov 17, 2022
90bff70
CI: Raise version for GH Actions
tomschr Nov 16, 2022
3ec0131
Merge pull request #370 from tomschr/update-ci
tomschr Nov 17, 2022
24e70e9
Fix #374: Adapt pyproject.tom for Towncrier
tomschr Nov 26, 2022
4cf9d60
Merge pull request #375 from tomschr/bugfix/374-towncrier-config
tomschr Nov 26, 2022
ae716f0
Fix #372: Remove support for Python 3.6
tomschr Dec 18, 2022
68df773
Merge pull request #383 from tomschr/feature/372-rm-python36
tomschr Dec 18, 2022
d8d80fa
Fix #378: Typos in Towncrier config
tomschr Dec 18, 2022
223e027
Add changelog entry for #372
tomschr Dec 18, 2022
5600d1e
Merge pull request #382 from tomschr/bugfix/378-typo-towncrier-config
tomschr Dec 18, 2022
61335e0
General cleanup, reformat files
tomschr Dec 17, 2022
7c7a72b
Merge pull request #384 from tomschr/reformat-withblack
tomschr Dec 18, 2022
89d5423
Create 3.0.0-dev.4 Release
tomschr Dec 18, 2022
ff34cce
Merge pull request #385 from tomschr/release/3.0.0-dev.4
tomschr Dec 19, 2022
f24a1da
tox/pytest: Add testpaths and use importlib
tomschr Dec 20, 2022
bf8757a
Merge pull request #388 from tomschr/feature/testpaths
tomschr Dec 20, 2022
86fcf48
Introduce public Version.NAMES class variable
tomschr Dec 23, 2022
0ca281d
Merge pull request #389 from tomschr/feature/version.names
tomschr Dec 23, 2022
35da4f6
Fix pydantic/semver example
mssalvatore Jan 31, 2023
2018346
Merge pull request #392 from mssalvatore/fix-pydantic-semver-example
tomschr Jan 31, 2023
a5f3a69
Fix: All `python -m semver` commands fail with 'error: invalid choice:'
zanecodes Feb 8, 2023
7e062c8
Merge pull request #393 from zanecodes/fix-cli
tomschr Feb 22, 2023
a1604fb
Add changelog entry for pr #393
tomschr Feb 22, 2023
6176316
Fix return type of classmethod parse (#396)
def- Feb 28, 2023
bee273e
Add changelog entry for PR #396
tomschr Feb 28, 2023
5485b6b
Fix #284: implement "is_compatible" with method
tomschr Nov 16, 2022
f8a182f
Fix #344 Allow empty string for bump methods
tomschr Oct 8, 2022
a2a6169
Merge pull request #365 from tomschr/feature/344-prerelease-build
tomschr Mar 5, 2023
67464a7
Fix #397: Remove asterisk in python_requires
tomschr Mar 6, 2023
9b475f7
Merge pull request #398 from tomschr/bugfix/397-python_requires
tomschr Mar 7, 2023
467ea0c
Merge pull request #368 from tomschr/feature/284-compatibility
tomschr Mar 7, 2023
45e12ec
Prepare for 3.0.0-rc.1 release
tomschr Mar 5, 2023
7cb958a
Merge pull request #399 from tomschr/release/3.0.0-rc.1
tomschr Mar 19, 2023
c72c50c
Simplify max_ver and min_ver
tomschr Apr 2, 2023
c40b6a4
Merge pull request #401 from tomschr/min_max_ver
tomschr Apr 2, 2023
47b49ca
Fix #258: Keep semver._deprecated.compare
tomschr Mar 19, 2023
5abeda6
Merge pull request #402 from tomschr/compare-258
tomschr Apr 2, 2023
d26cc07
Build 3.0.0 release of semver
tomschr Apr 2, 2023
3a7680d
Merge pull request #403 from tomschr/release/3.0.0
tomschr Apr 2, 2023
3215a99
Remove incorrect dependencies in pyproject.toml (#405)
mgorny Apr 3, 2023
7625129
correct typo in function description
treee111 Apr 12, 2023
fe28d2a
Merge pull request #406 from treee111/next_version-docu
tomschr Apr 12, 2023
100d90b
Improve GitHub Action
tomschr Apr 22, 2023
1e3283a
Merge pull request #408 from tomschr/gha-improve
tomschr Apr 24, 2023
39bf287
Add CITATION.cff for citation
tomschr Apr 27, 2023
2a8331f
Mention CITATION.cff in release procedure
tomschr Apr 27, 2023
9227686
Merge pull request #409 from tomschr/add-citation
tomschr Apr 27, 2023
17bc257
Fix #410 Export all names in __all__ variable
Soneji Jun 14, 2023
90c3484
Configure docformatter (#412)
tomschr Jun 14, 2023
c268060
Prepare version 3.0.1 (#413)
tomschr Jun 14, 2023
dcda256
Fix minor issue in release-procedure.md
tomschr Jun 14, 2023
72bf1c3
Create SUPPORT.md
tomschr Jun 15, 2023
ca1fcd9
GHA: Use matrix to test MacOS too
tomschr Jun 30, 2023
39774df
Merge pull request #417 from tomschr/gha-test-matrix
tomschr Jun 30, 2023
655a7d0
Return dict instead of OrderedDict (#419)
dschwoerer Jul 12, 2023
50532e7
Use actions/setup-python@v4 instead of v3
tomschr Jul 23, 2023
6a90bd3
Introduce ClassVar type
tomschr Jul 23, 2023
fda2873
Merge pull request #420 from python-semver/classvar
tomschr Jul 23, 2023
9b332b0
Issue #420: add missing [str] for Pattern type
tomschr Jul 23, 2023
96d3095
Insert mypy config into pyproject.toml
tomschr Jul 23, 2023
8fe4ef6
Merge pull request #421 from python-semver/mypy-to-pyproject.toml
tomschr Jul 23, 2023
2ae1a21
Fix #422: Update advanced topic about Pydantic v2
tomschr Jul 27, 2023
757ada6
Merge pull request #423 from tomschr/422-doc-pydantic
tomschr Sep 16, 2023
4b03f86
Fix #426: call subclass when deriving from Version
tomschr Sep 28, 2023
2dda51c
GHA: Require setuptool>60 and setuptools-scm>60
tomschr Sep 29, 2023
c5c779a
Merge pull request #427 from tomschr/fix-426-match-derivedclass
tomschr Sep 29, 2023
8ac99bd
Only run GHA if project files are modified
tomschr Jul 27, 2023
0b3d9fa
Merge pull request #428 from tomschr/gh-succeed-if-no-py
tomschr Oct 5, 2023
1aad4ad
Improve documentation wording & consistency
tomschr Sep 20, 2023
1f08632
Merge pull request #425 from tomschr/docs-1
tomschr Oct 5, 2023
a951c8a
Fix #429: bug on serialization to json
apiwat-chantawibul Oct 6, 2023
bd313ed
Merge pull request #430 from apiwat-chantawibul/fix-semver-pydantic-s…
tomschr Oct 7, 2023
9391f8a
Rename a news fragment for Towncrier
tomschr Oct 9, 2023
083b592
Clarify version policy for semver
tomschr Oct 9, 2023
9a98394
Merge pull request #431 from tomschr/version-policy
tomschr Oct 9, 2023
23e0e73
Improve external docs with intersphinx extension
tomschr Oct 9, 2023
c534e3f
Merge pull request #432 from tomschr/improve-intersphinx
tomschr Oct 9, 2023
fb02b3b
Build 3.0.2 release of semver
tomschr Oct 9, 2023
2154ce7
Merge pull request #433 from tomschr/release/3.0.2
tomschr Oct 9, 2023
f65feab
Correct some smaller issues when building
tomschr Oct 9, 2023
ec9348a
Add missing .readthedocs.yaml
tomschr Oct 9, 2023
03fb990
Pin versions for reproducable doc builds
tomschr Oct 9, 2023
87f639f
Use canonicals on ReadTheDocs
tomschr Oct 9, 2023
ca41533
Use meta directive for SEO
tomschr Oct 9, 2023
b2311cc
Merge pull request #435 from tomschr/doc-improvements
tomschr Oct 9, 2023
254e7c5
Move search box more at the top
tomschr Oct 9, 2023
68d19f5
Merge pull request #436 from tomschr/docs-searchbox
tomschr Oct 9, 2023
c47774d
Replace organization placeholder in LICENSE
tomschr Apr 16, 2024
d974788
Ignore venv*/.venv*
tomschr Jul 16, 2024
4cb269d
GHA: Change Python and CodeQL
tomschr Jul 16, 2024
dec7f63
Change flake8 config to be compatible with black
tomschr Jul 16, 2024
97676c8
Format with black
tomschr Jul 16, 2024
7a950aa
Merge pull request #440 from python-semver/fix-workflow
tomschr Jul 16, 2024
9593ad0
Improve type hints to fix TODOs
waketzheng Jul 12, 2024
4815626
Merge pull request #439 from waketzheng/master
tomschr Jul 16, 2024
2072a68
GH Action: Include Python 3.13
tomschr Oct 17, 2024
5dae7b6
Merge pull request #446 from tomschr/gha-add-python313
tomschr Oct 17, 2024
0f30183
Improve private _nat_cmp() method
tomschr Oct 17, 2024
8daa571
Merge pull request #445 from tomschr/improve_nat_cmp
tomschr Oct 17, 2024
6208a54
Modernize project configs with uv & pyproject.toml
tomschr Nov 4, 2024
37e80d7
Merge pull request #447 from tomschr/modernize-project
tomschr Nov 4, 2024
06fe49f
Turn our Markdown templates into YAML
tomschr Nov 17, 2024
2eeefcb
Merge pull request #451 from python-semver/improve-issue-templates2
tomschr Nov 17, 2024
bd97cfc
Require validation for bug issue template
tomschr Nov 17, 2024
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
13 changes: 13 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# https://pytest-cov.readthedocs.io/

[run]
source = semver
branch = True

[report]
show_missing = true
precision = 1
exclude_lines =
pragma: no cover
if __name__ == .__main__.:
if not hasattr\(__builtins__, .cmp.\):
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# http://editorconfig.org
root = true

[*]
end_of_line = lf
charset = utf-8
max_line_length = 99

[*.py]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true

[docs/Makefile]
indent_style = tab
88 changes: 88 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: 🐞Bug report
description: Create a bug report to help us improve
# title: ''
labels: [bug]
assignees: [tomschr]

body:
- type: markdown
attributes:
value: |
Thanks a lot for taking the time to fill out this bug report! 🐛
It will help us to improve the project for everyone. 🌟

Find help from the community on our [GitHub Discussions](https://github.com/python-semver/python-semver/discussions) page or
on our [Documentation](https://python-semver.readthedocs.io/en/latest/).

- type: dropdown
id: python_version
attributes:
label: Which version of Python is the problem with?
multiple: true
options:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
validations:
required: true

- type: input
id: semver_version
attributes:
label: What semver version are you using?
description: You can find this with `pip show semver`
placeholder: 3.0.2

- type: dropdown
id: os
attributes:
label: What OS are you using? (Add more in the Environment section)
multiple: true
options:
- Linux
- Windows
- macOS
- Other

- type: textarea
id: situation
attributes:
label: Situation
description: A clear and concise description of what the bug is.
placeholder: Describe the problem you see...
validations:
required: true

- type: textarea
id: reproduction_steps
attributes:
label: How to reproduce
description: |
Steps to reproduce the behavior:
1. Run '...'
2. Scroll down to '....'
3. See error
placeholder: Describe the steps to reproduce the issue...
validations:
required: true

- type: textarea
id: expected_behavior
attributes:
label: Expected behavior
description: A clear and concise description of what you expected to happen.
placeholder: Describe the expected behavior...
validations:
required: true

- type: textarea
id: environment
attributes:
label: Environment
description: Optionally provide some more details about your environment.
placeholder: Describe your environment...
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: Community Support
url: https://github.com/python-semver/python-semver/discussions
about: Ask and answer questions in our discussion forum.
- name: Documentation
url: https://python-semver.readthedocs.io/
about: Find more information in our documentation.
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Feature request
description: Suggest an idea for this project
# title: ''
labels: [enhancement]
assignees: [tomschr]

body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this feature request!

- type: textarea
id: situation
attributes:
label: Situation
description: A clear and concise description of what the feature is. Ex. I'm always frustrated when [...]
placeholder: Describe the situation...
validations:
required: true

- type: textarea
id: expected_solution
attributes:
label: Expected solution
description: A clear and concise description of what you want to happen.
placeholder: Describe the expected solution...
validations:
required: true

- type: textarea
id: alternatives
attributes:
label: Alternatives
description: A clear and concise description of any alternative solutions or features you've considered.
placeholder: Describe any alternatives...
18 changes: 18 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
day: "friday"
labels:
- "enhancement"
commit-message:
prefix: "pip"
# Allow up to 10 open pull requests for pip dependencies
open-pull-requests-limit: 5
67 changes: 67 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ maint/v2, release/* ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '50 16 * * 5'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
language: [ 'python' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
134 changes: 134 additions & 0 deletions .github/workflows/python-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
---
name: Python

# HINT: Sync this paths with the egrep in step check_files
on:
push:
branches: [ "master", "main" ]
paths:
- 'pyproject.toml'
- 'setup.cfg'
- '**.py'
- '.github/workflows/*.yml'

pull_request:
branches: [ "master", "main" ]
paths:
- 'pyproject.toml'
- 'setup.cfg'
- '**.py'
- '.github/workflows/*.yml'

permissions:
contents: read

concurrency:
# only cancel in-progress runs of the same workflow
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true


jobs:
check-files:
runs-on: ubuntu-latest
outputs:
can_run: ${{ steps.check_files.outputs.can_run }}

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: GitHub variables
id: gh-vars
run: |
for var in GITHUB_WORKFLOW GITHUB_ACTION GITHUB_ACTIONS GITHUB_REPOSITORY GITHUB_EVEN_NAME GITHUB_EVENT_PATH GITHUB_WORKSPACE GITHUB_SHA GITHUB_REF GITHUB_HEAD_REF GITHUB_BASE_REF; do
echo "$var = ${!var}"
done

- name: Check for file changes
id: check_files
run: |
# ${{ github.event.after }} ${{ github.event.before }}
can_run=$(git diff --name-only HEAD~1 HEAD | \
egrep -q '.github/workflows/|pyproject.toml|setup.cfg|\.py$' && echo 1 || echo 0)
echo "can_run=$can_run"
echo "can_run=$can_run" >> $GITHUB_OUTPUT

skip_test:
runs-on: ubuntu-latest
needs: check-files
timeout-minutes: 2
if: ${{ needs.check-files.outputs.can_run == '0' }}

steps:
- name: Skip test
run: |
echo "Nothing to do as no TOML, Python, or YAML file has been changed.
"
echo "Skipping."

check:
runs-on: ubuntu-latest
needs: check-files
timeout-minutes: 15
# needs.check-files.outputs.can_run
if: ${{ needs.check-files.outputs.can_run == '1' }}

steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true

- name: Set up Python 3.7
# check tox.ini for the lowest version
run: uv python install 3.7

- name: Install the project
run: |
uv sync --all-extras --group gh-action

- name: Checks
continue-on-error: true
run: uv run tox run -e checks

tests:
needs: check
runs-on: ${{ matrix.os }}
# continue-on-error: true
strategy:
max-parallel: 5
fail-fast: true
matrix:
python-version: ["3.7",
"3.8",
"3.9",
"3.10",
"3.11",
"3.12",
"3.13",
]
os: ["ubuntu-latest", "macos-latest"]
exclude:
- os: "macos-latest"
python-version: "3.7"

steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v3

- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}

- name: Install the project
run: |
uv sync --all-extras --dev
uv pip install tox tox-gh-actions

- name: Checks
run: uv run tox run -e ${{ matrix.python-version }}
Loading