-
Notifications
You must be signed in to change notification settings - Fork 6
Allow for manual runs of SF CLI Integration Test #104
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
Changes from all commits
aadaa6c
a6948ff
4a55695
4149205
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -60,24 +60,43 @@ See the [Prerequisites section in README.md](./README.md#prerequisites) for comp | |
| datacustomcode version | ||
| ``` | ||
|
|
||
| 4. **Initialize a project for development work verification** | ||
| 4. **Install the SF CLI and plugin** | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I realize this is getting ahead of the README itself, but I started adding the |
||
|
|
||
| **Note**: To test your changes and develop new features, initialize a sample project: | ||
| The SF CLI is how you test your SDK changes end-to-end (`init`, `scan`, `zip`, `run`, `deploy`). | ||
|
|
||
| ```bash | ||
| # Install the Salesforce CLI (requires Node.js) | ||
| npm install -g @salesforce/cli | ||
|
|
||
| # Install the Data Cloud Code Extension plugin | ||
| sf plugins install @salesforce/plugin-data-code-extension | ||
| ``` | ||
|
|
||
| 5. **Build and install your local SDK changes** | ||
|
|
||
| The SF CLI plugin resolves templates from the installed package path. After making changes, build a wheel and install it: | ||
|
|
||
| ```bash | ||
| poetry build | ||
| $(poetry env info --path)/bin/pip install dist/*.whl --force-reinstall --no-deps | ||
| ``` | ||
|
|
||
| Re-run these two commands each time you make SDK changes you want to test via the SF CLI. | ||
|
|
||
| 6. **Test your changes** | ||
|
|
||
| ```bash | ||
| # Create a new directory for your test project | ||
| mkdir my-test-project | ||
| cd my-test-project | ||
|
|
||
| # Initialize a new Data Cloud custom code project | ||
| datacustomcode init . | ||
|
|
||
| # Test your SDK modifications against the sample project with: | ||
| datacustomcode run ./payload/entrypoint.py | ||
| # Initialize, scan, zip, run | ||
| sf data-code-extension script init --package-dir . | ||
| sf data-code-extension script scan --entrypoint payload/entrypoint.py | ||
| sf data-code-extension script zip --package-dir . | ||
| sf data-code-extension script run --entrypoint payload/entrypoint.py -o <your-org-alias> | ||
| ``` | ||
|
|
||
| **Tip**: See the [README.md](./README.md) for additional `datacustomcode` commands (`scan`, `deploy`, `zip`) to test specific code paths and validate your SDK changes thoroughly. | ||
|
|
||
| ## Versioning and Pre-Releases | ||
|
|
||
| This project uses [PEP 440](https://peps.python.org/pep-0440/) version syntax. Versions are derived automatically from git tags via `poetry-dynamic-versioning`. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -87,8 +87,8 @@ warn_unused_configs = true | |
|
|
||
| [tool.poetry] | ||
| include = [ | ||
| {path = "src/datacustomcode/templates/**/*", format = "sdist"}, | ||
| {path = "src/datacustomcode/config.yaml", format = "sdist"} | ||
| {path = "src/datacustomcode/templates/**/*"}, | ||
| {path = "src/datacustomcode/config.yaml"} | ||
| ] | ||
| packages = [{include = "datacustomcode", from = "src"}] | ||
| version = "0.0.0" | ||
|
|
@@ -133,7 +133,8 @@ datacustomcode = "datacustomcode.cli:cli" | |
|
|
||
| [tool.poetry-dynamic-versioning] | ||
| enable = true | ||
| pattern = "^v(?P<base>.+)$" | ||
| format-jinja = "{% if distance == 0 %}{{ base }}{{ stage or '' }}{% else %}{{ bump_version(base) }}.dev{{ distance }}+{{ commit }}{% endif %}" | ||
| pattern = "^v(?P<base>\\d+\\.\\d+\\.\\d+)(?P<stage>\\.dev\\d+|a\\d+|b\\d+|rc\\d+)?$" | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The problem we're solving here is when installing/running locally, if the base branch was |
||
| style = "pep440" | ||
| vcs = "git" | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This allows us to run this github action on main, manually in the github UI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Us" being any user with write access to the repo.