Skip to content

Commit 1d0c2a5

Browse files
committed
add CHANGELOG.md and CI/CD for CHANGELOG.md
Signed-off-by: Lance Drane <[email protected]>
1 parent 9293475 commit 1d0c2a5

File tree

5 files changed

+98
-5
lines changed

5 files changed

+98
-5
lines changed

.github/workflows/publish.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ jobs:
2525
PDM_PUBLISH_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
2626
run: pdm publish --username __token__ --repository pypi
2727
- name: upload to github release
28-
uses: softprops/action-gh-release@v2
28+
uses: docker://antonyurchenko/git-release:v5
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
# assume any version with "a" (gets "ALPHA") or "b" (gets BETA) or "rc" (release candidates) will be a prerelease
32+
PRE_RELEASE: "${{ contains(github.ref_name, 'a') || contains(github.ref_name, 'b') || contains(github.ref_name, 'rc') }}"
2933
with:
30-
files: |
31-
dist/*
32-
# assume any version with "a" (gets "ALPHA") or "b" (gets BETA) will be a prerelease
33-
prerelease: ${{ contains(github.ref_name, 'a') || contains(github.ref_name, 'b') }}
34+
args: dist/*

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Changelog
2+
3+
## [0.7.0] - 2024-08-21
4+
5+
_If you are upgrading: please see [`UPGRADING.md`](UPGRADING.md)._
6+
7+
### Changed
8+
9+
- **Breaking:** Services now work with multiple Capabilities instead of a single Capability ([!9](https://github.com/INTERSECT-SDK/python-sdk/pull/9)) .
10+
11+
### Added
12+
13+
- **Breaking:** Added service-to-service request/response mechanism ([!9](https://github.com/INTERSECT-SDK/python-sdk/pull/9)) .
14+
15+
[0.7.0]: https://github.com/Level/level/releases/tag/0.7.0

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Please read the [Contributing](https://intersect-python-sdk.readthedocs.io/en/latest/contributing.html) section on the documentation website.

UPGRADING.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Upgrade Guide
2+
3+
This document describes breaking changes and how to upgrade. For a complete list of changes including minor and patch releases, please refer to the [changelog](CHANGELOG.md).
4+
5+
## 0.7.0
6+
7+
### Services
8+
9+
Services now provide a list of capabilities, instead of just a single capability. You will need to explicitly set your capability's `capability_name` property, and will provide a list of Capabilities to the Service instead of a single capability. So you will need to change former code which looks like this:
10+
11+
```python
12+
from intersect_sdk import IntersectBaseCapabilityImplementation, IntersectService, intersect_message
13+
14+
class MyCapabilityImplementation(IntersectBaseCapabilityImplementation):
15+
16+
@intersect_message
17+
def my_endpoint(self, param: str) -> str:
18+
# ... implementation
19+
20+
if __name__ == '__main__':
21+
# etc.
22+
capability = MyCapabilityImplementation()
23+
service = IntersectService(capability,
24+
# ... other params
25+
)
26+
```
27+
28+
to this:
29+
30+
```python
31+
from intersect_sdk import IntersectBaseCapabilityImplementation, IntersectService, intersect_message
32+
33+
class MyCapabilityImplementation(IntersectBaseCapabilityImplementation):
34+
35+
@intersect_message
36+
def my_endpoint(self, param: str) -> str:
37+
# ... implementation
38+
39+
if __name__ == '__main__':
40+
# etc.
41+
capability = MyCapabilityImplementation()
42+
capability.capability_name = 'MyCapability'
43+
service = IntersectService([capability],
44+
# ... other params
45+
)
46+
```
47+
48+
Additionally, this reserves the `intersect_sdk_call_service` function - if you are using this function as a name, **you must change its name**. (You should avoid starting your functions with `__intersect_sdk_`, `_intersect_sdk_`, or `intersect_sdk` - these functions could potentially be reserved by the BaseCapability in the future.)
49+
50+
### Clients
51+
52+
When calling another Service's operation, the namespacing has changed from `<function_name>` to `<capability_name>.<function_name>` . So for example, if we were calling `my_endpoint` in the above Service example, the code would change from:
53+
54+
```python
55+
params = IntersectClientMessageParams(
56+
operation='my_endpoint',
57+
# ... other parameters unchanged
58+
)
59+
60+
```
61+
62+
to
63+
64+
```python
65+
params = IntersectClientMessageParams(
66+
operation='MyCapability.my_endpoint',
67+
# ... other parameters unchanged
68+
)
69+
70+
```

docs/contributing.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,9 @@ Docstrings
7272
Docstrings for Python classes, functions, and modules should adhere to the `Google style <https://google.github.io/styleguide/pyguide.html>`_. The docstrings are processed by the `napoleon extension <https://sphinxcontrib-napoleon.readthedocs.io/en/latest/>`_ for the Sphinx generated documentation.
7373

7474
We require docstrings for all public classes, functions, and modules.
75+
76+
77+
Changelog
78+
---------
79+
80+
We follow the `Common Changelog <https://common-changelog.org>`_ format. When changing/adding/removing functionality, or for bugfixes, please add an appropriate entry in the Change Group (Changed/Added/Removed/Fixed) . See sections 2.2 and 2.4 for details.

0 commit comments

Comments
 (0)