Do not create container samples if no metrics returned

Does not create artificial container usage samples for a given resource if no usage metrics were returned for that container resource. This was causing issues, where for custom metrics like committed JVM heap, it would checkpoint usage samples of 0. Then, due to extrapolation from the histogram, this would generate a recommendation of 10M.
BEFORE (JVM heap metric for a Golang service):

AFTER (JVM heap metric for a Golang service):

The default behavior was to always create container usage samples for all queried resources. This made sense for native CPU and memory because those usage metrics are expected to always exist for every container. However, that is not the case for custom metrics.

@yanbinren Thanks! We already set the default to 0 here https://github.com/jodzga/autoscaler/pull/10. The bug is more subtle, where we add usage samples of 0 to the histogram, and since it falls into the first bucket, we lose precision and then it becomes extrapolated as 10M.


This is not the master branch, and 1.13 is latest stable.

Noticed that the 1.13.1 tag had a Readme which said it was the master branch. Also, while ~> 1.10 works fine, it doesn't make the user use a more recent version.
This PR updates both.
Thanks!

Looks reasonable to me :+1:

Thank you sir.

Thank you! And thank you for all of your work on this project!


Switch SCM Provider action is not consistent when triggered with and without workspace

Testing #23311

Register a sample scm provider extension

Open VS Code with above extension on no-workspace

Run the command SCM: Switch SCM Provider

You see only the sample SCM Provider from above extension

Open VS Code with above extension on a workspace

Run the command SCM: Switch SCM Provider

You see two providers Git and provider from above extension

It should either show both or none.

Not sure if that is related, but my SCM provider is only listed when no folder is open. Still trying to figure out how to make it work with a folder.

Ignore my comment above, there was another window open...

@sandy081 Currently, the Git provider isn't created in a non-workspace window, so it doesn't show up in the list in that case.


Cannot save data files after #254.

- Do you want to request a feature or report a bug?
bug
- What is the current behavior?
After #254 (the new editor) was added, any data file on the example site (test-repo backend), whether it contains a markdown field or not, can no longer be saved. The console error is:
Uncaught TypeError: Cannot read property 'reduce' of undefined
    at runSerializer (serializeEntryValues.js?6de9:31)
    at serializeValues (serializeEntryValues.js?6de9:62)
    at eval (entries.js?c1a9:279)
    at eval (index.js?8a13:9)
    at eval (bindActionCreators.js?b33a:3)
    at eval (EntryPage.js?2e7b:100)

- If the current behavior is a bug, please provide the steps to reproduce.

Run the example site, or any site with a config with a data file like this: https://github.com/netlify/netlify-cms/blob/6af9a3155c794cec697bc0722907c738200e292b/example/config.yml#L29-L46.
Open the CMS and edit the data file (settings.json in the example).
Try to save the entry.

- What is the expected behavior?
The entry should be saved.

Tracing this back, at this line collection.get('fields') is resolving to undefined:
https://github.com/netlify/netlify-cms/blob/ac8df984074fec231a470ad2aaca5fe3299049f0/src/actions/entries.js#L279
I'm thinking this is because data file collections, instead of having fields directly, have files which then have their own fields.


Linting nextcord

Summary
Linted nextcord to be more readable; And Fully follow pep8
Checklist

[x] If code changes were made then they have been tested.

mmmm not sure about this now, linting code you did not make can cause issues

actually i agree with epic to make this a cd/ci process so i am gonna close this


Import the redigo package in traefik plugins prompts an error

The following program sample.go triggers an unexpected result
package main

import (
	"github.com/gomodule/redigo/redis"
)

Expected result
Can start traefik normally

Got
2022/02/16 17:16:57 traefik.go:79: command traefik error: infra/traefik-plugins/ratelimiter: failed to import plugin code "infra/traefik-plugins/ratelimiter": 1:21: import "infra/traefik-plugins/ratelimiter" error: plugins-local/src/infra/traefik-plugins/ratelimiter/leakybucket.go:5:2: import "github.com/gomodule/redigo/redis" error: plugins-local/src/infra/traefik-plugins/ratelimiter/vendor/github.com/gomodule/redigo/redis/conn.go:236:20: cannot use type func(*net.Dialer, context.Context, string, string) (net.Conn, error) as type func(context.Context,string,string) (net.Conn,error) in assignment

Yaegi Version
github.com/traefik/yaegi v0.11.2
Additional Notes
vim plugins-local/src/infra/traefik-plugins/ratelimiter/leakybucket.go
import "github.com/gomodule/redigo/redis"

experimental:
    rateLimit:
      moduleName: infra/traefik-plugins/ratelimiter

@kk-kwok @mvertes  any workaround for this? facing the same problem

i have same problem

I am facing a similar problem with a library using net.Dialer.DialContext when trying to import the HashiCorp Vault API.
To repro:
>yaegi -syscall -unsafe -unrestricted github.com/hashicorp/go-cleanhttp
run: /home/nf/go/src/github.com/traefik/plugindemo/vendor/github.com/hashicorp/go-cleanhttp/cleanhttp.go:26:16: cannot use type func(*net.Dialer, context.Context, string, string) (net.Conn, error) as type func(context.Context, string, string) (net.Conn, error) in struct literal

I've also faced a similar issue when trying to develop traefik plugin (which uses yaegi as interpreter for code) and importing "cloud.google.com/go/pubsub". I've got the error:
 error="github.com/Lasica/traefic-pubsub-forwarder: failed to import plugin code \"github.com/Lasica/traefic-pubsub-forwarder\": 1:21: import \"github.com/Lasica/traefic-pubsub-forwarder\" error: plugins-local/src/github.com/Lasica/traefic-pubsub-forwarder/pubsub_monitoring.go:8:2: import \"cloud.google.com/go/pubsub\" error: plugins-local/src/github.com/Lasica/traefic-pubsub-forwarder/vendor/cloud.google.com/go/pubsub/iterator.go:27:2: import \"cloud.google.com/go/pubsub/apiv1\" error: plugins-local/src/github.com/Lasica/traefic-pubsub-forwarder/vendor/cloud.google.com/go/pubsub/apiv1/doc.go:90:2: import \"google.golang.org/api/option\" error: plugins-local/src/github.com/Lasica/traefic-pubsub-forwarder/vendor/google.golang.org/api/option/option.go:13:2: import \"golang.org/x/oauth2/google\" error: plugins-local/src/github.com/Lasica/traefic-pubsub-forwarder/vendor/golang.org/x/oauth2/google/default.go:17:2: import \"cloud.google.com/go/compute/metadata\" error: plugins-local/src/github.com/Lasica/traefic-pubsub-forwarder/vendor/cloud.google.com/go/compute/metadata/metadata.go:69:10: cannot use type func(*net.Dialer, string, string) (net.Conn, error) as type func(string, string) (net.Conn, error) in struct literal"

will look at it.

I've noticed that while traefic and the library I was trying to import both use golang in version 1.19, the yaegi that traefik uses in version 0.15 uses golang in version 1.18. I've checked that the api in question (net.Dialer.Dial) was changed in 1.19.
That's the likely casue of this problem:
https://github.com/traefik/traefik/blob/v2.9.8/go.mod
https://github.com/googleapis/google-cloud-go/blob/b5b7cdec59df6a746ed7ffef0aad667ced8cbc87/go.mod
https://github.com/traefik/yaegi/blob/v0.15.0/go.mod
https://tip.golang.org/doc/go1.19

Any update on this?

Any update on this?

I'm still seeing this same issue with traefik 3.0.2 (which is on 1.22), which includes yaegi 0.16.1 (which is on 1.21).
When trying to load a plugin which imports the consulcatalog provider (which I wish to extend with a feature), treafik fails to load the plugin:
..../vendor/github.com/hashicorp/go-cleanhttp/cleanhttp.go:26:16: cannot use type func(*net.Dialer, context.Context, string, string) (net.Conn, error) as type func(context.Context, string, string) (net.Conn, error) in struct literal"

