Skip to content

Commit

Permalink
[skip ci] Merge origin/main
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Jan 4, 2023
2 parents 5b87421 + dec0845 commit 427f575
Show file tree
Hide file tree
Showing 1,326 changed files with 59,334 additions and 42,926 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ products/jbrowse-web/scripts/**
/products/jbrowse-web/config/
products/jbrowse-desktop/public/electron.js
products/jbrowse-desktop/public/generateFastaIndex.js
/demos/
/embedded_demos/
webpack.config.js
craco.config.js
packages/core/util/QuickLRU.js
Expand Down
3 changes: 1 addition & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-unused-vars": ["warn"],
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-unused-expressions": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-redeclare": "off",

"no-use-before-define": "off",
"curly": "error",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/desktop_build_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: bahmutov/npm-install@v1
- name: Install build deps
run: |
sudo apt install -y python make gcc libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
sudo apt install -y python3 make gcc libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
- name: Build app
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/desktop_build_win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
apt install --yes wine wine32 wine64 libwine libwine:i386 fonts-wine
- name: Install build deps
run: |
apt install --yes python make gcc libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
apt install --yes python3 make gcc libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
- name: Build app
env:
WIN_CSC_LINK: ${{ secrets.WIN_CSC_LINK }}
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,12 @@ jobs:
uses: bahmutov/npm-install@v1
- name: Check codebase format
run: yarn prettier --check .

spellcheck:
name: Spell check
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Check spelling
uses: crate-ci/typos@master
2 changes: 1 addition & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ jobs:
aws-region: us-east-1
- name: Copy branch build to S3
run: |
cp products/jbrowse-web/build/test_data/config.json products/jbrowse-web/build/config.json
cd products/jbrowse-web/build && zip -r "jbrowse-web-$(echo ${{github.ref}} | cut -d '/' -f3-).zip" . && cd -
cp products/jbrowse-web/build/test_data/config.json products/jbrowse-web/build/config.json
aws s3 sync --delete products/jbrowse-web/build s3://jbrowse.org/code/jb2/$(echo ${{github.ref}} | cut -d "/" -f3-)
storybook_lgv:
name: Build and deploy static linear genome view Storybook site to AWS S3
Expand Down
21 changes: 21 additions & 0 deletions .ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
*.ix
test_data/large.chrom.sizes
packages/core/ui/react-colorful.js
plugins/legacy-jbrowse/test_data
plugins/data-management/src/ucsc-trackhub/ucscAssemblies.ts
plugins/circular-view/test_data/circos_example_content.txt
plugins/circular-view/test_data/circos_example.svg
products/jbrowse-web/src/tests/Loader.test.tsx
test_data/yeast_synteny/
test_data/hg38_aliases.txt
test_data/config_honeybee.json
test_data/amel_hav3.1.chrom.sizes
plugins/wiggle/src/util.ts
plugins/protein/src/ProteinReferenceSequenceRenderer/aminoAcids.js
plugins/spreadsheet-view/src/SpreadsheetView/test_data/starfusion_example.fusion_predictions.tsv
products/jbrowse-aws-lambda-functions/
products/jbrowse-desktop/src/JBrowse.test.tsx
test_data/volvox/names/
products/jbrowse-web/src/sessionSharing.ts
website/docs/models/
*.snap
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@
# JSON files we don't want to format
**/*nclist*/**/*.json
**/ensembl_genes/**/*.json
**/storybook-static/*
3 changes: 2 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"semi": false,
"singleQuote": true,
"trailingComma": "all",
"arrowParens": "avoid"
"arrowParens": "avoid",
"proseWrap": "always"
}
3,277 changes: 2,546 additions & 731 deletions CHANGELOG.md

Large diffs are not rendered by default.

32 changes: 17 additions & 15 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
size, disability, ethnicity, sex characteristics, gender identity and
expression, level of experience, education, socio-economic status, nationality,
personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Expand Down Expand Up @@ -37,11 +37,11 @@ Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
Project maintainers have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, or to ban temporarily or permanently any
contributor for other behaviors that they deem inappropriate, threatening,
offensive, or harmful.

## Scope

Expand All @@ -55,20 +55,22 @@ a project may be further defined and clarified by project maintainers.
## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [email protected]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
reported by contacting the project team at [email protected].
All complaints will be reviewed and investigated and will result in a response
that is deemed necessary and appropriate to the circumstances. The project team
is obligated to maintain confidentiality with regard to the reporter of an
incident. Further details of specific enforcement policies may be posted
separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.4, available at
https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

Expand Down
66 changes: 38 additions & 28 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ yarn
yarn start
```

You can edit the markdown by hand. The documentation is built into a website
and a PDF using latex here http://jbrowse.org/jb2/jbrowse2.pdf
You can edit the markdown by hand. The documentation is built into a website and
a PDF using latex here http://jbrowse.org/jb2/jbrowse2.pdf

### Adding images to the docs

Expand All @@ -55,8 +55,8 @@ line in the markdown
Your caption of the image here
```

This creates a caption of the image properly in the PDF, and just shows the
text below the image on the website
This creates a caption of the image properly in the PDF, and just shows the text
below the image on the website

## Developers

Expand All @@ -78,21 +78,19 @@ script:
need to generate an access token.

- Make sure you have a GitHub access token with public_repo scope. To generate
one, go to https://github.com/settings/tokens, click "Generate new token,"
add a note describing what you want the token to be for, select the
"public_repo" checkbox (under "repo"), and then click "Generate token." Make
sure to save this token in a safe place to use for future releases as you
won't be able to see it again. If you do lose your token, delete/revoke the
token you lost and generate a new one.
one, go to https://github.com/settings/tokens, click "Generate new token," add
a note describing what you want the token to be for, select the "public_repo"
checkbox (under "repo"), and then click "Generate token." Make sure to save
this token in a safe place to use for future releases as you won't be able to
see it again. If you do lose your token, delete/revoke the token you lost and
generate a new one.

- Decide if the release should have a major, minor, or patch level version
increase. All packages that are published will get the same version number.

Run the script like this:

```
scripts/release.sh myGitHubAuthToken versionIncreaseLevel
```
`scripts/release.sh myGitHubAuthToken versionIncreaseLevel`

If you don't provide `versionIncreaseLevel`, it will default to "patch".

Expand All @@ -104,9 +102,9 @@ those to the release as well.
Once the draft release has been created (you can look for it
[here](https://github.com/GMOD/jbrowse-components/releases)), go to the release
and click "Edit," then add a description to the release. Usually you can copy
the content of the blog post that was generated (it will be named something
like `website/blog/${DATE}-${RELEASE_TAG}-release.md`), removing the
"Downloads" section.
the content of the blog post that was generated (it will be named something like
`website/blog/${DATE}-${RELEASE_TAG}-release.md`), removing the "Downloads"
section.

Note that it is very helpful to run the release from a computer with a stable
and fast internet connection. One option for this is to run it from a AWS
Expand All @@ -126,8 +124,8 @@ uploaded, the workflows will refuse to add them to the published release since
it looks for draft releases)

Finally, run the update_demos.sh script from within the demos folder of the
monorepo after the packages have been published. This will update the `demos`
to use the latest version, and then publish them to our S3 bucket e.g. at
monorepo after the packages have been published. This will update the `demos` to
use the latest version, and then publish them to our S3 bucket e.g. at
https://jbrowse.org/demos/lgv

## Monorepo code organization
Expand Down Expand Up @@ -179,10 +177,8 @@ This package provides the "alignments" related features including

- BamAdapter - our BAM parser that wraps @gmod/bam NPM module
- CramAdapter - our CRAM parser that wraps the @gmod/cram NPM module
- PileupTrack type - draws alignments as boxes in a "pileup" style view
- SNPCoverageTrack - draws calculated coverage with mismatches drawn over the coverage
- AlignmentsTrack - a "supertrack" which contains a PileupTrack and
SNPCoverageTrack "subtracks"
- AlignmentsTrack - a "supertrack" which contains a PileupDisplay and
SNPCoverageDisplay "subtracks"
- AlignmentsFeatureWidget for alignments features

#### plugins/variants/
Expand All @@ -192,8 +188,8 @@ Provides variant features including
- VCF tabix parser
- VCF non-tabix parser
- VariantFeatureWidget
- VariantTrack that is basically just a normal track, but has logic to popup
the VariantFeatureWidget on feature click
- VariantTrack that is basically just a normal track, but has logic to popup the
VariantFeatureWidget on feature click

#### plugins/hic

Expand Down Expand Up @@ -231,8 +227,8 @@ General usage of this involves referencing the SvgFeatureRenderer

#### plugins/spreadsheet-view

This provides a spreadsheet-in-the-browser that can be used as a data backend
to power other views
This provides a spreadsheet-in-the-browser that can be used as a data backend to
power other views

#### plugins/circular-view

Expand Down Expand Up @@ -278,8 +274,22 @@ jbrowse text-index -a hg19 --tracks ncbi_gff_hg19 --out config_demo.json --force

## Notes about monorepo setup

Our setup for the monorepo takes notes from the material-ui repository. Some particular notes include
Our setup for the monorepo takes notes from the material-ui repository. Some
particular notes include

1. The use of the "flat" packages/core package, where you can import from nested subpaths like '@jbrowse/core/util'
1. The use of the "flat" packages/core package, where you can import from nested
subpaths like '@jbrowse/core/util'
2. The use of tsconfig.build.json to generate types in the final release
3. The use of referring to the src directory at development time

## Notes about yarn

Using `yarn upgrade` or `yarn upgrade-interactive --latest` can produce errors
with the latest version of yarn. This is commonly cited around the web, but
using npx to one-off run an older version of yarn can fix this issues

Example:

```
npx [email protected] upgrade-interactive --latest
```
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build Status](https://img.shields.io/github/workflow/status/GMOD/jbrowse-components/Push/main?logo=github&style=for-the-badge)](https://github.com/GMOD/jbrowse-components/actions?query=branch%3Amain+workflow%3APush+)
[![Build Status](https://img.shields.io/github/actions/workflow/status/GMOD/jbrowse-components/push.yml?branch=main&logo=github&style=for-the-badge)](https://github.com/GMOD/jbrowse-components/actions)
[![Coverage Status](https://img.shields.io/codecov/c/github/GMOD/jbrowse-components/main.svg?logo=codecov&style=for-the-badge)](https://codecov.io/gh/GMOD/jbrowse-components/branch/main)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v1.4%20adopted-ff69b4.svg?style=for-the-badge&logo=data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWd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MTIwNTYgMTIyLjAwOCA2IDExNCA2QyA2Ny42MDgxIDYgMzAgNDMuNjA4MSAzMCA5MEMgMzAgMTM2LjM5MiA2Ny42MDgxIDE3NCAxMTQgMTc0QyAxNDEuMzQ4IDE3NCAxNjUuNjQzIDE2MC45MzEgMTgwLjk4MSAxNDAuNjk4QyAxNjQuOTAzIDE3MS4yMDQgMTMyLjg4IDE5MiA5NiAxOTJDIDQyLjk4MDcgMTkyIDAgMTQ5LjAxOSAwIDk2QyAwIDQyLjk4MDcgNDIuOTgwNyAwIDk2IDBDIDExMC43MDMgMCAxMjQuNjM0IDMuMzA1MzEgMTM3LjA5IDkuMjEzNDJaIi8+PC9kZWZzPjwvc3ZnPg==)](CODE_OF_CONDUCT.md)

Expand Down Expand Up @@ -61,15 +61,19 @@ cd products/jbrowse-web
yarn start
```

For jbrowse-desktop
For jbrowse-desktop, launch two tabs

```sh
# starts webpack dev server
cd products/jbrowse-desktop
yarn start

# starts electron window
cd products/jbrowse-desktop
yarn electron
```

For running like jbrowse-react-linear-genome-view you can use
storybook
For running e.g. jbrowse-react-linear-genome-view you can use storybook

```sh
cd products/jbrowse-react-linear-genome-view
Expand Down
3 changes: 2 additions & 1 deletion component_tests/cgv/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Demo of `@jbrowse/react-linear-genome-view`

This module uses "packed" builds of the repo, and runs an e2e test using cypress.
This module uses "packed" builds of the repo, and runs an e2e test using
cypress.

It is most similar to a test that a user would get from installing the module
from NPM. Note that these `packed` builds can be heavily cached by the yarn
Expand Down
4 changes: 3 additions & 1 deletion component_tests/cgv/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "jbrowse-react-circular-genome-view-demo",
"name": "jbrowse-react-circular-genome-view-demo-integration",
"version": "0.1.0",
"private": true,
"dependencies": {
Expand Down Expand Up @@ -27,10 +27,12 @@
"resolutions": {
"@jbrowse/core": "file:./packed/jbrowse-core.tgz",
"@jbrowse/plugin-alignments": "file:./packed/jbrowse-plugin-alignments.tgz",
"@jbrowse/plugin-authentication": "file:./packed/jbrowse-plugin-authentication.tgz",
"@jbrowse/plugin-bed": "file:./packed/jbrowse-plugin-bed.tgz",
"@jbrowse/plugin-circular-view": "file:./packed/jbrowse-plugin-circular-view.tgz",
"@jbrowse/plugin-config": "file:./packed/jbrowse-plugin-config.tgz",
"@jbrowse/plugin-data-management": "file:./packed/jbrowse-plugin-data-management.tgz",
"@jbrowse/plugin-gccontent": "file:./packed/jbrowse-plugin-gccontent.tgz",
"@jbrowse/plugin-gff3": "file:./packed/jbrowse-plugin-gff3.tgz",
"@jbrowse/plugin-linear-genome-view": "file:./packed/jbrowse-plugin-linear-genome-view.tgz",
"@jbrowse/plugin-sequence": "file:./packed/jbrowse-plugin-sequence.tgz",
Expand Down
3 changes: 2 additions & 1 deletion component_tests/lgv/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Demo of `@jbrowse/react-linear-genome-view`

This module uses "packed" builds of the repo, and runs an e2e test using cypress.
This module uses "packed" builds of the repo, and runs an e2e test using
cypress.

It is most similar to a test that a user would get from installing the module
from NPM. Note that these `packed` builds can be heavily cached by the yarn
Expand Down
8 changes: 7 additions & 1 deletion component_tests/lgv/cypress/integration/basic.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
describe('JBrowse embedded view', () => {
it('page loads', () => {
Cypress.on(
// from https://github.com/cypress-io/cypress/issues/8418
'uncaught:exception',
// @ts-ignore thinks we are es5 and don't have includes, may be able to update
err => !err.message.includes('ResizeObserver loop limit exceeded'),
)
cy.visit('/')
cy.contains('JBrowse 2 React Linear Genome View Demo')
})
Expand All @@ -8,7 +14,7 @@ describe('JBrowse embedded view', () => {

// eslint-disable-next-line testing-library/await-async-query,testing-library/prefer-screen-queries
cy.findByTestId('Blockset-pileup', { timeout: 30000 }).findByTestId(
'prerendered_canvas_{GRCh38}10:29,838,637..29,838,705-0_done',
'prerendered_canvas_{GRCh38}10:29838637..29838705-0_done',
{ timeout: 30000 },
)
})
Expand Down
Loading

0 comments on commit 427f575

Please sign in to comment.