| # Reference at |
| # https://packaging.python.org/en/latest/specifications/declaring-project-metadata/ |
| # https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html |
| |
| [build-system] |
| requires = [ |
| "setuptools", |
| "setuptools-scm", |
| ] |
| build-backend = "setuptools.build_meta" |
| |
| [project] |
| name = "honeydew" |
| description = "Python module for Host-(Fuchsia)Target interactions" |
| requires-python = ">=3.8" |
| dynamic = ["version"] |
| readme = "README.md" |
| keywords = ["honeydew", "lacewing", "pye2e", "e2e", "python", "controller"] |
| |
| dependencies = [] |
| |
| [project.optional-dependencies] |
| # Testing related dependencies |
| test = [ |
| "parameterized==0.7.4", # for unit tests |
| "mobly==1.12.1", # for functional tests |
| "pypng==0.20220715.0", # lacewing dependency |
| ] |
| # Coding guidelines related dependencies |
| guidelines = [ |
| "coverage==7.2.7", # for measuring code coverage using unit tests |
| "pylint==2.17.4", # for code linting |
| "isort==5.12.0", # for sorting imports |
| "autoflake==2.1.1", # for removeing unused imports and unused variables |
| ] |
| |
| [tool.setuptools.packages.find] |
| where = ["."] # list of folders that contain the packages (["."] by default) |
| include = ["honeydew*"] # package names should match these glob patterns (["*"] by default) |
| |
| [tool.isort] |
| # Reference at https://pycqa.github.io/isort/docs/configuration/config_files.html |
| profile = "black" |
| line_length = 80 |
| |
| # Honeydew uses the MyPy config in fuchsia/pyproject.toml for type checking. |
| # To enable MyPy type checking on a Python target: |
| # 1. Add `enable_mypy = true` to the python build target configuration |
| # 2. Run `fx build` to generate type checking results |
| # Alternatively, run the following command for MyPy type checking on Honeydew directory: |
| # PYTHONPATH=$FUCHSIA_DIR/third_party/pylibs/mypy/src:$FUCHSIA_DIR/third_party/pylibs/mypy_extensions/src:$FUCHSIA_DIR/third_party/pylibs/typing_extensions/src/src:$PYTHONPATH |
| # fuchsia-vendored-python -S -m mypy --config-file pyproject.toml src/testing/end_to_end/honeydew |
| |
| # Honeydew uses `fx format-code` to format the code. |
| # `fx format-code` uses `black` underneath to format the python code, using the |
| # configuration specified in $FUCHSIA_DIR/pyproject.toml. |
| # So just run the below command to format the code inside this folder: |
| # `fx format-code "--files=${FUCHSIA_DIR}/src/testing/end_to_end/honeydew/*" --all` |