Skip to content

Move version into the package and make it more discoverable.#64

Open
elainethale wants to merge 1 commit intomainfrom
feat/version-attribute
Open

Move version into the package and make it more discoverable.#64
elainethale wants to merge 1 commit intomainfrom
feat/version-attribute

Conversation

@elainethale
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR centralizes the package version inside the stride Python package and exposes it via the CLI, while updating packaging metadata to source the distribution version from code.

Changes:

  • Added stride.__version__ and exported it from src/stride/__init__.py.
  • Added -V/--version support to the stride CLI via click.version_option.
  • Switched pyproject.toml to a dynamic version read by Hatch from src/stride/__init__.py.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
src/stride/cli/stride.py Imports __version__ and adds stride --version support.
src/stride/init.py Defines and exports __version__.
pyproject.toml Moves to dynamic versioning and configures Hatch to read the version from code.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/stride/__init__.py
Comment on lines +1 to 4
__version__ = "2.0.0"

from stride.project import Project
from stride.models import (
Comment thread src/stride/cli/stride.py
from loguru import logger

from stride import Project
from stride import Project, __version__
Comment thread src/stride/cli/stride.py
Comment on lines 30 to 32
@click.group("stride")
@click.version_option(__version__, "-V", "--version", prog_name="stride")
@click.option(
Comment thread pyproject.toml
Comment on lines +70 to +72
[tool.hatch.version]
path = "src/stride/__init__.py"

@codecov
Copy link
Copy Markdown

codecov Bot commented May 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.55%. Comparing base (ded9c7f) to head (9b2d7a9).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #64   +/-   ##
=======================================
  Coverage   75.55%   75.55%           
=======================================
  Files          50       50           
  Lines        7935     7937    +2     
=======================================
+ Hits         5995     5997    +2     
  Misses       1940     1940           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

2 participants