When condition seems not working. A very easy question regarding with going through the example on the toturial

Hi, I tried to do the simple Hello World example to see how the library generally work, but the result is a little bit funky.
Here is the code I wrote:
import com.deliveredtechnologies.rulebook.FactMap;
import com.deliveredtechnologies.rulebook.NameValueReferableMap;
import com.deliveredtechnologies.rulebook.Result;
import com.deliveredtechnologies.rulebook.lang.RuleBookBuilder;
import com.deliveredtechnologies.rulebook.model.RuleBook;
import com.deliveredtechnologies.rulebook.lang.RuleBuilder;
import com.deliveredtechnologies.rulebook.Rule;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.*;
import java.lang.String;
class ruletest{
public static void main(String [] arg){
NameValueReferableMap factMap = new FactMap();
factMap.setValue("hello", "Hello");
factMap.setValue("world", " World");
RuleBook ruleBook = RuleBookBuilder.create().withResultType(Integer.class)
.addRule(rule -> rule.withFactType(FactMap.class)
.when(f -> f.containsKey("hello") )
.using("hello").then(t -> System.out.println(1) ))
.addRule(rule -> rule.withFactType(FactMap.class)
.when(f -> !f.containsKey("hello_2"))
.then(t -> System.out.println(2) ))
.build();
    ruleBook.run(factMap); //return 2. However it should be 1
    System.out.println(factMap.containsKey("hello")); //Return true
}

}
When I run the code, it seems that it is not working. the expected result should be 1 instead of 2.
Thank you for the help.
Wish you have a good day

I see what your issue is. By specifying FactMap as the fact type for each rule, you are telling each rule that only facts of type FactMap are to be made available to your rules. So, the first when condition evaluates to false since there are no facts of type FactMap named "hello". If you specified the factType as String then the condition on the first rule could evaluate to true.
I have modified your example below to show how this would work.
class RuleTest {
  public static void main(String [] arg){
    NameValueReferableMap factMap = new FactMap();
    factMap.setValue("hello", "Hello");
    factMap.setValue("world", " World");
    RuleBook ruleBook = RuleBookBuilder.create().withResultType(Integer.class)
        .addRule(rule -> rule.withFactType(String.class) //you want facts of type String available here
            .when(f -> f.containsKey("hello") )
            .using("hello")
            .then(t -> System.out.println(1) ))
        .addRule(rule -> rule.withFactType(String.class) //you probably want facts of type String available here too
            .when(f -> !f.containsKey("hello_2"))
            .then(t -> System.out.println(2) ))
        .build();

    ruleBook.run(factMap); //this will print 1 followed by 2 since conditions on both rules will evaluate to true
    System.out.println(factMap.containsKey("hello")); //Return true
  }
}

To further illustrate how this works, I added another rule that only works with Integer facts.
class RuleTest{
  public static void main(String [] arg){
    NameValueReferableMap factMap = new FactMap();
    factMap.setValue("hello", "Hello");
    factMap.setValue("world", " World");
    factMap.setValue("magic number", 128);
    RuleBook ruleBook = RuleBookBuilder.create().withResultType(Integer.class)
        .addRule(rule -> rule.withFactType(String.class) //you want facts of type String available here
            .when(f -> f.containsKey("hello") )
            .using("hello")
            .then(t -> System.out.println(1) ))
        .addRule(rule -> rule.withFactType(String.class) //you probably want facts of type String available here too
            .when(f -> !f.containsKey("hello_2"))
            .then(t -> System.out.println(2) ))
        .addRule(rule -> rule.withFactType(Integer.class) //there's only one Integer fact, so only one fact is available to this rule
            //condition defaults to true if none exists
            .then(f -> System.out.println(f.getOne()))) //the value of the facts is the value of the single fact when only one exists
        .build();

    ruleBook.run(factMap); //this will print 1 followed by 2 followed by the value of magic number since conditions on both rules will evaluate to true
    System.out.println(factMap.containsKey("hello")); //Return true
  }
}

Of course, you could always make all facts available to a rule as I did with the last rule in this example.
class RuleTest{
  public static void main(String [] arg){
    NameValueReferableMap factMap = new FactMap();
    factMap.setValue("hello", "Hello");
    factMap.setValue("world", " World");
    factMap.setValue("magic number", 128);
    RuleBook ruleBook = RuleBookBuilder.create().withResultType(Integer.class)
        .addRule(rule -> rule.withFactType(String.class) //you want facts of type String available here
            .when(f -> f.containsKey("hello") )
            .using("hello")
            .then(t -> System.out.println(1) ))
        .addRule(rule -> rule.withFactType(String.class) //you probably want facts of type String available here too
            .when(f -> !f.containsKey("hello_2"))
            .then(t -> System.out.println(2) ))
        .addRule(rule -> rule.withNoSpecifiedFactType() //make all facts available to the rule
            //condition defaults to true if none exists
            .using("magic number") //restrict the facts available to the then() method to "magic number"
            .then(f -> System.out.println(f.getOne()))) //the value of the facts is the value of the single fact when only one exists
        .build();

    ruleBook.run(factMap); //this will print 1 followed by 2 followed by the value of magic number since conditions on both rules will evaluate to true
    System.out.println(factMap.containsKey("hello")); //Return true
  }
}

Thats very very clear, thank you for your help and time!!!!

Issue resolved in comment per OP.


refactor: ♻ mark all internal modules as internal with underscore

Preparation for: https://github.com/h2oai/cloud-discovery/issues/170

Agree again. Will merge this and group them in the subsequent PR


[页面渲染]页面title缺失

描述bug
在网页的初始渲染时，title会被加载，之后渲染过程中title缺失，无法看见
页面代码中的title为空
复现步骤
必现，主页面及任意子页面都会发生
对代码回退到前版本后仍会复现
复现网站 https://www.txuw.top
期望的正常结果
希望title正常显示
截图

环境
2022.7.4日，更新完新版本，vercel重新部署后出现
操作系统: [Windows]
浏览器 [chrome]
版本 [103.0.5060.66]
补充说明
怀疑是vercel问题，采用作者当前git版本进行部署，依旧复现该问题。回退到旧版本再部署，仍能复现
之前稳定运行的版本于42天前版本，由于刚刚尝试删库重新部署，上一个库已经丢失
Vercel部署日志:
[14:11:46.440] Cloning github.com/txuw/NotionNext (Branch: main, Commit: 270bf3b)
[14:11:47.175] Cloning completed: 735.137ms
[14:11:47.580] Looking up build cache...
[14:11:52.865] Build cache downloaded [79.98 MB]: 5037.715ms
[14:11:53.164] Running "vercel build"
[14:11:53.781] Vercel CLI 25.2.2 build (beta) — https://vercel.com/feedback
[14:11:54.181] Installing dependencies...
[14:11:54.632] yarn install v1.22.17
[14:11:54.692] info No lockfile found.
[14:11:54.705] [1/4] Resolving packages...
[14:11:59.501] warning valine > leancloud-storage ><EMAIL_ADDRESS>Please upgrade to v7.0.2+ of superagent.  We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing.  See the releases tab for more information at https://github.com/visionmedia/superagent/releases.
[14:11:59.530] warning valine > leancloud-storage ><EMAIL_ADDRESS>Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
[14:11:59.559] warning valine > leancloud-storage > leancloud-realtime ><EMAIL_ADDRESS>Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
[14:11:59.593] warning valine > leancloud-storage > superagent ><EMAIL_ADDRESS>Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau
[14:12:00.009] warning valine > leancloud-storage > leancloud-realtime > @leancloud/platform-adapters-browser > @leancloud/adapters-superagent ><EMAIL_ADDRESS>Please upgrade to v7.0.2+ of superagent.  We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing.  See the releases tab for more information at https://github.com/visionmedia/superagent/releases.
[14:12:00.013] warning valine > leancloud-storage > leancloud-realtime > @leancloud/platform-adapters-browser > @leancloud/adapters-superagent > superagent ><EMAIL_ADDRESS>Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau
[14:12:02.457] [2/4] Fetching packages...
[14:12:29.636] [3/4] Linking dependencies...
[14:12:29.640] warning "gitalk ><EMAIL_ADDRESS>has incorrect peer dependency<EMAIL_ADDRESS>|| 0.14.x || 15.x.x".
[14:12:29.640] warning "gitalk ><EMAIL_ADDRESS>has incorrect peer dependency<EMAIL_ADDRESS>|| 0.14.x || 15.x.x".
[14:12:29.642] warning "react-facebook ><EMAIL_ADDRESS>has incorrect peer dependency<EMAIL_ADDRESS>|| 16.x".
[14:12:29.642] warning " ><EMAIL_ADDRESS>has incorrect peer dependency<EMAIL_ADDRESS>|| ^15.0.0-0 || ^16.0.0-0".
[14:12:29.643] warning "react-notion-x ><EMAIL_ADDRESS>has incorrect peer dependency "react@^15 || ^16".
[14:12:29.643] warning "react-notion-x ><EMAIL_ADDRESS>has incorrect peer dependency "react-dom@^15 || ^16".
[14:12:29.644] warning "react-notion-x ><EMAIL_ADDRESS>has unmet peer dependency "@babel/runtime@>=7".
[14:12:29.645] warning "react-notion-x > react-pdf ><EMAIL_ADDRESS>has unmet peer dependency<EMAIL_ADDRESS>|| ^5.0.0".
[14:12:29.650] warning "eslint-config-next > @typescript-eslint/parser > @typescript-eslint/typescript-estree ><EMAIL_ADDRESS>has unmet peer dependency<EMAIL_ADDRESS>|| >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
[14:12:41.651] [4/4] Building fresh packages...
[14:12:42.340] success Saved lockfile.
[14:12:42.347] Done in 47.72s.
[14:12:42.404] Detected Next.js version: 12.2.0
[14:12:42.406] Running "yarn run build"
[14:12:42.743] yarn run v1.22.17
[14:12:42.808] $ next build && next-sitemap --config next-sitemap.config.js
[14:12:43.182] info  - Loaded env from /vercel/path0/.env.local
[14:12:43.516] info  - Linting and checking validity of types...
[14:12:46.805] info  - Creating an optimized production build...
[14:13:17.313] info  - Compiled successfully
[14:13:17.313] info  - Collecting page data...
[14:13:18.662] [请求API] from:slug-paths id:d4ea5a13c0fa488192cd85ebed338635
[14:13:18.710] [请求API] from:slug-paths id:d4ea5a13c0fa488192cd85ebed338635
[14:13:18.844] [请求API] from:category-paths id:d4ea5a13c0fa488192cd85ebed338635
[14:13:18.983] [响应成功]: from:slug-paths id:d4ea5a13c0fa488192cd85ebed338635
[14:13:18.983] [API耗时] 322ms
[14:13:18.988] PageIds: 从collectionQuery获取 {
[14:13:18.988]   '0f903c14-d3bd-4851-a743-73f0c703a23b': {
[14:13:18.989]     '604c384a-cbd6-4976-aad6-d61b29e9365c': { collection_group_results: [Object] }
[14:13:18.989]   }
[14:13:18.989] }
[14:13:19.034] [命中缓存]: from:page-paths root-page-id:d4ea5a13c0fa488192cd85ebed338635
[14:13:19.044] [命中缓存]: from:tag-static-path root-page-id:d4ea5a13c0fa488192cd85ebed338635
[14:13:19.050] [响应成功]: from:slug-paths id:d4ea5a13c0fa488192cd85ebed338635
[14:13:19.050] [API耗时] 341ms
[14:13:19.056] PageIds: 从collectionQuery获取 {
[14:13:19.056]   '0f903c14-d3bd-4851-a743-73f0c703a23b': {
[14:13:19.057]     '604c384a-cbd6-4976-aad6-d61b29e9365c': { collection_group_results: [Object] }
[14:13:19.057]   }
[14:13:19.057] }
[14:13:19.139] [响应成功]: from:category-paths id:d4ea5a13c0fa488192cd85ebed338635
[14:13:19.139] [API耗时] 295ms
[14:13:19.145] PageIds: 从collectionQuery获取 {
[14:13:19.145]   '0f903c14-d3bd-4851-a743-73f0c703a23b': {
[14:13:19.145]     '604c384a-cbd6-4976-aad6-d61b29e9365c': { collection_group_results: [Object] }
[14:13:19.145]   }
[14:13:19.145] }
[14:13:19.192] info  - Generating static pages (0/29)
[14:13:19.412] [命中缓存]: from:404 root-page-id:d4ea5a13c0fa488192cd85ebed338635
[14:13:19.463] [命中缓存]: from:archive-index root-page-id:d4ea5a13c0fa488192cd85ebed338635
[14:13:19.471] [命中缓存]: from:category-index-props root-page-id:d4ea5a13c0fa488192cd85ebed338635
[14:13:19.486] [命中缓存]: from:index root-page-id:d4ea5a13c0fa488192cd85ebed338635
[14:13:19.518] [命中缓存]: from:search-props root-page-id:d4ea5a13c0fa488192cd85ebed338635
[14:13:19.555] info  - Generating static pages (7/29)
[14:13:19.559] [命中缓存]: from:tag-index-props root-page-id:d4ea5a13c0fa488192cd85ebed338635
[14:13:19.596] [命中缓存]: from:slug-props-links root-page-id:d4ea5a13c0fa488192cd85ebed338635
[14:13:19.597] [请求API] from:slug id:1054fbf8-770a-45ed-8ae0-8a5cd32472ff
[14:13:19.597] [命中缓存]: from:slug-props-https://github.com/txuw?tab=repositories root-page-id:d4ea5a13c0fa488192cd85ebed338635
[14:13:19.598] [请求API] from:slug id:41813316-afcc-4a69-ae12-c3a99a60a4e5
[14:13:19.606] [命中缓存]: from:search-props root-page-id:d4ea5a13c0fa488192cd85ebed338635
[14:13:19.608] 全文搜索缓存 page_block_5574f86c-d90b-4a20-a69b-dd8cad810186 false
[14:13:19.608] 全文搜索缓存 page_block_f04e2a22-04e5-47a0-ae8c-4f2371542719 false
[14:13:19.609] 全文搜索缓存 page_block_512f5e23-5e39-4fe2-a210-54f042f598c8 false
[14:13:19.609] 全文搜索缓存 page_block_c68e12ce-486c-4569-bad7-c0f7d3c469c8 false
[14:13:19.609] 全文搜索缓存 page_block_12fee5e8-61bf-4581-9e93-ea0166b2d20b false
[14:13:19.637] [命中缓存]: from:tag-props root-page-id:d4ea5a13c0fa488192cd85ebed338635
[14:13:19.654] info  - Generating static pages (14/29)
[14:13:19.655] [命中缓存]: from:tag-props root-page-id:d4ea5a13c0fa488192cd85ebed338635
[14:13:19.659] [响应成功]: from:slug id:41813316-afcc-4a69-ae12-c3a99a60a4e5
[14:13:19.659] [API耗时] 64ms
[14:13:19.682] [命中缓存]: from:tag-props root-page-id:d4ea5a13c0fa488192cd85ebed338635
[14:13:19.715] [命中缓存]: from:tag-props root-page-id:d4ea5a13c0fa488192cd85ebed338635
[14:13:19.716] [命中缓存]: from:tag-props root-page-id:d4ea5a13c0fa488192cd85ebed338635
[14:13:19.747] [命中缓存]: from:slug-props-spark root-page-id:d4ea5a13c0fa488192cd85ebed338635
[14:13:19.748] [请求API] from:slug id:5574f86c-d90b-4a20-a69b-dd8cad810186
[14:13:19.755] [响应成功]: from:slug id:1054fbf8-770a-45ed-8ae0-8a5cd32472ff
[14:13:19.755] [API耗时] 160ms
[14:13:19.762] [命中缓存]: from:slug-props-crawly_end root-page-id:d4ea5a13c0fa488192cd85ebed338635
[14:13:19.763] [请求API] from:slug id:f04e2a22-04e5-47a0-ae8c-4f2371542719
[14:13:19.800] [命中缓存]: from:slug-props-hostapd root-page-id:d4ea5a13c0fa488192cd85ebed338635
[14:13:19.801] [请求API] from:slug id:512f5e23-5e39-4fe2-a210-54f042f598c8
[14:13:20.051] [响应成功]: from:slug id:512f5e23-5e39-4fe2-a210-54f042f598c8
[14:13:20.051] [API耗时] 249ms
[14:13:20.120] info  - Generating static pages (21/29)
[14:13:20.122] [命中缓存]: from:slug-props-rsnapshot root-page-id:d4ea5a13c0fa488192cd85ebed338635
[14:13:20.123] [请求API] from:slug id:c68e12ce-486c-4569-bad7-c0f7d3c469c8
[14:13:20.192] [响应成功]: from:slug id:f04e2a22-04e5-47a0-ae8c-4f2371542719
[14:13:20.192] [API耗时] 429ms
[14:13:20.274] Warning: data for page "/article/[slug]" is 262 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance.
[14:13:20.274] See more info here: https://nextjs.org/docs/messages/large-page-data
[14:13:20.298] [命中缓存]: from:slug-props-live_share root-page-id:d4ea5a13c0fa488192cd85ebed338635
[14:13:20.299] [请求API] from:slug id:12fee5e8-61bf-4581-9e93-ea0166b2d20b
[14:13:20.731] [响应成功]: from:slug id:c68e12ce-486c-4569-bad7-c0f7d3c469c8
[14:13:20.731] [API耗时] 608ms
[14:13:20.782] [命中缓存]: from:category-props root-page-id:d4ea5a13c0fa488192cd85ebed338635
[14:13:20.805] [命中缓存]: from:category-props root-page-id:d4ea5a13c0fa488192cd85ebed338635
[14:13:20.825] [命中缓存]: from:category-props root-page-id:d4ea5a13c0fa488192cd85ebed338635
[14:13:20.957] [响应成功]: from:slug id:12fee5e8-61bf-4581-9e93-ea0166b2d20b
[14:13:20.958] [API耗时] 658ms
[14:13:21.001] Warning: data for page "/article/[slug]" is 154 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance.
[14:13:21.001] See more info here: https://nextjs.org/docs/messages/large-page-data
[14:13:22.075] [响应成功]: from:slug id:5574f86c-d90b-4a20-a69b-dd8cad810186
[14:13:22.075] [API耗时] 2327ms
[14:13:22.120] Warning: data for page "/article/[slug]" is 166 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance.
[14:13:22.121] See more info here: https://nextjs.org/docs/messages/large-page-data
[14:13:22.144] info  - Generating static pages (29/29)
[14:13:22.659] info  - Finalizing page optimization...
[14:13:22.675]
[14:13:22.689] Page                                                     Size     First Load JS
[14:13:22.689] ┌ ● / (ISR: 5 Seconds)                                   314 B           267 kB
[14:13:22.689] ├   /_app                                                0 B             267 kB
[14:13:22.689] ├ ● /[slug] (ISR: 1 Seconds) (594 ms)                    855 B           268 kB
[14:13:22.690] ├   ├ /https:%2F%2Fgithub.com%2Ftxuw%3Ftab=repositories
[14:13:22.690] ├   └ /links
[14:13:22.690] ├ ○ /404                                                 443 B           267 kB
[14:13:22.690] ├ ● /archive (ISR: 1 Seconds) (376 ms)                   463 B           267 kB
[14:13:22.690] ├ ● /article/[slug] (ISR: 1 Seconds) (4683 ms)           828 B           268 kB
[14:13:22.690] ├   ├ /article/spark (2398 ms)
[14:13:22.690] ├   ├ /article/live_share (730 ms)
[14:13:22.690] ├   ├ /article/rsnapshot (659 ms)
[14:13:22.690] ├   ├ /article/crawly_end (541 ms)
[14:13:22.691] ├   └ /article/hostapd (323 ms)
[14:13:22.691] ├ ● /category (ISR: 1 Seconds)                           478 B           267 kB
[14:13:22.691] ├ ● /category/[category] (ISR: 1 Seconds)                514 B           267 kB
[14:13:22.691] ├   ├ /category/技术分享
[14:13:22.691] ├   ├ /category/结课设计
[14:13:22.691] ├   └ /category/知识归纳
[14:13:22.691] ├ λ /feed                                                246 B           267 kB
[14:13:22.691] ├ ● /page/[page]                                         462 B           267 kB
[14:13:22.691] ├ ● /search (ISR: 1 Seconds)                             619 B           268 kB
[14:13:22.692] ├ ● /search/[keyword] (ISR: 1 Seconds)                   487 B           267 kB
[14:13:22.692] ├   └ /search/NotionNext BLOG
[14:13:22.692] ├ ● /tag (ISR: 1 Seconds)                                460 B           267 kB
[14:13:22.692] └ ● /tag/[tag] (ISR: 1 Seconds)                          488 B           267 kB
[14:13:22.693]     ├ /tag/Python
[14:13:22.693]     ├ /tag/大数据
[14:13:22.693]     ├ /tag/爬虫
[14:13:22.693]     └ [+2 more paths]
[14:13:22.694] + First Load JS shared by all                            267 kB
[14:13:22.694]   ├ chunks/main-83463960a1c227f8.js                      38.4 kB
[14:13:22.694]   ├ chunks/pages/_app-472c7352b78b50db.js                226 kB
[14:13:22.694]   ├ chunks/webpack-aef4ee1db4520e79.js                   2.42 kB
[14:13:22.694]   └ css/9599c9e844f1aff0.css                             29 kB
[14:13:22.694]
[14:13:22.694] λ  (Server)  server-side renders at runtime (uses getInitialProps or getServerSideProps)
[14:13:22.694] ○  (Static)  automatically rendered as static HTML (uses no initial props)
[14:13:22.695] ●  (SSG)     automatically generated as static HTML + JSON (uses getStaticProps)
[14:13:22.695]    (ISR)     incremental static regeneration (uses revalidate in getStaticProps)
[14:13:22.695]
[14:13:22.858] Loaded env from /vercel/path0/.env.local
[14:13:22.891] Done in 40.16s.
[14:13:23.434] Traced Next.js server files in: 486.667ms
[14:13:25.179] Created all serverless functions in: 1.742s
[14:13:25.232] Collected static files (public/, static/, .next/static): 46.043ms
[14:13:27.452] Build Completed in /vercel/output [2m]
[14:13:36.803] Generated build outputs:
[14:13:36.804]  - Static files: 116
[14:13:36.804]  - Serverless Functions: 55
[14:13:36.804]  - Edge Functions: 0
[14:13:36.804] Serverless regions: Washington, D.C., USA
[14:13:36.804] Deployed outputs in 6s
[14:13:37.590] Build completed. Populating build cache...
[14:14:01.001] Uploading build cache [79.98 MB]...
[14:14:02.923] Build cache uploaded: 1.922s
[14:14:02.957] Done with "."

