fix: allow cosign download sbom when image is absent

Summary
Closes: https://github.com/sigstore/cosign/issues/2603

Cosign will not fail to download sbom when image is absent.
This PR build on top of changes made in: https://github.com/sigstore/cosign/pull/2959
Proof:
$ DIGEST=$(crane digest cgr.dev/chainguard/static)

$ crane copy cgr.dev/chainguard/static@$DIGEST ttl.sh/sbom-no-img:1h
2023/09/16 21:37:03 Copying from cgr.dev/chainguard/static@sha256:a432665213f109d5e48111316030eecc5191654cf02a5b66ac6c5d6b310a5511 to ttl.sh/sbom-no-img:1h
...
sha256:a432665213f109d5e48111316030eecc5191654cf02a5b66ac6c5d6b310a5511 size: 1835

$ go run ./cmd/cosign sign ttl.sh/sbom-no-img:1h
Generating ephemeral keys...
Retrieving signed certificate...
...
Pushing signature to: ttl.sh/sbom-no-img

$ go run ./cmd/cosign attach sbom ttl.sh/sbom-no-img@$DIGEST  --sbom <(echo "{}")
WARNING: Attaching SBOMs this way does not sign them. If you want to sign them, use 'cosign attest --predicate /dev/fd/11 --key <key path>' or 'cosign sign --key <key path> --attachment sbom <image uri>'.
Uploading SBOM file for [ttl.sh/sbom-no-img@sha256:a432665213f109d5e48111316030eecc5191654cf02a5b66ac6c5d6b310a5511] to [ttl.sh/sbom-no-img:sha256-a432665213f109d5e48111316030eecc5191654cf02a5b66ac6c5d6b310a5511.sbom] with mediaType [text/spdx].

$ go run ./cmd/cosign download sbom ttl.sh/sbom-no-img@$DIGEST

WARNING: Downloading SBOMs this way does not ensure its authenticity. If you want to ensure a tamper-proof SBOM, download it using 'cosign download attestation <image uri>' or verify its signature using 'cosign verify --key <key path> --attachment sbom <image uri>'.
Found SBOM of media type: text/spdx
{}

$ crane delete ttl.sh/sbom-no-img@$DIGEST

$ crane delete ttl.sh/sbom-no-img@$DIGEST # delete confirmation
Error: DELETE https://ttl.sh/v2/sbom-no-img/manifests/sha256:a432665213f109d5e48111316030eecc5191654cf02a5b66ac6c5d6b310a5511: MANIFEST_UNKNOWN: manifest unknown

$ go run ./cmd/cosign download sbom ttl.sh/sbom-no-img@$DIGEST
WARNING: Downloading SBOMs this way does not ensure its authenticity. If you want to ensure a tamper-proof SBOM, download it using 'cosign download attestation <image uri>' or verify its signature using 'cosign verify --key <key path> --attachment sbom <image uri>'.
Found SBOM of media type: text/spdx
{}

Release Note

Added support for cosign download sbom when image is absent
Documentation

@haydentherapper @hectorj2f Added comments can you please review?


Automated daily update to rustc (to nightly-2024-12-01)

Automated update to Github CI workflow rust.yml by create-pull-request GitHub action

Pull Request Test Coverage Report for Build<PHONE_NUMBER>3
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 82.869%

Totals

Change from base Build<PHONE_NUMBER>1:
0.0%

Covered Lines:
20182

Relevant Lines:
24354

💛  - Coveralls


[BUG]  Field X does not exist in table schema

This was the same query that failed - but this one works
SELECT COUNT(*), planetId
FROM $satellites
FOR TODAY
GROUP BY planetId
ORDER BY COUNT(*) DESC
LIMIT 10

On the 'live' query - removing the ORDER BY clause, the error no longer occurs

See bug #179 , given the example uses a GROUP BY, it's the likely cause.


1.0 Release

More than a year ago the last release, 0.2.2 was published. Now the final 1.0 release is just around the corner introducing breaking changes and a lot of new features.
The major changes towards the core include the addition of the TUS-Resumable, TUS-Max-Size, TUS-Extension and TUS-Version headers while making the first one mandatory. All these headers must be returned in the new OPTIONS request in order to enable protocol discovery. In addition the Offset header must not be greater or lower than the current offset for the file.
The biggest changes were made by introducing the Upload-Expiration,  Checksum, Stream, Retries, Termination, Concatenation (formerly Merge) and Metadata extensions.
After all of this work the protocol is now considered stable and ready for use in production environments. Speaking of implementations the official tus-jquery-client and tusd repositories are currently being updated to support the 1.0 release.
This pull request will be merged once these changes are done. Furthermore, final feedback may be submitted to adjust minor things.

Awesome!
I've noticed one typo: "The biggest changes were made by introducing the Upload-Expiration, Checksum, Stream, Retires, Termination, Merge and Metadata extensions."

@qsorix Fixed, thanks. A blog post will follow soon. :)

:100:

If I had to nitpick, was there a reason to go for Merge over Concatenate? I personally thought the latter was more precise.

@kvz: If I had to nitpick, was there a reason to go for Merge over Concatenate? I personally thought the latter was more precise.

Sorry, I missed this. I'm ok with renaming the extension to Concatenation since merging may seem as if the chunks are mixed randomly and not ordered. Anyway, I would like to rename the header to Concat instead of Concatenate for simplicity but I am not religious about that. Opinions?
/cc @vayam

Concat is fine by me!
On Thu, Feb 5, 2015 at 5:27 PM, Marius<EMAIL_ADDRESS>wrote:

@kvz https://github.com/kvz: If I had to nitpick, was there a reason to
go for Merge over Concatenate? I personally thought the latter was more
precise.
Sorry, I missed this. I'm ok with renaming the extension to Concatenation
since merging may seem as if the chunks are mixed randomly and not ordered.
Anyway, I would like to rename the header to Concat instead of Concatenate
for simplicity but I am not religious about that. Opinions?
/cc @vayam https://github.com/vayam
—
Reply to this email directly or view it on GitHub
https://github.com/tus/tus-resumable-upload-protocol/pull/57#issuecomment-73076446
.

--
Kevin van Zonneveld (kvz.io)
Co-Founder, Transloadit (transloadit.com)

@Acconut sorry I missed that. Question: If I am implementing the server and I don't want to support Merge:Final before individual chunks are completely upload. Can I just return 412 or 400? What do you suggest?

@vayam Good thought. What about updating the spec to do following:
By default it is not allowed to concatenate uploads when not all of them are finished. The response is not specified by the spec but 412 is already used to mark unsupported versions (see TUS-Resumable). Of course, you can use 400 or if it is too general 422 Unprocessable Entity.
In the case that none of the above work just make your own status code, it is allowed by the HTTP spec. :)
If servers decide to support this feature they should add concatenate-unfinished to TUS-Extension.
You are correct, this eases implementations a lot. Thanks for this mention.

422 Unprocessable Entity works!
concatenate-unfinished sounds good.

@vayam See aa20f727638e916a36b25a17a82ba0e370b9f9e8. Does this work for you?

@Acconut looks good!

While implementing the Concatenation extension for tusd I stumbled across following thought:
Should the maximum defined in TUS-Max-Size also apply for concatenated files? For example, the server's max. size is 2GB. A client now uploads three partial uploads each 1GB. Until now everything is ok since the sizes are in all cases lower. Now the client wants to concatenate these three files resulting in a 3GB file.
The question is whether the specification should prohibit/allow if this action (a concatenated upload is bigger than the maximum size) or leave this point up to the implementation?

