Skip to content

Commit 0fea2fe

Browse files
authored
Feature/upgrade genie (#11)
* removed version.py and moved to using uv version * moved pyats and genie from 25.7 to 25.9
1 parent 992658d commit 0fea2fe

File tree

6 files changed

+897
-904
lines changed

6 files changed

+897
-904
lines changed

docs/conf.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@
1212
#
1313
import os
1414
import sys
15-
import tomli
15+
try:
16+
import tomli as toml # For python < 3.11
17+
18+
except ImportError:
19+
import tomllib as toml # For python >= 3.11
20+
1621
base_path = os.path.split(os.path.join(os.path.abspath(os.path.dirname(__name__))))[0]
1722
sys.path.append(base_path)
1823

19-
# Reads version.py and converts to a dict of keys
20-
version_py = {}
21-
with open(os.path.join(base_path, 'pyats_genie_command_parse', 'version.py'), 'r', encoding='utf-8') as f:
22-
exec(f.read(), version_py)
23-
2424
# Reads pyproject.toml and converts to python objects
2525
with open(os.path.join(base_path, 'pyproject.toml'), 'r', encoding='utf-8') as file:
26-
toml = file.read()
27-
pyproject_toml = tomli.loads(toml)
26+
toml_data = file.read()
27+
pyproject_toml = toml.loads(toml_data)
2828

2929
# -- Added for readthedocs.org -----------------------------------------------
3030

@@ -33,9 +33,9 @@
3333
# -- Project information -----------------------------------------------------
3434

3535
# The full version, including alpha/beta/rc tags
36-
release = version_py['__version__']
36+
release = f"{pyproject_toml['project']['version']}"
3737
project = f"{pyproject_toml['project']['name']} v{release}"
38-
copyright = version_py['__copyright__']
38+
copyright = "Copyright (c) 2020 - 2025, Benjamin P. Trachtenberg, Brett Gianpetro"
3939

4040
# Reads authors from pyproject.toml and adds name to list
4141
authors = []

pyats_genie_command_parse/version.py

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

pyproject.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ build-backend = "setuptools.build_meta"
77

88
[project]
99
name = "pyats-genie-command-parse"
10-
dynamic = ["version", "readme"]
10+
dynamic = ["readme"]
11+
version = "1.4.5"
1112
requires-python = ">=3.9"
1213
description = "Run genie parsers directly."
1314
keywords = [
@@ -48,8 +49,8 @@ classifiers = [
4849
]
4950

5051
dependencies = [
51-
"genie==25.7",
52-
"pyats==25.7",
52+
"genie==25.9",
53+
"pyats==25.9",
5354
]
5455

5556
[dependency-groups]
@@ -59,7 +60,7 @@ dev = [
5960
"pylint>=3.3.6",
6061
"pytest-cov>=4.1.0",
6162
"sphinx>=7.4.7",
62-
"tomli>=2.2.1",
63+
"tomli>=2.2.1; python_version < '3.11'",
6364
]
6465

6566
[project.urls]
@@ -80,7 +81,6 @@ include = [
8081
zip-safe = false
8182

8283
[tool.setuptools.dynamic]
83-
version = {attr = "pyats_genie_command_parse.version.__version__"}
8484
readme = {file = "README.md", content-type = "text/markdown"}
8585

8686
[tool.pytest.ini_options]

0 commit comments

Comments
 (0)