Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/GMOD/Apollo3 into gff-conve…
Browse files Browse the repository at this point in the history
…rsion-test
  • Loading branch information
dariober committed Sep 18, 2024
2 parents ca6fa5e + 60b512e commit f22d809
Show file tree
Hide file tree
Showing 60 changed files with 11,874 additions and 1,720 deletions.
8 changes: 5 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ module.exports = {
'eslint:recommended',
'plugin:unicorn/recommended',
'plugin:cypress/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'plugin:@typescript-eslint/strict-type-checked',
'plugin:@typescript-eslint/stylistic-type-checked',
],
plugins: ['tsdoc', 'sort-destructure-keys'],
plugins: ['import', 'tsdoc', 'sort-destructure-keys'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: true,
Expand Down Expand Up @@ -71,8 +70,11 @@ module.exports = {
{ allowNumber: true },
],
'@typescript-eslint/return-await': 'error',
// eslint-plugin-import rules (override recommended)
// eslint-plugin-import rules
'import/export': 'error',
'import/no-duplicates': 'warn',
'import/no-extraneous-dependencies': 'error',
'import/no-named-as-default': 'warn',
// eslint-plugin-sort-destructure-keys rules
'sort-destructure-keys/sort-destructure-keys': 'warn',
// eslint-plugin-tsdoc rules
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Deploy Docusaurus to website

on:
workflow_call:
workflow_dispatch:

jobs:
reload:
name: Deploy Docusaurus to website
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v4
- name: Use Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 18
cache: yarn
- name: Install
run: yarn --immutable
- name: Build website
working-directory: packages/website
run: yarn build
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Upload
working-directory: packages/website
run: |
aws s3 sync --delete build/ s3://apollo.jbrowse.org/
aws cloudfront create-invalidation --distribution-id EL84YTOVCGNJZ --paths '/*'
29 changes: 23 additions & 6 deletions .husky/pre-commit.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,30 @@ function main() {
spawn.sync(
'yarn',
['workspace', '@apollo-annotation/cli', 'oclif', 'readme'],
{
stdio: 'inherit',
},
{ stdio: 'inherit' },
)
spawn.sync(
'yarn',
[
'workspace',
'@apollo-annotation/cli',
'oclif',
'readme',
'--multi',
'--dir',
'../website/docs/cli/',
],
{ stdio: 'inherit' },
)
spawn.sync(
'git',
[
'add',
'packages/apollo-cli/README.md',
'packages/website/docs/cli/*.md',
],
{ stdio: 'inherit' },
)
spawn.sync('git', ['add', 'packages/apollo-cli/README.md'], {
stdio: 'inherit',
})
}
}

Expand Down
40 changes: 18 additions & 22 deletions packages/apollo-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- [Table of contents](#table-of-contents)
- [Usage](#usage)
- [Commands](#commands)
- [Command Topics](#command-topics)
<!-- tocstop -->

# Usage
Expand All @@ -29,27 +30,22 @@ USAGE

<!-- commands -->

- [`apollo help [COMMANDS]`](#apollo-help-commands)

## `apollo help [COMMANDS]`

Display help for apollo.

```
USAGE
$ apollo help [COMMANDS] [-n]
ARGUMENTS
COMMANDS Command to show help for.
FLAGS
-n, --nested-commands Include all nested commands in the output.
DESCRIPTION
Display help for apollo.
```

_See code:
[@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.0.8/src/commands/help.ts)_
# Command Topics

- [`apollo assembly`](../website/docs/cli//assembly.md) - Commands to handle
assemblies
- [`apollo change`](../website/docs/cli//change.md) - Commands to handle the log
of changes made to the database
- [`apollo config`](../website/docs/cli//config.md) - Get or set apollo
configuration options
- [`apollo feature`](../website/docs/cli//feature.md) - Commands to handle
features
- [`apollo help`](../website/docs/cli//help.md) - Display help for apollo.
- [`apollo login`](../website/docs/cli//login.md) - Login to Apollo
- [`apollo logout`](../website/docs/cli//logout.md) - Logout of Apollo
- [`apollo refseq`](../website/docs/cli//refseq.md) - Commands to handle
reference sequences
- [`apollo status`](../website/docs/cli//status.md) - View authentication status
- [`apollo user`](../website/docs/cli//user.md) - Commands to handle users

<!-- commandsstop -->
2 changes: 1 addition & 1 deletion packages/apollo-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"test": "mocha --require src/test/fixtures.ts 'src/**/*.test.ts'",
"posttest": "yarn lint",
"test:ci": "nyc mocha 'src/**/*.test.ts'",
"version": "oclif readme && git add README.md"
"version": "oclif readme --multi --dir ../website/docs/cli/ && oclif readme && git add README.md"
},
"oclif": {
"bin": "apollo",
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-collaboration-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
"@types/passport-jwt": "^3.0.6",
"@types/passport-local": "^1.0.34",
"@types/passport-microsoft": "^0.0.0",
"@types/react": "^17.0.34",
"@types/react": "^18.3.4",
"@types/supertest": "^2.0.11",
"jest": "^29.6.2",
"mongodb": "^4.7.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/jbrowse-plugin-apollo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"@types/file-saver": "^2",
"@types/node": "^18.14.2",
"@types/prop-types": "^15",
"@types/react": "^17.0.34",
"@types/react": "^18.3.4",
"@types/react-dom": "^18",
"cypress": "12.17.3",
"cypress-mongodb": "^6.2.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
/* eslint-disable @typescript-eslint/no-unsafe-return */
/* eslint-disable import/no-named-as-default-member */
// jsonpath triggers this rule for some reason. import { query } from 'jsonpath' does not work

import { checkAbortSignal } from '@jbrowse/core/util'
Expand Down
6 changes: 6 additions & 0 deletions packages/website/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Production
/build

# Generated files
.docusaurus
.cache-loader
Empty file added packages/website/.yarnrc.yml
Empty file.
45 changes: 45 additions & 0 deletions packages/website/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Website

This website is built using [Docusaurus](https://docusaurus.io/), a modern
static website generator.

### Installation

```
$ yarn
```

### Local Development

```
$ yarn start
```

This command starts a local development server and opens up a browser window.
Most changes are reflected live without having to restart the server.

### Build

```
$ yarn build
```

This command generates static content into the `build` directory and can be
served using any static contents hosting service.

### Deployment

Using SSH:

```
$ USE_SSH=true yarn deploy
```

Not using SSH:

```
$ GIT_USER=<Your GitHub username> yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to
build the website and push to the `gh-pages` branch.
4 changes: 4 additions & 0 deletions packages/website/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/* eslint-disable no-undef */
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
}
8 changes: 8 additions & 0 deletions packages/website/docs/cli/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "CLI",
"position": 3,
"link": {
"type": "generated-index",
"description": "Apollo 3 Command Line Interface (CLI)"
}
}
Loading

0 comments on commit f22d809

Please sign in to comment.