From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Fri, 12 Jul 2024 14:13:43 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-lj1-f186.google.com (mail-lj1-f186.google.com [209.85.208.186]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 46CCDg20022867 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 12 Jul 2024 14:13:42 +0200 Received: by mail-lj1-f186.google.com with SMTP id 38308e7fff4ca-2ee8e904f01sf22551881fa.1 for ; Fri, 12 Jul 2024 05:13:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1720786417; cv=pass; d=google.com; s=arc-20160816; b=DFEI9+0fPEzrm24MnbFdQ3pLayiIMhbSDQK6xPoAx8Dm1oplkniNST63x21WUHezI3 dcl7tAZKV/5DFNdn4JxXusHOXgBvzJIYK1eqQqbO+ZmYvRyQ9bbgDqbNcyJLnTpAezEq 0nwRBz/BCewE7cyIXKGhh+ROUu20dKucFtf0TGRbN5FrcxHPsMtEroCwhbjOxMJieYun lYjK7RSlVfupOtS+iudY1sA/VA4HY534is9CeF24jg0u+DI07+z89KwvXn9APxdpuRsV EXQXJeweRV5gdyngV3ErwDnvTTVEn67EYRKDIGsR5apHFHj5KwnnhJsnUJhasx5MEllt Edow== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=p/FRyoiRPyhglNHjCRXpI80MqKTzU0jgT1n7w9CnbGw=; fh=5eGEtI8cx5v6Vh7+HGrC5vTi2UdRZ+Z6l67giiiTJ/8=; b=olOxaOSsmuhL1u+SgUTCrsyo3hvChGG/k4M1hG4WaSMVnLR0IKWC8QoRSz1Ow5PT+b QrcS+AxK4eh6ANpPT46inCaL0xV+BmnjI34JTC+pFwPP5gVVd6kgJjJ0vmSy4xXE2nB9 mKoU6zjhkpa91BUduqiSAU+6O6wi9laSDcXId5y8L3BTqV8VdWHmlW8W7HyqsnKPhGZZ qp7uNcU9wSxJBesEGBYKAnT+Y+F2HFQaaYYLAUDR0MLg+8Y2oPUYM3UEfFuDQHWe1VoQ 0Kc5n58SkwUjv6QBH6c6KBdSpZJ52ZiLmKWjZ+PsW6S9SXbRJpz+u3zpnUkhRBk2PzS/ WUyA==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1720786417; x=1721391217; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=p/FRyoiRPyhglNHjCRXpI80MqKTzU0jgT1n7w9CnbGw=; b=Jifoj/wSbdjCNd/3nn/v3jJk3G/HMidRMLBSax9pXVkksBw1kW+gOkNx0zcx5p7tZ+ qHYzuCRz4pP37qpaxRabslwGEC4pbD3sfdtf56n71HyGouSBKTFk2GK/SsEoHBa+eW34 Wx3y4U0qe8C+iIRfWdSm8KYqiH8u6qXLa5MdS+aEn+h/fRDvbZvm0+4rzLar1PaxbM8H s4f1AbrXC7/HgjPPhUCd7PEvk0CufCRkdKOy34KFCbz+C8P1+kjTeJlvwbc5kBHmilDV xi9dWy8aZblif19S/dUcvDe7dDDvd1ephItIOaPb3wWzWsPDBo76UGRcFp2nPB/r/opv 7L/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720786417; x=1721391217; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=p/FRyoiRPyhglNHjCRXpI80MqKTzU0jgT1n7w9CnbGw=; b=wbVqsJdhRs+TevohaMmkYMN/TwrHqgbMHLCGjYdm2V+G6DbeuTdrfrlqmGRk1PLUl8 evmdCmDu2dVLy7QbAujkbq0dpxcm6Yx1bwqmm4UJOLOAVAQPqg1q9kNXRqg5egJFGqpx 4NR/UmTbXMFV1Up2nATla6IrIBBohSdlygxzHP9UV7CBkTXNwxfKngq+iJ4fWlirPfSt VaMYcY12WJindQblSUz4qApGaM4VEzl9WNC6jZuCA6hVORGG/wCCWFqE/VVl6AX4Qq1i OCyYswnH4guzXB+NQHz3OfwnYJTifSIjWGDRyUj1Uj2z1aExIv9iGWN87qjMjdjU8V7q IZZA== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCWhFMyeruVZDiIGGHFflT4vDvMXjet+viNplh3NaOoJ8cf4nA/whUchtSeSUQZCR3CMH8/GN2h+xrMLJKVzM9YWbKA= X-Gm-Message-State: AOJu0YwRkNDdBEsbeZys2XpWdFZfPZ9GZ5UF8ChwRBRcB6InEp+zlx3f nNfWYpgtsQx1s4HyuigN+Be5H2IH4k55fmh3MzgutgU7P8CzgdAI X-Google-Smtp-Source: AGHT+IFcdnx5pTfhIQ9doKlDLwmVfnZWxj+TOsfWCRUqtFlZ5ui91taAjAfsi6xuSPKau0JCsqIghg== X-Received: by 2002:a2e:9955:0:b0:2ee:8698:10e8 with SMTP id 38308e7fff4ca-2eeb30e5ee4mr65953661fa.20.1720786416498; Fri, 12 Jul 2024 05:13:36 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:9d49:0:b0:2ec:5d3e:a6d3 with SMTP id 38308e7fff4ca-2eec93b3299ls10058691fa.2.-pod-prod-07-eu; Fri, 12 Jul 2024 05:13:34 -0700 (PDT) X-Received: by 2002:a2e:9d5a:0:b0:2ee:7c37:a5d5 with SMTP id 38308e7fff4ca-2eeb31026f0mr74710461fa.25.1720786414303; Fri, 12 Jul 2024 05:13:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720786414; cv=none; d=google.com; s=arc-20160816; b=rc/5oE0jR+k1+XPatJVMuQkxw13XzfQjmFKsgEHrIise/cNwtx4IOThIgquNdCMose 7fa4hudtkifLBmXkw5NmIy2kLCNYitBZZn3PTb4t4Iu/JVd16iByY4YzhrWXvD6YAE++ EGeY3eAnezPJt2t7dAx959VAT1VTCjCWfFUlpATkb+CJUB4S3hv5Vz7r1+RYafVBZsJ6 Hnz90z6UVIJNrejhHA2j60r/iR+gTZv641ADf8L2qSmHEhyPKX1S8YBh9PEvkiagBIel 5I4vKIvtIUjBlWK0Qqv3S7qeaQFCXUU0ciWT6arzh3Y2JllIMfoPLBjXNe8NqG5UlH2l mhvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=o3SUtpXfFvh/9UUbTo92FCeGF8erDsict/XGhlpmaYI=; fh=/h9QQkzJ8EboVkWg45aWwpaUro6WMavIVd2OhN45RtE=; b=Lf6kmrrYK5Badx+6bsgXVpWcKc+FB+hnVcN6gtw56ySNbDrhSzMST7CqVPNkpB4317 lWAUM+IGOtln9fTQ+08SwbwcfzKoYsQxlk7yDOPIrHH4nqo5gDeRKeyOOL2+YfzIlJ7q DEYX1mgtsiJUBLJK4dXY3t1Tso5mHqAMJcu31JXKLL1JpA9lPjJ6uZE56oMrYvs3nLMQ OLamZbh1N69xmWIyeVwL2I7hOqSZOzIF4nAQXWYB+lqPzDjfAcXXD14dTy/t0CLw5ujA fsAqDcl7sh9uwzxIsN1k4GURs3rTHiiaSfAkYmLc+MDmjqrB5CL2YppxLQWbXmTEj1zb TYbg==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id 5b1f17b1804b1-426740d995asi5064875e9.1.2024.07.12.05.13.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Jul 2024 05:13:34 -0700 (PDT) Received-SPF: pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Received: from user-B660.promwad.corp ([159.148.83.114]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 46CCDVoZ022837 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 12 Jul 2024 14:13:33 +0200 From: Anton Mikanovich To: isar-users@googlegroups.com Cc: Anton Mikanovich Subject: [PATCH 1/2] testsuite: Provide code style documentation Date: Fri, 12 Jul 2024 15:13:23 +0300 Message-Id: <20240712121324.2200037-2-amikan@ilbers.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240712121324.2200037-1-amikan@ilbers.de> References: <20240712121324.2200037-1-amikan@ilbers.de> MIME-Version: 1.0 X-Spam-Status: No, score=-4.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,RCVD_IN_RP_CERTIFIED, RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-Original-Sender: amikan@ilbers.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-TUID: lw7Nxx9wn1uM Add some recomendations for testcase creators. Signed-off-by: Anton Mikanovich --- testsuite/README.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/testsuite/README.md b/testsuite/README.md index cfcfb1bf..7cbacf99 100644 --- a/testsuite/README.md +++ b/testsuite/README.md @@ -137,6 +137,51 @@ avocado so that isar testsuite files could be found: export PYTHONPATH=${PYTHONPATH}:${TESTSUITEDIR} ``` +# Code style for testcases + +Recommended Python code style for the testcases is based on +[PEP8 Style Guide for Python Code](https://peps.python.org/pep-0008) with +several additions described below. + +## Using quotes + +Despite [PEP8](https://peps.python.org/pep-0008) doesn't have any string quote +usage recommendations, Isar preffered style is the following: + + - Single quotes for data and small symbol-like strings. + - Double quotes for human-readable strings and string interpolation. + +## Line wrapping + +Argument lists don't fit in 79 characters line limit should be placed on the +new line, keeping them on the same line if possible. Otherwise every single +argument should be placed in separate line. + +## Function definition spacing + +Any function and class definition should done in the following way: + + - One line before and after inner functions. + - Two lines before and after module-level functions and classes. + +## Tools for checking code style + +To check the compliance with PEP8 standards: + +``` +$ flake8 sample.py +``` + +To format the code to recommended code style: + +``` +$ black -S -l 79 sample.py +``` + +Black use it's own [code style](https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html) +based on [PEP8](https://peps.python.org/pep-0008), so some options should be +used to set non-default style checking behaviour. + # Example of the downstream testcase See `meta-isar/test` for an example of the testcase for kas-based downstream. -- 2.34.1 -- You received this message because you are subscribed to the Google Groups "isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/20240712121324.2200037-2-amikan%40ilbers.de.