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

0.15.0: pytest is failing in 47 units #197

Closed
kloczek opened this issue Oct 17, 2023 · 18 comments
Closed

0.15.0: pytest is failing in 47 units #197

kloczek opened this issue Oct 17, 2023 · 18 comments

Comments

@kloczek
Copy link
Contributor

kloczek commented Oct 17, 2023

I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.

  • python3 -sBm build -w --no-isolation
  • because I'm calling build with --no-isolation I'm using during all processes only locally installed modules
  • install .whl file in </install/prefix> using 'installer` module
  • run pytest with $PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>
  • build is performed in env which is cut off from access to the public network (pytest is executed with -m "not network")

Here is pytest summary output:

=============================== warnings summary ===============================
test/test_cautodoc.py:73
  /home/tkloczko/rpmbuild/BUILD/hawkmoth-0.15.0/test/test_cautodoc.py:73: PytestUnknownMarkWarning: Unknown pytest.mark.full - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.full

test/test_cli.py:93
  /home/tkloczko/rpmbuild/BUILD/hawkmoth-0.15.0/test/test_cli.py:93: PytestUnknownMarkWarning: Unknown pytest.mark.full - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.full

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7f2edde6feb0> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7f2edde89610> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7f2edde89be0> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7f2edde10f70> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7f2edde14fd0> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7f2edde1faf0> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7f2edde219a0> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7f2edde30070> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7f2edde38e80> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7f2edde1fd60> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7f2edde38970> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7f2edde294f0> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7f2edde38a30> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7f2edde2b130> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7f2edde3e940> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7f2edde35760> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7f2edddd6040> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7f2edddd6220> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7f2edde3efa0> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7f2edde14970> directive test
SKIPPED [2] test/test_cli.py:68: cli does not support generic transformations
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7f2edde23e80> directive test
XFAIL test/test_cautodoc.py::test_directive_text[c/meta-expected-failure] - reason:
XFAIL test/test_cautodoc.py::test_directive_text[cpp/meta-expected-failure] - reason:
XFAIL test/test_cautodoc.py::test_directive_html[c/meta-expected-failure] - reason:
XFAIL test/test_cautodoc.py::test_directive_html[cpp/meta-expected-failure] - reason:
XFAIL test/test_cli.py::test_cli[c/meta-expected-failure] - reason:
XFAIL test/test_cli.py::test_cli[cpp/meta-expected-failure] - reason:
XFAIL test/test_parser.py::test_parser[c/meta-expected-failure] - reason:
XFAIL test/test_parser.py::test_parser[cpp/meta-expected-failure] - reason:
FAILED test/test_cautodoc.py::test_directive_text[c/autostruct] - AssertionEr...
FAILED test/test_cautodoc.py::test_directive_text[c/enum] - AssertionError: a...
FAILED test/test_cautodoc.py::test_directive_text[c/struct] - AssertionError:...
FAILED test/test_cautodoc.py::test_directive_text[c/typedef-enum] - Assertion...
FAILED test/test_cautodoc.py::test_directive_text[c/typedef-struct] - Asserti...
FAILED test/test_cautodoc.py::test_directive_text[cpp/class] - AssertionError...
FAILED test/test_cautodoc.py::test_directive_text[cpp/enum-class] - Assertion...
FAILED test/test_cautodoc.py::test_directive_text[cpp/enum] - AssertionError:...
FAILED test/test_cautodoc.py::test_directive_text[cpp/struct] - AssertionErro...
FAILED test/test_cautodoc.py::test_directive_text[cpp/template] - AssertionEr...
FAILED test/test_cautodoc.py::test_directive_text[cpp/typedef-enum] - Asserti...
FAILED test/test_cautodoc.py::test_directive_text[cpp/typedef-struct] - Asser...
FAILED test/test_cautodoc.py::test_directive_html[c/autostruct] - assert '<!D...
FAILED test/test_cautodoc.py::test_directive_html[c/enum] - assert '<!DOCTYPE...
FAILED test/test_cautodoc.py::test_directive_html[c/struct] - assert '<!DOCTY...
FAILED test/test_cautodoc.py::test_directive_html[c/typedef-enum] - assert '<...
FAILED test/test_cautodoc.py::test_directive_html[c/typedef-struct] - assert ...
FAILED test/test_cautodoc.py::test_directive_html[cpp/class] - assert '<!DOCT...
FAILED test/test_cautodoc.py::test_directive_html[cpp/enum-class] - assert '<...
FAILED test/test_cautodoc.py::test_directive_html[cpp/enum] - assert '<!DOCTY...
FAILED test/test_cautodoc.py::test_directive_html[cpp/struct] - assert '<!DOC...
FAILED test/test_cautodoc.py::test_directive_html[cpp/template] - assert '<!D...
FAILED test/test_cautodoc.py::test_directive_html[cpp/typedef-enum] - assert ...
FAILED test/test_cautodoc.py::test_directive_html[cpp/typedef-struct] - asser...
FAILED test/test_cli.py::test_cli[c/enum] - AssertionError: assert '\n.. c:en...
FAILED test/test_cli.py::test_cli[c/struct] - AssertionError: assert '\n.. c:...
FAILED test/test_cli.py::test_cli[c/typedef-enum] - AssertionError: assert '\...
FAILED test/test_cli.py::test_cli[c/typedef-struct] - AssertionError: assert ...
FAILED test/test_cli.py::test_cli[cpp/class] - AssertionError: assert '\n.. c...
FAILED test/test_cli.py::test_cli[cpp/enum-class] - AssertionError: assert '\...
FAILED test/test_cli.py::test_cli[cpp/enum] - AssertionError: assert '\n.. cp...
FAILED test/test_cli.py::test_cli[cpp/struct] - AssertionError: assert '\n.. ...
FAILED test/test_cli.py::test_cli[cpp/template] - AssertionError: assert '\n....
FAILED test/test_cli.py::test_cli[cpp/typedef-enum] - AssertionError: assert ...
FAILED test/test_cli.py::test_cli[cpp/typedef-struct] - AssertionError: asser...
FAILED test/test_parser.py::test_parser[c/autostruct] - AssertionError: asser...
FAILED test/test_parser.py::test_parser[c/enum] - AssertionError: assert '\n....
FAILED test/test_parser.py::test_parser[c/struct] - AssertionError: assert '\...
FAILED test/test_parser.py::test_parser[c/typedef-enum] - AssertionError: ass...
FAILED test/test_parser.py::test_parser[c/typedef-struct] - AssertionError: a...
FAILED test/test_parser.py::test_parser[cpp/class] - AssertionError: assert '...
FAILED test/test_parser.py::test_parser[cpp/enum-class] - AssertionError: ass...
FAILED test/test_parser.py::test_parser[cpp/enum] - AssertionError: assert '\...
FAILED test/test_parser.py::test_parser[cpp/struct] - AssertionError: assert ...
FAILED test/test_parser.py::test_parser[cpp/template] - AssertionError: asser...
FAILED test/test_parser.py::test_parser[cpp/typedef-enum] - AssertionError: a...
FAILED test/test_parser.py::test_parser[cpp/typedef-struct] - AssertionError:...
====== 47 failed, 186 passed, 23 skipped, 8 xfailed, 2 warnings in 25.21s ======
and full pytest output

