Skip to content

Commit

Permalink
Use prettier to word wrap markdown prose (#3396)
Browse files Browse the repository at this point in the history
* Update docs with word wrapping using prettier

* Format rest of codebase
  • Loading branch information
cmdcolin committed Dec 13, 2022
1 parent 3151648 commit 371db6b
Show file tree
Hide file tree
Showing 355 changed files with 6,673 additions and 4,469 deletions.
3 changes: 2 additions & 1 deletion .prettierrc.json
Expand Up @@ -2,5 +2,6 @@
"semi": false,
"singleQuote": true,
"trailingComma": "all",
"arrowParens": "avoid"
"arrowParens": "avoid",
"proseWrap": "always"
}
2,914 changes: 2,147 additions & 767 deletions CHANGELOG.md

Large diffs are not rendered by default.

32 changes: 17 additions & 15 deletions CODE_OF_CONDUCT.md
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 jbrowse-conduct@lists.berkeley.edu. 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 jbrowse-conduct@lists.berkeley.edu.
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
62 changes: 31 additions & 31 deletions CONTRIBUTING.md
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,16 +55,16 @@ 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

### Releasing/publishing

There is a script `scripts/release.sh` that will publish the public packages in
the monorepo to NPM and trigger the creation of a release on GitHub. To run
this script:
the monorepo to NPM and trigger the creation of a release on GitHub. To run this
script:

- Ensure that there is an announcement file for this release in
`website/release_announcement_drafts/<tag>.md` containing an overview of the
Expand All @@ -78,12 +78,12 @@ this 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.
Expand All @@ -96,15 +96,15 @@ If you don't provide `versionIncreaseLevel`, it will default to "patch".

This will trigger a GitHub workflow that will create a draft release on GitHub,
build JBrowse Web, and upload the build to that release. It will also trigger
workflows that will build JBrowse Desktop for Windows, Mac, and Linux and
upload those to the release as well.
workflows that will build JBrowse Desktop for Windows, Mac, and Linux and upload
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 @@ -124,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 @@ -188,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 @@ -227,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 All @@ -246,14 +246,14 @@ Plugins may be built as separate packages that can be distributed on NPM. In
order to streamline development and avoid having to build every plugin before
developing on e.g. JBrowse Web, however, the `package.json`'s "main" entry for
plugins in this monorepo by default points to the un-built code (e.g.
`src/index.ts`). JBrowse Web then takes care of building the plugins itself
(see `products/jbrowse-web/rescripts/yarnWorkspacesRescript.js`).
`src/index.ts`). JBrowse Web then takes care of building the plugins itself (see
`products/jbrowse-web/rescripts/yarnWorkspacesRescript.js`).

When you want to use a built plugin, you can run `yarn useDist` in the plugin's
`package.json`, and then run `yarn useSrc` to restore it when you're done. As
an example, the root-level `yarn build` that builds all the packages does this
to build all the plugins and then build JBrowse Web and JBrowse Desktop using
the built plugins.
`package.json`, and then run `yarn useSrc` to restore it when you're done. As an
example, the root-level `yarn build` that builds all the packages does this to
build all the plugins and then build JBrowse Web and JBrowse Desktop using the
built plugins.

## Preparing sample data sets

Expand All @@ -277,8 +277,8 @@ jbrowse text-index -a hg19 --tracks ncbi_gff_hg19 --out config_demo.json --force
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

Expand Down
3 changes: 2 additions & 1 deletion component_tests/cgv/README.md
@@ -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
3 changes: 2 additions & 1 deletion component_tests/lgv/README.md
@@ -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
9 changes: 6 additions & 3 deletions demos/jbrowse-react-circular-genome-view-cra5/README.md
@@ -1,14 +1,17 @@
# jbrowse-react-circular-genome-view-cra5

This is a demo of using the circular genome view with create-react-app v5 (which uses webpack 5)
This is a demo of using the circular genome view with create-react-app v5 (which
uses webpack 5)

It uses craco to add the webpack NodePolyfillPlugin (used for Buffer polyfill, etc)
It uses craco to add the webpack NodePolyfillPlugin (used for Buffer polyfill,
etc)

# Demo of `@jbrowse/react-circular-genome-view` with CRA 5

See this app running at https://jbrowse.org/demos/cgv-cra5/.

