Skip to content

Commit e9e7987

Browse files
docs: add validation guide for testing changes in real applications (#37)
1 parent 05133b0 commit e9e7987

1 file changed

Lines changed: 33 additions & 1 deletion

File tree

docs/DEVELOPMENT.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# Development Guide
22

33
## Requirements
4+
45
- Python 3.11+
56
- uv (package manager)
67
- Docker
78

89
## Setup
10+
911
```bash
1012
# Clone the repository
1113
git clone https://github.com/SAP/cloud-sdk-python.git
@@ -42,6 +44,7 @@ uv build
4244
```
4345

4446
## Code Guidelines
47+
4548
- [Code Guidelines](GUIDELINES.md)
4649

4750
## Tests
@@ -60,14 +63,43 @@ uv run pytest -m integration -v
6063
See [Integration Tests](INTEGRATION_TESTS.md) for more details on integration testing.
6164

6265
### Coverage
66+
6367
```bash
6468
# Basic coverage
6569
uv run pytest --cov=src
6670
```
6771

72+
## Validating changes in a real application
73+
74+
Sometimes we want to validate our changes in a real application before publishing them to PyPI. It's extremely important to test like that to ensure that there are no issues with our changes and we encourage contributors to do so.
75+
76+
For that, we can reference the package using the GitHub endpoint in the `requirements.txt` or `pyproject.toml` of the test application. This way, we can install the package directly from the branch, commit, or tag that contains our changes without needing to publish it to PyPI first.
77+
78+
Using `requirements.txt`:
79+
80+
```bash
81+
# Other dependencies...
82+
sap-cloud-sdk @ git+https://github.com/sap/cloud-sdk-python@<branch-or-commit-or-tag>
83+
# You also could use your forked repository if you have one, for example:
84+
sap-cloud-sdk @ git+https://github.com/your-username/cloud-sdk-python@<branch-or-commit-or-tag>
85+
```
86+
87+
Using `pyproject.toml`:
88+
89+
```toml
90+
dependencies = [
91+
# Other dependencies...
92+
"sap-cloud-sdk @ git+https://github.com/sap/cloud-sdk-python@<branch-or-commit-or-tag>"
93+
# You also could use your forked repository if you have one, for example:
94+
"sap-cloud-sdk @ git+https://github.com/your-username/cloud-sdk-python@<branch-or-commit-or-tag>"
95+
]
96+
```
97+
98+
See the pip official documentation for more details on installing packages from VCS like Git: [VCS Support](https://pip.pypa.io/en/stable/topics/vcs-support/#vcs-support)
99+
68100
## Release and Deployment
69101

70-
For the end-to-end process to cut a release and publish artifacts, see the [Release and Deployment Guide](RELEASE.md).:
102+
For the end-to-end process to cut a release and publish artifacts, see the [Release and Deployment Guide](RELEASE.md).
71103

72104
## Contributing
73105
For guidance on contributing with new features, see the [Contributing Guide](../CONTRIBUTING.md).

0 commit comments

Comments
 (0)