-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'refs/remotes/origin/main'
- Loading branch information
Showing
41 changed files
with
5,298 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Python Package using Conda | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build-linux: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 5 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.10' | ||
- name: Add conda to system path | ||
run: | | ||
# $CONDA is an environment variable pointing to the root of the miniconda directory | ||
echo $CONDA/bin >> $GITHUB_PATH | ||
- name: Install dependencies | ||
run: | | ||
conda env update --file environment.yml --name base | ||
- name: Lint with flake8 | ||
run: | | ||
conda install flake8 | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- name: Test with pytest | ||
run: | | ||
conda install pytest | ||
pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
name: pywris_env | ||
channels: | ||
- default | ||
dependencies: | ||
- python=3.11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
## Commands {wip} | ||
|
||
* `get_districts(selected_states)` - Get a dictionary of districts in given states. | ||
* `get_reservoirs(selected_states, selected_districts, selected_basins)` - Get a list of reservoirs in a given states, districts, and/or basins. | ||
* `get_reservoir_data(reservoir)` - Get the data on a selected reservoir. | ||
* `get_reservoir_names(districts)` | ||
* `fetch_data(self)` | ||
* `check_valid_states(states)` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
## Project layout | ||
.github/workflows/ | ||
python-package-conda.yml # lists dependencies | ||
docs/ | ||
logos/ | ||
PyWRIS_logo.png # PyWRIS main image | ||
components.md # List of possible use cases and components | ||
technology_review_by_library.md # comparisons of 3 possible libraries we considered using, listed by package. | ||
technology_review_by_library.md # comparisons of 3 possible libraries we considered using, listed by metrics. | ||
user_stories.md # some hypothetical users and their reasons for using PyWRIS | ||
src/pywris/ | ||
country_data/ | ||
state_codes.py # dictionary of all state names and their codes | ||
surface_water/ | ||
storage/ | ||
reservoir.py # defines functions used in reservoir data fetching | ||
utils/ | ||
fetch_wris.py # get information from the India WRIS website | ||
pywris.py # {wip} | ||
pywris_main.py # {wip} | ||
test/ | ||
test_pywris.py # file for testing with pytest | ||
LICENSE # licensing information | ||
README.md # README file with information to get started | ||
pyproject.toml # set up pywris package | ||
mkdocs.yml # The configuration file. | ||
docs/ | ||
index.md # The documentation homepage. | ||
... # Other markdown pages, images and other files. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Welcome to PyWRIS | ||
|
||
For full repository visit the [PyWRIS Github](https://github.com/SarathUW/PyWRIS/tree/main). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
site_name: PyWRIS | ||
nav: | ||
- Home: index.md | ||
- Commands: commands.md | ||
- Project Layout: dir.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" data-bs-theme="light"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
|
||
|
||
|
||
<link rel="shortcut icon" href="/img/favicon.ico"> | ||
<title>PyWRIS</title> | ||
<link href="/css/bootstrap.min.css" rel="stylesheet"> | ||
<link href="/css/fontawesome.min.css" rel="stylesheet"> | ||
<link href="/css/brands.min.css" rel="stylesheet"> | ||
<link href="/css/solid.min.css" rel="stylesheet"> | ||
<link href="/css/v4-font-face.min.css" rel="stylesheet"> | ||
<link href="/css/base.css" rel="stylesheet"> | ||
<link id="hljs-light" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/github.min.css" > | ||
<link id="hljs-dark" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/github-dark.min.css" disabled> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/highlight.min.js"></script> | ||
<script>hljs.highlightAll();</script> | ||
</head> | ||
|
||
<body> | ||
<div class="navbar fixed-top navbar-expand-lg navbar-dark bg-primary"> | ||
<div class="container"> | ||
<a class="navbar-brand" href="/.">PyWRIS</a> | ||
<!-- Expander button --> | ||
<button type="button" class="navbar-toggler" data-bs-toggle="collapse" data-bs-target="#navbar-collapse" aria-controls="navbar-collapse" aria-expanded="false" aria-label="Toggle navigation"> | ||
<span class="navbar-toggler-icon"></span> | ||
</button> | ||
|
||
<!-- Expanded navigation --> | ||
<div id="navbar-collapse" class="navbar-collapse collapse"> | ||
<!-- Main navigation --> | ||
<ul class="nav navbar-nav"> | ||
<li class="nav-item"> | ||
<a href="/home/" class="nav-link">Home</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a href="/commands/" class="nav-link">Commands</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a href="/dir/" class="nav-link">Project Layout</a> | ||
</li> | ||
</ul> | ||
|
||
<ul class="nav navbar-nav ms-md-auto"> | ||
<li class="nav-item"> | ||
<a href="#" class="nav-link" data-bs-toggle="modal" data-bs-target="#mkdocs_search_modal"> | ||
<i class="fa fa-search"></i> Search | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="container"> | ||
<div class="row"> | ||
|
||
<div class="row-fluid"> | ||
<div id="main-content" class="span12"> | ||
<h1 id="404-page-not-found" style="text-align: center">404</h1> | ||
<p style="text-align: center"><strong>Page not found</strong></p> | ||
</div> | ||
</div> | ||
|
||
|
||
</div> | ||
</div> | ||
|
||
<footer class="col-md-12"> | ||
<hr> | ||
<p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p> | ||
</footer> | ||
<script src="/js/bootstrap.bundle.min.js"></script> | ||
<script> | ||
var base_url = "/", | ||
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83}; | ||
</script> | ||
<script src="/js/base.js"></script> | ||
<script src="/search/main.js"></script> | ||
|
||
<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="searchModalLabel" aria-hidden="true"> | ||
<div class="modal-dialog modal-lg"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<h4 class="modal-title" id="searchModalLabel">Search</h4> | ||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> | ||
</div> | ||
<div class="modal-body"> | ||
<p>From here you can search these documents. Enter your search terms below.</p> | ||
<form> | ||
<div class="form-group"> | ||
<input type="search" class="form-control" placeholder="Search..." id="mkdocs-search-query" title="Type search term here"> | ||
</div> | ||
</form> | ||
<div id="mkdocs-search-results" data-no-results-text="No results found"></div> | ||
</div> | ||
<div class="modal-footer"> | ||
</div> | ||
</div> | ||
</div> | ||
</div><div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="keyboardModalLabel" aria-hidden="true"> | ||
<div class="modal-dialog"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<h4 class="modal-title" id="keyboardModalLabel">Keyboard Shortcuts</h4> | ||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> | ||
</div> | ||
<div class="modal-body"> | ||
<table class="table"> | ||
<thead> | ||
<tr> | ||
<th style="width: 20%;">Keys</th> | ||
<th>Action</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td class="help shortcut"><kbd>?</kbd></td> | ||
<td>Open this help</td> | ||
</tr> | ||
<tr> | ||
<td class="next shortcut"><kbd>n</kbd></td> | ||
<td>Next page</td> | ||
</tr> | ||
<tr> | ||
<td class="prev shortcut"><kbd>p</kbd></td> | ||
<td>Previous page</td> | ||
</tr> | ||
<tr> | ||
<td class="search shortcut"><kbd>s</kbd></td> | ||
<td>Search</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
<div class="modal-footer"> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
</body> | ||
</html> |
Oops, something went wrong.