bossenti commented on code in PR #140: URL: https://github.com/apache/incubator-streampipes/pull/140#discussion_r1020906874
########## streampipes-client-python/DEVELOPMENT.md: ########## @@ -0,0 +1,76 @@ +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one or more + ~ contributor license agreements. See the NOTICE file distributed with + ~ this work for additional information regarding copyright ownership. + ~ The ASF licenses this file to You under the Apache License, Version 2.0 + ~ (the "License"); you may not use this file except in compliance with + ~ the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + ~ +--> + +# Development Guide +This document describes how to easily set up your local dev environment to work on the +StreamPipes Python client :snake:. + +### First Steps :rocket: +<br> + +1) **Set up your Python environment** + +Create a virtual Python environment with a tool of your choice. +As a next step, install all required dependencies for the development, e.g., with `pip`: + +``` +pip install .[dev] # or alternatively: pip install .[all] to include dependencies for building the docs as well +``` + +In case you are on macOS and using `zsh` the following should work for you: +``` +pip install ."[dev]" +``` +<br> + +2) **Install pre-commit hook** + +The pre-commit hook is run before every commit and takes care about code style, +linting, type hints, import sorting, etc. It will stop your commit in case the changes do not apply the expected format. +Always check to have the recent version of the pre-commit installed otherwise the CI build might fail: + +``` +pre-commit install +``` +The definition of the pre-commit hook can be found in [.pre-commit-config.yaml](.pre-commit-config.yaml). + +<br> + +### Conventions :clap: Review Comment: Any objections here? Is style and tone of voice appropriate? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
