Re: Contribution to Perldoc for TestLib module in Postgres

From: Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, "Iwata, Aya" <iwata(dot)aya(at)jp(dot)fujitsu(dot)com>
Cc: 'Ramanarayana' <raam(dot)soft(at)gmail(dot)com>, Prajwal A V <prajwal450(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>, Michael Paquier <michael(at)paquier(dot)xyz>
Subject: Re: Contribution to Perldoc for TestLib module in Postgres
Date: 2019-07-26 13:51:34
Message-ID: 907ba071-6058-f114-4687-49dac3713bba@2ndQuadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 7/10/19 9:38 AM, Alvaro Herrera wrote:
> On 2019-Apr-11, Iwata, Aya wrote:
>
>> In the above document, why not write a description after the function name?
>> I think it is better to write the function name first and then the description.
>> In your code;
>> #Checks if all the tests passed or not
>> all_tests_passing()
>>
>> In my suggestion;
>> all_tests_passing()
>> Checks if all the tests passed or not
> Yeah, so there are two parts in the submitted patch: first the synopsis
> list the methods using this format you describe, and later the METHODS
> section lists then again, using your suggested style. I think we should
> do away with the long synopsis -- maybe keep it as just the "use
> TestLib" line, and then let the METHODS section list and describe the
> methods.
>
>> And some functions return value. How about adding return information
>> to the above doc?
> That's already in the METHODS section for some of them. For example:
>
> all_tests_passing()
> Returns 1 if all the tests pass. Otherwise returns 0
>
> It's missing for others, such as "tempdir".
>
> In slurp_file you have this:
> Opens the file provided as an argument to the function in read mode(as
> indicated by <).
> I think the parenthical comment is useless; remove that.
>
> Please break long source lines (say to 78 chars -- make sure pgperltidy
> agrees), and keep some spaces after sentence-ending periods and other
> punctuation.
>

I've fixed the bitrot and some other infelicities on this patch. It's
not commitable yet but I think it's more reviewable.

cheers

andrew

--
Andrew Dunstan https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
testlib-doc-3.patch text/x-patch 12.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2019-07-26 14:41:50 Re: Support for jsonpath .datetime() method
Previous Message Ibrar Ahmed 2019-07-26 13:34:30 Re: SQL:2011 PERIODS vs Postgres Ranges?