Formatting and proper noun tune-up

This PR is for tracking some of the initial cleanup work involved on #4188.

[x] Replace instances of “DDEV-Local”, “DDEV-Live”, and improperly-lowercased “ddev” with “DDEV”
[x] Wrap legitimate instances of “ddev”—used for references to the command or binary file—in backticks
[x] Consistently use smart punctuation / curly quotes
[x] Replace instances of “docker” with “Docker”
[x] Make sure the words AMD64, Apache, ARM64, Bash, Blackfire, Chocolatey, Colima, Composer, Drush, Git, Git Bash, GitHub, Gitpod, GoLand, Google, Homebrew, HTTP, HTTPS, IPv4, IPv6, Linux, NFS, nginx, Node.js, Pantheon, PHP, PhpStorm, PHPUnit, PostgreSQL, SSH, Terminus, Windows, and Xdebug are all properly capitalized
[x] Make sure “web server” always appears as two words in common usage (not “webserver”)
[x] Make sure CMS plural is “CMSes”, not “CMSs”
[x] Limit use of the phrases like “of course” and “it’s easy”
[x] Replace unexpected first-person “I” with “we”
[x] Use all-caps references for file extensions like JSON, YAML, CSS, etc.
[x] Generally reduce use of parentheses and asides to improve flow and readability
[x] Wrap references to files, directories, images and commands in backticks
[x] Link to related services and topics where convenient—usually first use on a given page
[x] Use Title Case for headings wherever it makes sense
[x] Introduce <kbd> elements for representing literal keystrokes
[x] Activate speaker for warmth when possible (“we recommend” instead of “it is recommended”)
[x] Avoid telling someone to “remember” information that hasn’t yet been introduced
[x] Improve consistency of !!!note, !!!tip and !!!warning callouts for asides, as opposed to Note: prefixes and other variations
[x] Consistently represent click paths with italics and arrows (General Settings → Experimental Features → Enable Nurb Splooping)

Edits are tediously separated and described in smallish commits.

Worked through docs/content/developers/, and confused about the single Markdown linting error I can’t get rid of:

docs/content/developers/release-management.md:82:68 MD051/link-fragments Link fragments should be valid [Context: "upstream instructions"]
make: *** [markdownlint] Error 1

The heading changed so it was correct to call it out at first. But it should be right now and it behaves fine in my browser. Just rambling to myself and will come back to it later.

You can also use the ignore semantics for markdownlint if something just seems wrong and you want to ignore it. The only reason for it is to push us toward consistency, but it doesn't have to be perfect.

Oh, don't work on the wsl2 install section because of major pr pending, thx.

Okay @rfay, I’ll not touch this section for now:

And keep an eye on this PR for future merging and proofreading.

I also realize this simple cleanup PR touches a lot and plan on having it ready in the next few days.

These updates for the config.yaml options have been my most daring thus far, mostly because I needed to look up and add information to more consistently describe how things work. Should be accurate, but most worth careful review when it’s time.

Also noteworthy is this commit, where I went beyond stylistic cleanup to suggest edits that (hopefully) streamline and clarify instruction throughout the install pages.

@rfay Ready for review! This represents the same kinds of edits across all documentation for format and style, not significant restructuring, rewriting, or updating content.
As I pointed out above, the boldest changes I made were some minor organization of the install section. If there are any subjective edits that might be offensive, they’ll probably be in this commit.

FWIW @rfay not using proper printer’s quotes in the documentation would be somewhat of a travesty.
Straight quotes only came about due to the limitations of the typewriter. We're long past that now:
https://writer.com/blog/curly-quotes/

Curly quotes are a disaster and always have been in non-print-aimed text. For print-aimed text, it's easy to convert, but that's not the case here. Setting a precedent for curly quotes means that contribution is harder (and unexpected) for everyone, and there are no tools I know of that would check them.
Don't worry, we can do a followup PR to fix them all. It doesn't have to be fixed in this PR.
Curly quotes are required typographically for print. Just a catastrophe for ordinary non-print text. Sorry to disagree, but we'll just fix up after this PR goes in.

Print or display on-screen, the reason for printer's quotes is readability.
If you want them to be typewriter quotes in the source, but have an automated system to render them as proper curly quotes before outputting the final documentation that people read, that's definitely a valid choice, though!

An automated way to change the presentation to curly quotes would be awesome. I imagine that's not too hard. There's probably something we can just add to mkdocs-material to make that happen.

I adapted to using curly quotes consistently a few years ago and it hasn’t been a big deal for daily usage or tooling. All the more reason to call them out in a style guide and fix the tooling to encourage them for better typography. (Happy to help with both.)
Examples of other docs commonly using them:

Django: https://www.djangoproject.com/start/
Apple: https://support.apple.com/guide/mac-help/siri-mchl6b029310/mac
Ubuntu: https://ubuntu.com/server/docs/package-management
Docker: https://docs.docker.com/get-started/
WordPress: https://wordpress.org/support/article/how-to-install-wordpress/
Magento: https://docs.magento.com/user-guide/v2.3/getting-started.html

I’d strongly prefer to do the best thing for the reader, and not for tooling or content authors. The documentation should be for the reader.

Thanks for the links, and perhaps you'll soften my attitude :) I saw MS-Word ruin so many things so many decades ago with smart quotes so long ago that I've long rejected them in any non-typesetting environments. The key problem here is that so many things are done in the context of the command line, where smart quotes are not a thing. Only straight quotes are useful, everything else is an error.
The fact that large orgs with docs teams can do sophisticated things is not that relevant to a tiny project like this, where the key is correctness, usability, and completeness.
But I'm optimistic about doing it with presentation. The mkdocs-material stuff is all python.

The key problem here is that so many things are done in the context of the command line, where smart quotes are not a thing. Only straight quotes are useful, everything else is an error.

I completely agree with this! Curly quotes are incorrect punctuation for the command line, which is why part of this effort is also wrapping commands (or anything command-like) in backticks and keeping any straight quotes. It was not a find-and-replace job. The reader shouldn’t have to wonder if they’re interpreting a reference to the command or the product, the format should make it apparent.

The fact that large orgs with docs teams can do sophisticated things is not that relevant to a tiny project like this, where the key is correctness, usability, and completeness.

I would argue that correct punctuation, capitalization, and grammar are all basic—and not sophisticated—things. Hence starting with this and trying to get a baseline so everything conform to the same goal. It serves as a consistent example to mimic, and hopefully encourage with follow-on improvements to linting/tooling and an explicit style guide.

Got through the FAQ this session. You've done an amazing amount of great work, but of course this is a huge effort to review as well.

Thanks for reviewing so carefully! I realize it’s a slog.

The FAQ, of course, has gotten a bit out of control, and it would be great if we could figure out how to tame and improve it.

High on my list for the FAQ is automatically generating IDs so questions can be linked directly.

If you get impatient waiting for me, you may want to experiment with mkdocs-material and mkdocs in general, and explore their ecosystem. I've got good steam up, but don't expect to make another section today.
Note that I tried to use the mkdocs-material insiders version, but found it basically sabotaged ordinary contributors, because it requires direct access to their private repo.

https://github.com/squidfunk/mkdocs-material/issues/4104
The basic tabs issue is at
https://github.com/squidfunk/mkdocs-material/issues/4125

If you get impatient waiting for me, you may want to experiment with mkdocs-material and mkdocs in general, and explore their ecosystem. I've got good steam up, but don't expect to make another section today.

Noted! I probably won’t wander into structural/platform changes until more straightforward text edits are exhausted. There are still deeper text-only edits that could improve structure, flow, and utility before getting into the underlying framework.
Once someone like me gets under the hood, you may end up with a different car. Best to gradually increase depth of scrutiny. 😅

Got through config_yaml. Next time let's do smaller chunks, that can be completed and reviewed in a few days. We've already collected a pile of merge conflicts here.

This should be the only time I’ll go through everything all at once for consistency! I’ll take care of every comment and merge conflict when you’re doing going through everything.

Thanks for taking such care going through this, @rfay! Anything I work on after this sweep will be more focused.
I don’t recall disagreeing with any of your suggestions, but there were a handful of typos (missing spaces, formatting, etc.) I’ll see if I can figure out how to fix with a counter-suggestion or otherwise just make a note and tack on another commit.
Will try to get everything updated here as soon as I can!

Not sure how I managed to break the Buildkit tests @rfay, but otherwise ready to roll!

Merged or resolved all suggestions. (Some minor edits, and a comment for any non-merged suggestion!)
Restored headings for all tabular content, which also meant on the Shell Completion & Autocomplete page which didn’t have them to start with.
Merged upstream changes, which was straightforward and not scary.
Made sure spellcheck is okay with “Symfony” and “xz’d”—also removed my curly-apostrophe variants which apparently aren’t needed after all. 🤷♂

Restarted, but TestComposerVersion may in fact be broken, we'll see what happens.

Looks like it's all going to pass, let me know when it's ready to pull!

Tests finally finished, resubmitted for review!


Fix configuration file

[x] I have signed the Contributor License Agreement.
[x] This pull request is related to an issue.

Addresses issue #137
Microsoft Reviewers: Open in CodeFlow

@Trenly and @ryfu-msft I think there was one small step missing in the configuration file inside this repository. This should fix it.

@Trenly and @ryfu-msft I think there was one small step missing in the configuration file inside this repository. This should fix it.

The configuration was built presuming the user was already operating inside the cloned repository, as would be the most common workflow when using DevHome

@Trenly and @ryfu-msft I think there was one small step missing in the configuration file inside this repository. This should fix it.

The configuration was built presuming the user was already operating inside the cloned repository, as would be the most common workflow when using DevHome

That was my assumption as well, but for fresh boxes, perhaps it is better to include it?

Thanks for the sharing and interesting thoughts. I would have assumed the GitClone resource would test for it. If it is already present, it applies the configuration successfully without additional cloning (depending on where the user executes it, of course).
Regardless, I have removed the GitClone for now. I have fixed up the cloning because it was pointing towards winget-pkgs. I have added the PowerShell requirement.

/azp run


Refactor amd64 backend into three passes in prep for register allocator.

To get the next big margin of speedup we need to start storing results between ops in registers, instead of always spilling to the stack.
In preparation for this, this PR refactors the backend into three phases:

Build rough instruction stream. This is the same as before, except anything where we want to do things differently based on register state is now represented in a symbolic instruction.
Lowering. This phase converts all symbolic instructions into concrete amd64 instructions. It is this pass which will keep track of register liveness.
Peephole optimization. As before.

Subsequent PRs will implement register allocation during the lowering phase.

Codecov Report

Merging #137 into master will increase coverage by 0.32%.
The diff coverage is 90.75%.

@@            Coverage Diff            @@
##           master    #137      +/-   ##
=========================================
+ Coverage   68.48%   68.8%   +0.32%
=========================================
  Files          42      43       +1
  Lines        4848    4905      +57
=========================================
+ Hits         3320    3375      +55
  Misses       1254    1254
- Partials      274     276       +2

