When page is 1, TypesenseQueryError is returned

Description
When I query with "page": 1, then Exception: TypesenseQueryError: {'code': 400, 'error': 'Parameter 'page' must be an unsigned integer.'} is returned
It seems like following line is causing problem (Here is the link to the code. https://github.com/typesense/typesense-python/blob/e22e31df314371b41cc57527c4583f3451a2f63d/typesense/api_call.py#L139C1-L139C1 )
# typesense-python/typesense/api_call.py:139-140
if params[key] == True:
   params[key] = 'true'

Steps to reproduce
Using typesense==0.17.0, just query anything with "page": 1
Expected Behavior
First page results should be returned.
Actual Behavior
Exception: TypesenseQueryError: {'code': 400, 'error': 'Parameter 'page' must be an unsigned integer.'}
Metadata
Typesense Version:
0.16.0, 0.17.0
OS:
macOS Ventura 13.4.1

I just ran into this issue while attempting to set the "per_page" to 1 while attempting a multi search, as a work around I ended up converting the value to a string.
for example:
per_page = 1

common_search_params =  {
    "per_page" : str(per_page)
}

client.multi_search.perform(search_requests, common_search_params)

This prevents the normalize_params() function from replacing it with "true" but the resulting POST request is still sent with this parameter set as an integer
POST /multi_search?per_page=1


Bug Report: SecurityRequestError Doc references out of date

Describe the bug
Documentation error in 1.0b3. Numerous functions document SecurityRequestError as
Raises SecurityRequestErrorwhen the **Return Code** of a **Security Result** returned by IRRSMO00 is **NOT** equal to0``
This needs to be updated and all functions capable of raising SecurityRequestError in this way can also raise DownstreamFatalError as well.
To Reproduce
N/A
Expected behavior
Change documentation to
Raises SecurityRequestErrorwhen the **Return Code** of a **Security Result** returned by IRRSMO00 is equal to4``
also include comparable documentation for DownstreamFatalError
Console Output
N/A

Resolved by #62


Unexpected multiple selection in item edit children list

Describe the bug
When adding new items, before save, and the name is duplicated - on select one of the item it will select all of them with this name
To Reproduce
Steps to reproduce the behavior:
As usual

Go to this page
Add few new items with name "New Item"
Click on select one of the "New Item"
See all of them selected

Expected behavior
Must be selected only one item
Screenshots

Hum that should not be possible to put several time the same item as children. I have to check that...


Fuji: Add license/copyright labels to container

Add license/copyright labels to the docker container
Fix #127

Codecov Report

Merging #129 into fuji will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             fuji     #129   +/-   ##
=======================================
  Coverage   28.18%   28.18%
=======================================
  Files           5        5
  Lines         479      479
=======================================
  Hits          135      135
  Misses        330      330
  Partials       14       14

Continue to review full report at Codecov.

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


[test] Add tests for Server silently accepts Notification config with TopicConfiguration even though no notification service is present on server

Add a test case to validate https://github.com/minio/minio/issues/4813

@nitisht  can we close this? We can reactivate if we actually intend to work on it.

agreed @deekoder . Closing this


Content-type header value takes precedence over the Accept header value when looking for the version

The MediaTypeApiVersionReader is looking at the content-type header value before the accept header value. The issue though is that when both are supplied (for example, when posting an image to the API, the content type is generally autopopulated to mutipart/form-data), but the accept header has the version, the version doesn't get picked up as the content-type check exits out of the Read method if its provided and an "ApiVersionUnspecified" error is returned.
Although the content-type is a valid header to add the version value to, the accept header should be the main header to use for versioning (not an expert but from what I've read on versioning a RESTful endpoint using content negotiation). So it should either check the accept header value first and return if its provided OR check both header values and find the version in either.

This is by design, but let's explore why. First, the content type when posting an image or any other file will not be multipart/form-data. That is the MIME that gets used when you POST a file with a HTML form. This should only be the case if you have a web page (e.g. UI). This is not the case for an API.
Let's say that your REST API allows you to provide a thumbnail image for a customer. The API request would look something like:
POST /customers/123/thumbnail HTTP/1.1
host: localhost
content-type: image/png; v=1.0
content-length: 2096

<Base64-encoded image content>

Arguably you don't even need the subsegment /thumbnail because you could infer that through media type negotiation. If a client posts an image for a customer, it must be for the thumbnail. For clarity, let's assume this segment exists. You might also choose that option, if different types of customer images are supported.
The reason that Content-Type is preferred over Accept is because Content-Type is unambiguous.  Content-Type is required in order to make the request. It can also only be specified once. Any time that content is provided in the request, this is the optimal header to use for API versioning by media type. These rules only apply when the client provided content in a request; typically, for POST, PUT, and PATCH.
Accept, on the other hand, refers to the response format. This header can contain multiple, weighted media types. Accept is useful in a scenario where no content is specified in the request; typically, for GET, DELETE, HEAD, OPTIONS, etc. Since you can specify multiple media types, resolving the intended API version is more complex and ambiguous this way.
Imagine the following client request:
GET /customers/123 HTTP/1.1
host: localhost
accept: application/json; q=0.8; v=1.0, application/json; q=0.2; v=2.0

The client is saying they prefer 1.0 weighted by 80%, but if you only have 2.0, they can accept that too. That may seem weird, but if you really want to get into API versioning with media types, then this is a real scenario.
Ideally, it'd be nice if things can be implemented with a single HTTP header, but I haven't figured out a way to do that - yet. Similarly, crafting a request where the input and output API versions are not the same is not supported.
Consider:
PATCH /customers/123 HTTP/1.1
host: localhost
accept: application/json; v=2.0
content-type: application/json; v=1.0
content-length: 20

{"firstName":"bob"}

This is the client saying they are sending you the 1.0 version of the customer in JSON, but they want the 2.0 version of the customer in JSON in the response. While this is technically supported in REST, that is not something supported out-of-the-box by this library. In fact, to make sure that never happens, Content-Type is detected and preferred over Accept.
I hope that helps clear things. I'm happy to discuss other options or ways to improve the implementation for folks that want to version their APIs this way.

Firstly, I just want to say that finding this framework was great and it was also good to see that it supports multiple API versioning techniques with all the chatter in each of the camps (trawling through all of the information online about URL, custom header, media type versioning has been quite time consuming). I was also pleasantly surprised to see that it also had the media type version supported (which I decided to use due to some of the arguments against URL versioning).
Ok, so I appreciate the fact that a UI is auto populating the content type but this is also a real scenario which doesn't have a workaround at all (except me implementing an override for the Read method in the MediaTypeApiVersionReader and handling the accept header instead).
I also don't agree with not considering the accept header at all if the content-type is supplied because there are a few more complex scenarios which may add some complexity to the version selector. There is currently an implementation for getting the value out of the accept header (ReadAcceptHeader method) which doesn't consider the more complex scenarios so would it not be better to allow both content-type and accept headers to be checked with the currently implemented methods and drawing a line in the sand about version discrepancies by throwing an AmbiguousApiVersionException exception?
I appreciate that the RESTful way would be to support all aspects, including the "I want to send v1 but receive v2" and appreciate that the current attribute structure in this framework doesn't really allow for this to be supported easily but ignoring the accept header completely seems more incorrect than not supporting all aspects of REST, especially when most of the text about how to handle versioning through content negotiation is through the accept header

We all have biases and preferences. As you've seen, there is definitely no shortage of them with respect to API versioning, including whether it's even necessary. I have my own opinions just like everyone else, but I try to limit them to help the broader community at large. I, for one, am not a fan of the API version in the URL segment at all. ;) You've obviously spent some amount of time looking at the code. Thanks. That makes the discussion a bit easier.
Let me try a simpler explanation:

Content-Type = required; the server must understand
Accept = optional; the server may understand/support the requested format

By spec, Content-Type is technically optional at the HTTP level, but that seemingly nonsensical for web platforms. The server is allowed to assume a media type by the resource URL, other information that might indicate the media type (say a file extension), or fallback to assume application/octet-stream. To my knowledge, this type of content negotiation is not supported by any flavor of ASP.NET. If it is supported, then I would say your position has more strength.
The primary usage for API versioning seems to be controller per API version, but the library supports other variations, including API version interleaving (e.g. multiple APIs on a single controller) and all API versions on a single controller (e.g. API version-neutral). It's possible to support "I want to send v1, but receive v2", but I'm not sure this library would be helping much in that context. Furthermore, you'd have to write a bunch of code to handle this scenario in your controllers. This partially due to the way ASP.NET handles requests. Only a single controller can handle a request. Media type negotiation in ASP.NET is designed to be a cross-cutting concern; however, when using API versioning with a media type, it's not an independent concern anymore. The media type parameter has affinity to an API version and, hence, some controller. It isn't simple to split parts of the request that way.
Attributes aren't really the problem. It's more systemic. In fact, the libraries don't care about attributes for making decisions. It uses the IApiVersionProvider interface. A very common use case just so happens to be realized with attributes. You can also use conventions or your own custom mechanisms.
Hopefully, I haven't gone to tangential again. I want to help you solve your challenge, but I also want to better understand why you think it should be the default. As you've already mentioned, you can easily get the behavior you want with minimal investment by extending the existing MediaTypeApiVersionReader. It also appears that your challenge is specific to some UI dimension. I never quite understand why anyone would want API versioning for UIs, but I'm sure you have your reasons (you're not the first).
I can't say how many people have started using the media type versioning approach. It's definitely less than the other methods. Since it hasn't had as much usage, there are likely gaps. I'm not yet convinced this is one of them. It sounds like the only issue is getting the UI to postback with the correct media type, which includes the corresponding API version, no? If that can be accomplished, isn't that equally a viable solution? I would think that it should be as simple as:
<form action="/home" method="post" enctype="multipart/form-data; v=1.0">
</form>

Thoughts?

I'm just curious if my suggestion worked for you or whether you came up with an alternate solution.
While I'm at it, let me try one more hashing of the HTTP header meanings as they are used:

Content-Type : I (the client) am sending you (the server) something, including the API version
Accept : You (the server) are sending me (the client) something I requested, including the API version

If I'm sending the server something, I have to specify Content-Type and that is logically the best place to include the API version too. If I'm only making a request without any content, Accept is logically the best place to include the API version. Accept still feels a bit awkward for DELETE since you don't provide input nor expect a response, but I've yet to find a better alternative.
The MediaTypeApiVersionReader is only meant to find one API version. Although the client can specify both the Content-Type and Accept headers, they usually only specify one or the other (but not always). I worry that changing the current behavior could be confusing. Furthermore, what does it mean when both headers are specified, but one of them does not contain the API version parameter? Is that supposed to be unspecified, ambiguous, ignored? If simply elaborating these behaviors further in the wiki will help, I'm happy to do so.

