Skip to content

Commit a38252e

Browse files
authored
Merge pull request #183 from networktocode/release-v2.2.0
Release v2.2.0
2 parents ffea065 + ec30892 commit a38252e

File tree

109 files changed

+29777
-13478
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+29777
-13478
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Default owner(s) of all files in this repository
2-
* @chadell @glennmatthews @pke11y
2+
* @chadell @glennmatthews @pke11y @scetron

.github/workflows/ci.yml

Lines changed: 221 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,221 @@
1+
---
2+
name: "CI"
3+
concurrency: # Cancel any existing runs of this workflow for this same PR
4+
group: "${{ github.workflow }}-${{ github.ref }}"
5+
cancel-in-progress: true
6+
on: # yamllint disable
7+
push:
8+
branches:
9+
- "main"
10+
- "develop"
11+
tags:
12+
- "v*"
13+
pull_request: ~
14+
jobs:
15+
black:
16+
runs-on: "ubuntu-20.04"
17+
env:
18+
INVOKE_LOCAL: "True"
19+
steps:
20+
- name: "Check out repository code"
21+
uses: "actions/checkout@v3"
22+
- name: "Setup environment"
23+
uses: "networktocode/gh-action-setup-poetry-environment@v4"
24+
- name: "Linting: black"
25+
run: "poetry run invoke black"
26+
bandit:
27+
runs-on: "ubuntu-20.04"
28+
env:
29+
INVOKE_LOCAL: "True"
30+
steps:
31+
- name: "Check out repository code"
32+
uses: "actions/checkout@v3"
33+
- name: "Setup environment"
34+
uses: "networktocode/gh-action-setup-poetry-environment@v4"
35+
- name: "Linting: bandit"
36+
run: "poetry run invoke bandit"
37+
needs:
38+
- "black"
39+
pydocstyle:
40+
runs-on: "ubuntu-20.04"
41+
env:
42+
INVOKE_LOCAL: "True"
43+
steps:
44+
- name: "Check out repository code"
45+
uses: "actions/checkout@v3"
46+
- name: "Setup environment"
47+
uses: "networktocode/gh-action-setup-poetry-environment@v4"
48+
- name: "Linting: pydocstyle"
49+
run: "poetry run invoke pydocstyle"
50+
needs:
51+
- "black"
52+
flake8:
53+
runs-on: "ubuntu-20.04"
54+
env:
55+
INVOKE_LOCAL: "True"
56+
steps:
57+
- name: "Check out repository code"
58+
uses: "actions/checkout@v3"
59+
- name: "Setup environment"
60+
uses: "networktocode/gh-action-setup-poetry-environment@v4"
61+
- name: "Linting: flake8"
62+
run: "poetry run invoke flake8"
63+
needs:
64+
- "black"
65+
mypy:
66+
runs-on: "ubuntu-20.04"
67+
env:
68+
INVOKE_LOCAL: "True"
69+
steps:
70+
- name: "Check out repository code"
71+
uses: "actions/checkout@v3"
72+
- name: "Setup environment"
73+
uses: "networktocode/gh-action-setup-poetry-environment@v4"
74+
with:
75+
poetry-install-options: "--with dev"
76+
- name: "Linting: flake8"
77+
run: "poetry run invoke mypy"
78+
needs:
79+
- "black"
80+
yamllint:
81+
runs-on: "ubuntu-20.04"
82+
env:
83+
INVOKE_LOCAL: "True"
84+
steps:
85+
- name: "Check out repository code"
86+
uses: "actions/checkout@v3"
87+
- name: "Setup environment"
88+
uses: "networktocode/gh-action-setup-poetry-environment@v4"
89+
- name: "Linting: yamllint"
90+
run: "poetry run invoke yamllint"
91+
needs:
92+
- "black"
93+
pylint:
94+
runs-on: "ubuntu-20.04"
95+
env:
96+
INVOKE_LOCAL: "True"
97+
steps:
98+
- name: "Check out repository code"
99+
uses: "actions/checkout@v3"
100+
- name: "Setup environment"
101+
uses: "networktocode/gh-action-setup-poetry-environment@v4"
102+
with:
103+
poetry-install-options: "--with dev"
104+
- name: "Linting: Pylint"
105+
run: "poetry run invoke pylint"
106+
needs:
107+
- "bandit"
108+
- "pydocstyle"
109+
- "flake8"
110+
- "yamllint"
111+
- "mypy"
112+
unittest:
113+
strategy:
114+
fail-fast: true
115+
matrix:
116+
python-version: ["3.7", "3.8", "3.9", "3.10"]
117+
runs-on: "ubuntu-20.04"
118+
env:
119+
INVOKE_LOCAL: "True"
120+
PYTHON_VER: "${{ matrix.python-version }}"
121+
steps:
122+
- name: "Check out repository code"
123+
uses: "actions/checkout@v3"
124+
- name: "Setup environment"
125+
uses: "networktocode/gh-action-setup-poetry-environment@v4"
126+
with:
127+
python-version: "${{ matrix.python-version }}"
128+
poetry-install-options: "--with dev"
129+
- name: "Run poetry Install"
130+
run: "poetry install"
131+
- name: "Run Tests"
132+
run: "poetry run invoke pytest --local"
133+
needs:
134+
- "pylint"
135+
publish_gh:
136+
name: "Publish to GitHub"
137+
runs-on: "ubuntu-20.04"
138+
if: "startsWith(github.ref, 'refs/tags/v')"
139+
steps:
140+
- name: "Check out repository code"
141+
uses: "actions/checkout@v3"
142+
- name: "Set up Python"
143+
uses: "actions/setup-python@v4"
144+
with:
145+
python-version: "3.9"
146+
- name: "Install Python Packages"
147+
run: "pip install poetry"
148+
- name: "Set env"
149+
run: "echo RELEASE_VERSION=${GITHUB_REF:10} >> $GITHUB_ENV"
150+
- name: "Run Poetry Version"
151+
run: "poetry version $RELEASE_VERSION"
152+
- name: "Upload binaries to release"
153+
uses: "svenstaro/upload-release-action@v2"
154+
with:
155+
repo_token: "${{ secrets.NTC_GITHUB_TOKEN }}"
156+
file: "dist/*"
157+
tag: "${{ github.ref }}"
158+
overwrite: true
159+
file_glob: true
160+
needs:
161+
- "unittest"
162+
publish_pypi:
163+
name: "Push Package to PyPI"
164+
runs-on: "ubuntu-20.04"
165+
if: "startsWith(github.ref, 'refs/tags/v')"
166+
steps:
167+
- name: "Check out repository code"
168+
uses: "actions/checkout@v3"
169+
- name: "Set up Python"
170+
uses: "actions/setup-python@v4"
171+
with:
172+
python-version: "3.9"
173+
- name: "Install Python Packages"
174+
run: "pip install poetry"
175+
- name: "Set env"
176+
run: "echo RELEASE_VERSION=${GITHUB_REF:10} >> $GITHUB_ENV"
177+
- name: "Run Poetry Version"
178+
run: "poetry version $RELEASE_VERSION"
179+
- name: "Push to PyPI"
180+
uses: "pypa/gh-action-pypi-publish@release/v1"
181+
with:
182+
user: "__token__"
183+
password: "${{ secrets.PYPI_API_TOKEN }}"
184+
needs:
185+
- "unittest"
186+
slack-notify:
187+
needs:
188+
- "publish_gh"
189+
- "publish_pypi"
190+
name: "Send notification to the Slack"
191+
runs-on: "ubuntu-20.04"
192+
env:
193+
SLACK_WEBHOOK_URL: "${{ secrets.SLACK_WEBHOOK_URL }}"
194+
SLACK_MESSAGE: >-
195+
*NOTIFICATION: NEW-RELEASE-PUBLISHED*\n
196+
Repository: <${{ github.server_url }}/${{ github.repository }}|${{ github.repository }}>\n
197+
Release: <${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ github.ref_name }}|${{ github.ref_name }}>\n
198+
Published by: <${{ github.server_url }}/${{ github.actor }}|${{ github.actor }}>
199+
steps:
200+
- name: "Send a notification to Slack"
201+
# ENVs cannot be used directly in job.if. This is a workaround to check
202+
# if SLACK_WEBHOOK_URL is present.
203+
if: "${{ env.SLACK_WEBHOOK_URL != '' }}"
204+
uses: "slackapi/[email protected]"
205+
with:
206+
payload: |
207+
{
208+
"text": "${{ env.SLACK_MESSAGE }}",
209+
"blocks": [
210+
{
211+
"type": "section",
212+
"text": {
213+
"type": "mrkdwn",
214+
"text": "${{ env.SLACK_MESSAGE }}"
215+
}
216+
}
217+
]
218+
}
219+
env:
220+
SLACK_WEBHOOK_URL: "${{ secrets.SLACK_WEBHOOK_URL }}"
221+
SLACK_WEBHOOK_TYPE: "INCOMING_WEBHOOK"

.travis.yml

Lines changed: 0 additions & 71 deletions
This file was deleted.

CHANGELOG.md

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

3+
## v2.2.0 - 2022-10-25
4+
5+
### Added
6+
7+
- #169 - Add a helper script to anonymize IP addresses using `netconan`
8+
- #163 - New parser for BSO provider
9+
10+
### Changed
11+
12+
- #182 - Moved `toml` to dev-dependencies
13+
- #181 - Changed mypy to v0.982
14+
- #180 - **Minimum Python version changed** from `3.6.2` to `3.7`
15+
- #179 - Do not require an "[ EXTERNAL ]" marker for Colt email subjects
16+
- #176 - Handle Zayo table with "Customer Circuit ID" header
17+
- #170 - Update networktocode/gh-action-setup-poetry-environment action to v4
18+
- #164 - Improve CI concurrency
19+
- #161 - Update dependency flake8 to v5
20+
- #160 - Update slackapi/slack-github-action action to v1.23.0
21+
- #154 - Do not accept `pydantic` v1.9.1
22+
- #151 - Changed version `types-pytz` to v2022
23+
- #150 - Update actions/setup-python action to v4
24+
- #148 - Update actions/checkout action to v3
25+
- #147 - Update slackapi/slack-github-action action to v1.19.0
26+
- #146 - Migrate CI from Travis to Github Actions
27+
- #138 - Update dependency pytest to v7
28+
29+
### Fixed
30+
31+
- #177 - Fixed Colt parser: use European-style day-first date parsing
32+
333
## v2.1.0 - 2022-05-13
434

535
### Changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ By default, there is a `GenericProvider` that support a `SimpleProcessor` using
6868

6969
- AWS
7070
- AquaComms
71+
- BSO
7172
- Cogent
7273
- Colt
7374
- Equinix
@@ -284,6 +285,8 @@ Last, but not least, you should update the tests!
284285

285286
... adding the necessary data samples in `tests/unit/data/abcde/`.
286287

288+
> You can anonymize your IPv4 and IPv6 addresses using the `invoke anonymize-ips --local`. Keep in mind that only IPv4 addresses for documentation purposes (RFC5737: "192.0.2.0/24", "198.51.100.0/24", "203.0.113.0/24") are preserved, in case you need to check these IPs in your test output (unlikely)
289+
287290
# Contributing
288291

289292
Pull requests are welcomed and automatically built and tested against multiple versions of Python through Travis CI.

0 commit comments

Comments
 (0)