<!-- 
RSS generated by JIRA (8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b) at Sat Feb 10 15:54:55 JST 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>PFS-JIRA</title>
    <link>https://pfspipe.ipmu.jp/jira</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.3.4</version>
        <build-number>803005</build-number>
        <build-date>13-09-2019</build-date>
    </build-info>


<item>
            <title>[PIPE2D-565] Write a script to generate a bash script from yaml</title>
                <link>https://pfspipe.ipmu.jp/jira/browse/PIPE2D-565</link>
                <project id="10002" key="PIPE2D">DRP 2-D Pipeline</project>
                    <description>&lt;p&gt;Write a python script that generates from a yaml a bash script to create calibs and run science pipeline.&lt;/p&gt;</description>
                <environment></environment>
        <key id="14348">PIPE2D-565</key>
            <summary>Write a script to generate a bash script from yaml</summary>
                <type id="5" iconUrl="https://pfspipe.ipmu.jp/jira/secure/viewavatar?size=xsmall&amp;avatarId=10516&amp;avatarType=issuetype">Sub-task</type>
                            <parent id="13573">PIPE2D-423</parent>
                                    <priority id="10000" iconUrl="https://pfspipe.ipmu.jp/jira/images/icons/priorities/medium.svg">Normal</priority>
                        <status id="10002" iconUrl="https://pfspipe.ipmu.jp/jira/images/icons/statuses/generic.png" description="The issue is resolved, reviewed, and merged">Done</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="sogo.mineo">sogo.mineo</assignee>
                                    <reporter username="sogo.mineo">sogo.mineo</reporter>
                        <labels>
                    </labels>
                <created>Thu, 23 Apr 2020 06:36:27 +0000</created>
                <updated>Thu, 13 Jan 2022 14:35:36 +0000</updated>
                            <resolved>Thu, 4 Jun 2020 00:34:15 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                <comments>
                            <comment id="17086" author="sogo.mineo" created="Thu, 23 Apr 2020 06:39:14 +0000"  >&lt;p&gt;Wrote one. (But I don&apos;t know where to push it)&lt;/p&gt;</comment>
                            <comment id="17094" author="hassan" created="Fri, 24 Apr 2020 20:38:01 +0000"  >&lt;p&gt;Can you initially add the python script to this ticket please?&lt;/p&gt;</comment>
                            <comment id="17095" author="sogo.mineo" created="Mon, 27 Apr 2020 05:04:50 +0000"  >&lt;p&gt;I uploaded the python script forked from &lt;a href=&quot;https://github.com/lsst-dm/generateCalibrations&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://github.com/lsst-dm/generateCalibrations&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="17112" author="sogo.mineo" created="Thu, 30 Apr 2020 07:38:00 +0000"  >&lt;p&gt;Added the code to &lt;tt&gt;pfs_pipe2d&lt;/tt&gt; and pushed branch &lt;tt&gt;tickets/&lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-565&quot; title=&quot;Write a script to generate a bash script from yaml&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PIPE2D-565&quot;&gt;&lt;del&gt;PIPE2D-565&lt;/del&gt;&lt;/a&gt;&lt;/tt&gt;.&lt;/p&gt;</comment>
                            <comment id="17144" author="price" created="Wed, 13 May 2020 18:00:14 +0000"  >&lt;p&gt;I think this needs some more work to achieve what we need. This could supplant &lt;tt&gt;pfs_build_calibs.sh&lt;/tt&gt;, but it&apos;s missing some important features.&lt;br/&gt;
I think it&apos;s important to update &lt;tt&gt;pfs_integration_test.sh&lt;/tt&gt; to use this method (or provide a similar script) so that we can check that this works, and exercise it regularly.&lt;br/&gt;
The code needs to be edited for style (make sure it passes &lt;tt&gt;flake8&lt;/tt&gt; with the standard modifications) and docstrings added.&lt;/p&gt;</comment>
                            <comment id="17187" author="sogo.mineo" created="Mon, 25 May 2020 06:25:22 +0000"  >&lt;p&gt;I think I have made all required changes, except for adding capability of specifying more keys for --id.&lt;br/&gt;
