Skip to content

Commit f82ef21

Browse files
author
Immanuel Bayer
committed
0.8.0
1 parent 5db714a commit f82ef21

89 files changed

Lines changed: 5466 additions & 2273 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
_build
12
*.bak
23
.gitattributes
34
.last_checked
@@ -137,3 +138,4 @@ checklink/cookies.txt
137138
#ipyannotator
138139
**/**/autogenerated*/
139140
nbs/data
141+
nbs/user_project

.gitlab-ci.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,20 @@ build_whls_internal:
9898
poetry build -f wheel &&
9999
poetry publish --repository PYPIPALAIMON -u gitlab-ci-token -p ${CI_JOB_TOKEN}
100100
"
101+
102+
pages:
103+
tags:
104+
- docker
105+
stage: release
106+
# only:
107+
# - master
108+
script:
109+
- >
110+
docker run -i --rm
111+
-v $(pwd)/public:/app/_build/html
112+
$IMG_TAG
113+
/bin/bash -c "poetry run make docs"
114+
- rm -rf $(pwd)/public/.doctrees
115+
artifacts:
116+
paths:
117+
- public

.pylintrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ disable=raw-checker-failed,
9393
no-name-in-module,
9494
line-too-long,
9595
missing-class-docstring,
96-
wrong-import-position
96+
wrong-import-position,
97+
consider-using-f-string
9798

9899
# Enable the message, report, category or checker with the given id(s). You can
99100
# either give multiple identifier separated by comma (,) or put this option

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111
- Allow user to use labels without using directories.
1212
- Refactor Im2Im and Capture annotators to render any widget on grid menu.
1313

14-
## [0.7.0] - 2022-02-21
14+
## [0.7.0] - 2022-02-19
1515

1616
### Changed
1717
- Updated dependencies to fix Voila's conflict by [Ítalo Epifânio](https://github.com/itepifanio).
@@ -20,8 +20,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2020

2121
### Fixed
2222
- BBoxAnnotator coordinate's input now changes according to the image size [Ítalo Epifânio](https://github.com/itepifanio).
23-
- Right menu been rendered faster, improving VideoAnnotator navigation speed by [Ítalo Epifânio](https://github.com/itepifanio).
24-
- Trajectory been drawn after delete object at VideoAnnotator by [Ítalo Epifânio](https://github.com/itepifanio).
23+
- Faster right menu rendering, improving overall VideoAnnotator navigation speed by [Ítalo Epifânio](https://github.com/itepifanio).
24+
- Don't draw trajectory for deleted objects in VideoAnnotator by [Ítalo Epifânio](https://github.com/itepifanio).
2525

2626
## [0.6.0] - 2022-01-31
2727

CONTRIBUTING.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,8 @@ nbdev_install_git_hooks
3333

3434
### Building docs
3535

36-
* With `nbdev` we can build docs from notebooks. For this, just run `nbdev_build_docs` and `nbdev` will build the documentation inside the `docs/` and update the `README.md`.
37-
38-
* To complete reinstall `jekyll` config, run `nbdev_build_lib` and then `nbdev_build_docs`.
39-
40-
* To run docs locally with `jekyll` you can run the command `make docs_serve` from the root of your repo to serve the documentation locally after calling `nbdev_build_docs` to generate the docs.
41-
42-
*Note :* GitHub provides great documentation on the matter, please read [their documentation](https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/about-github-pages-and-jekyll) for more details on GitHub pages with `jekyll`.
36+
* Ipyannotator uses sphinx and nbdev to build its documentation. To run locally you can run the command `make docs` from the from the root of your repository, this command will create the html files at the `_build` folder.
4337

4438
### Writing docs
4539

46-
As stated, `ipyannotator`uses `nbdev` and therefore, the notebooks pages will be converted into docs. For this reason, images should be inside the `docs/images` folders, so it can be assible to the documentation. After that, just load the image name when needed.
40+
As stated, `ipyannotator` uses `nbdev` and therefore, the notebooks pages will be converted into docs. For this reason, images should be inside the `docs/images` folders, so it can be assible to the documentation. After that, just load the image name when needed.

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
4747
ENV PYENV_ROOT=$HOME/.pyenv
4848
ENV PATH=$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
4949

50-
RUN git clone git://github.com/yyuu/pyenv.git .pyenv
50+
RUN git clone https://github.com/pyenv/pyenv.git .pyenv
5151

5252
RUN pyenv install 3.8.5 -f && pyenv global 3.8.5
5353

Makefile

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@ ipyannotator: $(SRC)
1111
sync:
1212
nbdev_update_lib
1313

14-
docs_serve: docs
15-
cd docs && bundle exec jekyll serve
14+
meta:
15+
python ipyannotator/doc_utils.py
1616

17-
docs: $(SRC)
18-
nbdev_build_docs
19-
touch docs
17+
docs: meta
18+
sphinx-build . ./_build/html -a
19+
20+
quick-docs:
21+
sphinx-build . ./_build/html -a
2022

2123
test:
2224
nbdev_test_nbs
@@ -32,4 +34,4 @@ dist: clean
3234
python setup.py sdist bdist_wheel
3335

3436
clean:
35-
rm -rf dist
37+
rm -rf dist

README.md

Lines changed: 19 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,21 @@
1-
# ipyannotator - the infinitely hackable annotation framework
1+
# Ipyannotator - the infinitely hackable annotation framework
22

33
![CI-Badge](https://github.com/palaimon/ipyannotator/workflows/CI/badge.svg)
44

5+
Ipyannotator is a flexible annotation system. The library contains some pre-defined annotators that can be used out of the box, but it also can be extend and customized according to the users needs.
56

6-
![jupytercon 2020](https://jupytercon.com/_nuxt/img/5035c8d.svg)
7-
8-
9-
This is an pre-release version accompanying our [jupytercon 2020 talk](https://cfp.jupytercon.com/2020/schedule/presentation/237/ipyannotator-the-infinitely-hackable-annotation-framework/).
10-
We hope this repository helps you to explore how annotation UI's can be quickly build
11-
using only python code and leveraging many awesome libraries ([ipywidgets](https://github.com/jupyter-widgets/ipywidgets), [voila](https://github.com/voila-dashboards/voila), [ipycanvas](https://github.com/martinRenou/ipycanvas), etc.) from the [jupyter Eco-system](https://jupyter.org/).
12-
13-
14-
At https://palaimon.io we have used the concepts underlying ipyannotator internally for various projects and
15-
this is our attempt to contribute back to the OSS community some of the benefits we have had using OOS software.
7+
We hope this repository helps you to explore how annotation UI's can be quickly built using only python code and leveraging many awesome libraries ([ipywidgets](https://github.com/jupyter-widgets/ipywidgets), [voila](https://github.com/voila-dashboards/voila), [ipycanvas](https://github.com/martinRenou/ipycanvas), etc.) from the [jupyter Eco-system](https://jupyter.org/).
168

9+
At https://palaimon.io we have used the concepts underlying Ipyannotator internally for various projects and this is our attempt to contribute back to the OSS community some of the benefits we have had using OOS software.
1710

1811
## Please star, fork and open issues!
1912

20-
2113
Please let us know if you find this repository useful. Your feedback will help us to turn this proof of concept into a comprehensive library.
2214

23-
2415
## Install
2516

26-
2717
`pip install ipyannotator`
2818

29-
3019
**dependencies (should be handled by pip)**
3120

3221
```
@@ -37,7 +26,6 @@ ipyevents = "^0.8.0"
3726
ipywidgets = "^7.5.1"
3827
```
3928

40-
4129
## Run ipyannotator as stand-alone web app using voila
4230

4331
Using `poetry`:
@@ -50,9 +38,8 @@ poetry run pip install voila
5038
```
5139
and run simple ipyannotator standalone example:
5240
```shell
53-
poetry run voila nbs/09_viola_example.ipynb --enable_nbextensions=True
41+
poetry run voila nbs/09_voila_example.ipynb --enable_nbextensions=True
5442
```
55-
5643

5744
Same with `pip`:
5845

@@ -62,11 +49,10 @@ Same with `pip`:
6249
pip install .
6350
pip install voila
6451

65-
voila nbs/09_viola_example.ipynb --enable_nbextensions=True
52+
voila nbs/09_voila_example.ipynb --enable_nbextensions=True
6653
```
6754

68-
69-
# Documentation
55+
## Documentation
7056

7157
This library has been written in the [literate programming style](https://en.wikipedia.org/wiki/Literate_programming) popularized for
7258
jupyter notebooks by [nbdev](https://www.fast.ai/2019/12/02/nbdev/). Please explore the jupyter notebooks in `nbs/` to learn more about
@@ -77,8 +63,8 @@ Also check out the following notebook for a more high level overview.
7763

7864
- Tutorial demonstrating how ipyannotator can be seamlessly integrated in your
7965
    data science workflow. `nbs/08_tutorial_road_damage.ipynb`
80-
- Slides + recoding of jupytercon 2020 talk explaining the high level concepts / vision
81-
of ipyannotator. TODO add public link
66+
- [Recoding of jupytercon 2020](https://www.youtube.com/watch?v=jFAp1s1O8Hg) talk explaining the high level concepts / vision
67+
of ipyannotator.
8268

8369
## Jupyter lab trouble shooting
8470

@@ -106,16 +92,22 @@ For clean (re)install make sure to have all the lab extencions active:
10692

10793
`jupyter labextension install @jupyter-voila/jupyterlab-preview`
10894

109-
110-
# How to contribute
111-
95+
## How to contribute
11296

11397
Check out `CONTRIBUTING.md` and since ipyannotator is build using nbdev reading
11498
the [nbdev tutorial](https://nbdev.fast.ai/tutorial.html) and related docs will be very helpful.
11599

100+
## Additional resources
116101

117-
## Copyright
102+
![jupytercon 2020](https://jupytercon.com/_nuxt/img/5035c8d.svg)
103+
104+
- [jupytercon 2020 talk](https://cfp.jupytercon.com/2020/schedule/presentation/237/ipyannotator-the-infinitely-hackable-annotation-framework/).
105+
106+
##Acknowledgements
118107

108+
The authors acknowledge the financial support by the Federal Ministry for Digital and Transport of Germany under the program mFUND (project number 19F2160A).
109+
110+
## Copyright
119111

120112
Copyright 2020 onwards, Palaimon GmbH. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this project's files except in compliance with the License. A copy of the License is provided in the LICENSE file in this repository.
121113

_templates/layout.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{% extends "!layout.html" %} {% block rootrellink %}
2+
<script type="text/x-thebe-config">
3+
{
4+
requestKernel: true,
5+
binderOptions: {
6+
repo: "binder-examples/requirements",
7+
ref: "master",
8+
},
9+
}
10+
</script>
11+
{{ super() }} {% endblock %}

conf.py

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
#
3+
# This file only contains a selection of the most common options. For a full
4+
# list see the documentation:
5+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
6+
7+
# -- Path setup --------------------------------------------------------------
8+
9+
# If extensions (or modules to document with autodoc) are in another directory,
10+
# add these directories to sys.path here. If the directory is relative to the
11+
# documentation root, use os.path.abspath to make it absolute, like shown here.
12+
#
13+
# import os
14+
# import sys
15+
# sys.path.insert(0, os.path.abspath('.'))
16+
from datetime import date
17+
18+
# -- Project information -----------------------------------------------------
19+
20+
project = 'Ipyannotator'
21+
copyright = f'{date.today().year}, Palaimon GmbH'
22+
author = 'Palaimon GmbH'
23+
24+
# -- General configuration ---------------------------------------------------
25+
26+
# Add any Sphinx extension module names here, as strings. They can be
27+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
28+
# ones.
29+
extensions = [
30+
'myst_nb'
31+
]
32+
33+
# Add any paths that contain templates here, relative to this directory.
34+
templates_path = ['docs/_templates']
35+
36+
# List of patterns, relative to source directory, that match files and
37+
# directories to ignore when looking for source files.
38+
# This pattern also affects html_static_path and html_extra_path.
39+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', '.pytest_cache', '.venv/*']
40+
41+
# -- Options for HTML output -------------------------------------------------
42+
43+
# The theme to use for HTML and HTML Help pages. See the documentation for
44+
# a list of builtin themes.
45+
#
46+
html_theme = 'pydata_sphinx_theme'
47+
48+
# Add any paths that contain custom static files (such as style sheets) here,
49+
# relative to this directory. They are copied after the builtin static files,
50+
# so a file named "default.css" will overwrite the builtin "default.css".
51+
html_static_path = ['_static']
52+
53+
html_theme_options = {
54+
"icon_links": [
55+
{
56+
"name": "GitHub",
57+
"url": "https://github.com/palaimon/ipyannotator",
58+
"icon": "fab fa-github-square",
59+
}
60+
],
61+
"show_nav_level": 2
62+
}
63+
64+
execution_timeout = 1200

0 commit comments

Comments
 (0)