CLI: pushing in-progress braille work

9 views
Skip to first unread message

Rob Beezer

unread,
Mar 13, 2023, 5:57:41 PM3/13/23
to prete...@googlegroups.com
Largely for the CLI. I am redoing the conversion to braille from the ground up.
Long story, but it is going to be much, much better when I get done.

There is a new (temporary) function in pretext.py cleverly named
braille_new(). It should not be exposed by the CLI, it is incomplete right
now, and it will replace the current function once done. Right now it mostly
calls a function in the new module braille_format.py which is a peer of
pretext.py. The necessary import is in braille_new().

Q: I'd like to push these changes, mostly for safe-keeping, but also for anybody
who wants to experiment. Is it any trouble on your end to (a) incorporate
braille_format.py into packaging, etc, and (b) if it is trouble, is it safe to
assume the CLI won't call braille_new() and so the import will never happen
(so not raising errors).

Anybody who is interested in getting involved with the (new!) braille conversion
early, please reply here. It might be next week before I can get back to this,
but I can provide guidance on how to use the in-progress pieces.

Rob

Steven Clontz

unread,
Mar 13, 2023, 6:05:34 PM3/13/23
to PreTeXt development
Been a hot minute since I wrote this, but https://github.com/PreTeXtBook/pretext-cli/blob/main/scripts/fetch_core.py seems to indicate that we're copying whatever you put in the `pretext` directory of https://github.com/PreTeXtBook/pretext into the user's `.ptx` directory. So users of `pretext devscript` should be just fine to play with the new braille work if you add stuff there (since it just aliases the usual `python pretext/pretext` call, more or less).

We then copy `pretext.py` into the files we package as part of the CLI, but not `braille_format.py`. I believe you are correct: as long as you don't import `braille_format` except within the `braille_new()` function, we won't hit any errors as we don't touch that function. But fortunately, you'll know within 24 hours whether my understanding is correct, as Oscar's nightly deploy at https://github.com/PreTeXtBook/pretext-cli/actions will dutifully try that evening to pull and run our test suite on whatever you push to PreTeXtBook/pretext.

Rob Beezer

unread,
Mar 13, 2023, 6:11:43 PM3/13/23
to prete...@googlegroups.com
Even better than expected. ;-) (The devscript part.)

I'll see if I can get the necessary clean-up in order and push in time for
nightly testing. Thanks for the reply.

Rob
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-dev...@googlegroups.com
> <mailto:pretext-dev...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pretext-dev/9454696e-a5d8-4f48-a121-67365dbb52aen%40googlegroups.com <https://groups.google.com/d/msgid/pretext-dev/9454696e-a5d8-4f48-a121-67365dbb52aen%40googlegroups.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages