Skip to content

Commit c625af7

Browse files
FanwangMGabriela Sanchez-Diaz <gsdiaz21@gmail.com>, Fanwang Meng
andauthored
Fix colab button links in website attempt 2 (#105)
* 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 <gsdiaz21@gmail.com>, Fanwang Meng <fanwang.meng@queeusu.ca>
1 parent c39ecd9 commit c625af7

File tree

3 files changed

+25
-17
lines changed

3 files changed

+25
-17
lines changed

.github/workflows/pytest.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,16 @@ jobs:
1515

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

2123
steps:
22-
- uses: "actions/checkout@v3"
24+
- uses: "actions/checkout@v4"
2325

2426
- name: Setup python for test ${{ matrix.py }}
25-
uses: actions/setup-python@v4
27+
uses: actions/setup-python@v5
2628
with:
2729
python-version: ${{ matrix.py }}
2830

@@ -56,4 +58,4 @@ jobs:
5658
job-summary: true
5759
click-to-expand: true
5860
report-title: 'Dev Test Report'
59-
pytest-args: '-m dev'
61+
pytest-args: '-m dev'

.github/workflows/website.yaml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,32 @@ name: build_website
33
on:
44

55
push:
6+
branches:
7+
- master
8+
- main
69

10+
# this ensures that the website is built when a PR is opened, synchronized, reopened, or closed
11+
# and the PR is not breaking the website building process
12+
pull_request:
13+
types: [opened, synchronize, reopened, closed]
714
branches:
15+
- main
816
- master
917

1018
permissions:
11-
1219
contents: write
1320
deployments: write
1421
pages: write
1522

1623
jobs:
17-
1824
build:
19-
2025
runs-on: ubuntu-latest
21-
2226
permissions:
23-
2427
contents: write
2528
deployments: write
2629
pages: write
2730

2831
steps:
29-
3032
- name: Checkout repository
3133
uses: actions/checkout@v4
3234

@@ -48,8 +50,7 @@ jobs:
4850
- name: Create soft links
4951
run: |
5052
cd website
51-
ln -s ../docs/notebooks ./examples
52-
ln -s ../docs/notebooks/images ./examples/images
53+
cp -lR ../docs/notebooks ./examples
5354
ln -s ../docs/source ./api
5455
cd ../
5556
@@ -65,10 +66,10 @@ jobs:
6566
# inspired by https://github.com/orgs/community/discussions/26724
6667
# only push to gh-pages if the master branch has been updated
6768
- name: GitHub Pages Action
68-
# if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
69-
uses: peaceiris/actions-gh-pages@v3
69+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
70+
uses: peaceiris/actions-gh-pages@v4.0.0
7071
with:
7172
github_token: ${{ secrets.GITHUB_TOKEN }}
7273
publish_dir: ./website/_build/html
7374
publish_branch: gh-pages
74-
cname: atomdb.qcdevs.org
75+
cname: atomdb.qcdevs.org

website/installation.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
Installation
44
############
55

6+
.. note::
7+
Because the dependency `PySCF <https://pyscf.org/user/install.html>`
8+
does not support Windows, `AtomDB` is not supported on Windows. But we can use
9+
`AtomDB` with `Windows Subsystem for Linux (WSL) <https://learn.microsoft.com/en-us/windows/wsl/>`_.
10+
611
Downloading Code
712
================
813

@@ -136,4 +141,4 @@ formats, run,
136141

137142
.. code-block:: bash
138143
139-
make
144+
make

0 commit comments

Comments
 (0)