-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
323 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
name: CI/CD | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: shenron | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pyscaffold | ||
pip install tox | ||
- name: Run tests and build docs | ||
run: | | ||
tox | ||
tox -e docs | ||
- name: Upload docs artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: docs | ||
path: ./docs/_build/html | ||
|
||
deploy_docs: | ||
runs-on: shenron | ||
needs: build | ||
if: github.ref == 'refs/heads/main' | ||
env: | ||
HOME: "${{ github.workspace }}/../" # Because self-hosted runner is root | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Download docs artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: docs | ||
path: artifacts | ||
|
||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v4 | ||
with: | ||
github_token: ${{ secrets.GH_TOKEN }} | ||
publish_dir: ./artifacts | ||
|
||
version_bump: | ||
runs-on: shenron | ||
needs: build | ||
if: | | ||
contains(github.event.head_commit.message, '#patch') || | ||
contains(github.event.head_commit.message, '#minor') || | ||
contains(github.event.head_commit.message, '#major') | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Bump version and push tag | ||
uses: anothrNick/github-tag-action@v1 | ||
env: | ||
DEFAULT_BUMP: patch | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
RELEASE_BRANCHES: main | ||
|
||
publish: | ||
runs-on: shenron | ||
needs: [build, version_bump] | ||
if: | | ||
contains(github.event.head_commit.message, '#patch') || | ||
contains(github.event.head_commit.message, '#minor') || | ||
contains(github.event.head_commit.message, '#major') | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Publish to PyPI | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | ||
run: | | ||
python -m pip install --upgrade twine | ||
twine upload dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
BSD 3-Clause License | ||
|
||
Copyright (c) 2024, M3-Learning: Multifunctional Materials and Machine Learning | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
1. Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
|
||
2. Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
|
||
3. Neither the name of the copyright holder nor the names of its | ||
contributors may be used to endorse or promote products derived from | ||
this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,171 @@ | ||
/******************************************************************************* | ||
* light theme | ||
* | ||
* all the variables used for light theme coloring | ||
*/ | ||
html[data-theme="light"] { | ||
/***************************************************************************** | ||
* main colors | ||
*/ | ||
--pst-color-primary: #002d72; | ||
/* PMS 294C (Drexel Blue) */ | ||
--pst-color-secondary: #ffd100; | ||
/* PMS 7548C (Drexel Yellow) */ | ||
--pst-color-success: #9dad33; | ||
/* PMS 583C (Light Green) */ | ||
--pst-color-info: #006298; | ||
/* PMS 7691C (Dark Blue) */ | ||
--pst-color-warning: #ff8f1c; | ||
/* PMS 1495C (Light Orange) */ | ||
--pst-color-danger: #a50021; | ||
/* PMS 7427C (Red) */ | ||
--pst-color-text-base: #002d72; | ||
/* PMS 294C (Drexel Blue) */ | ||
--pst-color-text-muted: #a7a8aa; | ||
/* Cool Gray 6C */ | ||
--pst-color-border: #d1d5d8; | ||
/* PMS 427C (Very Light Gray) */ | ||
--pst-color-shadow: #a7a8aa; | ||
/* Cool Gray 6C */ | ||
|
||
/***************************************************************************** | ||
* depth colors | ||
* | ||
* background: the more in depth color | ||
* on-background: the object directly set on the background, use of shadows in light theme | ||
* surface: object set on the background (without shadows) | ||
* on_surface: object set on surface object (without shadows) | ||
*/ | ||
--pst-color-background: #ffffff; | ||
/* White */ | ||
--pst-color-on-background: #f5f5f5; | ||
/* Light Gray */ | ||
--pst-color-surface: #f0f0f0; | ||
/* Very Light Gray */ | ||
--pst-color-on-surface: #ededed; | ||
/* Lighter Gray */ | ||
|
||
/***************************************************************************** | ||
* extentions | ||
*/ | ||
|
||
--pst-color-panel-background: var(--pst-color-background); | ||
|
||
/***************************************************************************** | ||
* layout | ||
*/ | ||
|
||
/* links */ | ||
--pst-color-link: var(--pst-color-primary); | ||
--pst-color-link-hover: var(--pst-color-secondary); | ||
|
||
/* inline code */ | ||
--pst-color-inline-code: #d64309; | ||
/* PMS 7597C (Light Red) */ | ||
|
||
/* targeted content */ | ||
--pst-color-target: #c4d600; | ||
/* PMS 384C (Green) */ | ||
|
||
/* hide any content that should not be displayed in the light theme */ | ||
.only-dark { | ||
display: none !important; | ||
} | ||
} | ||
|
||
/******************************************************************************* | ||
* dark theme | ||
* | ||
* all the variables used for dark theme coloring | ||
*/ | ||
html[data-theme="dark"] { | ||
/***************************************************************************** | ||
* main colors | ||
*/ | ||
--pst-color-primary: #ffd100; | ||
/* PMS 7548C (Drexel Yellow) */ | ||
--pst-color-secondary: #002d72; | ||
/* PMS 294C (Drexel Blue) */ | ||
--pst-color-success: #6cace4; | ||
/* PMS 284C (Light Blue) */ | ||
--pst-color-info: #c7e1d2; | ||
/* PMS 5665C (Very Light Green) */ | ||
--pst-color-warning: #d86018; | ||
/* PMS 138C (Orange) */ | ||
--pst-color-danger: #a50021; | ||
/* PMS 7427C (Red) */ | ||
--pst-color-text-base: #ffffff; | ||
/* PMS 7548C (Drexel Yellow) */ | ||
--pst-color-text-muted: #bcb4a5; | ||
/* Warm Gray 3C */ | ||
--pst-color-border: #a7a8aa; | ||
/* Cool Gray 6C */ | ||
--pst-color-shadow: var(--pst-color-background); | ||
|
||
/***************************************************************************** | ||
* depth colors | ||
* | ||
* background: the more in depth color | ||
* on-background: the object directly set on the background, use of a light grey in dark theme | ||
* surface: object set on the background (without shadows) | ||
* on_surface: object set on surface object (without shadows) | ||
*/ | ||
--pst-color-background: #001d48; | ||
/* PMS 294C (Drexel Blue) */ | ||
--pst-color-on-background: #001d48; | ||
/* PMS 294C (Drexel Blue) */ | ||
--pst-color-surface: #006298; | ||
/* PMS 7691C (Dark Blue) */ | ||
--pst-color-on-surface: #006298; | ||
/* PMS 7691C (Dark Blue) */ | ||
|
||
/***************************************************************************** | ||
* extentions | ||
*/ | ||
|
||
--pst-color-panel-background: var(--pst-color-background); | ||
|
||
/***************************************************************************** | ||
* layout | ||
*/ | ||
|
||
/* links */ | ||
--pst-color-link: var(--pst-color-primary); | ||
--pst-color-link-hover: var(--pst-color-secondary); | ||
|
||
/* inline code */ | ||
--pst-color-inline-code: #d86018; | ||
/* PMS 138C (Orange) */ | ||
|
||
/* targeted content */ | ||
--pst-color-target: #ff8f1c; | ||
/* PMS 1495C (Light Orange) */ | ||
|
||
/* hide any content that should not be displayed in the dark theme */ | ||
.only-light { | ||
display: none !important; | ||
} | ||
|
||
/* specific brightness applied on images */ | ||
img { | ||
filter: brightness(0.8) contrast(1.2); | ||
} | ||
} | ||
|
||
/* custom.css */ | ||
|
||
.light-mode .logo-light { | ||
display: block; | ||
} | ||
|
||
.light-mode .logo-dark { | ||
display: none; | ||
} | ||
|
||
.dark-mode .logo-light { | ||
display: none; | ||
} | ||
|
||
.dark-mode .logo-dark { | ||
display: block; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters