Latest stable version:
A particular model can be loaded using preset
URL parameter, e.g.:
https://flood.concord.org/index.html?preset=iowa
Latest development version:
https://flood.concord.org/branch/master/index.html
Available presets:
https://github.com/concord-consortium/flooding-model/blob/production/src/presets.ts
All the available options can be seen here (including default values):
https://github.com/concord-consortium/flooding-model/blob/production/src/config.ts
Note that these URLs point to production branch. If you're working with master
or other branch, you might
want to replace production
with your branch name.
The final configuration is build using default configuration, preset options and URL parameters. URL parameters have higher priority than preset options (so it's possible to customize a preset).
- Clone this repo and
cd
into it - Run
npm install
to pull dependencies - Run
npm start
to runwebpack-dev-server
in development mode with hot module replacement
If you want to build a local version run npm build
, it will create the files in the dist
folder.
You do not need to build to deploy the code, that is automatic. See more info in the Deployment section below.
Production releases to S3 are based on the contents of the /dist folder and are built automatically by Travis for each branch pushed to GitHub and each merge into production.
Merges into production are deployed to https://flood.concord.org.
Other branches are deployed to https://flood.concord.org/branch/.
You can view the status of all the branch deploys here.
Run npm test
to run jest tests. Run npm run test:full
to run jest and Cypress tests.
Inside of your package.json
file:
--browser browser-name
: define browser for running tests--group group-name
: assign a group name for tests running--spec
: define the spec files to run--headed
: show cypress test runner GUI while running test (will exit by default when done)--no-exit
: keep cypress test runner GUI open when done running--record
: decide whether or not tests will have video recordings--key
: specify your secret record key--reporter
: specify a mocha reporter
cypress run --browser chrome
will run cypress in a chrome browsercypress run --headed --no-exit
will open cypress test runner when tests begin to run, and it will remain open when tests are finished running.cypress run --spec 'cypress/integration/examples/smoke-test.js'
will point to a smoke-test file rather than running all of the test files for a project.
Starter Projects are Copyright 2020 (c) by the Concord Consortium and is distributed under the MIT license.
See license.md for the complete license text.