Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[run]
omit =
*/__init__.py
*/__cli__.py


[report]
exclude_lines =
if TYPE_CHECKING:
pass
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @Ahzyuan
37 changes: 23 additions & 14 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
name: Bug Report
description: File a bug report.
title: "[🐞 Bug]: "
labels: ["bug", "triage"]
labels: ["bug"]
type: Bug

body:

- type: markdown
attributes:
value: |
**Thanks for taking the time to fill out this bug report!**
> **Thanks for taking the time to fill out this bug report!**

- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Search for existing issues for the bug you encountered.
label: Is there an existing issue or a disscusion for this?
description: Search for [existing issues](https://github.com/TorchMeter/torchmeter/issues?q=) or [existing discussions](https://github.com/TorchMeter/torchmeter/discussions?discussions_q=) for what you encountered.
options:
- label: I have searched, and found nothing match my bug.
required: true
Expand All @@ -25,7 +26,7 @@ body:
description: |
What did you do, and what did you encounter?
It is best to include a screenshot, gif or screen recording of your issue.
placeholder: Tell us what you see!
placeholder: Tell us what did you do and what you see!
validations:
required: true

Expand Down Expand Up @@ -59,25 +60,33 @@ body:
id: version
attributes:
label: Your package version
description: Use `pip show <package-name>` to get the version.
description: Use `pip show torchmeter` to get the version.
validations:
required: true

- type: dropdown
- type: input
id: py-version
attributes:
label: Your python version
description: Use `python -V` to get the version.
validations:
required: true

- type: input
id: os
attributes:
label: Operating System?
multiple: true
options:
- Windows
- Linux
- macOS
label: Operating System
description: Your os, like `windows 10`, `ubuntu 22.04`.
validations:
required: true

- type: textarea
id: appendix
attributes:
label: Appendix
description: Any addition information helping to resolve this issue is welcome.
description: |
Any addition information helping to resolve this issue is welcome. \
You can include code snippets, error traces, screenshots/GIFs, or other relevant materials here.
value: |
<details>
<summary>Details</summary>
Expand Down
16 changes: 8 additions & 8 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
blank_issues_enabled: false
# contact_links:
# - name: GitHub Community Support
# url: https://github.com/orgs/community/discussions
# about: Please ask and answer questions here.
blank_issues_enabled: true
contact_links:
- name: TorchMeter Community Support
url: https://github.com/TorchMeter/torchmeter/discussions
about: Please ask and answer questions here.

# - name: GitHub Security Bug Bounty
# url: https://bounty.github.com/
# about: Please report security vulnerabilities here.
# - name: GitHub Security Bug Bounty
# url: https://bounty.github.com/
# about: Please report security vulnerabilities here.
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Feature Request
description: File a feature request.
title: "[🧩 Feature Request]: "
labels: ["enhancement", "triage"]
labels: ["feat"]
type: Feature

body:

Expand Down
95 changes: 66 additions & 29 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,84 @@
## 📋 Summary
<!--
🍻 **Contributions make open-source thrive!**
Thank you for taking the time to improve torchmeter.
To ensure efficient review, please complete the following sections
-->

> [!IMPORTANT]
> - [ ] This PR fixes an issue. [Link]() <!--Link to related issues if applicable -->
> - [ ] This PR adds something new.
> - [ ] This PR is **not** a code change (e.g. `README`, typos, ...)
> - [ ] This PR has been tested.
## Prep Steps

<!-- What is this pull request for? Does it fix any issues? -->
> Before we dive in, let's confirm you've unlocked all these steps

## 📝 Changes
<!-- Note: Use `[x]` to check the boxes -->

<!-- Describe what you change and what the purpose in this pull request. -->
- [ ] 🔍 I've checked for duplicate PRs ([click to check](https://github.com/TorchMeter/torchmeter/pulls?q=))
- [ ] 📜 I've followed [contribution guidelines](../CONTRIBUTING.md)
- [ ] ✨ I've linted and formatted my code ([how?](../CONTRIBUTING.md#cb-lint-format-and-test-your-code))
- [ ] 🔧 I've formatted the PR title appropriately ([how?](../docs/pr_standard.md#pull-request-title))
- [ ] 🎯 I've targeted the `master` branch ([how?](../assets/target_master_branch.jpg))
- [ ] 👐 I've allowed maintainer edits on my branch ([how?](../assets/allow_maintainer_edit.jpg), [why](../CONTRIBUTING.md#db-create-a-pull-request-to-torchmeter))
- [ ] 🛡️ I've added/updated tests to cover my changes if prossible ([how?](../CONTRIBUTING.md#cb-lint-format-and-test-your-code))
- [ ] 📝 I've added/updated the documentation for any new logic introduced ([how?](../CONTRIBUTING.md#cc-add-documentation-for-your-code))
- [ ] ⏳ I understand @Ahzyuan has been busy lately and may need time to review. (we appreciate your patience!)

<details>
<summary>Details</summary>
## Type of changes

<!-- What is this pull request for? -->

- [ ] 🐞 Bug fix
- [ ] 🌟 New feature
- [ ] 🧪 Tests
- [ ] 🏗 Refactoring
- [ ] ⚡ Performance improvement
- [ ] 📖 Documentation / docstrings
- [ ] ↩️ Revert
- [ ] 🧩 Other

## Description

#### Purpose

<!-- Describe the purpose of this pull request here -->

This PR is to ...

#### Changes:

<!--
Describe the changes you've made here.
- We strongly recommend adding tests/docs to cover your changes.
- If you introduce new features, please explain their functionality. And it's best to provide usage demos in `Appendix` section below.
-->

- `file1`: modify xxx, in order to achieve a xxx result.
- `file2`: add xxx, in order to fix xxx.

</details>
## Related

## 🛠️ How to test
<!-- Use `#` to link to issues, discussions or PRs. -->

<!-- Describe your testing approach and results. Replace the example below-->
- issues:

<details>
<summary>Example</summary>
- Discussions:

- PRs:

For manual testing:
- Install the library in a fresh virtual environment.
- Import main library functions/classes and perform basic operations.
- Test configuration options by setting different values and verify library behavior changes.
- If library interacts with external services, mock them and ensure it handles errors gracefully.
## Appendix

For automated testing:
- We use `pytest` for testing. Test suite has unit tests for functions and methods in library.
- Integration tests are in place to check interaction between library components.
- We run tests on `GitHub Actions`. Ensures every commit triggers test suite, reports failures immediately.
- Performance tests are conducted periodically to measure the efficiency of critical functions.
<!--
Provide supplementary info if needed, for example:
- alteration effect (before/after screenshot, gif, video if available)
usage demo for new features
- performance metrics

</details>
Please highlight any potential issues introduced by this PR, if there are any.

If there is no supplementary info needed, please remove the content below and keep this section empty.
-->

<details>
<summary>Details</summary>

## 📷 Screenshots/Examples (if needed):
1. `quickly`: finish in 10s before and 1s after
2. `stable`: compatible in all os

<!-- Add screenshots or examples to illustrate the changes if needed. -->
</details>
15 changes: 15 additions & 0 deletions .github/pr-title-checker-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"LABEL": {
"name": "PR-title-needs-formatting",
"color": "CE0000"
},
"CHECKS": {
"regexp": "^(depr|perf|feat|fix|doc|test|ci|chore|build|refactor|revert)(\\([^\\s]+\\))?\\!?\\s?\\: [A-Z].*[^\\.\\!\\?,… ]$",
"ignoreLabels": ["skip-changelog"]
},
"MESSAGES": {
"success": "🎉 PR title format is valid. Thank you!",
"failure": "❌ PR title format is invalid! Please update according to the [PR title convention](https://github.com/TorchMeter/torchmeter/blob/master/docs/pr_standard.md#pull-request-title).",
"notice": ""
}
}
Loading
Loading