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.
Pip install the following packages, which are also listed in requirements.txt
:
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.
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
.
Finally to serve the website, you can run:
python -m http.server --directory build/html
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.
Website pages can be written in Markdown .md
or reStructuredTest .rst
.