Impacted Files
Coverage Δ

exec/internal/compile/backend_amd64.go
79.77% <77.34%> (-3.06%)
:arrow_down:

exec/internal/compile/lower_amd64.go
98.25% <98.25%> (ø)

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 2691113...0709668. Read the comment docs.


Flank Test Lab session triggered from CI is not cancelled when the CI job is cancelled

We are running Flank v8.1.0 from jobs on our BuildKite CI.
We have noticed that when a CI build job is cancelled whilst a flank session is running the Test Lab test execution is not cancelled and continues to run, thereby incurring unexpected costs.
Is there something we need to do to ensure that cancelling a job ensure that the Firebase Test Lab execution is also cancelled? Thanks in advance.
Launching the Flank session using:
java -jar flank.jar firebase test android run
Flank output on launch

| gcloud:
  | results-bucket: cloud-test-xxx-ed09d
  | results-dir: null
  | record-video: false
  | timeout: 30m
  | async: false
  | results-history-name: android-xxx-flank
  | # Android gcloud
  | app: /workdir/example/flank/app-debug.apk
  | test: /workdir/example/flank/app-debug-androidTest.apk
  | auto-google-login: false
  | use-orchestrator: true
  | directories-to-pull:
  | - /sdcard/
  | performance-metrics: false
  | test-runner-class: null
  | test-targets:
  |
  | device:
  | - model: Nexus9
  | version: 25
  | locale: en
  | orientation: portrait
  | - model: Pixel2
  | version: 29
  | locale: en
  | orientation: portrait
  | - model: m0
  | version: 18
  | locale: en
  | orientation: portrait
  | num-flaky-test-attempts: 0
  |
  | flank:
  | max-test-shards: 6
  | shard-time: -1
  | num-test-runs: 1
  | smart-flank-gcs-path:
  | smart-flank-disable-upload: false
  | files-to-download:
  | - ..xml$
  | - ..html$
  | test-targets-always-run:
  |
  | disable-sharding: false
  | project: xxx-ed09d
  | local-result-dir: results
  | # Android Flank Yml
  | keep-file-path: false
  | additional-app-test-apks:

Is there something we need to do to ensure that cancelling a job ensure that the Firebase Test Lab execution is also cancelled?

flank cancel will cancel a run. Flank issues HTTP requests to FTL. If the Flank process dies, then FTL never gets a cancel message and the matrices will continue execution.

Thank you for this @bootstraponline. I have been wondering the same thing and figured it wasn't possible, it would be nice to have this in the readme :)

@elihart I will happily merge a pull request to update the readme. :)


Feature/index

Index page with carousel component and delete icons.

Great work on these features @Maclenn77  💪
Everything looks good, and it is time to merge it.
Feel free to leave any questions or comments in the PR thread if something is not 100% clear.


[bug] tauri v2.0.x 'unlisten' work strangely

Describe the bug
The following js code listens to an event in the useEffect and unlistens the event when the side effect is removed(when refreshing page).
It works fine in v1, and the haddle time will always be 1.
But in v2.x, after refreshing the page, the next listen handleTime will still be increased by 1, and all the triggered event have the same eventId. And when the browser console is open, the behavior is even strangler.
import { invoke } from "@tauri-apps/api/core";
import { useEffect, useState } from "react";
import { listen } from "@tauri-apps/api/event";

export default function App() {
  const [handleTime, setHandleTime] = useState(0);
  function msgHandler(msg) {
    setHandleTime((prev) => prev + 1);
    console.log(msg);
  }
  useEffect(() => {
    let unlistenPromise = listen("event", msgHandler);

    return async () => {
      const unlisten = await unlistenPromise;
      if (unlisten) {
        unlisten()
          .then((rst) => {
            console.log("call unlisten");
          })
          .catch((e) => {
            alert("call unlisten error: " + e);
          });
      }
    };
  }, []);

  return (
    <>
      {/* This button invoke app.emit("event","msg") */}
      <button
        onClick={() => {
          setHandleTime(0);
          invoke("emit", "msg");
        }}
      >
        emit
      </button>

handleTime: {handleTime}

    </>
  );
}

Below are the backend code.
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]

use tauri::{generate_handler, Manager, Runtime};

#[tauri::command]
async fn emit<R: Runtime>(
    app: tauri::AppHandle<R>,
    _window: tauri::Window<R>,
) -> Result<(), String> {
    app.emit_all("event", "msg").unwrap();
    Ok(())
}

#[cfg_attr(mobile, tauri::mobile_entry_point)]
fn main() {
    tauri::Builder::default()
        .invoke_handler(generate_handler![emit])
        .run(tauri::generate_context!())
        .expect("error while running tauri application");
}

v1 works fine:
https://github.com/tauri-apps/tauri/assets/69547456/3f47015b-d19d-465d-b400-cff2f4214431
v2 :
https://github.com/tauri-apps/tauri/assets/69547456/dbbd2438-9cf7-40c2-a8d7-9426565d6533
https://github.com/tauri-apps/tauri/assets/69547456/f9aa2d20-d298-4b29-a8b6-19acd4d318b4

Reproduction
https://github.com/canxin121/test_listen_v1  -> works fine
https://github.com/canxin121/test_listen_v2  -> works strangly
Expected behavior
The behavior of the v2.x version should be consistent with v1
Full tauri info output
for v1:

[✔] Environment
    - OS: Windows 10.0.19044 X64
    ✔ WebView2: 117.0.2045.43
    ✔ MSVC:
        - Visual Studio Build Tools 2019
        - Visual Studio Community 2022
    ✔ rustc: 1.76.0-nightly (e9013ac0e 2023-12-05)
    ✔ cargo: 1.76.0-nightly (623b78849 2023-12-02)
    ✔ rustup: 1.26.0 (5af9b9484 2023-04-05)
    ✔ Rust toolchain: nightly-x86_64-pc-windows-msvc (default)
    - node: 21.2.0
    - pnpm: 8.15.2
    - yarn: 1.22.21
    - npm: 10.2.3

[-] Packages
    - tauri [RUST]: 1.6.0
    - tauri-build [RUST]: 1.5.1
    - wry [RUST]: 0.24.7
    - tao [RUST]: 0.16.7
    - tauri-cli [RUST]: 2.0.0-beta.1
    - @tauri-apps/api [NPM]: 1.5.3
    - @tauri-apps/cli [NPM]: 1.5.10

[-] App
    - build-type: bundle
    - CSP: unset
    - distDir: ../dist
    - devPath: http://localhost:1420/
    - framework: React
    - bundler: Vite

for v2:
[✔] Environment
    - OS: Windows 10.0.19044 X64
    ✔ WebView2: 117.0.2045.43
    ✔ MSVC:
        - Visual Studio Build Tools 2019
        - Visual Studio Community 2022
    ✔ rustc: 1.76.0-nightly (e9013ac0e 2023-12-05)
    ✔ cargo: 1.76.0-nightly (623b78849 2023-12-02)
    ✔ rustup: 1.26.0 (5af9b9484 2023-04-05)
    ✔ Rust toolchain: nightly-x86_64-pc-windows-msvc (environment override by RUSTUP_TOOLCHAIN)
    - node: 21.2.0
    - pnpm: 8.15.2
    - yarn: 1.22.21
    - npm: 10.2.3

[-] Packages
    - tauri [RUST]: 2.0.0-beta.3
    - tauri-build [RUST]: 2.0.0-beta.2
    - wry [RUST]: 0.36.0
    - tao [RUST]: 0.25.0
    - tauri-cli [RUST]: 2.0.0-beta.1
    - @tauri-apps/api [NPM]: 2.0.0-beta.1
    - @tauri-apps/cli [NPM]: 2.0.0-beta.1

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../dist
    - devUrl: http://localhost:1420/
    - framework: React
    - bundler: Vite

Stack trace
In v2.x, with browser console open, got following trace.
chunk-Y2F7D3TJ.js?v=42918a2b:3 Download the React DevTools for a better development experience: https://reactjs.org/link/react-devtools
VM56:1  Uncaught (in promise) SyntaxError: Unexpected end of JSON input
    at <anonymous>:87:33
(anonymous) @ VM36:87
Promise.then(异步)
value @ VM36:94
(anonymous) @ VM38:130
action @ VM38:269
(anonymous) @ VM38:278
value @ VM38:252
invoke @ core.js:87
listen @ event.js:70
(anonymous) @ App.jsx:12
commitHookEffectListMount @ react-dom.development.js:23150
commitPassiveMountOnFiber @ react-dom.development.js:24926
commitPassiveMountEffects_complete @ react-dom.development.js:24891
commitPassiveMountEffects_begin @ react-dom.development.js:24878
commitPassiveMountEffects @ react-dom.development.js:24866
flushPassiveEffectsImpl @ react-dom.development.js:27039
flushPassiveEffects @ react-dom.development.js:26984
(anonymous) @ react-dom.development.js:26769
workLoop @ scheduler.development.js:266
flushWork @ scheduler.development.js:239
performWorkUntilDeadline @ scheduler.development.js:533
Show 13 more frames
显示简略信息
VM57:1  Uncaught (in promise) SyntaxError: Unexpected end of JSON input
    at <anonymous>:87:33
(anonymous) @ VM36:87
Promise.then(异步)
value @ VM36:94
(anonymous) @ VM38:130
action @ VM38:269
(anonymous) @ VM38:278
value @ VM38:252
invoke @ core.js:87
listen @ event.js:70
(anonymous) @ App.jsx:12
commitHookEffectListMount @ react-dom.development.js:23150
invokePassiveEffectMountInDEV @ react-dom.development.js:25154
invokeEffectsInDev @ react-dom.development.js:27351
commitDoubleInvokeEffectsInDEV @ react-dom.development.js:27330
flushPassiveEffectsImpl @ react-dom.development.js:27056
flushPassiveEffects @ react-dom.development.js:26984
(anonymous) @ react-dom.development.js:26769
workLoop @ scheduler.development.js:266
flushWork @ scheduler.development.js:239
performWorkUntilDeadline @ scheduler.development.js:533
Show 12 more frames
显示简略信息

已经定位了bug所在位置, 我将上传一个pr来解决这个问题.
I've located the bug, I'll upload a pr to fix it.

#8621
In this pr js_event_listeners are stored in the backend Listeners```, while in v1 ```js_event_listeners``` are stored in the frontend.  In v1, when manually refreshing a page, all ```js_event_listeners``` on the frontend are lost to the refresh. In v2, since ```js_event_listeners are stored on the backend, and useEffect doesn't run the cleanup side-effects function (which sends an unlisten request to the backend) before the page is refreshed, the listener doesn't get cleaned up.

#8621
In this pr js_event_listeners are stored in the backend Listeners, while in v1 js_event_listeners are stored in the frontend. In v1, when manually refreshing a page, all js_event_listeners on the frontend are lost to the refresh. In v2, since js_event_listeners are stored on the backend, and useEffect doesn't run the cleanup side-effects function (which sends an unlisten request to the backend) before the page is refreshed, the listener doesn't get cleaned up.

