Override internal table state (beta 26)

Describe the bug
Table Options API state.selectedRowPaths: Set<RowPathKey> does not work.
My goal is to provide selection through parent component (making react-table controlled)
but internal state override is not taken into account.
To Reproduce

Go to CodeSandBox
Initial state is OK (5th row is selected)
State override is NOK (3th row not selected)

Expected behavior
When provided, Table Options API state should override internal state.
Desktop (please complete the following information):

OS : Windows
Browser : Chrome
Version : 78

Additional context
BETA react-table 26

Docs need to be updated still. You can now use the reducer option to override state. I’ll add docs later today.
Tanner Linsley
On Dec 4, 2019, 5:03 AM -0500, Alexis FR<EMAIL_ADDRESS>wrote:

Describe the bug
Table Options API state.selectedRowPaths: Set does not work.
My goal is to provide selection through parent component (making react-table controlled)
but internal state override is not taken into account.
To Reproduce

Go to https://codesandbox.io/s/unruffled-perlman-8bztx
Initial state is OK (5th row is selected)
State override is NOK (3th row not selected)

Expected behavior
When provided, Table Options API state should override internal state.
Desktop (please complete the following information):
• OS : Windows
• Browser : Chrome
• Version : 78
Additional context
BETA react-table 26
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

I am facing a somewhat related issue.
In my implementation, I had a "toggle all" button which would collapse/expand all table groups simultaneously. In beta.1 version I implemented it with the help of useTableState hook:
      // setTableState is the second element returned by useTableState hook
      setTableState(actualState => ({
        ...actualState,`
        expanded: isAlreadyExpanded ? [] : getAllExpandedState(rows) // this function collects paths of all rows that should be expanded
      }), ReactTable.actions["toggleExpanded"]);

Now that table state hook is deprecated and there is no toggleExpanded action, I'm trying to implement it with a dispatcher, like this:
      dispatch({
        type: ReactTable.actions.toggleExpandedByPath,
        path: [],
        expanded: isAlreadyExpanded ? [] : getAllExpandedState(rows)
      });

But it doesn't work, probably because toggleExpandedByPath action now requires path parameter. What should I pass to the path parameter if I want to toggle rows in bulk, not one-by-one?
I would appreciate if you help me here, or point me to the right place in the documentation, @tannerlinsley

Hmm, now that you're bringing up this use case, I am starting to wonder if a state override api is worth going back to. The reducer pattern clears up a lot of stuff with the state internally, but what you're talking about is "controlling" the final state (and it would need to be able to be memoized). I'll noodle on this a bit and get back to you.

How does this look? (This is a snippet from the docs I'm writing):
How can I manually control the table state?
Occasionally, you may need to override some of the table state from a parent component or from somewhere above the usage of useTable. In this case, you can turn to useTable's useControlledState option. This hook function is run on every render and allows you an opportunity to override or change the final table state in a safe way.
For example, to control a table's pageIndex from a parent component:
const [controlledPageIndex, setControlledPage] = React.useState(0)

useTable({
  useControlledState: state => {
    return React.useMemo(
      () => ({
        ...state,
        pageIndex: controlledPageIndex,
      }),
      [controlledPageIndex]
    )
  },
})

It's important that the state override is done within a useMemo call to prevent the state variable from changing on every render.

This looks like a similar problem i'm having trying to drive state from react-router.  Getting table state into history works cleanly, but pushing it back in when the user his the back button has been problematic.  I currently push the 'state' option in with a memoized value,  this works for pageIndex,  but does not seem to work with sortBy.
The above solution appears workable and very close to what I am already doing.

Awesome I think it’s worth shipping and trying out then.

This is now available in beta.27

Thank you @tannerlinsley , it is a solution.
But it means that now I have to take full control over the expanded state of the rows, doesn't it? Previously I could overwrite the array of expanded rows only when needed, i.e. when a user clicked "expand all / collapse all" button. Now I also need to update controlled expanded state when the user clicks on any individual expandable row.
So generic API is available, and that's the most important. But for this particular use-case, which might be quite common (just like select all / unselect all functionality), wouldn't it be nice to have a special action? Or to update semantics of ReactTable.actions.toggleExpandedByPath action to allow for a bulk update? All in all, in beta.1 I could do this using ReactTable.actions.toggleExpanded action

Thanks !
It was this kind of API I was looking for to tune the state.
A remark :  useMemo cannot be used (as described above) in useControlledState because it will "block/memoize" the internal state as long as hooks dependencies does not change.
So if controlledPageIndex does not change, internal state will be kept as is.

Ah yes, you are correct. But you can simply add state to the memoization dependencies.


Demo and README do not include DataSeries/Frame functions

Closing this because it's old and out of date and out of scope currently


How to make config client pull config changes via RefreshEndpoint

I'm trying to figure out a way to automate the refresh of configuration on client side. This has been already addressed here: https://github.com/spring-cloud/spring-cloud-config/issues/138 giving a good example on how to implement a "pull" like refresh, although I'm not sure whether constantly hammering the config server it's the best possible solution.
Config server is already pretty capable of detecting changes, so I have simple proposition to add an event to config server a form of SPI that could be easly consumed in the embeeded mode and based on which it would be easy to implement extensions and own logic: https://github.com/jmnarloch/spring-cloud-config/commit/c1a003525d40ce3897a53ab02bbce5c01766867d#diff-14f7a9bbd398562fdfd12ce9f6619d7cR179 - this is not yet "workable solution", merely a proposition.

The proposed change is pretty small, so likely to just get merged if you send a pull request, but it also has a pretty small impact on its own. You say the config server is capable of detecting changes, but I don't see how exactly. For sure it knows how to construct new property sources, but how would it know when to do that, or when a change had been made, or if there was a change which clients were interested in it? This is an important topic, so it's worthwhile to have a discussion about all that as well.

Yes I guest that misunderstod the functionality of loading the config on demand from the client directly, although correctly if I am wrong, but I am thinking it might be possible to call POST "/refresh" on the config service in order to trigger the reload of properties and afterwards use the event I had mentioned.

There is one fallowup to https://github.com/spring-cloud/spring-cloud-config/issues/138 and calling RefreshEndpoint.refresh() method. I had created a gist: https://gist.github.com/jmnarloch/7be51b6d00b49de84cfa
It turns out this does not entirely work with Eureka setup: what I mean is whenever the refresh method is being called first of all it results with deregistration of the endpoint from Eureka and for some reason this is permament, the service does not re register in Eureka again. The logs might be helpfull here:
https://gist.github.com/jmnarloch/fc1aa7fa303cb983e6c0
It looks like the order of the operations is not entirely correct, the order is as fallows:
Registering application rest-service with eureka with status UP
Unregistering application rest-service with eureka with status DOWN

I had build small extension that will help to setup scheduled refresh and "Pull" the configuration from configured server, if you would like to I could turn this into a pull request: https://github.com/jmnarloch/spring-cloud-config-refresh
Either way I would like to work on enabling the "Push" like feature through the Config server.

The push notifications are already discussed in #86. Please feel free to contribute there.

There's a bit of a mixed discussion here, so I tried top point you at some other links to follow up on the push changes. Your issue with eureka registrations being lost appears to be the only thing left. It can't reproduce it so I suspect a pilot error. Can you post a minimal sample project to reproduce please?

Cool thanks,
I had setup a project: https://github.com/jmnarloch/spring-boot-microservices-sandbox/tree/eureka-refresh-deregister that I am always able to see this issue. You will have build it and run minimum three services: EurekaApplication, ConfigApplication, RestApplication. After that the last one will listen on port 8541 after waiting it for registering in Eureka simply do:
curl -d {} http://localhost:8541/refresh

What will happen is that DefaultLifecycleProcessor will caused the fallowing methods to execute

EurekaDiscoveryClientConfiguration#start
EurekaDiscoveryClientConfiguration#stop
EurekaDiscoveryClientConfiguration#close - is being eventually called

Verified with cloud-starter-config and cloud-starter-eureka 1.0.3.RELEASE
What really should happen is the logic that DiscoveryClientConfigServiceAutoConfiguration#init method enforces and the order of method calls, at least I think so.

I can't build your sample:
...
FAILURE: Build failed with an exception.

* Where:
Script '/home/dsyer/dev/cloud/workspace/jmnarloch/gradle/release.gradle' line: 15

* What went wrong:
A problem occurred evaluating script.
> No such property: ossrhUsername for class: org.gradle.api.publication.maven.internal.deployer.DefaultGroovyMavenDeployer
...

Maybe something simpler would work?

Sorry for that I had fixed the build and double check that it is going to work without any extra configuration/properties.

I think this is probably covered now by  8d8e07a

still see the same issue on version:
org.springframework.cloud
spring-cloud-dependencies
Dalston.RELEASE

Anyone know which version has the fix for it?

@AmberHuang05, it's been closed for over a year. Please open a new issue with steps to reproduce or a sample project that recreates the problem.

already did.
https://github.com/spring-cloud/spring-cloud-netflix/issues/1857


Redis semantic cache working with custom embeddings

I am following the official documentation scrips for semantic cache. In the following code
from redisvl.extensions.llmcache import SemanticCache
llmcache = SemanticCache(
    name="llmcache",                     # underlying search index name
    redis_url="redis://localhost:6379",  # redis connection url string
    distance_threshold=0.2               # semantic cache distance threshold
)
llmcache.store(
    prompt="What is the capital city of France?",
    response="Paris",
    metadata={"city": "Paris", "country": "france"}
)
llmcache.check(prompt=question)[0]['response']

I have these questions,
1 - In llmcache.store() hope I can store the custom vector of the prompt directly rather than prompt.  That custom vector can be generated by any embedding model like  sentence transformer, minilm-l12-v2, openai embeddings, huggingface embeddings...etc
2  - Is there any embedding length limitation to store using llmcache.store()? Shall I use a vector with any length?
3 -  In llmcache.check() hope we can pass the vector( from sentence transformer, minilm-l12-v2, openai embeddings, huggingface embeddings,..etc) directly for the semantic matching purpose,rather than the query
4 - inside llmcache.check() which distance measure using for finding the semantic similarity ? is it cosine similarity or any other? do we have the privilege to configure that?

Great feedback @pradeepdev-1995 -- @justin-cechmanek will be able to chime in to answer your questions on how this works today. However, we are rapidly working on an update to the semantic cache class and feedback like this is very helpful.
As a quick starting point, checkout the newly included CustomTextVectorizer class as a way to manage this better.

Hi @pradeepdev-1995 I'll get straight to your questions:
1 - You can directly pass the vector of your choice to llmcache.store() as a parameter. llmcache.store(prompt='<text>', vector=[1.0,2.0,3.0], response='<text>'). This will ensure your specified vector is used for vector comparisons. The text prompt is still stored.
2 - We don't impose any vector size limits. Vectors should be the same size for a given search index.
3 - Similar to llmcache.store() you can directly pass your own vector to llmcache.check(). If you do so then you don't need to pass a text prompt. llmcache.check(vector=[1.0,2.0,3.0]) works.
4. The distance measure used is cosine similarity between vectors. It is not currently configurable.
As @tylerhutcherson mentioned, if you want to use your own vectorizer instead of one of the several we support, you can use the CustomTextVectorizer class to wrap your embedding function and then pass this vectorizer to the SemanticCache constructor and it will handle embedding of prompts in store() and check().
Is configuring the distance metric to something other than cosine similarity a feature you would like to have implemented?

@justin-cechmanek Thanks for the detailed anwer
One clarification regarding  CustomTextVectorizer class.
I am already using huggingface  embedding models for embedding creation outside of the redis semantic cache using the corresponding native library and models.
So those generated embeddings I can directly store (llmcache.store()) and able to search(llmcache.check()) like you mentioned above right?
Then why I should use ``CustomTextVectorizer``` class here?

CustomTextVectorizer is meant to be a convenience tool so you don't have to manually call your embedding method each time. For example both of the below code snippets will store and search over the same embeddings. Option two handles the embedding creation for you on each call to store and check.
# without CustomTextVectorizer
cache = SemanticCache()

prompt_1 = 'your prompt 1'
vector_1 = my_embed_function(prompt_1)
response = llm_call(prompt_1)
cache.store(prompt=prompt_1, response=response, vector=vector_1)

prompt_2 = 'your prompt 2'
vector_2 = my_embed_function(prompt_2)

res = cache.check(vector=vector_2)

OR
# with CustomVTextVectorizer
custom_vectorizer = CustomTextVectorizer(embed=my_embed_function)
cache = SemanticCache(vectorizer=custom_vectorizer)

prompt_1 = 'your prompt 1'
response = llm_call(prompt_1)
cache.store(prompt=prompt_1, response=response)

prompt_2 = 'your prompt 2'

res = cache.check(prompt_2)

Both approaches are fully supported.


Include redux-router v1.0.0-beta3

Edit: Update to initial middleware approach
Edit: Now fixes RequireLogin.onEnter hook. https://github.com/erikras/react-redux-universal-hot-example/issues/242
https://github.com/erikras/react-redux-universal-hot-example/issues/41
In this implementation we're back to the URL updating to the new route before the data fetching transition finishes. I kind of like this. It would also be easy to add a global spinner or something.
You can also now add status={404} or whatever to a route change the status code sent with the server render.
I'm sure something will be broken!
Breaking changes I can think of:

fetchDatas signature is now fetchData(getState, dispatch, location, params)

Known issues

Location bar changes before transition

Reverting to original state throws an error as redux-devtools is using deserialised React elements sent from server. See https://github.com/rackt/redux-router/issues/57

I'm disappointed with the behavior of pushState occurring before the transition is complete. There are legitimate use cases for asynchronously preventing navigation to a route.
It's still probably worthwhile to move to redux-router now and try and figure out a solution whenever we can.

I think this might not be fully compatible with redux-router as written, although I haven't tested or fully studied the code. I think if you connected one of the nested components to redux-router, it would still get new state from the store.

I think any connect-ed components below the middleware component get the updated redux-router state regardless. Haven't tested this exact version but in my implementation that's what seems to happen. I think that adds some complexity in terms of reasoning about your app state and is probably unwanted.
I think when you add redux-router into the mix, this might make more sense as middleware (and a new reducer) that captures the new router state, creates a new action along the lines of WILL_TRANSITION with the information and returns a promise that then nexts the original routerDidChange, when everything loads in.
I think that would even work on the server with some wrangling... ? I don't know. Going to try something like that later.

@apapirovski Yes, that's a limitation of this approach. Great idea, might have a play around tomorrow.

@apapirovski I've updated to an initial middleware based approach

@stevoland There's an important consideration with this implementation (that I haven't found a work-around for). You cannot use connect to get router state, otherwise the lower-down components will refresh before the router itself renders new component tree.
Given that everything is already coming down in 'props', I don't think this should be an issue if we're truly serious about keeping our state as far up the app as possible. That said, I think it's important for it to be clearly documented somewhere.
Also, for what it's worth, it's possible to make this work on the server, in an almost universal way. You just need a store to keep the promise in and then subscribe to that in your server.js, and only render when it's complete.

Hey @stevoland, don't know if the info is relevant, but check out #292 -- some things history.replaceState have improved and could make things easier.
Anything particular holding this up? Should we wait for redux-router to hit RC first?

Not sure what's holding this up really. Just a general lack of interest maybe?
The issues that I have found are down to redux-router such as keeping React components in Redux state. Development seems to have slowed on that - I get the impression he's waiting for a stable react-router release first.
Maybe we should just keep this lying around. Would be good to get more people testing it out though.

Well, the Travis build is failing, for one. Something about react-router not being able to find qs.

Odd, just happened after I rebased and only with npm 2.

We should probably force npm@3 on Travis. We are on the bleeding edge after all :smile:


Document how to use uv run with a shebang

Summary
Add documentation about how to use a shebang (#!/usr/bin/env -S uv run) to run a python script with uv run without actually inputting uv run directly in the shell.
Test Plan
Tested locally using uv 0.3.0 on Pop_OS! 22.04

Related: https://github.com/astral-sh/ruff/issues/13021#issuecomment-2302585295

Cool. I'm hesitant to merge this until we address https://github.com/astral-sh/uv/issues/6360

This now needs a --script at the end of the shebang line, and probably a warning in the docs about how important it is to avoid https://github.com/astral-sh/uv/issues/6360


Configure Matrix federation

Matrix federation's currently broken; I need to be able to access some of the group chats that are wired through Matrix such as the NixOS support server. Set this up!

this is cool but its likely that the configuration necessary will change with an upgrade to dendrite anyways, which is what i will use if i decide to host matrix again. closing for now


Update chaos-engineering.md

Added serverless functions under Faults to show that chaos engineering has benefits there as well.

@gunnargrosch : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@gunnargrosch : Thanks for your contribution! The author(s) have been notified to review your proposed change.

#sign-off

@adamboeglin: I'm sorry - only the author of this article, @absheik, can sign off on your changes. But we do have an exception process - if you are on the Microsoft content or product team for this product area, you can ask the PR review team to review and merge it by sending mail to the techdocprs alias.

@adamboeglin @absheik - In line 148, if "blacklist" isn't used in the system UI, it should be changed to "safe list" or "allow list" per Microsoft style. Please advise. (I can make the edit before merging the PR.)
Thanks.

@absheik : Thanks for your contribution! The author(s) have been notified to review your proposed change.

#sign-off


Add note about html in dbt docs

Description & motivation

PR Adds:

details about embedding HTML in descriptions
how to use a hidden ref to force model execution order

To-do before merge

I think the place we really want to update this is the reference/resource-properties/description page (rendered).
Basically, the guides are more introductory concepts ("what is this thing? how do I use it?), while the advanced examples should live in the reference section

### Use html in a description

(and then an example!)

@clrcrl submitting for your review. Not sure on the exact language though 🙂

No problem! Thanks 🙂

@clrcrl I think this is ready for your review.

Thanks for the nudge :)


Prep for v0.7.0

https://github.com/autogluon/autogluon/blob/master/tabular/setup.py

@conda-forge-admin, please rerender

@conda-forge-admin, please rerender

@conda-forge-admin, please rerender


Fix Ubuntu version list. [#644]

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs-ref-conceptual/install-azure-cli-apt.md
:white_check_mark:Succeeded
View (azure-cli-latest) View (azure-cli-2017-03-09-profile)

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Fix saas-openshiftio PR check

The default job template that was used is not suitable for us. We created new template that will suite our needs. The main structure is copied from job_template_defaults.

what is the reasoning behind this @Katka92 ?
I see that effecitvely this removes the following:
-if [ -n "${ghprbTargetBranch}" ]; then
-    git rebase --preserve-merges origin/${ghprbTargetBranch}
-    rtn_code=$?
-    if [ $rtn_code -ne 0 ]; then
-        echo "The branch can not be rebased onto origin/${ghprbTargetBranch}."
-        exit $rtn_code
-    fi
-else
-    echo "Not a PR build, using master"
-fi
-rsync -e "ssh $sshopts" -Ha $(pwd)/ $CICO_hostname:payload \

And also it makes it concurrent. Why do you need this?

Hi, so we have a PR check which is failing on a rebase. https://ci.centos.org/job/devtools-saas-openshiftio-pr-check-rh-che/
I think that the reason of failure is because we use two git repose in scm section. But it is just a guess, I'm not much familiar with jenkins definitions. The reason why we have two git repos is that we need to run the code when PR is pushed to saas-openshiftio but the code we need to run is in rh-che repo. So then, when this script tries to do rebase, it is not in git repo and job fails.
All I need from this job is just to be run when PR is opened in saas-openshiftio but run the scripts from rh-che. If I there is any easier way how to do it, please let me know.
Currently I don't know how to disable this rebase (as we don't need it at all in this PR check) when using job_template_defaults so I wrote a new one.
And the second change is in last line you shared
-rsync -e "ssh $sshopts" -Ha $(pwd)/ $CICO_hostname:payload

I've changed it to -rsync -e "ssh $sshopts" -Ha $(pwd)/rhche/ $CICO_hostname:payload because as I said, we need only rh-che code to execute PR check logic.
So you are right, mainly it is copy-paste, but without logic that we don't need and which causes failures.

I have the same questions as @jmelis... but since this  affects only devtools-saas-openshiftio-pr-check-rh-che I'm +1 if all the listed changes are expected

@riuvshin I tried to answer these question in my comment. If there is something unclear or there is a better way how to do this, please let me know. If not, I would like to have it merged to see if it fixes the problem.

@jmelis @pbergene  could you please take a look? Without this  we do not have any tests in place before promotion to prod ¯_(ツ)_/¯

I'm not sure about this PR to be honest. We still don't know why this is failing on a rebase. I'd feel much more confident if we knew why this is needed, instead of taking a wild guess.

OK, I think I understand now. Not 100% sure but I think that since you have modified the rsync statement you are not syncing over the .git directory, meaning that the target dir is indeed not a git repo, there the rebase test fails.
On the other hand you are also running the regular test separately which does verify the rebase test, so I agree we don't need to run that test twice.

@Katka92: right, I now understand the whole flow, sorry it took me so long. Thanks for explaining it in detail in your comment. Everything makes sense now.
Approving!


Whac - a - mole game

Creating a whac - a - mole game using html css ans js

@VidhiBhatt01 plz assign this issue to me


Add IoU/GIoU for boxes

🚀 Feature

Motivation

IoU/GIoU are ametrics essential for the detection domain.
Pitch

Add metrics, for fast implementation these could be based on torchvisions functions.
Alternatives

Additional context

I think we can use this code, right?
https://github.com/PyTorchLightning/lightning-bolts/blob/0.5.0/pl_bolts/metrics/object_detection.py

There is an even easier solution if we use torchvision. I can create a draft tomorrow

There is an even easier solution if we use torchvision. I can create a draft tomorrow

I would try to keep own implementations if possible :rabbit:

@Borda - I can take this issue :)


Change typing to follow newer syntax for subscriptable types

https://peps.python.org/pep-0585/#implementation

Note - pydantic in Python 3.8 won't support this - so all BaseModels need to keep legacy syntax until we drop 3.8 support


HMAC

Hi, thanks for this sharing this idea and this package!
I was thinking to not store the tokens, but validate them using HMAC, like I use for validating the user accessToken present in the cookie.
What do you think about? Is it possible to detach the "store" part of this module?
Thanks!

Hey!
Not quite sure what you try to do, but you can always write your own storage module: https://github.com/florianheinemann/passwordless-tokenstore-test
E.g., you could write a thin layer above one of the standard storage modules (e.g. MongoDB) and just make sure all the tests from the link above pass
Cheers


Have a bibliography

Instead of citing each time the whole paper it would be nicer to have a bibliography and to reference it using https://build-me-the-docs-please.readthedocs.io/en/latest/Using_Sphinx/UsingBibTeXCitationsInSphinx.html

Dismissed in favour of local references!
Pro local:

Easier to find
Easier to implement

Con:

Duplicate references


⚠ SkipTheCommericals has degraded performance

In a8cad59, SkipTheCommericals ($STC) experienced degraded performance:

HTTP code: 200
Response time: 6490 ms

Resolved: SkipTheCommericals performance has improved in a87aaa6.


Optimize the parameter types of ParamValues's methods

Which issue does this PR close?

Closes #8612.
Rationale for this change

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

I took the liberty of merging up from main on this branch to make sure there are no logical conflicts


refactor outline construction

Outline no longer implements Default. (The default value was not a valid outline, because the root index was out of bounds of the tree.)
build_outline() now returns the Outline instead of modifying the default value.
The implementation of build_outline has been refactored:

less unwraps needed
Use a single sibling_stack instead of a vector-of-vectors for fewer allocations

I think a rebuild mechanism would be useful, but it would have a different type signature; I considered making the core of this algorithm more like an iterator, with a OutlineBuilder containing the local variables in this loop. Presumably that is the data structure you would want to have an append method on. Outline in some sense loses information since it closes off the nodes at the end of the file, making them unsuitable for later appends. (I didn't check whether tree nodes are immutable once created, but the code seems to be written as if they are so I went with that. If you allow the tree nodes themselves to be modified, you could append directly to an Outline by pushing to the appropriate node along the right spine of the tree.)


python3Packages.pydicom: unbreak

Motivation for this change
pydicom has been failing on hydra since c9a189fdf98d. The latest release moved some data required for the tests into a separate github repo.
Things done

[X] 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"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[X] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 107864 run on x86_64-linux 1

24 packages built:

python37Packages.dcmstack
python37Packages.dicom2nifti
python37Packages.dipy
python37Packages.heudiconv
python37Packages.nibabel
python37Packages.nilearn
python37Packages.nipy
python37Packages.nipype
python37Packages.nitime
python37Packages.pybids
python37Packages.pydicom
python38Packages.dicom2nifti
python38Packages.dipy
python38Packages.nibabel
python38Packages.nilearn
python38Packages.nipy
python38Packages.nipype
python38Packages.pybids
python38Packages.pydicom
python39Packages.dicom2nifti
python39Packages.dipy
python39Packages.nibabel
python39Packages.nipy
python39Packages.pydicom

Result of nixpkgs-review pr 107864 run on x86_64-darwin 1

1 package failed to build:

python37Packages.nitime

24 packages built:

python37Packages.dcmstack
python37Packages.dicom2nifti
python37Packages.dipy
python37Packages.heudiconv
python37Packages.nibabel
python37Packages.nilearn
python37Packages.nipy
python37Packages.nipype
python37Packages.pybids
python37Packages.pydicom
python38Packages.dicom2nifti
python38Packages.dipy
python38Packages.nibabel
python38Packages.nilearn
python38Packages.nipy
python38Packages.nipype
python38Packages.pybids
python38Packages.pydicom
python39Packages.dicom2nifti
python39Packages.dipy
python39Packages.nibabel
python39Packages.nipy
python39Packages.nipype
python39Packages.pydicom

@SuperSandro2000: Review addressed & force pushed.

Closing in favor of #107550, which this was a dupe of.


Support for "fixed" RedisLabs subscriptions

Hello.
It is more a question than an issue to fix. RedisLabs provides two types of subscriptions:

"fixed" - for low-throughput use cases
"flexible" - for any dataset size or throughput

I want to create a "fixed" subscription using your terraform-provider-rediscloud. However, it creates a "flexible" subscription by default. Is there any way to force the provider to create the "fixed" subscription?
Thanks in advance.

Hi,
I'm facing the same issue. @johndorian93 did you find a workaround?
Pricing difference between Fixed and Flexible is huge so at lease for development environment I would like to have a Fixed subscription.

Hi,
I've got a reply from Redislab stating the following:

Flexible and Fixed subscriptions are conceptually different:
Fixed - Runs on a shared environment, intended for low usage and non-critical data loads. It can only scale in memory and up to a specific limit, not meant for performance. It does not support clustering, OSS API, and other options that might be needed for an enterprise-grade system.
Flexible - Runs on a dedicated environment, intended for production and enterprise-grade. Can scale both in memory and performance almost unlimited.
Due to this nature, Terraform and API support are available for Flexible subscriptions only.

Ah glad I finally found this. I feel like this should be stated somewhere explicitly in the docs.

Redis Labs started supporting managing Fixed plan in API, so will this be supported by the terraform provider as well?
https://api.redislabs.com/v1/swagger-ui/index.html#/Subscriptions - Fixed


onClose does not close modal when it should

Stack overflow question:
https://stackoverflow.com/questions/48586915/modal-fires-onclose-before-opening-modal

Please fill issue template fully and add a codesandbox example.


Installation problems

on php artisan voyager-frontend:install
` Symfony\Component\Process\Exception\ProcessFailedException  : The command "
npm i foundation-sites scrollreveal motion-ui jquery --save-dev &&
npm uninstall bootstrap bootstrap-sass --save-dev &&
npm run dev
" failed.
Exit Code: 1(General error)
Working directory: /Users/alberto/Sites/test
Output:

<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>added 4 packages from 4 contributors and audited 4 packages in 1.772s
found 0 vulnerabilities

Error Output:
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN<EMAIL_ADDRESS>requires a peer of<EMAIL_ADDRESS>but none is installed. You must install peer dependencies yourself.
npm WARN deprecated<EMAIL_ADDRESS>gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR!     https://npm.community
at /Users/alberto/Sites/test/vendor/symfony/process/Process.php:223
219|      */
220|     public function mustRun(callable $callback = null, array $env = array())
221|     {
222|         if (0 !== $this->run($callback, $env)) {

223|             throw new ProcessFailedException($this);
224|         }
225|
226|         return $this;
227|     }

Exception trace:
1   Symfony\Component\Process\Process::mustRun()
/Users/alberto/Sites/test/vendor/pvtl/voyager-frontend/src/Commands/InstallCommand.php:97
2   Pvtl\VoyagerFrontend\Commands\InstallCommand::handle(Object(Illuminate\Filesystem\Filesystem))
/Users/alberto/Sites/test/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:29
Please use the argument -v to see more details.`

Hi @trippo
Looks like it's an NPM issue. Unfortunately I can't replicate. What version of Node and NPM are you running?
I'm on:
➜  ~ node -v
v10.6.0
➜  ~ npm -v
6.2.0

node v8.9.4
ppm 6.2.0

Hi @trippo
I believe @lukewmoore fixed this with v0.8.3
Can you please confirm?

I can't replicate the issue using npm 6.2.0, I believe this issue is related to the local npm installation and not voyager-frontend. You can try running npm cache clean --force to reset the npm cache before running php artisan voyager-frontend:install to see if that helps.


WIP: Support Cambridge Research AudioFile for output

Adds support for Cambridge Research AudioFile devices. Todo:

[x] Add support for writing XML playlists
[ ] Add support for ec.load_buffer to take a string filename to load and buffer the track
[ ] Add support for AudioFile sound controller w/USB control of track number

[ ] Ensure ec.stim_fs == 44100
[ ] Preload Playlist.xml file
[ ] Check that file exists, load it, check fs, raise error if incorrect
[ ] Send USB command to queue given track
[ ] Send USB command to play/pause

Closing since we probably won't actually use this :(


How to choose user role when doing a request?

I have a logged-in user. User has 2 roles: user and me. By default, all requests are going out with the user default role. How to use the me role for a specific request?
final nhostClient = NhostClient(
  subdomain: Subdomain(
    region: 'eu-west-2',
    subdomain: 'absdef...',
  ),
  authStore: SecureStorageProvider(),
);

final graphqlClient = createNhostGraphQLClient(nhostClient);

final QueryOptions options = QueryOptions(
  document: gql(someQuery),
);

final result = await graphqlClient.query(options);

You need to pass the header X-Hasura-Role with the value of the role you want to use. You can refer to https://pub.dev/packages/graphql for more details on how to specify headers in your requests.
Closing as I don't think there is anything to do here but feel free to reopen otherwise.
Thanks!

@dbarrosop thanks for the quick response.
Here is a solution I ended up with. Leaving it here in case anyone will face the same question.
final nhostClient = NhostClient(
  subdomain: Subdomain(
    region: 'eu-west-2',
    subdomain: 'absdef...',
  ),
  authStore: SecureStorageProvider(),
);

final graphqlClient = createNhostGraphQLClient(nhostClient);

final QueryOptions options = QueryOptions(
  document: gql(someQuery),
  context: Context.fromList(const [
    HttpLinkHeaders(headers: {'X-Hasura-Role': 'me'})
  ]),
);


Implement Github Actions

Wouldn't Github Actions be useful to see if this project could build?

Thanks, I will try it in my free time.


How to train a model using real preoperative CT scans and intraoperative X-ray images taken with a C-arm machine？

Dear Vivek,
I'm currently experimenting with your work and have some possibly basic questions. I hope you wouldn't mind enlightening me.

If I collect an X-ray image intraoperatively, how do I obtain its corresponding intrinsic and extrinsic parameters? Can this information be obtained from the manufacturer or the device itself?
How is the pose corresponding to this projection captured, in the world coordinate system or the camera coordinate system?
If the CT scan covers the entire spinal region, but only a portion of the lumbar vertebrae is captured in the intraoperative X-ray, how would one go about constructing DRR models and training in such a scenario?
My questions might be a bit numerous, I hope you won't find me annoying, and provide valuable guidance.

Hi @98zhenyu, if your intraoperative X-rays are DICOMs, it's possible to extract the intrinsic and extrinsic parameters. There are a few parameters you need from the metadata (SourceToDetectorDistance, SourceToPatientDistance, PrimaryPositionerAngle, SecondaryPositionerAngle, etc.). From here, you can construct an initial pose estimate (the exact details are a little complicated, I can describe more detail if that would be helpful).
The pose that you get from DICOM does not account for the motion of the patient, so you need to do some iterative optimization to refine the pose. This pose is in the world coordinate system.
Even if your CT captures more anatomy than your X-ray, I would start by trying to do the alignment as normal. In my experience, registration usually works even if there is a mismatch between the two modalities. If that doesn't work, you can try cropping the CT to better match the X-ray.

Thank you very much for your prompt reply! Could you please describe in detail how to estimate the initial pose using parameters obtained from DICOM metadata？

In training the Deepfluoro dataset, the isocenter_pose is defined as follows：
isocenter_rot = torch.tensor([[torch.pi / 2, 0.0, -torch.pi / 2]])         isocenter_xyz = torch.tensor(self.volume.shape) * self.spacing / 2         isocenter_xyz = isocenter_xyz.unsqueeze(0)         self.isocenter_pose = RigidTransform(             isocenter_rot, isocenter_xyz, "euler_angles", "ZYX"         )
I can understand that the isocenter_pose is defined in the AP view direction at volume isocenter. However, I don't understand why in Appendix D of the Diffpose paper it states: 'DiffDRR initializes the camera at (f/2, 0, 0) pointed towards the negative x-direction.' I'm not sure why isocenter_pose corresponds to (f/2, 0, 0) pointed towards the negative x-direction. Am I misunderstanding something?

closing with #24


Ungraceful error handling

When I set the TTL of the Set method which is not a duration constant from a time package like time.Duration(time.Now().UTC().Unix()) instead of time.Minute or something similar, the library neither gives compile time nor runtime error. It does not save the value in Redis which is very hard to debug.
func usePrecise(dur time.Duration) bool {
return dur < time.Second || dur%time.Second != 0
}
Apparently, the error is because the duration must be multiple of a second which we found after debugging for a while. This error should be handled gracefully.

the library neither gives compile time nor runtime error.

You should either ask Go developers to add compile time errors or Redis developers to forbid small durations. It is not go-redis responsibility.


Very minor efficiency update

[Who] As a Developer
[What] I need to maximise code efficiency
[Value] In order to minimise resource usage

Closing for age, no DCO signed.


set current culture to browser culture by default (validation)

In mvc 5 I had this in web.config:
<globalization culture="auto" uiCulture="auto"/>
this way I was getting the browser culture when calling:
Thread.CurrentThread.CurrentCulture
what's the equivalent of this in mvc 6 ?
atm the default culture is the one used by my windows not by the browser
so I'm calling: CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern and getting the browser culture dateformat (MM/dd/yyyy)
but on form POST of a date value the ModelState is invalid because it expects the dateformat of my windows (dd/MM/yyyy)

See https://docs.asp.net/en/dev/fundamentals/localization.html

@danroth27 I tried
services.AddMvc().AddDataAnnotationsLocalization()
still having the same problem
the validation is ignoring the browser language ( Accept-Language header )
calling CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern gives the correct format (according to Accept-Language header)
but a property in a viewmodel like this:
        [Required]
        public DateTime? Date { get; set; }

is not being validated
I would get an error message like:

The value '07/20/2011' is not valid for Date.
but if the date is something like this 01/01/2011 it validates ok

@danroth27 looks like this is impossible for now, unless you change it
http://stackoverflow.com/questions/36590969/enabling-client-based-culture-in-asp-net-core

@DamianEdwards @ryanbrandenburg
We ship localization middleware that you can add to your application to setup the correct culture for you.
I don't see anything from the StackOverflow thread that indicates an issue that we need to address. What specifically do you need us to change? Why does the localization middleware not work for you?

@danroth27 the problem is mentioned in the many comments on the answer
right now the app can't support all cultures by default (auto),
you have to specify all possible cultures
Something like:
app.UseRequestLocalization(new RequestLocalizationOptions()
            {
                SupportedCultures = new List<CultureInfo>
                {
                    new CultureInfo("de"),
                    new CultureInfo("en"),
                    new CultureInfo("fr"),
           ...
                }
            }, new RequestCulture("en"));

you can see this:
https://github.com/aspnet/Localization/issues/237
and this I believe is the change that created the problem: https://github.com/aspnet/Localization/issues/111

Copying my comment from https://github.com/aspnet/Localization/issues/111#issuecomment-209539299:
=========
@omuleanu I believe there were some concerns around allowing completely arbitrary cultures that browsers send, which would potentially cause internal culture caches to potentially grow infinitely, causing memory issues. On OSes such as Windows 10, there is an infinite number of valid cultures, and ASP.NET Core Localization has to cache them (because creating cultures is a bit expensive), so if browsers send en-US-1, en-US-2, ..., en-US-9999 then ASP.NET's culture cache would grow and take up all memory.
Our belief is that sites only support a relatively small set of cultures (at most a few dozen, and that's extremely rare), so listing them all is reasonable.
If a site wishes to support completely arbitrary cultures (i.e. allow anything a browser sends), then they will have to use some other middleware.
@ryanbrandenburg @DamianEdwards was this the exact reason? Or was there something else?

In regard to this specific request, ASP.NET Core will not set the culture automatically out-of-the-box. ASP.NET Core is designed around "pay as you go" so you have to enable all the features you want, which means almost nothing is enabled automatically.


Add vpcTransactionService field to Chain

Closes #132

Adds a new field to Chain – vpc_transaction_service_uri
This field is similar to transaction_service_uri but will hold the VPC url of the transaction service

@jpalvarezl Converted this one to draft just to target a new release (so we don't accidentally merge it)


Aggregate Window Function Semantics Diff: For Empty Frame, Presto return default value, Velox return null

Bug description
Test Case:
// TestMultipleWindowSpecifications.java
assertWindowQuery("count(orderkey) OVER (PARTITION BY orderstatus ORDER BY orderkey ROWS BETWEEN 3 PRECEDING AND 2 PRECEDING)",
        resultBuilder(TEST_SESSION, BIGINT, VARCHAR, BIGINT)
                .row(3, "F", 0L)
                .row(5, "F", 0L)
                .row(6, "F", 1L)
                .row(33, "F", 2L)
                .row(1, "O", 0L)
                .row(2, "O", 0L)
                .row(4, "O", 1L)
                .row(7, "O", 2L)
                .row(32, "O", 2L)
                .row(34, "O", 2L)
                .build());

The Frame definition here is: ROWS BETWEEN 3 PRECEDING AND 2 PRECEDING, for some row the frame is empty, in Velox, the result is:
orderkey	orderstatus	orderdate	w0
----	----	----	----
3	F	1993-10-14	<NULL>
5	F	1994-07-30	<NULL>
6	F	1992-02-21	1
33	F	1993-10-27	2
1	O	1996-01-02	<NULL>
2	O	1996-12-01	<NULL>
4	O	1995-10-11	1
7	O	1996-01-10	2
32	O	1995-07-16	2
34	O	1998-07-21	2

Some are NULL rather than the expected 0.
System information
Not relevant.
Relevant logs
No response

@pramodsatya has found this last week and was working on it.

Thanks for sharing the issue @xumingming, I am working on it and will provide an update soon.


Android + Fabric : ANR on TextInput

Describe the bug
Since my app is on fabric, I have many ANR on text input
here is one of the stack traces
io.sentry.android.core.ApplicationNotResponding: ANR
    atsyscall
    at__futex_wait_ex
    atNonPI::MutexLockWithTimeout
    atoffset 4a8000) (std::__ndk1::mutex::lock
    atoffset 12b8000) (facebook::react::Binding::schedulerDidFinishTransaction
    atoffset 12b8000) (facebook::react::Scheduler::uiManagerDidFinishTransaction
    atoffset 12b8000) (facebook::react::UIManager::shadowTreeDidFinishTransaction const
    atoffset 12b8000) (facebook::react::ShadowTree::mount const
    atoffset 12b8000) (facebook::react::ShadowTree::tryCommit const
    atoffset 12b8000) (facebook::react::ShadowTree::commit const
    at
    atoffset 12b8000) (facebook::react::ShadowTreeRegistry::visit const
    atoffset 1900000) (reanimated::NativeReanimatedModule::performOperations
    atoffset 1900000) (facebook::jni::detail::MethodWrapper<void , &reanimated::NativeProxy::performOperations, reanimated::NativeProxy, void>::dispatch
    atoffset 1900000) (facebook::jni::detail::FunctionWrapper<void , facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<reanimated::NativeProxy, facebook::jni::detail::BaseHybridClass>::JavaPart, facebook::jni::JObject, void>::_javaobject*, void>::call
    at com.swmansion.reanimated.NativeProxy.performOperations
    at com.swmansion.reanimated.NodesManager.performOperations(NodesManager.java:225)
    at com.swmansion.reanimated.NodesManager.onEventDispatch(NodesManager.java:337)
    at com.facebook.react.uimanager.events.FabricEventDispatcher.dispatchEvent(FabricEventDispatcher.java:71)
    at com.reactnativekeyboardcontroller.extensions.ThemedReactContextKt.dispatchEvent(ThemedReactContext.kt:23)
    at com.reactnativekeyboardcontroller.listeners.FocusedInputObserver.dispatchEventToJS(FocusedInputObserver.kt:163)
    at com.reactnativekeyboardcontroller.listeners.FocusedInputObserver.syncUpLayout(FocusedInputObserver.kt:153)
    at com.reactnativekeyboardcontroller.listeners.FocusedInputObserver.layoutListener$lambda$0(FocusedInputObserver.kt:57)
    at com.reactnativekeyboardcontroller.listeners.FocusedInputObserver.$r8$lambda$l4n8HFqvwhvLaxfgqXOCa3idsFI(unavailable:0)
    at com.reactnativekeyboardcontroller.listeners.FocusedInputObserver$$ExternalSyntheticLambda0.onLayoutChange(D8$$SyntheticClass:0)
    at android.view.View.layout(View.java:25180)
    at com.facebook.react.fabric.mounting.SurfaceMountingManager.updateLayout(SurfaceMountingManager.java:849)
    at com.facebook.react.fabric.mounting.mountitems.IntBufferBatchMountItem.execute(IntBufferBatchMountItem.java:140)
    at com.facebook.react.fabric.mounting.MountItemDispatcher.executeOrEnqueue(MountItemDispatcher.java:387)
    at com.facebook.react.fabric.mounting.MountItemDispatcher.dispatchMountItems(MountItemDispatcher.java:293)
    at com.facebook.react.fabric.mounting.MountItemDispatcher.tryDispatchMountItems(MountItemDispatcher.java:126)
    at com.facebook.react.fabric.FabricUIManager$3.runGuarded(FabricUIManager.java:831)
    at com.facebook.react.bridge.GuardedRunnable.run(GuardedRunnable.java:29)
    at com.facebook.react.fabric.FabricUIManager.scheduleMountItem(FabricUIManager.java:835)
    at com.facebook.react.fabric.BindingImpl.reportMount
    at com.facebook.react.fabric.FabricUIManager$MountItemDispatchListener$1.run(FabricUIManager.java:1276)
    at android.os.Handler.handleCallback(Handler.java:959)
    at android.os.Handler.dispatchMessage(Handler.java:100)

it always deal with
   at com.facebook.react.uimanager.events.FabricEventDispatcher.dispatchEvent(FabricEventDispatcher.java:71)
   at com.reactnativekeyboardcontroller.extensions.ThemedReactContextKt.dispatchEvent(ThemedReactContext.kt:23)
   at com.reactnativekeyboardcontroller.listeners.FocusedInputObserver.dispatchEventToJS(FocusedInputObserver.kt:163)

and the issue is not systematic (first try sometimes works fine)
Code snippet
I don't use directly the api on concerned screen, I just have KeyboardProvider in my App.tsx file
Repo for reproducing
I will try to make one soon
To Reproduce

Go to screen with input text
Tap on it (to get focus)
The app is frozen

Smartphone (please complete the following information):

Desktop OS: macOs 14.6.1
Device: reproduced on several devices: Samsung (phones and tabs), Redmi ...
OS: Android 14
RN version: 0.76.1
RN architecture: new
JS engine: Hermes
Library version: 1.14.4

@mlecoq which reanimated version do you use?
keyboard-controller intercepts TextInput events, so when you focus input or blur it then keyboard-controller will intercept these events and will dispatch them to JS as well... But I'm really curious how it can produce race conditions 🤔

seems to be related to https://github.com/kirillzyusko/react-native-keyboard-controller/issues/683 - when I remove animated components on the screen, the crash does not occur

@mlecoq which reanimated version do you use?
keyboard-controller intercepts TextInput events, so when you focus input or blur it then keyboard-controller will intercept these events and will dispatch them to JS as well... But I'm really curious how it can produce race conditions 🤔

3.16.1

@mlecoq I spoke with @tomekzaw and he told me that the problem most likely is the same as https://github.com/software-mansion/react-native-reanimated/issues/6418#issuecomment-2296107100
Can you try to build RN from source and enable allowRecursiveCommitsWithSynchronousMountOnAndroid flag? This flag should be enabled by default starting from RN 0.77, but in a meantime the only one solution is to patch it and build from source 😔

Ok I will try that, thanks @kirillzyusko

@mlecoq please, keep me updated how it goes 🙏

@kirillzyusko I confirm that the flag fixes this issue and #683

@mlecoq awesome! Did you built RN from source? Or found the other way to enable this flag?

I had to build rn from source


Python SDK: "grpc: received message larger than max"

When attempting to add source_raw to the proxmox_virtual_environment_file resource, I am receiving the following error:
Exception: grpc: received message larger than max (<size> vs. 419430400)

Stack Trace:
<parent>/venv/Lib/site-packages/grpc/_channel.py", line 849, in _end_unary_response_blocking
        raise _InactiveRpcError(state)
    grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
        status = StatusCode.RESOURCE_EXHAUSTED
        details = "grpc: received message larger than max (<size>vs. 419430400)"
        debug_error_string = "UNKNOWN:Error received from peer ipv4:<IP_ADDRESS>:56826 {grpc_message:"grpc: received message larger than max (<size> vs. 419430400)", grpc_status:8, created_time:"2023-05-28T19:21:14.603349452+00:00"}"

<size> is close to 550000000.
As it exceeds the gRPC maximum, I am wondering if there is a multi-part upload to chunk the large file into separate parts.

can you please open an upstream issue in https://github.com/bpg/terraform-provider-proxmox (and reference it here)?
this provider uses a terraform bridge passing everything through to the used upstream terraform module. this looks more like it's an issue when the terraform code tries to send the data to proxmox.

closed due to upstream issue being resolved.