@Acconut Tough one. I expect that the main reason for using TUS-Max-Size is the worry about limitations of storage or further processing steps. With that use-case in mind, I think it makes sense if the tus server rejects both on PATCH and on concat, should it calculate that the resulting file will become bigger than the max allowed size. There should probably be a remark about this in the concat extension. Open to hearing other views on this.

@kvz The reasons for limiting upload sizes are not always possibilities but also safety to not flood your server (e.g., you don't need to allow uploads with GBs for a simple 100x100 avatar).
Anyway, I think it makes sense to add that if a limit is presented it must be applied for concatenation as well. If not static value is able to be determinated that spec defines the behaviour already:

If no hard-limit is presented or the server is not able to calculate it this header MUST be omitted.

In the meantime I will have a look at whether we can use the Vary header to indicate that TUS-Max-Size may change for different requests.

The Vary header contains a list of request headers depending on which the response body will change (e.g. user agent string). This is very important for proxies, caches and crawlers but not usable for our case.

@kvz @Acconut w.r.t TUS-Max-Size I realized that one of my requirements is to return the max upload size allowed based on user storage quota. What do you guys think of returning TUS-Max-Size in response to every POST creation request instead of being generic response to OPTIONS /files request? Again if you think it is not generic requirement, I am ok to handle it outside TUS protocol.

@vayam I would like to keep the TUS-Max-Size header in the OPTIONS response for separation.
As you mentioned, feel free to extend the protocol if you feel like it :+1:

I just want to throw in a quick update:
The update for tusd is nearly finished, most of the basic extensions are implemented (expect Streams, I am not sure if I'll do it before the release or not) and the core, too, of course.
Our jquery-plugin does support the core but no additional extensions yet, although I plan to only implement Metadata for now.
Sadly, I am not able to work on the iOS project since I am not able to use Objective-C. Any help is appreciated.

Hi all, may I ask what the status is on this?  We're interested in using tus in a project (and are happy to be contributors), but want to know if there are other efforts I'm not aware of.

Hi Justin,
We're waiting on a final round of feedback, but I don't expect that will result in many changes from the current 1.0 proposal so we're very close to completing this.
All contributions are welcome, anything particular you had in mind?
Kind regards,
--
Kevin van Zonneveld (kvz.io)
Co-Founder, Transloadit (transloadit.com)
On 11 Sep 2015 at 15:51:40, Justin Henck<EMAIL_ADDRESS>wrote:

Hi all, may I ask what the status is on this? We're interested in using tus in a project (and
are happy to be contributors), but want to know if there are other efforts I'm not aware
of.

Reply to this email directly or view it on GitHub:
https://github.com/tus/tus-resumable-upload-protocol/pull/57#issuecomment-139552839

I just wanted to give a quick status update for myself:
The new X-HTTP-Method-Override header needs to be updated in tusd and tus-java-client.  In addition I would like to update the texts on http://tus.io and there is still the Developer Guide left to be written. But all of these tasks do not require work on the protocol spec, which you can call finished.

Hm did Justin remove his question or am I doing something silly?
No, you're not becoming silly :)

I decided to try to find a mailing list vs. using a pull request for my own gain :).
I may have a chance to take a look at the java client.

I decided to try to find a mailing list vs. using a pull request for my own gain :).

Makes sense! We don't have a mailing list - we do have a Slack channel tho and be happy to shoot you an invite to chat. We're considering switching to gitter.im to lower this bar of entry.

I may have a chance to take a look at the java client.

Excellent!

Working on a blog post with Project Status that we'll publish soon.

The blog post, @kvz mentioned is online now: http://tus.io/blog/2015/09/19/project-status/


IntelliJ -> IntelliJ IDEA

Product name is "IntelliJ IDEA".
But there are more occurrences of the mistake in online version of Koans and I did not find texts for it in this project. Would be great to fix too.

Thanks! I've made the other change as well (it should be deployed though).


new illust from bookmark - Page 100 is ignored

When using command 8, start page 1, end page 0 (no limit) : page 100 is ignored.

Hi, can you provide more details, including the log file?

It says « Limit or last page reached. » but this line is missing in the console :
« Source URL: http://www.pixiv.net/bookmark_new_illust_r18.php?p=100 »
We have to download page 100 manually. :3


Allow spaces in the BizTalk application name

Allow spaces in the BizTalk application name
This work item was migrated from CodePlex
CodePlex work item ID: '7175'
Assigned to: 'tfabraham'
Vote count: '1'

[UnknownUser@10/13/2010]
Resolved with changeset 50966.

[UnknownUser@2/21/2013]

[UnknownUser@5/16/2013]


Optimizing mkallsyms scripts with python

Summary
When compiling my project, the time to generate allsyms decreased from tens of seconds to 2 seconds
Impact
Testing
Enable CONFIG_ALLSYMS
and execute pip install pyelftools cxxfilt

@Gary-Hobson please fix the lint error:
https://github.com/apache/incubator-nuttx/runs/8267006939?check_suite_focus=true

Probably we need to add allsyms.tmp to .gitignore

Probably we need to add allsyms.tmp to .gitignore

Normally you shouldn't see allsyms.tmp because it gets deleted after use.
define LINK_ALLSYMS
	$(Q) $(TOPDIR)/tools/mkallsyms.py noconst $(NUTTX) allsyms.tmp
	$(Q) $(call COMPILE, -x c allsyms.tmp, allsyms$(OBJEXT))
	$(if $(CONFIG_HAVE_CXX),\
	$(Q) "$(CXX)" $(CFLAGS) $(LDFLAGS) -o $(NUTTX) \
	      $(HEADOBJ) nuttx.rel $(HOSTOBJS) $(STDLIBS) allsyms$(OBJEXT),\
	$(Q) "$(CC)" $(CFLAGS) $(LDFLAGS) -o $(NUTTX) \
	      $(HEADOBJ) nuttx.rel $(HOSTOBJS) $(STDLIBS) allsyms$(OBJEXT))
	$(Q) $(call DELFILE, allsyms.tmp allsyms$(OBJEXT))
endef

Yes, but that's what I see from CI logs

Does this mean that Python becomes a mandatory part of the build process?

Does this mean that Python becomes a mandatory part of the build process?

Yes, if you enable CONFIG_ALLSYMS. But I would said that python is more portable than shell script if you want to support Windows.

who can help me!
Some CIs report errors, but I can't find the reason from the log, who can tell me what I should do?
make[1]: *** [Makefile:324: nuttx] Error 2
make: *** [tools/Unix.mk:509: nuttx] Error 2
make: Target 'all' not remade because of errors.
/github/workspace/sources/nuttx/tools/testbuild.sh: line 290: /github/workspace/sources/nuttx/../nuttx/nuttx.manifest: No such file or directory
  Normalize sim/minmea

who can help me! Some CIs report errors, but I can't find the reason from the log, who can tell me what I should do?
make[1]: *** [Makefile:324: nuttx] Error 2
make: *** [tools/Unix.mk:509: nuttx] Error 2
make: Target 'all' not remade because of errors.
/github/workspace/sources/nuttx/tools/testbuild.sh: line 290: /github/workspace/sources/nuttx/../nuttx/nuttx.manifest: No such file or directory
  Normalize sim/minmea

Linker error? Forgot to add one or more files to CSRCS in a Makefile somewhere?

You can repro the problem locally by ./tools/configure.sh sim:minmea

I gave up replacing the default mkallsyms.py because using it requires installing some dependencies.
I may need to add the dependency in CI and then replace it

