-
Notifications
You must be signed in to change notification settings - Fork 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
✨♻️ Project Setup and Structural Improvements #7
Conversation
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
backend_version: str | None = None, | ||
**fields: Any, | ||
) -> None: | ||
self._options = self._default_options() |
Check warning
Code scanning / CodeQL
`__init__` method calls overridden method Warning
_default_options
method FakeIonTraps2Six._default_options
Call to self.
_default_options
method FakeIonTraps2Trits._default_options
tol = Optimizer.OBJ_FIDELITY | ||
|
||
best_layer, best_error, best_xi = (low + (high - low) // 2, np.inf, []) | ||
mid, error, xi = (low + (high - low) // 2, np.inf, []) |
Check warning
Code scanning / CodeQL
Variable defined multiple times Warning
redefined
tol = Optimizer.OBJ_FIDELITY | ||
|
||
best_layer, best_error, best_xi = (low + (high - low) // 2, np.inf, []) | ||
mid, error, xi = (low + (high - low) // 2, np.inf, []) |
Check warning
Code scanning / CodeQL
Variable defined multiple times Warning
redefined
tol = Optimizer.OBJ_FIDELITY | ||
|
||
best_layer, best_error, best_xi = (low + (high - low) // 2, np.inf, []) | ||
mid, error, xi = (low + (high - low) // 2, np.inf, []) |
Check warning
Code scanning / CodeQL
Variable defined multiple times Warning
redefined
# for field in fields: | ||
# if field not in self._options.data: | ||
# msg = f"Options field '{field}' is not valid for this backend" | ||
# raise AttributeError(msg) |
Check notice
Code scanning / CodeQL
Commented-out code Note
Cpp-Linter Report
|
Ok. At least the C++ part from MiSiM works as intended. The python part is still failing left and right. But I guess that's all part of the process. |
Disclaimer: This is a huge huge PR. This is not how things should be done typically, but it is close to impossible to cleanly separate the changes here.
This PR does:
In addition to the above, the PR tries to cleanup the repository a little bit and bring some structure into the general chaos. Even after this refactor, the code still requires quite some work.
Ruff currently throws > 800 errors, mypy throws >600, clang-tidy throws 40 warnings, and CodeQL also isn't too happy.
Due to the lack of tests, I am also pretty sure that there are quite some mistakes throughout the code.
Despite the above, I would propose to merge this PR as quickly as possible and continue the development, fixing issues, adding typing, and restructuring the library based on the merged PR.