Here is list of installed modules in build env

Package                       Version
----------------------------- -------
alabaster                     0.7.13
Babel                         2.13.0
build                         1.0.0
charset-normalizer            3.3.0
clang                         17.0.3
cppclean                      0.13
distro                        1.8.0
docutils                      0.20.1
exceptiongroup                1.1.3
gpg                           1.21.0
idna                          3.4
imagesize                     1.4.1
importlib-metadata            6.8.0
iniconfig                     2.0.0
installer                     0.7.0
Jinja2                        3.1.2
MarkupSafe                    2.1.3
packaging                     23.2
pkg                           0.0.0
pluggy                        1.3.0
Pygments                      2.16.1
pyproject_hooks               1.0.0
pytest                        7.4.2
python-dateutil               2.8.2
pytz                          2023.3
requests                      2.31.0
setuptools                    68.2.2
six                           1.16.0
snowballstemmer               2.2.0
Sphinx                        7.1.2
sphinxcontrib-applehelp       1.0.4
sphinxcontrib-devhelp         1.0.2
sphinxcontrib-htmlhelp        2.0.3
sphinxcontrib-jsmath          1.0.1
sphinxcontrib-qthelp          1.0.3
sphinxcontrib-serializinghtml 1.1.9
strictyaml                    1.7.3
tomli                         2.0.1
urllib3                       1.26.17
wheel                         0.41.2
zipp                          3.17.0
@jnikula
Copy link
Owner

