This project has been archived and is now available along with all documentation at https://code.usgs.gov/WiM/stnweb2.
2nd generation of STNWeb, the data entry and data management web application for the USGS Short Term Network high-water mark and storm tide sensor database.
npm install -g @angular/cli
Recommended node version: v12.14 or greater.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
Clone the repo and cd
to that directory
install dependencies:
npm install
Serve application with live reload change detection:
ng serve
To build a distribution folder for production:
ng build --prod --base-href --aot=false --build-optimizer=false
To run tests:
ng test --watch=false --browsers=ChromeHeadlessCustom
Instructions below are for developers actively working on the repo
An issue will be assigned to you via Github. Your workflow begins after assignment:
- Create a branch with the issue number as the branch name (e.g.
134
) - Move issue into 'In Progress' column of project board
- Do the work
- While you work, you may wish to have the app running with live reload. Run
ng serve
to do so.
- While you work, you may wish to have the app running with live reload. Run
- Write tests for the work
- This is a critical step. STNWeb2 uses the Jasmine library for unit testing. Please refer there for docs and examples. Also refer to the Angular testing guide.
- Run the tests to be sure they all pass and that the overall thresholds are met:
ng test
- Be sure the app runs in the browser without errors:
ng serve
- Ensure the app builds without error:
ng build
- If any of the checks above fail, please fix the issue. Ask for help if needed.
- Once all checks have passed and you are ready to submit a Pull Request, update the changelog with a brief description of what your work added, changed, or fixed. There is an Unreleased section at top with subheadings for each category. Edit the file CHANGELOG.md found at project root.
- Add the changed files
git add .
and commitgit commit -m '[your commit message here]'
you commit message should reference the issue number and include a very brief description of the work. - Pull from
dev
- Run
git pull origin dev
. This is a critical step. It ensures your Pull Request is synced with the latest work in the maindev
branch. If you are lucky, it will auto-merge. Otherwise, you may have to resolve conflicts between your commit and what currently exists in dev. Please be careful with this step so no code is lost - ask for help if you are unsure what to do. - If manually merging, you will have changed files so you will need to add and commit once more (see step 9).
- Run
- Push your committed and synced branch to the remote repo (Github):
git push origin [your branch name]
- Submit Pull Request (PR) to merge your issue branch into
dev
- Automated checks will be run against your PR. Failure of any of these will mean you need to re-commit to your branch to update your PR with the fix. A colleague will review your work and either approve it or request changes. Upon approval of the PR your issue will be automatically moved to the 'In Dev Branch' column of the project board.
Move onto next assigned issue and start back at step 1.
Work will be merged with Master when sprint is complete for a release.
TBD
Please read CONTRIBUTING.md for details on the process for submitting pull requests to us. Please read CODE_OF_CONDUCT.md for details on adhering by the USGS Code of Scientific Conduct.
We use SemVer for versioning. For the versions available, see the tags on this repository.
All developers must maintain the Changelog located at root as CHANGELOG.md. This document serves as a portable history of changes to the codebase and is meant to complement Github release tags. 'Added', 'Changed', and 'Fixed' sections should be updated within the Unreleased header when creating a Pull Request. As releases are created, those sections will move down into respective release headers.
Lauren Privette - Lead Developer - USGS Web Informatics & Mapping
Blake Draper - Developer - USGS Web Informatics & Mapping
Abby Gleason - Developer - USGS Web Informatics & Mapping
See also the list of contributors who participated in this project.
This project is licensed under the Creative Commons CC0 1.0 Universal License - see the LICENSE.md file for details
In the spirit of open source, please cite any re-use of the source code stored in this repository. Below is the suggested citation:
This project contains code produced by the Web Informatics and Mapping (WIM) team at the United States Geological Survey (USGS). As a work of the United States Government, this project is in the public domain within the United States. https://wim.usgs.gov
- This project authored by the USGS WIM team
- WIM is a team of developers and technologists who build and manage tools, software, web services, and databases to support USGS science and other federal government cooperators.
- WIM is a part of the Upper Midwest Water Science Center.