this bug will be fixed in next release beta verison?

#8621
In this pr js_event_listeners are stored in the backend Listeners, while in v1 js_event_listeners are stored in the frontend. In v1, when manually refreshing a page, all js_event_listeners on the frontend are lost to the refresh. In v2, since js_event_listeners are stored on the backend, and useEffect doesn't run the cleanup side-effects function (which sends an unlisten request to the backend) before the page is refreshed, the listener doesn't get cleaned up.

this bug will be fixed in next release beta verison?

It's not up to me, but I did fix the bug in pr. If you want to use the fixed tauri now, you can either switch the tauri source to my forked git link in cargo.toml, or pull it locally.
这并不由我决定,但是我已经在pr中确实的解决了这个bug. 如果现在就想使用修复后的tauri, 你可以在cargo.toml中将tauri来源切换到我的fork的git链接, 或者pull 到本地使用.


multi language support

Add suport for other languages.
Some translations are already on /locales but they need to be updated, also the crowdin should be updated

alright... imma start work on this one finally, wish me luck :pray:

im not fully content with this but it is implemented


Fields Like Company Relationshipmanager, email, phone is not showing in Email template - Applies to transactions

Fields Like Company Relationshipmanager, email, phone is not showing in Email template - Applies to transactions

Fields Like Company Relationshipmanager, email, phone is not showing in Email template - Applies to transactions

thereby we are unable to attach  filed company relation ship manager in the email,
which is creating a big issue for all of us for  clients to connect


Missing icons

While merging the current status of this repo in the admin i've discovered that a few icons went missing or are now needed for ViUR3. I'm currently missing icons for:

switching view from icon to table view and vice versa
the csv-export action
opening the (large) text-editor
distinction between "Save & Close" and "Save & Continue" (or "Save & Add new Entry")

Furthermore, we have now more states for a bone in an edit-view (each state should have it's own icon):

Not set/unknown (eg used when opening an add formular before a bone has been touched by the user)
Invalidates other (this bone itself is okay, but due to it's value another bone has become invalid)
Empty (This bone is empty, but it's also not required, so it's still possible to submit the formular)
Invalid (The formular cannot be saved as this bone contains an invalid value (or the bone is empty and required))
Okay (The content of this bone have been validated)

With the new icon set we don't intend to create an icon for every other occasion, instead reuse fitting icons as much as possible. Studies have shown that buttons without a text label perform poorly, thus we do recommend to see the icon as an additional indicator.

icon / table view switch: we have to add these, they are already in use in several customer projects
action csv-export: download-file or download seem fitting for the purpose
open text editor: just plain old edit?
save actions: we have several icons in this regard save, save-all, save-file — the Vi uses save-file for both buttons, but highlights the preferred option as btn--primary

We already have feedback from several customers that too many labels in the edit-view are confusing. We should aim to reduce the number of labels not adding more and more.

Invalid: error or cancel
Okay: save


Ask HQ Raleigh for Open Raleigh Meetup space

Second and Fourth Tuesday - March through June 11
Harrington location - classroom space

Got it!


Refresh tree after creating a server

Fixes https://github.com/microsoft/vscode-cosmosdb/issues/2013

Did you try if refreshUIOnly works as well? I imagine it might be better for performance.

Tested it out, and it just doesn't work.


block certificate: only sync latest certs in catch up sync

Motivation
currently for a new node joining the network, it needs to sync all block certificate from genesis.
there is no need. we can rely on full tortoise to advance the state during catch up sync and only sync cert right before it catch up to current layer.

we can rely on verifying tortoise to advance the state during catch up sync and only sync cert right before it catch up to current layer.

you meant on full tortoise?

we can rely on verifying tortoise to advance the state during catch up sync and only sync cert right before it catch up to current layer.

you meant on full tortoise?

yes. corrected in PR description

bors merge


Inserting Text into the editor with a custom button results in error on keystroke

Quill version

[x] master

Given a toolbar witha custom handler in the modules function
      toolbar: {
        container: [
          ['custom']
        ],
        handlers: {
          "custom": function () {

              this.quill.insertText(this.quill.getSelection().index, 'Hello', 'link', 'https://world.com');
              console.log(this.quill.getText())
          }
        }
      }

When you click the button it does correctly insert the text, but when you click in the editor you get:
The given range isn't in document. Every time you try to type normally. Removing the item in the toolbar makes this stop

Thanks for reporting. Are you defining the handlers inside the render method or elsewhere?

I am defining them in a method I have called modules, and I call modules from the render method, like this:

        <ReactQuill
          className={classes.rteParent}
          theme={`snow`}
          value={value || text}
          onChange={this.handleChange}
          modules={this.modules()}
          formats={this.formats()}
          >

          </ReactQuill>

That is in render,
  modules() {

    return {
      toolbar: {
        container: [
          [
          'custom'
          ]
        ],
         handlers: {
           "custom": function () {

               this.quill.insertText(this.quill.getSelection().index, 'Hello', 'link', 'https://world.com');
               console.log(this.quill.getText())
           }
         }
      }
    }
  }

If you are manipulating Quill imperatively you probably want the uncontrolled form of the component - use the defaultValue prop instead of value.

thank you for the tip, I did not understand that would affect the component beyond the initialization lifecycle, I'll happily try :)

Did this work for you?

Sorry to reply late, I haven't had a chance to try this yet, because I've had to work on other things. I will know very soon and follow up.

Hello, unfortunately this results in errors on every keystroke when I use defaultValue, so unfortunately this does not result in a fix for me. I will close this, I suppose because I  think I can solve my issues in a completely different way.

I am encountering a similar issue - it seems this is only indirectly related to a custom button.
From what I can reproduce it is related to the custom click handler @the-simian defined here - the important point being that we get a new reference to the function anytime the component which uses ReactQuill is rendered - this then triggers the error originally reported here.
Can be reproduced by trying the following for example:
class SomeModule
  constructor(quill, options) {
    quill.keyboard.addBinding({ key: 'a' }, () => options.onA());
  }
}

Quill.register('modules/some-module');

// later on in a render function
const modules = { 'some-module': { onA: () => console.log('typed a') } };
// and then pass these modules to ReactQuill

This will break because the onA handler we pass in is always a new reference.
Doing something like this will work fine:
// outside the render function
const onA = () => console.log('typed a');

// inside the render function
const modules = { 'some-module': { onA } };

This makes the deep equality check pass and everything is fine. There seems to be something wrong with the dirtyProps defined by ReactQuill perhaps which trigger a regeneration.
The workaround proposed is of course not really great, because it limits quite drastically what functions consumers can pass to quill modules.
Haven't investigated this further yet to really fix it.

hey @LFDM , really appreciate the update, and that's incredibly useful information

@the-simian @LFDM

This makes the deep equality check pass and everything is fine. There seems to be something wrong with the dirtyProps defined by ReactQuill perhaps which trigger a regeneration.

There's not really anything "wrong" with it, in fact the dirty check does a deep value check just to allow passing objects defined in render. However, creating a new function (as with an arrow function) each time will definitely cause a reinitialization of Quill. Technically this is because functions cannot be compared by value, but more importantly the functions in modules are passed directly to Quill and figuring out whether the new function is compatible with whatever is already registered is not practical.
https://github.com/zenoamaro/react-quill/blob/master/src/component.js#L242-L250

The workaround proposed is of course not really great, because it limits quite drastically what functions consumers can pass to quill modules.

If the declarative API of ReactQuill is limiting, you might want to try a simple wrapper (let's call it React-Quill Lite):
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import Quill from 'quill'

class ReactQuillLite extends Component {
  componentDidMount() {
    this.editor = new Quill(this.editorNode, {
      theme: this.props.theme,
      placeholder: this.props.placeholder,
    })
  }

  shouldComponentUpdate() {
     return false
  }

  render() {
    return
 this.editorNode = el}/>
  }
}

ReactQuillLite.propTypes = {
  theme: PropTypes.string,
  placeholder: PropTypes.string,
}

ReactQuillLite.defaultProps = {
  theme: 'snow',
  placeholder: 'Write something...'
}

@alexkrolick I do understand the object reference problem, this is reasonable behavior, what I meant with "there is something wrong" is that even if one of the dirty props changes, the editor should probably not throw an exception and become unresponsive - the reinstantiation doesn't seem to work properly. (wouldn't have solved the initial problem, but it would have behaved more as specified)

Ok... I can look into this more if you provide an editable example on Codepen, CodeSandbox, JSFiddle, etc.

Use componentDidMount and ref, and remove handlers from modules:
modules() {
  return {
    toolbar: {
      container: [
        [
        'custom'
        ]
      ]
    }
  }
}

handleCustomToolbarButton() {
  const quill = this.quillRef.getEditor()

  quill.insertText( quill.getSelection().index, 'Hello', 'link', 'https://world.com' )

  console.log( quill.getText() )
}

componentDidMount() {
    const toolbar = this.quillRef.getEditor().getModule('toolbar')

    toolbar.addHandler( 'custom', ::this.handleCustomToolbarButton )
}

render() {
    return (
      <ReactQuill
        ref={(el) => this.quillRef = el}
        className={classes.rteParent}
        theme={`snow`}
        value={value || text}
        onChange={this.handleChange}
        modules={this.modules()}
        formats={this.formats()}
      >

      </ReactQuill>
    )
}

