Can you check if you are sending to both toaster and bitbake-devel lists at
the same time? otherwise I have a feeling we are going to miss some
communication.

On Wed, Oct 18, 2023 at 12:46 PM Marlon Rodriguez Garcia <
[email protected]> wrote:

> Added configuration file for tox https://tox.wiki/en/4.11.3/ that
> includes flake8 and the test suite.
>

We do not have tox in openembedded-core and I am reluctant to add a
specific tool, as it has a lot of dependencies. I am not aware of any other
python based tools that we author which have tox enabled.


> This file can be execute using the command 'tox tox.ini' and can be used
> in autobuilder.
>
> By adding flake8 to the validation of toaster the following aspects have
> to be take into consideration:
> Objective
> - To comply with PEP8 standards, we propose to utilize a linting
> tool(Flake8) that checks toaster's codebase for errors, styling issues and
> complexity
>
> Ruleset
> - See complete list of rules : https://www.flake8rules.com/
>
> Assumptions
> - We are aware that not all Flake8 rules can be applied to current
> codebase (those determined to be more troublesome can be excluded).
> - The patches can be integrated gradually by sections and/or rules.
> - The tox.ini will include the execution of the test suite.
>
> Pros
> - Standardized codebase for future integrations.
> - Majority of the patches will be syntax modifications and not affecting
> application logic.
>
> Cons
> - Major refactor of the codebase.
>
> Signed-off-by: Marlon Rodriguez Garcia <
> [email protected]>
> ---
>  lib/toaster/tox.ini | 25 +++++++++++++++++++++++++
>  1 file changed, 25 insertions(+)
>  create mode 100644 lib/toaster/tox.ini
>
> diff --git a/lib/toaster/tox.ini b/lib/toaster/tox.ini
> new file mode 100644
> index 00000000..bcdfdb4f
> --- /dev/null
> +++ b/lib/toaster/tox.ini
> @@ -0,0 +1,25 @@
> +[tox]
> +envlist = py310
> +skipsdist = True
> +toxworkdir = {env:TOX_WORKDIR:.tox}
> +passenv = *
> +
> +[testenv]
> +setenv =
> +    DJANGO_SETTINGS_MODULE=toastermain.settings_test
> +    TOASTER_BUILDSERVER=1
> +    EVENTREPLAY_DIR={toxinidir}/../../../build/
> +    BUILDDIR={toxinidir}/../../../build/
> +commands =
> +    flake8
> +    python3 {toxinidir}/manage.py test tests.db tests.commands
> tests.builds tests.browser tests.functional tests.views
> +deps =
> +    -r ../../toaster-requirements.txt
> +    -r {toxinidir}/tests/toaster-tests-requirements.txt
> +    flake8
> +
> +[flake8]
> +ignore = E501, F403
> +
> +[testenv:chrome]
> +commands={[testenv]commands} --splinter-webdriver=chrome
> \ No newline at end of file
> --
> 2.34.1
>
>
> 
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5874): https://lists.yoctoproject.org/g/toaster/message/5874
Mute This Topic: https://lists.yoctoproject.org/mt/102046799/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/toaster/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to