Download this directory from the monorepo using https://download-directory.github.io/?url=https%3A%2F%2Fgithub.com%2FGMOD%2Fjbrowse-components%2Ftree%2Fmain%2Fdemos%2Fjbrowse-react-circular-genome-view-cra5
Download this directory from the monorepo using
https://download-directory.github.io/?url=https%3A%2F%2Fgithub.com%2FGMOD%2Fjbrowse-components%2Ftree%2Fmain%2Fdemos%2Fjbrowse-react-circular-genome-view-cra5

## Usage

Expand Down
3 changes: 2 additions & 1 deletion demos/jbrowse-react-circular-genome-view-vanillajs/README.md
Expand Up @@ -2,7 +2,8 @@

See this app running at https://jbrowse.org/demos/cgv-vanillajs/.

Download this directory from the monorepo using https://download-directory.github.io/?url=https%3A%2F%2Fgithub.com%2FGMOD%2Fjbrowse-components%2Ftree%2Fmain%2Fdemos%2Fjbrowse-react-circular-genome-view-vanillajs
Download this directory from the monorepo using
https://download-directory.github.io/?url=https%3A%2F%2Fgithub.com%2FGMOD%2Fjbrowse-components%2Ftree%2Fmain%2Fdemos%2Fjbrowse-react-circular-genome-view-vanillajs

## Usage

Expand Down
9 changes: 6 additions & 3 deletions demos/jbrowse-react-linear-genome-view-cra5/README.md
@@ -1,14 +1,17 @@
# jbrowse-react-linear-genome-view-cra5

This is a demo of using the linear genome view with create-react-app v5 (which uses webpack 5)
This is a demo of using the linear genome view with create-react-app v5 (which
uses webpack 5)

It uses craco to add the webpack NodePolyfillPlugin (used for Buffer polyfill, etc)
It uses craco to add the webpack NodePolyfillPlugin (used for Buffer polyfill,
etc)

# Demo of `@jbrowse/react-linear-genome-view` with CRA 5

See this app running at https://jbrowse.org/demos/lgv-cra5/.

Download this directory from the monorepo using https://download-directory.github.io/?url=https%3A%2F%2Fgithub.com%2FGMOD%2Fjbrowse-components%2Ftree%2Fmain%2Fdemos%2Fjbrowse-react-linear-genome-view-cra5
Download this directory from the monorepo using
https://download-directory.github.io/?url=https%3A%2F%2Fgithub.com%2FGMOD%2Fjbrowse-components%2Ftree%2Fmain%2Fdemos%2Fjbrowse-react-linear-genome-view-cra5

## Usage

Expand Down
9 changes: 6 additions & 3 deletions demos/jbrowse-react-linear-genome-view-nextjs/README.md
@@ -1,12 +1,14 @@
# jbrowse-react-linear-genome-view-nextjs

This is a demo of using the linear genome view with next.js 11 (which uses webpack 5)
This is a demo of using the linear genome view with next.js 11 (which uses
webpack 5)

# Demo of `@jbrowse/react-linear-genome-view` with next.js

See this app running at https://jbrowse.org/demos/lgv-nextjs/.

Download this directory from the monorepo using https://download-directory.github.io/?url=https%3A%2F%2Fgithub.com%2FGMOD%2Fjbrowse-components%2Ftree%2Fmain%2Fdemos%2Fjbrowse-react-linear-genome-view-nextjs
Download this directory from the monorepo using
https://download-directory.github.io/?url=https%3A%2F%2Fgithub.com%2FGMOD%2Fjbrowse-components%2Ftree%2Fmain%2Fdemos%2Fjbrowse-react-linear-genome-view-nextjs

## Getting Started

Expand All @@ -20,4 +22,5 @@ yarn dev

## Deploy

This page is deployed to https://jbrowse.org/demos/lgv-nextjs (uses `yarn build && yarn export` to create static build with no server side)
This page is deployed to https://jbrowse.org/demos/lgv-nextjs (uses
`yarn build && yarn export` to create static build with no server side)
3 changes: 2 additions & 1 deletion demos/jbrowse-react-linear-genome-view-vanillajs/README.md
Expand Up @@ -2,7 +2,8 @@

See this app running at https://jbrowse.org/demos/lgv-vanillajs/.

