Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aVEF3-0007e7-5i for pgadmin-hackers@arkaria.postgresql.org; Mon, 15 Feb 2016 08:10:45 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aVEF2-00074W-Gt for pgadmin-hackers@arkaria.postgresql.org; Mon, 15 Feb 2016 08:10:44 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aVEEo-0006po-H0 for pgadmin-hackers@postgresql.org; Mon, 15 Feb 2016 08:10:30 +0000 Received: from mail-yk0-x22c.google.com ([2607:f8b0:4002:c07::22c]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1aVEEl-0004vC-EB for pgadmin-hackers@postgresql.org; Mon, 15 Feb 2016 08:10:29 +0000 Received: by mail-yk0-x22c.google.com with SMTP id r207so57564542ykd.2 for ; Mon, 15 Feb 2016 00:10:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=G+un32TW7MnzhOPp8AA/TYVBx/340Ek8X6LfyBi/+B0=; b=KRfyzJoQmwcJT572Wvm/axUOXzUkfVoA6odcqGbSttB7VZzT2kk+g3DaIBvxsyca25 mdpucu7OidjNtG71CsGIIQhttxkh7EWsJ7sYAmi6GVb/aQkklP2mDotk2Hla74dwwGwi m8UIrgyZMLrdAJ9kQ4Gs0o2SSQDv+4wu3R7rkHqDQMdoqn9KsQ45sJOEkHr839tz6Zjy zkbdJDxyzehiZ5h16X4DDA++KihJfuH3AbAKQRBvZDugQmBCMAz1eVoJGroxtJ9JWU+L QLLPURXsneOzkrQraMxPASTcnSPy0gOHP/Fr+qrLUKOtGrtFSBcLI0wRkPaLKBfAKoj6 kZeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=G+un32TW7MnzhOPp8AA/TYVBx/340Ek8X6LfyBi/+B0=; b=l3ERACaN/fe9IE6kHsteZxeT2E2ARMhCU2fueZblzy7C4R0oxSkW4LEIjqB6ht5iR+ eaoxiPPgcm84gcM4F20O32W+zz45wZ/sD7F8laRtCt2lGC6UHrR84h9sLolQrb/fmX5g aVwVLVT7tIOxCORvAdO4ExiXUCuS83OZp+lXqlcXvEVo15Qr605SNgaToq+IPpH0UGk7 XlRYuuNNxyjaeuZdiagNxOAAwS44d9oUa3tACKfiE4H3KSVey4uNmy+SCBzeLTGeUb0+ pwMy15kOsCFv3VZuly/aKFWgIY1TdsUmbYqz+gtpsQbr4g/WRcufOtWnWJdkzrnfCrl5 colw== X-Gm-Message-State: AG10YOTy3KVAKc+cI77gu9KVxw316tOSipJHDr6V8MW/X97vWkSyDEbfIGFtNF2uJZ+enNOMg/9f07t4AvFpo6JL MIME-Version: 1.0 X-Received: by 10.37.3.197 with SMTP id 188mr5561136ybd.55.1455523826744; Mon, 15 Feb 2016 00:10:26 -0800 (PST) Received: by 10.129.84.198 with HTTP; Mon, 15 Feb 2016 00:10:26 -0800 (PST) In-Reply-To: References: Date: Mon, 15 Feb 2016 13:40:26 +0530 Message-ID: Subject: Re: patch for cast module From: Sanket Mehta To: Dave Page Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary=001a11c0c1c8a7faf7052bca8c9d X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org --001a11c0c1c8a7faf7052bca8c9d Content-Type: text/plain; charset=UTF-8 Hi Dave, Regarding your suggestion of putting some comments in javascript, I think I have already put some comments regarding model data and their controls if any extended. Can you please let me know where exactly you think more comments are required? Regards, Sanket Mehta Sr Software engineer Enterprisedb On Fri, Feb 12, 2016 at 9:54 PM, Dave Page wrote: > > > On Fri, Feb 12, 2016 at 11:57 AM, Sanket Mehta < > sanket.mehta@enterprisedb.com> wrote: > >> Hi Akshay, >> >> PFA the updated patch. >> >> > Hi > > When testing this patch, I get the following error: > > Traceback (most recent call last): > File "pgAdmin4.py", line 56, in > app = create_app() > File "/Users/dpage/git/pgadmin4/web/pgadmin/__init__.py", line 194, in > create_app > app.register_blueprint(module) > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", > line 62, in wrapper_func > return f(self, *args, **kwargs) > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", > line 889, in register_blueprint > blueprint.register(self, options, first_registration) > File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/__init__.py", line 40, > in register > app.register_blueprint(module) > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", > line 62, in wrapper_func > return f(self, *args, **kwargs) > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", > line 889, in register_blueprint > blueprint.register(self, options, first_registration) > File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/__init__.py", line 40, > in register > app.register_blueprint(module) > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", > line 62, in wrapper_func > return f(self, *args, **kwargs) > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", > line 889, in register_blueprint > blueprint.register(self, options, first_registration) > File > "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/__init__.py", > line 147, in register > super(ServerModule, self).register(app, options, first_registration) > File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/__init__.py", line 40, > in register > app.register_blueprint(module) > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", > line 62, in wrapper_func > return f(self, *args, **kwargs) > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", > line 889, in register_blueprint > blueprint.register(self, options, first_registration) > File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/__init__.py", line 37, > in register > self.submodules = list(app.find_submodules(self.import_name)) > File "/Users/dpage/git/pgadmin4/web/pgadmin/__init__.py", line 42, in > find_submodules > module = import_module(module_name) > File > "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", > line 37, in import_module > __import__(name) > File > "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/casts/__init__.py", > line 21, in > from html import escape > ImportError: No module named html > > Other comments: > > - Leave a blank line before the header block and the first line of Python > code please. > - There is no pydoc description for the module. > - The javascript is almost completely devoid of comments. There should be > at least a minimal amount to explain what each code block is doing. > - There should be no blank lines at the top of SQL templates (e.g. > create.sql). > > -- > Dave Page > Blog: http://pgsnake.blogspot.com > Twitter: @pgsnake > > EnterpriseDB UK: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > --001a11c0c1c8a7faf7052bca8c9d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Dave,

Regarding your suggestion = of putting some comments in javascript, I think I have already put some com= ments regarding model data and their controls if any extended.

Can you please let me know where exactly you think more comments are requi= red?


Regards,
Sanket Mehta
Sr Software engineer
Enterprisedb

On Fri, Feb 12, 2016 at 9:54 PM, Dave Page <= span dir=3D"ltr"><dpage@pgadmin.org> wrote:
=


On Fri, Feb 12, 2016 at 11:57 AM, Sanket Mehta <sanket.mehta@enterprisedb.com> wrote:
Hi Akshay,

PFA the updated pa= tch.


Hi

When testing this patch, I get the fol= lowing error:

Traceback (most recent call las= t):
=C2=A0 File "pgAdmin4.py", line 56, in <module&g= t;
=C2=A0 =C2=A0 app =3D create_app()
=C2=A0 File "= ;/Users/dpage/git/pgadmin4/web/pgadmin/__init__.py", line 194, in crea= te_app
=C2=A0 =C2=A0 app.register_blueprint(module)
=C2= =A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packag= es/flask/app.py", line 62, in wrapper_func
=C2=A0 =C2=A0 ret= urn f(self, *args, **kwargs)
=C2=A0 File "/Users/dpage/.virt= ualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line 889, = in register_blueprint
=C2=A0 =C2=A0 blueprint.register(self, opti= ons, first_registration)
=C2=A0 File "/Users/dpage/git/pgadm= in4/web/pgadmin/utils/__init__.py", line 40, in register
=C2= =A0 =C2=A0 app.register_blueprint(module)
=C2=A0 File "/User= s/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py"= ;, line 62, in wrapper_func
=C2=A0 =C2=A0 return f(self, *args, *= *kwargs)
=C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib= /python2.7/site-packages/flask/app.py", line 889, in register_blueprin= t
=C2=A0 =C2=A0 blueprint.register(self, options, first_registrat= ion)
=C2=A0 File "/Users/dpage/git/pgadmin4/web/pgadmin/util= s/__init__.py", line 40, in register
=C2=A0 =C2=A0 app.regis= ter_blueprint(module)
=C2=A0 File "/Users/dpage/.virtualenvs= /pgadmin4/lib/python2.7/site-packages/flask/app.py", line 62, in wrapp= er_func
=C2=A0 =C2=A0 return f(self, *args, **kwargs)
= =C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-pac= kages/flask/app.py", line 889, in register_blueprint
=C2=A0 = =C2=A0 blueprint.register(self, options, first_registration)
=C2= =A0 File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/= servers/__init__.py", line 147, in register
=C2=A0 =C2=A0 su= per(ServerModule, self).register(app, options, first_registration)
=C2=A0 File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/__init__.py= ", line 40, in register
=C2=A0 =C2=A0 app.register_blueprint= (module)
=C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib= /python2.7/site-packages/flask/app.py", line 62, in wrapper_func
=
=C2=A0 =C2=A0 return f(self, *args, **kwargs)
=C2=A0 File &q= uot;/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/ap= p.py", line 889, in register_blueprint
=C2=A0 =C2=A0 bluepri= nt.register(self, options, first_registration)
=C2=A0 File "= /Users/dpage/git/pgadmin4/web/pgadmin/utils/__init__.py", line 37, in = register
=C2=A0 =C2=A0 self.submodules =3D list(app.find_submodul= es(self.import_name))
=C2=A0 File "/Users/dpage/git/pgadmin4= /web/pgadmin/__init__.py", line 42, in find_submodules
=C2= =A0 =C2=A0 module =3D import_module(module_name)
=C2=A0 File &quo= t;/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/im= portlib/__init__.py", line 37, in import_module
=C2=A0 =C2= =A0 __import__(name)
=C2=A0 File "/Users/dpage/git/pgadmin4/= web/pgadmin/browser/server_groups/servers/databases/casts/__init__.py"= , line 21, in <module>
=C2=A0 =C2=A0 from html import escap= e
ImportError: No module named html

Other comments:

- Leave a blank line before the = header block and the first line of Python code please.
- There is= no pydoc description for the module.
- The javascript is almost = completely devoid of comments. There should be at least a minimal amount to= explain what each code block is doing.
- There should be no blan= k lines at the top of SQL templates (e.g. create.sql).

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twi= tter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise Pos= tgreSQL Company

--001a11c0c1c8a7faf7052bca8c9d--