Closed sandeepsuryaprasad closed 3 weeks ago
β±οΈ Estimated effort to review: 3 π΅π΅π΅βͺβͺ |
π§ͺ No relevant tests |
π No security concerns identified |
β‘ Key issues to review Configuration Error The `selenium_package` key in `[tool.setuptools.package-data]` might not be recognized by setuptools. Usually, the key should match the package name exactly, which is typically 'selenium' rather than 'selenium_package'. Missing Package Definitions The removal of 'package_dir' and 'packages' from setup.py without ensuring they are correctly handled in pyproject.toml could lead to issues in package discovery and installation. |
Category | Suggestion | Score |
Possible bug |
Correct the file pattern to ensure it matches the intended files___ **Ensure that theselenium.egg-info * pattern correctly matches intended files. It appears to have a space which might cause it to not work as expected.** [py/pyproject.toml [17]](https://github.com/SeleniumHQ/selenium/pull/14309/files#diff-3adb340b5a499e26b04507d972c31f5cf6fc27a6d81e3f7b547bf50e90c43be3R17-R17) ```diff -"selenium.egg-info *", +"selenium.egg-info/*", ``` - [ ] **Apply this suggestion** Suggestion importance[1-10]: 9Why: Correcting the file pattern is crucial to ensure that the intended files are matched correctly, preventing potential build issues. | 9 |
Maintainability |
Use more specific file patterns to avoid including unwanted files___ **It's recommended to use a more specific glob pattern or explicitly list the files inthe selenium_package to avoid unintentionally including unwanted files.**
[py/pyproject.toml [11-21]](https://github.com/SeleniumHQ/selenium/pull/14309/files#diff-3adb340b5a499e26b04507d972c31f5cf6fc27a6d81e3f7b547bf50e90c43be3R11-R21)
```diff
selenium_package = [
"*.py",
"*.rst",
"*.json",
"*.xpi",
"*.js",
- "selenium.egg-info *",
+ "selenium.egg-info/*",
"selenium-manager",
"selenium-manager.exe",
"CHANGES",
"LICENSE"
]
```
- [ ] **Apply this suggestion**
Suggestion importance[1-10]: 8Why: Using more specific glob patterns helps to avoid unintentionally including unwanted files, improving maintainability and reducing potential issues. | 8 |
Remove redundant default settings for cleaner code___ **Thenamespaces key in [tool.setuptools.packages.find] is set to false , which is the default value. Consider removing it for cleaner code unless you explicitly need to document this setting.** [py/pyproject.toml [7]](https://github.com/SeleniumHQ/selenium/pull/14309/files#diff-3adb340b5a499e26b04507d972c31f5cf6fc27a6d81e3f7b547bf50e90c43be3R7-R7) ```diff -namespaces = false +# namespaces = false ``` - [ ] **Apply this suggestion** Suggestion importance[1-10]: 6Why: Removing redundant settings can make the code cleaner, but the impact on functionality is minimal since it is a default value. | 6 | |
Best practice |
Specify dependency versions to ensure compatibility___ **Consider specifying the versions for theinstall_requires dependencies to ensure compatibility and prevent potential future conflicts.** [py/setup.py [59-60]](https://github.com/SeleniumHQ/selenium/pull/14309/files#diff-722aeeec2821793eb6adf0c529cc7439c4b27ce78937cbb8840e94d4fc1c4017R59-R60) ```diff -"urllib3[socks]>=1.26,<3", -"trio~=0.17", +"urllib3[socks]>=1.26,<1.27", +"trio~=0.17.0", ``` - [ ] **Apply this suggestion** Suggestion importance[1-10]: 7Why: Specifying exact versions for dependencies can help prevent compatibility issues, but the suggested versions may not be necessary if the current version constraints are sufficient. | 7 |
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 59.12%. Comparing base (
215e20b
) to head (523c2e3
). Report is 4 commits behind head on trunk.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@VietND96 can you please re-trigger the workflow for this PR.. I have updated the branch.. Thanks!
User description
Thanks for contributing to Selenium! A PR well described will help maintainers to quickly review and merge it
Before submitting your PR, please check our contributing guidelines. Avoid large PRs, help reviewers by making them as simple and short as possible.
Description
MANIFEST.in
topyproject.toml
file.Motivation and Context
pyproject.toml
file through table[tool.setuptools.packages.find]
, the package information insetup.py
can be eliminated and the same can be maintained inpyproject.toml
.Types of changes
Checklist
PR Type
Enhancement, Configuration changes
Description
MANIFEST.in
file and moved its contents topyproject.toml
.setup.py
to eliminate package configuration, now handled bypyproject.toml
.MANIFEST.in
.Changes walkthrough π
setup.py
Remove package configuration from setup.py
py/setup.py
package_dir
andpackages
definitions.include_package_data
setting.BUILD.bazel
Update Bazel build configuration
py/BUILD.bazel - Removed reference to `MANIFEST.in` file.
MANIFEST.in
Remove MANIFEST.in file
py/MANIFEST.in - Deleted the `MANIFEST.in` file entirely.
pyproject.toml
Add package and data configuration to pyproject.toml
py/pyproject.toml