jnikula commented Oct 17, 2023

I'm packaging your module as an rpm package

Awesome!

If you're using clang 16 or later, there are known issues, and there are fixes to address them. There was also an issue on Fedora, fixed just a few days ago.

I usually run make test or pytest test to run the test suite. I should probably look into how running unit tests is supposed to work according to pep517. Maybe I'm just missing some configuration.

Anyway, I'm aiming to fix the clang 16 related issues and hopefully also the pytest issue and make a new release within a week or so.

@kloczek
Copy link
Contributor Author

kloczek commented Oct 17, 2023

f you're using clang 16 or later

clang 17.0.3

there are known issues, and there are fixes to address them. There was also an issue on Fedora, fixed just a few days ago.

I don't see anything on https://src.fedoraproject.org/rpms/clang/commits/rawhide

@jnikula
Copy link
Owner

jnikula commented Oct 18, 2023

Ah, I meant that clang changed some things that impact hawkmoth even if they're not bugs in clang.

See #190 and #194.

@BrunoMSantos
Copy link
Collaborator

I'm packaging your module as an rpm package

🥳

and full pytest output

Missing this one. Could help in case it's something new to v17, which I don't think anyone had reported trying before.

@kloczek
Copy link
Contributor Author

kloczek commented Oct 18, 2023

@jnikula Thx to let me know 👍

Missing this one

Gosh .. sorry.
Here it is python-hawkmoth.FAIL.txt

@BrunoMSantos
Copy link
Collaborator

Gosh .. sorry.
Here it is python-hawkmoth.FAIL.txt

No problem, I think those are all covered by the mentioned PRs. If you get the chance to test the current master with #190 applied, let us know though ;)

@kloczek
Copy link
Contributor Author

kloczek commented Oct 18, 2023

OK one sec ..

@kloczek
Copy link
Contributor Author

kloczek commented Oct 18, 2023

OK just made manual test without my build automation

+ rm -rf hawkmoth-0.15.0
+ /usr/lib/rpm/rpmuncompress -x /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-0.15.0.tar.gz
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd hawkmoth-0.15.0
+ rm -rf /home/tkloczko/rpmbuild/BUILD/hawkmoth-0.15.0/SPECPARTS
+ /usr/bin/mkdir -p /home/tkloczko/rpmbuild/BUILD/hawkmoth-0.15.0/SPECPARTS
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-github-bump-stable-version-to-v0.15.0.patch
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-build-rename-license_file-to-license_files-in-setup..patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-version-bump-development-version-to-0.16.0.dev0.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-github-generate-documentation-version-matrix-dynamic.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-doc-fix-Sphinx-intersphinx-references.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-doc-update-some-links-based-on-make-linkcheck.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-docstring-explicitly-add-blank-line-cushions-to-head.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-docstring-make-RootDocstring-a-subclass-of-_Compound.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-docstring-EnumClassDocstring-inherits-from-_Compound.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-docstring-move-child-handling-under-_CompoundDocstri.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-build-add-check-rst-target-to-lint-rst.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-github-run-rst-lint.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-parser-always-normalize-_Bool-to-bool.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-test-add-tests-for-stdbool-_Bool-bool-fixups.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-parser-workaround-cursor.get_tokens-issue-with-macro.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-build-update-doc-Makefile.local-from-sphinx-quicksta.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-doc-drop-project-root-from-sys.path.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-doc-clean-up-conf.py.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-test-clean-up-conf.py.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-docker-move-Dockerfile.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-docker-update-Dockerfile.debian-bullseye.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-docker-better-parametrize-the-image-building-and-tes.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-docker-add-Dockerfile.debian-bookworm-and-Dockerfile.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-docker-add-Dockerfile.fedora-37-and-docker-Dockerfil.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-test-query-system-include-args-from-clang.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-parser-fix-parsing-of-anonymous-entities-with-clang-16+.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-fix_module_path_in_conf.py.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/python-hawkmoth-man3_level.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ RPM_EC=0

