Skip to content

Fix missing title entry style and script sub dicts and change empty dict default arg values to None - #615

Closed
jonasbardino wants to merge 30 commits into
nextfrom
fix/possibly-missing-title-entry-style-and-script-sub-dicts-and-empty-dict-default-arg-values
Closed

Fix missing title entry style and script sub dicts and change empty dict default arg values to None#615
jonasbardino wants to merge 30 commits into
nextfrom
fix/possibly-missing-title-entry-style-and-script-sub-dicts-and-empty-dict-default-arg-values

Conversation

@jonasbardino

@jonasbardino jonasbardino commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Fix a couple of minor issues in the vgridworkflows.py and reqoid.py backends identified during #612 development and enable the corresponding regression tests prepared there. Namely that they rely on a corner-case uninitialized dictionary entries when appending javascript and style content to the title entry in the output_objects.
Change the related X={} default arg values to X=None with conditional init to a proper dict oinside the function if None is encountered.

IMPORTANT: please note that this PR works on top of #612 so it's only really the last two small commits (9b4f58b and ad4387b). It's best to merge #612 first and rebase here for a minimal final merge.

…nd `main`

functions for consistent lazy `environ` and `initialize_main_variables` set up
without clunky `_main` wrappers.
This should make it easier to achieve a standardized runtime environment in all
interfaces, and allow us to considerably simplify the unit tests relying on
more direct access to tweaking the environment and calls.

Extended `environ` passing to `validate_input` for symmetry with
`validate_input_and_cert`. Made argument passing from the latter use explicit
keywords for clarity, too.

Applied various linting suggestions from `ruff`.
Expose `path_info` in `create_http_environ` and rename previously "private"
`_only_output_objects` to "public" `filter_output_objects`.
…s in the

`cat.py` and `datatransfer.py` functionality backends to significantly simplify
the clunky `main` + `_main`  wrapping introduced for their unit tests.
We can proceed with all the other backend functions after adjusting those unit
tests accordingly.
… shared

helpers from wsgisupp. Apply various updates to current unit testing support
helpers.
Tightened a few of the output_object checks to be more thorough about all
entries.
Applied make format and lint with some fixes for consistency.
…d inject

it in `initialize_main_variables` calls there to let individual backends
override options like `op_header` easily. Swapped the order of `environ` and
`init_main_res`, so that `init_kw` sticks with `init_main_res` both in `main`
and `lazy_init_backend`.
Moved the dynamic `op_menu` logic into `initialize_main_variables` so that
backends can just pass 'AUTO' if menu should only be shown if page was accessed
with login (i.e. `client_id` value is set).
…riables

in order to really let unit tests inherit the init_kwargs from main function
e.g. in the docs.py test suite.
Extended docs.py tests to cover more anonymous and authenticated use and in
particular exercise the previsouly mentioned inheritance logic.
NOTE: identified two bugs in the backend while testing. So tests are left
disabled but should be fixed separately with re-enabling the tests.
Most are disabled for now, however, because we hit a similar backend issue as
for vgridworkflows where the title entry lacks the expected style and script
sub-dicts when called from unit tests.
@jonasbardino jonasbardino self-assigned this Jul 22, 2026
@jonasbardino jonasbardino added the bug Something isn't working label Jul 22, 2026
@jonasbardino
jonasbardino marked this pull request as ready for review July 22, 2026 16:41
@jonasbardino
jonasbardino requested a review from a team July 22, 2026 16:41
jonasbardino added a commit that referenced this pull request Jul 22, 2026
…we have a

better fix for the title entry bits in #615.
@jonasbardino jonasbardino changed the title Fix/possibly missing title entry style and script sub dicts and empty dict default arg values Fix missing title entry style and script sub dicts and change empty dict default arg values to None Jul 22, 2026
jonasbardino added a commit that referenced this pull request Jul 23, 2026
…we have a

better fix for the title entry bits in #615.
@jonasbardino
jonasbardino force-pushed the fix/possibly-missing-title-entry-style-and-script-sub-dicts-and-empty-dict-default-arg-values branch from ad4387b to cb38f7a Compare July 23, 2026 14:59
…le and

integrate them in `make_title_entry` when no `style` or `script` arg is passed.
This should address the issues encountered for both vgridworkflows and reqoid
unit tests where they are not properly initialized due to custom env set up.
…init

version. We could really use a refactor to make them use a shared helper
instead.
@jonasbardino
jonasbardino force-pushed the fix/possibly-missing-title-entry-style-and-script-sub-dicts-and-empty-dict-default-arg-values branch from cb38f7a to 4497e46 Compare July 23, 2026 15:10
@jonasbardino
jonasbardino removed the request for review from a team July 24, 2026 08:25
@jonasbardino

Copy link
Copy Markdown
Contributor Author

Mostly obsolete with latest changes in #612 and remaining bits now migrated to #619 for clarity.

@jonasbardino
jonasbardino deleted the fix/possibly-missing-title-entry-style-and-script-sub-dicts-and-empty-dict-default-arg-values branch July 24, 2026 08:29
jonasbardino added a commit that referenced this pull request Jul 29, 2026
configuration across the functionality backend unit tests for consistency.

Temporarily disabled the tests that started hitting the same script init issue
we will fix in #615.
jonasbardino added a commit that referenced this pull request Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant