Skip to content

Commit

Permalink
Prep release (#34)
Browse files Browse the repository at this point in the history
* poetry lock

* sort changelog keys

* update CHANGELOG (#35)

scratch 1.1.2 that was not an actual release and put all changes under Unreleased

Co-authored-by: Matt Griswold <[email protected]>

* clean up

* run pre-commit

* fixes from scan

* prep version 1.2.0

* prep 1.2.0

* add twine

* add codeql scan badge

---------

Co-authored-by: Martin Komon <[email protected]>
  • Loading branch information
grizz and mkomon authored Feb 8, 2023
1 parent e35229f commit 4d94454
Show file tree
Hide file tree
Showing 9 changed files with 1,320 additions and 683 deletions.
14 changes: 7 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@


## Unreleased
### Added
- Python 3.7, 3.8, 3.9, 3.10 support (#21)
### Removed
- Support for Python versions older than 3.7 (#21)


## 1.1.2
## 1.2.0
### Added
- bird2 compatibility
- Python 3.7, 3.8, 3.9, 3.10 support (#21)
- BIRD 2 compatibility
### Fixed
- all tests are fixed and run again (on MacOS and Debian 11)
- all tests are fixed and run again (on MacOS and Ubuntu Linux)
- remote connections over SSH
### Removed
- Support for Python versions older than 3.7 (#21)


## 1.1.1
Expand Down
42 changes: 22 additions & 20 deletions CHANGELOG.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,33 @@
1.1.0:
Unreleased:
added: []
fixed: []
changed: []
deprecated: []
removed: []
security: []
1.2.0:
added:
- config_file, get_config()
- bird_cmd
- 'peer fields: description, address, asn'
- 'route fields: interface, source, time'
- 'status fields: version'
- parsing test framework
- Python 3.7, 3.8, 3.9, 3.10 support (#21)
- BIRD 2 compatibility
fixed:
- handle date format for newer bird
- all tests are fixed and run again (on MacOS and Ubuntu Linux)
- remote connections over SSH
removed:
- Support for Python versions older than 3.7 (#21)
1.1.1:
added:
- better debug logging for actual output
changed:
- get_routes returns []
fixed:
- regex str warnings
1.1.2:
1.1.0:
added:
- bird2 compatibility
- config_file, get_config()
- bird_cmd
- 'peer fields: description, address, asn'
- 'route fields: interface, source, time'
- 'status fields: version'
- parsing test framework
fixed:
- all tests are fixed and run again (on MacOS and Debian 11)
Unreleased:
added:
- Python 3.7, 3.8, 3.9, 3.10 support (#21)
changed: []
deprecated: []
fixed: []
removed:
- Support for Python versions older than 3.7 (#21)
security: []
- handle date format for newer bird
2 changes: 1 addition & 1 deletion Ctl/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.2
1.2.0
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
[![PyPI](https://img.shields.io/pypi/pyversions/pybird.svg?maxAge=600)](https://pypi.python.org/pypi/pybird)
[![Tests](https://github.com/20c/pybird/workflows/tests/badge.svg)](https://github.com/20c/confu)
[![Codecov](https://img.shields.io/codecov/c/github/20c/pybird/main.svg?maxAge=3600)](https://codecov.io/github/20c/pybird)
[![CodeQL](https://github.com/20c/pybird/actions/workflows/codeql.yml/badge.svg)](https://github.com/20c/pybird/actions/workflows/codeql.yml)

BIRD interface handler for Python

Expand Down
1,895 changes: 1,265 additions & 630 deletions poetry.lock

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion pybird/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def check_config(self):
err = self._parse_configure(data)
if err:
raise ValueError(err)
return None

def get_bird_status(self):
"""Get the status of the BIRD instance. Returns a dict with keys:
Expand Down Expand Up @@ -151,7 +152,7 @@ def _parse_configure(self, data):
return line

elif fieldno in self.success_fields:
return
return None
raise ValueError("unable to parse configure response")

def _parse_router_status_line(self, line, parse_date=False):
Expand Down
34 changes: 20 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pybird"
version = "1.1.2"
version = "1.2.0"
description = "BIRD interface handler for Python"
readme = "README.md"
repository = "https://github.com/20c/pybird"
Expand All @@ -19,27 +19,33 @@ packages = [{ include = "pybird" }]

[tool.poetry.dependencies]
python = "^3.7"
future = "^0.18.2"
ctl = "^1.0.0"

[tool.poetry.dev-dependencies]
pytest = "^7.1.2"
pytest-cov = "^3.0.0"
tox = "^3.25.1"
# testing
codecov = ">=2"
coverage = ">=5"
pytest = ">=6"
pytest-cov = "*"
tox = ">=3.25.1"
tox-gh-actions = ">=2.9.1"

# lint
black = { version = ">=20", allow-prereleases = true }
isort = "^5.7.0"
flake8 = "^3.8.4"
mypy = "^0.950"
pre-commit = "^2.13"
pyupgrade = "^2.19.4"
# linting
black = ">=20"
isort = ">=5.7"
flake8 = ">=3.8"
mypy = ">=0.950"
pre-commit = ">=2.13"
pyupgrade = ">=2.19"

# docs
markdown-include = ">=0.5"
mkdocs = "^1.2.3"
pymdgen = "^1.0.0"
pymdgen = "^1"

# ctl
# ctl = ">=1"
ctl = { git = "https://github.com/20c/ctl.git", branch = "prep-release" }
twine = ">=3"

[tool.poetry.extras]
docs = ["markdown-include", "mkdocs", "pymdgen"]
Expand Down
10 changes: 1 addition & 9 deletions tests/test_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,4 @@ def test_parse_route_data(bird, data_parse_route_data):


# pytest doesn't load fixtures at runtime
# def make_parse_test(name):
# def func(request, bird):
# data_parse_routes = request.getfixturevalue(name)
# data = bird._parse_route_data(data_parse_routes.input)
# filedata.dump(data)
# assert data_parse_routes.expected == data
# return func
#
# test_parse_routes = make_parse_test('data_parse_routes')
# so we can't use def make_parse_test(name)
2 changes: 1 addition & 1 deletion tests/test_socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ def tearDown(self):
self._send_query("terminate mockserver")

def _send_query(self, query):

if not isinstance(query, bytes):
query = query.encode("utf-8")

Expand Down Expand Up @@ -308,6 +307,7 @@ def __init__(self, socket_file):
try:
os.remove(socket_file)
except OSError:
# ignore if socket file does not exist
pass
self.socket.bind(socket_file)
self.socket.listen(1)
Expand Down

0 comments on commit 4d94454

Please sign in to comment.