Skip to content

Commit 5f45be0

Browse files
committed
Merge remote-tracking branch 'origin/main' into write-modes-fix
2 parents 767fa18 + 25507df commit 5f45be0

3 files changed

Lines changed: 39 additions & 13 deletions

File tree

.github/workflows/sf_cli_integration.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: SF CLI Integration Test
22

33
on:
44
pull_request:
5+
workflow_dispatch:
56

67
jobs:
78
sf-cli-integration:
@@ -21,11 +22,16 @@ jobs:
2122
with:
2223
python-version: '3.11'
2324

24-
- name: Install Poetry and Python SDK
25+
- name: Install Poetry and build SDK wheel
2526
run: |
2627
python -m pip install --upgrade pip
2728
pip install poetry
2829
make develop
30+
poetry build
31+
32+
- name: Install SDK wheel into Poetry venv
33+
run: |
34+
"$(poetry env info --path)/bin/pip" install dist/*.whl --force-reinstall --no-deps
2935
3036
- name: Add Poetry venv to PATH
3137
run: echo "$(poetry env info --path)/bin" >> $GITHUB_PATH

CONTRIBUTING.md

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,24 +60,43 @@ See the [Prerequisites section in README.md](./README.md#prerequisites) for comp
6060
datacustomcode version
6161
```
6262

63-
4. **Initialize a project for development work verification**
63+
4. **Install the SF CLI and plugin**
6464

65-
**Note**: To test your changes and develop new features, initialize a sample project:
65+
The SF CLI is how you test your SDK changes end-to-end (`init`, `scan`, `zip`, `run`, `deploy`).
66+
67+
```bash
68+
# Install the Salesforce CLI (requires Node.js)
69+
npm install -g @salesforce/cli
70+
71+
# Install the Data Cloud Code Extension plugin
72+
sf plugins install @salesforce/plugin-data-code-extension
73+
```
74+
75+
5. **Build and install your local SDK changes**
76+
77+
The SF CLI plugin resolves templates from the installed package path. After making changes, build a wheel and install it:
78+
79+
```bash
80+
poetry build
81+
$(poetry env info --path)/bin/pip install dist/*.whl --force-reinstall --no-deps
82+
```
83+
84+
Re-run these two commands each time you make SDK changes you want to test via the SF CLI.
85+
86+
6. **Test your changes**
6687

6788
```bash
6889
# Create a new directory for your test project
6990
mkdir my-test-project
7091
cd my-test-project
7192

72-
# Initialize a new Data Cloud custom code project
73-
datacustomcode init .
74-
75-
# Test your SDK modifications against the sample project with:
76-
datacustomcode run ./payload/entrypoint.py
93+
# Initialize, scan, zip, run
94+
sf data-code-extension script init --package-dir .
95+
sf data-code-extension script scan --entrypoint payload/entrypoint.py
96+
sf data-code-extension script zip --package-dir .
97+
sf data-code-extension script run --entrypoint payload/entrypoint.py -o <your-org-alias>
7798
```
7899

79-
**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.
80-
81100
## Versioning and Pre-Releases
82101

83102
This project uses [PEP 440](https://peps.python.org/pep-0440/) version syntax. Versions are derived automatically from git tags via `poetry-dynamic-versioning`.

pyproject.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ warn_unused_configs = true
8787

8888
[tool.poetry]
8989
include = [
90-
{path = "src/datacustomcode/templates/**/*", format = "sdist"},
91-
{path = "src/datacustomcode/config.yaml", format = "sdist"}
90+
{path = "src/datacustomcode/templates/**/*"},
91+
{path = "src/datacustomcode/config.yaml"}
9292
]
9393
packages = [{include = "datacustomcode", from = "src"}]
9494
version = "0.0.0"
@@ -133,7 +133,8 @@ datacustomcode = "datacustomcode.cli:cli"
133133

134134
[tool.poetry-dynamic-versioning]
135135
enable = true
136-
pattern = "^v(?P<base>.+)$"
136+
format-jinja = "{% if distance == 0 %}{{ base }}{{ stage or '' }}{% else %}{{ bump_version(base) }}.dev{{ distance }}+{{ commit }}{% endif %}"
137+
pattern = "^v(?P<base>\\d+\\.\\d+\\.\\d+)(?P<stage>\\.dev\\d+|a\\d+|b\\d+|rc\\d+)?$"
137138
style = "pep440"
138139
vcs = "git"
139140

0 commit comments

Comments
 (0)