{"action":"created","comment":{"url":"https://api.github.com/repos/Amyris/GslCore/pulls/comments/200723610","pull_request_review_id":135088750,"id":200723610,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMDcyMzYxMA==","diff_hunk":"@@ -0,0 +1,85 @@\n+﻿module testPromTermLen\n+/// Test #promoterlen #terminatorlen work\n+\n+open NUnit.Framework\n+open constants\n+open commonTypes\n+open pragmaTypes\n+open Amyris.ErrorHandling\n+\n+/// location of test gslc_lib fixtures (depends on .net tooling version)\n+let testLibDir1 = @\"../../../../TestGslcLib\"\n+let testLibDir2 = @\"../../../../../TestGslcLib\"\n+\n+[<TestFixture>]\n+type TestPromTermLen() = \n+    let emptyPragmas = PragmaCollection(Map.empty)\n+    do\n+        // initialize pragmas\n+        pragmaTypes.finalizePragmas []\n+\n+    let testLibDir = \n+        if System.IO.Directory.Exists testLibDir1 then testLibDir1  \n+            else testLibDir2\n+\n+    let same context expected actual =\n+        if expected<>actual then \n+            failwithf \"%s: expected= %d and actual=%d not equal\" context expected actual\n+\n+    let checkOneGenome pragmas name promLen termLen termLenMRNA =\n+        let gd = new RefGenome.GenomeDef(testLibDir,name)\n+        gd.Load()\n+        let part = DnaCreation.translateGenePrefix pragmas gd TERMINATOR\n+        same \"terminator length test\" termLen ((part.right.x-part.left.x+1<OneOffset>)/1<OneOffset>) // +1 since ends are inclusive\n+\n+        let part = DnaCreation.translateGenePrefix pragmas gd PROMOTER\n+        same \"promoter length test\" promLen ((part.right.x-part.left.x+1<OneOffset>)/1<OneOffset>)  // +1 since ends are inclusive\n+\n+        let mRNA = DnaCreation.translateGenePrefix pragmas gd MRNA\n+        same \"termmrna length test\" termLenMRNA (((mRNA.right.x-1<OneOffset>)+1<OneOffset>)/1<OneOffset>) // Use 1 (rel to 3' end as the start of the terminator region\n+\n+    let testPragma name value refGenome expProm expTerm expTermMRNA =\n+        match buildPragma name [value] with\n+        | Ok (p,[]) ->\n+            let map = [ p.name,p] |> Map.ofList |> PragmaCollection\n+            checkOneGenome map refGenome expProm expTerm expTermMRNA \n+        | _ -> failwith \"building promlen pragma\"\n+        \n+    [<Test>]\n+    member __.TestGenomesLoadable() =\n+        let gd = new RefGenome.GenomeDef(testLibDir,\"TestGenome\")\n+        gd.Load()\n+        ()\n+\n+    [<Test>]\n+    member __.TestPragmasExist() =\n+        let checkPragmaExists name =\n+            Assert.DoesNotThrow (fun () -> returnOrFail (buildPragma name [\"250\"]) |> ignore) |> ignore\n+\n+        checkPragmaExists \"promlen\"","path":"tests/GslCore.Tests/testPromTermLen.fs","position":59,"original_position":59,"commit_id":"73f3a243f1797da674f588bfb8639793c7ac073c","original_commit_id":"73f3a243f1797da674f588bfb8639793c7ac073c","user":{"login":"chrismacklin","id":11823706,"node_id":"MDQ6VXNlcjExODIzNzA2","avatar_url":"https://avatars0.githubusercontent.com/u/11823706?v=4","gravatar_id":"","url":"https://api.github.com/users/chrismacklin","html_url":"https://github.com/chrismacklin","followers_url":"https://api.github.com/users/chrismacklin/followers","following_url":"https://api.github.com/users/chrismacklin/following{/other_user}","gists_url":"https://api.github.com/users/chrismacklin/gists{/gist_id}","starred_url":"https://api.github.com/users/chrismacklin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrismacklin/subscriptions","organizations_url":"https://api.github.com/users/chrismacklin/orgs","repos_url":"https://api.github.com/users/chrismacklin/repos","events_url":"https://api.github.com/users/chrismacklin/events{/privacy}","received_events_url":"https://api.github.com/users/chrismacklin/received_events","type":"User","site_admin":false},"body":"Would be less brittle here to import the pragma definitions themselves and use their name fields to avoid the string literal repetition.","created_at":"2018-07-06T17:40:03Z","updated_at":"2018-07-06T17:41:32Z","html_url":"https://github.com/Amyris/GslCore/pull/20#discussion_r200723610","pull_request_url":"https://api.github.com/repos/Amyris/GslCore/pulls/20","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Amyris/GslCore/pulls/comments/200723610"},"html":{"href":"https://github.com/Amyris/GslCore/pull/20#discussion_r200723610"},"pull_request":{"href":"https://api.github.com/repos/Amyris/GslCore/pulls/20"}}},"pull_request":{"url":"https://api.github.com/repos/Amyris/GslCore/pulls/20","id":199760623,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk5NzYwNjIz","html_url":"https://github.com/Amyris/GslCore/pull/20","diff_url":"https://github.com/Amyris/GslCore/pull/20.diff","patch_url":"https://github.com/Amyris/GslCore/pull/20.patch","issue_url":"https://api.github.com/repos/Amyris/GslCore/issues/20","number":20,"state":"open","locked":false,"title":"Dp merge atonement","user":{"login":"daz10000","id":6342645,"node_id":"MDQ6VXNlcjYzNDI2NDU=","avatar_url":"https://avatars2.githubusercontent.com/u/6342645?v=4","gravatar_id":"","url":"https://api.github.com/users/daz10000","html_url":"https://github.com/daz10000","followers_url":"https://api.github.com/users/daz10000/followers","following_url":"https://api.github.com/users/daz10000/following{/other_user}","gists_url":"https://api.github.com/users/daz10000/gists{/gist_id}","starred_url":"https://api.github.com/users/daz10000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daz10000/subscriptions","organizations_url":"https://api.github.com/users/daz10000/orgs","repos_url":"https://api.github.com/users/daz10000/repos","events_url":"https://api.github.com/users/daz10000/events{/privacy}","received_events_url":"https://api.github.com/users/daz10000/received_events","type":"User","site_admin":false},"body":"This cleans up the merge disaster from a while back that wiped out the promoter/terminator custom lengths and the marker provider.  Reconstructed painfully.","created_at":"2018-07-06T14:16:59Z","updated_at":"2018-07-06T17:41:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c717731fcf682a06d1ca424496a089141a34b0f4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Amyris/GslCore/pulls/20/commits","review_comments_url":"https://api.github.com/repos/Amyris/GslCore/pulls/20/comments","review_comment_url":"https://api.github.com/repos/Amyris/GslCore/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Amyris/GslCore/issues/20/comments","statuses_url":"https://api.github.com/repos/Amyris/GslCore/statuses/73f3a243f1797da674f588bfb8639793c7ac073c","head":{"label":"demetrixbio:dp_merge_atonement","ref":"dp_merge_atonement","sha":"73f3a243f1797da674f588bfb8639793c7ac073c","user":{"login":"demetrixbio","id":31756547,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNzU2NTQ3","avatar_url":"https://avatars0.githubusercontent.com/u/31756547?v=4","gravatar_id":"","url":"https://api.github.com/users/demetrixbio","html_url":"https://github.com/demetrixbio","followers_url":"https://api.github.com/users/demetrixbio/followers","following_url":"https://api.github.com/users/demetrixbio/following{/other_user}","gists_url":"https://api.github.com/users/demetrixbio/gists{/gist_id}","starred_url":"https://api.github.com/users/demetrixbio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demetrixbio/subscriptions","organizations_url":"https://api.github.com/users/demetrixbio/orgs","repos_url":"https://api.github.com/users/demetrixbio/repos","events_url":"https://api.github.com/users/demetrixbio/events{/privacy}","received_events_url":"https://api.github.com/users/demetrixbio/received_events","type":"Organization","site_admin":false},"repo":{"id":107291145,"node_id":"MDEwOlJlcG9zaXRvcnkxMDcyOTExNDU=","name":"GslCore","full_name":"demetrixbio/GslCore","owner":{"login":"demetrixbio","id":31756547,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNzU2NTQ3","avatar_url":"https://avatars0.githubusercontent.com/u/31756547?v=4","gravatar_id":"","url":"https://api.github.com/users/demetrixbio","html_url":"https://github.com/demetrixbio","followers_url":"https://api.github.com/users/demetrixbio/followers","following_url":"https://api.github.com/users/demetrixbio/following{/other_user}","gists_url":"https://api.github.com/users/demetrixbio/gists{/gist_id}","starred_url":"https://api.github.com/users/demetrixbio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demetrixbio/subscriptions","organizations_url":"https://api.github.com/users/demetrixbio/orgs","repos_url":"https://api.github.com/users/demetrixbio/repos","events_url":"https://api.github.com/users/demetrixbio/events{/privacy}","received_events_url":"https://api.github.com/users/demetrixbio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/demetrixbio/GslCore","description":"Core library and basic plug-ins for the Amyris Genotype Specification Language (GSL) compiler.","fork":true,"url":"https://api.github.com/repos/demetrixbio/GslCore","forks_url":"https://api.github.com/repos/demetrixbio/GslCore/forks","keys_url":"https://api.github.com/repos/demetrixbio/GslCore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/demetrixbio/GslCore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/demetrixbio/GslCore/teams","hooks_url":"https://api.github.com/repos/demetrixbio/GslCore/hooks","issue_events_url":"https://api.github.com/repos/demetrixbio/GslCore/issues/events{/number}","events_url":"https://api.github.com/repos/demetrixbio/GslCore/events","assignees_url":"https://api.github.com/repos/demetrixbio/GslCore/assignees{/user}","branches_url":"https://api.github.com/repos/demetrixbio/GslCore/branches{/branch}","tags_url":"https://api.github.com/repos/demetrixbio/GslCore/tags","blobs_url":"https://api.github.com/repos/demetrixbio/GslCore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/demetrixbio/GslCore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/demetrixbio/GslCore/git/refs{/sha}","trees_url":"https://api.github.com/repos/demetrixbio/GslCore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/demetrixbio/GslCore/statuses/{sha}","languages_url":"https://api.github.com/repos/demetrixbio/GslCore/languages","stargazers_url":"https://api.github.com/repos/demetrixbio/GslCore/stargazers","contributors_url":"https://api.github.com/repos/demetrixbio/GslCore/contributors","subscribers_url":"https://api.github.com/repos/demetrixbio/GslCore/subscribers","subscription_url":"https://api.github.com/repos/demetrixbio/GslCore/subscription","commits_url":"https://api.github.com/repos/demetrixbio/GslCore/commits{/sha}","git_commits_url":"https://api.github.com/repos/demetrixbio/GslCore/git/commits{/sha}","comments_url":"https://api.github.com/repos/demetrixbio/GslCore/comments{/number}","issue_comment_url":"https://api.github.com/repos/demetrixbio/GslCore/issues/comments{/number}","contents_url":"https://api.github.com/repos/demetrixbio/GslCore/contents/{+path}","compare_url":"https://api.github.com/repos/demetrixbio/GslCore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/demetrixbio/GslCore/merges","archive_url":"https://api.github.com/repos/demetrixbio/GslCore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/demetrixbio/GslCore/downloads","issues_url":"https://api.github.com/repos/demetrixbio/GslCore/issues{/number}","pulls_url":"https://api.github.com/repos/demetrixbio/GslCore/pulls{/number}","milestones_url":"https://api.github.com/repos/demetrixbio/GslCore/milestones{/number}","notifications_url":"https://api.github.com/repos/demetrixbio/GslCore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/demetrixbio/GslCore/labels{/name}","releases_url":"https://api.github.com/repos/demetrixbio/GslCore/releases{/id}","deployments_url":"https://api.github.com/repos/demetrixbio/GslCore/deployments","created_at":"2017-10-17T15:53:12Z","updated_at":"2018-06-14T21:40:24Z","pushed_at":"2018-07-06T14:15:48Z","git_url":"git://github.com/demetrixbio/GslCore.git","ssh_url":"git@github.com:demetrixbio/GslCore.git","clone_url":"https://github.com/demetrixbio/GslCore.git","svn_url":"https://github.com/demetrixbio/GslCore","homepage":null,"size":729,"stargazers_count":0,"watchers_count":0,"language":"F#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Amyris:master","ref":"master","sha":"6f3af03518ed29f3de9137e430aa8aa2f133b7fc","user":{"login":"Amyris","id":23651114,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNjUxMTE0","avatar_url":"https://avatars1.githubusercontent.com/u/23651114?v=4","gravatar_id":"","url":"https://api.github.com/users/Amyris","html_url":"https://github.com/Amyris","followers_url":"https://api.github.com/users/Amyris/followers","following_url":"https://api.github.com/users/Amyris/following{/other_user}","gists_url":"https://api.github.com/users/Amyris/gists{/gist_id}","starred_url":"https://api.github.com/users/Amyris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Amyris/subscriptions","organizations_url":"https://api.github.com/users/Amyris/orgs","repos_url":"https://api.github.com/users/Amyris/repos","events_url":"https://api.github.com/users/Amyris/events{/privacy}","received_events_url":"https://api.github.com/users/Amyris/received_events","type":"Organization","site_admin":false},"repo":{"id":74456696,"node_id":"MDEwOlJlcG9zaXRvcnk3NDQ1NjY5Ng==","name":"GslCore","full_name":"Amyris/GslCore","owner":{"login":"Amyris","id":23651114,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNjUxMTE0","avatar_url":"https://avatars1.githubusercontent.com/u/23651114?v=4","gravatar_id":"","url":"https://api.github.com/users/Amyris","html_url":"https://github.com/Amyris","followers_url":"https://api.github.com/users/Amyris/followers","following_url":"https://api.github.com/users/Amyris/following{/other_user}","gists_url":"https://api.github.com/users/Amyris/gists{/gist_id}","starred_url":"https://api.github.com/users/Amyris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Amyris/subscriptions","organizations_url":"https://api.github.com/users/Amyris/orgs","repos_url":"https://api.github.com/users/Amyris/repos","events_url":"https://api.github.com/users/Amyris/events{/privacy}","received_events_url":"https://api.github.com/users/Amyris/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Amyris/GslCore","description":"Core library and basic plug-ins for the Amyris Genotype Specification Language (GSL) compiler.","fork":false,"url":"https://api.github.com/repos/Amyris/GslCore","forks_url":"https://api.github.com/repos/Amyris/GslCore/forks","keys_url":"https://api.github.com/repos/Amyris/GslCore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Amyris/GslCore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Amyris/GslCore/teams","hooks_url":"https://api.github.com/repos/Amyris/GslCore/hooks","issue_events_url":"https://api.github.com/repos/Amyris/GslCore/issues/events{/number}","events_url":"https://api.github.com/repos/Amyris/GslCore/events","assignees_url":"https://api.github.com/repos/Amyris/GslCore/assignees{/user}","branches_url":"https://api.github.com/repos/Amyris/GslCore/branches{/branch}","tags_url":"https://api.github.com/repos/Amyris/GslCore/tags","blobs_url":"https://api.github.com/repos/Amyris/GslCore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Amyris/GslCore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Amyris/GslCore/git/refs{/sha}","trees_url":"https://api.github.com/repos/Amyris/GslCore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Amyris/GslCore/statuses/{sha}","languages_url":"https://api.github.com/repos/Amyris/GslCore/languages","stargazers_url":"https://api.github.com/repos/Amyris/GslCore/stargazers","contributors_url":"https://api.github.com/repos/Amyris/GslCore/contributors","subscribers_url":"https://api.github.com/repos/Amyris/GslCore/subscribers","subscription_url":"https://api.github.com/repos/Amyris/GslCore/subscription","commits_url":"https://api.github.com/repos/Amyris/GslCore/commits{/sha}","git_commits_url":"https://api.github.com/repos/Amyris/GslCore/git/commits{/sha}","comments_url":"https://api.github.com/repos/Amyris/GslCore/comments{/number}","issue_comment_url":"https://api.github.com/repos/Amyris/GslCore/issues/comments{/number}","contents_url":"https://api.github.com/repos/Amyris/GslCore/contents/{+path}","compare_url":"https://api.github.com/repos/Amyris/GslCore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Amyris/GslCore/merges","archive_url":"https://api.github.com/repos/Amyris/GslCore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Amyris/GslCore/downloads","issues_url":"https://api.github.com/repos/Amyris/GslCore/issues{/number}","pulls_url":"https://api.github.com/repos/Amyris/GslCore/pulls{/number}","milestones_url":"https://api.github.com/repos/Amyris/GslCore/milestones{/number}","notifications_url":"https://api.github.com/repos/Amyris/GslCore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Amyris/GslCore/labels{/name}","releases_url":"https://api.github.com/repos/Amyris/GslCore/releases{/id}","deployments_url":"https://api.github.com/repos/Amyris/GslCore/deployments","created_at":"2016-11-22T09:32:57Z","updated_at":"2018-06-14T18:53:27Z","pushed_at":"2018-07-06T14:16:59Z","git_url":"git://github.com/Amyris/GslCore.git","ssh_url":"git@github.com:Amyris/GslCore.git","clone_url":"https://github.com/Amyris/GslCore.git","svn_url":"https://github.com/Amyris/GslCore","homepage":null,"size":789,"stargazers_count":4,"watchers_count":4,"language":"F#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":5,"open_issues":8,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Amyris/GslCore/pulls/20"},"html":{"href":"https://github.com/Amyris/GslCore/pull/20"},"issue":{"href":"https://api.github.com/repos/Amyris/GslCore/issues/20"},"comments":{"href":"https://api.github.com/repos/Amyris/GslCore/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/Amyris/GslCore/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/Amyris/GslCore/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Amyris/GslCore/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/Amyris/GslCore/statuses/73f3a243f1797da674f588bfb8639793c7ac073c"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"chrismacklin"}}