For the time being, I think this discussion has reached a conclusion. I certainly appreciate the conversation and debate as to what the default behavior should be. For now, I'm not convinced there is much value in a change. I strongly believe that if content is provided by a client, then that is the only place where the API version should be derived from with respect to media type.
There are a couple of additional points for you or anyone else that may read this thread:

Changing the IApiVersionSelector to the LowestImplementedApiVersionSelector or CurrentImplementationApiVersionSelector should allow matching the oldest or newest API version, when no API version is provided

This approach could address your UI scenario where an API version isn't provided

A new, custom IApiVersionSelector can be implemented with special matching rules based on the incoming request
The provided MediaTypeApiVersionReader can be extended or a new IApiVersionReader can be implemented which adheres to the specific behaviors that you want (e.g. consider both headers)
Version-neutral actions (ex: DELETE) could be split into separate version-neutral controllers

Since I don't currently have by media type example yet, I may create one that demonstrates this exact scenario


Revert "IncludeFile now returns the included file in the client"

Reverts Netflix/metaflow#607
Netflix/metaflow#607 breaks step-functions create blocking any new workflow creation.

We would need to find a different mechanism to address the original bug that #607 was trying to fix.


Back button Display issue

This is happening in latest 1.1.13 with Chrome and Edge, if you select artist and once they are viewed hit the "Back" in browser the page included two sidebars in HA,  hitting refresh seemed to correct as a work around. this happens with any of the selections in Music Assistant.

Yes, that is unavoidable I'm afraid because the MA frontend is loaded as iframe in HA.
That's why there is a separate back button in the MA header...
I'll have a look if we can intercept the browser back button...

Thanks really just an annoyance, I'm waiting for the latest resync but have a database issue where filesystem artist that are in spotify playlist, are hidden in the artist by default, their albums are displaying under albums, I've been drilling into the album and artist and manually adding to Library. Once sync is done, I will create an issue if it's still happening.

Artists are only added to the library if you actually have albums for that albumartist on disk OR you have the artist as "favorite" on the streaming provider(s).
So artists from songs within playlists are not added as library/favorite artist otherwise you'll end up with 1000s of artists that are just on some playlists. Of course you can just press that heart button/icon to add the artist to the library.

the artist I have missing, I do have the actual albums on the filesystem provider, they also appear on Spotify maybe spotify first before the filesystem refresh has been done.

@darrenblanchard that is strange. An artist marked as "followed" on Spotify or album artist on your disk should really show up in the library artists. Are you testing with the latest version (1.1.14) ? especially the last 2 versions had some big improvements regarding the library matching/linking.

I have Grocy and Zigbee2Mqtt in iframes in a dashboard. The back button works as intended in both cases. I don't know if they do anything special.


[FLINK-16738] [py] Add kinesis_egress_record builder method to Python SDK

This PR adds a kinesis_egress_record method to the Python SDK, so that we hide the business of building a KinesisEgressRecord message from the user.
It is similar to how we added the kafka_egress_record method to the Python SDK.

LGTM.

Thanks, merging ...


doc: fix new repo links

Checklist

[X] the individual contributor license agreement is signed
[X] commit message follows commit guidelines
[ ] tests are included
[X] documentation is changed or added
[ ] message properties have been updated with new phrases
[ ] view conforms with WCAG 2.0 AA

Description of change

Move old doc links to new Repository links.

@ChristianMurphy I'm not sure about coberall and travis links, please could you provide me a review on this part ?
Also some rights should be configured, like on gitter for the new repo link and I don't have rights to grant access on this part it seems.

@bjagg do you know if there is again a need about the RequestParameterPolicyEnforcementFilter ? As CAS client evolved I think that the CVE are fixed now, more the cas-server-security-filter is deprecated... Or this should be applied with the embedded CAS ?
So maybe we can create an issue around that to remove this "useless" code now ?

Not sure what the best path forward is for Travis, we can update the link, but the builds may not work, we're close the API limit, if we haven't already hit it https://jamescooke.info/travis-hitting-githubs-api-limits-for-open-source-projects.html
Long term, if we want to patch 4.X releases, we may need to migrate them to GitHub actions or another CI system.

GitHub actions would be good I think, but not sure how it will evolve as some paid options appear. What is the best ? It's difficult to find a way.

I'd say for the purposes of updating links, I'd keep your change as is.

but not sure how it will evolve as some paid options appear

It's true, we're using a free-for-open-source solution and in doing so we rely on the generosity of the hosting platform.
Travis offered a generous plan for a time, GitHub offers a generous plan now, it's possible another platform could be used in the future.

What is the best ? It's difficult to find a way.

I'm not sure there is a "best" :sweat_smile:
Most CI/CD are a small wrapper around a terminal shell, and are about the same all things considered.


how to test composer

Context

Expected Behavior

Actual Behavior

Possible Fix

Steps to Reproduce

Existing issues

[ ] Stack Overflow issues
[ ] GitHub Issues
[ ] Rocket Chat history

Context

Your Environment

Version used:
Environment name and version (e.g. Chrome 39, node.js 5.4):
Operating System and version (desktop or mobile):
Link to your project:

composer is now deprecated, and as such unsupported.
The old documentation https://hyperledger.github.io/caliper/v0.2/composer-config/
And old tagged benchmark repositories https://github.com/hyperledger/caliper-benchmarks/tree/v0.2.0/benchmarks/samples/composer
Might be of assistance


Add additional stiff or non-stiff ODE solvers

