Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lvxgq-0004oT-HM for pgadmin-hackers@arkaria.postgresql.org; Wed, 23 Jun 2021 07:52:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lvxgn-0006rU-IN for pgadmin-hackers@arkaria.postgresql.org; Wed, 23 Jun 2021 07:52:49 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lvxgn-0006rM-8i for pgadmin-hackers@lists.postgresql.org; Wed, 23 Jun 2021 07:52:49 +0000 Received: from mail-io1-xd2d.google.com ([2607:f8b0:4864:20::d2d]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lvxgg-0004cM-1n for pgadmin-hackers@postgresql.org; Wed, 23 Jun 2021 07:52:47 +0000 Received: by mail-io1-xd2d.google.com with SMTP id b14so2164573iow.13 for ; Wed, 23 Jun 2021 00:52:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Mh/4bR2trNyursXYdmwBTj/lq0Urt9IZ5l49ovgCd6g=; b=fQsyFJYANOKaSkKzqfbOGs0eOp5XAeK74Ftag9nSJ8MQhOjqoNj/SMzP+BLWCDzmgi n4cxunhWdz7qh8ppuZFvtuNN6WR7TnFYdxK6qxtIwfclElbDooR3+ooJPsP17WJcuoxl 73LkY1C8glOi8PUQHT+QLuiEu2b9WV9uSM0N8s2F8SOfRgwhT1B/VISkEAO5N59DgSgW CgiwToPduU9/8kJ8ThDHTN/qKQ7T7w6dxXHZzqwP6YrgdsgrUcsuo54q7v88vU/lXTtK 4fszSAEmfCD1/WkxpcK1bBSRlVaktn1Gz6qsxcj017OdJU0D84G+FcbOt71X5ANKI2eZ 5Iqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Mh/4bR2trNyursXYdmwBTj/lq0Urt9IZ5l49ovgCd6g=; b=Srwi0mtG2CTIn5/d+MAHHFzeshwag1+t8FGsZgJPnxMnzETCnlq1q4lETb1UYkJ7MF u3r3FUp2kUbz6wU1FFdiJ0QcIcgM1b2yGWhWreh37MnOyX46skPzc8mw17/il3uyI384 +8zfnSlUxwTemo2Jmxw6f6Ep4FLZXg1mYPGdyTDVL6vdfU9dbP6dykOxtDKjfk9gsFL3 8xXWwF9n+anGUh1fLnsjZi1BJmuJELYZIdDgyCcFYl+EBI0tMAK4gXfrNK8y5CRcUNzS /URFilUxdx9YtZKC7e3SR86GiVxKhgbVRHuQmbZh7F6Dlu6cQM64waDPVjLhNUGDKEjL 0NpQ== X-Gm-Message-State: AOAM531SCiVOH+WvYeUV6QR+XD4D97VbxCZbGhCxspfbN4uWBGiD3hHV UwcgWkee3rOzdCi0Ju6ntCUVGuGLc9QTAemcepuwNGknISe+VdkEMx40mYT6rV/PnhwITybAD9N ic20YnEofZ7C6tF0ElIux1D/nl9KEi1kUtKqFoQh+0tmwcb2cv371DgAdFLxfF8WMfISL7njthg qv/VTtiJWv+xhicNPzzhDE9P2rx4F57ooIrdudMzoH3vxcrmiHgZ2nZyKu2ReALI52OQ== X-Google-Smtp-Source: ABdhPJwpROOjubBvTPfd0b2mjdDxhIhpnvpZgmWKWKSZM90MuSiIdVseqUltvjsw2WiiN8h2ATEMaN4CSV1WN4U1uIc= X-Received: by 2002:a6b:e018:: with SMTP id z24mr6160377iog.206.1624434761208; Wed, 23 Jun 2021 00:52:41 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Akshay Joshi Date: Wed, 23 Jun 2021 13:22:30 +0530 Message-ID: Subject: Re: Refactor: Registry Classes To: Ashesh Vashi Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary="000000000000e7296905c56a3017" X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000e7296905c56a3017 Content-Type: text/plain; charset="UTF-8" Hi Ashesh Following are the review comments: - Fixed PEP8 issues. - In "dynamic_registry/__init__.py" decorator @classmethod used for " *_get*" and "*_load_modules*" methods which are actually outside of the class. Even constructor also outside of the class. - Remove unused imports from "driver/registry.py" - Fixed sonarqube issues in "dynamic_registry/tests/registry/__init__.py" On Sat, Jun 19, 2021 at 11:27 AM Ashesh Vashi wrote: > On Sat, Jun 19, 2021 at 1:39 AM Ashesh Vashi < > ashesh.vashi@enterprisedb.com> wrote: > >> Hi Akshay, >> >> We do have a couple of classes, which does automatic registration of the >> base classes, >> and which creates single-ton objects for these base classes, when needed. >> >> I would be working on a patch sooner, which will be using similar >> functionality for loading >> the multi-factor authentication. >> >> I realized - it will be a duplicate code at three places for the same >> functionalities. >> Hence - I worked on refactoring this registry class. >> >> Please find the patch for the same. >> > Found issues - some test files were using the old function > 'Driver.load_drivers(...)'. > They're fixed now. > > -- Thanks, Ashesh > >> >> -- >> >> Thanks & Regards, >> >> Ashesh Vashi >> EnterpriseDB INDIA: Enterprise PostgreSQL Company >> >> >> >> *http://www.linkedin.com/in/asheshvashi* >> >> > -- *Thanks & Regards* *Akshay Joshi* *pgAdmin Hacker | Principal Software Architect* *EDB Postgres * *Mobile: +91 976-788-8246* --000000000000e7296905c56a3017 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi=C2=A0Ashesh

Following are the review= comments:
  • Fixed PEP8 issues.
  • In "dynamic_re= gistry/__init__.py" decorator @classmethod used for "_get&= quot; and "_load_modules" methods which are actually outsi= de of the class. Even constructor also outside of the class.
  • Re= move unused imports from "driver/registry.py"
  • Fixed sonar= qube issues in "dynamic_registry/tests/registry/__init__.py"
  • =

On Sat, Jun 19, 2021 at 11:27 AM Ashesh Vashi <ashesh.vashi@enterprisedb.com> wr= ote:
On Sat, Jun 19, 2021 at 1:39 AM Ashesh Vashi <ashesh.vash= i@enterprisedb.com> wrote:
Hi Akshay,
We do have a couple of classes, which does automatic regis= tration of the base classes,
and which creates single-ton objects= for these base classes, when needed.

I would be w= orking on a patch sooner, which will be using similar functionality for loa= ding
the multi-factor authentication.

I = realized - it will be a duplicate code at three places for the same functio= nalities.
Hence - I worked on refactoring this registry class.

Please find the patch for the same.=C2=A0
Found issues - some test files were using the old functi= on 'Driver.load_drivers(...)'.
They're fixed now.

-- Thanks, Ashesh

--<= /span>

Thanks & R= egards,

Ashesh Vashi
EnterpriseDB INDIA: <= /span>Enterprise = PostgreSQL Company


http://www.linkedin.com/in/asheshvashi



--
Thanks & Regards
Akshay Joshi
pgAdmi= n Hacker | Principal Software Architect
EDB Postgres
Mobile: +91 976-788-8246

--000000000000e7296905c56a3017--