chore: migrate to uv, src layout, and PEP 8 package name#79
Open
n3rada wants to merge 5 commits into
Open
Conversation
|
Thanks for the contribution! Before we can merge this, we need @n3rada to sign the Salesforce Inc. Contributor License Agreement. |
Author
|
This PR also resolves #74. By locking dependencies with |
Author
|
This PR also addresses #68. The |
Author
|
Tangentially related to #67 as well: the old |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello 👋
I took some time to modernise the packaging of this project so it is easier to contribute to and install from.
What Changed
setup.py,setup.cfg,requirements.txt, andrequirements-dev.txtwith a singlepyproject.tomlcompliant with PEP 621, usinguv_buildas the build backend.src/layout, which is now the recommended structure for Python projects to avoid import shadowing issues.SalesforcePy/tosalesforcepy/to follow PEP 8 (lowercase package names).import salesforcepy as sfdc).pythonpath = ["src", "tests"]to the pytest config so tests resolve correctly without any install step.pyproject.toml.from __future__ import absolute_importacross all modules (Python 2 compatibility shim, not needed on Python 3).try/except ImportErrorurllib compat block insfdc.pyfor the same reason.SyntaxWarningcaused by invalid escape sequences (\**kwargs) in docstrings.README.mdwith installation instructions foruvandpip.All 79 existing tests pass without modification to the test logic itself.
Hope this is useful.
Happy to adjust anything.