{"id":13557411,"url":"https://github.com/hydroshare/hydroshare","last_synced_at":"2025-05-16T15:03:25.472Z","repository":{"id":21385493,"uuid":"24703136","full_name":"hydroshare/hydroshare","owner":"hydroshare","description":"HydroShare is a collaborative website for better access to data and models in the hydrologic sciences. ","archived":false,"fork":false,"pushed_at":"2025-04-07T15:17:59.000Z","size":284905,"stargazers_count":185,"open_issues_count":269,"forks_count":41,"subscribers_count":38,"default_branch":"develop","last_synced_at":"2025-04-08T02:44:31.287Z","etag":null,"topics":["collaboration","django","django-rest-framework","docker","hydro","hydrologic-database","hydrologic-modeling","hydrologic-networks","hydrologic-sciences","hydrology","hydrology-stormwater-analysis","hydroshare","irods","javascript","nginx","postgresql","python","solr"],"latest_commit_sha":null,"homepage":"https://www.hydroshare.org","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hydroshare.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/contributing.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"docs/roadmap-img-1.png","authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-10-02T02:19:41.000Z","updated_at":"2025-04-07T15:18:05.000Z","dependencies_parsed_at":"2023-09-26T18:37:48.294Z","dependency_job_id":"d940d022-69c4-4dd1-8431-6d270bf0b102","html_url":"https://github.com/hydroshare/hydroshare","commit_stats":{"total_commits":14773,"total_committers":68,"mean_commits":217.25,"dds":0.7668719962093007,"last_synced_commit":"a7533011248ec169dd2cf4054dd83b99e64edc75"},"previous_names":[],"tags_count":231,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hydroshare%2Fhydroshare","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hydroshare%2Fhydroshare/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hydroshare%2Fhydroshare/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hydroshare%2Fhydroshare/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hydroshare","download_url":"https://codeload.github.com/hydroshare/hydroshare/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248537136,"owners_count":21120709,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["collaboration","django","django-rest-framework","docker","hydro","hydrologic-database","hydrologic-modeling","hydrologic-networks","hydrologic-sciences","hydrology","hydrology-stormwater-analysis","hydroshare","irods","javascript","nginx","postgresql","python","solr"],"created_at":"2024-08-01T12:04:20.222Z","updated_at":"2025-04-12T11:50:42.460Z","avatar_url":"https://github.com/hydroshare.png","language":"Python","readme":"# HydroShare _(hydroshare)_\n\nHydroShare 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. 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.\n\n## Install\n\nPrerequisites\n\nSupported OS (developer laptops): macOS 10.12+, Win10+ Pro, Ent, Edu, Acad Pro, Acad Ent, CentOS 7 and Ubuntu/Lubuntu 18+ LTS\n\nWe got some troubles with Lubuntu 16.04 LTS so probably Ubuntu 16.04 LTS also does not work\n\nFamiliarity with docker and git are required to work with HydroShare\n\nSome VM skills such as network settings (Bridge/NAT/Host only) and file sharing are needed if you work with a virtual machine.\n\nFor Windows, this link is required to proceed - https://docs.google.com/document/d/1wIQEYq3OkWmzPTHeyGyjXLZWrinEXojJPBTJq7fczL8/edit#heading=h.mfmd8m9mxvsl\n\n     \n\nOne-Time Install\n\nTables are provided (in Courier font) throughout this wiki for copy-paste of entire blocks.\n\n1. Open a terminal (macOS, Linux) or command prompt (Windows)\nNavigate to where you will store the source code, for example /Users/yourname/repo/\n\nTypically you will find it under this directory:\n    \n    cd ~/repo\n\n2. Get code\n\nNote it should have a default branch set to the develop branch\n\n    git clone https://github.com/hydroshare/hydroshare.git\n\n    git checkout \u003cbranch\u003e\n\nTo get current solr revision fixes:\n\n      a. git pull\n\ncd hydroshare\n\n    b. docker exec -u hydro-service -ti hydroshare python manage.py solr_update\n\n \nIt’s very important that please DO NOT change the directory name after cloned. Let it be “hydroshare”\nIf you are running inside a virtual machine such as HydroDev Ubuntu 18.04 from here, you need to:\n\n1. Log into Docker via application and command line.\nCommand line: \n    \n    docker login \n    \n    You will be asked to enter your username and password \n\n1. Launch the stack\n\n        ./local-dev-first-start-only.sh\n\nFollowing the screen instruction to continue.\n\nRun the following command on completion to launch Hydroshare: \n\n    docker-compose -f local-dev.yml up \n\n5. Sanity Checks\n\n    Some WARNINGs are normal. \n\n    HydroShare is available in your browser at https://localhost\n\n    The default admin page is https://localhost/admin\n\n    The default admin account is admin:default\n\n    Swagger API docs https://localhost/hsapi/\n\n6. Start \u0026 Stop \u0026 Log\n\nTo start HydroShare, only need to open a windows shell, change to HydroShare code directory then run\n\n    docker-compose -f local-dev.yml (up | down) [-d] [--build]\n\nNote bracketed -d for daemon is optional and you don’t paste in the brackets\n\n    Use -d option in case you want to type new command on this windows or don’t want to see real-time output log.\n\n    Use --build option in case docker keeps image in cache and does not update correctly while modifying the Dockerfile and working with PyCharm\n\nCREATE NEW ACCOUNT - This is the same as it's always been in HydroShare. Ask a teammate or hack at it. Basically open a hydroshare console window then use the UI to sign up for a new account and watch the hydroshare container console (docker logs hydroshare) for a verification link and paste that into your browser and save the new account in the UI.\n\n\n\nTo stop HydroShare, only need to close the running windows or open a new windows then run\n\n    docker-compose -f local-dev.yml down\n\nAll data is persisted for the next start.\n\nTo see the logs in case you start with -d option, open a windows then run\n\n    docker-compose -f local-dev.yml logs\n\nOr\n\n    docker logs \u003ccontainer name\u003e\n\nBranching\nWhen you activate a new branch, just bring the stack down and up again. Sometimes you can get away with a warm restart of the stack or even relying on the Django debug mode (doing nothing but waiting). \n\n## Usage\n\nFor all intents and purposes, Hydroshare is a large Python/Django application with some extra features and technologies added on:\n- SOLR for searching\n- Redis for caching\n- RabbitMQ for concurrency and serialization\n- Minio for a S3 file system\n- PostgreSQL for the database backend\n\n#### The `hsctl` Script\n\nThe `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:\n\n- `loaddb`: Deletes existing database and reloads the database specified in the `hydroshare-config.yaml` file.\n- `managepy [args]`: Executes a `python manage.py [args]` call on the running hydroshare container.\n- `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\n- `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.\n- `rebuild_index`: Rebuilds the solr/haystack index in a non-interactive way.\n- `restart`: Restarts the django server only.\n- `start`: Starts all containers as defined in the `docker-compose.yml` file.\n- `stop`: Stops all containers as defined in the `docker-compose.yml` file.\n- `update_index`: Updates the solr/haystack index in a non-interactive way.\n\n## Testing and Debugging\n\n### Testing\n\nTests 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`.\n\nThere are currently over 600 tests in the system, so it is highly recommended that you run the test suites separately from one another.\n\n### Debugging\n\nYou can debug via PyCharm by following the instructions [here](https://docs.google.com/document/d/1w3hWAPMEUBL4qTjpHb5sYMWEiWFqwaarI0NkpKz3r6w/edit#).\n\n## Other Configuration Options\n\n## Contribute\n\nThere are many ways to contribute to Hydroshare. Review [Contributing guidelines](https://github.com/hydroshare/hydroshare/blob/develop/docs/contributing.rst) and github practices for information on\n1. Opening issues for any bugs you find or suggestions you may have\n2. Developing code to contribute to HydroShare \n3. Developing a HydroShare App\n4. Submiting pull requests with code changes for review\n\n## License \n\nHydroshare 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](https://tldrlegal.com/license/bsd-3-clause-license-(revised)).\n\n©2017 CUAHSI. This material is based upon work supported by the National Science Foundation (NSF) under awards [1148453](https://www.nsf.gov/awardsearch/showAward?AWD_ID=1148453), [1148090](https://www.nsf.gov/awardsearch/showAward?AWD_ID=1148090), [1664061](https://www.nsf.gov/awardsearch/showAward?AWD_ID=1664061), [1664018](https://www.nsf.gov/awardsearch/showAward?AWD_ID=1664018), [1664119](https://www.nsf.gov/awardsearch/showAward?AWD_ID=1664119), [1338606](https://www.nsf.gov/awardsearch/showAward?AWD_ID=1338606), and [1849458](https://www.nsf.gov/awardsearch/showAward?AWD_ID=1849458). 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.\n\n","funding_links":[],"categories":["Python","docker","Hydrosphere"],"sub_categories":["Freshwater and Hydrology"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhydroshare%2Fhydroshare","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhydroshare%2Fhydroshare","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhydroshare%2Fhydroshare/lists"}