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

sage --package metrics: New tool to assist discussions of the Sage distribution #36977

Merged
merged 10 commits into from
Jan 14, 2024

Conversation

mkoeppe
Copy link
Member

@mkoeppe mkoeppe commented Dec 27, 2023

Discussions of the complexity of the Sage distribution pop up unexpectedly, as seen in

#36982 (comment), #36982 (comment), #36982 (comment), #36982 (comment), #36982 (comment), #36982 (comment), #36982 (comment)

#36726 (comment), #36726 (comment), #36726 (comment), #36726 (comment), #36726 (comment), #36726 (comment), #36726 (comment), #36726 (comment), #36726 (comment), #36726 (comment), #36726 (comment), #36726 (comment), #36726 (comment), #36726 (comment), #36726 (comment), #36726 (comment), #36726 (comment)

#36777 (comment), #36777 (comment), #36777 (comment), #36777 (comment), #36777 (comment), #36777 (comment)

To help put such discussions on a solid factual basis, we introduce the command sage --package metrics.

$ ./sage -package metrics :standard:
has_file_distros_arch_txt=131
has_file_distros_conda_txt=216
has_file_distros_debian_txt=125
has_file_distros_fedora_txt=138
has_file_distros_gentoo_txt=181
has_file_distros_homebrew_txt=61
has_file_distros_macports_txt=129
has_file_distros_nix_txt=51
has_file_distros_opensuse_txt=146
has_file_distros_slackware_txt=25
has_file_distros_void_txt=184
has_file_patches=35
has_file_spkg_check=59
has_file_spkg_configure_m4=222
has_file_spkg_install=198
has_tarball_upstream_url=231
line_count_file_patches=22561
line_count_file_spkg_check=402
line_count_file_spkg_configure_m4=2792
line_count_file_spkg_install=2960
packages=272
type_standard=272

Use PATH=build/bin:$PATH SAGE_ROOT=some-other-worktree build/bin/sage-package metrics :standard: to obtain the metrics of another version of Sage in some other worktree.

We add computation and before/after comparison of the metrics to the CI Linux Incremental workflow.
As an illustration, we change one Python package from "normal" to "wheel", removing an spkg-install.in file in the process. See https://github.com/sagemath/sage/actions/runs/7342841283/job/19992606617?pr=36977#step:6:12

More metrics can be added after

📝 Checklist

  • The title is concise, informative, and self-explanatory.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation accordingly.

⌛ Dependencies

@mkoeppe mkoeppe requested a review from dimpase December 28, 2023 19:46
@mkoeppe mkoeppe changed the title sage --package metrics: New sage --package metrics: New tool to assist discussions of the Sage distribution Jan 3, 2024
@mkoeppe mkoeppe requested a review from kwankyu January 4, 2024 19:07
@kwankyu
Copy link
Collaborator

kwankyu commented Jan 5, 2024

You may want to document --package metrics in https://doc.sagemath.org/html/en/developer/packaging.html. In particular, please explain the meanings of exemplary output lines. Some of them are not obvious unless you read the code.

@mkoeppe
Copy link
Member Author

mkoeppe commented Jan 6, 2024

Thanks for the suggestion. Done in 6e0d890

@kwankyu
Copy link
Collaborator

kwankyu commented Jan 7, 2024

Otherwise, lgtm.

@kwankyu
Copy link
Collaborator

kwankyu commented Jan 7, 2024

The PR description seems screwed up.

Copy link

github-actions bot commented Jan 7, 2024

Documentation preview for this PR (built with commit 6731a1c; changes) is ready! 🎉

@mkoeppe
Copy link
Member Author

mkoeppe commented Jan 7, 2024

Thanks!

@vbraun vbraun merged commit 795a40e into sagemath:develop Jan 14, 2024
23 of 44 checks passed
@mkoeppe mkoeppe added this to the sage-10.3 milestone Jan 14, 2024
@mkoeppe mkoeppe deleted the sage_package_metrics branch January 16, 2024 05:28
@amanmoon amanmoon mentioned this pull request Feb 10, 2024
3 tasks
vbraun pushed a commit to vbraun/sage that referenced this pull request Apr 18, 2024
    
I have implemented the `automatic size labeler`, which now assigns
labels to pull requests based on the number of lines changed

**Minimal**
Typically involves very small changes, bug fixes, or updates that
require only a few lines of code, often less than 50.
sagemath#37208 sagemath#37146 sagemath#37043

**Small**
Involves more substantial changes than minimal, potentially adding new
features or making modifications to existing ones. The range is usually
between 50 to 100 lines of code.
sagemath#37152 sagemath#37132

**Moderate**
Represents a significant portion of the codebase being modified, such as
adding new features, refactoring, or making extensive changes to
existing functionalities. This might involve between 100 to 300 lines of
code.
sagemath#36919 sagemath#37112

**Large**
Involves substantial and complex changes across various parts of the
codebase. This could include major architectural changes, the
introduction of new modules, or a significant overhaul of existing
features, often exceeding 300 lines of code.
sagemath#37125 sagemath#36977 sagemath#36972

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.

Fixes: sagemath#37254
    
URL: sagemath#37262
Reported by: Aman Moon
Reviewer(s): Sebastian Oehms
vbraun pushed a commit to vbraun/sage that referenced this pull request Apr 20, 2024
    
I have implemented the `automatic size labeler`, which now assigns
labels to pull requests based on the number of lines changed

**Minimal**
Typically involves very small changes, bug fixes, or updates that
require only a few lines of code, often less than 50.
sagemath#37208 sagemath#37146 sagemath#37043

**Small**
Involves more substantial changes than minimal, potentially adding new
features or making modifications to existing ones. The range is usually
between 50 to 100 lines of code.
sagemath#37152 sagemath#37132

**Moderate**
Represents a significant portion of the codebase being modified, such as
adding new features, refactoring, or making extensive changes to
existing functionalities. This might involve between 100 to 300 lines of
code.
sagemath#36919 sagemath#37112

**Large**
Involves substantial and complex changes across various parts of the
codebase. This could include major architectural changes, the
introduction of new modules, or a significant overhaul of existing
features, often exceeding 300 lines of code.
sagemath#37125 sagemath#36977 sagemath#36972

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.

Fixes: sagemath#37254
    
URL: sagemath#37262
Reported by: Aman Moon
Reviewer(s): Sebastian Oehms
vbraun pushed a commit to vbraun/sage that referenced this pull request Apr 25, 2024
    
I have implemented the `automatic size labeler`, which now assigns
labels to pull requests based on the number of lines changed

**Minimal**
Typically involves very small changes, bug fixes, or updates that
require only a few lines of code, often less than 50.
sagemath#37208 sagemath#37146 sagemath#37043

**Small**
Involves more substantial changes than minimal, potentially adding new
features or making modifications to existing ones. The range is usually
between 50 to 100 lines of code.
sagemath#37152 sagemath#37132

**Moderate**
Represents a significant portion of the codebase being modified, such as
adding new features, refactoring, or making extensive changes to
existing functionalities. This might involve between 100 to 300 lines of
code.
sagemath#36919 sagemath#37112

**Large**
Involves substantial and complex changes across various parts of the
codebase. This could include major architectural changes, the
introduction of new modules, or a significant overhaul of existing
features, often exceeding 300 lines of code.
sagemath#37125 sagemath#36977 sagemath#36972

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.

Fixes: sagemath#37254
    
URL: sagemath#37262
Reported by: Aman Moon
Reviewer(s): Sebastian Oehms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants