bytes: bytes.Reader returns EOF on zero-byte Read, which doesn't conform with io.Reader interface documentation

What version of Go are you using (go version)?

$ go version

go version go1.14.4 linux/amd64

Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GOARCH="amd64"
GOHOSTARCH="amd64"
GOHOSTOS="linux"

What did you do?
I was deserialising binary data and I hit an unexpected io.EOF when reading zero bytes. Here is a minimal example that illustrates the problem.
package main

import (
	"fmt"
	"bytes"
	"encoding/binary"
)

func main() {
    r := bytes.NewReader([]byte{0,0,0,0})

    var length uint32
    err := binary.Read(r, binary.BigEndian, &length)
    if err != nil{
        panic(err)
    }
    fmt.Printf("length = %d\n", length)

    rest := make([]byte, length)
    _, err = r.Read(rest)
    fmt.Printf("error = %s\n", err)
}

What did you expect to see?
length = 0
error = %!s(<nil>)

What did you see instead?
length = 0
error = EOF

On conformity with io.Reader and other standards
An excerpt from the documentation of io.Reader with the important parts emboldened:
type Reader interface {
   Read(p []byte) (n int, err error)
}

Implementations of Read are discouraged from returning a zero byte count
with a nil error, except when len(p) == 0. Callers should treat a return of
0 and nil as indicating that nothing happened; in particular it does not
indicate EOF.

An excerpt from the man page of read(3):

This volume of IEEE Std 1003.1-2001 requires that no action be taken for read() or write() when nbyte is zero. This is not intended to take precedence over detection of errors (such as invalid buffer pointers or file descriptors). This is consistent with the rest of this volume of IEEE Std 1003.1-2001, but the phrasing here could be misread to require detection of the zero case before any other errors. A value of zero is to be considered a correct value, for which the semantics are a no-op.

Related issues
It looks like this issue is in stark contrast to Go2 proposal issue #27531.
There is also an interesting discussion (#5310) about returning (0, nil) from a Read(p []byte).

@gopherbot please remove Documentation

It seems to me that the behavior of bytes.Reader is permitted by the documentation of io.Reader.  The data is at EOF, after all.  I don't see anything in the documentation of io.Reader that prohibits returning 0, io.EOF in such a case.
You are asking for a special case in bytes.Reader.Read: if the caller asks for zero bytes, always return 0, nil.  And if we want to make this the required behavior for io.Reader, you are asking for a special check for a read of zero bytes in many other readers as well.  I think we would need a pretty convincing argument to require existing readers to change in that way.

I am hoping for a discussion on whether this behaviour is expected or natural. Getting an EOF error on zero-byte read looks like a replacement for a missing EOF() method.
However, I agree that changing multiple Read methods is not a favourable option, because it could break a lot of stuff.
If you think that there couldn't be any discussion on the topic, we can close this issue and leave it for future reference. It a case where the result (0, nil) makes sense.

I think there can be discussion on the topic.  My comment above was my attempt at discussion, by pointing out the issues that I found relevant.  Sorry if I seem to be preventing discussion.

Is there a reason why there is no EOF() bool method in Reader structs in the stdlib?
I think it's why zero-length Read would return an EOF, because it's the only way to check if if you are at the end, except for Seek(0, current) == Len() or Size(), which is probably not available for all Reader structs.

On something like a Unix pipe, an EOF method can only be implemented by calling read, in which case we need to have somewhere to store the data and return it on a subsequent Read.  Simpler to not require the Reader to handle that, and push the issue onto the caller.

AFAIR. read(fd, buf, len) = 0, when there is an EOF. There errno is not set and there is no EEOF errno.

Read()-ing seems to be inconsistent in the standard library:
$ cat main.go
package main

import (
	"os"
	"fmt"
)

func main() {
	buf := make([]byte, 0)
	n, err := os.Stdin.Read(buf)
	fmt.Printf("n=%d, err=%s\n", n, err)
}
$ go run main.go  < /dev/null
n=0, err=%!s(<nil>)

In the bytes.Reader the last position is interpreted as EOF, but os.Stdin.Read that makes the syscall read(0, buf, 0) = 0 is interpreted as no error.

The io.Reader interface is like no other in the Ho ecosystem. Read is the only method where the caller must examine the other values returned from a function/method call before examining the error value.

It is sad that I had to figure it out in runtime. When writing the unit tests, I was not expecting the last field to have zero length.

It seems incorrect to make the EOF condition directly a function of the input's length. Your example reads from a data source that contains no data. It reads 0 bytes from that data source and triggers the end of file condition because it knows that the next read will also return io.EOF.
To me it does not make sense for the first read to be successful on a data source that contains nothing. The same Read would not return io.UnexpectedEOF if your slice was 100 bytes. It would still return io.EOF. The length of the actual input slice provided to the reader has no effect on the returned error.

It seems incorrect to make the EOF condition directly a function of the input's length. Your example reads from a data source that contains no data. It reads 0 bytes from that data source and triggers the end of file condition because it knows that the next read will also return io.EOF.
To me it does not make sense for the first read to be successful on a data source that contains nothing. The same Read would not return io.UnexpectedEOF if your slice was 100 bytes. It would still return io.EOF. The length of the actual input slice provided to the reader has no effect on the returned error.

I appreciate the way the discussion goes. Let's say we want the Reader to report io.EOF as soon as it is aware of it and let the caller handle it. But then we also care about consistency.
In Go a byte slice source in a bytes.Reader would trigger io.EOF on the last position. But reading from an empty Linux file or stdin will return (0, nil).
An then there is this:
$ cat main.go
package main
import "fmt"
func main() {
	data := []byte{0}
	s := data[1:1]
	fmt.Printf("%#v\n", s)
}

$ go run main3.go
[]byte{}

A zero-length slice that is out of bound by a byte is just an empty slice.
It's kind of the no-op I expect, when working with unknown length.

However, I found out that bytes.Reader behaviour is different compared to all other cases.

There are many different kinds of readers.  The io.Reader type defines a contract for all different kinds of readers.
Currently that contract permits returning io.EOF on a read of zero bytes.  This is not discussed explicitly, but nothing prohibits a reader from doing that.
The options I see here are:

Change io.Reader to prohibit returning io.EOF for a read of zero bytes.  Require it to always return 0, nil in such a case.  This would break an unknown number of existing readers, including bytes.Reader.  We would have to identify and fix all broken readers.  In the standard library this would be straightforward, but of course any type defined by any package can implement a Read method.
Explicitly document that on a read of zero bytes a Read method is permitted, but not required, to return 0, io.EOF if the input stream is at the end of the file.
Do nothing.

Does anybody see any other options?  Thanks.

I vote for 2. /cc @minux who spent a lot of time arguing for this a few years back.

It would be nice to have a warning in the bytes.Reader documentation that it returns io.EOF on zero-byte Read(), unlike bytes.Buffer. This way people can pick which structure to use as a io.Reader depending on their needs.

Why would this need a warning. It seems like the correct behaviour

For me at least, bytes.Buffer behaves correctly and bytes.Reader does not. I have switched from bytes.Reader to bytes.Buffer to avoid running into bugs. When I wrote the code, I was expecting it behaves like bytes.Buffer.

I have a code which reads string in format #bytes, [bytes]
So, I read #bytes, create byte array of that size, then read into it.
Now, when string of length 0 appears in the middle of reader, it will read successfully, but when the string of length 0 is at the end of reader, it will not.
IMHO this is an indicator of a problem in design, reading of 0 bytes is not special and should always succeed independent of read position.

@ianlancetaylor Format some_encoding(#bytes), [bytes], is common, and any well-tested parser (and all fuzz-tested parsers) definitely already have "if #bytes != 0" protection around reading [bytes] part, so they already behave as if approach 2) was implemented.
Any code which has no "if #bytes != 0" protection around reading of potentially zero bytes will behave differently at the middle and at the end of the bytes.Reader and all other readers which have this bug. It seems to me, most if not all code without such protection is already incorrect due to this.
So approach 1) will break already incorrect code, which might be actually good for that code.
BTW all similar code which uses readers which return error on every attempt to read 0 bytes, independent of stream position, already has "if #bytes != 0" protection and will not break from approach 1).

Right now, today, the behavior of bytes.Reader is permitted according to the docs.  If we change the docs as suggested in option 1 of https://github.com/golang/go/issues/40385#issuecomment-670142267, then bytes.Reader will be broken.  This is not a matter of code that checks #bytes != 0.  This is a matter of bytes.Reader itself.  So I don't agree that approach 1 will break already incorrect code.  It will break already correct code.  If that code is not changed to conform to the new requirements, then it will break future code that assumes that the documented requirements are implemented by existing readers.

I wasn't expecting another user to have exactly the same issue like mine, so soon. I will invoke the timeless mantra WE DO NOT BREAK USERSPACE! and say that adding a warning to bytes.Reader should be enough. This way we can defer any discussions on whether io.Reader it should be able to return (0, nil) or not.

@metala Ian explained that bytes.Reader is not broken as described by the io.Reader contract. What warning do you think should be added?

@davecheney Yes, indeed. I am not arguing that bytes.Reader is broken according to io.Reader contract, but it feels inconsistent.
About the warning / notice, I am thinking of something like:
The bytes.Reader returns io.EOF as soon as it reaches the end of the byte slice, after which a read of zero bytes will yield an error. This may pose an issue in cases when you are deserialising data and the last field is length-prefixed with length equals zero.

@metala I don't understand how bytes.Reader returning n = 0 could be mistaken for a n = 1 where the buffer contains []byte{ 0 }. Could you perhaps provide a code sample that illustrates the problem?

@davecheney I am not sure what you want, but lets take those two cases:
// Deserialisation using bytes.Reader
https://play.golang.org/p/3qRu_LlDa6h
// Deserialisation using bytes.Buffer... the same code, single line changed.
https://play.golang.org/p/0Lr0_9rFi1O
The deserialisation of fields follow the structure, read field length, if necessary, then read content. If there is an error or the length is different, return an error.
The first example fails when the last fields is length-prefixed with zero length and the second example succeeds just because we are using bytes.Buffer, instead of bytes.Reader.

There is an error in your code
	n, err := r.Read(header)
	if err != nil || n != int(headerLen)  {
		return fmt.Errorf("failed to read header: %w", err)
	}

The io.Reader contract states the caller must process n before inspecting the error value.

You are probably referring to this paragraph, which is either ambiguous or doesn't cover the case n = 0.

Callers should always process the n > 0 bytes returned before considering the error err. Doing so correctly handles I/O errors that happen after reading some bytes and also both of the allowed EOF behaviors.

Since the input is a byte slice, and not a stream, it doesn't make much sense to waste CPU cycles on io.ReadFull(), if bytes.Reader.Read() would do the same job.
However, it seems that io.ReadFull, actually fixes the issue.

Since the input is a byte slice, and not a stream, it doesn't make much sense to waste CPU cycles on io.ReadFull(), if bytes.Reader.Read() would do the same job.
However, it seems that io.ReadFull actually fixes the issue.

This argument is specious; if you're worried about the overhead of io.ReadFull when you have a []byte slice then you're probably also worried about the overhead of an interface call over just scrobbling in the []byte slice directly.

You are right, but I did not think about it. However, it's a bit cleaner to use a reader instead of incrementing and passing indices.

In fact, I don't care why read on empty slice can be returned immediately, it has hardly no affect for me and most developer.
But I found that, for two kind of reader: gzip.Reader and bytes.Reader, they have differently behavior on reading the last bytes.
For gzip.Reader, it return 1 and an EOF for last byte read, but for bytes.Reader, it return 1 and nil(error). I write this codes: https://go.dev/play/p/En4DOWYnJXO
a function like this
func compareReader(r, b io.Reader) error {
	var bufa [1]byte
	var bufb [1]byte
	for {

		na, erra := r.Read(bufa[:])
		nb, errb := b.Read(bufb[:])

		if erra == nil && errb == nil && na == nb && bufa[0] == bufb[0] {
			continue
		}
		if erra == errb && erra == io.EOF {
			return nil
		}
		if erra != nil {
			if erra == io.EOF && errb != io.EOF {
				return fmt.Errorf("reader b has more data than a")
			}
			return fmt.Errorf("read on a error: %s", erra)
		}
		if errb != nil {
			if errb == io.EOF && erra != io.EOF {
				return fmt.Errorf("reader a has more data than b")
			}
			return fmt.Errorf("read on b error: %s", erra)
		}
		return nil
	}
}

I don't care about any thing like POSIX , linux man page, or any other, I just think that all std lib should be treated according to uniform standards.

@dashjay There is no expectation that all Readers behave the same way, even all Readers in the standard library.  Different Readers are free to employ different buffering and error handling strategies.


[many ports] Dependency on vcpkg-cmake-config but not using vcpkg_cmake_config_fixup

This seems to be a common copy and paste error.
I used a Python script to find out if there are any ports that have a dependence on vcpkg-cmake-config but don't use vcpkg_cmake_config_fixup. The interesting lines are:
if content.find("vcpkg-cmake-config") == -1 or content.find("dependencies") == -1:
          continue
[...]
if content.find("vcpkg_cmake_config_fixup") == -1:
          print(f"- [ ] {entry.name}")

Maybe there is a possibility to add this as a PR suggestion/ manifest format/ post-build check?

[ ] arrayfire
[ ] bext-wintls
[ ] c89stringutils
[ ] clickhouse-cpp
[ ] clipboardxx
[ ] cpp-redis
[ ] cppad
[ ] cppunit
[ ] cspice
[ ] distorm
[ ] easyloggingpp
[ ] eve
[ ] fastor
[ ] graphqlparser
[ ] gsl
[ ] hypodermic
[ ] ijg-libjpeg
[ ] jack2
[ ] jasper
[ ] klein
[ ] kwsys
[ ] laszip
[ ] launch-darkly-server
[ ] libcurl-simple-https
[ ] liblinear
[ ] libopensp
[ ] libressl
[ ] libwebm
[ ] lionkor-commandline
[ ] live555
[ ] lmdb
[ ] lunasvg
[ ] mbedtls
[ ] minio-cpp
[ ] mygui
[ ] nanobench
[ ] opencensus-cpp
[x] openssl
[ ] protobuf
[ ] protozero
[ ] ptyqt
[ ] randomstr
[ ] redis-plus-plus
[ ] rhasheq
[ ] sbp
[ ] skia
[ ] sockpp
[ ] spirv-reflect
[ ] tmxlite
[ ] unicorn-lib
[ ] usockets
[ ] winpty
[ ] wxwidgets
[ ] yasm
[ ] zziplib
[ ] pcre2

qtbase is a false positiv.

IMO vcpkg_cmake_config_fixup should be integrated, maybe via a dependency,  into vcpkg_cmake.
Is there a stand-alone usage?

IMO vcpkg_cmake_config_fixup should be integrated, maybe via a dependency, into vcpkg-cmake. Is there a stand-alone usage?

Yes, these ports use vcpkg_cmake_config_fixup independently from vcpkg_cmake_*:

gpgme
libgwenhywfar
libsmb2
tomlplusplus

I still think that vcpkg_cmake_config_fixup should be integrated into vcpkg-cmake.

no stale

no stale


