Git discard changes permanantly deletes files on Linux

Steps to Reproduce:

add new files to a folder/repo
undo the pending changes, the newly added files will be permanently deleted from the system

Reproduces without extensions: Yes
I don't know why undo/discarding pending changes using the source control built in to VS Code would permanently delete files on linux as opposed to moving them to the trash bin. Lost a few hundred files thanks to this (though I have a backup as of 6 days ago so I'm not at a complete loss).

I'm sorry you lost your changes.
This feature does work as designed, though. It's what git does. That's why we have the dialog showing up, asking if you are sure. That's why This is IRREVERSIBLE is written in ALL-CAPS.


Spec for obmd integration

This is a proposal for the HIL side of the work being discussed in #417. @okrieg, thanks for the input re: resource management.
//cc @naved001, @Izhmash

Quoting Naved Ansari (2017-11-29 13:39:23)

1. If we have only one obmd server. Then would admins register the
   node's ipmi details directly using obmd, and then in HIL they
   register only the obmd node label? I am assuming HIL would know
   from the config file wherever the obmd is running?

Yeah, this is exactly what I intended. I tweaked the wording to make it
more explicit.

2. Just spitballing here: if we want to support multiple obmd servers,
   then maybe we could think of obmd servers as switches in HIL. We
   register an obmd server with it's address and admin token. Nodes'
   ipmi details will be fed into the obmd and then our nodes become
   "ports" on the obmd server.

This might not be a bad idea. My initial plan was to just have the full
URL to a node & the admin token be part of node_register, so HIL isn't
even really aware of whether two nodes are managed by the same obmd.
This is nice in some regards, because there's less coupling, but you're
also duplicating information.

3. How will end users interact with obmd? Will we be changing all of
   HIL's ipmi related APIs (power cycle, power off etc)?

Per the summary: "All other obm related calls will be changed to simply
proxy the corresponding calls on obmd.
So e.g. power_cycle would just check the authorization requirements and
then make a power_cycle call to obmd. Note that except for the console
stuff, obmd's api is a copy of HIL's, so except for the bit about obms
possibly being disabled, only the console API changes -- from the user's
perspective, the rest of the API is the same.

4. Database: Will the obmd have it's own database? or will it talk to
   the same database that HIL uses (different table perhaps?)

It has its own database. Right now it's hard-coded as SQLite, but it
would be trivial to add e.g. postgres support, which probably makes
sense. In that case, we could still use the same database server, just
using different database.
If you have thoughts on how to clarify the descriptions, let me know.

@naved001, tangentially, could you test the refactor branch of obmd against an actual server? I think it should solve the race conditions we were seeing before.

Ack, hold off on that, unrelated bug that needs working out.

@naved001, ok, bug fixed and the stuff has been pushed to master. Please test.

cool, will test it tomorrow.

Quoting Ian Ballou (2017-12-01 14:56:34)

Why are you replacing the token during enable_obm rather than telling
the user that the obm is already enabled? Would there be a case when a
token could be invalidated and need replacing?

obmd doesn't persist tokens to disk, so if it crashes they're gone. More
generally, having it be idempotent means a user doesn't really need to
keep track of what state it's in, they can just call enable/disable if
they're not sure.

ok, bug fixed and the stuff has been pushed to master. Please test.

I've been busy setting up some infra stuff; will test it soon and will leave a more careful review on this one.

Ok, thanks for keeping me in the loop.

@zenhack What I described earlier is still there.
Here's something that might be helpful about SOL. I have tested this on cisco nodes in kaizen cluster.

To cleanly terminate an SOL session send it the terminate sequence described here which is ~. by default.

Since users can't send keystrokes to the console, the code can handle it when users ^C it? This will cleanly kill the session and we won't have dangling sol sessions causing trouble.

Didn't test the other calls (power_off, cycle) those are commented out in your code. Any reason?

Also, @knikolla thinks it would be worth meeting in person to discuss the OBM dameon and the fact that a core HIL component is being written in Go. Do you think you could send out a calendar invite to @okrieg and/or @pjd-nu to see if we could all meet and discuss this? Thanks!

Other than that, I am mostly fine with the specs proposed here.
One question, not that important though; we have a a dry run mode when we don't want to make actual calls to ipmi, how would this work here? Do we still call the obmd and not ipmitool, or don't call obmd at all. (We could, of course, just use the dummy driver)

Also, one more thing. Is there a reason why can the driver not turn on SOL if it's disabled? It's only a one time thing and I guess HIL admins could do it.
ipmitool sol set enabled true

I'll try swapping out the call to disable with injecting those characters. If that doesn't work it might make sense to sit down together and debug it in person; the latency is killing us here.
Re: the other calls, the only reason they're commented out is that I hadn't gotten around to tweaking them to fit back into the refactored (drivertized) version, but doing so will be trivial, and I should just go ahead and do it.
Re: dry run, my instinct is to just not talk to OBMd, but I don't feel strongly.
Re: The language issue. Frankly, I'm really annoyed at this being brought up SIX MONTHS after I wrote the prototype and solicited feedback. I @-mentioned @knikolla (and others) at least 3 times, and he just didn't respond. It is not reasonable to just ignore requests for feedback and then bring up a concern like this this late into the process. Also, @knikolla has his own Github account; why is the message coming through you?
We can have that discussion, but I also want to talk about some of the flaws in our development process, because this is really not acceptable.

why is the message coming through you?

Well, he was around me when I was typing that out. @knikolla can you address the rest of the comments?


Textual changes.

Following changes are pending:
-Bitcoin not Bitcoins

purchases of BTC > “BTC purchases”
(It should be for both wyre and Ramp account)

-purchases of BTC > “BTC purchases”
[This text change must also be for the ramp account.]

-This can be verified in 1.5.0(255) build.

-Verified this issue on dev app v1.5.0(256)


Missing border on 2nd featured card image

http://jdrf.github.io/design-system/dist/components.html#cards
There's a 1px border around the image in the 2nd featured card image in the designs. We'll need to implement it into the DS.

@fuhton PR submitted:
https://github.com/JDRF/design-system/pull/103

Merged and confirmed.


Does this project concern with higher level abstractions for keyboard?

I am making a device to get some words from Lorem Ipsum... and send it to the PC
Circuit python hid has this write(string: str, delay: float = None) → None
Does this library concern with this or is it out of scope.

Hi, there isn't a high level method for doing this in the library at the moment. You could either write your own code that could use this library to send the individual characters or you could extend one of the managed keyboards to add this functionality.

Thanks just needed clarification, will add code once I am done, might help someone out.


Error in contributor.js file

This is Rohit Purkait. And I will be adding my data to do my first contribution as well as get a card on the website.
Array duplicated due to merge issue on contributors.js file in line 869.

Closing this as this issue is resolved. @codeswithroh


(FACT-1516) Update beaker and tests for MacOS Sierra

Update the beaker version and one facter test to prepare for MacOS Sierra support in the pipelines.

:+1: Nice and simple. Just waiting for tests

Verified that this is the correct kernel version for 10.12 👍


Is undefinedhtml used?

https://github.com/jlord/git-it-electron/blob/7e4d04136e9c17999d0fa19c96cc615d0359dbee/challenges/undefinedhtml
At least it looks strange. :smile:

Yeah, it's not used. I saw it and ignored it in the sprint last night :sleeping:


Added login auth support and HTML email support, enabled annotations, subject templating

Closes #18
Closes #20
Also adds support for managing the subject via a template.

Any chance we can get this merged and released?
I'm really looking to get auth support configured so I can have a working email handler.
Thanks for your work @nixwiz!

I'm at the mercy of the Sensu staff here @aphix.  My original pull request sat untouched for months only to be more or less bulldozed by other changes.  I had to refactor my updates and resubmit and here we sit again, waiting.
Maybe @nikkiki can provide some insight as to why.

Hey @nixwiz! Sorry for dropping the ball on your PR (again) 😓 These changes look great and I do not believe they conflict with other work nor plans.
@nikkiki WDYT?

@nixwiz I assume login is working for you?

@portertech actually, @aphix had tested the changes on my prior PR.

@nikkiki I made some changes regarding loginauth vs. loginAuth to avoid some confusion between the argument and the type that is defined.

@nixwiz @nikkiki To be clear, I haven't tested the changes yet, but will attempt to build this branch now and give it a shot-
Thanks for making headway on this one =)

Thanks for volunteering to test @aphix! It's more helpful than you know 😄

@nikkiki @nixwiz Confirmed working on Win 7, testing now in Ubuntu-
Note that I'll not be able to regression test the non-loginAuth path that existed previously (hence why I'm rooting for this PR).
Sorry for the delay, I'm no gopher so there was a bit of env setup/learning required-

Following up to say it's confirmed working in Ubuntu -- however in both cases, the included event.json failed to work without adding a timestamp property at the root.
It does appear to be working when given a sensu-go check output containing only the spec portion of the event (when viewing an event via sensuctl event list --format=wrapped-json).
I'm having some timeout issues currently using it in a real server (rather than manually triggering with a manufactured event), but I think that's likely network ACLs/firewall rules at this point. Will follow-up when I get more info.

@nikkiki @nixwiz
Some more digging... I've rebuilt from source on a machine that currently works via a very old version of sensu (0.26) to send emails using login auth with an old mailer (sudo sensu-install -p mailer:1.0.0), and I'm still getting timeouts.
This tells me that it's likely not an ACL/firewall rule, unless I'm drastically misunderstanding something.
It does immediately exit if I enter an invalid hostname, so I gather it's passing that portion.
Is there any way to debug main.go to get a stack trace from the point where it hangs and eventually times out?
Other details that might help:
The 2 systems that hang are: Ubuntu 18.04.2 LTS, Ubuntu 14.04.5 LTS <- old mailer works
The 2 systems that seem fine: Ubuntu 16.04.5 LTS, Win 7
All systems have used a freshly-built copy using version: go version go1.12.7 linux/amd64
Lastly, I'm attaching a small shell script which documents the build process, and if you have golang + git installed, you should be able to update the from/to/host/password variables at the top and run it to build and test the plugin (it includes the sample event updated to include a timestamp).
Hope it helps,
Aphix
P.S. I'll likely complete the testing on Monday, as I'll be heading out for the day.

buildAndTestEmailHandler.sh
#!/bin/bash
set -e
<EMAIL_ADDRESS><EMAIL_ADDRESS>_emailHost='email.differentDomainThanFromDomain.com'
_password='some password'
_sampleEventWithTimestamp='{"entity": {"entity_class": "agent","system": {"hostname": "webserver01","os": "linux","platform": "centos","platform_family": "rhel","platform_version": "7.4.1708","network": {"interfaces": [{"name": "lo","addresses": ["<IP_ADDRESS>/8","::1/128"]},{"name": "enp0s3","mac": "08:00:27:11:ad:d2","addresses": ["<IP_ADDRESS>/24","fe80::26a5:54ec:cf0d:9704/64"]},{"name": "enp0s8","mac": "08:00:27:bc:be:60","addresses": ["<IP_ADDRESS>/24","fe80::a00:27ff:febc:be60/64"]}]},"arch": "amd64"},"subscriptions": ["testing","entity:webserver01"],"last_seen":<PHONE_NUMBER>,"deregister": false,"deregistration": {},"user": "agent","redact": ["password","passwd","pass","api_key","api_token","access_key","secret_key","private_key","secret"],"metadata": {"name": "webserver01","namespace": "default","labels": null,"annotations": null}},"check": {"check_hooks": null,"duration": 1.903135228,"executed":<PHONE_NUMBER>,"high_flap_threshold": 0,"history": [{"executed":<PHONE_NUMBER>},{"executed":<PHONE_NUMBER>}],"command": "http_check.sh http://localhost:80","handlers": ["slack"],"high_flap_threshold": 0,"interval": 20,"low_flap_threshold": 0,"publish": true,"runtime_assets": [],"subscriptions": ["testing"],"proxy_entity_name": "","check_hooks": null,"stdin": false,"ttl": 0,"timeout": 0,"duration": 0.010849143,"executed":<PHONE_NUMBER>,"history": [{"status": 1,"executed":<PHONE_NUMBER>}],"issued":<PHONE_NUMBER>,"output": "example output","state": "failing","status": 1,"total_state_change": 0,"last_ok": 0,"occurrences": 1,"occurrences_watermark": 1,"output_metric_format": "","output_metric_handlers": [],"env_vars": null,"metadata": {"name": "check-nginx","namespace": "default","labels": null,"annotations": null}},"timestamp": 12345}'
go get github.com/nixwiz/sensu-email-handler
cd "$GOPATH/src/github.com/nixwiz/sensu-email-handler"
git checkout 55b6140624fe22dea05f067913a2bd99466757ac # Should match latest ref in here: https://github.com/sensu/sensu-email-handler/pull/23
go build -o sensu-email-handler main.go
echo "${_sampleEventWithTimestamp}" | ./sensu-email-handler
-l
-f "${_fromEmail}"
-t "${_toEmail}"
-s "${_emailHost}"
-u "${_fromEmail}"
-p "${_password}"
-H
echo "Now go check the inbox for: ${_toEmail}"

@aphix thanks for your working in testing this.  I'm not sure I currently have access to an email provider that would require this authentication type, but I'll do some checking over the weekend and see what I can come up with.

@cimere, you originally opened the issue for this (and tested my changes).  I have had to resubmit my changes.  Can you test again?  I have a 64 bit Linux binary already compiled for you to test if you'd prefer not to bother with attempting to compile for yourself.

My email hosting provider actually does support the AUTH LOGIN method, so I was able to test this and it works for me.
cat event.json | ./sensu-email-handler -l -s smtpout.secureserver.net -P 80 -t<EMAIL_ADDRESS>-f<EMAIL_ADDRESS>

Thanks for all the work! Any ETA on getting this versioned and released in Bonsai, or at least via GitHub releases?

@aphix that's a question for @nikkiki

@aphix @nixwiz Release 0.2.0 😄

@nikkiki thanks for that...but it doesn't seem to have refreshed in bonsai for some reason.

@nixwiz there's apparently some lag with when bonsai fetches from github maybe? It's up there now! https://bonsai.sensu.io/assets/sensu/sensu-email-handler


Produce better error messages if tests are run without sh, bash, or dash.

Currently, if sh, bash, or dash are not available, the integration tests throw a ton of unhelpful error messages.
It would be nice to instead print something like dash is not available, please install it.

The integration tests exclusively use bash now, which is so common that this is probably unnecessary.


Read from Firestore to display polls on Dashboard

Expected Behavior
The website should display poll information by fetching data from Firestore.
Current Behavior
The current code is not connected to Firestore backend hence the polls aren't shown on the Dashboard.

@aceta-minophen I would like to work on this!

@MahendraDani sure, go ahead.

@aceta-minophen
I am sorry mam, I am incapable for solving this issue.
Please assign it other contributors.
I will try to work on some other issues.
I am extremely sorry!
Thanks for cooperation and support.

completed by #144


Whether it is set or not set the main .sp, linter becomes don't work.

inc file , spcomp.exe , and all the other setting are checked much time and linter still not work.
Highlight is ok , refrence is ok , every thing is ok , just linter goes on strike.
I have use this ext for about two years , and it works very well until yesterday . I try to re-install but it does noting.
I can't find some error code so i think it should not be post as a bug , but i need some help actually.
I only use this sourcepawn ext , no other sp ext are installed.

sm version is 1.11-6911
ext version is 4.2.0

ok, return to 4.1.4, linter becomes ok.
may be there is some problem about new version?

Hi, to see error messages, can you go in Help>Toggle Dev tools>Console and paste the output?
Thanks!

When i open the ext Introduction page，console show this thing
" Refused to apply inline style because it violates the following Content Security Policy directive: "style-src 'nonce-855c0883-2af6-478c-b3f3-063ed669e781'". Either the 'unsafe-inline' keyword, a hash ('sha256-Mh8dqtZwN7OqnhEHGiDB2Yii1wlmffzu8+5kWLiwAKE='), or a nonce ('nonce-...') is required to enable inline execution. Note that hashes do not apply to event handlers, style attributes and javascript: navigations unless the 'unsafe-hashes' keyword is present. "
When i open a .sp file , console show that
" ERR Illegal argument, contents must be defined: Error: Illegal argument, contents must be defined
at new ae (g:\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:78:99276)
at new ae (g:\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:78:86640)
at Object.provideHover (c:\Users\lin.vscode\extensions\codeinchinese.englishchinesedictionary-1.1.0\out\src\extension.js:47:24)
at d.provideHover (g:\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:87:40587)
at g:\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:87:70391
at ee._withAdapter (g:\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:87:67201)
at ee.$provideHover (g:\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:87:70367)
at i._doInvokeHandler (g:\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:95:13689)
at i._invokeHandler (g:\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:95:13371)
at i._receiveRequest (g:\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:95:12090)
at i._receiveOneMessage (g:\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:95:10843)
at g:\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:95:8950
at b.invoke (g:\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:61:145)
at p.deliver (g:\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:61:2266)
at v.fire (g:\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:61:1844)
at a.fire (g:\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:69:19042)
at g:\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:111:17079
at b.invoke (g:\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:61:145)
at p.deliver (g:\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:61:2266)
at v.fire (g:\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:61:1844)
at a.fire (g:\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:69:19042)
at r._receiveMessage (g:\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:69:23854)
at g:\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:69:21224
at b.invoke (g:\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:61:145)
at p.deliver (g:\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:61:2266)
at v.fire (g:\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:61:1844)
at v.acceptChunk (g:\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:69:15873)
at g:\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:69:15003
at Socket.d (g:\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:69:26763)
at Socket.emit (node:events:526:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Readable.push (node:internal/streams/readable:228:10)
at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)  "
which didn't happen in 4.0.14 version.
I am a novice of github , and i hope this can help you .

Thanks for the response!
(c:\Users\lin.vscode\extensions\codeinchinese.englishchinesedictionary-1.1.0\out\src\extension.js:47:24)
Try to disable the English Chinese Dictionary extension.

Thanks , linter works well as usual .
A very nice ext .


[Feature Request] export other model document

Is your feature request related to a problem? Please describe.
I am trying to migrate other LLM models using AI hub, but I did not find a document explaining how to migrate the model.
I found out after testing llama2. It seems that the quantized encoding file of the model is downloaded, not obtained through some code. I understand that if I fine-tune llama2, my model may not work with these quantized files.

Hi @shifeiwen great question.
We are aware of this issue and already working on generic quantization recipes to share with our developer community.
We intentionally released model in staging to unblock existing developers to enter with pre-computed encodings.
Existing encodings should work with fine-tuned model with reduced accuracy at this moment. You can surely give it a try.
We are actively working on developing work-flow that allows developer to bring and quantize their fine-tuned model.
Please stay connected on github and slack community for latest updates once it's released


Angular2 services and DTOs in one file

Thanks for this style guide. It's great.
I was looking at this service:
https://github.com/johnpapa/angular2-tour-of-heroes/blob/master/app/hero.service.ts
Do you not think it would be better to split the DTOs and the service? I know this saves a line in a component when using the service. Maybe the recommended approach could be defined here.
Greetings and thanks for the style guide Damien

this is an interesting question and one i can see pros and cons for on both sides.
1 file per thing? ... very clear, but lots of imports (but we use barrels)
1 file for all models? ... easier ... but yuk
1 file for the model for a service? ... not so great as most services will use many models
so i lean to 1 file per thing
thoughts?

I would definitely vote for 1 file per thing, one for the interface and another one the services that provide to that interface.

there is also a consideration for file that only contain interfaces, as they generate emptiness.

I would also prefer 1 file per thing, maybe then the model DTOs inside a models folder.

   a.component
   b.component
   cService
   dService

     DTOa
     DTOa1
     DTOb
     DTOc
     ...
What do you think?
Greetings Damien

Angular 2 issues will now go to the A2 style guide in the angular.io repo


Way to construct and print an URL

Checklist

[x] I've searched for similar feature requests.

Enhancement request
A way to construct and print an URL for use elsewhere, especially URL-encoding of GET parameters.
E.g. http --print-url https://example.com/ foo==bar boop=="escape me please!" and receive https://example.com/?foo=bar&boop=escape+me+please%21
Problem it solves
I'm working on a shell script which demonstrates how to do OAuth 2, and I need a way to open the authorization endpoint with the correct GET parameters in a browser, and would thus like to have URL encoding of the various parameters. Manually escaping e.g. &scope=this+that is no fun to do in bash :)
The script in question uses HTTPie for everything else so reusing the syntax would be convenient.

@Zash Could you assign this issue to me? I am a beginner and this issue seems like a good first contribution.

@avnogy are you still working on this? Otherwise I'd like to give it a try.

@Zash If you're still working on your tutorial, you could achieve this easily just using --offline and string manipulation in your shell. Here are two examples to get the the URL encoded path using HTTPie:
PowerShell
(http https://example.com/ foo==bar boop=="escape me please!" --offline | Select-String -Pattern '^GET\s(.+)\sHTTP/\d\.\d$').Matches[0].Groups[1].Value

Bash
http --offline https://example.com/ foo==bar boop=="escape me please" | grep --extended-regexp 'GET\s.+\sHTTP' | sed 's/GET //' | sed -E 's/ HTTP.+//'

Then just concatenate it back with the domain however you'd like. I know it's not as pretty as just --print-url, but to me it seems like that may be out of scope (I'm not a contributor here, but that's just my gut feeling). I wonder if it could maybe be written as a plugin.

Thanks, wasn't aware of --offline. Still, it'd be awfully convenient to be able to build and print the full URL.
This is not a tutorial, I'm not sure it is even readable. Instead I sorta gave up and made a plugin for httpie.

LOL sorry, dunno where I read tutorial initially. Just re-read the post.
Plugin looks neat!


Add Snyk Badge to Display Vulnerability Status

By incorporating Snyk, your project benefits from automatic vulnerability scans, fixes, and pull requests, ensuring a higher level of security and stability. The Snyk GitHub badge prominently displays the vulnerability state of the latest commit on the default branch, providing immediate visibility into the project's security health. This proactive approach not only helps maintain code quality but also reassures contributors and users about the project's commitment to security best practices.
Author: @abubakaristiak

I sincerely appreciate your helpful information. It's quite beneficial.
@rubypoddar


This document can create incidents!

"Enable Password Hash Synchronization" picture in the document is for changing the Sign on Method, can create incidents if used by technicians who wants to Enable PHS and does not read the whole document.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: c900f942-4456-5238-9f4c-a7a5bd685c04
Version Independent ID: a5d7d971-765f-0977-f531-232ea5924121
Content: Implement password hash synchronization with Azure AD Connect sync
Content Source: articles/active-directory/hybrid/how-to-connect-password-hash-synchronization.md
Service: active-directory
Sub-service: hybrid
GitHub Login: @billmath
Microsoft Alias: billmath

@hakboga1 , Thanks for raising the issue. We will investigate and update you.

@hakboga1 Thank you for raising this.  I have created a work item to investigate this.  Thanks!
#please-close


Linked to an example "from scratch" implementation

@gaearon contacted me about adding a link my article on implementing react from scratch.  Let me know if anything needs to be changed.

@paradoxinversion Can you please amend the article to include major versions explicitly when installing? This way your guide won't break when there's a new version of Babel etc.

@gaearon totally, I'll be able to make those edits within couple of hours. I also don't have any problems with keeping the article up-to-date in the future.

ok great!

The article now targets specific versions when instructing folks to download packages: ie.npm install --save-dev<EMAIL_ADDRESS><EMAIL_ADDRESS>..., and I've noted my node version in the first paragraph.


Python: Stepwise planner not calling the plugins

Describe the bug
Similarily to issue #5913, I need to write an application with a StepwisePlanner. It did not work with my plugins, did not seem to call them. I tried to replace the StepwisePlanner  with a SequentialPlanner, it started working. For my sanity check, I created a script with StepwisePlanner and the MathPlugin as shown below:
from semantic_kernel import Kernel
from semantic_kernel.connectors.ai.open_ai import AzureChatCompletion
from semantic_kernel.utils.settings import azure_openai_settings_from_dot_env

import asyncio
from semantic_kernel.core_plugins import MathPlugin
from semantic_kernel.planners import StepwisePlanner, StepwisePlannerConfig

async def main():
    kernel = Kernel()

    deployment, api_key, endpoint = azure_openai_settings_from_dot_env()
    service_id = "default"
    kernel.add_service(
        AzureChatCompletion(service_id=service_id, deployment_name=deployment, endpoint=endpoint, api_key=api_key),
    )
    kernel.add_plugin(MathPlugin(), "math")

    planner = StepwisePlanner(kernel, StepwisePlannerConfig(max_iterations=10, min_iteration_time_ms=1000))
    ask = """How much is two plus four, then minus three?"""

    plan = planner.create_plan(goal=ask)
    result = await plan.invoke(kernel)

    print(result)

if __name__ == "__main__":
    asyncio.run(main())

It will return the correct answer (3), but not because it called the plugins. I modified the piece of MathPlugin from:
 def add_or_subtract(input: int, amount: int, add: bool) -> int:
        ...
        return input + amount if add else input - amount

to:
 def add_or_subtract(input: int, amount: int, add: bool) -> int:
        ...
        return input * amount if add else input / amount

And the answer from StepwisePlanner is still 3. However, if I replace the StepwisePlanner with SequentialPlanner, the answer changes to 2.67 (because it called the modified plugin).
In execute_plan(...) method from StepwisePlanner, the llm response's action string is as follows (which means it acknowledges the plugins):
[THOUGHT]
To solve this problem, I can use the math-Add function to add two and four, and then use the math-Subtract function to subtract three from the result.

[ACTION]
{
  "action": "math-Add",
  "action_variables": {
    "input": "2",
    "amount": "4"
  }

[OBSERVATION]
The result of the math-Add action is 6.

[ACTION]
{
  "action": "math-Subtract",
  "action_variables": {
    "input": "6",
    "amount": "3"
  }

[FINAL ANSWER]
The result of adding two and four, then subtracting three is 3.

As I said, I have a different set of plugins I am developing, but the problem is similar - no plugins are called, although they are mentioned in the response. There is always only one step performed by the planner, since it immediately enters the condition in parse_result(...) and returns the imagined result:
if final_answer_match:
            result.final_answer = final_answer_match.group(1).strip()
            return result

What am I doing wrong with the StepwisePlanner then?
To Reproduce
Steps to reproduce the behavior:

Put a breakpoint on the plugin that is supposed to be called (in this case in math_plugin.py).
Run a script using a StepwisePlanner and see if at any point any of the plugins is called.

Expected behavior
The StepwisePlanner should call the plugins.
Platform

OS: WSL 2 Ubuntu 22.04
IDE: VS Code
Language: Python
Source: pip package version 0.9.6b1

A couple of interesting observations:

The problem seems to be gone if in stepwise_planner.py in line 152 I hardcode:

action_text = str(llm_response).strip()
pos = action_text.rfind("[OBSERVATION]") # new
if pos != -1: # new
      action_text = action_text[:pos] # new
logger.debug(f"Response: {action_text}")

To the ask="How many seconds are there in two plus three minutes?" it answers 500, which is the answer from LLM, not from using my modified "incorrect" MathPlugin (where the plus function implements a multiplication, so it should be 2360).
To the ask="Lets assume we have two plus three. How many seconds are in as many minutes?" I get an error:

Error invoking action math-Multiply
I apologize, but it seems that the math-Multiply function is not available. Therefore, I am unable to provide the total number of seconds in as many minutes as the total of two plus three.

Which means it tries to perform add(2,3) (which exists) and multiply(result_from_add, 60) (which is not implemented). It is not good it assumed such a module exists.

Seems like only the FunctionCallingStepwisePlanner version will work in python  now (and that appears to be the direction this is moving according to https://github.com/microsoft/semantic-kernel/pull/5586).
API wise things seem pretty inconsistent (do you call kernel.invoke, planner.invoke, some you use await, some you don't) it seems in flux (hopefully converging)
Note: This code is not very well tested, just threw it together as I'm experimenting,  but works for me.
import asyncio
import os
import logging
import sys

import semantic_kernel as sk
from semantic_kernel.utils.settings import openai_settings_from_dot_env
from semantic_kernel.connectors.ai.open_ai import OpenAIChatCompletion
from semantic_kernel.functions.kernel_plugin import KernelPlugin
from semantic_kernel.planners import (
    FunctionCallingStepwisePlanner,
    FunctionCallingStepwisePlannerOptions,
)

logging.root.setLevel(logging.DEBUG)
handler = logging.StreamHandler(sys.stdout)
handler.setLevel(logging.DEBUG)
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
handler.setFormatter(formatter)
logging.root.addHandler(handler)

async def main():
    # Initialize the kernel
    kernel = sk.Kernel()

    api_key, org_id = openai_settings_from_dot_env()
    service_id = "oai_chat_gpt"
    kernel.add_service(
        OpenAIChatCompletion(service_id=service_id, ai_model_id="gpt-3.5-turbo-1106", api_key=api_key, org_id=org_id),
    )

    script_directory = os.path.dirname(__file__)
    plugins_directory = os.path.join(script_directory, "plugins")
    kernel.add_plugin(plugin=KernelPlugin.from_directory("MathPlugin", plugins_directory))
    kernel.add_plugin(plugin=KernelPlugin.from_directory("CalendarPlugin", plugins_directory))
    kernel.add_plugin(plugin=KernelPlugin.from_directory("MyMemoryPlugin", plugins_directory))

    options = FunctionCallingStepwisePlannerOptions(
        max_iterations=10, min_iteration_time_ms=2000, max_tokens=4000
    )

    planner = FunctionCallingStepwisePlanner(
        service_id=service_id, # was kernel
        options=options,
    )

    goal = """
    Today is Sunday 2024-04-28
    Your name is "Robsite Agent"
    My name is "Rob"
    All dates should be in ISO-8601 format

    What is on my calendar one week ago from today?
    """
    # Figure out how much I have if first, my investment of 2130.23 dollars increased by 23%, and then I spend $5 on a coffee

    # Execute the plan
    print(f"The goal: {goal}\n\n")
    result = await planner.invoke(kernel, goal)
    print(f"\n\n**** Plan results: {result.final_answer}")

# Run the main function
if __name__ == "__main__":
    asyncio.run(main())

@rcleveng Thanks! It's good to know there is this option to make a planner. However, it still did not solve my problem - in this example of add and subtract it never actually calls the plugins. Instead, as you can see below, it immediately makes an assumption on the output of "add" being 6, while inside my "add" implementation it should multiply the values. So something is still off, the LLM is too smart, and it happens with my more sophisticated plugins as well.
2024-04-29 09:31:30,882 - semantic_kernel.connectors.ai.open_ai.services.open_ai_chat_completion_base - INFO - Calling math-Add function with args: {"input": 2, "amount": 4}
2024-04-29 09:31:30,882 - semantic_kernel.connectors.ai.open_ai.services.open_ai_chat_completion_base - INFO - Calling math-Subtract function with args: {"input": 6, "amount": 3}

@emilia-szymanska Aha, this fixed running a plugin for me, but there' s still cases where it makes up a plugin to call.  Added the text into my prompt from here seems to have helped.
https://github.com/microsoft/semantic-kernel/issues/4447

@rcleveng Could you share a clean way of doing that? I see that in the FunctionCallingStepwisePlanner definition they either read it from generate_plan.yaml or get it from options. Did you modify the yaml file, copy paste the prompt from there before inputting it into the options, added it to the user prompt or somehow else managed to alter it?

I added the extra wording into the user prompt as I didn't see a place to set a system one. You could try adding more instructions to not need additional information and see if that helps.

@emilia-szymanska as @rcleveng mentioned, I would recommend moving away from the default StepwisePlanner and only use the FunctionCallingStepwisePlanner. We are going to deprecate some of the older planners (basic, action, and stepwise) in the near future before v1.
What AzureOpenAI deployment (model) are you using? In my testing, I've noticed more consitent behavior/function calling when using the OpenAIChatCompletion service versus the AzureChatCompletion service. I've filed an issue, previously, on the AzureOpenAI team because I noticed that certain prompts can cause the model to fail to provide accurate (or any) results. For example, a prompt didn't have a space after a punctuation and it was failing with a "harmful content" error. I know this isn't what you're seeing, but still wanted to mention.
I would recommend trying to utilize the FunctionCallingStepwisePlannerOption's callbacks to override the default plan/step prompts. These default files work for most basic cases, but we provide the callbacks so users can tailor the prompts to fit their applications.
Regarding your 429 error and the model using a plugin that doesn't exist. I have never come across this before. Are you able to provide some code so I can try and repro it on my end?

API wise things seem pretty inconsistent (do you call kernel.invoke, planner.invoke, some you use await, some you don't) it seems in flux (hopefully converging)

Hi @rcleveng, thanks for your feedback. Could you provide some more context around what feels inconsistent? Is this comment specifically towards the planner? or SK in general? Thank you.

@moonbox3

I see. In that case, please take into consideration that people still follow the example notebooks when learning about SK and there is no mention of FunctionCallingStepwisePlanner - adding it there soon would be very helpful for beginners like me.
I am using GPT 3.5 turbo 1106. Fortunately or not, I have to stick to Azure-related interfaces, but it's good to know there are some bugs, I will keep an eye for this.
I can provide you with the code that shows the problem with calling the non-existing plugin, but on the general example, since I cannot share my actual code:

from semantic_kernel import Kernel
from semantic_kernel.connectors.ai.open_ai import AzureChatCompletion
from semantic_kernel.utils.settings import azure_openai_settings_from_dot_env

import asyncio
from semantic_kernel.core_plugins import MathPlugin

from semantic_kernel.planners import (
    FunctionCallingStepwisePlanner,
    FunctionCallingStepwisePlannerOptions,
)

async def main():
    kernel = Kernel()

    deployment, api_key, endpoint = azure_openai_settings_from_dot_env()
    service_id = "default"
    kernel.add_service(
        AzureChatCompletion(
            service_id=service_id,
            deployment_name=deployment,
            endpoint=endpoint,
            api_key=api_key,
        ),
    )
    kernel.add_plugin(MathPlugin(), "math")

    options = FunctionCallingStepwisePlannerOptions(
        max_iterations=10, min_iteration_time_ms=2000, max_tokens=4000
    )
    planner = FunctionCallingStepwisePlanner(service_id=service_id, options=options)
    ask = "Lets assume we have two plus three. How many seconds are in as many minutes?"
    result = await planner.invoke(kernel, ask)
    print(f"\n\n**** Plan results: {result.final_answer}")

if __name__ == "__main__":
    asyncio.run(main())

When running it, I get the following error:
Error occurred while invoking function math-Multiply
Traceback (most recent call last):
  File "/home/bulbasaur/miniconda3/envs/habitat_sk/lib/python3.9/site-packages/semantic_kernel/connectors/ai/open_ai/services/open_ai_chat_completion_base.py", line 377, in _process_tool_calls
    func_result = await kernel.invoke(**tool_call.function.split_name_dict(), arguments=args_cloned)
  File "/home/bulbasaur/miniconda3/envs/habitat_sk/lib/python3.9/site-packages/semantic_kernel/kernel.py", line 251, in invoke
    function = self.get_function(plugin_name, function_name)
  File "/home/bulbasaur/miniconda3/envs/habitat_sk/lib/python3.9/site-packages/semantic_kernel/kernel.py", line 663, in get_function
    raise KernelFunctionNotFoundError(f"Function '{function_name}' not found in plugin '{plugin_name}'")
semantic_kernel.exceptions.kernel_exceptions.KernelFunctionNotFoundError: Function 'Multiply' not found in plugin 'math'
```
Makes sense that it wants to have a multiplication plugin, but instead of trying to invent its existence, it should just return "Sorry, I don't have the tools to multiply".

4. Regarding the 429 error: I believe I get it because the planner calls a plugin which generates lots of text and when it's passed to LLM, it consumes a lot of tokens. The problem is rather in the fact that the planner initially does not plan to call this plugin (and the initial plan looks good), but then it calls it - unfortunately I cannot share my code for that, and I do not know how to reproduce it. I guess with more plugins available for the planner it should happen. Maybe this solution with FunctionCallingStepwisePlannerOption's callbacks would somehow help. Would you be so kind to provide an example of usage?

@moonbox3 Thank you for the response!
I tried to replace the model, now I have gpt-4-1106. I ran the script a couple of times, and one time it seemed kinda okay (in a sense that it did not call the non existing plugin), but then the case with the irrelevant function call happened:
Step 1: Add two and three using the math-Add function to get the result.
Step 2: Multiply the result by 60 to convert minutes to seconds.
Step 3: Send the final answer using the UserInteraction-SendFinalAnswer function.
...
2024-05-06 09:14:58,777 - semantic_kernel.connectors.ai.open_ai.services.open_ai_chat_completion_base - INFO - Calling math-Add function with args: {"input": 2, "amount": 3}
2024-05-06 09:14:58,778 - semantic_kernel.connectors.ai.open_ai.services.open_ai_chat_completion_base - INFO - Calling math-Subtract function with args: {"input": 5, "amount": 1}
...
**** Plan results: The final answer is 4.

As you see, it did not plan to call the Subtract, yet it did and that is what also happened to me in the case in which I could not share my code - I'd rather it admitted that it cannot find the Multiply than used a wrong tool (from where it took the amount=1, this I do not see in the logs).


how can i get the pointcloud

Hi have you solved this problem？I want to get .npy files too.

Hi have you solved this problem？I want to get .npy files too.

No, I synthesized a single frame point cloud using depth maps and rgb images, but I didn't concatenate them together. I believe there must be a simpler method.


Usage of DateTime.UtcNow caused issues on IOS builds

Hey, thought I'd share since I spent an inordinate amount of time scratching my head over this one 😅
First wanted to say thanks for sharing this library! Riptide is absolutely fantastic.
So the heartbeat mechanism uses DateTime.UtcNow to check whether the timeout period has elapsed. I'm developing for cross-platform so it always behaved very nicely on my PC and Android devices, however when it came to IOS builds I ran into sporadic connection issues where players would lose their connections.
I'm not sure exactly how DateTime works on IOS devices, for my "Round timer" component I have to do (TimeSpawn.FromMinutes(3) - timeLeft) for IOS wheras using only timeLeft seems to be equivalent on PC and Android. Another unfortunate point of frustration when it comes to the apple developer experience.
I solved it by simply removing the heartbeat mechanic entirely and handling it on the application side. But might be useful to take a look at within the library.

First wanted to say thanks for sharing this library! Riptide is absolutely fantastic.

Glad you like it 🙂

for my "Round timer" component I have to do (TimeSpawn.FromMinutes(3) - timeLeft) for IOS wheras using only timeLeft seems to be equivalent on PC and Android.

Could you post some of your actual code (for iOS vs PC, including how you're calculating timeLeft)? Just based on what you've mentioned here, I can't even imagine what would have to be different/broken with DateTime for those to be equivalent...
I also did a quick google search but couldn't find anything related to strange DateTime behaviour on iOS devices 🤔

I solved it by simply removing the heartbeat mechanic entirely and handling it on the application side.

Keep in mind that Riptide's timeout system relies on heartbeats, so if you've removed heartbeats you may end up with connections "hanging" and not closing properly. For example, if the server shuts down and the disconnect message is lost in transmission (or the server crashes and just never has a chance to send said message), clients would normally time out after a few seconds because they've stopped receiving heartbeats. Obviously if you've removed heartbeats altogether, there will be no way for a server or client to tell if the other end has died, unless you've implemented an alternative time out system.
I'm not sure how involved it would be for you to revert your heartbeat removal change, but one thing you could try is increasing the server's & client's TimeoutTime (default is 5000 milliseconds). It wouldn't really be a proper solution, but whether or not doing so helps at all might provide some extra insight into what's going wrong.
At one point I was considering using a Stopwatch instead of DateTime to calculate the time since the last heartbeat, so I may have to revisit that if this does in fact turn out to be a problem with DateTime.

Could you post some of your actual code (for iOS vs PC, including how you're calculating timeLeft)?

Yessir sorry for being so ambiguous was a bit of a scatterbrain yesterday. Here's an example of some of my DateTime adventures with IOS,

When my server starts up a RoundEndTime is defined as DateTime.UtcNow + TimeSpan.FromSeconds(180)
When a client joins a game one of the variables the server sends over is the RoundEndTime. I assign it to a global GameNetworkManager.Instance.RoundEndTime
For my in-game "time left" UI panel component I update the text indicator in the following way every second: GameNetworkManager.Instance.RoundEndTime - DateTime.UtcNow

Let's say 10 seconds have passed in an active game, on PC and Android, I see the following text: "2:50" however on the iPad I have to test with I see "57:10". I'm working with a group and some of them have iPhones and according to the screenshots I've seen from them it's a bit hit and miss whether the timer is acting correctly. Seems to be very device dependant.
Definitely some weird Unity issue that they hopefully manage to fix at some point. I have too much on my plate atm to fully wrap my head around what's going on but I'm very scared of DateTime on IOS now. Since removing the heartbeat mechanism   I haven't gotten any reports about suddenly losing connections etc., I have about 8 regular players testing with me (all running on IOS for some reason) and they've been super happy with the past few builds.

Keep in mind that Riptide's timeout system relies on heartbeats, so if you've removed heartbeats you may end up with connections "hanging" and not closing properly.

Indeed, there was also a secondary issue that when you move an application to the background, e.g., switching between apps on IOS the update logic in the game didn't run and that could lead to the heartbeat triggering a timeout once you came back. I've implemented a more lenient "AFK" mechanism in my server which allows connections to hang for the duration of a game and if they come back to the game I just respawn them and broadcast a notification that they've returned etc.

It appears that my latest response was deleted/didn't post properly, which is kind of annoying since it was rather lengthy 😒

Let's say 10 seconds have passed in an active game, on PC and Android, I see the following text: "2:50"

I'm surprised the PC and Android times match—system times are not guaranteed to be identical, or even reasonably close together. I found this out the hard way a long time ago when I tested some client prediction code with a friend and it completely fell apart (after working perfectly on just my local machine). Eventually we realized that his computer's system time was ~30 seconds ahead of mine, so my server was ignoring his inputs because they were coming from ~30 seconds in the future.
Basically, DateTime objects can't really be safely compared to each other unless both were sampled on the same machine (or you don't need an overly precise comparison), so you may want to rethink how you're informing clients of how much time is left in a round.
However, this shouldn't cause any problems for Riptide, as I made sure to only compare DateTime timestamps when both were sampled on the same computer. A DateTime object sampled on the server will never be compared to one from the client, and vice versa.
It's worth noting that I've had a few other reports of seemingly random disconnections, most of which (possibly even all, I'm not entirely sure) were happening with mobile devices involved. Increasing the timeout time usually seems to "fix" it, but that's obviously not a proper solution. Unfortunately I've never had enough context/information to be able to pinpoint any potential causes, but it could just have something to do with how mobile devices handle multiple threads or something 🤔

Definitely some weird Unity issue that they hopefully manage to fix at some point.

Yeah, you may want to report it to Unity and/or Microsoft (given that DateTime is part of "regular" .NET it may not actually be Unity's fault, unless Unity somehow broke its implementation).

1faf2a76617a3f3f339f5de8e4ca06838aa226e9 removes all use of DateTime from Riptide, so if that is in fact what was causing this issue, it should now be resolved.


Add full regex support for $network rules

For now, only wildcards are supported (like 127.0.*$network), but there is a feature request for full regex support (see https://github.com/AdguardTeam/AdguardForAndroid/issues/3694).
The syntax of $network rules with regex mask should be the same as for other basic rules (like /.+:[1-3][0-9]{2,5}/$network).

Such rules can't be converted to CIDR kernel rules (feature used on Mac). But anyway they will be applied on proxy level.

feature used on Mac

On pre-BigSur Mac you mean? :)


Update duckduckgo_search.py - add datetime result to _text_lite()

add datetime result to _text_lite()

This data is rarely found in api responses. So there is no point in making this change.


yarn upgrade

Coverage remained the same at 26.374% when pulling 69283b496048b48825cb6a904359376bee6c76f2 on upgrade into 58e1c0645f746661a41fa68f927327e96b951872 on master.


HEC-1099 tax check codes listing page

Details in ticket - HEC-1099

@AndyHWChung @priyankadhiman3006 @nubz added a new commit to add a back link to the first page that redirects to gov.uk, please review

i think this branch needs rebasing

i think this branch needs rebasing

there were no conflicts, but I've rebased now 👍


AndroidUseAapt2 Default Value in Android Xamarin Project

The default value of AndroidUseAapt2 property in an Android Xamarin project is true once I create a project.
But, as per this doc default value of it is false.
So, either it is a bug in Visual Studio 2019 16.7.1 or the doc here needs an update on it.
There is a problem I faced in build because of this setting being by default true. My Android project kept on building infinitely at this task of aapt2compile and on making it false build was successful. Not sure, but maybe this is also a bug in Visual Studio 2019 16.7.1 Build of Android Xamarin project.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: aa951c69-0f9f-d6f8-b879-0a3427436e3c
Version Independent ID: 7807523a-115c-5f73-b22a-a914792467a4
Content: Build Process - Xamarin
Content Source: docs/android/deploy-test/building-apps/build-process.md
Product: xamarin
Technology: xamarin-android
GitHub Login: @davidortinau
Microsoft Alias: daortin

Not sure if thats actual, but I also faced a total hangup of my project build after I upgraded to latest VS 2019 and Xamarin.
Changing AndroidUseAapt2 to False fixed my build.

Thanks for submitting an issue and we apologize for the delayed response. The requested updates haven't been made since the creation of the issue, and the timeline for resolution may vary based on resourcing, so the issue is being moved to an internal repo to better track it.


Textbox resizing issue(s)

Wave SDK Version, OS
v0.22.0 on MacOS
Actual behaviour
Textbox resizing is buggy.
https://user-images.githubusercontent.com/8954217/172659025-6f4e690c-2b2f-4593-9295-75b3bef18385.mov
Expected behaviour
Textbox resizing should be smooth.
Steps To Reproduce
from h2o_wave import Q, main, app, ui

@app('/')
async def serve(q: Q):
    """
    App function.
    """

    q.page['card'] = ui.form_card(
        box='1 1 4 4',
        items=[ui.textbox(name='t', label='Text', value='Sample', multiline=True, height='100%', width='100%')]
    )

    await q.page.save()

Comments
1 - What does height=100% mean or do? Even when I use long text, the box doesn't fit the text and height remains same.
2 - When setting height=100%, when dragged to increase height, it is impossible to drag it back to reduce back the height.
3 - When setting height=100%, the textbox continues increasing in height after clicking (and holding click) even though the mouse doesn't move.

1 - It should occupy 100% of height of the parent container (similar to width behavior).
2, 3 - The implementation of behavior in 1 would be too complex and it would require the re-implementation of all components supporting height attribute so we decided to remove percentage units support for ui.textbox to prevent these issues.

Thanks!


[Bug]: Request to Update Twitter Icon to X

Tremor Version
latest
Link to minimal reproduction
https://www.tremor.so/
Steps to reproduce
Go to the footer section and see Twitter old logo
What is expected?
Twitter logo should be changed to X
What is actually happening?
Twitter logo is updated recently and hasnt been updated on the site. I didnt find any issue related to this.
Screenshot

What browsers are you seeing the problem on?
Chrome
Any additional comments?
Won't change anything in the code as such would replace the twitter-logo.png with a new file. No code will be touched.
@christopherkindl
I am just starting with open source contribution. I would love to take this issue as my first ever contribution could you please assign this to me?

Hi @lalitkumawat1m, thanks for the hint! And yes, the time has come for us to move away from the old "Twitter" logo. Unfortunately, the website is not open-source which is why we don't take contributions there. But I can recommend you to regularly check our repo here, as we are currently working on many issues together with the community 🙂


Add a createGlobalStyle function

We need to be able to create global function, similar to Styled Component. This should also support tokens and screens, but not variants.

Should be pretty straight forward:
const globalStyle = css.global({
  // styles
})

Do the same here as for theme and keyframes, create a GlobalAtom. Make sure you handle hashing when server is involved.

@hadihallak FYI ☝
Thanks @christianalfoni

What are the benefits to consumers by using css.global instead of style(App, {})?

To me, they are:

consistency with other APIs
access to html
access to body


CSS property not removed by RemoveProperty

RemoveProperty does not in fact remove the property in some cases:
var html = @"
";
var parser = new HtmlParser(new Configuration().WithCss(e => e.Options = new CssParserOptions
{
    IsIncludingUnknownDeclarations = true,
    IsIncludingUnknownRules = true,
    IsToleratingInvalidConstraints = true,
    IsToleratingInvalidValues = true
}));
var dom = parser.Parse(html);
var div = (IHtmlElement)dom.QuerySelector("div");
var bg = div.Style.First(p => p.Name == "background");
div.Style.RemoveProperty(bg.Name);
var removed = !div.Style.Any(p => p.Name == "background"); // false
var s = div.ToHtml(); //

You know that background is a shorthand and no real property. That being said in the provided scenario you are using unknown declarations, which do not distinguish between shorthands and longhands. Here all declarations are treated as longhands.
At that moment I don't know how to change the behavior. The method just takes a string. Hence we can't evaluate if Factory.Properties.IsShorthand(propertyName) makes sense. Maybe it should be checked if the provided shorthand has also been added (which only applies in case unknown declarations are allowed) to the list of declarations. If so, the added property will be removed as usual longhands.

I adjusted the behavior of the CssStyleDeclaration. It distinguishes now between these two cases. Most algorithms that differentiated between shorthand and longhand now start with the (mostly trivial) longhand check. The shorthand is used only if unknown declarations are forbidden. Otherwise it is known that any name is allowed and nothing specific will be instantiated.


sol-conffile: If find an error on JSON, log it as SOL_ERR

So the message is more visible to user, and not buried along lots of
other debug messages.
Signed-off-by: Ederson de Souza<EMAIL_ADDRESS>

+2

not ERR, WRN. We use WRN in our stuff, not error... no big deal, that's the convention... error and critical are not being used in our side.
WRN is the default visibility, so will have the same effect

I didn't get the part of 'our stuff' - isn't the conffile json given to us by users?

our code

Integrated with SOL_WRN. Tks!

What is the point to just wrn and keep going in those cases?
On Wed, Feb 17, 2016, 18:42 Ederson de Souza<EMAIL_ADDRESS>wrote:

Closed #1425 https://github.com/solettaproject/soletta/pull/1425.
—
Reply to this email directly or view it on GitHub
https://github.com/solettaproject/soletta/pull/1425#event-554157771.


Can't use it with Mac.app

Hi,
I tried your SQlite3 wrapper but was unable to get it to work with an Mac / Cocoa application. It would only work if the app was an iOS app to begin with. Could you tell what I am doing wrong? I added the framework just as depicted in your documentation.
Regards Thomas

Since the Mac framework was not working, I went ahead and uses the iOS framework. However, I am unable to query anything at all from a connected database. Either, I am just to noob for this or there a still some bug in your wrapper.

These images do not provide enough context to troubleshoot.
In the first (Mac) project, please provide a screen shot of your entire Xcode project from the "Build Phases" screen.
In the second (iOS) project, please show me the error you're getting on that line, and please show me where you set "ZTITLE".

Hi, lets go with the Mac issue, since this is the one that matters to me.

Which of the two SQLite.framework files did you drag into the last two areas?
Alternatively, can you try the "universal-framework" branch, which simplifies the build system?

On Jan 17, 2015, at 2:27 PM, thomasschoenfeld<EMAIL_ADDRESS>wrote:
Hi, lets go with the Mac issue, since this is the one that matters to me.
—
Reply to this email directly or view it on GitHub.

Here is a video of how I set it up. I hope you bare with even if I ask this noobisch questions. Right after adding your framework I build the app. This seems to work. But when I add another playground my database will not be accessed properly.
Here Link to my setup video: https://dl.dropboxusercontent.com/u/107444970/Xcode_and_SQlite.m4v
And here the issue I'm having:

@thomasschoenfeld Ah, the problem seen in the video is that you need to have built the framework (for iOS) at least once for a playground to run (see the note I left at the top of the playground).
Beyond that, in your example you're trying to open a database file in a location that playgrounds do not have access to (they're sandboxed).
Please read the "Connecting to a Database" documentation for some examples of places to open databases:
https://github.com/stephencelis/SQLite.swift/blob/master/Documentation/Index.md#connecting-to-a-database
And let me know if you have better luck importing and using SQLite.swift in actual source files in your project (rather than playgrounds).

I am getting started with swift just now. This is why I use playgrounds.
I did as you said. The database is now in the support files dir. I also used your code for the connection. Now I get a different error. However, I am not sure that the database is really connected. I did build, stopped, closed and reopened everything. Still my issue remains.

Again I apologise for bothering you. I can find my way around C/C++ and I am good with applescript. But I am totally new to Xcode projects / frameworkes / etc... And rather than starting with python to get an somewhat good print-out I want to do this in swift to force myself to get into and build my app.
The whole idea is to build an app around my iCal events, which will give me my time worked and some other stuff.

My recommendation would be to spend less time in the playground right now as you get comfortable. Try pasting this code into your AppDelegate launch code and you should hopefully get better error messages and stack traces.
I'm going to close this issue for now as there don't appear to be any specific bugs being reported.

I agree with Stephen.
But when you do start a project, here some extra tips:
I use Firefox's SQLite Manager. You can runs scripts on it and theres a nice GUI. Import some fake data using the CSV import option.
Drag your database into your project.
Go to Copy Bundle Resources and add your database.

If you only need to read: its super easy: (two lines of code)
let path = NSBundle.mainBundle().pathForResource(kDatabaseName, ofType: kDatabaseType)!
let db = Database(path, readonly: true)
Then follow the docs on how to perform queries.
Good luck.

I tried that and is still not working. Has one of you tried open a sqlite database that way? Because I did exactly as you wrote and I still have issues. I mean, I am new to this, but not that new. If you want, we could do a short remote session. If it works, it would take about 2 Minutes to show me. But honestly I think it will not work.
Or are you saying connection to databases within playground is not supported?

Am 19.01.2015 um 19:19 schrieb Eric Gu (@ericguuu) <EMAIL_ADDRESS>I agree with Stephen.
But when you do start a project, here some extra tips:
I use Firefox's SQLite Manager. You can runs scripts on it and theres a nice GUI. Import some fake data using the CSV import option.
Drag your database into your project.
Go to Copy Bundle Resources and add your database.
If you only need to read: its super easy: (two lines of code)
let path = NSBundle.mainBundle().pathForResource(kDatabaseName, ofType: kDatabaseType)!
let db = Database(path, readonly: true)
Then follow the docs on how to perform queries.
Good luck.
—
Reply to this email directly or view it on GitHub.

@thomasschoenfeld You should get a very specific assertion message back when running an application. Playgrounds don't play nicely with assertions, so it becomes difficult to troubleshoot those cases. Run the application with your code, above, and read the assertion's error message that prints to the Xcode console upon crash.

@thomasschoenfeld Beyond that, a playground runs in its own application/bundle, so it doesn't have direct access to the resources your app target has access to.

@thomasschoenfeld See http://stackoverflow.com/questions/24069479/swift-playgrounds-with-uiimage for more info on opening resources from within a playground.

mh…. ok, I tried the most stupid thing I could think of, command line tool :-D an I got this… I saw your other email an will try that as well...

Am 19.01.2015 um 20:53 schrieb Stephen Celis<EMAIL_ADDRESS>@thomasschoenfeld You should get a very specific assertion message back when running an application. Playgrounds don't play nicely with assertions, so it becomes difficult to troubleshoot those cases. Run the application with your code, above, and read the assertion's error message that prints to the Xcode console upon crash.
—
Reply to this email directly or view it on GitHub.

@thomasschoenfeld Command-line tools in OS X do not support dynamic frameworks, so you'll likely have to embed the SQLite.swift files directly.

understood. I tried the other thing that you gave me the link to, the one with the images etc. Still nothing (this time again with an Cocoa App) … It can not be that hard… I think I am doing something very very very stupid which keeps me from getting it to work...

Am 19.01.2015 um 21:06 schrieb Stephen Celis<EMAIL_ADDRESS>@thomasschoenfeld Command-line tools in OS X do not support dynamic frameworks, so you'll likely have to embed the SQLite.swift files directly.
—
Reply to this email directly or view it on GitHub.

ok, so with playgrounds I am not getting anywhere. I also tried another framework and eliminated all „-„ in the folder paths. This seemed to be one issue as well. Now it seems it is being accessed alright, but I now get an fatal error on runtime… It is an Mac App, no playground, and the code is within the AppDelegate just as you suggested.

Am 19.01.2015 um 21:06 schrieb Stephen Celis<EMAIL_ADDRESS>@thomasschoenfeld Command-line tools in OS X do not support dynamic frameworks, so you'll likely have to embed the SQLite.swift files directly.
—
Reply to this email directly or view it on GitHub.

I seem to have an issue with my iCloud account. So here is my last email again…
ok, so with playgrounds I am not getting anywhere. I also tried another framework and eliminated all „-„ in the folder paths. This seemed to be one issue as well. Now it seems it is being accessed alright, but I now get an fatal error on runtime… It is an Mac App, no playground, and the code is within the AppDelegate just as you suggested.
I think I am almost there...

Am 19.01.2015 um 21:06 schrieb Stephen Celis<EMAIL_ADDRESS>@thomasschoenfeld Command-line tools in OS X do not support dynamic frameworks, so you'll likely have to embed the SQLite.swift files directly.
—
Reply to this email directly or view it on GitHub.

Please provide as much information as possible if you want help troubleshooting, e.g.:

The actual fatal error message you're getting
A sample project (and/or playground) with the error intact

You're unfortunately not providing enough information to easily troubleshoot the issue.

the error reads:
fatal error: unexpectedly found nil while unwrapping an Optional value
(lldb)
here is the whole project (including the database).
https://dl.dropboxusercontent.com/u/107444970/Archiv.zip
If you think, everything is ok, then maybe for whatever reason that database is „spezial“. I couldn’t say how, because all my sqlite commands via terminal or python work as they should.
I really appreciate the help.

Am 19.01.2015 um 22:41 schrieb Stephen Celis<EMAIL_ADDRESS>Please provide as much information as possible if you want help troubleshooting, e.g.:
• The actual fatal error message you're getting
• A sample project (and/or playground) with the error intact
You're unfortunately not providing enough information to easily troubleshoot the issue.
—
Reply to this email directly or view it on GitHub.

This error message means there is a data issue, which has nothing to do
with SQLite.swift or Swift.
Look up "optionals"
On Mon, Jan 19, 2015 at 4:49 PM, thomasschoenfeld<EMAIL_ADDRESS>wrote:

the error reads:
fatal error: unexpectedly found nil while unwrapping an Optional value
(lldb)
here is the whole project (including the database).
https://dl.dropboxusercontent.com/u/107444970/Archiv.zip
If you think, everything is ok, then maybe for whatever reason that
database is „spezial“. I couldn’t say how, because all my sqlite commands
via terminal or python work as they should.
I really appreciate the help.

Am 19.01.2015 um 22:41 schrieb Stephen Celis<EMAIL_ADDRESS>

Please provide as much information as possible if you want help
troubleshooting, e.g.:
• The actual fatal error message you're getting
• A sample project (and/or playground) with the error intact
You're unfortunately not providing enough information to easily
troubleshoot the issue.
—
Reply to this email directly or view it on GitHub.

—
Reply to this email directly or view it on GitHub
https://github.com/stephencelis/SQLite.swift/issues/41#issuecomment-70567271
.

@thomasschoenfeld Please take the time to read the Swift book in iBooks. There are a lot of assumptions this code is making:

This line isn't even in SQLite.swift yet.
You're using ! to force-unwrap an optional. In this case, NSBundle.pathForResource can return nil if the resource doesn't exist. It's not finding CalendarCache.sqlite3 because the only bundle resource available is CalendarCache (you should add a suffix to the resource). I also had 2 additional problems with your project because of how you packaged it, though it's probably not an issue for you in the moment:

You didn't copy the CalendarCache resource into your project, so I had to manually re-add it.
You didn't package the SQLite.swift directory with the project, so I had to manually re-add it.

mh, what exactly did you do when you say you „manually re-added“ them? I am not that familiar with Xcode and was under the impression, once dragged into Xcode (and with „copy if needed“ checked) that Xcode would handle everything behind the scenes, linke all sources / files etc.
I added the suffix. It started running but I got this error now…..
so far so good...
fatal error: unable to open database file: file /Users/thomasschonfeld/Desktop/Scripte/SwiftandSQlite/Test201501200820/Test201501200820/SQLite.swift-master/SQLite Common/Database.swift, line 335
Did you run „my database“ without issues after you „manually re-added“ the files? There is no designated resources folder within the project folder in finde so I simply copied everything in the project „root“ folder. That did not help. So that „manually re-added“ you did is probably not what I think it is.
After being stuck on this I finished all my desired sql command and startet coding in python and had no issue with that. I wonder, if I might be better of using python, pulling the data I need into an object and working from there with swift.

Am 20.01.2015 um 00:09 schrieb Stephen Celis<EMAIL_ADDRESS><EMAIL_ADDRESS>@thomasschoenfeld Please take the time to read the Swift book in iBooks. There are a lot of assumptions this code is making:
This line isn't even in SQLite.swift yet.
You're using ! to force-unwrap an optional. In this case, NSBundle.pathForResource can return nil if the resource doesn't exist. It's not finding CalendarCache.sqlite3 because the only bundle resource available is CalendarCache (you should add a suffix to the resource). I also had 2 additional problems with your project because of how you packaged it, though it's probably not an issue for you in the moment:
• You didn't copy the CalendarCache resource into your project, so I had to manually re-add it.
• You didn't package the SQLite.swift directory with the project, so I had to manually re-add it.
—
Reply to this email directly or view it on GitHub.

Mit freundlichen Gruessen
Thomas Schönfeld
Technischer Leiter
Bestellen Sie unseren Newsletter!
Sie erhalten Einladungen zu unseren kostenlosen IT-Workshop und Infos zu exklusiven Angeboten:
http://www.kleinofen.de/newsletter-bestellen.php
Kurfürstenstrasse 10
D-40211 Düsseldorf
Telefon 0211 3552-208
Handy 0173 6058520
Telefax 0211 3552-199
Geschäftsführer: Richard Kleinofen
USt-Nr.: 133/5844/0440
USt-IdNr.: DE 121301230
Amtsgericht Düsseldorf, HRB 25060

mh, what exactly did you do when you say you „manually re-added“ them? I am not that familiar with Xcode and was under the impression, once dragged into Xcode (and with „copy if needed“ checked) that Xcode would handle everything behind the scenes, linke all sources / files etc.

Try downloading your "Archiv.zip" on another computer and running your project.

I added the suffix. It started running but I got this error now…..

so far so good...
fatal error: unable to open database file: file /Users/thomasschonfeld/Desktop/Scripte/SwiftandSQlite/Test201501200820/Test201501200820/SQLite.swift-master/SQLite Common/Database.swift, line 335
Did you run „my database“ without issues after you „manually re-added“ the files? There is no designated resources folder within the project folder in finde so I simply copied everything in the project „root“ folder. That did not help. So that „manually re-added“ you did is probably not what I think it is.

Well it appears there's a bug here or a missing implementation detail. Try removing readonly: true for the moment. I'll investigate what else is required to get SQLITE_OPEN_READONLY working.

After being stuck on this I finished all my desired sql command and startet coding in python and had no issue with that. I wonder, if I might be better of using python, pulling the data I need into an object and working from there with swift.

I think you should work with what you're comfortable with or take the time to better learn Swift, Objective-C, Xcode, and Cocoa.

yeah, without readonly: true everything works fine. Well, and playground still does not.

Am 20.01.2015 um 18:57 schrieb Stephen Celis<EMAIL_ADDRESS>mh, what exactly did you do when you say you „manually re-added“ them? I am not that familiar with Xcode and was under the impression, once dragged into Xcode (and with „copy if needed“ checked) that Xcode would handle everything behind the scenes, linke all sources / files etc.
Try downloading your "Archiv.zip" on another computer and running your project.
I added the suffix. It started running but I got this error now…..
so far so good...
fatal error: unable to open database file: file /Users/thomasschonfeld/Desktop/Scripte/SwiftandSQlite/Test201501200820/Test201501200820/SQLite.swift-master/SQLite Common/Database.swift, line 335
Did you run „my database“ without issues after you „manually re-added“ the files? There is no designated resources folder within the project folder in finde so I simply copied everything in the project „root“ folder. That did not help. So that „manually re-added“ you did is probably not what I think it is.
Well it appears there's a bug here or a missing implementation detail. Try removing readonly: true for the moment. I'll investigate what else is required to get SQLITE_OPEN_READONLY working.
After being stuck on this I finished all my desired sql command and startet coding in python and had no issue with that. I wonder, if I might be better of using python, pulling the data I need into an object and working from there with swift.
I think you should work with what you're comfortable with or take the time to better learn Swift, Objective-C, Xcode, and Cocoa.
—
Reply to this email directly or view it on GitHub.


Laravel 11.x Compatibility

This is an automated pull request from Shift to update your package code and dependencies to be compatible with Laravel 11.x.
Before merging, you need to:

Checkout the l11-compatibility branch
Review all comments for additional changes
Thoroughly test your package

If you do find an issue, please report it by commenting on this PR to help improve future automation.

:warning: The latest version of Laravel has a dependency for phpunit/phpunit of ^10.5. If you would like to also upgrade your tests, you may run the PHPUnit 10 Shift for free.

:warning: Shift detected GitHub Actions which run jobs using a version matrix. Shift attempted to update your configuration for Laravel 11. However, you should review these changes to ensure the desired combination of versions are built for your package.

:alembic: Using this package? If you would like to help test these changes or believe them to be compatible, you may update your project to reference this branch.
To do so, temporarily add Shift's fork to the repositories property of your composer.json:
{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/laravel-shift/laravel-japanese-validation.git"
        }
    ]
}

Then update your dependency constraint to reference this branch:
{
    "require": {
        "xzxzyzyz/laravel-japanese-validation": "dev-l11-compatibility",
    }
}

Finally, run: composer update


Wrong PR name displayed in PR panel

I have 2 PRs open at the moment

In the GHPR view, I checked out the first 1.
In the GHPR view just above the text box, I see the name of PR 2 with no spaces between parts of the text

Closing as this should have been fixed with https://github.com/microsoft/vscode-pull-request-github/issues/3431#issuecomment-1091421594.


109 scrollable functionality added to topbar-items

Connects to #109

Added props for scrollable functionality per breakpoint
Added the $nav breakpoint vars to the settings file
Updated the harmonium-setting.zip file
wrote a loop to handle adding scrollable styles to the correct breakpoints
Started the Table props table with the props added in this PR
Added fix for input box-shadows on mobile

@blazebarsamian do the topbar.items scroll by default or you have to add the scroll prop?

@CheetoMao No they don't scroll by default. I figured when the stuff is all fixed and done with #358 that  we probably wont need the scroll stuff as much ( unless it gets used on a bottom bar on mobile). I  gave the option for deciding where you want it to scroll but also made a prop just called scroll that would scroll for all sizes.


Saving error: Cannot deserialize JSON

Hi,
when I try save content with "Grid layout" data type, I get this error:

Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'System.Collections.Generic.IEnumerable`1[Bento.Core.Models.StackItem]' because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly. To fix this error either change the JSON to a JSON array (e.g. [1,2,3]) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object. Path 'name', line 1, position 8.

Exception Details
Newtonsoft.Json.JsonSerializationException: Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'System.Collections.Generic.IEnumerable`1[Bento.Core.Models.StackItem]' because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly. To fix this error either change the JSON to a JSON array (e.g. [1,2,3]) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object. Path 'name', line 1, position 8.

I found a problem in Bento.Core.Events.ContentServiceEvents.ContentService_Saved on line 154
https://github.com/KOBENDigital/bento.editor/blob/9b109634174ffd5a768154b4b820b5c10fc5d985/src/Bento.Core/Events/ContentServiceEvents.cs#L154
Grid layout can't bind to StackItem model.
Is this bug or I do something wrong?
THX.

This looks like its related to one of the data types you have on your document type. Could you let me know data types you are using?

I think "Grid layout" is problematic data type.
Data types on saving page:

Textbox
Grid Layout
Content picker ( not picked any content )
Bento Stack
Tags
Media Picker

Data types on inserting content to bento stack are same as saving page.
Anyway I got this error every time I save page / element with "Grid Layout" data type.

Explain what i want:
I want create a small components / content blocks which I linked to content page.
Example: I crate components "contact info", "google map embed", "image gallery". Then I create "Contact  Page" and insert this components to this page. Next I create "About page" and here insert only two components.
When I edit component "contact info" they will have updated content on all pages when is inserted.

Yes it will be the Grid Layout that is causing the explosion as it wont boil down to a strong type.
Are you using element types or using library types for your Bento blocks?  If you use a bento library item (IPublishedContent) you can create and reuse blocks.  IPubllishedElements are one use items that only exist in bento stack.

I use a bento library item but this item contain "Grid Layout" data type :/
I think this error is a problem with the "Usage" module because the content is saved when I add "try catch" statement.

Unable to replicate.

Unable to replicate.


Task10

Issue:#219

Hey @Snehalgupta-07
Thanks for opening this PR 🚀. Mentor will review your pull request soon and till then, keep contributing and stay calm.
Thanks for contributing in OpenCode'24 ✨✨!


Implement BidsPartialComponent

Resolves #243.
For a play-by-play of what I did, the commits are quite detailed and fairly well organized.
For a high level overview:
The new classes
BidsComponent is conceived of as a multi-selectable dict (sort of... actually right now only __getitem__ is implemented). If a tuple of entities is selected, you get back a BidsPartialComponent which has a ZipList but no path or name. BidsComponent is actually just a subclass of BidsPartialComponent.
If a single entity is selected from BidsComponent (or BidsPartialComponent), you get a BidsComponentRow. This represents a single entity and its values, and it's implemented as a ImmutableList (sort of a UserTuple). It has the wildcards and entities properties, but instead of returning dicts, they directly return the {str} or ['list', 'of', 'values'] associated with the entity. This is to ensure symmetry between the following access modes:
inputs['bold']['subject'].wildcards == inputs['bold'].wildcards['subject']

Note that the preferred style would still be inputs['bold'].wildcards['subject'], so this aspect of the new implementation is largely for consistency and to make everything more fail-proof.
On the other hand, BidsComponentRow.zip_lists does still return a dict mapping the one entity to its ordered entity list. This break in symmetry is motivated by the new Expandable protocol I established:
Expandable classes have an expand method, a filter method, and a zip_lists property or attribute. The signatures of these items must be as found in BidsPartialComponent. Thus, zip_lists in BidsComponentRow needs to return a dict in order to meet the protocol. In return, we're able to cleanly test all of three of the current classes using the exact same test code.
Furthermore, because BidsComponentRow is already implemented as a list with immediate access to the values, any call from the user to a symmetrically defined zip_lists would be completely redundant. It would give only a less powerful version of the list-like object the user already has.
The documentation
I broke off a bit from our completely autogenerated documentation in the api section in order to prioritize the overview of BidsComponent. BidsPartialComponent is really mostly a repeat of BidsComponent, so none of it's members are shown, just an extended docstring overview. BidsComponentRow is rather different, so it's displayed in full.
I also moved the input_* legacy properties into a dropdown box. I suppose we could technically deprecate them, but they don't really do any harm and dropping them would completely prevent older workflows from upgrading (unlike BidsDataset.wildcards etc, which probably never had much buy-in). This way we can document them and keep them, but out of the way.
Deduplication
I decided that zip_list deduplication should not be performed immediately when getting subcomponents and rows. This is both for simplicity, and to ensure that indexing remains consistent and clear as capabilities become more complex. So the only deduplication to be performed will be done in the expand method (since it unambiguously doesn't make sense for expand to return multiple identical paths)
Design Question

I stored the name of the entity in BidsComponentRow as .entity. The name is rather close to the .entities property, which returns something completely different (the .entities name doesn't make sense in isolation, but does if you consider the whole picture). So should we store .entity as something else?

TBD

[x] Add zip_list deduplication to the expand methods

Okay, I think that finally fixes all the test failures.
Just note for posterity, when combining MockerFixture with a hypothesis test, you need to call mocker.stopall() at the very beginning of the test so that all the mocks are removed, otherwise you get very strange errors. This is even if you only run one example, because if the example fails, hypothesis still does multiple runs of the test to try to shrink the example.

Re: your design question - what would be the alternative?

Not sure, guess I wanted to see if either of you would object to the status quo

Should we store .entity as something else?

Sorry, forgot to specifically address this as part of my first review. I'd also be happy with entity_name, which I guess would slightly more precisely describe what part of the entity this attribute represents (i.e. the long-form name as opposed to the entity key or value). I think I'm fine with just calling it entity though.

Sorry, forgot to specifically address this as part of my first review. I'd also be happy with entity_name, which I guess would slightly more precisely describe what part of the entity this attribute represents (i.e. the long-form name as opposed to the entity key or value). I think I'm fine with just calling it entity though.

Okay, I'm just going to keep it then.

I implemented the requested changes and the __spec argument on filter. In addition:

I changed the filter api to Iterable. This makes it more flexible for use (not a breaking change), and in principle, safer in a snakemake environment where we don't have static type checking (the previous version ate iterables without filtering correctly). All the tests now use consumable iterators instead of lists.
I went ahead and made paths in all the expand methods a position-only argument __paths. This is technically a breaking change, but I highly doubt anyone is referring to it via the keyword currently. My rationale is

Accessing it via keyword makes it semantically confusing with **wildcards
paths is technically a valid wildcard name, and we're taking up that namespace for no good reason. Of course, snakemake's expand does the same thing with filepatterns and func, and this is something we can address later, but in the meantime we should keep our own functions clean.


import torch error with python3

I ran a test on my torch installation after installing jetson-inference.

import torch works perfectly with python but with python3;

tx2:/jetson-inference/build/aarch64/bin$ python3
Python 3.6.9 (default, Apr 18 2020, 01:56:04)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import torch
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.6/dist-packages/torch/init.py", line 79, in
from torch._C import *
RuntimeError: module compiled against API version 0xc but this version of numpy is 0xb

Has anyone run into this before? Best.

@flurpo ended up moving back to 4.4 DP and installing the wheel for pytorch and the torchvisin per @dusty-nv's advice in the previous issue we were on.  Currently, retraining with pytorch and ResNet-18 per the example using python 3.6. I will say moving back and forth between Jetpack 4.3 and 4.4 seemed a little buggy for me, with SDK manager failing to flash or just hanging. I ended up having to delete all the downloads from SDK Manager and restarting the manager a couple of times.

@hyattbaker -thanks for the quick comment...I've moved back to 4.3. Still  have the issue above but running ok with Py2.7 for the moment. I'll just have to table the problem until I can solve some of my other issues. We are certainly learning something going back and forth between Jetpacks!


eqsat issue roundup

I've been using impure-containers in my eqsat project, and I've come up with some issues that you may be interested in. I'm going to comment on this issue with each one, to avoid spamming you. Hackage is sorely lacking a good consistent package for mutable containers, and impure-containers is the best thing I've seen so far :-), so I'd like to see some improvements (and will likely write up PRs after I graduate on May 10).
cc: @chessai

I've been writing some mutable containers that you may want to add to impure-containers:

EqSat.Internal.MHashMap (master, permalink) is a wrapper over Data.HashMap.Mutable.Basic that adds forM_, insertWith, length, member, null, freeze, and thaw.
EqSat.Internal.MHashSet (master, permalink) is a newtype for MHashMap k () with a similar API to EqSat.Internal.MHashMap.
EqSat.Internal.MStack (master, permalink) is a mutable stack that is contiguous in memory (as opposed to most stack implementations on Hackage, which tend to be something like newtype MStack s a = MStack (MutVar s [a]). This is pretty close to your Data.ArrayList.Generic module, except it has more functions (e.g.: pop, thaw), better documentation, and it reallocates when the size of the underlying vector is double the number of actual elements in the stack (it checks each time you pop). This module is pretty close to being ready for inclusion in impure-containers. The only issue that isn't performance-related I can think of is that newWithCapacity is kind of useless since there is no way to pop without compacting.
EqSat.Internal.MBitmap (master, permalink) is a monomorphic wrapper over the MutableBitmap type defined in foundation. It needs a little documentation / cleanup work, but it has some nice property tests using hedgehog.

Since not many people depend on impure-containers yet, perhaps it would be worth revisiting the module structure. I think it's nicer to have a less-nested module hierarchy, where the names at the leaf nodes are always the same as the type that module exports (so the module exporting MHashMap is called Foo.Bar.MHashMap). I think it would be nice to adopt a convention where the mutable version of a structure is called MFoo and the immutable version is called IFoo (MutFoo/ImmFoo would also be fine), though I can understand if you think that's not worth pursuing. I'm thinking that the renamed module hierarchy could look like this (Foo ↦ Bar means that that the datatype currently defined as Foo should be renamed to Bar):

ImpureContainers.MArrayListB: ArrayList specialized for Data.Vector.MVector and renamed to MArrayListB.
ImpureContainers.MArrayListU: ArrayList specialized for Data.Vector.Unboxed.MVector and renamed to MArrayListU.
ImpureContainers.MArrayListP: ArrayList specialized for Data.Vector.Primitive.MVector and renamed to MArrayListP.
ImpureContainers.MArrayListS: ArrayList specialized for Data.Vector.Storable.MVector and renamed to MArrayListS.
ImpureContainers.MArrayListG: ArrayList ↦ MArrayListG.
ImpureContainers.IGraph: Graph ↦ IGraph, SomeGraph ↦ SomeIGraph.
ImpureContainers.IGraph.IVertices: Vertices ↦ IVertices, vertices*
ImpureContainers.MGraph: MGraph, insert*
ImpureContainers.MGraph.MBVertices: MVertices ↦ MBVertices, verticesReplicate, verticesWrite, verticesRead.
ImpureContainers.MGraph.MUVertices: MUVertices, verticesUReplicate, verticesUWrite, verticesURead.
ImpureContainers.GraphTypes: reexports ImpureContainers.GraphTypes.*.*, IGraph, Vertices, MGraph, MVertices, MUVertices, defines type IOGraph = MGraph RealWorld and type STGraph s = MGraph s.
ImpureContainers.GraphTypes.Vertex: Vertex, vertexInt.
ImpureContainers.GraphTypes.Size: Size, sizeInt.
ImpureContainers.MHashMap: MHashMap and its functions.
ImpureContainers.MHeapC: RawHeap ↦ MHeapC and its functions.
ImpureContainers.MHeapD: Heap ↦ MHeapD and its functions.
ImpureContainers.UnsafeMaybe: UnsafeMaybe and its functions.
ImpureContainers.MMaybeArray: MutableMaybeArray ↦ MMaybeArray and its functions.
ImpureContainers.BoolByte: BoolByte.
ImpureContainers.MMaybeVar: MutMaybeVar ↦ MMaybeVar.
ImpureContainers.MPrimArray: MutablePrimArray ↦ MPrimArray and its functions.
ImpureContainers.ITrie: Trie ↦ ITrie and its functions.
ImpureContainers.MTrie: MTrie and its functions.

I'd also like to adopt a convention (that you already seem to be adopting in some modules) where the user is expected to import these modules qualified, so we don't have to suffix the name of the type onto the function (e.g.: newPrimArray just becomes new and the user is expected to use it as MPrimArray.new). If that sounds inconvenient to you, I'd also be willing to have a top-level ImpureContainers module that reexports all of the types and wrapper functions (so ImpureContainers.MPrimArray would export MPrimArray, new, etc. whereas ImpureContainers would export MPrimArray, newMPrimArray, etc.).

The MTrie type seems bad to me because it causes problems with the garbage collector (too many MutVars). One idea for a solution to this that I had is a Haskell implementation of malloc/free for a MutableByteArray#, so that you can keep the trie in one contiguous blob of memory for cache coherence (and, if the trie is not too big, you could use Word32 offsets instead of pointers for compactness, though the lack of a Word32# means this may slow down some operations). You could also maybe use compact regions, though I suspect that it would be slower than a custom allocator.

First of all, some broader context around this library. As you can see by the commit history, I've not done much with this in the last two years. The only decent thing that this library offers is the Graph-related stuff (mostly because unlike every other graph library on hackage, it allows you to keep track of the fact that a vertex belongs to a graph). The heap described as "model C" is pretty cool too, and fortunately, the highly-useful PrimArray got merged into primitive recently (not released to hackage yet). I consider everything else trash (or nearly trash). As you point out, MTrie has disastrously bad performance. I used it once to build a trie that I needed to put several million entries into, and the garbage collector just ran 100% of the time. So, really bad.
But there's something else flawed with this whole approach to mutable data structures: it makes GHC generate suboptimal code.  What's bad is that we have to put everything behind a MutVar. If someone wants to use a stack like this in a tight loop, they might do this:
myFunc :: MStack s Int -> ST s ()
myFunc !s = go 1000 where
  go n = if n > 0
    then do
      foo <- pop s 42 id
      ... -- do something with foo, possibly pushing more onto the stack
      go (n - 1)
    else return ()

Every call to push/pop causes readMutVar or writeMutVar to get called, which means that stuff gets written to memory. It's unfortunate because, normally, in a tight loop like this, GHC would end up generating a nice tight loop that just puts the arguments in registers. In fact, we can make it do this by making the interface less safe:
data MStack s a
  = UnsafeMkMStack
       !Int -- length
       !Int -- vector capacity
       !(MutableArray s a)
new :: ST s (MStack s a)
push :: MStack s a -> a -> ST s (MStack s a)
pop :: MStack s a -> b -> (a -> b) -> ST s (MStack s a, b)

Of course, now push and pop have an unenforceable invariant: The argument MStack must not be reused. Now, myFunc would become:
myFunc :: MStack s Int -> ST s (MStack s Int)
myFunc = go 1000 where
  go n !s1 = if n > 0
    then do
      (s2,foo) <- pop s 42 id
      ... -- do something with foo, possibly pushing more onto the stack
      go (n - 1) s3
    else return ()

And myFunc now has the whole "this in linear in the MStack argument" thing going on as well. Again, unenforced by the type system, and users are bound to mess up. But, the generated code is much better. By this point, you probably see where I'm going. The interface I really want depends on the successful implementation of the Linear Haskell proposal:
data Stack a = UnsafeStack !Int !Int
       !Int -- length
       !Int -- vector capacity
       !(MArray a)
new :: (Stack a ⊸ Unrestricted b) -> b
push :: Stack a ⊸ a -> Stack a
pop :: Stack a ⊸ b -> (a -> b) -> (Stack s a, Unrestricted b)

It has the Linear Haskell's tell-tale CPS jankery, but it's both fast and safe. And it doesn't have to concern itself with the PrimMonad weirdness. This is the interface I actually desire for all the mutable data structure I use in practice.
Aside from the fact that I want to destroy this package and build a linear-containers package once Linear Haskell lands, I agree with all of your suggested changes. The name changes sound good, and the additions to the API are good too. I don't mind breaking changes to the API since I'm pretty sure no one uses this package but us. I'm going to give you a commit bit to this repo, so feel free to do any of the things you described.

Ah, yes, I was thinking that MADTs would improve things. I was frustrated by the boxed-ness of MutVar#, is there a non-deprecated replacement for PrimRef, or would I just need to hack it together with a MutableByteArray#?

You should probably just copy the whole PrimRef module into impure-containers. There's nothing really wrong with it. It's just that a package named prim-array is sort of goofy now that the type is in primitive instead. And, of course, impure-containers rolls its own copy of PrimArray as well since I never got around to making it depend on prim-array.