Attention is currently required from: dexter, laforge.
Hello Jenkins Builder, dexter, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/42553?usp=email
to look at the new patch set (#5).
The following approvals got outdated and were removed:
Code-Review+1 by laforge, Verified+1 by Jenkins Builder
Change subject: filesystem: JsonEditor: use NamedTemporaryFile
......................................................................
filesystem: JsonEditor: use NamedTemporaryFile
A plain NamedTemporaryFile is sufficient here: we only need a single
file, not a directory to hold it. Using NamedTemporaryFile is simpler
(no subdirectory to manage) and gives us a .json suffix for free,
which editors use for syntax highlighting.
Change-Id: If3b0bd0fcc90732407dbd03b9cc883f7abeb948e
---
M pySim/filesystem.py
1 file changed, 14 insertions(+), 10 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/53/42553/5
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/42553?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: If3b0bd0fcc90732407dbd03b9cc883f7abeb948e
Gerrit-Change-Number: 42553
Gerrit-PatchSet: 5
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Attention is currently required from: dexter, fixeria, laforge.
Hello Jenkins Builder, dexter, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/42552?usp=email
to look at the new patch set (#5).
The following approvals got outdated and were removed:
Code-Review+1 by dexter, Code-Review+1 by laforge, Verified+1 by Jenkins Builder, Verified+1 by dexter
Change subject: filesystem: edit_{binary,record}_decoded: add encode/decode examples
......................................................................
filesystem: edit_{binary,record}_decoded: add encode/decode examples
When invoking `edit_binary_decoded` or `edit_record_decoded`, the
temp file opened in the editor now contains the EF's encode/decode
test vectors as //-comment lines below the JSON content, similar to
how 'git commit' appends comments to the commit message template.
The comment block is stripped before JSON parsing on save,
so it has no effect on the written data.
The feature is implemented via a new module-level JsonEditor context
manager class that encapsulates the full edit cycle:
* write JSON + examples to a TemporaryDirectory
* invoke the editor
* read back, strip //-comments, parse and return the result
Change-Id: I5a046a9c7ba7e08a98cf643d5a26bc669539b38f
Related: OS#6900
---
M pySim/filesystem.py
1 file changed, 72 insertions(+), 18 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/52/42552/5
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/42552?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I5a046a9c7ba7e08a98cf643d5a26bc669539b38f
Gerrit-Change-Number: 42552
Gerrit-PatchSet: 5
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Attention is currently required from: dexter, fixeria, laforge.
Hello Jenkins Builder, dexter, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/42554?usp=email
to look at the new patch set (#5).
The following approvals got outdated and were removed:
Code-Review+1 by dexter, Code-Review+1 by laforge, Verified+1 by Jenkins Builder, Verified+1 by dexter
Change subject: filesystem: JsonEditor: offer interactive retry on error
......................................................................
filesystem: JsonEditor: offer interactive retry on error
When json.loads() fails (e.g. the user made a syntax mistake), prompt
the user with "Re-open file for editing? [y]es/[n]o:" and loop back to
the editor if they answer 'y' or 'yes'. If the user declines, return
the original unmodified value so no write is attempted; the temp file
is still cleaned up by __exit__() in that case.
Change-Id: I9161b7becea0d8dfd3f5f740fbb253da2f061a1d
Related: OS#6899
---
M pySim/filesystem.py
1 file changed, 13 insertions(+), 5 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/54/42554/5
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/42554?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I9161b7becea0d8dfd3f5f740fbb253da2f061a1d
Gerrit-Change-Number: 42554
Gerrit-PatchSet: 5
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Attention is currently required from: fixeria.
dexter has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/pysim/+/42554?usp=email )
Change subject: filesystem: JsonEditor: offer interactive retry on error
......................................................................
Patch Set 4: Code-Review+1 Verified+1
(1 comment)
Patchset:
PS4:
I think this looks good. It works as expected and I can also see that the tempfile is removed.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/42554?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I9161b7becea0d8dfd3f5f740fbb253da2f061a1d
Gerrit-Change-Number: 42554
Gerrit-PatchSet: 4
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 07 Apr 2026 15:07:38 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Attention is currently required from: dexter.
fixeria has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/pysim/+/42553?usp=email )
Change subject: filesystem: JsonEditor: use NamedTemporaryFile
......................................................................
Patch Set 4:
(2 comments)
Patchset:
PS4:
> I have tested this. […]
This is intentional, see the next patch.
File pySim/filesystem.py:
https://gerrit.osmocom.org/c/pysim/+/42553/comment/9aa9b605_a492f280?usp=em… :
PS4, Line 606: self._file = tempfile.NamedTemporaryFile(prefix='pysim', suffix='.json',
> maybe continue to use 'pysim_' as prefix? […]
`NamedTemporaryFile` automatically adds `_` between prefix and the random file name.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/42553?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: If3b0bd0fcc90732407dbd03b9cc883f7abeb948e
Gerrit-Change-Number: 42553
Gerrit-PatchSet: 4
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 07 Apr 2026 14:51:38 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
Attention is currently required from: fixeria.
dexter has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/pysim/+/42553?usp=email )
Change subject: filesystem: JsonEditor: use NamedTemporaryFile
......................................................................
Patch Set 4:
(1 comment)
File pySim/filesystem.py:
https://gerrit.osmocom.org/c/pysim/+/42553/comment/cdf18f0e_4d9e7a51?usp=em… :
PS4, Line 604: The temp file is kept on JSONDecodeError so the user can correct and
Ah now. I see, keeping the file is intentional.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/42553?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: If3b0bd0fcc90732407dbd03b9cc883f7abeb948e
Gerrit-Change-Number: 42553
Gerrit-PatchSet: 4
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 07 Apr 2026 14:47:09 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Attention is currently required from: fixeria.
dexter has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/pysim/+/42553?usp=email )
Change subject: filesystem: JsonEditor: use NamedTemporaryFile
......................................................................
Patch Set 4:
(2 comments)
Patchset:
PS4:
I have tested this. I think it is very helpful that the editor now knows that it is a JSON file and therefore switches on syntax highlighting.
It all works will. However when I intentionally provoke a JSONDecodeError I can see that the file continues to exist. With the current master the temp directory vanishes. Probably there is something broken now. I think it would be good if you could check this back.
File pySim/filesystem.py:
https://gerrit.osmocom.org/c/pysim/+/42553/comment/e6d71e82_c25046a8?usp=em… :
PS4, Line 606: self._file = tempfile.NamedTemporaryFile(prefix='pysim', suffix='.json',
maybe continue to use 'pysim_' as prefix?
(maybe it would also make sense to encode the FID path into the filename? I don't know maybe some will find this hepful)
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/42553?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: If3b0bd0fcc90732407dbd03b9cc883f7abeb948e
Gerrit-Change-Number: 42553
Gerrit-PatchSet: 4
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 07 Apr 2026 14:43:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Attention is currently required from: dexter.
fixeria has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/pysim/+/42551?usp=email )
Change subject: docs: auto-generate Card Filesystem Reference
......................................................................
Patch Set 4:
(1 comment)
Patchset:
PS4:
> I would also recommend to look at the generated examples for EF.PL. […]
If there were such test vectors containing more than one language, I assume they would appear as arrays with multiple entries.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/42551?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I06ddeefc6c11e04d7c24e116f3f39c8a6635856f
Gerrit-Change-Number: 42551
Gerrit-PatchSet: 4
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 07 Apr 2026 14:27:22 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
Attention is currently required from: fixeria.
dexter has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/pysim/+/42552?usp=email )
Change subject: filesystem: edit_{binary,record}_decoded: add encode/decode examples
......................................................................
Patch Set 4: Code-Review+1 Verified+1
(3 comments)
Patchset:
PS4:
I have tested this with a few files and it works fine. To me this looks good.
File pySim/filesystem.py:
https://gerrit.osmocom.org/c/pysim/+/42552/comment/5912d3b5_2a52bb0b?usp=em… :
PS4, Line 575: return '\n'.join(line for line in text.splitlines() if not line.lstrip().startswith('//'))
I wonder if this could be improved. At the moment those comments seem only to work when the line is started with a comment. When I use a comment after a JSON statement, it is not ignored.
The current usecase does not require this. Also the logic becomes more difficult because we still do not want filter something like "hello //world" in an ascii string field. But maybe add a TODO so that we immediately see what is messing, should we ever need to extend this.
https://gerrit.osmocom.org/c/pysim/+/42552/comment/52a06578_02e67d55?usp=em… :
PS4, Line 604: with open(filename, 'w') as text_file:
Just an idea: What about adding a line like "//EF.UMPC (2F08) — UICC Maximum Power Consumption" at the beginning?
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/42552?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I5a046a9c7ba7e08a98cf643d5a26bc669539b38f
Gerrit-Change-Number: 42552
Gerrit-PatchSet: 4
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 07 Apr 2026 14:19:34 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes