Skip to content

Commit 833a8b6

Browse files
authored
Merge pull request #5 from acceleratedscience/wip
Simplified build + molset from cache
2 parents c3d8d35 + 0be9ba9 commit 833a8b6

85 files changed

Lines changed: 537 additions & 410 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 37 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,42 @@
11
name: Release Frontend Build
22

3+
# Trigger build on version release:
4+
# New tag created starting with v
35
on:
4-
push:
5-
tags:
6-
- 'v*' # Trigger on new tags starting with v
6+
push:
7+
tags:
8+
- 'v*'
79

810
jobs:
9-
build-and-release:
10-
runs-on: ubuntu-latest
11-
permissions:
12-
contents: write
13-
14-
steps:
15-
- name: Checkout code
16-
uses: actions/checkout@v4
17-
18-
- name: Setup Node.js
19-
uses: actions/setup-node@v4
20-
with:
21-
node-version: '18'
22-
23-
- name: Install dependencies
24-
run: npm install
25-
26-
- name: Build Vue app
27-
run: npm run build
28-
29-
- name: Archive build files
30-
run: tar -czvf gui-build.tar.gz gui-build
31-
32-
- name: Create GitHub Release
33-
uses: softprops/action-gh-release@v1
34-
with:
35-
files: gui-build.tar.gz
11+
build-and-release:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: '18'
24+
25+
- name: Install dependencies
26+
run: npm install
27+
28+
- name: Build Vue app
29+
run: npm run build
30+
31+
- name: Archive regular build files
32+
run: tar -czvf gui-build.tar.gz gui-build
33+
34+
- name: Archive /proxy/8024/ build files
35+
run: tar -czvf gui-build-proxy.tar.gz gui-build-proxy
36+
37+
- name: Create GitHub Release
38+
uses: softprops/action-gh-release@v1
39+
with:
40+
files: |
41+
gui-build.tar.gz
42+
gui-build-proxy.tar.gz

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ node_modules
1111
.DS_Store
1212
coverage
1313
*.local
14+
.env
1415

1516
# Build folders
1617
/gui-build

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,11 @@ This is a sub-repository to the main [OpenAD repo]. It contains the GUI which is
9494
- Update `actionSaveAs()` in `OverflowMenuMol.vue` to ensure the correct options are displayed in the overflow menu, and ensure the delete option is also included.
9595

9696
[OpenAD repo]: https://github.com/acceleratedscience/open-ad-toolkit
97+
98+
<!--
99+
100+
To delete a tag, locally and then on GH:
101+
git tag -d <tag_name>
102+
git push origin --delete <tag_name>
103+
104+
-->

index.html

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,14 @@
11
<!doctype html>
22
<html lang="en">
33
<head>
4-
<!----<script>
5-
// This block of code is enabled during the build process
6-
// for the proxy build only (gui-build-proxy).
7-
// See vite.config.ts for more information.
8-
// - - -
9-
// This inserts a dynamic base tag that will allow
10-
// the app to be served from a different proxy ports.
11-
// <base href="/proxy/8027/" />
12-
;(function () {
13-
const base = document.createElement('base')
14-
15-
// const port = window.location.pathname.match(/\/proxy\/(\d{4})/)?.[1] ?? 8024
16-
// base.href = `/proxy/${port}/`
17-
18-
const match = window.location.pathname.match(/^(.*)\/proxy\/(\d{4})/)
19-
const prefix = match?.[1] ?? ''
20-
const port = match?.[2] ?? 8024
21-
base.href = `${prefix}/proxy/${port}/`
22-
23-
document.head.insertBefore(base, document.head.firstChild)
24-
})()
25-
</script>---->
4+
<script>
5+
// Dynamically set the base URL for the application
6+
const base = document.createElement('base')
7+
const baseUrl = '{{ base_url }}'
8+
base.href = baseUrl // HTML links and relative paths
9+
window.dynamicBaseUrl = baseUrl // Vue router links
10+
document.head.insertBefore(base, document.head.firstChild)
11+
</script>
2612
<meta charset="UTF-8" />
2713
<link rel="icon" href="favicon.ico" />
2814
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

package-lock.json

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,8 @@
55
"type": "module",
66
"scripts": {
77
"dev": "vite",
8-
"build": "run-p type-check \"build-all {@}\" --",
9-
"build-all": "npm run build:proxy && npm run build:no-proxy",
10-
"build:proxy": "vite build --mode proxy",
11-
"build:no-proxy": "vite build --mode no-proxy",
12-
"postbuild": "node scripts/postbuild.js",
8+
"build": "run-p type-check build-vite",
9+
"build-vite": "vite build",
1310
"preview": "vite preview",
1411
"test:unit": "vitest",
1512
"test:e2e": "playwright test",
@@ -22,6 +19,7 @@
2219
"@rdkit/rdkit": "^2023.9.2-1.0.0",
2320
"3dmol": "^2.0.6",
2421
"axios": "^1.6.7",
22+
"dotenv": "^17.2.1",
2523
"miew": "^0.11.0",
2624
"pinia": "^2.1.7",
2725
"vue": "^3.3.11",

scripts/postbuild.js

Lines changed: 0 additions & 72 deletions
This file was deleted.

src/api/segments/DataframeApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import BaseApi from './BaseApi'
1+
import BaseApi from '../BaseApi'
22

33
// Type declarations
44
import type { LocationQuery } from 'vue-router'

src/api/segments/FileSystemApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import BaseApi from './BaseApi'
1+
import BaseApi from '../BaseApi'
22
import type { LocationQuery } from 'vue-router'
33

44
export default class FileSystemApi extends BaseApi {

src/api/segments/MainApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import BaseApi from './BaseApi'
1+
import BaseApi from '../BaseApi'
22

33
export default class MainApi extends BaseApi {
44
constructor() {

0 commit comments

Comments
 (0)