Skip to content

Commit

Permalink
add web viewer
Browse files Browse the repository at this point in the history
  • Loading branch information
StardustDL committed Feb 4, 2024
1 parent c2b3718 commit 4d8bbe5
Show file tree
Hide file tree
Showing 55 changed files with 6,938 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ updates:
schedule:
interval: daily
open-pull-requests-limit: 3
- package-ecosystem: npm
directory: "/src/web"
schedule:
interval: daily
open-pull-requests-limit: 3
- package-ecosystem: "github-actions"
directory: "/"
schedule:
Expand Down
59 changes: 57 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,30 @@ jobs:
with:
name: image-cache
path: ./cache
web:
runs-on: ubuntu-latest
env:
PYTHONUTF8: 1
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Prepare Vite
run: |
cd ./src/web && npm install
- name: Set Build Env
run: |
echo "VITE_NOSERVER=1\nVITE_COMMIT_ID=${{ github.sha }}\nVITE_BUILD_DATE=$(date -Ins)" > ./src/web/.env
sed -i 's/base: \"\/\"/base: \"\/aexpy\/"/g' ./src/web/vite.config.ts
- name: Build
run: |
cd ./src/web && npm run build
- name: Upload results
uses: actions/upload-artifact@v4
with:
name: web-dist
path: ./src/web/dist
docs:
runs-on: ubuntu-latest
env:
Expand All @@ -162,12 +186,20 @@ jobs:
path: ./docs/dist
deploy:
if: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' || github.event_name == 'release' }}
needs: [image, docs, package]
needs: [image, docs, package, web]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
deploy-docs:
needs: [deploy]
runs-on: ubuntu-latest
env:
PYTHONUTF8: 1
steps:
- name: Download artifacts
- name: Download docs artifacts
uses: actions/download-artifact@v4
with:
name: docs
Expand All @@ -181,6 +213,25 @@ jobs:
with:
args: deploy --dir=./docs/dist --prod
secrets: '["NETLIFY_AUTH_TOKEN", "NETLIFY_SITE_ID"]'
deploy-web:
needs: [deploy]
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
with:
artifact_name: "web-dist"
deploy-package:
needs: [deploy]
runs-on: ubuntu-latest
steps:
- name: Download package artifacts
uses: actions/download-artifact@v4
with:
Expand All @@ -194,6 +245,10 @@ jobs:
run: |
python -m pip install --upgrade twine
python -m twine upload --skip-existing --repository pypi "dist/*"
deploy-image:
needs: [deploy]
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ https://user-images.githubusercontent.com/34736356/182772349-af0a5f20-d009-4daa-

- **How AexPy works?** Approach Design & Evaluation are in [AexPy's conference paper](https://ieeexplore.ieee.org/abstract/document/9978982), see also [talk](https://www.bilibili.com/video/BV1tv4y1D75F/) & [slides](https://stardustdl.github.io/assets/pdfs/aexpy/aexpy-slides.pdf).
- **How we implement AexPy?** Source Code & Implemetation are in [AexPy's repository](https://github.com/StardustDL/aexpy), see also [system design (zh-cn)](https://stardustdl.github.io/assets/pdfs/aexpy/aexpy-chinasoft.pdf).
- **How to use AexPy?** Detailed Document & Data are in [AexPy's website](https://aexpy.netlify.app/), see also [demo video](https://www.bilibili.com/video/BV1PG411F77m/).
- **How to use AexPy?** Detailed Document & Data are in [AexPy's website](https://aexpy.netlify.app/), see also [demo video](https://www.bilibili.com/video/BV1PG411F77m/) and [online AexPy data web viewer](https://stardustdl.github.io/aexpy/).

> **Attention**: For AexPy v0.1.x users, we have removed web front-end support in current and next version, and are focusing on command-line interface for now. The web interfaces would come back in future.
> **Attention**: For AexPy v0.1.x users, we have removed web front-end support in AexPy's Python package, and are focusing on command-line interface for now. The web interfaces are provided as .
> For the old available version, see [v0.1.2](https://github.com/StardustDL/aexpy/releases/tag/v0.1.2).
```mermaid
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
mypy==1.6.1
click==8.1.7
pydantic==2.5.3
pydantic==2.6.0
4 changes: 4 additions & 0 deletions src/web/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# .env.production
VITE_NOSERVER=1
VITE_COMMIT_ID=0
VITE_BUILD_DATE=2024/2/4
6 changes: 6 additions & 0 deletions src/web/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
.DS_Store
dist
dist-ssr
*.local
/public/static
3 changes: 3 additions & 0 deletions src/web/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# aexpy-web

Web frontend for AexPy.
13 changes: 13 additions & 0 deletions src/web/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>AexPy</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
Loading

0 comments on commit 4d8bbe5

Please sign in to comment.