发现他人网站也会产生类似现象，是经过后续部署的都会如此吗
https://coolnext.vercel.app/article/58cc0d89-2518-4275-8de1-fb12663c58c8
例如此网站

应该不是vercel问题，使用railway部署依然产生丢失title的现象。

应该不是vercel问题，使用railway部署依然产生丢失title的现象。

感觉是某个依赖更新了，之后加载就都出现部署问题了


getFields and getTranstion returns initial lists.

Hi,
On diagram, after dragging and dropping nodes and connecting them with transitions, when call getFields method, added nodes are not seen in return list.
I'm using vaadin 7.5.5
Any idea?

Sorry,
This problem occurs because of wrong usage :)
True way to get added nodes list is;
diagramBuilder.getDiagramState(new DiagramBuilder.StateCallback() {

			@Override
			public void onStateReceived(DiagramStateEvent event) {
						List<Node> nodes = event.getNodes();
			}
}


Document how to generate vector embeddings

What I am changing

Create documentation page on how to produce embeddings from the pretrained model
Preview: TODO
Screenshot:

How I did it

TODO:

[x] Get instructions from #96 (and other previous embedding factory PRs) on how to run python trainer.py predict ...
[x] Document the schema and format of the GeoParquet embeddings file

How you can test it

Run jupyter-book build docs/ locally

Related Issues

Part of #90

Gonna merge this straight and preview it live on the main branch!


MissingMethodException when calling "await bot.SendTextMessageAsyn"

I found a bug to report
Please use the following template to ensure maintainers can reproduce the bug and solve it quickly.

Bug reports that do not follow this template will be kept closed because not-reproducible until the creator edits the post properly.

Steps to reproduce
When user creates a new ticket from a web application form, a notification is sent to Telegram using this method:
    public async Task SendTelegramNotification(List<string> idList, string notificationMsg)
    {
        var TELEGRAM_BOT_CLIENT_KEY = db.Settings.FirstOrDefault(c => c.SettingCode.Equals("TELEGRAM_BOT_CLIENT_KEY")).SettingVal;

        try
        {
            var bot = new Telegram.Bot.TelegramBotClient(TELEGRAM_BOT_CLIENT_KEY);
            foreach (var item in idList)
            {
                await bot.SendTextMessageAsync(item, notificationMsg, parseMode: ParseMode.Markdown);
            }
        }
        catch (Exception e)
        {
            Console.WriteLine(e.Message);
        }
    }

Expected  behavior
The notification was correctly sent until last week.
Actual behavior
The notification is correctly sent when I debug the web application on my local machine (Windows 10). When I deploy the web application dll on the server (Windows Server 2012 R2), the application shows the attached error page.
Screenshots

Environment data
Windows Server 2012 R2
NuGet Package Version: (e.g. 13.0.1)
14.10.0
.NET Version: (e.g. 4.7, Core 1.1, Mono, etc.)
4.6
IDE: (e.g. VS2017, VS Code, etc.)
VS2019
App: (e.g. Desktop, iOS, Android, etc.)
Web Application ASP.NET

This is not an issue with the library but with your deployment. Make sure you're deploying the correct versions, see https://stackoverflow.com/questions/8058832/system-missingmethodexception-method-not-found.

I

I


Stray dot at the end of some log entries

I've just noticed an anomaly when parsing NSD logs. Most logs don't end with a dot, but one of the logs looks like this:
[2019-06-10 12:22:44.131] nsd[15690]: info: zone arpa. serial<PHONE_NUMBER> is updated to<PHONE_NUMBER>.

It is unusual for log entries to end with a dot. It doesn't serve any purpose, and in this case, extracting the serial from this line gives me an unexpected value, with a dot at the end.

Fixed, thanks for the report.  I appreciate that the logs can be parsed easily by scripting support, so this good stuff to fix.


Fix Our Mission section

Divide this section with Text on one side and the image on the other like on the Blue block and Support Us to create symmetry with the rest of the page. Reading from the L-R is too long and one tends to lose focus.

When we hover on the blocks, can you make it change its colors like how you've done on Meet the Team

@Rubina110622 It already behaves the same way, look closely.


Ensure MQ Broker is not publicly exposed

Possible check to target the following resource

[ ] aws_mq_broker

closing, tracking in spreadsheet

closing, tracking in spreadsheet


possible performance boost by switching to double buffering

use two memory file buffers to increase performance based on double buffering (parallel write/read)
additional boolean to avoid spurious wakeup from waiting on the condition variable

@ZhenshengLee can you please retest ? To get a better scaling in the result plots it would be nice to exclude the protobuf variant.

@rex-schilasky
After merging, test shows the two-buffer-feature causes data time consistency problem, so I decide to reset the master branch.
Sorry for that, I should  have  done  tests before merging.


Support for DataTable as ItemsSource

Can the DataGridDemo_NET40 also be updated?

Hopefully I fixed all the issues you mentioned!
If not, write again..


common.py: bump Yams to 5.0.1

This fixes an issue resolved in jpsim/Yams#353, which is currently blocking apple/swift-package-manager#5894.

@swift-ci please test


remove passwords from web.config

I don't know how to approach this - I've tried googling for how to encrypt the password on web deploy and found nothing I could use.
@polishere any ideas?

I think we don't need to remove passwords from deploy, we need to change credentials and remove them from the repository.

no need to remove the passwords we have from this repository, these are only temporary and I dont care about them 😃


Lost connection at the end of copy table

Hi,
I'm having an issue running the refresh_schema command:
chameleon refresh_schema --config default --source mysql --schema ac --debug

After copying a 3Gb table I have the following error:
Lost connection to MySQL server during query
And here are the log I have just before it fails:
2019-10-25 07:14:13 MainProcess DEBUG mysql_lib.py (590): unlocking the table ac.company
2019-10-25 07:14:13 MainProcess INFO mysql_lib.py (703): Could not copy the table company. Excluding it from the replica.
2019-10-25 07:14:13 MainProcess DEBUG mysql_lib.py (304): Dropping the schema _public_tmp.
2019-10-25 07:14:13 MainProcess DEBUG pg_lib.py (658): Changing the lock timeout for the session to 120s.
2019-10-25 07:14:14 MainProcess CRITICAL mysql_lib.py (831): refresh schema ac for source mysql failed

I set connect_timeout to 600 (and it fails after 2 minutes or so), and copy_max_memory even down to 5M.
It is not even my biggest table (which is around 55Gb). So I'm wondering what I am missing.
I'm using Mysql (percona) 5.7 and Postgres 11.
Thanks in advance for your help.

Similar problem here.
On some tables (not so big, 1gb or so), it fails on UNLOCK TABLES immediately after the copy.
Here's the logs:

2019-10-29 08:42:52 MainProcess INFO mysql_lib.py (644): Table hl_rendicontazione.allegato copied 4 slice of 5
2019-10-29 08:42:52 MainProcess INFO mysql_lib.py (644): Table hl_rendicontazione.allegato copied 5 slice of 5
2019-10-29 08:42:52 MainProcess DEBUG mysql_lib.py (590): unlocking the table hl_rendicontazione.allegato
2019-10-29 08:42:52 MainProcess INFO mysql_lib.py (703): Could not copy the table allegato. Excluding it from the replica.
2019-10-29 08:42:52 MainProcess DEBUG mysql_lib.py (304): Dropping the schema _posta_tmp.
2019-10-29 08:42:52 MainProcess DEBUG pg_lib.py (658): Changing the lock timeout for the session to 240s.
2019-10-29 08:42:53 MainProcess DEBUG mysql_lib.py (304): Dropping the schema _opendata_tmp.
2019-10-29 08:42:53 MainProcess DEBUG pg_lib.py (658): Changing the lock timeout for the session to 240s.
2019-10-29 08:42:53 MainProcess DEBUG mysql_lib.py (304): Dropping the schema _monitor_tmp.
2019-10-29 08:42:53 MainProcess DEBUG pg_lib.py (658): Changing the lock timeout for the session to 240s.
2019-10-29 08:42:53 MainProcess DEBUG mysql_lib.py (304): Dropping the schema _backup_tmp.
2019-10-29 08:42:53 MainProcess DEBUG pg_lib.py (658): Changing the lock timeout for the session to 240s.
2019-10-29 08:42:53 MainProcess DEBUG mysql_lib.py (304): Dropping the schema _datimonitor_tmp.
2019-10-29 08:42:53 MainProcess DEBUG pg_lib.py (658): Changing the lock timeout for the session to 240s.
2019-10-29 08:42:53 MainProcess DEBUG mysql_lib.py (304): Dropping the schema _rendicontazione_tmp.
2019-10-29 08:42:53 MainProcess DEBUG pg_lib.py (658): Changing the lock timeout for the session to 240s.
2019-10-29 08:42:53 MainProcess CRITICAL mysql_lib.py (1400): init replica for source mysql failed
Traceback (most recent call last):
  File "/home/halleylombardia/chamaleon/venv/lib/python3.6/site-packages/pymysql/connections.py", line 713, in _write_bytes
    self._sock.sendall(data)
ConnectionResetError: [Errno 104] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/halleylombardia/chamaleon/venv/bin/chameleon", line 5, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/home/halleylombardia/chamaleon/venv/bin/chameleon.py", line 58, in <module>
    getattr(replica, args.command)()
  File "/home/halleylombardia/chamaleon/venv/lib/python3.6/site-packages/pg_chameleon/lib/global_lib.py", line 327, in init_replica
    self.__init_mysql_replica()
  File "/home/halleylombardia/chamaleon/venv/lib/python3.6/site-packages/pg_chameleon/lib/global_lib.py", line 337, in __init_mysql_replica
    self.mysql_source.init_replica()
  File "/home/halleylombardia/chamaleon/venv/lib/python3.6/site-packages/pg_chameleon/lib/mysql_lib.py", line 1381, in init_replica
    self.__copy_tables()
  File "/home/halleylombardia/chamaleon/venv/lib/python3.6/site-packages/pg_chameleon/lib/mysql_lib.py", line 699, in __copy_tables
    master_status = self.copy_data(schema, table)
  File "/home/halleylombardia/chamaleon/venv/lib/python3.6/site-packages/pg_chameleon/lib/mysql_lib.py", line 592, in copy_data
    self.cursor_buffered.execute(sql_unlock)
  File "/home/halleylombardia/chamaleon/venv/lib/python3.6/site-packages/pymysql/cursors.py", line 170, in execute
    result = self._query(query)
  File "/home/halleylombardia/chamaleon/venv/lib/python3.6/site-packages/pymysql/cursors.py", line 328, in _query
    conn.query(q)
  File "/home/halleylombardia/chamaleon/venv/lib/python3.6/site-packages/pymysql/connections.py", line 516, in query
    self._execute_command(COMMAND.COM_QUERY, sql)
  File "/home/halleylombardia/chamaleon/venv/lib/python3.6/site-packages/pymysql/connections.py", line 771, in _execute_command
    self._write_bytes(packet)
  File "/home/halleylombardia/chamaleon/venv/lib/python3.6/site-packages/pymysql/connections.py", line 718, in _write_bytes
    "MySQL server has gone away (%r)" % (e,))
pymysql.err.OperationalError: (2006, "MySQL server has gone away (ConnectionResetError(104, 'Connection reset by peer'))")

I'm on MySQL 5.7 (Azure) and PostgreSQL 10.10

it may be a permission issue? what are the source's user grants?

