Skip to content

Commit 0868929

Browse files
Merge pull request #310 from collin-wicker/fix/doc-updates
Fix minor grammar issues
2 parents b9b13f8 + a1d71c4 commit 0868929

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ $ pip install git+https://github.com/networktocode/diffsync.git@main
7070
# Contributing
7171
Pull requests are welcomed and automatically built and tested against multiple versions of Python through GitHub Actions.
7272

73-
The project is following Network to Code software development guidelines and are leveraging the following:
73+
The project is following Network to Code software development guidelines and is leveraging the following:
7474

7575
- Black, Pylint, Bandit, flake8, and pydocstyle, mypy for Python linting, formatting and type hint checking.
7676
- pytest, coverage, and unittest for unit tests.

diffsync/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
class DiffSyncModel(BaseModel):
6262
"""Base class for all DiffSync object models.
6363
64-
Note that read-only APIs of this class are implemented as `get_*()` functions rather than as properties;
64+
Note that read-only APIs of this class are implemented as `get_*()` methods rather than as properties;
6565
this is intentional as specific model classes may want to use these names (`type`, `keys`, `attrs`, etc.)
6666
as model attributes and we want to avoid any ambiguity or collisions.
6767

docs/source/core_engine/02-customize-diff-class.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ To use your own diff class, you need to provide it at runtime when calling one o
1717
<class 'AlphabeticalOrderDiff'>
1818
```
1919

20-
## Change the order in which the element are being processed
20+
## Change the order in which the elements are being processed
2121

22-
By default, all objects of the same type will be stored in a dictionary and as such the order in which they will be processed during a diff or a sync operation is not guaranteed (although in most cases, it will match the order in which they were initially loaded and added to the adapter). When the order in which a given group of object should be processed is important, it's possible to define your own ordering inside a custom Diff class.
22+
By default, all objects of the same type will be stored in a dictionary and as such the order in which they will be processed during a diff or a sync operation is not guaranteed (although in most cases, it will match the order in which they were initially loaded and added to the adapter). When the order in which a given group of objects should be processed is important, it's possible to define your own ordering inside a custom Diff class.
2323

2424
When iterating over a list of objects, either at the top level or as a group of children of a given object, the core engine is looking for a function named after the type of the object `order_children_<type>` and if none is found it will rely on the default function `order_children_default`. Either function need to be present and need to return an Iterator of DiffElement.
2525

docs/source/getting_started/01-getting-started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ class Nautobot(Adapter):
111111

112112
```
113113

114-
Would result in processing in the following order for each element until there is no elements left:
114+
Would result in processing in the following order for each element until there are no elements left:
115115

116116
- site
117117
- vlan
@@ -145,7 +145,7 @@ NetworkImporterAdapter
145145
>>>
146146
```
147147

148-
# Store data in a `Adapter` object
148+
# Store data in an `Adapter` object
149149

150150
To add a site to the local cache/store, you need to pass a valid `DiffSyncModel` object to the `add()` function.
151151

examples/03-remote-system/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ This is a simple example to show how DiffSync can be used to compare and synchro
66
For this example, we have a shared model for Region and Country defined in `models.py`.
77
A country must be part of a region and has an attribute to capture its population.
88

9-
The comparison and synchronization of dataset is done between a local JSON file and the [public instance of Nautobot](https://demo.nautobot.com).
9+
The comparison and synchronization of datasets is done between a local JSON file and the [public instance of Nautobot](https://demo.nautobot.com).
1010

1111
Also, this example is showing :
12-
- How to set a Global Flags to ignore object that are not matching
13-
- How to provide a custom Diff class to change the ordering of a group of object
12+
- How to set Global Flags to ignore objects that are not matching
13+
- How to provide a custom Diff class to change the ordering of a group of objects
1414

1515
> The source code for this example is in Github in the [examples/03-remote-system/](https://github.com/networktocode/diffsync/tree/main/examples/03-remote-system) directory.
1616

examples/05-nautobot-peeringdb/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Context
44

5-
The goal of this example is to synchronize some data from [PeeringDB](https://www.peeringdb.com/), that as the name suggests is a DB where peering entities define their facilities and presence to facilitate peering, towards [Nautobot Demo](https://demo.nautobot.com/) that is a always on demo service for [Nautobot](https://nautobot.readthedocs.io/), an open source Source of Truth.
5+
The goal of this example is to synchronize some data from [PeeringDB](https://www.peeringdb.com/), as the name suggests that is a DB where peering entities define their facilities and presence to facilitate peering, towards [Nautobot Demo](https://demo.nautobot.com/) that is an always on demo service for [Nautobot](https://nautobot.readthedocs.io/), an open source Source of Truth.
66

77
In Peering DB there is a model that defines a `Facility` and you can get information about the actual data center and the city where it is placed. In Nautobot, this information could be mapped to the `Region` and `Site` models, where `Region` can depend from other `Region` and also contain `Site` as children. For instance, Barcelona is in Spain and Spain is in Europe, and all of them are `Regions`. And, finally, the actual datacenter will refer to the `Region` where it is placed.
88

0 commit comments

Comments
 (0)