Skip to content

Allow absolute OCCweb path - #369

Merged
taldcroft merged 3 commits into
masterfrom
more-flexible-occweb
Jan 7, 2026
Merged

taldcroft merged 3 commits into
masterfrom
more-flexible-occweb

Conversation

@taldcroft

@taldcroft taldcroft commented Nov 28, 2025 •

Copy link
Copy Markdown
Member

Description

This is a small change to make the occweb.get_occweb_* functions a bit more tolerant. The current expectation is that the user provides a relative path like FOT/mission_planning which is then joined to the default OCCweb URL root. The problem is that providing the path as /FOT/mission_planning seems innocuous (based on the documentation) but will cause the current code to fail.

Interface impacts

An absolute OCCweb path will now work more intuitively to give the expected result.

Testing

Unit tests

  • Mac
(ska3) ➜  kadi git:(more-flexible-occweb) git rev-parse --short HEAD
37b421c
(ska3) ➜  kadi git:(more-flexible-occweb) pytest
========================================= test session starts =========================================
platform darwin -- Python 3.12.8, pytest-8.3.4, pluggy-1.5.0
rootdir: /Users/aldcroft/git
configfile: pytest.ini
plugins: anyio-4.7.0, timeout-2.3.1
collected 216 items                                                                                   

kadi/commands/tests/test_commands.py .......................................................... [ 26%]
...........................                                                                     [ 39%]
kadi/commands/tests/test_filter_events.py ..                                                    [ 40%]
kadi/commands/tests/test_states.py ...............................................x............ [ 68%]
..............                                                                                  [ 74%]
kadi/commands/tests/test_validate.py ......................                                     [ 84%]
kadi/tests/test_events.py ..........                                                            [ 89%]
kadi/tests/test_occweb.py .......................                                               [100%]

============================= 215 passed, 1 xfailed in 113.88s (0:01:53) ==============================

Independent check of unit tests by Jean

  • Linux
(ska3-latest) jeanconn-kady> pytest
================================================================================= test session starts =================================================================================
platform linux -- Python 3.12.8, pytest-8.3.4, pluggy-1.5.0
rootdir: /proj/sot/ska/jeanproj/git
configfile: pytest.ini
plugins: anyio-4.7.0, timeout-2.3.1
collected 216 items                                                                                                                                                                   

kadi/commands/tests/test_commands.py .....................................................................................                                                      [ 39%]
kadi/commands/tests/test_filter_events.py ..                                                                                                                                    [ 40%]
kadi/commands/tests/test_states.py ...............................................x..........................                                                                   [ 74%]
kadi/commands/tests/test_validate.py ......................                                                                                                                     [ 84%]
kadi/tests/test_events.py ..........                                                                                                                                            [ 89%]
kadi/tests/test_occweb.py .......................                                                                                                                               [100%]

================================================================================== warnings summary ===================================================================================
kadi/kadi/commands/tests/test_commands.py: 95 warnings
kadi/kadi/commands/tests/test_filter_events.py: 22 warnings
kadi/kadi/commands/tests/test_states.py: 21 warnings
kadi/kadi/commands/tests/test_validate.py: 9 warnings
kadi/kadi/tests/test_occweb.py: 20 warnings
  /export/jeanconn/miniforge3/envs/ska3-latest/lib/python3.12/site-packages/bs4/builder/_lxml.py:124: DeprecationWarning: The 'strip_cdata' option of HTMLParser() has never done anything and will eventually be removed.
    parser = parser(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
============================================================== 215 passed, 1 xfailed, 167 warnings in 284.58s (0:04:44) ===============================================================
(ska3-latest) jeanconn-kady> git rev-parse HEAD
37b421c4887d3afc1572cbcf7fff32e07096edf9

Functional tests

No functional testing.

@javierggt javierggt mentioned this pull request Jan 5, 2026
51 of 55 tasks
@taldcroft
taldcroft merged commit 8f13168 into master Jan 7, 2026
5 checks passed
@taldcroft
taldcroft deleted the more-flexible-occweb branch January 7, 2026 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants