-
Notifications
You must be signed in to change notification settings - Fork 174
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
Ford documentation: improvements #784
Conversation
@ZedThree it seems that this latest version of Also, it seems that it is not possible to exclude files in |
Thanks for this. IMO it would be good to include documentation for the BLAS/LAPACK interfaces, if not the individual routines for each precision. Otherwise I think it will be very easy for users to become confused about what is available. I'm not sure whether your pull request keeps the interfaces or not? |
A description of BLAS/LAPACK is available in the specs. It was decided that only a link would be provided to the individual LAPACK interfaces. However, I will try to find a way to process only one of the precisions. It could be indeed useful. |
Yes, to me it would be good to also have the available procedures in BLAS/LAPACK listed somewhere
Totally agree, thanks. |
These changes look great to me. I think that the best thing to do would be to exclude the sources, and have FORD only parse the interface blocks. However, FORD will fail in this case (because it cannot find the module procedures in the interface), so, this selective exclusion does not look viable. |
This should still work, I'll investigate |
@jvdp1 The issue with that particular example in ##### Syntax
`call [[stdlib_sorting(module):ord_sort(interface)]]( array[, work, reverse ] )` and in Ford v7 the priority has changed such that backticks now (correctly IMO) are always formatted verbatim, so this needs to be something like: ##### Syntax
`call` [[stdlib_sorting(module):ord_sort(interface)]] `( array[, work, reverse ] )` A quick search shows about 270 examples of links within code blocks like this. A minimal change to ford to restore the old behaviour is: modified ford/_markdown.py
@@ -271,7 +271,7 @@ class FordLinkExtension(Extension):
def extendMarkdown(self, md: MetaMarkdown): # type: ignore[override]
project = self.getConfig("project")
md.inlinePatterns.register(
- FordLinkProcessor(md, project=project), "ford_links", 174
+ FordLinkProcessor(md, project=project), "ford_links", 194
)
but this would really need to be user-configurable, as otherwise it's not possible to write links verbatim (in general, nesting of inline markup is a bit of a nightmare of conflicting syntax, so this will always be a compromise). If there's a strong desire for this, I can add this option and get it out in 7.0.6 |
Thank you @ZedThree for your explanations. If the following syntax works with Ford v7, I can modify the specs within this PR to support it
No need to revert it IMO. We can adapt these notations. |
@perazz @ZedThree @gareth-nx : Currently, this PR does:
Processing the BLAS files does not significantly influence the time of the CI. I propose that we merge this PR as is, even if the LAPACK files are excluded for |
LGTM @jvdp1 |
If there was a way to include the LAPACK interfaces ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jvdp1, this looks good. I agree it makes sense to exclude Lapack until we can address the doc build times.
Thank you for your reviews.
I tried several things similar to your proposition, but all failed! @ZedThree do you have maybe an idea? If not, I will wait a few more days and then merge it. |
There is the (slightly unintuitive) It should be possible to fix this, unfortunately I'm at a conference basically all this week, so it might take me awhile to look into it. A quick hack does show some improvement: modified ford/sourceform.py
@@ -612,6 +612,10 @@ class FortranBase:
def filter_display(self, collection: Sequence) -> List:
"""Remove items from collection if they shouldn't be displayed"""
+ for obj in collection:
+ if not self._should_display(obj):
+ self.source_file._to_be_markdowned.remove(obj)
+
return [obj for obj in collection if self._should_display(obj)] but there still seems to be a pretty big slowdown. |
Thank you @ZedThree for your comment. There is no rush for this issue IMO. I will merge this PR as is. |
Related to #783 by @ZedThree
Proposition:
6.1.10
to7.0.5
ford
processing (2 reasons: 1) too many procedures; 2) no support of bothfypp
andcpp
byford
)stdlib_str2num.fypp
: small fixes forford
processing