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

Docs: scaffolding for the "Intro" section #4011

Merged
merged 19 commits into from
May 1, 2020

Conversation

chrisjsewell
Copy link
Member

@chrisjsewell chrisjsewell commented May 1, 2020

Aim

From wiki:

Getting started (intro/) - Landing page for new users, should provide motivation, code snippets, and links to the various resources, including on how to install the package, test it online, and the tutorial.

Outline

From Google Doc Outline, it should follow this outline:

  1. Landing Page (main index): Like pandas (https://pandas.pydata.org/docs/index.html)
  • At the top: mission statement; with link to the features page on aiida.net
  • Why use AiiDA (features, basic examples) max 1-2 minutes; could be part of panels
  • Below 6 panels (this gives a good overview of the documentation structure):
    • Getting Started
    • Tutorial
    • How-To
    • Topics
    • API Reference
    • Development
  1. "quick-setup" of AiiDA (intro/get_started): final state: verdi status is green (+ localhost computer is setup?)
  • MyBinder (recommended for testing)
  • Conda (recommended for production) + includes profile setup
  • Next steps
    • Recommend tutorial
    • Provide a few links for different user profiles
    • How to run workflows for pure Python lightweight computations
    • How to run workflows for compute-intensive codes (DFT, MD etc.)
    • How to run workflows on supercomputers
  1. Detailed Installation guides (intro/installation): incorporate all existing documentation +
  • Pip + Link to how to install services
  • In-depth/alternative installation methods
  • Services for various systems
  • Conda in detail
  • Pip in detail
  • QuantumMobile
  • AiiDA lab
  1. Troubleshooting (intro/troubleshooting): incorporate existing troubleshooting

Outstanding Issues

  1. We are currently missing the "Why use AiiDA" section. I'm not sure where we landed on how much of this should be on the landing page and/or whether we needed the additional intro/about section. The features section of the landing page has currently been deleted, but this should be added back in, in some form. Also relevant is that @ltalirz is working on a testimonial section.
  2. Check that everyone is OK with adding the sphinx-panels dependency
  3. @sphuber didn't like the current look of the panels. I think this is just a matter of playing around with the CSS
  4. We don't yet have the MyBinder setup (I imagine this will be a separate issue to add to project)
  5. Come to a consensus on if Conda is the correct route for the "quick-install"
  6. The next steps uses a new (currently internal) extension I have added. This would effectively replace the existing sphinxcontrib-details-directive dependency, and should get consensus that this is OK.
  7. The "next steps" is not yet populated (I imagine this will be a separate issue to add to project)

Note some initial discussion has already taken place in csadorf#25

@chrisjsewell chrisjsewell requested a review from csadorf May 1, 2020 09:26
@codecov
Copy link

codecov bot commented May 1, 2020

Codecov Report

Merging #4011 into docs-revamp will decrease coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@               Coverage Diff               @@
##           docs-revamp    #4011      +/-   ##
===============================================
- Coverage        78.46%   78.45%   -0.01%     
===============================================
  Files              461      461              
  Lines            34077    34077              
===============================================
- Hits             26736    26732       -4     
- Misses            7341     7345       +4     
Flag Coverage Δ
#django 70.49% <ø> (ø)
#sqlalchemy 71.35% <ø> (-0.01%) ⬇️
Impacted Files Coverage Δ
aiida/orm/utils/log.py 76.67% <0.00%> (-16.66%) ⬇️
aiida/transports/plugins/local.py 80.47% <0.00%> (+0.26%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 25052c0...76270ca. Read the comment docs.

@greschd
Copy link
Member

greschd commented May 1, 2020

Regarding 6.:

  • What are the advantages of accordion, compared to the <details> tag?
  • What happens if JavaScript is disabled? Does it default to folded or unfolded content?

I don't think we can get rid of the details directive dependency completely, as it's also used in the aiida.sphinxext for expandable namespace input / output descriptions.

@chrisjsewell
Copy link
Member Author

@sphuber didn't like the current look of the panels. I think this is just a matter of playing around with the CSS

One thing that I wanted to briefly mention, although it is most probably not something I expect us to implement, is that currently using CircleCI for documentation integration testing has a big benefit over GitHub Actions, because it can provide HTML build artefacts. For example in: executablebooks/sphinx-panels#3, you get a link that directly opens the newly built documentation for review:

image

@csadorf
Copy link
Contributor

csadorf commented May 1, 2020

One thing that I wanted to briefly mention, although it is most probably not something I expect us to implement, is that currently using CircleCI for documentation integration testing has a big benefit over GitHub Actions, because it can provide HTML build artefacts.

That's a really nice feature and we could consider to use circle-ci specifically for this purpose. @chrisjsewell I'm wondering whether it would be possible to implement something similar in GitHub actions as well though. Uploading artifacts is not that difficult, I just don't know about "serving" the HTML so that you can just open it directly without downloading first.

@chrisjsewell
Copy link
Member Author

chrisjsewell commented May 1, 2020

Regarding 6.:

What are the advantages of accordion, compared to the

tag?
What happens if JavaScript is disabled? Does it default to folded or unfolded content?

Its just better looking TBH, and mirrors better the pandas doc section that we were looking to replicate.
The JS is copied from sphinx-togglebutton, and will be folded by default. Note this directive may eventually be incorporated into that repo: executablebooks/sphinx-togglebutton#11

Note also that the code/css follows closely this guide: https://www.w3schools.com/howto/howto_js_collapsible.asp

@chrisjsewell
Copy link
Member Author

I'm wondering whether it would be possible to implement something similar in GitHub actions as well though

Unfortunately at the moment no. I would refer you to this issue, roughly tracking the status of this feature in Github actions: spatialaudio/nbsphinx#361

Copy link
Contributor

@csadorf csadorf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice! First set of recommendations to change up the language a little bit on the landing page. I'll start reviewing the installation instructions next.

docs/source/_extensions/_static/accordian.css Outdated Show resolved Hide resolved
docs/source/_extensions/_static/accordian.js Outdated Show resolved Hide resolved
docs/source/conf.py Outdated Show resolved Hide resolved
docs/source/index.rst Outdated Show resolved Hide resolved
docs/source/index.rst Outdated Show resolved Hide resolved
docs/source/index.rst Outdated Show resolved Hide resolved
docs/source/index.rst Outdated Show resolved Hide resolved
docs/source/index.rst Outdated Show resolved Hide resolved
@greschd
Copy link
Member

greschd commented May 1, 2020

Its just better looking TBH, and mirrors better the pandas doc section that we were looking to replicate.

Yeah I'm not against this in principle, just wondering if the same (in terms of style) could be achieved with custom CSS for the details tag. Plain HTML has the advantage of also working for the subset of users who disable JS.
The content being hidden by default is good (that's kinda the point), but when it can't be un-collapsed (without JS) the content should still be shown.

Copy link
Contributor

@csadorf csadorf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Provided a few suggestions for the conda installation instructions.

Getting Started
****************

Installation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Installation
Install with conda

And that should then be on its own page.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not clear what you are expecting to remain on this page. If we move the conda install to a separate page, then surely there will be nothing left on this page?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The panels for the main installation routes is left.

Comment on lines 10 to 11
There are numerous routes to setting up the full AiiDA environment, depending on your use case.
Here we first provide the simplest approach for installation on your local computer.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this paragraph should remain on the "Getting started" landing page after we have moved the conda instructions to a separate page.


$ conda create -n aiida -c conda-forge aiida-core aiida-core.services
$ conda activate aiida
$ reentry scan
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be rolled into conda activate aiida?

Copy link
Member Author

@chrisjsewell chrisjsewell May 1, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly. Me and @ltalirz have already discussed this for example in chrisjsewell/activate_aiida#4, and I think he is looking into it

.. code-block:: console

$ conda create -n aiida -c conda-forge aiida-core aiida-core.services
$ conda activate aiida
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This activates the services, correct? I think we should either move this into a separate code block or mention right after, that this will need to be run after every reboot. Ideally, we can avoid this all-together in the future, but for now we need to mention that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This activates the services, correct?

No this is just activating the conda enviroment (aiida is the environment name, maybe that is misleading?). It does need to be run when "entering" a new terminal though, i.e. to set the environment

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I completely misread this, sorry.

Comment on lines 21 to 23
.. note::

You can also install ``aiida-core`` from `PyPi <https://pypi.org/project/aiida-core>`_
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should be more generic here and just say "Click here for alternative installation methods.". This is for users who were directed to this page (e.g. from a Stack Overflow answer or some other source), but actually don't want to use conda.

.. code-block:: console

$ initdb -D mylocal_db
$ pg_ctl -D mylocal_db -l logfile start
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be rolled into conda activate aiida?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see above comment


.. code-block:: console

$ rabbitmq-server -detached
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar question, make part of conda activate aiida?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see above comment

docs/source/intro/get_started.rst Outdated Show resolved Hide resolved
@csadorf
Copy link
Contributor

csadorf commented May 1, 2020

Its just better looking TBH, and mirrors better the pandas doc section that we were looking to replicate.

Yeah I'm not against this in principle, just wondering if the same (in terms of style) could be achieved with custom CSS for the details tag. Plain HTML has the advantage of also working for the subset of users who disable JS.
The content being hidden by default is good (that's kinda the point), but when it can't be un-collapsed (without JS) the content should still be shown.

@greschd I agree that this should work without JS, but I would be in favor of creating an issue for that and then resolving that down the line. Our priority right now should be to get something online as soon as possible.

@chrisjsewell
Copy link
Member Author

chrisjsewell commented May 1, 2020

just wondering if the same (in terms of style) could be achieved with custom CSS for the details tag

Err, well not according to this blog: Why <details> is Not an Accordion. I guess that's a group decision on whether to support JS, to improve the style. I'm in favour, and it appears pandas are as well 😬

On a related note (again really for a separate issue) pandas does not require the custom JS, because it uses a "more modern" bootstrap theme (see here re collapse), which I am in favour of moving to: https://pypi.org/project/pydata-sphinx-theme/

@greschd
Copy link
Member

greschd commented May 1, 2020

Ok, if I understand correctly the problem is that headings inside <details> are not handled properly, and especially lead to accessibility concerns. I think that's a valid enough reason not to use <details>, so it's ok for me to go ahead with this as-is and resolve the no-JS compatibility later as @csadorf suggests.

To be honest I'm also a bit out of my depth here, frontend is not really my specialty.

docs/source/index.rst Outdated Show resolved Hide resolved
chrisjsewell and others added 3 commits May 1, 2020 13:40
Co-authored-by: Carl Simon Adorf <carl.simon.adorf@gmail.com>

.. code-block:: console

$ reentry scan
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have figured out how best to succinctly explain this command yet

@chrisjsewell
Copy link
Member Author

TODO:

there's currently a CSS annoyance with long code blocks not allowing panels to shrink

image

@sphuber sphuber changed the title Add initial skeleton for intro section Docs: scaffolding for the "Intro" section May 1, 2020
@csadorf csadorf marked this pull request as ready for review May 1, 2020 15:34
@csadorf csadorf merged this pull request into aiidateam:docs-revamp May 1, 2020
sphuber pushed a commit that referenced this pull request May 1, 2020
The intro section contains the landing page with information about
motivation and scope of the AiiDA software, as well as an overview of
the documentation structure with links to other sections. This intro
section also contains the instructions for how to install and setup
AiiDA.
csadorf pushed a commit that referenced this pull request May 29, 2020
The intro section contains the landing page with information about
motivation and scope of the AiiDA software, as well as an overview of
the documentation structure with links to other sections. This intro
section also contains the instructions for how to install and setup
AiiDA.
@chrisjsewell chrisjsewell deleted the docs-revamp-intro-install branch January 27, 2021 04:51
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.

3 participants