Skip to content

anocca-ab/sequence-viewer

Repository files navigation

Anocca sequence viewer

A DNA and protein sequence viewer developed and maintained by Anocca.

GitHub Repo stars

Packages

name version downloads changelog
@anocca/sequence-viewer-render-linear npm npm npm
@anocca/sequence-viewer-react-mui npm npm npm
@anocca/sequence-viewer-react-shared npm npm npm
@anocca/sequence-viewer-app npm npm npm
@anocca/sequence-viewer-react-circular npm npm npm
@anocca/sequence-viewer-react-linear npm npm npm
@anocca/sequence-viewer-utils npm npm npm
@anocca/sequence-viewer-render-circular npm npm npm
@anocca/sequence-viewer-backend-react-state npm npm npm
@anocca/sequence-viewer-react-mui-formik-form npm npm npm

Developer guide

Setting up your git credentials

git config --local user.email '<Your GitHub username>@users.noreply.github.com'

Required programs

pnpm

curl -fsSL https://get.pnpm.io/install.sh | sh -

rush

npm install -g @microsoft/rush

heft

npm install -g @rushstack/heft

api-extractor

npm install -g @microsoft/api-documenter

Updating the packages and previewing result in the website

  1. Go to the website folder.

  2. Install dependencies: yarn install

  3. Start the server: yarn start

  4. Make updates in the packages

  5. Build your changes rush build -T @anocca/sequence-viewer-website

  6. See result in browser

Updating the general docs

Go to the website folder.

Install dependencies: yarn install

Start the server: yarn start

Deploy the docs: GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy

Updating API docs

If you've updated the docstrings in the code run:

npm install -g @microsoft/api-documenter
cd website && ./write-docs.sh

This requires api-extractor (npm install -g @microsoft/api-documenter)

Update changelogs

rush change

Bump versions

rush version --bump

Publish npm packages

NPM_AUTH_TOKEN=npm_... rush publish -p --include-all

Useful vscode extension

The vscode-monorepo-workspace extension can make some of the tooling like prettier and eslint work better in vscode.

Creating a PR

When you have made changes, please describe which issue it solves and how it has been tested

Convert all files to LF

⚠ will not work if there are spaces in the file names

git ls-tree --full-tree -r --name-only HEAD | xargs dos2unix

We are using the following settings, which is automatically enforced by the .gitattributes file:

git config --local core.eol lf # all checked out files should have LF
git config --local core.autocrlf input # convert all added CRLF to LF when staging

Get latest version of each package

cat rush.json | \
grep -A 2 '"packageName": "@anocca' | \
grep -B 2 '"shouldPublish": true' | \
grep 'projectFolder' | \
awk '{ print substr($2, 2, length($2)-3) "/package.json" }' | \
xargs cat | \
grep -B 1 '"version"' | \
sed 'N;N;s/\n/ /g;s/--//' | \
awk '{ print substr($2, 1, length($2)-1) ": " $4 }'