Skip to content

Commit 2ec980a

Browse files
authored
Merge pull request #1 from axiom-data-science/cleaning
Cleaning
2 parents 8fa556f + 61757b0 commit 2ec980a

12 files changed

Lines changed: 450 additions & 63 deletions

File tree

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: 'github-actions'
4+
directory: '/'
5+
schedule:
6+
# Check for updates once a week
7+
interval: 'weekly'

.github/workflows/release.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
---
3+
name: Release
4+
5+
on: [push]
6+
7+
jobs:
8+
release:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- uses: actions/setup-python@v4
13+
- name: Install dependencies
14+
run: |
15+
python -m pip install -U pip wheel "setuptools<66.0.0" setuptools-scm twine
16+
- name: Build distributions
17+
run: python setup.py sdist bdist_wheel
18+
19+
- name: Publish to PyPI
20+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
21+
uses: pypa/gh-action-pypi-publish@master
22+
with:
23+
user: ${{ secrets.PYPI_USERNAME }}
24+
password: ${{ secrets.PYPI_PASSWORD }}

.pre-commit-config.yaml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
repos:
2+
3+
- repo: https://github.com/econchick/interrogate
4+
rev: 1.5.0
5+
hooks:
6+
- id: interrogate
7+
exclude: ^(docs|setup.py|tests)
8+
args: [--config=pyproject.toml]
9+
10+
- repo: https://github.com/pre-commit/pre-commit-hooks
11+
rev: v4.1.0
12+
hooks:
13+
- id: trailing-whitespace
14+
exclude: tests/data
15+
- id: check-ast
16+
- id: debug-statements
17+
- id: end-of-file-fixer
18+
- id: check-docstring-first
19+
- id: check-added-large-files
20+
- id: requirements-txt-fixer
21+
- id: file-contents-sorter
22+
files: requirements-dev.txt
23+
24+
- repo: https://github.com/pycqa/flake8
25+
rev: 3.9.2
26+
hooks:
27+
- id: flake8
28+
exclude: docs/conf.py
29+
args: [--max-line-length=105]#, --ignore=E203,E501,W503, --select=select=C,E,F,W,B,B950]
30+
31+
- repo: https://github.com/pre-commit/mirrors-isort
32+
rev: v5.10.1
33+
hooks:
34+
- id: isort
35+
additional_dependencies: [toml]
36+
args: [--project=gcm_filters, --multi-line=3, --lines-after-imports=2, --lines-between-types=1, --trailing-comma, --force-grid-wrap=0, --use-parentheses, --line-width=88]
37+
38+
# - repo: https://github.com/asottile/seed-isort-config
39+
# rev: v2.1.1
40+
# hooks:
41+
# - id: seed-isort-config
42+
43+
- repo: https://github.com/psf/black
44+
rev: 22.3.0
45+
hooks:
46+
- id: black
47+
language_version: python3
48+
49+
- repo: https://github.com/pre-commit/mirrors-mypy
50+
rev: v0.982
51+
hooks:
52+
- id: mypy
53+
additional_dependencies: [types-requests, types-setuptools]
54+
exclude: docs/source/conf.py
55+
args: [--ignore-missing-imports]
56+
57+
- repo: https://github.com/codespell-project/codespell
58+
rev: v2.1.0
59+
hooks:
60+
- id: codespell
61+
args:
62+
- --quiet-level=2

LICENSE.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
77
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
88

99
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
10-

README.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Clone from github (HTTPS or SSH)
2626

2727
Install environment file
2828

29-
>>> conda env create -f environment.yml
29+
>>> conda env create -f environment.yml
3030

3131
Activate new environment
3232

@@ -39,6 +39,8 @@ Install package locally in package directory
3939

4040
# Example Usage
4141

42+
If you input to `intake.open_coops_cat()` the keyword argument `process_adcp=True`, the ADCP Dataset will contain velocity on u and v components, along- and across-channel components, and along- and across-channel subtidal signal (processed with pl33 tidal filter, also included).
43+
4244
```
4345
import intake
4446
@@ -51,6 +53,19 @@ print(list(cat))
5153
# look at a source
5254
print(cat["COI0302"])
5355
54-
# read in data to a Datset
56+
# read in data to a Dataset
5557
ds = cat["COI0302"].read()
5658
```
59+
60+
61+
### Development
62+
63+
To also develop this package, install additional packages with:
64+
``` bash
65+
$ conda install --file requirements-dev.txt
66+
```
67+
68+
To then check code before committing and pushing it to github, locally run
69+
``` bash
70+
$ pre-commit run --all-files
71+
```

environment.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,13 @@ channels:
44
dependencies:
55
# Required for full project functionality (dont remove)
66
- pytest
7-
# Examples (remove and add as needed)
8-
# - jupyter
9-
# - jupyterlab
7+
- cf_pandas
108
- intake
119
- ipython
12-
- xarray
10+
# - noaa_coops
1311
- numpy
14-
# - scipy
15-
# - dask
16-
# - netcdf4
1712
- pandas
18-
# - matplotlib
1913
- pip
14+
- xarray
2015
- pip:
21-
- git+https://github.com/kthyng/noaa_coops@warning
22-
16+
- noaa_coops

intake_coops/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
from importlib.metadata import PackageNotFoundError, version
1717

18+
1819
try:
1920
__version__ = version("intake-coops")
2021
except PackageNotFoundError:

0 commit comments

Comments
 (0)