in my case , it worked when i delete  this from[ codepen example]
(https://codepen.io/alexkrolick/pen/gmroPj?editors=0010)
and added componentDidMount  like @undermuz  comment

my complete  code ( using server render)
import React from 'react';
import 'react-quill/dist/quill.snow.css';

const CustomToolbar = () => (

    <select className="ql-header">
      <option value="1"></option>
      <option value="2"></option>
      <option selected></option>
    </select>
    <button className="ql-bold"></button>
    <button className="ql-italic"></button>
    <select className="ql-color">
      <option value="red"></option>
      <option value="green"></option>
      <option value="blue"></option>
      <option value="orange"></option>
      <option value="violet"></option>
      <option value="#d0d1d2"></option>
      <option selected></option>
    </select>
    <button className="ql-insertStar">
      ★
    </button>

);

function insertStar() {
  const cursorPosition = this.quill.getSelection().index;
  this.quill.insertText(cursorPosition, '★');
  this.quill.setSelection(cursorPosition + 1);
}

const modules = {
  toolbar: {
    container: '#toolbar',
    handlers: {
      'insertStar': insertStar,
    }
  }
};

const formats = [
  'header', 'font', 'size',
  'bold', 'italic', 'underline', 'strike', 'blockquote',
  'list', 'bullet', 'indent',
  'link', 'image', 'color',
];

class Editor extends React.Component {

  constructor(props) {
    super(props);
    this.state = {editorHtml: ''};
    if (typeof window !== 'undefined') {
      this.ReactQuill = require('react-quill');
    }
  }

  handleChange(html) {
    this.setState({editorHtml: html});
  }

  componentDidMount() {
    const toolbar = this.quillRef.getEditor().getModule('toolbar');
    toolbar.addHandler('insertStar', insertStar);
  }

  render() {
    const ReactQuill = this.ReactQuill;

    if (!ReactQuill) {
      return null;
    }

    return (

        <CustomToolbar/>
        <ReactQuill
          ref={(el) => this.quillRef = el}
          onChange={this.handleChange.bind(this)}
          placeholder={this.props.placeholder}
          modules={modules}
          formats={formats}
          theme={'snow'}
        >
        </ReactQuill>

    );
  }
}

export default Editor;

I need it for a functional component

@Irwin007-lab try using useCallback to make a stable function reference for your callbacks in a function component

import ReactQuill from "react-quill";
import Quill from "quill";
import ImageResize from "quill-image-resize-module--fix-imports-error";
Quill.register("modules/imageResize", ImageResize);
const fontSizeStyle = Quill.import("attributors/style/size");
fontSizeStyle.whitelist = [
"8px",
"10px",
"12px",
"14px",
"16px",
"18px",
"20px",
"22px",
"24px",
"28px",
"32px",
"36px",
"40px",
"48px",
"50px",
"56px",
"60px",
"64px",
"68px",
"70px",
"72px",
"76px",
"80px",
"96px",
"100px",
];
Quill.register(fontSizeStyle, true);
const Inline = Quill.import("blots/inline");
class Superscript extends Inline {
static create() {
let node = super.create();
node.setAttribute("style", "font-size: smaller; vertical-align: super;");
return node;
}
}
Superscript.blotName = "superscript";
Superscript.tagName = "sup";
Quill.register(Superscript);
class Subscript extends Inline {
static create() {
let node = super.create();
node.setAttribute("style", "font-size: smaller; vertical-align: sub;");
return node;
}
}
Subscript.blotName = "subscript";
Subscript.tagName = "sub";
Quill.register(Subscript);
const DocEditor = () => {
const [content, setContent] = useState("");
const imageHandler = () => {
const input = document.createElement("input");
input.setAttribute("type", "file");
input.setAttribute("accept", "image/png, image/jpeg, image/gif");
input.click();
input.onchange = () => {
  const file = input.files[0];
  const formData = new FormData();
  formData.append("file", file);

  // You can upload the image using a service here
  const reader = new FileReader();
  reader.onloadend = () => {
    const range = editorInstance.current.getEditor().getSelection();
    editorInstance.current
      .getEditor()
      .insertEmbed(range.index, "image", reader.result);
  };
  reader.readAsDataURL(file);
};

};
const modules = useMemo(
() => ({
toolbar: {
container: [
[
{ header: [1, 2, 3, 4, 5, 6, false] },
{ font: ["sans-serif", "serif", "monospace"] },
["custom"],
],
["bold", "italic", "underline", "strike"],
[
{ list: "ordered" },
{ list: "bullet" },
{ indent: "-1" },
{ indent: "+1" },
],
[
{ align: "" },
{ align: "center" },
{ align: "right" },
{ align: "justify" },
],
["image", "link"],
[{ size: fontSizeStyle.whitelist }],
[{ color: [] }, { background: [] }],
["clean"],
// ["code-block"],
],
handlers: {
image: imageHandler,
custom: function () {
console.log('hiii')
this.quill.insertText(
this.quill.getSelection().index,
"Hello",
"link",
"https://world.com"
);
console.log(this.quill.getText());
},
},
},
imageResize: {
parchment: Quill.import("parchment"),
modules: ["Resize", "DisplaySize"],
},
}),
[]
);
const formats = [
"header",
"bold",
"italic",
"underline",
"strike",
"blockquote",
"list",
"bullet",
"align",
"link",
"image",
"font",
"size",
"color",
"background",
"superscript",
"subscript",
];
return <ReactQuill
ref={editorInstance}
theme="snow"
value={content}
onChange={(v) => setContent(v)}
modules={modules}
formats={formats}
className="sd_doc_editor flex-1"
placeholder="Start typing..."
/>
    still not working in mine system

}


Validate the current login user in the user related APIs

fixed #623

Please update the UI part with this PR.

I update the UI in https://github.com/eclipse-xpanse/xpanse-ui/pull/136


Fix Postgres permission issue

Postgres deployments gives permission issue in some deployments.
fixing permissions on existing directory /var/lib/postgresql/data ... initdb: error: could not change permissions of directory
Also, align the postgres with tekton Hub postgres deployment.

/test tekton-results-unit-tests

/test tekton-results-unit-tests

/lgtm

/kind bug


chore(deps): np-guard/cluster-topology-analyzer/v2 from 2.2.1 to 2.3.0

Description
github.com/np-guard/cluster-topology-analyzer/v2 from 2.2.1 to 2.3.0
github.com/np-guard/netpol-analyzer/v1 from 1.1.0 to 1.2.0
How I validated my change
expected output has been updated to fit new versions changes

/ok-to-test

/retest-required

hi @rhybrillou, thanks for approving;
I see no option to merge; can you please help me with it?


[HOLD for payment 2023-10-12] [$500] The font for unread messages is not bolded in Android

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Action Performed:

Open reports sidebar
Observe any report that has unread message

Expected Result:
The font should be bolded
Actual Result:
The font is not bolded
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:

Which of our officially supported platforms is this issue occurring on?

[x] Android / native
[ ] Android / Chrome
[ ] iOS / native
[ ] iOS / Safari
[ ] MacOS / Chrome / Safari
[ ] MacOS / Desktop

Version Number:
Reproducible in staging?: needs reproduction
Reproducible in production?: needs reproduction
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
https://github.com/Expensify/App/assets/43996225/25eeb6fb-3aaa-45ad-9a71-e474325ca744
Expensify/Expensify Issue URL:
Issue reported by: @krishna2323
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1692053748619759
View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~014cfdb7c2eb889c72
Upwork Job ID:<PHONE_NUMBER>123820544
Last Price Increase: 2023-09-21
Automatic offers:

krishna2323 | Reporter | 26624529

Proposal by @Krishna2323
Please re-state the problem that we are trying to solve in this issue.
The font for unread messages is not bolded in Android
What is the root cause of that problem?
React native has a bug in which fonts are not bolded on android until we add a bold fontFamily file. We are using the right bold fontFamily file & font weight variable  in HeaderView, thats why it's bolded in android correctly.
https://github.com/Expensify/App/blob/00efce42977caf147dddf7763f06758bf39bb6f1/src/styles/styles.js#L820-L825
But not in the DisplayNames in OptionRowLNH.
https://github.com/Expensify/App/blob/00efce42977caf147dddf7763f06758bf39bb6f1/src/components/LHNOptionsList/OptionRowLHN.js#L77-L78
Style:
https://github.com/Expensify/App/blob/00efce42977caf147dddf7763f06758bf39bb6f1/src/styles/styles.js#L1467-L1472
https://github.com/Expensify/App/blob/00efce42977caf147dddf7763f06758bf39bb6f1/src/styles/styles.js#L1445-L1448
What changes do you think we should make in order to solve the problem?
We need to change fontFamily & fontWeight according to the unread status and use it just like it is used in HeaderView. File below also confirms the root cause.
https://github.com/Expensify/App/blob/main/src/styles/fontWeight/bold/index.android.js

@Expensify/design curious for your take on this one

That does seem like a bug and even beyond that, it looks like not only is the font not bold, but a totally incorrect font is being applied. Notice how the number "6" changes shape when it goes from unread to read? So yeah, this is definitely a bug but I would say this is most likely a regression as this would have been working fine at some point. Cc @grgia who implemented the fonts here.
If this is a regression (which I think it must be), then let's track it down and have the offending PR author fix it.

Hmm I feel like we have touched the sidebar stuff way more recently than 2020. Either way, let's get this fixed but curious for @grgia's take too.
Do we know why only a few Android devices experience this?

Sounds good, @laurenreidexpensify can we get this issue into motion?
The Android thing seems like a bit of a hack. We should be using font-weight 700 as it maps to Expensify Neue Bold.

Thanks for the review @shawnborton - @grgia am assigning you in case you want to take this for now / add any additional details

Unassigned myself due to low bandwidth assign new C+ if required by adding external/internal label again, thanks!
cc: @laurenreidexpensify

assigned @allroundexperts

I agree with @shawnborton that it doesn't look like a regression, but we should avoid any hacky solutions

I am not able to reproduce in android. Is this device specific?

@Krishna2323 what device are you using? It's not stated in repro step

@allroundexperts are we good to move forward with the proposal above?

@allroundexperts any luck on the Realme device?

I think as long as there are no negative knock on effects of this then we should fix it. If you're happy with the proposals above @allroundexperts let's do it

Payment Summary:

External issue reporter - @Krishna2323  - $50 paid in Upwork
Contributor that fixed the issue - @Krishna2323  - $500 + $250 urgency bonus - paid in Upwork
Contributor+ that helped on the issue and/or PR - @allroundexperts - $500 + $250 bonus - please request in Newdot

@allroundexperts please complete checklist above thanks

waiting on @allroundexperts for checklist!

@allroundexperts thanks for the update. I think in this instance we're honouring the issue creation date, so the payments stand. Thanks for checking tho. I am closing as we have no further action here now.

$1,500 payment approved for @allroundexperts based on summary above.


JsonPath remove [ ]

how to remove [] in my result in JsonPath, I saw in other topics using id, but I not have ID. This is code I use:
[{"timestamp":"20180719T11:45:24Z",
"type":"S1",
"mac":"AC233FA03DB6",
"bleName":"",
"rssi":-53,
"battery":100,
"temperature":20.18,
"humidity":63.02}]

and this is the filter
<EMAIL_ADDRESS>)].temperature
I use this site for test my examples: (http://jsonpath.herokuapp.com/?path=$..book[2:])

Almost solved my problem. I will explain to you, I have several sensors and two temperature sensors, when the Json package arrives it sometimes sends in random order, that way I would have to use the mac as a filter because it contains more sensors and the position always changes.
This is my Json package
[{"timestamp":"2018-07-24T14:04:48Z","type":"iBeacon","mac":"AC233F252A0C","bleName":"","ibeaconUuid":"E2C56DB5DFFB48D2B060D0F5A71096E0","ibeaconMajor":0,"ibeaconMinor":0,"rssi":-46,"ibeaconTxPower":-59,"battery":0},

{"timestamp":"2018-07-24T14:04:49Z","type":"iBeacon","mac":"AC233F2539C2","bleName":"","ibeaconUuid":"E2C56DB5DFFB48D2B060D0F5A71096E0","ibeaconMajor":0,"ibeaconMinor":0,"rssi":-46,"ibeaconTxPower":-59,"battery":0},

{"timestamp":"2018-07-24T14:04:49Z","type":"iBeacon","mac":"AC233F2539D3","bleName":"","ibeaconUuid":"E2C56DB5DFFB48D2B060D0F5A71096E0","ibeaconMajor":0,"ibeaconMinor":0,"rssi":-52,"ibeaconTxPower":-59,"battery":0},

{"timestamp":"2018-07-24T14:04:49Z","type":"S1","mac":"AC233FA03DB6","bleName":"","rssi":-48,"battery":100,"temperature":21.73,"humidity":64.42},

{"timestamp":"2018-07-24T14:04:49Z","type":"S1","mac":"AC233FA03E16","bleName":"","rssi":-53,"battery":100,"temperature":20.81,"humidity":62.39}

]

if I use $[0]['temperature'] I need change everytime the position, so, I need filter with your mac and get the value of temperature.

Why don't you just use the first value of the returned array?

What I want you to understand is that array information can vary, temperature and humidity may come in the [0], [2] or [5] for example, which implies that I'm using an application called mqtt dashboard, when I create a dashboard I put as for example $[0]['temperature'] but if I connect another sensor it may be that the array where it is the temperature and humidity go to the array [1], I just do not want to have to keep changing in the application in which array the value will arrive. So I used a filter for the mac, because it is a fixed value that the sensors send.

I saw now the same problem in other topic
https://github.com/json-path/JsonPath/issues/272


Adminer: Add documentation for the role

Part of osism/issues#185
Signed-off-by: Ramona Rautenberg<EMAIL_ADDRESS>

All changes are done.


Update license collection script to perform line wrapping and indentation normalization

This would improve both the rendering of the licenses and reduce the total number of licenses, which would reduce the executable size.

Touching as part of the triage exercise. I'm not sure if this has been done or not.


CASMCMS-8066: Updated BOS docs for BOS V2

Description
Adds and updates BOS documentation for BOS V2
Checklist Before Merging

[X] If I added any command snippets, the steps they belong to follow the prompt conventions (see [example][1]).
[X] If I added a new directory, I also updated .github/CODEOWNERS with the corresponding team in [Cray-HPE][2].
[X] My commits or Pull-Request Title contain my JIRA information, or I do not have a JIRA.

This PR is not fully complete and still requires updated images and some linting polish, but it can be reviewed for content.

This PR is not fully complete and still requires updated images and some linting polish, but it can be reviewed for content.

Converting to a draft.

Linting changes are complete.  The remaining failing check requires the new flow images.

I know this is still a draft, but I'm adding the "do not merge" label because I want to review this before we merge it (and have had bad luck with things being merged when I have only commented on this in my feedback but not added the label). This does not imply anything about my feelings as to the quality of the content here -- it just means that I don't know if I will have time to review this before the first time it will be considered for merging.
I will remove the label once it is marked ready for review, I've finished my reviews, and issues identified (if any) are addressed.

/backport release/1.3


Delays in failover

HI,shlomi-noach
In the time of failover,if all of the replica have a delay, how does the orchestrator cope with? and,If IO delay exists, whether the orchestrator will transmit the delayed event to the new master
Looking forward to your reply.
Thank you!

see FailMasterPromotionIfSQLThreadNotUpToDate in https://github.com/github/orchestrator/blob/master/docs/configuration-recovery.md#promotion-actions, and also consider the not-merged-yet https://github.com/github/orchestrator/pull/771

Thank you very much for your reply.
I understand the impact of FailMasterPromotionIfSQLThreadNotUpToDate on orchestrator. But I think orchestrator is too sensitive to delays, and DelayMasterPromotionIfSQLThreadNotUpToDate is a good idea to solve.
However, in the case where DelayMasterPromotionIfSQLThreadNotUpToDate is configurable, further consideration is given. At the failover time, if the master event has not yet been written to the replica's relay log, and the SQL thread catches up with the current relay log in a short period of time.(In the case of asynchronous replication, this situation may occur.) For this situation, I think it should be judged whether the master's network is reachable. If it is reachable, the master's binary log (the event slave's relay log missing) should be sent to the slave for application. This application time can be included in DelayMasterPromotionIfSQLThreadNotUpToDate.If the master network is unreachable, the configuration of FailMasterPromotionIfSQLThreadNotUpToDate determines whether to promote.

