unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [RFC] test: build python docs
@ 2017-12-24 13:14 David Bremner
  2017-12-24 13:44 ` David Bremner
  0 siblings, 1 reply; 2+ messages in thread
From: David Bremner @ 2017-12-24 13:14 UTC (permalink / raw)
  To: notmuch

The idea is to consider any warning from sphinx-build as a test
failure. This requires the -W option, which we probably don't want for
builds.
---

I'm not sure the best way to do this. An alternative approach would be
to build the python docs during the main build (much as we currently
build the ruby bindings). I suspect we'd want some way to disable the
"-W" option to sphinx-build in that case, so that python doc failures
don't break the entire build. On the other hand, for distros breaking
the test suite is pretty much equivalent to breaking the build. In the
proposed patch the test could be disabled by dropping sphinx-build
from the test env (which makes the man pages go away), or by patching
the single test out.


test/T390-python.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/test/T390-python.sh b/test/T390-python.sh
index 312d61e8..63232677 100755
--- a/test/T390-python.sh
+++ b/test/T390-python.sh
@@ -155,4 +155,7 @@ print(list(v) == [])
 EOF
 test_expect_equal "$(cat OUTPUT)" "True"
 
+test_begin_subtest "build python docs"
+test_declare_external_prereq sphinx-build
+test_expect_success "sphinx-build -n -W \"$NOTMUCH_SRCDIR\"/bindings/python/docs/source html"
 test_done
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [RFC] test: build python docs
  2017-12-24 13:14 [RFC] test: build python docs David Bremner
@ 2017-12-24 13:44 ` David Bremner
  0 siblings, 0 replies; 2+ messages in thread
From: David Bremner @ 2017-12-24 13:44 UTC (permalink / raw)
  To: notmuch

David Bremner <david@tethera.net> writes:

> The idea is to consider any warning from sphinx-build as a test
> failure. This requires the -W option, which we probably don't want for
> builds.
> ---
>
> I'm not sure the best way to do this. An alternative approach would be
> to build the python docs during the main build (much as we currently
> build the ruby bindings). I suspect we'd want some way to disable the
> "-W" option to sphinx-build in that case, so that python doc failures
> don't break the entire build. On the other hand, for distros breaking
> the test suite is pretty much equivalent to breaking the build. In the
> proposed patch the test could be disabled by dropping sphinx-build
> from the test env (which makes the man pages go away), or by patching
> the single test out.

Sure enough, no sooner do I send this and fix the warning about
get_config_list, I get others that I don't see an obvious fix for:

/home/bremner/software/upstream/notmuch/bindings/python/docs/source/status_and_errors.rst:17: WARNING: error while formatting arguments for notmuch.STATUS: 'Status' object has no attribute '__bases__'
/home/bremner/software/upstream/notmuch/bindings/python/docs/source/threads.rst:14: WARNING: don't know which module to import for autodocumenting u'__str__' (try placing a "module" or "currentmodule" directive in the document, or giving an explicit module name)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-12-24 13:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-24 13:14 [RFC] test: build python docs David Bremner
2017-12-24 13:44 ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).