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

FIX: Allow user to specify name for new DockerImage instances #265

Merged
merged 14 commits into from
Oct 27, 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
23 changes: 15 additions & 8 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
[run]
branch = True
source = cloudknot/*
include = cloudknot/*
omit = */setup.py
omit =
*/setup.py
cloudknot/commands/*.py
cloudknot/due.py
cloudknot/version.py
cloudknot/_meta.py
cloudknot/data/*/*/*.py
cloudknot/tests/*.py
cloudknot/data/*/*/*.py

[report]
include = cloudknot/*
exclude_lines =
pragma: no cover
def __repr__
if self.debug:
if settings.DEBUG
raise AssertionError
raise NotImplementedError
if 0:
if __name__ == .__main__.:
if self.verbose:
show_missing = True
5 changes: 0 additions & 5 deletions .flake8

This file was deleted.

24 changes: 8 additions & 16 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
max-parallel: 4
matrix:
python-version: [3.6, 3.7]
python-version: [3.6, 3.7, 3.8]

steps:
- name: Checkout repo
Expand All @@ -19,35 +19,27 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install software
run: |
python -m pip install coveralls --use-feature=2020-resolver
python -m pip install --upgrade pip --use-feature=2020-resolver
python -m pip install coveralls --use-feature=2020-resolver
python -m pip install .[dev] --use-feature=2020-resolver
python -m pip install https://github.com/bboe/coveralls-python/archive/github_actions.zip
- name: Configure
run: |
mkdir ~/.aws
touch ~/.aws/credentials
printf "[aws]\nconfigured = True\n" > ~/.aws/cloudknot
- name: Lint with flake8
run: |
pip install flake8 black
flake8
black --check .
pydocstyle
- name: Test
run: |
make test
pytest --pyargs cloudknot --cov-report term-missing --cov-config .coveragerc --cov=cloudknot
- name: Coveralls Parallel
run: |
coveralls
if: matrix.python-version == 3.8
env:
COVERALLS_PARALLEL: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

finish:
needs: build
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ _build/
auto_examples/
gen_api/
doc/api/_autosummary
cloudknot/version.py
cloudknot/_version.py
*.ipynb_checkpoints
.coverage
.cache
Expand Down
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@

flake:
flake8
black --check .
pydocstyle

lint: flake

test:
# Unit testing using pytest
pytest --pyargs cloudknot --cov-report term-missing --cov=cloudknot
pytest --pyargs cloudknot --cov-report term-missing --cov-config .coveragerc --cov=cloudknot

devtest:
# Unit testing with the -x option, aborts testing after first failure
# Useful for development when tests are long
pytest -x --pyargs cloudknot --cov-report term-missing --cov=cloudknot
pytest -x --pyargs cloudknot --cov-report term-missing --cov-config .coveragerc --cov=cloudknot

clean: clean-build clean-pyc ## remove all build, test, coverage and Python artifacts

Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ A knot is a collective noun for a group of snakes. Cloudknot is a python
library designed to run your existing python code on
[AWS Batch](https://aws.amazon.com/batch).

Cloudknot takes as input a python function, Dockerizes it for use in an
Amazon ECS instance, and creates all the necessary AWS Batch constituent
resources to submit jobs. You can then use cloudknot to submit and view jobs
for a range of inputs.

To get started using cloudknot, please see the [cloudknot documentation](https://nrdg.github.io/cloudknot/)

This is the cloudknot development site. You can view the source code, file new
issues, and contribute to cloudknot's development. If you are just getting
started, you should look at the
Expand Down
15 changes: 2 additions & 13 deletions cloudknot/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from __future__ import absolute_import, division, print_function

"""Cloudknot is a python library to run your existing code on AWS Batch."""
import errno
import logging
import os
Expand All @@ -14,17 +13,7 @@
from .aws.base_classes import refresh_clients # noqa
from .cloudknot import * # noqa
from .dockerimage import * # noqa

try:
from importlib.metadata import version, PackageNotFoundError
except ModuleNotFoundError:
from importlib_metadata import version, PackageNotFoundError

try:
__version__ = version(__name__)
except PackageNotFoundError: # pragma: nocover
# package is not installed
pass
from ._version import version as __version__ # noqa

try:
fnull = open(os.devnull, "w")
Expand Down
91 changes: 0 additions & 91 deletions cloudknot/_meta.py

This file was deleted.

2 changes: 0 additions & 2 deletions cloudknot/aws/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
or specify parameters to create a new resource on AWS. Higher level resources
(e.g. ComputeEnvironment) take subordinate resources (e.g. IamRole) as input.
"""
from __future__ import absolute_import, division, print_function

from .base_classes import * # noqa: F401,F403
from .batch import * # noqa: F401,F403
from .ecr import * # noqa: F401,F403
Loading