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

Revert "revive support for the multiproject monkeypatch (#139)" #146

Closed
Closed
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
2 changes: 0 additions & 2 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ v0.3.0
- Support specialized template functions (:pr:`117`).
- Prevent sphinx from processing files that are incorporated via a ``.. include::``
directive by renaming them to ``.rst.include`` suffix (:pr:`136`).
- Add ``:project: {app.config.breathe_default_project}`` to every breathe directive
to make the monkeypatch (:issue:`27`) work (:pr:`139`).

v0.2.4
----------------------------------------------------------------------------------------
Expand Down
14 changes: 3 additions & 11 deletions exhale/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,23 +555,15 @@ def specificationsForKind(kind):
The correctly formatted specifier(s) for the given ``kind``. If no specifier(s)
are necessary or desired, the empty string is returned.
'''
# TODO: this is to support the monkeypatch
# https://github.com/svenevs/exhale/issues/27
ret = []

# use the custom directives function
if configs.customSpecificationsMapping:
ret = configs.customSpecificationsMapping[kind]
return configs.customSpecificationsMapping[kind]

# otherwise, just provide class and struct
if kind == "class" or kind == "struct":
ret = [":members:", ":protected-members:", ":undoc-members:"]
return [":members:", ":protected-members:", ":undoc-members:"]

# the monkeypatch re-configures breathe_default_project each time which was
# foolishly relied on elsewhere and undoing that blunder requires undoing
# all of the shenanigans that is configs.py...
ret.insert(0, ":project: " + configs._the_app.config.breathe_default_project)
return ret
return [] # use breathe defaults


class AnsiColors:
Expand Down
19 changes: 1 addition & 18 deletions testing/tests/cpp_nesting.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from exhale.utils import heading_mark

from testing.base import ExhaleTestCase
from testing.decorators import confoverrides, no_cleanup
from testing.decorators import confoverrides
from testing.hierarchies import \
class_hierarchy, compare_class_hierarchy, compare_file_hierarchy, file, \
file_hierarchy
Expand Down Expand Up @@ -229,20 +229,3 @@ def test_hierarchies_primary_no_mainpage(self):
""")
with open(self.app.exhale_root.page_hierarchy_file, "r") as phf:
assert expected_page_hierarchy in phf.read()

@no_cleanup
@confoverrides(exhale_args={
"rootFileTitle": "",
"exhaleDoxygenStdin": dedent("""\
INPUT = ../include
EXCLUDE_PATTERNS = */page_town_rock_alt.hpp
""")})
def test_html_output(self):
"""
Verify exhale builds a project.

This is not really a test. But it can be helpful to view a test project build,
in the ``testing/projects/cpp_nesting`` folder you can open
``docs_CPPNestingPages_test_html_output/_build/html/index.html`` to view.
"""
self.app.build()