Skip to content

Commit

Permalink
0.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Immanuel Bayer committed Apr 10, 2022
1 parent 5db714a commit f82ef21
Show file tree
Hide file tree
Showing 89 changed files with 5,466 additions and 2,273 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
_build
*.bak
.gitattributes
.last_checked
Expand Down Expand Up @@ -137,3 +138,4 @@ checklink/cookies.txt
#ipyannotator
**/**/autogenerated*/
nbs/data
nbs/user_project
17 changes: 17 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,20 @@ build_whls_internal:
poetry build -f wheel &&
poetry publish --repository PYPIPALAIMON -u gitlab-ci-token -p ${CI_JOB_TOKEN}
"
pages:
tags:
- docker
stage: release
# only:
# - master
script:
- >
docker run -i --rm
-v $(pwd)/public:/app/_build/html
$IMG_TAG
/bin/bash -c "poetry run make docs"
- rm -rf $(pwd)/public/.doctrees
artifacts:
paths:
- public
3 changes: 2 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ disable=raw-checker-failed,
no-name-in-module,
line-too-long,
missing-class-docstring,
wrong-import-position
wrong-import-position,
consider-using-f-string

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
Expand Down
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Allow user to use labels without using directories.
- Refactor Im2Im and Capture annotators to render any widget on grid menu.

## [0.7.0] - 2022-02-21
## [0.7.0] - 2022-02-19

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

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

## [0.6.0] - 2022-01-31

Expand Down
10 changes: 2 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,8 @@ nbdev_install_git_hooks

### Building docs

* 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`.

* To complete reinstall `jekyll` config, run `nbdev_build_lib` and then `nbdev_build_docs`.

* 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.

*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`.
* 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.

### Writing docs

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.
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.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
ENV PYENV_ROOT=$HOME/.pyenv
ENV PATH=$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH

RUN git clone git://github.com/yyuu/pyenv.git .pyenv
RUN git clone https://github.com/pyenv/pyenv.git .pyenv

RUN pyenv install 3.8.5 -f && pyenv global 3.8.5

Expand Down
14 changes: 8 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ ipyannotator: $(SRC)
sync:
nbdev_update_lib

docs_serve: docs
cd docs && bundle exec jekyll serve
meta:
python ipyannotator/doc_utils.py

docs: $(SRC)
nbdev_build_docs
touch docs
docs: meta
sphinx-build . ./_build/html -a

quick-docs:
sphinx-build . ./_build/html -a

test:
nbdev_test_nbs
Expand All @@ -32,4 +34,4 @@ dist: clean
python setup.py sdist bdist_wheel

clean:
rm -rf dist
rm -rf dist
46 changes: 19 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,21 @@
# ipyannotator - the infinitely hackable annotation framework
# Ipyannotator - the infinitely hackable annotation framework

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

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.

![jupytercon 2020](https://jupytercon.com/_nuxt/img/5035c8d.svg)


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/).
We hope this repository helps you to explore how annotation UI's can be quickly build
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/).


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.
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/).

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.

## Please star, fork and open issues!


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.


## Install


`pip install ipyannotator`


**dependencies (should be handled by pip)**

```
Expand All @@ -37,7 +26,6 @@ ipyevents = "^0.8.0"
ipywidgets = "^7.5.1"
```


## Run ipyannotator as stand-alone web app using voila

Using `poetry`:
Expand All @@ -50,9 +38,8 @@ poetry run pip install voila
```
and run simple ipyannotator standalone example:
```shell
poetry run voila nbs/09_viola_example.ipynb --enable_nbextensions=True
poetry run voila nbs/09_voila_example.ipynb --enable_nbextensions=True
```


Same with `pip`:

Expand All @@ -62,11 +49,10 @@ Same with `pip`:
pip install .
pip install voila

voila nbs/09_viola_example.ipynb --enable_nbextensions=True
voila nbs/09_voila_example.ipynb --enable_nbextensions=True
```


# Documentation
## Documentation

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

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

## Jupyter lab trouble shooting

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

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


# How to contribute

## How to contribute

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

## Additional resources

## Copyright
![jupytercon 2020](https://jupytercon.com/_nuxt/img/5035c8d.svg)

- [jupytercon 2020 talk](https://cfp.jupytercon.com/2020/schedule/presentation/237/ipyannotator-the-infinitely-hackable-annotation-framework/).

##Acknowledgements

The authors acknowledge the financial support by the Federal Ministry for Digital and Transport of Germany under the program mFUND (project number 19F2160A).

## Copyright

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.

Expand Down
11 changes: 11 additions & 0 deletions _templates/layout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{% extends "!layout.html" %} {% block rootrellink %}
<script type="text/x-thebe-config">
{
requestKernel: true,
binderOptions: {
repo: "binder-examples/requirements",
ref: "master",
},
}
</script>
{{ super() }} {% endblock %}
64 changes: 64 additions & 0 deletions conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
from datetime import date

# -- Project information -----------------------------------------------------

project = 'Ipyannotator'
copyright = f'{date.today().year}, Palaimon GmbH'
author = 'Palaimon GmbH'

# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'myst_nb'
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['docs/_templates']

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', '.pytest_cache', '.venv/*']

# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'pydata_sphinx_theme'

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

html_theme_options = {
"icon_links": [
{
"name": "GitHub",
"url": "https://github.com/palaimon/ipyannotator",
"icon": "fab fa-github-square",
}
],
"show_nav_level": 2
}

execution_timeout = 1200
5 changes: 2 additions & 3 deletions dev_notes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
## env setup

# Env setup

To install lib and deps use:

Expand Down Expand Up @@ -39,7 +38,7 @@ To do so, add the option:

to the notebook metadata (`Edit > Edit Notebook Metadata`)

### How To build lib:
## How To build lib:

```
nbdev_build_lib
Expand Down
1 change: 0 additions & 1 deletion docs/.gitignore

This file was deleted.

4 changes: 0 additions & 4 deletions docs/Gemfile

This file was deleted.

66 changes: 0 additions & 66 deletions docs/_config.yml

This file was deleted.

Loading

0 comments on commit f82ef21

Please sign in to comment.