Grants in my case:
 GRANT RELOAD, LOCK TABLES, REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'usr_replica'@'%'

Since it fails on some table, what kind of difference are we looking for?

I would look at the permissions for those tables. in #65 the problem was caused by wrong permissions.
could be useful also to have what mysql logs when the unlock fails.
Thanks

Grants are on everything (*.*), or am I missing something?

Here an example for a table that sometimes pass, some other don't:
2019-11-09T12:03:51.087431Z 44753194 [Note] InnoDB: Table `ac`.`bo_log` flushed to disk
2019-11-09T12:04:06.103961Z 44753194 [Note] Aborted connection 44753194 to db: 'unconnected' user: 'usr_replica' host: 'postgres-replica-1.c.xxxx.internal' (Got timeout reading communication packets)
2019-11-09T12:04:06.104223Z 44753194 [Note] InnoDB: Deleting the meta-data file './ac/bo_log.cfg'
2019-11-09T12:04:06.104246Z 44753194 [Note] InnoDB: Resuming purge

apparently is a connection timeout. did you try to increase the connect timeout to a very large value?

I've set connect_timeout: 6000 and even lock_timeout: "480s".
It fails after 3m43.316s

anything particular about this mysql db?
it's self managed or it's on RDS or Azure?

It's a percona server, and it is on GCE on a Debian (full root access).

I would dig into this post https://www.percona.com/blog/2016/05/16/mysql-got-an-error-reading-communication-packet-errors/

If anyone get here with the same issue, we were able to solve it by setting net_read_timeout=600 (from a default value of 30) on MySQL side. It cannot be changed on pg_chameleon directly though.

Apparently it's possible to set the parameter per session.
I can try to add it as connection parameter and manage the value before starting the copy.
e.g.
SET SESSION   net_read_timeout = 600;
I'm not sure I can add it to the next release though.
I'm reopening the issue as a reminder.
ta!


Sinytra Connector compat

When you inevitably add 1.20.1 support, could you make it compatible with the Sinytra Connector mod so it is playable on forge as well?

Typed this out on my phone and forgot the label for suggestion and now it won't let me put it on the report


fix wasm exports

Previously I had hack which exported last function, just to get up and running. Now you can actually specify your exports properly and Jsrt API returns an object with your exports on it.

Oh hey! You got some prefast warnings. Good to know the Jenkins prefast check is working :)

