Skip to content

Commit 03afc7b

Browse files
authored
Changes rewrite (#121)
* Add markdown suffix to changes * Support markdown in docs * Update changelog
1 parent d40be57 commit 03afc7b

File tree

6 files changed

+36
-14
lines changed

6 files changed

+36
-14
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ pip-wheel-metadata/
1414
# Dist files
1515
/build/
1616
/dist/
17+
/docs/_build/
1718

1819

1920
# Local test files

CHANGES renamed to CHANGES.md

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
1-
14.0.0b1 (2021-02-09)
2-
---------------------
1+
14.0.0 (unreleased)
2+
-------------------
3+
4+
- Update the request builder pattern to match the commercetools SDK's for other languages.
5+
This means that the old pattern:
6+
```python
7+
product = client.products.get_by_id("00633d11-c5bb-434e-b132-73f7e130b4e3")
8+
```
9+
is replaced with the new pattern:
10+
```python
11+
product = (
12+
client
13+
.with_project_key("<your-project-key>")
14+
.products()
15+
.with_id("00633d11-c5bb-434e-b132-73f7e130b4e3")
16+
.get())
17+
```
18+
The old pattern is depracted but will remain backwards compatible for now
19+
- Allow passing custom HTTP adapter to BaseClient (@lime-green)
20+
- Add support for custom address fields and update actions
21+
- Testing: fixed issues with `get_by_key` lookups in certain testing backends
22+
23+
## Notes on code generation
324
We moved our code generation to the code generation tool from Commercetools,
425
see https://github.com/commercetools/rmf-codegen
526

@@ -17,7 +38,7 @@ shown.
1738

1839
13.0.0 (2021-01-04)
1940
-------------------
20-
- Regenerate code (fixed not being able to parse a lot of errors, so upgrading is recommended)
41+
- Regenerated code. This addresses errors not being able to be parsed, so upgrading is recommended.
2142
- Cart:
2243
- CartDiscountValueGiftLineItemDraft channel variables type changed ChannelReference -> ChannelResourceIdentifier
2344
- CartDiscount value field type changed CartDiscountValue -> CartDiscountValueDraft
@@ -37,22 +58,21 @@ shown.
3758
- Change supply_channels from ChannelResourceIdentifier to ChannelReference
3859
- Subscription:
3960
- ResourceDeletedDeliverySchema added data_erasure
40-
- Minimum required dependencies now require requests_mock>=1.8.0 (it already didn't work without it)
41-
- Testing customer group added changeName and setKey actions
42-
- Use Black 19 for formatting generated code
61+
- Require requests_mock 1.8.0 or up
62+
- Testing: Added `changeName` and `setKey` actions to CustomerGroupBackend
4363

4464
12.0.2 (2020-11-27)
4565
-------------------
46-
- Testing backend: Fix custom object mock interface
66+
- Testing: Fix custom object mock interface
4767

4868
12.0.1 (2020-11-18)
4969
-------------------
50-
- Testing backend: support 'in' for single values, f.e. 'orderState in ("Open")'
70+
- Testing: Support `in` for single values, f.e. `'orderState in ("Open")'`
5171

5272
12.0.0 (2020-10-15)
5373
-------------------
5474
- Regenerate types (commercetools-api-reference 5ebb3153)
55-
- Removed get_by_container and replaced by query_by_container (it's a query endpoint, not a get custom object endpoint)
75+
- Removed `get_by_container` and replaced by `query_by_container`: It's a query endpoint, not a get custom object endpoint.
5676

5777
11.0.0 (2020-09-18)
5878
-------------------
@@ -62,7 +82,7 @@ shown.
6282

6383
10.0.2 (2020-09-08)
6484
-------------------
65-
- Testing predicates now support 'in' syntax
85+
- Testing: Predicates now support 'in' syntax
6686

6787
10.0.1 (2020-09-04)
6888
-------------------
@@ -89,7 +109,7 @@ Note this release has some breaking changes regarding imports and a lot of code
89109

90110
8.3.0 (2020-07-21)
91111
------------------
92-
- Testing backend request mock parameters were case insensitive, causing expanding to fail in some cases
112+
- Testing: backend request mock parameters were case insensitive, causing expanding to fail in some cases
93113

94114
8.2.0 (2020-07-20)
95115
------------------

docs/changes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.. include:: ../CHANGES.md

docs/changes.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"sphinx.ext.autodoc",
4343
"sphinx.ext.intersphinx",
4444
"sphinx_autodoc_typehints",
45+
"m2r2",
4546
]
4647

4748
# Add any paths that contain templates here, relative to this directory.
@@ -50,8 +51,7 @@
5051
# The suffix(es) of source filenames.
5152
# You can specify multiple suffix as a list of string:
5253
#
53-
# source_suffix = ['.rst', '.md']
54-
source_suffix = ".rst"
54+
source_suffix = ['.rst', '.md']
5555

5656
# The master toctree document.
5757
master_doc = "index"

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"Sphinx>=1.8.1",
1919
"sphinx-rtd-theme==0.4.2",
2020
"sphinx-autodoc-typehints==1.6.0",
21+
"m2r2==0.16",
2122
]
2223

2324
tests_require = [

0 commit comments

Comments
 (0)