Encapsulate all boundary conditions in a separate class

In the interest of minimizing PR size this is just a first iteration demonstrating some useful functionality that becomes possible when boundary conditions are stored in their own class.
This PR also removes the nonlinear-specific logic in the solid solver that sets the full list of DOFs in the NLForm and replaces it with some elementary boundary condition operations that were already in use - zeroing out the entries of a vector corresponding to the DOF indices, eliminating from a matrix, etc.  The use of a single class to manage DOFs also simplifies these operations by maintaining a single list of DOFs for all Dirichlet BCs, removing the need to iterate over them for each operation.
Accessors to the underlying lists of BCs are still used liberally but these will be eventually removed.
This PR is another step toward the compositional approach described in #118.

We discussed a similar idea before Josh showed up, and my basic idea was something a little bit different (promoting different types of boundary conditions to different types). Two skeleton implementations of the container class are shown here (one with std::variant, one with std::tuple)
https://godbolt.org/z/P368e6
Having different types allows the boundary condition implementation to limit the scope of its application, and each combination of physics can clearly describe the list of supported boundary conditions.

We discussed a similar idea before Josh showed up, and my basic idea was something a little bit different (promoting different types of boundary conditions to different types). Two skeleton implementations of the container class are shown here (one with std::variant, one with std::tuple)
https://godbolt.org/z/P368e6
Having different types allows the boundary condition implementation to limit the scope of its application, and each combination of physics can clearly describe the list of supported boundary conditions.

Ahhh yes. I think this goes along with the physics-specific parameters and material models. I think a physics-agnostic part of the "manager" is nice for stuff like dirichlet operations, general bookeeping, and a unified lookup API, but it would be nice to include strong scopes.
I think this is worth merging as-is since it is still a significant improvement over what's there. Maybe the next task should be coming up with ideas for these physics-specific data types.

Ahhh yes. I think this goes along with the physics-specific parameters and material models. I think a physics-agnostic part of the "manager" is nice for stuff like dirichlet operations, general bookeeping, and a unified lookup API, but it would be nice to include strong scopes.

That was what I was trying to hint at in the godbolt link: all specializations of boundaryconditionmanagers support the same API for dirichlet/neumann, since they are common to every PDE. However, by explicitly naming the other supported bc types, we can prevent a user (at compile time) from trying to add a radiation boundary condition to a displacement field, for example.

I think this is worth merging as-is since it is still a significant improvement over what's there. Maybe the next task should be coming up with ideas for these physics-specific data types.

I agree! I'm a little bit roadblocked on another branch trying to figure out how to do some of the things in this PR, so the sooner the better in my book.

LGTM

Maybe the next task should be coming up with ideas for these physics-specific data types.

As we gain more customers/solvers I think we'll be able to do this more intelligently - in particular I'm wondering if we'll see any common operations, but even the existing stuff mentioned above plus the ability to iterate over conditions of a specific type is definitely an improvement.

LGTM


For configs, use a file (json, ini, yaml) that allows a user to change/customize behavior

For example, in wads.
It's my way of putting configs in a place that a user can choose to edits if they want to control the behavior of the software without touching the code.
Perhaps there's better ways to do this.
For example, using ini or yaml format to do the same.
I don't know what the industry standard for this problem pattern is.

.inf (based on ini file)
dynaconf
python uses a lot of .toml (the ini files that should have been)

Configuration projects:

https://pypi.org/project/dynaconf/
https://pypi.org/project/python-decouple/

Formats:

https://en.wikipedia.org/wiki/TOML -- has a nice comparison table with other Formats

~/.config:

https://stackoverflow.com/questions/1024114/location-of-ini-config-files-in-linux-unix
https://unix.stackexchange.com/questions/33943/what-config-refers-to-and-how-to-put-files-there

https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard -- POSIX system standard

Windows env vars: https://docs.microsoft.com/en-us/windows/deployment/usmt/usmt-recognized-environment-variables


Fixed main menu FadeIn/FadeOut buttons glitch.

On develop branch FadeIn/FadeOut works a little bit better, so I just fixed the button alpha property glitch. I also disable buttons during transition, to prevent clicking on them in order to avoid potential glitches.
On the modern BabylonJS versions disabling the buttons draws them in a grayscale. We can try to find a way to suppress this behavior, but honestly, I don't think it looks bad. It explicitly says that the menu is in transition, so user needs to keep hands away.

I made changes. renderToIntermediateTexture fixes the alpha error with buttons, however we still need to disable them during transition. I think it's the right thing to do.

hey sorry I've been quiet on this - been under the weather. I'll be circling back to this in the next few days though - thanks for your patience!

disabling the buttons draws them in a grayscale. We can try to find a way to suppress this behavior, but honestly, I don't think it looks bad. It explicitly says that the menu is in transition, so user needs to keep hands away.

I watched it a few times to get a good sense of this, and I agree it's possible for us to set the disabled styles such that we don't have the greyscale transition but I don't see it being a bad thing necessarily either.
LGTM - and thanks!


[3/4] Clean up integration page codes by re-orging redux and components

Describe your changes and why you are making these changes
This PR refactors integration related code to make it more readable and easier to add future changes. Specifically we made two main changes:

we centralized all single-integration related reducers integrationTables integrationTable and integrationOperators into one reducer integration. In this way adding new feature is easier since we just need to add a new field / actions to this reducer, rather than adding a new reducer. The top-level store object is also cleaner. We also moved all use of ExecutionStatus to LoadingStatus instead.
We moved preview subcomponent in integration page to separate file (IntegrationObjectList) and manage state inside these components. This cleans up the convoluted state and component management in integration/id/index page and reduce the top-level page file from 300 lines to 130 lines, and most contents are just useSelector, useEffects and rendering. Complex application logics are moved to smaller components.

Related issue number (if any)
ENG-1479
Checklist before requesting a review
Demo in #293 , integration test in #276

[x] I have created a descriptive PR title. The PR title should complete the sentence "This PR...".
[x] I have performed a self-review of my code.
[x] I have included a small demo of the changes. For the UI, this would be a screenshot or a Loom video.
[x] If this is a new feature, I have added unit tests and integration tests.
[x] I have run the integration tests locally and they are passing.
[x] I have run the linter script locally (See python3 scripts/run_linters.py -h for usage).
[x] All features on the UI continue to work correctly.
[x] Added one of the following CI labels:

run_integration_test: Runs integration tests
skip_integration_test: Skips integration tests (Should be used when changes are ONLY documentation/UI)

How do these changes impact https://github.com/aqueducthq/aqueduct/pull/284 if at all?
I've briefly skimmed this code and afaik, it doesn't, but just making sure.

@agiron123 we are lucky! These two pages didn't seem to fight each other.


Naive Bayes classification

Before you submit this PR: make sure to put all operations-related information in a wiki-note, a PR should be about code and is publicly accessible
What does the code in this PR do / what does it improve?
Naive Bayes classification
Can you briefly describe how it works?
Add a new class to do peak classification, this requires PR 637
Can you give a minimal working example (or illustrate with a figure)?
Using the peaklets waveforms to inference peaklets type, currently we override the current classification method with the Bayes. At the event level user have access to posteriors probabilities.
Please include the following if applicable:

[ ] Update the docstring(s)
[ ] Update the documentation
[ ] Tests to check the (new) code is working as desired.
[ ] Does it solve one of the open issues on github?

Notes on testing

Until the automated tests pass, please mark the PR as a draft.
On the XENONnT fork we test with database access, on private forks there is no database access for security considerations.

All italic comments can be removed from this template.

Currently the test are failing because the URL configs points to a local file on dali, any suggestion here?

Currently the test are failing because the URL configs points to a local file on dali, any suggestion here?

The default value for configs should not be set to values that only work on a specific site.
If you want the defaults to be those specific files, you need to add the files to private_nt_aux_files and change the path the the file name so the resource:// protocol can find the file in the mongo database.
Alternatively, you can set the defaults to dummy values (arrays) and set the config to the local paths in dali when you run on dali. But if these files are meant to be used in most processing contexts then i would suggest using the former solution.

I converted it to a draft for the moment, until things are verified. Just ping me if we have to discuss things.

See this PR


remove ember data to save 30kb gzipped

When running ember build -e production
Before:
vendor-157bfabb769db851f4d076db5e17f78e.js: 831.65 KB (215.91 KB gzipped)
After:
vendor-9831d78190db4b5a3dc7176abf12c80f.js: 695.44 KB (184.78 KB gzipped)
ember s works. I didn't try deploying to surge. Would suggest trying that before merging.

@MarkhamShofner please review

Observed a similar drop in size, and deploy to surge was successful. Merged.


Updated css class names to be BEM complient

Fix for #73 to updated CSS class names to be BEM compliant. Also moved some inline CSS in to people.css

@warpech @threezool Do you think we should just refactor all the CSS in the people app? because I think it's a little all over the place

@Joltrix Yes, I think it can use more polishing.
For example people-persons-double-list-clear-all would not be needed at all, if people-persons-double-list used flexbox instead of floats.

Ping @threezool. What's the progress on this?

Yah sorry for the delay, have been home sick. The last couple of commits should fix that mix up.

The class .people-autocomplete--group-member__item[disabled] is not used ether what i can see, should that one be removed also?

It is used. [disabled] in this selector means an attribute:

{{item.Name}}

Ahh so that is how its used, make sense. Last commit removed just the one unused class.

Sorry, but that's just 1/3rd of my point.
The other 2/3rds are:

.people-autocomplete--group-member__item[disabled]

^ this CSS can be changed to .people-autocomplete__item[disabled]

<li on-mousedown="selectParent" class="people-autocomplete--group-member__item"

^ this HTML can be changed to <li on-mousedown="selectParent" class="people-autocomplete__item"

Ahh, forgot to update that one also, my mistake.

Ping @threezool and @Joltrix. Guys, can we please finish this one?

@warpech
I missed that you had cc'd me, I'll get on it during the weekend or on monday afternoon!

@warpech In GroupsPage, there is a table, with the block class people-table , and all its elements are correctly named like people-table__header or people-table__column--wide
Is this correct, even though the class people-table is unused? (I cannot find any CSS applied to that class, nor any Javascript), So (unless I missed it) it is just there to fill a block name.
Does that make all the elements attached to that block invalid? Should all those elements instead be blocks? Or is it fine as long as there is a class with the block name, even though it's unused?

Is this correct, even though the class people-table is unused? (I cannot find any CSS applied to that class, nor any Javascript), So (unless I missed it) it is just there to fill a block name.

Does that make all the elements attached to that block invalid? Should all those elements instead be blocks? Or is it fine as long as there is a class with the block name, even though it's unused?

I think that is fine. Personally, I think I would add an empty definition for it: .people-table { }

@warpech if this looks okay to you, feel free to merge :), if not, just pass it back to me :P

Ah, I didn't know that children of a block had* to be inside of it!
I changed it back to people-double-list-display-button since it's not a direct child of people-double-list, but kept the name like that since it's part of the double list.

Most of the developers have the problem to acknowledge this at first. Any suggestions how to explain it clearer on https://docs.starcounter.io/guides/mapping-and-blending/avoiding-css-conflicts/


Change the default changeset

at least an OSM user link -> https://www.openstreetmap.org/user/MapContrib

Can you elaborate @vinber? I'm not sure to understand the point.
I already changed the changeset attributes two days ago. They are now the same as in MC.

i think there's two informations in the changeset :

theme's link
and a way to ask about MC (github issue or osm account)

Ok, so you want to add a link to ask for feedback. Is that right?
I think that Github issues are more transparent and easier to manage for everybody. Is it ok for you?

The repository moved to https://gitlab.com/mapcontrib/mapcontrib.next.


Should we rename Fleet SDK to something with ergo in its name?

In short, I think Fleet is a great name, but it does not reflect the specific purpose of our Ergo SDK. Should we rename it?
Fleet is a catchy name that fits well in the Nautilus narrative, but it may cause confusion for newcomers. We often see them choosing outdated and unsafe libraries like ergo-ts and ergo-js over actively maintained ones like AppKit, sigma-rust, or Fleet.
I believe this is partly due to the naming. The tooling name should clearly indicate its purpose and scope. Therefore, I would like to hear your opinion on renaming Fleet to something that includes Ergo/ERG in its name.
Some possible alternatives are:

ErgoKit
erg.ts
w3erg (web3 + erg)
ErgoSDK.js
something else?
keep it as Fleet, you damn perfectionist.

v1.0 is quite close and that will represent breaking changes for implementors, so if we are going to rename it, a major release is a good opportunity for it.
I would love to know your opinions and suggestions on this proposal.

Fleet is such a cool name, maybe something like Fleet JS SDK?

w3erg.js would be nice

i like fleet but if you're going to change it to something incorporate dapp
dappSDK.js

Fleet is such a cool name, maybe something like Fleet JS SDK?

i like fleet but if you're going to change it to something incorporate dapp
dappSDK.js

If we are going to rename it, batter to have erg/ergo in its name.

w3erg.js would be nice

I like this one too.

Agreed
IMO something like ergo-web3 would be good. Having "blockchain" and "web3" in the name is a fairly common convention:

<EMAIL_ADDRESS>https://www.npmjs.com/package/@alephium/web3
https://www.npmjs.com/package/web3-eth
etc

Not a fan of abbreviating to "w3", IMO it's too close to "w3c"

If fleet gets renamed then so should appkit. If appkit name does not change then what about appkit-js? If appkit changes then maybe something like ergosdk and ergosdk-js.

Appkit actually already called ergo-appkit for exactly the reasons described in this issue.  It has ergo and purpose in the name.
So I suggest ergo-appkit-js for repo, and Appkit.js for discussions.
This will be consistent with Sigma, Sigma.js naming.
From design perspective, Appkit is dApp facing Java/Kotlin library on top of Sigma.
Similarly if Fleet is renamed to Appkit.js then it will support its role of dApp facing JS/TS library on top of Sigma.js
Other issues:

While ergo-js is archived, there is no clear banner that it shouldn't be used.
ergo-ts should be archived with a BIG banner on the repo, but it belongs to coinbarn.

@glasgowm148 @capt-nemo429
Appkit was designed as a next abstraction layer on top of Sigma. This gives a lot of freedom on the core level in Sigma, while keeping dApp facing APIs stable. (see my above comment)
With the availability of Sigma.js, Fleet (or should I call it Appkit.js) can play the same role for JS/TS.
Sigma-rust, as the name suggests, is a port of Sigma, not Appkit. Thus it is on the core level and is wrapped in JS library (like Fleet)
Appkit-rust makes sense if there is a need to have idiomatic Rust interfaces for transaction building similar to Appkit's and Fleet's builders. While it is possible to do, I'm not sure we need Appkit-rust library at the moment. Much more important for sigma-rust to be on par with Sigma v5.0 now and v6.0 in the future.
Also, upcoming Multisig support in Sigma will be available in both JVM and JS, so another work for sigma-rust to catch up.

Reiterating my comments from the chat below and adding some further discussion
Would be good to have them all using the same naming if that’s logical. Something like

ErgoKit JVM
ErgoKit Rust
ErgoKit JS

That would be the ideal, but unpractical at this point as there are many teams involved. - nemo

Yeah appreciate the difficulties in orchestrating a wider change, but it might be our best shot at doing so before the ecosystem matures any further.
Certainly FleetSharp would need to rename in either case. But would be ideal if we could either change sigma-rust and Appkit too, or alternatively, rename Fleet to match one of them to make it a bit more cohesive.

Another problem is that this naming structure presumes the same, or at least closer APIs. - nemo

I would've assumed they have a similar level of functionality personally but don't have a good grasp on the significance of this. But isn't that something we should be aiming for anyway?

The combination of Fleet and Sigma.JS will provide a similar level of functionality to Appkit, right? So what about JS-AppKit or Appkit-JS ?
sigma-rust is kinda like a basic version of AppKit using a port of the interpreter in rust + tx building tools and bindings, I did see @zackbalbin was working on a rustkit last year, so does it make sense to develop this as Appkit-Rust and use it as the entry point?

@aslesarenko @pulsarz @greenhat

Certainly willing to change the FleetSharp name. I agree we might do good with some better names.

Please do not rename.
When learning a new technology and searching for libraries the cognitive context load is already pretty high. Personally i found it very confusing and overwhelming at the start of my journey that almost anything had either sigma or ergo in it's name. When everything has the same prefix, the prefix becomes meaningless. I hope other developers will follow fleet's example.
Publishing few ultra simple example of fleet usage on medium, twitter or similar should be enough to guide majority of the people to the right library.

I'm glad to see you guys care about Fleet SDK and really appreciate your feed back.

@ross-weir:
IMO something like ergo-web3 would be good. Having "blockchain" and "web3" in the name is a fairly common convention

I like how ergo-web3 sounds.

@lucagdangelo:
If fleet gets renamed then so should appkit. If appkit name does not change then what about appkit-js? If appkit changes then maybe something like ergosdk and ergosdk-js.

Good point!

@aslesarenko:
First of all, I don't think the name is such a big problem. The greater problem is existence of ergo-js and ergo-ts. They should redirect to Fleet ideally.

Yeah, that makes me think. Indeed, the real problem is the existence of outdated/unsecure libraries not the name. Unfortunately we can't do much about that.

@c8e4:
When learning a new technology and searching for libraries the cognitive context load is already pretty high. Personally i found it very confusing and overwhelming at the start of my journey that almost anything had either sigma or ergo in it's name. When everything has the same prefix, the prefix becomes meaningless. I hope other developers will follow fleet's example.

Excellent point, I agree that prefixes become meaningless if everything is ergo or sigma prefixed, but we have something very important here, all of them refers to ergo somehow thus creating a clear semantic connection. If I'm a newcomer and I see a lib called Fleet, the first thing that will come to my ming is that is some kind of fleet management library and probably not worths exploring, generating even more confusion, but if I find something called ergo-ts, my first impression will be different. See my point?

Publishing few ultra simple example of fleet usage on medium, twitter or similar should be enough to guide majority of the people to the right library.

Definitively something that worths exploring, make the framework popular and don't worry about naming 🤔.

Personally, I'm between @ross-weir's and @c8e4's suggestions. But always open to discussions.

@aslesarenko:

Appkit was designed as a next abstraction layer on top of Sigma. This gives a lot of freedom on the core level in Sigma, while keeping dApp facing APIs stable. (see my above comment)
With the availability of Sigma.js, Fleet (or should I call it Appkit.js) can play the same role for JS/TS.

I believe Sigma.JS must be used where it shines: compiler, wallet, interpreter, and so on, on the back-end side. Furthermore, bundle size can be improved a lot once it's stable, from ~11mb to ~2mb, it's far from ideal for front-end usage but can be usable for some edge cases if necessary.
Bundle size is a big concern to Front-end devs and it IS a real concern IMO. Having to load megabytes of code to do something simple as building a transaction or parsing a constant, is a no-go for most of them.
Package Structure

Front-end packages - tiny hand-crafted packages. All are under 40kb and tree-shakeable which can reduce the bundle size even more by eliminating dead code.

core -  transaction building and base models.
crypto - hash functions and byte encoders.
common - utility functions shared across Fleet and Sigma.JS packages.
serializer - basic Sigma constant serializer and parser. Currently full primitive and generic types support.

Back-end packages, bundle size is not a big problem for backend and unit testing usage, so the following packages will be mostly wrappers around Sigma.JS.

compiler - ErgoScript compiler.
mock-chain - A simulated blockchain environment that can be used in composition with the compiler package to unit test contracts.
wallet - Key management and transaction reduction and signing.

Naturally, there are some edge cases, if one needs to parse a box that contains an ErgoTree v0 or work with AVL Trees, for example, Fleet's serializer will not be able to handle that, luckily we have Sigma.JS and sigma-rust to the rescue.

@capt-nemo429

Personally, I'm between @ross-weir's and @c8e4's suggestions. But always open to discussions.

Maybe a third option: keep the name as it is but make like a @fleet-sdk/ergo-web3 package that acts as a prelude package and exposes all commonly used/needed functionality from other fleet packages and acts as a single entrypoint package for devs

Honestly, I don't think the name is of much issue.
A priority should be getting more documentation!

Honestly, I don't think the name is of much issue.
A priority should be getting more documentation!

