Skip to content

Commit

Permalink
Fix colab button links in website attempt 2 (#105)
Browse files Browse the repository at this point in the history
* Replace symbolic link to docs/notebooks by files copy in website.yaml

* Update pytest configuration

* Use MacOS instead of Windows OS becauase PySCF does not support windows

* Update the website building workflow

- Build the website for multiple-cases
- Only push to the gh-pages when in master branch

* Use the latest version of actions-gh-pages

* Add the information of `PySCF` in the installation guide

---------

Co-authored-by: Gabriela Sanchez-Diaz <[email protected]>, Fanwang Meng <[email protected]>
  • Loading branch information
FanwangM and Gabriela Sanchez-Diaz <[email protected]>, Fanwang Meng authored Oct 3, 2024
1 parent c39ecd9 commit c625af7
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 17 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@ jobs:

strategy:
matrix:
os: ["ubuntu-latest", "windows-latest"]
py: ["3.9", "3.10", "3.11"]
# windows-latest is not supported because pyscf is not supported on windows
# https://pyscf.org/user/install.html
os: ["ubuntu-latest", "macos-latest"]
py: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: "actions/checkout@v3"
- uses: "actions/checkout@v4"

- name: Setup python for test ${{ matrix.py }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.py }}

Expand Down Expand Up @@ -56,4 +58,4 @@ jobs:
job-summary: true
click-to-expand: true
report-title: 'Dev Test Report'
pytest-args: '-m dev'
pytest-args: '-m dev'
23 changes: 12 additions & 11 deletions .github/workflows/website.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,32 @@ name: build_website
on:

push:
branches:
- master
- main

# this ensures that the website is built when a PR is opened, synchronized, reopened, or closed
# and the PR is not breaking the website building process
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- main
- master

permissions:

contents: write
deployments: write
pages: write

jobs:

build:

runs-on: ubuntu-latest

permissions:

contents: write
deployments: write
pages: write

steps:

- name: Checkout repository
uses: actions/checkout@v4

Expand All @@ -48,8 +50,7 @@ jobs:
- name: Create soft links
run: |
cd website
ln -s ../docs/notebooks ./examples
ln -s ../docs/notebooks/images ./examples/images
cp -lR ../docs/notebooks ./examples
ln -s ../docs/source ./api
cd ../
Expand All @@ -65,10 +66,10 @@ jobs:
# inspired by https://github.com/orgs/community/discussions/26724
# only push to gh-pages if the master branch has been updated
- name: GitHub Pages Action
# if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
uses: peaceiris/actions-gh-pages@v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./website/_build/html
publish_branch: gh-pages
cname: atomdb.qcdevs.org
cname: atomdb.qcdevs.org
7 changes: 6 additions & 1 deletion website/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
Installation
############

.. note::
Because the dependency `PySCF <https://pyscf.org/user/install.html>`
does not support Windows, `AtomDB` is not supported on Windows. But we can use
`AtomDB` with `Windows Subsystem for Linux (WSL) <https://learn.microsoft.com/en-us/windows/wsl/>`_.

Downloading Code
================

Expand Down Expand Up @@ -136,4 +141,4 @@ formats, run,

.. code-block:: bash
make
make

0 comments on commit c625af7

Please sign in to comment.