I gave up replacing the default mkallsyms.py because using it requires installing some dependencies. I may need to add the dependency in CI and then replace it

You can install the dependencies from:
https://github.com/apache/incubator-nuttx/blob/master/tools/ci/docker/linux/Dockerfile
https://github.com/apache/incubator-nuttx/blob/master/tools/ci/cibuild.sh#L49

@Gary-Hobson please move the change for Dockerfile and cibuild.sh to the new patch.

@Gary-Hobson please move the change for Dockerfile and cibuild.sh to the new patch.

done

let rebase to the last.


Created array type response

@guilhermesiani Can I have tests for this and resolve the conflict.

Build is failing, Please fix and re submit the pull request.


Return {ok, State} from handle_config_change/5

This is me being stupid!!!
This is a fixup commit for COUCHDB-3102.
config_listener expects either remove_handler or {ok, State} from the
callback module.
COUCHDB-3102

+1

Wait, wouldn't it be better to grab and return State on handle_config_change? Or is it guaranteed always be nil?

@eiri: We pass initial state as a second argument here. In this case we don't care about its content.

Right, but if we ever change this we'd have to remember change all handle_config_change as well, right?

I agree with @eiri that we should be passing the state variable through here, rather than repeating nil all over, a tidy up commit would be nice.


Introducing Opendal as our new object_store dependency.

Describe This Problem
The introduction of opendal as our object_store dependency has been considered before. We would very much welcome someone from the community who can continue to push this forward.
Proposal
Replace our current object_store dependency with opendal.
Additional Context
No response

cc @ShiKaiWi @ShiKaiWi @tisonkun

Will opendal add too many dependencies, if we only use one or two backend?

Most of services (storage backend) is optional. I build the default crate (with s3 bundled) and the result is
$ cargo build --release
$ ls -l target/release/libopendal.d
-rw-r--r--  1 tison  staff  11398 Oct 25 06:22 target/release/libopendal.d

How is its performance?

I remember @Xuanwo and @Zheaoli once did a performance test. Maybe they'll have more information.

Most of services (storage backend) is optional.

👍
Then we will wait to see how opendal performed compared with object-store.

Then we will wait to see how opendal performed compared with object-store.

We have added a benchmark inside opendal which compared with aws-sdk-s3, welcome to take a look and bench on your env: https://github.com/apache/incubator-opendal/tree/main/core/benches/vs_s3
Despite potential variations in results, the conclusion is clear: we are all built on rust and powered by hyper, exhibiting similar performance.

Finish in #1557


Add a comprehensive test for the new API

Possibly implement a Mersenne twister test suite (Verilog version: https://github.com/alexforencich/verilog-mersenne)

Mersenne twister can be implemented in a single module. Currently working on integrating the unit into a larger model that requires SST's environment, such as a Monte-Carlo integration.

Working example with an inelegant exit: https://github.com/lpsmodsimteam/SIT-examples/tree/main/monte_carlo_integration


BUG: Use MST algorithm instead of SLINK for single linkage clustering

Following #5960 I replaced SLINK algorithm with MST. It was rather straightforward to implement, except that post-labeling algorithm had to be changed slightly as well.
Timings show that MST is slightly faster on a random input and NN-CHAIN is about 2 times slower (so using MST makes sense).
Tests with ties (the very reason to replace SLINK) were taken from #5960.

Interesting that the Mullner paper has 54 citations already but was never published in a journal.
This PR implements the method originally by  Rohlf (1973), so citing that paper would be good as well.

@nmayorov it would be good to cherry-pick https://github.com/scipy/scipy/pull/5960/commits/b82937e6e63b so you preserve the authorship info.

@rgommers I think it's done.

In it goes then. Thanks @nmayorov!

won't do an 0.18.x release anymore, so removing the backport label


Add support for reset zoom

Please add support for resetting zoom scale. Thanks

toggleZoom() should reset the scale if you have zoomed in.

Closing due Inactivity

@Raysix93 toggleZoom() works well, but what is the best way to know if the element has been zoomed? If call toggleZoom() and there is no zoom, then we go to max zoom.

Looks like isZoomedIn does the job.


move pub to sdk/lib/_internal

move pub to sdk/lib/_internal

This issue has been moved to dart-lang/pub#268.


SFXEnvironment reflections set to a floating point number

https://github.com/Areloch/Torque3D/blob/BaseGameTemplate/Templates/BaseGame/game/core/sfx/audioEnvironments.cs#L268
It should be set to an integer.

Corrected. Set value to 1


feat: allow to broadcast every tx of the script at once

Component
Forge
Describe the feature you would like
For long deployment scripts, waiting txs for receipts and then broadcasting the next one can take a lot of time, it'd be nice to allow the user to broadcast them all (at the user's safety expense since one of them could revert).
Since all txs are signed with a nonce, no reordering could happen that would make one prior to a previous one.
--slow method seems to be selected by default, plz add --fast one 🙏
Related to #5035
Additional context
No response

Would be great to have this! Our protocol has become quite large, and a testnet deploy currently takes 30 mins... :)

Is this not currently possible? What is the forge script --batch-size parameter?
https://book.getfoundry.sh/reference/cli/forge/script?highlight=batch-size#forge-script says

The --batch-size parameter was added here: https://github.com/foundry-rs/foundry/pull/7540/files to handle < 100 case and is automatically enabled if batching is available and --slow is not enabled.
Marking as resolved. Please re-open if this does not resolve your issue.

Only works when txs are from the same sender though, unfortunately.


Kando can't process documented profile schema

When running kando in the version 0.21.0 it can't read the profile in the documented schema.
Error message:
ERRO[0000] json: cannot unmarshal object into Go struct field KeyPair.Secret of type string
failed to unmarshal profile
github.com/kanisterio/kanister/pkg/kando.unmarshalProfileFlag
        /go/src/github.com/kanisterio/kanister/pkg/kando/location.go:53
github.com/kanisterio/kanister/pkg/kando.runLocationPush
        /go/src/github.com/kanisterio/kanister/pkg/kando/location_push.go:48
github.com/kanisterio/kanister/pkg/kando.newLocationPushCommand.func1
        /go/src/github.com/kanisterio/kanister/pkg/kando/location_push.go:36
github.com/spf13/cobra.(*Command).execute
        /go/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:762
github.com/spf13/cobra.(*Command).ExecuteC
        /go/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:852
github.com/spf13/cobra.(*Command).Execute
        /go/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:800
github.com/kanisterio/kanister/pkg/kando.Execute
        /go/src/github.com/kanisterio/kanister/pkg/kando/kando.go:31
main.main
        /go/src/github.com/kanisterio/kanister/cmd/kando/main.go:22
runtime.main
        /usr/local/go/src/runtime/proc.go:200
runtime.goexit
        /usr/local/go/src/runtime/asm_amd64.s:1337

The JSON I try to call kando with:
{
    "apiVersion": "cr.kanister.io/v1alpha1",
    "credential": {
        "keyPair": {
            "ID": "access_key_id",
            "secret": {
                "apiVersion": "v1",
                "name": "default-profile-creds",
                "namespace": "kanister"
            },
            "secretField": "secret_access_key"
        },
        "type": "keyPair"
    },
    "kind": "Profile",
    "location": {
        "bucket": "my_bucket",
        "endpoint": "https://example.com",
        "prefix": null,
        "region": null,
        "type": "s3Compliant"
    },
    "metadata": {
        "labels": {
            "app": "profile",
            "chart": "profile-0.20.0",
            "heritage": "Tiller",
            "release": "kanister-default-profile"
        },
        "name": "default-profile",
        "namespace": "kanister"
    },
    "skipSSLVerify": false
}

Then I modify the JSON to the following it works:
{
    "apiVersion": "cr.kanister.io/v1alpha1",
    "credential": {
        "keyPair": {
            "id": "xxxxxxxxx",
            "secret": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
        },
        "type": "keyPair"
    },
    "kind": "Profile",
    "location": {
        "bucket": "my_bucket",
        "endpoint": "https://example.com",
        "prefix": null,
        "region": null,
        "type": "s3Compliant"
    },
    "metadata": {
        "labels": {
            "app": "profile",
            "chart": "profile-0.20.0",
            "heritage": "Tiller",
            "release": "kanister-default-profile"
        },
        "name": "default-profile",
        "namespace": "kanister"
    },
    "skipSSLVerify": false
}

The JSON for the Kubernetes resource that is not working was created by the helm chart "Profile CustomResource" contained in the repository.
Software Versions
Kanister 0.21.0
Kubernetes 1.14.6

When we execute kando command from within a blueprint, we pass the value of Profile generate by TemplateParams (check this file https://github.com/kanisterio/kanister/blob/master/pkg/param/param.go#L84) after converting it to JSON. So while executing the kando command on terminal, we cannot convert the profile.cr.kanister.io into json and pass it to kando. Hence, it failed in your case.
However a simple example of how you can execute kando on terminal is as follows:
echo "hello" | kando location push --profile '{"Location":{"type":"s3Compliant","bucket":"MY_TEST_BUCKET","endpoint":"","prefix":"","region":""},"Credential":{"Type":"keyPair","KeyPair":{"ID":"MY_AWS_ACCESS_KEY_ID","Secret":"MY_AWS_SECRET_ACCESS_KEY"}},"SkipSSLVerify":false}' --path /test.txt -

The above command will push file test.txt, with content "hello", to MY_TEST_BUCKET  in S3. WE have converted TemplateParams.Profile into JSON and passed it to kando
Please take a look at this example blueprint https://github.com/kanisterio/kanister/blob/master/examples/helm/kanister/kanister-mongodb-replicaset/kanister/mongodb-blueprint.yaml which uses kando to backup, restore and delete data.
Hope this resolves your issue :)
Let us know if we can be of any further help.

Thank you for the reply.
I didn't realize the JSON passed to kando is not the same JSON that you get from the Kubernetes API. Therefore, my conclusion for the error was wrong.
The issue in my blueprint was that I didn't put the function toJson in front of the .Profile as in the example https://github.com/kanisterio/kanister/blob/master/examples/helm/kanister/kanister-mongodb-replicaset/kanister/mongodb-blueprint.yaml#L31. The dedicated documentation https://docs.kanister.io/tooling.html#kando does not include the function toJson in the example. Maybe the documentation needs to be updated.

Thanks for notifying  us about the issue. We have updated the docs in PR https://github.com/kanisterio/kanister/pull/331.
Closing this issue.


Split tuples in return positions by comma first

Summary
Split tuples with two elements by comma first (does not apply to 1 or three element tuples for some reason).
Closes https://github.com/astral-sh/ruff/issues/8042
Test Plan
Added tests, verified that the similarity index is unchanged

Current dependencies on/for this PR:

main

PR #8280   👈

This comment was auto-generated by Graphite.


tumor variants

Hi, just a simple question: is it only mutect that supports tumor variant calling without normals? Principally, should not varscan, freebayes and perhaps also other tools be able to do this?

All of them work in tumor-only mode as far add I know. I recommend vardict.

great!

Sven-Eric is right on as usual. In addition, this post describes approaches we take to try and remove germline variants from tumor-only calls:
http://bcb.io/2015/03/05/cancerval/
Hope this helps.


App Stuck on Loading

Hello
I followed "https://thingsboard.io/docs/pe/mobile/getting-started/" to test the app on my android (using ThingsBoard Cloud). Everything worked fine on an emulator but when I run the app on my phone (Samsung Galaxy S10), It stuck on loading screen and can't do anything.

Hello @chatchai-bix,
I will close this issue since a significant amount of time has passed since your initial query. However, if the issue is still relevant, please feel free to reopen it and provide additional information, such as the mobile app console output.
Thanks!


Consistent CLI argument format and validation

Adds support for

setting long form options using double hyphen
defining properties with double hyphen addition to -D
validate properties based on plugin configuration

@dita-ot/docs the documentation should use --long=value instead of other alternatives. We still support the old formats for backwards compatibility, but the documentation should point to the common *NIX CLI format.
For passing properties, the format --<property>=<value> should be used. An error message is thrown if the property is not recognized or if the value is invalid (for enumerated property value space).

OK, I'll add a new docs issue to ensure it's on the radar for the 2.4 release.


Enable Filtering of the Catalog Page

I've been working on making the filters work in the sidebar of the catalog page and making starred entities work.
The data is stored in local storage, and the last part is to be able to star a particular entity from the row in the table, and the entity page itself. I've added a simulated delay so that you can see the loading state of both the filter counts and the table itself (don't worry I haven't pushed that).
There's a flicker between loads right now, as the data that comes back from the catalog API is not cached client side. Torn between biting the bullet and doing that now or waiting for GraphQL as we will get client side caching for free for all the requests if we use something like Apollo so I'm open to opinions here: @spotify/backstage-core .

:heavy_check_mark: Checklist

[ ] All tests are passing yarn test
[ ] Screenshots attached (for UI changes)
[ ] Relevant documentation updated
[ ] Prettier run on changed files
[ ] Tests added for new functionality
[ ] Regression tests added for bug fixes

Closes #990

Torn between biting the bullet and doing that now or waiting for GraphQL as we will get client side caching for free for all the requests if we use something like Apollo so I'm open to opinions here

Let's wait for GraphQL and not introduce temporary code ;) we basically had the same dilemma in the circleci plugin

also @katz95 - are these loading states acceptable. I kinda just winged it with what we had in the library, think it looks ok. 🤷  😂

No it's not, just got to add a start to the table and the component page. This should be ready now!


[SPARK-40692][SQL] Support data masking built-in function 'mask_hash'

What changes were proposed in this pull request?

This PR implements data masking built-in function 'mask_hash'
It returns a hashed value based on the input field. The hash will be consistent and can be used to join masked string values together across tables.
Why are the changes needed?

To support data masking built-in function mask_hash, which returns a  hashed value of the input string
Ref : Data masking functions
Does this PR introduce any user-facing change?

Yes,  added a new Spark SQL property spark.sql.masking.algo to indicate whether FIPS mode is enabled or not
How was this patch tested?

Added test cases

cc @dtenedor you might be interested into this implementation.

@HyukjinKwon, Can you please review this PR?

cc @cloud-fan, could you help review this PR?

one more reference: https://docs.snowflake.com/en/sql-reference/functions/sha2.html
We can probably find more references and decide the function name and signature for consistent hash.
cc @srielau

I'd like to reach a consensus on https://github.com/apache/spark/pull/38263#discussion_r1009055117 before moving forward.


How to use in ReactJs?

Does anyone have an example of how to use it as a ReactJs component?

https://github.com/ramonszo/zuck.js#react-support


Refactor use of .data parameter in output patterns file to be more consistent across blocks

It might be helpful to always pass in just one object, the interview object, so that the name of attributes and variables from the parent interview always matches the name in the output_patterns.yml

Closing; our plan is to get rid of the current output_patterns.yml file and make one that can be customized on a per-organization basis more easily.

See #529


