Giter Club home page Giter Club logo

pyscf.github.io's Introduction

PySCF website and documentation

Overview

The PySCF website and documentation are written in a combination of Markdown and reStructuredText, using sphinx-doc and several associated extensions to generate static html files that are served from the gh-pages branch. Pushes to this repository trigger a Github Action that builds and serves the updated website.

Building the docs locally

Requirements

Pip install the following packages, which are also listed in requirements.txt:

  • pyscf
  • sphinx
  • sphinxcontrib-bibtex
  • nbsphinx
  • pydata-sphinx-theme
  • myst-parser
  • sphinx_design

If you have multiple versions of PySCF on your machine and you would like so use a specific version, set PYTHONPATH to include the specific PySCF source directory you want; otherwise, uncomment sys.path.append(os.path.abspath('path_to_pyscf')) in source/conf.py.

Building

All sphinx related sources files (i.e. .rst and .md) are contained in source and all webpage files (once they're generated) live in the build.

To generate the website (without the API docs) run the following from the main project directory. If you are running on Linux, and you want to build faster you can use make html_parallel.

make html

To generate the complete website (including the API docs) run the following from the main project directory. Since the API docs are large, this build is noticeably slower than just generating the website with make html. :warning: PySCF must be accessible in your current Python environment when you run make api_docs or make html_full.

make html_full

To see more of the options you can use with make, just use make help.

Serving

Finally to serve the website, you can run:

 python -m http.server --directory build/html

Viewing a forked repo GitHub Pages

The PySCF website is currently built and deployed to GitHub Pages any time a push is made to the master branch of the repository. The website is served out of the docs/ directory of the gh-pages branch. This is all controlled by a GitHub Action in .github/workflows/docs_deploy.yaml. If you forked this repository and you want to view the website on your own GitHub Pages, make sure to enable Actions on your repository, because they are disabled in forks by default.

How to contribute

Website pages can be written in Markdown .md or reStructuredTest .rst.

  1. Add a rst (or md) file "your_method.rst" in the source/user directory in which one describes the basic theory and usage of the method. Reference "user/your_method.rst" in the "toctree" section in source/user.rst.
  2. Add a rst (or md) file "your_module.rst" in the source/modules directory in which one lists the examples and the member classes and functions of the module (the API doc is then generated by autodoc). (In the "__init__.py" file of each module, one should include a simple usage section. See pyscf.dft.__init__.py as an example.) Reference "your_module.rst" in the "toctree" section in source/modules.rst.
  3. Optionally, one could also add a rst file "your_method_develop.rst" in the source/contributor directory where one provides more detailed descriptions of the implementation and advanced guidelines for using and further development of the module.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.