For this situation, I think it should be judged whether the master's network is reachable. If it is reachable, the master's binary log (the event slave's relay log missing) should be sent to the slave for application. This application time can be included in DelayMasterPromotionIfSQLThreadNotUpToDate.If the master network is unreachable, the configuration of FailMasterPromotionIfSQLThreadNotUpToDate determines whether to promote.

Thank you for the suggestion. It has been suggested in the past, and some work has been attempted at this, but eventually dropped.
Shipping the binary logs from other servers requires an agent to be installed, or remote SSH access.

orchestrator prefers the agentless approach.
In attempts to sync relay logs I've encountered errors which I was not comfortable working with. Like halfway-through-transaction. I know MHA solved this, I'm unlikely to. See discussion in https://github.com/github/orchestrator/issues/448
Turning on semi-sync avoids the need for this kind of solution. In our experience semi-sync works well.


AnimationTree StateMachine transition animation reset behaves weird depending on blend position

Tested versions

Reproducable on Godot Engine v4.3.dev6.official [89850d553]

System information
Windows 11
Issue description
A BlendSpace2D with a transition configured to reset the animation, does not reset the animation depending on if the blend_position changed.
Whenever the blend_position stays the same, the animation is properly started at 0, if the blend_position is different, the animation is started somewhere inbetween the start and end, causing keyframes to not trigger, in this case a texture only gets set after the animation restarts naturally.
Steps to reproduce

Create an AnimationPlayer and set up some animation that set a texture on the first keyframe.
Create an AnimationTree with two BlendSpace2Ds, for idle and moving. Set up the blendspaces with animations for each direction. Set the blend mode to CA (BLEND_MODE_DISCRETE_CARRY )
Set up a script that sets the blend position and a way to transition between the two states.
Run the project and see that the texture only changes when the blend position remains the same between states.

Minimal reproduction project (MRP)
This project demonstrates the issue with a progress bar (the progress in the animation), and two color changing cubes with a different color for each direction.
The top cube is a ColorRect, and the bottom a Sprite2D.
Animations with keyframes are set up to change the appearance of both cubes, but the Sprite2D only changes whenever the animation actually passes the keyframe, to demonstrate it changing only after the animation ended and starts to loop.
The expected behavior is that both cubes instantly change color (through the keyframe at 0), whenever any direction is pressed.
What actually happens is, the animation doesn't start from 0 when the blend position changes.
Pressing only one direction (eg. right, right, right, right), shows the animation properly resetting to 0.
Alternating directions causes the animation to not start from 0, causing the color change to be delayed until the animation loops.
mrp-blend-position-bug.zip

Although the behavior of dev6 and the current master is different, I found a bug in the force continous behavior nonetheless, so I sent a fix as https://github.com/godotengine/godot/pull/93185.


Tests and docs MshFile struct

Closes #103
A new boundary condition case is defined in the uniaxial extension example:
bc₄ = LocalPressureBoundaryCondition([:u], t -> [p * t], "tension")

Also getter functions for the MshFile struct:
    file_name = joinpath(@__DIR__, "..", "examples", "uniaxial_extension", "uniaxial_extension.msh")
    msh_file = MshFile(file_name)

    @test nodes(msh_file) == msh_file.vec_nodes
    @test length(physical_index(msh_file)) == length(connectivity(msh_file))
    @test dimension(msh_file) == dimension(first(nodes(msh_file)))
    @test material_label(msh_file) == ["", "", "", "", "svk"]
    @test entity_label(msh_file) == ["triangle", "triangle", "triangle", "triangle", "tetrahedron"]
    @test bc_label(msh_file) == ["fixed-ux", "fixed-uj", "fixed-uk", "tension", ""]

    entity_index = 100
    @test entity_label(msh_file, entity_index) == "tetrahedron"
    @test material_label(msh_file, entity_index) == "svk"
    @test bc_label(msh_file, entity_index) == ""
    @test physical_index(msh_file, entity_index) == 5

Codecov Report

Merging #108 (f6ef5fb) into main (af4319e) will increase coverage by 0.15%.
The diff coverage is 100.00%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@            Coverage Diff             @@
##             main     #108      +/-   ##
==========================================
+ Coverage   91.49%   91.64%   +0.15%
==========================================
  Files          30       30
  Lines         776      790      +14
==========================================
+ Hits          710      724      +14
  Misses         66       66

Impacted Files
Coverage Δ

src/Meshes/Meshes.jl
97.56% <ø> (ø)

src/Meshes/Gmsh.jl
100.00% <100.00%> (ø)

src/StructuralModel/Structure.jl
91.89% <100.00%> (-0.22%)
:arrow_down:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

Excellent!


[DUOS-806][risk=low] Specify ignore file on command line

Addresses
https://broadinstitute.atlassian.net/browse/DUOS-806
See also DataBiosphere/consent#785 for a more comprehensive fix
Temporary workaround for addressing a known, unfixed vulnerability.

Have you read CONTRIBUTING.md lately? If not, do that first.
I, the developer opening this PR, do solemnly pinky swear that:

[ ] I've followed the instructions if I've made any changes to the API, especially if they're breaking changes
[ ] I've updated the RC_XXX release ticket with any manual steps required to release this change
[ ] I've updated the FISMA documentation if I've made any security-related changes, including auth, encryption, or auditing
[ ] I've updated Swagger to reflect any API changes

In all cases:

[ ] Get two thumbsworth of review and PO signoff if necessary
[ ] Verify all tests go green
[ ] Squash and merge; you can delete your branch after this unless it's for a hotfix. In that case, don't delete it!
[ ] Test this change deployed correctly and works on dev environment after deployment

@dinvlad Thank you!


STOP OPENING issues for stash bug.

I'm sure the people who can fix it will do it once they have some time for it.
meanwhile, here's a solution that worked for me:
workaround (until bug is fixed) - it seems certain items and especially maps from warbands that were moved to standard confuse procurement.
I personally removed (to guild stash) the maps i had from all tabs in my stash.
Not just old style tier maps - all maps i had.
Then it started up with no errors.

Hear hear u beat me to pointing out that 1057 'notifications' for the same problem is about 1056 too many.
Thanks to him/her/them working on this I sorta worked out what the probable cause was likely to be but as a soloer a guild stash isn't an option but not too worry I'm sure everything will be fixed.

RIP my inbox, new release coming soon.

I'd gladly help myself if you want it. I'm a programmer ☺
On Oct 4, 2015 9:58 AM, "Stickymaddness"<EMAIL_ADDRESS>wrote:

RIP my inbox, new release coming soon.
—
Reply to this email directly or view it on GitHub
https://github.com/Stickymaddness/Procurement/issues/254#issuecomment-145325146
.

@kuratsak  I'll gladly accept pull requests for Procurement, a lot of great functionality has come from developers in the community! In this instance I only had time now to add a fix and do a new release.
The new version of Procurement is out, which fixes this issue: https://github.com/Stickymaddness/Procurement/releases/tag/1.9.6
Unfortunately until GGG decide to support the dev community, these type of issues will continue to happen as it is out of our hands. http://i.imgur.com/yrPtajM.jpg

Cool,  I got a few features I'd like to add myself. Intuitive stuff 😊
I'll try to get to it when I have some time.
On Oct 4, 2015 11:16 AM, "Stickymaddness"<EMAIL_ADDRESS>wrote:

@kuratsak https://github.com/kuratsak I'll gladly accept pull requests
for Procurement, a lot of great functionality has come from developers in
the community! In this instance I only had time now to add a fix and do a
new release.
The new version of Procurement is out, which fixes this issue:
https://github.com/Stickymaddness/Procurement/releases/tag/1.9.6
Unfortunately until GGG decide to support the dev community, these type of
issues will continue to happen as it is out of our hands.
http://i.imgur.com/yrPtajM.jpg
—
Reply to this email directly or view it on GitHub
https://github.com/Stickymaddness/Procurement/issues/254#issuecomment-145329583
.

you work on it with VS2010?
or is there a way to compile/work without installing VS2010?
On Sun, Oct 4, 2015 at 12:20 PM, Dan Koretsky<EMAIL_ADDRESS>wrote:

Cool,  I got a few features I'd like to add myself. Intuitive stuff 😊
I'll try to get to it when I have some time.
On Oct 4, 2015 11:16 AM, "Stickymaddness"<EMAIL_ADDRESS>wrote:

@kuratsak https://github.com/kuratsak I'll gladly accept pull requests
for Procurement, a lot of great functionality has come from developers in
the community! In this instance I only had time now to add a fix and do a
new release.
The new version of Procurement is out, which fixes this issue:
https://github.com/Stickymaddness/Procurement/releases/tag/1.9.6
Unfortunately until GGG decide to support the dev community, these type
of issues will continue to happen as it is out of our hands.
http://i.imgur.com/yrPtajM.jpg
—
Reply to this email directly or view it on GitHub
https://github.com/Stickymaddness/Procurement/issues/254#issuecomment-145329583
.

--
Dan.


Best way to load custom local fonts

What's the best way to load custom local fonts?
Description
I have 2 fonts that I need to load into the project that will be hosted statically with the documentation. I've tried adding it in a style tag that loads the fonts via @font-face in a custom index.html that's loaded in via the indexHtml config prop, but I can't seem to find a path that will work.
Any advice?

Have you tried something like this?
...rest config...
htmlContext: {
  head: {
    raw: [
      `<style>${fs.readFileSync(process.cwd() + '/src/styles/fonts.css')}</style>`
    ],
  },
},
...rest config...

@zicodeng I couldn't find htmlContext as an available config property. Maybe it was in 1.0?
For anyone looking to do this in 2.0, here's how I went about it. Would love other advice or critique on this approach!

In the root of your project, create a file at src/gatsby-theme-docz/wrapper.js. This utilizes component shadowing, and will override the existing wrapper.js file.
In the contents of wrapper.js, include a basic component that just passes down children:

import React from 'react'

export default ({ children }) => (
  <Wrapper>
    { children }
  </Wrapper>
)

Create a global css file in which load in your custom fonts, and import it in your wrapper.js

import "./styles/global.css"
import React from 'react'

...

I'm using @font-face and pointing a set of fonts inside of the project.
Hope this helps someone!

@Reklino mb, I didn't know you are working with v2. I haven't tried v2 yet, but thanks for sharing your solution here!


How to deal with oov tokens with pretrained models

❓ Questions & Help
Can you, please, give an advice on how to handle out of vocabulary word? Just to use [UNK] token or there is a way to add this token to vocabulary and thus to train embedding for it?
Also, I noticed that oov words by default return multiple tokens. In my task (sequence tagging) I would like to save token-label correspondence.

Hello! We have a method called add_tokens in our tokenizers that does just that. Here's the relevant information in the documentation.

Thanks a lot for your answer. That's exactly what I was looking for.


Language selector URL does not expect null page id

The Resolve action in the PageController cannot handle a null or empty page id in the itemId parameter. It should be more flexible and accept if no page id is passed.
The current behavior when page id 0 is passed is acceptable. In that case the controller redirects to the default page of the site.
For example this URL http://localhost/resolve/82?localizationId=51&defaultPath=/demo/ will work fine. It will try to resolve page id 82 in publication 51.
When the request does not have the context of a page this URL with page id 0 can be used http://localhost/resolve/0?localizationId=51&defaultPath=/demo/.
However if no page id is passed like http://localhost/resolve/?localizationId=51&defaultPath=/demo/ the webapplication returns an unexpected error:
Server Error in '/' Application.

Unexpected item type in TCM URI: tcm:0-0-0

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: Sdl.Web.Common.DxaException: Unexpected item type in TCM URI: tcm:0-0-0

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Internal issue created: https://jira.sdl.com/browse/TSI-2898

Fixed in DXA 1.8 and 2.0


PackedByteArray Unicode decoding functions decode invalid Unicode instead of returning empty strings

Tested versions

4.2.stable

System information
Godot v4.2.1.stable - Ubuntu 20.04.6 LTS (Focal Fossa) - X11 - GLES3 (Compatibility) - Mesa Intel(R) HD Graphics 530 (SKL GT2) () - Intel(R) Core(TM) i5-6440HQ CPU @ 2.60GHz (4 Threads)
Issue description
The documentation states that for a PackedByteArray containing invalid Unicode data, the get_string_from_utf*() and get_string_from_wchar() methods will return an empty string. However, when this is actually attempted, the operation will print errors to the console and return a string with U+FFFD in place of the invalid codepoints.
The expected behavior is that no errors are printed and empty strings are returned. This way a project can do something like:
func decode_valid_utf8(b: PackedByteArray):
	var decoded = b.get_string_from_utf8()
	if decoded == '' and not b.is_empty():
		return null
	return decoded

To my knowledge, there is currently no way of validating Unicode.
Steps to reproduce
PackedByteArray([0x80]).get_string_from_utf8()
PackedByteArray([0xFF, 0xDF]).get_string_from_utf16()
PackedByteArray([0xFF, 0xFF, 0xFF, 0xFF]).get_string_from_utf32()
PackedByteArray([0xFF, 0xFF, 0xFF, 0xFF]).get_string_from_wchar()

Minimal reproduction project (MRP)
Refer to the "steps to reproduce" section.

I'd say this is a case of incorrect documentation, and the code shouldn't be changed as it is valid in itself and might be used by people in its current form

Maybe, but there is currently no way to validate UTF at all. Additionally, some of the functions indeed return empty strings as stated in the documentation, but while printing errors.

This is the correct way to process utf8 according to the standard AFAIK

but there is currently no way to validate UTF at all

I'd say this method shouldn't be used for that purpose in the first place, there should be dedicated methods for it instead of wastefully decoding a string to do so

The UTF32 and wchar methods do not return empty strings on invalid characters. However, for the UTF16 decoder with the example above, a seemingly wholly invalid string is returned.

But 0xFFDF is a valid codepoint? It's valid utf16 no?

But 0xFFDF is a valid codepoint?

It's 0xDFFF (little-endian), invalid unpaired surrogate.

My bad, they didn't specify endianness of their system, the method uses system endianness

Maybe, but there is currently no way to validate UTF at all.

Internal functions String::parse_utf16 and String::parse_utf8 return error code, but I do not think these are directly exposed to the GDScript.

However, for the UTF16 decoder with the example above, a seemingly wholly invalid string is returned

This is intentional in this case (but should be documented, and maybe have a flag to configure this behavior), unpaired surrogates are invalid in UTF-16, but Windows allow using them in the file names (and UTF-16 ↔ String function are used to work with Windows file API), so unpaired surrogates are preserved as is.

PackedByteArray([0xFF, 0xFF, 0xFF, 0xFF]).get_string_from_utf32()
PackedByteArray([0xFF, 0xFF, 0xFF, 0xFF]).get_string_from_wchar()

These are valid, in case wchar_t is UTF-32 (on all platforms except Windows).

U+FFFE  and U+FFFF  are noncharacters, meaning they are reserved but do not cause ill-formed Unicode text.

Maybe, but there is currently no way to validate UTF at all.

Internal functions String::parse_utf16 and String::parse_utf8 return error code, but I do not think these are directly exposed to the GDScript.

Using the builtin search for unicode, utf, parse shows up nothing. I've also checked for parse and valid in the documentation. So the methods are not exposed to GDScript.


Butler fixes

Fixed the butler not throwing the items. It still "sometimes" gets stuck, but I don't think that is a butler issue, I think it has to do with Minecraft distances. Will apply more fixes in the future.

Yeah this issue is caused by ThrowSlotTask not being used & designed properly. Will end up fixing this in the next bugfix/big refactor. Still, thank you for bringing this to attention!


restore Polish translations & correct new labels

Hi,
My last changes were overwritten and didn't make it to the live version. So here I am again with corrected Polish translations up to date with the latest version. 😉

Temporarily reverting to fix merge issue will re-merge soon.


Setting any option in keymaps to an empty string yields error

Checklist

[X] Have you tried updating the plugin to the latest version?
[X] Have you checked the Breaking Changes issue?
[X] Have you read through :h nvim-surround to see if there might be any relevant information there?

Neovim Version
NVIM v0.9.0-dev-849+g7880eeb2e
Plugin Version
Tagged (Stable)
Minimal Configuration
require('nvim-surround').setup {
	keymaps = {
		insert = "",
		insert_line = "",
		normal = "s",
		normal_cur = "ss",
		normal_line = "yS",
		normal_cur_line = "ySS",
		visual = "s",
		visual_line = "S",
		delete = "ds",
		change = "cs",
	},
}

Sample Buffer
none
Keystroke Sequence
none
Expected behavior
The mapping would be ignored (not created).
Actual behavior
Error:
vim/keymap.lua:0: Invalid (empty) LHS

# stacktrace:
  - vim/keymap.lua:0 _in_ **set**
  - .config/nvim/init/plugins_portable.lua:1330 _in_ **config**
  - lua:40

Additional context
No response

They should be set to false to disable them.

Yep, seems to work. Thank you.
Is this not still a bug though? If not, you can close.

No, as setting the LHS of a keymap to an empty string doesn't make sense.


The correction for daemonset-check code

Signed-off-by: zhicheng.li<EMAIL_ADDRESS>https://github.com/kuberhealthy/kuberhealthy/issues/1020

@integrii


how to use lua-in-js

how to use lua-in-js ?

There is an usage example in the readme.

I will close the issue.
Feel free to reopen it if you need any more info.


[client] Reset user token in httpclient5

Reset user token in httpclient5

When a connection lease attempt is made the state requested is null. However when the connection is put back into the pool the state is set to the X500Principal object of the SSL peer. This happens in the DefaultUserTokenHandler class. This PR overrides while creating the HttpClient class so that it will reuse the connections.
Before using httpclient5 using SSL.
client->router delay ~300ms from local mac to ltx1 due to SSL/TLS handshake while creating conn on every requests.
After this change
client->router delay ~100ms from local mac to ltx1.
How was this PR tested?

testing using venice-thin-client.
Does this PR introduce any user-facing changes?

[x] No. You can skip the rest of this section.
[ ] Yes. Make sure to explain your proposed changes and call out the behavior change.

When a connection lease attempt is made the state requested is null. However when the connection is put back into the pool the state is set to the X500Principal object of the SSL peer. This happens in the DefaultUserTokenHandler class. This PR overrides while creating the HttpClient class so that it will reuse the connections.

Why should we share connections among different SSL principals??

When a connection lease attempt is made the state requested is null. However when the connection is put back into the pool the state is set to the X500Principal object of the SSL peer. This happens in the DefaultUserTokenHandler class. This PR overrides while creating the HttpClient class so that it will reuse the connections.

Why should we share connections among different SSL principals??

When a connection lease attempt is made the state requested is null. However when the connection is put back into the pool the state is set to the X500Principal object of the SSL peer. This happens in the DefaultUserTokenHandler class. This PR overrides while creating the HttpClient class so that it will reuse the connections.

Why should we share connections among different SSL principals??

We dont, thats why it cannot reuse the same connection unless we clear the state.

When a connection lease attempt is made the state requested is null. However when the connection is put back into the pool the state is set to the X500Principal object of the SSL peer. This happens in the DefaultUserTokenHandler class. This PR overrides while creating the HttpClient class so that it will reuse the connections.

Why should we share connections among different SSL principals??

When a connection lease attempt is made the state requested is null. However when the connection is put back into the pool the state is set to the X500Principal object of the SSL peer. This happens in the DefaultUserTokenHandler class. This PR overrides while creating the HttpClient class so that it will reuse the connections.

Why should we share connections among different SSL principals??

We dont, thats why it cannot reuse the same connection unless we clear the state.

Having one more question:
SSL principal is per conn from my understanding, right?
But from what you described, it is unique per request.
Can you elaborate?

Having one more question: SSL principal is per conn from my understanding, right? But from what you described, it is unique per request. Can you elaborate?

For conn pool to reuse the same conn for next request it must be in previous state, but the SSL principal is set on the object stopping it from reusing the same conn.


Help to install the script on Mac

Hi
can you please explain how can I install this tool in Mac?
Thanks
Pentest@tools ~ % sudo go get -u github.com/jaeles-project/gospider
Password:
Pentest@tools~ % gospider -s "https://google.com/" -o output -c 10 -d 1
zsh: command not found: gospider

Did you set $GOPATH? Or you can download binary at https://github.com/jaeles-project/gospider/releases

I get the same problem on Linux. Seems to be a module have a different path as the required.
cp@cp ~ $ go get github.com/jaeles-project/gospider go get<EMAIL_ADDRESS>parsing go.mod: 	module declares its path as: github.com/theblackturtle/gospider 	        but was required as: github.com/jaeles-project/gospider

Can you try again. I fixed it.

done, thanks

occurs again #9


Revert back to @mitchute's logic addressing #84

Matt's check made more sense than what I changed it to. This is reverting back to a check more along the lines of his logic he proposed in f47f6aec56253dc34f09cca962acb81f9e75c925.
closes #93

Branch-name here should be issue93_TouchUp84.

Note: I accidentally mentioned this in #97, but it had nothing to do with that issue.


OCPBUGS-6258: bump(k8s): 1.26.1

bump(k8s): use go 1.19
bump(k8s): bump kube deps to 1.26.1
proof: use bumped libraries
bump(k8s): update vendor

/hold for:

https://github.com/openshift/api/pull/1375
https://github.com/openshift/client-go/pull/235
https://github.com/openshift/library-go/pull/1442

/retest

/hold cancel

/retest

/lgtm
/approve

/retest

/retest


Added check if debian package version matches version from version.hpp

What is about this?
if(DEFINED OPENCV_VCSVERSION)
...
endif()

:+1:

It's always defined. See CmakeLists.txt:401
if(GIT_EXECUTABLE)
  execute_process(COMMAND ${GIT_EXECUTABLE} describe --tags --always --dirty --match "2.[0-9].[0-9]*"
    WORKING_DIRECTORY "${OpenCV_SOURCE_DIR}"
    OUTPUT_VARIABLE OPENCV_VCSVERSION
    RESULT_VARIABLE GIT_RESULT
    ERROR_QUIET
    OUTPUT_STRIP_TRAILING_WHITESPACE
  )
  if(NOT GIT_RESULT EQUAL 0)
    set(OPENCV_VCSVERSION "unknown")
  endif()
else()
  # We don't have git:
  set(OPENCV_VCSVERSION "unknown")
endif()


24px -  device

#155
https://www.figma.com/file/2rjsQp42uKvzPXzLZIqOeA/Octicons-v2-Source?node-id=723%3A1950

Do we want to add a little detail to the larger icons @colebemis?


Persistent reattempt load

Currently, if a corrupt file is in a YouTube playlist, the app will recursively reattempt to load the entire playlist. This is impossible due to the corrupt file and recursion will persist. Add a cap to how many reattempts before returning obtained playlist.

Fixed to max reattempt of 5 in commit #59 (commit 9777d8fdc5b3c695bcff8d2a241362309ad929c5)


Add convenience method for creating lazy values

If T is an interface, it would be nice to be able to write:
T t = Lazy.asVal(() -> someT);

We should also rename of(Supplier, Class) to asVal(Supplier, Class).

One word to safety:
Java's Proxy is not safe. It throws at runtime when an objects is passed instead of an interface at construction time.
So is Lazy. It throws at runtime when creating a lazy value of an object instead of an interface. This is the best we can do. But I think the benefits of having this functionality prevail.
In general Javaslang's design rule is 'safety prior feature'.


cppcheck: 2.14.2 -> 2.15.0

Description of changes
https://github.com/danmar/cppcheck/releases/tag/2.15.0
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)

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

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

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

