Commit Graph

21 Commits

Author SHA1 Message Date
EstherLerouzic
1a795639c7 feat: Add conversion utilities for YANG and legacy formats in GNPy
This commit introduces new functions for converting between YANG formatted files and
legacy formats. The conversion processes adhere to RFC7951 for encoding YANG data.

Key changes include:
- Conversion of float and empty type representations.
- Transformation of Span and SI lists xx_power_range into dictionaries.
- Addition of necessary namespaces.
- use of oopt-gnpy-libyang to enforce compliancy to yang models

These utilities enable full compatibility with GNPy.

Co-authored-by: Renato Ambrosone <renato.ambrosone@polito.it>

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Ia004113bca2b0631d1648564e5ccb60504fe80f8
2025-09-03 10:34:14 +02:00
EstherLerouzic
de42dd4a93 fix: restore rtd theme
and fix the table with the custom css

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Ib16c08451aa3faaa06ea85c2b9359fc4e7a015da
2025-03-21 09:57:34 +01:00
Jan Kundrát
2d68b94a46 build: specify dependencies directly in setup.cfg
In tox v4, "reuse of environments" was disabled [1]. This is then later
explained [2] to refer to exactly that thing which we were using for
inheriting the dependencies from the top-level testenv all the way to
the docs build. That's why the docs build in GitHub CI started failing.

IMHO, The Correct Way™ of specifying what dependencies are used for
which feature are the so-called "extra dependencies". Once they are in
place, it is be possible to install gnpy via, e.g., `pip install
oopt-gnpy[docs]`. However, this process is (as far as I can tell)
incompatible with `requirements.txt`; all my attempts at using the
standard dependency syntax in that file have failed for me.

So, in order to make this happen, let's move all the dependencies from a
more-or-less ad-hoc collection of files to this declarative approach
right in setup.cfg. That way, the deps are listed on a single place, in
a declarative manner, and as a result, the installation is now a trivial
pip oneliner.

As a result, one can also remove that duplication of dependencies in
docs requirements.

[1] https://tox.wiki/en/4.11.4/upgrading.html#reuse-of-environments
[2] https://tox.wiki/en/4.11.4/upgrading.html#packaging-configuration-and-inheritance

Change-Id: I34aa0c71e993b39e2b805a7de40e133b4d290318
Fixes: 47c89626 fix docs requirements
2024-03-13 21:28:01 +01:00
Jan Kundrát
86a39f4b5e packaging: mark Python 3.12 as supported
Change-Id: If3c8ea7d5a7651b71379a71e5dfde6b464aa5b4a
2023-11-15 20:06:55 +01:00
Jan Kundrát
2cdeeabfa6 Mark Python 3.11 as supported
Change-Id: I2dedd942c92959e1f891194f6234376b9ecad6e5
2023-03-02 14:28:12 +01:00
Jan Kundrát
0d0019f627 Update my e-mail address
I was informed that my TIP-specific e-mail address won't be coming back.

Change-Id: Ic2ee4986203490d90143a89dc49d7fca71a84c73
2023-02-02 17:13:23 +01:00
Jan Kundrát
5b104af296 packaging: cleanup: remove non-existing paths
The examples have lived below gnpy/example-data/ for a few releases
already, and I've checked that these files are included in release
tarballs and wheels.

Change-Id: I782fc56a171f4cbc08f6698ac5d339e4cacecbb4
2022-03-09 00:13:43 +01:00
Jan Kundrát
bdbfe76aed Mark Python 3.10 as supported
The CI is (so far) only post-merge via the GitHub CI. The Zuul CI is
pending on Fedora 35 images within nodepool; I've requested that via a
ticket at Vexxhost, our hosted CI provider.

Change-Id: I81c9867792f972db8fcb2bf902f5f8d1ed7ffeea
2022-01-20 18:51:02 +01:00
Jan Kundrát
bd025f3af4 setup metadata: fix description
Our landing page on PyPI was not displaying the longer version of the
README, just a one-sentence summary. It turns out that `pbr` can indeed
read the README file, but specifying the `description` overrides that
with no warning. Yay.

