-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Preinstall script * Manually install global @angular/cli * Optimize Travis * Change timeout to more sane levels * Move configuration to config * Move openapi code generation to scripts * Silent install * Update README.md [skip ci] * nvm version file * Try using nvm version * Update README.md [skip ci] * What happens when you lint with broken imports * Rename config variable * Fix * Use variable * Comment [skip ci] * Just removing it to avoid confusion
- Loading branch information
Showing
10 changed files
with
73 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v10.13.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,19 +28,21 @@ This project was generated with [Angular CLI](https://github.com/angular/angular | |
|
||
### Prerequisites | ||
|
||
Angular CLI requires Node and NPM. See [.travis.yml](.travis.yml) for the correct versions of Node, NPM and Angular CLI. | ||
Then make sure Angular CLI has been properly set up. | ||
- Java 8+ | ||
- Node and its included NPM (see [.nvmrc](.nvmrc) for the correct version of node to install) | ||
- wget | ||
|
||
[Install NPM and Node](https://nodejs.org/en/download/package-manager/) | ||
Install NPM and Node using nvm: | ||
``` | ||
$curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash - | ||
$sudo apt-get install -y nodejs | ||
$nodejs -v | ||
v7.10.0 | ||
$npm -v | ||
4.2.0 | ||
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash | ||
``` | ||
Follow https://docs.npmjs.com/getting-started/fixing-npm-permissions#option-two-change-npms-default-directory to fix permissions and then... | ||
Close current terminal and open a new one or `source ~/.bashrc` | ||
``` | ||
nvm install 10.13.0 | ||
``` | ||
Optionally, install a global Angular CLI in order to execute `ng` commands without prepending `npx`. | ||
Otherwise, prepend `npx` to every command in this README if a global @angular/cli was not installed. | ||
Before installing, follow https://docs.npmjs.com/getting-started/fixing-npm-permissions#option-two-change-npms-default-directory to fix permissions if needed. | ||
|
||
``` | ||
$npm i -g @angular/[email protected] | ||
|
@@ -55,7 +57,7 @@ cd dockstore-ui2 | |
git checkout develop | ||
git pull | ||
npm ci | ||
CI=true npm ci | ||
``` | ||
|
||
Check to make sure Angular CLI has been properly set up | ||
|
@@ -94,18 +96,6 @@ The Dockstore class in [src/app/shared/dockstore.model.ts](src/app/shared/dockst | |
|
||
In `dockstore-webservice`, the `dockstore.yml` being served <b>must be edited to include the client IDs</b>. | ||
|
||
## Pre-build/serve | ||
<!-- | ||
Possible bash command | ||
export WEBSERVICE_VERSION=`grep -oP 'WEBSERVICE_VERSION="\K[0-9].[0-9].[0-9]' .travis.yml` | ||
--> | ||
Run `export WEBSERVICE_VERSION=`[dockstore release version](https://github.com/dockstore/dockstore-ui2/blob/develop/.travis.yml#L12), for example `export WEBSERVICE_VERSION=1.5.3`. | ||
|
||
Run `npm run prebuild` before running or building the project. This command will: | ||
- generate a file which contains the UI tag version | ||
- download the openapi codegen | ||
- generate code from the swagger.yaml | ||
|
||
## Development server | ||
|
||
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. Run `ng serve --host 0.0.0.0` in order to serve your site to other computers on the same network. | ||
|
@@ -121,7 +111,8 @@ Run `ng g component component-name` to generate a new component. You can also us | |
|
||
## Build | ||
|
||
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build. | ||
Optionally override the webservice version using `npm config set dockstore-ui2:webservice_version ${WEBSERVICE_VERSION} | ||
Run `npm run build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `npm run build.prod` for a production build. | ||
|
||
## Running unit tests | ||
|
||
|
@@ -131,9 +122,9 @@ Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github. | |
|
||
Run `$(npm bin)/cypress open` or `$(npm bin)/cypress run` to execute the end-to-end tests via Cypress.io. | ||
Before running the tests make sure you: | ||
- have a postgresql database | ||
- serve the app via `ng serve`. | ||
- run the Dockstore webservice | ||
- have a webservice jar in the root directory | ||
- have the Dockstore webservice jar in the root directory and run it (see scripts/run-webservice-script.sh for guideline) | ||
|
||
## Documentation Generation | ||
|
||
|
@@ -143,7 +134,7 @@ To manually run it: | |
npm install -g @compodoc/compodoc | ||
npm run compodoc | ||
``` | ||
Then go to `docs/index.html` | ||
Then open `docs/index.html` with browser | ||
|
||
## Further help | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
set -o errexit | ||
set -o pipefail | ||
set -o nounset | ||
set -o xtrace | ||
|
||
GENERATOR_VERSION="3.3.4" | ||
wget --no-verbose http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/${GENERATOR_VERSION}/openapi-generator-cli-${GENERATOR_VERSION}.jar -O openapi-generator-cli.jar | ||
rm -Rf src/app/shared/swagger | ||
java -jar openapi-generator-cli.jar generate -i https://raw.githubusercontent.com/ga4gh/dockstore/$npm_package_config_webservice_version/dockstore-webservice/src/main/resources/swagger.yaml -l typescript-angular -o src/app/shared/swagger -c swagger-config.json |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
set -o errexit | ||
set -o pipefail | ||
set -o nounset | ||
set -o xtrace | ||
|
||
wget -O dockstore-webservice.jar --no-verbose --tries=10 https://artifacts.oicr.on.ca/artifactory/collab-release/io/dockstore/dockstore-webservice/${npm_package_config_webservice_version}/dockstore-webservice-${npm_package_config_webservice_version}.jar | ||
chmod u+x dockstore-webservice.jar | ||
psql -c "create user dockstore with password 'dockstore' createdb;" -U postgres | ||
psql -c "ALTER USER dockstore WITH superuser;" -U postgres | ||
psql -c 'create database webservice_test with owner = dockstore;' -U postgres | ||
psql -f travisci/db_dump.sql webservice_test | ||
java -jar dockstore-webservice.jar db migrate -i 1.5.0,1.6.0 travisci/web.yml | ||
java -jar dockstore-webservice.jar server travisci/web.yml 1>/dev/null & | ||
|