VACUMM / sphinx-fortran

Fortran domain and autodoc extensions to Sphinx
Other
45 stars 29 forks source link

Add a module option not to document private objects. #24

Closed dcaliste closed 1 year ago

dcaliste commented 4 years ago

This introduces the exclude_private option to automodule, so variables and routines declared as private are not exported in the documentation. To stay backward compatible, this option is off by default and private elements are included in the documentation.

I've modified the generic module of the tests to show this. The automodule is not documenting the private variable and routines, but the autosrcfile is.

The MR takes care of not showing private elements in the callFrom and callTo if privates are excluded (also tested in the generic module).

There is a mistake in numpy that makes 'private' to appear on public routines also when private is default in the module. I've patched numpy for this, see https://github.com/numpy/numpy/pull/15781. The MR has been accepted.

stefraynaud commented 4 years ago

Thanks for the PR Damien. Some of the travis tests fail: https://travis-ci.org/github/VACUMM/sphinx-fortran This is probably due to the fact that they are based on older versions of dependencies, more especially sphinx (3.0 vs 1.8). Can you confirm? If true, maybe it's time to remove support for old versions (python < 3.5).

Do you want an access to this repo?

dcaliste commented 4 years ago

Thanks @stefraynaud for your feedback. I didn't know about Travis runs. I'm discovering this CI tool, I'm more accustomed to the one of Gitlab. Anyway, from what I can understand, it seems that it's Python >= 3.5 that is failing... I'll try to understand the failures first and report here after. I'm testing at home on a Debian testing so with python > 3.4.

dcaliste commented 4 years ago

Ah, ok, I see, it's the sphinx version that differs also between the builders. Debian is still on 1.8.5, that's why older builders are fine. What is puzzling me is why master passes fine while this MR is not for issues on attributes added in sphinx 3.0 for variables I didn't touch like nens...

dcaliste commented 4 years ago

@stefraynaud ah, ok, not my fault it seems ;) It's the sphynx version that is installed by builders running python >= 3.5. Up to last master run (travis 54), it was 2.4.4, while now these builders are running sphinx 3.0.0, which adds new attributes like classes="f" making the test fails. I guess master would not passing Travis anymore neither... What do you think ?