Skip to content

Commit

Permalink
Switch to GH CI and fix cf (#36)
Browse files Browse the repository at this point in the history
Remove circleci and travis

Fix CFSpecs.to_loc with datasets

Fix gh ci

Add badge

Update changes
  • Loading branch information
stefraynaud authored Oct 13, 2021
1 parent 656074c commit d741a89
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 119 deletions.
86 changes: 0 additions & 86 deletions .circleci/config.yml

This file was deleted.

35 changes: 35 additions & 0 deletions .github/workflows/python-package-conda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Python Package using Conda

on: [push]

jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
max-parallel: 5

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- 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 env/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=100 --statistics
- name: Test with pytest
run: |
pip install .
conda install pytest
pytest
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

12 changes: 12 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
What's new
##########

0.5.1 (2021-10-13)
==================

New features
------------
- Switch the CI workflow to github [:pull:`36`].

Bug fixes
---------
- Fix :meth:`xoa.cf.CFSpecs.to_loc` that which failing with dataset [:pull:`23`].


0.5.0 (2021-10-12)
==================

Expand Down
8 changes: 2 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,8 @@ xoa - xarray-based ocean analysis library
.. image:: https://anaconda.org/conda-forge/xoa/badges/installer/conda.svg
:alt: Install with conda
:target: https://conda.anaconda.org/conda-forge
.. image:: https://travis-ci.org/VACUMM/xoa.svg?branch=master
:alt: Building and testing status
:target: https://travis-ci.org/VACUMM/xoa
.. image:: https://circleci.com/gh/VACUMM/xoa/tree/master.svg?style=shield
:alt: Documentation building on circleci
:target: https://circleci.com/gh/VACUMM/xoa/tree/master
.. image:: https://github.com/VACUMM/xoa/actions/workflows/python-package-conda.yml/badge.svg
:alt: Install, linting and tests
.. image:: https://readthedocs.org/projects/docs/badge/?version=latest
:alt: Documentation Status
:target: https://xoa.readthedocs.io/en/latest/
Expand Down
2 changes: 1 addition & 1 deletion xoa/cf.py
Original file line number Diff line number Diff line change
Expand Up @@ -1606,7 +1606,7 @@ def to_loc(self, obj, **locs):
names = set(obj.dims).union(obj.coords)
if hasattr(obj, "data_vars"):
names = names.union(obj.data_vars)
if obj.name is not None:
elif obj.name is not None:
names = names.union({obj.name})
for name in names:
if name not in rename_args:
Expand Down

0 comments on commit d741a89

Please sign in to comment.