{ "info": { "author": "BrewPi", "author_email": "development@brewpi.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: GNU General Public License (GPL)", "Programming Language :: Python :: 3.7", "Topic :: System :: Hardware" ], "description": "# Boilerplate code for BrewBlox Service implementations\n\nThere is some boilerplate code involved when creating a Brewblox service. This repository can be forked to avoid having to do the boring configuration.\n\nEverything listed under **Required Changes** must be done before the package works as intended.\n\n## How to use\n\n* Fork this repository to your own Github account or project.\n* Follow all steps outlined under the various **Required Changes**.\n* Start coding your service =)\n * To test, run `pipenv run pytest`\n\n\n## Files\n\n---\n### [setup.py](./setup.py)\nUsed to create a distributable and installable Python package. See https://docs.python.org/3.6/distutils/setupscript.html for more information.\n\n**Required Changes:**\n* Change the `name` variable to your project name. This is generally the same as the repository name. This name is used when installing the package through Pip.
It is common for this name to equal the package name, but using \"`-`\" as separator instead of \"`_`\".\n* Change the `url` parameter to the url of your repository.\n* Change the `author` parameter to your name.\n* Change the `author_email` parameter to your email.\n\n\n---\n### [tox.ini](./tox.ini)\nDeveloper tools such as [Tox](http://tox.readthedocs.io/en/latest/index.html), [Pytest](https://docs.pytest.org/en/latest/), [Flake8](http://flake8.pycqa.org/en/latest/), and [Autopep8](https://github.com/hhatto/autopep8) use this file to find configuration options.\n\n**Required Changes:**\n* Change `--cov=YOUR_PACKAGE` to refer to your module name.\n* The `--cov-fail-under=100` makes the build fail if code coverage is less than 100%. It is optional, but recommended. Remove the `#` comment character to enable it.\n\n\n---\n### [.env](./.env)\nProject-specific environment variables can be stored here. `Pipenv` will automatically load it when executing a command in `pipenv run`.\n\nFor a basic service (not deployed to PyPi or Docker Hub), you do not need to add or edit anything here.\n\n\n---\n### [Pipfile](./Pipfile)\n[Pipenv](https://docs.pipenv.org/) is used to streamline development. It manages dependencies and virtual environments. It also automatically loads environment variables declared in `.env`.\n\n`Pipfile` lists all dependencies. Everything under [packages] is needed for the package to run, while everything under [dev-packages] is needed to run the tests.\n\nYou can use `pipenv install ` or `pipenv install --dev ` to add dependencies.\n\n**Note:** There is overlap between the [packages] section in `Pipfile`, and the `install_requires=[]` list in `setup.py`. The rule of thumb is that if you need an external package to run, you should add it to both.\n\n**Required Changes:**\n* Install pipenv (run `sudo pip3 install pipenv`)\n* Update the `Pipfile.lock` file (run `pipenv lock`)\n* Install all packages (run `pipenv sync -d`)\n\n\n---\n### [MANIFEST.in](./MANIFEST.in)\nThis file lists all non-code files that should be part of the package.\nSee https://docs.python.org/3.6/distutils/sourcedist.html#specifying-the-files-to-distribute for more info.\n\nFor a basic service, you do not need to change anything in this file.\n\n\n---\n### [.editorconfig](./.editorconfig)\nThis file contains [EditorConfig](https://editorconfig.org/) configuration for this project.
\nAmong other things, it describes per file type whether it uses tabs or spaces.\n\nFor a basic service, you do not need to change anything in this file.\nHowever, it is recommended to use an editor that recognizes and uses `.editorconfig` files.\n\n\n---\n### [README.md](./README.md)\nYour module readme (this file). It will be the package description on Pypi.org, and automatically be displayed in Github.\n\n**Required Changes:**\n* Add all important info about your package here. What does your package do? How do you use it? What is your favorite color?\n\n\n---\n### [YOUR_PACKAGE/](./YOUR_PACKAGE/)\nYour module. This name is used when importing your code in Python.\n\n**Required Changes:**\n* Rename to the desired module name. This name can't include \"`-`\" characters.
\nIt is common for single-module projects to use \"`-`\" as a separator for the project name, and \"`_`\" for the module.
\nFor example: `your-package` and `your_package`.\n\n\n---\n### [test/conftest.py](./test/conftest.py)\nProject-level pytest fixtures. Some useful fixtures for testing any brewblox_service implementation are defined here. See tests in https://github.com/BrewBlox/brewblox-service/tree/develop/test for examples on how to use.\n\nFor a basic implementation, you do not need to change anything in this file.\n\n\n---\n### [test/test_hello.py](./test/test_hello.py)\nAn example on how to test aiohttp endpoints you added. Feel free to remove this once you no longer need it.\n\n\n---\n### [docker/amd/Dockerfile](./docker/amd/Dockerfile)\nA docker file for running your package. To build, you need to copy the local version of your python package to `docker/dist/` first.\n\nThe Dockerfiles are set up so both the AMD (desktop) and ARM variants can use the same input files.\n\nExample:\n```bash\npython3 setup.py sdist\n\nrm docker/dist/*\ncp dist/* docker/dist/\npipenv lock --requirements > docker/requirements.txt\n\ndocker build \\\n --tag your-package:your-version \\\n --file docker/amd/Dockerfile \\\n docker/\n\n# run it\ndocker run your-package:your-version\n```\n\nTo cover the most common use cases, the `brewblox-tools` dependency defines the `bbt-localbuild` script.\n\nIt will read your .env file, run sdist, copy configuration to the docker directory, and build an image. Example:\n\n```bash\nbbt-localbuild\ndocker run your-package:local\n```\n\nExplore its other arguments with `bbt-localbuild --help`\n\n**Required Changes:**\n* Rename instances of `YOUR-PACKAGE` and `YOUR_PACKAGE` in the docker file to desired project and package names.\n\n\n---\n### [docker/arm/Dockerfile](./docker/arm/Dockerfile)\nThe same as for `docker/amd/Dockerfile`, but for Raspberry Pi targets.\n\nIn order to build for Raspberry, you must also first enable the ARM compiler.\n\nExample:\n```bash\npython3 setup.py sdist\n\nrm docker/dist/*\ncp dist/* docker/dist/\npipenv lock --requirements > docker/requirements.txt\n\n# Enable ARM compiler\ndocker run --rm --privileged multiarch/qemu-user-static:register --reset\n\n# Build the Raspberry Pi version\ndocker build \\\n --tag your-package:rpi-your-version \\\n --file docker/arm/Dockerfile \\\n docker/\n\n# Try to run Raspberry version\n# On the desktop, this will fail with \"standard_init_linux.go:190: exec user process caused \"exec format error\"\"\ndocker run --detach your-package:rpi-your-version\n```\n\n`bbt-localbuild` can also generate ARM images. It will automatically enable the QEMU compiler, and prefix the tag with `rpi-`. To use:\n\n```\nbbt-localbuild --arch arm\ndocker run your-package:rpi-local\n```\n\n**Required Changes:**\n* Rename instances of `YOUR-PACKAGE` and `YOUR_PACKAGE` in the docker file to desired project and package names.\n\n\n---\n### [azure-pipelines.yml](./azure-pipelines.yml)\n[Azure](https://dev.azure.com) can automatically test and deploy all commits you push to GitHub. If you haven't enabled travis for your repository: don't worry, it won't do anything.\n\nTo deploy your software, you will also need [PyPi](https://pypi.org/) and [Docker Hub](https://hub.docker.com/) accounts.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/BrewBlox/sim-adjuster", "keywords": "brewing brewpi brewblox development", "license": "", "maintainer": "", "maintainer_email": "", "name": "sim-adjuster", "package_url": "https://pypi.org/project/sim-adjuster/", "platform": "", "project_url": "https://pypi.org/project/sim-adjuster/", "project_urls": { "Homepage": "https://github.com/BrewBlox/sim-adjuster" }, "release_url": "https://pypi.org/project/sim-adjuster/0.1/", "requires_dist": null, "requires_python": ">=3.7", "summary": "", "version": "0.1" }, "last_serial": 5655765, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "b5761bc665ce81c0f4d29b2b5b46f726", "sha256": "595e6296339195364e0153cedbd2bc16df2c86a50eff7e09ab77c32c0e40b5b9" }, "downloads": -1, "filename": "sim-adjuster-0.1.tar.gz", "has_sig": false, "md5_digest": "b5761bc665ce81c0f4d29b2b5b46f726", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 7651, "upload_time": "2019-08-09T13:38:28", "url": "https://files.pythonhosted.org/packages/22/8a/9ea0918b5cce60a4f1f3e49cf14bbe836ea86cd6854378432ba04e5e1468/sim-adjuster-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b5761bc665ce81c0f4d29b2b5b46f726", "sha256": "595e6296339195364e0153cedbd2bc16df2c86a50eff7e09ab77c32c0e40b5b9" }, "downloads": -1, "filename": "sim-adjuster-0.1.tar.gz", "has_sig": false, "md5_digest": "b5761bc665ce81c0f4d29b2b5b46f726", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 7651, "upload_time": "2019-08-09T13:38:28", "url": "https://files.pythonhosted.org/packages/22/8a/9ea0918b5cce60a4f1f3e49cf14bbe836ea86cd6854378432ba04e5e1468/sim-adjuster-0.1.tar.gz" } ] }