[..]

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-hawkmoth-0.15.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-hawkmoth-0.15.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network'
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.2, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/hawkmoth-0.15.0
collected 264 items

test/test_cautodoc.py .............x.......................x.........................................x.......................x............................                            [ 50%]
test/test_cli.py ssssss.......x........ssssss.........x...........s.sssssss.s.s..s.                                                                                                   [ 75%]
test/test_parser.py .............x.......................x............................                                                                                                [100%]

===================================================================================== warnings summary ======================================================================================
test/test_cautodoc.py:73
  /home/tkloczko/rpmbuild/BUILD/hawkmoth-0.15.0/test/test_cautodoc.py:73: PytestUnknownMarkWarning: Unknown pytest.mark.full - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.full

test/test_cli.py:93
  /home/tkloczko/rpmbuild/BUILD/hawkmoth-0.15.0/test/test_cli.py:93: PytestUnknownMarkWarning: Unknown pytest.mark.full - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.full

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================================================================== short test summary info ==================================================================================
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc53539610> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc5353f3d0> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc535f4310> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc5354b670> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc535426a0> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc5354b520> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc534b8340> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc5353fc70> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc535332b0> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc53520400> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc53527880> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc534b8520> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc53539c70> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc53533850> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc53533ee0> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc534d3d30> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc534d3490> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc53539580> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc53539700> directive test
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc534d3130> directive test
SKIPPED [2] test/test_cli.py:68: cli does not support generic transformations
SKIPPED [1] test/test_cli.py:59: <test.testenv.Directive object at 0x7fdc53539f70> directive test
XFAIL test/test_cautodoc.py::test_directive_text[c/meta-expected-failure] - reason:
XFAIL test/test_cautodoc.py::test_directive_text[cpp/meta-expected-failure] - reason:
XFAIL test/test_cautodoc.py::test_directive_html[c/meta-expected-failure] - reason:
XFAIL test/test_cautodoc.py::test_directive_html[cpp/meta-expected-failure] - reason:
XFAIL test/test_cli.py::test_cli[c/meta-expected-failure] - reason:
XFAIL test/test_cli.py::test_cli[cpp/meta-expected-failure] - reason:
XFAIL test/test_parser.py::test_parser[c/meta-expected-failure] - reason:
XFAIL test/test_parser.py::test_parser[cpp/meta-expected-failure] - reason:
================================================================== 233 passed, 23 skipped, 8 xfailed, 2 warnings in 39.80s ==================================================================

So it works now 👍 😄 (+/- those pytest warnings 😋)

Wold you accept PR with below patch?

--- a/doc/conf.py
+++ b/doc/conf.py
@@ -5,6 +5,7 @@

 import os
 import sys
+sys.path.insert(0, os.path.abspath('../src'))

 # -- Project information -----------------------------------------------------
 # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

It allows build documention out of only source tree without have hawkmoth installed.

+ /usr/bin/sphinx-build -n -T -b man doc build/sphinx/man
Running Sphinx v7.1.2
making output directory... done
loading intersphinx inventory from https://docs.python.org/3/objects.inv...
loading intersphinx inventory from https://www.sphinx-doc.org/en/master/objects.inv...
building [mo]: targets for 0 po files that are out of date
writing output...
building [man]: all manpages
updating environment: [new config] 9 added, 0 changed, 0 removed
reading sources... [100%] troubleshooting
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
writing... python-hawkmoth.3 { installation extension directives syntax examples extending built-in-extensions troubleshooting } done
build succeeded.

The manual pages are in build/sphinx/man.

🤔

@BrunoMSantos
Copy link
Collaborator

So it works now 👍 😄 (+/- those pytest warnings 😋)

Thanks! I haven't seen those warnings before, may be something new in pytest. I'll have a look later.

Wold you accept PR with below patch?

See #153. I personally would like that, but it's being kept out deliberately.

@kloczek
Copy link
Contributor Author

kloczek commented Oct 18, 2023

See #153. I personally would like that, but it's being kept out deliberately.

That above patch is not about testing but about rendering documentation (only) 😋

@BrunoMSantos
Copy link
Collaborator

See #153. I personally would like that, but it's being kept out deliberately.

That above patch is not about testing but about rendering documentation (only) 😋

True, true... Let's see what @jnikula says then. Honestly I got used to setting the path locally and forgot all about it 🤷‍♂️

