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

Changed paths to work with build tools #82

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import nox
from nox import session

PYTHON_VERSIONS = ["3.8", "3.9", "3.10"]
SPHINX_VERSIONS = ["5.0", "6.2.1", "7.1.2", "7.2.5"]
PYTHON_VERSIONS = ["3.10", "3.11", "3.12"]
SPHINX_VERSIONS = ["7.1.2", "7.2.5", "7.4.1"]
TEST_DEPENDENCIES = [
"pytest",
"pytest-xdist",
Expand All @@ -23,6 +23,7 @@ def run_tests(session, sphinx):
session.install(".")
session.install(*TEST_DEPENDENCIES)
session.run("pip", "install", f"sphinx=={sphinx}", silent=True)
session.run("pip", "install", "sphinx-needs==3.0", silent=True)
session.run("pip", "install", "-r", "doc-requirements.txt", silent=True)
session.run("make", "test", external=True)

Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import os

from setuptools import find_packages, setup
from setuptools import find_namespace_packages, setup

requires = ["sphinx>=4.0", "lxml", "sphinx-needs>=1.0.1"]
requires = ["sphinx>=7.4.1", "lxml", "sphinx-needs>=1.0.1", "setuptools"]

with open(os.path.join(os.path.dirname(__file__), "README.rst")) as file:
setup(
Expand Down Expand Up @@ -36,7 +36,7 @@
"Topic :: Documentation",
],
platforms="any",
packages=find_packages(),
packages=find_namespace_packages(include=['sphinxcontrib.*']),
include_package_data=True,
install_requires=requires,
namespace_packages=["sphinxcontrib"],
Expand Down
1 change: 0 additions & 1 deletion sphinxcontrib/__init__.py

This file was deleted.

2 changes: 1 addition & 1 deletion sphinxcontrib/test_reports/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# from sphinxcontrib.test_reports.needs.dyn_functions import Results4Needs
from sphinxcontrib.test_reports.test_reports import setup
from .test_reports import setup
4 changes: 2 additions & 2 deletions sphinxcontrib/test_reports/directives/test_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
from sphinx_needs.api import add_need
from sphinx_needs.utils import add_doc

from sphinxcontrib.test_reports.directives.test_common import TestCommonDirective
from sphinxcontrib.test_reports.exceptions import TestReportInvalidOption
from .test_common import TestCommonDirective
from ..exceptions import TestReportInvalidOption


class TestCase(nodes.General, nodes.Element):
Expand Down
6 changes: 3 additions & 3 deletions sphinxcontrib/test_reports/directives/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
from sphinx.util import logging
from sphinx_needs.api import make_hashed_id

from sphinxcontrib.test_reports.exceptions import (
from ..exceptions import (
SphinxError, TestReportFileNotSetException)
from sphinxcontrib.test_reports.jsonparser import JsonParser
from sphinxcontrib.test_reports.junitparser import JUnitParser
from ..jsonparser import JsonParser
from ..junitparser import JUnitParser

# fmt: on

Expand Down
8 changes: 4 additions & 4 deletions sphinxcontrib/test_reports/directives/test_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
from sphinx_needs.api import add_need
from sphinx_needs.utils import add_doc

import sphinxcontrib.test_reports.directives.test_suite
from sphinxcontrib.test_reports.directives.test_common import TestCommonDirective
from sphinxcontrib.test_reports.exceptions import TestReportIncompleteConfiguration
from .test_suite import TestSuiteDirective
from .test_common import TestCommonDirective
from ..exceptions import TestReportIncompleteConfiguration


class TestFile(nodes.General, nodes.Element):
Expand Down Expand Up @@ -124,7 +124,7 @@ def run(self):

arguments = [suite["name"]]
suite_directive = (
sphinxcontrib.test_reports.directives.test_suite.TestSuiteDirective(
TestSuiteDirective(
self.app.config.tr_suite[0],
arguments,
options,
Expand Down
4 changes: 2 additions & 2 deletions sphinxcontrib/test_reports/directives/test_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
from docutils import nodes
from docutils.parsers.rst import directives

from sphinxcontrib.test_reports.directives.test_common import \
from .test_common import \
TestCommonDirective
from sphinxcontrib.test_reports.exceptions import InvalidConfigurationError
from ..exceptions import InvalidConfigurationError

# fmt: on

Expand Down
2 changes: 1 addition & 1 deletion sphinxcontrib/test_reports/directives/test_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from docutils import nodes
from docutils.parsers.rst import Directive

from sphinxcontrib.test_reports.junitparser import JUnitParser
from ..junitparser import JUnitParser


class TestResults(nodes.General, nodes.Element):
Expand Down
10 changes: 5 additions & 5 deletions sphinxcontrib/test_reports/directives/test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
from sphinx_needs.api import add_need
from sphinx_needs.utils import add_doc

import sphinxcontrib.test_reports.directives.test_case
from sphinxcontrib.test_reports.directives.test_common import TestCommonDirective
from sphinxcontrib.test_reports.exceptions import TestReportInvalidOption
from .test_case import TestCaseDirective
from .test_common import TestCommonDirective
from ..exceptions import TestReportInvalidOption


class TestSuite(nodes.General, nodes.Element):
Expand Down Expand Up @@ -121,7 +121,7 @@ def run(self, nested=False, count=-1):

arguments = [suite["name"]]
suite_directive = (
sphinxcontrib.test_reports.directives.test_suite.TestSuiteDirective(
TestSuiteDirective(
self.app.config.tr_suite[0],
arguments,
options,
Expand Down Expand Up @@ -176,7 +176,7 @@ def run(self, nested=False, count=-1):

arguments = [case["name"]]
case_directive = (
sphinxcontrib.test_reports.directives.test_case.TestCaseDirective(
TestCaseDirective(
self.app.config.tr_case[0],
arguments,
options,
Expand Down
16 changes: 8 additions & 8 deletions sphinxcontrib/test_reports/test_reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@
from sphinx_needs.api import (add_dynamic_function, add_extra_option,
add_need_type)

from sphinxcontrib.test_reports.directives.test_case import (TestCase,
from .directives.test_case import (TestCase,
TestCaseDirective)
from sphinxcontrib.test_reports.directives.test_env import (EnvReport,
from .directives.test_env import (EnvReport,
EnvReportDirective)
from sphinxcontrib.test_reports.directives.test_file import (TestFile,
from .directives.test_file import (TestFile,
TestFileDirective)
from sphinxcontrib.test_reports.directives.test_report import (
from .directives.test_report import (
TestReport, TestReportDirective)
from sphinxcontrib.test_reports.directives.test_results import (
from .directives.test_results import (
TestResults, TestResultsDirective)
from sphinxcontrib.test_reports.directives.test_suite import (
from .directives.test_suite import (
TestSuite, TestSuiteDirective)
from sphinxcontrib.test_reports.environment import install_styles_static_files
from sphinxcontrib.test_reports.functions import tr_link
from .environment import install_styles_static_files
from .functions import tr_link

sphinx_version = sphinx.__version__
if Version(sphinx_version) >= Version("1.6"):
Expand Down