Agree with this. A new dev probably googles ergo crypto JavaScript/typescript library/SDK/development
It's possible more documentation under a domain (docusaurus maybe?) solves both problems as SEO will work for this.

@capt-nemo429 @ross-weir
The 11Mb is unoptimised size, the optimised full package is 2.1MB, however large part of it is compiler.
Here is the possible plan for Sigma modularisation (this new modules can be independently published artefacts for both JVM and JS).
https://github.com/ScorexFoundation/sigmastate-interpreter/issues/902

@ross-weir @capt-nemo429
I don't agree with putting so much emphasis on the bundle size.
Without compiler Sigma.js is only 1.4M, it is nothing for 80% of cases with current networks and CDNs.
For applications, It makes sense to optimise productivity and time to market, not performance.
A new feature with some inefficiencies is infinitely more valuable that no-features without inefficiencies.
Example, ErgoNode has tons of potential optimisations still, even though many has been done, but, most of the done optimisations was observable bottlenecks first, and only then they was optimised away.
This is the only viable strategy with our small team.
Another example, MrStahlfelge had ZERO issues with crypto, serialisers, signing, interpretation, TX building etc, because he reused Sigma code entirely.
And he cross-compiled it to both Android (yes it is cross-compilation to different VM) and also cross-compiled to RoboVM (it is yet another cross-compilation).
This cross-compilation was one time job (2 weeks for each new VM) and then he spent time on actual new code and features.
Could we have lower app size?
Yes we could do some optimisations, but this has never been an issue. There was once latency issue with first tx singing due cold code in the VM. This was solved by speculatively running in background a fake tx signing just to warm up the JIT in VM, and that solved the glitch problem.
I'm sure similar solution can solve any latency problems in the frontend due to a large library size, just warm up the code in advance.

Reiterating my comments from the chat below and adding some further discussion
Would be good to have them all using the same naming if that’s logical. Something like

ErgoKit JVM
ErgoKit Rust
ErgoKit JS

I like the idea of a unified name for SDKs, but OTOH, what name should sigma-rust JS bindings have? "ErgoKit Rust JS" looks weird.

It looks like the name is not that big of an issue, I would like to say thank you for the insights and amazing discussions. :)
Let's keep it as Fleet and work on better documentation/branding.

thrown a hint earlier but could give a look at [https://docusaurus.io/showcase] for quick scaffolding maybe? @capt-nemo429


idea: Change directory for config and database files

Is your feature request related to a problem? Please describe.
No, it isn't
Describe the solution you'd like
Instead of creating files in execute location, create directory in Local appdata(in windows) to avoid losing files or simple for convenience
Describe alternatives you've considered
User could set files location manually (or both)

That's a great idea. I will try to make it asap ❤

@Nehomex please check new beta release to see if this solution is suiting your needs and if needed, start a discussion here: #8


Cleanup code base

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@1af0b43). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             master        #4   +/-   ##
==========================================
  Coverage          ?   100.00%
==========================================
  Files             ?         1
  Lines             ?       162
  Branches          ?         0
==========================================
  Hits              ?       162
  Misses            ?         0
  Partials          ?         0

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 1af0b43...ed39bcb. Read the comment docs.


Use Blade components instead of directives

I think we could have something like this:
<x-local-time :value="$user->created_at" />
<x-local-date :value="$user->created_at" />
<x-local-time ago :value="$user->created_at" />
<x-local-time relative="weekday" :value="$user->created_at" />

We can use the formats:
<x-local-time format="m/d/Y H:i:s" :value="$user->created_at" />

Implemented


Linked firebase to continue with Google option

I have resolved the issue of connecting firebase when clicked over the continue with Google buttonfor Sign up purpose and also have attached handler for SignUp Button.
I have also redirected the user to dashboard after signing in.
All this under #16
Please review and merge!

🎉 Thank you for resolving the Firebase connection issue and enhancing the sign-up process! Your dedication and expertise have made a significant impact on our project. 🙌


Updating config from legacy config to v1.4

I m way back and using the old config, and there are some options such as poll_rate which went over my head and there are a few missing options...
this is my feature ~rich~ old config:
return {
  "j-hui/fidget.nvim",
  event = "LspAttach",
  config = function()
    local icons_ok, icons = pcall(require, "NeutronVim.core.icons")
    if not icons_ok then
      print("Unable to import icons!")
    end
    local fidget_status_ok, fidget = pcall(require, "fidget")
    if not fidget_status_ok then
      print("fidget not found!")
    end
    fidget.setup({
      text = {
        --stylua: ignore
        spinner = { "⣷", "⣯", "⣟", "⡿", "⢿", "⣻", "⣽", "⣾" },
        done = icons.ui.Check .. "Successfully Initialized:",
        commenced = icons.ui.CircleSmallEmpty, -- CircleSmallEmpty = "○ ",
        completed = icons.ui.CircleSmall, -- CircleSmall = "● ",
      },
      timer = {
        spinner_rate = 200,
        fidget_decay = 3000,
        task_decay = 3000,
      },
      window = {
        relative = "editor",
        blend = 0,
        border = "rounded",
      },
      debug = {
        logging = true,
        strict = true,
      },
    })
  end,
  lazy = true,
}

so can you pls help me?

Roughly speaking:

text.spinner => progress.display.progress_icon; you can just use the existing "dots_negative" pattern
text.done => progress.display.done_icon
text.commenced and text.completed => progress.display.format_message (see also)
timer.spinner_rate => notification.poll_rate is kind of like FPS---how often to render the screen. But that's detached from how long one cycle of the animation will take, which can be adjusted using progress.display.progress_icon.period
timer.fidget_decay => the ttl key for configs inside notification.configs; you can adjust the default config based on the provided default, or create a new one for each LSP progress task group
timer.task_decay => progress.display.done_ttl
window.relative => notification.window.relative
window.blend => notification.window.winblend
window.border => notification.window.border
debug.logging => logger.level (set it to INFO or DEBUG if you want it noisy)
debug.strict => deprecated

The config seems much more complicated now because it allows for much more fine-grained configuration, and the usage of Fidget as a UI for more things than just LSP progress notifications (e.g., as the default vim.notify backend). Unfortunately this means some options are buried deeper, but that's the cost of flexibility (which you might not get the benefit of, but I hope you do through exploring some of the more recent features 🙂).
A couple more things:

I don't recommend lazy-loading Fidget on the LspAttach event since it is supposed to be used for more than just LSP. If you do find that it is hanging your startup, please open another issue and we can work on speeding up fidget.setup, there's no work that it does that should take that long.
You shouldn't need to guard the require calls with pcall if dependencies are managed correct, but even if they aren't and require fails, your config function will crash because it just prints about the error but continues on to call fidget.setup anyway.

text.spinner => progress.display.progress_icon; you can just use the existing "dots_negative" pattern

if you see my config, you might notice the pattern is dots_positive so if you might add that ... and if not can i pass a table as i used to?

I don't recommend lazy-loading Fidget on the LspAttach event since it is supposed to be used for more than just LSP.

Earlier it was just used for LSP so...

You shouldn't need to guard the require calls with pcall if dependencies are managed correct

every plugin i use has this should i replace with barren requires? does it tend to increase startuptime?
alright ig moving from legacy to upstream has its consequences and i have to spend some hours reconfiguring stuff...

Sorry for not responding sooner, a lot of stuff came up.

if you see my config, you might notice the pattern is dots_positive so if you might add that ... and if not can i pass a table as i used to?

You can certainly customize this, though admittedly the configuration interface is not very user-friendly. I'm working on improving the situation in #251 but it's still a work in progress. The changes I might not be backwards compatible, so I'll refrain from giving concrete instructions lest it break imminently.

Earlier it was just used for LSP so...

I understand, but my recommendation applies to Fidget as it is written now, which handles more than LSP progress.

every plugin i use has this should i replace with barren requires? does it tend to increase startuptime?

I'm not sure about pcall's effect on startuptime---you will need to benchmark this---but that's not my point. Rather, my point is, if you're going to catch an error, you should probably handle it. That's not what you're doing---you just print a message and continue execution, so it will still crash later.

alright ig moving from legacy to upstream has its consequences and i have to spend some hours reconfiguring stuff...

Yeah, sorry. I promise I'm not just introducing breaking changes to make your life difficult, but please understand that spending hours configuring stuff comes with the territory, at least in my view.

Yeah, sorry. I promise I'm not just introducing breaking changes to make your life difficult, but please understand that spending hours configuring stuff comes with the territory, at least in my view.

oh i never was complaining dont take it that way, i was just a little busy myself making my neovim distro...
contributing to open source itself is a breaking change from closed source sh!t (imo)

if you're going to catch an error, you should probably handle it.

so are you saying me to do something like this? :
local status_ok, fidget = pcall(require, "fidget")
if not status_ok then
  print("fidget not found")
else
  -- my config
end

is this what you are asking me?

is this what you are asking me?

Not really. My suggestion is much simpler:
local fidget = require("fidget")
local icons = require("NeutronVim.core.icons")

fidget.setup(--[[ your config ]])

If require fails it will complain loudly and throw an error. I'm suggesting there's no point pcalling around this behavior because this is the behavior you want: Fidget, the icons pack, and Lazy (used to download Fidget) are all part of your distribution, so none of them should be missing.

I don't recommend lazy-loading Fidget on the LspAttach event since it is supposed to be used for more than just LSP.

For someone obsessed with lazy-loading and low startup time, which events do you recommend for Fidget? Could it be "BufReadPre" and "BufNewFile"?
As a sidenote, I used to set it to "LspAttach" on neovim v0.9.5 and occasionally I encoutered fidget errors on quiting neovim. I haven't tried that on v0.10 though.

I don't recommend lazy-loading Fidget on the LspAttach event since it is supposed to be used for more than just LSP.

For someone obsessed with lazy-loading and low startup time, which events do you recommend for Fidget? Could it be "BufReadPre" and "BufNewFile"? As a sidenote, I used to set it to "LspAttach" on neovim v0.9.5 and occasionally I encoutered fidget errors on quiting neovim. I haven't tried that on v0.10 though.

i use VeryLazy


Assign controller after initialization in v6.0.4 doesn't work

This is a (multiple allowed):

[x] bug

