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

generalize workchain sphinx extension to processes #3314

Merged
merged 15 commits into from
Oct 1, 2019

Conversation

ltalirz
Copy link
Member

@ltalirz ltalirz commented Sep 12, 2019

Fixes #3016

This PR

  • generalizes the "workchain" sphinx autodoc extension
  • uses it to replace documentation of the CalcJob interface

I.e. you can now do:

.. aiida-process:: CalcJob
    :module: aiida.engine.processes.calcjobs

.. aiida-calcjob:: CalcJob
    :module: aiida.engine.processes.calcjobs

.. aiida-workchain:: WorkChain
    :module: aiida.engine.processes.workchains

Currently, the implementation of the aiida-workchain and aiida-calcjob directives are identical to aiida-process (simply inherit from the class) but they can easily be customized in the future.

This PR includes some modifications introduced by #3299

@ltalirz
Copy link
Member Author

ltalirz commented Sep 12, 2019

Closing for further updates & harmonization with #3299

@ltalirz ltalirz closed this Sep 12, 2019
@ltalirz ltalirz reopened this Sep 25, 2019
aiida/sphinxext/calcjob.py Outdated Show resolved Hide resolved
aiida/sphinxext/tests/workchain_source/index.rst Outdated Show resolved Hide resolved
it seems on travis you get 'basestring' instead of 'str'
@ltalirz
Copy link
Member Author

ltalirz commented Sep 30, 2019

@sphuber ready for review now :-)

@sphuber sphuber merged commit 1fdffdc into aiidateam:develop Oct 1, 2019
@sphuber
Copy link
Contributor

sphuber commented Oct 1, 2019

Thanks a lot @ltalirz

@ltalirz
Copy link
Member Author

ltalirz commented Oct 1, 2019

Hm... while the docs build on travis seems to work fine, it seems this broke the docs build on readthedocs.

Espen mentioned something like this as well but I may have misunderstood him before.
We'll need to look into this.

@ltalirz ltalirz mentioned this pull request Oct 1, 2019
@d-tomerini
Copy link
Contributor

d-tomerini commented Oct 2, 2019

Hi @italirz,

as I mentioned, just a typo at line 468 of your new version (dimnensional) in the page.

For the mpirun_extra_params I'd specify that the mpi run command is defined in the :ref:computer setup<computer_setup> section, for anyone interested, for the resources section I'd refer to the scheduler manual page to access the options. For the rest, the help does its job.

Also, I'd clearly state always when the value to be supplied is not a string (Boolean or AiiDA object)

@sphuber
Copy link
Contributor

sphuber commented Oct 2, 2019

Also, I'd clearly states always when the value to be supplied is not a string (Boolean or AiiDA object)

For that we should use the valid_type keyword in the spec. If this is currently not used for some CalcJob options, we should add them. This keyword is automatically parsed by the Sphinx extenstion

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

Successfully merging this pull request may close these issues.

Fill in documentation for "working with CalcJobs"
3 participants