Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MNT Migrate to GitHub actions #40

Merged
merged 7 commits into from
Nov 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CI

on: [push, pull_request]

jobs:
test:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.6", "3.7", "3.8"]

steps:
- name: Checkout source
uses: actions/checkout@v2

- name: Setup Conda Environment
uses: conda-incubator/setup-miniconda@16930e6
with:
auto-update-conda: true
miniconda-version: latest
activate-environment: test
python-version: ${{ matrix.python-version }}

- name: Install dependencies
shell: bash -l {0}
run: conda install -c conda-forge pytest flake8 black heapdict python-lmdb psutil

- name: Install zict
shell: bash -l {0}
run: python setup.py install

- name: Run flake8
shell: bash -l {0}
run: flake8 zict

- name: Run black
shell: bash -l {0}
run: black --check zict

- name: Run pytest
shell: bash -l {0}
run: pytest --doctest-modules zict
32 changes: 0 additions & 32 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ Zict
Mutable Mapping interfaces. See documentation_.

.. _documentation: http://zict.readthedocs.io/en/latest/
.. |Build Status| image:: https://travis-ci.org/dask/zict.svg?branch=master
:target: https://travis-ci.org/dask/zict
.. |Build Status| image:: https://github.com/dask/zict/workflows/CI/badge.svg
:target: https://github.com/dask/zict/actions?query=workflow%3ACI
2 changes: 1 addition & 1 deletion zict/buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


class Buffer(ZictBase):
""" Buffer one dictionary on top of another
"""Buffer one dictionary on top of another

This creates a MutableMapping by combining two MutableMappings, one that
feeds into the other when it overflows, based on an LRU mechanism. When
Expand Down
2 changes: 1 addition & 1 deletion zict/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def _unsafe_key(key):


class File(ZictBase):
""" Mutable Mapping interface to a directory
"""Mutable Mapping interface to a directory

Keys must be strings, values must be bytes

Expand Down
2 changes: 1 addition & 1 deletion zict/func.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


class Func(ZictBase):
""" Buffer a MutableMapping with a pair of input/output functions
"""Buffer a MutableMapping with a pair of input/output functions

Parameters
----------
Expand Down
8 changes: 6 additions & 2 deletions zict/lmdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def _decode_key(key):


class LMDB(ZictBase):
""" Mutable Mapping interface to a LMDB database.
"""Mutable Mapping interface to a LMDB database.

Keys must be strings, values must be bytes

Expand All @@ -38,7 +38,11 @@ def __init__(self, directory):
# `map_size` may be reserved up front on disk
writemap = sys.platform.startswith("linux")
self.db = lmdb.open(
directory, subdir=True, map_size=map_size, sync=False, writemap=writemap,
directory,
subdir=True,
map_size=map_size,
sync=False,
writemap=writemap,
)

def __getitem__(self, key):
Expand Down
4 changes: 2 additions & 2 deletions zict/lru.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def do_nothing(k, v):


class LRU(ZictBase):
""" Evict Least Recently Used Elements
"""Evict Least Recently Used Elements

Parameters
----------
Expand Down Expand Up @@ -70,7 +70,7 @@ def __setitem__(self, key, value):
self.evict()

def evict(self):
""" Evict least recently used key
"""Evict least recently used key

This is typically called from internal use, but can be externally
triggered as well.
Expand Down
2 changes: 1 addition & 1 deletion zict/sieve.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


class Sieve(ZictBase):
""" Store values in different mappings based on a selector's
"""Store values in different mappings based on a selector's
output.

This creates a MutableMapping combining several underlying
Expand Down
2 changes: 1 addition & 1 deletion zict/zip.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


class Zip(MutableMapping):
""" Mutable Mapping interface to a Zip file
"""Mutable Mapping interface to a Zip file

Keys must be strings, values must be bytes

Expand Down