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

Add fortran documentation #9

Open
25 tasks
lcrippa opened this issue Oct 18, 2024 · 7 comments
Open
25 tasks

Add fortran documentation #9

lcrippa opened this issue Oct 18, 2024 · 7 comments

Comments

@lcrippa
Copy link
Collaborator

lcrippa commented Oct 18, 2024

I have patched f2py/crackfortran and a version of sphinxfortran to have similar highlighting to the python and to recognize the way we write our variable and interface declarations.

An example is the ED_AUX_FUNX.f90 file, which now has a doc page at

https://aamaricci.github.io/EDIpack2.0/fortran_src/modules/ed_aux_funx.html

All the other files need to be documented, so if anyone wants ... :)

How to do it

  • copy the way it is done for ed_aux_funx.rst, with automodule. The module name should be lowercase (fortran is case insensitive but python is not and this is a python script)
  • you can have a blacklist or a whitelist of module elements to document. :members: is the whitelist, :undoc-members: is the blacklist. Check aux_funx and input_variables for the two examples
  • comment the functions with ! (even multiline) below the declaration line
  • comment the input variables and global variables with ! on the right
  • if you have an interface, comment the interface. The input variables should be commented in the first overloaded function that has them. Check ed_aux_funx.f90 for an example

List of functions to document

Mark the functions you complete, remove those which are not going to be documented

To review

  • Index
  • Dependencies
  • Install
  • Quick start
  • Further examples
  • Fortran library
    • Frontend
    • Core routines
    • General environment
    • Sparse matrix
    • Eigenspace
    • Sectors
    • Bath
    • Hamiltonian
    • ED
    • Green's function
    • Observables
    • I/O
    • Fit
  • Python api
    • Installation
    • Basic usage
    • Global variables
    • Functions
  • Browse code
@aamaricci
Copy link
Owner

The vars_global issue is solved. It was related to the 'parameter' statement of some variables which was not recognized.

@aamaricci
Copy link
Owner

I reshuffled the structure of the docs for the modules. Will push tomorrow.

Great work indeed!

@lcrippa
Copy link
Collaborator Author

lcrippa commented Oct 19, 2024

Great! Ok, pull it first, I made a minor tweak

@aamaricci
Copy link
Owner

I pushed a detailed structure to the documentation and added some entries in the first part (general and main classes). It is a long way though...

@lcrippa
Copy link
Collaborator Author

lcrippa commented Oct 19, 2024

one step at a time :)

@aamaricci
Copy link
Owner

The documentation is now complete (more or less).

It would be good to have some comments or review of the text.

@lcrippa
Copy link
Collaborator Author

lcrippa commented Nov 4, 2024

Updated the checklist

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

2 participants