Skip to content

Commit

Permalink
Remove DokuWiki Code (#2607)
Browse files Browse the repository at this point in the history
* Remove doku code

* Remove doku from documentation

* Remove dokuwiki code from integration.yaml

* Remove fixtures that help generate dokuwiki report

* Remove report options from integration.yml

* Format using black
  • Loading branch information
atharva-2001 authored May 24, 2024
1 parent 3caabf0 commit 980ef0f
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 538 deletions.
19 changes: 0 additions & 19 deletions docs/contributing/development/integration.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,5 @@
atom_data_path: "~/projects/tardis/integration/"

# This section holds information about mechanism of saving the HTML
# report of the tests.
# "save_mode" is mandatory: It can be either "local" or "remote".
report:
save_mode: "local"

# This section contains credentials for dokuwiki instance.
# It is mandatory if "save_mode" is "remote", else can be removed.
dokuwiki:
url: "http://opensupernova.org/~karandesai96/integration/"
username: "private"
password: "private"

# If "save_mode" is "local", a sub directory will be made in this
# directory according to commit hash (shortened), and it will contain
# the complete report content.
reportpath: "~/projects/tardis/integration"


# Path to directory where reference HDF files will be generated and
# saved during the test run. Use "--generate-reference" flag in command
# line args for the purpose, for other cases this will denote path
Expand Down
21 changes: 0 additions & 21 deletions docs/contributing/development/running_tests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,24 +125,3 @@ needed is:
> python setup.py test --args="--integration=integration.yml -m integration
--less-packets" --remote-data
Setting up the DokuWiki report
==============================

A normal `DokuWiki <https://www.dokuwiki.org/dokuwiki>`_ installation is performed on the required server. Before the
connection works one is requires to set the option remote access in the
settings. If this is not done the ``dokuwiki`` python plugin will not connect
with the warning ``DokuWikiError: syntax error: line 1, column 0``. One also
has to enable this for users (``remoteuser`` option) otherwise the error:
``ProtocolError for xmlrpc.php?p=xxxxxx&u=tardistester: 403 Forbidden``
will appear.

Another important configuration option is to enable embedded html ``htmlok``;
otherwise, it won't show nice html page reports.

Finally, one has to call the `python setup.py test` with the ``--remote-data``
option to allow posting to an external DokuWiki server.



60 changes: 0 additions & 60 deletions tardis/tests/integration_tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@
# on `version.py`. Find another way to fix it!

# from tardis import __githash__ as tardis_githash
from tardis.tests.integration_tests.report import DokuReport
from tardis.tests.integration_tests.plot_helpers import (
LocalPlotSaver,
RemotePlotSaver,
)


def pytest_configure(config):
Expand All @@ -25,61 +20,6 @@ def pytest_configure(config):
open(integration_tests_configpath), Loader=yaml.CLoader
)

if not config.getoption("--generate-reference"):
# Used by DokuReport class to show build environment details in report.
config._environment = []
# prevent opening dokupath on slave nodes (xdist)
if not hasattr(config, "slaveinput"):
config.dokureport = DokuReport(
config.integration_tests_config["report"]
)
config.pluginmanager.register(config.dokureport)


def pytest_unconfigure(config):
# Unregister only if it was registered in pytest_configure
if config.getvalue("integration-tests") and not config.getoption(
"--generate-reference"
):
config.pluginmanager.unregister(config.dokureport)


def pytest_terminal_summary(terminalreporter):
if terminalreporter.config.getoption(
"--generate-reference"
) and terminalreporter.config.getvalue("integration-tests"):
# TODO: Add a check whether generation was successful or not.
terminalreporter.write_sep(
"-",
f"Generated reference data: {os.path.join(terminalreporter.config.integration_tests_config['reference'], tardis_githash[:7],)}",
)


@pytest.mark.hookwrapper
def pytest_runtest_makereport(item, call):
# execute all other hooks to obtain the report object
outcome = yield
report = outcome.get_result()
if report.when == "call":
if "plot_object" in item.fixturenames:
plot_obj = item.funcargs["plot_object"]
plot_obj.upload(report)
report.extra = plot_obj.get_extras()


@pytest.fixture(scope="function")
def plot_object(request):
integration_tests_config = request.config.integration_tests_config
report_save_mode = integration_tests_config["report"]["save_mode"]

if report_save_mode == "remote":
return RemotePlotSaver(request, request.config.dokureport.dokuwiki_url)
else:
return LocalPlotSaver(
request,
os.path.join(request.config.dokureport.report_dirpath, "assets"),
)


@pytest.fixture(
scope="class",
Expand Down
159 changes: 0 additions & 159 deletions tardis/tests/integration_tests/plot_helpers.py

This file was deleted.

Loading

0 comments on commit 980ef0f

Please sign in to comment.