{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Contribute\n", "\n", "Before we can accept contributions, you need to become a CLAed contributor.\n", "E-mail a signed copy of the\n", "[CLAI](https://github.com/openpifpaf/openpifpaf/blob/main/docs/CLAI.txt)\n", "(and if applicable the\n", "[CLAC](https://github.com/openpifpaf/openpifpaf/blob/main/docs/CLAC.txt))\n", "as PDF file to research@svenkreiss.com." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "(modify-code)=\n", "## Modify Code\n", "\n", "For development of the openpifpaf source code itself, you need to clone this repository and then:\n", "\n", "```sh\n", "pip3 install --editable '.[dev,train,test]'\n", "```\n", "\n", "The last command installs the Python package in the current directory\n", "(signified by the dot) with the optional dependencies needed for training and\n", "testing. If you modify C code, run this last command again which\n", "recompiles the static code.\n", "\n", "Develop your features in separate feature branches. \n", "Create a pull request with your suggested changes. Make sure your code passes\n", "`pytest`, `pylint` and `pycodestyle` checks:\n", "\n", "```sh\n", "pylint openpifpaf\n", "pycodestyle openpifpaf\n", "pytest\n", "\n", "cd guide\n", "python download_data.py\n", "pytest --nbval-lax --current-env *.ipynb\n", "```" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Things to Contribute\n", "\n", "This is a research project and changing fast. Contributions can be in many areas:\n", "* Add a new dataset?\n", "* Add a new base network? \n", "* Try a different loss? \n", "* Try a better multi-task strategy?\n", "* Try a different head architecture? \n", "* Add a new task? \n", "* Run on new hardware (mobile phones, embedded devices, ...)? \n", "* Improve training schedule/procedure?\n", "* Use it to build an app?\n", "* Improve documentation (!!)\n", "* ..." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Missing Dependencies\n", "\n", "OpenPifPaf has few core requirements so that you can run it efficiently on servers without graphical interface. \n", "Sometimes, you just want to install all possible dependencies. Those are provided as \"extra\" requirements. \n", "Use the following `pip3` command to install all extras." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "tags": [ "remove-input" ] }, "outputs": [], "source": [ "# NO CODE\n", "import sys\n", "if sys.version_info >= (3, 8):\n", " import importlib.metadata\n", " extras = importlib.metadata.metadata('openpifpaf').get_all('Provides-Extra')\n", " print(f'pip3 install \"openpifpaf[{\",\".join(extras)}]\"')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Your Project and OpenPifPaf\n", "\n", "Let us know about your open source projects. We would like to feature them in our \"related projects\" section. \n", "\n", "The simplest way to integrate with OpenPifPaf is to write a plugin. If some functionality is not possible through our plugin architecture, open an issue to discuss and if necessary send us a pull request that enables the missing feature you need.\n", "\n", "If you do need to make a copy of OpenPifPaf, you must respect our license." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Build Guide\n", "\n", "```sh\n", "pip install jupyter-book\n", "cd guide\n", "jb build .\n", "```\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "(build-environment)=\n", "## Build Environment\n", "\n", "Below are information about the system that built this guide and all examples\n", "in it. To debug an issue, it can be helpful to run these commands on your\n", "system and see what is different." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%%bash\n", "python -m openpifpaf.predict --version" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%%bash\n", "pip freeze" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "!ffmpeg -codecs" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "name": "python", "version": "" } }, "nbformat": 4, "nbformat_minor": 2 }