Mkdocs and Actions to publish it on GitHub Pages

added pages.yml to publish pages
added mkdocs.yml, requirements_mkdocs.txt to build mkdocs
Mike produces verstions and uses mkdocs
versions are being stored in gh-pages branch
mkdocs uses material theme, jypiter, docstrings plugins
.pages desctibes navigation

Call me in the morning and let's run through the code & github settings.


Realm cannot recognize/include classes in Test target when initialized too soon

I'm tracking down a weird bug... it seems to me that when a Realm gets initialized too early, it doesn't reupdate with new schemas that are included later.
So here's an example setup:
In TestBug folder
AppDelegate.swift
import UIKit
import RealmSwift

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?

    func application(application: UIApplication, willFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
        // Offending line of code
        _ = try! Realm()
        return true
    }

}

BaseModel.swift
import RealmSwift

class BaseModel: Object {
}

In TestBugUnitTest folder
TestModel.swift
import UIKit
import RealmSwift
@testable import TestBug

class TestModel: BaseModel {
    dynamic var someProperty: String = ""
}

TestBugTests.swift
import XCTest
import RealmSwift

class TestRealmSyncTests: XCTestCase {
    override func setUp() {
        super.setUp()
        Realm.Configuration.defaultConfiguration.inMemoryIdentifier = self.name
    }

    func testExample() {
        let realm = try! Realm()
        let testObject = TestModel()
        testObject.someProperty = "test" // Throws error: failed: caught "NSInvalidArgumentException", "-[RLMStandalone_BaseModel setSomeProperty:]: unrecognized selector sent to instance 0x7ff2d84dce50"
    }
}

And it looks to me that what's causing this is something to do with the way object schemas are created.  When a Realm is first created too early, even if later we change the default configuration, those schemas are not reloaded.  So here when the realm is first created in the AppDelegate, none of the test files are included in the objc calls.  That's bad because then when we go to create a new Realm object with a class that has its declaration in the test target, Realm has no idea what we're talking about and just resorts to using the base class.  And we get a different error if we try something simila rwithout the base class: -[TestRealmSyncTests.TestRealmSyncTests testExample] : failed: caught "RLMException", "Object type 'TestModel' not persisted in Realm".  So it's definitely a schema issue.
As to workarounds, I really do need to instantiate Realm that early because I would like to have that persisted information around for restoration (happens between willLaunch and didLaunch).  So I suppose the best workaround is to just declare any and all Realm objects in the main target?
Bug fixes on your end are to reload in schemas after realm changes?  I expected changing the inMemoryIdentifier would reload the schemas, but apparently it doesn't.  I'm not sure exactly the timing on when and how schemas get read in from files.
What do you all think?

At first glance, this seems like it may be a legitimate issue, but this will need further investigation to confirm that it's a bug and to identify why this is happening.
In any case, thanks for reporting this!

