Skip to content

Commit c398c61

Browse files
glennmatthewschadellKircheneer
authored
Version 1.5.1 (#119)
* New Example06 - IP Prefixes (#111) * first draft of example06 Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com> * Attempt to fix the read the docs pipeline. (#115) * Attempt to fix the read the docs pipeline. * Yamllint. Co-authored-by: Leo Kirchner <leo@kirchne.red> * Update CODEOWNERS (#113) * Fix get() by modelname (#118) * Update example05 (#107) * Update example05 * Use site as children * Add update after adding children * Add pylint disable until Redis code is in * Update example * simplify * wip * wip * Update example * Take redis from main * imprort order * yml * update readme * Use diffsync from pypi * Apply suggestions from code review Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com> * Code review * replace bash by python exec * Rename dockerfile to Dockerfile * Update docs source Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com> * Update CHANGELOG and bump version Co-authored-by: Christian Adell <chadell@gmail.com> Co-authored-by: Leo Kirchner <Kircheneer@users.noreply.github.com> Co-authored-by: Leo Kirchner <leo@kirchne.red>
1 parent 9e11129 commit c398c61

32 files changed

+568
-108
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Default owners for all files in this repository
2-
* @glennmatthews @dgarros
2+
* @glennmatthews @Kircheneer @chadell

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,3 +289,6 @@ fabric.properties
289289

290290
## Sphinx Documentation ##
291291
docs/build
292+
293+
## Secrets
294+
creds.env

.readthedocs.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ sphinx:
77
fail_on_warning: false
88

99
python:
10-
version: 3.7
10+
version: "3.7"
1111
install:
12-
- method: "pip"
13-
path: "."
14-
extra_requirements:
15-
- "docs"
12+
- requirements: "docs/requirements.txt"

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# Changelog
22

3+
## v1.5.1 - 2022-06-30
4+
5+
### Added
6+
7+
- #111 - Added example 6, regarding IP prefixes.
8+
9+
### Changed
10+
11+
- #107 - Updated example 5 to use the Redis backend store.
12+
13+
### Fixed
14+
15+
- #115 - Fixed ReadTheDocs rendering pipeline
16+
- #118 - Fixed a regression in `DiffSync.get(modelname, identifiers)` introduced in 1.5.0
17+
318
## v1.5.0 - 2022-06-07
419

520
### Added

diffsync/store/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,9 @@ def _get_object_class_and_model(
194194
"""Get object class and model name for a model."""
195195
if isinstance(model, str):
196196
modelname = model
197-
if not hasattr(self, model):
197+
if not hasattr(self.diffsync, model):
198198
return None, modelname
199-
object_class = getattr(self, model)
199+
object_class = getattr(self.diffsync, model)
200200
else:
201201
object_class = model
202202
modelname = model.get_type()
@@ -216,7 +216,7 @@ def _get_uid(
216216
uid = object_class.create_unique_id(**identifier)
217217
else:
218218
raise ValueError(
219-
f"Invalid args: ({model}, {identifier}): "
220-
f"either {model} should be a class/instance or {identifier} should be a str"
219+
f"Invalid args: ({model}, {object_class}, {identifier}): "
220+
f"either {object_class} should be a class/instance or {identifier} should be a str"
221221
)
222222
return uid

docs/requirements.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
m2r2==0.2.7
2+
mistune==0.8.4
3+
sphinx==4.5.0
4+
toml==0.10.2
5+
sphinx-rtd-theme==1.0.0

docs/source/api/diffsync.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,11 @@ API Reference
1616
diffsync.helpers
1717
diffsync.logging
1818
diffsync.utils
19+
20+
Subpackages
21+
-----------
22+
23+
.. toctree::
24+
:maxdepth: 4
25+
26+
diffsync.store
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
diffsync.store.local
2+
====================
3+
4+
.. automodule:: diffsync.store.local
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
diffsync.store.redis
2+
====================
3+
4+
.. automodule:: diffsync.store.redis
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:

docs/source/api/diffsync.store.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
API Reference
2+
=============
3+
4+
.. automodule:: diffsync.store
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:
8+
9+
10+
.. toctree::
11+
:maxdepth: 4
12+
13+
diffsync.store.local
14+
diffsync.store.redis

0 commit comments

Comments
 (0)