What keys can be used? I thought I could refer to the schema of table &lt;tt&gt;raw&lt;/tt&gt; (below), but apparently those columns of &lt;tt&gt;double&lt;/tt&gt; type cannot be used for --id.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
CREATE TABLE raw (
    id integer primary key autoincrement,
    site text,
    category text,
    field text,
    visit &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;,
    ccd &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;,
    filter text,
    arm text,
    spectrograph &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;,
    dateObs text,
    expTime &lt;span class=&quot;code-object&quot;&gt;double&lt;/span&gt;,
    dataType text,
    taiObs text,
    pfsDesignId &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;,
    slitOffset &lt;span class=&quot;code-object&quot;&gt;double&lt;/span&gt;,
    dither &lt;span class=&quot;code-object&quot;&gt;double&lt;/span&gt;,
    shift &lt;span class=&quot;code-object&quot;&gt;double&lt;/span&gt;,
    focus &lt;span class=&quot;code-object&quot;&gt;double&lt;/span&gt;,
    lamps text,
    attenuator &lt;span class=&quot;code-object&quot;&gt;double&lt;/span&gt;,
    photodiode &lt;span class=&quot;code-object&quot;&gt;double&lt;/span&gt;,
)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="17188" author="price" created="Mon, 25 May 2020 15:06:53 +0000"  >&lt;p&gt;Even the &lt;tt&gt;double&lt;/tt&gt; fields can be used in the &lt;tt&gt;&amp;#45;&amp;#45;id&lt;/tt&gt;, e.g., &lt;tt&gt;&amp;#45;&amp;#45;id field=FLAT exptime=10.0&lt;/tt&gt;.&lt;/p&gt;</comment>
                            <comment id="17189" author="sogo.mineo" created="Tue, 26 May 2020 05:12:32 +0000"  >&lt;p&gt;Thank you. I made all fields available in the YAML spec file.&lt;/p&gt;</comment>
                            <comment id="17190" author="price" created="Tue, 26 May 2020 15:19:10 +0000"  >&lt;p&gt;I&apos;m not sure hard-coding all the available keys is the right thing to do. The command-line syntax is free-form, and I think that&apos;s the way to go here too. For example:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
    id: field=FLAT exptime=10.0
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Are you concerned about spelling mistakes?&lt;/p&gt;

&lt;p&gt;I see both advantages and disadvantages to your chosen implementation. Can you explain your reasoning, please?&lt;/p&gt;</comment>
                            <comment id="17191" author="sogo.mineo" created="Wed, 27 May 2020 00:10:49 +0000"  >&lt;p&gt;I wanted to check the syntax of &lt;tt&gt;&quot;value&quot;&lt;/tt&gt; in &lt;tt&gt;&quot;--id key=value&quot;&lt;/tt&gt;, needed to know the type of &lt;tt&gt;&quot;value&quot;&lt;/tt&gt; in advance, and enumerated all &lt;tt&gt;key&lt;/tt&gt; s with their types. But this is not essential. And I agree that writing &lt;tt&gt;&quot;id: &lt;span class=&quot;error&quot;&gt;&amp;#91;key=value, key=value&amp;#93;&lt;/span&gt;&quot;&lt;/tt&gt; is clearer than mixing these &lt;tt&gt;&quot;key=value&quot;&lt;/tt&gt; with other things like &lt;tt&gt;&quot;config:...&quot;&lt;/tt&gt; and &lt;tt&gt;&quot;validity:...&quot;&lt;/tt&gt;. I am revising the code.&lt;/p&gt;</comment>
                            <comment id="17192" author="sogo.mineo" created="Wed, 27 May 2020 01:30:41 +0000"  >&lt;p&gt;Currently, the output shell script is not a self-contained executable script but a mere function body. One has to source it (&lt;tt&gt;source out.sh&lt;/tt&gt;) in order to execute it. Now that the shell script is written to a file, I think the shell script should be a self-contained executable script that begins with &lt;tt&gt;#!/bin/sh&lt;/tt&gt;. Is it OK to make this change?&lt;/p&gt;</comment>
                            <comment id="17194" author="sogo.mineo" created="Wed, 27 May 2020 08:07:14 +0000"  >&lt;p&gt;&lt;a href=&quot;https://developer.lsst.io/work/flow.html#git-commit-organization-best-practices&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://developer.lsst.io/work/flow.html#git-commit-organization-best-practices&lt;/a&gt; seems to say that I have to squash all commits made after the first review, rebase &lt;tt&gt;tickets/&lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-565&quot; title=&quot;Write a script to generate a bash script from yaml&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PIPE2D-565&quot;&gt;&lt;del&gt;PIPE2D-565&lt;/del&gt;&lt;/a&gt;&lt;/tt&gt; onto the current &lt;tt&gt;master&lt;/tt&gt; branch, and force-push the rebased &lt;tt&gt;tickets/&lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-565&quot; title=&quot;Write a script to generate a bash script from yaml&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PIPE2D-565&quot;&gt;&lt;del&gt;PIPE2D-565&lt;/del&gt;&lt;/a&gt;&lt;/tt&gt; to github. Do I correctly understand the document?&lt;/p&gt;</comment>
                            <comment id="17200" author="price" created="Wed, 27 May 2020 16:50:45 +0000"  >&lt;p&gt;Most important is that there is one functional change per commit. Ideally, there should be a one-to-one relationship between functional changes and commits (e.g., changes to the same code made before and after review get squashed together), but sometimes that is difficult to achieve, and so there may be multiple commits to achieve one overall functional change. But there should not be two functional changes in the same commit if you can at all help it. Does that make sense?&lt;/p&gt;</comment>
                            <comment id="17201" author="price" created="Wed, 27 May 2020 17:00:29 +0000"  >&lt;p&gt;I think having the script be executable rather than sourced is a good idea.&lt;/p&gt;</comment>
                            <comment id="17220" author="sogo.mineo" created="Fri, 29 May 2020 01:05:29 +0000"  >&lt;p&gt;I changed my code so that it will produce an executable script, and also added bootstrap functionality just now. Though I said in slack that I would provide &lt;tt&gt;lineList&lt;/tt&gt; field for &lt;tt&gt;bootstrap&lt;/tt&gt;, I decided not to provide it because it was not provided for &lt;tt&gt;reduceArc.py&lt;/tt&gt; either.&lt;/p&gt;