Provide a new release (aka latest DUB release doesn't compile)

How about providing a new release that contains the fix in libdparse?
At the moment a user installing dfmt from the latest release sees this:
dub run dfmt -- myfile.d
Building package dfmt in /home/xsebi/.dub/packages/dfmt-0.4.5/dfmt/
Performing "debug" build using dmd for x86_64.
experimental_allocator 2.70.0-b1: building configuration "library"...
../../../.dub/packages/experimental_allocator-2.70.0-b1/experimental_allocator/src/std/experimental/allocator/package.d(322,13): Error: std.experimental.allocator.common.Ternary at ../../../.dub/packages/experimental_allocator-2.70.0-b1/experimental_allocator/src/std/experimental/allocator/common.d(14,1) conflicts with std.typecons.Ternary at /usr/include/dlang/dmd/std/typecons.d(7427,1)
../../../.dub/packages/experimental_allocator-2.70.0-b1/experimental_allocator/src/std/experimental/allocator/package.d(328,13): Error: std.experimental.allocator.common.Ternary at ../../../.dub/packages/experimental_allocator-2.70.0-b1/experimental_allocator/src/std/experimental/allocator/common.d(14,1) conflicts with std.typecons.Ternary at /usr/include/dlang/dmd/std/typecons.d(7427,1)
../../../.dub/packages/experimental_allocator-2.70.0-b1/experimental_allocator/src/std/experimental/allocator/package.d(348,13): Error: std.experimental.allocator.common.Ternary at ../../../.dub/packages/experimental_allocator-2.70.0-b1/experimental_allocator/src/std/experimental/allocator/common.d(14,1) conflicts with std.typecons.Ternary at /usr/include/dlang/dmd/std/typecons.d(7427,1)

https://github.com/Hackerpilot/dfmt/releases/tag/v0.5.0-beta4


I can not change the slider value on a Smartphone

Hello,
I have tried to implement the "angular awesome slider" on my Smartphone using Ionic platform. I launched the app on my Smatphone and on my PC simultaneously using Google Chrome's remote deugging tool (chrome//inspect/#devices) simultaneaously. I could see that the app is functioning on the PC: when I click on the slider, its value changes. But on the Smartphone, when I tap on the slider, nothing happens. Could you please help me about this?
Thank you in advance,
Mario

Hi, can you debug this code if not yet minified and look here https://github.com/darul75/angular-awesome-slider/blob/master/src/core/model/draggable.factory.js#L81

Hello,
I am sorry for I can not reproduce the issue now. It is working on my Smartphone today. I will let you know if I meet the problem again. Thank you for your answer.
Mario

I guess sometimes it is based on component and stylesheets around


Spaceship::Client::UnexpectedResponse

I get the error below when i try to fastlane init in a new Xcode iOS project. I'm using an admin account to log in, and the account is able to log in to iTunes Connect no problem and see all the apps. The error report number is 0ebf5dda56a980dc123529249ffae030.
/Library/Ruby/Gems/2.0.0/gems/spaceship-0.20.0/lib/spaceship/client.rb:268:in `parse_response': [!] {"creationTimestamp"=>"2016-02-19T20:43:28Z", "resultCode"=>0, "userLocale"=>"en_US", "protocolVersion"=>"QH65B2", "requestUrl"=>"https://developerservices2.apple.com:443//services/QH65B2/listTeams.action", "responseId"=>"d2061b86-****-****-****-901af1cfc6f5"} (Spaceship::Client::UnexpectedResponse)
	from /Library/Ruby/Gems/2.0.0/gems/spaceship-0.20.0/lib/spaceship/portal/portal_client.rb:63:in `teams'
	from /Library/Ruby/Gems/2.0.0/gems/spaceship-0.20.0/lib/spaceship/portal/ui/select_team.rb:35:in `select_team'
	from /Library/Ruby/Gems/2.0.0/gems/spaceship-0.20.0/lib/spaceship/portal/portal_client.rb:79:in `select_team'
	from /Library/Ruby/Gems/2.0.0/gems/spaceship-0.20.0/lib/spaceship/portal/spaceship.rb:37:in `select_team'
	from /Library/Ruby/Gems/2.0.0/gems/spaceship-0.20.0/lib/spaceship/portal/spaceship.rb:81:in `select_team'
	from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.61.0/lib/fastlane/setup/setup_ios.rb:169:in `detect_if_app_is_available'
	from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.61.0/lib/fastlane/setup/setup_ios.rb:29:in `run'
	from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.61.0/lib/fastlane/setup/setup.rb:19:in `run'
	from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.61.0/bin/fastlane:51:in `block (2 levels) in run'
	from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/command.rb:178:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/command.rb:178:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/command.rb:153:in `run'
	from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/runner.rb:428:in `run_active_command'
	from /Library/Ruby/Gems/2.0.0/gems/fastlane_core-0.36.5/lib/fastlane_core/ui/fastlane_runner.rb:23:in `run!'
	from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/delegates.rb:15:in `run!'
	from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.61.0/bin/fastlane:150:in `run'
	from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.61.0/bin/fastlane:156:in `<top (required)>'
	from /usr/local/bin/fastlane:23:in `load'
	from /usr/local/bin/fastlane:23:in `<main>'

Can give the latest version a whirl?

It still throws an error but then asks for my bundle id and eventually allows me to complete the init.

Same issue with sigh repair and i cannot get around it in any way :(

@maciekish Are you still hitting this?

Encountered same issue today. Occurred with a specially created account for fastlane. I noticed that when going to the developer site I needed to accept some terms for that account. After this was done the issue was still there. What I still needed to do is invite that new account to my development team. Issue was solved then.

.rvm/gems/ruby-2.2.1@global/gems/spaceship-0.25.1/lib/spaceship/client.rb:427:in `parse_response': [!] {"creationTimestamp"=>"2016-04-17T22:08:57Z", "resultCode"=>0, "userLocale"=>"en_US", "protocolVersion"=>"QH65B2", "requestUrl"=>"https://developerservices2.apple.com:443/services/QH65B2/listTeams.action", "responseId"=>"33b00bc8-ee5b-4037-b327-af116c534a22"}

@edwardmp Thanks for the report. Looks like everyone is up and running.


Doc changes

Requirements

[x] The commit message follows our guidelines
[x] Tests for the changes have been added (for bug fixes / features)
[x] Docs have been added / updated (for bug fixes / features)
[x] Updated TypeScript definitions, if applicable
[x] Update docs/migrating.md for breaking changes

Related issues
#860, #903
Details
This is an attempt at demonstrating a few ways in which Skate can be utilised in the README, going from "simple" through to "complex", and making the "site" code orthogonal to it at the same time.
The two primary challenges with the docs are (1) the flow, and (2) their simplicity.

It's challenging to construct a linear flow through what Skate "is" and incremental examples of web components authored via Skate. The difficulty lies in requisite knowledge (i.e., what can we expect people to know prior to looking at Skate) and relevance (i.e., when people want to author web components, what will pique their interest the most?). This leads in to the second problem...
Simple examples of using Skate aren't that "simple" -- by that, I mean they end up looking less terse than I'd hoped.

If you compare a base Skate component to a base React/Preact one, the comparison is unfavourable, since there's more boilerplate for the base usage.
If you compare to a basic no-library web component, Skate is favourable, but only if you get in to the nitty-gritty of Skate's helper functions.

I'm not sure I've struck the right balance between a linear flow, terseness, and relevance yet. Comments and discussion are more than welcome.

Something else I'm interested in...
After the changes @treshugart made in #1213, the docs/ directory is just... gone. Is the plan to rewrite the content for docs as a series of skated pages -- i.e., document skate using skate itself? I'm keen to help re-write the documentation, but the plan isn't clear to me; it's particularly confusing given I know that @matthewp is working on "the site", where I don't know what the overlap between "docs" and "site" is, so don't know if I'd be treading on toes.

Is the intention to have docs on the site? If so we'll need to do some static site generation I suppose.

@matthewp I have no intentions other than writing docs and examples of using Skate. I don't really mind where the docs live. They could live in this repo or another; they could be deployed to the skate website or another. My problem is that the previous docs were deleted in #1213 and I don't know if there's a grand plan for replacing them.

@matthewp, @chrisdarroch, to reiterate re the docs / static-site generation, npm run dev and npm run site do this for you. Everything is in the site/ directory and already does all of this. There's a Netlify build to preview on PRs, too. For example, this is the link in the "Details" check for Netlify.

@chrisdarroch I like how you've structured the tests. Something I've been liking lately is to co-locate tests with code, as opposed to separate directory. If we do this, we can run tests within the site/ directory on the code examples, while having them co-located with where they're being used. I'm happy to not do this for now because we'd have to shave a couple yaks and get the babel config working with that setup. Just a general comment and a LGTM for what you're doing!

Re docs being gone, I deleted those because I think it's a bad idea to try and port them to the website. There'd be a lot of massaging and we'll miss something. Better to rewrite from scratch, I think. We can, however, retrieve them from a previous commit if we need to. They're also on master.

@treshugart Maybe I'm misunderstanding, are docs written in Markdown or in JSX? if they are written in Markdown then I think we do need some build process because there isn't one for markdown > html/jsx, right?

I want to just rewrite everything in JSX or lit (now that we've released the lit renderer). The SSR lib should support everything it needs, too.

Re: writing the docs + examples in JSX or lit-html, my vote would be on lit-html. The main reason is that while JSX is cool and all, I believe the pragma stuff is a mindfuck to newbies. I'd rather not give rise to questions that wonder what part of the example is "Skate" versus some other tech. lit-html has a clearer distinction there.

+1 for lit

Okay, I've fixed the test expectations and site generation. Only two things before I'd say this is merge-worthy:

The netlify deploy is failing, though, and I'm not sure why.
I'm not sold on how I've done the readme... it feels more like a step-by-step tutorial for using Skate. I'm not sure what I'd put instead, but in terms of describing what Skate is all about, it doesn't feel "concise" enough to me.

You can do whatever you want re squashing. I'll fix the netlify deploy rn.

Looking at the deploy, it looks like you might want to pull from master and then retry.


Support dark theme github mark

Work for this issue will begin begin on branch work-liquid-labs/cloudsite/170.


Some URLs breaking in tungbq.github.io/devops-basics/

Some URLs are breaking format in tungbq.github.io/devops-basics/, for example:

https://tungbq.github.io/devops-basics/topics/prometheus/

This website is generated by Github, need to investigate to keep the original URL shown as hyperlink

https://github.com/orgs/community/discussions/58879

I attempted to solve it yesterday !!
PR is still on, please review it once :innocent:

I attempted to solve it yesterday !! PR is still on, please review it once 😇

Thank you for your PR @anilrajrimal1, this is one straight-forward way to resolve the issue but we will need to  check and apply the same change for all the other links of all topics.
In this issue I would expect that we find some config from the GitHub page setting/template so we can keep the current URL as is no need to change the source code in many place.


Auth validation configuration

Move statically defined auth validation variables to configuration (env vars).
This should include public key, issuer and audience

Statically defined auth variables are currently in auth/user.go

#34 is moving the variables to cmd/main ready for moving into the config


xtask: Add helpful warning when missing necessary packages

As we are now testing multiple versions of R, actively, we may switch to R environments that does not have all the necessary packages for development.
This PR adds a check and prints a message with the useful command-line instruction to install missing packages.
I've also added instructions for using development versions of extendr, with rextendr in tests/extendrtests/README.md.

Bindings are broken?

Yes!
We made this decision the other day here https://github.com/extendr/libR-sys/pull/236
The non-api feature can make things resolve for now, but I need to find a way to replace those missing API bits in extendr.

After a conversation in DMs, I believe these errors arise from functions that should not be part of public API by default, nor should they be not unsafe. They are not used in the project at all, perhaps they are used downstream. To address this, I suggest to hide them behind non-api feature gate. When non-api is enabled, both libR-sys and extendr-api will behave as before. When it is disabled, extendr-api will be safer and more lightweight. Also let's mark them unsafe since they deal with raw things.
And add an entry in docs explaining why this decision is made and what to expect from feature flag. Thanks!

I think we screwed up appending env variable, can you please set it using env: section of yaml file?


deprecating returnBrokenResource

We will use only returnResource and the broken logic will be in it.
This is related to #909 in order to simplify the return resource to pool logic.
@HeartSaVioR @marcosnils

When deprecating method, we should provide a way to not using it right now.
So returnResource should be changed with this PR, too.
And hey wait, we don't end discussion about #909. ;)

We agreed that we're going to deprecate both returnBrokenResource and returnResource in favor of making usage of jedis.close(). This PR doesn't apply anymore.

:+1:


[bug] UI for a dimming duration shows "[object Object]"

Version
Build/Run method

[x] Docker
[ ] PKG
[ ] Manually built (git clone - npm install - npm run build )

zwavejs2mqtt version: v1.0.0-alpha.2
Describe the bug
A wall switch with built in dimmer (ZDB5100 Matrix) has a multilevel switch section in ZJS2M. In the UI, the duration parameter shows up as [object Object]. In the getNodes json, I see that the value of this field is:

The UI probably doesn't handle the value+unit combo very well. :)
To Reproduce
N/A
Expected behavior
A dropdown or selector (maybe?) for value+unit... I expect only the value is settable, so maybe just display the unit next to the input box?
Additional context
Screenshot of the UI with the JS object outputted:

@LordMike Uh never saw this! I think it comes from last updates? I have durations values too but them were not showed in that way on ui. @AlCalzone Breaking change from 6.0.0?

@LordMike Uh never saw this! I think it comes from last updates? I have durations values too but them were not showed in that way on ui. @AlCalzone Breaking change from 6.0.0?

Nothing changed in that regard. Duration is not a primitive value, but you can use toJSON() or work with its properties directly: https://github.com/zwave-js/node-zwave-js/blob/b1df89733dc088ae6084b6a97516db4736a5641b/packages/core/src/values/Duration.ts#L73-L80

Nothing changed in that regard. Duration is not a primitive value, but you can use toJSON() or work with its properties directly: https://github.com/zwave-js/node-zwave-js/blob/b1df89733dc088ae6084b6a97516db4736a5641b/packages/core/src/values/Duration.ts#L73-L80

Basically you need to select/edit both the value (0-127) and the unit (minutes/seconds)

Basically you need to select/edit both the value (0-127) and the unit (minutes/seconds)

Humm I think I need to parse it in a different way. When I set it should I pass a Duration on the setValue too?

Humm I think I need to parse it in a different way. When I set it should I pass a Duration on the setValue too?

Probably, but you cannot set the duration yet. https://github.com/zwave-js/node-zwave-js/issues/1321

Probably, but you cannot set the duration yet. https://github.com/zwave-js/node-zwave-js/issues/1321

@AlCalzone Just to knnow but wouldn't a type: Duration be more appropiated instead of any?

@AlCalzone Just to knnow but wouldn't a type: Duration be more appropiated instead of any?

good point. I've treated "any" more like a: You cannot be sure what comes here, better check before assuming.
For non-primitive values it could make sense to add new keys.

good point. I've treated "any" more like a: You cannot be sure what comes here, better check before assuming.
For non-primitive values it could make sense to add new keys.

@LordMike So keep this open until the support is available on zwave-js

@LordMike So keep this open until the support is available on zwave-js

My 0.02$ would be not to make the available types more complex than primitives. So I wouldn't add a "duration-with-minute-and-seconds" type, that supports "minutes" and "seconds", only to add one that also supports "hours" later when a device comes along supporting that.
I would do one of two things:

Work with a concept of "timespans", like "5s" or "10m". When you get "5 seconds" from the device, you emit "5s" (as a string). Likewise, setting it to "1h" submits "1 hour" to the device.

This gets even better for usability, if the device f.ex. doesn't support hours. You can convert "1h" into "60m" or "3600s" before sending it.

Expose this as two separate values, one as an integer and one as a list of units. It sucks due to the extra set of messages though.

My 0.02$ would be not to make the available types more complex than primitives. So I wouldn't add a "duration-with-minute-and-seconds" type, that supports "minutes" and "seconds", only to add one that also supports "hours" later when a device comes along supporting that.
I would do one of two things:

Work with a concept of "timespans", like "5s" or "10m". When you get "5 seconds" from the device, you emit "5s" (as a string). Likewise, setting it to "1h" submits "1 hour" to the device.

This gets even better for usability, if the device f.ex. doesn't support hours. You can convert "1h" into "60m" or "3600s" before sending it.

Expose this as two separate values, one as an integer and one as a list of units. It sucks due to the extra set of messages though.

How would you configure a value of 127 seconds with that approach?
Not trying to argue against it, just discussing the dirty details of zwave.

How would you configure a value of 127 seconds with that approach?
Not trying to argue against it, just discussing the dirty details of zwave.

"127s" or "2m7s" .. both are identical. The tricky part (for you) is distilling that down to a value that z-wave can work with, and abiding by any limitations by the device.
You obviously can't send that as a z-wave value, in anything but seconds. If you were to send it as minutes, the best you could do was "120s" (2 minutes).. I don't imagine the message supports floats :)

"127s" or "2m7s" .. both are identical. The tricky part (for you) is distilling that down to a value that z-wave can work with, and abiding by any limitations by the device.
You obviously can't send that as a z-wave value, in anything but seconds. If you were to send it as minutes, the best you could do was "120s" (2 minutes).. I don't imagine the message supports floats :)

I'm wondering if that is intuitive that you can set 2m7s but not 2m8s (which cannot be represented and AFAIK all durations have the same encoding).

I'm wondering if that is intuitive that you can set 2m7s but not 2m8s (which cannot be represented and AFAIK all durations have the same encoding).

If they're all in the low end or represented by seconds, why not just skip the unit and go with a "number" ?
I imagine validation comes naturally for numbers, with the min/max values.
Ooh, the 128..255 values are then minutes?
If so, the seconds can still work, but validation will be trickier. You could simply log an error and not send the message, if a user puts in 179 seconds, instead of a valid value of 180 seconds.

If they're all in the low end or represented by seconds, why not just skip the unit and go with a "number" ?
I imagine validation comes naturally for numbers, with the min/max values.
Ooh, the 128..255 values are then minutes?
If so, the seconds can still work, but validation will be trickier. You could simply log an error and not send the message, if a user puts in 179 seconds, instead of a valid value of 180 seconds.

Ooh, the 128..255 values are then minutes?

Yep that is the tricky part. When setting a duration:

and when decoding a report:

So just using a number won't work (well it will, but it is suuuuper unintuitive). I kinda like going with a hybrid approach:

Keep Duration objects, but give library users a way to work with them (https://github.com/zwave-js/node-zwave-js/issues/1348 as a first step)
Add a method to serialize them as either a timespan string like you proposed or the current object format
Add a method to deserialize them from a timespan string or the current object format. Trying to use an invalid combination will throw.

Devs can then decide whether they need to work with timespan strings, value+unit objects or the original Duration object.

Ooh, the 128..255 values are then minutes?

Yep that is the tricky part. When setting a duration:

and when decoding a report:

So just using a number won't work (well it will, but it is suuuuper unintuitive). I kinda like going with a hybrid approach:

Keep Duration objects, but give library users a way to work with them (https://github.com/zwave-js/node-zwave-js/issues/1348 as a first step)
Add a method to serialize them as either a timespan string like you proposed or the current object format
Add a method to deserialize them from a timespan string or the current object format. Trying to use an invalid combination will throw.

Devs can then decide whether they need to work with timespan strings, value+unit objects or the original Duration object.

Will all Durations be like that?... Like all ? I would be worried that suddenly a device comes along, which operates in increments of 10s.
So one third way is simply to expose the 0..255 value. :) Additional metadata / functions could then help users in translating between timespans, Durations, or something else entirely.
Anyhoo, if it's always minutes and seconds, it's probably fine. Let's hope a Duration2 doesn't appear :D

Will all Durations be like that?... Like all ? I would be worried that suddenly a device comes along, which operates in increments of 10s.
So one third way is simply to expose the 0..255 value. :) Additional metadata / functions could then help users in translating between timespans, Durations, or something else entirely.
Anyhoo, if it's always minutes and seconds, it's probably fine. Let's hope a Duration2 doesn't appear :D

So one third way is simply to expose the 0..255 value

I don't like exposing values which need additional interpretation. The aim of a library is to abstract away the ugly details (or at least make them intuitive to work with). I think we're on a good way with the additions to Duration.

So one third way is simply to expose the 0..255 value

I don't like exposing values which need additional interpretation. The aim of a library is to abstract away the ugly details (or at least make them intuitive to work with). I think we're on a good way with the additions to Duration.

I think that Duration value is good, I just think that the type should be Duration and not any

I think that Duration value is good, I just think that the type should be Duration and not any


Phase 1 DM Stack Club Session, Friday July 20, 0900 PDT

Hi @LSSTScienceCollaborations/dm-stack-club
We'll meet up tomorrow at 0900 PDT again for another hack session. We'll start with a spot of show and tell at the start from anyone who wants to report on what they've been working on, any new leads for notebook source (eg the DC2 tutorials, @kadrlica !) - and then we'll do a quick stand up before settling in to hack.
Here's the project list, where you can see half a dozen courageous Stack Club members who have nailed their colors to the mast. You too can join them! Just make an issue describing the notebook (or notebooks) you are going to make for the August PCW session.
See you on Zoom tomorrow, meeting ID 946390572!
Phil
PS. To catch up on previous meetings check out the videos on the Meetings page.

Here's the link to the DESC DC2 notebooks, that have been prepared for their collaboration meeting next week. Until they license them for copying and redistribution we should treat this as a read-only resource, from which we can learn a few more DM stack and jupyter notebook tricks (as well as noting the nice markdown-heavy style, clear goals section at the top, stated owner and last run date, etc). These notebooks only run as-is in the DESC environment at NERSC, so they are not directly transferrable to the LSST science platform anyway - but they are a nice additional resource for us to learn from.

@stargaser showed us his progress on his Calexp_guided_tour tutorial notebook - he's crunching through the get methods of the calexp class, and plotting everything as he goes. He showed us a nice notebook trick: if you make an  interactive plot (or even a matplotlib figure that you want to add overlays to later), you can right-click on the cell and choose "Create New View for Output", and then drag and drop that new view to make a split pane that just contains the output of that cell, and which then updates as the code is re-run. David's show and tell starts at about 40 mins into the video recording.


express static folder and go to definition

1.6.1
Windows 10

I have in express:
app.use(express.static(__dirname + '/../public'));
In html file I cannot go to definition. But It's correct, when I run app.

Where I can fix this problem?

Sorry, we can only open the link is the css is at a location relative to the html file.


[Sprint] Release 2.4.0

[x] Make v2.4.0-tchap-rc.1 release candidate :

[x] make sure tchap-web's package.json points to the right react-sdk and js-sdk
[x] make sure react-sdk's package.json points to the right js-sdk (same as tchap-web)
[x] tag all 3 repos
[x] build the tar file on scalingo
[x] make a release in tchap-web repo, add the tar file
[x] push code on tchap-prod on scalingo
[x] link machine to domain prod.tchap.incubateur.net

[x] Finalize test plan
[ ] Test rc.1

Test plan : https://www.notion.so/v2-4-0-c886556596a2438697528775d6e5316a
Test instance : https://prod.tchap.incubateur.net/ (login/mot de passe de prod)
Bugs in rc.1 :

[ ] (link to issue) ...

Fixed for rc.2

registration (probably still buggy ? Needs server logs to know)
some translations (maybe there are some more missing)

Released in beta


Fix display SDA Exchange transaction

PR:
https://github.com/proximax-foundry/web-explorer-vuejs/pull/221


Is the M365 Migration app for Google Workspaces still viable?

Looks like the M365 migration app / domain installer is no longer available. (global admin on m365 and Gworkspaces)

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

ID: 845775d4-7e19-6de1-8174-2e7c2a772f92
Version Independent ID: 9aadf253-fba6-7be3-9a63-a7c4b0df84d0
Content: Connect to Google with Migration Manager - Migrate to Microsoft 365
Content Source: migration/mm-google-step1-connect.md
Service: sharepoint-online
Sub-service: sharepoint-migration
GitHub Login: @JoanneHendrickson
Microsoft Alias: jhendr

Hello @PaintrockConsulting Kristi, how are you?
Do you mean that you have the install button grayed out? I followed the instructions and is available for me.
Thanks for clarifying,

Hello – thank you for asking; yes – the install button is greyed out.  I used a different utility to perform the migration.  Thank you.
Regards,
Kristi Robison
+1.307.431.8690 (US; GMT - 6)
<EMAIL_ADDRESS>From: Andres Mariano Gorzelany @.>
Sent: Wednesday, March 2, 2022 5:47 AM
To: MicrosoftDocs/OfficeDocs-SharePoint @.>
Cc: Kristi Robison @.>; Mention @.>
Subject: Re: [MicrosoftDocs/OfficeDocs-SharePoint] Is the M365 Migration app for Google Workspaces still viable? (Issue #3192)
Hello @PaintrockConsultinghttps://github.com/PaintrockConsulting Kristi, how are you?
Do you mean that you have the install button grayed out? I followed the instructions and is available for me.
Thanks for clarifying,
—
Reply to this email directly, view it on GitHubhttps://github.com/MicrosoftDocs/OfficeDocs-SharePoint/issues/3192#issuecomment-1056891605, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AE7A7YUDLIVEP6CEGJ6IHK3U55PMTANCNFSM5PK7ITXA.
Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID<EMAIL_ADDRESS>


Compound Indexes

Is your feature request related to a problem? Please describe.
Today it is only possible to create an index on one single field, but it is often required to index on multiple fields.
Describe the solution you'd like
I implemented compound indexes a while ago on my own nedb fork. (https://github.com/rmanibus/nedb/pull/1)
this is how it works:
db.ensureIndex({ fieldName: ["field1", "field2"] }, function (err) {});

my branch would need to be rebased but I think this can easily be integrated in that project.

I also have a github workflow ready for this project to execute tests on PR if you want

This has been released in v4.0.0.


Missing inference on some points of the points cloud

Hi, @HuguesTHOMAS
Thanks for your work!
We are trying to use the library for the cloud segmentation on our own dataset.
We have some problems with the inference. We have the following output for a particular points cloud

You can see in blue the ground and in green the vegetation.
As you can notice we have some points that are not classified (gray ones).
For completeness, the parameters chosen (for training and inference) are the same parameters that you use for the S3DIS dataset.
Do you have some suggestions in order to have a complete classified points cloud?

The result you show here is very strange.
Some ideas that pop out of my mind: Do you re-project the classification on the original points? Because the network usually processes a subsampled version of the input clouds. How many classes do you have in your training? Do you have an "unclassified" class?
Best,
Hugues

Thank you for the suggestions. The error was related to our datasets and missing labels.


[Plato imports] As a librarian, I can follow up on all the to-be-claimed dissertations of researchers

Enhancement
As a librarian, I can follow up on all the to-be-claimed dissertations of researchers.

Prototype: https://booktower-ugent-ui.vercel.app/biblio/reviewer/reviewer-suggestions.html
Success criteria
Overview

[x] Before dissertations are suggested in Biblio, a duplication check happens on title or identifier whenever possible. If the dissertation is not in Biblio yet, they are suggested to reviewers (see next tasks).
[x] As a reviewer, I can see which records are automatically suggested from other platforms

[x] In a separate tab "Suggestions"
[x] When there are suggestions, I can see a notification appear in the sidebar (in line with dashboard)

[x] Paginated (in line with publications and datasets)

[x] I can see the following metadata:

Source (Plato image, see image in comments.)
Biblio status (Biblio suggestion via Plato)
Type (e.g. Dissertation)
Access levels (in line with overview pages)
Title
Publication year
Publisher
[x] Authors, supervisors, editors, ...

Example implementation:

                                        Biblio suggestion via Plato

                                    Dissertation
                                    Embargoed access

Using frequency tagging to investigate social processing in autism

2023

Ghent University. Department of Experimental clinical and health psychology

                                        Danna Oomen

                                    Hide suggestion

Import as draft

Actions
Preview
https://github.com/ugent-library/biblio-backoffice/issues/1411
Importing

[x] I can import a suggestion as a draft

This is a regular draft, as already implemented (new forms out of scope).
Any involved authors or supervisors can see the draft / published record in their search overview.
Drafts and published dissertations also appear in the "Recent activity" on the dashboard for the person adding the dissertation and the authors / supervisors connected to the dissertation.

Hiding a suggestion

[x] I can hide a suggestion and get a fail-safe modal

[x] align/adapt copy

[x] We can always, behind the scenes, see which suggestions have been flagged as a duplicate, or have been hidden. We can retrieve them if needed.

Are you sure you want to hide this suggestion?

You cannot undo this action.

                            <button class="btn btn-link">No, cancel</button>

                        <button class="btn btn-danger">Yes, hide suggestion</button>

Empty state

[x] When there are no more suggestions left, there is an empty state:

https://biblio-backend-ugent-prototype-ugent-library.vercel.app/biblio/reviewer/reviewer-suggestions--empty.html
Example implementation:

No suggestions, all caught up!

Optional

Search (in line with publications and datasets)
Sort (in line with publications and datasets, keep in mind https://github.com/ugent-library/biblio-backoffice/issues/1364)

Out of scope

Flagging of duplicates or faulty suggestions (later)
Tabs to differentiate between "to import", "imported", "rejected" (by whom and why)

Context

This is a first small step in rolling out Plato suggestions
Administrative support will not be able to see these import suggestions, as we see the researcher as responsible to upload information into Biblio. However, not every research group is organised for this, and administrative support takes over this task. We need our reviewers to be a fail-safe here.
Groups that are organised differently still are at risk of losing track of dissertations when people have left. We need our reviewers to be a fail-safe here.

Plato SVG image:

done


Make avatar icons for authors and contributors bigger

Avatar icon for authors and contributors are too small. It was possible before to recognize avatars.

⚠ Idea migrated from UserVoice
Created By: Aleksandar Nikolic
Created On: 2016/11/17 23:49:32 +0000
Votes at Migration: 2
Supporters at Migration: 2

We settled on using the current small size for avatars to keep the focus on the article rather than on the author. I can bring this back up to the design team and see if a size increase makes sense at some point down the line.

Closing as wont-fix.


fixes to support Neurovault test dataset

Updates suggested by @infocortex for Neurovault.

If you have kept track of them, it would be great if you could let me know which one of the datasets were failing for the two other updates you made. Otherwise, I will try to retrieve them from Chris's folder. Thanks.

any chance this could be merged?

@chrisfilo: I would need to have a closer look and check why the first_level variable was not set properly. I was thinking I would get back to this next week after the NIDM-Results release. Let me know if it's more urgent.

It's not urgent - I just would like to switch to using current master
instead of our fix branch. We just set up Travis CI so NV will be
automatically tested agains updates to various nidm packages.
On Thu, Apr 9, 2015 at 3:56 AM, Camille Maumet<EMAIL_ADDRESS>wrote:

@chrisfilo https://github.com/chrisfilo: I would need to have a closer
look and check why the first_level variable was not set properly. I was
thinking I would get back to this next week after the NIDM-Results release.
Let me know if it's more urgent.
—
Reply to this email directly or view it on GitHub
https://github.com/incf-nidash/nidm-results_fsl/pull/32#issuecomment-91194298
.

That's great!

@cmaumet @nicholst it would be great if you could merge this so we could switch to master (and start fixing other things that broke after recent updates).

@chrisfilo: I am currently working on fixing this issue. We can't merge this PR as it is as I need to investigate why the code was failing on your examples but that should not be much longer now.

All changes suggested in this pull request are now implemented in #35. I am going to close this PR and merge #35.

Lmm jhjtubblulllbyyyhhrktmtjun
On Apr 9, 2015 4:00 AM, "Camille Maumet"<EMAIL_ADDRESS>wrote:

That's great!
—
Reply to this email directly or view it on GitHub
https://github.com/incf-nidash/nidm-results_fsl/pull/32#issuecomment-91194959
.


Update README.md

fix the typo in url

I signed it!
On Tue, Jun 2, 2015 at 10:16 AM googlebot<EMAIL_ADDRESS>wrote:

Thanks for your pull request. It looks like this may be your first
contribution to a Google open source project, in which case you'll need to
sign a Contributor License Agreement (CLA).
[image: :memo:] Please visit https://cla.developers.google.com/
https://cla.developers.google.com/ to sign.
Once you've signed, please reply here (e.g. I signed it!) and we'll
verify. Thanks.

If you've already signed a CLA, it's possible we don't have your
GitHub username or you're using a different email address. Check your
existing CLA data https://cla.developers.google.com/clas and verify
that your email is set on your git commits
https://help.github.com/articles/setting-your-email-in-git/.
If you signed the CLA as a corporation, please let us know the
company's name.

—
Reply to this email directly or view it on GitHub
https://github.com/googlesamples/android-credentials/pull/2#issuecomment-107773864
.


Table switch -c has no effect, file content is just displayed as usal (e.g. by calling "ov -c -d: /etc/passwd"). Using ov Version 0.4.0. Same effect with $HEAD. Distro is Mint 19.3.

Table switch -c has no effect, file content is just displayed as usal (e.g. by calling "ov -c -d: /etc/passwd"). Using ov Version 0.4.0. Same effect with $HEAD. Distro is Mint 19.3.
Originally posted by @larsklemstein in https://github.com/noborus/ov/issues/5#issuecomment-671629179

I don't know yet.
It worked with me.
https://github.com/noborus/ov/blob/master/docs/image.md#column-mode-toggle-c
Does the highlight do not work on the left or right?

The highlighting works on the left.
Lars
Am Di., 11. Aug. 2020 um 06:46 Uhr schrieb Noboru Saito <
<EMAIL_ADDRESS>
I don't know yet.
It worked with me.
https://github.com/noborus/ov/blob/master/docs/image.md#column-mode-toggle-c
Does the highlight do not work on the left or right?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/noborus/ov/issues/21#issuecomment-671721839, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AMGOCGBUUWQY6U5OKDWAFALSADEJHANCNFSM4P2T5RMA
.

ls -l won't work because the delimiter will be multiple spaces.
#251 implementation is required to resolve.
For now, the only thing you can do is:
ls -l |tr -s ' ' '\t'|ov -d '\t' --column-mode --column-rainbow

I don't think that PR will resolve this.
Tabular data is not just about a delimiter.
The padding/alignment of columns (left, right or center) should be taken into account.
Because there may be columns (like dates, file names, etc) that have spaces.
Parsing tabular data accurately and correctly is not even always possible, since they may be ambiguity. But it's still worth to try our best, because there are so many Linux/Unix command line tools that produce it (and are not able to produce csv or json, sadly).
The README actually clams:

ov also has an effective function for tabular text.

which made me think it can actually parse tabular data.

It may not matter much here, but in some other unlucky cases, it can be important.

The README actually claims:

ov also has an effective function for tabular text.

which made me think it can actually parse tabular data.

I think it is unreasonable.
The output of ls -l is actually vertically aligned rather than tabular. So the README is not wrong.
Anyway, vertical alignment is difficult to parse.

I think in the context of command line (and not spreadsheets), vertical alignment is part of tabular output/data, because command line output is generally meant for viewing, searching or filtering (with grep/sed), not parsing.
Formats like csv and tsv are also tabular, but they are mostly spreadsheet-oriented I think.
Ideally all commands that print tables should be able to produce csv, tsv or json by giving a flag, but that's very far-fetching.

My reply remains unchanged, just repeating, but converted to discussions.


Colors manipulating when hovering the sidebar

when I hover the sidebar, I get this issue:
https://drive.google.com/file/d/1kNTl0DJCLwY_YYt-D2MLZ-7ueCVPbsPH/view?usp=sharing

https://github.com/keyber-inc/flutter_admin_scaffold/assets/62998398/fdeedaf2-cc71-413b-9206-246a371429ab


PR Checks: Check if unknown boxes are present in standard features

Currently, there is an edge case where if a box is not understood by GPAC and also not registered at MP4RA it's not considered as a problem. In fact, this could be the first time this box has been seen (new contribution) so we need to check if it's present in standard features regardless of if it exists in MP4RA or not. This would only apply to under_consideration files though.
related #107

@podborski This is done


Error on adding public offering

Hi @AmbientLighter , @mikeyakymenko, @RonBalnen,
You guys are really doing an amazing job! using great tech stack and this tool has lots of features. I recently installed it on my machine.
but I don't know I am asking the right question or not even I might be wrong as i have least insight about the application workflow. Still seeking your help here.
Problem
After creating organization, I am adding public offering but it throws an error. please refer the snapshot.
Console error

I am done with my initial analysis and then went though the debugger and I noticed its happening because formatOfferingRequest method is expecting an argument component which is empty from service. refer below snapshot
Server response

And the code is breaking on file waldur-homeport\src\marketplace\offerings\store\effects.ts line no. 68 as component is being passed null.
When i jumped inside the method which is located on waldur-homeport\src\marketplace\offerings\store\utils.ts line no. 104 method formatOfferingRequest so this is actually breaks on highlighted code snippet.
Code

I don't know whats wrong here. Is it really mandatory to pass component if yes how and from where?
Looking forward for your response!
Thank you

This bug has been fixed in https://github.com/opennode/waldur-homeport/commit/ca9cc82f41be600cd4bfa051b52569993816f764


Use new card components for client dashboard

If already created, we want to use these card components with the background shadows for the client dashboard. If not, modify what exists to mimic this look.

minor note but illustrations were changed for the cards here. thank you! https://www.figma.com/file/3Xf9AS2CPzYg6dUtyy046t/Client-Dashboard


To change the text size and font style across a website

To change the text size and font style across a website
make it more interactive and attractive that matches website theme .
@YadavAkhileshh  plz assign me this issue

plz assign me this issue @YadavAkhileshh

To change the text size and font style across a website
make it more interactive and attractive that matches website theme.
I would like to work on this issue, plz assign me this issue.

@devki412 any update??


Support wireless button

I am trying to figure out how to make use of wireless buttons like:
https://www.zigbee2mqtt.io/devices/E1524_E1810.html#ikea-e1524%252Fe1810
or
https://www.zigbee2mqtt.io/devices/E2123.html#ikea-e2123
Currently the logs reports whenever a button is pressed:
debug - [13:31:51.176] [sonos_remote]: MQTT message for device sonos_remote payload: { state: 'track_next' }
debug - [13:31:51.176] [sonos_remote]: Update endpoint 5 cluster 6-OnOff not found: is z2m converter exposing all features?
However I don't see the device gets status update in HA

Hi,
thank you for your interest.
Very interesting devices.
Actually the action conversion is limited:
Known issues
Conversion issues between zigbee2MQTT and Matter ecosystems
Scene buttons are exposed only when they send single double and hold actions (this is due to the Home app supporting only these 3 events.) In the next releases the scene buttons with more actions will be mapped to different endpoints like in my plugin homebridge-mqtt-accessories.

[2.0.12] - 2024-04-30
Added
[action]: Added support for devices with more then 3 events/actions. All SwitchCluster actions are mapped in groups of 3 on sub endpoints. The mapping schema is shown in log.
[mqtt]: Added handles for group_add, group_remove, group_rename, group_add_member and group_remove_member

Thanks for the update!
I have testes the new changes with wireless gang buttons like https://www.zigbee2mqtt.io/devices/TS0042.html#tuya-ts0042 and they work well.
However, for special button like those ikea ones, i think the grouping needs so sort of special handling:
here is the log when the 'Dot 1' button is pressed:
debug - [11:23:55.141] [sonos_remote]: MQTT message for device sonos_remote payload: { action: 'dots_1_initial_press', battery: 52, linkquality: 148, update: { installed_version: 16777269, latest_version: 16777269, state: 'idle' }, update_available: null, voltage: 2500 } debug - [11:23:55.151] [sonos_remote]: Action "dots_1_initial_press" found on switch 3 endpoint 11 action Double debug - [11:23:55.152] [sonos_remote]: Trigger 'Double press' event for sonos_remote debug - [11:23:55.153] [sonos_remote]: MQTT message for device sonos_remote payload: { action: '', battery: 52, linkquality: 148, update: { installed_version: 16777269, latest_version: 16777269, state: 'idle' }, update_available: null, voltage: 2500 } warn - [11:23:55.153] [sonos_remote]: Action "" not found on actions [ 'toggle', 'track_previous', 'track_next', 'volume_up', 'volume_down', 'volume_up_hold', 'volume_down_hold', 'dots_1_initial_press', 'dots_2_initial_press', 'dots_1_long_press', 'dots_2_long_press', 'dots_1_short_release', 'dots_2_short_release', 'dots_1_long_release', 'dots_2_long_release', 'dots_1_double_press', 'dots_2_double_press' ] warn - [11:23:55.153] [sonos_remote]: Action "" not found on actions [ 'toggle', 'track_previous', 'track_next', 'volume_up', 'volume_down', 'volume_up_hold', 'volume_down_hold', 'dots_1_initial_press', 'dots_2_initial_press', 'dots_1_long_press', 'dots_2_long_press', 'dots_1_short_release', 'dots_2_short_release', 'dots_1_long_release', 'dots_2_long_release', 'dots_1_double_press', 'dots_2_double_press' ] warn - [11:23:55.153] [sonos_remote]: Action "" not found on actions [ 'toggle', 'track_previous', 'track_next', 'volume_up', 'volume_down', 'volume_up_hold', 'volume_down_hold', 'dots_1_initial_press', 'dots_2_initial_press', 'dots_1_long_press', 'dots_2_long_press', 'dots_1_short_release', 'dots_2_short_release', 'dots_1_long_release', 'dots_2_long_release', 'dots_1_double_press', 'dots_2_double_press' ] warn - [11:23:55.154] [sonos_remote]: Action "" not found on actions [ 'toggle', 'track_previous', 'track_next', 'volume_up', 'volume_down', 'volume_up_hold', 'volume_down_hold', 'dots_1_initial_press', 'dots_2_initial_press', 'dots_1_long_press', 'dots_2_long_press', 'dots_1_short_release', 'dots_2_short_release', 'dots_1_long_release', 'dots_2_long_release', 'dots_1_double_press', 'dots_2_double_press' ] warn - [11:23:55.160] [sonos_remote]: Action "" not found on actions [ 'toggle', 'track_previous', 'track_next', 'volume_up', 'volume_down', 'volume_up_hold', 'volume_down_hold', 'dots_1_initial_press', 'dots_2_initial_press', 'dots_1_long_press', 'dots_2_long_press', 'dots_1_short_release', 'dots_2_short_release', 'dots_1_long_release', 'dots_2_long_release', 'dots_1_double_press', 'dots_2_double_press' ] warn - [11:23:55.161] [sonos_remote]: Action "" not found on actions [ 'toggle', 'track_previous', 'track_next', 'volume_up', 'volume_down', 'volume_up_hold', 'volume_down_hold', 'dots_1_initial_press', 'dots_2_initial_press', 'dots_1_long_press', 'dots_2_long_press', 'dots_1_short_release', 'dots_2_short_release', 'dots_1_long_release', 'dots_2_long_release', 'dots_1_double_press', 'dots_2_double_press' ] debug - [11:23:55.161] [sonos_remote]: MQTT message for device sonos_remote payload: { state: 'dots_1_initial_press' } debug - [11:23:55.161] [sonos_remote]: Update endpoint 8 cluster 6-OnOff not found: is z2m converter exposing all features? debug - [11:23:55.957] [sonos_remote]: MQTT message for device sonos_remote payload: { action: 'dots_1_short_release', battery: 52, linkquality: 148, update: { installed_version: 16777269, latest_version: 16777269, state: 'idle' }, update_available: null, voltage: 2500 } debug - [11:23:55.959] [sonos_remote]: Action "dots_1_short_release" found on switch 4 endpoint 12 action Long debug - [11:23:55.973] [sonos_remote]: Trigger 'Long press' event for sonos_remote debug - [11:23:55.976] [sonos_remote]: MQTT message for device sonos_remote payload: { action: '', battery: 52, linkquality: 148, update: { installed_version: 16777269, latest_version: 16777269, state: 'idle' }, update_available: null, voltage: 2500 } warn - [11:23:55.976] [sonos_remote]: Action "" not found on actions [ 'toggle', 'track_previous', 'track_next', 'volume_up', 'volume_down', 'volume_up_hold', 'volume_down_hold', 'dots_1_initial_press', 'dots_2_initial_press', 'dots_1_long_press', 'dots_2_long_press', 'dots_1_short_release', 'dots_2_short_release', 'dots_1_long_release', 'dots_2_long_release', 'dots_1_double_press', 'dots_2_double_press' ] warn - [11:23:55.976] [sonos_remote]: Action "" not found on actions [ 'toggle', 'track_previous', 'track_next', 'volume_up', 'volume_down', 'volume_up_hold', 'volume_down_hold', 'dots_1_initial_press', 'dots_2_initial_press', 'dots_1_long_press', 'dots_2_long_press', 'dots_1_short_release', 'dots_2_short_release', 'dots_1_long_release', 'dots_2_long_release', 'dots_1_double_press', 'dots_2_double_press' ] warn - [11:23:55.976] [sonos_remote]: Action "" not found on actions [ 'toggle', 'track_previous', 'track_next', 'volume_up', 'volume_down', 'volume_up_hold', 'volume_down_hold', 'dots_1_initial_press', 'dots_2_initial_press', 'dots_1_long_press', 'dots_2_long_press', 'dots_1_short_release', 'dots_2_short_release', 'dots_1_long_release', 'dots_2_long_release', 'dots_1_double_press', 'dots_2_double_press' ] warn - [11:23:55.977] [sonos_remote]: Action "" not found on actions [ 'toggle', 'track_previous', 'track_next', 'volume_up', 'volume_down', 'volume_up_hold', 'volume_down_hold', 'dots_1_initial_press', 'dots_2_initial_press', 'dots_1_long_press', 'dots_2_long_press', 'dots_1_short_release', 'dots_2_short_release', 'dots_1_long_release', 'dots_2_long_release', 'dots_1_double_press', 'dots_2_double_press' ] warn - [11:23:55.977] [sonos_remote]: Action "" not found on actions [ 'toggle', 'track_previous', 'track_next', 'volume_up', 'volume_down', 'volume_up_hold', 'volume_down_hold', 'dots_1_initial_press', 'dots_2_initial_press', 'dots_1_long_press', 'dots_2_long_press', 'dots_1_short_release', 'dots_2_short_release', 'dots_1_long_release', 'dots_2_long_release', 'dots_1_double_press', 'dots_2_double_press' ] warn - [11:23:55.978] [sonos_remote]: Action "" not found on actions [ 'toggle', 'track_previous', 'track_next', 'volume_up', 'volume_down', 'volume_up_hold', 'volume_down_hold', 'dots_1_initial_press', 'dots_2_initial_press', 'dots_1_long_press', 'dots_2_long_press', 'dots_1_short_release', 'dots_2_short_release', 'dots_1_long_release', 'dots_2_long_release', 'dots_1_double_press', 'dots_2_double_press' ] debug - [11:23:55.978] [sonos_remote]: MQTT message for device sonos_remote payload: { state: 'dots_1_short_release' } debug - [11:23:55.978] [sonos_remote]: Update endpoint 8 cluster 6-OnOff not found: is z2m converter exposing all features?
and here is the log from z2m:
Info 2024-04-30 11:28:01MQTT publish: topic 'zigbee2mqtt/sonos_remote', payload '{"action":"dots_1_initial_press","battery":52,"linkquality":148,"update":{"installed_version":16777269,"latest_version":16777269,"state":"idle"},"update_available":null,"voltage":2500}' Info 2024-04-30 11:28:01MQTT publish: topic 'zigbee2mqtt/sonos_remote', payload '{"action":"","battery":52,"linkquality":148,"update":{"installed_version":16777269,"latest_version":16777269,"state":"idle"},"update_available":null,"voltage":2500}' Info 2024-04-30 11:28:01MQTT publish: topic 'zigbee2mqtt/sonos_remote/action', payload 'dots_1_initial_press' Info 2024-04-30 11:28:02MQTT publish: topic 'zigbee2mqtt/sonos_remote', payload '{"action":"dots_1_short_release","battery":52,"linkquality":160,"update":{"installed_version":16777269,"latest_version":16777269,"state":"idle"},"update_available":null,"voltage":2500}' Info 2024-04-30 11:28:02MQTT publish: topic 'zigbee2mqtt/sonos_remote', payload '{"action":"","battery":52,"linkquality":160,"update":{"installed_version":16777269,"latest_version":16777269,"state":"idle"},"update_available":null,"voltage":2500}' Info 2024-04-30 11:28:02MQTT publish: topic 'zigbee2mqtt/sonos_remote/action', payload 'dots_1_short_release'
it seems like "dots_1_initial_press" and "dots_1_short_release" will always happen in a group

Hi.
MQTT message for device sonos_remote payload: { action: '' this is wrong there is no action sent from z2m so this why you see action not found.
The buttons are mapped as you see in the log when the plugin starts from what z2m exposes.
Then if z2m send action '' there is nothing to do.
(update and update_available are not useful you can put them in featureBlackList if you want to have the log cleaner).

Well I did noticed the action '', but that's the main problem.
The problem is whenever "dots_1_initial_press" and "dots_1_short_release" will always happen together.
From the logs I provided:
11:28:01: MQTT publish "dots_1_initial_press"
11:28:02: MQTT publish "dots_1_short_release"
I didn't pressed the button two times, "dots_1_short_release" will be published after the button got released.
However, "dots_1_initial_press" and "dots_1_short_release" are mapped to two different buttons in matterbridge:
info - [13:56:34.712] [sonos_remote]: -- Button 1: Single Press <=> toggle info - [13:56:34.713] [sonos_remote]: -- Button 1: Double Press <=> track_previous info - [13:56:34.714] [sonos_remote]: -- Button 1: Long Press <=> track_next info - [13:56:34.718] [sonos_remote]: -- Button 2: Single Press <=> volume_up info - [13:56:34.719] [sonos_remote]: -- Button 2: Double Press <=> volume_down info - [13:56:34.723] [sonos_remote]: -- Button 2: Long Press <=> volume_up_hold info - [13:56:34.724] [sonos_remote]: -- Button 3: Single Press <=> volume_down_hold info - [13:56:34.725] [sonos_remote]: -- Button 3: Double Press <=> dots_1_initial_press info - [13:56:34.725] [sonos_remote]: -- Button 3: Long Press <=> dots_1_long_press info - [13:56:34.728] [sonos_remote]: -- Button 4: Single Press <=> dots_1_short_release info - [13:56:34.729] [sonos_remote]: -- Button 4: Double Press <=> dots_1_long_release info - [13:56:34.732] [sonos_remote]: -- Button 4: Long Press <=> dots_1_double_press info - [13:56:34.735] [sonos_remote]: -- Button 5: Single Press <=> dots_2_initial_press info - [13:56:34.736] [sonos_remote]: -- Button 5: Double Press <=> dots_2_long_press info - [13:56:34.738] [sonos_remote]: -- Button 5: Long Press <=> dots_2_short_release info - [13:56:34.741] [sonos_remote]: -- Button 6: Single Press <=> dots_2_long_release info - [13:56:34.742] [sonos_remote]: -- Button 6: Double Press <=> dots_2_double_press
This means two buttons will be triggered at the same time.

This is what you should see in Matterbridge log when an event is triggered.

No, that's a scene button, not IKEA SYMFONISK remote.
The way z2m publish topic for scene button and SYMFONISK is different.
z2m does not even publish action 'single' for SYMFONISK remote, the actions it exposes are documented here:
https://www.zigbee2mqtt.io/devices/E2123.html#ikea-e2123
most of the scene button don't have a status of press release, but SYMFONISK does.

Ok, I got it.

Can you send me this part of the console log about your IKEA SYMFONISK please?

Hello,
I did in my previous response, plesae let me know if you need more logs, thanks!
info - [13:56:34.712] [sonos_remote]: -- Button 1: Single Press <=> toggle
info - [13:56:34.713] [sonos_remote]: -- Button 1: Double Press <=> track_previous
info - [13:56:34.714] [sonos_remote]: -- Button 1: Long Press <=> track_next
info - [13:56:34.718] [sonos_remote]: -- Button 2: Single Press <=> volume_up
info - [13:56:34.719] [sonos_remote]: -- Button 2: Double Press <=> volume_down
info - [13:56:34.723] [sonos_remote]: -- Button 2: Long Press <=> volume_up_hold
info - [13:56:34.724] [sonos_remote]: -- Button 3: Single Press <=> volume_down_hold
info - [13:56:34.725] [sonos_remote]: -- Button 3: Double Press <=> dots_1_initial_press
info - [13:56:34.725] [sonos_remote]: -- Button 3: Long Press <=> dots_1_long_press
info - [13:56:34.728] [sonos_remote]: -- Button 4: Single Press <=> dots_1_short_release
info - [13:56:34.729] [sonos_remote]: -- Button 4: Double Press <=> dots_1_long_release
info - [13:56:34.732] [sonos_remote]: -- Button 4: Long Press <=> dots_1_double_press
info - [13:56:34.735] [sonos_remote]: -- Button 5: Single Press <=> dots_2_initial_press
info - [13:56:34.736] [sonos_remote]: -- Button 5: Double Press <=> dots_2_long_press
info - [13:56:34.738] [sonos_remote]: -- Button 5: Long Press <=> dots_2_short_release
info - [13:56:34.741] [sonos_remote]: -- Button 6: Single Press <=> dots_2_long_release
info - [13:56:34.742] [sonos_remote]: -- Button 6: Double Press <=> dots_2_double_press

Well I did noticed the action '', but that's not the main problem. The problem is "dots_1_initial_press" and "dots_1_short_release" will always happen together.
From the logs I provided: 11:28:01: MQTT publish "dots_1_initial_press" 11:28:02: MQTT publish "dots_1_short_release"
I didn't pressed the button two times, "dots_1_short_release" will be published after the button got released.
However, "dots_1_initial_press" and "dots_1_short_release" are mapped to two different buttons in matterbridge: info - [13:56:34.712] [sonos_remote]: -- Button 1: Single Press <=> toggle info - [13:56:34.713] [sonos_remote]: -- Button 1: Double Press <=> track_previous info - [13:56:34.714] [sonos_remote]: -- Button 1: Long Press <=> track_next info - [13:56:34.718] [sonos_remote]: -- Button 2: Single Press <=> volume_up info - [13:56:34.719] [sonos_remote]: -- Button 2: Double Press <=> volume_down info - [13:56:34.723] [sonos_remote]: -- Button 2: Long Press <=> volume_up_hold info - [13:56:34.724] [sonos_remote]: -- Button 3: Single Press <=> volume_down_hold info - [13:56:34.725] [sonos_remote]: -- Button 3: Double Press <=> dots_1_initial_press info - [13:56:34.725] [sonos_remote]: -- Button 3: Long Press <=> dots_1_long_press info - [13:56:34.728] [sonos_remote]: -- Button 4: Single Press <=> dots_1_short_release info - [13:56:34.729] [sonos_remote]: -- Button 4: Double Press <=> dots_1_long_release info - [13:56:34.732] [sonos_remote]: -- Button 4: Long Press <=> dots_1_double_press info - [13:56:34.735] [sonos_remote]: -- Button 5: Single Press <=> dots_2_initial_press info - [13:56:34.736] [sonos_remote]: -- Button 5: Double Press <=> dots_2_long_press info - [13:56:34.738] [sonos_remote]: -- Button 5: Long Press <=> dots_2_short_release info - [13:56:34.741] [sonos_remote]: -- Button 6: Single Press <=> dots_2_long_release info - [13:56:34.742] [sonos_remote]: -- Button 6: Double Press <=> dots_2_double_press
This means two buttons will be triggered at the same time.

So basically, if I understand correctly, you would like some mechanism to exclude not only an exposed feature but a single element of the action expose like dots_1_short_release or whatever you decide to put on this list?
But if you don't set any automation in your controller for dots_1_short_release is the same. Isn't it?
Just ignore Button 4: Single Press in your controller.
BTW In the the release of a few hours ago I added to ignore actions with empty value.

You do have a point here, and that how I was using the remote these few days :laughing:
I think it is more like something nice to have.
What keep bothers me here is it is hard to keep track of which buttons are mapped to which homekit buttons when creating automation, I had to either look at the mapping table from the logs, or just keep pressing the button and see which two buttons got triggered in the Home app.

I use another system there.
Instead of the Home app, use the Eve app: there you press a button and the app shows it graphically even if there is no automation attached. It's super easy with the Eve app cause you have all subendpoints visible on the same page.
Or use zigbee2mqtt-automations that is more powerfull and faster cause is directly inside z2m.
https://github.com/Luligu/zigbee2mqtt-automations?tab=readme-ov-file#zigbee2mqtt-automations

That is a wonderful advice, I don't have to keep pressing those buttons anymore.

Glad everything is ok.
Thanks you for your interest.


Angular support

Clear and concise description of the problem
It would be nice if the package came with an out-of-the-box Angular component, to make it easier and quicker to use in an Angular or Ionic project.
Suggested solution
I've already made a working Angular component. I would be willing to rewrite this so if fits with the main Atropos repo, and be available under atropos/angular.
Alternative
Alternatively I could keep maintaining my own package and keep it separate from the main one.
Additional context
No response
Validations

[X] Follow our Code of Conduct
[X] Read the docs.
[X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Would you like to open a PR for this feature?

[X] I'm willing to open a PR

"localhost/:1 Refused to apply style from 'http://localhost:4200/~atropos/atropos.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled."

import Atropos from 'src/../atropos/atropos';
ngAfterViewInit() {
const myAtropos = Atropos({
  el: '.my-atropos',

.....
this worked

my-atropo

This just makes my page constantly refresh like crazy.

Btw. The selector should be .my-atropos or just atropos? I just use atropos using  content... , I do not specify in any other page any css selector, I use it right away.
Thanks in advance!

I am still having the same issue.
Where should I use this constant that I just created in the afterview method because it appears unused?
I am just using atropos like this (right away without further modifications)

Thanks in advance

you don't need too - put it in a console log or just initiate


Ensure all Route53HostedZones are deleted by adding pagination support

Description
Add pagination support for Route53HostedZones resource to list and delete all existing resources. Currently, the list operation did only a single request so it was only able to delete 100 HostedZones/Records (default max number of the element returned by the ListHostedZone / ListResourceRecordSets API calls.
Ref: https://github.com/aws/aws-sdk-go-v2/blob/service/route53/v1.46.3/service/route53/api_op_ListHostedZones.go#L38-L63
Fixes #817.

TODOs
Read the Gruntwork contribution guidelines.

[ ] Update the docs.
[ ] Run the relevant tests successfully, including pre-commit checks.
[ ] Ensure any 3rd party code adheres with our license policy or delete this line if its not applicable.
[ ] Include release notes. If this PR is backward incompatible, include a migration guide.
[ ] Attention Grunts - if this PR adds support for a new resource, ensure the nuke_sandbox and nuke_phxdevops jobs in .circleci/config.yml have been updated with appropriate exclusions (either directly in the job or via the .circleci/nuke_config.yml file) to prevent nuking IAM roles, groups, resources, etc that are important for the test accounts.

Release Notes (draft)
Add Route53HostedZones pagination support to list & delete all hosted zones  [X].
Migration Guide

Passed all the tests. Good to merge the change now. Thanks for the contribution!


Add more possible dirs to template context

I'm submitting a

[ ] bug fix
[X] feature
[ ] documentation addition

What is the current behaviour?
Adds data dir, local data dir, and document dir to possible contexts usages in templating.
What is the motivation / use case for changing the behavior?
Most notably Neovim uses Local Appdata on windows. This makes linking it easier than manually constructing the command.
Since I was there, I added data and documents so I thought those could be useful for some setups.

Codecov Report
Base: 44.63% // Head: 44.79% // Increases project coverage by +0.16% :tada:

Coverage data is based on head (bfd94df) compared to base (9a48178).
Patch coverage: 83.33% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #312      +/-   ##
==========================================
+ Coverage   44.63%   44.79%   +0.16%
==========================================
  Files          82       82
  Lines        2890     2902      +12
==========================================
+ Hits         1290     1300      +10
- Misses       1600     1602       +2

Impacted Files
Coverage Δ

lib/src/contexts/user.rs
86.20% <83.33%> (-2.03%)
:arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Link to documentation in readme is broken

Bug Report

Summary

Link to documentation https://docs.laminas.dev/laminas-cache-storage-adapter-redis/ in readme is broken and leads to a 404 on github pages.

Yes, this stands for all adapters. Sorry for this.
You can find documentation at https://docs.laminas.dev/laminas-cache/v3/storage/adapter/
We are still investigating a proper way to refactor the documentation as it is currently not that optimized.

Thanks for the link. Do you mean the laminas-cache alternative in general? I think linking https://docs.laminas.dev/laminas-cache/v3/storage/adapter/#redis-adapter would be a good alternative.

@meidlinga Yah, but we would prefer to have dedicated pages for every cache adapter.
But since we have ripped out the cache adapters last year, we haven't had time to investigate further documentation changes.
Maybe at some point we will provide redirects for the supported cache adapters to their new pages within the documentation website.
As of now, all documentations regarding any cache adapter is part of laminas-cache itself (in its repository).
The idea is to move all adapter specific documentations to the adapter repositories and then merge them back to the cache adapter when building docs. Sadly, as of now, it always requires a release for laminas-cache to actually build documentation. Thats one of the things we are still investigating as I don't see that we create patch releases for laminas-cache just to roll out documentation releases of new versions of several cache adapters.
I keep this ticket open to keep track of the fact that the link to the documentation is broken.
If you want to, you can send a patch to fix the README file. I'm open to merge that to the latest minor branch 👍🏼

All these links are wrong in the readme files:

https://docs.laminas.dev/laminas-cache-storage-adapter-test/
https://docs.laminas.dev/laminas-cache-storage-adapter-apc/
https://docs.laminas.dev/laminas-cache-storage-adapter-apcu/
https://docs.laminas.dev/laminas-cache-storage-adapter-blackhole/
https://docs.laminas.dev/laminas-cache-storage-adapter-dba/
https://docs.laminas.dev/laminas-cache-storage-adapter-ext-mongodb/
https://docs.laminas.dev/laminas-cache-storage-adapter-filesystem/
https://docs.laminas.dev/laminas-cache-storage-adapter-memcache/
https://docs.laminas.dev/laminas-cache-storage-adapter-memcached/
https://docs.laminas.dev/laminas-cache-storage-adapter-memory/
https://docs.laminas.dev/laminas-cache-storage-adapter-mongodb/
https://docs.laminas.dev/laminas-cache-storage-adapter-redis/
https://docs.laminas.dev/laminas-cache-storage-adapter-session/
https://docs.laminas.dev/laminas-cache-storage-adapter-wincache/
https://docs.laminas.dev/laminas-cache-storage-adapter-xcache/
https://docs.laminas.dev/laminas-cache-storage-adapter-zend-server/
https://docs.laminas.dev/laminas-servicemanager-migration/

@boesing

The idea is to move all adapter specific documentations to the adapter repositories and then merge them back to the cache adapter when building docs.

I am still working on the problem and am currently testing something like this:
- Redis: '!import https://github.com/laminas/laminas-cache-storage-adapter-redis?branch=…?docs_dir=…'

Related to https://github.com/laminas/laminas-continuous-integration-action/issues/34

@boesing , @froschdesign : I opened a PR for a temporary fix, as you suggested. Thanks for the detailed explanation of the underlying problem.

Closed with #29


Fixes the compile errors generated by SPIRV_WARN_EVERYTHING and SPIRV_WERROR

This patch fixes the compile errors generated when the options
SPIRV_WARN_EVERYTHING and SPIRV_WERROR (that force -Wpedantic) are
set to CMake.

Clang-format is still not working.  I have heard that the version you use matters, also make sure you are using the .clang-format in the source tree.
In any case, this is the section the bot is complaining about:
--- source/opt/inline_exhaustive_pass.cpp	(before formatting)
+++ source/opt/inline_exhaustive_pass.cpp	(after formatting)
@@ -59,9 +59,7 @@
   return modified;
 }

-void InlineExhaustivePass::Initialize(ir::IRContext* c) {
-  InitializeInline(c);
-}
+void InlineExhaustivePass::Initialize(ir::IRContext* c) { InitializeInline(c); }

 Pass::Status InlineExhaustivePass::ProcessImpl() {
   // Attempt exhaustive inlining on each entry point function in module

The formatting is still off.  I'll fix it up myself, and merge.

Rebased, squashed, and merged as 045cc8f7


Ability to reset connection pool?

Hi! I'm currently looking into using r2d2 for the connection pooling in the MongoDB Rust driver, and  I've hit a minor roadblock with regards to be able to reset the connection pool in the case that the topology changes. Specifically, the driver uses a background thread per server to monitor the state of the topology, and if one of the monitoring threads loses the ability to connect to a server, then the driver needs to refresh all connections in the pool to establish the new topology. As far as I can tell, r2d2 doesn't currently provide this functionality publicly, although it appears that there's some functionality for it internally. Is there any chance that an ability to reset the connection pool could be made public in some form? I'd be happy to contribute a pull request if you're open to this idea but don't have the time to work on it.

By refresh do you mean discard all connections? The simple thing would just be to add a method which clears the idle connection queue, but that will leave any currently checked out connections alive once they're returned. It might make more sense to use the ManageConnection::is_valid function to discard those old connections on demand.

Yeah, I'd like to be able to discard all connections if possible. There's a spec for MongoDB drivers pertaining to topology monitoring, and it specifies that if one of the monitoring threads loses connection to a server, the connection pool should be cleared and connections should be reestablished from scratch (you can read the specific language here if you're curious).
The way our driver is architected, users don't deal directly with the connection pool. There's a single thread-safe client object, and when users perform an operation, under the hood the client selects one of the connections in the pool to perform the operation with. In order to replace our connection pool with r2d2, we'd need our new connection pool to have the ability to "reset" all the connections (presumably by having them all disconnect and then reconnect, or just dropping all the connection objects and creating new ones if that's simpler).
Is this something you'd be open to having as part of r2d2's API? We likely wouldn't be able to switch out our old connection pool to r2d2 without something like this, although I can understand if you're prefer to keep the API as-is.

A method that discards all idle connections seems reasonable to add if that's all you need.

It's possible that the function I linked to in the codebase might not be doing what I originally thought it did. What we're looking for is to have the ability to cause all connections to be disconnected and then reconnect again. One thing that might not be clear is that users of MongoDB drivers will generally only give a URI for one of the members of a replica set, and then the driver will discover all the other members and assign connections accordingly. The purpose of having all the connections dropped and reestablished when a monitor loses connection to a server is to ensure that there aren't any connections to servers that have gone down (or are disconnected from the rest of the replica set for another reason). I'm not sure that discarding only the idle connections would be sufficient for our use case, as some of the non-idle connections might still be connected to replica set members that aren't in contact with the rest of the set anymore.

You may want a combination of clearing the idle connections and using ManageConnection health check methods then - the connection manager to ensure that no old connections are used, and the idle clear to make the pool immediately start to build up new connections.

Thanks for the suggestion! We were able to work around the problem by just discarding the old pool and creating a new one with the same options, so I'll close this issue.


PreDecorationFilter brokes ControllerLinkBuilder

After this change in PreDecorationFilter ControllerLinkBuilder from Spring Hateoas project starts to fail with exception:
java.lang.NumberFormatException: For input string: "443,443" 	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[na:1.8.0_102] 	at java.lang.Integer.parseInt(Integer.java:580) ~[na:1.8.0_102] 	at java.lang.Integer.parseInt(Integer.java:615) ~[na:1.8.0_102] 	at org.springframework.hateoas.mvc.ControllerLinkBuilder.getBuilder(ControllerLinkBuilder.java:261) ~[spring-hateoas-0.20.0.RELEASE.jar!/:na] 	at org.springframework.hateoas.mvc.ControllerLinkBuilderFactory.linkTo(ControllerLinkBuilderFactory.java:132) ~[spring-hateoas-0.20.0.RELEASE.jar!/:na] 	at org.springframework.hateoas.mvc.ControllerLinkBuilder.linkTo(ControllerLinkBuilder.java:172) ~[spring-hateoas-0.20.0.RELEASE.jar!/:na]
And the reason for this is that now PreDecorationFilter always adds a pair of ports which is not expected by ControllerLinkBuilder. I expect that many more components can fail because of this change and it need to be reverted.
Actually current implementation of PreDecorationFilter looks very weird as it is expected that Servlet Container should properly handle this header (RemoteIpValve in Tomcat, for example) and provide a valid value in ctx.getRequest().getServerPort(). So it is only required to configure Servlet Container.

And it is not secure to use X-Forwared-* headers like this. RemoveIpValve for Tomcat for example only accept these headers only if request came from trusted client, otherwise anybody from outside can set this header to affect system behavior.

The NumberFormatException sounds like a bug in ControllerLinBuilder.  It is valid to have a comma separated list of ports as the value of X-Forwarded-Port.
As for the security concern, I am not sure I understand, can you elaborate?

Yes, I can agree that it can be a bug in ControllerLinkBuilder. It is allowed to have a several values (it still looks very weird to me, but it is legal, you are right).
The security concern is (at least in the way how I understand it looking at RemoteIpValve from Tomcat) is that header can be sent by anybody. It can be not your proxy, but some over one which tries to use your service illegally (for example to overcome cross-origin problem while you does not allow to receive request from another origin). So it is required to check that you receive these headers from trusted server/proxy.

We have to send X-Forwarded-* ports to downstream services. How would RemoteIpValve help with that?

@01sas I suggest you open an issue in the HATEOS project for the ControllerLinkBinder issue https://github.com/spring-projects/spring-hateoas

@spencergibb it will not help you with sending headers. It will only help with detection of correct port, host, proto and so on. So the logic which was originaly in this class is enough from my point of view.
@ryanjbaxter, ok I will open a ticket in HATEOS project. Thanks.

This issue already exist: https://github.com/spring-projects/spring-hateoas/issues/509


Error in Git LFS

[ ] Text Classification

I am trying to run the code and I am getting the following error when
`from transformers import Trainer
trainer = Trainer(model=model, args=training_args,
compute_metrics=compute_metrics,
train_dataset=emotions_encoded["train"],
eval_dataset=emotions_encoded["validation"],
tokenizer=tokenizer)
trainer.train();`
Cloning https://huggingface.co/unknownhunter/distilbert-base-uncased-finetuned-emotion into local empty directory.
WARNING:huggingface_hub.repository:Cloning https://huggingface.co/unknownhunter/distilbert-base-uncased-finetuned-emotion into local empty directory.

hello. I've solved the problem.
Create a new model in https://huggingface.co/new. Name it distilbert-base-uncased-finetuned-clinc . Then just re-run the cell.


[Bug]: Summatrapdf installation is broken for over a month now

Prerequisites

[X] I have written a descriptive issue title.
[X] I have searched all issues/PRs to ensure it has not already been reported or fixed.
[X] I have verified that I am using the latest version of Scoop and corresponding bucket.

Package Name
sumatrapdf
Expected/Current Behaviour
The PR that fixes the URLs is merged ASAP, so the package can be installed
Steps to Reproduce
scoop install sumatrapdf

Possible Solution
Merge the PR
Scoop and Buckets Version
❯ scoop --version
Current Scoop version:
v0.3.1 - Released at 2022-11-15

'extras' bucket:
04c920ce0 (HEAD -> master, origin/master, origin/HEAD) zoom: Update to version <IP_ADDRESS>186

'main' bucket:
64a70570c (HEAD -> master, origin/master, origin/HEAD) uncrustify: Update to version 0.78.1

Scoop Config
❯ scoop config

last_update                       scoop_branch scoop_repo
-----------                       ------------ ----------
2023-11-20T14:57:56.5884415+01:00 master       https://github.com/ScoopInstaller/Scoop

PowerShell Version
❯ $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.19041.3693
PSEdition                      Desktop

Additional Softwares
Doesn't matter, URLs are broken!

#12251


[Feature Request] Suggestion: Tutorial on Model Ensembling

Motivation
Model ensembling is appealing in the RL context with a range of use cases, e.g., critic ensembles and parallel inference of multiple agents with the same actor structure. And I believe the design of torchrl has considered model ensembling using functorch as an important feature (according to the doc and the design of TensorDictModule). However, currently, there is not much clue in the doc/examples/tutorials on what's the best or suggested practice to actually implement it.
Tutorials or examples on either use case would be helpful.
Solution
A comprehensive example or tutorial on how to leverage model ensembling to perform efficient training and inference.
One tricky thing here is how to perform parallel optimization with an ensembled functional model, as functorch did not provide any direct solution (yet). A viable approach I figured was to use torchopt's functional optimizer API and do something like
import torchopt
import functorch
from tensordict.nn import TensorDictModule, make_functional

actors = nn.ModuleList([
  TensorDictModule(MyActorModule() for _ in range(num_agents)
]).to(device)

# this was the functorch way
# things go similarly with tensordict.nn.make_functional
(fmodel, params, buffers) = functorch.combine_state_for_ensemble(actors)
actor_opt = torchopt.adam(lr=cfg.lr)
actor_opt_states = functorch.vmap(actor_opt.init)(params)

# to perform an optimization step
def opt_step(batch, params, actor_opt_states):
  actor_loss = functorch.vmap(actor_loss_fn)(params, batch)
  grads = torch.autograd.grad(actor_loss, params)
  updates, actor_opt_states = functorch.vmap(actor_opt.update)(grads, actor_opt_state)
  params = torchopt.apply_updates(params, updates)
  return actor_loss, params, actor_opt_states

for batch in some_collected_data:
  _, params, actor_opt_states = opt_step(batch, params, actor_opt_states)

But I am very uncertain about the efficiency of the above code (also tried getting gradients using functorch.grad but found it to be slightly slower) and have been wondering what the best practice is, especially if we want to use torchrl.
Additional Context
Some additional examples on critic ensembling, e.g., double Q-functions would also be of great help.
Checklist

[x] I have checked that there is no similar issue in the repo (required)

This is a very good idea, thanks for the suggestion

I would also find this very helpful! convert_to_functional seems like a very good starting point, it's a shame this is only usable in LossModules. Would it make sense to have an TensorDictModuleEnsemble class that could be applied to any nn.Module or TensorDictModule?