Skip to content

Commit ea725e3

Browse files
authored
Merge pull request #286 from ControlCore-Project/dev
Merge the dev branch to the main.
2 parents 4d478b7 + 8f64802 commit ea725e3

53 files changed

Lines changed: 18565 additions & 31317 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
node_modules/
2+
npm-debug.log*
3+
yarn-debug.log*
4+
yarn-error.log*
5+
6+
build/
7+
dist/
8+
.craco/
9+
10+
.env
11+
.env.local
12+
.env.development.local
13+
.env.test.local
14+
.env.production.local
15+
16+
.git/
17+
.gitignore
18+
19+
.vscode/
20+
.idea/
21+
.DS_Store
22+
Thumbs.db
23+
24+
figures/
25+
*.md
26+
coverage/

.eslintrc.js

Lines changed: 17 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
module.exports = {
2-
parser: 'babel-eslint',
2+
parser: '@babel/eslint-parser',
3+
parserOptions: {
4+
requireConfigFile: false, // allows using without a separate babel config
5+
babelOptions: {
6+
presets: ['@babel/preset-react'], // React JSX support
7+
},
8+
ecmaFeatures: {
9+
jsx: true,
10+
},
11+
ecmaVersion: 12,
12+
sourceType: 'module',
13+
},
314
env: {
415
browser: true,
516
es2021: true,
@@ -8,29 +19,13 @@ module.exports = {
819
'plugin:react/recommended',
920
'airbnb',
1021
],
11-
parserOptions: {
12-
ecmaFeatures: {
13-
jsx: true,
14-
},
15-
ecmaVersion: 12,
16-
sourceType: 'module',
17-
},
1822
plugins: [
1923
'react',
2024
],
2125
rules: {
22-
indent: [
23-
'error',
24-
4,
25-
],
26-
'react/jsx-indent': [
27-
'error',
28-
4,
29-
],
30-
'react/jsx-indent-props': [
31-
'error',
32-
4,
33-
],
26+
indent: ['error', 4],
27+
'react/jsx-indent': ['error', 4],
28+
'react/jsx-indent-props': ['error', 4],
3429
'max-len': [
3530
'error',
3631
{
@@ -54,14 +49,9 @@ module.exports = {
5449
},
5550
overrides: [
5651
{
57-
files: [
58-
'*ML.js',
59-
],
52+
files: ['*ML.js'],
6053
rules: {
61-
indent: [
62-
'error',
63-
2,
64-
],
54+
indent: ['error', 2],
6555
},
6656
},
6757
],

.github/workflows/PR-review.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: AI Code Reviewer
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
7+
permissions:
8+
contents: read
9+
pull-requests: write
10+
issues: write
11+
12+
jobs:
13+
gemini-code-review:
14+
runs-on: ubuntu-latest
15+
if: |
16+
github.event.issue.pull_request &&
17+
contains(github.event.comment.body, '/gemini-review')
18+
steps:
19+
- name: PR Info
20+
env:
21+
#Assign untrusted inputs to environment variables first
22+
COMMENT_BODY: ${{ github.event.comment.body }}
23+
ISSUE_NUM: ${{ github.event.issue.number }}
24+
REPO: ${{ github.repository }}
25+
#Use shell variables ("$VAR") instead of template tags
26+
run: |
27+
echo "Comment: $COMMENT_BODY"
28+
echo "Issue Number: $ISSUE_NUM"
29+
echo "Repository: $REPO"
30+
31+
- name: Checkout Repo
32+
uses: actions/checkout@v3
33+
with:
34+
fetch-depth: 0
35+
ref: refs/pull/${{ github.event.issue.number }}/head
36+
37+
- name: Get PR Details
38+
id: pr
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
REPO: ${{ github.repository }}
42+
ISSUE_NUM: ${{ github.event.issue.number }}
43+
#Use env vars for the API call to prevent injection
44+
#Use quotes around variables to prevent word splitting
45+
run: |
46+
PR_JSON=$(gh api "repos/$REPO/pulls/$ISSUE_NUM")
47+
echo "head_sha=$(echo "$PR_JSON" | jq -r .head.sha)" >> $GITHUB_OUTPUT
48+
echo "base_sha=$(echo "$PR_JSON" | jq -r .base.sha)" >> $GITHUB_OUTPUT
49+
50+
- uses: truongnh1992/gemini-ai-code-reviewer@main
51+
with:
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
54+
GEMINI_MODEL: gemini-2.5-flash
55+
EXCLUDE: "*.md,*.txt,package-lock.json"

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
build:
1414
strategy:
1515
matrix:
16-
node-version: [14.x]
16+
node-version: [18.x]
1717
os: [ubuntu-latest]
1818
runs-on: ${{ matrix.os }}
1919

@@ -24,4 +24,4 @@ jobs:
2424
with:
2525
node-version: ${{ matrix.node-version }}
2626
- run: npm ci
27-
- run: npm run build --if-present
27+
- run: NODE_OPTIONS=--openssl-legacy-provider npm run build --if-present
Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,33 @@
11
name: Build and Deploy
22

33
on: workflow_dispatch
4+
45
jobs:
56
build-and-deploy:
67
runs-on: ubuntu-latest
78
strategy:
89
matrix:
9-
node-version: [16.x]
10+
node-version: [18.x]
1011
steps:
1112
- name: Checkout 🛎️
12-
uses: actions/checkout@v2.3.1
13+
uses: actions/checkout@v4
14+
1315
- name: Use Node.js ${{ matrix.node-version }}
1416
uses: actions/setup-node@v3
1517
with:
1618
node-version: ${{ matrix.node-version }}
19+
20+
- name: Clear npm cache
21+
run: npm cache clean --force
22+
1723
- name: Install and Build 🔧
1824
run: |
25+
export NODE_OPTIONS=--openssl-legacy-provider
1926
npm ci
2027
npm run build
2128
2229
- name: Deploy 🚀
23-
uses: JamesIves/github-pages-deploy-action@4.1.3
30+
uses: JamesIves/github-pages-deploy-action@v4
2431
with:
25-
branch: gh-pages # The branch the action should deploy to.
26-
folder: build # The folder the action should deploy.
32+
branch: gh-pages
33+
folder: build

.github/workflows/greetings.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Greetings
2+
3+
on:
4+
pull_request_target:
5+
types: [opened]
6+
issues:
7+
types: [opened]
8+
9+
jobs:
10+
greeting:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
issues: write
14+
pull-requests: write
15+
steps:
16+
- uses: actions/first-interaction@v3
17+
with:
18+
repo_token: ${{ secrets.GITHUB_TOKEN }}
19+
20+
issue_message: |
21+
👋 Welcome to the CONTROL-CORE Project, @${{ github.actor }}! Thank you for opening your first issue in concore-editor.
22+
We appreciate your contribution to the organization and will review it as soon as possible.
23+
24+
Before we get started, please check out these resources:
25+
- 📚 [Project Documentation](https://control-core.readthedocs.io/)
26+
- 📘 [Contribution Guidelines](https://github.com/ControlCore-Project/concore/blob/main/CONTRIBUTING.md)
27+
- 📜 [Code of Conduct](https://github.com/ControlCore-Project/concore/blob/main/CODE_OF_CONDUCT.md)
28+
29+
pr_message: |
30+
🎉 Welcome aboard, @${{ github.actor }}! Thank you for your first pull request in concore-editor.
31+
32+
Please ensure that you are contributing to the **dev** branch.
33+
34+
Your contribution means a lot to us. We'll review it shortly.
35+
36+
Please ensure you have reviewed our:
37+
- 📚 [Project Documentation](https://control-core.readthedocs.io/)
38+
- 📘 [Contribution Guidelines](https://github.com/ControlCore-Project/concore/blob/main/CONTRIBUTING.md)
39+
- 📜 [Code of Conduct](https://github.com/ControlCore-Project/concore/blob/main/CODE_OF_CONDUCT.md)
40+
41+
If you have any questions, feel free to ask. Happy coding!

Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM node:17-alpine AS build
2+
3+
WORKDIR /app
4+
COPY package.json package-lock.json ./
5+
RUN npm install
6+
7+
COPY . .
8+
9+
RUN npm run build
10+
11+
FROM nginx:stable-alpine
12+
13+
COPY --from=build /app/build /usr/share/nginx/html
14+
15+
EXPOSE 80
16+
17+
CMD ["nginx", "-g", "daemon off;"]

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# The _concore_ Editor
22

3-
This is a fork of DHGWorkflow, visual Directed Hypergraph Workflow Composer, finetuned to operate as a frontend for _concore_.
3+
This is a Directed Hypergraph Workflow Composer, which operates as a visual frontend for _concore_.
44

55
Key Features of the _concore_ Editor:
66
* Export-import graph as a graphml file.
@@ -14,7 +14,7 @@ and many more!
1414

1515

1616
## Installing it locally
17-
This is a frontend tool built with React Js.
17+
This is a tool built with React Js.
1818
Steps to start it locally
1919
1. Clone the repository
2020
2. At the root of the repository, run the following commands:

craco.config.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
const webpack = require('webpack');
2+
3+
module.exports = {
4+
webpack: {
5+
configure: (webpackConfig) => {
6+
const newConfig = { ...webpackConfig }; // copy the original config
7+
8+
newConfig.resolve = {
9+
...newConfig.resolve,
10+
fallback: {
11+
...newConfig.resolve.fallback,
12+
timers: require.resolve('timers-browserify'),
13+
util: require.resolve('util/'),
14+
stream: require.resolve('stream-browserify'),
15+
buffer: require.resolve('buffer/'),
16+
process: require.resolve('process/browser.js'),
17+
},
18+
};
19+
20+
newConfig.plugins = [
21+
...newConfig.plugins,
22+
new webpack.ProvidePlugin({
23+
Buffer: ['buffer', 'Buffer'],
24+
process: 'process/browser.js',
25+
}),
26+
];
27+
28+
return newConfig;
29+
},
30+
},
31+
};

0 commit comments

Comments
 (0)