[ ] enhancement

[ ] feature-discussion (RFC)

Swiper Version: 6.0.4.

Platform/Target and Browser Versions: Chrome 84

What you did
I have two Swipers which are connected to each other. In v5.4.5 we did it like this:
gallerySwiper = new Swiper(this.$refs.gallery, galleryOptions);
thumbsSwiper = new Swiper(this.$refs.thumbnails, thumbnailOptions);

gallerySwiper.controller.control = this.thumbsSwiper;
thumbsSwiper.controller.control = this.gallerySwiper;

Expected Behavior
Swipers should work and control each other.
Actual Behavior
The Swipers are not connected to each other and the controls don't work for the gallery swiper. Console shows an error message that there is no controller object on the Swiper instance.
There was a similar issue in an older version, but it looks like this has changed again.
https://github.com/nolimits4web/swiper/issues/2725

https://swiperjs.com/get-started/

By default Swiper exports only core version without additional modules (like Navigation, Pagination, etc.). So you need to import and configure them too

Ah, sorry i missed that. Thank you very much!


WIP: ZUULI DEV

working on ZUULI:

sync reliability
send
restore (maybe)

TODO:

send blocks UI
cleanup code, cleanup IPC approach
restore

Works:

sync (TODO: handle errors eg reorg rewind)
receive transactions
send


Update forge section in readme.

Add clarity by adding repository, and use forge version.

Nice catch!
thanks


[BUG] Colab suddenly complaints about 'gpus'

TypeError                                 Traceback (most recent call last)

