Skip to content

Commit

Permalink
CI updates (#7)
Browse files Browse the repository at this point in the history
* Actions updates

* Update actions file

* Revert CI line length

* - Minor edtits
- Bump Ubuntu and Python versions in CI
- Remove Gitlab CI file

* Update action versions

* Fix action versions
  • Loading branch information
garth-wells authored Jan 11, 2024
1 parent 3156387 commit 999e35d
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 25 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pythonapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
timeout-minutes: 5

steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'

Expand Down
19 changes: 0 additions & 19 deletions .gitlab-ci.yml

This file was deleted.

6 changes: 6 additions & 0 deletions floodsystem/datafetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ def fetch_station_data(use_cache=True):
retrieval over the Internet and avoids excessive calls to the
Environment Agency service.
Args:
use_cache: If ``True``, use file cache. Otherwise fetch data
over the Internet.
Returns:
River level data.
"""

# URL for retrieving data for active stations with river level
Expand Down
1 change: 1 addition & 0 deletions floodsystem/station.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class MonitoringStation:

def __init__(self, station_id, measure_id, label, coord, typical_range,
river, town):
"""Create a monitoring station."""

self.station_id = station_id
self.measure_id = measure_id
Expand Down
2 changes: 1 addition & 1 deletion floodsystem/stationdata.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (C) 2018 Garth N. Wells
#
# SPDX-License-Identifier: MIT
"""This module provides interface for extracting statiob data from
"""This module provides interface for extracting station data from
JSON objects fetched from the Internet and
"""
Expand Down
4 changes: 2 additions & 2 deletions floodsystem/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ def sorted_by_key(x, i, reverse=False):
"""For a list of lists/tuples, return list sorted by the ith
component of the list/tuple, E.g.
Sort on first entry of tuple:
Sort on first entry of tuple::
> sorted_by_key([(1, 2), (5, 1]), 0)
>>> [(1, 2), (5, 1)]
Sort on second entry of tuple:
Sort on second entry of tuple::
> sorted_by_key([(1, 2), (5, 1]), 1)
>>> [(5, 1), (1, 2)]
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[flake8]
max-line-length = 60
max-line-length = 120
exclude = .git
# Line length
ignore = W503

0 comments on commit 999e35d

Please sign in to comment.