Skip to content

Cleanup and Improvements - #139

Merged
devsetgo merged 35 commits into
mainfrom
dev
May 24, 2026
Merged

Cleanup and Improvements#139
devsetgo merged 35 commits into
mainfrom
dev

Conversation

@devsetgo

@devsetgo devsetgo commented May 24, 2026

Copy link
Copy Markdown
Owner

Includes various updates and improvements:

  1. Added bumpcalver-history.json to the .gitignore file to exclude it from version control.
  2. Updated the Python version badge in the README.md file to reflect the supported versions accurately.
  3. Removed outdated information and improved the formatting in the README.md file for better readability.
  4. Made corrections and enhancements to the CommandParserTest.cpp file.
  5. Updated the coverage percentage in the coverage-badge.svg and coverage.xml files.

These changes aim to enhance the project's overall quality, maintainability, and accuracy.

dependabot Bot and others added 30 commits May 24, 2026 01:51
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.9 to 0.15.12.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](astral-sh/ruff@0.15.9...0.15.12)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.15.12
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [mike](https://github.com/jimporter/mike) from 2.1.4 to 2.2.0.
- [Release notes](https://github.com/jimporter/mike/releases)
- [Changelog](https://github.com/jimporter/mike/blob/master/CHANGES.md)
- [Commits](jimporter/mike@v2.1.4...v2.2.0)

---
updated-dependencies:
- dependency-name: mike
  dependency-version: 2.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [wheel](https://github.com/pypa/wheel) from 0.46.3 to 0.47.0.
- [Release notes](https://github.com/pypa/wheel/releases)
- [Changelog](https://github.com/pypa/wheel/blob/main/docs/news.rst)
- [Commits](pypa/wheel@0.46.3...0.47.0)

---
updated-dependencies:
- dependency-name: wheel
  dependency-version: 0.47.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [build](https://github.com/pypa/build) from 1.4.2 to 1.4.4.
- [Release notes](https://github.com/pypa/build/releases)
- [Changelog](https://github.com/pypa/build/blob/main/CHANGELOG.rst)
- [Commits](pypa/build@1.4.2...1.4.4)

---
updated-dependencies:
- dependency-name: build
  dependency-version: 1.4.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [packaging](https://github.com/pypa/packaging) from 26.0 to 26.2.
- [Release notes](https://github.com/pypa/packaging/releases)
- [Changelog](https://github.com/pypa/packaging/blob/main/CHANGELOG.rst)
- [Commits](pypa/packaging@26.0...26.2)

---
updated-dependencies:
- dependency-name: packaging
  dependency-version: '26.2'
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [SonarSource/sonarqube-scan-action](https://github.com/sonarsource/sonarqube-scan-action) from 6.0.0 to 8.0.0.
- [Release notes](https://github.com/sonarsource/sonarqube-scan-action/releases)
- [Commits](SonarSource/sonarqube-scan-action@v6.0.0...v8.0.0)

---
updated-dependencies:
- dependency-name: SonarSource/sonarqube-scan-action
  dependency-version: 8.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [release-drafter/release-drafter](https://github.com/release-drafter/release-drafter) from 6.2.0 to 7.2.1.
- [Release notes](https://github.com/release-drafter/release-drafter/releases)
- [Commits](release-drafter/release-drafter@v6.2.0...v7.2.1)

---
updated-dependencies:
- dependency-name: release-drafter/release-drafter
  dependency-version: 7.2.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…aforms pattern

pythonpublish.yml was trying to do everything inline (build, publish,
deploy docs) and failing. The working pattern used in pydantic-schemaforms
separates concerns into two workflows:

pythonpublish.yml (slimmed down):
- deploy: build sdist+wheel, publish to PyPI
- trigger-docs: dispatch deploy-docs.yml after deploy succeeds,
  passing version, checkout_ref, and aliases as inputs.
  Skips dispatch gracefully on workflow_dispatch (no release tag).

deploy-docs.yml (new):
- Triggered via workflow_dispatch only (dispatched by trigger-docs)
- Checks out the specific release tag
- Installs deps, prepares docs, runs deploy_docs.py with
  --ignore-remote-status and --push
- Sets 'stable' as the default alias
- Publishes to GitHub Pages via configure-pages / upload-pages-artifact
  / deploy-pages actions

scripts/deploy_docs.py: add --branch argument forwarded to mike deploy,
allowing the workflow to explicitly target the gh-pages branch.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Introduces {major}, {minor}, {patch} placeholders for version_format so
projects can produce versions like 1.0-20260518.1 that carry both a
semantic maturity signal and a calendar release date. Adds --bump-major,
--bump-minor, and --bump-patch CLI flags that increment the appropriate
config value and persist it back to pyproject.toml/bumpcalver.toml.
Existing pure-CalVer formats are unaffected.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The CI runs pytest without pip-installing the package, so all imports
must use the src.bumpcalver prefix (matching the rest of the test suite).
Also updated mock.patch paths to src.bumpcalver.cli.* to match.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Extract _CURRENT_DATE_KEY and _TWO_DIGITS constants to eliminate
  literal duplication flagged by Sonar
- Replace chained startswith() calls with a single tuple call
- Collapse --bump-major/--bump-minor/--bump-patch into a single
  --bump [major|minor|patch] choice option, reducing main()'s
  parameter count from 14 to 12

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- New docs/hybrid-versioning-guide.md covering format placeholders,
  configuration, CLI usage, build-count increment behaviour, PEP 440
  considerations, best practices, and troubleshooting
- README: document major/minor/patch config keys, --bump CLI option,
  hybrid versioning example block, and link to new guide
- docs/examples/configuration.md: add hybrid versioning config section
- docs/calendar-versioning-guide.md: cross-reference hybrid guide in
  Advanced Patterns
- examples/pyproject.toml and bumpcalver.toml: add commented hybrid
  config block showing how to opt in

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…e scan

The SonarCloud workflow was scanning without running tests first, so
Sonar had no coverage data for new code (0% on new code). Added Python
setup + pytest --cov step before the SonarSource scan action.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ored

Three bugs in the pre-release suffix path:
1. beta_format / rc_format / release_format were never read from config;
   the suffixes were hardcoded as ".beta", ".rc", ".release" in cli.py.
2. _clean_version_suffixes only stripped dot-prefixed forms (.beta),
   so PEP 440-style attached suffixes (b1, rc2, a1) were left on the
   version string, causing build-count parsing to fail and reset to 1.
3. No support for count placeholders like {beta_count} in the format.

Fix:
- config.py: load beta_format / rc_format / release_format (defaults
  preserve the existing ".beta" / ".rc" / ".release" behaviour).
- utils.py: extend _clean_version_suffixes to also strip PEP 440-style
  suffixes (b1, a1, rc1 etc.); add apply_prerelease_suffix() which
  honours {xxx_count} placeholders and auto-increments the counter by
  inspecting the current stored version.
- cli.py: replace hardcoded string appends with apply_prerelease_suffix(),
  reading the configured format and the current raw version for counting.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- README: document beta_format / rc_format / release_format config keys
  and add a Pre-release Versioning examples section
- docs/quickstart.md: correct wrong description ("prefix with beta-");
  point to configuration reference
- docs/calendar-versioning-guide.md: replace the Beta/Alpha section with
  accurate Pre-release Suffixes section covering both dot-prefixed and
  PEP 440 counter forms
- docs/examples/configuration.md: add Pre-release Suffix Formats section
  with a quick-reference table and counter-behaviour notes; add commented
  keys to both pyproject.toml and bumpcalver.toml example blocks
- examples/pyproject.toml, examples/bumpcalver.toml: add commented
  pre-release format hints alongside the existing hybrid versioning hints

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
[a-zA-Z]+\d*$ triggers Sonar's polynomial-runtime warning because the
broad character class combined with a +\d* quantifier pair can be flagged
as potentially catastrophic even though the classes are disjoint.

Replace with an explicit alternation of the known PEP 440 pre-release
identifiers (alpha|beta|rc|a|b) so the engine has no ambiguity to
explore and backtracking is eliminated.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Replace if-elif handler factory with _HANDLER_REGISTRY dict
- Add _update_key_value_file base helper; deduplicate Properties/Env update logic
- Remove unused variable param from _handle_read_operation
- Remove SetupCfgVersionHandler dead code (always-True updated flag)
- Fix git_utils: check repo membership before tag-existence check
- Wire cleanup_old_backups() into store_operation_history
- Remove dead validate_undo_safety function from undo_utils
- Add bumpcalver-history.json to .gitignore
- Update tests to match revised signatures and command order

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@devsetgo devsetgo changed the title Dev Cleanup and Improvements May 24, 2026
devsetgo and others added 3 commits May 24, 2026 03:09
Docs:
- Remove dead versioning.md nav entry from mkdocs.yml; fix copyright year
- Drop stale beta note and placeholder install comment from README and index
- Add Python 3.14 to supported versions badge
- Fix missing [ in quickstart.md TOML block and wrong version output example
- Remove nonexistent --dry-run reference from calendar-versioning-guide
- Update development-guide handler registration example to use _HANDLER_REGISTRY
- Fix history.json reference in undo.md (bumpcalver-history.json)
- Fix typo in about.md (pacakges)

Examples (configuration.md + filelayout.md):
- Rewrite configuration.md as recipe book: Python, Node.js, Rust, Java (Gradle/Maven),
  Go, Ruby, .NET/C#, Docker, hybrid CalVer+SemVer, pre-release, polyglot multi-file
- Rewrite filelayout.md to pair each format with its bumpcalver config entry

New example files:
- examples/Cargo.toml, examples/gradle.properties, examples/version.properties
- examples/version.txt, examples/version.rb, examples/example.csproj
- examples/package.json, examples/p.py
- Fix invalid TOML (Python docstring) in examples/new_file_types_config.toml

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@devsetgo
devsetgo merged commit 7c5f678 into main May 24, 2026
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant