Skip to content
HydroShare is a collaborative website for better access to data and models in the hydrologic sciences.
Python JavaScript HTML XSLT TSQL CSS Other
Branch: develop
Clone or download
Latest commit 3e085f3 Oct 17, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
conf_irods Revert "Merge pull request #3402 from hydroshare/local-dev-add-quota" Jul 19, 2019
conf_postgres Revert "Merge pull request #3402 from hydroshare/local-dev-add-quota" Jul 19, 2019
conf_solr
config revert hydroshare-config.yaml accidentally committed Jun 12, 2019
django_irods more uniform handling of calling get_irods_path() Oct 11, 2019
docs Link DOIs to preferred resolver Mar 21, 2018
hs_access_control Flake8 fix Sep 30, 2019
hs_app_netCDF fixed tests and further cleanup to address code review comments May 29, 2019
hs_app_timeseries fixed test error and updated migration command to fix file path May 30, 2019
hs_collection_resource [#2556] redirect to login for all resource types May 5, 2019
hs_communities Remove debug print statement Oct 14, 2019
hs_composite_resource [#3530] refactoring code as per code review Sep 5, 2019
hs_core
hs_dictionary [#2575] - hide _internal urls from hsapi May 10, 2019
hs_file_types Merge pull request #3547 from hydroshare/3530-optimize-aggregation-lo… Sep 5, 2019
hs_geo_raster_resource fixed tests and further cleanup to address code review comments May 29, 2019
hs_geographic_feature_resource removed unapplicable test to fix test error May 30, 2019
hs_labels [#2863] upgrading to 1.11 Aug 17, 2018
hs_metrics [#2863] upgrading to 1.11 Aug 17, 2018
hs_model_program [#2556] redirect to login for all resource types May 5, 2019
hs_modelinstance HOTFIX - restore modelinstanceresource.html Jul 9, 2019
hs_modflow_modelinstance [#2556] redirect to login for all resource types May 5, 2019
hs_odm2 Remove try Sep 3, 2019
hs_rest_api [#2575] use os.path.join and update import statement Jun 20, 2019
hs_script_resource [#2556] redirect to login for all resource types May 5, 2019
hs_sitemap [#2863] upgrading to 1.11 Aug 17, 2018
hs_swat_modelinstance [#2556] redirect to login for all resource types May 5, 2019
hs_tools_resource fixed open with button display issue for web apps with appkey extra m… Aug 20, 2019
hs_tracking Simplify logic May 13, 2019
hydroshare turn off freshly tests Oct 16, 2019
irods done with clean up Jun 12, 2019
irods_browser_app fixed a bug May 29, 2019
nginx Clean up old merges Jul 2, 2019
pytest Tell nose to ignore pytest Mar 26, 2019
ref_ts Merge branch 'develop' into 2575-composite-endpoints Jun 18, 2019
scripts Revert "Merge pull request #3402 from hydroshare/local-dev-add-quota" Jul 19, 2019
theme Merge pull request #3597 from hydroshare/community-frontend Oct 15, 2019
.coveragerc Move jquery_ui from its own app to theme Apr 11, 2019
.gitignore Upgrade local iRODS version to 4.2.6 Jul 3, 2019
.gitmodules remove hs_docker_base and hs_postgres submodules Mar 1, 2019
.hgignore Merge branch 'develop' of https://github.com/hydroshare/hydroshare in… May 27, 2015
.pylintrc Add a starting pylint configuration Feb 3, 2016
Dockerfile point to django-freshly image Oct 16, 2019
Dockerfile-data-irods Revert "Merge pull request #3402 from hydroshare/local-dev-add-quota" Jul 19, 2019
Dockerfile-defaultworker.template Revert "Merge pull request #3402 from hydroshare/local-dev-add-quota" Jul 19, 2019
Dockerfile-hydroshare.template Revert "Merge pull request #3402 from hydroshare/local-dev-add-quota" Jul 19, 2019
Dockerfile-postgis Revert "Merge pull request #3402 from hydroshare/local-dev-add-quota" Jul 19, 2019
Dockerfile-solr Revert "Merge pull request #3402 from hydroshare/local-dev-add-quota" Jul 19, 2019
Dockerfile-users-irods Revert "Merge pull request #3402 from hydroshare/local-dev-add-quota" Jul 19, 2019
LICENSE.txt
README.md
deploy-hs [#491] change /bin/bash to /usr/bin/env bash Aug 11, 2015
gunicorn_start further address code review comment and added gevent in with file siz… Oct 25, 2018
hsctl
hydroshare.conf
local-dev-first-start-only.sh Revert "Merge pull request #3402 from hydroshare/local-dev-add-quota" Jul 19, 2019
local-dev.yml Revert "Merge pull request #3402 from hydroshare/local-dev-add-quota" Jul 19, 2019
manage.py /hs_tmp to /tmp Sep 1, 2016
pg.development.sql More email switching Nov 1, 2017
pylint.out Merge develop Sep 9, 2019
pytest.ini Tell nose to ignore pytest Mar 26, 2019
quota-info.md added quota-info.md Jun 30, 2017
run-pylint Modified the run-pylint scripts to run flake8 instead. Jun 10, 2016
run-pylint-jenkins Modified the run-pylint scripts to run flake8 instead. Jun 10, 2016
run-tests Use tracking prototype Apr 14, 2016
run-tests-jenkins Remove ignore from shell script Mar 27, 2019
run-tests-jenkins-light executable flags for rtjl Apr 17, 2017
setup.cfg Change flake8 line max to 120 Sep 5, 2019
slow-start.sh Change from gunicorn back to Django/Mezzanine for dev envinroment Apr 15, 2019

README.md

HydroShare (hydroshare)

HydroShare is a website and hydrologic information system for sharing hydrologic data and models aimed at giving users the cyberinfrastructure needed to innovate and collaborate in research to solve water problems.

Nightly Build Status generated by Jenkins CI (develop branch)

Workflow Clean Build/Deploy Unit Tests Flake8 Requirements
Build Status Build Status Build Status Build Status Build Status Requirements Status

HydroShare is a website and hydrologic information system for sharing hydrologic data and models aimed at providing the cyberinfrastructure needed to enable innovation and collaboration in research to solve water problems. HydroShare is designed to advance hydrologic science by enabling the scientific community to more easily and freely share products resulting from their research, not just the scientific publication summarizing a study, but also the data and models used to create the scientific publication. With HydroShare users can: (1) share data and models with colleagues; (2) manage who has access to shared content; (3) share, access, visualize and manipulate a broad set of hydrologic data types and models; (4) use the web services API to program automated and client access; (5) publish data and models to meet the requirements of research project data management plans; (6) discover and access data and models published by others; and (7) use web apps to visualize, analyze, and run models on data in HydroShare.

More information can be found in our Wiki Pages

Install

This README file is for developers interested in working on the Hydroshare code itself, or for developers or researchers learning about how the application works at a deeper level. If you simply want to use the application, go to http://hydroshare.org and register an account.

If you want to install and run the source code of application locally and/or contribute to development, read on.

VirtualBox development environment

To quickly get started developing we offer a preconfigured development environment encapsulated within a virtual box Virtual Machine (VM). This includes the appropriate version of Ubuntu, Python, Docker, and other key dependencies and development tools.

Simplified Installation Instructions

  1. Download the latest OVA file here
  2. Open the .OVA file with VirtualBox, this will create a guest VM
  3. Follow the instructions here to share a local hydroshare folder with your guest VM
  4. Start the guest VM
  5. Log into the guest VM with either ssh or the GUI. The default username/password is hydro:hydro
  6. From the root directory /home/hydro, clone this repository into the hydroshare folder
  7. cd into the hydroshare folder and run ./hsctl rebuild --db to build the application and run it
  8. If all goes well, your local version of Hydroshare should be running at http://192.168.56.101:8000

For more detailed installation, please see this document: Getting Started with HydroShare

Usage

For all intents and purposes, Hydroshare is a large Python/Django application with some extra features and technologies added on:

  • SOLR for searching
  • Redis for caching
  • RabbitMQ for concurrency and serialization
  • iRODS for a federated file system
  • PostgreSQL for the database backend

The hsctl Script

The hsctl script is your primary tool in interacting with and running tasks against your Hydroshare install. It has the syntax ./hsccl [command] where [command] is one of:

  • loaddb: Deletes existing database and reloads the database specified in the hydroshare-config.yaml file.
  • managepy [args]: Executes a python manage.py [args] call on the running hydroshare container.
  • maint_off: Removes the maintenance page from view (only if NGINX is being used).
  • maint_on: Displays the maintenance page in the browser (only if NGINX is being used).
  • rebuild: Stops, removes and deletes only the hydroshare docker containers and images while retaining the database contents on the subsequent build as defined in the hydroshare-config.yaml file
  • rebuild --db: Fully stops, removes and deletes any prior hydroshare docker containers, images and database contents prior to installing a clean copy of the hydroshare codebase as defined in the hydroshare-config.yaml file.
  • rebuild_index: Rebuilds the solr/haystack index in a non-interactive way.
  • restart: Restarts the django server only (and nginx if applicable).
  • start: Starts all containers as defined in the docker-compose.yml file (and nginx if applicable).
  • stop: Stops all containers as defined in the docker-compose.yml file.
  • update_index: Updates the solr/haystack index in a non-interactive way.

Testing and Debugging

Testing

Tests are run via normal Django tools and conventions. However, you should use the hsctl script mentioned abouve with the managepy command. For example: ./hsctl managepy test hs_core.tests.api.rest.test_resmap --keepdb.

There are currently over 600 tests in the system, so it is highly recommended that you run the test suites separately from one another.

Debugging

You can debug via PyCharm by following the instructions here.

Other Configuration Options

Local iRODS

Local iRODS is not required for development unless you are specifically working on the iRODS integration. However,if you want to work with iRODS or you simply want to learn about it, you can enable it locally.

Local HTTPS

To enable HTTPS locally:

  1. edit config/hydroshare-config.template and change the two values under ### Deployment Options ### to true like so:
### Deployment Options ###
USE_NGINX: true
USE_SSL: true
  1. Run ./hsctl rebuild

Contribute

There are many ways to contribute to Hydroshare. Review Contributing guidelines and github practices for information on

  1. Opening issues for any bugs you find or suggestions you may have
  2. Developing code to contribute to HydroShare
  3. Developing a HydroShare App
  4. Submiting pull requests with code changes for review

License

Hydroshare is released under the BSD 3-Clause License. This means that you can do what you want, so long as you don't mess with the trademark, and as long as you keep the license with the source code.

©2017 CUAHSI. This material is based upon work supported by the National Science Foundation (NSF) under awards 1148453 and 1148090. Any opinions, findings, conclusions, or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the NSF.

You can’t perform that action at this time.