Which comes from the following code:
func DefaultPooledTransport() *http.Transport {
	transport := &http.Transport{
		Proxy: http.ProxyFromEnvironment,
		DialContext: (&net.Dialer{
			Timeout:   30 * time.Second,
			KeepAlive: 30 * time.Second,
			DualStack: true,
		}).DialContext,

While this API has changed way before Go version 1.21. DialContext /does/ return context.Context, string, string.

Met similar issue in Traefik 3.0.4, any update on this one?

I'm still seeing this same issue with traefik 3.0.2 (which is on 1.22), which includes yaegi 0.16.1 (which is on 1.21). When trying to load a plugin which imports the consulcatalog provider (which I wish to extend with a feature), treafik fails to load the plugin:
..../vendor/github.com/hashicorp/go-cleanhttp/cleanhttp.go:26:16: cannot use type func(*net.Dialer, context.Context, string, string) (net.Conn, error) as type func(context.Context, string, string) (net.Conn, error) in struct literal"

Which comes from the following code:
func DefaultPooledTransport() *http.Transport {
	transport := &http.Transport{
		Proxy: http.ProxyFromEnvironment,
		DialContext: (&net.Dialer{
			Timeout:   30 * time.Second,
			KeepAlive: 30 * time.Second,
			DualStack: true,
		}).DialContext,

While this API has changed way before Go version 1.21. DialContext /does/ return context.Context, string, string. When debugging traefik, I do see that the interpreter context's GOROOT is<EMAIL_ADDRESS>Sadly, when I try to run yaegi on cli, and import my package, I get an even weirder error:
$ GOPATH=plugins-local/ yaegi
> import "github.com/hsmade/traefik-consul-az-provider"
1:21: import "github.com/hsmade/traefik-consul-az-provider" error: plugins-local/src/github.com/hsmade/traefik-consul-az-provider/plugin.go:9:2: import "github.com/traefik/genconf/dynamic" error: plugins-local/src/github.com/hsmade/traefik-consul-az-provider/vendor/github.com/traefik/genconf/dynamic/marshaler.go:9:1: cannot define new methods on non-local type struct {}

The 'type struct' it refers to isn't a struct, but a custom type.

hello @hsmade , do you have any workaround on this issue? I am facing the same one for now, though the version is 3.0.4.

Sadly I don't. I never managed to get past this issue

From 2022 to the current time they haven't fixed such problems, amazing. How to use redis for more flexible plugins or similar things is not even close to clear, well unsafe is bad, but it turns out that no version of redis libraries hardly work.


chore: integrate launchTestNode into current test suites

Closes https://github.com/FuelLabs/fuels-ts/issues/1820
Closes https://github.com/FuelLabs/fuels-ts/issues/2081

Summary

This removes the getSetupContract ,generateTestWallet and seedTestWallet utilities in favour of the launchTestNode utility in the fuel-gauge test suite.
Builds on the work done in https://github.com/FuelLabs/fuels-ts/pull/2378/files to add browser compatibility for the fuel-gauge test suite.
This also refactors launchTestNode to accommodate  for scripts, predicates, seeding wallets with multiple wallets and different asset types, and mocking more provider methods.
Checklist

[x] I added — tests to prove my changes
[ ] I updated — all the necessary docs
[x] I reviewed — the entire PR myself, using the GitHub UI
[ ] I described — all breaking changes and the Migration Guide

Notes
Running
pnpm test:filter packages/fuel-gauge/src/

Should result in all tests passing.

Then running
prgrep fuel-core

should return clean as there are no processes running.

Added blocked label as we should merge https://github.com/FuelLabs/fuels-ts/pull/2789 into this before merging this


MGDOBR-762: "Edit Processor" action shouldn't allow to edit source/action parameters

JIRA: https://issues.redhat.com/browse/MGDOBR-762

@kelvah could you please rebase this PR? I think it is important (considering my current task) to have it merged ASAP


Different result for scipy.optimize.linprog between scipy 1.1.0 and scipy 1.2.2

We got an issue about the result of 'scipy.optimize.linprog' function with scipy 1.1.0 and scipy 1.2.2
Here is the details about this issue.
specific python code
import numpy
from scipy import optimize
target=[5.0, 7.0, 1.0, 5.0, 6.0, -2.0, 1.0, -2.0, 6.0, -2.0, 1.0, 6.0, 5.0, -1.0]
a=[[0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, -1, 0, 0], [0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-1, -1, 0, -1, 0, 1, 0, 1, 0, 1, 0, 0, -1, 1]]
b=[25491197.0,<PHONE_NUMBER>9.0,<PHONE_NUMBER>3.0, 0.0] #type(b) is list
d=[[0, 0, -1, 0, 1, 0, 0, -1, 0, 0, 0, 0, 1, 0], [1, 0, 0, 0, 0, -1, 0, 0, 1, 0, -1, 0, 0, 0], [0, 0, 0, 1, 0, 0, -1, 0, 0, -1, 0, 1, 0, 0]]
e=[66801372768.0, 351002969.0, 91862023.0]
bounds=[[0,<PHONE_NUMBER>13.0], [0, numpy.nan], [0, numpy.nan], [0,<PHONE_NUMBER>99.0], [0, numpy.nan], [0, 9.223371809408653e+18], [0, numpy.nan], [0, 9.223371950523316e+18], [0, numpy.nan], [0, 9.223371314072663e+18], [0, numpy.nan], [0,numpy.nan], [0,<PHONE_NUMBER>7.0], [0, numpy.nan]]
res = optimize.linprog(target, a, b, d, e, bounds=bounds)

with scipy 1.1.0 we got result:
res.success is True
with scipy 1.2.2 we got result:
res.success is False
res.message is 'Phase 1 of the simplex method failed to find a feasible solution. The pseudo-objective function evaluates to 2.0e+03 which exceeds the required tolerance of 1e-12 for a solution to be considered 'close enough' to zero to be a basic solution. Consider increasing the tolerance to be greater than 2.0e+03. If this tolerance is unacceptably  large the problem may be infeasible.'
What i want to know
why there is a difference between scipy=1.1.0 and scipy=1.2.2 ? , is this a bug of scipy==1.1.0 or this is something wrong happened in scipy==1.2.2 ?

@pvanmulbregt  any idea about this issue ?

The simplex solver in these old versions of SciPy had a lot of bugs. Try setting the parameter method='interior-point'. If you need an "exact", basic solution, you can use method='revised simplex' in SciPy 1.3+.

@mdhaber Thanks , by using method='interior-point' , we got the same result on scipy=1.10 and scipy=1.2.2 .
(In out case , the problem is infeasible)


AgoraRTCError CAN_NOT_GET_GATEWAY_SERVER: invalid token, authorized failed

Goodnight,
I have a problem with the iris-web-rtc_n423_w4182_0.3.0.js SDK.
When I generate the token through golang and place it in my project, it returns the error "Agora-SDK [WARNING]: data: {"desc":"invalid token, authorized failed","retry":false,"csIp":"184.72. 16.87"}
AgoraRTCException: AgoraRTCError CAN_NOT_GET_GATEWAY_SERVER: invalid token, authorized failed
at http://localhost:64257/iris-web-rtc_n423_w4182_0.3.0.js:2:18849
at Array.forEach ()
at tI (http://localhost:64257/iris-web-rtc_n423_w4182_0.3.0.js:2:18425)
at e.gatewayInfo.wA.joinChooseServer.lts (http://localhost:64257/iris-web-rtc_n423_w4182_0.3.0.js:2:16844)
at async http://localhost:64257/iris-web-rtc_n423_w4182_0.3.0.js:1:125906".
However, when I generate the token via https://console.agora.io/token it works. And the funniest thing is that in one project I use the token generated by https://console.agora.io/token and in the other I use the token generated by golang to close the communication.
What can I be doing to make iris-web-rtc recognize the golang token?

It's a little tricky that you should use different ways to generate the token on the web, I think you can reference this doc https://docs.agora.io/en/video-calling/reference/manage-agora-account?platform=web
If you need help, I think you'd better raise a new ticket to Agora Support for this issue.

I'm actually not having any problems generating the token. I already have a functional project in version 5.3.1 (for web) where generating the token using golang (which, by the way, I used the agora.io manual to assemble) works perfectly.
It is only in this new version 6.2.6 that the token generated by golang is not being recognized.

I managed to find the problem. The uid variable was wrong and did not validate the token.
Thank you very much for your attention.


968/9 variables improvements

Description
This introduces the ability to load package variables from files and refines the workflow to reduce confusion.
Related Issue
Fixes #968, #969
Type of change

[X] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist before merging

[X] Tests have been added/updated as necessary (add the needs-tests label)
[X] Documentation has been updated as necessary (add the needs-docs label)
[X] An ADR has been written as necessary (add the needs-adr label) [ 1 2 3 ]
[X] (Optional) Changes have been linted locally with golangci-lint. (NOTE: We haven't turned on lint checks in the pipeline yet so linting may be hard if it shows a lot of lint errors in places that weren't touched by changes. Thus, linting is optional right now.)

@Madeline-UX from talking with @jeff-mccoy last night I think this PR has a need to validate with users (potentially just from the k8s slack) to gather input on what they expect.  With @jeff-mccoy, @RothAndrew and @YrrepNoj  being devs there can be a bias with the different ways that instantiating a "variable" can be done with different languages acting differently (go and bash will initialize a string as an empty string, javascript, java, c, and others will initialize as null or undefined, and python will force you to set it to None or an empty string).

Specifically:
variables:
  - name: "NOTHING"
    # default: ""   <- currently under the hood
    # prompt: false <- currently under the hood
  - name: "NO_PROMPT"
    default: "no-prompt"
    # prompt: false <- currently under the hood
  - name: "NO_DEFAULT"
    # default: ""   <- currently under the hood
    prompt: true
  - name: "BOTH"
    default: "both"
    prompt: true

zarf package deploy package.zst --confirm --set NOTHING=hello --set NO_PROMPT=world --set NO_DEFAULT=today --set BOTH=tomorrow

zarf package deploy package.zst --confirm --set NOTHING=hello --set NO_DEFAULT=today

zarf package deploy package.zst --confirm --set NOTHING=hello

zarf package deploy package.zst --confirm

zarf package deploy package.zst

@Racer159 - I agree that more validation is needed. I am working off of the assumption that we can use the UI to get feedback from users from different skill levels.  I am working to integrate deploy time variables into the UI and have already been getting feedback on the feature (mostly questions at this time.) I would like some help with creating a more realistic prototype @RothAndrew that shows all the different options we are proposing here and see if that makes sense to users.

Specifically:
variables:
  - name: "NOTHING"
  - name: "NO_PROMPT"
    default: "no-prompt"
  - name: "NO_DEFAULT"
    prompt: true
  - name: "BOTH"
    default: "both"
    prompt: true

zarf package deploy package.zst --confirm --set NOTHING=hello --set NO_PROMPT=world --set NO_DEFAULT=today --set BOTH=tomorrow

zarf package deploy package.zst --confirm --set NOTHING=hello --set NO_DEFAULT=today

zarf package deploy package.zst --confirm --set NOTHING=hello

zarf package deploy package.zst --confirm

zarf package deploy package.zst

@Racer159 That looks like what the package definition would be - but what would the user see on deployment in the CLI?

Possible questions we could ask:

If you create a variable called "FOO" that does not have a default, and is not set to prompt the user for a value, what should happen?

The system will automatically assign "" (an empty value / empty string) as the value of FOO and continue processing
The system will stop processing and return an error asking the user to set a value for FOO using <command> --set "FOO=YourValueHere"
Something else?

If you create a variable called "BAR" that has a default and is not set to prompt the user for a value, what should happen?

It uses the default unless the user has used <command> --set "BAR=YourValueHere". If --set was used it uses that as the value instead.
Something else?

If you create a variable called "BAZ" that does not have a default and is set to prompt the user for a value, what should happen if the user uses --confirm, which overrides interactive prompts?

The system will automatically assign "" (an empty value / empty string) as the value of BAZ and continue processing
The system will stop processing and return an error asking the user to set a value for BAZ using <command> --set "BAZ=YourValueHere"
Something else?

If you create a variable called "QUX" that has a default and is set to prompt the user for a value, what should happen if the user uses --confirm, which overrides interactive prompts?

?

@RothAndrew This is helpful. I think to get the feedback we are looking for having common or easily understood examples will be helpful. The users I have discussed variables with so far do not understand what they are being asked at a general level but the context of (DNS, Ports, etc) helps. So is there a real/common example for each of those use cases outlined above?

@RothAndrew @Racer159 @jeff-mccoy  Here are some of the mock up's I did for variables in the UI. Don't think I captured all the different ways variables work but trying to explore how we would present all the different types of variables to a user. Desired outcome is that the user completes all variables correctly and is able to successfully deploy as they intended without having to edit or redo the deployment due to a variable being incorrectly implemented.

The top is the package definition, and then the bottom are the commands the user runs.

The top is the package definition, and then the bottom are the commands the user runs.

zarf package deploy package.zst --confirm --set NOTHING=hello --set NO_PROMPT=world --set NO_DEFAULT=today --set BOTH=tomorrow
zarf package deploy package.zst --confirm --set NOTHING=hello --set NO_DEFAULT=today
zarf package deploy package.zst --confirm --set NOTHING=hello
zarf package deploy package.zst --confirm
zarf package deploy package.zst

So I don't see how this invites user interaction. - It also does not follow the current Zarf model to my knowledge for promoting user input.

The top is the package definition, and then the bottom are the commands the user runs.

zarf package deploy package.zst --confirm --set NOTHING=hello --set NO_PROMPT=world --set NO_DEFAULT=today --set BOTH=tomorrow
zarf package deploy package.zst --confirm --set NOTHING=hello --set NO_DEFAULT=today
zarf package deploy package.zst --confirm --set NOTHING=hello
zarf package deploy package.zst --confirm
zarf package deploy package.zst
* So I don't see how this invites user interaction. - It also does not follow the current Zarf model to my knowledge for promoting user input.

The --confirm flag will just execute without needing any interaction, the last command example without a --confirm flag would currently prompt for the following (... is for truncated output):
...
Deploy this Zarf package? (y/N)
...
Please provide a value for 'NO_DEFAULT':
Please provide a value for 'BOTH' (both):
...

Can I get a quick SWAG on when this might merge? DI2-ME updated to the latest version of Zarf but this is what we really need to start the transition to making it so users don't have to fork the repo to use the software factory package

I'll poke around this in the next couple of days but think we might go in a slightly different direction with viper.

Cool, yeah I don't really care how it's done, just want the capability.
Are we talking a week? a month? longer? Trying to figure out when to anticipate when the big push / refactor for DI2-ME might be able to be undertaken.

@jeff-mccoy @YrrepNoj @RothAndrew @Madeline-UX reset this PR now that the Viper PR has been merged.

@jeff-mccoy @Racer159 I am working to find users to validate this. I have a few who I think will be a good fit.

I'd like to be one of the users pls

Closing this ancient wonder as stale until we can circle back to it at some future point.


Switch to using the COM Interfaces API to interact with the wallpapers

All the changes have been well-tested and should work with the same dependencies under Win10 machines.

Remove old C files
Adapt Build script
Use the COM Interfaces API
Implements the "Scaling" option that MacOS has

The source was changed from C  to C++. I justify this change because: this PR will greatly improve the maintainability of the codebase, allow for further optimization, and new features to be quickly built with the help of the COM API.

Thanks. I don't have a Windows VM. Would you be able to compile the binary, ZIP it, and share it here? (Just drag it into the comment field)

binary.zip
Here you go.

Could you build another binary with the latest changes in main branch? So it gets the correct version number.

Could you build another binary with the latest changes in main branch? So it gets the correct version number.

Sure.
binary_2.0.0.zip

https://github.com/sindresorhus/win-wallpaper/releases/tag/v2.0.0


add MSstatsTMT and update MSstats

PR checklist

[ ] This comment contains a description of changes (with reason).
[ ] If you've fixed a bug or added code that should be tested, add tests!

[ ] If you've added a new tool - have you followed the pipeline conventions in the contribution docs
[ ] If necessary, also make a PR on the nf-core/quantms branch on the nf-core/test-datasets repository.

[ ] Make sure your code lints (nf-core lint).
[ ] Ensure the test suite passes (nextflow run . -profile test,docker --outdir <OUTDIR>).
[ ] Usage Documentation in docs/usage.md is updated.
[ ] Output Documentation in docs/output.md is updated.
[ ] CHANGELOG.md is updated.
[ ] README.md is updated (including new tool citations and authors/contributors).

@daichengxin MSstats is failing with DIANN

ok. I am testing locally.

I think is because in the last tests we have included only two files in the DIANN with no multiple conditions. But this is only a guess.

Yes. you are right. I use two conditions locally to test. Need to update the test data

The test passed. Need to upload the latest dia test data to nfcore, then recover test_dia config. https://raw.githubusercontent.com/daichengxin/quantms/dev/assets/PXD026600.sdrf.tsv

Why are you not using the newest version with argument parsing? Because of the additional dependency?
https://github.com/nf-core/proteomicslfq/blob/dev/bin/msstats_plfq.R

Yes. argparse is not in the container

Can we maybe have the logging changes separate? I don't think this is ready for release.

E.g. it needs a lot of testing, the testdata needs to be on nf-core, I think it is better to only have one MSstats step (we need to check whether there are more parameters that we can combine).

So do we need to remove the logging changes in this PR?

No but create a PR with just the logging changes.

Use git cherry-pick on a new branch

Can I merge this PR @jpfeuffer ?

We need two different PRs? Why we can combine both changes here if they are correct.

But @daichengxin changed the MSstats as requested, then both things are OK now.

E.g. it needs a lot of testing, the testdata needs to be on nf-core, I think it is better to only have one MSstats step/script (we need to check whether there are more parameters that we can combine).

You can contribute to this PR. I just want to merge into master soon, and do not want to have half-ready PRs in there.

I got the changes that needs to be done.  But I'm afraid I won't be able to do it soon because I'm not very familiar with the mechanics of CI.


Move all the Dockerfiles to a docker folder

This would need a basic understanding of docker. You can refer to how IntelOwl does it just in a little less complicated way because we don't have too many services as of now. The project is still in its nascent stage so it should be fairly simple. I will appreciate it if someone takes this issue up.
The files to shift are of course Dockerfile and Dockerfile.celery

ran into a celery build error.
will look into it after reaching Delhi.

ran into a celery build error.
will look into it after reaching Delhi.

ran into a celery build error.
will look into it after reaching Delhi.

#12 solves this.


Remove weather sensor setup and OWM integration

CLI tasks and logic is moving to its own plugin, see work in https://github.com/SeitaBV/flexmeasures-openweathermap/pull/1.
That is the better place.
This PR also re-factors query utils (making them account-aware) and updates tests involving weather sensors to directly work with the new data model.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

63 of 188 (33.51%)  changed or added relevant lines in 10 files are covered.
42 unchanged lines in 9 files lost coverage.
Overall coverage decreased (-1.1%) to 69.442%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

flexmeasures/data/schemas/sensors.py
4
5
80.0%

flexmeasures/data/queries/utils.py
11
16
68.75%

flexmeasures/data/queries/generic_assets.py
6
26
23.08%

flexmeasures/utils/grid_cells.py
0
99
0.0%

Files with Coverage Reduction
New Missed Lines
%

flexmeasures/api/common/utils/validators.py
1
76.66%

flexmeasures/data/models/legacy_migration_utils.py
1
92.86%

flexmeasures/ui/utils/plotting_utils.py
1
46.2%

flexmeasures/data/models/generic_assets.py
2
78.4%

flexmeasures/data/models/weather.py
2
68.7%

flexmeasures/utils/geo_utils.py
3
50.0%

flexmeasures/ui/views/analytics.py
5
44.35%

flexmeasures/data/models/forecasting/model_spec_factory.py
6
84.46%

flexmeasures/data/queries/analytics.py
21
50.26%

Totals

Change from base Build<PHONE_NUMBER>:
-1.1%

Covered Lines:
6633

Relevant Lines:
9088

💛  - Coveralls

The OWM plugin looks up sensors on assets (weather stations) by name. I think it's confusing to humans as well if there are multiple sensors with the same name in an asset.

I can put this "Posting weather data" section back, but I doubt any of it will really be needed in the future. It's all talking specifically about weather sensors and the example given (and we do have a nice example left for posting price data, and the more in posting power data).
The one sentence with general value I salvaged (it was "Note how the resolution of the data comes out at ....").

Note that I allow weather sensors in the fm0 scheme to have spaces. I believe this is okay for as long as this code will still be relevant.

Note that I allow weather sensors in the fm0 scheme to have spaces. I believe this is okay for as long as this code will still be relevant.

@Flix6x I know you approved this already (safe for two typos), but I did add some renaming work (of sensors "wind_speed" and "raidation"), which you might want to see as well. But otherwise I'll merge this tomorrow.


issue #323 modify getCommandObject and executeCommand for possibility…

For issue: Mess with custom command loading (#323)
Was add possibility to use custom namespace for commands. The code is tested on a real project and works well with two parallel bots. Also backward compatibility is observed

Please merge this feature.

@Jonybang, looks interesting.
But I think all we need is just to use PSR-4.

Any chance that this will ever be integrated?

@Jonybang and all others here, please excuse my delay on this, just wasn't sure about how the future of the commands system will look like.
So until there is a clearer view, this is a great addition, thanks so much!

3 years delay, not a big deal though 😁

I know, so so sorry 🙈
Can you confirm that the latest version works correctly for you?
Then we can get this merged and I'll release the next version.

I know, so so sorry 🙈
Can you confirm that the latest version works correctly for you?
Then we can get this merged and I'll release the next version.

sorry, since the last year i haven't my php environment, but if you can run two bots in the same time with this code - everything is okay 😊
I can show example of running two bots - if it will help

I can show example of running two bots - if it will help

Yes please!
Do you mean running two bots in parallel, or using the same code but a different config for each bot?

In my laravel api routes i've defined two POST routes:
Route::post('/telegram/' . config('services.telegram.bot_1_token'), function (Request $request) {

    $telegram = new \Longman\TelegramBot\Telegram(config('services.telegram.bot_1_token'), config('services.telegram.bot_1_username'));

    $telegram->addCommandsPath(app_path('Console/Commands/Bot1'));
    $telegram->enableAdmins(config('bot_1.admins'));
    $telegram->handle();
    return 'ok';
});

Route::post('/telegram/' . config('services.telegram.bot_2_token'), function (Request $request) {
    $telegram = new \Longman\TelegramBot\Telegram(config('services.telegram.bot_2_token'), config('services.telegram.bot_2_username'));

    $telegram->addCommandsPath(app_path('Console/Commands/Bot2'));
    $telegram->enableAdmins(config('bot_2.admins'));
    $telegram->handle();
    return 'ok';
});

Commands of Bot1 i've stored in app/Console/Commands/Bot1 directory with files CallbackqueryCommand.php, GenericmessageCommand.php and StartCommand.php as well as Bot2 in app/Console/Commands/Bot2 directory

@Jonybang Right, thanks. That will still work without problems 👍


[ADDITION] Timelio

Category
Fintech
Software to be added
Timelio
Supporting Material
URL: https://timelio.com.au/
Description: Timelio improves the financial wellbeing of business owners using technology to enable fast and flexible funding.
Size:
HQ: Melbourne
LinkedIn:
See Record on Airtable:
https://airtable.com/app0Ox7pXdrBUIn23/tblYbuZoILuVA0X3L/recHZuGGHXYiiGyqh

Enough info in Airtable, adding to list


Progress update request

First of all, thank you for the wonderful work you've been doing on this Homuler.
Do you mind please releasing some a statement on how you're continuing to develop the mediapipe unity plugin and you're expectations on how long they will take?
I'm personaly interested in when you expect holistic to be ready

First, Holistic sample will be released this week.

Do you mind please releasing some a statement on how you're continuing to develop the mediapipe unity plugin and you're expectations on how long they will take?

I'll try keeping TODO list up to date, but for now I cannot say which feature will be implemented when.

First, Holistic sample will be released this week.

Do you mind please releasing some a statement on how you're continuing to develop the mediapipe unity plugin and you're expectations on how long they will take?

I'll try keeping TODO list up to date, but for now I cannot say which feature will be implemented when.


feat: support checking roc code blocks in markdown files

What
This PR adds support for checking roc code blocks in .md files using the roc check command.
Why
Previously, the roc check command only worked with Roc-specific files. This update allows users to extract and check roc code blocks (```roc) directly from markdown files, making it more convenient for users who document their Roc code within markdown.
Changes

Implemented logic to extract Roc code blocks from .md files.
Enhanced roc check to process each extracted Roc block.
Ensured no full markdown parsing occurs—only Roc code blocks are checked.

How to Test

Create a markdown file (somemarkdown.md) with Roc code blocks.
Run roc check somemarkdown.md and verify that the Roc code blocks are correctly checked.
Ensure no other markdown content affects the check process.

Related Issues
Closes #6980

Heads up: looks like we have another PR for this issue; https://github.com/roc-lang/roc/pull/7154
I don't have time to look at this now, but we should check if there are parts of both that we want to keep or if one of them does it all.

Hey @miguelcsx - I hadn't noticed that you had opened this before opening my draft PR #7154 Nice work 👍
One thing I did that could be good to add was a test in tests/run_cli.rs, perhaps you could consider that too?
A question for @Anton-4 - I also decided to check whether or not we were looking at a markdown file as early as possible and then, if not, revert back to the current code path. My thinking with that is that it would have the smallest impact on the overall speed of roc check when checking .roc files (which I suppose is the expected most often case?) I did this because I remember reading/hearing somewhere that a goal in Roc is to keep the tooling speed as fast as possible? Since I did it without much thought that lead to a bit of code duplication but without the overhead introduced copying .roc files to Temp files which I think you do? Since I'm new to Roc, not really sure which is better to prioritize? (which is finally the question for Anton!)

Yes, I would prefer the approach in #7154
I'm just going to leave some time for @miguelcsx to comment

@Anton-4 Since you prefer #7154, what do you think about merging that one and with what @DavidEdwards1  did, I'll work with issue #6981 once merged


Event Log: filter committed and uncommitted actions

Viewing options. Be able to hide crossed out actions, and to hide uncommitted actions - effectively only showing the ones that are finalized.
We can reuse the UI for filtering GM NPC notes here.

I'm seeing a bug where if the user leaves the event log tab and then comes back, none of the events will be displayed.

I fixed it already and I'll push it with next task.

@smartdev322 see above for remaining issue with the filter. Looks like a reactivity problem.


Update release webhook short description API link

Why:
Link currently points to old releases section on the repository REST API page

What's being changed:

Link to release REST API documentation
Check off the following:

[ ] I have reviewed my changes in staging (look for "Automatically generated comment" and click Modified to view your latest changes).
[x] For content changes, I have completed the self-review checklist.

Writer impact (This section is for GitHub staff members only):

[ ] This pull request impacts the contribution experience

[ ] I have added the 'writer impact' label
[ ] I have added a description and/or a video demo of the changes below (e.g. a "before and after video")

@aarontwf
Thanks so much for opening a PR! I'll get this triaged for review :zap:


[Carousel] Iteration 1 and 2

The first and second iterations of the new Carousel Core Component, and its editing functionality.
Implementation Details

Policy Dialog : There is no restricted type for a Carousel item and the allowed component types can be refined via the Content Policy.
Edit Dialog : A new ChildrenEditor widget, based on a Coral.Multifield allows the addition, deletion, reordering and renaming of slides from the edit dialog.
Toolbar : A PANEL_SELECT action and CQ.CoreComponents.panelselector.PanelSelector allows a user to select a Carousel item to edit from a popover launched from the edit toolbar. The selected component becomes active with other slides hidden. Standard editing options are available for the active slide. It is also possible to reorder slides from the Panel Selector.
Edit Functions: Adding, deleting and moving slides using the default edit actions is supported and the Carousel active item is updated accordingly.
UI Widget: The Carousel site clientlib provides a simple widget that allows navigation through slides via next / previous buttons and slide indicators.
Panel Container registration and UI Widget messaging  :  To enable the above described authoring experience, an interface between the component widget and the authoring layer is provided. First, the Carousel is registered in the editor as a Panel Container via CQ.CoreComponents.panelcontainer.registry.register(), providing selectors that allows the editor to determine which components are Panel Containers as well as which item is currently active. Second, in the page content (iframe), the component subscribes to a cmp.panelcontainer message that details an operation (navigation) and the component is responsible for updating the UI Widget as appropriate.
Children Servlet: A new ChildrenServlet enables reordering and deletion of child items for a container component and is used by both the ChildrenEditor and PanelSelector.

Open Considerations / Issues

Client Library / JS Versioning: The authoring hook that allows registration of the Carousel Panel Container is a general hook that would be added for each component version and therefore could result in a potential conflict. We should also version the new CQ.CoreComponents.* JS namespaces and check they make sense with the commons objects we already provide.
Children Editor shouldn't rely on the editor JS library: It's possible to open the dialog for a component in full screen on a mounted path, in this scenario the editor JS layer isn't available. We currently use it to re-use the insert component dialog and to read component information. One possible solution is to replace the insert component dialog with a generic commons component picker.

Outstanding tasks

The ChildrenServlet is missing JAVA test coverage of 80% due to a missing orderBefore implementation in JCR MockNode (https://github.com/apache/sling-org-apache-sling-testing-jcr-mock/blob/master/src/main/java/org/apache/sling/testing/mock/jcr/MockNode.java)
ui-js test coverage of ChildrenEditor and PanelSelector edge cases is still lacking.

Q
A

Fixed Issues?
Fixes #234, Fixes #235

Patch: Bug Fix?

Minor: New Feature?

Major: Breaking Change?
Yes

Tests Added + Pass?
Yes

Documentation Provided
Yes

Any Dependency Changes?

License
Apache License, Version 2.0

Codecov Report

Merging #263 into development will decrease coverage by 0.24%.
The diff coverage is 69.23%.

@@                Coverage Diff                @@
##             development     #263      +/-   ##
=================================================
- Coverage          82.77%   82.52%   -0.25%
- Complexity           792      829      +37
=================================================
  Files                 73       77       +4
  Lines               2548     2626      +78
  Branches             465      482      +17
=================================================
+ Hits                2109     2167      +58
- Misses               174      191      +17
- Partials             265      268       +3

Impacted Files
Coverage Δ
Complexity Δ

...wcm/core/components/sandbox/ui/ChildrenEditor.java
100% <100%> (ø)
9 <9> (?)

...q/wcm/core/components/sandbox/models/Carousel.java
100% <100%> (ø)
4 <4> (?)

...nts/sandbox/internal/servlets/ChildrenServlet.java
38.7% <38.7%> (ø)
6 <6> (?)

...mponents/sandbox/internal/models/CarouselImpl.java
92.85% <92.85%> (ø)
7 <7> (?)

...com/adobe/cq/wcm/core/components/models/Title.java
100% <0%> (ø)
8% <0%> (+3%)
:arrow_up:

.../core/components/internal/models/v1/TitleImpl.java
93.54% <0%> (+3.07%)
19% <0%> (+8%)
: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 d8a1b92...90ae279. Read the comment docs.

@vladbailescu, @jckautzmann, @bpauli - do you have any more comments? Can we merge this?

Yes, let's merge it!


Bill Division- HackerRank

Description
Code added for Bill Division problem in C++
Fixes #2107
Checklist:

[x] My code follows the style guidelines(Clean Code) of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] My changes generate no new warnings

@ravikr126 please review the pr

@Ayush7614 please review the pr


Using Agent - ChatOpenAI - response can't be parsed because it starts with 'json' for next action (RC identified and fix proposed)

System Info
LangChain 0.230
python 3.10
From first example of using calculator from: https://learn.deeplearning.ai/langchain/lesson/7/agents

Entering new  chain...
ACTION:  json
{
"action": "Calculator",
"action_input": "25% of 300"
}

The text is what the ChatOutputParser in agents/chat/output_parser.py gets (I prefixed it with ACTION in my print statement).
The word 'json' is now prefixing the JSON blob from the ChatOpenAI LLM which causes the agent to fail. One possible solution that I verified work but not sure if it's the right one is checking if it prefixes with json and just remove that:
        if action.startswith("json"):
            action = action[4:]

This seems to work and lets both the first two examples in the tutorial work.
Who can help?
@hwchase17  and @agola11 for LLM/Chat wrappers/Agents.
Information

[X] The official example notebooks/scripts
[ ] My own modified scripts

Related Components

[ ] LLMs/Chat Models
[ ] Embedding Models
[ ] Prompts / Prompt Templates / Prompt Selectors
[ ] Output Parsers
[ ] Document Loaders
[ ] Vector Stores / Retrievers
[ ] Memory
[X] Agents / Agent Executors
[ ] Tools / Toolkits
[ ] Chains
[ ] Callbacks/Tracing
[ ] Async

Reproduction
Steps to reproduce behavior.
Run source code from @hwchase17 Deeplearning class: https://learn.deeplearning.ai/langchain/lesson/7/agents
The calculator and wikipedia examples don't run.
Expected behavior
The calculator and wikipedia examples work by parsing the "new?" output from ChatOpenAI in the tutorial.

Found a better solution with updating the prompt - that will go up as a pull request

Someone else submitted and got accepted a fix already. I'll close.


Allow non-zero min in FromPercent

This PR (delete as applicable)

Fixes a bug

Describe the changes below:
FromPercent silently assumed min to be 0.
E.g.: FromPercent(1, 0, 200) correctly gives 200, but FromPercent(1, 100, 200) wrongly gives 100 instead of the correct 200.
Shifting the result by
min makes it work as documented and gives a value between min and
max.
Phaser's uses of FromPercent only have min at 0, so there is no
regression in our code. This is merely a fix for 3rd party users.

👍


Create sebastiangrugel

Hi @sebastiangrugel it looks like you figured out the issue and got it working, great job! I will close this request since you were able to resolve it, thanks!

Hi @sebastiangrugel it looks like you figured out the issue and got it working, great job! I will close this request since you were able to resolve it, thanks!


[KED-2214] Enable loading config files with Jinja2 templating

Description
Closes #583
Development notes
In use on current project
Checklist

[x] Read the contributing guidelines
[x] Opened this PR as a 'Draft Pull Request' if it is work-in-progress
[ ] Updated the documentation to reflect the code changes
[ ] Added a description of this change and added my name to the list of supporting contributions in the RELEASE.md file
[x] Added tests to cover my changes

Notice

[x] I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":

I submit this contribution under the Apache 2.0 license and represent that I am entitled to do so on behalf of myself, my employer, or relevant third parties, as applicable.

I certify that (a) this contribution is my original creation and / or (b) to the extent it is not my original creation, I am authorised to submit this contribution on behalf of the original creator(s) or their licensees.

I certify that the use of this contribution as authorised by the Apache 2.0 license does not violate the intellectual property rights of anyone else.

Hey @deepyaman! Thanks for raising this!
We had an internal discussion about enabling Jinja2 templating when we first prototyped the ConfigLoader. However, we realised that it does more harm than good as it renders the configuration into a proper script, which wanted to avoid as it may get out of control very quickly (especially for not so experienced pipeline developers). We wanted the ConfigLoader to work in a straightforward and predictable way.
At the same time, this is useful for more experienced users who know what they are doing and are ready to accept the risks 🙂  So maybe this can be translated into a standalone JinjaConfigLoader (similar to TemplatedConfigLoader)?
Another option to think about would be some sort of a layered structure, where users can have a catalog blueprint that may contain the template syntax, but that blueprint has then to be 'compiled' by Kedro into a static catalog before run (something similar to requirements.in and requirements.txt in the project). This is not currently supported by any component of Kedro and would need to be properly designed.

So maybe this can be translated into a standalone JinjaConfigLoader (similar to TemplatedConfigLoader)?

In the "Possible alternatives" section of https://github.com/quantumblacklabs/kedro/issues/583#issue-727512917, I share a snippet where we're using Jinja2 templating with TemplatedConfigLoader. I don't really want to add a TemplatedJinjaConfigLoader on top of that. One could design some sort of composition structure, but it's not very straightforward.
If I'm going to accept the risks/complications of using this JinjaConfigLoader, why not just let me accept the risks with the regular config loader? Nobody's forcing people to start using Jinja2 syntax. If you find a lot of people start using it, maybe it warrants more formal support.
Some other options that work for me:

Kedro can enable this functionality without advertising it.
The anyconfig import can be moved out of the _load_config function so that it's easily monkey-patchable. At least that way you don't have to copy-paste so much code into project repos to enable this functionality. (less preferred)

@deepyaman Thanks for the reply.

The anyconfig import can be moved out of the _load_config function.

Yes, we will refactor the ConfigLoader so that it's easier to overwrite the call to the backed without the need to rewrite the half of the class.
Additionally, we can set ac_template=True for TemplatedConfigLoader, so that it supports Jinja2 syntax too.

@deepyaman Jinja2 templating has been enabled for TemplatedConfigLoader in c466c8aa36488c8fa8d1fe6bb3d5bcde81100e4a and will be released in 0.17.0.

Please consider closing this PR in light of https://github.com/quantumblacklabs/kedro/commit/c466c8aa36488c8fa8d1fe6bb3d5bcde81100e4a :)

@deepyaman Jinja2 templating has been enabled for TemplatedConfigLoader in c466c8a and will be released in 0.17.0.

Amazing, thanks!


simplify make_grammar, implement flood filling of canMatchZeroChars

Closes #6

Codecov Report

Merging #10 (7cdd19c) into master (807663c) will decrease coverage by 0.15%.
The diff coverage is 96.15%.

@@            Coverage Diff             @@
##           master      #10      +/-   ##
==========================================
- Coverage   97.18%   97.03%   -0.16%
==========================================
  Files           6        6
  Lines         320      337      +17
==========================================
+ Hits          311      327      +16
- Misses          9       10       +1

Impacted Files
Coverage Δ

src/grammar.jl
98.27% <96.15%> (-1.73%)
:arrow_down:

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 807663c...7cdd19c. Read the comment docs.


shape analysis

idea: add numerical outputs from segmentation that are sensitive to abnormal cord shape (compression).

[ ] RL/AP eigenvalue ratio + max derivative along Z (Julien)
[ ] rotation angle + max derivative along Z (Julien)
[ ] columnwise RMS displacement + max derivative along Z (Julien)
[ ] CSA max derivative along Z (Julien)
[ ] contour analysis (Ben)

This feature is introduced into sct_process_segmentation -p shape and includes AP diameter, RL diameter, area eccentricity, equivalent diameter, orientation, ratio_minor_major, shape solidity, shape symmetry.
These features can be calculated per slice or averaged over vertebral levels.

fixed via #1332


Some docs changes

Just some edits in documentation

Please add DCO signoff to this PR, per the instructions. Thanks

Ah, sorry. Will do it right now.

Done ! @jeromesimeon


Errors in 'bullets' example

I encounter an error when running the bullets example of sprite pools:  this.pool on line 62 is undefined. Nevermind if this is still "wip".

You're right, we removed the Pool object as Groups can now be Pools. I'll fix the examples.

These examples are now fixed.


Sample Blades?

Do you plan on adding any sample blade views for noobs like me?

Do you have something specific in mind?

Well I have a app Im building and I would like to use this package to moderate uploads.
So I have my TorrentController.php and within it is the Upload function as follows:
   /**
    * Upload a torrent
    *
    * @access public
    * @return View torrent.upload
    *
    */
    public function upload()
    {
        $user = Auth::user();
        // Post et fichier upload
        if (Request::isMethod('post')) {
        // No torrent file uploaded OR an Error has occurred
            if (Request::hasFile('torrent') == false) {
                Toastr::warning('You Must Provide A Torrent File For Upload!', 'Error!', ['options']);
                return view('torrent.upload', ['categories' => Category::all(), 'user' => $user]);
            } else if (Request::file('torrent')->getError() != 0 && Request::file('torrent')->getClientOriginalExtension() != 'torrent') {
                Toastr::warning('A Error Has Occured!', 'Error!', ['options']);
                return view('torrent.upload', ['categories' => Category::all(), 'user' => $user]);
            }
            // Deplace et decode le torrent temporairement
            TorrentTools::moveAndDecode(Request::file('torrent'));
            // Array from decoded from torrent
            $decodedTorrent = TorrentTools::$decodedTorrent;
            // Tmp filename
            $fileName = TorrentTools::$fileName;
            // Info sur le torrent
            $info = Bencode::bdecode_getinfo(getcwd() . '/files/torrents/' . $fileName, true);

            // If the announcement is invalid or if the tracker is private
            if ($decodedTorrent['announce'] != route('announce', ['passkey' => $user->passkey]) && config('other.freeleech') == true) {
                Toastr::warning('Your Announce URL Is Invalid!', 'Error!', ['options']);
                return view('torrent.upload', ['categories' => Category::all(), 'user' => $user]);
            }

            // Find the right category
            $category = Category::find(Request::get('category_id'));
            // Create the torrent (DB)
            $torrent = new Torrent([
                'name' => Request::get('name'),
                'slug' => str_slug(Request::get('name')),
                'description' => Request::get('description'),
                'info_hash' => $info['info_hash'],
                'file_name' => $fileName,
                'num_file' => $info['info']['filecount'],
                'announce' => $decodedTorrent['announce'],
                'size' => $info['info']['size'],
                'nfo' => (Request::hasFile('nfo')) ? TorrentTools::getNfo(Request::file('nfo')) : '',
                'category_id' => $category->id,
                'user_id' => $user->id,
                'imdb' => Request::get('imdb'),
                'type' => Request::get('type'),
            ]);
            // Validation
            $v = Validator::make($torrent->toArray(), $torrent->rules);
            if ($v->fails()) {
                if (file_exists(getcwd() . '/files/torrents/' . $fileName)) {
                    unlink(getcwd() . '/files/torrents/' . $fileName);
                }
                Toastr::warning('Did You Fill In All The Fields?', 'Error!', ['options']);
            } else {
                // Save the torrent
                $torrent->save();
                // Compte et sauvegarde le nombre de torrent dans  cette catégorie
                $category->num_torrent = Torrent::where('category_id', '=', $category->id)->count();
                $category->save();

                // Backup the files contained in the torrent
                $fileList = TorrentTools::getTorrentFiles($decodedTorrent);
                foreach ($fileList as $file) {
                    $f = new TorrentFile();
                    $f->name = $file['name'];
                    $f->size = $file['size'];
                    $f->torrent_id = $torrent->id;
                    $f->save();
                    unset($f);
                }
                return Redirect::route('torrent', ['slug' => $torrent->slug, 'id' => $torrent->id])->with(Toastr::success(trans('torrent.your_torrent_is_now_seeding'), 'Yay', ['options']));
            }
        }
        return view('torrent.upload', ['categories' => Category::all(), 'user' => $user]);
    }

So when a user uploads from the upload.blade.php page as long as all checks are ok and passes validator they are redirected to the torrent.blade.php which displays there torrent. I would like for that torrent to be hidden from all users unless there group has the 	is_admin or is modo from the groups table in DB.
Then need a moderation.blade.php and controller that displays all pending uploads set to denied or pending. Within that view is a the upload title with a href to goto the hidden upload and also two buttons. One to deny the upload and one to approve it which would then in return make is visible to all groups.
Sounds crazy and Im not the best with laravel yet but this package sounds like it could be what i need?

Okay, I think it is.
You don't need something specific for the blade file. You just need to use the pending, approved, and rejected scopes to query your resource. Then in your moderation view you will call the according actions, for example Post::approve($id) and Post::reject($id).
I think you should go with strict moderation since you don't want to display pending resources to your users.


install

I can't seem to find the install file. Also can we use a GPT4ALL model instead of an OpenAI API?

Hey!
Once you clone the repo, update the common.env file and then run make install.
Have you tried that? if yes and it did not work then what is your OS?

I am using Win10. Do I need to use Ubuntu?


Add interval analysis option for constant folding

I'm not sure the best way to test this, let me know if you have suggestions.
I manually checked by printing out each fold, and this finds the exact same folds as CvecMatching for iters 1 and 2 for rationals

That is tough. I'm assuming it's good if it doesn't affect our expect tests.


ci: upgrade to go1.13

Simple upgrade to latest go version.
I plan to work on #520 (I hope to be able to use the mbtile "offline" later) and maybe others issues somewhat related #602 #583. But before, I would suggest this unrelated change. 😄

@sapk LGTM. The CI is breaking due to a known issue we're working on in the geom package so disregard that issue. I'm looking forward to the mbtiles PR! Thanks for taking that one on.


Add gnu auto generated test cases to the generator

Hi,@eopXD:
This PR add the codes that can generate gnu test cases to the generator.
I did it together with @Incarnation-p-lee and @xl0714.
After that, I would also submit PR about creating folders, adding headers and checker.
Please review it. Thanks!

OK.I'll complete the other commits later.

I added the other two commits about creating folders and adding headers.  We consider to create anther PR for adding checker, because we need to fully consider how to better interpret the magic number in the check information.@eopXD @Incarnation-p-lee @xl0714


spread operator with bounded polymorphism

code:
type F<A : Array<any>> = (...args : A) => void;

error:
  2: type F<A : Array<any>> = (...args : A) => void;
                                         ^ A. rest parameter should have an explicit array type (or type `any`)

but as A is subtype of Array<any> this code should be ok.

This code now works as of v53:
type F<A: Array<any>> = (...args : A) => void;
const thingies: F<Array<number>> = (...xs) => {}

And in general it seems like Flow now waits until individual instances of F are defined and provide values for the parameter A before noting the problem:
// By itself, this line now type-checks.
type F<A> = (...args : A) => void;
// But if you provide a bad value for `A` in a specific case, then it errors:
const thingies: F<number> = (...xs) => {}
``


KAFKA-13236: TopologyTestDriver should not crash for EOS-beta config

Port of #11271 for 2.7 branch.
Call for review @abbccdda

Merged to 2.7 and cherry-picked to 2.6 branch.


Can I use the payment sheet with custom actions?

Is your feature request related to a problem? Please describe.
Hey, this is more of a question.
Can I Run custom actions before confirming a payment using this library's PaymentSheet? I only see React web examples on those docs, but figured that might be due to it being in beta. It still uses a payment intent, so I thought it might be possible?
Please let me know, thanks!

Hi! You can pass customFlow: true to initPaymentSheet. This separates out the payment method selection & confirmation steps, so you can get the paymentOption back from presentPaymentSheet, then perform some custom logic, then call confirmPaymentSheetPayment 👍


Add opossum to address responsive principle

https://www.reactivemanifesto.org/
"...responsiveness means that problems may be detected quickly and dealt with effectively"
from the book "building reactive microservices in java":
https://developers.redhat.com/promotions/building-reactive-microservices-in-java
"On the consumer side, we can use various resilience patterns such as timeouts, retries,
or circuit breakers to protect the microservice from failures. So our
system is able to handle requests in a timely fashion under load and
when facing failures: we are *responsive*!"

@lance any tips on how we can research the time of an App X vs and App Y using opossum --- in terms of failing fast ?

I think I precipitated myself again
first paragraph:
It's common for software systems to make remote calls to software running in different processes, probably on different machines across a network. One of the big differences between in-memory calls and remote calls is that remote calls can fail, or hang without a response until some timeout limit is reached.

last paragraph:
Breakers on their own are valuable, but clients using them need to react to breaker failures. As with any remote invocation you need to consider what to do in case of failure. Does it fail the operation you're carrying out, or are there workarounds you can do? A credit card authorization could be put on a queue to deal with later, failure to get some data may be mitigated by showing some stale data that's good enough to display.

https://martinfowler.com/bliki/CircuitBreaker.html
Assume that an application connects to a database 100 times per second and the database fails. The application designer does not want to have the same error reoccur constantly. They also want to handle the error quickly and gracefully without waiting for TCP connection timeout.

https://en.wikipedia.org/wiki/Circuit_breaker_design_pattern
in the case of kafkaJS that is a socket connection, not a TCP connection.
https://github.com/tulios/kafkajs/blob/master/src/network/connection.js#L36
And they have request and connection timeout attributes.
So, applying opossum to this, we are trying to fail fast than the provided kafkaJS socket connection (which may be possible to configure/change the request and connection timeout attributes) so I think now, that my question makes no sense at all for this case.


OpenChat-Cuda Nvidia Driver Version: | 520.56.06

HI I/ve got this message
docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: Auto-detected mode as 'legacy'
nvidia-container-cli: requirement error: unsatisfied condition: cuda>=12.2, please update your driver to a newer version, or use an earlier cuda container: unknown.
UNRAID 6.11.1
Nvidia Driver Version: | 520.56.06
What version if drivere I mast use?

I'm running the following:
Nvidia Driver Version: 535.54.03
UNRAID: 6.11.5
Are you passing the GPU under extras: --gpus all ? It should be by default unless it was removed.


DPL-908 Consolidate PBMC isolations

User story
As a user of the scRNA Core Cell Extraction pipeline, I would like the PBMC isolations to be pooled in pairs before cell counting, so that I don't have to do as many runs on the Cellaca (cell counting), as it's time consuming.
Who are the primary contacts for this story
Katy, Andrew, Lesley, Abby
Who is the nominated tester for UAT
Lesley, Abby
Acceptance criteria
To be considered successful the solution must allow:

[ ] New labware creator (either on creation of LRC PBMC Bank plate, or a new plate after the LRC PBMC Bank plate - TBC).

[ ] Looks at a group of source wells that contain the same sample, and groups them into pairs to go into destination wells (number of source wells to be consolidated could be in config for future-proofing).
[ ] Ignores any source wells that have been failed (might be standard Limber behaviour).

[ ] If there's a new plate, add it into the pipeline config.
[ ] Update Integration Suite test.

We don't need to add new labware the un-pooled plate which was previously the destination plate 'LRC PBMC bank' will now not need tracking in the LIMS and this new pooled plate will now become the 'LRC PBMC bank' plate. However, the bed it's scanned onto will change from 10 to 3.

Yes we will need a driver file, Abby to add attachment example.

hamilton_lca_pbmc_bank_to_lca_bank_stock_noheader.csv

No additional bed verification required apart from change referenced in question 1.

Process on its own if that's feasible and it will be assumed it's a contingency sample

Pasting previous outstanding questions sections - answered in Lesley's comments above.

Which plate is this on? (Undecided at time of writing)
Do we need to generate a driver file for this transfer?
Do we need a bed verification for this? (If it's part of the isolation protocol, might be a double step?)
What if there are an odd number of source wells for a sample? Do we a) use the odd one on its own, b) add it to a pair to make 3, or c) leave it.

Do you need a fixed pattern or can it be random? Samples will be routinely plated on the parent plate in a fixed pattern. However, there may be edge cases where samples are randomly plated so we need to able to deal with these cases.
At the moment we assume pairs of source wells by sample but we are adding a config to set number of source wells. How does this affect the method in the future? If I've understood correctly I don't think this will be a problem as the sample number should always align with the number of source wells.
If there are odd number wells, e.g., failed or not enough sample for even number, how to arrange wells in the destination, compress to top-left by column, or by row, or something else ? Compress to top left my column :-)


Fixed a typo in README.md

Title:
Fix Typo: "recieve" to "receive" in README
Description:
I've corrected a minor spelling error in the README by changing "recieve" to "receive." This enhances documentation quality.

@rektdeckard Please review and merge this. I am trying to complete my Hacktoberfest with this small contribution.

Thanks for catching!


Incorrect class name in changelog

Provide a narrative description of what you are trying to accomplish:

[x] Is this related to documentation?

@PowerKiKi This is in release notes for expressive 3.0.0alpha3 and at this point all was good, check zend-expressive-router:3.0.0alpha1:
https://github.com/zendframework/zend-expressive-router/tree/3.0.0alpha1/src

This is no longer correct in alpha3, exactly since https://github.com/zendframework/zend-expressive-router/commit/84a0f54e0c7567c35473ea83b0664014865a1df7#diff-25d902c24283ab8cfbac54dfa101ad31. I think doc should be kept up to date as much as possible.

@PowerKiKi still I think it's changelog and at time of this release all was fine, this is not a migration guide so we shouldn't change changelog as it was correct and became incorrect because one of dependencies changed.

@PowerKiKi — @webimpress is correct. The changelog entry is correct for the release in which it was made.
When I prepare the final 3.0.0 changelog, I'll be merging all of the alpha entries, and, at that time, these will be corrected to the final versions.


[TTIG-TO-LLVM] Extend glue lowering

Support arbitrary shapes in glue operation lowering.

If @etiotto and @Dewei-Wang-sh are fine with current state, I'd merge to get new work built on top of this


Adding release notes for 1.0.

Can we create a 1.0 branch @jmacelroy ? That way we can merge all the 1.0 PRs there, and when 1.0 is shipped, we snapshot the current version and merge 1.0.

Can we create a 1.0 branch @jmacelroy ? That way we can merge all the 1.0 PRs there, and when 1.0 is shipped, we snapshot the current version and merge 1.0.

Yes, that's a great idea. I'll start getting PRs directed to that branch that are for 1.0.


Allow mixture to contain gates/operations

Also refactor the _simulate_mixture method to make use of this fact. Closes https://github.com/quantumlib/Cirq/issues/1657

It isn't clear to me what you mean by "native" support.  cirq.mixture currently returns Sequence[Tuple[float, Any]], so it "works" if you give it Tuples with Gates or Operations. My edits adjust any Gate or Operation in the library that specifies mixture to return the appropriate Tuple, but it doesn't necessarily enforce that someone else can't. The language in the issue made it seem like returning Gates or Operations would be something you could do, but not necessarily have to do. Your third and fourth paragraphs suggest "have to". Is this correct? If so I can try to implement what you've suggested. If not, It isn't clear to me why I haven't satisfied this condition.

We need to modify cirq.apply_channel to take proper advantage of mixtures returning operations. The unitary matrix should never come into existence.

apply_channel wasn't touched because it doesn't attempt to call _mixture_. I also see from my edits in the sparse_simulator that I'm not actually making use of this potential speedup and so that definitely needs to be improved. I can make cirq.apply_channel fall back to _mixture_ to avoid constructing unitaries if that works for you.

cirq.mixture currently returns Sequence[Tuple[float, Any]], so it "works" if you give it Tuples with Gates or Operations. My edits adjust any Gate or Operation in the library that specifies mixture to return the appropriate Tuple, but it doesn't necessarily enforce that someone else can't.

Ah I see. Yes, I was thinking in terms of having to return gates or operations. But I agree that being able to return just the unitary would be better (for gates), and that we may want to have mixtures of other things in the future. I am a bit worried about has_mixture returning True when the object is not a mixture of unitary operations or unitary gates; we need to handle this case correctly in apply_mixture, channel, etc.

apply_channel wasn't touched because it doesn't attempt to call mixture. I also see from my edits in the sparse_simulator that I'm not actually making use of this potential speedup and so that definitely needs to be improved. I can make cirq.apply_channel fall back to mixture to avoid constructing unitaries if that works for you.

Yes, I consider that to be key to closing the referenced issue. Otherwise I'd downgrade the "fixes" in the main message to "part of".

I am a bit worried about has_mixture returning True when the object is not a mixture of unitary operations or unitary gates; we need to handle this case correctly in apply_mixture, channel, etc.

We also have has_mixture_channel and mixture_channel which doesn't appear to be used anywhere except in tests. Perhaps we could use this or rename this to has_mixture_of_unitaries to special case the concept of "Mixture of unitaries" that is useful for simulation from the general case of "mixtures of objects"?

Yes, I consider that to be key to closing the referenced issue. Otherwise I'd downgrade the "fixes"/"closes" in the main message to "part of".

I will work on making apply_channel utilize mixture as a special case then.

Ah! mixture_channel is what you're calling mixture_of_unitaries.
I'll have to go through all this stuff trying to clean it up...

I've modified apply_channel and the SparseSimulator to take advantage of the ability to return mixtures of Gates or Operations. For the SparseSimulator I directly changed the method that handles the mixture case and forapply_channel I added a strategy that attempts to utilize _mixture_. I think I have therefore addressed your concerns @Strilanc .

@Strilanc I believe this is waiting for a review from you?

@Strilanc  This looks like it has gone stale.  Especially given move to _act_on_ and the deprecation of mixture_channel can this be resurrected or is it no longer needed?

Yeah it's gone stale. Still a good idea... I'll try to harvest some of it and make a separate PR.


Allow passing deps in py_pytest_main

Type of change

New feature or functionality (change which adds functionality)

py_pytest_main generates a py_library that depends on pytest without declaring it as the dependency. This PR adds a deps attribute to py_pytest_main, and pass it down to the py_library, because:

it's more "correct" to have a py_library declaring its own dependency instead of having its consumer to do that job
Gazelle would remove @pypi_pytest//:pkg from the py_test target that depends on py_pytest_main, because the py_test target doesn't import pytest.

Test plan

Covered by existing test cases

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Allow multiple element locators

As a user I should be able to define a number of element locators so that if a particular browser does not support a locator type, I can still find my element.
This should also allow  multiple locators of the same type, so that, for example, if a webpage is updated with new IDs, both IDs can be used and the tests will work on old and new versions of a site.

This was fixed in 1.0.4


Upgrade to androidx

The android x libraries are currently at release candidate versions so I figured it'd be a good time to discuss this. Hopefully migrating RxBinding will just involve a whole lot of renaming of imports, but what will this mean for the version number? This is technically a breaking change for some of the modules, so does this mean we change to 3.0?
Happy to some some legwork here, I just want to know how this should be approached. Are there any other considerations when migrating? Or is the plan to just let Jetifier handle things for now?

I was planning to update everything once 1.0 hits which should be any day now. We can bump the version to 3.0.0-SNAPSHOT and start the work

Who's ready?!?

How much would it offend people if this 3.0 was Kotlin-first as well?

I am avoiding Kotlin, since I belive its going to be a waste of time converting all my code base to Kotlin and then converting it all over again to Flutter, a short while afterwards.
I don't get offended if you go Kotlin first, I just don't get why to go to all the trouble if in a year or less people will be switching platforms anyways. Better focus the energy on making a Dart version and accelerate the future?

Why not?
I would love to hear your point of view about this, since you are so much more involved into Android than anyone I know.

I don't want to have the discussion here. The easiest justification is that
it's a random third-party framework and not a first-party Android one.
On Thu, Sep 27, 2018 at 1:12 PM feinstein<EMAIL_ADDRESS>wrote:

Why not?
I would love to hear your point of view about this, since you are so much
more involved into Android than anyone I know.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/JakeWharton/RxBinding/issues/460#issuecomment-425171320,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAEEEb2C_yT0SviFI74tuMkr5Cu_enINks5ufQb1gaJpZM4WWEND
.

AndroiX is stable :)

Is there a workaround for the androidx Toolbar while we wait for the new version of RxBinding?

Any updates on a 3.0 snapshot?

Is "android.enableJetifier=true" in gradle.properties sufficient for now to use with RxBinding?
I mean before releasing 3.0

This is done on master as 3.0.0-SNAPSHOT


Create other legend location generating functions

Create other legend location functions:
CreateLegendAtFigureRightTop
CreateLegendAtFigureBottomCenter
CreateLegendAtFigureBottomRight

This has been superseded the the new CreateLegend method and by using LegendOptions.Location.


Added selectionColor property for TextInput

Needed to change selectionColor (cursor and highlight color) of the TextInput for a private project and figured others might want to do the same thing.

Thanks @eHammarstrom - looks good to me!


fix: prefix isn't empty by default & can't be set to empty

Fixes #1

I found a workaround: If you set the prefix to /, then it is empty. But you should put that in the documentation: default: output_file_name; override-to-empty: /


postinstall step doesn't use cafile from npmrc

When we try to download the Geckodriver from a local CDN, we have a custom certificate on that CDN. Unfortunately the cafile (https://docs.npmjs.com/cli/v6/using-npm/config#cafile) setting from npmrc is not checked and used while downloading.

We have updated the way this package downloads the Geckodriver. If the issue still persist please let me know.


Look at SoS notebooks

These are interesting: https://vatlab.github.io/sos-docs/doc/user_guide/multi_kernel_notebook.html
it means MyST-NB can support multiple languages in a single file, without having to split them up in to separate notebooks (like jupyter-sphinx does)

If I remember correctly, they basically implement their own "metakernel" that knows how to farm out execution to other kernels. It's an interesting project!

looked, understood


Compress website logo

The main Graphback website logo is too large, which slows down webppage load time.
Image: https://github.com/aerogear/graphback/blob/master/website/static/img/logo.png
This image is PNG, 1.5Mb, 6378x5309. We should convert the image to JPG and make it smaller. I am not sure what sizes we should go with, as it probably needs web developer expertise or we will have to experiment. I am conscious of the fact that it is used as the main logo on the home page, so we will have to see how it looks.

Automatically generated comment to notify maintainers
/cc @machi1990, @wtrocki

🙏 Thank you so much @craicoverflow This is in fact the most overlooked detail - logo is huge!

cc @kingsleyzissou any recommendations on sizes?

anything bellow 5mb will be success :D

Can you tell whether the image wil be used in the navbar or on the centre page?

It looks like the maximum size it will display on the site is approximately 320x270, though keeping it a bit larger for other purposes might be best Also, keeping it a PNG to keep transparency is probably  a good idea as well. @munishgarg-02 it seems like it is used in both!

anything bellow 5mb will be success :D

It is currently 1.5Mb

@munishgang-02 hey.. We will need separate image for navbar (looks like we scale current one)

@craicoverflow Because man if the image will be used in the navigation bar, then you should use icon format of this image and if you want it on main page basically in center, then you have to compress the image a little bit.

@craicoverflow I think 1920X1080 will do the task for website.

Yes, that would be great! And we can have a separate one for Navbar at much smaller size.

I think as @NecroTechno mentioned, the main reason for using the PNG is the transparency. But we can certainly scale that down. 1920x1080 sounds more than reasonable.

Fixed in #2140 - thanks @SgtWalking!


OpenXR mesh detector adds meshes that are probably just updates

Loading 7 "new" meshes produced by the mesh detector when running on WMR/OpenXR, I'm seeing lots of overlap and similar triangle counts (on the order of 10-15k triangles). I would expect there to be very little overlap between the individual meshes reported as new. This causes our triangle count to increase massively for the world mesh. Seems like at least some these meshes should instead be reported as updates since they're so similar to each other.
In this screenshot I've loaded all the meshes into one scene and assigned them different colors. (playground)

Closing for now. Reopen if needed.


Move class ServiceUtils into right package directory

What changes are proposed in this pull request?
Move class ServiceUtils into right package directory
Why are the changes needed?
The package name of ServiceUtils is inconsistent with the package directory of ServiceUtils.
Does this PR introduce any user facing changes?
None

Codecov Report

Merging #14070 (e515b5e) into master (18c2d7e) will decrease coverage by 25.88%.
The diff coverage is 43.58%.

@@              Coverage Diff              @@
##             master   #14070       +/-   ##
=============================================
- Coverage     43.23%   17.35%   -25.89%
+ Complexity     9205     2700     -6505
=============================================
  Files          1423     1424        +1
  Lines         82517    82549       +32
  Branches       9986     9993        +7
=============================================
- Hits          35676    14323    -21353
- Misses        43878    66971    +23093
+ Partials       2963     1255     -1708

Impacted Files
Coverage Δ

...ava/alluxio/client/block/stream/BlockInStream.java
0.00% <0.00%> (-62.71%)
:arrow_down:

...uxio/client/file/cache/LocalCacheFileInStream.java
0.00% <0.00%> (-75.49%)
:arrow_down:

...a/alluxio/client/file/cache/LocalCacheManager.java
0.00% <0.00%> (-88.59%)
:arrow_down:

...mon/src/main/java/alluxio/master/ServiceUtils.java
85.71% <ø> (ø)

...alluxio/master/journal/raft/RaftJournalSystem.java
0.00% <0.00%> (-56.49%)
:arrow_down:

...n/java/alluxio/master/AlluxioJobMasterProcess.java
0.00% <0.00%> (ø)

...ommon/src/main/java/alluxio/metrics/MetricKey.java
97.43% <100.00%> (-0.39%)
:arrow_down:

...n/src/main/java/alluxio/metrics/MetricsSystem.java
52.03% <100.00%> (-9.38%)
:arrow_down:

.../server/common/src/main/java/alluxio/RpcUtils.java
32.00% <100.00%> (+2.83%)
:arrow_up:

...mon/src/main/java/alluxio/shell/CommandReturn.java
0.00% <0.00%> (-100.00%)
:arrow_down:

... and 678 more

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 6a0c01d...e515b5e. Read the comment docs.

alluxio-bot, merge this please


Does “fail rate” represent the difficulty score in your paper?

Same as the question

Thanks for your question! Yes, we mentioned in Section 3.2 "Evaluating Difficulty" Paragraph:

In this work, we introduce a new metric, fail rate – the proportion of incorrect responses when sampling $n_{d}$ responses for a given query – as a proxy for difficulty.


Check if event is default prevented when loseFocus (click) is triggered.

Released as v1.0.6. Thanks!


extrinsic descriptor in user_domain

Current dependencies on/for this PR:

main

PR #1044   👈

PR #1045

This stack of pull requests is managed by Graphite.


please reference a valid license uri

I'd like to add semantic-ui to web-jars, but it fails, because the referenced license is bogous: License 'http://semantic-ui.mit-license.org/' does not exist. Could you please reference a valid license uri? Maybe http://opensource.org/licenses/MIT

But it does exist!
http://semantic-ui.mit-license.org/

sorry... seems to be a bug in web-jars, then.


Convert library to plain old es5

Don't merge just yet
This should fix the issue where babel would hoist the function export to the top of the file, not allowing deasync to do its job.
I've tried using this in production and unfortunately is took down my site :(. For some reason locally it worked just fine, but after being compiled on CI there was zero errors but it seems the babel-relay-plugin was never run on the code. Any pointers on where to look next would be awesome.
Related: #6

@ekosz can you take a look if the problem still occurs for you?

Closing now that #6 is fixed


build: bump Langium to release candidate for 3.0

Summary of Changes
Bump langium to the release candidate for v3.0 to prepare for upcoming API changes before we add more features.

:tada: This PR is included in version 0.9.0 :tada:
The release is available on:

npm package (@latest dist-tag)
npm package (@latest dist-tag)
v0.9.0
GitHub release

Your semantic-release bot :package::rocket:


Registering a tag displays proper info when scanned

Everything works as advertised with scanning and displaying the right info


Renamed project to code_transformers

For consistency

Note we can't do the rename without also submitting a fix to the build bot infrastructure (see http://build.chromium.org/p/client.dart.packages/), otherwise the bots will not follow the new changes in this repo.

oh whoops, I already did this. However, I think it should be ok because github has redirect set up for everything? I will check to see if its working currently.

looks like its fine!


read/read_fully/read_partial/unbuffered_read behavior inconsistent and design unclear

Do IO#read methods wait for all requested bytes or return with any available data?  The current implementation varies in behavior depending the number of bytes requested.  What is the intended behavior?
read(slice, count) # loops until count bytes are read ONLY if slice < BUFFER_SIZE, otherwise returns BUFFERSIZE bytes
read(slice) # loops until slice.count bytes are read ONLY if slice < BUFFER_SIZE, otherwise returns BUFFERSIZE bytes
read() # loops until EOF
read(count) # blocks until count bytes are read (not sure how)
read_fully(slice) loops until read returns slice.count bytes. (double loop)

Completely missing is read_partial functionality - a method that returns any available bytes <= the requested size.

We'll probably remove read(slice, count) and use read(slice) instead, and it will read at most slice.length bytes and return the amount read. That would be the same as read_partial, right?
For the others:

read: reads everything
read(count): reads at most count bytes, looping until the count is reached or until EOF
read_fully(slice): tries to read slice.length bytes and raises EOFError if it can't

But it's true that we need to better design these methods.

There is an inconsistency with the above proposal which would be confusing for anyone trying to learn the API.

read: everything
read(count): everything
read(slice): NOT everything

I propose that read always reads the full amount requested

read: everything
read(count): everything
read(slice): everything

And read_partial returns whatever data is available

read_partial: first available data
read_partial(count): first available data
read_partial(slice): first available data

read_fully can be retired.

Let me annotate that read_partial should block if there are 0 bytes available.

We were thinking something along this line. These two methods, the ones that every IO must implement, read partially:
- read(slice : Slice(UInt8)) : Int32
- read(slice : Slice(Char)) : Int32

Every other read-related method reads fully, and this is the consistent part:
- read_fully(slice : Slice(UInt8)) : Nil
- read_fully(slice : Slice(Char)) : Nil
- read_to_end : Slice(UInt8)
- read_chars_to_end : Slice(Char)
- read_string_to_end : String # the current read()
- read(count) : Slice(UInt8)
- read_chars(count) : Slice(Char)
- read_string(count) : String # the current read(count)

The convention is that read, without suffix, means bytes. Then if there's an argument for overloading, like Slice(UInt8) or Slice(Char), we can use that. Otherwise, we use chars for Slice(Char) and string for String.
We will also remove read_nonblock.
gets will still be around, as reading a line only makes sense for strings.

@technorama Any opinion on the above methods, types and names?

I am confused about the need for Slice(Char) vs Slice(UInt8) vs String.  There seem to be too many types but maybe I am ignorant on the intended usage.
Please correct me where I'm wrong.

String is for utf8 strings
Slice(Char) is for ?
Slice(Uint8) is for binary/ascii, data, or passing to C functions.

read_nonblock can be useful with multiprocessing.
One example is nginx and forking.  The loop is similiar to:
# in each process
loop do
  multiprocess_lock do
    # multiple sockets are accepted by same process until failure to avoid context switch time.
    while sock = accept_nonblock
      add_to_event_queue sock
    end
  end

Currently it can only be done with forking.  Similar things can be done in the future with websocket or other servers/services when multithreading is available.

That's a case for accept_nonblock, perhaps not read_nonblock.  Maybe there isn't one.

The methods that accept Slice(Char) would work similar to Slice(UInt8): they would feel the slice with characters. We based this functionality from C#'s TextReader. Although now that I think of it, I don't know how to implement that, because read(slice : Slice(Char)) will probably invoke read(slice : Slice(UInt8)) and if you don't read the necessary bytes to "finish" a char I don't know how to handle that.
But read_chars : Slice(Char) can be implemented fine, and you'd get a slice, instead of a String.
@waj noted that in Go there's no read_nonblock so we might want to try removing it and later see if it's needed at all.

We finally decided to do it like this:
# partial read
- read(slice : Slice(UInt8)) : Int32
- read(slice : Slice(Char)) : Int32

# full read
- read_fully(slice : Slice(UInt8)) : Nil
- read_fully(slice : Slice(Char)) : Nil
- read_to_end : String
- read(count) : Slice(UInt8)
- read_chars(count) : Slice(Char)
- read_string(count) : String

There's still a discrepancy in behavior and naming.  read should be partial or full for all types of arguments.
 # partial read
- read(slice : Slice(UInt8)) : Int32
- read(slice : Slice(Char)) : Int32

# full read
- read(count) : Slice(UInt8)

Here's an example of what can go wrong.  Expect lots of confusion even when not refactoring.
# first iteration
while slice = io.read(FRAME_SIZE)
end

# optimized version reusing the same buffer.
slice = Bytes.new(FRAME_SIZE)
while io.read(slice) > 0
  # BREAKS HORRIBLY
end

You could make read(count) a partial read and add read_fully(count).
read_to_end as a Slice(UInt8) is useful in a variety of protocols.
# HTTP read without chunking or a known content-length
read_headers(io)
bytes = io.read_to_end # contains file data
io.close

# FTP
TCPSocket.open(host, data_port) do
  bytes = io.read_to_end
end

# Unix programs
Process.run("mysqlbinlog $filename") do |pr|
  process_binlog(pr.output.read_to_end)
end

I think I agree with the read overload that gets a fixed amount of bytes. We can name it read_bytes(count : Int32) : Slice(UInt8) instead.
Regarding methods to get the full binary content into memory, we'd like to discourage that and that's why we removed those overloads from the list. Reading as string is also questionable but sometimes convenient.

I'm closing this, the only partial behaviour if that of read(slice), read_fully(slice) reads fully, and then we don't have any other overloads for read.

This is still an issue basically, it's still inconsistent, read_nonblock is still there, broken and has no replacement.
Because of https://github.com/crystal-lang/crystal/blob/master/src/io/file_descriptor.cr#L225 it's not possible to request up to n bytes and return immediately. In other words there's no way to check whether there's data to read. Not even IO.select is usable to check for it, since the data may have been consumed by IO::Buffered already.
So we do lack an interface that

returns immediately in any case.
returns immediately if there's no pending data in any buffer, kernel or userspace.
tries to return as much data as possible but chooses to return less than requested instead of blocking the caller in any way.
does this independently of the type of the IO or its underlying file descriptor, and independently of any configuration/flags set on said file descriptor.

Alternatively we lack an interface that returns the number of bytes that the next read call can request without being blocked in any way (again independently of the type of the IO or its underlying file descriptor, and independently of any configuration/flags set on said file descriptor).

I honestly don't know a lot about these subjects, but if all our IOs are non-blocking by default, why do we need a read_nonblock? If the IO is not available, give the control to another fiber until this fiber is done. In what case do you need to read what's avaialable, without switching fibers?

Maybe @waj could comment more on this...

It quickly becomes important in TUI applications when reading keypresses, you may want to redraw continuously while no key is pressed, so not block on waiting for the next keypress, but also have precise control over when to read the next keypress.

Maybe it's about configuring something in IO::FileDescriptor to return the read bytes instead of switching to another fiber? The check should be done here:
https://github.com/crystal-lang/crystal/blob/master/src/io/file_descriptor.cr#L216-L234
Instead of calling wait_readable we would return.
How can we test this, if we want to support such feature?

Reading from an empty  pipe should work I guess.


Polishing search bar

Polishing the look and feel of the bar
Adding an "erase" functionality

Note: I couldn't test the component "IRL".
To be tested using "0.1.94-ed " @philipperolet

Two late additions:

current sparkle version is at 95, this PR can bump it to 96
did you want the focus to go to the searchbar on click on Xmark icon? can show you how to do this or do it if needed

@philipperolet I bumped to 96.

did you want the focus to go to the searchbar on click on Xmark icon? can show you how to do this or do it if needed

No I want the focus to leave the searchbar (which seem to be the case)