Skip to content

Commit

Permalink
Merge branch 'develop' into add_get_defaults_from_dict
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarrosop authored Oct 27, 2021
2 parents 03fa493 + b68a48d commit 10cf968
Show file tree
Hide file tree
Showing 15 changed files with 313 additions and 294 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,22 @@ on: [push,pull_request]
jobs:
linters:
name: linters
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.9' ]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
architecture: x64

- name: Install Poetry
uses: snok/install-poetry@v1.1.1
uses: snok/install-poetry@v1
with:
version: 1.1.4
virtualenvs-create: true
virtualenvs-in-project: true

Expand Down Expand Up @@ -48,7 +54,7 @@ jobs:
strategy:
matrix:
python-version: [ '3.6', '3.7', '3.8', '3.9' ]
platform: [ubuntu-latest, macos-latest, windows-latest]
platform: [ubuntu-latest, macOS-10.15, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
Expand All @@ -59,9 +65,8 @@ jobs:
architecture: x64

- name: Install Poetry
uses: snok/install-poetry@v1.1.1
uses: snok/install-poetry@v1
with:
version: 1.1.4
virtualenvs-create: true
virtualenvs-in-project: true

Expand All @@ -75,6 +80,7 @@ jobs:

- name: Install Dependencies
run: poetry install
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'

- name: Run pytest
run: make pytest
Expand Down
2 changes: 1 addition & 1 deletion docs/configuration/index.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Configuration
=============

The configuration is comprised of a set of sections and parameters for those sections. You can set the configuration programmatically using nornir by passing a dictionary of options for each section, by using a YAML file, by setting the corresponding environment variables or by a combination of the three. The order of preference from less to more preferred is "configuration file" -> "env variable" -> "code".
The configuration is comprised of a set of sections and parameters for those sections. You can set the configuration programmatically using nornir by passing a dictionary of options for each section, by using a YAML file, by setting the corresponding environment variables or by a combination of the three. The order of preference from less preferred to more preferred is "env variable" -> "configuration file" -> "code".

An example using ``InitNornir`` would be::

Expand Down
2 changes: 1 addition & 1 deletion docs/howto/advanced_filtering.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.2"
"version": "3.9.7"
}
},
"nbformat": 4,
Expand Down
42 changes: 21 additions & 21 deletions docs/howto/filtering_deep_dive.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
{
"cell_type": "code",
"execution_count": 21,
"execution_count": 1,
"id": "checked-standing",
"metadata": {},
"outputs": [],
Expand All @@ -47,7 +47,7 @@
},
{
"cell_type": "code",
"execution_count": 22,
"execution_count": 2,
"id": "certified-clothing",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -427,7 +427,7 @@
},
{
"cell_type": "code",
"execution_count": 23,
"execution_count": 3,
"id": "dirty-spain",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -539,7 +539,7 @@
},
{
"cell_type": "code",
"execution_count": 24,
"execution_count": 4,
"id": "varied-guarantee",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -569,7 +569,7 @@
},
{
"cell_type": "code",
"execution_count": 25,
"execution_count": 5,
"id": "fuzzy-conclusion",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -604,7 +604,7 @@
},
{
"cell_type": "code",
"execution_count": 26,
"execution_count": 6,
"id": "affected-principle",
"metadata": {
"scrolled": true
Expand Down Expand Up @@ -647,7 +647,7 @@
},
{
"cell_type": "code",
"execution_count": 27,
"execution_count": 7,
"id": "numeric-musician",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -689,7 +689,7 @@
},
{
"cell_type": "code",
"execution_count": 28,
"execution_count": 8,
"id": "spare-sandwich",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -727,7 +727,7 @@
},
{
"cell_type": "code",
"execution_count": 29,
"execution_count": 9,
"id": "informal-greece",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -788,7 +788,7 @@
},
{
"cell_type": "code",
"execution_count": 30,
"execution_count": 10,
"id": "racial-patio",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -828,7 +828,7 @@
},
{
"cell_type": "code",
"execution_count": 31,
"execution_count": 11,
"id": "technical-currency",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -946,7 +946,7 @@
},
{
"cell_type": "code",
"execution_count": 32,
"execution_count": 12,
"id": "surprising-aircraft",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -981,7 +981,7 @@
},
{
"cell_type": "code",
"execution_count": 33,
"execution_count": 13,
"id": "czech-country",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -1026,7 +1026,7 @@
},
{
"cell_type": "code",
"execution_count": 34,
"execution_count": 14,
"id": "pursuant-sculpture",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -1148,7 +1148,7 @@
},
{
"cell_type": "code",
"execution_count": 35,
"execution_count": 15,
"id": "confirmed-february",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -1275,7 +1275,7 @@
},
{
"cell_type": "code",
"execution_count": 36,
"execution_count": 16,
"id": "compact-intent",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -1400,7 +1400,7 @@
},
{
"cell_type": "code",
"execution_count": 37,
"execution_count": 17,
"id": "headed-commission",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -1538,7 +1538,7 @@
},
{
"cell_type": "code",
"execution_count": 38,
"execution_count": 18,
"id": "authentic-opposition",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -1723,7 +1723,7 @@
},
{
"cell_type": "code",
"execution_count": 39,
"execution_count": 19,
"id": "thrown-greene",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -1974,7 +1974,7 @@
},
{
"cell_type": "code",
"execution_count": 40,
"execution_count": 20,
"id": "forward-salon",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -2187,7 +2187,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.5"
"version": "3.9.7"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion docs/howto/handling_connections.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.6"
"version": "3.9.7"
}
},
"nbformat": 4,
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorial/failed_tasks.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@
"\u001b[0m\n",
"\u001b[0m\u001b[1m\u001b[31m---- Greeting is the polite thing to do ** changed : False --------------------- ERROR\u001b[0m\n",
"\u001b[0mTraceback (most recent call last):\n",
" File \"/opt/conda/lib/python3.8/site-packages/nornir/core/task.py\", line 99, in start\n",
" File \"/nornir/core/task.py\", line 99, in start\n",
" r = self.task(self, **self.params)\n",
" File \"<ipython-input-1-3ab8433d31a3>\", line 20, in say\n",
" raise Exception(\"I can't say anything right now\")\n",
Expand Down Expand Up @@ -495,7 +495,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.6"
"version": "3.9.7"
}
},
"nbformat": 4,
Expand Down
30 changes: 17 additions & 13 deletions docs/tutorial/initializing_nornir.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,12 @@
"data": {
"text/html": [
"<style>\n",
"pre { line-height: 125%; }\n",
"td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }\n",
"span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }\n",
"td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }\n",
"span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }\n",
".pygments .hll { background-color: #ffffcc }\n",
".pygments { background: #f8f8f8; }\n",
".pygments .c { color: #408080; font-style: italic } /* Comment */\n",
".pygments .err { border: 1px solid #FF0000 } /* Error */\n",
".pygments .k { color: #008000; font-weight: bold } /* Keyword */\n",
Expand Down Expand Up @@ -107,17 +111,17 @@
"}\n",
"\n",
"</style>\n",
"<div class=\"pygments\"><pre><span></span><span class=\"lineno\"> 1 </span><span class=\"nn\">---</span>\n",
"<span class=\"lineno\"> 2 </span><span class=\"nt\">inventory</span><span class=\"p\">:</span>\n",
"<span class=\"lineno\"> 3 </span> <span class=\"nt\">plugin</span><span class=\"p\">:</span> <span class=\"l l-Scalar l-Scalar-Plain\">SimpleInventory</span>\n",
"<span class=\"lineno\"> 4 </span> <span class=\"nt\">options</span><span class=\"p\">:</span>\n",
"<span class=\"lineno\"> 5 </span> <span class=\"nt\">host_file</span><span class=\"p\">:</span> <span class=\"s\">&quot;inventory/hosts.yaml&quot;</span>\n",
"<span class=\"lineno\"> 6 </span> <span class=\"nt\">group_file</span><span class=\"p\">:</span> <span class=\"s\">&quot;inventory/groups.yaml&quot;</span>\n",
"<span class=\"lineno\"> 7 </span> <span class=\"nt\">defaults_file</span><span class=\"p\">:</span> <span class=\"s\">&quot;inventory/defaults.yaml&quot;</span>\n",
"<span class=\"lineno\"> 8 </span><span class=\"nt\">runner</span><span class=\"p\">:</span>\n",
"<span class=\"lineno\"> 9 </span> <span class=\"nt\">plugin</span><span class=\"p\">:</span> <span class=\"l l-Scalar l-Scalar-Plain\">threaded</span>\n",
"<span class=\"lineno\">10 </span> <span class=\"nt\">options</span><span class=\"p\">:</span>\n",
"<span class=\"lineno\">11 </span> <span class=\"nt\">num_workers</span><span class=\"p\">:</span> <span class=\"l l-Scalar l-Scalar-Plain\">100</span>\n",
"<div class=\"pygments\"><pre><span></span><span class=\"linenos\"> 1</span><span class=\"nn\">---</span>\n",
"<span class=\"linenos\"> 2</span><span class=\"nt\">inventory</span><span class=\"p\">:</span>\n",
"<span class=\"linenos\"> 3</span> <span class=\"nt\">plugin</span><span class=\"p\">:</span> <span class=\"l l-Scalar l-Scalar-Plain\">SimpleInventory</span>\n",
"<span class=\"linenos\"> 4</span> <span class=\"nt\">options</span><span class=\"p\">:</span>\n",
"<span class=\"linenos\"> 5</span> <span class=\"nt\">host_file</span><span class=\"p\">:</span> <span class=\"s\">&quot;inventory/hosts.yaml&quot;</span>\n",
"<span class=\"linenos\"> 6</span> <span class=\"nt\">group_file</span><span class=\"p\">:</span> <span class=\"s\">&quot;inventory/groups.yaml&quot;</span>\n",
"<span class=\"linenos\"> 7</span> <span class=\"nt\">defaults_file</span><span class=\"p\">:</span> <span class=\"s\">&quot;inventory/defaults.yaml&quot;</span>\n",
"<span class=\"linenos\"> 8</span><span class=\"nt\">runner</span><span class=\"p\">:</span>\n",
"<span class=\"linenos\"> 9</span> <span class=\"nt\">plugin</span><span class=\"p\">:</span> <span class=\"l l-Scalar l-Scalar-Plain\">threaded</span>\n",
"<span class=\"linenos\">10</span> <span class=\"nt\">options</span><span class=\"p\">:</span>\n",
"<span class=\"linenos\">11</span> <span class=\"nt\">num_workers</span><span class=\"p\">:</span> <span class=\"l l-Scalar l-Scalar-Plain\">100</span>\n",
"</pre></div>\n",
"\n"
],
Expand Down Expand Up @@ -244,7 +248,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.2"
"version": "3.9.7"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit 10cf968

Please sign in to comment.