Skip to content

Commit 7240c57

Browse files
authored
Release Latest Version (#79)
* VERSIONING: Add __version__ to package and use that in setup.py * Updated download_url * Add pyproject.toml file for flit and black * CHANGELOG: Add a changelog file to track versions
1 parent 35945d1 commit 7240c57

File tree

4 files changed

+87
-2
lines changed

4 files changed

+87
-2
lines changed

CHANGELOG.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](https://keepachangelog.com/)
5+
6+
7+
## [Unreleased]
8+
### Added
9+
### Changed
10+
### Deprecated
11+
### Removed
12+
### Fixed
13+
### Security
14+
15+
16+
## [0.0.9] - 2017-11-28
17+
### Added
18+
- Method to fully install an OS on a device.
19+
- Support for dynamically determining a devices default file system to be used by methods that deal with file management.
20+
- Several validations that ensure methods that perform actions on a device properly accomplished what they set out to do.
21+
- Several Exception classes to report when methods do not accomplish what they attempted to do.
22+
- Internal methods to "reconnect" to devices after a reboot; accepts a timeout to gauge if device takes longer than expected to boot up.
23+
- Internal method to validate that the device has booted the specified image.
24+
- Linting with Black
25+
- Official versioning in __init__
26+
### Changed
27+
- Defaulting methods that manage files to default to using the devices default file system, while also allowing users to specfiy the file system.
28+
- ASADevice to inherit from BaseDevice instead of IOSDevice.
29+
- Changed TextFSM parsing to open files using a context manager.
30+
### Fixed
31+
- Issues with determining the boot variables for certain IOS versions and models.
32+
- Issue where IOS devices only supported booting files in "flash:" file system.
33+
- Issue with facts data not getting updated when calling the refresh_facts method.

pyntc/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
except ImportError:
1212
from ConfigParser import SafeConfigParser
1313

14+
__version__ = "0.0.9"
15+
1416
LIB_PATH_ENV_VAR = "PYNTC_CONF"
1517
LIB_PATH_DEFAULT = "~/.ntc.conf"
1618

pyproject.toml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
[build-system]
2+
requires = ["setuptools", "wheel"]
3+
build-backend = "flit.buildapi"
4+
5+
[tool.flit.metadata]
6+
module = "pyntc"
7+
author = "Network to Code"
8+
author-email = "[email protected]"
9+
home-page = "https://github.com/networktocode/pyntc"
10+
description-file = "README.md"
11+
requires = [
12+
"requests>=2.7.0",
13+
"jsonschema",
14+
"future",
15+
"netmiko",
16+
"paramiko",
17+
"pynxos>=0.0.3",
18+
"coverage",
19+
"mock>=1.3",
20+
"textfsm",
21+
"terminal",
22+
"f5-sdk",
23+
"bigsuds",
24+
"pyeapi",
25+
"junos-eznc",
26+
"scp",
27+
]
28+
29+
[tool.black]
30+
line-length = 120
31+
py36 = true
32+
include = '\.pyi?$'
33+
exclude = '''
34+
/(
35+
\.git
36+
| \.tox
37+
| \.venv
38+
| _build
39+
| buck-out
40+
| build
41+
| dist
42+
| blib2to3
43+
| tests/data
44+
)/
45+
'''

setup.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1+
import re
12
from setuptools import find_packages, setup
23

4+
with open("pyntc/__init__.py") as pkg_init:
5+
# Create a dict of all dunder vars and their values in package __init__
6+
metadata = dict(re.findall("__(\w+)__\s*=\s*\"(\S+?)\"", pkg_init.read()))
7+
38
name = "pyntc"
4-
version = "0.0.8"
9+
version = metadata["version"]
510
packages = find_packages()
611
package_data = {"pyntc": ["templates/*.template", "devices/tables/jnpr/*.yml"]}
712

@@ -28,7 +33,7 @@
2833
author = "Network To Code"
2934
author_email = "[email protected]"
3035
url = "https://github.com/networktocode/pyntc"
31-
download_url = "https://github.com/networktocode/pyntc/tarball/0.0.8"
36+
download_url = "https://github.com/networktocode/pyntc/tarball/{}".format(version)
3237
description = "A multi-vendor library for managing network devices."
3338

3439
setup(

0 commit comments

Comments
 (0)