Skip to content

Commit e2ff3fe

Browse files
Liu KeyuLiu Keyu
authored andcommitted
Restore helper.py and predictor.py to match upstream
2 parents 08889bd + e0358d6 commit e2ff3fe

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+6148
-4321
lines changed

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ body:
88
**Thank you for wanting to report a bug for this project!**
99
1010
11-
Verify first that your issue is not [already reported on GitHub](https://github.com/cda-tum/mqt-predictor/search?q=is%3Aissue&type=issues).
11+
Verify first that your issue is not [already reported on GitHub](https://github.com/munich-quantum-toolkit/predictor/search?q=is%3Aissue&type=issues).
1212
13-
If you have general questions, please consider [starting a discussion](https://github.com/cda-tum/mqt-predictor/discussions).
13+
If you have general questions, please consider [starting a discussion](https://github.com/munich-quantum-toolkit/predictor/discussions).
1414
- type: textarea
1515
attributes:
1616
label: Environment information

.github/ISSUE_TEMPLATE/feature-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ body:
88
**Thank you for wanting to suggest a feature for this project!**
99
1010
11-
Verify first that your idea is not [already requested on GitHub](https://github.com/cda-tum/mqt-predictor/search?q=is%3Aissue&type=issues).
11+
Verify first that your idea is not [already requested on GitHub](https://github.com/munich-quantum-toolkit/predictor/search?q=is%3Aissue&type=issues).
1212
1313
- type: textarea
1414
attributes:

.github/SECURITY.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!--- This file has been generated from an external template. Please do not modify it directly. -->
2+
<!--- Changes should be contributed to https://github.com/munich-quantum-toolkit/templates. -->
3+
4+
# Security Policy
5+
6+
## Supported Versions
7+
8+
Security updates are applied only to the most recent releases.
9+
10+
## Reporting a Vulnerability
11+
12+
To report vulnerabilities, you can privately report a potential security issue
13+
via the GitHub security vulnerabilities feature. This can be done here:
14+
15+
https://github.com/munich-quantum-toolkit/predictor/security/advisories
16+
17+
Please do **not** open a public issue about a potential security vulnerability.
18+
19+
You can find more details on the security vulnerability feature in the GitHub
20+
documentation here:
21+
22+
https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability

.github/contributing.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Contributing
2+
3+
Thank you for your interest in contributing to this project.
4+
We value contributions from people with all levels of experience.
5+
In particular, if this is your first pull request, not everything has to be perfect.
6+
We will guide you through the process.
7+
8+
We use GitHub to [host code](https://github.com/munich-quantum-toolkit/predictor), to [track issues and feature requests](https://github.com/munich-quantum-toolkit/predictor/issues), as well as accept [pull requests](https://github.com/munich-quantum-toolkit/predictor/pulls).
9+
See <https://docs.github.com/en/get-started/quickstart> for a general introduction to working with GitHub and contributing to projects.
10+
11+
## Types of Contributions
12+
13+
You can contribute in several ways:
14+
15+
- 🐛 Report Bugs
16+
: Report bugs at <https://github.com/munich-quantum-toolkit/predictor/issues> using the _🐛 Bug report_ issue template. Please make sure to fill out all relevant information in the respective issue form.
17+
18+
- 🐛 Fix Bugs
19+
: Look through the [GitHub Issues] for bugs. Anything tagged with "bug" is open to whoever wants to try and fix it.
20+
21+
- ✨ Propose New Features
22+
: Propose new features at <https://github.com/munich-quantum-toolkit/predictor/issues> using the _✨ Feature request_ issue template. Please make sure to fill out all relevant information in the respective issue form.
23+
24+
- ✨ Implement New Features
25+
: Look through the [GitHub Issues] for features. Anything tagged with "feature" or "enhancement" is open to whoever wants to implement it. We highly appreciate external contributions to the project.
26+
27+
- 📝 Write Documentation
28+
: MQT Predictor could always use some more documentation, and we appreciate any help with that.
29+
30+
## Get Started 🎉
31+
32+
Ready to contribute? Check out the {doc}`Development Guide <development_guide>` to set up MQT Predictor for local development and learn about the style guidelines and conventions used throughout the project.
33+
34+
We value contributions from people with all levels of experience.
35+
In particular, if this is your first PR, not everything has to be perfect.
36+
We will guide you through the PR process.
37+
Nevertheless, please try to follow the guidelines below as well as you can to help make the PR process quick and smooth.
38+
39+
## Core Guidelines
40+
41+
- ["Commit early and push often"](https://www.worklytics.co/blog/commit-early-push-often).
42+
- Write meaningful commit messages, preferably using [gitmoji](https://gitmoji.dev) for additional context.
43+
- Focus on a single feature or bug at a time and only touch relevant files. Split multiple features into separate contributions.
44+
- Add tests for new features to ensure they work as intended.
45+
- Document new features appropriately. For user-facing changes, add an entry to the `CHANGELOG.md` file. In case of breaking changes, please also update the `UPGRADING.md` file.
46+
- Add tests for bug fixes to demonstrate that the bug has been resolved.
47+
- Document your code thoroughly and ensure it is readable.
48+
- Keep your code clean by removing debug statements, leftover comments, and unrelated code.
49+
- Check your code for style and linting errors before committing.
50+
- Follow the project's coding standards and conventions.
51+
- Be open to feedback and willing to make necessary changes based on code reviews.
52+
53+
## Pull Request Workflow
54+
55+
- Create PRs early. It is ok to create work-in-progress PRs. You may mark these as draft PRs on GitHub.
56+
- Describe your PR with a descriptive title, reference any related issues by including the issue number in the PR description, and add a comprehensive description of the changes. Follow the provided PR template and do not delete any sections, except for the issue reference if your PR is not related to an issue.
57+
- Whenever a PR is created or updated, several workflows on all supported platforms and versions of Python are executed. These workflows ensure that the project still builds, all tests pass, the code is properly formatted, and no new linting errors are introduced. Your PR must pass all these continuous integration (CI) checks before it can be merged.
58+
- Once your PR is ready, change it from a draft PR to a regular PR and request a review from one of the project maintainers. Only request a review once you are done with your changes and the PR is ready to be reviewed. If you are unsure whether your PR is ready, ask in the PR comments. If you are a first-time contributor, request a review from one of the maintainers by mentioning them in a comment on the PR.
59+
- If your PR gets a "Changes requested" review, address the feedback and update your PR by pushing to the same branch. Do not close the PR and open a new one. Respond to review comments on the PR (e.g., with "done 👍" or "done in @<commit>") to let the reviewer know that you have addressed the feedback. Note that reviewers do not get a notification if you just react to the review comment with an emoji. Write a comment to notify the reviewer. Do not resolve the review comments yourself. The reviewer will mark the comments as resolved once they are satisfied with the changes.
60+
- Be sure to re-request a review once you have made changes after a code review so that maintainers know that the requests have been addressed.
61+
- No need to squash commits before merging; we usually squash them to keep the history clean. We only merge without squashing if the commit history is clean and meaningful. Avoid rebasing or force-pushing your PR branch before merging, as it complicates reviews. You can rebase or clean up commits after addressing all review comments if desired.
62+
63+
Here are some tips for finding the cause of certain failures:
64+
65+
- If any of the `CI / 🐍 Test` checks fail, this indicates build errors or test failures in the Python part of the code base. Look through the respective logs on GitHub for any error or failure messages.
66+
- If any of the `codecov/\*` checks fail, this means that your changes are not appropriately covered by tests or that the overall project coverage decreased too much. Ensure that you include tests for all your changes in the PR.
67+
- If the `pre-commit.ci` check fails, some of the `pre-commit` checks failed and could not be fixed automatically by the _pre-commit.ci_ bot. Such failures are most likely related to the Python part of the code base. The individual log messages frequently provide helpful suggestions on how to fix the warnings.
68+
- If the `docs/readthedocs.org:\*` check fails, the documentation could not be built properly. Inspect the corresponding log file for any errors.
69+
70+
---
71+
72+
This document was inspired by and partially adapted from
73+
74+
- <https://matplotlib.org/stable/devel/coding_guide.html>
75+
- <https://opensource.creativecommons.org/contributing-code/pr-guidelines/>
76+
- <https://yeoman.io/contributing/pull-request.html>
77+
- <https://github.com/scikit-build/scikit-build>
78+
79+
[GitHub Issues]: https://github.com/munich-quantum-toolkit/predictor/issues

.github/contributing.rst

Lines changed: 0 additions & 78 deletions
This file was deleted.

.github/pull_request_template.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!--- This file has been generated from an external template. Please do not modify it directly. -->
2+
<!--- Changes should be contributed to https://github.com/munich-quantum-toolkit/templates. -->
3+
4+
## Description
5+
6+
Please include a summary of the change and, if applicable, which issue is fixed.
7+
Please also include relevant motivation and context.
8+
List any dependencies that are required for this change.
9+
10+
Fixes #(issue) <!--- Replace `(issue)` with the issue number fixed by this pull request. If this PR does not fix an issue, please remove this line. -->
11+
12+
## Checklist:
13+
14+
<!---
15+
This checklist serves as a reminder of a couple of things that ensure your pull request will be merged swiftly.
16+
-->
17+
18+
- [ ] The pull request only contains commits that are focused and relevant to this change.
19+
- [ ] I have added appropriate tests that cover the new/changed functionality.
20+
- [ ] I have updated the documentation to reflect these changes.
21+
- [ ] I have added entries to the changelog for any noteworthy additions, changes, fixes, or removals.
22+
- [ ] I have added migration instructions to the upgrade guide (if needed).
23+
- [ ] The changes follow the project's style guidelines and introduce no new warnings.
24+
- [ ] The changes are fully tested and pass the CI checks.
25+
- [ ] I have reviewed my own code changes.

.github/support.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Support
2+
3+
If you are stuck with a problem using MQT Predictor or have questions, please get in touch at our [Issues] or [Discussions].
4+
We'd love to help.
5+
6+
You can save time by following this procedure when reporting a problem:
7+
8+
- Do try to solve the problem on your own first.
9+
- Search through past [Issues] and [Discussions] to see if someone else already had the same problem.
10+
- Before filing a bug report, try to create a minimal working example (MWE) that reproduces the problem.
11+
It is much easier to identify the cause for the problem if a handful of lines suffice to show that something is not working.
12+
13+
You can also always reach us at [quantum.cda@xcit.tum.de](mailto:quantum.cda@xcit.tum.de).
14+
15+
[Issues]: https://github.com/munich-quantum-toolkit/predictor/issues
16+
[Discussions]: https://github.com/munich-quantum-toolkit/predictor/discussions

.github/support.rst

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/workflows/cd.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ on:
88
- .github/workflows/cd.yml
99

1010
jobs:
11-
python-packaging:
11+
build-sdist:
1212
name: 🐍 Packaging
13-
uses: cda-tum/mqt-workflows/.github/workflows/reusable-python-packaging.yml@v1.7
14-
with:
15-
pure-python: true
13+
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-sdist.yml@v1.15
14+
15+
build-wheel:
16+
name: 🐍 Packaging
17+
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-wheel-build.yml@v1.15
1618

1719
deploy:
1820
if: github.event_name == 'release' && github.event.action == 'published'
@@ -25,7 +27,7 @@ jobs:
2527
id-token: write
2628
attestations: write
2729
contents: read
28-
needs: [python-packaging]
30+
needs: [build-sdist, build-wheel]
2931
steps:
3032
- uses: actions/download-artifact@v4
3133
with:

0 commit comments

Comments
 (0)