-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #56 from austinorr/rc-0.2.0
Rc 0.2.0
- Loading branch information
Showing
32 changed files
with
253 additions
and
412 deletions.
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 |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
[run] | ||
source = cloudside | ||
branch = True | ||
include = cloudside/*.py | ||
omit = | ||
cloudside/tests/* | ||
|
||
|
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 |
---|---|---|
|
@@ -6,8 +6,8 @@ jobs: | |
black: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Black Code Formatter | ||
uses: lgeiger/[email protected] | ||
with: | ||
args: ". --check" | ||
- uses: actions/checkout@v1 | ||
- name: Black Code Formatter | ||
uses: lgeiger/[email protected] | ||
with: | ||
args: ". --check" |
This file was deleted.
Oops, something went wrong.
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,104 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
||
name: Lint, Test, and Cover | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install .[dev] | ||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude .git,docs/* | ||
# 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: Blacken | ||
run: black . --check | ||
|
||
test-install: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
- name: Install Cloudside | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install . | ||
- name: Check basic functionality | ||
run: | | ||
cloudside get-asos KPDX 2020-01-01 2020-02-01 [email protected] | ||
test-python: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10"] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install .[dev] | ||
- name: Test with pytest | ||
run: | | ||
pytest -v | ||
test-python-mpl: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install .[dev] | ||
- name: Test with pytest and check images | ||
run: | | ||
pytest --mpl | ||
coverage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
- name: Generate coverage report | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install .[dev] | ||
coverage run -m pytest --doctest-modules --cov-report=xml | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
flags: unittests | ||
name: codecov-umbrella | ||
fail_ci_if_error: true | ||
path_to_write_report: ./codecov_report.gz |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -23,8 +23,12 @@ Basically I wanted a library that could do something like this: | |
.. code:: python | ||
import cloudside | ||
data = cloudside.asos.get_data('KPDX', '2012-12-01', '2015-05-01, 'me@mydomain.com') | ||
fig = cloudside.viz.rose(data) | ||
data = cloudside.asos.get_data('KPDX', '2012-12-01', '2015-05-01', '[email protected]') | ||
fig, rose_data = cloudside.viz.rose(data, magcol="wind_speed", dircol="wind_direction") | ||
.. image:: docs/img/rose.png | ||
:width: 400 | ||
:alt: KPDX Rose Plot | ||
|
||
And so ``cloudside`` does that. | ||
After installation, you can also directly use it from the command line :: | ||
|
@@ -41,13 +45,13 @@ You can also fetch data from Portland's Hydra Network of rain gauges: | |
or from the command line :: | ||
|
||
$ cloudside get-hydra Beaumont | ||
|
||
Bigger Example | ||
-------------- | ||
|
||
.. code:: python | ||
import pandas | ||
import pandas | ||
import cloudside | ||
def summarizer(g): | ||
|
@@ -68,8 +72,8 @@ Bigger Example | |
.assign(antecedent_hours=lambda df: (df['start'] - df['end'].shift()).dt.total_seconds() / 3600) | ||
.assign(ends_on_weekday=lambda df: df['end'].dt.weekday < 5) | ||
) | ||
data = cloudside.asos.get_data('KPDX', '2012-12-01', '2015-05-01, 'me@mydomain.com') | ||
data = cloudside.asos.get_data('KPDX', '2012-12-01', '2015-05-01', '[email protected]') | ||
storms = cloudside.storms.parse_record(data, intereventHours=6, outputfreqMinutes=5, precipcol='precip_inches') | ||
storm_stats = storm_totaller(storms) | ||
with pandas.ExcelWriter('output.xlsx') as xl: | ||
|
Oops, something went wrong.