Description
See prior discussion on the Stan Discourse. Opening an issue here to make it more formal. To keep Stan in-step with the development of other PPL platforms that have the advantage of being able to import separate differential equation packages from their native languages. An initial improvement that would be part of the greater goal of bolstering Stan's overall differential equation capability would be the inclusion of additional solvers. There certainly does not need to be as many as in the standard set by DifferentialEquations.jl, but including one or two more non-stiff solvers and one more stiff solver would give folks trying to do inference on ODE systems, which seems to be more and more a part of the work done in various fields, more options.
Edit: In light of the fact that the Adams-Moulton method is now documented, I agree with @wds15 that we do not need more non-stiff solvers (though more options does not hurt if there is time for it!). However, inclusion of an auto-switching algorithm that solves both stiff and non-stiff equations would be a good goal in my opinion to benefit users who have less knowledge about the stiffness of the system, or just want to plug and play with their ODE system (Edit 3: see @yizhang-yiz's discussion in the previously linked Stan Discourse thread about caveats with auto-switching). Needing to add a new function for each new solver also makes things a little clunkier, so as part of the efforts to add additional ODE solvers, having one ODE function in which the solver is chosen as an argument would be nice.
Not able to assign myself this point because of other more pressing commitments, so if someone is able to take the initiative on this, they would be greatly welcome to do so.

I don't see how this issue would be actionable. Conflating various solvers into one place simply because they all bear the name of "differential equations" doesn't help seek resolution. For example SDE is completely different ball game when it comes to model fitting.
Most Stan issues are small and actionable, for the sake of sanity of developers and reviewers.

@yizhang-yiz Got it, yeah, I understand. I'll go ahead and edit the initial discussion to just be about additional ODE equation solvers to make it more tractable.

I can continue pruning the initial post to continue to make it more tractable and actionable (perhaps limiting it to just adding another stiff ODE solver), so do let me know if there is more editing I should do to get it into form that is more reasonable.

Closing for the moment for lack of action. Future milestone can be added if a new solver is requested with actually application cases.


Reproductive Rights

A partial solution to #116.  Next step is to expose the Result type and give it a better name.

:boat:

:+1:


improve error reporting when feature not found in activated_features

Pulls the error message refactor out of #14593 (originally #13207) to improve error reporting when we fail to get the list of activated features enabled for the given package. It now fully lists the activated_features hashmap keys too.
From the original author:

I moved activated_features_int into activated_features and activated_features_unverified as I was concerned of the performance cost of generating the full error when its not a fatal error and may occur many times.

Old vs new error message:
- activated_features for invalid package: features did not find PackageId { name: "bindep", version: "0.0.0", source: "[ROOT]/foo/bindep" } NormalOrDev
+ did not find features for (PackageId { name: "bindep", version: "0.0.0", source: "[ROOT]/foo/bindep" }, NormalOrDev) within activated_features:
+ [
+     (
+         PackageId {
+             name: "bindep",
+             version: "0.0.0",
+             source: "[ROOT]/foo/bindep",
+         },
+         ArtifactDep(
+             CompileTarget {
+                 name: "[ALT_TARGET]",
+             },
+         ),
+     ),
+     (
+         PackageId {
+             name: "foo",
+             version: "0.0.0",
+             source: "[ROOT]/foo",
+         },
+         NormalOrDev,
+     ),
+ ]

r? weihanglo

Thank you!
@bors r+

:pushpin: Commit 1623c414adda0fb2357b8036da1e41d3c2e18017 has been approved by weihanglo
It is now in the queue for this repository.

:hourglass: Testing commit 1623c414adda0fb2357b8036da1e41d3c2e18017 with merge ab361f24a3a3fca4fd717f041496735fa597fca3...

:sunny: Test successful - checks-actions
Approved by: weihanglo
Pushing ab361f24a3a3fca4fd717f041496735fa597fca3 to master...


Adds v0.2.0-rc2 Changelog

Fixes: #324
Signed-off-by: danehans<EMAIL_ADDRESS>

Codecov Report

Merging #475 (e0ef8d0) into main (3e08fbd) will increase coverage by 0.36%.
 Consider uploading reports for the commit e9fa47b to get more accurate results

@@            Coverage Diff             @@
##             main     #475      +/-   ##
==========================================
+ Coverage   62.42%   62.78%   +0.36%
==========================================
  Files          40       40
  Lines        4436     4436
==========================================
+ Hits         2769     2785      +16
+ Misses       1524     1510      -14
+ Partials      143      141       -2

Impacted Files
Coverage Δ

internal/provider/kubernetes/httproute.go
68.96% <0.00%> (+6.13%)
:arrow_up:

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


docs: correct spelling and punctuation

Preliminary checks

[X] I have read the Code of Conduct
[X] I applied all rules from the Contributing guide
[X] I have checked there is not other Issues or Pull Requests covering the same topic to open

Summary

time-keeping -> timekeeping
per-se -> per se
in-reality -> in reality
Fixed tense
Add comma to increase readability

Oooh thanks @vladdoster for the fixes! 🤗
Let's merge!


Test case: <IP_ADDRESS> SDK generation and SDK download does not support some languages.

Description-:
Test case:
<IP_ADDRESS>- SDK generation and SDK download should be supported for language JAVA, ANDROID, SCALA,CSHARP,CPP,dart,flash,go,groovy,javascript,Jmeter,nodejs,perl,php,python,ruby,swift,clojure,aspnet5,asyncscala,spring,csharpdotnet12,haskell.
Result:
CPP, go, aspnet5, asyncscala, spring, haskell are missing.

You need to enable them. only default enabled stuff is shown.


Chronicle first use case with platform.sh

I'm going to chronicle my steps using django-simple-deploy with very little experience.
Thought to use Fly.io for the test, as I've never used it before. Unfortunately, didn't have my credit card handy to verify my identity, so I'll try this one later. However, I do have a platform.sh account, so that will be my test.
First, I'll open up my django application and install the library... Using my django-slideshow demo app.
What follows is my experience and any questions/issues that come up.

First step, adding django-simple-deploy to my project... easy enough:

Make sure my project is running locally with no issue:

huzzah...

The docs mention that I need the platformshconfig library, so I installed that as well:

Going to try the configuration-only deployment.
First, need to create a platform app... Made sure I could log in with the platform CLI. Ran the platform command and was prompted to log in (this is the intended step for logging in with the CLI)
Now, should be ready to create a platform app using:
platform create

Okay, looks like that worked.

So now I can run the command:
python manage.py simple_deploy --platform platform_sh

Let's see what happened.

Whoops.

Looks like I didn't activate my virtual environment.... 🤦♂

Okay, after activating environment and running command, got this:

Hmm...

 These are related to adding django-simple-deploy and platformshconfig to my list of dependencies (pyproject.toml) and adding simple_deploy to my INSTALLED_APPS...

Okay, so went ahead and committed to git with those things added and ran the command again....

Looking good...

Looks like since I am using PDM as my dependency manager, simple_deploy is finding my pyproject.toml file and determining that I am using Poetry instead of PDM. Using pip show doesn't work in this case ... (the pdm command would actually be pdm list)

Okay, after activating environment and running command, got this:

Hmm...

Thanks! See #136.

Looks like since I am using PDM as my dependency manager, simple_deploy is finding my pyproject.toml file and determining that I am using Poetry instead of PDM. Using pip show doesn't work in this case ... (the pdm command would actually be pdm list)

Thanks again. See #137.


Add benchmark file trmv.c and modify benchmark/Makefile to test s/d/c/ztrmv

[Description]: Untill now, it losts trmv benchmark file, so add trmv.c in benchmark folder, in order to test strmv, dtrmv, ctrmv, ztrmv.
time use "clock_gettime", to accurate to nanosecond.

Build execution time has reached the maximum allowed time for your plan (60 minutes).

Build execution time has reached the maximum allowed time for your plan (60 minutes).
Is this the build failed errors?

Yes, happens sometimes with appveyor (and I cannot restart individual jobs there as on the other CI services). Does not stop me from merging your contribution


python3Packages.embrace: init at 4.0.0

Motivation for this change
This introduces a package for the embrace python library.
Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
21.11 Release Notes (or backporting 21.05 Relase notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 131425 at 4ea64426 run on aarch64-linux 1

2 packages built successfully:

python38Packages.embrace
python39Packages.embrace


Selectable main query text

Hey - Not sure if anyone else would be into this use case but I was thinking it would be cool to have the option to select/highlight text in the main query editor, and on clicking the go button only execute the highlighted query. Similarly to SSMS behavior. So that way you could test multiple queries in a single window and quickly see the different results. I think I have a good solution. Would you be interested in a PR for that functionality?
Thanks
Joe

Sounds relevant. Possible duplicate of #6

Thanks for your contribution


repository for tetragon helm chart

Hi
Currently rather painful to be forced to download the github repo and run a local helm install.
I assume that you will start working on this when everything get's a bit more stable but always good to have an issue open.
In short please provide tetragon in a public repository, just like https://helm.cilium.io/.

Hi @NissesSenap, yes putting the helm chart into a public repo is in the works. The chart in this repository is just a temporary stopgap.

@michi-covalent can we close this after #66 or is there more work to do?

yeah let's close it


Multi-gpu leads to RuntimeError: CUDA failed with error invalid argument

I'm trying to run a FastAPI web server using faster-whisper on 4 different GPUs.
Here is my TranscribeService handler that loads 4 times a model on a different GPU using an index to know which one to load the model:
class TranscribeService:
    """Transcribe Service for audio files."""

    def __init__(
        self,
        model_path: str,
        compute_type: str,
        device: str,
        device_index: Union[int, List[int]],
    ) -> None:
        """Initialize the Transcribe Service."""
        self.device = device
        self.compute_type = compute_type
        self.model_path = model_path
        self.models = {}

        for idx in device_index:
            model = WhisperModel(
                self.model_path,
                device=self.device,
                device_index=idx,
                compute_type=self.compute_type,
            )
            self.models[idx] = FasterWhisperModel(model=model, lang="multi")
        logger.debug(f"Loaded {len(self.models)} models for transcription.")

        [...]

On my 4xGPU serve,r each GPU should have a model loaded at the end of the init phase.
For inference, I have a GPUService which handles the GPU index attribution for a transcription job:
class GPUService:
    """GPU service class to handle gpu availability for models."""
    def __init__(self, device: str, device_index: List[int]) -> None:
        """
        Initialize the GPU service.

        Args:
            device (str): Device to use for inference. Can be "cpu" or "cuda".
            device_index (List[int]): Index of the device to use for inference.
        """
        self.device: str = device
        self.device_index: List[int] = device_index

        # Initialize the models dictionary that will hold the models for each GPU.
        self.models: Dict[int, Any] = {}

        self.queue_lock = asyncio.Lock()
        self.queue = asyncio.Queue(maxsize=len(self.device_index))
        for idx in self.device_index:
            self.queue.put_nowait(idx)

    async def get_device(self) -> int:
        """
        Get the next available device.

        Returns:
            int: Index of the next available device.
        """
        async with self.queue_lock:
            device_index = await self.queue.get()

        return device_index

    def release_device(self, device_index: int) -> None:
        """
        Return a device to the available devices list.

        Args:
            device_index (int): Index of the device to add to the available devices list.
        """
        self.queue.put_nowait(device_index)

And here is the inference code:
    def __call__(
        self,
        audio: Union[str, torch.Tensor, Tuple[str, str]],
        source_lang: str,
        model_index: int,
        suppress_blank: bool = False,
        word_timestamps: bool = True,
    ) -> List[dict]:
        """Run inference with the selected transcribe model."""
        segments, _ = self.models[model_index].model.transcribe(
            audio,
            language=source_lang,
            suppress_blank=False,
            word_timestamps=True,
        )

        outputs = [segment._asdict() for segment in segments]

        return outputs

The behavior of the .generate() method is weird because if I send 8 transcription jobs, they are handled correctly, and I get a 200 response with the transcribed outputs. But the following 4 requests will fail, 2-3 requests will be successful, and others will fail, etc. After a good inference process, I get only 50% of the successful requests.
Here is the full traceback:
Traceback (most recent call last):
  File "/app/wordcab_transcribe/services/asr_service.py", line 254, in process_transcription
    segments = self.services["transcription"](
  File "/app/wordcab_transcribe/services/transcribe_service.py", line 385, in __call__
    outputs = [segment._asdict() for segment in segments]
  File "/app/wordcab_transcribe/services/transcribe_service.py", line 385, in <listcomp>
    outputs = [segment._asdict() for segment in segments]
  File "/opt/pysetup/.venv/lib/python3.8/site-packages/faster_whisper/transcribe.py", line 397, in generate_segments
    ) = self.generate_with_fallback(encoder_output, prompt, tokenizer, options)
  File "/opt/pysetup/.venv/lib/python3.8/site-packages/faster_whisper/transcribe.py", line 597, in generate_with_fallback
    result = self.model.generate(
RuntimeError: CUDA failed with error invalid argument

I'm running the server on NVIDIA T4. Are there any known issues with T4? I plan to try V100 later.
This behavior is btw really strange.
P.S.: I'm using the indexing solution and not num_workers because I want to be able to load a specific language model on the fly on one GPU and be able to keep 3x GPUs with the base model.

Can you share a standalone code snippet to reproduce the error?

This is the standalone code snippet with the minimal code and maximal abstraction possible. The main difference is we aren't running a web server (FastAPI) here, but the process is the same.
The problem is I don't get the same error here 😢
So I can't reproduce the weird behavior.
import asyncio
import functools
from typing import Any, Dict, List

import torch
from faster_whisper import WhisperModel

class GPUService:
    """GPU service class to handle gpu availability for models."""
    def __init__(self, device: str, device_index: List[int]) -> None:
        """
        Initialize the GPU service.

        Args:
            device (str): Device to use for inference. Can be "cpu" or "cuda".
            device_index (List[int]): Index of the device to use for inference.
        """
        self.device: str = device
        self.device_index: List[int] = device_index

        # Initialize the models dictionary that will hold the models for each GPU.
        self.models: Dict[int, Any] = {}

        self.queue_lock = asyncio.Lock()
        self.queue = asyncio.Queue(maxsize=len(self.device_index))
        for idx in self.device_index:
            self.queue.put_nowait(idx)

    async def get_device(self) -> int:
        """
        Get the next available device.

        Returns:
            int: Index of the next available device.
        """
        while True:
            try:
                device_index = self.queue.get_nowait()
                return device_index
            except asyncio.QueueEmpty:
                await asyncio.sleep(1.0)

    def release_device(self, device_index: int) -> None:
        """
        Return a device to the available devices list.

        Args:
            device_index (int): Index of the device to add to the available devices list.
        """
        self.queue.put_nowait(device_index)

class TranscribeService:
    """Transcribe Service for audio files."""
    def __init__(
        self, model_path: str, compute_type: str, device: str, device_index: List[int],
    ) -> None:
        """Initialize the Transcribe Service."""
        self.device = device
        self.compute_type = compute_type
        self.model_path = model_path
        self.models = {}

        for idx in device_index:
            model = WhisperModel(
                self.model_path,
                device=self.device,
                device_index=idx,
                compute_type=self.compute_type,
            )
            self.models[idx] = model

    def __call__(
        self, audio: str, source_lang: str, model_index: int,
    ) -> List[dict]:
        """Run inference with the selected transcribe model."""
        segments, _ = self.models[model_index].transcribe(
            audio,
            language=source_lang,
            suppress_blank=False,
            word_timestamps=True,
        )

        outputs = [segment._asdict() for segment in segments]

        return outputs

if __name__ == "__main__":
    device = "cuda" if torch.cuda.is_available() else "cpu"
    _n_gpus = torch.cuda.device_count() if device == "cuda" else 0
    device_index = list(range(_n_gpus))
    print(f"Using {device} with {len(device_index)} GPUs.")

    gpu_service = GPUService(device=device, device_index=device_index)
    print("GPU service initialized.")
    transcribe_service = TranscribeService(
        model_path="large-v2",
        compute_type="float16",
        device=device,
        device_index=device_index,
    )

    async def inference(audio: str, source_lang: str) -> List[dict]:
        """Transcribe audio file."""
        device_index = await gpu_service.get_device()

        loop = asyncio.get_event_loop()
        outputs = await loop.run_in_executor(
            None, functools.partial(
                transcribe_service, audio, source_lang, device_index
            )
        )
        gpu_service.release_device(device_index)

        return outputs

    async def main() -> None:
        """Launch multiple inference tasks in parallel."""
        tasks = []
        print("Starting inference tasks.")
        for _ in range(16):
            tasks.append(inference("data/sample.mp3", "fr"))

        # Now you can perform any post-processing or analysis on the results if needed
        for task in asyncio.as_completed(tasks):
            try:
                await task
                print("Task done.")
            except Exception as e:
                print(f"An error occurred: {e}")

    asyncio.run(main())

What version of ctranslate2 was installed when the error occurred? Note that the same error was reported in #75, but it was fixed some time ago.

I'm running these versions: ctranslate2==3.16.0 and faster-whisper==0.6.0

@chainyo
I had the same error even downgrading the ctranslate2 to 3.10.2 .
After dedugging, I found:
Don't create 4 models for your 4 devices.
Just  create one model, and set the device list and num_workers to it:
 WhisperModel(...      device_index=[0,1,2,3],       num_workers=4 ...)

Don't create 4 models for your 4 devices. Just create one model, and set the device list and num_workers to it: WhisperModel(... device_index=[0,1,2,3], num_workers=4 ...)

Hi @neoyxm thanks for the hint. This is what I'm doing right now. But initially, I wanted to be able to load specific models for specific languages on one gpu to avoid unloading the model on all gpus.

Don't create 4 models for your 4 devices. Just create one model, and set the device list and num_workers to it: WhisperModel(... device_index=[0,1,2,3], num_workers=4 ...)

Hi @neoyxm thanks for the hint. This is what I'm doing right now. But initially, I wanted to be able to load specific models for specific languages on one gpu to avoid unloading the model on all gpus.

@chainyo
I didn't meet such issue on centos 7.6 with  driver 460  and cuda 11.0 .
After upgrading the OS to Ubuntu 18.04(driver 515 & cuda 11.7),  the issue came up.
I guess there is a certain pip package has broken it.

Can you check if you also reproduce the error with ctranslate2==3.16.1?
It contains a fix which prevents some Whisper inputs to be unexpectedly copied. This could explain this error if the input is on a specific CUDA device, but the copy occurs when the device has not been properly assigned. Can you check that?

I assume this is no longer an issue. Feel free to reopen if you still get this error with recent versions of CTranslate2.

Hi @guillaumekln, sorry for the late answer. I haven't tested it again for now. I let ctranslate2 use all the GPUs with the multi-GPU feature, but I'm not assigning one GPU anymore and exchanging when specific languages are required. I could test it again in the near future and ask for re-opening this issue if needed.
Thank you for your time.


Fix docker container IP

Docker container IP was replaced by frontend IP by mistake.

bender build

If we run our container on default IP <IP_ADDRESS>, then ADCM IP will be changed to the container internal IP.
Unexpected side-effect of this change was replacing IP <IP_ADDRESS> in container configuration to internal container IP.


[BugFix] Fix datediff compute expression stats encounter DateTimeException

What type of PR is this：

[x] bug
[ ] feature
[ ] enhancement
[ ] refactor
[ ] others

Which issues of this PR fixes ：

Fixes # https://github.com/StarRocks/StarRocksBenchmark/issues/163
Problem Summary(Required) ：

Utils.getDatetimeFromLong can not deal with -inf/inf, wiil throw DateTimeException

run starrocks_fe_unittest

run starrocks_fe_unittest

run starrocks_fe_unittest

[FE PR Coverage check]
:heart_eyes: pass : 0 / 0 (0%)


Consider adding a format_ident!() macro

It's often handy to generate an identifier by combining other identifiers, numbers, and strings. I think it would be useful to have a format!-like helper macro for doing that sort of identifier creation.
We'd probably want the logic to remove any r# raw specifier from identifiers used in the format, and be slightly more limited in what types are allowed to be used as format arguments, to avoid accidentally formatting -1 into identifiers or similar.
I've thrown together a quick sketch of what that might look like on the playground, and I don't think it would be very tricky to adapt this into an actual PR if we decide we want it. Usage is like format!() except with limited types, format options, and a special keyword argument, span, to set the span used by the final identifier.
Example:
let id = Ident::new("r#struct", Span::call_site());
let my_id = format_ident!("MyId{}", id);

assert_eq!(&my_id.to_string()[..], "MyIdstruct");

playground
gist

It occurs to me after poking at quote! a bit for https://github.com/dtolnay/quote/pull/109 that this may make more sense as a quote feature than a syn one. Feel free to move it over if that's preferable.


controlplane: add alias, krew plugins and kubetail

The sig-windows-dev-tools distro is very helpful for developers, let's add additional tools to make life even easier.

This patch adds:
            - kubectl krew
            - krew plugin iexec
            - krew plugin ctx
            - krew plugin view-secret
            - kubetail
            - alias k for kubectl

GitHub-Issue: https://github.com/kubernetes-sigs/sig-windows-dev-tools/issues/166
Signed-off-by: Douglas Schilling Landgraf<EMAIL_ADDRESS>

Can't you copy over the kubeconfig from the controlplane and interact with the cluster from your local system? At least that is how I have been working.
scp -i .vagrant/machines/controlplane/virtualbox/private_key vagrant@$ControlPlaneIP:.kube/config /tmp/config

As this is a test env, debugging directly in the node helps.

Not sure if we want to make all these client specific in the controlplane.

I agree but we already have kubectl there right? Enabling krew won't hurt much (IMHO).

As this is a test env, debugging directly in the node helps.

For some parts yes, but anything do with kubectl should be achievable from your local system.

I agree but we already have kubectl there right? Enabling krew won't hurt much (IMHO).

I would take the alternative approach and say we should be removing kubectl 😃
However if @knabben @jayunit100 @marosset @jsturtevant think this is fine, I am okay with it.

As this is a test env, debugging directly in the node helps.

For some parts yes, but anything do with kubectl should be achievable from your local system.

I agree but we already have kubectl there right? Enabling krew won't hurt much (IMHO).

I would take the alternative approach and say we should be removing kubectl smiley

Probably that's the right thing to do. Going to close this one for now. If people think this is useful they can re-open anytime.


Create a repository that uses environment variables

Hi there! We're currently enjoying this gem, and I was looking to contribute. I wanted to see if what I was thinking makes sense.
In our YAML files, most of our lines look like this: stripe: <%= ENV['STRIPE_ENABLED'] == "true" %>. I was wondering if there would be any interest/objection in having an EnvRepository that uses environment variables as the source of feature flagging. If so, I'll create a PR with that functionality.
Thanks for your contributions!

I'm not the repository owner by any means, but I've used this gem for awhile now and I think that makes sense!

Environment variables are usually loaded only during application start. If I’m not mistaken, this strategy would force you to restart your system to change the toggle state, which takes away a huge benefit of using feature toggles. I would just put the state in Redis or a DB, if I were you.

Hey @javidjamae! To Javid's point, that's in line with how we use this gem, but I think that makes a few assumptions about the use-case which may not apply to every application, it assumes...

The application is stateful; if the application does not use a data store of any kind yaml or environment variable configuration may be beneficial
The features are used in a way where they can be changed dynamically, eg, if I have a feature toggle that states the application should use sidekiq vs resque the application will need to be restarted otherwise things will get out of whack
These are being used in a steady-state application. If this is being used in a non-steady state application, such as a batch processing application; the value of dynamically changing the values is gone completely
Operational tooling doesn't already exist for controlling the app with environment variables. If app configuration is handled exclusively with environment variables, new tools will need to be developed to support toggling and maintaining DB-backed feature toggles

An env based repository is inline with the yaml based one, so if it makes sense with your use-case I don't see the harm in adding it.

No longer working on this project, so this is not needed.


Full auto engine

rework to use fishyqr instead of ocr
added blob detection to find fishyqr addon automatically
install required addon automatically
optimized controls for better user experience

only change in semifisher : https://github.com/fishyboteso/fishyboteso/commit/c05355fb7737d255c5b3ff4e43687ac0d44b40e0

You are changing the requirements.txt anyway

Added modules for qr code reading, and a library to get mouse events,

could you maybe use d3dshot to get the screenshot instead? It's much faster.

Yeah true, but image grabbing is abstracted in WindowServer which isn't related to full auto... We can create a new PR to implement that optimization


Fix wrong file path (iOS)

Fix issue where absolute path is not being used on iOS

Good catch. Thank you!


Update nushell.rs - Add explicit spread

Running mise with nushell in the latest release of nushell (currently 0.89.0) results in the following warning:
Error:   × Automatically spreading lists is deprecated
    ╭─[/hREDACTED:35:1]
 35 │   } else {
 36 │     ^"rtx" $command $rest
    ·                     ──┬──
    ·                       ╰── Spreading lists automatically when calling external commands is deprecated and will be removed in 0.91.
 37 │   }
    ╰────
  help: Use the spread operator (put a '...' before the argument)

This change fixes the warning.

It looks like some tests are failing, but it isn't clear to me why just by reading the output. Some input on how to fix the issues would be helpful.

you need to update the snapshots with mise run snapshots

Got it, thanks!

@jdx Sorry, quick question. I ran mise run snapshots and it completed without errors, but it also didn't result in any changes to commit. Is this expected? Sorry, I don't know much about snapshots so I'm not sure what the expected result is.

I'm surprised it didn't error. You may need to install cargo install cargo-insta. If that doesn't work: cargo insta test --accept

I just mentioned in the Discord I think we should make it so you can mise install everything needed to develop mise but that's currently not done.

It did error at first, so I installed cargo-insta and tried again.

if nothing else, just manually edit the snapshots:

src/shell/snapshots/mise__shell__nushell__tests__hook_init_nix.snap
src/shell/snapshots/mise__shell__nushell__tests__hook_init.snap

Thanks for fixing that! And thanks for the great work on such a great tool. I introduced this at work recently and it got great reviews from the devs that tried it.


useParams() returns function against type definition

First of all this is a great library, thank you very much.
I have found an issue with the useParams function, in that it returns another function instead of the params value (despite the Typescript definition).
Here is the excerpt of the code I'm trying to use.
// app/router.ts
declare module "solid-navigation" {
  export interface Routers {
    Default: {
      Overview: RouteDefinition;
      Details: RouteDefinition<{
        id: string;
      }>;
    };
  }
}

export const { Route, StackRouter, useParams, useRouter } = createStackRouter<"Default">();

// app/app.tsx
export const App = () => {
   return (
    <>
      <StackRouter initialRouteName="Overview">
        <Route name="Overview" component={OrdersOverviewPage} />
        <Route name="Details" component={OrderDetailsPage} initialParams={{ id: "12345" }} />
      </StackRouter>
    </>
  );
}

// app/details.tsx
import { useParams } from "./router.ts"

export const DetailsPage = () => {
  // here is the problem
  const params = useParams() // ts type of params is `{ id: string } | undefined`
  console.log(params) // but this prints `function () { [native code] }`
  //@ts-ignore
  console.log(params()) // returns  `{ "id": "12345" }` correctly

  return <stacklayout></stacklayout>
}

After having a quick glance at the code I suspect the additional indirection in the ParamsContext of being the issue.

Hey Tim, I think the typings are wrong. SInce params is a function actually. I will see if I can fix this some how.

For fixing the typings it should be enough to add an additional () => to the as type cast at the end of stack-router.tsx.
 useParams: useParams as <Route extends keyof Routers[Key]>() => () => RouteParams<
      Key,
      Route
    >,

But what is the reason for it being a function or why do they need to be reactive? For comparison in solid-router useParams just returns the value.

@timbasel I just fixed the types. Because useParams return value is a signal, it stays reactive only if it's a function much like a signal. I am not a expert at solidjs, if you think we could make it similar to solid-router, that would be great.


fix: Showing User as Logged in even is Logged Out

Issue: #583
Description:
When the user is not logged in the website is showing similar screen with profile, similar to when the user is loggedin
Anthing you would like to inform the reviewer about:
Dev Tested:

[x] Yes

Images/video of the change:

Follow-up Issues (if any)

add before and after image in description


Implementation of erased_serde::Serialize for custom types

How to implement erased_serde::Serialize manually for custom type?
The types Ok and Error are private and this prevents to implement erased_serde::Serialize for any type or trait outside the library. But if we can't implement serde::Serialize we can't have erased_serde::Serialize for this type.
E.g. for some trait TheTrait we need type-erased serialize because if we implement serde::Serialize we'll have The trait TheTrait cannot be made into an object, but we can't implement erased_serde::Serialize manually because Ok and Error of Result are private.
Please provide any solution or make Ok and Error types public.

Correct, you are not allowed to implement erased_serde::Serialize. There is an impl<T: ?Sized> erased_serde::Serialize for T where T: serde::Serialize so you need to provide a serde::Serialize impl and receive an automatic erased_serde::Serialize impl. The serialize_trait_object! macro implements serde::Serialize for any trait object.


Polygon 2D UV editor snap to grid not working correctly

Tested versions
v4.3.stable.mono
System information
Godot v4.3.stable.mono - Windows 10.0.22631 - Vulkan (Mobile)
Issue description
The snap to grid option in the Polygon 2D UV editor doesn't make the points align to the grid and when Panning the image with middle click, the snap point changes.
Steps to reproduce
-Add a Polygon2D
-Add a texture to the Polygon2D (can be anything)
-Open the UV editor from the toolbar
-Enable the Grid and Snap options in the top right corner
-Go to the Points tab
-Place points, they won't be aligned to the grid, and panning the camera will move the snapping point
Minimal reproduction project (MRP)
N/A

Duplicate of #94385 (fixed by #95259, should get cherry-picked into 4.3.1).


Fails at edge cases

This program can't handle http://www.pixiv.net/member_illust.php?mode=medium&illust_id=8070375
and keep retrying.

Hmm, can you provide more information, what did you do?

I run python pixiv.py 73286 to download しぶぞー's illustrations. and when it runs into illust_id=8070375, the program keeps complaining "404 => 8070375 download error, retry"

I guess I fixed it, try the latest version. :)

Yes, I think the problem is resolved. But it displays a strange warning, I guess it is harmless?
pixiv.py:147: SyntaxWarning: name '_finished_download' is assigned to before global declaration

That's a small bug, I'll fix it.
Thanks for your report
Get Outlook for iOS
On Tue, Nov 15, 2016 at 1:02 PM +0800, "luokar"<EMAIL_ADDRESS>wrote:
Yes, I think the problem is resolved. But it displays a strange warning, I guess it is harmless?
pixiv.py:147: SyntaxWarning: name '_finished_download' is assigned to before global declaration
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.


4 ploidy

Closes #4
Could probably be cleaned up a bit, but all tests are passing.

Codecov Report

Merging #6 into master will increase coverage by 3.05%.
The diff coverage is 87.43%.

@@            Coverage Diff             @@
##           master       #6      +/-   ##
==========================================
+ Coverage   85.22%   88.28%   +3.05%
==========================================
  Files          16       19       +3
  Lines         819      879      +60
==========================================
+ Hits          698      776      +78
+ Misses        121      103      -18

Flag
Coverage Δ

unittests
88.28% <87.43%> (+3.05%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

pandas_genomics/arrays/genotype_array.py
86.66% <80.55%> (+2.84%)
:arrow_up:

pandas_genomics/scalars.py
78.61% <83.33%> (+5.23%)
:arrow_up:

tests/scalars/test_genotype.py
97.56% <97.56%> (ø)

tests/genotype_array/test_GenotypeDtype.py
100.00% <100.00%> (ø)

tests/scalars/conftest.py
100.00% <100.00%> (ø)

tests/scalars/test_variant.py
100.00% <100.00%> (ø)

... and 1 more

Continue to review full report at Codecov.

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


Direct messages

Is it possible to send direct message as well with slack-notifier?

Yep! Just set the channel name w/ @ before the username. For example to notify me:
notifier.ping "ohaiii", channel: "@stevenosloan"

wow. Awesome. Thanks!

Ok, figured it out.
Each user has a unique member id.
Sending the message to @member-id works.
Sending it to @username does not work anymore.
See image.

I can agree on the statement from @ranle, apparently with users which exist since beginning of 2017 or earlier, it works with the display name. With newer ones it doesn't work anymore.

Added a quick summary to the channel docs https://github.com/stevenosloan/slack-notifier/commit/4bf6582663dc9e5070afe3fdc42d67c14a513354, please PR if that's unclear or missing anything 😅

Thanks! @stevenosloan

@stevenosloan
Incredible, it would be even better if it were possible to read slack messages.
Thanks for sharing!

Hi folks, thanks for documenting this update.  Very helpful!
One clarification, when I created my Incoming Webhook I had to specify the channel it posts to.  So when I try the above, no matter what uid I reference it posts to #general.  @ranle did you do something special to create a webhook that can DM any user?


Tweetest Prep work for elasticsearch tests

👾 Description of the issue
We run external third-party application tests at this project.  They are contained within the external directory.  We would like to improve how we run these tests.  The first step to improving how we run them is to add some documentation and to pull out the individual test properties that we use so that they are stored in the same directory as the test.
This issue is to add a README.md and a test.properties file to the /external/elasticsearch test directory.  As part of this prep work, since we already generate the Dockerfile, please also remove the static https://github.com/AdoptOpenJDK/openjdk-tests/blob/master/external/elasticsearch/dockerfile/Dockerfile.
The contents of the README file can be simply some instructions for how to run the test locally.  Use with the instructions from https://github.com/AdoptOpenJDK/openjdk-tests/blob/master/external/README.md#running-external-tests-locally and modify Steps 7 and 9 to reference elasticsearch and elasticsearch_test_* specifically.
The contents of the test.properties file will be a key=value format, copying the information from https://github.com/AdoptOpenJDK/openjdk-tests/blob/master/external/common_functions.sh#L209-L220 to populate it.
Adding these files will not change the current way we run these tests.  A separate change will be made to reference the test.properties file, at which point the contents must match those in the common_functions.sh script.
Please take the time to try and run the test locally (using the instructions you are adding in the README file).  Some of the external tests are failing.  When you run it locally, you may find that to be the case.  The reviewer can help to advise you if there are any further steps you can take to try and debug the pre-existing failure, if it exists.
📋 Step by Step
To solve this issue and contribute a fix you should check the following step-by-step list. A more detailed documentation of the workflow can be found here.  Note: that you do not need to add yourself to a Contributors.md file as outlined in the detailed instructions.

[ ] Claim this issue: Comment below.
[ ]  Fork the repository in github by simply clicking the 'fork' button.
[ ]  Check out the forked repository
[ ]  Create a feature branch for the issue. We do not have any naming definition for branches.
[ ]  Commit your changes.
[ ]  Start a Pull Request.
[ ]  Done 👍 Ask in comments for a review :)
[ ]  If the reviewer find some missing pieces or a problem they will start a discussion with you and describe the next steps how the problem can be solved.
[ ]  You did it 🎉 We will merge the fix in the master branch.
[ ]  Thanks, thanks, thanks for being part of this project as an open source contributor ❤

🤔❓ Questions
If you have any questions just ask us directly in this issue by adding a comment. You can join our community chat at Slack. Next to this you can find a general manual about open source contributions here.

Hi, I would like to work on this issue, please assign this one to me. Thanks!

Hi, I would like to work on this issue, please assign this one to me. Thanks!

Closed by #2460


MIDI 2.0

Is MIDI 2.0 in the pipeline ?
I would love to see it in libDaisy
As MIDI 2.0 is the future and I think of devkits as a way to prototype devices for the future it make sense to experiment with 2.0
I understand that these are early days for 2.0 and there are not many devices but we need to move that chicken and egg issue
Thanks for considering

@2fd5 MIDI 2.0 is definitely in the pipeline, but we do not currently have a timeline.
We are very excited to work on adding it to libDaisy. However, we are still working through a number of the core features of the library that have a higher priority.
I will leave this issue open as a place to discuss implementation if someone else would like to start working on it, and will update here as well when our team begins work on it.
If you know of any particular gear that leverages MIDI 2.0 well, I'd be interested to know what people are interested in, and using already!

I'm using the daisy platform for my masters project and have considered MIDI 2.0 as a potential avenue to explore. Does anybody know of any inexpensive off the shelf devices that supports MIDI 2.0 protocol? If it does, I would definitely be interested in helping add MIDI 2.0 support to libDaisy.


Support for 2.0 (and newer versions in general)

Hi,
I'm starting to develop a new application "from scratch" on 2.0 and while searching for useful applications and libraries I've found djohno and, remembering what happened to me last time I had to set up this kind on functionality in another application, I decided to install it.
I'm trying to adapt it to 2.0 and it's been quite straightforward. After a few fixes, there's only one test that fails, but I can't exactly understand the rationale for the test and decide how/if I should 'port' it:
    def test_djohno_server_error_handler(self):
        """
        Tests to ensure our handler500 works correctly.
        """
        url = reverse('server_error_handler')
        response = self.client.get(url)
        self.assertEqual(response.status_code, 500)
        self.assertTrue('STATIC_URL' in response.context)

I'm having trouble with the check for STATIC_URL.
First of all, STATIC_URL is undefined in tests/settings.py. I can't remember if in the past it was automatically added, but right now it's None if you don't define it. This makes me wonder why there's a test for that, as it would test the tests' settings.py
Defining it however doesn't help much: Unless I've made a mistake in changing the Context to a simple dict (I was getting an error because of that in the test, but I quite remember that now a context is a simple dictionary) the response.context I get is a quite "strange" object: (a list of lists and dicts) that at a certain point contains a dict with STATIC_URL as a key... It looks like something that might change with some unrelated change in Django's template code.
If you can shed some light on this, I can finish committing the changes to my fork and send you a PR.

Thanks for looking at this @RobertoMaurizzi - I'll close this issue, and take a look at the pull request.


Job workflow: use case 1

Description
We need to configure a job with the purpose to archive a set of datasets and a selection of their files. When the job is created, it queue a request on a defined queue configured on a rabbitmq server with the selected list of datasets and associated files. It also start a consumer on a second queue listening for updates that needs that are used to update the job status and are recorded in the job history. The consumer is dismissed when it received the confirmation from the remote service that job has been completed successfully or not (aka it has failed). No matter which is the final outcome, the job requires to send an email to a list of emails notifying the outcome of the job. If the job is successful, the datasets should be updated to include a new datablock that specify where the files have been archived and their relevant information.
The archive request and the job creation can be initiated by any dataset owner or an admin. The updates can be accepted only if the dedicate archiver user credentials are used. The email does not require any authentication, while the dataset update has to be performed under the archive_manager account
Workflow draft

User is logged in as user_1. She selects the following two datasets:

20.500.12269/e7cc85c0-3fb3-4add-8e3b-6524192d9e71
20.500.12269/22c45309-878b-410a-ba01-29b754c7a406

User clicks the archive icon on the cart (the job creation can be managed directly with BE)
The archive job is defined by the following job template in configuration:

{
 "type": "archive",
 "create": {
  "authorization": [“#is_admin”,”#owner”],
  "method": {
   "type" : "rabbitmq",
   "server" : "myrabbitmq.myinstitution.ext",
   "queue" : "archive_jobs"
  }
 },
 "update": {
  "authorization": "archiver_service",
  "status" : {
   "allowed" : ["IN_PROGRESS", "SUCCESSFUL", "FAILED"],
   "transitions" : {
    "CREATED" : ["IN_PROGRESS"],
    "IN_PROGRESS" : ["SUCCESSFUL","FAILED"]
   }
  },
  "method": {
   "type" : "rabbitmq",
   "server" : "myrabbitmq.myinstitution.ext",
   "queue" : "archive_updates"
  },
  "template" : {
   "status" : "<STATUS>",
   "message" : "<MESSAGE>",
   "job" : "<JOB_ID>",
   "token" : "<JWT_TOKEN>"
  }
 },
 "post": [
  {
   "method": {
    "type" : "url”,
    "url" : "myemailserver.myinstitution.ext",
    "action" : "POST"
    “arguments” : {
     “emails” : [“email_1”, “email_2”]
    },
   },
   “template” : “Archive job ${pid} has completed. Results: ${status}”
  },
  {
   "status" : "SUCCESSFUL",
   "method": {
    "type" : "url”,
    "url" : "myscicat.myinstitution.ext/datablock/archived",
    "action" : "POST",
    "token" : "<JWT_TOKEN>",
   }
   "template": { structure to create archive files }
  }
 ]
}

A request is posted to the job create endpoint with the following body:

{
 "authenticated_user": "user_1",
 "type": "archive",
 "files": [
  {
   "dataset.pid" : "20.500.12269/e7cc85c0-3fb3-4add-8e3b-6524192d9e71",
   "file" : "*"
  },
  {
   "dataset.pid" : "20.500.12269/22c45309-878b-410a-ba01-29b754c7a406",
   "file" : "*"
  }
 ]
}

The job creation function receives the request
Checks that user_1 has a valid token, is actually part of the owner group of the two datasets listed in the request.
Indeed the user is allowed to place this request
The new archive job is created with the following structure

{
 "id" : "7289ee0e-4739-11ee-bcae-0b150b8afb9e",
 "type" : "archive",
 "created_by" : "user_1"
 "created_at" : <timestamp>,
 "status_code" : "CREATED",
 "updaded_at": <timestamp>,
 "updated_by": “user_1”,
 "status_message": "Job created",
 "updates_history" : [
  {
   "status_code" : "CREATED",
   "updaded_at": <timestamp>,
   "updated_by": “user_1”,
   "status_message": "Job created"
  }
 ],
 "update_configuration": {
  "authorization": "archiver_service",
  "status" : {
   "allowed" : ["IN_PROGRESS", "SUCCESSFUL", "FAILED"],
   "transitions" : {
    "CREATED" : ["IN_PROGRESS"],
    "IN_PROGRESS" : ["SUCCESSFUL","FAILED"]
   }
  },
  "method": {
   "type" : "rabbitmq",
   "server" : "myrabbitmq.myinstitution.ext",
   "queue" : "archive_updates"
  },
  "template" : {
   "status" : "<STATUS>",
   "message" : "<MESSAGE>",
   "job" : "<JOB_ID>",
   "token" : "<JWT_TOKEN>"
  }
 },
 "message_sent” : { <copy of the message posted see #7> },
 "post_configuration": [
  {
   "method": {
    "type" : "url”,
    "url" : "myemailserver.myinstitution.ext",
    "action" : "POST"
    “arguments” : {
     “emails” : [“email_1”, “email_2”]
    }
   },
   “template” : “Archive job ${pid} has completed. Results: ${status}”
  },
  {
   "status" : "SUCCESSFUL",
   "method": {
    "type" : "url”,
    "url" : "myscicat.myinstitution.ext/datablock/archived",
    "action" : "POST"
    "token" : "<JWT_TOKEN>"
   },
   “template” : { structure to create archive files }
  }
 ]
}

A message is posted on queue archive_jobs of server myrabbitmq.myinstitution.ext with body:

{
 “job_id” : “7289ee0e-4739-11ee-bcae-0b150b8afb9e”
 "type" : "archive",
 “files” : [
  {
   “pid” : “20.500.12269/e7cc85c0-3fb3-4add-8e3b-6524192d9e71”,
   “file” : “<file_full_path>”,
  },
  ...
  {
   “pid” : “20.500.12269/22c45309-878b-410a-ba01-29b754c7a406”,
   “file” : “<full_file_path>”,
  }
  ...
 ],
 “updates_configuration” : {
  “type: “rabbitmq”,
  “authorization”: “archiver_service”,
   “server” : “myrabbitmq.myinstitution.ext”,
   “topic” : “archive_updates”
  },
  “template” : {
   “job_id” : “ 7289ee0e-4739-11ee-bcae-0b150b8afb9e”,
   "status" : "<STATUS>",
   "message" : "<MESSAGE>",
   "token" : "<JWT_TOKEN>"
  }
 }
}

a new consumer is setup to listen to queue archive_updates on server myrabbitmq.myinstitution.ext.
the backend returns 200 on the job creation request
Archiving service send a message update on queue archive_updates on server myrabbitmq.myinstitution.ext to notify that it received the information and has started the job.
The message has the following structure:

{
 “job_id” : “7289ee0e-4739-11ee-bcae-0b150b8afb9e”,
 "status" : "IN_PROGRESS",
 "message" : "Job 7289ee0e-4739-11ee-bcae-0b150b8afb9e has been started and is in progress. 10% completed.",
 "token" : "<JWT_TOKEN_FOR_ARCHIVER_SERVICE>"
}

Consumer receives the  message, retrieves the job information and checks that the jwt token is correct.
The JWT token is valid, it updates the job as follows:

{
 "id" : "7289ee0e-4739-11ee-bcae-0b150b8afb9e",
 "type" : "archive",
 "created_by" : "user_1"
 "created_at" : <timestamp>,
 "status_code" : "IN_PROGRESS",
 "updaded_at": <timestamp>,
 "updated_by": “user_1”,
 "status_message": "Job 7289ee0e-4739-11ee-bcae-0b150b8afb9e has been started and is in progress. 10% completed.",
 "updates_history" : [
  {
   "status_code" : "CREATED",
   "updaded_at": <timestamp>,
   "updated_by": “user_1”,
   "status_message": "Job created"
  },
  {
   "status_code" : "IN_PROGRESS",
   "updaded_at": <timestamp>,
   "updated_by": “user_1”,
   "status_message": "Job 7289ee0e-4739-11ee-bcae-0b150b8afb9e has been started and is in progress. 10% completed.",
  }
 ],
 "message_posted” : { <copy of the message posted see #7> }
 "update_configuration": ...
 "post_configuration" : ...
}

Consumer receives an update message as follow

{
 “job_id” : “7289ee0e-4739-11ee-bcae-0b150b8afb9e”,
 "status" : "SUCCESSFUL",
 "message" : "Job 7289ee0e-4739-11ee-bcae-0b150b8afb9e has completed successfully.",
 "token" : "<JWT_TOKEN_FOR_ARCHIVER_SERVICE>"
}

Credentials are verifued and are valid
The job is updated as follow:

{
 "id" : "7289ee0e-4739-11ee-bcae-0b150b8afb9e",
 "type" : "archive",
 "created_by" : "user_1"
 "created_at" : <timestamp>,
 "status_code" : "SUCCESSFUL",
 "updaded_at": <timestamp>,
 "updated_by": “user_1”,
 "status_message": "Job 7289ee0e-4739-11ee-bcae-0b150b8afb9e has completed successfully.",
 "updates_history" : [
  {
   "status_code" : "CREATED",
   "updaded_at": <timestamp>,
   "updated_by": “user_1”,
   "status_message": "Job created"
  },
  {
   "status_code" : "IN_PROGRESS",
   "updaded_at": <timestamp>,
   "updated_by": “user_1”,
   "status_message": "Job 7289ee0e-4739-11ee-bcae-0b150b8afb9e has been started and is in progress. 10% completed.",
  },
  {
   "status_code" : "SUCCESSFUL",
   "updaded_at": <timestamp>,
   "updated_by": “user_1”,
   "status_message": "Job 7289ee0e-4739-11ee-bcae-0b150b8afb9e has completed successfully.",
  }
 ],
 "message_posted” : { <copy of the message posted see #7> }
 "update_configuration": ...
 "post_configuration" : ...
}

The job has been completed by the remote service. The consumer is dismissed. The post actions are triggered
First post action is executed. It is defined as:

{
 "method": {
  "type" : "url”,
  "url" : "https://myemailserver.myinstitution.ext",
  "action" : "POST"
  “arguments” : {
   “emails” : [“email_1”, “email_2”]
  },
 },
 “template” : “Archive job ${pid} has completed. Results: ${status}”
}

A POST request to the URL _https://myemailserver.myinstitution.ext?email=email_1&email=email_2_ with the correct data associated is sent
The external service receive the request and return a status code 200 and message "Emails sent"
The job is update accordingly

{
 "id" : "7289ee0e-4739-11ee-bcae-0b150b8afb9e",
 "type" : "archive",
 "created_by" : "user_1"
 "created_at" : <timestamp>,
 "status_code" : "SUCCESSFUL",
 "updaded_at": <timestamp>,
 "updated_by": “user_1”,
 "status_message": "Job 7289ee0e-4739-11ee-bcae-0b150b8afb9e has completed successfully.",
 "updates_history" : [
  {
   "status_code" : "CREATED",
   "updaded_at": <timestamp>,
   "updated_by": “user_1”,
   "status_message": "Job created"
  },
  {
   "status_code" : "IN_PROGRESS",
   "updaded_at": <timestamp>,
   "updated_by": “user_1”,
   "status_message": "Job 7289ee0e-4739-11ee-bcae-0b150b8afb9e has been started and is in progress. 10% completed.",
  },
  {
   "status_code" : "SUCCESSFUL",
   "updaded_at": <timestamp>,
   "updated_by": “user_1”,
   "status_message": "Job 7289ee0e-4739-11ee-bcae-0b150b8afb9e has completed successfully.",
  }
 ],
 "message_posted” : { <copy of the message posted see #7> }
 "update_configuration": ...
 "post_configuration" : [
  {
   "method": {
    "type" : "url”,
    "url" : "myemailserver.myinstitution.ext",
    "action" : "POST"
    “arguments” : {
     “emails” : [“email_1”, “email_2”]
    }
   },
   “template” : “Archive job ${pid} has completed. Results: ${status}”
   "status_code" : 200,
   "message" : "Emails sent"
  },
  {
   "status" : "SUCCESSFUL",
   "method": {
    "type" : "url”,
    "url" : "myscicat.myinstitution.ext/datablock/archived",
    "action" : "POST"
    "token" : "<JWT_TOKEN>"
   },
   “template” : { structure to create archive files }
  }
 ]
}

The second post action is executed. It is defined as follow:

{
 "status" : "SUCCESSFUL",
 "method": {
  "type" : "url”,
  "url" : "https://myscicat.myinstitution.ext/datablock/archived",
  "action" : "POST"
  "token" : "<JWT_TOKEN>"
 },
 “template” : { structure to create archive files }
}

The final job status is SUCCESSFUL which corresponds to the status specified in the action description. The post action scan be executed.
a POST request to the URL _https://myscicat.myinstitution.ext/datablock/archived_ with the correct data and authorization is executed.
The request is successful, the job is updated accordingly

{
 "id" : "7289ee0e-4739-11ee-bcae-0b150b8afb9e",
 "type" : "archive",
 "created_by" : "user_1"
 "created_at" : <timestamp>,
 "status_code" : "SUCCESSFUL",
 "updaded_at": <timestamp>,
 "updated_by": “user_1”,
 "status_message": "Job 7289ee0e-4739-11ee-bcae-0b150b8afb9e has completed successfully.",
 "updates_history" : [
  {
   "status_code" : "CREATED",
   "updaded_at": <timestamp>,
   "updated_by": “user_1”,
   "status_message": "Job created"
  },
  {
   "status_code" : "IN_PROGRESS",
   "updaded_at": <timestamp>,
   "updated_by": “user_1”,
   "status_message": "Job 7289ee0e-4739-11ee-bcae-0b150b8afb9e has been started and is in progress. 10% completed.",
  },
  {
   "status_code" : "SUCCESSFUL",
   "updaded_at": <timestamp>,
   "updated_by": “user_1”,
   "status_message": "Job 7289ee0e-4739-11ee-bcae-0b150b8afb9e has completed successfully.",
  }
 ],
 "message_posted” : { <copy of the message posted see #7> }
 "update_configuration": ...
 "post_configuration" : [
  {
   "method": {
    "type" : "url”,
    "url" : "myemailserver.myinstitution.ext",
    "action" : "POST"
    “arguments” : {
     “emails” : [“email_1”, “email_2”]
    }
   },
   “template” : “Archive job ${pid} has completed. Results: ${status}”
   "status_code" : 200,
   "message" : "Emails sent"
  },
  {
   "status" : "SUCCESSFUL",
   "method": {
    "type" : "url”,
    "url" : "myscicat.myinstitution.ext/datablock/archived",
    "action" : "POST"
    "token" : "<JWT_TOKEN>"
   },
   “template” : { structure to create archive files },
   "status_code" : 200,
   "message" : "datablock with {id} for dataset with pid {pid} has been created"
  }
 ]
}

The job is completed.

Minor comment: Shouldn't the updates from the archive services (step 13 ff.)be shown as archive_service instead of user_1?
Otherwise looks quite comprehensive and good to me.


Can't use minimumResultsForSeearch with AttachContainer?

Hello,
I would like to have select2 dropdown containers attached inside the select element's parent container, and to only show the search field if there are at least 10 options.
I'm having trouble using the minimumResultsForSearch option along with the AttachContainer adapter as seen here: http://jsbin.com/gawosemice/edit?html,js,output
Unfortunately, the search field always shows up, regardless of the number of options.
Am I doing something wrong or have I found a bug?

I realize now this may be related to #3239 and/or a dupe...


[fftw3] Fix the build error and usage of feature openmp

Fixes #10930, fix the build error and usage of feature fftw3[openmp].
About the build error, the related upstream issue: https://github.com/FFTW/fftw3/issues/120.
Feature fftw3[openmp] passed with following triplets:
x86-windows
x64-windows
x64-windows-static

Usage test passed on x64-windows.

[x] Changes comply with the maintainer guide
[ ] SHA512s are updated for each updated download
[ ] The "supports" clause reflects platforms that may be fixed by this new version
[ ] Any fixed CI baseline entries are removed from that file.
[ ] Any patches that are no longer applied are deleted from the port's directory.
[x] The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
[x] Only one version is added to each modified port's versions file.

Fixes #10930, fix the build error and usage of feature fftw3[openmp].

... from 2020

About the build error, the related upstream issue: FFTW/fftw3#120.

... from 2017.
Is this still an active issue?
https://github.com/microsoft/vcpkg/pull/32999/files added some changes to the port, also for openmp.

Is this still an active issue?
https://github.com/microsoft/vcpkg/pull/32999/files added some changes to the port, also for openmp.

Yes, this issue still exists, fftw3[openmp] still build failed on dynamic.


Add IP address display module

I tested the ip address retrieval and stringify code but don't have an led matrix to test the rendering.
There is a TODO for allowing to configure the network interface and ip version. Can we use argstr for this? Where is it set? Why does draw get argc and argv but init doesn't?

Unfortunately, argstr only works for flt and out. PR's welcome. :)
Module looks fine! Will squash and merge it.


Feature Request: Bookmarks

It would be nice to be able to bookmark/save notes for later reading, or for revisiting the thread at a later time. This could be a strictly local feature in my opinion.

Found #251 searching for a different topic, I think this is a related, but separate concept.

We sort of have this with NIP 32 labels. Click the overflow menu on an event and then "tag". Notes that you tag will show up on your profile under "collections". This is all very basic right now but I think a good approach.

[ ] Fetch bookmarks and add to collections


compass_msgs

Hi, we're also working on compass packages - however, the magnetometer-based ones.
We faced the issue that there is no good message type for compass outputs, so we created it: https://github.com/ctu-vras/compass/ . It basically contains just the azimuth with a few flags explaining what type of azimuth it is.
We intend to make a binary release of these packages for Noetic soon. Would you be interested in using these messages, too? If you'd find them useful, we could try to get the message in sensor_msgs.

Your new message type seem like a good approach to handle issues with compass data. Whether it should be included in sensor_msgs could be decided by collecting feedback from the ROS community. However, adding a new message to sensor_msgs might require a review process by its maintainers.

Thanks for the reply. One of the criteria for accepting a new core message is usage of its preliminary version in various packages. That's where this package could help.


Need Xmodem with TLS for secure communciation

Please provide TLS with the xmodem protocol to communicate in a secure way in C# .Net

Hello rajeshnaikaj,
The XModem Protocol does not have any restriction with the kind of data that may be transported from one endpoint to another. If you were to encrypt the data before handing it to the XModemCommunicator, it would send the encrypted data from one endpoint to the other ensuring through its CRC that all data is accounted for. Once all data has been received, you may take the data from the XModelCommunicator, and decrypt it.
Thanks.
I will close this issue as this isn't an issue with the project per se, but more of a request for a separate piece of software.


RFC: Doc sidebar version dropdown

🚀 Feature
The navbar can get a bit crowded over time and it's a common doc pattern to use a sidebar version dropdown
The APISIX website already built this:
https://apisix.apache.org/docs/apisix/architecture-design/apisix

We could add some extra sidebar config to handle a version dropdown.
I don't have a strong opinion on the public API yet. Maybe it could be a theme config like themeConfig.docSidebarVersionDropdown: true ?
To me it does not make sense to:

nest a version dropdown inside a sidebar category, so it can't be a sidebar item directly
display 2+ versions dropdowns inside the same sidebar

But it could make sense to:

display the dropdown at the bottom (sticky?) or the top (sticky?)
have different config per-sidebar?

The current sidebars.js file is hard to modify to add some sidebar top-level sidebarr configs like booleans: we'd have to ensure backward compatibility but this is a possibility:
const sidebars = {
  mySidebar: {
    versionDropdown: "top-sticky",
    items: [...]
  }
}

We could also add a type and allow it only as top-level item (simpler for retrocompatibility)?
const sidebars = {
  mySidebar: [{type: "versionDropdown"},...]
}

Note we want to enable custom navbar items and custom blog sidebar items, so maybe we also need to think about custom doc sidebar items too? I don't really have a use-case for this yet.
Just wanted to open the discussion around this feature's design.

Another site using this:
https://docs.dyte.io/react/quickstart

An alternative might be allowing components to accept children for rendering, either before or after? Then I could wrap the component, and allow more generic customization.
Although, my specific use case is also to move the switcher here.

An alternative might be allowing components to accept children for rendering, either before or after? Then I could wrap the component, and allow more generic customization.

Not sure what you mean here 😅 which component? and how do you provide that children yourself?

Note: you can already wrap the desktop sidebar to add top/bottom elements.
We even have a demo on our own website here, you can see a top/bottom ad container in the test sidebar:

page: https://docusaurus.io/tests/docs
code: https://github.com/facebook/docusaurus/blob/main/website/src/theme/DocSidebar/Desktop/Content/index.js
Now, these 2 blocks are "static" and not part of the sidebar scrollable area.
I don't think we provide a way to easily add top/bottom sidebar components to the scrollable area atm, but we could work on that if someone has a use-case for this

these 2 blocks are "static" and not part of the sidebar scrollable area.

Hmm, I was thinking I wanted my version switcher to be part of the scroll area, without really thinking it through, but it could equally be static, and that actually might make more sense. I wrapped DocSidebarItems and displayed before the items, only if level == 1, to get it part of the scroll area.
I was thinking kinda like how dropdown has dropdownItemsBefore and dropdownItemsAfter, you could pass items for before or after the docsidebar to get it into the scroll area.

I wrapped DocSidebarItems and displayed before the items, only if level == 1, to get it part of the scroll area.

hmmm yes that can work but maybe not in a very straightforward way. We could as well extract the scrollable area in a separate container

I was thinking kinda like how dropdown has dropdownItemsBefore and dropdownItemsAfter, you could pass items for before or after the docsidebar to get it into the scroll area.

configs such as dropdownItemsAfter only allow passing navbar items. It only works if what you provide is a navbar item, and does not work to add arbitrary React components at the top/bottom of the sidebar scroll container

configs such as dropdownItemsAfter only allow passing navbar items. It only works if what you provide is a navbar item, and does not work to add arbitrary React components at the top/bottom of the sidebar scroll container

I understand that, I just meant doing a similar concept of accepting elements to insert before and after, for the docsiderbar it would be any react component.
All good, I have a solution that works for me.

I understand that, I just meant doing a similar concept of accepting elements to insert before and after, for the docsiderbar it would be any react component.

Instead we'll provide a way to register your own doc sidebar item types, so instead of using "doc" or "category" you could use "myCustomVersionSelect" (or use the pre-built one that we'll likely provide)
Slightly related to https://github.com/facebook/docusaurus/issues/7227
Note you can already insert arbitrary HTML content in the sidebar scrollable container: https://docusaurus.io/docs/sidebar/items#sidebar-item-html
(but it's not using React so making this content interactive may be complicated and require vanilla js)

@slorber for my multi framework documentation like in the example dyte docs https://github.com/facebook/docusaurus/issues/5706#issuecomment-979933443 i need this feature too.
You are right that it is possible to add custom html using vanilla js at the top or bottom of the sidebar, but it is not a great solution. Do you have any new information on this feature?

We don't have a workaround currently but we could add a similar one to https://github.com/facebook/docusaurus/issues/7227: allowing you to register custom sidebar items with swizzle, and do not reject items with a custom- prefix in the type name.
That's not perfect but it's a good short-term workaround.

@slorber Perfect thank you 👍

Hi @slorber , any update on this feature? I guess it could be very interesting for most people to be able to have the version number only in the documentation part (and not the blog, index page, etc; where it's not relevant)!
Also, I did try to inspire myself from the examples above and tried to add the DocsVersionDropdownNavbarItem in the wrapped swizzled DocSidebar as this:
// website/src/theme/DocSidebar/index.js
import React from 'react';
import DocSidebar from '@theme-original/DocSidebar';
import DocsVersionDropdownNavbarItem from '@theme-original/NavbarItem/DocsVersionDropdownNavbarItem';

export default function DocSidebarWrapper(props) {
  return (
    <>

Version: <DocsVersionDropdownNavbarItem />

      <DocSidebar {...props} />
    </>
  );
}

It worked very well in dev mode (yarn docusaurus start), but failed every time while compiling the project (yarn build) (built log here)... Any clue?

@RoiArthurB no update but still agree this could be useful.
The build error is because DocsVersionDropdownNavbarItem is not programmed defensively and is only designed to be used with default values set in our config validation schema.
Passing default values yourself should work, try this: <DocsVersionDropdownNavbarItem dropdownItemsBefore={[]} dropdownItemsAfter={[]} />

@slorber Thanks your solution did work. I'm looking forward to have a proper way to integrate it, but right now, this simple trick gives a good enough result :)

@glitch-txs the Dyte docs is using Docusaurus v3.1.1 (can be seen in HTML head meta tags):
https://docs.dyte.io/react-ui-kit
So yes this is definitively possible, similar to how it was in v2. The Dyte website is open source so you can just copy their solution.

I implemented something like this, but didn't like the dropdown in the sidebar because it was no longer reliably available/visible (since the sidebar is hidden away on narrow/mobile displays). Doing that experiment made it really clear how duplicative/redundant the doc version badge is, though.
So, I swizzled the doc version badge to instead produce the dropdown at the top of doc page bodies:

I personally think this is a win all around, so thought I'd share another non-navbar approach.


1.18.2 Support

Please Update the mod to 1.18.2 it’s one of my favourite mods because it removes the choppy chunk loading animations

There's an issue already (more than one)

Here:
https://github.com/TopchetoEU/smooth-chunks


Add peek and peek_slice functions to RawSocket

This adds the peek and peek_slice functions to raw sockets, same as was added to UDP sockets in #278

LGTM. Could you add tests? Copying the ones from UDP should work.


DIST-S1 PGE Stub Implementation

The Interface delivery for the R6 DIST-S1 SAS was made on Nov 22, meaning we can begin work on the "stub" implementation of the PGE code that will form the baseline for the first Engineering Release.
Development of the following must be included for a fully functional "stub" implementation:

[x] Create the src/opera/pge/dist_s1/dist_s1_pge.py module

The initial module should only define the barebones versions of the pre/post-processor mixins and executor class that simply inherit from the implementations in base_pge.py. See the dswx-ni version for an example

[x] Create the src/opera/pge/dist_s1/schema/dist_s1_sas_schema.yaml file

The dist-s1 repo models its runconfig schema as Pydantic code, which can be found here. We will need to convert this to the corresponding Yamale-format schema. An example runconfig that conforms to this schema can be found here

[x] Update the PGE_NAME_MAP in src/opera/scripts/pge_main.py to include an entry mapping DIST_S1_PGE to the DistS1Executor class
[x] Create the src/opera/test/pge/dist_s1/test_dist_s1_pge.py suite

This should also be a barebones test suite that only contains a single test_dist_s1_pge_execution function. See the dswx-ni example

[x] Create the src/opera/test/data/test_dist_s1_config.yaml file for use with test_dist_s1_pge.py

The sample runconfig from the dist-s1 repo linked above can be used as sensible sample settings for the SAS section of the our test runconfig

[x] Create the .ci/docker/Dockerfile_dist_s1 file

This will essentially be a copy of our other existing Dockerfiles, but with the following settings:
ARG PGE_DEST_DIR=/home/ops
dist_user:dist_user should be used where ever the user/group is referenced, for example: COPY --chown=dist_user:dist_user ${PGE_SOURCE_DIR} ${PGE_DEST_DIR}

[x] Create the .ci/scripts/dist_s1/build_dist_s1.sh file

This can also essentially be a cut/paste of a previous build script, with the following modifications:
Default value for SAS_IMAGE argument should be SAS_IMAGE="ghcr.io/opera-adt/dist-s1:0.0.3"
Ensure Dockerfile_dist_s1 is referenced within the docker build command

[x] Create the .ci/scripts/dist_s1/test_dist_s1.sh file

See the example for disp-s1
Ensure CONTAINER_HOME="/home/ops"

[x] Update the .ci/scripts/util/build_all_images.sh and .ci/scripts/util/test_all_images.sh scripts to include the new build/test scripts for DIST-S1

Resolved by #549


[Agent] 通用代码专家助手

systemRole
You are a professional AI code assistant.  Your role includes providing code generation, problem-solving, and language conversion assistance in response to user requests.  Don't apologise unnecessarily. Review the conversation history for mistakes and avoid repeating them.
GUIDELINES FOR CODE GENERATION:

Understand User Intent:

Analyze the user' s request to determine the specific outcome they desire, including the purpose and expected behavior of the code.

Write Accurate Code:

Generate code that adheres to best practices for the given language.
Ensure code correctness by avoiding common pitfalls and syntax errors.

Ensure Code Clarity:

Write code that is easy to understand, with meaningful variable and function names.
Use proper indentation and follow the coding standards of the respective programming language.

Add Comments:

Include comments to clarify complex sections, provide context, or explain non- obvious choices in the code.

GUIDELINES FOR CODE CONVERSION:

Analyze Source Code:

Breakdown the structure and logic of the provided source code.

Translate Syntax:

Convert the logic while adapting language- specific syntax and conventions for the target Language.

Maintain Code Functionality:

Ensure that the converted code retains the original functionality and purpose.

POP- UP CODE OPTIONS AND SUGGESTIONS:

Contextual Relevance:

Generate options that match the user' s requirements, leveraging previous conversation history for context.

Provide Alternatives:

Offer multiple valid solutions or approaches when applicable, prioritizing based on efficiency, readability, or complexity.

ADDITIONAL BEHAVIORAL INSTRUCTIONS:

Respond to Feedback:

Adjust code or approach based on user corrections or additional requirements.

Follow Safety and Security Best Practices:

Avoid generating potentially harmful or insecure code.

FORMAT AND STYLE INSTRUCTIONS:

Maintain Consistent Formatting:

Adhere to consistent indentation, spacing, and coding style relevant to the given language.

Ensure Readability:

Prioritize readability by using clear identifiers and adding appropriate comments.

Answer all my questions in Chinese.
identifier
professional-ai-code-assistant
avatar
👨💻
title
通用代码专家助手
description
擅长AI代码生成、问题解决和语言转换
tags
AI助手, 代码生成, 问题解决, 编程指导
locale
zh-CN

meta 信息和 systemrole 语种不符