Skip to content

Commit

Permalink
Fix tests failures (#280)
Browse files Browse the repository at this point in the history
  • Loading branch information
andersy005 authored Aug 27, 2020
1 parent 5b81bad commit 2b147ab
Show file tree
Hide file tree
Showing 27 changed files with 591 additions and 641 deletions.
37 changes: 18 additions & 19 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@ workflows:
nightly:
triggers:
- schedule:
cron: "0 0 * * *"
cron: '0 0 * * *'
filters:
branches:
only:
- master
jobs:
- "upstream-dev"
- "python-3.6"
- "python-3.7"
- "python-3.8"
- 'upstream-dev'
- 'python-3.6'
- 'python-3.7'
- 'python-3.8'
default:
jobs:
- "upstream-dev"
- "python-3.6"
- "python-3.7"
- "python-3.8"
- 'upstream-dev'
- 'python-3.6'
- 'python-3.7'
- 'python-3.8'

shared: &shared
steps:
Expand Down Expand Up @@ -56,34 +56,33 @@ shared: &shared
- save_cache:
key: deps-{{ checksum "./ci/environment.yml" }}
paths:
- "/opt/conda/pkgs"

- '/opt/conda/pkgs'

jobs:
"upstream-dev":
'upstream-dev':
<<: *shared
docker:
- image: ncarxdev/miniconda:3.7
environment:
ENV_FILE: "./ci/environment-upstream-dev.yml"
ENV_FILE: './ci/environment-upstream-dev.yml'

"python-3.6":
'python-3.6':
<<: *shared
docker:
- image: ncarxdev/miniconda:3.6
environment:
ENV_FILE: "./ci/environment.yml"
ENV_FILE: './ci/environment.yml'

"python-3.7":
'python-3.7':
<<: *shared
docker:
- image: ncarxdev/miniconda:3.7
environment:
ENV_FILE: "./ci/environment.yml"
ENV_FILE: './ci/environment.yml'

"python-3.8":
'python-3.8':
<<: *shared
docker:
- image: ncarxdev/miniconda:3.8
environment:
ENV_FILE: "./ci/environment.yml"
ENV_FILE: './ci/environment.yml'
7 changes: 3 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

<!--
Expand All @@ -18,14 +17,13 @@ Here's a quick checklist in what to include:
- [ ] Include a detailed description of the bug or suggestion
- [ ] `conda list` of the conda environment you are using
- [ ] Minimal, self-contained copy-pastable example that generates the issue if possible. Please be concise with code posted. See guidelines below on how to provide a good bug report:

- [Minimal Complete Verifiable Examples](https://stackoverflow.com/help/mcve)
- [Craft Minimal Bug Reports](http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports)

Bug reports that follow these guidelines are easier to diagnose,
and so are often handled much more quickly.



### Description

```
Expand All @@ -40,11 +38,12 @@ Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.
```

### Output of ``intake_esm.__version__``
### Output of `intake_esm.__version__`

<details>

```
Paste the output of `intake_esm.__version__` here
```

</details>
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/linting.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: linting

on:
push:
branches: '*'
pull_request:
branches: '*'

jobs:
linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: pre-commit/[email protected]
62 changes: 0 additions & 62 deletions .github/workflows/main.yaml

This file was deleted.

60 changes: 40 additions & 20 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,51 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-docstring-first
- id: check-json
- id: check-yaml
- id: double-quote-string-fixer

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.1.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-docstring-first
- id: check-json
- id: check-yaml
- id: double-quote-string-fixer
- repo: https://github.com/ambv/black
rev: 20.8b1
hooks:
- id: black

- repo: https://github.com/ambv/black
rev: 19.10b0
- repo: https://github.com/keewis/blackdoc
rev: v0.1.1
hooks:
- id: black
args: ["--line-length", "100", "--skip-string-normalization"]
- id: blackdoc

- repo: https://gitlab.com/pycqa/flake8
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.3
hooks:
- id: flake8
- id: flake8

- repo: https://github.com/asottile/seed-isort-config
- repo: https://github.com/asottile/seed-isort-config
rev: v2.2.0
hooks:
- id: seed-isort-config
- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.0.4
- id: seed-isort-config
- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.4.2
hooks:
- id: isort

- repo: https://github.com/prettier/prettier
rev: 2.1.1
hooks:
- id: prettier

- repo: https://github.com/deathbeds/prenotebook
rev: f5bdb72a400f1a56fe88109936c83aa12cc349fa
hooks:
- id: isort
- id: prenotebook
args:
[
'--keep-output',
'--keep-metadata',
'--keep-execution-count',
'--keep-empty',
]
3 changes: 3 additions & 0 deletions .prettierrc.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
tabWidth = 2
semi = false
singleQuote = true
64 changes: 18 additions & 46 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -224,42 +224,6 @@ Features
With `netCDF`, we can record very useful information into the global attributes of the netCDF dataset.
(:pr:`119`) `Anderson Banihirwe`_

.. code-block:: python
>>> import intake
>>> col = intake.open_esm_metadatastore(collection_input_definition="GLADE-CMIP5")
>>> col.ds
<xarray.Dataset>
Dimensions: (index: 615296)
Coordinates:
* index (index) int64 0 1 2 3 4 ... 615292 615293 615294 615295
Data variables:
resource (index) object ...
resource_type (index) object ...
direct_access (index) bool True True True True ... True True True True
activity (index) object ...
ensemble_member (index) object ...
experiment (index) object ...
file_basename (index) object ...
file_fullpath (index) object ...
frequency (index) object ...
institute (index) object ...
mip_table (index) object ...
model (index) object ...
modeling_realm (index) object ...
product (index) object ...
temporal_subset (index) object ...
variable (index) object ...
version (index) object ...
Attributes:
created_at: 2019-08-07T18:05:09.371259
intake_esm_version: 2019.5.11.post153
intake_version: 0.5.2
intake_xarray_version: 0.3.1
collection_spec: {"name": "GLADE-CMIP5", "collection_type": "cmip5...
name: GLADE-CMIP5
collection_type: cmip5
- Add string representation of `ESMMetadataStoreCatalog`` object (:pr:`122`) `Anderson Banihirwe`_


Expand All @@ -269,10 +233,13 @@ Features

.. code-block:: python
>>> import intake
>>> col = intake.open_esm_metadatastore(collection_name="GLADE-CMIP5")
>>> # if "GLADE-CMIP5" collection isn't built already, the above is equivalent to:
>>> col = intake.open_esm_metadatastore(collection_input_definition="GLADE-CMIP5")
In [1]: import intake
In [2]: col = intake.open_esm_metadatastore(collection_name="GLADE-CMIP5")
In [3]: # if "GLADE-CMIP5" collection isn't built already, the above is equivalent to:
In [4]: col = intake.open_esm_metadatastore(collection_input_definition="GLADE-CMIP5")
- Revert back to using official DRS attributes when building CMIP5 and CMIP6 collections.
(:pr:`126`) `Anderson Banihirwe`_
Expand All @@ -285,10 +252,12 @@ Features

.. code-block:: python
>>> import intake
>>> col = intake.open_esm_metadatastore(collection_name="GLADE-CMIP5")
>>> col
GLADE-CMIP5 collection catalogue with 615853 entries:
In [1]: import intake
In [2]: col = intake.open_esm_metadatastore(collection_name="GLADE-CMIP5")
In [3]: col
Out[3]: GLADE-CMIP5 collection catalogue with 615853 entries:
> 3 resource(s)
> 1 resource_type(s)
Expand Down Expand Up @@ -323,7 +292,8 @@ Features
> 489 version(s)
>>> col.nunique()
In[4]: col.nunique()
resource 3
resource_type 1
direct_access 1
Expand All @@ -342,7 +312,9 @@ Features
variable 454
version 489
dtype: int64
>>> col.unique(columns=['frequency', 'modeling_realm'])
In[4]: col.unique(columns=['frequency', 'modeling_realm'])
{'frequency': {'count': 6, 'values': ['mon', 'day', '6hr', 'yr', '3hr', 'fx']},
'modeling_realm': {'count': 7, 'values': ['atmos', 'land', 'ocean', 'seaIce', 'ocnBgchem',
'landIce', 'aerosol']}}
Expand Down
Loading

0 comments on commit 2b147ab

Please sign in to comment.