-
Notifications
You must be signed in to change notification settings - Fork 0
Fix package structure, update badges, and resolve gitignore blocking source code #5
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
Fix package structure, update badges, and resolve gitignore blocking source code #5
Conversation
Co-authored-by: EthanThePhoenix38 <[email protected]>
|
Please retry analysis of this Pull-Request directly on SonarQube Cloud |
Co-authored-by: EthanThePhoenix38 <[email protected]>
Co-authored-by: EthanThePhoenix38 <[email protected]>
|
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.
Pull request overview
This PR addresses critical repository quality issues including a blocking .gitignore configuration, implements missing core statistical modules, and updates project metadata for consistency.
- Fixed
.gitignoreto allow source code tracking (critical fix) - Implemented three core statistical analysis modules with comprehensive functionality
- Updated version synchronization and improved README badges
- Corrected test workflow configuration
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
.gitignore |
Complete overhaul to prevent blocking source code; contains duplication and pattern ordering issues that need attention |
py_stats_toolkit/__init__.py |
Version updated from 1.0.1 to 1.0.4 to match pyproject.toml |
py_stats_toolkit/stats/regression.py |
New LinearRegression module with fit/predict/analyze methods using scikit-learn |
py_stats_toolkit/stats/descriptives.py |
New DescriptiveStatistics module for computing statistical measures; minor maintainability issue with empty __init__ |
py_stats_toolkit/stats/correlation.py |
New CorrelationAnalysis module supporting Pearson/Spearman/Kendall methods; missing input validation in constructor |
py_stats_toolkit/capsules/BaseCapsule.py |
New base class for statistical modules; contains future date in header and overly broad exception handling |
README.md |
Added dynamic PyPI badges (version, downloads, Python versions) and workflow status badges; removed hardcoded version from install command |
.github/workflows/tests.yml |
Fixed coverage module name from stats_toolkit to py_stats_toolkit |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Args: | ||
| method: Correlation method ('pearson', 'spearman', or 'kendall') | ||
| """ |
Copilot
AI
Dec 10, 2025
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 method parameter is not validated in __init__. Invalid methods like 'invalid_method' will be accepted and only fail later during analyze(). Consider validating the method parameter in __init__ to fail fast:
def __init__(self, method: str = "pearson"):
valid_methods = {"pearson", "spearman", "kendall"}
if method not in valid_methods:
raise ValueError(f"Method must be one of {valid_methods}, got '{method}'")
self.method = method| """ | |
| """ | |
| valid_methods = {"pearson", "spearman", "kendall"} | |
| if method not in valid_methods: | |
| raise ValueError(f"Method must be one of {valid_methods}, got '{method}'") |
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.
Added method validation in init as suggested. Invalid methods now fail immediately with a clear error message. Fixed in commit b7a9008.
| def __init__(self): | ||
| """Initialize DescriptiveStatistics.""" | ||
| pass |
Copilot
AI
Dec 10, 2025
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 __init__ method only contains pass and does nothing. Since no initialization is needed, consider removing this method entirely - Python will use the default __init__ from the parent class (object).
| def __init__(self): | |
| """Initialize DescriptiveStatistics.""" | |
| pass |
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.
Removed the empty init method. Python will use the default object.init. Fixed in commit b7a9008.
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.
Sonarqube a suggéré un changement par
def init(self):
"""Initialize DescriptiveStatistics."""
pass
EthanThePhoenix38
left a comment
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.
Lire les commentaires de sonarqube et appliquer les correctifs.
|
|
||
| if isinstance(data, (pd.DataFrame, pd.Series)): | ||
| if data.empty: | ||
| raise ValueError("Data cannot be empty") |
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.
Merci de corriger comme préconisé
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.
Corrected as recommended - changed to catch specific exceptions (TypeError, ValueError). Fixed in commit b7a9008.
EthanThePhoenix38
left a comment
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.
Corriger cette page!
Co-authored-by: Copilot <[email protected]>
…n handling, remove empty __init__, and remove email Co-authored-by: EthanThePhoenix38 <[email protected]>
…noreply.github.com>
|
EthanThePhoenix38
left a comment
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.
Enlever mon mail de tout le code!
EthanThePhoenix38
left a comment
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.
Merci de modifier selon mes commentaires
| - name: Run tests | ||
| run: | | ||
| pytest tests/ -v --cov=stats_toolkit --cov-report=xml | ||
| pytest tests/ -v --cov=py_stats_toolkit --cov-report=xml |
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.
Je n'ai pas mis ces tirets!
|
|
||
| # Version du toolkit | ||
| __version__ = "1.0.1" | ||
| __version__ = "1.0.4" |
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.
ok
README.md
Outdated
|
|
||
| Un toolkit Python complet pour l'analyse statistique et le traitement des données, conçu pour être simple d'utilisation tout en offrant des fonctionnalités avancées. | ||
|
|
||
| ## 🏆 Qualité du Code |
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.
Traduire toute la page en anglais et laisser les badge de coverage
README.md
Outdated
| ### Installation depuis PyPI (recommandé) | ||
|
|
||
| ```bash | ||
| pip install py-stats-toolkit==1.0.3 |
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.
ok



Repository Improvements - COMPLETE ✅
1. Update README badges
2. Review and correct README content
3. Fix GitHub Actions workflow
4. Code version consistency
5. Code organization improvements
6. Final verification
7. Address code review feedback
Summary
All requirements from the problem statement have been successfully addressed:
Original prompt
This pull request was created as a result of the following prompt from Copilot chat.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.