12 packages marked as broken and skipped:

rocmPackages.migraphx
rocmPackages.mivisionx
rocmPackages.mivisionx-cpu
rocmPackages.mivisionx-hip
rocmPackages_5.mivisionx
rocmPackages_5.mivisionx-cpu
rocmPackages_5.mivisionx-hip
rocmPackages_5.mivisionx-opencl
rocmPackages_6.migraphx
rocmPackages_6.mivisionx
rocmPackages_6.mivisionx-cpu
rocmPackages_6.mivisionx-hip

1 package failed to build:

rocmPackages_5.migraphx

7 packages built:

ayatana-indicator-display
cppcheck
cppcheck.man
libsForQt5.kdev-php (plasma5Packages.kdev-php)
libsForQt5.kdev-python (plasma5Packages.kdev-python)
libsForQt5.kdevelop (plasma5Packages.kdevelop)
libsForQt5.kdevelop-unwrapped (plasma5Packages.kdevelop-unwrapped)

1 package failed to build:
* rocmPackages_5.migraphx

Already broken in the base branch:
rocmlir-rock> /build/source/mlir/include/mlir/Conversion/TosaToRock/TosaToRock.h:21:10: fatal error: 'mlir/Conversion/RocMLIRPasses.h.inc' file not found
rocmlir-rock> #include "mlir/Conversion/RocMLIRPasses.h.inc"
rocmlir-rock>          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rocmlir-rock> 1 error generated.