&lt;p&gt;I believe the overall code is ready for re-review. Could you check the new code? (I&apos;m sorry for its big change from what it was on the first review)&lt;/p&gt;</comment>
                            <comment id="17229" author="sogo.mineo" created="Mon, 1 Jun 2020 07:17:21 +0000"  >&lt;p&gt;I changed a few lines in order to promote &lt;tt&gt;--output&lt;/tt&gt; parameter to a positional parameter, and to replace &lt;tt&gt;logger.info(f&quot;message {s}&quot;)&lt;/tt&gt; to &lt;tt&gt;logger.info(&quot;message %s&quot;, s)&lt;/tt&gt;. I squashed this change onto the existing commit and pushed it. I wrongly thought github would still be able to show diffs, but what I see now is only the new code of 1500 lines with no history. I should not have done this...&lt;/p&gt;</comment>
                            <comment id="17230" author="sogo.mineo" created="Mon, 1 Jun 2020 07:32:01 +0000"  >&lt;p&gt;Ah, I found how to view diffs. Sorry for making a noise.&lt;/p&gt;</comment>
                            <comment id="17244" author="sogo.mineo" created="Wed, 3 Jun 2020 23:57:25 +0000"  >&lt;p&gt;I learned just now that it is I who have to merge this ticket branch to master. The latest code (as I have pushed to github) is a little different from what Paul approved, but am I still allowed to merge this branch?&lt;/p&gt;</comment>
                            <comment id="17245" author="price" created="Thu, 4 Jun 2020 00:10:52 +0000"  >&lt;p&gt;Please go ahead.&lt;/p&gt;</comment>
                            <comment id="17246" author="sogo.mineo" created="Thu, 4 Jun 2020 00:34:15 +0000"  >&lt;p&gt;Thank you. I have merged this ticket branch to master.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10003">
                    <name>Relates</name>
                                            <outwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="14383">PIPE2D-578</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="12653" name="generateCalibrations-mineo-2020-04-27.tar.xz" size="7288" author="sogo.mineo" created="Mon, 27 Apr 2020 05:03:00 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10500" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|02qpq3:r0a</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10100" key="com.atlassian.jira.plugin.system.customfieldtypes:userpicker">
                        <customfieldname>Reviewers</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>price</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10005" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="49">2DDRP-2019 E</customfieldvalue>
    <customfieldvalue id="93">2DDRP-2021 A</customfieldvalue>
    <customfieldvalue id="98">2DDRP-2021 A 2</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    </customfields>
    </item>
</channel>
</rss>