-
Notifications
You must be signed in to change notification settings - Fork 0
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
Remove support for Python 3.8 #60
Conversation
Reviewer's Guide by SourceryThis pull request updates the project to remove Python 3.8 support and modernize type annotations. The changes primarily involve updating type hints in the Architecture diagram for GitHub Actions workflow updategraph TD;
A[GitHub Actions Workflow] -->|Removed| B[Python 3.8 Test Job];
A --> C[Python 3.9 Test Job];
A --> D[Python 3.10 Test Job];
A --> E[OS: Ubuntu, macOS, Windows];
Updated class diagram for type annotations in audmetric/core/api.pyclassDiagram
class API {
+accuracy(truth: Sequence[object], prediction: Sequence[object], labels: Sequence[str | int] = None) float
+concordance_cc(truth: Sequence[float], prediction: Sequence[float]) float
+confusion_matrix(truth: Sequence[object], prediction: Sequence[object], labels: Sequence[object] = None) list[list[int | float]]
+detection_error_tradeoff(truth: Sequence[bool | int], prediction: Sequence[bool | int | float]) tuple[np.ndarray, np.ndarray, np.ndarray]
+edit_distance(truth: str | Sequence[int], prediction: str | Sequence[int]) int
+equal_error_rate(truth: Sequence[bool | int], prediction: Sequence[bool | int | float]) tuple[float, collections.namedtuple]
+event_error_rate(truth: str | Sequence[str | Sequence[int]], prediction: str | Sequence[str | Sequence[int]]) float
+fscore_per_class(truth: Sequence[object], prediction: Sequence[object], labels: Sequence[object] = None, zero_division: float = 0) dict[str, float]
+linkability(truth: bool | int | Sequence[bool | int], prediction: bool | int | float | Sequence[bool | int | float], omega: float = 1.0, nbins: int = None) float
+mean_absolute_error(truth: Sequence[float], prediction: Sequence[float]) float
+mean_squared_error(truth: Sequence[float], prediction: Sequence[float]) float
+pearson_cc(truth: Sequence[float], prediction: Sequence[float]) float
+precision_per_class(truth: Sequence[object], prediction: Sequence[object], labels: Sequence[object] = None, zero_division: float = 0) dict[str, float]
+recall_per_class(truth: Sequence[object], prediction: Sequence[object], labels: Sequence[object] = None, zero_division: float = 0) dict[str, float]
+unweighted_average_bias(truth: Sequence[object], prediction: Sequence[object], protected_variable: Sequence[object], labels: Sequence[object] = None, subgroups: Sequence[object] = None, metric: Callable[[Sequence[object], Sequence[object], Sequence[str] | None], dict[str, float]] = fscore_per_class, reduction: Callable[[Sequence[float]], float] = np.std) float
+unweighted_average_fscore(truth: Sequence[object], prediction: Sequence[object], labels: Sequence[object] = None, zero_division: float = 0) float
+unweighted_average_precision(truth: Sequence[object], prediction: Sequence[object], labels: Sequence[object] = None, zero_division: float = 0) float
+unweighted_average_recall(truth: Sequence[object], prediction: Sequence[object], labels: Sequence[object] = None, zero_division: float = 0) float
+weighted_confusion_error(truth: Sequence[object], prediction: Sequence[object], weights: Sequence[Sequence[int | float]], labels: Sequence[object] = None) float
+word_error_rate(truth: Sequence[Sequence[str]], prediction: Sequence[Sequence[str]]) float
+_matching_scores(truth: bool | int | Sequence[bool | int], prediction: bool | int | float | Sequence[bool | int | float]) tuple[np.ndarray, np.ndarray]
}
Updated class diagram for type annotations in audmetric/core/utils.pyclassDiagram
class Utils {
+assert_equal_length(truth: Sequence[object], prediction: Sequence[object])
+infer_labels(truth: Sequence[object], prediction: Sequence[object]) list[object]
+scores_per_subgroup_and_class(truth: Sequence[object], prediction: Sequence[object], protected_variable: Sequence[object], metric: Callable[[Sequence[object], Sequence[object], Sequence[str] | None, float], dict[str, float]], labels: Sequence[object], subgroups: Sequence[object], zero_division: float) dict[Hashable, dict]
}
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files
|
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.
Hey @ChristianGeng - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
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.
Thanks, looks all good.
I would prefer to rename the pull request to "Remove support for Python 3.8" to be in line with the naming we did so far when removing a Python version.
Oh. This was suggested by github. I did not expect it to name it after a commit. |
Summary by Sourcery
Update type hinting to use PEP 585 style and remove Python 3.8 from CI configuration.
Enhancements:
CI: