Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Explorer] Set up Conductor's explorer module and interface #113

Merged
merged 4 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ dist
cond-out

src/conductor/envs/resources/*.whl

explorer/node_modules/
explorer/dist/
6 changes: 6 additions & 0 deletions errors/errors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,3 +230,9 @@
message: >-
There is no relevant output path for '{task_identifier}'. For most tasks,
this just means that you need to run the task first.

5012:
name: MissingExplorerSupport
message: >-
This feature requires support for Conductor's explorer. Please install
Conductor with the [explore] features.
1 change: 1 addition & 0 deletions explorer/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist/**
3 changes: 3 additions & 0 deletions explorer/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist
node_modules
__pycache__
4 changes: 4 additions & 0 deletions explorer/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"tabWidth": 2,
"semi": true
}
12 changes: 12 additions & 0 deletions explorer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Conductor Explorer

This directory contains the code used for Conductor's explorer. To launch the
explorer, run `cond explorer`. The instructions below are for development.

## Development

- Run `npm install` (only need to do once)
- Run `npm run watch` inside this directory
- Run `cond explorer` to launch the explorer backend and web server (required
for access to Conductor APIs)

Empty file added explorer/dist/__init__.py
Empty file.
38 changes: 38 additions & 0 deletions explorer/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import js from '@eslint/js'
import globals from 'globals'
import react from 'eslint-plugin-react'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'

export default [
{ ignores: ['dist'] },
{
files: ['**/*.{js,jsx}'],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
parserOptions: {
ecmaVersion: 'latest',
ecmaFeatures: { jsx: true },
sourceType: 'module',
},
},
settings: { react: { version: '18.3' } },
plugins: {
react,
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
rules: {
...js.configs.recommended.rules,
...react.configs.recommended.rules,
...react.configs['jsx-runtime'].rules,
...reactHooks.configs.recommended.rules,
'react/jsx-no-target-blank': 'off',
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
},
]
12 changes: 12 additions & 0 deletions explorer/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Conductor Explorer</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>
Loading