Download this directory from the monorepo using https://download-directory.github.io/?url=https%3A%2F%2Fgithub.com%2FGMOD%2Fjbrowse-components%2Ftree%2Fmain%2Fdemos%2Fjbrowse-react-linear-genome-view-vanillajs
Download this directory from the monorepo using
https://download-directory.github.io/?url=https%3A%2F%2Fgithub.com%2FGMOD%2Fjbrowse-components%2Ftree%2Fmain%2Fdemos%2Fjbrowse-react-linear-genome-view-vanillajs

## Usage

Expand Down
15 changes: 10 additions & 5 deletions demos/jbrowse-react-linear-genome-view-vite/README.md
@@ -1,18 +1,23 @@
# vite with @jbrowse/react-linear-genome-view

Based on https://codesandbox.io/s/ylt4t?file=/vite.config.ts:478-540 by @garrettjstevens
Based on https://codesandbox.io/s/ylt4t?file=/vite.config.ts:478-540 by
@garrettjstevens

This is a demo of using the linear genome view with vite (see https://vitejs.dev/)
This is a demo of using the linear genome view with vite (see
https://vitejs.dev/)

Vite is a build system that is very fast and becoming more popular, using esbuild and rollup instead of webpack
Vite is a build system that is very fast and becoming more popular, using
esbuild and rollup instead of webpack

This particular demo includes several polyfills that are needed for JBrowse including the Buffer polyfill
This particular demo includes several polyfills that are needed for JBrowse
including the Buffer polyfill

# Demo of `@jbrowse/react-linear-genome-view` with vite

See this app running at https://jbrowse.org/demos/lgv-vite/.

Download this directory from the monorepo using https://download-directory.github.io/?url=https%3A%2F%2Fgithub.com%2FGMOD%2Fjbrowse-components%2Ftree%2Fmain%2Fdemos%2Fjbrowse-react-linear-genome-view-vite
Download this directory from the monorepo using
https://download-directory.github.io/?url=https%3A%2F%2Fgithub.com%2FGMOD%2Fjbrowse-components%2Ftree%2Fmain%2Fdemos%2Fjbrowse-react-linear-genome-view-vite

## Usage

Expand Down
3 changes: 2 additions & 1 deletion docs/README.md
Expand Up @@ -34,7 +34,8 @@ and
*/
```

it is not able to document a single variable, so in some places, a dummy function is put below the `#config/#stateModel` comments
it is not able to document a single variable, so in some places, a dummy
function is put below the `#config/#stateModel` comments

```
function x(){}
Expand Down
8 changes: 6 additions & 2 deletions packages/core/README.md
@@ -1,7 +1,8 @@
# jbrowse-core

[![NPM version](https://img.shields.io/npm/v/@jbrowse/core.svg?style=flat-square)](https://npmjs.org/package/@jbrowse/core)
[![Build Status](https://img.shields.io/travis/GMOD/jbrowse-components/main.svg?style=flat-square)](https://travis-ci.org/GMOD/jbrowse-components) [![Coverage Status](https://img.shields.io/codecov/c/github/GMOD/jbrowse-components/main.svg?style=flat-square)](https://codecov.io/gh/GMOD/jbrowse-components/branch/main)
[![Build Status](https://img.shields.io/travis/GMOD/jbrowse-components/main.svg?style=flat-square)](https://travis-ci.org/GMOD/jbrowse-components)
[![Coverage Status](https://img.shields.io/codecov/c/github/GMOD/jbrowse-components/main.svg?style=flat-square)](https://codecov.io/gh/GMOD/jbrowse-components/branch/main)

Core JBrowse libraries used by most JBrowse plugins.

Expand All @@ -11,7 +12,10 @@ See [docs](docs/README.md)

## Academic Use

This package was written with funding from the [NHGRI](http://genome.gov) as part of the [JBrowse](http://jbrowse.org) project. If you use it in an academic project that you publish, please cite the most recent JBrowse paper, which will be linked from [jbrowse.org](http://jbrowse.org).
This package was written with funding from the [NHGRI](http://genome.gov) as
part of the [JBrowse](http://jbrowse.org) project. If you use it in an academic
project that you publish, please cite the most recent JBrowse paper, which will
be linked from [jbrowse.org](http://jbrowse.org).

## License

Expand Down

0 comments on commit 371db6b

Please sign in to comment.