@jnikula
Copy link
Owner

jnikula commented Oct 21, 2023

All fixes merged, closing.

#199 should additionally fix the pytest warnings PytestUnknownMarkWarning: Unknown pytest.mark.full with a "plain" pytest run.

Again, thanks for the report!

@jnikula jnikula closed this as completed Oct 21, 2023
@jnikula
Copy link
Owner

jnikula commented Oct 21, 2023

Wold you accept PR with below patch?

--- a/doc/conf.py
+++ b/doc/conf.py
@@ -5,6 +5,7 @@

 import os
 import sys
+sys.path.insert(0, os.path.abspath('../src'))

 # -- Project information -----------------------------------------------------
 # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

It allows build documention out of only source tree without have hawkmoth installed.

The reason we don't have this in docs or tests is to ensure they all work with the installed package. Building the docs is also part of testing in the sense that they dogfood the package in a normal Sphinx setting instead of in a pytest suite.

Some time ago I managed to do a release where all tests passed, but you couldn't actually use the package. Quite embarrassing. That's when I added the src/ subdir (which seems to be the recommended approach) and started using editable installs for testing. I'd rather not repeat that experience! :)

With that in mind, can you think of other alternatives to handle this?

+ /usr/bin/sphinx-build -n -T -b man doc build/sphinx/man
Running Sphinx v7.1.2
making output directory... done
loading intersphinx inventory from https://docs.python.org/3/objects.inv...
loading intersphinx inventory from https://www.sphinx-doc.org/en/master/objects.inv...
building [mo]: targets for 0 po files that are out of date
writing output...
building [man]: all manpages
updating environment: [new config] 9 added, 0 changed, 0 removed
reading sources... [100%] troubleshooting
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
writing... python-hawkmoth.3 { installation extension directives syntax examples extending built-in-extensions troubleshooting } done
build succeeded.

The manual pages are in build/sphinx/man.

Never tried this, actually. The man page turns out pretty nice considering zero effort was put into it!

@kloczek
Copy link
Contributor Author

kloczek commented Oct 21, 2023

The reason we don't have this in docs or tests is to ensure they all work with the installed package

  • Packaging usually is done from non-root account
  • Installed version may be different that this one in source tree

@jnikula
Copy link
Owner

jnikula commented Oct 21, 2023

With installed I meant an editable install in a virtual environment, for development. But I don't claim to be anywhere close to a Python packaging expert. I'll need to revisit this part.

In the mean time, 0.16.0 is out, hopefully with the other issues fixed.

@kloczek
Copy link
Contributor Author

kloczek commented Oct 21, 2023

Nothing in the conf.py requires editable module.
That requirement is purely artificial which proves that one line patch.

In the mean time, 0.16.0 is out, hopefully with the other issues fixed.

BTW releases .. is it possible to start making github releases?🤔
On create github release entry is created email notification to those whom have set in your repo the web UI Watch->Releases.
gh release can contain additional comments (li changelog) or additional assets like release tar balls (by default it contains only assets from git tag) however all those part are not obligatory.
In simplest variant gh release can be empty because subiekt of the sent email contains git tag name.

I'm asking because my automation process uses those email notifications by trying to make preliminary automated upgrades of building packages, which allows saving some time on maintaining packaging procedures.
Probably other people may be interested to be instantly informed about release new version as well.

Documentation and examples of generate gh releases:
https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository
https://cli.github.com/manual/gh_release_upload/
jbms/sphinx-immaterial#282
https://github.com/marketplace/actions/github-release
https://pgjones.dev/blog/trusted-plublishing-2023/
jbms/sphinx-immaterial#281 (comment)
tox target to publish on pypi and make gh release https://github.com/jaraco/skeleton/blob/928e9a86d61d3a660948bcba7689f90216cc8243/tox.ini#L42-L58

@kloczek
Copy link
Contributor Author

kloczek commented Oct 21, 2023

And yet another note about that one line modification.
That fix bases on what is i sphinx example copy.py https://www.sphinx-doc.org/en/master/usage/configuration.html#example-of-configuration-file

@jnikula
Copy link
Owner

jnikula commented Oct 22, 2023

Copied the relevant comments about building documentation without installed package to a new issue #203

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

No branches or pull requests

3 participants