Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more test case handling of PATH, et al variables inside pelicanconf.py #3369

Open
2 tasks done
egberts opened this issue Jul 14, 2024 · 0 comments
Open
2 tasks done
Labels

Comments

@egberts
Copy link
Contributor

egberts commented Jul 14, 2024

  • I have read the Filing Issues and subsequent “How to Get Help” sections of the documentation.
  • I have searched the issues (including closed ones) and believe that this is not a duplicate.

Issue

This issue is broken off of issue #3357 due to entirely different scoping effort of the following functions within settings.py/test_settings.py:

This issue deals with PATH, et al., variable name in a Pelican configuration settings (pelicanconf.py) file.

Relative Outside Subdirectory does not exist

Where the PATH is defined to 'content' and that (relative-type) 'content' subdirectory does NOT exist.

$ python -m pelican -D -s /tmp/pelicanconf.py

    CRITICAL Exception: `PATH` object in /tmp/pelicanconf.py is undefined. You need __init__.py:696
        to specify a path containing the content (see pelican --help for more                 
        information)     

An ERROR should have said: content subdirectory (as defined in 'PATH' variable) does not exist.

Undefined PATH

Where the PATH variable is undefined in pelicanconf.py

$ python -m pelican -s /tmp/pelicanconf.py -D content

       CRITICAL Exception: `PATH` object in /tmp/pelicanconf.py is undefined. You need __init__.py:696
                to specify a path containing the content (see pelican --help for more                 
                information)  

A WARNING should have said: 'PATH' variable is undefined; using 'content' as a default.

Platform

Click to expand

Platform

  • OS version and name: Linux 6.1.0-21-amd64 SMP PREEMPT_DYNAMIC Debian 6.1.90-1 (2024-05-03) x86_64 GNU/Linux
  • Python version: 3.11.2
  • Pelican version: HEAD (513abbf)
  • Link to theme: m.css
  • Links to plugins: pelican-plugins
  • Link to your site: n/a
  • Link to your source: n/a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant