ITK Python wrapping problem?

I am trying to run the examples from the Introduction of the Kitware course located here:
https://data.kitware.com/#collection/568a9db98d777f429eac8eab/folder/5b0bfb858d777f15ebe1fa62
Essentially I am using the following code:
import itk
from itkwidgets import view
file_name='./brainweb165a10f17.mha'
image=itk.imread(file_name, pixelType=itk.ctype('float'))
view(image)
This fails with the following traceback:
file_name='./brainweb165a10f17.mha'
image=itk.imread(file_name, pixelType=itk.ctype('float'))
view(image)

RuntimeError                              Traceback (most recent call last)
 in ()
1 file_name='./brainweb165a10f17.mha'
2 image=itk.imread(file_name, pixelType=itk.ctype('float'))
----> 3 view(image)
/usr/lib/python2.7/site-packages/itkwidgets/widget_viewer.pyc in view(image, ui_collapsed, annotations, interpolation, cmap, mode, shadow, slicing_planes, gradient_opacity, **kwargs)
436             annotations=annotations, interpolation=interpolation, cmap=cmap,
437             mode=mode, shadow=shadow, slicing_planes=slicing_planes,
--> 438             gradient_opacity=gradient_opacity, **kwargs)
439     return viewer
/usr/lib/python2.7/site-packages/itkwidgets/widget_viewer.pyc in init(self, **kwargs)
226             self.extractor.InPlaceOn()
227             self.shrinker = itk.BinShrinkImageFilter.New(self.extractor)
--> 228         self._update_rendered_image()
229         if self._downsampling:
230             self.observe(self._on_roi_changed, ['roi'])
/usr/lib/python2.7/site-packages/itkwidgets/widget_viewer.pyc in _update_rendered_image(self)
309                 return
310
--> 311             self.shrinker.UpdateLargestPossibleRegion()
312             if is_largest:
313                 self._largest_roi_rendered_image = self.shrinker.GetOutput()
RuntimeError: /home/melrobin/packages/ITK/Modules/Core/Common/src/itkProcessObject.cxx:1412:
itk::ERROR: BinShrinkImageFilter(0x55ad7d7646d0): Input Primary is required but not set.
I started debugging the Python end of things and all seems to work well so my thoughts are that there might be a problem in instantiating this object and making sure that two template parameters are specified, but I'm not sure where to look from there.  See this class documentation:
https://itk.org/Doxygen47/html/classitk_1_1BinShrinkImageFilter.html
I cannot make any further progress, but can work on it with more suggestions.

I did run check_env.ipynb and got this traceback, but I do not think that this is related:
AttributeError                            Traceback (most recent call last)
 in ()
61 # now the dependencies
62 for lib, required_version in list(requirements.items()):
---> 63     import_version(lib, required_version)
 in import_version(pkg, min_ver, fail_msg)
26         mod = importlib.import_module(pkg)
27         if pkg in {'itk'}:
---> 28             ver = mod.Version.GetITKVersion()
29         else:
30             ver = mod.version
AttributeError: module 'itk' has no attribute 'Version'

I did run check_env.ipynb and got this traceback, but I do not think that this is related:
AttributeError                            Traceback (most recent call last)
 in ()
61 # now the dependencies
62 for lib, required_version in list(requirements.items()):
---> 63     import_version(lib, required_version)
 in import_version(pkg, min_ver, fail_msg)
26         mod = importlib.import_module(pkg)
27         if pkg in {'itk'}:
---> 28             ver = mod.Version.GetITKVersion()
29         else:
30             ver = mod.version
AttributeError: module 'itk' has no attribute 'Version'

@melrobin how did you install ITK, and what version of ITK are you using?
If you try this from a Python terminal
$ python
>>> import itk
>>> itk.Version.GetITKVersion()

what is returned?

It returns version 4.13.0, but I built ITK from development sources.

itk.Version.GetITKVersion()
'4.13.0'

I might have a couple of versions inadvertently installed on my machine and will check this.

Oh, BTW, should its.Version.GetITKVersion() read 5.0 if building from development sources?

It returns version 4.13.0, but I built ITK from development sources.

I might have a couple of versions inadvertently installed on my machine and will check this.

4.13.0 should be sufficient -- it sounds like there may be some contamination of Python environments.
A good practice is to work in a Python virtual environment. This will isolate packages and may fix your issue. Please give it a try and let us know how it goes.

Oh, BTW, should its.Version.GetITKVersion() read 5.0 if building from development sources?

If using ITK Git master, yes.

You're right.  There is some cruft in my environment.  The version still reads 4.13.0, but I should be able to clean this up.  Thanks for your help!


Problems view should maintain scroll position

VSCode Version: insiders
OS Version: os x

Steps to Reproduce:

Have lots of problems, open problems view and scroll down
Hide / show problems view
Notice that the problems view is now scrolled all the way to the top - we should maintain the scroll position as we do for all the other panels https://github.com/Microsoft/vscode/issues/12937

@isidorn Problems view always retain the previous state unless problems.autoReveal setting is true. When it is ture, it reveals problems for the current open file if there are any. This is similar to explorer.autoReveal setting

That makes sense I am just not sure if 'problems.autoReveal' should be true by default?

IMO it makes sense coz mostly you are interested in the problems for the editor I am seeing . Editor and problems go along with each other.


Clear input value

Can we also clear the input value if we call clearSearch since it implies that we are clearing the search input.

@slauzinho good idea, but your input is surely already control from your side. And not everyone want this behavior I think. Maybe I can add a boolean option where this can do both. What you think?

Sounds good to me, I can do it for you if you want. Should I add it as a prop of the component or a param for the clearSearch which defaults to not clearing the text field?

I think the component is best, but I'm open to anything

@slauzinho did you forget about this?

what happened to this change? Any news? It would be great to have that boolean as a parameter to clearSearch....really handy

This will now be in v 2 by default thank you


[WIP] Fix overriding fragment parent's __typename

Codecov Report

Merging #131 into master will increase coverage by 0.35%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #131      +/-   ##
==========================================
+ Coverage   93.25%   93.61%   +0.35%
==========================================
  Files           2        2
  Lines          89       94       +5
  Branches       21       23       +2
==========================================
+ Hits           83       88       +5
  Misses          6        6

Impacted Files
Coverage Δ

packages/apollo-link-state/src/utils.ts
88.23% <ø> (+1.27%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update db77b80...cb7e0d7. Read the comment docs.


sd-v1-5-inpainting.ckpt download link is invaild

The sd-v1-5-inpainting.ckpt download link is invalid. Could you provide a new download link?Thanks a lot.

Hi sorry for the late reply, I think you can find it in the new link here https://huggingface.co/botp/stable-diffusion-v1-5-inpainting/blob/main/sd-v1-5-inpainting.ckpt


Remove/replace outdated content

We've evolved a lot the past months and some stuff changed. We need to keep our docs up to date to our latest release (or keep multiple versions of it?) to avoid confusion from new users.

The video in the index page is pretty outdated.
What else?

I think this is fixed with #1702, and it's probably a duplicate of #1691.
@vitoravelino what do you think? Can we close this?

Yeah, I was gonna mention that in the PR. :sweat_smile:


Fix issue #162: Auto-reconnect upon error or disconnection

I tested this by setting the hostname to a local netcat server (nc -l 5222). I responded with erroneous messages and also left the server down to see if the adapter would attempt to reconnect to the server.

Hi all. Running 2.12.0-5, sometimes the bot disconnects (probably because of hipchat-side issues) and doesn't reconnect. Just this:
[Thu Sep 10 2015 02:56:43 GMT+0000 (UTC)] INFO Connection went offline
[Thu Sep 10 2015 02:56:43 GMT+0000 (UTC)] INFO Connection went offline
[Thu Sep 10 2015 02:56:43 GMT+0000 (UTC)] INFO Connection went offline
[Thu Sep 10 2015 02:56:43 GMT+0000 (UTC)] INFO Connection went offline
[Thu Sep 10 2015 02:56:43 GMT+0000 (UTC)] INFO Connection went offline
[Thu Sep 10 2015 02:56:43 GMT+0000 (UTC)] INFO Connection went offline
[Thu Sep 10 2015 02:56:43 GMT+0000 (UTC)] INFO Connection went offline
[Thu Sep 10 2015 02:56:43 GMT+0000 (UTC)] INFO Connection went offline
[Thu Sep 10 2015 02:56:43 GMT+0000 (UTC)] INFO Connection went offline
[Thu Sep 10 2015 02:56:43 GMT+0000 (UTC)] INFO Connection went offline
[Thu Sep 10 2015 02:56:43 GMT+0000 (UTC)] INFO Connection went offline
[Thu Sep 10 2015 02:56:43 GMT+0000 (UTC)] INFO Connection went offline
[Thu Sep 10 2015 02:56:43 GMT+0000 (UTC)] INFO Connection went offline
[Thu Sep 10 2015 02:56:43 GMT+0000 (UTC)] INFO Connection went offline
[Thu Sep 10 2015 02:56:43 GMT+0000 (UTC)] INFO Connection went offline
[Thu Sep 10 2015 02:56:43 GMT+0000 (UTC)] INFO Connection went offline
[Thu Sep 10 2015 02:56:43 GMT+0000 (UTC)] INFO Connection went offline
[Thu Sep 10 2015 02:56:43 GMT+0000 (UTC)] INFO Connection went offline

Any ideas?

hit this again. Anyone?

See also: https://github.com/hipchat/hubot-hipchat/pull/267


Twirl and Dotty

The Twirl plugin adds a library dependency, where we can't add Dotty compatibility.  Commented it for now on the Dotty branch, but we need a way forward.

It can be made to work with this hack:
    libraryDependencies := {
      libraryDependencies.value.map {
        case module if module.name == "twirl-api" =>
          module.withDottyCompat(scalaVersion.value)
        case module => module
      }
    },

No point tracking this specific issue; it will be schismed.

Well, I guess it can migrate to the new repo.


Copying a package fails when using an OCI image registry to store packages

Issue
See: https://github.com/cloudfoundry/cf-for-k8s/issues/466
Context
We have an endpoint that can copy a package from one app to another:

POST /v3/packages?source_guid=:guid
https://v3-apidocs.cloudfoundry.org/version/3.88.0/index.html#copy-a-package

The PackageBitsCopier relies on the blobstore supporting a copy operation which definitely doesn't work when our packages are sent to an image registry.
https://github.com/cloudfoundry/cloud_controller_ng/blob/aa19fd5c71af54be7b7fa228926161c563e8a26b/app/jobs/v3/package_bits_copier.rb#L20
Steps to Reproduce
See: https://github.com/cloudfoundry/cf-for-k8s/issues/466
Expected result
The package is successfully copied.
Current result
An error occurs:
$ cf copy-source dora2 dora
Copying source from app dora2 to target app dora in org o / space s as admin...

Package failed to process correctly after upload
FAILED

failed to copy - CloudController::Blobstore::FileNotFound

Tracker Story was moved: https://www.pivotaltracker.com/story/show/175081123

closing since cf-for-k8s is no longer under active development


Add selenium

Should we remove Dockerfile now that we use image from hub?

Looks good. Not in the list of approves, can't approve from my phone


Expected expression

@UnaNancyOwen I wanted to use this sample to view an HDL-32 pcap file but I am getting an "expected expression"  error in VelodyneCapture.h Line 232. Kindly let me know how to fix it.
Because of this error the main.cpp is not able to recognise the HDL32E capture class.

@kavinat Perhaps, You didn't defined either HAVE_BOOST and HAVE_PCAP.
In order to use this class, You need to define at least one HAVE_* according to your purpose.
Please read ReadMe and CMakeLists (sample/simple/CMakeLists.txt #L19-L31, #L53, #L38-L43, #L54).
By the way, Are you using CMake to generate project? If you not using CMake, I can't more support.
If you don't have sufficient knowledge about C++ and CMake, I recommend learn about these before use this class.


K8SPG-145 PG operator 1.1.0 images

Since 1.0.0 PG operator does not support version service
we've decided to move legit configuration to 1.1.0 related files

Test name
Status

api-tests
failed

Test name
Status

api-tests
failed

Test name
Status

api-tests
failed

Test name
Status

api-tests
failed

Test name
Status

api-tests
failed

Test name
Status

api-tests
passed

Test name
Status

api-tests
passed


Reorganized Window class to facilitate adding new toolkits easily

Fixes #23
Currently supported toolkits

glfw3
sdl2

glfw3 is the default option.

Do not merge this yet. I shall test it on Windows and OS X and report back.

Cool, changes are working fine on all platforms. This PR is ready for merge.


stop propagation when clicking overlays

stop propagation when clicking overlay itself, since we call unfocus()
stop propagation when clicking form inside an overlay, since we don't want to unselect the current component

👍


Modified tests to follow JUnit style guide for dataset generation.

Looks good, tests converted to JUNIT and runs.


Update function to make it compatible to Python 3.

The class basestring does not exist in Python 3. Change to str.

won't this fail in python2 if name is a unicode string?

I think this will match all cases.

thanks, this looks like it will work.


Add flake8 config file for easier integration with IDEs

Most IDEs do not understand pre-commit-config.yaml which prevents said IDEs from calling flake8 to report issues while editing files. Extractng flake8 options into a known location understood by all parties we get consistent flake8 experience from when called by pre-commit and IDE of your choice.
Unfortunately, the list of directories to check needs to be duplicated, although each instance of the list has different meaning:

.flake8 - tells flake8 which files to check,
pre-commit-config.yaml - tells pre-commit for which files to call flake8 check.

Both list should probably remain in sync, e.g. it wouldn't make much sense to run flake8 check for a directory not listed in .flake8.

@psss I'd like to include this patch in v1.18 milestone, if at all possible.

makes complete sense to me, let's be nice to developers


fix tests

ensure tests run against ce master
use template to create yaml file - instead of exporting from db (which doesn't exist if strategy is off)

what was changed that broke this? This defeats the whole purpose?
The idea is that one only creates a single test configuration and yet tests run against all three strategies.

Unsure what exactly caused the failure, but the integration spec was consistently failing on kong-vagrant (https://app.travis-ci.com/github/Kong/kong-vagrant/builds/232071015#L2493) -- it was also reproducible locally. I'm thinking pongo might not be running tests against the latest commit in master.

had a look, these logs:
[----------] Running tests from /kong-plugin/spec/myplugin/02-integration_spec.lua
[ RUN      ] /kong-plugin/spec/myplugin/02-integration_spec.lua @ 55: myplugin: (access) [#postgres] request gets a 'hello-world' header
[       OK ] /kong-plugin/spec/myplugin/02-integration_spec.lua @ 55: myplugin: (access) [#postgres] request gets a 'hello-world' header (41.50 ms)
[ RUN      ] /kong-plugin/spec/myplugin/02-integration_spec.lua @ 73: myplugin: (access) [#postgres] response gets a 'bye-world' header
[       OK ] /kong-plugin/spec/myplugin/02-integration_spec.lua @ 73: myplugin: (access) [#postgres] response gets a 'bye-world' header (2.23 ms)
[ RUN      ] /kong-plugin/spec/myplugin/02-integration_spec.lua @ 55: myplugin: (access) [#cassandra] request gets a 'hello-world' header
[       OK ] /kong-plugin/spec/myplugin/02-integration_spec.lua @ 55: myplugin: (access) [#cassandra] request gets a 'hello-world' header (115.08 ms)
[ RUN      ] /kong-plugin/spec/myplugin/02-integration_spec.lua @ 73: myplugin: (access) [#cassandra] response gets a 'bye-world' header
[       OK ] /kong-plugin/spec/myplugin/02-integration_spec.lua @ 73: myplugin: (access) [#cassandra] response gets a 'bye-world' header (7.68 ms)
./spec/helpers.lua:170: 2021/07/07 17:20:18 [error] 61747#0: *2 [kong] init.lua:410 [postgres] ERROR: relation "ca_certificates" does not exist (124), context: ngx.timer
Error: [postgres] ERROR: relation "ca_certificates" does not exist (124)

  Run with --v (verbose) or --vv (debug) for more details

stack traceback:
	./spec/helpers.lua:170: in function 'make_yaml_file'
	/kong-plugin/spec/myplugin/02-integration_spec.lua:36: in function </kong-plugin/spec/myplugin/02-integration_spec.lua:11>

[----------] 4 tests from /kong-plugin/spec/myplugin/02-integration_spec.lua (43377.00 ms total)

The tests for Postgres and Cassandra work just fine, which means that the database gets populated properly. But then the export fails because a relation does not exist.
What I think is happening is that the kong config db_export command is exporting the wrong database. So not the test database (default name kong_tests), but the regular one (named kong). The latter one being uninitialized, and hence the error.


inline display of options possible?

Hi there,
I would like to display only the options and hide the input field - would this be possible?
Thank you and best regards, MT

Yes, this should be easily possible. Apply some hidden styles on the input via CSS, i.e. visibility: hidden and the open the picker programmatically via the API method: picker.open()
Tell me if that worked for you

Ok cool, will try!
While implementing it, another quesiton arose, (#35 )
Thank you!


[MODULE] - Grid search active learner

Please describe the module you would like to add to the content library
Sklearn-based grid search to train an active learner classification head
Implementation
from sklearn.ensemble import RandomForestClassifier
from sklearn.model_selection import GridSearchCV

class ActiveLearner:

    def __init__(self, base_classifier, pool_size, query_strategy):
        self.base_classifier = RandomForestClassifier()
        self.pool_size = pool_size
        self.query_strategy = query_strategy

    def select_next_sample(self, X_pool, Y_pool):
        if self.query_strategy == "uncertainty":
            pass
        elif self.query_strategy == "diversity":
            pass

    def fit(self, X_train, y_train, X_test, y_test):
        self.base_classifier.fit(X_train, y_train)
        y_pred = self.base_classifier.predict_proba(X_test)

        return y_pred

def gridSearch():

    param_grid = {
        "n_estimators": [10, 50, 100],
        "pool_size": [50, 100, 500]
    }

    rf_classifier = RandomForestClassifier()

    active_learner = ActiveLearner(base_classifier=rf_classifier,
                                   pool_size=500,
                                   query_strategy='uncertainty')

    grid_search = GridSearchCV(estimator=active_learner,
                               param_grid=param_grid,
                               scoring='accuracy')

    # define the training data and test data

    grid_search.fit(X_train, y_train)
    y_pred = grid_search.predict(X_test)

    return y_pred

Additional context
-

Currently not useable in bricks as the integrator input is still to be implemented


No moeule named ‘tcapy'

Hi @hanyc-git, I think the most likely reason is that tcapy is not on your Python path when running xlwings/Excel. If you install the conda py37tca, then you can start Excel using this batch script (note you might need to change your Excel path), it will switch to py37tca environment, add tcapy to your Python path, before kicking off xlwings/Excel. This should ensure that xlwings can find tcapy on the Python path.

Hi @hanyc-git, I think the most likely reason is that tcapy is not on your Python path when running xlwings/Excel. If you install the conda py37tca, then you can start Excel using this batch script (note you might need to change your Excel path), it will switch to py37tca environment, add tcapy to your Python path, before kicking off xlwings/Excel. This should ensure that xlwings can find tcapy on the Python path.


abort() not working

var ro = request({url: 'http://google.com:81', timeout: 20000}, function(e, r, b) {console.log('done');});
ro.abort();

20 seconds later, I still get the "done" output. Expected behaviour: either don't call the callback at all, or call the callback right away with one of the parameter having some kind of wasAborted flag.

Can you give some more info?
request version, node version etc.?

node 4.2.6
request 2.69.0
I've seen this problem with earlier versions of node and request as well.

Tested with same node, same request and same OSX version, cannot reproduce.

Have you tested the piece of code in a single file without any other things installed?
I ran it like so:
'use strict';

const request = require('request');

setTimeout(() => {}, 15000);

var ro = request({url: 'http://google.com:81', timeout: 10000}, function(e, r, b) {console.log('done');});
ro.abort();

It doesn't work if you abort a little later, like so
'use strict';
const request = require('request');
setTimeout(() => {console.log('exiting');}, 3000);
var ro = request({url: 'http://google.com:81', timeout: 2000}, function(e, r, b) {console.log('done');});
setTimeout(() => {ro.abort();}, 1000);

The original code was meant for the REPL. Sorry I didn't mention that.

I see now, any invocation of abort from a later (non sync) context will cause cause this.
It seems .abort is not cancelling the timeout.

Ran into this as well and sent a PR: #2052 -- if you try it, let me know how it goes :+1:

I am seeing exactly the same issue.
I am called '.abort()' on a piped request.

Any update here? I'm seeing the same issue.

Hello, I also suddenly have this same problem after a long parallel processing job. Now the cores refuse to process any data. I'm also using 10.14 OS X.


On songAdd, song.name undefined??

I am trying to get the song name at songAdd.
client.player.on('songAdd',  (message, song) =>         message.channel.send(client.embed(Added to queue : ,  'Song    : ' + ${song.name} + ')))
But song.name comes out to be undefined.

Sorry, it was a slight mistake on my side! It had to be client.player.on('songAdd', (message, queue, song) Extremely sorry


Add 'command -v clang' fallback for systems without 'clang-3.8' or 'clang-3.6'

Can one of the admins verify this patch with one of the following commands:

"jenkins test please" for a one time test run
"ok to test" to accept latest and future commits on this pull request for testing
"add to whitelist" to add the author to the whitelist

Can one of the admins verify this patch with one of the following commands:

"jenkins test please" for a one time test run
"ok to test" to accept latest and future commits on this pull request for testing
"add to whitelist" to add the author to the whitelist


[Direct Chat] No placeholder avatar and display name from the member details view

To reproduce:

Start a chat with yourself. An empty room is created, with no display name
Make sure the room is tagged Direct Chat, and open your members details by hitting your user name from the room

The direct chat created don't have avatar placeholder nor room display name.

This issue cannot be reproduced anymore (except with an old account in which the user has a direct chat with himself). Indeed the user is not able to create a direct chat with himself with the current Riot clients (ios, android and web).
The thing that we have to do here is to remove the "Direct Chat" section in room member details view of the current user.


Proposal: Using Completable instead of Observable

The rx DeleteAsync methods in SupportDeletingBy[Name|Id|Group] interfaces are declared to return Observable<Void>.
Like:
public interface SupportsDeletingByGroup {
 ...
 Observable<Void> deleteByGroupAsync(String groupName, String name);
}

Here we use Observable<Void> to represents operations having no return type but only successful or failed completion. This means we don't have to call subscriber's onNext(Void) but only onError() or onCompleted().
To address exactly these type of use cases, rxJava also has Completable type.
Completable won't deal with value events at all but only with the terminal events onError/onCompleted. Many of the operators such as map, concatMap, skip are not available in Completable because they don't make sense in a valueless stream. With Observable<Void>, though consumer can call all operators unavailable for Completable, there is no use because there is no data to operate on.
Some references:
http://akarnokd.blogspot.com/2015/12/the-new-completable-api-part-1.html

@anudeepsharma thanks for the review. @jianghaolu we discussed this, assuming you are fine with the changes else please comment.
Waiting for @martinsawicki thoughts/confirmation to merge.


Error Handling specifically for main page load

How can i add error handling only for the main page load?
This is the current errors exposed, which says to use OnError callback, but how to pass this callback?
/**
 * A list for errors captured in the last load. Reset when a new page is loaded.
 * Errors could be from any resource (iframe, image, etc.), not just for the main page.
 * For more fine grained control use the OnError callback of the WebView.
 */
val errorsForCurrentRequest: SnapshotStateList<WebViewError> = mutableStateListOf()

val webviewState = rememberWebViewState(url = "https://www.suyambu.net")

LaunchedEffect(webviewState.errorsForCurrentRequest.toList()) {
    for (err in webviewState.errorsForCurrentRequest) {
        println("Err => ${err.code} | ${err.description}")
    }
}

I disconnected my internet and try to load the page I got the following output.
Err => -106 | Failed to load url: https://www.suyambu.net
ERR_INTERNET_DISCONNECTED

errorForCurrentRequest is updating the list from this function
https://github.com/KevinnZou/compose-webview-multiplatform/blob/af895b60ff6afac255807354327ee1b262574026/webview/src/desktopMain/kotlin/com/multiplatform/webview/web/WebEngineExt.kt#L136C1-L136C12
I don't see any listener that I can bind to webviewstate or navigator tol listen for page load error.

@Vaibhav2002 Thanks for your feedback. I apologize for the confusion. Unfortunately, we do not provide an onError callback for this library, despite the comment being copied over from the Android version. As a result, the only way to access error information is by listening to errorsForCurrentRequest, as @whoisjeeva has done. I'm sorry for any inconvenience this may have caused.

Sorry to bring this issue back up, but it seems that there still are some inconsistencies between the README and the actual capabilities of this library. For example here it mentions an onError callback that I can't seem to find anywhere.
Also: are there any plans for exposing errors from the webview to the compose side of things?
I need to catch when my webview 401s, so that I can set a cookie. To do that however, I need to know the HTTP Status of the current request. Am I missing features or are there any workarounds for the Moment? The solution mentioned previously does not seem to work for me.


C# syntax highlighting issue for yield

Issue Description
OmniSharp doesn't recognize multiple yield statements even though the code works fine.
Steps to Reproduce
https://imgur.com/a/b4zO9eF
Expected Behavior
Correct syntax highlighting after first yield
Actual Behavior
Anything after first yield is incorrectly highlighted
Logs
OmniSharp log
Post the output from Output-->OmniSharp log here
C# log
Post the output from Output-->C# here
Environment information
VSCode version: 1.32.3
C# Extension: 1.18.0
Dotnet Information
.NET Core SDK (reflecting any global.json):
 Version:   3.0.100-preview-009812
 Commit:    e3abf6e935
Runtime Environment:
OS Name:     Windows
OS Version:  10.0.17134
OS Platform: Windows
RID:         win10-x64
Base Path:   C:\Program Files\dotnet\sdk\3.0.100-preview-009812\
Host (useful for support):
Version: 3.0.0-preview-27122-01
Commit:  00c5c8bc40
.NET Core SDKs installed:
2.0.0-preview2-006497 [C:\Program Files\dotnet\sdk]
2.1.0-preview1-006984 [C:\Program Files\dotnet\sdk]
2.1.104 [C:\Program Files\dotnet\sdk]
2.1.302 [C:\Program Files\dotnet\sdk]
3.0.100-preview-009812 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.0.0-preview-18579-0056 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.0.0-preview2-25407-01 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.0-preview-27122-01 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.0.0-alpha-27128-4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download

Visual Studio Code Extensions

Extension
Author
Version

beautify
HookyQR
1.4.11

code-runner
formulahendry
0.9.7

csharp
ms-vscode
1.18.0

githistory
donjayamanne
0.4.6

gitignore
codezombiech
0.6.0

Go
ms-vscode
0.9.2

json-tools
eriklynd
1.0.2

vetur
octref
0.17.1

vscode-import-cost
wix
2.12.0

vscode-manifest-yaml
Pivotal
1.4.0

vscode-nuget-package-manager
jmrog
1.1.6

vscode-tfs
generalov
1.0.1

vue-snippets
hollowtree
0.1.11

winteriscoming
johnpapa
0.9.0

Same for me. Syntax Highlighting just doesnt work correctly after a yield statement:

@AnmolSinha1201 @mircmo We recommend setting csharp.semanticHighlighting.Enabled to true in VS Code settings. This appears to be an issue with the C# textmate grammar which is in this repo https://github.com/dotnet/csharp-tmLanguage

Thanks @JoeRobich it works with that setting :) Just out of curiosity, is there any reason why you would want to have this setting disabled to begin with?

@mircmo The implementation is still considered experimental and hasn't had a lot of work put in for performance. Also, there are some highlighting issues in the diff view.

Closing as semantic highlighting is available as well as many improvements have been made to the textmate grammar.


Update snowplow-runner-and-loader.sh to use JRuby binaries

Would it actually download the binaries from Bintray (so it could be used without a local copy of the Snowplow repo), or just build them locally?

Hey @fblundun - no deployment step, we would have a config line in the file which the user would edit to point to their local installed copies.

Sounds sensible.


PP-2495 AWS x-ray on application

Adds incoming request tracing/segmenting. This allows the flowing of traces from upstream services (self-service) into connector, which can then be visualised using the aws console, or called via the API.
Outbound http requests to any downstream services is a WIP and was previously failing build/test, so we are splitting the work up in order to get the quick win/advantages above.

We are duplicating AWS code ... did Oz not do work to make a common java module ? We should put this code there, but understand quick win now.


Fix the host returning data to the manycore

https://github.com/bespoke-silicon-group/bsg_f1/blob/fd9b3a4cb3b956d755d5433ab1ff193eb1efa050/hdl/axil_to_mcl.v#L426-L434
The host returning data format is wrong.
Thanks for @tommydcjung to point this!

Thanks Leonard!


Cannot connect to created web via Universal App / iOS App, using getbc

Using Universal Business Central App and/or iOS App I cannot connect to the BC web client end point.
From the browser it works OK for both phone and desktop.
I choose My Business Central is not in the cloud yet and provide the web url. It let us even authenticate and then it returns

Sorry, the page could not be found. - Please check the address and try again.

The URL used is like https://mydemo.westeurope.cloudapp.azure.com/NAV/
Config for getbc is pretty much all inclusive:

Image: mcr.microsoft.com/businesscentral/onprem:cz
AAD integration
Custom license
Windows Server 2019 with Containers

Any help/direction on how to make Universal App & Phone Client working with getbc out-of-the-box setup is greatly appreciated.

What docker container are you running?
It looks like the version of the universal app doesn't match the version of Business Central.

Docker container is: mcr.microsoft.com/businesscentral/onprem:cz
That same container works if I do not use AAD.

Im having the same issue with a non-docker onprem install using AAD. Web client works fine but universal app ends in "Sorry, the page could not be found" after successful login.
Still trying to find a way to debug whats happening. The traffic is TLS encrypted so I'm struggling to find the actual URL its trying to load.

Do we know what URL it is actually trying to load?
I have this issue on two different on-prem BC installs. Both using AAD but different BC builds.

Did you guys manage to solve this?

Never.
Had to spin up a separate server instance using NavUserPassword to get the customer running.

In the mobile app, you enter the URL of your service yourself - and your service will redirect to AAD signin. Just tried with https://fkaad.westeurope.cloudapp.azure.com/BC, which is an AzureVM with BC and letsencrypt. Works like a charm.
Will close this issue as the original issue seems not reproducable.
@kfuglsang if you have issues with non-docker setup with mobile apps, you should maybe try yammer or support.
thanks


feat(button): add new button variants

Description

Four new button variants have been added according to the design.
The old button variants have been marked as deprecated.
The old button variants in the stories have been replaced with the new variants.
A new mixin has been added for focus state, and it affects the old variants
The buttons in the test-app have been replaced with the new variants

Requirements
The requirements can be found here.
Design link: here
Screenshots
Primary Dark - Default

Primary Dark - Hover

Primary Dark - Active

Primary Dark - Focus

Primary Light - Default

Primary Light -  Hover

Primary Light -  Active

Primary Light -  Focus

Secondary Dark - Default

Secondary Dark - Hover

Secondary Dark - Active

Secondary Dark - Focus

Secondary Light - Default

Secondary Light - Hover

Secondary Light - Active

Secondary Light - Focus

Test App

Checklist:

[x] The commit messages follow the convention for this project
[ ] I have provided an adequate amount of test coverage
[x] I have added the functionality to the test app
[x] I have provided a story in storybook to document the changes
[x] I have provided documentation in the notes section of the story
[ ] I have added any new public feature modules to public-api.ts

I couldn't hide all of the screenshots using collapsible sections

@st3fun1 thanks for doing this work 👍
Usually when we mark something as deprecated, we raise a separate PR to remove the deprecated parts into the next branch. The next branch is what we use to create pre-releases of Canopy, test breaking changes and also ensure we release breaking changes together, making it easier for developers to consume them. next eventually gets merged into master creating a new major/breaking version of the Canopy package.
Are you also okay to do that PR into next alongside this work?
If that's not possible, we should raise an issue and perhaps see if we can get it added to a backlog (CC @elenagarrone).

Just taking a look at your commit message:

@st3fun1 thanks for doing this work 👍
Usually when we mark something as deprecated, we raise a separate PR to remove the deprecated parts into the next branch. The next branch is what we use to create pre-releases of Canopy, test breaking changes and also ensure we release breaking changes together, making it easier for developers to consume them. next eventually gets merged into master creating a new major/breaking version of the Canopy package. The PR is then referenced in this pinned issue so we can keep track: #698
Are you also okay to do that PR into next alongside this work?
If that's not possible, we should raise an issue and perhaps see if we can get it added to a backlog (CC @elenagarrone).

@owensgit I have a ticket in the FEP backlog to remove the deprecated buttons. I can pick this up.

@st3fun1 great work on this 👏
One thing I've noticed is that if you do a continuous click on the buttons the behaviour on the button tag is slightly different from the anchor tag:
https://user-images.githubusercontent.com/8397116/166669895-ea15f3f5-82f2-40ff-92f1-878e3a748cbd.mov
I think it happens for both primary and secondary buttons.

@st3fun1 could you also update the notes for the buttons to list the new variants please and add a deprecation message to the ones that are deprecated please?

@st3fun1 just FYI I have showed it to Alex Canning and he noticed that the hover state of the secondary dark button was incorrect in the designs. He will send me the update colour we need to use soon.

The secondary-dark button hover colours should be changed to:
border colour: --color-charcoal;
text colour: --color-charcoal

background color: --color-platinum

The design in invision has been updated too.


Add support for dependency tracking

To help diagnose server performance issues, it's be great to add support for Application Insight's dependency tracking feature
General:

Fix contract for Remote Dependency Data
Add track dependency method to the telemetry client

Django Middleware:

Set the parent ID for the request being processed (see #55)
Expose the request ID somehow so that clients can set the parent ID appropriately when calling track dependency. One way to do this is to just expose a telemetry client using thread local storage with the parent ID set to the request ID. (However, I don't think using TLS is recommended by the Django team.)

These changes are all prototyped here: https://github.com/twschiller/ApplicationInsights-Python/commit/fdff3d8fca64597fd2b3e408ed8a2af77d66ce02.
For those wondering how to track their SQL/cache dependencies when using Django:

SQL: wrap the CursorWrapper.execute and CursorWrapper.executemany methods
Redis (using django_redis): wrap the RedisCache.get method, which includes both the network call and the deserialization

This is excellent.  I'll try to dive through this in more depth over the next week (as my schedule allows, sorry :-) )

I would expect it to work with WSGIApplication as well.
Ps.
Here spec how it was in AI java SDK if that is any help:
https://github.com/Microsoft/ApplicationInsights-Java/blob/75f6b6ebbdc96209c085980e34df94d316f8015f/web/src/test/java/com/microsoft/applicationinsights/web/internal/correlation/TelemetryCorrelationUtilsTests.java

Could you rebase this against the latest in the develop branch and open a PR so we can review it?  I think that's the best approach.  Even if it's not finished yet, we can get it in and then start looking at what to improve.  (This will also get us over the CLA requirements).

I'm closing this in favor of https://github.com/Microsoft/ApplicationInsights-Python/issues/105 We will be addressing all distributed tracing scenarios as part of Open Census project


问题1：
可否帮忙定位一下第一个DELETE语句卡住的原因。
问题2：
请问这两种方式的在性能上有区别吗？

https://github.com/HashDataInc/bireme/blob/d7849334c4673da86965616a4bdd78d36df1dd30/src/main/java/cn/hashdata/bireme/ChangeLoader.java#L396-L397
I think the SQL statement should be
DELETE FROM public.bireme_test WHERE EXISTS (SELECT 1 FROM public_bireme_test WHERE public.bireme_test.id=public_bireme_test.id);
Is it a type mistake?
DELETE FROM " + table + " WHERE id in (" + sbt.substring(0,sbt.length()-1) + ");";
what do you mean by "sbt" ?
Besides, id is not always the primary key.

@DongJianzhi0223 How long does the query hang? Would you please show the result of select * from pg_stat_activity. Delete may be blocked by other operation.
Two queries have no performance differences .... if the planer is smart enough. But you must pay attention to compound primary key.

If delete operation executed more than 10 seconds. Delete query plan will be output into log. So also check your log for more information.
https://github.com/HashDataInc/bireme/blob/d7849334c4673da86965616a4bdd78d36df1dd30/src/main/java/cn/hashdata/bireme/ChangeLoader.java#L303

各位好：
好像是数据库的问题，我是用的是GP5.0的版本，数据库建好后，查询表格都没有问题，但是在执行JOIN等操作，或者查看表分布的语句时，也会出现HANG的现象，我们使用的主机是腾讯云，是否可以帮忙分析一下原因，我觉得HANG的问题导致执行delete操作不成功的原因。

Maybe you can check the UDP connectivity of cluster. Or switch gp_interconnect_type from icudp to tcp.
BTW: Greenplum community and mail list is a better place for this kind of issue.

您好：
之前安装的4.3.9的时候没有遇到这类的问题
我从5.0版本换回4.3在COPY数据的时候为什么一次COPY命令会出现三个用户来执行，而且都HANG在这里。
请问能协助帮忙定位一下问题吗？
十分感谢！！
原始邮件
发件人:Zhanwei<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>发送时间:2017年10月18日(周三) 17:09
主题:Re: [HashDataInc/bireme] 提问 (#20)
Maybe you can check the UDP connectivity of cluster. Or switch gp_interconnect_type from icudp to tcp.
BTW: Greenplum community and mail list is a better place for this kind of issue.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.


Spy on readonly property

Wouldn't it be good, to spy on a readonly property?

Basically, a readonly property is the same as a property with only a getter.
So you can configure it by using the gettersToSpyOn configuration property
as so -
// some-class.js

export class SomeClass {
  public readonly someReadOnlyProp = 4;
}

// my-test.js

beforeEach(()=>{

   someClassSpy = createSpyFromClass(SomeClass, {
      gettersToSpyOn: ['someReadOnlyProp'],
   });

  // This is using the jest API but you can do it for jasmine as well -
  someClassSpy.accessorSpies.getters.someReadOnlyProp.mockReturnValue(333);

  console.log(someClassSpy.someReadOnlyProp) // LOGS: 333
});


Add support for other languages

Thank you @alexbat98!
@Hua-san, @weifans, @Estanque could you please verify if this works for you as well?

I've tested and it works as expected.

Related issues are #18 and #2

Still not working with Chinese. In Chinese, whitespace is NOT required in front of  '@' and '＃' . So splitting string into words by _textString.componentsSeparatedByCharactersInSet(NSCharacterSet.whitespaceAndNewlineCharacterSet())  does not work.


Add circuit diagrams to source code

Summary
This PR finishes the task proposed by #7283.
When reading source code that is related to some circuits, it is often useful to be able to see the circuit. This PR adds circuit diagrams to source files that did not provide them.
Details and comments
I use the QuantumCircuit.draw function to generate the diagrams and copy them to the source code. Sometimes, I edit the diagram a little to make it more concise.
Other than the two files mentioned in the issue, this PR also modifies many other files. Nevertheless, there must be some files that have not been covered by this PR. If you find such a case, please let me know.
I did not try to add circuit diagram to the following types of source code:

the number of qubits is a variable, e.g., graph_state.py.
the circuit contains other types of variables, e.g., ion_decompose.py.
the circuit contains many branches, e.g., polynomial_pauli_rotations.py.
the circuit is too large, e.g., test_basis_translator.py.

In these cases, I think the circuit diagram would be too complex that it cannot help the reader to better understand the circuit.
In addition, I think there is no need to add a circuit diagram to

Jupyter Notebook output, e.g., controlledgate.py. When the user runs the program, they can see the circuit diagram.
Trivial cases, e.g., test_basicaer_integration.py. When there are only a few gates or all the gates are applied on a qubit, it is easy to imagine the circuit diagram.

close #7283

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.008%) to 83.089%

Totals

Change from base Build<PHONE_NUMBER>:
0.008%

Covered Lines:
51444

Relevant Lines:
61914

💛  - Coveralls

Not fully sure (I did not check the generated documentation by this PR), but shouldn't they be .. code-block::ed ?

Not fully sure (I did not check the generated documentation by this PR), but shouldn't they be .. code-block::ed ?

I see your point. You mean the style like this, right? The circuit will keep its format in the generated document. I was following the styles of test_dynamical_decoupling.py and test_instruction_alignments.py. Maybe it is also OK?

I was thinking about helping people read the source code. So I put some circuit diagrams in the middle of the program, close to the lines of the implementation. Should we consider more for the generated documentation? In that case, I will move more circuits to the docstring.

I see the problem. The following docstring
https://github.com/Qiskit/qiskit-terra/blob/1a9f93804f2696e3a6c119ecbebd3724df008dfa/qiskit/circuit/quantumcircuit.py#L434-L440
generates this document, which is not nice.
As a comparison, this one
https://github.com/Qiskit/qiskit-terra/blob/8c9e01d33f56da076b2a294698b43d59566fa3d0/qiskit/circuit/library/n_local/pauli_two_design.py#L40-L50
produces the right format.
I will change the docstrings that will be included in the documentation. However, for those that will not (e.g., test files and functions start with _), I will leave them as the current state.

Sometimes .. parsed-literal:: is used:
https://github.com/Qiskit/qiskit-terra/blob/d9ab98f2b3663b42ba354ed1cd2bc18b3f2cd19d/qiskit/circuit/library/standard_gates/rx.py#L29-L36
I'm not sure about the difference with .. code-block:: . Maybe a good moment to unify them all?

Yes, I also noticed that. I searched .. parsed-literal:: in my local repository and found about 170 results. Most of them are circuit diagrams. For .. code-block:: searching results, most of them are Python or C code. So I think parsed-literal is a better choice for circuit diagrams, leaving code-block really for code blocks. Do we have to unify all the usages? Many release notes use code-block to add circuit diagrams. Do we also need to change them to parsed-literal?

Do we have to unify all the usages? Many release notes use code-block to add circuit diagrams. Do we also need to change them to parsed-literal?

I think is make sense to have all the circuit diagrams as parsed-literal. But if it gets too long, we can do that in a follow up PR. As you prefer.

I have changed related code-block to parsed-literal. It turns out there are only a few of them. Now, the PR is ready for review.


can I use your trained model directly

If I want to compress my pictures, can I use your trained model directly or do I have to train with my own data set?

I still have doubts. How can I use your model to compress pictures? What format is the compressed picture? If you want to see the compressed picture, you also need to use your model to decompress it.

If you want to compress arbitrary images it would be better to train on the ADE20k dataset rather than the cityscapes dataset. For the ADE20k dataset you will need to write a script that resizes images to 512px width. The compression works by storing the image as a compressed intermediate representation that is restricted to integer values. The channel dimension of this compressed representation determines the compression factor, measured in bits per pixel. The authors choose C=2,4,8,16 in their paper. From what I understand, you need to use the decoder to retrieve the compressed image.
I haven't computed the memory footprint of the weight matrices explicitly, but should be fairly large, most likely the whole model is O(100) MB.
You can consult the paper for further details.

What is the difference between this decoder and the model and how large is the decoder?

The model consists of encoder -> quantizer -> decoder, the decoder is part of the model. I would estimate the size of the decoder weights to be O(100 MB).
If you want to understand the compression more thoroughly, I recommend reading the paper.

Thank you very much. I just want to use it directly in the project. I understand that if the decoder is so large, then it is not suitable for us to use in the project unless the number of pictures in the project is more than 10 times that of the decoder.


tables are converted to a single line

There are some changes in this project which do nice table converts: https://github.com/mtibben/html2text Could you merge these changes?

Do you want to maybe suggest a PR with these changes?

Oh, sorry this is a completely different code base. I don't really know what's going wrong but when converting tables the code just gives a single line of all field content.


Formatting Issues

Installed product versions

Visual Studio Code: 1.83.1
This extension: 1.3.0

Description
Formatting does really weird stuff with escaping and the | symbol if the newline option is turned off
Steps to recreate
Weird | Formatting

Write letter = "A" | "B" | "C" | "D" | "E" | "F";
Press Alt+Shift+F
It now for some reason removed all the spaces before the |

So now it would be letter = "A"| "B"| "C"| "D"| "E"| "F";

Not being able to write "\"

Write a term like "\\", "\\\\\\", '\\', "\", '\', '\\\\', it literally doesn't matter how many backslashes
Press Alt+Shift+F
Now it just completely deleted all the \ inside the terms

Current behavior
Explained above
Expected behavior
Not do that

@sten-code Those issues are fixed in version 1.3.1.
Can you install the new version and try if the formatting behaves as you expected?
NB: "" and '' are not valid strings because backslash is used as an escape character. To be valid you should escape it with a second backslash ("\" and '\' ).


PZEM-004 V3 + CC2530

I have an issue with reported power results. I used the latest firmware, z2m 1.39.0 and generated z2m custom converter. If you look in the attached picture, the voltage and current, the calculated power is much higher than expected (~10x higher?)

@bdariusb Could you please download and try the latest version? You should re-flash the firmware only.

@bdariusb I've removed this parameter from reporting because it is a constant 99.99% of time.

@bdariusb I've removed this parameter from reporting because it is a constant 99.99% of time.

Understandable, thanks


Added CardinalPGM in plugin.yml

So by typing /plugins, appear CardinalPGM which has more logic

@AngelCasillas01 If you want an explination on why I closed this, it is because when the project is built with maven, all variables in the plugin.yml are replaced. So when the jar is compiled with mvn clean install, the plugin.yml is correctly filled in.


Add Private ACL and download filename to admin-uploaded agreements

Fixes this bug: https://www.pivotaltracker.com/story/show/134844463
Our bulk upload script sets ACL=Private and a human-friendly filename, but our admin upload page wasn't.
I've moved the generate download filename method to utils so it can be used by both scripts and this frontend route.
Depends on:

[x] https://github.com/alphagov/digitalmarketplace-utils/pull/289

I'm happy with this is you are :+1:


Hello world, I'm ready

Really exciting to see this working.
ヘ( ^o^)ノ＼(^_^ )

This triggers an event?


The fitness in nasbench2_pred.py

In Nasbench2_pred.py, the value of accuracy was found to depend on the data in NAS-Bench-201-v1_0-E61699.pth. As mentioned in the paper, is synflow used as the fitness to measure the framework?

I'm sorry, I don't understand your question. If you can, please clarify the following:

what do you mean by "was found to depend on data in"? for nasbench201 accuracy of models is queried from the precomputed values released with the benchmark (that is, so the file you mentioned).
what do you mean by "fitness to measure the framework"? synflow is one of the zero-cost proxies that we study, that approximate accuracy of different networks. We report correlation (in the sense of produced rankings) of per-network scores produced by synflow (among other functions) to accuracy of the same networks obtained by querying nasbench201 benchmark data.

2. synflow
hi,
can  I filter the network using synflow as an fitness for the network? Instead of accuracy or error

Yes, it is meant to replace accuracy as a way of scoring networks

Yes, it is meant to replace accuracy as a way of scoring networks

thanks!!!!!!!,this is a good paper

synflow
hi，
The bigger the synflow, the better???

Yes, it is meant to replace accuracy as a way of scoring networks

hi,
The bigger the synflow, the better????

Yes.


How can I use nextVal on knex?

I have a database filled with 400 rows and I want to add some more rows, when I tried to use knex('tableName').insert({name: 'name', lastName: 'lastName', address: 'Address'} I got an error such as duplicated primary key constraint.
Does Knex recognize nextVal to add an element at the end of the table?

You have to update your databases id sequence to match the amount of data that you added to table (with hardcoded ids I suppose). This has nothing to do with knex. It depends on database how it can be done.

@elhigu On the seed file I hardcod the id of each row but when I want to insert a new element I got an error. I think that it can't add the new element at the end of the database.

There is no such thing as "end of the database" there is only id sequence that is used to generate id's for new rows that doesn't have id field give.
If you have hardcoded id:s in seed, it means that database will not call nextval to get the id for each row -> so table's id sequence remains in  initial value (1). So when next time you are inserting row, where you haven't given the id explicitly, DB gets the id from the id sequence and it will conflict.


Add support of custom routers rules

@VanyaDNDZ can you add something to the docs about how to use this?

I'm closing as the PR author failed to follow through on request from reviewers for additional documentation.

It's a pitty to close this PR, honestly. This might have been a great addition to Sanic. I'm even working on something similar on a side project. @sjsadowski perhaps I can continue where @VanyaDNDZ left?

I agree, but if we're going to add functionality we should have two things: unit tests for coverage and documentation of the new functionality. If we don't have either of those things, I don't think we can responsibly accept a PR.

Yes, I know. All I'm saying is that I can work on these missing points to provide a proper PR.

Sounds like a good option to me.


Right parenthesis in a filename breaks CSS output

Originally reported on Google Code with ID 163
STOP! If your issue is with URI rewriting, read the wiki first:
http://code.google.com/p/minify/wiki/CommonProblems#URIs_are_re-
written_incorrectly_in_CSS_output
Please remove this message from the issue.

Minify version:
PHP version: 2.1.3

What steps will reproduce the problem?
1. Use brackets in a filename in a CSS declaration e.g.
div.MultiBoxLoading
{
	background: url('/images/multibox/ajax-loader(2).gif') no-repeat center;
}

Expected output:
Minified CSS

Actual output:
Broken minified CSS

Did any unit tests FAIL? (Please do not post the full list)
Not sure what this means, sorry. I have only just started using minifier

Please provide any additional information below. If this has to do with URI
rewriting, please include your DOCUMENT_ROOT, the

Reported by weblator.test on 2010-02-19 15:47:40

I don't see an easy fix for this


Improvement: Generate links according to timestamps for quick-jumping

As a user, I would like to review the transcription and summary from the submitted video, and know where and at what points certain topics were discussed and brought up.
After knowing what time and point said items were discussed, I would like to have the option of reviewing that portion of the video for further/closer study.

Immediate naive thought is having segments summarized per X time, and then going back and collecting where the topic was discussed.
Second thought is maintaining a list of items discussed every X seconds, with a running list kept, annotated with the time the topic was brought up and a context to why it was brought up.
Third is having a running log of each item discussed and a timestamp to when it was introduced, and then for every time it was brought up again.
Either way, would require interaction from the user to specify what content and where they want to jump to.

https://www.assemblyai.com/docs/audio-intelligence/auto-chapters

I believe this will be implemented as an option for the user to insert the timestamp they want, and then a link will be generated for that URL, if it is a youtube video.

Done. Added to utiltiies sub-tab.
Paste in the URL, and give the timestamp, it pops out a URL.


how to make the widget clickable

like if some one click on editor role widget the table  only show those records whose role is editor
the ->extraAttributes([
'class' => 'cursor-pointer',
]), not working for me

Please use the discussions on filament/filament repo or our Discord for questions.


.NET 5 WPF application single file publishing error

Use Visual Studio to debug normally, and Debug also runs normally. I want to confirm what caused this exception. Where can I view it?
When creating a blank WPF application and publishing it, everything runs normally. It is most likely due to the nuget package in the project, or some aspect of the code. What I want to be sure is, if I find where the problem is?

This issue was moved to dotnet/wpf#3886


TextInput OnChangeText event fires before OnKeyPress

When using onKeyPress event and onChangeText event in TextInput I have a use case where I am updating the state value in onChangeText but I need the previous state value for my onKeyPress event but it happens to be that onChangeText is first updating the state value and then onKeyPress is receiving the updated value
Documentation Link: https://facebook.github.io/react-native/docs/textinput#onkeypress
React Native version:
System:
OS: Linux 4.15 Ubuntu 18.04 LTS (Bionic Beaver)
CPU: (12) x64 Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
Memory: 237.38 MB / 15.53 GB
Shell: 4.4.19 - /bin/bash
Binaries:
Node: 10.16.1 - ~/.nvm/versions/node/v10.16.1/bin/node
Yarn: 1.17.3 - /usr/bin/yarn
npm: 6.9.0 - ~/.nvm/versions/node/v10.16.1/bin/npm
SDKs:
Android SDK:
API Levels: 28, 29
Build Tools: 28.0.3, 29.0.0
npmPackages:
react: 16.8.6 => 16.8.6
react-native: 0.60.4 => 0.60.4
npmGlobalPackages:
react-native-cli: 2.0.1
Steps To Reproduce

clone the repository
run the app
use the remote debugger  and check in the console

Given Input: abc
onKeyPress is fired with backspace there the expected state value is abc
Repository link: https://github.com/srilalitharanikintali/onKeyPressIssue

+1


Default copyOnSelect to true

Description of the new feature/enhancement
Copy on select is very useful, could it be enabled by default?
It's quite weird when you select something and try to paste it somewhere else to find it doesn't work, because you're on a new machine with this setting disabled.

Thanks for the suggestion! While copyOnSelect is a handy feature that many users like, I don't think this is something we can change. If we changed this to the default behavior, then it'd apply to all our users, and I'm sure there are plenty who'd rather not have this behavior silently enabled for them on an update.
Thanks though!


What area(s) will this request affect?
Running your code locally
What type of change do you want to see?
New feature
Overview
Not too long ago, in 2020 there was the populate command which was a nice way for us to fill our development shops with stuff. That was subsequently canned.
Is there a way to get that back? It was nice to have.
Motivation
Empty stores suck. I could go on, but no need.

Thanks for your suggestion!
The template for new apps now includes a button to populate some products, but yeah, I agree we should add again a populate command with more options.
Cc: @stephszeto

I used this for now but would also appreciate this command being reintroduced
https://github.com/shopifypartners/product-csvs

This bot closer is harsh. While the CSV import is somewhat convenient, using code is also of some value. Has a chance to be more flexible a tool, and work with customers and orders too, something it used to do without much trouble.

We just launched a new feature at Winter Editions that allows you to pre-populate new dev stores with test data, which should help with empty new dev stores.
That aside, definitely understood that it'd be helpful to have a more automated way to populate stores in a more custom manner - we have a few ideas in the works that might help with that, but that'd be a down the road thing. Closing this out for now.

@stephszeto  Issue is no where near completed it's leaving existing stores and workflows out of the mix that need what the previous populate command facilitated since PRE-population is NOT population.
The generated-data feature is inherently flawed for DX as it insists on forcing duplicate work when the intent is to provide basic boilerplate we should never have to think about.
It doesn't even give a clear way to contribute common use cases of what data should be in or selectable (i.e. duplicate customers, products with seo.hidden metafield  ).
And that store is non-transferable  if iF IF you remember to make it a generated-data store during creation otherwise rinse-repeat.
It's requiring any workflow to spool up yet another store when ever there is an an existing store therefore meaning:
Complicating a project''s organization of stores has become a first class feature. Bonkers.
It also forgets, like most features do, that for merchants their live store IS their test store due to lack of proper sandbox/sync/clone/education features.  Creating a super easy way to get in a situation with 3 stores when taking on a client(live,dev, generated-data dev). ugh
After a decade it's still too easy to be have to spend more time shoring up constantly warping shopify tooling than making things with reliable first class tools , or enhancing those tools baseline.


Allow popping until a certain Location

Hi there!
While there is already support to popping everything until the root Location, it would also be handy to pop until a certain Location is reached.
I believe it is already possible by executing this on the Navigator directly, but this won't work when dealing with nested navigation.

Also related, it would be nice to be able to check if a certain Location was already in the current or parent stack.

Do you have an example scenario where you would want to pop a number of routes below the current route, where .reset() is not sufficient?

Yes, in the app I'm currently working on, there are some deeplinked screens that can be opened in various ways.
Simply put:

home screen -> items list -> item detail -> item action confirm screen
home screen -> item action confirm screen

When popping the last screen, we would like to pop to either the items list if it is currently in the stack, or to the home screen otherwise.
Currently we are resolving this (with auto_route) by checking if the items list screen is in the stack, pop until this screen, and otherwise pop till root.

Can you create this by creating items list under a StatefulLocation, and then calling .root() from item action confirm screen? That should give you the same behavior on both.
With DuckRouter I'm trying to be at least a little bit opinionated and avoid supporting unnatural mobile UX. I find that often popUntil does lead to unnatural patterns. If we have to support it, we can. But I'm just trying to find the specific use case of it :)

That sounds like a pretty good idea, I’ll try it out tomorrow!
And I do understand the reluctance. I love the simplicity, now you can actually understand what is going on under the hood.
I’m still thinking about opening up the Stack info though. Currently, we have a few async services running in the background, each of which can trigger a redirect to the login screen. We have had some issues in the past when this redirect is triggered from multiple services simultaneously, so we added a check to see if the login screen is in the stack (or last entry in the stack, can’t recall at this time), and only navigate if the login screen is not in the stack yet.
What do you think about exposing this info?

You could do:
      final router = ... // create/get DuckRouter
      router.routerDelegate.currentConfiguration.locations //do something here

or
      router.configuration.findLocation('login')

And maybe even more ways!
Providing an even easier way to solve this use case feels like it's stepping outside of our bounds as router authors. To me this use case seems like one wherein it's reasonable as package authors to say: this is something for the package user to implement state for.  Multiple services all triggering the same navigation seems like something to solve in general. Hope that makes sense.

I managed to get the popUntil working with the StatefulLocation, so that scenario is covered for me, thanks!
As for the stack info: I'm an idiot, I didn't realize you could access it like you mentioned 😅 I just tried it, and it works indeed as expected.
I did have some difficulties getting the root method to work, I'll create a separate issue for that.
Thanks for the help!


Tommy - Sprint 3

During this Sprint:

Finish constructing the robot
Code the arm motor

10/28
Assisted in attaching the intake to the robot

10/29
Swapped the servo controlling the arm for a motor since servos doesn't provide enough torque

10/30
Wire management
and uh... measured the wires and calculated we need to buy 7 encoder extenders

10/31
[
https://github.com/user-attachments/assets/2465234f-4528-49f7-bfe7-8613e6661005
](url)

11/1
Worked on PID for the arm motor

`

11/5
Coded PID for the arm
Filed a hook to fit on the robot

11/6
Coded some more! :D

11/7
Cable management for the robot
Helped with the portfolio
(forgot to take pictures today)

11/8
Changed the sliders back to its original angle
Attempted to tune PID for the arm motor


Enhancement: Customization of Prompts after RAG Execution

Enhancement Proposal:

Allow customers the flexibility to customize their prompts post-RAG. This will enable a more dynamic way of interacting with the chatbot, allowing customers to potentially achieve better results through prompt engineering.

Benefits:

Prompt Engineering: Customers will have a hands-on approach to experiment with different prompts and refine their chatbot queries, potentially leading to more accurate or desirable responses.
User Customization: Offering this flexibility can help cater to a wider range of user requirements and use-cases.
Enhanced User Experience: It can make the chatbot feel more interactive and user-friendly.

Great idea. Bouncing some thoughts about UX:
We have now the concept of workspace that defines the document retriever and the associated document to be used for RAG. We could then introduce the concept of a "chat persona", defined as a combination of an LLM and a set of prompts. The "default chat persona" for an LLM would be the one provided by Langchain ConversationalRetrieverChain. Additional personas can then be added by customizing the prompts.
In the Chatbot playground, one would then chose the "chat persona" instead of the LLM.
One could also introduce a testing playground, where it could be possible to add up to 5 combinations of chat personas and workspaces, and compare the results on a given set of queries (consider this a separate feature)


Admin status for search issue

When searching there was an issue where any type of user can search for users but It should be the admin who has that permission.
Changes -
app/dependencies.py -
def require_role_admin(current_user: dict = Depends(get_current_user)):
"""Dependency that checks if user is administrator or not. If not if gives error with status code 403"""
if current_user["role"] != "ADMIN":
raise HTTPException(status_code=403, detail="Only administrators can access this resource")
return current_user
db: AsyncSession = Depends(get_db),
current_user: dict = Depends(require_role_admin)  # Ensures only admin can have access

Issue fixed in this commit - c252891


OS X Guest Crashing (Mojave) (macOS Host)

Hi team,
love UTM, been using since a few years now on iOS and macOS.
Trying to run the following vm, but it crashes at boot with the following error:

Here is a zip of the macOS Crash Report:
QEMULauncher-2022-07-26-200410.ips.zip
Here is my VM (800MB):
https://www.mediafire.com/file/docw6gctfzbtzl8/Mojave.utm.zip/file
expires in 14 days ( August 9 )

This seems to be an QEMU issue with the latest version. I would try messing around with the config until it works in QEMU or to report a bug to them.


LogonTrigger registration causes Access Denied exception

Originally posted by Alger (see discussion). Try attached file and let me know if it produces different results. The executable is in the bin\Release directory and this is a console app. If you run it from a console window, then you need to make sure you have started the console window in administrator mode. Let me know if this works. It works fine on two different Win7 systems here.
Originally posted: 2011-06-08T14:15:16

Determined to a problem with debugging under Visual Studio while not running as Adminstrator.
Originally posted: 2011-06-09T16:41:38


Rhino/GH Converter should use ContextDocument first, then fallback to ActiveDoc

Description

Fixes #745

Type of change

Bug fix (non-breaking change which fixes an issue)

How has this been tested?
Manual conversions providing a custom RhinoDoc using Converter.SetContextDocument(customDoc);

[x] Point, Mesh, Polyline, Surface, Brep, Circle, Rectangle (Rhino -> Speckle -> Rhino)

Manual conversions without providing a custom RhinoDoc (should fallback to RhinoApp.ActiveDoc);

[x] Point, Mesh, Polyline, Surface, Brep, Circle, Rectangle (Rhino -> Speckle -> Rhino)

Docs

No updates needed

Thanks! Will review soon :)


[build system] Make ica usage more robust

ica_set_checks function is removed. New functions:

add_ica_checks (target_ica_checks) - add checks for directory (target)
ica_no_url (target_ica_no_url) - pass 'no-url' option to ICA
add_ica_options (target_ica_options) - pass any options to ICA

Smth wrong with artifact publishing:
Error: Artifact name is not valid: feature/robust-ica_set_checks-artifact. Contains the following character:  Forward slash /

@EgorkaZ, we need to transform branch name somehow so that artifact name is valid?

I've done some changes in our workflows. I'm not really sure how it works with GitHub, but you need to re-run the jobs somehow. Maybe you can rebase on the fresh main branch


Unable to load session

Hello,
When I try to load a saved session, I get the following error:

Error detected while processing BufLeave Auto commands for "NERD_tree_*":
E121: Undefined variable: b:NERDTree

Thank you in advance :)

Hi,
Can you give a minimal example for reproducing? Just saving any file + nerdtree and reloading doesn't thrown an error for me, although the nerdtree window is blank of course, since local variables don't get saved.
What is your sessionoptions set to and do you have any startify options set?

Thank you for your answer :)
So the steps to reproduce :  open gvim from a directory, save the session, save file and close gvim. Reopen gvim, and, from startify, choose the previously saved session.
Concerning the sessionoptions, I haven't touched anything.
Here are all the options concerning startify in my vimrc:

autocmd VimEnter *
                \   if !argc()
                \ |   Startify
                \ |   NERDTree
                \ |   wincmd w
                \ | endif
let g:startify_session_dir = '~/.vim/sessions'
let g:startify_list_order = [
    \ [ '   Recent files:'],
    \ 'files',
    \ [ '   Recent files in this dir:' ],
    \ 'dir',
    \ [ '   Sessions:' ],
    \ 'sessions']
let g:startify_files_number = 5
let g:startify_custom_indinces = ['f', 'g', 'h']
let g:startify_custom_header =
      \ map(split(system('fortune | cowsay'), '\n'), '"   ". v:val') + ['','']

Thank you again :)

open gvim from a directory, save the session, save file and close gvim

Which file?
Please give the exact commands. What I did:
$ vim (now I have NERDTree left and Startify right)
:SS foo (save session)
:qa (quit Vim)
$ vim
:SL foo
Then I get:
Error detected while processing /Users/mhi/.dotfiles/vim/session/foo:
line   23:
E95: Buffer with this name already exists

...since NERDTree tries to open a new window called "NERD_tree_1" again.

Oh, sorry for not having being precise enough :/
So when the file I was talking about was about was just a test file to be saved in the session.
So to be clearer, once I performed an :SS I closed vim. Then when I opened it again and chose the session from startify, I got this error.

Okay, I'm using the latest version of Vim, nerdtree and startify.
call plug#begin('~/.vim/bundle')
  Plug 'scrooloose/nerdtree'
  Plug '/data/github/vim-startify'
call plug#end()

au VimEnter *
      \   if !argc()
      \ |   Startify
      \ |   NERDTree
      \ |   wincmd w
      \ | endif

This is the whole vimrc. (You can use :finish to stop sourcing the vimrc at a certain line.)
$ vim
:e ~/.vim/vimrc (so I have nerdtree on the left, file on the right)
:SS foo
:qa
$ vim
<choose foo>
I still get the same thing I got before:
Error detected while processing /Users/mhi/.dotfiles/vim/session/foo:
line   27:
E95: Buffer with this name already exists

Okay, so i'm really sorry but it seems that uninstalling plugins and reinstalling them did the trick :)
So now when loading the session everything is okay :)
Thank you very much and sorry for all the trouble

Hah, no problem. I'm glad it's working now. :-)


Web service wrapper around ludwig

I'm trying to make ludwig more accessable from other languages by wrapping it in a webservice (cherrypy)
When i try to make a call to the webservice to train a model i get the error:
 signal only works in main thread

I'm looking for some context around how these signals are used inside ludwig. I assume this could be resolved by starting ludwig in a separate process and then setup a socket connection between the ludwig process and the cherrypy web service.
This is the relevant code i have so far:
service in cherrypy:
class AiWebService(object):

    @cherrypy.expose
    @cherrypy.tools.json_in()
    @cherrypy.tools.json_out()
    def train(self):
        data = cherrypy.request.json
        if 'training_samples' not in data:
            return RecursiveError('"training_samples" property is required on body to begin training').to_json()
        if 'definitions' not in data:
            return RecursiveError('"definitions" property is required on body to begin training').to_json()

        training_samples = pd.DataFrame(data.get('training_samples'))
        definitions = data.get('definitions')
        output = p.train(training_samples, definitions)
        return output

if __name__ == '__main__':
    cherrypy.config.update({'server.socket_host': '<IP_ADDRESS>'})
    cherrypy.quickstart(AiWebService())

https://gitlab.com/bertyhell/woody-puzzle-solver/blob/master/src/server/ludwigproxy.py
wrapper around the ludwig api:
    def train(self, training_samples, model_definitions):
        model = LudwigModel(model_definitions)
        train_stats = model.train(training_samples)
        return {'message': 'ok'}

https://gitlab.com/bertyhell/woody-puzzle-solver/blob/master/src/server/service.py
full error:
ERROR:cherrypy.error.2203522445776:[14/Apr/2019:11:34:47] HTTP
Traceback (most recent call last):
  File "C:\Users\verhe\AppData\Local\Programs\Python\Python36\lib\site-packages\cherrypy\_cprequest.py", line 628, in respond
    self._do_respond(path_info)
  File "C:\Users\verhe\AppData\Local\Programs\Python\Python36\lib\site-packages\cherrypy\_cprequest.py", line 687, in _do_respond
    response.body = self.handler()
  File "C:\Users\verhe\AppData\Local\Programs\Python\Python36\lib\site-packages\cherrypy\lib\encoding.py", line 219, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "C:\Users\verhe\AppData\Local\Programs\Python\Python36\lib\site-packages\cherrypy\lib\jsontools.py", line 59, in json_handler
    value = cherrypy.serving.request._json_inner_handler(*args, **kwargs)
  File "C:\Users\verhe\AppData\Local\Programs\Python\Python36\lib\site-packages\cherrypy\_cpdispatch.py", line 54, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "C:/Users/verhe/Documents/storied/repos/woody-puzzle-solver/src/server/service.py", line 26, in train
    output = p.train(training_samples, definitions)
  File "C:\Users\verhe\Documents\storied\repos\woody-puzzle-solver\src\server\ludwigproxy.py", line 7, in train
    train_stats = model.train(training_samples)
  File "C:\Users\verhe\AppData\Local\Programs\Python\Python36\lib\site-packages\ludwig\api.py", line 494, in train
    debug=debug
  File "C:\Users\verhe\AppData\Local\Programs\Python\Python36\lib\site-packages\ludwig\train.py", line 383, in train
    **model_definition['training']
  File "C:\Users\verhe\AppData\Local\Programs\Python\Python36\lib\site-packages\ludwig\models\model.py", line 363, in train
    signal.signal(signal.SIGINT, self.set_epochs_to_1_or_quit)
  File "C:\Users\verhe\AppData\Local\Programs\Python\Python36\lib\signal.py", line 47, in signal
    handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))
ValueError: signal only works in main thread

Ludwig uses signals in model.py for allowing the user to interrupt training and still completing the process.
Not sure what causes the problem with cherrypy, I guess it doesn't like the use of signal, probably because it manages signals itself.
I would suggest to try to pull the code from master, and add a check threading.current_thread() == threading.main_thread() as suggested in this StackOverflow question before importing signal and before line 387 in model.py.
Let me know if it works because in case you can do a PR or I can add it myself.

@w4nderlust Yes, that fixed it
Thank you for the clear indications on where to look
I love the package btw. The documentation is great :D

Thanks! You are welcome. Closing this.
Let me know if you are considering doing a PR for the cherrypy server itself, it would be useful to many users!


cars: log non-critical car faults

adds field to carstate and an event to log when some portion of the car's ADAS systems are faulted, but openpilot can still engage. for example, the camera on Nidec (and many others) wants to display a faulted signal but we block and send our own. this should only be used to log superficial faults, nothing that prevents any kind of control

this would have exposed the cause behind https://github.com/commaai/openpilot/issues/27961 earlier!


Add macro to generate model templates

It would be nice if a modeller can do e.g.:
gen_model("process_name", "model_name")

or
gen_model(AbstractProcessModel, "model_name")

And the function would provide template Julia code for the model implementation as a print to the REPL (with Term.jl) or written in a file.
Also, that would be nice to give inputs / outputs / dependencies as an argument.

Abandoning this feature. This is not necessary and even may add more harm than good as users wouldn't go into checking their implementation is good.


Unable to edit User in admin panel

Terms

[X] Before you openning this issue, i have checked if the issue has already been reported.

Bagisto Version(s) affected
2.x
Issue Description
Want to edit the User in the admin panel but getting exception
Preconditions
User should be LoggedIn
Steps to reproduce

Goto Admin panel -> Settings -> Users
Now edit the user and Status disable then click on save button, but getting exception in console.

Expected Result
User should be editted from admin panel
Actual Result
Getting exception in console
Screenshots

Additional context
No response

@mukulsharma-webkul not able to get issue please check
https://github.com/bagisto/bagisto/assets/121868701/fc0da3c7-f068-4eb1-a0d5-46366aab1498

@shivendra-webkul , in the edit user page -> Status enable/disable button is there,
-> If we disable the Status toggle button then the user is unable to edit.
Video -
https://webkul.chatwhizz.com/share/view-recording/64f81e8ded7413059a8452d9

Now, this issue is fixed. so I am closing this issue.
And I have attached a screenshot Here, for future reference.


fixed the responsiveness of canvas board

I fixed the responsiveness of canvas board
@DhanushNehru please review and merge

Please check in mobile devices
The place i keep my finger & the distance where it draws is not in sync @Bluebberies

ok
let me check

please @DhanushNehru i'm facing some problems, is there any way you could assist me with it?


SAK-41421 Sign-up Tool- unable to create Sign-up for multiple sites a…

…t the same time

#6786 Is also a solution for this problem, let the community decide what's best, if hide the component to the instructor when doesn't have a choice or show a message saying that doesn't have a choice.


feat: editor highlighting for wikilinks & references

Wikilinks are now highlighted, with the aliases being italicized. If the note is not found, then these are highlighted differently to make them stand out.
I'm not sure if these are a good way to highlight wikilinks, so I'd like some feedback on what people think.
Dark theme:

Light theme:

For invalid states (eg. vault or link doesn't exist), I would associate a warning color (eg. orange or red). when in doubt, the bootstrap color codes are useful

warning color (eg. orange or red)

This is actually using a theme-dependent warning color (the color comes from the theme). Should I keep that, or set a custom color?

Please use theme-dependent colours.


Rename project so it can be packaged with the correct name

This is done so that there is no conflict between this package and an identical package that lives in the Lincoln feed.

Superseded by PR #2


US_3.13: Lable email drafts for acceptance and rejection

As
organizer
I want to
define lables for email drafts and filter the list of existing email drafts accordingly
in order to
simplify finding old drafts.
Tasks
Acceptance criteria

When an organizer defines an email drafts, then he / she can add multiple lables to the draft.

Organizers can create new labels with a name and a color.

When loading email drafts, organizers can filter the list of drafts by selecting multiple lables. The resulting filter searches for drafts with all the selected labels present. (AND conjunction)

Labels are persistent.

Depends on: US_3.10 (Refs #39) and US_3.13: (Refs  #53)

Belongs to Epic_3.2: Emails (Refs #57)


Fixed typo in StatusId

Fixed a typo where StatusId was StausId.
Perhaps StatusId could be replaced by an actual enum indicating the current status?

Hello @sthewissen,
Thank you for your contribution! Could you please update the PR branch to target the develop branch?


WIP: Custom Json Error messages

The direction I was taking was to allow overriding of the error messages in the traits .
I'm open to using implicits instead, just need suggestions.

[X] Jawn Custom Parse Error Messages
[x] Argonaut Custom Decode Errors
[ ] Circe Custom Decode Errors

@rossabaker Switched to a builder pattern to see what it would look like.  I can continue with that if I get the :+1:  up.

This seems like it's on the right track to me.


Optimizing use the QueryCache

Description
In my use-case, I discover the utilization percentage of QueryCache(with a capacity of 3GB and only 50MB used) is extremely low. Most of the queries are as follows:
POST index1/_search
{
   "size": 300,
   "query": {
      "bool": {
         "filter": [
            {
               "terms": {
                  "user_type": [0, 1, 3, 5, 4, 6]
               }
            }
         ],
         "should": [
            {
               "match": {
                  "name_ik": {
                     "query": "ab cd ed gh",
                     "operator": "OR",
                     "analyzer": "ik_max_word",
                  }
               }
            }
         ]
      }
   }
}

should-match condition will match over 500 documents, and the query value keeps changing, due to the should clause, it won't be cached by QueryCache.
filter-terms will match over 100,000,000 documents,  the user_type has several fixed values,  it will also not be cached because of the skipCacheFactor(100,000,000 / skipCacheFactor > 500).
https://github.com/apache/lucene/blob/067b472a320077b73597743aad33977b8400c22a/lucene/core/src/java/org/apache/lucene/search/LRUQueryCache.java#L773

There seem to be several points for optimization:

When the utilization percentage of QueryCache is not full utilized, can we loosen the restrictions to cache more queries that don't meet the current conditions?
User could be allowed to dynamically modify the skip_factor of QueryCache. Alternatively, this parameter could be deprecated, If a query meets  minFrequencyToCache, meaning it is frequent, it should be placed into QueryCache.

Furthermore, if user were able to dynamically adjust maxSize, maxRamBytesUsed in QueryCache, considering that the overhead of such adjustments is rather small.

I believe query cache is highly customizable: QueryCache is just an interface; you can implement whatever you want. And the main impl LRUQueryCache has many extension points, esp. including QueryCachingPolicy. Have you tried to implement what you want using these tools?
As a side note, it's generally not effective or appreciated to call out individuals in public here or on the mailing list unless there is some ongoing dialog. Not sure if Adrien is already engaged with you on this?

Thank you very much for your reminder. I apologize for my offense and I will not do it again next time.
It seems that the QueryCachingPolicy fails to fulfill my all requirements, it supports method: shouldCache, which can relax the requirements when there is a large amount of cache space available.
And I also hope that the cache size can be adjusted dynamically, considering that the overhead of such adjustments is rather small.


workflow.from_url is not taking url

Workflow.from_url seems taking a static helloworld.yaml
https://github.com/CermakM/argo-python-dsl/blob/master/argo/workflows/dsl/_workflow.py#L279

Fixed in #14 Thanks!


semicolon/comma

Hi!
I am working on import of csv file - in csv file, i've got field delimeter = semicolon, and when I am importing file i am getting an error:
KeyError: u'Column 'NumeroCommande' not found in dataset. Available columns are: [u'NumeroColis;"NumeroCommande";']'
So it seems, that it takes all the columns and melting it in one.
If there is a comma set as a field_delimeter there is no problem with importing file.
Is there a way to replace semicolon with comma in your code while importing a file?

Looks like tablib now supports custom delimiter, see here https://github.com/kennethreitz/tablib/commit/70716fdd216755dc4b542df74e95b0e5ac74f0ee

As an example for @klabedz and anyone else, I just did this to add semicolon CSV support to a project I'm working on:
from import_export.formats import base_formats

class SCSV(base_formats.CSV):

	def get_title(self):
		return "scsv"

	def create_dataset(self, in_stream, **kwargs):
		kwargs['delimiter'] = ';'
		return super().create_dataset(in_stream, **kwargs)

# ...

# within the Admin subclass that uses ImportMixin or ImportExportMixin:
	def get_import_formats(self):
		return self.formats + (SCSV,)

The answer of @mgrdcm it's almost good but it doesn't work for me, I've solved it with (based on @mgrdcm answer):
from import_export.formats import base_formats

class SCSV(base_formats.CSV):

	def get_title(self):
		return "scsv"

	        def create_dataset(self, in_stream, **kwargs):
                    kwargs['delimiter'] = ';'
                    kwargs['format'] = 'csv'
                    return tablib.import_set(in_stream, **kwargs)

# ...

# within the Admin subclass that uses ImportMixin or ImportExportMixin:
	def get_import_formats(self):
		self.formats += [SCSV]
                return [f for f in self.formats if f().can_import()]

I'm having the following error when I try to import semicolom csv...
"NameError encountered while trying to read file:"

I'm having the following error when I try to import semicolom csv...
"NameError encountered while trying to read file:"


Add additional sensors

I think, these are useful sensors for the Nest Protects.

Thanks! Ignoring the failing tests for now, not related to your PR.


Formatting options

Here's a reference from a Java file:

I would like to move the ordering of the symbols, text etc. around, and display the return types  instead of package names and what not.
Is there a way to format completion items like you can in nvim-cmp?

You're looking for windows.autocomplete.draw

Config
      autocomplete = {
        min_width = 80,
        draw = function(entry)
          print("foo")
         //..
        end,
      },

Are you sure that this works? I'm getting:
Error executing vim.schedule lua callback: .../projects/blink.cmp/lua/blink/cmp/windows/lib/render.lua:126: attempt to perform arithmetic on a nil value
stack traceback:
	.../projects/blink.cmp/lua/blink/cmp/windows/lib/render.lua:126: in function 'get_max_lengths'
	...rojects/blink.cmp/lua/blink/cmp/windows/autocomplete.lua:274: in function 'draw'
	...rojects/blink.cmp/lua/blink/cmp/windows/autocomplete.lua:73: in function 'open_with_items'
	.../ibrahimdelice/projects/blink.cmp/lua/blink/cmp/init.lua:49: in function <.../ibrahimdelice/projects/blink.cmp/lua/blink/cmp/init.lua:46>

Please read the existing draw functions and the function signature :)

I'm not sure I understand your documentation correctly.. can you please provide an example on how to use your implementation?

@idelice
draw = function(ctx)
    -- https://github.com/Saghen/blink.cmp/blob/819b978328b244fc124cfcd74661b2a7f4259f4f/lua/blink/cmp/windows/autocomplete.lua#L285-L349
    -- differentiate LSP snippets from user snippets and emmet snippets
    local icon, source = ctx.kind_icon, ctx.item.source
    local client = source == "LSP" and vim.lsp.get_client_by_id(ctx.item.client_id).name
    if source == "Snippets" or (client == "basics_ls" and ctx.kind == "Snippet") then
        icon = "󰩫"
    elseif source == "Buffer" or (client == "basics_ls" and ctx.kind == "Text") then
        icon = "󰦨"
    elseif client == "emmet_language_server" then
        icon = "󰯸"
    end

    -- FIX highlight for Tokyonight
    local iconHl = vim.g.colors_name:find("tokyonight") and "BlinkCmpKind"
    or "BlinkCmpKind" .. ctx.kind

    return {
        {
            " " .. ctx.item.label .. " ",
            fill = true,
            hl_group = ctx.deprecated and "BlinkCmpLabelDeprecated" or "BlinkCmpLabel",
            max_width = 45,
        },
        { icon .. ctx.icon_gap, hl_group = iconHl },
    }
end,

@idelice
draw = function(ctx)
    -- https://github.com/Saghen/blink.cmp/blob/819b978328b244fc124cfcd74661b2a7f4259f4f/lua/blink/cmp/windows/autocomplete.lua#L285-L349
    -- differentiate LSP snippets from user snippets and emmet snippets
    local icon, source = ctx.kind_icon, ctx.item.source
    local client = source == "LSP" and vim.lsp.get_client_by_id(ctx.item.client_id).name
    if source == "Snippets" or (client == "basics_ls" and ctx.kind == "Snippet") then
        icon = "󰩫"
    elseif source == "Buffer" or (client == "basics_ls" and ctx.kind == "Text") then
        icon = "󰦨"
    elseif client == "emmet_language_server" then
        icon = "󰯸"
    end

    -- FIX highlight for Tokyonight
    local iconHl = vim.g.colors_name:find("tokyonight") and "BlinkCmpKind"
    or "BlinkCmpKind" .. ctx.kind

    return {
        {
            " " .. ctx.item.label .. " ",
            fill = true,
            hl_group = ctx.deprecated and "BlinkCmpLabelDeprecated" or "BlinkCmpLabel",
            max_width = 45,
        },
        { icon .. ctx.icon_gap, hl_group = iconHl },
    }
end,

Thanks!

@idelice
draw = function(ctx)
    -- https://github.com/Saghen/blink.cmp/blob/819b978328b244fc124cfcd74661b2a7f4259f4f/lua/blink/cmp/windows/autocomplete.lua#L285-L349
    -- differentiate LSP snippets from user snippets and emmet snippets
    local icon, source = ctx.kind_icon, ctx.item.source
    local client = source == "LSP" and vim.lsp.get_client_by_id(ctx.item.client_id).name
    if source == "Snippets" or (client == "basics_ls" and ctx.kind == "Snippet") then
        icon = "󰩫"
    elseif source == "Buffer" or (client == "basics_ls" and ctx.kind == "Text") then
        icon = "󰦨"
    elseif client == "emmet_language_server" then
        icon = "󰯸"
    end

    -- FIX highlight for Tokyonight
    local iconHl = vim.g.colors_name:find("tokyonight") and "BlinkCmpKind"
    or "BlinkCmpKind" .. ctx.kind

    return {
        {
            " " .. ctx.item.label .. " ",
            fill = true,
            hl_group = ctx.deprecated and "BlinkCmpLabelDeprecated" or "BlinkCmpLabel",
            max_width = 45,
        },
        { icon .. ctx.icon_gap, hl_group = iconHl },
    }
end,

Thanks!

@idelice does this work for you? I've raised an issue yesterday https://github.com/Saghen/blink.cmp/issues/161 which seems quite similar to this one. Tried the code above, but it doesn't work for me (still shows package names instead of return type)

@idelice
draw = function(ctx)
    -- https://github.com/Saghen/blink.cmp/blob/819b978328b244fc124cfcd74661b2a7f4259f4f/lua/blink/cmp/windows/autocomplete.lua#L285-L349
    -- differentiate LSP snippets from user snippets and emmet snippets
    local icon, source = ctx.kind_icon, ctx.item.source
    local client = source == "LSP" and vim.lsp.get_client_by_id(ctx.item.client_id).name
    if source == "Snippets" or (client == "basics_ls" and ctx.kind == "Snippet") then
        icon = "󰩫"
    elseif source == "Buffer" or (client == "basics_ls" and ctx.kind == "Text") then
        icon = "󰦨"
    elseif client == "emmet_language_server" then
        icon = "󰯸"
    end

    -- FIX highlight for Tokyonight
    local iconHl = vim.g.colors_name:find("tokyonight") and "BlinkCmpKind"
    or "BlinkCmpKind" .. ctx.kind

    return {
        {
            " " .. ctx.item.label .. " ",
            fill = true,
            hl_group = ctx.deprecated and "BlinkCmpLabelDeprecated" or "BlinkCmpLabel",
            max_width = 45,
        },
        { icon .. ctx.icon_gap, hl_group = iconHl },
    }
end,

Thanks!

@idelice does this work for you? I've raised an issue yesterday #161 which seems quite similar to this one. Tried the code above, but it doesn't work for me (still shows package names instead of return type)

I've just quickly tried to see if I could format anything at all.
I haven't added my personal formatting to it yet.. I'll probably do that in the next couple of days when I have more time between my hands.
But I hope I can reach the same formatting level as I've done with nvim-cmp:

Thanks. If you manage to figure it out, please do post the results here as well :)

Thanks. If you manage to figure it out, please do post the results here as well :)

Here's how i extract the return type from methods and show it on the far right side of the window. the returnType variable is doing the magic here:
        draw = function(ctx)
          local icon = ctx.kind_icon
          local source = ctx.item.source_name
          local client = source == "LSP" and vim.lsp.get_client_by_id(ctx.item.client_id).name
          local returnType = ""

          if source == "LSP" and client == "jdtls" then
            if ctx.kind == "Method" then
              returnType = string.match(ctx.label, "%s*:%s*(%w+)")
            end
          end

          if source == "Buffer" or (client == "jdtls" and ctx.kind == "Text") then
            icon = "󰦨"
          end

          local iconHl = vim.g.colors_name:find("cyberdream") and "BlinkCmpKind" or "BlinkCmpKind" .. ctx.kind

          return {
            {
              icon .. ctx.icon_gap,
              hl_group = iconHl,
            },
            {
              " " .. ctx.label .. " ",
              fill = true,
              hl_group = ctx.deprecated and "BlinkCmpLabelDeprecated" or "BlinkCmpLabel",
              max_width = 80,
            },
            {
              " " .. returnType .. " ",
              fill = true,
            },
          }
        end,

Output

Thank you! This looks exactly like what I want - would you mind posting your entire blink.cmp config?