LGTM (but I'd wait for another set of eyes)

Looks good to me.


Feature/export resizer

Implements export size change on drop-down selection; only allows resizing on "custom" size selection.

Code looks good to me. :+1:

+1


added Timer class and benchmark unit tests

Currently only testing performance of  genes_at_locus, transcripts_at_locus, exons_at_locus but should be easy to add more later. Also, there's a hackish search through the globals dict to find all benchmarks when they're being run outside of nose. If we need to reuse that trick elsewhere, I'll factor it out into its own module.

Comments from the review on Reviewable.io

test/test_timings.py, line 29 [r1] (raw file):
I think this would be more clear if you explicitly pass n_repeats, otherwise n_repeats and n_positions_per_contig get muddied together in my mind.

test/test_timings.py, line 46 [r1] (raw file):
I'm confused. Why is it useful to run them outside of nose?

test/timer.py, line 16 [r1] (raw file):
Maybe get rid of end = start, and instead assert in elapsed that end != None?

Comments from the review on Reviewable.io

test/test_timings.py, line 29 [r1] (raw file):
I want to hit every chromosome, didn't see an easy way to combine that with a single integer parameter.

Comments from the review on Reviewable.io

Good to merge

test/test_timings.py, line 29 [r1] (raw file):
I just meant passing n_repeats=3 instead of having it default to 3. (Wasn't even thinking aboutn_loci.)

Comments from the review on Reviewable.io

pyensembl/database.py, line 70 [r2] (raw file):
What's going on here?

Comments from the review on Reviewable.io

test/test_timings.py, line 29 [r1] (raw file):
n_repeats is just for benchmarking accuracy, whereas n_positions_per_contig actually controls how long the test runs for.

Comments from the review on Reviewable.io

pyensembl/database.py, line 70 [r2] (raw file):
Huh, what's the change here?

Comments from the review on Reviewable.io

test/test_timings.py, line 29 [r1] (raw file):
Yeah, it makes sense. I guess you've convinced me that passing in the argument would actually confuse things more.

Comments from the review on Reviewable.io

pyensembl/database.py, line 70 [r2] (raw file):
Oh, damnit, uncommitted leakage across branches

Comments from the review on Reviewable.io

pyensembl/database.py, line 70 [r2] (raw file):
Also, hitting publish for every comment is going to drive me insane

Comments from the review on Reviewable.io

pyensembl/database.py, line 70 [r2] (raw file):
Why isn't Reviewable showing the old version on the left side?

Comments from the review on Reviewable.io

Comments from the review on Reviewable.io


Should "Source" be "SourceInit" here?

https://github.com/cmuratori/meow_hash/blob/5ceaf1476baeef38c16ab95cbb4e18f6df20b05d/meow_hash.h#L384

This is old code, we're only working on the v0.4 branch now.
- Casey


ef 1.1 sum of collection raise exception Specified cast is not valid

var schools = db.Students.Select(p => new {
      p.Id,
      p.Name,
      Score = p.Scores.Sum(s =>  s.Score)
});

generated script work perfectly but raise exception when casting:
fail: Microsoft.EntityFrameworkCore.Query.Internal.SqlServerQueryCompilationContextFactory[1]
      An exception occurred in the database while iterating the results of a query.
      System.InvalidCastException: Specified cast is not valid.
         at lambda_method(Closure , TransparentIdentifier`2 )
         at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
         at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ExceptionInterceptor`1.EnumeratorExceptionInterceptor.MoveNext()
System.InvalidCastException: Specified cast is not valid.
   at lambda_method(Closure , TransparentIdentifier`2 )
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ExceptionInterceptor`1.EnumeratorExceptionInterceptor.MoveNext()

Try casting explicitly to nullable type:
var schools = db.Students.Select(p => new {
p.Id,
p.Name,
Score = p.Scores.Sum(s =>  (int?)s.Score)
});

I use casting or db.Scores.Sum(s => s.Score) but not work. I test Count, Average, Min and Max and work perfectly. just Sum have exception.

Does it happen if all the student have non-empty Scores collection?
db.Students.Where(s=>s.Scores.Any()).Select(p => new { p.Id, p.Name, Score = p.Scores.Sum(s=>s.Score)});

Not solved. I convert result to list but have exception yet:
System.InvalidCastException: Specified cast is not valid.
   at lambda_method(Closure , TransparentIdentifier`2 )
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ExceptionInterceptor`1.EnumeratorExceptionInterceptor.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)

This works in current bits. We return 0 for students without scores, and produce the following sql:
SELECT [p].[Id], [p].[Name], (
                SELECT SUM([s].[Score])
                FROM [Scores] AS [s]
                WHERE [p].[Id] = [s].[StudentId]
            )
            FROM [Students] AS [p]

I testing with latest dev build and not solved.
fail: Microsoft.EntityFrameworkCore.Query[1]
      An exception occurred in the database while iterating the results of a query.
      System.InvalidCastException: Specified cast is not valid.
         at lambda_method(Closure , QueryContext , TransparentIdentifier`2 )
         at Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.ProjectionShaper.TypedProjectionShaper`3.Shape(QueryContext queryContext, ValueBuffer valueBuffer)
         at Microsoft.EntityFrameworkCore.Query.QueryMethodProvider.<_ShapedQuery>d__3`1.MoveNext()
         at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ExceptionInterceptor`1.EnumeratorExceptionInterceptor.MoveNext()
System.InvalidCastException: Specified cast is not valid.
   at lambda_method(Closure , QueryContext , TransparentIdentifier`2 )
   at Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.ProjectionShaper.TypedProjectionShaper`3.Shape(QueryContext queryContext, ValueBuffer valueBuffer)
   at Microsoft.EntityFrameworkCore.Query.QueryMethodProvider.<_ShapedQuery>d__3`1.MoveNext()
   at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ExceptionInterceptor`1.EnumeratorExceptionInterceptor.MoveNext()
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2]
      Executed action Kaviansoft.Madreseh.Areas.Inspection.Controllers.EvaluateController.Refresh (Kaviansoft.Madreseh) in 4.9726ms
fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[0]
      An unhandled exception has occurred: Specified cast is not valid.
System.InvalidCastException: Specified cast is not valid.
   at lambda_method(Closure , QueryContext , TransparentIdentifier`2 )
   at Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.ProjectionShaper.TypedProjectionShaper`3.Shape(QueryContext queryContext, ValueBuffer valueBuffer)
   at Microsoft.EntityFrameworkCore.Query.QueryMethodProvider.<_ShapedQuery>d__3`1.MoveNext()
   at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ExceptionInterceptor`1.EnumeratorExceptionInterceptor.MoveNext()
   at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeList(JsonWriter writer, IEnumerable values, JsonArrayContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
   at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)
   at Microsoft.AspNetCore.Mvc.Formatters.Json.Internal.JsonResultExecutor.ExecuteAsync(ActionContext context, JsonResult result)
   at Microsoft.AspNetCore.Mvc.JsonResult.ExecuteResultAsync(ActionContext context)
   at Microsoft.AspNetCore.Mvc.Core.Internal.ResourceInvoker.<InvokeResultAsync>d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeNextResultFilterAsync>d__19.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ResultExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeInnerFilterAsync>d__21.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Mvc.Core.Internal.ResourceInvoker.<InvokeNextResourceFilter>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Mvc.Core.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Core.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Core.Internal.ResourceInvoker.<InvokeFilterPipelineAsync>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Mvc.Core.Internal.ResourceInvoker.<InvokeAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Builder.RouterMiddleware.<Invoke>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware`1.<Invoke>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware`1.<Invoke>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware`1.<Invoke>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware`1.<Invoke>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware`1.<Invoke>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware`1.<Invoke>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware`1.<Invoke>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware`1.<Invoke>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>d__6.MoveNext()

@mojtabakaviani what is the data type of the "Score" column?

sql: real
dotnet: float

@mojtabakaviani - How did you test with latest dev? what is the version number of EFCore packages?

@smitpatel I was able to reproduce this on our current bits, working on the fix now...

Fixed in f41fcc98453f453df1725204881ac3bee835865e

Thank you very much. you solving very important bug that must solved very early (ef core 1).


test: add failing test for container with prefix

add failing test for container with prefix - related to #1796

Fixed by #1807, thank you!


[Bug] Robots Txt utm_previouspage

Robots.txt by adding Disallow: /*?utm_previouspage

Robots.txt is currently still delivered by AEM Publishers, this must be adjusted there.


Noise in sensor observations or robot+sensor pose

I am implementing 2D bird's eye semantic mapping for omnigibson. I use a library called dungeon_maps which takes depth and semantic labels to construct the map. It uses camera parameters (hfov, resolution) and camera absolute pose to project the semantic pointcloud constructed from depth map onto a top down view. I am building a global map.
I run into a problem where when I move the robot around, the objects slightly move around. ie There is noise in either the pose or the observation.
FYI, to get the absolute pose, I add the x,y coordinate of camera position to the robot position. One thing that's weird is that the same get_position_orientation api returns position/orientation w.r.t global frame for the robot, but I guess for the sensor it returns the position/orientation relative to the robot base link. I might be wrong here and missing some other transformation which might result in the noise.
Here is the brief code to replicate what I am talking about. Do a pip install dungeon_maps in whatever environment you're using.
import math
from typing import List, Tuple
import numpy as np

import omnigibson as og
from omnigibson.macros import gm
from omnigibson.robots import REGISTERED_ROBOTS
from omnigibson.object_states import Pose

from omnigibson.utils.ui_utils import choose_from_options, KeyboardRobotController
import dungeon_maps as dmap
from omnigibson.utils.usd_utils import get_camera_params
from omnigibson.utils.transform_utils import euler2quat, quat2euler, mat2euler, quat_multiply
import torch
from dungeon_maps.demos.object_map import vis
import cv2
from PIL import Image
CONTROL_MODES = dict(
    random="Use autonomous random actions (default)",
    teleop="Use keyboard control",
)

SCENES = dict(
    Rs_int="Realistic interactive home environment (default)",
    empty="Empty environment with no objects",
)

# Don't use GPU dynamics and use flatcache for performance boost
gm.USE_GPU_DYNAMICS = False
gm.ENABLE_FLATCACHE = True

def choose_controllers(robot, random_selection=False):
    """
    For a given robot, iterates over all components of the robot, and returns the requested controller type for each
    component.

    :param robot: BaseRobot, robot class from which to infer relevant valid controller options
    :param random_selection: bool, if the selection is random (for automatic demo execution). Default False

    :return dict: Mapping from individual robot component (e.g.: base, arm, etc.) to selected controller names
    """
    # Create new dict to store responses from user
    controller_choices = dict()

    # Grab the default controller config so we have the registry of all possible controller options
    default_config = robot._default_controller_config

    # Iterate over all components in robot
    for component, controller_options in default_config.items():
        # Select controller
        options = list(sorted(controller_options.keys()))
        choice = choose_from_options(
            options=options, name="{} controller".format(component), random_selection=random_selection
        )

        # Add to user responses
        controller_choices[component] = choice

    return controller_choices
from torch import nn

def main():
    """
    Robot control demo with selection
    Queries the user to select a robot, the controllers, a scene and a type of input (random actions or teleop)
    """
    og.log.info(f"Demo {__file__}\n    " + "*" * 80 + "\n    Description:\n" + main.__doc__ + "*" * 80)

    # Choose scene to load
    scene_model = 'Rs_int'

    # Choose robot to create
    robot_name = "Locobot"

    # Create the config for generating the environment we want
    scene_cfg = dict()

    scene_cfg["type"] = "InteractiveTraversableScene"
    scene_cfg["scene_model"] = scene_model
    scene_cfg["trav_map_resolution"] = 0.03

    # Add the robot we want to load
    robot0_cfg = dict()
    robot0_cfg["type"] = robot_name
    robot0_cfg["obs_modalities"] = ["rgb", "depth_linear", "seg_semantic", "camera"]
    robot0_cfg["action_type"] = "continuous"
    robot0_cfg["action_normalize"] = True

    # Compile config
    cfg = dict(scene=scene_cfg, robots=[robot0_cfg])

    # Create the environment
    env = og.Environment(configs=cfg, action_timestep=1/10., physics_timestep=1/60.)

    # Choose robot controller to use
    robot = env.robots[0]
    controller_choices = {'base': 'DifferentialDriveController'} #choose_controllers(robot=robot, random_selection=random_selection)

    # Choose control mode
    control_mode = "teleop"

    # Update the control mode of the robot
    controller_config = {component: {"name": name} for component, name in controller_choices.items()}
    robot.reload_controllers(controller_config=controller_config)

    # Update the simulator's viewer camera's pose so it points towards the robot
    og.sim.viewer_camera.set_position_orientation(
        position=np.array([1.46949, -3.97358, 2.21529]),
        orientation=np.array([0.56829048, 0.09569975, 0.13571846, 0.80589577]),
    )

    # Reset environment
    obs = env.reset()
    camera_params = obs["robot0"]["robot0:eyes_Camera_sensor_camera"]

    agent_pos, agent_ori = env.robots[0].get_position_orientation()
    print(env.robots[0].states[Pose].get_value())

    agent_rpy = quat2euler(agent_ori)
    map_res = 0.03

    map_size = env.scene.trav_map.map_size

    c_relative_pos, c_relative_ori = env.robots[0].sensors['robot0:eyes_Camera_sensor'].get_position_orientation()
    c_abs_pose, c_abs_ori = agent_pos + c_relative_pos, quat_multiply(agent_ori, c_relative_ori)
    c_abs_rpy = quat2euler(c_abs_ori)
    cam_pose = [agent_pos[0], agent_pos[1], agent_rpy[2] - np.pi/2]

    # def map_to_world(self, xy):
    #     axis = 0 if len(xy.shape) == 1 else 1
    #     return np.flip((xy - map_size / 2.0) * self.map_resolution, axis=axis)

    map_offset = env.scene.trav_map.world_to_map(agent_pos[:2])

    proj = dmap.MapProjector(
        width = camera_params["resolution"]["width"],
        height = camera_params["resolution"]["height"],
        hfov = camera_params["fov"],
        vfov = None,
        cam_pose = cam_pose,
        cam_pitch = c_abs_rpy[1],
        cam_height = c_relative_pos[1],
        map_res = 0.03,
        map_width = map_size,
        map_height = map_size,
        trunc_depth_min = 0.15,
        trunc_depth_max = 5.05,
        width_offset=map_offset[0],
        height_offset=map_offset[1],
        fill_value = 0,
        to_global = True,

    )
    build = dmap.MapBuilder(
        map_projector = proj
    )

    # Create teleop controller
    action_generator = KeyboardRobotController(robot=robot)

    # Print out relevant keyboard info if using keyboard teleop
    if control_mode == "teleop":
        action_generator.print_keyboard_teleop_info()

    # Other helpful user info
    print("Running demo.")
    print("Press ESC to quit")

    # Loop control until user quits
    max_steps = -1
    step = 0
    color_map = torch.from_numpy(get_colormap(100)).cuda()
    done = False

    agent_xzys = []
    while not done:
        action = action_generator.get_random_action() if control_mode == "random" else action_generator.get_teleop_action()
        obs, reward, done, info = env.step(action=action)

        # camera_params = obs["robot0"]["robot0:eyes_Camera_sensor_camera"]
        # camera_rpy = mat2euler(camera_params["pose"])

        agent_pos, agent_ori = env.robots[0].get_position_orientation()
        agent_xzy = np.array([agent_pos[0], agent_pos[2], agent_pos[1]])
        agent_rpy = quat2euler(agent_ori)
        print(env.robots[0].states[Pose].get_value(), agent_pos)

        depth = obs["robot0"]["robot0:eyes_Camera_sensor_depth_linear"]
        rgb = obs["robot0"]["robot0:eyes_Camera_sensor_rgb"]
        depth_map = depth #denormalize(depth)
        seg = obs["robot0"]["robot0:eyes_Camera_sensor_seg_semantic"]
        depth_map = torch.tensor(depth_map, device='cuda').unsqueeze(0)
        seg_map = torch.tensor(seg.astype(int), device='cuda')
        seg_map = nn.functional.one_hot(seg_map, num_classes=100) # (h, w, c)
        # seg_map = nn.functional.one_hot(torch.from_numpy(semantic.astype(int)), num_classes=100) # (h, w, c)

        seg_map = seg_map.permute((2, 0, 1)).to(dtype=torch.float32) # (c, h, w)
        depth_map[depth_map > 5] = 0
        depth_map[depth_map < 0.15] = 0

        c_relative_pos, c_relative_ori = env.robots[0].sensors['robot0:eyes_Camera_sensor'].get_position_orientation()
        c_abs_pose, c_abs_ori = agent_pos + c_relative_pos, quat_multiply(agent_ori, c_relative_ori)
        c_abs_rpy = quat2euler(c_abs_ori)

        cam_pose = [c_abs_pose[0], c_abs_pose[1], c_abs_rpy[2]]
        if len(agent_xzys) == 0 or not np.allclose(agent_xzys[-1], agent_xzy, 1e-2):
            agent_xzys.append(agent_xzy)

        local_map = build.step(
            depth_map = depth_map,
            value_map = seg_map,
            cam_pose = cam_pose,
            valid_map = depth_map > 0,
            cam_pitch = c_abs_rpy[1],
            cam_height = c_relative_pos[2],
        )
        # render scene
        map_color = color_map[build.world_map.topdown_map.argmax(1)].squeeze().cpu().numpy()
        map_color = draw_trajectory(map_color, build.world_map, agent_xzys)

        cv2.imshow('Object map', map_color)
        sem_seg_color = color_map[seg.astype(int)]
        cv2.imshow('Semantic map', sem_seg_color.cpu().numpy())

        depth_normalized = (depth_map - depth_map.min()) / (depth_map.max() - depth_map.min())
        depth_img = Image.fromarray((depth_normalized * 255).squeeze().cpu().numpy().astype(np.uint8), mode="L")
        img = np.array(depth_img.convert("RGB"))

        cv2.imshow('Depth map', img)

        cv2.waitKey(1)
        #print(env.robots[0].get_position_orientation(), "ROBOT")
        step += 1

    # Always shut down the environment cleanly at the end
    env.close()

def get_colormap(n):
    def bitget(byteval, idx):
        return (byteval & (1 << idx)) != 0

    cmap = np.zeros((n, 3), dtype='uint8')
    for i in range(n):
        r = g = b = 0
        c = i
        for j in range(8):
            r = r | (bitget(c, 0) << 7-j)
            g = g | (bitget(c, 1) << 7-j)
            b = b | (bitget(c, 2) << 7-j)
            c = c >> 3

        cmap[i] = np.array([r, g, b])

    return cmap

def draw_trajectory(
    image: np.ndarray,
    topdown_map: dmap.TopdownMap,
    trajectory: np.ndarray,
    color: List[int] = [0, 0, 255],
    size: int = 2,
):
    assert len(image.shape) == 3  # (h, w, 3)
    assert image.dtype == np.uint8
    assert topdown_map.proj is not None
    pos = np.asarray(trajectory, dtype=np.float32)
    pos = topdown_map.get_coords(pos, is_global=True)
    pos = dmap.utils.to_numpy(pos)[0]
    return draw_segments(image, pos, color=color, size=size)

def draw_segments(image, points, color, size=2):
    for index in range(1, len(points)):
        prev = index - 1
        cur = index
        if np.all(points[prev] == points[cur]):
            continue
        image = draw_segment(image, points[prev], points[cur], color, size)
    return image

def draw_segment(image, p1, p2, color, size=2):
    image = cv2.line(image, (p1[0], p1[1]), (p2[0], p2[1]), color=color, thickness=size)
    return image

if __name__ == "__main__":
    main()

Visually, when the robot moves around the observations have this bounce (tilt) to it, but I don't use any sensor noises and I assume the coordinates returned will be the true coordinates.

For the noise issue here, could you try disabling the denoising stuff Omniverse has (DLSS, etc.) - these should be in the render settings menu in the RTX Realtime Settings. https://docs.omniverse.nvidia.com/materials-and-rendering/latest/103/render-settings_overview.html
The visualsensor local pose thing seems to be a separate issue so I opened a new issue for that.
Also this dungeon_maps thing looks really interesting. Perhaps we can add direct support for it later.

@ChengshuLi It should, but it does not. The value returned there is always the same regardless of where the robot is. Which is why I called it relative pos, ori. I guess that's why @cgokmen raised https://github.com/StanfordVL/OmniGibson/issues/243 as an issue.

Let's try to verify this @ChengshuLi - I do agree there might actually be a bug here.

Got it. Let me investigate a bit more and get back to you.

@sai-prasanna Sorry another question, which robot are you using?

Sorry, following up on this as well. I just tested and verified that without gm.ENABLE_FLATCACHE on, VisionSensors should return the correct value, since every prim's attributes (including pos / ori) gets updated every time an object moves in the sim.
However, gm.ENABLE_FLATCACHE (which in your attached script, is set to True) causes this to not work, which is expected because it is precisely the bypassing of writing to the USD at every timestep that gives the performance boost associated with flatcache.
Can you try setting gm.ENABLE_FLATCACHE=False and trying again?

@cremebrule if @sai-prasanna is using an ActiveCameraRobot with the camera attachehd to a moving link, even with gm.ENABLE_FLATCACHE=False, the result will still be wrong, right?

@cremebrule  Thanks! setting it makes the position and orientation return the values I was computing manually.

@cremebrule Hello, have you successfully used Fetch to build a map, can you share your method, I seem to be using Fetch when the result is even worse, thank you.

Closing this as resolved, the concrete issue to fix can be found in #243


How creating a filesystem?

Please write a readme.
How creating a filesystem, how put file, how read a file etc.

Added it to the README, thanks for the suggestion!


How to revoke a user

Hello, I do not see in the documentation on how to revoke a user. Can anyone give me guidance?

I'm just getting familiar with project and might be way off, but might be able to remove user keys here:
/var/lib/docker/volumes/ovpn-data/_data/pki/private/user.key
/var/lib/docker/volumes/ovpn-data/_data/pki/issued/user.crt
/var/lib/docker/volumes/ovpn-data/_data/pki/reqs/user.req

where ovpn-data is directory you initially specified for OVPN_DATA env

If you created the certificates with easyrsa you can revoke them using easyrsa:
easyrsa revoke <CN of user you want to revoke access for>
Generate the CRL again:
easyrsa gen-crl
Make sure your openvpn is started with the --crl-verify option. Because you probably did not have a CRL yet, this means you'll need to restart your openvpn container. After this CRL updates will get picked up automatically.

To be clear: deleting the files as suggested by @justingshreve does nothing, as the client would still connect with a valid PKI certificate.

Concurring with @pieterlange, the following worked for me:
$ docker exec -it OPENVPN-CONTAINER easyrsa revoke MY-USER-CN

$ docker exec -it OPENVPN-CONTAINER easyrsa gen-crl

Also, restarting the OPENVPN-CONTAINER was required becuase the CRL did not exist prior.  I think that the following would be a solid addition to the out-of-the-box funcitonality:

Generate a CRL during initial setup
Add documentation on the above (How To Revoke Users)

This is related to a bug discussed in #101 and fixed #251

How do we revoke a config file ? Is it documented somewhere ?


How to make already open Date-Picker in a modal ?

Hey,
I am opening a modal on click the input field and i want the date-picker as an already open Calendar with an hidden input field. I have already tried autofocus on hidden input and trigger click event on input field but it is not going as per my expectations.
Please help me and give my some suggestions to resolve it.
Thanks in advance.

Hi @Avtarsodhi,
Please provide a codepen so we have a working reproducible testcase.

Hi @DanielRuf
My jsp's code is
''
and javascript code is
function openDatePickerModal() {
$('.picker-modal').openModal();
}'
and pickadate code is-
$('#deliveryDatePicker' .pickadate({
formatSubmit: 'dd/mm/yyyy',
})
modal code is -

This is not a codepen. Please go to codepen.io and create a working example of your current implementation (only css, js, html).

Did you already try the open method?
https://amsul.ca/pickadate.js/api/#method-open-close

how to use pickadate.js in code show. it shows the error.

@DanielRuf
yeah, i have tried open function but it shows error picker is not defined

Please check the docs at the top:
var $input = $('.datepicker').pickadate()

// Use the picker object directly.
var picker = $input.pickadate('picker')
picker.methodName(argument1, argument2, ...)

What exactly did you try on codepen?

Keepn in mind that you have to import / load the datepicker and picker file.
https://github.com/amsul/pickadate.js/tree/master/lib

You have to load picker.js before loading the date.picker.js file:
https://github.com/amsul/pickadate.js/tree/master/lib

Thanks @DanielRuf for your quick response.
It works.


Provide a build progress bar when a testplan runs

Description:
Currently, we have to look at the logs to find the status of a currently running build. We need to show a progress bar to show the progress.
See the following for the first draft:

Resolved with introducing test phases.


[XXXX] Fix nationalities bugs WIP

Context
Changes proposed in this pull request
Guidance to review

 Nationality issue


Issue 465

Hello @ivotron! Thanks for submitting the PR.

There are no PEP8 issues in the file cli/popper/__init__.py !

There are no PEP8 issues in the file cli/popper/archiving.py !

There are no PEP8 issues in the file cli/popper/commands/cmd_add.py !

There are no PEP8 issues in the file cli/popper/commands/cmd_archive.py !

In the file cli/popper/commands/cmd_badge.py, following                are the PEP8 issues :

Line 18:80: E501 line too long (103 > 79 characters)
Line 23:80: E501 line too long (100 > 79 characters)
Line 28:80: E501 line too long (103 > 79 characters)
Line 33:80: E501 line too long (83 > 79 characters)

There are no PEP8 issues in the file cli/popper/commands/cmd_info.py !

There are no PEP8 issues in the file cli/popper/commands/cmd_init.py !

There are no PEP8 issues in the file cli/popper/commands/cmd_ls.py !

There are no PEP8 issues in the file cli/popper/commands/cmd_mv.py !

There are no PEP8 issues in the file cli/popper/commands/cmd_parameters.py !

In the file cli/popper/commands/cmd_run.py, following                are the PEP8 issues :

Line 333:6: W605 invalid escape sequence '+'
Line 333:10: W605 invalid escape sequence '\d'
Line 333:16: W605 invalid escape sequence '.'
Line 333:18: W605 invalid escape sequence '\d'
Line 334:7: W605 invalid escape sequence '\d'
Line 334:11: W605 invalid escape sequence '.'
Line 334:13: W605 invalid escape sequence '\d'
Line 334:18: W605 invalid escape sequence '.'

There are no PEP8 issues in the file cli/popper/commands/cmd_search.py !

There are no PEP8 issues in the file cli/popper/utils.py !


More robust handling of exceptions for config server maintainers

I agree that it's ugly, will look into it and fix the log message as well


[Peek] Refactoring of file system models, removal of PngPreviewer, retrieving of folder size via Scripting com reference and other fixes

Summary of the Pull Request

Multiples generic refactors and fixes to enhance the productivity and overall QoL of Peek features.

Detailed Description of the Pull Request / Additional comments

Created IFileSystemItem, FolderItem & FileItem to handle different cases based on the file system item.
Removed of PngPreviewer and updated ImagePreviewer to handle png easily.
Retrieved folder size via Scripting com package to promply and easily get folder size displayed.
Fixed default app button showing for files/folders that do not have default apps.
Refactored lots of code bitmap conversion, thumbnail loading, propertystore, etc.

@SamChaps
I suggest you to look at the last changes in thumbnail code of PT Run. Tey could be interesting for you. And btw the name for 0x0 flag isn't none.

@SamChaps I suggest you to look at the last changes in thumbnail code of PT Run. Tey could be interesting for you. And btw the name for 0x0 flag isn't none. #23789

Thanks, I will change the flag name. Although, not sure exactly what adobe acrobat fixes would do for Peek in regards of thumbnail loading.

@SamChaps I suggest you to look at the last changes in thumbnail code of PT Run. Tey could be interesting for you. And btw the name for 0x0 flag isn't none. #23789

Thanks, I will change the flag name. Although, not sure exactly what adobe acrobat fixes would do for Peek in regards of thumbnail loading.

If PDF preview works in peek with enabled thumbnail preview of Adobe you don't need the changes. But if it crashes or shows only a black/transparent rectangle then I suggest you to add it. (The code in PT Run detects that it is enabled and shows only the PDF icon in that case.)

@SamChaps I suggest you to look at the last changes in thumbnail code of PT Run. Tey could be interesting for you. And btw the name for 0x0 flag isn't none. #23789

Thanks, I will change the flag name. Although, not sure exactly what adobe acrobat fixes would do for Peek in regards of thumbnail loading.

If PDF preview works in peek with enabled thumbnail preview of Adobe you don't need the changes. But if it crashes or shows only a black/transparent rectangle then I suggest you to add it. (The code in PT Run detects that it is enabled and shows only the PDF icon in that case.)

Ah I see! Thanks for explaining. It should be fine with Peek as it doesn't use the preview handlers, it just displays PDFs in a WebView2.


Vacuum Cleaner config flow error

I tried to integrate my IMOU vacuum cleaner (RV-L11) but in the config flow after entering the cloud secrets this error stops the setup:
Logger: custom_components.imou_life
Source: custom_components/imou_life/config_flow.py:82
Integration: Imou Life ([documentation](https://github.com/user2684/imou_life), [issues](https://github.com/user2684/imou_life/issues))
First occurred: 11:13:34 (2 occurrences)
Last logged: 11:16:36

InvalidResponse: missing parameter or error parsing in {'expandChanNum': '', 'productId': 'HWtbmQvU', 'trackFollowStatus': '', 'httpPort': '80', 'privatePort': '', 'rtspPort': '554', 'deviceId': <REMOVED>, 'version': '0.1.2', 'aplist': [], 'accessType': 'PaaS', 'p2pPort': '554', 'port': '37777', 'encryptMode': 0, 'tlsPrivatePort': '37778', 'name': 'Paulchen', 'deviceModel': 'RV-L11', 'ability': '', 'brand': 'easy4Ip', 'playToken': <REMOVED>, 'shareStatus': 'owner', 'status': 'online'}

Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/imouapi/device.py",
line 189, in async_initialize self._catalog = device_data["catalog"] ~~~~~~~~~~~^^^^^^^^^^^ KeyError: 'catalog' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/config/custom_components/imou_life/config_flow.py",
line 130, in async_step_discover await self._discover_service.async_discover_devices() File "/usr/local/lib/python3.11/site-packages/imouapi/device.py",
line 641, in async_discover_devices await device.async_initialize() File "/usr/local/lib/python3.11/site-packages/imouapi/device.py",
line 360, in async_initialize raise InvalidResponse(f" missing parameter or error parsing in {device_data}") from exception imouapi.exceptions.InvalidResponse: missing parameter or error parsing in {'expandChanNum': '', 'productId': 'HWtbmQvU', 'trackFollowStatus': '', 'httpPort': '80', 'privatePort': '', 'rtspPort': '554', 'deviceId': <REMOVED>, 'version': '0.1.2', 'aplist': [], 'accessType': 'PaaS', 'p2pPort': '554', 'port': '37777', 'encryptMode': 0, 'tlsPrivatePort': '37778', 'name': 'Paulchen', 'deviceModel': 'RV-L11', 'ability': '', 'brand': 'easy4Ip', 'playToken':<REMOVED>, 'shareStatus': 'owner', 'status': 'online'}

Home Assistant 2023.9.2
Supervisor 2023.09.2
Operating System 10.5
Is it possible to support this device?

Hi, unfortunately vacuum cleaners works with a completely set of undocumented API so until there will be documentation on how to interact with them there will be no way to support these devices :-/

Did you manage to figure it out? There has to be a way, cause alexa is able to start/stop the vacuum aswell

Nope, unfortunately this https://github.com/user2684/imou_life/wiki/I-would-like-to-have-support-for-this-new-model still applies :-(

Closing this for now until there will be a documented API available from Imou for the implementation


Godot 4.0 GDScript preload fails in standalone build unless files are present in directory

Godot version
4.0.dev (28174d531) built with Visual Studio 2019
System information
OS: Windows 10 (64-bit)
Renderer: Vulkan
Issue description
The current dev build of Godot 4.0 fails to load GDScript files which use preload with some assets in exported builds, citing a "file does not exist" error, unless there is another file with the same name in the executable's directory.
For instance, trying to preload an asset using the path res://square.png fails unless there is a file named square.png next to the exported executable, but the content of that file does not matter, as Godot will still (correctly) load it from the PCK. It just bails early if the path doesn't exist in the filesystem.
This issue only affects the built-in preload in GDScript, and it does not affect the latest stable build (3.4.2). It's also picky about assets it fails to load (in the reproduction project, square.png is affected but icon.png isn't, and in another project, image files fail, but custom scripted resources don't).
In addition, because it causes a script parse error, affected scripts will not be attached to nodes when running in standalone mode, so this is a blocker.
Steps to reproduce
Using the minimal reproduction project:

Run main scene in editor: both images are loaded from filesystem
Export project (important: it must be outside of the project directory!) and run it: only icon.png is loaded from the PCK, and an error is shown in the console:

SCRIPT ERROR: Parse Error: Preload file "res://square.png" does not exist.

Create a placeholder file called square.png (the content does not matter, even a 0 byte empty file will work), place it in the directory where the exported project is, and run it again: both images are loaded from the PCK
(Workaround) Delete the placeholder square.png file, replace the preload call in the script of the Square node (in main.tscn) with a load call, re-export, and run again: both images are loaded from the PCK

Minimal reproduction project
PreloadIssue_4.0.zip

I confirm the bug and the workaround. Thank you.

Had (still have) the same problem.

The workaround does not work any more since alpha2. Any idea how to solve this issue which is a huge blocker?

Confirmed the bug still exists in Alpha 11 (using official build & template with the reproduction project). The workaround still works, but I think this should be fixed before the first beta release, otherwise many people will be surprised when a game that works in the editor suddenly fails to load assets in standalone builds.

The workaround of replacing all preload()s with load()s still works for alpha13: v4.0.alpha13.official [59dcddc45] to export projects, and the issue still stands, I feel the same as ricmzn 🙄 , more people will face this issue than desired and it is bloody hard to find what caused, imho the first beta release should cover this issue, and I don't see a lot of attention towards it though; not that I know how to fix it either, so... 🤓

Since alpha 16 it now affects scene files (they are exported as .remap) - which effectively breaks almost every usage of preload.

this also seems to affect my shaders. they all run in the editor but not in the export.

Had (still have) the same problem.

@pozitiffcat That's not the same problem, this one was a GDScript bug and was fixed months ago.
Your issue is likely https://github.com/godotengine/godot/issues/25672. It's not a bug but a confusing behavior for users between the editor and the exported project.


Error in Universal render scenario

Hi,
I am using angular universal, and get this error:
Call to Node module failed with error: Prerendering failed because of error: ReferenceError: Event is not defined
I assume this is an issue with attempting to render it on the server.
Any suggestions?
Note: I am fairly new to ng2
Thanks

Same exact issue here. Event is not defined.

Solved by changing the source code from:
onScroll(e: Event) {
this.refresh();
}
to:
onScroll(e: any) {
this.refresh();
}

I believe this is resolved in the latest version of the package. Please re-open if you're still experiencing this.


Can not verify your SSH key: SSHKeyGenParsePublicKey failed: exit status 255 No user exists for uid 997

Some docker users are affected by this bug (not only one) when they try to add public keys.
Can not verify your SSH key: SSHKeyGenParsePublicKey: fail to parse public key: exec(629f88e0-5:SSHKeyGenParsePublicKey) failed: exit status 255() stdout: stderr: No user exists for uid 997 - No user exists for uid 997

It's likely cased by the error reported by the ssh-keygen command executed by Gitea, which meets the non-existing UID 997.
I don't know how it happens at the moment. For Gitea Docker, the UID should have been default to 1000, maybe user's setup steps/configs/operations could provide some clues.

As far as I can see our entrypoint (for the docker with root) would ensure that the USER_UID is in the /etc/passwd file.
Therefore I think this can only happen on the root docker if they're not using our entrypoint - I don't think we can be expected to correctly configure things if they're not using our entrypoint.
On the rootless - do we really use ssh-keygen there?

I have checked the entrypoint logic and tried to play a while, but I have difficulty to reproduce the problem (I do not know what the users have done on their side .....)
Another thing that I do not understand is whose UID is 997. In most Linux distro, the 997 doesn't seem to be a common UID, and it doesn't seem to be easily used by a user by mistake.

I have checked the entrypoint logic and tried to play a while, but I have difficulty to reproduce the problem (I do not know what the users have done on their side .....)
Another thing that I do not understand is whose UID is 997. In most Linux distro, the 997 doesn't seem to be a common UID, and it doesn't seem to be easily used by a user by mistake.

988 for me. Experiencing basically the same thing.

Could you provide your setup details? A reproducible example would help the debug.

Nevermind, it was my configuration mistake

Could you share your experiences? It will help other users. Thank you.

It's very specific, but sure:

I clicked this button, it made that error happen. It was downloaded from here: https://github.com/parkervcp/eggs/tree/master/software/gitea and it runs on Pterodactyl Panel

No more feedbacks

I use pterodactyl too and with this set to false, the error is still there.

Can you help to provide more clues? Or could you help to provide a minimal reproduce setup instruction?


Add sanitization for custom email settings string

Resolve https://github.com/opencollective/opencollective/issues/5776

https://user-images.githubusercontent.com/12435965/180504782-092a0df0-a00a-41fc-a953-658bbc4431da.mp4

Tests are failing because settings can be null.
I've added an additional test to make sure the feature works.

Thanks for the review and the additional check. I've fixed the problem. 👍🏽


Terminal Settings Behaviour Not as Expected - TOML Parser Issue and Start Behaviour

Lapce Version:
Current nightly-cbcbca98e (05.05. 2024)
System information
Windows 10
Description:
The behaviour of the terminal settings is still not as expected. I refer to #2812, but this seems to be a different issue:
I managed to have three options (actually, it's 4, because a "default" option is added automatically, which seems to be a bug or at least inconsistent) available in the Terminal: Default Profile selection with my settings.toml looking like this:
[terminal]
font-family = "'Hack Nerd Font', 'Fira Code Nerd Font', monospace"
font-size = 0
[terminal.default-profile]
windows = "cmd"

[terminal.profiles]
cmd = { command = "C:\\Windows\\System32\\cmd.exe" }
msys = { command = "C:\\msys64\\usr\\bin\\bash.exe", args = ["--login", "-i"], env = {MSYSTEM = "MINGW64", CHERE_INVOKING = "1", MSYS2_PATH_TYPE = "inherit"}  }
Powershell = { command = "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"}

Problem 1: TOML parser
However, the settings break if i introduce line breaks in the argument lists, which should be allowed in proper TOML afaik.
So, if i rewrite the [terminal.profiles] section like
[terminal.profiles]
cmd = { command = "C:\\Windows\\System32\\cmd.exe" }
msys = {
  command = "C:\\msys64\\usr\\bin\\bash.exe",
  args = ["--login", "-i"],
  env = {MSYSTEM = "MINGW64", CHERE_INVOKING = "1", MSYS2_PATH_TYPE = "inherit"}
    }
Powershell = { command = "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"}

lapce behaves as if there was an empty settings.toml.
So, the TOML parser seems to be buggy.
Problem 2: Start Behaviour
Now when i have the settings.toml working as shown above, i get this in the settings interface section:

So i can select a default profile from the profiles I created.
The Terminal: profiles section is still empty, I guess this is nt an error, but still not implemented at all.
However, one would expect the Default Profile to be started by default when the first terminal is opened. This is not the case. The first Terminal that opens on Startup is always a Powershell commandline.
However, when clicking the [+] to open a new terminal, it opens the sugested Default Profile.
I found no other way to create different terminals then by switching the Terminal: Default Profile and then opening a new Terminal.
Expected behaviour:
The Default Profile should be the Profile to be started when the first terminal is opened.
Feature request:
There should be an interface selector in the terminal section itself to chose another terminal than the default to be started. I sugest a dropbox right beneath the [+] sign, which is how it's done for example in VSCode.
Maybe i should add this as a seperate feature request?
Last but not least:
Thanks a lot for all the good work!
Lapce is a very promising editor and I'm eager to watch it's further development!

So, the TOML parser seems to be buggy.

Inline tables cannot flow to next line

There should be an interface selector in the terminal section itself to chose another terminal than the default to be started

https://docs.lapce.dev/get-started/terminal

Still nothing leads to the expected behaviour that the default profile is started as the first terminal that is opened, which is always a powershell. Even after i added a default profile pointing to cmd.exe which i actually can acces with the sugested palette using < and which then opens a cmd in the terminal.
(Maybe this should be in #2812)
And still, I would sugest an additional selector right next to the [+] button

Thanks for the fix, now it works!
the default profile now is opened in the terminal when lapce is opened.


Play CoffeeScript plugin: Migrate integration tests

Migrate existing integration tests as much as possible
Multi-version testing is not supported
All tests should pass

Implementation:

https://github.com/gradle/play/blob/master/src/integTest/groovy/com/lightbend/play/tasks/CoffeeScriptCompileIntegrationTest.groovy
https://github.com/gradle/play/blob/master/src/integTest/groovy/com/lightbend/play/plugins/PlayCoffeeScriptPluginIntegrationTest.groovy


update docs (#1099)

What are you trying to accomplish?
Updated the Known Issues section with some information regarding turbo_frame_tag and its issues when using inside a ViewComponent.
#1099

👋🏻 mind adding a changelog entry and accepting the requested changes if you agree with them?

Thanks for adding this documentation. I seem to have run into it after upgrading to haml 6.0.1.


Generate STL files from SparkFun library for "Standard Library"

Ideally we'll automate this. Need to investigate how straight-forward automated export is.

From my notes:

STL import/export support for SketchUp requires a plug-in to be installed: https://extensions.sketchup.com/en/content/sketchup-stl
While you can download it from there you need a login but if you visit the associated project on GitHub you can download the source directly: https://github.com/SketchUp/sketchup-stl/releases

Once the plugin is installed you can import a .skp and export a .stl via the Ruby console with:
    model = Sketchup.active_model
    status = model.import "/<path>/SSOP20_L.skp", false
    CommunityExtensions::STL::Exporter.export('/<path>/SSOP20_L.stl')

I also found a reference on how to run a Ruby script within SketchUp from the command line:  "Is there a command line in Google Sketchup to export in 3ds or fbx format?"

Components
The SparkFun Eagle libraries repository is here: https://github.com/sparkfun/SparkFun-Eagle-Libraries
AFAICT there is no explicit mapping within the .lbr files between the component packages and the associated models--it seems to be assumed that the package name will match the model file name (as is the apparent convention with EagleUp).
Models
The SparkFun 3D model repository is here: https://github.com/sparkfun/3D_Models
It seems to have grown somewhat haphazardly (e.g. varied model source formats, export formats and naming conventions) although it looks like there's some attention being paid to tidying it up currently.
There are two categories of models, split between the production_parts and products sub-directories.
Most individual part models (associated with the SF Eagle libraries) are found in production_parts although some (which are also sold as products) are found in products.

In order to determine part/model coverage and how many .stl models needed to be generated I wrote a couple of file/directory scanners.
Summary of production_parts scan (via ./scan_model_repo.py ../sparkfun-github/3D_Models/production_parts/):
    Components found: 237
    Valid components: 109
    No sketchup file: 16
         No STL file: 112

A "valid component" in this sense is one for which both a SketchUp source file and exported .stl file exist. These component models should be able to be included in our standard library directly.
"No sketchup file" means that an .stl file exists but no SketchUp source file was found (often this occurs when the exported file doesn't follow the naming convention of the source file).
And the "No STL file" category are the models for which we need to generate STL files.
There were also additional cases where neither .stl nor .skp files existed which seems to occur where another design package was used (e.g. SolidWorks?).
Further analysis of products needs to occur as most models will not be relevant for us as they are not individual components. But it does seem to include EagleUp and Blender-exported .json files (exported via) which might be helpful for determining which models would be useful).

With the information from the model scanner it's possible to determine how much model coverage there is of the SparkFun Eagle libraries (via ./scan_library_repo.py ../sparkfun-github/SparkFun-Eagle-Libraries/):
Total libraries found: 20
 Total packages found: 1579

(Note that the package total includes duplicates due to the "same" part (in name, at least) appearing in multiple libraries.)
For a clearer view of the model coverage it's helpful to look at the individual libraries (this is a count of models found (in either .skp or .stl format) versus the number of packages found in the library):
    GeekAmmo 3 / 18
    LilyPad-Wearables 1 / 25
    SparkFun-Aesthetics 0 / 91
    SparkFun-AnalogIC 12 / 38
    SparkFun-Boards 1 / 63
    SparkFun-Capacitors 16 / 88
    SparkFun-Connectors 32 / 388
    SparkFun-DigitalIC 32 / 120
    SparkFun-DiscreteSemi 16 / 47
    SparkFun-Displays 1 / 24
    SparkFun-Electromechanical 12 / 151
    SparkFun-FreqCtrl 4 / 26
    SparkFun-LED 10 / 31
    SparkFun-Passives 16 / 102
    SparkFun-PowerIC 16 / 73
    SparkFun-RF 8 / 93
    SparkFun-Resistors 7 / 28
    SparkFun-Retired 7 / 45
    SparkFun-Sensors 21 / 119
    User-Submitted 4 / 9

Note that some packages (e.g. ones in SparkFun-Aesthetics ) don't need models because they're board features (e.g. logos, solder jumpers) rather than components.
In other cases package names have an suffix (e.g. -KIT) which suggests it's a different footprint but doesn't require a different component model. If so, then the alternate name can be mapped to the existing model.
It doesn't appear at first glance that there is very high model coverage in most cases, although manual mapping of alternate names would presumably help.
(If desired I can attach the output with the complete per-package model coverage.)

The third scanner uses the component model information to determine coverage for specific board designs (via ./scan_board_files.py ../omniblox.github.com/Eagle-Loader/examples/brd-files/):
    feather (2/19)
    adafruit_flora_mainboard_2 (1/22)
    gemma (1/14)
    neopixel_ring_12 (0/5)
    trinket (2/14)
    photon (1/9)
    picobuck (4/13)
    sparkfun_redstick (15/24)
    sparkpunk (0/20)
    SparkFun_ESP8266_Thing_v10 (16/35)
    thing (16/35)

Additional details show that in most cases the "missing" models for SparkFun boards tend to be for packages that don't actually require a model.
Summary
This initial analysis seems to confirm the value of providing a standard library with mappings because otherwise the amount of effort required to get useful results is non-trivial (especially given there are many additional sources of models (which vary in quality and comprehensiveness)). Although there are potential concerns around comprehensiveness vs load times which may need to be alleviated.
With these tools and this analysis we can now track progress as we automate the generation of models and create the mappings.

Pushed commits with missing batch generated STL files:

3f88e3ebbd986b622fb2c461d83b236b955a3713 -- Majority of the files, which appear correct.
8569e0905ea318bd981e2043a2b356a4202bce8c -- Single file, possibly upside down.
dfaa5bd86a8a5358d1b28ad9d3985b4871a27d2d -- Faulty exports, missing faces. Need model edits.

These were generated by automating SketchUp and then baby-sitting the automation. Baby-sitting was required because the exporting seem to fail non-deterministically with either segfaults or Ruby errors. Eventually re-running the automation enough times generated all the files. (This was using SketchUp 2015.)

We might want to transfer the branch/fork from my account to Omniblox if we're going to offer to push the generated models back to SparkFun.

Script used to automate the generation of the STL files: https://github.com/Omniblox/pcb-component-models/blob/master/tools/generate_missing_stl.rb
(So we can use it again if we decide we want to use a different model format.)

With generated STL files in place (via ./scan_model_repo.py ../sparkfun-github/3D_Models/production_parts/):
    Components found: 237
    Valid components: 219
    No sketchup file: 16
         No STL file: 2

The 2 "No STL file" items are due to difference in handling of case insensitive file systems.
Thus 110 more valid components. Note that due to duplicate names this is fewer than the number of generated component models.

when you want to work in the main repo - flick me a pull request from your fork. after that then branch the main repo

These are currently located here: https://github.com/Omniblox/pcb-component-models

Current status:

Offered to create PR to merge models into original repo: https://github.com/sparkfun/3D_Models/issues/178#issuecomment-273659898.
Can close this ticket after that.

PR created: https://github.com/sparkfun/3D_Models/pull/238


Switch to the new contract of provinding plutono dashboards

How to categorize this PR?

/area monitoring
/kind enhancement
What this PR does / why we need it:
https://github.com/gardener/gardener/pull/9624 introduces a new contract for providing plutono dashboards from extensions. The old contract is scheduled to be dropped in v1.100.
Which issue(s) this PR fixes:
N/A
Special notes for your reviewer:
N/A
Release note:

The registry-cache extension is now switched to the new contract of providing plutono dashboards (see [this document](https://github.com/gardener/gardener/blob/master/docs/extensions/logging-and-monitoring.md#plutono-dashboards)).

Can we proceed with this PR?

@dimitar-kostadinov , can you lgtm?

/lgtm


Charges higher than total gifts

For the past three weeks our charges have been about a thousand dollars higher than total gifts.

The timing of #2914 suggests that it may be part of this.

I don't see anything wrong, guess it's just a lot of new people who are being upcharged $10 the first time round.
The trend is very clear though, which makes me doubt whether I've missed something. Since 2012-11-29, these are the only paydays in which charge_volume has exceeded transfer_volume.
I'd like @Changaco to review this before we close.

We're not actually charging more, charge_volume has simply been thrown off by #3011.


Implement posting to alternative server. Allow connecting to server via HTTPS.

Recently there's been a noticeable migration of LiveJournal users to Dreamwidth.org. Dreamwidth supports the same API as Livejournal. This change allows to log into and post to an alternative server that supports this API. It also allows communication via HTTPS if the server url is declared with https schema. Example:
dreamwidth = LiveJournal::Server.new("Dreamwidth", "https://www.dreamwidth.org")
user = LiveJournal::User.new('test', 'test', dreamwidth)
login = LiveJournal::Request::Login.new(user)
login.run

Where's the default, e.g. 'www.livejournal.com' specified?

It's already there
https://github.com/romanbsd/livejournal/blob/master/lib/livejournal/basic.rb#L35
Existing code already has functionality to define a server and user registered on this server, but this information was not actually used when sending requests.

Actually I do not like my code. I am going to redo it.

Fixed some issues and rebased.


Can the generated .gitignore files get a clear copyright header?

It is unclear now under what license the .gitignore files can be copied and used.
#155 and #229 already brought it up. But the vague pointing to a LICENSE.md that doesn't even contain the copyright holder doesn't really clear it up. And the mention of "business requirements" in issues like #502 doesn't make the issue any better.
Just a header like https://reuse.software/tutorial/#insignificant-files that shows that the entity that produced the template puts the template in the public domain (or clearly reusable under a different permissive license) would be enough.

This repository (toptal/gitignore.io) and the .gitignore Templates Repository (toptal/gitignore) are all licensed under the MIT License. Maybe attach it on our own is a walkaround?

But the source material is CC0: https://github.com/github/gitignore/blob/master/LICENSE
So if all that gitignore.io does is spit out those snippets, then prepending the # Created by https://www.toptal.c... bit with
# SPDX-FileCopyrightText: 2021 Toptal, LLC
#
# SPDX-License-Identifier: CC0-1.0

would be the clearest. It will declare that any additions that Toptal might have made to the CC0 licensed material by GitHub, Inc are also deemed CC0.
Licensing the templates under MIT could raise questions on whether that license requires any software project that uses the .gitignore template to reproduce the Copyright notice in their output.
To be clear I am just talking about the templates and the output the gitignore.io tool generates. All code of the tool itself can of course remain MIT.

Hello @CharString. Thank you for this suggestion!
I am going to bring this request to a team's attention. We will investigate and set priority for it.

But the source material is CC0.

@toptal is currently using toptal/gitignore to power the website instead of github/gitignore. It was migrated since 2017-11-07.
Because toptal/gitignore has no "fork relationships" with github/gitignore (I can't find @toptal's repository in Insights -> Forks tab), I can't sure if @toptal's repository is a "duplicate without fork" of @github's.
@github's repository DOES use CC0 License, but @toptal's uses MIT License instead. It's still arguable for the license ...
Could @deniskaber explain this, please?

@Dragon1573 Well, not entirely... It looks like a mixture of CC0 and merged contributions
https://github.com/toptal/gitignore/blob/master/.github/scripts/sync-github.sh

@CharString, With your instructions, I find a GitHub Workflow configuration file in toptal/gitignore.
I've searched several informations about the CC0 License. Some of them said that the CC0 License is very similar to the Unlicense. I have heard about the infectivity of GPL License Series, but I haven't heard about that of CC0. So, MAYBE using the MIT License instead of using CC0 License is acceptable?

CC0 isn't copyleft like GPL, so adaptations aren't required to be released under CC0... But... the source material under CC0 does constitute "prior art", at least in view of most patent systems. I'm not a lawyer, I don't know what it means for copyright.
My layman view, is that CC0 boils down to that we can regard is as, say, Shakespear's Hamlet. We can freely use it as it lies in the public domain. Taking a copy of Hamlet and slapping your own copyright notice in front, that only makes sense if you edit Hamlet and make significant adaptations.
My point with MIT is that it has this lline

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

I doubt that we will want to require any software that uses a .gitignore for the gitignore.io service to be able to produce said notice. And it's even unclear whether that's actually required. CC0 doesn't have that requirement.
Bottom line is in that "unclear". As it is, just from the output from gitignore.io it is not clear under what terms people can use the output. And come to think of it, it isn't clear under what license the contributions from others that @joeblau has pulled in on top of the CC0 material from Github Inc can be used.  Am I required to git blame and contact all copyright holders? Using gitignore.io is supposed to safe me time, not add another legal chore.
The reuse spec tries to make it easy to be clear about how any file from your project may be reused. It's a great read to get familiar with the problem.

Hello, we just merged an explicit license information about generated files in the project readme file (being under CC0). I believe that fixes this issue.

Not a  SPDX header.. but definitely good enough for me. I can add the header myself. At least it is clear now I can do so!
Thanks very much.