Change-Id: Ic03412928fe09f5edab4a7b9f4297a485a740cd0
2021-06-09 16:30:38 +02:00
Jan Kundrát
c3e546abe3 packaging: fix the long description
Fixes: e45a54c2 (README: rewrite in Markdown)
Change-Id: Ifefd78ba1008f0a37299dca07b53b5481ebeac27
2021-06-09 02:32:48 +02:00
Jan Kundrát
c91c5d622f Bump the minimal required Python to 3.8
We discussed this at one of the recent coder calls; the motivation
includes better mypy type hint support, especially in numpy, but also in
the language core, and of course the dataclasses.

Change-Id: I8ffee28c33f167cbcba978c85486e58a1b8c99be
2021-06-07 10:01:49 +00:00
Jan Kundrát
a47f069d97 PyPI: Python 3.9 is supported as well
We've been testing with Python 3.9 via Travis since this February, so
let's mark the project accordingly. Once a release which contains this
commit gets uploaded to PyPI, it will be propagated to the pip's web
interface.

Change-Id: I84635157565f1dbe9936231fa32ef3f6a0605e2f
2021-05-31 19:02:19 +02:00
Jan Kundrát
ba4cc1ceef trove: let's stop calling us "alpha" when we consider ourselves as stable
Change-Id: I2c497e4804e3c521e23a0501876a61dbbef27fe6
2020-06-26 18:58:55 +02:00
Jan Kundrát
8396cea652 trove: add more target categories for this SW
Change-Id: Ic565196a6272190845d58dab3b6c06d128bea192
2020-06-26 18:58:25 +02:00
Jan Kundrát
2b1029f3b6 trove: indicate all Python versions that we're currently testing for
Change-Id: Ifeb6690c46e036f902137bd1e63e49a94f4ac3f2
2020-06-26 18:57:31 +02:00
Jan Kundrát
9fd55a5289 XLS -> JSON conversion: add a nice program for this
Esther mentioned that it is useful for her to be able to convert from
XLS files to JSON files. Let's add a full blown script for this.

I've also taken the liberty to refactor the code a bit so that there's
no default value, and to modernize everything with pathlib a little bit.

Change-Id: I80e50fc1280003910242ce1ff9fc9ae66e6d275b
2020-06-10 12:14:41 +02:00
Jan Kundrát
8eb5980ca9 distribute example data along GNPy
I would like to create a package for distribution to PIP, and this seems
like the path of least resistance.

This is, apparently, the way for shippign arbitrary data with Python
[1]. I've at least tried to make it user-firendly via adding a simple
utility which just prints out whatever that data path is.

[1] https://python-packaging.readthedocs.io/en/latest/non-code-files.html

Change-Id: I220ecad84b1d57d01e3f98f15befc700bd97c0b8
2020-06-08 18:30:36 +02:00
Jan Kundrát
3b61c6ca4c Distribute our examples via setuptools
Cc issue #352.

Change-Id: I31e67130540fabeb2666dea38da6c435236e7f5b
2020-06-05 18:04:53 +02:00
Jan Kundrát
4d5d10935a Convert to pbr setup
It turns out that our current setup does not really support the `sdist`
Python packaging step. I'm trying to increase automation, both for
making releases for upload to pypi.org, and also for CI via Zuul. As it
turns out, Zuul comes with a set of predefined jobs which -- by default
-- use `tox`, and tox was having troubles dealing with our `setup.py`
because it also assumes that the `sdist` step works. It is also supposed
to:

- fix version number duplication in `setup.py`,
- fix version number duplication in Sphinx docs,
- prevent the need to write a `MANIFEST.in` manually.

TL;DR: insetad of having to deal with a ton of other creative
boilerplate, use tools for lazy people like me, and PBR ("Python Build
Reasonableness") appears to check the marks here.

Change-Id: I27c36c4f6b0e76857d16f7819ec237e9b811476a
2020-03-25 19:34:42 +01:00
James Powell
c8ce640a2a start fresh 2017-10-31 19:39:10 -04:00
Gilad Goldfarb
b0f2ad23a6 initial commit 2017-07-11 10:00:44 -07:00