Interactive interface for browsing global, full-resolution satellite imagery
Update documentation
Jo Sprague75447264f874
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.mdindex acedd82b3..d47b4bc2b 100644--- a/.github/CONTRIBUTING.md+++ b/.github/CONTRIBUTING.md@@ -2,22 +2,28 @@Thanks for considering contributing and making our planet easier to explore!-We'd be quite excited if you'd like to contribute to Worldview! Whether you're finding bugs, adding new features, fixing anything broken, or improving documentation, get started by submitting an issue or pull request!+We'd be quite excited if you'd like to contribute to Worldview! Whether you're+finding bugs, adding new features, fixing anything broken, or improving+documentation, get started by submitting an issue or pull request!## Submitting an Issue-If you have any questions or ideas, or notice any problems or bugs, first [search open issues](https://github.com/nasa-gibs/worldview/issues) to see if the issue has already been submitted. We may already be [working on the issue](#what-were-working-on). If you think your issue is new, you're welcome to [create a new issue](https://github.com/nasa-gibs/worldview/issues/new).+If you have any questions or ideas, or notice any problems or bugs, first+[search open issues](https://github.com/nasa-gibs/worldview/issues) to see if+the issue has already been submitted. We may already be+[working on the issue](#what-were-working-on). If you think your issue is new,+you're welcome to [create a new issue](https://github.com/nasa-gibs/worldview/issues/new).## Pull RequestsIf you want to submit your own contributions, follow these steps;* Fork the Worldview repo-* Create a new branch off of the branch you'd like to contribute to-* ** Note: ** If there is not a feature branch already created for you to branch off of, you will want to branch off of `development` to create your own feature branch. We only branch directly off of `master` to resolve urgent bugs.-* If an issue doesn't already exist, submit one (see above)-* [Create a pull request](https://help.github.com/articles/creating-a-pull-request/) from your fork into the target branch of the nasa-gibs/worldview repo-* Be sure to [mention the corresponding issue number](https://help.github.com/articles/closing-issues-using-keywords/) in the PR description, i.e. "Fixes [#480](https://github.com/nasa-gibs/worldview/issues/480)"+* Create a new branch from the branch you'd like to contribute to+* *Note:* If you're not branching from an existing feature branch, create your branch from `development` for new features or `master` for urgent bug fixes.+* If an issue doesn't already exist, [submit one](#submitting-an-issue)+* [Create a pull request](https://help.github.com/articles/creating-a-pull-request/) from your fork into the target branch of the `nasa-gibs/worldview` repo+* Be sure to [mention the issue number](https://help.github.com/articles/closing-issues-using-keywords/) in the PR description, i.e. "Fixes [#480](https://github.com/nasa-gibs/worldview/issues/480)"* Upon submission of a pull request, the Worldview development team will review the code* The request will then either be merged, declined, or an adjustment to the code will be requested@@ -27,7 +33,11 @@ We ask that you follow these guidelines with your contributions;### Style Guidelines-Please lint your code with `npm run lint`. Our style rules are defined in `.stylelintrc` and `.eslintrc`. We follow a modified version of [Standard JS Rules](https://github.com/standard/standard#the-rules), with semi-colons. You can install linting plugins in your editor to check against our style guides automatically:+Please lint your code with `npm run lint`. Our style rules are defined in+`.stylelintrc` and `.eslintrc`. We follow a modified version of+[Standard JS Rules](https://github.com/standard/standard#the-rules), with+semi-colons. You can install linting plugins in your editor to check against+our style guides automatically:#### Atom@@ -41,41 +51,12 @@ Please lint your code with `npm run lint`. Our style rules are defined in `.styl* [`SublimeLinter-eslint`](https://github.com/roadhump/SublimeLinter-eslint)* [`SublimeLinter-contrib-stylelint`](https://github.com/kungfusheep/SublimeLinter-contrib-stylelint)-### Unit Tests+### Tests-All of the unit tests for this project need to pass before your submission will be accepted. You can run `npm build && npm test` in the command line after making changes to verify that the tests pass. If you add new functionality, please consider adding tests for that functionality as well.--Note for Windows users: `npm test` may fail unless you [install PhantomJS manually](http://phantomjs.org/download.html).--### End-to-end Tests--You can run the included end-to-end tests to test the app in Chrome and Firefox. The tests run the Cucumber features in the `./e2e/features` using Nightwatch and Selenium.--To run tests in Chrome;--1) Run `npm run e2e:chrome`--To run tests in Firefox;--1) [Create a new Firefox profile](https://developer.mozilla.org/en-US/Firefox/Multiple_profiles) called 'nightwatch'-2) Run `npm run e2e:firefox`--You can run tests for both browsers in sequence by running `npm run e2e`,--To run tests in Browserstack;--1) Log into your [Browserstack automation](https://www.browserstack.com/automate) and get your username and access key from the upper left-2) Set these environmental variables in your shell;- - `export BROWSERSTACK_ACCESS_KEY=yourkeyhere`- - `export BROWSERSTACK_USER=yourusernamehere`-3) Configure `./e2e/environments.json` with the browsers you want to test.-4) Run `npm run browserstack`--#### End-to-end Test Reports--After running end-to-end tests, reports are generated and saved in `./e2e/reports`. You can convert these to HTML by running `npm run report <environment>` where `<environment>` is either the lowercase name of the browser for local tests (`chrome` or `firefox`) or the name of the Browserstack environment, such as `Chrome_61-0_OS_X_El_Capitan-1` (you can get this name from the JSON files in `./e2e/reports`).--The end-to-end tests are a little bit flaky, so they aren't required to pass before a submission will be accepted, but you should run them and read through the results to make sure that you haven't broken any functionality. Please also consider adding end-to-end tests to cover any functionality you add.+All of the unit tests for this project need to pass before your submission will+be accepted. If you add new functionality, please consider adding tests for that+functionality as well. See [Testing](doc/testing.md) for more information about+testing.### Commits@@ -92,9 +73,12 @@ Improve contributing docs and consolidate them in the standard location https://## What We're Working On-Please see our [Roadmap](https://github.com/nasa-gibs/worldview/projects/7) for an overview of what we're planning. We also track the progress of [Worldview](https://github.com/nasa-gibs/worldview), [Worldview-Components](https://github.com/nasa-gibs/worldview-components), and [Worldview-Options-EOSDIS](https://github.com/nasa-gibs/worldview-options-eosdis) using a public [Waffle.io Board](https://waffle.io/nasa-gibs/worldview).+Please see our [Roadmap](https://github.com/nasa-gibs/worldview/projects/7) for+an overview of what we're planning. We also track the progress of [Worldview](https://github.com/nasa-gibs/worldview), [Worldview-Components](https://github.com/nasa-gibs/worldview-components), and [Worldview-Options-EOSDIS](https://github.com/nasa-gibs/worldview-options-eosdis)+using a public [Waffle.io Board](https://waffle.io/nasa-gibs/worldview).-We use GitHub labels to organize issues we're working on. Here are the labels we use, along with descriptions of what they mean. Click on the headings or badges below to see the GitHub issues tagged with each label.+We use GitHub labels to organize issues we're working on. Here are the labels+we use, along with descriptions of what they mean. Click on the headings or badges below to see the GitHub issues tagged with each label.### [`bug` ](https://github.com/nasa-gibs/worldview/issues?q=is%3Aopen+is%3Aissue+label%3Abug)diff --git a/README.md b/README.mdindex afb363aa7..7478dd588 100644--- a/README.md+++ b/README.md@@ -1,39 +1,36 @@# [Worldview](https://worldview.earthdata.nasa.gov)-[](https://travis-ci.org/nasa-gibs/worldview)+-Visit Worldview at-[https://worldview.earthdata.nasa.gov](https://worldview.earthdata.nasa.gov)+[](https://travis-ci.org/nasa-gibs/worldview)+> Interactive interface for browsing full-resolution, global, near real-time satellite imagery-## About+## Background-This tool from [NASA's](http://nasa.gov) [EOSDIS](https://earthdata.nasa.gov)+This app from [NASA's](http://nasa.gov) [EOSDIS](https://earthdata.nasa.gov)provides the capability to interactively browse global, full-resolution-satellite imagery and then download the underlying data. Most of the 600+-available products are updated within three hours of observation, essentially-showing the entire Earth as it looks "right now". This supports time-critical-application areas such as wildfire management, air quality measurements, and-flood monitoring. Arctic and Antarctic views of several products are also-available for a "full globe" perspective. Browsing on mobile devices is-generally supported for portable access to the imagery.--Worldview uses the-[Global Imagery Browse Services (GIBS)](https://earthdata.nasa.gov/gibs) to-rapidly retrieve its imagery for an interactive browsing experience. While-Worldview uses [OpenLayers](http://openlayers.org/) as its mapping library,-GIBS imagery can also be accessed from Leaflet, Cesium, and several other-clients as well as [scripts](https://wiki.earthdata.nasa.gov/display/GIBS/Map+Library+Usage#expand-GDALBasics).-We encourage interested developers to build their own clients or integrate-NASA imagery into their existing ones using these services.+satellite imagery on desktop and mobile devices. Most of the 600+ products+are updated within three hours of observation, showing the entire Earth as it+is "right now". This supports time-critical applications such as wildfire+management, air quality measurements, and flood monitoring. Underlying data is+available for download in several formats, and Arctic and Antarctic views of+several products are available.++Worldview uses [OpenLayers](http://openlayers.org/) to display imagery from+[Global Imagery Browse Services (GIBS)](https://earthdata.nasa.gov/gibs).+This imagery [can also be used with libraries such as Leaflet, Cesium, Google Maps or custom GDAL scripts](https://wiki.earthdata.nasa.gov/display/GIBS/Map+Library+Usage#expand-GDALBasics).+We encourage interested developers to fork Worldview or build their own clients+for GIBS imagery.Check out our [roadmap](https://github.com/nasa-gibs/worldview/projects/7)-to see where we're going or follow our [blog](https://wiki.earthdata.nasa.gov/pages/viewrecentblogposts.action?key=GIBS)-to find out the latest features and imagery available!-+to see what we're working on and follow our [blog](https://wiki.earthdata.nasa.gov/pages/viewrecentblogposts.action?key=GIBS)+to find out the latest features and imagery available.## Install+This project uses Node and Python. See the [dependencies](#dependencies) section for more information.+```bashgit clone https://github.com/nasa-gibs/worldview.gitcd worldview@@ -42,23 +39,18 @@ npm install### Dependencies-- [Node.js v8.8.1 or Later](https://nodejs.org/en/download/)- - *Note to Ubuntu users:* After installing Node.js, ensure that it is available as `node` on the command line. If not, [see here](https://github.com/nasa-gibs/worldview/issues/249#issuecomment-302172817) for more information.-- Windows users:- - Git Bash, mingw-w64 bash, or a similar shell must be used in order to run bash commands.- - .NET Framework 2.0 or Visual Studio 2005 or newer installed with Visual C++ compilers.- It is HIGHLY recommended you install the Windows Build Tools npm package to ensure the correct compilers have been installed. To install this package:- ```- # run in administrator privileged command prompt window- npm install --global --production windows-build-tools- ```- - Python 2.7.x (included with Windows Build Tools)- - Python path added to Windows path variable (to use within cmd.exe and powershell). To edit this:- - Right-click the Windows icon in bottom-left corner of the screen.- - Click System, click Advanced System Settings, click Environmental Variables.- - Highlight the Path row and click edit.- - Each path is separated with a semicolon, `;`.- - Add your python directory path here. (Windows Build Tools includes python, the included python path is: `%USERPROFILE%\.windows-build-tools\python27`. Otherwise the path is most likely: `C:\Python27`.+The following are required to install and run Worldview;++- [Node v8.8.1 or Later](https://nodejs.org/en/download/)+ - **Note:** Ubuntu users may run into issues with the `node` command not being available. See [this question on StackOverflow](https://stackoverflow.com/q/18130164/417629) for possible solutions.+- [Python v2.7.14 or Later](https://www.python.org/)+ - **Note:** It is recommended that Windows users install Python with [Windows Build Tools](https://www.npmjs.com/package/windows-build-tools).++Windows users will also need the following;++ - [Git Bash](https://git-scm.com/downloads), or [MinGW-w64](https://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/MSYS%20%2832-bit%29/)+ - [.NET Framework](https://www.microsoft.com/net/download/dotnet-framework-runtime) or [Visual Studio Team Services](https://www.visualstudio.com/)+ - [Add `python` to the path](https://docs.python.org/2/using/windows.html#excursus-setting-environment-variables)## Usage@@ -67,43 +59,40 @@ npm run buildnpm start```-Navigate to `http://localhost:3000`.--To stop Worldview, press Control+C.+Navigate to [`http://localhost:3000`](http://localhost:3000) in a browser. To stop Worldview, press Control+C in your terminal.-### Custom Configuration+See [Developing](doc/developing.md) for more usage details.-The [Official EOSDIS configuration](https://github.com/nasa-gibs/worldview-options-eosdis) are used by default. To create a custom configuration, clone the configuration template into the `options/` directory and modify it;+## Updates-```bash-git clone https://github.com/nasa-gibs/worldview-options-template.git options-```+To update Worldview, you can pull down any branch or tag from GitHub. If you're on the `master` branch (default), and you want to update to the latest stable version of Worldview, run `git pull`.-Optionally, you can clone the official configuration and make changes as needed.-```bash-# or the Official EOSDIS configurations-git clone https://github.com/nasa-gibs/worldview-options-eosdis.git options-```+**Note:** This project uses [Semantic Versioning](https://semver.org/). Updates to the major version number in [package.json](package.json) indicate a breaking change; _update with caution_.## Other Information-* [Alternate Setup using Apache](doc/apache_setup.md)-* [Branding](doc/branding.md)-* [Optional Features](doc/features.md)-* [Configuration](doc/config.md)-* [Development Notes](doc/developing.md)+* [Developing](doc/developing.md)* [Testing](doc/testing.md)-* [Project Roadmap](https://github.com/nasa-gibs/worldview/projects/7)+* [Configuration](doc/configuration.md)+* [Custom Branding](doc/branding.md)+* [Data Download](doc/data_download.md)+* [Optional Features](doc/features.md)+* [Deployment](doc/deployment.md)+* [Using Apache (deprecated)](doc/apache_setup.md)++## Contact-## Contributing+Contact us via GitHub or by sending an email to+[[email protected]](mailto:[email protected]).-See [CONTRIBUTING.md](.github/CONTRIBUTING.md).+## Contribute-## License+We welcome your contributions! Feel free to [open an issue](https://github.com/nasa-gibs/worldview/issues/new) or [submit a PR](https://github.com/nasa-gibs/worldview/compare).-See [LICENSE.md](LICENSE.md)+See [CONTRIBUTING.md](.github/CONTRIBUTING.md) for more contribution guidelines.-## Contact+Worldview and NASA follow the [Contributor Covenant Code of Conduct](.github/CODE_OF_CONDUCT.md).++## License-Contact us by sending an email to-[[email protected]](mailto:[email protected])+NASA-1.3 (See [LICENSE.md](LICENSE.md))diff --git a/doc/apache_setup.md b/doc/apache_setup.mdindex 845bd5816..3fc6ebb61 100644--- a/doc/apache_setup.md+++ b/doc/apache_setup.md@@ -2,17 +2,16 @@> Note: Using Worldview with Apache is deprecated and will not be supported in the future. Is is recommended that you use Worldview with Node/[Express](https://expressjs.com/) instead. If you choose to proceed with Apache, choose one of the setup methods below.+## Manual Setup++* [Install Apache](http://httpd.apache.org/docs/2.4/install.html)+* Follow [the instructions in the README](https://github.com/nasa-gibs/worldview#install) to install and build Worldview+* [Configure Apache](http://httpd.apache.org/docs/2.4/configuring.html) to serve the contents of the `build/` directory (or extract `dist/site-worldview.tar.bz2` and configure Apache to serve that)+* [Enable execution of CGI scripts in Apache](http://httpd.apache.org/docs/2.4/suexec.html)+* [Start](http://httpd.apache.org/docs/2.4/invoking.html) or [Restart Apache](http://httpd.apache.org/docs/2.4/stopping.html)+## RPM Setup* Run `bash ./tasks/buildAll.sh` to generate an `.rpm` file in `/build/rpm`.* Deploy the `.rpm` file to your server.-* Note: you may have to modify `httpd.conf` and `worldview.spec` to match your environment before running these steps.--## Manual Setup--* Follow [the instructions in the Readme](https://github.com/nasa-gibs/worldview/tree/module-loaders#installation) to install and build Worldview.-* Either copy the contents of the `build/` directory or extract `dist/site-worldview.tar.bz2`) into the directory you want to serve from Apache.-* Copy `httpd.conf` into the same directory, and update both `<Directory>` entries with the full path of that directory where `@WORLDVIEW@` is the name of the directory. Be sure to retain the `/web` and `/web/service` portions.-* Comment out the first two `Alias` lines of the `httpd.conf` file with a `#`.-* Restart Apache with `sudo apachectl restart`.-* Note: You may have mixed results, and you may have to debug at this point.+* **Note:** you may have to modify `httpd.conf` and `worldview.spec` to match your environment before running these steps.diff --git a/doc/branding.md b/doc/branding.mdindex 2d6f0bb07..6d19796b5 100644--- a/doc/branding.md+++ b/doc/branding.md@@ -1,6 +1,6 @@# Branding-To add custom branding to Worldview you can [create a custom configuration](https://github.com/nasa-gibs/worldview#custom-configuration) and modify it;+To add custom branding to Worldview you can [create a custom configuration](configuration.md) and modify it;## Customizing@@ -16,10 +16,13 @@ the following instead:* `officalName`: Full name of the application (i.e. `EOSDIS Worldview`).* `shortName`: Short name of the application (i.e. `Worldview`).-To add a logo, replace `options/common/brand/images/wv-logo.png` with an image that is 247x45 pixels.+To add a logo, replace `options/common/brand/images/wv-logo.png` with an image+that is 247x45 pixels.-To create an "About" page, edit `options/common/brand/pages/about.md`. You can also create other pages by creating other Markdown files in this directory.+To create an "About" page, edit `options/common/brand/pages/about.md`. You can+also create other pages by creating other Markdown files in this directory.## Rebuilding-After making changes to a custom configuration, you'll need to run `npm run build` again to rebuild the app.+After making changes to a custom configuration, you'll need to run+`npm run build` again to rebuild the app.diff --git a/doc/config.md b/doc/configuration.mdsimilarity index 87%rename from doc/config.mdrename to doc/configuration.mdindex a56eb3ff2..909a60f7f 100644--- a/doc/config.md+++ b/doc/configuration.md@@ -1,22 +1,23 @@# Configuration-The configuration used by the official NASA EOSDIS Worldview application can be found here:+By default, Worldview uses [the official EOSDIS configuration](https://github.com/nasa-gibs/worldview-options-eosdis). To create a custom configuration, you can clone the default configuration repo or [the configuration template repo](https://github.com/nasa-gibs/worldview-options-template.git) into the `options/` directory and modify it;-<https://github.com/nasa-gibs/worldview-options-eosdis>--A basic configuration that only includes three starting layers can be found here:--<https://github.com/nasa-gibs/worldview-options-template>--To customize the configuration of the application, use either repository above as a starting point.+```bash+git clone https://github.com/nasa-gibs/worldview-options-template.git options+```-## General Notes+## Updating the Configuration-Information here is incomplete and can be flushed out on an as-needed basis.+After making any changes to a custom configuration, you need to rebuild the app+with the changes. Instead of running the entire build process you can run+`npm run getcapabilities` to make a request to [the GIBS `GetCapabilities` API](https://wiki.earthdata.nasa.gov/display/GIBS/GIBS+API+for+Developers)+and update layer configurations, and then `npm run build:config` to rebuild the+configuration for use by the application. You can run these commands separately+as needed or use `npm run updateconfig` as a shortcut to run them both.-All paths in the document are relative to the options repository root unless specified otherwise.+### Subdirectories-After making any changes to the configuration, run `npm run build:config` from the command line to rebuild the configuration for use by the application.+If you have a custom configuration in a subdirectory of `options/` other than `options/release/`, you can pass in the name of the subdirectory you would like to use with `npm run build:config -- subdirectory_name`. If you would like to build an incomplete configuration, you should prefix the command like this; `IGNORE_ERRORS=true npm run build:config`.## New Layersdiff --git a/doc/build.md b/doc/deployment.mdsimilarity index 58%rename from doc/build.mdrename to doc/deployment.mdindex 3f8b2cf13..b1d248afd 100644--- a/doc/build.md+++ b/doc/deployment.md@@ -1,3 +1,3 @@-# Build+# Deployment-To build the app for deployment, run the included `tasks/buildAll.sh`. This will build the app and generate `.tar.bz2` files and an `.rpm` file which can be used to deploy the app.+To build the app for deployment, run the included `tasks/buildAll.sh`. This will build the app and generate `.tar.bz2` files and an `.rpm` file which can be used to deploy the app to an Apache environment.diff --git a/doc/developing.md b/doc/developing.mdindex 264c3bbfb..765c2951a 100644--- a/doc/developing.md+++ b/doc/developing.md@@ -1,51 +1,55 @@# Developing-## npm scripts+## Building-This project uses `npm` as an interface to run build scripts and other tasks. The scripts themselves are a combination of JavaScript, Bash and Python scripts. Here are the essential scripts;+This project uses `npm` as an interface to run build scripts and other tasks.+The scripts themselves are a combination of JavaScript, Bash and Python scripts.-`npm install`: Installs JavaScript and Python dependencies.+**`npm run build`**: Runs all of the `build:x` scripts below and generates a build+in `build/` and `dist/site-worldview.tar.bz2`. If you have a custom configuration+subdirectory, you can pass that in with `npm run build -- subdirectory_name`. If+you would like to build the app with an incomplete configuration, you should+prefix the command like this; `IGNORE_ERRORS=true npm run build`.-`npm run build`: Runs all of the `build:x` scripts below and generates all builds of the app. If you have configuration options in a subdirectory of `/options` other than `options/release`, you can pass in the name of the subdirectory you would like to use with `npm run build -- subdirectory_name`. If you would like to build the app with an incomplete configuration, you should prefix the command like this; `IGNORE_ERRORS=true npm run build`.+**`npm run build:js`**: Builds the JavaScript bundle for the app and writes it+to `web/build/wv.js`.-`npm run build:js`: Builds the JavaScript bundle for the app.+**`npm run build:css`**: Builds the CSS bundle for the app and writes it to+`web/build/wv.css`.-`npm run build:css`: Builds the CSS bundle for the app.+**`npm run build:config`**: Builds the configuration (options) for the app in+`build/options/` and `dist/worldview-config.tar.bz2`.-`npm run build:config`: Builds the configuration (options) for the app. If you have configuration options in a subdirectory of `/options` other than `options/release`, you can pass in the name of the subdirectory you would like to use with `npm run build:config -- subdirectory_name`. If you would like to build the app with an incomplete configuration, you should prefix the command like this; `IGNORE_ERRORS=true npm run build:config`.+**`npm run build:tests`**: Builds a JavaScript bundle in `web/build/wv-test-bundle.js`+for running tests.-`npm run build:tests`: Builds a JavaScript bundle for running tests.+**`npm watch`**: Runs all of the build tasks necessary for local development in watch+mode so the JS and CSS bundles are updated automatically when source files change.+This does not generate any assets in `build/`, and is only for local development.+You must run `npm run build` or `npm run build:config` first to make a request+to [the GIBS `GetCapabilities` API](https://wiki.earthdata.nasa.gov/display/GIBS/GIBS+API+for+Developers) and+build the configuration files.- If you're using a custom options repo, you can pass in a subdirectory name to the build command with `npm run build -- subdirectory_name` or the build config command with `npm run build:config -- subdirectory_name`.+### Grunt tasks-`npm start`: Starts the app for local development. More specifically, starts a web server that serves the contents of the `/web` directory.+Grunt tasks are deprecated, but the following are still used by the build scripts+under the hood and available to use if you know what you're doing;-`npm watch`: Runs all of the build tasks necessary for local development in watch mode so that the build is automatically when source files change. This does not generate a final build, and is only for local development. You must run `npm run build` or `npm run build:config` first to make a request to [the GIBS `GetCapabilities` API](https://wiki.earthdata.nasa.gov/display/GIBS/GIBS+API+for+Developers) and build the configuration files.+**`grunt`**: This is a shortcut for `grunt build config site`.-`npm test`: Runs all tests and linting to verify code quality. Make sure to run `npm run build` or `npm run build:tests` first to build a testable version of Worldview.+**`grunt config`**: Compiles branding and configuration options and puts the results+in `build/`, `dist/`, and `web/`.-`npm run lint`: Lints code against the project's style guides. Use `npm run lint:css` or `npm run lint:js` to lint CSS or JS files separately.+**`grunt build`**: Copies assets to build directories and generate intermediate `tar` files.-`npm run e2e`: Runs end-to-end tests locally. Use `npm run e2e:chrome` or `npm run e2e:firefox` to run tests in a specific browser.+**`grunt site`**: Combines the results of `grunt config` and `grunt build` into final+`build/` and `dist/` directories and generates `tar` files of the final build.-`npm run browserstack`: Runs end-to-end tests on Browserstack.+**`grunt rpm-placeholders`**: Replaces placeholder strings in rpm source files.-`npm run getcapabilites`: Makes a request to [the GIBS `GetCapabilities` API](https://wiki.earthdata.nasa.gov/display/GIBS/GIBS+API+for+Developers) and updates layer configurations. If you're using a custom options repo, you can pass in a subdirectory with `npm run getcapabilites -- subdirectory_name`.+## Starting-`npm run updateconfig`: A shortcut to update the config when new layers are added. Runs `npm run getcapabilities` and `npm run build:config` behind the scenes.--`npm run report`: Generates a readable HTML report with the results of the last end-to-end test.--## Grunt tasks--Grunt tasks are deprecated, but the following are still used under the hood and available to use if you know what you're doing;--`grunt`: This task is deprecated, and we don't recommend that you use it. Instead, use `npm run build` to generate a build. Under the hood, this is a shortcut for `grunt build && grunt config && grunt site`.--`grunt config`: Compiles branding and configuration options and puts the results in `build/`, `dist/`, and `web/`.--`grunt build`: Copy assets to build directories and generate intermediate `tar` files.--`grunt site`: Combines the results of `grunt config` and `grunt build` into final `/build` and `/dist` directories and generates `tar` files of the final build.--`grunt rpm-placeholders`: Replaces placeholder strings in rpm source files.+**`npm start`**: Starts the app for local development. More specifically, starts a+web server that serves the contents of the `web/` directory. For advanced usage,+you can edit `tasks/start.js` to serve the `build/site-worldview/` directory+instead, which will include string placeholder replacements.diff --git a/doc/features.md b/doc/features.mdindex 1dfe5d5a5..8ba9a46c9 100644--- a/doc/features.md+++ b/doc/features.md@@ -18,11 +18,11 @@ This feature uses* Obtain a login and API key from [bit.ly](http://bit.ly).* Create `build/options/bitly.json` with the following contents (replacing `your_login` and `your_key` with the appropriate values);- ```json- {- "login": "your_login",- "key": "your_key"- }- ```-- > Caution: Do not commit this file to a public repo, and make sure that the `build/options` directory is not publicly accessible on your web server since your API key should remain secret.+```json+{+ "login": "your_login",+ "key": "your_key"+}+```++> Caution: Do not commit this file to a public repo, and make sure that the `build/options` directory is not publicly accessible on your web server since your API key should remain secret.diff --git a/doc/testing.md b/doc/testing.mdindex 5e51f4838..e1fca562c 100644--- a/doc/testing.md+++ b/doc/testing.md@@ -1,12 +1,59 @@# Testing-To run unit tests, run `npm test`.+## Linting-End-to-end tests are also available with the following commands:+To check code against the project's style guides, use `npm run lint`.+Use `npm run lint:css` or `npm run lint:js` to check CSS or JS files separately.-`npm run e2e:chrome`-`npm run e2e:firefox`-`npm run browserstack`+## Unit Tests++Unit tests are run using the BusterJS test runner. To run unit tests, run+`npm test`. Make sure to run `npm run build` or `npm run build:tests` first to+build a testable version of Worldview.++*Note for Windows users:* `npm test` may fail unless you [install PhantomJS manually](http://phantomjs.org/download.html).++## End-to-end Tests++You can run the included end-to-end tests to test the app in Chrome and Firefox.+The tests run the Cucumber features in `./e2e/features` using Nightwatch+and Selenium.++To run tests on your machine in Chrome; `npm run e2e:chrome`.++To run tests on your machine in Firefox;++1) [Create a new Firefox profile](https://developer.mozilla.org/en-US/Firefox/Multiple_profiles) called 'nightwatch'.+2) Run `npm run e2e:firefox`.++You can run tests for both browsers in sequence by running `npm run e2e`.++To run tests in Browserstack;++1) Log into [Browserstack](https://www.browserstack.com/automate) and get your username and access key from the upper left.+2) Add the following to your shell configuration (`.bashrc` or `.profile`);++```bash+export BROWSERSTACK_ACCESS_KEY=yourkeyhere+export BROWSERSTACK_USER=yourusernamehere+```++3) Configure `./e2e/environments.json` with the browsers you want to test.+4) Run `npm run browserstack`.++### Reports++After running end-to-end tests, reports are generated and saved in+`./e2e/reports`. You can convert these to HTML by running+`npm run report <environment>` where `<environment>` is either the lowercase+name of the browser for local tests (`chrome` or `firefox`) or the name of the+Browserstack environment, such as `Chrome_61-0_OS_X_El_Capitan-1` (you can get+this name from the JSON files in `./e2e/reports`).++The end-to-end tests are a little bit flaky, so they aren't required to pass+before a submission will be accepted, but you should run them and read through+the results to make sure that you haven't broken any functionality. Please also+consider adding end-to-end tests to cover any functionality you add.## Mocking Data@@ -14,201 +61,37 @@ Append the following parameters to the URL to test using mock data;### External-<table>- <colgroup>- <col width="33%"/>- <col width="33%"/>- <col width="33%"/>- </colgroup>- <thead>- <tr class="header">- <th>Parameter</th>- <th>Value</th>- <th>Description</th>- </tr>- </thead>- <tbody>- <tr class="odd">- <td>map</td>- <td>- <p>minX,minY,maxX,maxY</p>- </td>- <td>- <p></p>- <p>Extent of the map view port in units are based on the projection selected (degrees for EPSG:4326, meters for others)</p>- <p></p>- </td>- </tr>- <tr class="even">- <td>products</td>- <td>- <p>baselayers,layer1,layer2~overlays,layer3,layer4</p>- </td>- <td>- <p>Active layer list where layerX is the identifier of the layer as defined in the configuration file. Any number of layers may be specified in baselayers or overlays. Hidden layers are prefixed with a “!”. Delimiting layers with a “.” is supported- but deprecated.</p>- </td>- </tr>- <tr class="odd">- <td>time</td>- <td>- <p>YYYY-MM-DD</p>- </td>- <td>- <p>Selected UTC day.</p>- </td>- </tr>- <tr class="even">- <td>p</td>- <td>X</td>- <td>The selected projection. The value X may be either “geographic”, “arctic”, or “antarctic”</td>- </tr>- <tr class="odd">- <td>palettes</td>- <td>- <p>layer1,palette1~layer2,palette2</p>- </td>- <td>- <p>If present, assigns a custom palette to a layer where layerX is the identifier of the layer and paletteX is the identifier of the palette as defined in the configuration file. Any number of layer to palette mappings may be specified.</p>- </td>- </tr>- <tr class="even">- <td>opacity</td>- <td>- <p>layer1,value1~layer2,value2</p>- </td>- <td>- <p>(Not officially supported at this time) If present, assigns an opacity value to a layer where layerX is the identifier of the layer as defined in the configuration file, and valueX is a real number in the range of 0 to 1 where 0 is fully- transparent and 1 is fully opaque. Any number of layer to opacity value mappings may be specified.</p>- </td>- </tr>- <tr class="odd">- <td>dataDownload</td>- <td>X</td>- <td>- <p>If preset, activates the data download tab and selects the product X where X is the product identifier as defined in the configuration file.</p>- </td>- </tr>- </tbody>-</table>+| Parameter | Value | Description |+| --------- | ----- | ----------- |+| `map` | `minX`,`minY`,`maxX`,`maxY` | Extent of the map view port in units are based on the projection selected (degrees for EPSG:4326, meters for others) |+| `products` | `baselayers`,`layer1`,`layer2~overlays`,`layer3`,`layer4` | Active layer list where layerX is the identifier of the layer as defined in the configuration file. Any number of layers may be specified in baselayers or overlays. Hidden layers are prefixed with a “!”. Delimiting layers with a “.” is supported but deprecated. |+| `time` | `YYYY-MM-DD` | Selected UTC day. |+| `p` | `geographic`,`arctic`,`antarctic` | Selected projection. |+| `palettes` | `layer1`,`palette1~layer2`,`palette2` | If present, assigns a custom palette to a layer where layerX is the identifier of the layer and paletteX is the identifier of the palette as defined in the configuration file. Any number of layer to palette mappings may be specified. |+| `opacity` | `layer1`,`value1~layer2`,`value2` | (Not officially supported at this time) If present, assigns an opacity value to a layer where layerX is the identifier of the layer as defined in the configuration file, and valueX is a real number in the range of 0 to 1 where 0 is fully transparent and 1 is fully opaque. Any number of layer to opacity value mappings may be specified. |+| `dataDownload` | product identifier | If set, activates the data download tab and selects the product. |### Internal-<table>- <colgroup>- <col width="33%"/>- <col width="33%"/>- <col width="33%"/>- </colgroup>- <thead>- <tr class="header">- <th>Parameter</th>- <th>Value</th>- <th>Description</th>- </tr>- </thead>- <tbody>- <tr class="odd">- <td>epsg</td>- <td>X</td>- <td>- <p>The current EPSG code for the selected projection where X is either:</p>- <ul>- <li>4326: Geographic</li>- <li>3413: Arctic</li>- <li>3995: Arctic (older data)</li>- <li>3031: Antarctic</li>- </ul>- </td>- </tr>- </tbody>-</table>+| Parameter | Value | Description |+| --------- | ----- | ----------- |+| epsg | `4326` (geographic), `3413` (arctic), `3995` (arctic - old), `3031` (antarctic) | EPSG code for the selected projection |### Debugging-<table>- <tbody>- <tr>- <th>Parameter</th>- <th colspan="1">Value</th>- <th>Description</th>- </tr>- <tr>- <td>mockCMR</td>- <td colspan="1">X</td>- <td>Do not query CMR and fetch the static JSON file found at mock/cmr.cgi-X</td>- </tr>- <tr>- <td colspan="1">timeoutCMR</td>- <td colspan="1">X</td>- <td colspan="1">Override the CMR timeout value to X milliseconds</td>- </tr>- <tr>- <td colspan="1">mockMap</td>- <td colspan="1">true</td>- <td colspan="1">If any value is specified, do not fetch tiles from remote sources and display a blank map</td>- </tr>- <tr>- <td colspan="1">mockEvents</td>- <td colspan="1">X</td>- <td colspan="1">Use the static JSON file with event feeds found at mock/events\_data.json-X</td>- </tr>- <tr>- <td colspan="1">mockCategories</td>- <td colspan="1">X</td>- <td colspan="1">Use the static JSON file with categories feeds found at mock/categories\_data.json-X</td>- </tr>- <tr>- <td colspan="1">mockSources</td>- <td colspan="1">X</td>- <td colspan="1">Use the static JSON file with sources feeds found at mock/sources\_data.json-X</td>- </tr>- <tr>- <td colspan="1">modalView</td>- <td colspan="1">- categories,- measurements,- layers- </td>- <td colspan="1">Forces the 'Add Layers' modal to display categories, measurements or layers.- By default Artic/Antarctic shows measurements and Geographic shows categories.</td>- </tr>- <tr>- <td colspan="1">imagegen</td>- <td colspan="1">X</td>- <td colspan="1">Use the endpoint- <span class="nolink">http://map2.vis.earthdata.nasa.gov/imagegen/index</span>-X.php for image download- </td>- </tr>- <tr>- <td colspan="1">loadDelay</td>- <td colspan="1">X</td>- <td colspan="1">After loading all resources, wait X milliseconds before starting to simulate loading Worldview over a slow connection.</td>- </tr>- <tr>- <td colspan="1">now</td>- <td colspan="1">YYYY-MM-DDTHH:MM</td>- <td colspan="1">Override the value the Worldview uses for the current date and time. This only works when using the Worldview.now() function.</td>- </tr>- <tr>- <td colspan="1">markPalettes</td>- <td colspan="1">true</td>- <td colspan="1">If any value is specified, layers with an assigned palette will be marked in red in the Add Layers tab</td>- </tr>- <tr>- <td colspan="1">markDownloads</td>- <td colspan="1">true</td>- <td colspan="1">If any value is specified, layers that can be downloaded will be marked in red in the Add Layers tab</td>- </tr>- <tr>- <td colspan="1">debugPalette</td>- <td colspan="1">true</td>- <td colspan="1">If any value is specified, a black debugging custom palette will be added to assist in finding invalid lookup table mappings.</td>- </tr>- <tr>- <td colspan="1">showError</td>- <td colspan="1">true</td>- <td colspan="1">If any value is specified, an error dialog will be shown on startup.</td>- </tr>- </tbody>-</table>+| Parameter | Value | Description |+| --------- | ----- | ----------- |+| mockCMR | boolean | Do not query CMR and fetch the static JSON file found at mock/cmr.cgi-X |+| timeoutCMR | ms | Override the CMR timeout value in milliseconds |+| mockMap | boolean | If any value is specified, do not fetch tiles from remote sources and display a blank map |+| mockEvents | boolean | Use the static JSON file with event feeds found at mock/events\_data.json-X |+| mockCategories | boolean | Use the static JSON file with categories feeds found at mock/categories\_data.json-X |+| mockSources | boolean | Use the static JSON file with sources feeds found at mock/sources\_data.json-X |+| modalView | `categories`, `measurements`, `layers` | Forces the 'Add Layers' modal to display categories, measurements or layers. By default Artic/Antarctic shows measurements and Geographic shows categories. |+| imagegen | boolean | Use the endpoint http://map2.vis.earthdata.nasa.gov/imagegen/index-X.php for image download |+| loadDelay | ms | After loading all resources, wait X milliseconds before starting. |+| now | `YYYY-MM-DDTHH:MM` | Override the value the Worldview uses for the current date and time. This only works when using the `now()` function from `js/util/util.js`. |+| markPalettes | boolean | If any value is specified, layers with an assigned palette will be marked in red in the Add Layers . |+| markDownloads | boolean | If any value is specified, layers that can be downloaded will be marked in red in the Add Layers tab. |+| debugPalette | boolean | If any value is specified, a black debugging custom palette will be added to assist in finding invalid lookup table mappings. |+| showError | boolean | If any value is specified, an error dialog will be shown on startup. |diff --git a/package.json b/package.jsonindex 9c4171c55..afbcf7280 100644--- a/package.json+++ b/package.json@@ -2,6 +2,19 @@"name": "worldview","version": "1.11.0","description": "Interactive interface for browsing full-resolution, global, near real-time satellite imagery",+ "keywords": [+ "NASA",+ "Earthdata",+ "GIS",+ "NRT",+ "satellite imagery",+ "wildfire management",+ "air quality",+ "flood monitoring",+ "science",+ "earth science",+ "GDAL"+ ],"homepage": "https://worldview.earthdata.nasa.gov/","bugs": {"url": "https://github.com/nasa-gibs/worldview/issues",diff --git a/screenshot.png b/screenshot.pngnew file mode 100644index 000000000..e1e6ad269Binary files /dev/null and b/screenshot.png differ