The problem is that Realm only scans the list of obj-c classes once (since it's a fairly expensive operation), so any classes defined in bundles loaded after that are never registered with Realm. application:willFinishLaunchingWithOptions: is called before your test bundle is injected into the process, so any classes defined in the test target haven't been loaded yet.
You probably don't actually want to be doing your normal willLaunch/didLaunch things when running tests, so one simple solution would be to set and environment variable for you test target, and skip doing anything if it's set.

That works for me @tgoyne, although I wish there was a way to directly add Realm classes to the Schema at runtime because while I agree that scan operation is way too costly to run each time a new file could appear in the bundles, the user should be able to override this behavior and add files they know  are Realm files.
And the env var is a good option if there's no way to add schema files manually, but I try to keep as much testing code checks out of the main code as possible.

@tom-sparo (cc @jpsim, @tgoyne) can we close this issue?

Yeah, it's ok to close this one. Although we'll probably end up improving this situation when building #938 or #2459.


Accessibility: Add alt to message avatars

Hi there,
I'm going through some accessibility updates with my app and one thing that came up is that chat message avatar images do not have an "alt" tag.
I didn't see a clear way to add this - Maybe it could be configurable as part of the avatar options?

Hi @jbrachtie.
Thankyou for letting me know about this issue!
I am currently working on a big refactor and am preparing for the next release, hence I am a little occupied. But I will definitely also include this enhancement in the upcoming release. I can't give you an exact date that this will take place, but rest assured I will be adding it.
I will keep this issue open and update you when it takes place.
Thankyou again!

I have updated the "deep-chat-dev" and "deep-chat-react-dev" package versions "9.0.200" to contain the "alt" property in the avatars.
These packages work exactly the same as the core ones except their names are different. Please let me know if the new implementations fix the accessibility issues.
I will moving these changes to the core packages sometime in the near future, but I have a couple of more features to get through before I can do that. I will keep this issue open until this happens. Thankyou!


Add extra parameter in SignalR method without breaking changes

I want to pass additional parameter via Signalr without any breaking changes.
SignalR hub web api side signalr nuget package being used is "Microsoft.AspNetCore.SignalR" Version="1.0.3".
Client side nuget package being used is "Microsoft.AspNetCore.SignalR.Client" Version="1.0.3" />
Initial code at signalr hub web api side is given below-
public async Task<bool> SendResponse(string uniqueId, string param1, string param2, string param3, string param4, string param5, string param6)
{
	await HubContext.Clients.Group(uniqueId).SendAsync("SendResponse", param1, param2, param3, param4, param5,param6);
	return true;
}

Initial code at client side-
Connection.On<string, string, string, string, string, string>("SendResponse",
async (param1, param2, param3, param4, param5, param6) =>
{
	//code here.
});

This client side code is shared with everyone via a nuget package and its on application owner when he want to update the nuget package.
Till now everything is working fine a changed requirement (pass a new parameter with response) arise.
To fulfill this requirement I have made below given code changes in signalr hub side-
public async Task<bool> SendResponse(string uniqueId, string param1, string param2, string param3, string param4, string param5, string param6, string param7)
{
	//send 6 parameters in old method so that client code can continue his work without updating client side code changes.
	await HubContext.Clients.Group(uniqueId).SendAsync("SendResponse", param1, param2, param3, param4, param5, param6);
	//Send 7 parameters in new method.
	await HubContext.Clients.Group(uniqueId).SendAsync("SendResponse2", param1, param2, param3, param4, param5, param6, param7);
	return true;
}

SignalR is hub web api service updated with these code changes and issue start arise after that.
Client applications who has old SignalR client code start receiving errors-
Exception thrown: 'System.IO.InvalidDataException' in Microsoft.AspNetCore.SignalR.Protocols.Json.dll
Invocation provides 7 argument(s) but target expects 0.

Changes at client side for SendResponse2 method-
Connection.On<string, string, string, string, string, string, string>("SendResponse2",
    async (param1, param2, param3, param4, param5, param6, param7) =>
    {
    	//code here.
    });

Please let me know how can I fix this issue.
The main important thing for me is that my end user should work fine if they have updated the client side code or not.

There's no good way to do this today as we don't support overloading or default parameters. We can consider it in the future. Your only option for working around this are to make another method with a different name.
There are other "clever" hacks that might work but they are all ugly.
PS: 7 arguments might be too much. It may be time to think about some complex object types.

Hi @davidfowl, it was just a typo, I have updated my question. Renaming the method didn't work and we got the error.

I presume older clients do not define the SendResponse2 method? This confusing error message is a known issue in 2.1 (https://github.com/aspnet/SignalR/issues/2313) and is fixed in 2.2. But all that fixes is the error message, it doesn't fix the problem. The client will get this error if the server attempts to call a method that it doesn't define.
One option you could use here is to have the new client call a "SetVersion" server method indicating it is newer and when you add it to a group, add it to [groupName]_version2 instead. Then you can call the old method on [groupName] and the new method on [groupName]_version2.
Moving forward, I would definitely suggest you use classes as parameters (as I mentioned in your SO question) because it would avoid this problem altogether.

We'll look at some small things (like not failing if the server sends an unknown invocation to the client, etc.) to improve this story in 3.0

@anurse , that will be really helpful.


Simplify create_readers

This builds upon #1657. The second commit shows a bug in the current implementation of create_readers. It was hidden by the fact we multiply by num_clients which is often more than 1 in multi-corpora implementations.

Adding more comments on the algorithm in this function. What is it doing on a high-level?

Done in 8f05ed2 (#1659). This helped me find a bug which I fixed in dca5271 (#1659).

Reducing noise as much as possible, e.g. do we need the debug log statements?

As mentioned above, this is done in a26e18c (#1659).

Simplifying control structures, e.g. can we reimplement this so we don't need a continue statement?

Done in dcee647 (#1659). This was much easier with the debug logs gone!

Can we pick even more descriptive variable names (e.g. what differentiates readers from staggered_readers? The similar name implies e.g. similarity in data structure which is not the case)?

Done in 8f05ed2 (#1659). I also added types in 6e35a40 (#1659) to clarify further the contents of the variables.
Can you please take another look?

This LGTM, though I haven't done any local testing, and I'm temporarily without GH access. I can circle back in a few days if you'd like

@DJRickyB I appreciate the offer but you don't have to do this now, you know :)

@elasticmachine run rally/it-python38 please

Closing/reopening to get a RtD status.

@elasticmachine run rally/rally-tracks-compat please now that https://github.com/elastic/rally-tracks/pull/375 was merged.


Get content scale drop FPS

Here is profiler screenshots. Here you can see why drops my FPS. Problem with get content scale function.

Used commit from 10 September as I remembered.

How frequently are you calling the function and how long does it take to execute?

I getting every frame. It depends on the version of GLFW. The last commit I not seen this leak. I previous commits (I don't know what number) this performance drop not so visible.

So the performance is acceptable now?

For OpenGL yeah. For Vulkan API I don't know, I work on Vulkan API version.

All right, no hurry and thank you for the follow-up! The performance of glfGetWindowContentScale should be identical between rendering APIs as it doesn't interface with them at all.
That said, the current implementation is far from optimal and I will try to improve it before 3.3 release.


CARDS-1417: Print-friendly styling of forms - refactoring with a reusable, self-contained Print button

Patient chart looks terrible in this PR. Hope this is completely out of scope.

Should PRINT button be dark blue?

Patient chart looks terrible in this PR. Hope this is unrelated and completely out of scope.

It is unrelated. It is caused by the bulky computed interpretations that we have in the surveys.

Question: Can we have this functionality here as well? Or at least option to email the results back to the patient? Both?

Please make a separate task. The implementation would have to be very different from what we have here, and it's low priority since it wasn't requested in the specs.

The dark blue button looks great.
Splitting a long form into pages is still broken
CARDS-1417 _ 1_ Patient Health Questionnaire-9 _ DATA-PRO.pdf
.

Can we make the top and the bottom line red?

It would be nice if we can remove this information from view mode and consequently from the print preview.

It would be nice if we can remove this information from view mode and consequently from the print preview.

This is what the question looks like ("Here is some information...") and that is the patient's answer which needs to be printed out, We can't change the specs of the Smoking cessation questionnaire.

Can we make the top and the bottom line red?

Why red? That's usually reserved for highlighting something dangerous. Also, the top red line would get printed out. Did you want the parts that don't get printed (the buttons zone at the bottom) out styled differently instead, e.g. with a gray background?

Why red? That's usually reserved for highlighting something dangerous. Also, the top red line would get printed out. Did you want the parts that don't get printed (the buttons zone at the bottom) out styled differently instead, e.g. with a gray background?

It looks a bit to much B&W. How about dark blue?

This is what the question looks like ("Here is some information...") and that is the patient's answer which needs to be printed out, We can't change the specs of the Smoking cessation questionnaire.

How about moving "Here is some information about each program. You can only choose one program." into an info box, and changing question label to: "Click on the program you want to register in."?

This is what the question looks like ("Here is some information...") and that is the patient's answer which needs to be printed out, We can't change the specs of the Smoking cessation questionnaire.

How about moving "Here is some information about each program. You can only choose one program." into an info box, and changing question label to: "Select the program you want to register in."?

Please make a separate [IDEA] task. This is unrelated to printing implementation.

Why red? That's usually reserved for highlighting something dangerous. Also, the top red line would get printed out. Did you want the parts that don't get printed (the buttons zone at the bottom) out styled differently instead, e.g. with a gray background?

It looks a bit too much B&W and kind of old. How about dark blue?

Noted. We are currently working on fixing the page break issue, which might involve changing what parts of the dialog get printed (whether header is included). After this is established, we can move along to styling the parts that do not get printed in a distinctive way. So let's revisit styling after the bug is fixed.

Notable changes:

rebased on CARDS-1599_clean to include the latest markdown serialization changes
react-to-print target is now  Card only visible in @media print instead of the print preview dialog - this fixes the page breaks mid-line
set default margins to the @page for nicer-looking prints with default settings
added the option to disablePreview to not show the preview dialog and skip directly to the browser's print preview. It doesn't work perfectly for now: there's a js console warning when this option is on, and the form's dropdown menu doesn't close when we're done printing, so the preview is not disabled by default. But I left the code in for perfecting at a later time (not a priority for this PR).

Demoting to Draft only until #877  is merged.

tested Question: How can I manipulate the disablePreview option?

It's an option to the React component that renders the button. It can't be manipulated without changing the code.


chore: adjust dependencies

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

GitHub release
npm package (@latest dist-tag)

Your semantic-release bot :package::rocket:


[DO NOT MERGE] Initial move demo app to packages/demo

This change moves the demo app to its own package to keep it further separated from what will be a base starting point application. This seems to be compiling okay and trying to run the app but currently trying to track down some invariant errors upon running npm start
Current steps taken:

Removed webpack alias to ui and instead used the lerna bootsrapped openui module
Moved app to packages/demo
Updated references and dev dependencies

I think the invariant I'm receiving is due to something around the Markdown component. Haven't been able to track it down just yet.


Compatibility to Angular universal

PR Checklist
Verify that you did the following:

[ ] Opened an issue to track and discuss the problem you are trying to solve.
[x] Submitted the changes using a new branch in your fork of this repo.
[x] Added test for the changes and checked that code coverage didn't diminished if possible.
[x] Docs were updated using jsdoc style comments when necessary.

Describe what you did
Used variable window based on PLATFORM_ID, to avoid issues in projects using Angular Universal.
Is this a breaking change?

[ ] Yes
[x] No

Other information

@devconcept could you please check this pull request?

@devconcept do you have any feedback?


fix(scan): ignore virtual seasons

Virtual seasons appeared as available / partially available, even though they were not even shown in the Jellyfin web UI. For more info see #119
To-Dos

[x] Successful build yarn build

Issues Fixed or Closed

Fixes #119

Ah I was just going to comment to fix lint errors. I see that you just did
EDIT: please fix new lint error

Yup, I'll squish the commits and open a new PR since I can't get hugo to work on windows and have to do it through github, sigh.


Added the ability to delete comments from inbox

Fixes # (provide issue number of applicable)
Added delete function to Message class to allow a user to delete messages from the inbox.
Feature Summary and Justification
Closing [Feature Request](https://github.com/praw-dev/praw/issues/883

Going to make these changes and reopen the pull request

Just FYI, there's no need to close and reopen. You can update the existing branch.


Support Python 3.8

While our current development is done using modern versions of Python we do have to keep supporting the codebase which cannot be switched from Python 3.8 (mostly due to some abandoned scientific libraries which we have to rely on to parse existing model files).
Is the minimal Python version 3.9 a hard requirement for this library due to some feature missing in Python 3.8, or is it just due to the lack of testing on 3.8? We use Poetry for dependency management which leads to inability to install pytest-regex into Python 3.8 environment.

The CI passed with Python 3.8 in gh-9, so I may try to do a release that adds support.
That said, as a general rule I try to follow the mostly agreed-upon community support timelines in https://numpy.org/neps/nep-0029-deprecation_policy.html and the broader stuff in https://scientific-python.org/specs/spec-0000/.

Taking a look at the actual code of pytest-regex and how easy it is to add local pytest plugins I have opted for vendoring this plugin in. So it is your call whether you want to release support for 3.8 or not. Kind thanks for prompt reply!

This should be resolved in the latest release: https://github.com/tylerjereddy/pytest-regex/releases/tag/v0.2.0
Which is also available on PyPI now.


Docker (+ mongoose updates)

Adds container support/example (dockerfile & docker-compose). Start using npm run docker
Minor fixes to remove deprecated issues around mongoose/connect-mongo)

 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.:x: bchristie sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.

Meant to break this down into 2 PRs. Apologies for confusion.


actor.attemptsTo should be async

if actor.attemptsTo is not async and is not awaited, there will be no compiler warning but tests will finish too early

This also applies to actor.asks


[Tag system] Introduce ReplicaAllocation and Backend TagSet

This CL introduces the ReplicaAllocation class.
ReplicaAllocation is used to identify the distribution information of the replica, and the
distribution information is represented by a set of tags.
ReplicaAllocation is stored in PartitionInfo and replaces the previous idToReplicationNum
object. This conversion operation is performed when the FE replays the metadata.
At the same time, the Backend object will inherit from the Resource abstract class and
start to have the TagSet attribute. The TagSet attribute is currently generated by the cluster
name of the Backend. This conversion operation is also performed when the FE replays the
metadata.
To maintain compatibility and minimize the impact on existing metadata. We currently retain all
cluster information. The new ReplicaAllocation and TagSet classes are only converted and
stored. And also, the idToReplicationNum and idToReplicaAllocation coexist during the version
0.12. All new operations will only modify the idToReplicaAllocation, and idToReplicationNum will
be converted to idToReplicaAllocation, eventually.
In version 0.13, idToReplicationNum will be removed.
We will start using ReplicaAllocation and TagSet in the next commit.
I added a proc "/ tags" to show all tags and the corresponding resource ids.
I also added an http action /metacheck?type=replica_allocation to check if the
ReplicaAllocation and TagSet were converted correctly after the upgrade.
FeMetaVersion is updated to 70.
ISSUE #1723

This PR is ready for reviewing.


Util func to segment indices given intervals (or other segmentation specification)

What we need is a function segment_indices(indices: Iterable, intervals: Iterable[Typle[BT, TT]])
that yields groups of indices according to containment of the indices in the intervals.
To be clear, both indices and intervals should be iterated over once only.
The target use case: Segmenting a flattened stream (i.e. making slabs out of merged/flattened streams).
See we have:
from creek.multi_streams import MergedStreams

streams_map = {
         'hello': [(2, 'two'), (3, 'three'), (5, 'five')],
         'world': [(0, 'zero'), (1, 'one'), (3, 'three'), (6, 'six')]
     }
flattened_multi_stream = list(MergedStreams(streams_map))
assert flattened_multi_stream == [
    ('world', (0, 'zero')),
    ('world', (1, 'one')),
    ('hello', (2, 'two')),
    ('hello', (3, 'three')),
    ('world', (3, 'three')),
    ('hello', (5, 'five')),
    ('world', (6, 'six'))
]

Given an index/timestamp (e.g. the 0 of (0, 'zero')) segmentation definition (example, chunked intervals, or
an (monotonous) iterable of intervals) we want to get an iterator/generator of groups of data items, one per segment.
This works for chunking:
from itertools import groupby

def make_slabs_from_chunked_indices(flattened_multi_stream, chk_size):
    grouped_by_chunk = groupby(flattened_multi_stream,
                               key=lambda x: x[1][0] // 2)
    return map(lambda x: list(x[1]), grouped_by_chunk)

assert list(make_slabs_from_chunked_indices(flattened_multi_stream, 2)) == [
    [('world', (0, 'zero')), ('world', (1, 'one'))],
    [('hello', (2, 'two')), ('hello', (3, 'three')), ('world', (3, 'three'))],
    [('hello', (5, 'five'))],
    [('world', (6, 'six'))]
]

Something like this could work for intervals in general, but is not very clean.
from creek.tools import dynamically_index, IndexUpdater, segment_overlaps
from typing import Iterator
inf = float('inf')

intervals_index_update: IndexUpdater

def intervals_index_update(current_index, data_item, intervals):
    # make sure intervals is an iterator (needs to be "consumed")
    assert isinstance(
        intervals, Iterator), "intervals needs to be an iterator (feed me iter(intervals))"
    bt, tt = current_index  # we're indexing with intervals here!
    if bt <= data_item < tt:
        return current_index
    else:
        return next(intervals, None)

flattened_multi_stream = list(MergedStreams(streams_map))

indices = list(map(lambda x: x[1][0], flattened_multi_stream))
intervals = [(0, 2), (2, 4), (4, 6), (6, 8)]

assert list(dynamically_index(indices, start=(inf, inf),
                              idx_updater=partial(intervals_index_update,
                                                  intervals=iter(intervals)))) == [
    ((inf, inf), 0),
    ((0, 2), 1),
    ((0, 2), 2),
    ((2, 4), 3),
    ((2, 4), 3),
    ((2, 4), 5),
    ((4, 6), 6)
]

Perhaps the dynamical indexing setup should be revised?

The following seems to work but should be cleaned up:

from itertools import count
from creek.scrap.multi_streams import MergedStreams
from itertools import tee
from typing import Iterable, Tuple
from numbers import Number

BT = Number
TT = Number
Interval = Tuple[BT, TT]
Intervals = Iterable[Interval]

no_more_data = type('NoMoreData', (), {})()

def make_slabs(iterable, intervals: Intervals, key=None):
    """iterable and intervals assumed monotone increasing"""
    iterator = iter(iterable)
    if key is None:
        key = lambda x: x
    item = next(iterator, no_more_data)
    while item is not no_more_data:
        idx = key(item)
        for bt, tt in intervals:
            if item is no_more_data:
                break
            accum = list()
            while idx <= tt:
                accum.append(item)
                item = next(iterator, no_more_data)
                if item is no_more_data:
                    break
                idx = key(item)
            yield accum

# A simple example

intervals = [(0, 2), (2, 4), (4, 6), (6, 8)]
iterable = [0, 1, 2, 3, 3, 5, 6]
assert list(make_slabs(iterable, intervals)) == [
    [0, 1, 2], [3, 3], [5, 6]
]

# An example involving a key

streams_map = {
    'hello': [(2, 'two'), (3, 'three'), (5, 'five')],
    'world': [(0, 'zero'), (1, 'one'), (3, 'three'), (6, 'six')]
}
flattened_multi_stream = list(MergedStreams(streams_map))
assert flattened_multi_stream == [
    ('world', (0, 'zero')),
    ('world', (1, 'one')),
    ('hello', (2, 'two')),
    ('hello', (3, 'three')),
    ('world', (3, 'three')),
    ('hello', (5, 'five')),
    ('world', (6, 'six'))
]

assert list(make_slabs(flattened_multi_stream, intervals, key=lambda x: x[1][0])) == [
    [('world', (0, 'zero')), ('world', (1, 'one')), ('hello', (2, 'two'))],
    [('hello', (3, 'three')), ('world', (3, 'three'))],
    [('hello', (5, 'five')), ('world', (6, 'six'))]
]

Here is what I think is a better version, easier to follow with simpler logic and also with the more typical choice of interpreting tt as exclusive
from itertools import count
from creek.scrap.multi_streams import MergedStreams
from itertools import tee
from typing import Iterable, Tuple
from numbers import Number

BT = Number
TT = Number
Interval = Tuple[BT, TT]
Intervals = Iterable[Interval]

no_more_data = type('NoMoreData', (), {})()

def make_slabs(iterable, intervals: Intervals, key=None):

    if key is None:
        key = lambda x: x

    iterable = iter(iterable)
    item = next(iterable, no_more_data)

    for interval in intervals:
        # check whether there are more items to process
        if item is not no_more_data:
            # start accumulating items for the current interval
            accum = []
            # discard item if "under" the bt of the interval
            while item is not no_more_data and key(item) < interval[0]:
                item = next(iterable, no_more_data)
            # now the item is above the bt, accumulate if under the tt
            while item is not no_more_data and key(item) < interval[1]:
                accum.append(item)
                item = next(iterable, no_more_data)
            # yield accumulated items for the current interval, and proceed to the next interval
            yield accum
        else:
            break

# A simple example

intervals = [(0, 2), (2, 4), (4, 6), (6, 8)]
iterable = [0, 1, 2, 3, 3, 5, 6]
assert list(make_slabs(iterable, intervals)) == [
    [0, 1], [2, 3, 3], [5], [6]
]

# An example involving a key

streams_map = {
    'hello': [(2, 'two'), (3, 'three'), (5, 'five')],
    'world': [(0, 'zero'), (1, 'one'), (3, 'three'), (6, 'six')]
}
flattened_multi_stream = list(MergedStreams(streams_map))
assert flattened_multi_stream == [
    ('world', (0, 'zero')),
    ('world', (1, 'one')),
    ('hello', (2, 'two')),
    ('hello', (3, 'three')),
    ('world', (3, 'three')),
    ('hello', (5, 'five')),
    ('world', (6, 'six'))
]

list(make_slabs(flattened_multi_stream, intervals, key=lambda x: x[1][0]))
assert list(make_slabs(flattened_multi_stream, intervals, key=lambda x: x[1][0])) == [
            [('world', (0, 'zero')), ('world', (1, 'one'))],
            [('hello', (2, 'two')), ('hello', (3, 'three')), ('world', (3, 'three'))],
            [('hello', (5, 'five'))],
            [('world', (6, 'six'))]]

Yes, definitely better.
Further ideas for improvement:
Regarding the definition of interval containment (which indeed is common to define as bt <= x < tt), we can make that choice both explicit and open(-closed) to be changed by using the design of inifinite_sequence.py. In a nutshell:
from operator import le, lt, ge, gt

def make_slabs(
    iterable, intervals: Intervals, key=None,  # now
    # additionals:
    above_bt: Callable = ge,
    below_tt: Callable = lt,
):
    ...

If needed, we can get the complimentary info through the map:
opposite_op = {
    le: gt,
    lt: ge,
    ge: lt,
    gt: le,
}

On a different note, I wonder if using the walrus operator in the two while loops might simplify (or on the contrary) the code.
Perhaps it depends on how used to the walrus the reader is. But it does seem to be a common use case for those who do use it.


index.html

Asmany in my opinion we should not add any subject-wise info in the tutorial section. Rather we should provide information regarding how to use the app "CodeU".


[grid] support combobox cell type

start with single select
try radix path first

Depends on #7962


Incomplete type of expected variable for 'void *' argument

Steps to reproduce

Open and configure project coreutils
Generate tests for gnulib/lib/free.c
Try to run tests
See logs

Logs
/home/utbot/projects/coreutils/utbot_tests/gnulib/lib/free_test.cpp:19:10: error: variable has incomplete type 'void'
    void expected_p = 0;

Test
TEST(error, rpl_free_test_1)
{
    __attribute__ ((aligned(16))) unsigned char p = 0;
    rpl_free(&p);
    void expected_p = 0;
    EXPECT_EQ(expected_p, p);
}

Questions
Should we check the pointer if it is freed? Should we check 'void *' output variables at all?

@operasfantom, which version of coreutils have you used?

@operasfantom, which version of coreutils have you used?

I used to build on the latest master at that time. But let's switch to v9.1 for testing purposes.


Wiki Additions

Offspring Projects

[ ]  https://www.npmjs.com/package/ember-transformicons - Ember

[ ]  https://zerodevx.github.io/zero-transformicon : Polymer Edition

Contributors

[ ] Installation and Development Instructions to encourage more contributors

Hi @dennisgaebel , today I started working on the react version for transformicons:
https://github.com/merodriguezblanco/react-transformicons
Will be working on it :)

Hi @dennisgaebel, today I make the vue version for transformicons
https://github.com/coderdiaz/vue-transformicons
:)


Possibility to adjust Sharpe Ratio by ESG parameter?

Hi,
I am trying to do a portfolio optimization based on an ESG adjusted Sharpe Ratio. Hereby, I was wondering whether it is possible to adjust the Sharpe Ratio as the following:
SR=  ((μ- rf)/σ)   +  (ESG/σ)
Before finding this portfolio optimiser, I have tried to do it based on a Monte Carlo simulation using the following optimisation function:
optimal_portfolio = portfolios.iloc[(((portfolios['Returns']-rf)/portfolios['Volatility'])+(portfolio ['ESG Score']/portfolios['Volatility'])).idxmax()]
which however did not lead to sufficient results, due to the size of our investment universe (around 500 stocks).
Many thanks for your help in advance!
Best,
Lea

Conceptually, it seems a bit strange to do it that way unless your ESG score has the same units as return.
For example, let's say your ESG scores are 1,2,3,4,5. Since returns are of order 10%, the result would be an optimiser that focuses primarily on ESG score divided by volatility.
In my view, it would make more sense to use ESG as a constraint: maximise the Sharpe ratio of the portfolio subject to an ESG constraint.
Alternatively, a nice trick might be to embed ESG into the expected returns vector. e.g you may decide "1 ESG point" is worth an extra 1% return, then just add this to the expected returns. This may seem arbitrary, but it is no different to the original proposed optimisation.
Interesting question!

Yes, we adjusted the ESG scores such that they have the same unit as returns.
But thanks, the idea of embedding ESG into the expected return vector is great!


Circle color is not corresponds to the Review Status

First and third circles should be orange, shouldn't they?

I was not able to simulate the issue. It's really strange that's happening because the icon uses the same function to circle the avatars. The reviewers are waiting for author, right? Therefore, it should both avatars with orange circle. Is it right?

Hi @vladkasianenko
is this still happening?

I was able to reproduce the bug and it seems to be a cache issue during the render process of the Table component. If you just refresh the results (refresh button), the status color is restored properly. I will check of hypothesis that came up to my mind that could solve the issue.