Commit Graph

19 Commits

Author SHA1 Message Date
EstherLerouzic
6051ad54bc Enabling the reading of N and M value from the json request
For this commit only the first element from the {N, M} list is read
and assigned.

This is better than not reading this value at all.

the commit also updates test_files and test data files with correct
values for the effective_freq_slot attribute

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I1e60fe833ca1092b40de27c8cbfb13083810414e
2020-11-06 14:44:13 +01:00
Jan Kundrát
78010aaaef Enable saving the network as converted from XLS
This is a feature that was requested by Esther due to their workflows at
Orange. There's also a standalone converter avaialable as
`gnpy-convert-xls`.

Change-Id: I1a483d168db0744fbf115e05e679e13b57d79398
2020-06-10 14:27:05 +02:00
Jan Kundrát
3857ab1dbb Save either to JSON or to CSV, not to both
I don't see a reason for that; the old debug texts were actively
misleading.

Change-Id: I2089bf8f87ec994770cc272e054650e18da4ef2a
2020-06-10 14:15:50 +02:00
Jan Kundrát
dbb09e4108 CLI: Allow Raman in path_requests_run
There's no need to limit this to just the transmission_main_example, so
let's unify this handling.

Change-Id: I585f407c7f80da12fd33baf7261c35c736d78df2
2020-06-10 14:11:44 +02:00
Jan Kundrát
94a8f3568a CLI: Unify handling of the network topology
Change-Id: I51c98ae13218715862fe9f585b2cc4b079498bee
2020-06-10 14:11:42 +02:00
Jan Kundrát
ae7c9321d0 Remove unused variables
They are ever read from, not even in any commented-out debugging code,
so let's nuke these.

Change-Id: I3188511adb28242dc40418cb3bb90b38bc4fdb14
2020-06-10 14:09:52 +02:00
Jan Kundrát
648cc3a8e5 CLI: show default values in --help
I think this is a little bit cleaner that duplicating the info about the
default for some of these options.

Change-Id: If218a26ede3e71628f4839b4e505c4f4aa217699
2020-06-10 14:09:52 +02:00
Jan Kundrát
f9e0d18a9d Unify handling of the --equipment option in examples
Let's use the --option format instead of positional arguments; that way
it's more obvious that it can be omitted. Note that this constitutes a
change of behavior for the path_requests_run example.

Change-Id: Ic6653cf419e1a8573c3585190a88fc51500f549d
2020-06-10 14:09:52 +02:00
Jan Kundrát
2d57fd9f85 CLI: specify shared code options just once
Change-Id: I79d2c9dfd630ee72ff1b87d4b24025a20d1e2ce2
2020-06-10 14:09:49 +02:00
Jan Kundrát
f053f32301 Tweak the --help output
Try to indicate whether an option takes just JSON, or a JSON or an XLS
file. Also add some extra descriptions.

Change-Id: Ifb81d46f6ac659da79b08201a414822e9c318a1e
2020-06-10 14:07:40 +02:00
Jan Kundrát
914d0dbecd transmission_main_example: Do not write out a CSV file
We talked about this earlier today on a call, and agreed with Esther and
Alessio that this is probably a relict from the past. The file does not
appear to contain much useful information, anyway, so let's try to
remove it and wait if someone complains.

Change-Id: I215eeb37498b28b15ece2300f4bbdd184ac52f4a
2020-06-10 12:14:41 +02:00
Jan Kundrát
0efa0d310d Remove incomplete support for "fuzzy name matching"
This is something which got added in bc9eee32, but it never got
finalized to have a user-visible effect. To the best of my knowledge, it
only created a file which was never used.

I removed code which created that file in 0d542f22, so let's clean up
the rest.

I think this should also restore functionality of running convert.py in
a standalone mode. Looking at the ArgParser, the invocation never
considered the names_matching parameter.

Change-Id: Id0f4aa1db2d22233f74fb273176168a16ace4072
2020-06-08 18:30:38 +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
754be7ca08 Do not create *_auto_design.json by default
It's a bad habit to write files into the source code repository. It will
also become impossible if gnpy is installed into a systemwide, possible
read-only location.

The old behavior can be reactivated by using an extra option to tell
GNPy where to put the generated file.

Change-Id: I9ad43890ca5886f516885de5938a4778870a06c5
2020-06-08 18:28:59 +02:00
Jan Kundrát
1009b44d2a examples: add some additional descriptions help context
The main reason for doing this is becasue of the next commit which
re-adds testing of the generated wrappers.

Change-Id: I7137c6cf7a5b414fc708a15b125eaf88e996366c
2020-06-08 18:28:56 +02:00
Jan Kundrát
a2ecfd924c examples: prepare for overriding sys.args
...which will be done in the next commit. One has to be careful with
sys.argv here because it uses different indexing than when passing args
explicitly.

Change-Id: I53833a5513abae0abd57065a49c0f357890e0820
2020-06-03 19:29:03 +02:00
Jan Kundrát
95c3c9c488 examples: move path_requests_run to gnpy.tools
Change-Id: Id23dfa81bf9a9b347ea9c99f77d5735b62911d67
2020-06-03 19:22:53 +02:00
Jan Kundrát
11033a284f examples: move transmission_main_example into gnpy.tools
This converts our first free-standing example entry point into a
function. It will become very handy when we start distributing these
entry points via setuptools.

Change-Id: Icd2e4658337f93cd0b0301978e2dc640de0cc72b
2020-06-03 19:06:31 +02:00
Jan Kundrát
ee5e64408d examples: common code for data loading
This also moves SimParams handling to a single place. As a result,
path_requests_run has just become Raman-aware (to the minimal possible
extent, OK).

Change-Id: I4e31af5c67335963ddab567d304f48a899cd569e
2020-05-23 22:03:23 +02:00