Codebase restructuration

This PR restructures the codebase following issues with the sepropagator PR (see https://github.com/dynamiqs/dynamiqs/pull/629#discussion_r1686441820).
With this new structure, we have:

renamed internal solvers to "integrators"
used verbose names for all integrators, to avoid name collisions
fixed imports to allow importing private functions inside sesolve.py, mesolve.py, etc.

Also, all unique combinations of a Solver (Euler, Propagator, Dopri5, ...) and a Core function (sesolve, mesolve, ...) will yield a unique Integrator, and reciprocally.
You can review commit by commit. There are no logic changes, only restructuration and import modifications.

Looks amazing 👏 We just need to fix the doc rendering. Also can we match what we do for the rest of the code for the __init__, where each module is responsible for exposing what needs to be? So:

I intentionally made it differently in dynamiqs/integrators/__init__.py to allow for importing _mesolve or _vectorized_mesolve with a from dq.integrators.apis.mesolve import _mesolve. If we keep the same imports as usual, this is impossible because the file name mesolve.py has the same name as the function mesolve().
I'll try to keep something a bit closer to the usual in the following commit.

Ok, so https://github.com/dynamiqs/dynamiqs/pull/636/commits/84a134e888e0bd60889ff622089728bd79143d91 fixes the documentation, and also raises the __all__ = ['mesolve', 'sesolve', 'smesolve'] to dynamiqs/integrators/__init__.py to allow private function importing.

Beautiful! The only renaming thing is to reorganise the tests (file hierarchy and naming).

But we can do it in another PR, let's merge this one 🎉


spurious need to upgrade azdata message pops up.

The following pop is seen once in a while in my development environment. This should never be happenning.

Not only is the popup incorrect when a version higher than expected is installed but the instructions  link on that page seems to be stale as well.

The strings shown in this popup are not supposed to be even in use. I am just going to have to check-in the removal of those strings. This might have been some weird build issue on my machine. I am doing git clean -fxd on my machine to clean up everything to start afresh. With the removal of the unneeded string and cleanup of my machine, hopefully, will mark the end of this weird issue.

@ranasaria I'm closing this since it should be fixed with your PR. Let me know if you still see this.


in-page table of contents

Side nav is optional. Some long-form content will need it, some will not. So the content owner/author will need the ability to add side nav, if they need it—and the body of the page will start at column 3. If not used, start at column 1.
Content Hubs Figma: https://www.figma.com/file/oSetT4LbatRmXlcB2A7V8Z/Content-Hubs-2024?type=design&node-id=891-41409&mode=design&t=FWpXdKc0ZJ2AyKzd-4

Brand Design: https://www.figma.com/file/OFEfvhyXJvYJ6MQZ30699m/v2.0-Brand-Digital-Design-System?type=design&node-id=7625-32246&mode=design&t=K62uHnxv6G3K65XD-0

whoever does this be sure to talk to @mhaack before going ahead, he has plenty of references

Samples from other projects:

https://github.com/hlxsites/sunstar-foundation/tree/main/blocks/toc
https://github.com/hlxsites/nokia/tree/main/blocks/toc

@benpeter @mhaack Should this not be part of cupcake? Especially when a big whitespace looms on the left in 3 column layout. I can start working on it since we now fixed the L3 layout.

As @saurabh-khare  started on the L2 Grid, I'll take this one

In this first iteration, shall we add dynamic highlighting of the currently viewed section? (in the screenshot the currently active one is highlighted in blue) or would that be static?


FireFox: Error in input stream

I've noticed that text/event-stream responses in FireFox 127.0b9 (64-bit) eventually end up with Error in input stream error. This doesn't happen in Safari or Google Chrome. I've tested this by directly sending a fetch request with JavaScript, using URQL and through GraphiQL.
This seems to have to do with the timing for keepalive comments (it appears to be 10-12 seconds). If I artificially send comments from a resolver at 5 second intervals, the connection stays open in FireFox. If I increase the keepalive comment interval to 7.5 seconds or above, I eventually end up with an Error in input stream.
It would be nice to have a keepalive interval option on HandlerOptions.
I forked the repo and added a keepalive option to the HandlerOptions interface and used it where the pinger is created. However, it doesn't look like a pinger is being created for the request so I'm not sure where the keepalive comments I'm getting are even sent from.
With a little guidance I may be able to fix this and submit a pull request.
I've attached some screenshots and example code.
Screenshots

Example Code
import http from "http";
import { createHandler } from "graphql-sse/lib/use/http";
import { makeExecutableSchema } from "@graphql-tools/schema";
import { Repeater } from "@repeaterjs/repeater";

(async () => {
  const schema = makeExecutableSchema({
    typeDefs: `
      type Query {
        hello: String
      }
      type Subscription {
        wait: Boolean
      }
    `,
    resolvers: {
      Query: {
        hello() {
          return "Hello.";
        },
      },
      Subscription: {
        wait: {
          subscribe() {
            return new Repeater((push) => {
              push({ wait: true });
            });
          },
        },
      },
    },
  });

  const handler = createHandler({ schema, context: (req) => ({ req }) });

  const server = http.createServer(async (req, res) => {
    try {
      await handler(req, res);
    } catch (err) {
      console.error(err);
      res.writeHead(500).end();
    }
  });

  server.listen(8000);
  console.log("Listening to port 8000");
})();

Modified Resolver
...
Subscription: {
  wait: {
    subscribe(root, args, { req }, info) {
      const res = req.context.res;
      return new Repeater((push, stop) => {
        const interval = setInterval(() => {
          res.write(":\n\n");
        }, 5_000);
        stop.then(() => {
          clearInterval(interval);
        });
        push({ wait: true });
      });
    },
  },
},
...

Hey hey, thanks for reporting and sorry for the delay! I've been very busy ahead of the upcoming GraphQL Conf 2024. A PR with an adjusted keepalive default, or even configurable one, would be very welcome and much appreciated! No pressure though; if not, I'll be revisiting this issue after the conf.


Error writing file: TypeError: sequence item 0: expected str instance, NoneType found

After successfully loading 140 playlists this error appears after "Writing files..." is logged:
Traceback (most recent call last):
  File "spotify-backup.py", line 221, in <module>
    main()
  File "spotify-backup.py", line 202, in main
    artists=', '.join([artist['name'] for artist in track['track']['artists']]),
TypeError: sequence item 0: expected str instance, NoneType found

Using current version of script with Python 3.7.3 from Visual Studio on Windows 10.
This is not an issue when using the --format=json argument.

I get the same error although it partially creates the .txt file but stops suddenly and doesn't finish it. I tired to use the argument you described, the json one, but the .txt file it created didn't load.

I get the same error although it partially creates the .txt file but stops suddenly and doesn't finish it. I tired to use the argument you described, the json one, but the .txt file it created didn't load.

How did you load the file? You may have better results naming the file with a .json extension. Also, try opening it with a browser for faster results. I killed Visual Studio after 10 minutes with nothing to show but Edge opens it in a few seconds.  FWIW my JSON file is 34 MB (with no linebreaks) when the previous TXT file was only 923 kB.
Now when I run it I get the same error I mentioned above even outputting to JSON, but if I stop following "The Ultimate Playlist" with 3,592 songs it works (still not for plaintext though). You might try your luck with --dump=liked which gives a smaller set and successful text output for me.

not a permanent solution but I edited the script to detect None and replaced it with a string 'MISSING_VALUE' for me to hopefully manually add the missing song there. You can make the value to be an empty string to skip the song altogether.
additions:
def safe_get(obj, keys, default="MISSING_VALUE"):
    # return a string if None is detected
    for key in keys:
        if obj is None or key not in obj:
            return default
        obj = obj[key]
    return obj

use safe_get where reading a value is involved
full version of my spotify-backup.py :
#!/usr/bin/env python3

import argparse
import codecs
import http.client
import http.server
import json
import logging
import re
import sys
import time
import urllib.error
import urllib.parse
import urllib.request
import webbrowser

logging.basicConfig(level=20, datefmt='%I:%M:%S', format='[%(asctime)s] %(message)s')

def safe_get(obj, keys, default="MISSING_VALUE"):
    # return a string if None is detected
    for key in keys:
        if obj is None or key not in obj:
            return default
        obj = obj[key]
    return obj

class SpotifyAPI:

    def __init__(self, auth):
        self._auth = auth

    def get(self, url, params={}, tries=3):
        if not url.startswith('https://api.spotify.com/v1/'):
            url = 'https://api.spotify.com/v1/' + url
        if params:
            url += ('&' if '?' in url else '?') + urllib.parse.urlencode(params)

        for _ in range(tries):
            try:
                req = urllib.request.Request(url)
                req.add_header('Authorization', 'Bearer ' + self._auth)
                res = urllib.request.urlopen(req)
                reader = codecs.getreader('utf-8')
                return json.load(reader(res))
            except Exception as err:
                logging.info('Couldn\'t load URL: {} ({})'.format(url, err))
                time.sleep(2)
                logging.info('Trying again...')
        sys.exit(1)

    def list(self, url, params={}):
        last_log_time = time.time()
        response = self.get(url, params)
        items = response['items']

        while response['next']:
            if time.time() > last_log_time + 15:
                last_log_time = time.time()
                logging.info(f"Loaded {len(items)}/{response['total']} items")

            response = self.get(response['next'])
            items += response['items']
        return items

    @staticmethod
    def authorize(client_id, scope):
        url = 'https://accounts.spotify.com/authorize?' + urllib.parse.urlencode({
            'response_type': 'token',
            'client_id': client_id,
            'scope': scope,
            'redirect_uri': 'http://<IP_ADDRESS>:{}/redirect'.format(SpotifyAPI._SERVER_PORT)
        })
        logging.info(f'Logging in (click if it doesn\'t open automatically): {url}')
        webbrowser.open(url)

        server = SpotifyAPI._AuthorizationServer('<IP_ADDRESS>', SpotifyAPI._SERVER_PORT)
        try:
            while True:
                server.handle_request()
        except SpotifyAPI._Authorization as auth:
            return SpotifyAPI(auth.access_token)

    _SERVER_PORT = 43019

    class _AuthorizationServer(http.server.HTTPServer):
        def __init__(self, host, port):
            http.server.HTTPServer.__init__(self, (host, port), SpotifyAPI._AuthorizationHandler)

        def handle_error(self, request, client_address):
            raise

    class _AuthorizationHandler(http.server.BaseHTTPRequestHandler):
        def do_GET(self):
            if self.path.startswith('/redirect'):
                self.send_response(200)
                self.send_header('Content-Type', 'text/html')
                self.end_headers()
                self.wfile.write(b'<script>location.replace("token?" + location.hash.slice(1));</script>')
            elif self.path.startswith('/token?'):
                self.send_response(200)
                self.send_header('Content-Type', 'text/html')
                self.end_headers()
                self.wfile.write(b'<script>close()</script>Thanks! You may now close this window.')

                access_token = re.search('access_token=([^&]*)', self.path).group(1)
                logging.info(f'Received access token from Spotify: {access_token}')
                raise SpotifyAPI._Authorization(access_token)
            else:
                self.send_error(404)

        def log_message(self, format, *args):
            pass

    class _Authorization(Exception):
        def __init__(self, access_token):
            self.access_token = access_token

def main():
    parser = argparse.ArgumentParser(description='Exports your Spotify playlists.')
    parser.add_argument('--token', metavar='OAUTH_TOKEN', help='use a Spotify OAuth token')
    parser.add_argument('--dump', default='playlists', choices=['liked,playlists', 'playlists,liked', 'playlists', 'liked'],
                        help='dump playlists or liked songs, or both (default: playlists)')
    parser.add_argument('--format', default='txt', choices=['json', 'txt'], help='output format (default: txt)')
    parser.add_argument('file', help='output filename', nargs='?')
    args = parser.parse_args()

    while not args.file:
        args.file = input('Enter a file name (e.g. playlists.txt): ')
        args.format = args.file.split('.')[-1]

    if args.token:
        spotify = SpotifyAPI(args.token)
    else:
        spotify = SpotifyAPI.authorize(client_id='5c098bcc800e45d49e476265bc9b6934',
                                       scope='playlist-read-private playlist-read-collaborative user-library-read')

    logging.info('Loading user info...')
    me = spotify.get('me')
    logging.info('Logged in as {display_name} ({id})'.format(**me))

    playlists = []
    liked_albums = []

    if 'liked' in args.dump:
        logging.info('Loading liked albums and songs...')
        liked_tracks = spotify.list('me/tracks', {'limit': 50})
        liked_albums = spotify.list('me/albums', {'limit': 50})
        playlists += [{'name': 'Liked Songs', 'tracks': liked_tracks}]

    if 'playlists' in args.dump:
        logging.info('Loading playlists...')
        playlist_data = spotify.list('users/{user_id}/playlists'.format(user_id=me['id']), {'limit': 50})
        logging.info(f'Found {len(playlist_data)} playlists')

        for playlist in playlist_data:
            logging.info('Loading playlist: {name} ({tracks[total]} songs)'.format(**playlist))
            playlist['tracks'] = spotify.list(playlist['tracks']['href'], {'limit': 100})
        playlists += playlist_data

    logging.info('Writing files...')
    with open(args.file, 'w', encoding='utf-8') as f:
        if args.format == 'json':
            json.dump({'playlists': playlists, 'albums': liked_albums}, f)
        else:
            f.write('Playlists: \r\n\r\n')
            for playlist in playlists:
                f.write(safe_get(playlist, ['name']) + '\r\n')
                for track in playlist['tracks']:
                    track_data = safe_get(track, ['track'], {})
                    f.write('{name}\t{artists}\t{album}\t{uri}\t{release_date}\r\n'.format(
                        uri=safe_get(track_data, ['uri']),
                        name=safe_get(track_data, ['name']),
                        artists=', '.join([
                            safe_get(artist, ['name'], '') for artist in safe_get(track_data, ['artists'], [])
                            if safe_get(artist, ['name'], None) is not None]),
                        album=safe_get(track_data, ['album', 'name']),
                        release_date=safe_get(track_data, ['album', 'release_date'])
                    ))
                f.write('\r\n')
            if len(liked_albums) > 0:
                f.write('Liked Albums: \r\n\r\n')
                for album in liked_albums:
                    album_data = safe_get(album, ['album'], {})
                    uri = safe_get(album_data, ['uri'])
                    name = safe_get(album_data, ['name'])
                    artists=', '.join([
                        safe_get(artist, ['name'], '') for artist in safe_get(track_data, ['artists'], [])
                        if safe_get(artist, ['name'], None) is not None]),
                    release_date = safe_get(album_data, ['release_date'])
                    f.write(f'{name}\t{artists}\t-\t{uri}\t{release_date}\r\n')

    logging.info('Wrote file: ' + args.file)

if __name__ == '__main__':
    main()