PreTeXtBook / pretext

PreTeXt: an authoring and publishing system for scholarly documents
https://pretextbook.org
Other
254 stars 202 forks source link

`pretext/pretext` documentation out of date? Example needed #2141

Closed siefkenj closed 1 month ago

siefkenj commented 1 month ago

It seems like the documentation for using pretext/pretext is out of date. Following https://pretextbook.org/doc/guide/html/pretext-executing.html and running python pretext/pretext -h gives

/usr/lib/python-exec/python3.10/python: can't find '__main__' module in '...'

I assume the documentation is out of date from when pretext got converted to a module for import?

Also, the example module-test.py appears to be broken. The first message it prints is AttributeError: module 'pretext' has no attribute 'set_verbosity'

It would be great to have an example in a README about how to use this script and a CI job that would guarantee the example never breaks.

rbeezer commented 1 month ago

Could you dig a bit deeper on the first part? I'm off-duty for several more days and do not have my toolbox.

I do "./pretext -h" and similar all the time. The construction of a module two years ago should not have changed the startup of the minimalist interface.

On March 13, 2024 9:49:20 AM PDT, Jason Siefken @.***> wrote:

It seems like the documentation for using pretext/pretext is out of date. Following https://pretextbook.org/doc/guide/html/pretext-executing.html and running python pretext/pretext -h gives

/usr/lib/python-exec/python3.10/python: can't find '__main__' module in '...'

I assume the documentation is out of date from when pretext got converted to a module for import?

Also, the example module-test.py appears to be broken. The first message it prints is AttributeError: module 'pretext' has no attribute 'set_verbosity'

It would be great to have an example in a README about how to use this script and a CI job that would guarantee the example never breaks.

siefkenj commented 1 month ago

What file are you executing? I see the string '__main__' does not occur in pretext/pretext.py, so I'm wondering what you're actually executing.

rbeezer commented 1 month ago

I'm talking about "pretext/pretext", which is an interface to the module..

I don't think that string needs to be present for Python to be concerned about it.

On March 13, 2024 1:28:05 PM PDT, Jason Siefken @.***> wrote:

What file are you executing? I see the string '__main__' does not occur in pretext/pretext.py, so I'm wondering what you're actually executing.

siefkenj commented 1 month ago

Ah. I don't know how I missed it. I was executing pretext.py and not pretext.