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

Package maintenance #44

Merged
merged 27 commits into from
Sep 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
c6b6ac9
Add some demo content to *ignore files
janfreyberg Jul 14, 2019
11deedb
update dependencies
janfreyberg Jul 14, 2019
735e288
update some type annotations
janfreyberg Jul 14, 2019
4c05f5a
Add tests for orchestration
janfreyberg Jul 14, 2019
fa4d177
Document new orchestration parameter
janfreyberg Jul 14, 2019
adc7c43
update dependency versions and lock file
janfreyberg Jul 15, 2019
75875eb
update notebook metadata
janfreyberg Sep 27, 2019
4829fac
update dependencies in poetry lock file
janfreyberg Sep 27, 2019
1906b09
add isort config to keep the sorting of imports under control a bit
janfreyberg Sep 27, 2019
f7f8f79
revert src structure thanks to flit being a bit strict
janfreyberg Sep 27, 2019
f9841a3
update widget use to silence / fix deprecation warnings
janfreyberg Sep 27, 2019
7f12f5d
fix type annotations
janfreyberg Sep 27, 2019
6aa8d41
add a rtd config file
janfreyberg Sep 27, 2019
f3fca08
update the testing pipeline
janfreyberg Sep 27, 2019
421daec
update the install method on travis
janfreyberg Sep 27, 2019
a9614c2
Add some dependency versions for better install experience
janfreyberg Sep 27, 2019
94dc56e
remove black, flake8 from test deps (should be dev deps)
janfreyberg Sep 27, 2019
c634bbe
make travis run a bit smooother
janfreyberg Sep 27, 2019
7183206
removing py 3.5 from test suite
janfreyberg Sep 27, 2019
89660dd
installing example dependencies in travis
janfreyberg Sep 27, 2019
3f862a4
update python dependencies [ci skip]
janfreyberg Sep 27, 2019
de40dd1
Removing poetry lock file [ci skip]
janfreyberg Sep 27, 2019
86af5ee
add mypy to testing stages
janfreyberg Sep 27, 2019
7308f19
Document abstract methods in queueing module
janfreyberg Sep 27, 2019
9e9f724
Try to re-enable matrix expansion of unit tests in travis
janfreyberg Sep 27, 2019
6832522
fix the travis pipeline to make it how it used to be
janfreyberg Sep 29, 2019
b50aef0
Version bump [ci skip]
janfreyberg Sep 29, 2019
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
9 changes: 9 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.venv/*
.hypothesis/*
.pytest_cache/*
.vscode/*
htmlcov/*
pip-wheel-metadata/*
dist/*
*Dockerfile
postgres-data
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ api/config.ini
scratchpad.ipynb
.mypy_cache/
.coverage*
postgres-data/

.DS_Store
2 changes: 2 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[isort]
skip=tests/,.venv/
10 changes: 7 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
repos:
- repo: https://github.com/pre-commit/mirrors-isort
rev: HEAD # Use the revision sha / tag you want to point at
rev: v4.3.21 # Use the revision sha / tag you want to point at
hooks:
- id: isort
- repo: https://github.com/ambv/black
rev: stable
rev: 19.3b0
hooks:
- id: black
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v1.2.3
rev: v2.3.0
hooks:
- id: flake8
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.730 # Use the sha / tag you want to point at
hooks:
- id: mypy
8 changes: 8 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
python:
version: 3.7
install:
- method: pip
path: .
extra_requirements:
- docs
system_packages: true
41 changes: 23 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,48 @@ stages:
- "Static code analysis"
- test
- deploy
notifications:
email: false
python:
- "3.5"
- "3.6"
- "3.7"
notifications:
email: false
install:
- pip install --upgrade pip
- pip install poetry
- poetry install
script:
# run tests, and get coverage:
- poetry run python -m pytest --cov=src/
- python -m pytest --cov=superintendent/
# test that the notebooks all run smoothly
- find docs -name '*.ipynb' -o -name 'examples/*.ipynb' | xargs poetry run jupyter nbconvert --to notebook --execute
- find docs -name '*.ipynb' -o -name 'examples/*.ipynb' | xargs jupyter nbconvert --to notebook --execute
# submit coverage report to coveralls
- poetry run coveralls
- python -m coveralls
install:
- pip install -qq --upgrade pip
- pip install -q '.[test,examples]'
jobs:
include:
- stage: "Static code analysis"
name: "black formatting test"
script:
install:
- pip install -qq black
- black --check src/
script:
- black --check superintendent/
python: "3.7"
install: skip
- stage: "Static code analysis"
name: "flake8 check"
script:
install:
- pip install -qq flake8 docargs
- flake8 src/
script:
- flake8 superintendent/
python: "3.7"
- stage: "Static code analysis"
name: "mypy check"
script:
- mypy --ignore-missing-imports superintendent/
python: "3.7"
install: skip
install:
- pip install -qq mypy
- stage: deploy
name: "Deploy to pypi"
if: tag IS present
script:
- poetry build
- poetry publish --username $PYPI_USER --password $PYPI_PASSWORD
- flit build
- env FLIT_USERNAME=$PYPI_USER FLIT_PASSWORD=$PYPI_PASSWORD flit publish
python: "3.7"
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,20 @@

![](logo.png)

**`superintendent`** provides an `ipywidget`-based interactive labelling tool for your data. It allows you to flexibly label all kinds of data. It also allows you to combine your data-labelling task with a statistical or machine learning model to enable quick and practical active learning.
**`superintendent`** provides an `ipywidget`-based interactive labelling tool
for your data. It allows you to flexibly label all kinds of data. It also allows
you to combine your data-labelling task with a statistical or machine learning
model to enable quick and practical active learning.

## Getting started

Take a look at the documentation: http://www.janfreyberg.com/superintendent/

It has some explanations of how the library works, and it also has many examples.
It has some explanations of how the library works, and it also has many
examples.

If you'd like to try the library without installing it, check out the [repository on binder](https://mybinder.org/v2/gh/janfreyberg/superintendent/master?filepath=examples.ipynb).
If you'd like to try the library without installing it, check out the
[repository on binder](https://mybinder.org/v2/gh/janfreyberg/superintendent/master?filepath=examples.ipynb).

## Installation

Expand All @@ -35,10 +40,13 @@ also have to enable the ipyevents jupyter extension:
jupyter nbextension enable --py --sys-prefix ipyevents
```

If you also want to run the examples, you need three additional packages: `requests`, `bs4` and `wordcloud`. You can install them via pip by running:
If you also want to run the examples, you need three additional packages:
`requests`, `bs4` and `wordcloud`. You can install them via pip by running:

```
pip install superintendent[examples]
```

If you want to contribute to `superintendent`, you will need to install the test dependencies as well. You can do so with `pip install superintendent[tests,examples]`
If you want to contribute to `superintendent`, you will need to install the test
dependencies as well. You can do so with
`pip install superintendent[tests,examples]`
4 changes: 2 additions & 2 deletions docs/examples/labelling-images.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.1"
"version": "3.7.0"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
Expand Down Expand Up @@ -1618,5 +1618,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
2 changes: 1 addition & 1 deletion docs/examples/labelling-text.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.1"
"version": "3.7.3"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
Expand Down
2 changes: 1 addition & 1 deletion examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.1"
"version": "3.7.3"
}
},
"nbformat": 4,
Expand Down
Loading