[<ipython-input-14-1c067612e5e7>](https://localhost:8080/#) in <module>
----> 1 trainer = pl.Trainer(
      2     callbacks=[
      3         pl.callbacks.model_checkpoint.ModelCheckpoint(
      4             filename="{epoch:04d}_{step}_{ESR:.3e}_{MSE:.3e}",
      5             save_top_k=3,

[/usr/local/lib/python3.9/dist-packages/pytorch_lightning/utilities/argparse.py](https://localhost:8080/#) in insert_env_defaults(self, *args, **kwargs)
     67
     68         # all args were already moved to kwargs
---> 69         return fn(self, **kwargs)
     70
     71     return cast(_T, insert_env_defaults)

TypeError: __init__() got an unexpected keyword argument 'gpus'

TypeError                                 Traceback (most recent call last)

[<ipython-input-14-1c067612e5e7>](https://localhost:8080/#) in <module>
----> 1 trainer = pl.Trainer(
      2     callbacks=[
      3         pl.callbacks.model_checkpoint.ModelCheckpoint(
      4             filename="{epoch:04d}_{step}_{ESR:.3e}_{MSE:.3e}",
      5             save_top_k=3,

[/usr/local/lib/python3.9/dist-packages/pytorch_lightning/utilities/argparse.py](https://localhost:8080/#) in insert_env_defaults(self, *args, **kwargs)
     67
     68         # all args were already moved to kwargs
---> 69         return fn(self, **kwargs)
     70
     71     return cast(_T, insert_env_defaults)

TypeError: __init__() got an unexpected keyword argument 'gpus'

Is this from the Google Colab cloud? I was kicked out more times than I can remember midway through training that I decided to give up on Google & worked on getting myself to train locally.

Tes, this is in the cloud using the link on the main page. Not the easy training file.

PyTorch Lightning updated their API and deprecated this. Seems like the latest version that gets installed now removed that old functionality.
Should be an easy fix. Hang tight.


Remove s6-overlay.tar.gz

/tmp/s6-overlay.tar.gz should be deleted once extracted.

Good call. I have some changes for the Node.js images in the works, and I'll update this once they're complete.

@matthewvalimaki, this has been resolved in the latest (alpine-base)[https://github.com/smebberson/docker-alpine/blob/master/alpine-base/Dockerfile].


Added new image for 3D objects (see SBD#25227)

Added a new Dockerfile for a new VRE.

I was waiting for them to check that everything works OK, as I expect I might need to do some modifications....
But I can remove them and add whatever needed afterwards. This applies also to the other PR.


[🐞] TypeError: Cannot convert undefined or null to object

Which component is affected?
Qwik Runtime
Describe the bug
I was trying to init Qwik in codesandbox but pnpm run dev exit with error
error when starting dev server:
TypeError: Cannot convert undefined or null to object
    at Function.entries (<anonymous>)
    at Object.validateSource (file:///project/workspace/node_modules/.pnpm/@builder.io+qwik@1.5.4_undici@6.16.0/node_modules/@builder.io/qwik/optimizer.mjs:1944:41)
    at async Context.buildStart (file:///project/workspace/node_modules/.pnpm/@builder.io+qwik@1.5.4_undici@6.16.0/node_modules/@builder.io/qwik/optimizer.mjs:3513:7)
    at async Promise.all (index 2)
    at async hookParallel (file:///project/workspace/node_modules/.pnpm/vite@5.2.11/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:50688:9)
    at async Object.buildStart (file:///project/workspace/node_modules/.pnpm/vite@5.2.11/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:51040:13)
    at async file:///project/workspace/node_modules/.pnpm/vite@5.2.11/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:65087:13
    at async httpServer.listen (file:///project/workspace/node_modules/.pnpm/vite@5.2.11/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:65105:17)
 ELIFECYCLE  Command failed with exit code 1.

Reproduction
https://codesandbox.io/p/devbox/stoppropagation-qynknn?layout=%257B%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522rootPanelGroup%2522%253A%257B%2522direction%2522%253A%2522horizontal%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522id%2522%253A%2522ROOT_LAYOUT%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522clzk3aliy00063b6idhf1qbzd%2522%252C%2522sizes%2522%253A%255B70%252C30%255D%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522EDITOR%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522id%2522%253A%2522clzk3alix00023b6igpbfi8cp%2522%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522SHELLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522id%2522%253A%2522clzk3alix00043b6iyfh11eez%2522%257D%255D%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522DEVTOOLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522id%2522%253A%2522clzk3aliy00053b6iajdbp6d4%2522%257D%255D%257D%255D%252C%2522sizes%2522%253A%255B50%252C50%255D%257D%252C%2522tabbedPanels%2522%253A%257B%2522clzk3alix00023b6igpbfi8cp%2522%253A%257B%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522clzk3alix00013b6if0488uwg%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522FILE%2522%252C%2522filepath%2522%253A%2522%252FREADME.md%2522%257D%255D%252C%2522id%2522%253A%2522clzk3alix00023b6igpbfi8cp%2522%252C%2522activeTabId%2522%253A%2522clzk3alix00013b6if0488uwg%2522%257D%252C%2522clzk3aliy00053b6iajdbp6d4%2522%253A%257B%2522tabs%2522%253A%255B%255D%252C%2522id%2522%253A%2522clzk3aliy00053b6iajdbp6d4%2522%257D%252C%2522clzk3alix00043b6iyfh11eez%2522%253A%257B%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522clzk3alix00033b6is8n54jh4%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522TASK_LOG%2522%252C%2522taskId%2522%253A%2522dev%2522%257D%255D%252C%2522id%2522%253A%2522clzk3alix00043b6iyfh11eez%2522%252C%2522activeTabId%2522%253A%2522clzk3alix00033b6is8n54jh4%2522%257D%257D%252C%2522showDevtools%2522%253Afalse%252C%2522showShells%2522%253Atrue%252C%2522showSidebar%2522%253Atrue%252C%2522sidebarPanelSize%2522%253A15%257D
Steps to reproduce

Open codesandbox  https://codesandbox.io/
Create new project using Qwik (Vite) template
pnpm run dev is throwing error

System Info
System:
    OS: Linux 6.1 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
    CPU: (2) x64 AMD EPYC
    Memory: 1.99 GB / 4.01 GB
    Container: Yes
    Shell: Unknown
  Binaries:
    Node: 20.9.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.8.1 - /usr/local/bin/npm
    pnpm: 8.10.2 - /usr/local/share/npm-global/bin/pnpm
  npmPackages:
    @builder.io/qwik: ^1.5.1 => 1.5.4
    typescript: ^5.2.2 => 5.4.5
    vite: ^5.2.0 => 5.2.11

Additional Information
This is a codesandbox environment

the above project run csr mode
https://codesandbox.io/p/devbox/stoppropagation-forked-3glc28?file=%2Fsrc%2Fapp.tsx%3A6%2C18&workspaceId=6fd46b95-93fc-43f6-881e-6ee0368299ab
component$ cause error?
inline component still work

let me check it out

Please repro in qwik 1.8.0

https://codesandbox.io/p/devbox/stoppropagation-forked-3glc28

Before running the project try to do npm i this may be solved your issue.

Before running the project try to do npm i this may solve your issue.

@harshmangalam the PR is merged, I think this issue is solved now.


(WIP Breaks the build) adding warning as error flag to circleCI

So I added treat all warnings as errors to Circle CI  (issue #85) (In fact for every build) but build breaks because tons of errors.
Errors that were encountered:

disambiguation errors for all panResponder handlers

Warning number 42
  /Users/vladimirnovick/dev/CallStackOpenSource/bs-react-native/src/panResponder.re 143:5-33

  141 ┆ onResponderTerminate:
  142 ┆   Js.Undefined.toOption(jsHandlers##onResponderTerminate),
  143 ┆ onResponderTerminationRequest:
  144 ┆   Js.Undefined.toOption(jsHandlers##onResponderTerminationRequest),
  145 ┆ onStartShouldSetResponder:

  this use of onResponderTerminationRequest required disambiguation.

disambiguation errors for netInfo.re connectionType and effectiveConnectionType variants. Can be solved by wrapping them in separate modules
disambiguation errors for cameraRoll.re for groupType
polymorphic comparison error

  Warning number 102
  /Users/vladimirnovick/dev/CallStackOpenSource/bs-react-native/src/timePickerAndroid.re 50:34-47

  48 ┆ | Some(v) =>
  49 ┆   switch (v) {
  50 ┆   | _good when v <= valueTo && v >= valueFrom => Some(v)
  51 ┆   | _ =>
  52 ┆     failwith(

  polymorphic comparison introduced (maybe unsafe)

platform.re pattern matching fragile

Warning number 4
  /Users/vladimirnovick/dev/CallStackOpenSource/bs-react-native/src/platform.re 36:3-41:3

  34 │
  35 │ let equals = targetOs =>
  36 │   switch (os(), targetOs) {
  37 │   | (IOS(_), IOS(_)) => true
   . │ ...
  40 │   | _ => false
  41 │   };
  42 │
  43 │<EMAIL_ADDRESS>"react-native"]<EMAIL_ADDRESS>"Platform"]

  this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type os.

What are your ideas what is better to do with panResponders and polymorphic comparison errors
Other disambiguation errors can be solved with wrapping in modules
cc @grabbou @czystyl @wokalski

I think we could change the whole Platform module to have less conditionals.
As far as the others, I guess we should just update/change the interface to eliminate them. I am not sure I understand where's the pan responder issue coming from. Mind explaining a bit?

This is the whole list of problems if we switch warnings to be errors.

Most of the problems are disambiguation error as you can see. @grabbou, we need to think of best practice how we deal with these warnings. It's possible to use submodules al over the place, but we need to define best practices for this I guess.
As for pan responder I am also not sure what is the problem there. So trying to figure this out.

This is the whole list of problems if we switch warnings to be errors.

Most of the problems are disambiguation error as you can see. @grabbou, we need to think of best practice how we deal with these warnings. It's possible to use submodules al over the place, but we need to define best practices for this I guess.
As for pan responder I am also not sure what is the problem there. So trying to figure this out.

This is the whole list of problems if we switch warnings to be errors.

Most of the problems are disambiguation error as you can see. @grabbou, we need to think of best practice how we deal with these warnings. It's possible to use submodules al over the place, but we need to define best practices for this I guess.
As for pan responder I am also not sure what is the problem there. So trying to figure this out.

This is the whole list of problems if we switch warnings to be errors.

Most of the problems are disambiguation error as you can see. @grabbou, we need to think of best practice how we deal with these warnings. It's possible to use submodules al over the place, but we need to define best practices for this I guess.
As for pan responder I am also not sure what is the problem there. So trying to figure this out.

IMO we should feel free to ignore some of those warnings.

@wokalski ok I ignored some warnings. Some of them are ignored by default btw (41,42,102) cause default ignore pattern is +a-4-6-7-9-27-29-32..39-41..42-44-45-48-50-102
Please review PR again and if everything is fine approve it and it will close issue #85

@wokalski, with 40 we are getting this error:
Warning number 40
  /Users/vladimirnovick/dev/CallStackOpenSource/bs-react-native/src/private/responderUtils.re 15:39-26:1

  13 │       (),
  14 │     )
  15 │     : Types.touchResponderHandlers => {
  16 │   onMoveShouldSetResponder,
   . │ ...
  25 │   onStartShouldSetResponderCapture,
  26 │ };

  this record of type BsReactNative.Types.touchResponderHandlers contains fields that are
not visible in the current scope: onMoveShouldSetResponder onMoveShouldSetResponderCapture onResponderGrant onResponderMove onResponderReject onResponderRelease onResponderTerminate onResponderTerminationRequest onStartShouldSetResponder onStartShouldSetResponderCapture.
They will not be selected if the type becomes unknown.

I've asked @grabbou and yours advise on this one. Do you know when it comes from?

You need to open Types.{ } on line 15.

@wokalski Thanks. I've updated PR. please review

I authorised myself to delete the branch associated with this PR since it has been merged. Hope that ok.


Rendering suggestions

the PR is just a spelling change, but here are additional suggestions:

Can we change the headings under the Table of Contents to be:
"Photometry" (instead of "Multi-band forced photometry) and "Time Domain"

Then the "Photometry" heading doesn't need to be a link to a page with a link to the notebook.  Since there is only one notebook in that heading, I think it is fine to not have the heading be a link.  The notebook title under it will be the link.

Inside the rendered notebooks, I don't need the orange # that appears next to the headings when I hover over them and appears to move that section to the top.  This is just a preference and not a strong opinion.

For the forced photometry rendered notebook, the section heading doesn't appear to have worked for section 2.  I think "Use fornax cloud access API..." should be 2.1, etc.  Sorry if this is a problem with the original notebook, and leet me know if you want me to change anything in the .md file

Issue #196 is already opened to edit the text blurbs in the intro readme file which will propagate to here.

Here is a draft blurb for the "Time Domain" page:
Many fields in astronomy use the time variability to understand physical processes.  Large datasets combined with time domain studies are becoming increasingly available to astronomers (ZTF, WISE, Rubin, etc.,).  We show here two demo notebooks at the intersection of big data and time domain astronomy.   The first notebook automatedly generates light curves from NASA and non-NASA archival sources in an efficient manner allowing this to be run on big data samples.  The second takes that a light curve sample and runs machine learning classifiers on it.

More suggestions:

the top menu which has the symbols for github, binder, print, etc. needs to be clicked on to click on the option within the menu, ie., you need to click on the main image, then on the option you want.  Which is one click too many if that is customizable. (This works the way I expect, with a single click, on the epyc website)
the pdf print option for the notebooks prints the table of contents, is it possible to not print the table of contents, and just the notebooks?
colab fails, and binder has been trying without success for the last 5 minutes, let's remove those links unless we can easily make them work.  It's not a priority to make those services work because we are saying "come use the NASA SP".
I do like the documentation on the main table of contents page, so let's go with it for now.  Instead of section heading "More details about Fornax portal", can we make it "Documentation"
Also, while I am thinking about header names, maybe "Table of Contents" should be something else, it really shows the notebooks.  Let's try calling it "Tutorial Notebooks", and I will edit the main README.md to not have the heading "Fornax-demo-notebooks" since that is redundant.

I think that is it for the first round, really all cosmetic stuff.

I'll keep this open as a placeholder until I go through your list of suggestions.

the top menu which has the symbols for github, binder, print, etc. needs to be clicked on to click on the option within the menu, ie., you need to click on the main image, then on the option you want. Which is one click too many if that is customizable. (This works the way I expect, with a single click, on the epyc website)

I don't think it's customisable. For the epyc version I made the mistake of not updating the CSS theme to be the latest, I'm afraid the more structured way is the future. Good news that this is a very widely used CSS theme, so the one-too-many click is exactly the same as everywhere else.

the pdf print option for the notebooks prints the table of contents, is it possible to not print the table of contents, and just the notebooks?

not sure whether it's customisable, docs says download is for the currently viewed page, and it maybe a global configuration. Could we open a separate issue for this, so the idea is not lost (I may just need to look into more example or ping a jupyterbook contact, both of these would happen slower than I would like to get the other changes from your list merged.

colab fails, and binder has been trying without success for the last 5 minutes, let's remove those links unless we can easily make them work. It's not a priority to make those services work because we are saying "come use the NASA SP".

OK, this is easy to do and I'll change it. Binder worked for me when I checked, but it's very much a hit and miss and very often doesn't work. Colab is interesting that doesn't work, it should, but I think some upstream fix is necessary for it to pick up the ipynb version rather than the markdown.
Other than that, I think it may even be possible to have a NASA SP link under the same launch button, but I haven't yet looked into it of what else is required to make it work.

Instead of section heading "More details about Fornax portal", can we make it "Documentation"

Done

Also, while I am thinking about header names, maybe "Table of Contents"...

Done

Re Readme.md

Github picks that up for the repo readme blurb, so ideally it has some generic info about the repo. But if its content doesn't make sense for the HTML pages (I expect it is a shortened version of some parts of the documentation anyway), we can jot not put it into the index page (right now it's included as is)

The Table of Content line is now gone, so I'm closing this PR. However, I moved all feedback comment lines to a checklist in #306.


Support auto-prolonging sessions

Problem
As I understand it, right now, even if a session was modified, it's expiration_time is not updated automatically. As a result, end user will lose their session even if they were actively interacting with web server and their session was modified frequently.
To avoid that, current API provides set_expiration_time and set_expiration_time_from_max_age methods. This is useful, but I think the crate can provide some additional functionality to make common use cases easier.
Proposition
First proposition is to allow devs to opt-in for auto-prolonging of the modified sessions, meaning that expiration_time of sessions marked as modified should be set to now + the duration set with SessionManagerLayer::with_max_age. This could be enabled with a new method SessionManagerLayer::with_auto_prolong(bool).
Second proposition is to add a new method for session, namely Session::prolong() that will allow to manually do the same thing in case the session itself was not modified, but the user it's linked to (for example) was. It's just a convenient alternative to Session::set_expiration_time_from_max_age that doesn't require to move max_age'
s Duration to a constant in our own program.
Though there's a small problem with this approach. Consider that dev used set_expiration_time* method with auto-prolong enabled. The session is marked as modified, therefore session manager will rewrite the expiration_time set by dev. I think that the best way to solve that is to set expiration_time to a max(session.expiration_time, now+max_age).

I would like to follow the semantics of the Django implementation.
This likely requires breaking changes, but that's okay.

So, instead of a setting a duration, one would set a value of an enum that will look something like this:
enum SessionExpiry {
    // Duration after inactivity (automatically prolonged after session modification).
    Duration(Duration),
    // Exact time (stays constant even if session was modified).
    DateTime(DateTime),
    // Expired after browser is closed.
    BrowserSession,
}

If that's right, then I like it!

Exactly, I have something like this:
/// Session expiry configuration.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub enum SessionExpiry {
    /// Expire the session when it's been inactive for the given number of
    /// seconds.
    InactiveFor(usize),

    /// Expire the session when the given `OffsetDateTime` is reached.
    AtExact(OffsetDateTime),

    /// Expire the session when the browser is closed.
    Closed,
}```

But I'm not too attached to the variant names, so happy to adjust those.

I'm kind of liking my naming a bit more, but the BrowserSession could be improved. Maybe WhileBrowserOpen or something like this.
Also, please take duration, not integer seconds. It's just a nicer API, and can be converted to integer seconds internally if needed.


volume data integrity check for volume on remote storage may cause primary storage full

In remote tier storage scenario, local storage may have much smaller capacity than remote tier (s3 or others).
In some remote tier, the data maybe stored into storage media like tape or optical disk, unlike s3, the data must be downloaded to local storage to access, which means the download will consume local storage capacity.
In volume loading process, integrity check is performed on every volume, so if volume has already uploaded to remote tier, and the remote tier ReadAt() implementation may have to download the data to local storage, which consumes the space on local store. And since remote tier may contain huge number of volumes, so this loading process may cause the local store full, and unusable.

propose a fix at https://github.com/seaweedfs/seaweedfs/pull/5976


Is there a way to run all tests?

Hi,
Fantastic plugin!
Have you explored running the whole tree?  Or by directory?
-Lee

Hello, lee,

Fantastic plugin!

Thank you.
Since the underlying deps(TestIex) supports multiple files, I don't think it's too hard to implement the function that supports testing the files in the current file directory; PR is welcome.

But running tests for the whole project is not the goal of this plugin, because compiling too many files will slow down the operation, I would recommend using Elixir Test - Visual Studio Marketplace or neotest(if you're using neovim)


question: How to get refresh_token from Azure SSO

I'm using caddy-security to perform the authentication to my site. I'm using Azure Oauth2.0 for SSO. Now post authentication I'm having the access_token as a cookie on my site. But I'm not able to get the refresh_token. Is there configuration I can enable to get the refresh_token as well? Here's an example of the config that I'm using:
{
  security {
    oauth identity provider azure-auth {
        realm azure
        driver azure
        client_id ENV{data_gov_portal_client_id}
        client_secret ENV{data_gov_portal_client_secret}
        scopes openid email profile offline_access
        tenant_id ENV{tenant_id}
    }
    authentication portal authn-az {
        enable identity provider azure-auth
    }
    authorization policy authz-policy {
      set auth url /auth/oauth2/azure
      allow roles authp/admin authp/guest anonymous
      acl default allow
    }
  }
}

@cdebadri , this is a feature request. I don't have access to Azure environment. If you want to have this implemented, I would need a tenant from you where I can tinker with the code.


LGBM_BoosterPredictForCSR performance is too slow?

when predict on 200 Trees and 10 depth, average cost 40 ms

It depends on the number of features.
When #feature is large, it will be slow.

max feature num below 2000.  default cmake CFLAGS is O2?

yeah, you can try O3.
can you show how you call LGBM_BoosterPredictForCSR ?
you pass all data by one-call of LGBM_BoosterPredictForCSR ? or per data per call ?

per data per call, cost 40ms, it is not my expectation. I think per data on 200 Trees and 10 depth, it will be return inside 10ms

per data per data is very inefficient.
every time calling the LGBM_BoosterPredictForCSR, it has an additional init cost, and will be run in single thread.
The LGBM_BoosterPredictForCSR ( and other prediction apis) are designed for the multi-row data.

additional init cost could be avoid? Because per data represent per request, it need real time.

additional init cost is in omp lib?

@hlee13
refer to this function: https://github.com/Microsoft/LightGBM/blob/master/src/c_api.cpp#L174-L207
you can separate it to the two function:

init:  https://github.com/Microsoft/LightGBM/blob/master/src/c_api.cpp#L179-L195
predict: https://github.com/Microsoft/LightGBM/blob/master/src/c_api.cpp#L202

@guolinke How can I split the init and predict work when I use python to do predict job?

@Yang-HangWA sorry, you can't do it in python.


Question to Block reward values

Expected Behavior
The sending value is lower then the recipients values together.
Actual Behavior
It's not logic thats more payed as sent.?
Steps to Reproduce the Problem

to see on bulwark blockexplorer

Specifications

Version:
Platform:
Subsystem:

That is a proof-of-stake(PoS) minted stakebase transaction.  The sending amount is the staker that won that block, and the receiving is the staked amount + plus share of reward with the second receiver being the masternode.


[SPARK-27470][PYSPARK] Update pyrolite to 4.23

What changes were proposed in this pull request?
Update pyrolite to 4.23 to pick up bug and security fixes.
How was this patch tested?
Existing tests.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/9927/
Test PASSed.

Test build #104605 has started for PR 24381 at commit 57f20a4.

Test build #104605 has finished for PR 24381 at commit 57f20a4.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/104605/
Test PASSed.

Merged to master.


[10.x] Allow deprecation of model attributes

This PR adds a new DeprecatesAttributes trait to the Model class, that allows a user to specify deprecated attributes within their models.
Currently this does not do anything more, I considered triggering a deprecation but I did not want to spam the log with the messages and I could not figure out how to show the proper code location when triggering the deprecation within the getAttribute method.
I still think that this might be helpful as this could potentially enable tools like larastan to inform users that they are using deprecated attributes and even still just looking at a model a user can see the deprecated attributes declared.

Thanks for your pull request to Laravel!
Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.
If possible, please consider releasing your code as a package so that the community can still take advantage of your contributions!
If you feel absolutely certain that this code corrects a bug in the framework, please "@" mention me in a follow-up comment with further explanation so that GitHub will send me a notification of your response.


multi-subnet ipam

Addresses #675.
Not quite finished yet; some smoke tests need work.

I'm not keen on the In[Subnet|Range] method name suffixes. There doesn't seem to be any ambiguity, so they just add noise.

docs need updating.

The CLI component to this invites confusion: an allocate-on-subnet argument (e.g., <IP_ADDRESS>/25) looks very similar to an exactly-this-IP argument (e.g., <IP_ADDRESS>/25), but these have quite different (and not immediately distinguishable) outcomes. I would much prefer this to be explicit; e.g.,
weave run ip:<IP_ADDRESS>/25 net:<IP_ADDRESS>/25 ...

I don't always favour spelling things out in a user interface; but in this case, I think checking the user's stated intention against the supplied data will head off many support queries.

I know we don't care all that much about backward compatibility, but being explicit here will break every single weave usage out there.
I suppose we could make the prefix optional... "If you fear you might accidentally supply a network when you meant a specific ip address, or vice versa, use the ip: and net: prefixes"
Also, what would the env var (for the proxy) look like? WEAVE_CIDR='ip:<IP_ADDRESS>/25 net:<IP_ADDRESS>/25'?

I suppose we could make the prefix optional

Better would be to use just one prefix, net:, and let unadorned addresses be interpreted in the usual way.
Or, my preference (which I didn't mention above, because I thought it would introduce parsing difficulties): --ip <address> and --net <address>, with an unaccompanied address being treated in the usual way.
For the proxy, perhaps WEAVE_CIDR="..." and WEAVE_NET="..." would work. There's far less of a backwards compatibility concern of course, but this would anyway avoid problems.

Actually, we should probably try not to clash with docker arguments, while we're still doing "best guess parsing" of command line arguments. So, instead of --net, perhaps --subnet. (--network is not currently a docker argument, but would be courting danger.)
By the way, we need to account for using the default subnet alongside other addresses. net:default or --net default would be adequate.

Or, my preference (which I didn't mention above, because I thought it would introduce parsing difficulties): --ip <address> and --net <address>, with an unaccompanied address being treated in the usual way.

+1

For the proxy, perhaps WEAVE_CIDR="..." and WEAVE_NET="..." would work

.. or just expect the verbatim arguments as suggested by @rade , since they get spooged to the weave script anyway (I think).

This PR is at the root of quite a large dependency tree. So let's go for the most expedient to implement UI to start with. We can deal with any improvements in separate issues/PRs.

For the CLI syntax, I went with --subnet <IP_ADDRESS>/8 means allocate in that subnet, and <IP_ADDRESS>/8 means use that exact address without involving IPAM.

I think docs/ipam.md needs updating too.

I find the idea of asking a user to type docker run -e WEAVE_CIDR="--subnet <IP_ADDRESS>/24" -ti ubuntu rather abhorrent.
Also, as @squaremo said, we need to account for using the default subnet alongside other addresses.

I believe I have addressed all review comments to date.

don't worry about the tests. They were hideous before and are only marginally more hideous now. I will fix them myself.

We have an address.Range type. Let's always use that.
And I reckon Allocator should know nothing about CIDRs; it should operate on Ranges. CIDRs are a UI convenience, so they should be confined to UI code (i.e. main.go and the http handlers).

Can we come up with any tests for #861 and #862 that aren't gross? And ideally for hide too.

Please make the linter happy.

Those linter changes look wrong; we have configured the linter not to complain about comments.

Nearly there. Is there any squashing that can be done w/o much effort?

I believe everything up to 'ip:' prefix has been addressed, and some squashing done.

You made a single-word comment "addresses", which I took as a request to rename the variable.

Terribly sorry about that; I should have been clearer. I placed an emphasis on the 'es', i.e. I wanted the comment to use the plural.

Have reverted 'owned'->'addresses' change and squashed a couple more commits.


Close your files

Describe the bug
Close your files
Website Page URL
app.py
To Reproduce
Steps to reproduce the behavior:

Go to 'app.py'
Scroll down to 'api endpoints'
See error

Expected behavior
files get closed

Resolved in commit f7d83e1


BraTS2021 dataset preprocessing

First, thank you very much for sharing this amazing project and source code. Really helpful for my study !!
Sorry but i have a question about BraTS2021 dataset preprocessing.
Can you share the details about preparing BraTS_Val* ??
When i run prepare_data_from_nnUNet.py for my BraTS2021 dataset, every 'background' class data (whose volume is all 0) is skipped so that doesn`t save in the dataset folder.
So i removed the code here in prepare_data_from_nnUNet.py
[ if(volume<10):
print("skip", target_img_path)
continue
]
and run train.py. However it has some problems (suddenly the loss is nan, but Dice score is not 0.)
(I check the gt3D consisted of all 0 values, and not sure but guess this is cause of 'background' data)
So i want to know how to construct BraTS 21 dataset.
Thank you again and hope to get an answer !
(If it is my personal issue, sorry in advance for asking bad question ;)) )

I tried to use prepare_data_from_nnUNet.py for my own dataset, but I found it didn't work well, so I wrote my own binary code, the principle is to save only the labels you need, and all others change to background. It's very simple, you can try it. I'm also happy to provide you with my code.
BTW,there is a bug in train.py,dice cant print in each epoch,there is only print step dice.I'm really curious about why your loss is nan, but Dice score is not 0.and i fix the dice=0,you can try it.
hope my exp can help u :)

@adrianzzk @Alexz-7 Thank you for helpful answer :)
Got it, i will try and it will be helpful for my problem. Thank you very much !


QUESTION:  How to deploy as extensible docker  image

Now I am ready to make Xinference into an extensible image based on bge-reranker-large. How can I define the same model_id at startup and call it remotely through load balancing to create a pure GPU service like triton
#我现在准备将Xinference做成可扩展的镜像，基于bge-reranker-large的，如何统一在启动时定义好相同的model_id，通过负载均衡来远程调用，像triton一样制作一个单纯的GPU服务

Hi, @Loovelj . You can specify model_uid when launching your model.
xinference launch -u <your_specific_model_uid> -n bge-reranker-large -t rerank

Hi, @Loovelj . You can specify model_uid when launching your model.
xinference launch -u <your_specific_model_uid> -n bge-reranker-large -t rerank

Thanks, I got it,  but this has a error execption,can you help me?
`
xinference launch --model-name bge-reranker-large --model-type rerank --model-uid my_model
2023-12-13 20:27:00,171 - modelscope - INFO - PyTorch version 2.1.1 Found.
2023-12-13 20:27:00,173 - modelscope - INFO - Loading ast index from /root/.cache/modelscope/ast_indexer
2023-12-13 20:27:02,440 - modelscope - INFO - Loading done! Current index file version is 1.10.0, with md5 4b2f06948d8e1e0227d48712befb1bbb and a total number of 946 components indexed
Traceback (most recent call last):
File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/connection.py", line 174, in _new_conn
conn = connection.create_connection(
File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/util/connection.py", line 95, in create_connection
raise err
File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/util/connection.py", line 85, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/connectionpool.py", line 715, in urlopen
httplib_response = self._make_request(
File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/connectionpool.py", line 416, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/connection.py", line 244, in request
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
File "/root/anaconda3/envs/bge/lib/python3.9/http/client.py", line 1285, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/root/anaconda3/envs/bge/lib/python3.9/http/client.py", line 1331, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/root/anaconda3/envs/bge/lib/python3.9/http/client.py", line 1280, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/root/anaconda3/envs/bge/lib/python3.9/http/client.py", line 1040, in _send_output
self.send(msg)
File "/root/anaconda3/envs/bge/lib/python3.9/http/client.py", line 980, in send
self.connect()
File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/connection.py", line 205, in connect
conn = self._new_conn()
File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/connection.py", line 186, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f8242827c70>: Failed to establish a new connection: [Errno 111] Connection refused
`

Hi, @Loovelj . You can specify model_uid when launching your model.
xinference launch -u <your_specific_model_uid> -n bge-reranker-large -t rerank

Thanks, I got it, but this has an error execption,can you help me?
` xinference launch --model-name bge-reranker-large --model-type rerank --model-uid my_model 2023-12-13 20:27:00,171 - modelscope - INFO - PyTorch version 2.1.1 Found. 2023-12-13 20:27:00,173 - modelscope - INFO - Loading ast index from /root/.cache/modelscope/ast_indexer 2023-12-13 20:27:02,440 - modelscope - INFO - Loading done! Current index file version is 1.10.0, with md5 4b2f06948d8e1e0227d48712befb1bbb and a total number of 946 components indexed Traceback (most recent call last): File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/connection.py", line 174, in _new_conn conn = connection.create_connection( File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/util/connection.py", line 95, in create_connection raise err File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/util/connection.py", line 85, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/connectionpool.py", line 416, in _make_request conn.request(method, url, **httplib_request_kw) File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/connection.py", line 244, in request super(HTTPConnection, self).request(method, url, body=body, headers=headers) File "/root/anaconda3/envs/bge/lib/python3.9/http/client.py", line 1285, in request self._send_request(method, url, body, headers, encode_chunked) File "/root/anaconda3/envs/bge/lib/python3.9/http/client.py", line 1331, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/root/anaconda3/envs/bge/lib/python3.9/http/client.py", line 1280, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/root/anaconda3/envs/bge/lib/python3.9/http/client.py", line 1040, in _send_output self.send(msg) File "/root/anaconda3/envs/bge/lib/python3.9/http/client.py", line 980, in send self.connect() File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/connection.py", line 205, in connect conn = self._new_conn() File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/connection.py", line 186, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f8242827c70>: Failed to establish a new connection: [Errno 111] Connection refused
`

Specify -e option to indicate the Xinference endpoint:
xinference launch -e <your_xinference_endpoint> -u <your_specific_model_uid> -n bge-reranker-large -t rerank

Hi, @Loovelj . You can specify model_uid when launching your model.
xinference launch -u <your_specific_model_uid> -n bge-reranker-large -t rerank

Thanks, I got it, but this has an error execption,can you help me?
xinference launch --model-name bge-reranker-large --model-type rerank --model-uid my_model 2023-12-13 20:27:00,171 - modelscope - INFO - PyTorch version 2.1.1 Found. 2023-12-13 20:27:00,173 - modelscope - INFO - Loading ast index from /root/.cache/modelscope/ast_indexer 2023-12-13 20:27:02,440 - modelscope - INFO - Loading done! Current index file version is 1.10.0, with md5 4b2f06948d8e1e0227d48712befb1bbb and a total number of 946 components indexed Traceback (most recent call last): File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/connection.py", line 174, in _new_conn conn = connection.create_connection( File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/util/connection.py", line 95, in create_connection raise err File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/util/connection.py", line 85, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/connectionpool.py", line 416, in _make_request conn.request(method, url, **httplib_request_kw) File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/connection.py", line 244, in request super(HTTPConnection, self).request(method, url, body=body, headers=headers) File "/root/anaconda3/envs/bge/lib/python3.9/http/client.py", line 1285, in request self._send_request(method, url, body, headers, encode_chunked) File "/root/anaconda3/envs/bge/lib/python3.9/http/client.py", line 1331, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/root/anaconda3/envs/bge/lib/python3.9/http/client.py", line 1280, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/root/anaconda3/envs/bge/lib/python3.9/http/client.py", line 1040, in _send_output self.send(msg) File "/root/anaconda3/envs/bge/lib/python3.9/http/client.py", line 980, in send self.connect() File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/connection.py", line 205, in connect conn = self._new_conn() File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/connection.py", line 186, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f8242827c70>: Failed to establish a new connection: [Errno 111] Connection refused

Specify -e option to indicate the Xinference endpoint:
xinference launch -e <your_xinference_endpoint> -u <your_specific_model_uid> -n bge-reranker-large -t rerank

Same Error,    but  xinference-local success,but it is random id
xinference launch -e http://localhost:12345 -u my_rerank -n bge-reranker-large -t rerank
2023-12-13 21:04:46,706 - modelscope - INFO - PyTorch version 2.1.1 Found.
2023-12-13 21:04:46,709 - modelscope - INFO - Loading ast index from /root/.cache/modelscope/ast_indexer
2023-12-13 21:04:48,804 - modelscope - INFO - Loading done! Current index file version is 1.10.0, with md5 4b2f06948d8e1e0227d48712befb1bbb and a total number of 946 components indexed
==>> prefix: https://
==>> adapter: <requests.adapters.HTTPAdapter object at 0x7f7ab1414400>
==>> prefix: http://
==>> adapter: <requests.adapters.HTTPAdapter object at 0x7f7ab1414340>
Traceback (most recent call last):
File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/connection.py", line 174, in _new_conn
conn = connection.create_connection(
File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/util/connection.py", line 95, in create_connection
raise err
File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/util/connection.py", line 85, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/connectionpool.py", line 715, in urlopen
httplib_response = self._make_request(
File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/connectionpool.py", line 416, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/connection.py", line 244, in request
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
File "/root/anaconda3/envs/bge/lib/python3.9/http/client.py", line 1285, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/root/anaconda3/envs/bge/lib/python3.9/http/client.py", line 1331, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/root/anaconda3/envs/bge/lib/python3.9/http/client.py", line 1280, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/root/anaconda3/envs/bge/lib/python3.9/http/client.py", line 1040, in _send_output
self.send(msg)
File "/root/anaconda3/envs/bge/lib/python3.9/http/client.py", line 980, in send
self.connect()
File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/connection.py", line 205, in connect
conn = self._new_conn()
File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/connection.py", line 186, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f7ab1414ca0>: Failed to establish a new connection: [Errno 111] Connection refused

Hi, @Loovelj . You can specify model_uid when launching your model.
xinference launch -u <your_specific_model_uid> -n bge-reranker-large -t rerank

Thanks, I got it, but this has an error execption,can you help me?
xinference launch --model-name bge-reranker-large --model-type rerank --model-uid my_model 2023-12-13 20:27:00,171 - modelscope - INFO - PyTorch version 2.1.1 Found. 2023-12-13 20:27:00,173 - modelscope - INFO - Loading ast index from /root/.cache/modelscope/ast_indexer 2023-12-13 20:27:02,440 - modelscope - INFO - Loading done! Current index file version is 1.10.0, with md5 4b2f06948d8e1e0227d48712befb1bbb and a total number of 946 components indexed Traceback (most recent call last): File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/connection.py", line 174, in _new_conn conn = connection.create_connection( File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/util/connection.py", line 95, in create_connection raise err File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/util/connection.py", line 85, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/connectionpool.py", line 416, in _make_request conn.request(method, url, **httplib_request_kw) File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/connection.py", line 244, in request super(HTTPConnection, self).request(method, url, body=body, headers=headers) File "/root/anaconda3/envs/bge/lib/python3.9/http/client.py", line 1285, in request self._send_request(method, url, body, headers, encode_chunked) File "/root/anaconda3/envs/bge/lib/python3.9/http/client.py", line 1331, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/root/anaconda3/envs/bge/lib/python3.9/http/client.py", line 1280, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/root/anaconda3/envs/bge/lib/python3.9/http/client.py", line 1040, in _send_output self.send(msg) File "/root/anaconda3/envs/bge/lib/python3.9/http/client.py", line 980, in send self.connect() File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/connection.py", line 205, in connect conn = self._new_conn() File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/connection.py", line 186, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f8242827c70>: Failed to establish a new connection: [Errno 111] Connection refused

Specify -e option to indicate the Xinference endpoint:
xinference launch -e <your_xinference_endpoint> -u <your_specific_model_uid> -n bge-reranker-large -t rerank

Same Error, but xinference-local success,but it is random id
xinference launch -e http://localhost:12345 -u my_rerank -n bge-reranker-large -t rerank 2023-12-13 21:04:46,706 - modelscope - INFO - PyTorch version 2.1.1 Found. 2023-12-13 21:04:46,709 - modelscope - INFO - Loading ast index from /root/.cache/modelscope/ast_indexer 2023-12-13 21:04:48,804 - modelscope - INFO - Loading done! Current index file version is 1.10.0, with md5 4b2f06948d8e1e0227d48712befb1bbb and a total number of 946 components indexed ==>> prefix: https:// ==>> adapter: <requests.adapters.HTTPAdapter object at 0x7f7ab1414400> ==>> prefix: http:// ==>> adapter: <requests.adapters.HTTPAdapter object at 0x7f7ab1414340> Traceback (most recent call last): File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/connection.py", line 174, in _new_conn conn = connection.create_connection( File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/util/connection.py", line 95, in create_connection raise err File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/util/connection.py", line 85, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/connectionpool.py", line 416, in _make_request conn.request(method, url, **httplib_request_kw) File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/connection.py", line 244, in request super(HTTPConnection, self).request(method, url, body=body, headers=headers) File "/root/anaconda3/envs/bge/lib/python3.9/http/client.py", line 1285, in request self._send_request(method, url, body, headers, encode_chunked) File "/root/anaconda3/envs/bge/lib/python3.9/http/client.py", line 1331, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/root/anaconda3/envs/bge/lib/python3.9/http/client.py", line 1280, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/root/anaconda3/envs/bge/lib/python3.9/http/client.py", line 1040, in _send_output self.send(msg) File "/root/anaconda3/envs/bge/lib/python3.9/http/client.py", line 980, in send self.connect() File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/connection.py", line 205, in connect conn = self._new_conn() File "/root/anaconda3/envs/bge/lib/python3.9/site-packages/urllib3/connection.py", line 186, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f7ab1414ca0>: Failed to establish a new connection: [Errno 111] Connection refused

Just add the -u option to your successful xinference-local command.


Calling a non-existing collection causes internal error

When querying a non-existing collection, we should do the same as MongoDB: return an empty result and do not create the collection/table. I think we used to do that, but now we don't.
We should also do the same thing as MongoDB for updates, deletes, etc.

[ ] Check if there is an existing integration test for it.
[ ] Add tests for

[x] count in query_test.go
[ ] delete in a new delete_test.go
[x] find in query_test.go
[ ] findAndModify in findandmodify_test.go
[ ] update in update_test.go

[ ] Fix code.

The original report follows.

How to reproduce
Version: 18daf68 on Fri May 27 20:51:37 2022 +0300

Connect to the test database provided by task env-up.
Run the query db.pampam.find(); (pampam collection doesn't exist in the test db)

Actual result
The server returns an internal error and closes the connection.
Here is what I see in the logs:
2022-05-28T00:31:35.243+0200	DEBUG	// <IP_ADDRESS>:59314 -> <IP_ADDRESS>:27017 .// <IP_ADDRESS>:59314 -> <IP_ADDRESS>:27017 	clientconn/conn.go:166	Request header: length:    70, id: 3736, response_to:    0, opcode: OP_MSG
2022-05-28T00:31:35.243+0200	DEBUG	// <IP_ADDRESS>:59314 -> <IP_ADDRESS>:27017 .// <IP_ADDRESS>:59314 -> <IP_ADDRESS>:27017 	clientconn/conn.go:167	Request message:
{
  "Checksum": 0,
  "FlagBits": 0,
  "Sections": [
    {
      "Document": {
        "$k": [
          "find",
          "filter",
          "$db"
        ],
        "find": "pampam",
        "filter": {
          "$k": []
        },
        "$db": "test"
      },
      "Kind": 0
    }
  ]
}

2022-05-28T00:31:35.248+0200	ERROR	pg.Pool	v4@v4.16.1/conn.go:354	Query	{"err": "ERROR: relation \"test.pampam\" does not exist (SQLSTATE 42P01)", "sql": "SELECT _jsonb FROM \"test\".\"pampam\"", "args": [], "pid": 140}
github.com/jackc/pgx/v4.(*Conn).log
	github.com/jackc/pgx/v4@v4.16.1/conn.go:354
github.com/jackc/pgx/v4.(*connRows).Close
	github.com/jackc/pgx/v4@v4.16.1/rows.go:153
github.com/jackc/pgx/v4.(*connRows).fatal
	github.com/jackc/pgx/v4@v4.16.1/rows.go:178
github.com/jackc/pgx/v4.(*Conn).Query
	github.com/jackc/pgx/v4@v4.16.1/conn.go:601
github.com/jackc/pgx/v4/pgxpool.(*Conn).Query
	github.com/jackc/pgx/v4@v4.16.1/pgxpool/conn.go:54
github.com/jackc/pgx/v4/pgxpool.(*Pool).Query
	github.com/jackc/pgx/v4@v4.16.1/pgxpool/pool.go:496
github.com/FerretDB/FerretDB/internal/handlers/pg.(*Handler).fetch
	github.com/FerretDB/FerretDB/internal/handlers/pg/fetch.go:49
github.com/FerretDB/FerretDB/internal/handlers/pg.(*Handler).MsgFind
	github.com/FerretDB/FerretDB/internal/handlers/pg/msg_find.go:104
github.com/FerretDB/FerretDB/internal/clientconn.(*conn).handleOpMsg
	github.com/FerretDB/FerretDB/internal/clientconn/conn.go:386
github.com/FerretDB/FerretDB/internal/clientconn.(*conn).route
	github.com/FerretDB/FerretDB/internal/clientconn/conn.go:281
github.com/FerretDB/FerretDB/internal/clientconn.(*conn).run
	github.com/FerretDB/FerretDB/internal/clientconn/conn.go:175
github.com/FerretDB/FerretDB/internal/clientconn.(*Listener).Run.func2
	github.com/FerretDB/FerretDB/internal/clientconn/listener.go:139
2022-05-28T00:31:35.249+0200	DEBUG	// <IP_ADDRESS>:59314 -> <IP_ADDRESS>:27017 .// <IP_ADDRESS>:59314 -> <IP_ADDRESS>:27017 	clientconn/conn.go:373	Response header: length:   184, id:    2, response_to: 3736, opcode: OP_MSG
2022-05-28T00:31:35.250+0200	DEBUG	// <IP_ADDRESS>:59314 -> <IP_ADDRESS>:27017 .// <IP_ADDRESS>:59314 -> <IP_ADDRESS>:27017 	clientconn/conn.go:374	Response message:
{
  "Checksum": 0,
  "FlagBits": 0,
  "Sections": [
    {
      "Document": {
        "$k": [
          "ok",
          "errmsg",
          "code",
          "codeName"
        ],
        "ok": {
          "$f": 0
        },
        "errmsg": "[fetch.go:51 pg.(*Handler).fetch] ERROR: relation \"test.pampam\" does not exist (SQLSTATE 42P01)",
        "code": 1,
        "codeName": "InternalError"
      },
      "Kind": 0
    }
  ]
}

2022-05-28T00:31:35.256+0200	DEBUG	// <IP_ADDRESS>:59314 -> <IP_ADDRESS>:27017 .// <IP_ADDRESS>:59314 -> <IP_ADDRESS>:27017 	clientconn/conn.go:190	Proxy header: length:   100, id:  489, response_to: 3736, opcode: OP_MSG
2022-05-28T00:31:35.257+0200	DEBUG	// <IP_ADDRESS>:59314 -> <IP_ADDRESS>:27017 .// <IP_ADDRESS>:59314 -> <IP_ADDRESS>:27017 	clientconn/conn.go:191	Proxy message:
{
  "Checksum": 0,
  "FlagBits": 0,
  "Sections": [
    {
      "Document": {
        "$k": [
          "cursor",
          "ok"
        ],
        "cursor": {
          "$k": [
            "id",
            "ns",
            "firstBatch"
          ],
          "id": {
            "$l": "0"
          },
          "ns": "test.pampam",
          "firstBatch": []
        },
        "ok": {
          "$f": 1
        }
      },
      "Kind": 0
    }
  ]
}

2022-05-28T00:31:35.258+0200	INFO	// <IP_ADDRESS>:59314 -> <IP_ADDRESS>:27017 .// <IP_ADDRESS>:59314 -> <IP_ADDRESS>:27017 	clientconn/conn.go:221	Header diff:
--- res header
+++ proxy header
@@ -1 +1 @@
-length:   184, id:    2, response_to: 3736, opcode: OP_MSG
+length:   100, id:  489, response_to: 3736, opcode: OP_MSG

Body diff:
--- res body
+++ proxy body
@@ -7,13 +7,20 @@
         "$k": [
-          "ok",
-          "errmsg",
-          "code",
-          "codeName"
+          "cursor",
+          "ok"
         ],
+        "cursor": {
+          "$k": [
+            "id",
+            "ns",
+            "firstBatch"
+          ],
+          "id": {
+            "$l": "0"
+          },
+          "ns": "test.pampam",
+          "firstBatch": []
+        },
         "ok": {
-          "$f": 0
-        },
-        "errmsg": "[fetch.go:51 pg.(*Handler).fetch] ERROR: relation \"test.pampam\" does not exist (SQLSTATE 42P01)",
-        "code": 1,
-        "codeName": "InternalError"
+          "$f": 1
+        }
       },

2022-05-28T00:31:35.258+0200	WARN	listener	clientconn/listener.go:143	Connection stopped	{"error": "fatal error"}
github.com/FerretDB/FerretDB/internal/clientconn.(*Listener).Run.func2
	github.com/FerretDB/FerretDB/internal/clientconn/listener.go:143

Expected result
If a client tries to find data in a collection that doesn't exist, it's not an internal error.

For the record, even though @AlekSi said it could be regression, it doesn't look like regression to me. I didn't find signs that this case has been implemented before.


Include CommonJS examples in README.md

The readme will be rewritten anyway soon for the next big update but I'll make sure both variants are mentioned in the examples 👍


#80 Refresh from upstream

https://github.com/Skyscanner/turbolift/issues/80

I think this looks promising - haven't had a chance to try it locally yet but it's looking good 👍