diff --git a/.github/ISSUE_TEMPLATE/0001-GENERIC-ISSUE-TEMPLATE.yml b/.github/ISSUE_TEMPLATE/0001-GENERIC-ISSUE-TEMPLATE.yml new file mode 100644 index 0000000..830e7cf --- /dev/null +++ b/.github/ISSUE_TEMPLATE/0001-GENERIC-ISSUE-TEMPLATE.yml @@ -0,0 +1,30 @@ +name: Generic issue template +description: For detailing generic/uncategorized issues in Xclim + +body: + - type: textarea + id: generic-issue + attributes: + label: Generic Issue + description: Please fill in the following information fields as needed. + value: | + * Raven version: + * Operating System: + + ### Description + + + ### What I Did + + ``` + $ raven --foo bar + ``` + + ### What I Received + + ``` + Exception occurred + Math error: Attempted to divide by Zero + ``` diff --git a/.github/ISSUE_TEMPLATE/0002-BUG-REPORT.yml b/.github/ISSUE_TEMPLATE/0002-BUG-REPORT.yml new file mode 100644 index 0000000..ce9ea91 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/0002-BUG-REPORT.yml @@ -0,0 +1,40 @@ +name: Bug report +description: Help us improve Xclim +labels: [ "bug" ] + +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! + - type: textarea + id: setup-information + attributes: + label: Setup Information + description: | + What software versions are you running? + value: | + - Raven version: + - Operating System: + - type: textarea + id: description + attributes: + label: Description + description: Describe what you were trying to get done. Tell us what happened, what went wrong, and what you expected to happen. + - type: textarea + id: steps-to-reproduce + attributes: + label: Steps To Reproduce + description: Paste the command(s) you ran and the output. If there was a crash, please include the traceback below. + - type: textarea + id: additional-context + attributes: + label: Additional context + description: Add any other context about the problem here. + - type: checkboxes + id: submit-pr + attributes: + label: Contribution + description: Do you intend to submit a fix for this bug? (The xclim developers will help with code compliance) + options: + - label: I would be willing/able to open a Pull Request to address this bug. diff --git a/.github/ISSUE_TEMPLATE/0003-FEATURE-REQUEST.yml b/.github/ISSUE_TEMPLATE/0003-FEATURE-REQUEST.yml new file mode 100644 index 0000000..22fadf4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/0003-FEATURE-REQUEST.yml @@ -0,0 +1,31 @@ +name: Feature request +description: Suggest an idea for this project +labels: [ "enhancement" ] + +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this feature request! + - type: textarea + id: problem + attributes: + label: Addressing a Problem? + description: Is your feature request related to a problem? Please describe it. + - type: textarea + id: potential-solution + attributes: + label: Potential Solution + description: Describe the solution you'd like to see implemented. + - type: textarea + id: additional-context + attributes: + label: Additional context + description: Add any other context about the feature request here. + - type: checkboxes + id: submit-pr + attributes: + label: Contribution + description: Do you intend to submit a fix for this bug? (The xclim developers will help with code compliance) + options: + - label: I would be willing/able to open a Pull Request to contribute this feature. diff --git a/.github/ISSUE_TEMPLATE/0004-QUESTION-SUPPORT.yml b/.github/ISSUE_TEMPLATE/0004-QUESTION-SUPPORT.yml new file mode 100644 index 0000000..da85eb4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/0004-QUESTION-SUPPORT.yml @@ -0,0 +1,21 @@ +name: Question/Support +description: Ask for help from the developers +labels: [ "support" ] + +body: + - type: textarea + id: setup-information + attributes: + label: Setup Information + description: | + What software versions are you running? + value: | + - Raven version: + - Operating System: + - type: textarea + id: description + attributes: + label: Context + description: Describe what you were trying to get done. Tell us what happened, what went wrong, and what you expected to happen. + value: | + \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..a49eab2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: true \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..b0616c6 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,20 @@ + + +### Pull Request Checklist: +- [ ] This PR addresses an already opened issue (for bug fixes / features) + - This PR fixes #xyz +- [ ] Tests for the changes have been added (for bug fixes / features) + - [ ] (If applicable) Documentation has been added / updated (for bug fixes / features) +- [ ] CHANGES.rst has been updated (with summary of main changes) + +### What kind of change does this PR introduce? + + * ... + +### Does this PR introduce a breaking change? + + + * ... + +### Other information: + diff --git a/.github/workflows/first_pull_request.yml b/.github/workflows/first_pull_request.yml new file mode 100644 index 0000000..15dee34 --- /dev/null +++ b/.github/workflows/first_pull_request.yml @@ -0,0 +1,46 @@ +name: First Pull Request + +on: + pull_request_target: + types: + - opened + +jobs: + welcome: + name: Welcome + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v6 + with: + script: | + // Get a list of all issues created by the PR opener + // See: https://octokit.github.io/rest.js/#pagination + const creator = context.payload.sender.login + const opts = github.rest.issues.listForRepo.endpoint.merge({ + ...context.issue, + creator, + state: 'all' + }) + const issues = await github.paginate(opts) + + for (const issue of issues) { + if (issue.number === context.issue.number) { + continue + } + + if (issue.pull_request) { + return // Creator is already a contributor. + } + } + + await github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: `**Welcome**, new contributor! + + It appears that this is your first Pull Request. To give credit where it's due, we ask that you add your information to the \`AUTHORS.md\` and \`.zenodo.json\`: + - [ ] The relevant author information has been added to \`AUTHORS.md\` and \`.zenodo.json\` + + Please make sure you've read our [contributing guide](CONTRIBUTING.md). We look forward to reviewing your Pull Request shortly ✨` + }) \ No newline at end of file diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..f7fcc92 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,30 @@ +default_language_version: + python: python3 + +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: check-json + - id: pretty-format-json + args: ['--autofix', '--no-ensure-ascii', '--no-sort-keys'] + - repo: https://github.com/python-jsonschema/check-jsonschema + rev: 0.23.3 + hooks: + - id: check-github-workflows + - repo: meta + hooks: + - id: check-hooks-apply + - id: check-useless-excludes + +ci: + autofix_commit_msg: | + [pre-commit.ci] auto fixes from pre-commit.com hooks + + for more information, see https://pre-commit.ci + autofix_prs: true + autoupdate_branch: '' + autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate' + autoupdate_schedule: quarterly + skip: [ ] + submodules: false diff --git a/.zenodo.json b/.zenodo.json new file mode 100644 index 0000000..49efb66 --- /dev/null +++ b/.zenodo.json @@ -0,0 +1,170 @@ +{ + "title": "Raven Hydrological Modelling Framework", + "creators": [ + { + "name": "Craig, James", + "affiliation": "University of Waterloo, Ontario, Canada", + "orcid": "0000-0003-2715-7166" + }, + { + "name": "Chlumsky, Robert", + "affiliation": "University of Waterloo, Ontario, Canada", + "orcid": "0000-0002-1303-5064" + }, + { + "name": "Jenkinson, Wayne", + "affiliation": "International Joint Commission, Ottawa, Ontario, Canada" + }, + { + "name": "Georg Jost", + "affiliation": "BC Hydro, British Columbia, Canada" + }, + { + "name": "Mai, Juliane", + "affiliation": "University of Waterloo, Ontario, Canada", + "orcid": "0000-0002-1132-2342" + }, + { + "name": "Scantlebury, Leland", + "affiliation": "University of California Davis, California, USA", + "orcid": "0000-0002-6770-063X" + }, + { + "name": "Serrer, Martin", + "affiliation": "National Research Council, Ottawa, Ontario, Canada" + }, + { + "name": "Sgro, Nicholas", + "affiliation": "Geofirma Engineering Ltd., Ottawa, Ontario, Canada" + }, + { + "name": "Snowdon, Andrew P.", + "affiliation": "University of Waterloo, Ontario, Canada", + "orcid": "0000-0003-3698-6177" + }, + { + "name": "Tolson, Bryan", + "affiliation": "University of Waterloo, Ontario, Canada", + "orcid": "0000-0002-3092-5536" + }, + { + "name": "Arabzadeh, Rezgar", + "affiliation": "University of Waterloo, Ontario, Canada", + "orcid": "0000-0002-1775-1076" + }, + { + "name": "Arsenault, Richard", + "affiliation": "École de technologie supérieure, Montréal, Québec, Canada", + "orcid": "0000-0003-2834-2750" + }, + { + "name": "Basu, Nandita B.", + "affiliation": "University of Waterloo, Ontario, Canada", + "orcid": "0000-0002-8867-8523" + }, + { + "name": "Brown, Genevieve", + "affiliation": "University of Waterloo, Ontario, Canada" + }, + { + "name": "Burdett, Hannah", + "affiliation": "University of Waterloo, Ontario, Canada", + "orcid": "0000-0002-8144-9584" + }, + { + "name": "Kheydr, Ayman", + "affiliation": "University of Waterloo, Ontario, Canada" + }, + { + "name": "Han, Ming", + "affiliation": "University of Waterloo, Ontario, Canada", + "orcid": "0000-0002-7258-2121" + }, + { + "name": "Huard, David", + "affiliation": "Ouranos Inc., Montréal, Québec, Canada", + "orcid": "0000-0003-0311-5498" + }, + { + "name": "Huang, Susan" + }, + { + "name": "Jauvin, Christian", + "affiliation": "K2 Geospatial, Montréal, Québec, Canada", + "orcid": "0000-0002-2257-5636" + }, + { + "name": "Lapointe, Francis", + "affiliation": "Université de Sherbrooke, Québec, Canada", + "orcid": "0000-0002-7638-4018" + }, + { + "name": "Lee, Konhee", + "affiliation": "Ontario Power Generation, Toronto, Ontario, Canada", + "orcid": "0000-0003-0494-6015" + }, + { + "name": "Lin, Simon G.M.", + "affiliation": "University of Waterloo, Ontario, Canada", + "orcid": "0000-0001-5261-4977" + }, + { + "name": "Shafii, Mahyar", + "affiliation": "University of Waterloo, Ontario, Canada", + "orcid": "0000-0002-8303-1253" + }, + { + "name": "Pearson, Stuart", + "affiliation": "Delft University of Technology, The Netherlands", + "orcid": "0000-0002-3986-4469" + }, + { + "name": "Smith, Trevor James", + "affiliation": "Ouranos Inc., Montréal, Québec, Canada", + "orcid": "0000-0001-5393-8359" + }, + { + "name": "Spraakman, Sylvie", + "affiliation": "City of Vancouver, British Columbia, Canada", + "orcid": "0000-0002-4474-4074" + }, + { + "name": "Stonebridge, Graham", + "affiliation": "University of Waterloo, Ontario, Canada, and Aquanty Inc., Ontario, Canada" + }, + { + "name": "Taheri, Mahkameh", + "affiliation": "Hatch Canada Ltd., Etobicoke, Ontario, Canada", + "orcid": "0000-0003-0604-5982" + }, + { + "name": "Werstuck, Connor", + "affiliation": "Ontario Power Generation, Ontario, Canada" + }, + { + "name": "Zhang, Cloud", + "affiliation": "Andrews.engineer, Ontario, Canada" + }, + { + "name": "Zorn, Nicholas", + "affiliation": "Morrison Hershfield, Toronto, Ontario, Canada" + } + ], + "keywords": [ + "hydrological framework", + "hydrology", + "modelling", + "prediction", + "raven", + "simulation" + ], + "license": "Artistic-2.0", + "language": "eng", + "communities": [ + { + "identifier": "ouranos" + } + ], + "upload_type": "software", + "access_right": "open" +} diff --git a/AUTHORS.md b/AUTHORS.md new file mode 100644 index 0000000..80d40ff --- /dev/null +++ b/AUTHORS.md @@ -0,0 +1,15 @@ +# Credits + +## Development Lead + +* James R Craig @analytophile + +## Co-Developers + +* Robert Chlumsky @rchlumsk +* David Huard @huard +* Juliane Mai @julemai + +## Contributors + +* Trevor James Smith @Zeitsperre diff --git a/src/CMakeLists.txt b/CMakeLists.txt similarity index 88% rename from src/CMakeLists.txt rename to CMakeLists.txt index 37dcb71..6664636 100644 --- a/src/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,27 +1,27 @@ -cmake_minimum_required(VERSION 3.20) -# made with help from Zhu Liang-Jun of IGSNRR in Beijing - -# Setup Project -PROJECT(Raven CXX) - -# Find NetCDF -find_package(NetCDF) -# find header & source -file(GLOB HEADER "*.h") -file(GLOB SOURCE "*.cpp") - -add_executable(Raven - ${SOURCE} - ${HEADER} -) -source_group("Header Files" FILES ${HEADER}) -source_group("Source Files" FILES ${SOURCE}) - -IF(NETCDF_FOUND) - message("${NETCDF_INCLUDES}") - add_definitions(-Dnetcdf) - include_directories(${NETCDF_INCLUDES}) - target_link_libraries(Raven ${NETCDF_LIBRARIES}) -ENDIF() - -set_target_properties(Raven PROPERTIES LINKER_LANGUAGE CXX) +cmake_minimum_required(VERSION 3.20) +# made with help from Zhu Liang-Jun of IGSNRR in Beijing + +# Setup Project +PROJECT(Raven CXX) + +# Find NetCDF +find_package(NetCDF) +# find header & source +file(GLOB HEADER "src/*.h") +file(GLOB SOURCE "src/*.cpp") + +add_executable(Raven + ${SOURCE} + ${HEADER} +) +source_group("Header Files" FILES ${HEADER}) +source_group("Source Files" FILES ${SOURCE}) + +IF(NETCDF_FOUND) + message("${NETCDF_INCLUDES}") + add_definitions(-Dnetcdf) + include_directories(${NETCDF_INCLUDES}) + target_link_libraries(Raven ${NETCDF_LIBRARIES}) +ENDIF() + +set_target_properties(Raven PROPERTIES LINKER_LANGUAGE CXX) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..84c070b --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,25 @@ +# Contribution Guidelines + +## Contributor Licensing Agreement + +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Mus mauris vitae ultricies leo integer malesuada nunc vel. Cras pulvinar mattis nunc sed blandit libero volutpat sed. Elit eget gravida cum sociis natoque. Nunc mattis enim ut tellus elementum sagittis vitae et leo. Urna neque viverra justo nec ultrices dui sapien eget mi. Proin nibh nisl condimentum id venenatis a condimentum vitae. Scelerisque eleifend donec pretium vulputate sapien. Venenatis tellus in metus vulputate eu. Auctor urna nunc id cursus metus aliquam. Leo vel orci porta non pulvinar neque laoreet suspendisse. Facilisi cras fermentum odio eu feugiat pretium nibh ipsum consequat. + +## Pull Requests + +Sagittis vitae et leo duis ut diam quam nulla. Scelerisque varius morbi enim nunc faucibus a pellentesque sit. Aliquet nec ullamcorper sit amet risus nullam eget felis eget. Cras adipiscing enim eu turpis. Purus sit amet volutpat consequat mauris nunc congue nisi vitae. Varius morbi enim nunc faucibus a. Blandit volutpat maecenas volutpat blandit aliquam etiam erat velit scelerisque. Aliquet enim tortor at auctor. Est placerat in egestas erat imperdiet sed euismod nisi porta. Metus aliquam eleifend mi in nulla posuere sollicitudin aliquam. Volutpat consequat mauris nunc congue nisi. + +### Styling + +Amet purus gravida quis blandit turpis cursus in hac. Blandit volutpat maecenas volutpat blandit aliquam. Aliquam sem fringilla ut morbi. Nisl vel pretium lectus quam id leo in. + +### Documentation + +Elit scelerisque mauris pellentesque pulvinar pellentesque habitant morbi tristique senectus. Tortor consequat id porta nibh venenatis cras sed felis. Purus viverra accumsan in nisl nisi scelerisque. + +### Testing + +Rutrum tellus pellentesque eu tincidunt tortor aliquam. Rhoncus urna neque viverra justo nec ultrices dui sapien eget. Mattis enim ut tellus elementum. + +### Commit Messages + +Condimentum vitae sapien pellentesque habitant morbi tristique senectus. Mauris augue neque gravida in fermentum et sollicitudin ac. Sed turpis tincidunt id aliquet risus feugiat. \ No newline at end of file diff --git a/src/LICENSE b/LICENSE similarity index 100% rename from src/LICENSE rename to LICENSE diff --git a/README.md b/README.md index 8a33495..526357b 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,12 @@ # RavenHydroFramework -The code repository for the Raven Hydrological Modelling Framework developed at the University of Waterloo -Release versions, tutorials, documentation, and more distributed at [the Raven website](http://raven.uwaterloo.ca/Main.html) +The code repository for the Raven Hydrological Modelling Framework developed at the University of Waterloo. -Intended for use with Visual Studio Community Edition 2021, but also provided with Windows/linux/unix/MacOS g++ makefile and CMake configuration file. +Release versions, tutorials, documentation, and more distributed at [the Raven website](http://raven.uwaterloo.ca/Main.html). -Note unconventional two-space tabbing conventions. If you would like to work with the active development of Raven's core, please do so on a -branch and coordinate commits to the trunk with the Raven development team. Please contact us while you're at it - we love to have people helping out. +Intended for use with Visual Studio Community Edition 2021, but also provided with Windows/linux/unix/MacOS g++ makefile and CMake configuration file. + +Note unconventional two-space tabbing conventions. +If you would like to work with the active development of Raven's core, please do so on a branch and coordinate commits to the trunk with the Raven development team. + +Please contact us while you're at it - we love to have people helping out.