Mouse/Keyboard GetState()/IsKeyDown()/IsKeyUp() methods

I would like to suggest that the methods listed in the subject line be made static, thereby eliminating the need to instantiate an instance of Mouse/Keyboard for most uses.  For now, I'm wrapping instances of these classes in a class that has equivalent static methods, so I can achieve the effect I'm going for, but it would be nice if the DirectXTK more closely matched the XNA API right out of the box.  If there is a technical reason why they shouldn't be made static I'd like to know why, if just for educational purposes.  I'm humbled by the quality of the code and I'm still a ways away from mastering C++.
Another suggestion, and this is just a stylistic thing, I think it would be better to have the first letter of the Mouse::State struct members capitalized.  This matches the style of the Keyboard::State struct and Microsoft conventions in general...at least in the clean and consistent world of .NET.  :)
Thanks guys!

In the future, would there be a case where you would want to distinguish separate keyboards/mice connected to the system, and have each instance assigned to each individual device?

Hmm, I just looked at the Windows API docs regarding keyboard/mouse messages and I don't see anything in there that would even support being able to differentiate between multiple keyboards/mice plugged in.  Did I overlook it in the docs?

RE: Static vs. singleton
I indeed had started by making Keyboard a static class like the XNA Game Studio, but once I added support for Windows Store / universal Windows apps it became apparently I needed the full pImpl pattern to do it right and that the initialization was not as trivial as one might imagine from Windows desktop development. I'm also working on a few more features for the Mouse class which leverages this design even further.
As it is now, Keyboard, Mouse, and GamePad are singletons which greatly simplifies the handling for all supported platforms .That said, I could certainly add a static GetState method since it is a singleton... I'll take a look at that.
RE: IsKeyUp/IsKeyDown
These methods are actually on the State object which you get back from GetState, so the pattern of usage is (if I had the static above):
auto state = Keyboard::GetState();
if ( state.IsKeyDown( VK_ENTER ) )
...
if ( state.Back )
...

Again, I could add a static IsKeyUp/IsKeyDown which checks the state internally through the singleton, but I honestly think the state.Key pattern is much easier to read code. I have IsKeyUp and IsKeyDown supported for loops and rebinding support.
RE: Naming conventions
The .NET world has very strong conventions, largely because the FXCop tool is a pedantic monster enforcing the PascalCase naming convention well beyond the public interfaces. For DirectX Tool Kit I've adopted PascalCase for methods, camelCase for member variables in structs/classes, and upper-case for enums/#defines. This pattern matches what Win32 APIs C++ generally use that aren't so old that they are still using the long-deprecated Hungarian notation.
For the enum Keyboard::Keys I used PascalCase because I think it scans easier and made it easier to match-up with the XNA Game Studio code, and I used the exact same name as the bit field member in Keyboard::State. This ends up making Keyboard a little different than the other structs in the toolkit.

Robert,
You're right, Windows doesn't differentiate between different keyboard/mice devices. My mistake!

Chuck:  You're right, it doesn't make much sense to make IsKeyUp/Down static and actually I didn't mean to suggest it in the first place.  The code I use now only wraps Mouse::GetState() / Keyboard::GetState() with equivalent static methods, resulting in an API that looks like this BInput::Mouse::GetState() / BInput::Keyboard::GetState().  If you make those methods static I'll be able to get rid of my BInput class.
As for the naming conventions, as long as there is a method to the madness, and it seems as though there is, I can rest easy!  I started my career in .NET, so I can't help but to prefer Pascal for public members.  Whenever I look at code, I think my brain spawns a thread dedicated to running FXCop :)
pgalasti:  No worries mate!  In the event it was possible, my follow up response would have been to overload the static method (or specify a default value) and have it accept an enum/int to signify which keyboard/mouse you want the state for.  :)

C++ doesn't let you overload a function between static & non-static, so it would have to be a different name for the static method than GetState. I'll have to think about that one...

This really is a tricky one to solve (without adding a static method with an ugly or confusing name), and the Mouse class is already in a workable, "pure" state and I'm probably violating a best practice of some sort, but here is an idea none-the-less!  Tested with Win32 Desktop and Windows 8.1 Store.
Mouse.h line 80:
static State __cdecl GetState();

Mouse.h line 90:
static void __cdecl SetWindow(Windows::UI::Core::CoreWindow^ window);

Mouse.cpp line 292:
Mouse::Impl* Mouse::Impl::s_mouse = new Impl;

Mouse.cpp line 299:
Mouse::Impl::s_mouse->SetWindow(iwindow);

Mouse.cpp line 351:
Mouse::Impl* Mouse::Impl::s_mouse = new Impl;

Mouse.cpp line 431:
Mouse::Impl* Mouse::Impl::s_mouse = new Impl;

Mouse.cpp line 522:
 // : pImpl( new Impl() )

Mouse.cpp line 548:
Mouse::State Mouse::GetState()

Mouse.cpp line 551:
Mouse::Impl::s_mouse->GetState(state);

I think a more consistent solution is going to be to add a Get to the singletons:
static Mouse& Mouse::Get()

static GamePad& GamePad::Get()

static Keyboard& Keyboard::Get()

So to get Mouse state, for example, it will be:
Mouse::State mouseState = Mouse::Get().GetState();

?

Yes, that would work.  I still need to implement it, but those three classes are internally singletons already.

Sounds good.  Thanks!

Submitted.
6a4fd0dcef5f04d302e1c2691f0679eb7b1cf34c


[JN-896] enabling export of matrix question values

DESCRIPTION
HeartHive would like to start using matrix questions.  This is generally supported in the participant and admin UI, except the export failed due to a hardcoded limitation on what kinds of objectValues we wanted to return.  This removes that limitation
TO TEST:  (simple manual steps for confirming core behavior -- used for pre-release checks)

redeploy ApiAdminApp
repopulate demo
Go to the demo sandbox data export https://localhost:3000/demo/studies/heartdemo/env/sandbox/export/dataBrowser
scroll down to the hd_hd_socialHealth.neighborhoodMatrix question.  Confirm that a json string appears for Jonas Salk

yeah, I like the idea of being able to edit the json for just a particular question.  figuring out where to copy/paste is more than half the challenge of doing these by hand


Do not camelCase model names from PascalCase in Prisma API calls

Problem
I'm always frustrated when have a model name, but to call Prisma API query I must lowercase the first letter of it's name, to get the model query API.
So many systems must place some ugly code to make this conversion or use wrapper functions, instead of directly use model name in functions, here is an example from Keystone CMS:
  const model = context.prisma[listKey[0].toLowerCase() + listKey.slice(1)];

'cuz it's even not lowercase of the whole string, that can be easily implemented via string.toLowerCase(), but PascalCase to camelCase conversion. So very often people catch the error with multi-worded models not right away, but after they starts working with single-worded models using toLowerCase() function and later starts using multi-worded model.
Suggested solution
Make an option to disable lower-casing the first letter of model names in API calls (turned off by default to not break current instances).
Or describe in documentation by what reason this tricky thing is exists in Prisma.
Alternatives
Alternative can be add duplicates of camelCase'd model names to prisma object, linked to current camelCased object, so users will can use both variants in API calls - PascalCase and camelCase.

Related: https://github.com/prisma/prisma/issues/10593

Or describe in documentation by what reason this tricky thing is exists in Prisma.

I think this might be as simple as "It looked better to JS developer back in the day and more like what is typical JS". So your feature request is very valid.


[CODEGEN] Fix extract_N_bufferable in layout analysis

Problem
is_multistage_pipe_phi() assumes that "a value" selected by a phi node is defined in its incoming basic block. This assumption is wrong (PHI would choose %x that appears in BB0 when the incoming basic block is BB1), however.
This breaks shared_layout::extract_N_bufferable(), which assumes that values_0 (return values of is_multistage_pipe_phi()) are all defined in bb0 (i.e., an incoming basic block of the phi node) (https://github.com/openai/triton/blob/master/lib/codegen/analysis/layout.cc#L430-L437)
This problem happens if two matmul kernels (in a tutorial) is invoked consecutively in a single Triton function.
Solution
Return false (no optimization) if if the parent basic block is different from the incoming basic block (though perhaps there is a way to handle it properly).

Thanks! I think this is a good solution :)


Adding Sub commands don't seem to work

Is there an existing issue for this?

[X] I have searched the existing issues

Current behavior
Defining sub commands is not working. only parent command is being called
Minimum reproduction code
Going with the example provided in the docs, tried to create a commander cli application using this repo, with the following code:
@SubCommand({ name: 'foo', arguments: '[phooey]' })
export class FooCommand implements CommandRunner {
  async run(
    inputs: string[],
    options: Record<string, string>
  ): Promise<void> {
    console.log('inside FooCommand class!');
  }
}

@Command({
  name: 'run',
  arguments: '<task>',
  subCommands: [FooCommand]
})
export class RunCommand implements CommandRunner {
  async run(
    inputs: string[],
    options: Record<string, string>
  ): Promise<void> {
    console.log('inside RunCommand class!');
  }
}

The only difference is that I had to implement the run command in the RunCommand class because it's required by the CommandRunner interface.
Right now, when I run the application with either:

npx ts-node ./src/bootstrap.ts run
npx ts-node ./src/bootstrap.ts run foo
npx ts-node ./src/bootstrap.ts run foo test
I get only the inside RunCommand class! printed.

Expected behavior
Extected to print inside FooCommand class! to the console since the sub command run function should be called.
Package

[X] nest-commander
[ ] nest-commander-schematics
[ ] nest-commander-testing

Package version
2.4.0
Node.js version
14.18.1
In which operating systems have you tested?

[X] macOS
[ ] Windows
[ ] Linux

Other
No response

Not sure why @gr0wth-b0t closed this, but I am facing a similar issue


Update virtual-machines-common-sizes-table-defs.md

Deleting the statement from the size table definitions to avoid confusing customers with our inconsistent communication.
Including the link up to the disk performance context page for better understanding on best storage performance for VMs

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

#sign-off

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

Merging now. Changing the list item to a reference for more information might mean it would fit better outside the list? Something for the author to consider for a future update. Thanks.


[DO NOT MERGE] Backport some fixes from master to ozone-1.4

What changes were proposed in this pull request?
Backport the following fixes from master to ozone-1.4 for 1.4.1.

HDDS-10009. Bump commons-lang3 to 3.14.0 (#5869)
HDDS-10014. Fixed internal error on generating S3 secret via HTTP (#5887)
HDDS-10040. Bump commons-compress to 1.25.0 (#5897)
HDDS-10106. Bump aws-java-sdk to 1.12.632 (#5952)
HDDS-10128. Bump commons-configuration2 to 2.8.0, commons-text to 1.11.0 (#5996)
HDDS-10194. Upgrade Bouncy Castle to 1.77 (#6077)
HDDS-10199. Node.js 16 actions are deprecated (#6087)
HDDS-10200. OM may terminate due to NPE in S3SecretValue proto conversion (#6089)
HDDS-10202. OmMetadataManagerImpl creates new S3Batcher for each operation (#6088)
HDDS-10204. TypedTable.putWithBatch may leak if conversion of value throws (#6097)
HDDS-10294. Actual client configuration ignored in ECReconstructionCoordinator (#6163)
HDDS-10401. Bump commons-compress to 1.26.0 (#6240)
HDDS-10406. Bump aws-java-sdk to 1.12.661 (#6249)

If approved, I'll push to the ozone-1.4 branch directly.
How was this patch tested?
CI:
https://github.com/adoroszlai/ozone/actions/runs/8000506651

/pending DO NOT MERGE

Thanks @ivandika3 for the reminder.

@myskov please review https://github.com/apache/ozone/pull/6252/commits/1a235b6350baad8167a6429d5adcd68317a1ef63
@hemantk-12 please review https://github.com/apache/ozone/pull/6252/commits/9954d41eb72e22aa0dfb1f5e07f134fea9a28391 and https://github.com/apache/ozone/pull/6252/commits/b6a122623ebfe91a64ef2bb9d43729d0ea9fba0f

Thanks for backporting it. Do we have a release plan for 1.4.1?

@hemantk-12 this backport includes two snapshot-related patches (https://github.com/apache/ozone/pull/6252/commits/9954d41eb72e22aa0dfb1f5e07f134fea9a28391 and https://github.com/apache/ozone/pull/6252/commits/b6a122623ebfe91a64ef2bb9d43729d0ea9fba0f), would you like to take a look?

Thanks @hemantk-12, @myskov for the review.

sorry for the delayed review somehow I missed it earlier.

No problem, I just wanted to merge this during the weekend because CI is less busy then.

Do we have a release plan for 1.4.1?

@ferhui no plan yet, we can discuss this on dev@ mailing list.


doc: update readme.md for the Notary Project

Updates:

Remove Notary v2 reference
Update README per https://github.com/notaryproject/.github/issues/35

Note: The folder structure in this PR reflected the current structure. Any changes on folder structure proposed in https://github.com/notaryproject/.github/issues/48, are not in the scope of this PR
Other PRs related to removing Notary v2 reference for this repository:

https://github.com/notaryproject/notaryproject/pull/262
https://github.com/notaryproject/notaryproject/pull/256

Signed-off-by: Yi Zha<EMAIL_ADDRESS>

NOTE: This PR will be amended later based on the Notary Project readme addressed by PR https://github.com/notaryproject/.github/pull/32

@TheFoxAtWork @priteshbandi @SteveLasker @justincormack @NiazFK @toddysm @FeynmanZhou @shizhMSFT @vaninrao10 @gokarnm
I updated this PR per https://github.com/notaryproject/.github/issues/35, please take a look.

LGTM but IAMNAM


Rename terra application folder

Summary
We want terra-application to show up as just 'application' in terra-ui. This fixes that.
Additional Details
also fixed travis-ci gh-pages deploy... probably.
@cerner/terra

Did you update the link references in the doc files?

@tbiethman good call. links updated.


[mgmt] containerinstance release

https://github.com/Azure/sdk-release-request/issues/5571

API change check
APIView has identified API level changes in this PR and created following API reviews.
@azure/arm-containerinstance


Please add name for codebuild ProjectProps

This will endup creating a codebuild project called: ChromeBuildProjectCF1ECDFF-pzCWvLzMTWlA
However both pipeline and codecommit allow specify name.
//codebuild
    const codebuildproject = new codebuild.Project(this, 'ChromeBuildProject', {
      source: new codebuild.CodeCommitSource({
          repository: sourcerepo
      }),
      environment: {
        buildImage: LinuxBuildImage.UBUNTU_14_04_DOCKER_17_09_0,
        privileged: true
      }
    });

Is the projectName property what you're looking for?
Thanks,
Adam

@mouyigang ping :)

Yes that's the thing I was looking for, close.
Thanks,
Andy


'Malformed version number string 2.7.15+' ubuntu18.04

Kitchen Ouput
Theres some mention of this here too: https://answers.launchpad.net/ubuntu/+question/681357
` * python_runtime_pip[2] action install[2019-06-17T09:43:50+00:00] INFO: Processing python_runtime_pip[2] action install (/tmp/kitchen/cache/cookbooks/poise-python/files/halite_gem/poise_python/python_providers/base.rb line 118)
       ================================================================================
       Error executing action `install` on resource 'python_runtime_pip[2]'
       ================================================================================

       ArgumentError
       -------------
       Malformed version number string 2.7.15+

       Cookbook Trace:
       ---------------
       /tmp/kitchen/cache/cookbooks/poise-python/files/halite_gem/poise_python/resources/python_runtime_pip.rb:121:in `bootstrap_pip'
       /tmp/kitchen/cache/cookbooks/poise-python/files/halite_gem/poise_python/resources/python_runtime_pip.rb:90:in `action_install'
       /tmp/kitchen/cache/cookbooks/poise/files/halite_gem/poise/helpers/notifying_block.rb:69:in `notifying_block'
       /tmp/kitchen/cache/cookbooks/poise-python/files/halite_gem/poise_python/python_providers/base.rb:50:in `action_install'

       Resource Declaration:
       ---------------------
       # In /tmp/kitchen/cache/cookbooks/poise-python/files/halite_gem/poise_python/python_providers/base.rb

       118:         python_runtime_pip new_resource.name do
       119:           parent new_resource
       120:           # If the version is `true`, don't pass it at all.
       121:           version pip_version if pip_version.is_a?(String)
       122:           get_pip_url pip_url
       123:         end
       124:       end
       125:

       Compiled Resource:
       ------------------
       # Declared in /tmp/kitchen/cache/cookbooks/poise-python/files/halite_gem/poise_python/python_providers/base.rb:118:in `install_pip'

       python_runtime_pip("2") do
         action [:install]
         default_guard_interpreter :default
         declared_type :python_runtime_pip
         cookbook_name "poise-python"
         parent python_runtime[2]
         get_pip_url "https://bootstrap.pypa.io/get-pip.py"
       end

       System Info:
       ------------
       chef_version=14.13.11
       platform=ubuntu
       platform_version=18.04
       ruby=ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-linux]
       program_name=/opt/chef/bin/chef-client
       executable=/opt/chef/bin/chef-client

   [2019-06-17T09:43:50+00:00] INFO: Running queued delayed notifications before re-raising exception

     ================================================================================
     Error executing action `install` on resource 'python_runtime[2]'
     ================================================================================

     ArgumentError
     -------------
     python_runtime_pip[2] (/tmp/kitchen/cache/cookbooks/poise-python/files/halite_gem/poise_python/python_providers/base.rb line 118) had an error: ArgumentError: Malformed version number string 2.7.15+

     Cookbook Trace:
     ---------------
     /tmp/kitchen/cache/cookbooks/poise-python/files/halite_gem/poise_python/resources/python_runtime_pip.rb:121:in `bootstrap_pip'
     /tmp/kitchen/cache/cookbooks/poise-python/files/halite_gem/poise_python/resources/python_runtime_pip.rb:90:in `action_install'
     /tmp/kitchen/cache/cookbooks/poise/files/halite_gem/poise/helpers/notifying_block.rb:69:in `notifying_block'
     /tmp/kitchen/cache/cookbooks/poise-python/files/halite_gem/poise_python/python_providers/base.rb:50:in `action_install'

     Resource Declaration:
     ---------------------
     # In /tmp/kitchen/cache/cookbooks/poise-python/recipes/default.rb

      20: python_runtime '2' if node['poise-python']['install_python2']

     Compiled Resource:
     ------------------
     # Declared in /tmp/kitchen/cache/cookbooks/poise-python/recipes/default.rb:20:in `from_file'

     python_runtime("2") do
       action [:install]
       updated true
       default_guard_interpreter :default
       subresources [python_package[requests], python_package[simplejson], python_runtime_pip[2], python_package[setuptools], python_package[wheel], python_package[virtualenv]]
       declared_type :python_runtime
       cookbook_name "poise-python"
       recipe_name "default"
       get_pip_url "https://bootstrap.pypa.io/get-pip.py"
       pip_version true
       setuptools_version true
       version "2"
       virtualenv_version true
       wheel_version true
     end

     System Info:
     ------------
     chef_version=14.13.11
     platform=ubuntu
     platform_version=18.04
     ruby=ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-linux]
     program_name=/opt/chef/bin/chef-client
     executable=/opt/chef/bin/chef-client`

After some investigation, looks like the problem come from:
root@full-full:~# python --version
Python 2.7.15+

the '+' at the end of the version break the cookbook.
Something like
            python_version = (python_version_cmd.stdout + python_version_cmd.stderr)[/Python (\S+)/, 1]
            python_version = python_version.gsub('+','')

in lib/resources/python_runtime_pip.rb should probably solve the issue, but I'm not able to test this because of this halite stuff I'm not sure to understand.

So I have been able to test the code above and this is solving the issue.

PR https://github.com/poise/poise-python/pull/147 created that will strip additional unexpected characters


Feature request: search todos

The workflow is amazing, and i'd like to know if it would be possible to implement searching for the to-dos by the query that comes after "todo".
All the best

It's against the concept of the workflow. After typing todo, what you type next is used to filter the lists, areas and projects.

Implementing a global search would be troublesome in large databases because JXA/AppleScript performance is not great in this scenario.


Modified Levels for Melee level reset when relaunching CLI

I have the Prime 2.0 Karambit and I much prefer the level 1 base equip.
When I

Modify/Melee/Prime 2.0/Level 2 disabled
Randomize
This works properly

But when relaunching Valorant/CLI, the level 2 animation for the skin get's re-enabled

Here is a video of the bug. (note, this link will die in ~30 days)
https://streamable.com/29h391

this might be a bug from the code that tries to prevent you from disabling every level, ill take a look into it

resolved in this commit, will be live in the next release


Move "Cancel" button functionality to the framework level

Append "Cancel" action to every message from every command. This will allow to:

Avoid duplication of the logic inside the commands
Cancel a command on any step

Closed in 4aefe45


fix: re-add notification preference condition to unread reports calculations

Details

This PR re-adds the condition that removed those reports from the notification count which had notificationPreference set as hidden.
Fixed Issues

$ https://github.com/Expensify/App/issues/33506
PROPOSAL: N/A
Tests

View the thread of a public room created on a private workspace
Verify that the notification count does not change when new messages come in that thread.

[x] Verify that no errors appear in the JS console

Offline tests

N/A
QA Steps

View the thread of a public room created on a private workspace
Verify that the notification count does not change when new messages come in that thread.

[x] Verify that no errors appear in the JS console

PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If the PR modifies the form input styles:

[x] I verified that all the inputs inside a form are aligned with each other.
[x] I added Design label so the design team can review the changes.

[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native

https://github.com/Expensify/App/assets/30054992/cbe33989-467e-4f1b-a6b2-701f3452948a

Android: mWeb Chrome

https://github.com/Expensify/App/assets/30054992/c8869574-182e-4f79-b590-3a5280c64046

iOS: Native

https://github.com/Expensify/App/assets/30054992/63558046-b4f3-4ae1-a39e-fd60ac079498

iOS: mWeb Safari

https://github.com/Expensify/App/assets/30054992/6291b038-2214-47ab-9bb5-3a6718d10ccf

MacOS: Chrome / Safari

https://github.com/Expensify/App/assets/30054992/edc3304b-5e3f-450a-b41f-cc3891ac8ea2

MacOS: Desktop

https://github.com/Expensify/App/assets/30054992/af1d886c-6653-4d58-a8b1-c3866baa97eb

@allroundexperts Lint is failing

These doesn't seem to be related to my PR 🤔

@allroundexperts Well, it happens. Somebody might have merged some lint-failing code to main. It might've already been resolved. Please merge main when the problem is resolved.

FYI, there's some ongoing discussion regarding this PR

Added the unit test. Let me know if I missed any case @cubuspl42

@allroundexperts Conflicts 🙁

@cubuspl42 Resolved.

A private workspace is a "normal" one, right?

View the thread of a public room created on a private workspace

Are there requirements to whether it's a room I created or a room on my workspace?
I'm having trouble verifying the fix.

Reviewer Checklist

[x] I have verified the author checklist is complete (all boxes are checked off).
[x] I verified the correct issue is linked in the ### Fixed Issues section above
[x] I verified testing steps are clear and they cover the changes made in this PR

[x] I verified the steps for local testing are in the Tests section
[x] I verified the steps for Staging and/or Production testing are in the QA steps section
[x] I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)

[x] I checked that screenshots or videos are included for tests on all platforms
[x] I included screenshots or videos for tests on all platforms
[x] I verified tests pass on all platforms & I tested again on:

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

[x] If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
[x] I verified proper code patterns were followed (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I verified that this PR follows the guidelines as stated in the Review Guidelines
[x] I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] If a new component is created I verified that:

[x] A similar component doesn't exist in the codebase
[x] All props are defined accurately and each prop has a /** comment above it */
[x] The file is named correctly
[x] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[x] The only data being stored in the state is data necessary for rendering and nothing else
[x] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[x] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[x] All JSX used for rendering exists in the render method
[x] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If the PR modifies the form input styles:

[x] I verified that all the inputs inside a form are aligned with each other.
[x] I added Design label so the design team can review the changes.

[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
[x] I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: Native

Android: mWeb Chrome

iOS: Native
https://github.com/Expensify/App/assets/2590174/36a59c22-8a25-4b5e-862d-25b5d0904d97

iOS: mWeb Safari

MacOS: Chrome / Safari
https://github.com/Expensify/App/assets/2590174/191c48b4-2345-4e4d-99fa-ca26b07d15a1

MacOS: Desktop

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@cubuspl42 Can you confirm whether this was tested on platforms besides web and iOS?

A private workspace is a "normal" one, right?

Yes! There is no workspace of type "private" or anything. Just workspaces.

Can you confirm whether this was tested on platforms besides web and iOS?

I also tested this on Android, but I only verified it doesn't crash. The expected behavior cannot be observed on Android, as there's no notification count there.
I didn't test it on mobile web, as on all Web platforms it should do the same thing, i.e. update the page title dynamically. I verified that Sibtain tested that and I didn't repeat this test.

I verified that Sibtain tested that and I didn't repeat this test.

👍 In the future can you test on all platforms please? We ask for the screenshots and the checklist so that the author tests on all platforms and then the reviewer tests on all platforms. Thanks!

🚀 Deployed to production by https://github.com/thienlnam in version: 1.4.31-7 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
failure ❌

🕸 web 🕸
success ✅


How to get just a geo projection?

I've got a project where I'm using d3 only to make a projection function like this:
var projection = d3.geo.mercator().scale(s).translate(t);

Is there some way I can use d3-bundler to get a tiny version of d3 just for this purpose? I can't see which module I would use. There's d3-geo-projection, but I don't think this is the right thing?

Sorry, but d3-geo-projection hasn’t been re-written to use the new Rollup-based bundling yet. That will come eventually, but it’s not here yet.


Fastlane suggestions

Nice to see you're using Fastlane to provide the app's metadata! May I suggest some minor improvements to the structure?

in full_description.txt, please make sure paragraphs are separated by a blank line (and otherwise are kept on one line, as you're having it already). Currently, the second and third paragraph will appear as a single block as there's no separating line.
screenshots don't need to be duplicated for each locale. If you're using a single set only, it's sufficient to have it inside en-US – which is always used as fallback for "missing things". Only "duplicate" to other languages what will be language specific (e.g. having English screenshots in en-US and Chinese ones in zh-CN
also don't forget adding new changelogs (by the name <versionCode>.txt to the changelogs directory before tagging a new release. I doubt the app is still at versionCode: 1 seeing it has 22 releases :wink:

Thanks!

Nice to see you're using Fastlane to provide the app's metadata! May I suggest some minor improvements to the structure?

in full_description.txt, please make sure paragraphs are separated by a blank line (and otherwise are kept on one line, as you're having it already). Currently, the second and third paragraph will appear as a single block as there's no separating line.
screenshots don't need to be duplicated for each locale. If you're using a single set only, it's sufficient to have it inside en-US – which is always used as fallback for "missing things". Only "duplicate" to other languages what will be language specific (e.g. having English screenshots in en-US and Chinese ones in zh-CN
also don't forget adding new changelogs (by the name <versionCode>.txt to the changelogs directory before tagging a new release. I doubt the app is still at versionCode: 1 seeing it has 22 releases 😉

Thanks!

Sorry for late reply and thanks for your advice,i'll take it and refacotor the project structure  as soon as possible when i'm not too busy 😊

Oops, looks like you're as busy as I am. So please consider this a "friendly reminder" to not forget about it :smile: Thanks!

Thanks for fixing! :smiley: In conjunction with the versionCode: You can use that in changelogs/<versionCode>.txt to point out what changed in the new version :wink:

Thanks for fixing! 😃 In conjunction with the versionCode: You can use that in changelogs/<versionCode>.txt to point out what changed in the new version 😉

Okay, thanks for the suggestion, I will do so later or in the next version 😄

Wonderful! My updater will pull that along then, and users will see the "whatsNew" section directly below the app description in their F-Droid clients (and on the website). Teaser & appetizer :pizza: :yum: :smile:


Add meme chain.svg

Can I ask your opinion on this PR, which contains a true vector image?
https://github.com/cosmos/chain-registry/pull/1672

Would close this PR and consider it superseded by #1672

@iloveanyujin any comment?

I decided to close this request. Thank you.


Methods created are fn (&Struct) -> ..., rather than for<'_> fn (&Struct) -> ...

I don't understand the sorcery of HRTBs and async well enough to know if there's a major difficulty with this, but it seems to be relevant when trying to accept the function as an argument.
Consider this:
use async_trait::async_trait;

struct Struct;

#[async_trait]
trait Trait {
    async fn g(&self);

    fn h(&self);
}

impl Struct {
    async fn f(&self) {}
}

#[async_trait]
impl Trait for Struct {
    async fn g(&self) {}

    fn h(&self) {}
}

fn main() {
    let _: () = Struct::f;
    let _: () = Struct::g;
    let _: () = Struct::h;
}

This tells us Struct::f has type for<'_> fn(&Struct) -> impl Future {Struct::f}. Struct::h has type for<'r> fn(&'r Struct) {<Struct as Trait>::h}.
But Struct::g is fn(&Struct) -> Pin<Box<dyn Future<Output = ()> + Send>> {<Struct as Trait>::g::<'_, '_>}.
If this can't be changed to have a for<'_> bound, I guess that should be documented as one of the crate's limitations...

Looking at how the macro expands, it seems the for<'_> part is present with g1, but not g2:
    fn g1<'life0>(&'life0 self);

    fn g2<'life0, 'async_trait>(&'life0 self)
        where 'life0: 'async_trait;

I guess Rust introduces this for<'_> depending on the lifetimes involved in the function, but since this crate is partially bypassing Rust's lifetime inference with explicit lifetime bounds, it can't do that here.

In particular, it seems it's the 'life0: 'async_trait bound that's responsible, though I don't know if there's a good alternative that will work...

I guess the reason this works without async-trait is based on how lifetime elision works:

If there is exactly one lifetime used in the parameters (elided or not), that lifetime is assigned to all elided output lifetimes.

So with the async fn outside the trait, the return value's lifetime is inferred to be the same as the parameters.
I guess the "correct" solution would be for async-trait to apply all the lifetime elision rules the compiler does, but that isn't likely to be simple, I guess...

It seems this is just an inconsistency in how Rustc prints the types. There was a real issue I was having, but as far as I can tell it's ultimately due to limits in Rustc.


Upgrade to latest release of Gw2Sharp

v0.7.4 of Gw2Sharp introduces a number of features and bug fixes that we very much need.  Most notably:

GUID workaround for one of the endpoints.
Better performance MumbleLink connection.
Support for the recently added MumbleLink values.
Support for generating and parsing chat code links.
Additional endpoint support.

There is a significant difference between the version we are currently on (0.4.1) and 0.7.4 and so a restructuring of how we utilize it will need to be made.  I anticipate this can be done between three PRs:

[x] Update WebApi client to the new one.
[x] Change our MumbleLink client form the GW2.NET version to the new one provided in Gw2Sharp.
[x] Replace our static chat code library with the Gw2Sharp one.

A plan for each conversion should be made and we should be accounting for the other client changes where possible.

Based on a first pass attempt to swap this over, it looks like we have two main options:
Utilize 3 GameServices:

Gw2ApiService - An internal service that holds the initial instance to the Gw2Client.
Gw2WebApiService - A service that manages the API client instances (dependent on Gw2ApiService).
Gw2MumbleService - A service that manages the MumbleLink client instances (dependent on Gw2ApiService).

Or combine all of these into a single Gw2ApiService that manages all clients.
I believe the prior will be  the most organized.

Retargeted version to v0.8.2.

Finished in #172!


#26639: Local NFS volumes do not resolve hostnames

fixes #26639
- What I did
Implemented code for mounting local NFS with hostname

How I did it
Added method GetAddress, to get address/hostname from options. Added another Method IsIP, to verify if option has IP or Address. If option has hostname then used LookupHost built in function to convert to IPAddress.

- How to verify it

Build a developer container with latest docker/master and this PR
Start docker daemon with copying binaries with hack/make.sh binary.
Create docker volume with "docker volume create -o type=nfs -o o=addr=nfs-server,rw -o device=:/nfsdir --name test4"
Note. Please make sure “nfs-server” is resolvable with Ip address.
Create container with “docker run -it  --rm -v test4:/storage datkumbh/nfs sh”
Verify that container created successfully and nfsdir mounted in /storage.

- Description for the changelog

Added a GetAddress  method in volume/local/local_unix.go
Added a IsIP method in volume/local/local_unix.go to verify if hostname is IP or return blank
Added a support to convert hostname to IpAddress if option is wit hostname

**- A picture of a cute animal **

08:35:30 These files are not properly gofmt'd:
08:35:30  - volume/local/local_unix.go

Updated PR with changed.Can someone please review it ?

@thaJeztah @cpuguy83
Updated PR. Please take a look.

ping @justincormack PTAL

@justincormack , Can you please take a look ?

Please sign your commits following these rules:
https://github.com/docker/docker/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:
$ git clone -b "26639_nfs_volume_with_hostname" git@github.com:dattatrayakumbhar04/docker.git somewhere
$ cd somewhere
$ git rebase -i HEAD~132
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f

Amending updates the existing PR. You DO NOT need to open a new one.

ping @cpuguy83 PTAL
@dattatrayakumbhar04 can you squash your commits?

Updated PR and all checks are passed now.

@cpuguy83 @thaJeztah @justincormack
Updated PR with changes.

LGTM from under the sea!


Changes regarding new task API

Breaking changes

CreateIndex(), UpdateIndex() and DeleteIndex() are now asynchrone regarding MeiliSearch and do not return a Index instance anymore, but a task object. Please use Index() method instead.
Rename index.GetAllUpdateStatus() into index.GetTasks()
Rename index.getUpdateStatus() into index.GetTask()
waitForPendingUpdate is renamed into waitForTask and is accessible from Index and from Client
Rename the UpdateStatus class into TaskInfo since TaskStatus and Task are reserved words in C#.

Improvements

Add new methods client.GetTasks() and  Client.GetTask()

⚠ Final code sample changes coming in another PR

I suggested TaskInfo to avoid confusion with TaskStatus from the framework, but I'm not sure TaskInfo is a good choice.
Leave all class that are prefixed with Task to the framework and all the one for this client prefixed with MTask
I would probably go with something like MTaskStatus or MeilTaskStatus to make things very clear for newcomers...

Hello @juchom thanks for your involvement 😄
However, we discussed internally with the team, and we would rather keep the TaskInfo name for the moment.
Of course, if we find out you were right, and the name could be clearer, we will update it. Nothing is written in the stone, but we want to let it as it is now for the first version :)
Thanks again!

Checked with @brunoocasali, we merge this PR as it is now. All the possible improvements will be done in another PR pointing to main once this package will be compatible with MeiliSearch v0.25.0 (which is the priority now)


Rev fix args

Ok, I hope this works.
I'll keep working on my local rev_fix_args branch, and always push to the rev branch?
This updates the args and adds Jonas K. as co-author to JOSS paper.

Thanks @matthiasdemuzere. Please let me know if there's anything I can do from my end


Webpack >= 2.2.0 compatability

It appears Webpack >= 2.2.0 does not support import mixed with module.exports = ... syntax. Perhaps I have misread that thread or am mistaken? I'm unable to figure out a way to import renderMathInElement without getting TypeError: "exports" is read-only.

I'm not an expert on this topic, but think this is related to #954. You should be able to import 'katex' which should already be translated to vanilla JS; it's just the submodules that aren't importable right now.

Are you able to import Katex?
You should be able to solve this by changing the import to a require. Note: this only needs to be done for the entry point (not anything downstream).

Gotcha. I was incorrect to assume that katex/contrib/auto-render was import/require-able. Thanks for clarifying @edemaine.
I am able to import 'katex' just fine, @rrandallcainc. Thank you for asking :)
I'm a bit of a JS package novice, but it doesn't that katex/contrib/auto-render is too far from being importable (though I imagine maintaining compatibility as a constraint complicates this). I'm going to change the title to reflect this, but I should point out that changing the import into a require in contrib/auto-render/auto-render.js will still be necessary for Webpack >= 2.2.0 compatibility.
Thank you both for your work on this terrific package. Happy holidays 🎁 ✨


Fix grafana container restart policy

Motivation and context

Fixes #8576
How has this been tested?

I've tried it on my CVAT installation and it works.
Checklist

[x] I submit my changes into the develop branch
[x] I have created a changelog fragment
[ ] I have updated the documentation accordingly
[ ] I have added tests to cover my changes
[x] I have linked related issues (see GitHub docs)

License

[x] I submit my code changes under the same MIT License that covers the project.
Feel free to contact the maintainers if that's a concern.

Summary by CodeRabbit

New Features

Introduced a new service, cvat_grafana, for enhanced Grafana container management.
Configured automatic restart and integrated with ClickHouse environment settings.
Added authentication options and plugin installations for Grafana.
Custom entrypoint script for setup of data sources and dashboards.

Bug Fixes

Resolved issues with the Grafana container restart policy to ensure proper management.

LGTM, thanks for the contribution!

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 74.24%. Comparing base (4354f72) to head (a51bfed).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #8577   +/-   ##
========================================
  Coverage    74.24%   74.24%
========================================
  Files          403      403
  Lines        43287    43287
  Branches      3914     3914
========================================
+ Hits         32137    32140    +3
+ Misses       11150    11147    -3

Components
Coverage Δ

cvat-ui
78.68% <ø> (+0.01%)
:arrow_up:

cvat-server
70.47% <ø> (ø)


keep getting "Failed to fetch [...]" error

Hi,
I followed the instructions (npm i -g structor, mkdir testdir, cd testdir, structor), but every time I try to clone the bootstrap-prepack I get this error: Failed to fetch [...]
I have then tried to restart the structor server (^C, structor) and get different error msgs, like:

Unknown plugin "transform-runtime" specified in "/Users/myhome/Dev/Experiments/structor/tmp2/.babelrc" at 0, attempted to resolve relative to "/Users/myhome/Dev/Experiments/structor/tmp2"

or (I didn't copy/paste this one):
cannot find package.json or node_modules

and another one saying something about a folder being corrupted

On three different attempts, three different error msgs after restarting structor. All three attempts had the same initial error (Failed to fetch [...])

@devboell there is an issue with npm 3 installation process, but it seems that 3.8 version makes installation quick a lot.
But, in your case I would try the second way: download package of bootstrap-prepack repo to local host, unpack it, enter into that directory, run npm install && structor

ok, thanks - the second way works

Glad to hear it, so I'll close this issue.


accimage.Image() is called before accimage is imported

flake8 testing of https://github.com/kenshohara/3D-ResNets-PyTorch on Python 2.7.13
$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
./activitynet.py:22:16: F821 undefined name 'accimage'
        return accimage.Image(path)
               ^

./kinetics.py:22:16: F821 undefined name 'accimage'
        return accimage.Image(path)
               ^

Hi, I have faced the same problem. How one can use accimage.Image(path)? (i.e., must import anything? or install any package?)

import accimage located at wrong positions.
I fixed this issue at the latest commit.
To use accimage, this page may be useful.
http://pytorch.org/docs/master/torchvision/torchvision.html
I implemented the dataset script based on the example of folder.py in pytorch.vision.
The original script supports using accimage.
But I use PIL (Pillow) instead of accimage.
So, I cannot support to use accimage furthermore.
Please use PIL (Pillow) if any problems about accimage occur.
In my environment, loading by PIL (Pillow) is fast enough.


Update postcss dependency to v7

This is to resolve an issue when using precss with gatsby-plugin-postcss, which now uses postcss v7.

Updated in 4.0.0 🎉


Updated pick list definitions in the object files

This updates the picklist definition in the obj files to comply with the new valueSet structure - Feel free to merge in or dump as you like - thx for providing!

Good idea @smeeGit - thanks for submitting the PR and apologies for the very delayed response. Happy Thanksgiving!


Set up prod and dev envs

Updated logo (hence zillions of binary diffs) and implemented the system @madhavajay designed and implemented in covidwatch-ios-minimal for managing the dev and prod schemes, which automatically injects your local ip into the Info.plist, making it trivial to talk to the Firestore emulator during development vs the live cloud functions in prod.
To test, throw a call to getAppScheme() in actionsAfterLoading, run the app via both the covidwatch-ios-dev and covidwatch-ios-prod schemes, and observe that the correct scheme name is printed in the console.

Weird, I rebased off dev so there should be no conflicts.


Added go docs for package and integrated go readme

Codecov Report

Merging #7 (bcb3c9b) into master (a705ca2) will not change coverage.
The diff coverage is 91.52%.

@@           Coverage Diff           @@
##           master       #7   +/-   ##
=======================================
  Coverage   80.76%   80.76%
=======================================
  Files          12       12
  Lines         780      780
=======================================
  Hits          630      630
  Misses        109      109
  Partials       41       41

Impacted Files
Coverage Δ

membership.go
100.00% <ø> (ø)

segment.go
68.29% <80.00%> (ø)

segmenter.go
75.40% <83.33%> (ø)

consumer.go
84.87% <88.88%> (ø)

keys.go
100.00% <100.00%> (ø)

partition.go
100.00% <100.00%> (ø)

stream.go
79.47% <100.00%> (ø)

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 2b280cd...bcb3c9b. Read the comment docs.


Rocketchat import fixes

This MR contains various fixes I had to implement to somewhat sucessfull import our production Rocket.Chat data into Zulip. The commits are based on Zulip 5.1, but there were no other changes to the rocketchat converter so I rebased it. I did however not test the changes with a more recent version yet.
Please note that this is not yet complete, but each commit should be able to be merged on its own merit. (except likely the last one with  more verbose debug output)
Also note that I currently have to perform 3 more operation before I can import my data without errors, but due to the long runtime of the entire process, I currently have separate scripts for these and have not yet integrated them into the zulip code. I may do this eventually, but in case I don't and someone finds them useful:
# Remove NUL-bytes (0x00) since import will throw `ValueError: A string literal cannot contain NUL (0x00) characters.` otherwise
# Escape '\`' escape sequence which is probably not intentional. looks like too much data was
# copied from an error message and thus a sole backslash was at the end of a code block. thus probably best
# to convert this to \\` as done by this command
perl -i.bak -pe 's#(?<=[^\\])\\u0000#\1#g; s#([^\\])\\`#\1\\\\`#g' /data/converted-rocketchat-data-PROD/messages-*.json

#!/usr/bin/ruby
#
# Run this on realm.json

require 'json'
require 'set'

stream_names = Set.new()

ARGV.each do |file|
        data = JSON.parse(File.read(file))
        data['zerver_stream'].map! do |stream|
                # check for stream names that appear with different case (e.g.
                # foo and Foo) since these will conflict during the import
                # later. Resolve this by adding the stream ID
                stream['name'] = stream['name'] + " #" + stream['id'].to_s if stream_names.include?(stream['name'].downcase)
                stream_names.add(stream['name'].downcase)
                stream
        end
        #print(JSON.dump(data))
        File.write(file, JSON.dump(data))
end

#!/usr/bin/ruby
#
# Run this on message-*.json

require 'json'

ARGV.each do |file|
        data = JSON.parse(File.read(file))
        data['zerver_message'].map! do |message|
                message['subject'] = 'subject truncated for import' if message['subject'].length > 60
                message
        end
        #print(JSON.dump(data))
        File.write(file, JSON.dump(data))
end

Screenshots and screen captures:
Self-review checklist

[ ] Self-reviewed the changes for clarity and maintainability
(variable names, code reuse, readability, etc.).

Communicate decisions, questions, and potential concerns.

[ ] Explains differences from previous plans (e.g., issue description).
[ ] Highlights technical choices and bugs encountered.
[ ] Calls out remaining decisions and concerns.
[ ] Automated tests verify logic where appropriate.

Individual commits are ready for review (see commit discipline).

[ ] Each commit is a coherent idea.
[ ] Commit message(s) explain reasoning and motivation for changes.

Completed manual review and testing of the following:

[ ] Visual appearance of the changes.
[ ] Responsiveness and internationalization.
[ ] Strings and tooltips.
[ ] End-to-end functionality of buttons, interactions and flows.
[ ] Corner cases, error conditions, and easily imagined bugs.

This is great, huge thanks for sharing these tweaks @Bluewind! I've posted a bundle of comments on tweaks that may make it easier to merge some of the early commits; I also note that the CI failure is just a typo ("unknown" misspelled in one of the first commits).
In an ideal world, we'd get to the bottom of the Rocket.Chat data anomalies that this works around, but most of them seem like minor invariant violations in the Rocket.Chat database.

There are still some formatting changes that the CI checks would perform, but sadly the messages don't say what is wrong and I currently do not have a suitable development environment setup up to run the script locally. I'll try to fix those eventually, but I can't promise a timeline at the moment. If those are a blocker for getting (some of) these commits merged, please tell me.

You can use tools/lint --fix <filename> to have the formatting be automatically fixed by the linter; if you run that on every commit in a git rebase -i, you should be good.

I've fixed all the linter warnings, except for one in the last commit (the DONOTMERGE one), since I'm not quite sure of the correct fix. However, that commit is mostly informational anyway and safe to skip.

I see the DONOTMERGE commit causes test failures. I've removed it now.

@Bluewind I see there are still some test failures. Do we have a path forward on this one? Thanks!

@alya I've fixed the tests now. If you need anything else to merge this, please don't hesitate to tell me.

Structurally, the changes lgtm.
I did a bunch of minor edits to comments/strings, and reordered the logic in the huddle hash commit, before tagging this to merge once CI finishes. Huge thanks for doing this work @Bluewind!


Linting the code and make the code prettier

I want to set up Eslint in the project and make the code prettier. Please assign this issue to me @khannakshat7

@subhangi2731 Go ahead

@khannakshat7 please add the level tag

@subhangi2731 Any updates on it?

@khannakshat7 yes I am working on it I will create a pr by tomorrow


disable events while loading blockly DOMs

Disable events while converting DOM into blockly workspace to avoid polluting data with "automatically" generated events.

disable during load (generate create events)
disable during clear (generates delete events)
Tested that create event

Here is what we need to know

Blocks created by users
Blocks created by remixing a project
Blocks created due to decompile of text.

Today we have just one number which is combination of all 3. Can we get 3 different stats?
This change gives only 1. for me.

Blocks created during decompile from text is doable, but we do the decompilation (convert to xml), and load the new workspace in two different places, so we'd have to pipe that number around, as we don't want to load the new workspace twice.

Getting 2/3 is a separate workstream. Currently everything is throw in the same bucket.


Added Spark configuration

@xie-tom Can you add default values for all the variables in spark2-defaults?
https://github.com/sscpac/ansible-hortonworks/pull/3/files#diff-8f39d280f6c86c8a930d3d1163858c60R913

@jasonkha done


Surface and provide more visibility into where failures occured

BKR-890 - Print failure message and stack trace inline when a test failure occurs

Refer to this link for build results (access rights to CI server needed):
http://jenkins-beaker.delivery.puppetlabs.net//job/qe_beaker_btc-intn/2742/

@samwoods1 is there any way to split these into smaller more focused PRs? It would be much cleaner if each ticket had its own PR.
For instance, it looks like these commits are pretty great at being their own "logically complete units" of implementation, but when I look closer, it appears that the commit for BKR-556 doesn't have a test included with it. This would be much easier to spot if it was its own PR.
 As for the lack of unit test, I didn't find any existing tests for summarizing the results and wasn't quite sure how to go about that.

Refer to this link for build results (access rights to CI server needed):
http://jenkins-beaker.delivery.puppetlabs.net//job/qe_beaker_btc-intn/2747/

@puppetlabs-jenkins retest this please

Refer to this link for build results (access rights to CI server needed):
http://jenkins-beaker.delivery.puppetlabs.net//job/qe_beaker_btc-intn/2756/

@puppetlabs-jenkins retest this please

Refer to this link for build results (access rights to CI server needed):
http://jenkins-beaker.delivery.puppetlabs.net//job/qe_beaker_btc-intn/2758/

last comment is current

@puppetlabs-jenkins retest this please

Refer to this link for build results (access rights to CI server needed):
http://jenkins-beaker.delivery.puppetlabs.net//job/qe_beaker_btc-intn/2770/

Refer to this link for build results (access rights to CI server needed):
http://jenkins-beaker.delivery.puppetlabs.net//job/qe_beaker_btc-intn/2773/

@puppetlabs-jenkins retest this please

needs tests

@er0ck I believe the existing test that was modified covers it.  The behavior changed, and it now checks for the new behavior.  The existing :error test also ensures that I don't break the existing error logic.

Refer to this link for build results (access rights to CI server needed):
http://jenkins-beaker.delivery.puppetlabs.net//job/qe_beaker_btc-intn/2775/

@er0ck is there something in particular you're looking to be tested that's not covered?

fair.  i'd hoped this would increase some acceptance testing coverage as well, but upon further inspection i suppose this covers that case well enough.  we can increase logger testing elsewhere.


Is this maintained?

@jonas-p  are you still planning on maintaining this? if not some people in the community might want to fork it and address some the issues and prs.

Hey @KoduIsGreat, I personally haven't touch this repo in forever and given the last commit is over 4 years ago I think it's safe to say it's not maintained anymore.
I'm happy to shuffle things around / deprecate this repo if someone else want to move things forward.


Ensure soundness of rotation mechanism

Make sure the new rotation mechanism allows for the same accuracy and responsiveness as the one before.
See d1616a5

Mouse movement suffered from being unresponsive with smaller mouse movements. The commit d1616a5 has been reverted. For more detailed information, see c95dff3.


fix: looking up external service with wrong name

Fixes a bug where in the service list view, an external service resource was looked up using the service insight name which isn’t correct. For now, in the absence of the lookup ability via API, we find the corresponding external service in the list of all external services.
Fixes #599.
Signed-off-by: Philipp Rudloff<EMAIL_ADDRESS>

P.S. hurrah 🎉  for the release-2.1 base branch 👏

Can you hold up on the merge for this so I can take another look?

Yeah this still stands:

What are the reasons for not putting this new function on the KumaApi class?

Unless we have a good reason not to use the centralised KumaAPI class for doing this kinda of stuff, then we should move it there. Is there a good reason not to put it as a new method on there?

@johncowen And this is why I don’t think we should:

I specifically don’t want to add it to the API wrapper because it insinuates that the API of retrieving an external service is broken which is not true. If you provide it with the name of an external service, it will work, but that’s not what we’ve been doing in the service views.

I specifically don’t want to add it to the API wrapper because it insinuates that the API of retrieving an external service is broken which is not true.

Without getting into whether kumaApi.getExternalService() is broken or not, why can't we add an entirely new method to the KumaAPI service?

Without getting into whether kumaApi.getExternalService() is broken or not, why can't we add an entirely new method to the KumaAPI service?

We can, but I didn’t. It doesn’t matter. We don’t intend to keep this code around and only employ it as a hotfix. Is this preventing the fix from working? If not I’d appreciate to move on with this matter.

We can

Ok I'd say we do that then if you are ok doing that, then I can re-approve.

I’ve made these changes now.

@johncowen I’ve also included the commit for supporting the release branch workflow https://github.com/kumahq/kuma-gui/pull/607/commits/bbebc46b6e65c4768da7fc3699409ddb46d618b7 because I wasn’t totally sure whether it works if it’s not in the branch.

Ok yeah gotcha I think, I'm still thinking about how this is working branching wise, sorry. I initially figured this fix should also be in master until the backend addition lands - but looking at this again now and after our chat I don't think that is the plan. i.e. master will be broken until the backend fix lands, that's the plan right?

I initially figured this fix should also be in master until the backend addition lands - but looking at this again now and after our chat I don't think that is the plan. i.e. master will be broken until the backend fix lands, that's the plan right?

No no, I definitely intend to also merge this into master regardless of how we fix this long-term.

Ah ok, I think we are on the same page more or less then, just going about it differently! Anyway this is sorted, thanks again!


Behat dependency injection is not working, replaced by Laravel's DI

Hello there ! Just a little thing that bugs me, you can't use Behat's own dependency injection system (it's not documented a lot so not a lot of person are using it) you can learn more about it here :

https://github.com/Behat/Behat/pull/974
http://www.tentacode.net/behat-dependency-injection-phpdi

So, for example, this does not work :
    suites:
        default:
            contexts:
                - Contexts\Api\JsonContext:
                    - '@api_client'
            services:
                api_client:
                    class: "Contexts\\Api\\Service\\ApiClient"
                    arguments: ['http://<IP_ADDRESS>:8000']

And produce the error :
In LaravelArgumentResolver.php line 48:

  [ErrorException]
  substr() expects parameter 1 to be string, object given

Exception trace:
 () at /Users/gabriel/Workspace/taskl/vendor/laracasts/behat-laravel-extension/src/Context/Argument/LaravelArgumentResolver.php:48
 Illuminate\Foundation\Bootstrap\HandleExceptions->handleError() at n/a:n/a

This is because LaravelArgumentResolver only resolve argument "Laravel way" and don't care if the argument has aleady be resolved by Behat (which is the case here). This can be solved by changing the behat.yml to  :
    suites:
        default:
            contexts:
                - Contexts\Api\JsonContext:
                    - '@Contexts\Api\Service\ApiClient'

But this forces us to use Laravel DI (and I can't set constructor arguments in behat.yml this way).
This is probably an easy fix, I could do it if I take the time, at least it's documented now :) Thanks for the good work.

Easy quick fix is to add __toString method in service that is injected. That will avoid substr error. Ex.
    public function __toString(): string     {         return self::class;     }


newCaption.data will be an error in loadNewCaption.

newCaption.data will be an error in loadNewCaption.
newCaption a global variable?
or Is newCaption handed to loadNewCaption?
loadNewCaption: function(newCaption) {
}

I have a problem same as you.


Protocol usage

As Ray Wenderlich discusses here, when adding protocol conformance to a model, prefer adding a separate extension for the protocol methods. .
So this:
class MyViewController: UIViewController, StatefulViewController {
    // ...
}

should be like this:
extension MyViewController: StatefulViewController {

func loadDeliciousWines() {
    startLoading()

    let url = NSURL(string: "http://example.com/api")
    let session = NSURLSession.sharedSession()
    session.dataTaskWithURL(url) { (let data, let response, let error) in
        endLoading(error: error)
    }.resume()
                                          }
}

Ray Wenderlich proposes a guideline rather than a definite way to write code.
That said, the guideline actually proposes to add all methods within the StatefulViewController protocol to an extension, in order to increase readability.
For example, the hasContent method might be extracted into an extension on MyViewController, but loadDeliciousWines would still stay part of the main ViewController definition.
Does that answer your question?

Sure, definitely 😄


Add some more badges to cross reference information

The download stats one will need a day before it can be seen, let's wait


{{title}} does not work in setting "Note creation file path" when special characters are in the title

Hi,
this podcast: https://feeds.lagedernation.org/feeds/ldn-mp3.xml, with title
Spezial: Wie kommt Deutschland aus der Krise? (Rüdiger Bachmann, Ökonom)

did not work.
... same in the download-settings ...

Having the same issue, even though the documentation indicates that {{title}} used in the file path section should automatically remove all special characters:
https://podnotes.obsidian.guide/templates/

I'm bumping this topic - my situation looks very similar. According to the documentation, special characters in the podcast title should be automatically removed - but they aren't. As a result, whenever an episode title contains, for example, a question mark, the "create note" function only generates a message saying "Failed to create note: ..."


Option to create user defined DataStage Instances

There is currently an option to create DataStage instances using the Deployer. The limitation is that, as in Cloud Pak for Data GUI, only T-shirt sizes can be selected. However, customers need the option to define the parameters of a DataStage instance more granularly.  It should be possible to specify the following parameters via configuration:

Number replicas px-runtime pods
Number of replicas px-compute pods
limits and requests for CPU and Memory per Pod-Type
storage class PVC
size PVC

So item 4 & 5 can indeed be controlled by the Deployer configuration:
  - name: datastage-ent-plus
    state: removed
    #instances:
    #  - name: ds-instance
    #    # description: ds-instance provisioned by the deployer
    #    # size: small
    #    # storage_class: efs-nfs-client
    #    # storage_size_gb: 50

Description, size, storage_class and storage_size_gb are optional parameters.
Unfortunately it is not recommended to "hack" the px-compute and px-runtime StatefulSets, as the StatefulSets that control these pods are controlled by the owning PxRuntime object. Here you can only define the tshirt size, for example:
  description: This is test-instance3 description
  license:
    accept: true
  parameters:
    scaleConfig: medium
    storageClass: efs-nfs-client
    storageSize: '60'
  version: 4.5.3

Although you can manually update the STS of Compute and Runtime, whenever the owning PxRuntime decides to re-run itself, it will automatically reset the STS back to its original settings as specified by the scaleConfig parameter. We find it too risky to update objects which are still being controlled by an owning object, in this case the PxRuntime. However if this is something you really want to do, it will be quite easy to generate your own oc patch commands that update the STS objects you want to alter. The naming conventions are quite straightforward to be generated in a script.

It's recommened here to adjust the cr for the instamce to change replicas for compute and runtime pods and also pod size:
https://www.ibm.com/docs/en/cloud-paks/cp-data/4.5.x?topic=resources-enabling-multiple-conductor-pods
retrieve pxruntime cr
oc get pxruntime
edit pxruntime cr
oc edit pxruntime
spec:
ignoreForMaintenance: false  # set to true to ignore refresh
scale:                                        # override the t-shirt size
pxcompute:
replicas: 2
resources:
limits:
cpu: 3
memory: 8Gi
requests:
cpu: 1
memory: 2Gi
pxruntime:
replicas: 2
resources:
limits:
cpu: 2
memory: 4Gi
requests:
cpu: 500m
memory: 2Gi

ah, thank you for this. If indeed we can modify this in the cr I will implement this.

@ThomasKrupski  I have implemented the change, PR is under review at the moment:
You can specify the px_runtime and px_compute (both options must be provided if you use custom scale options) using the following example in your cp4d.yaml configuration file:
  - name: datastage-ent-plus
    state: installed
    instances:
      - name: test-instance11
        description: "This is test-instance11 description"
        size: medium
        #storage_class: efs-nfs-client
        storage_size_gb: 60
        scale_px_runtime:
          replicas: 2
          cpu_request: 500m
          cpu_limit: 2
          memory_request: 2Gi
          memory_limit: 4Gi
        scale_px_compute:
          replicas: 2
          cpu_request: 1
          cpu_limit: 3
          memory_request: 4Gi
          memory_limit: 12Gi

@arthurlaimbock  May I ask when you can commit the changes?

@ThomasKrupski changes are merged to main. I will update the documentation asap.


Fix drawer toggle mis-alignment due to incorrect line-height.

Remove the extra line height causing wonkyness on desktops.

This PR seems to improve the alignment, but not fix it completely.
Here is before:

And here is after:

The box model helps to see why it's still misaligned:

I'll take a look again in a little bit. Clearly there is some math going on for some reason with the height of the appbar. I remember it from earlier, but didn't see where it was affecting this locally.

Just hard-coded a height value that gets it dead-center. :clock1: :clock10: :boom:

54px works great for smaller than desktop resolutions, but it's still vertically misaligned on desktop resolution. Before the regression it was hardcoded to 50px.

@Deilv Can you show an image where it is mis-aligned?
The previous 50px was incorrect as there were mis-alignment issues with that. As far as my testing goes, 54px here is working as expected on desktop. This only affects the desktop resolution anyways as there is a different height on smaller resolutions.

I did some tests with different values and even though you are correct about 54px being the appropriate value, the mdl-layout_drawer-button box is visually misaligned because its height seemingly extends lower than the header row.
Here are two examples with both 50px and 54px for line-height:

Your version with 54px is definitely the right one, but the button still appears misaligned:

If you compare the boxes of drawer-button and header-row, you will notice that the first covers the header's show while the second doesn't, which is roughly the 2 pixels causing the visual misalignment. Hope that helps somehow.

All we are worried about is the vertical rhythm, which is fixed by this patch.
The exact height of the icon, will stay as it has been in 1.x and get fixed in v2. The 2px overhang, once again, not caused by this modification nor is it of concern since it has no affects on the display. (It may cause a minor 2px margin where the drawer can be toggled where it shouldn't be, however that should be margin area anyways to content so isn't a concern to fix.)

As sgomes pointed out, this PR results in this:

The problem with this PR is that it technically solves one bug, but not the problem. It's still visually misaligned and I'm not talking about boxes.

Sorry for the slow response to this, everyone. I'll be taking a look at this and pushing v1.2.1 as soon as possible.

Just tested @sgomes patch, Looks like pure perfection to me!


Inline modules in app/ide-desktop/

Pull Request Description

Remove unnecessary modules

Remove ts-plugin-namespace-auto-import as it was a workaround to use the non-conventional import * convention
Remove esbuild-plugin-copy-directories as it is unuse

Inline modules that are only ever used once

Inline project-manager-shim into gui2 - it is only used during gui2's dev mode
Inline content-config into client

Flatten app/ide-desktop/lib/ to app/

Important Notes

As mentioned above, all remaining modules have been moved up from app/ide-desktop/lib/ to app/. It's not ideal but I'd rather hold off on moving them anywhere else before we have a consensus on what should go where.

(That is to say, this may not be the final directory structure - but I figure it's fine to get something done so that hopefully the rest of the restructuring is simpler.)

Code Review Notes

There are a lot of files changed, but the vast majority are renames without changes and hence have no need to be reviewed.
Similarly, there are a lot of lines changed, but for the most part that is unavoidable due to the flattening significantly changing the order of entries in the package.json.

Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:

[x] The documentation has been updated, if necessary.
[x] Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
[x] All code follows the
Scala,
Java,
TypeScript,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.
[x] Unit tests have been written where possible.

Flatten app/ide-desktop/lib/ to app/

Well, when the directory structure was designed, I imagined app folder representing not the application but rather all applications:

engine (compiler and maybe project manager)
GUI (a package common for cloud browser and electron package)
ide-desktop - electron package using GUI above

Thence came gui and ide-desktop. Much later on, dashboard landed inside ide-desktop which started breaking the above schema (it should land in GUI instead... but GUI was then in rust). Also, engine never made it to this app folder, because none wanted to spend time on sbt reconfiguring.
But still, I think we should ultimately keep separation between GUI and electron, just for cloud-in-browser sake.
Also, these changes may greatly conflict with @Frizi efforts of migrating to pnpm - a part of moving to Bazel, mostly done as far as I'm aware. I would wait for @Frizi changes to land first, to avoid nasty conflicts. Also, all significant directory restructuring should be consulted with "Bazel" team (@hubertp and @Frizi)

umm...
https://github.com/enso-org/enso/actions/runs/9675920069/job/26694401507#step:7:639
anyone know how to fix project references in TS?

Pinging @Frizi for visibility

@jdunkerley i think we need the approval of someone from libs because dataLinkSchema.json is being moved.
also the CODEOWNERS file has been updated and that one should probably be reviewed too

@farmaazon @Frizi either of you happen to know why lint CI is saying this?
https://github.com/enso-org/enso/actions/runs/9714248920/job/26812883079?pr=10305#step:7:200
 INFO ide_ci::program::command: npm⚠ npm ERR! code 127
 INFO ide_ci::program::command: npm⚠ npm ERR! path /runner/_work/enso/enso/app/gui2
 INFO ide_ci::program::command: npm⚠ npm ERR! command failed
 INFO ide_ci::program::command: npm⚠ npm ERR! command sh -c playwright install
 INFO ide_ci::program::command: npm⚠ npm ERR! sh: 1: playwright: not found

i also got it while running locally but not sure what could possibly cause this...

I cannot reproduce this locally: I only have different errors in tests.
It looks really strange: the only place where I see playwright install is in our postinstall, but there it should be run from local package, so playwright should be visible.

hmm, i think it's only reproducible if you're missing certain packages, not sure which. maybe it might be reproducible if you delete node_modules?

there it should be run from local package

yeah, indeed... no idea how it could possibly fail tbh. which is why i just ignored it and moved on when i encountered it

You may check what if you add npx there.
After removing node modules, I get a different error:
 INFO ide_ci::program::command: npmℹ src/entrypoint.ts(4,28): error TS6305: Output file '/home/adam-praca/dev/enso/node_modules/.cache/tsc/enso/app/dashboard/src/index.d.ts' has not been built from source file '/home/adam-praca/dev/enso/app/dashboard/src/index.tsx'.
 INFO ide_ci::program::command: npm⚠ npm ERR! Lifecycle script `typecheck` failed with error:
 INFO ide_ci::program::command: npm⚠ npm ERR! Error: command failed
 INFO ide_ci::program::command: npm⚠ npm ERR!   in workspace<EMAIL_ADDRESS> INFO ide_ci::program::command: npm⚠ npm ERR!   at location: /home/adam-praca/dev/enso/app/gui2

idk what's up with CI o_O
Cannot find package 'yaml' imported from /runner/_work/enso/enso/app/gui2/vitest.config.ts.timestamp-1720431019684-09bd4b9a42eb1.mjs


Updating with new YIPs, replaced usage of "yEarn" with "Yearn"

Added YIPs 46, 47, 48, 50, 53, and 55. Updated figures in YIPs 51, 52, and 54 so images would display properly. Replaced any usage of "yEarn" that I could find with the new standard "Yearn".
This closes #53 and contains an updated version of #56 that also includes the metadata.

Fixes #53

Ran yip_validator locally and all yips passed—checks are failing because of issue #58. @milkyklim please review when possible, ty sir

see you soon @dudesahn


SPARQL MAX aggregate should result in type error on empty set

Reported by @manuelfiorelli on the rdf4j-user list.
Let's assume to evaluate the following queries against an empty repository.
The query below returns no results as expected:
select ?s {
   ?s ?p ?o .
}
group by ?s

However, this query returns one result, which doesn't contain any binding:
select ?s (max(?o) as ?omax) {
   ?s ?p ?o .
 }
 group by ?s

This is incorrect, the result should be empty, not 1 result with an empty binding.
The cause appears to be that evaluation of MAX (as well as MIN and SAMPLE) hides type errors and replaces them with an empty binding. This is not conform the spec: it should result in a type error (which should then be converted into a  empty result by the processing of the extension).

I came across this W3C compliance test, which indicates that in fact the current behavior is correct: https://www.w3.org/2009/sparql/docs/tests/summary.html#aggregates-agg-empty-group. The result is a single, empty solution.
I need to dive a bit deeper into the algebra to see what I missed.

While it is true that the result of a MAX/MIN/SAMPLE aggregate on an empty solution set is a type error, this is hidden by how groups and extensions are evaluated: the type error is converted to an empty binding, which eventually result in a query with a single, empty, solution. This is conform spec and not a bug.

cc: @manuelfiorelli
There is another step that plays a part in the final outcome.
When there are zero rows from the query pattern, the grouping is empty and the
aggregate function is not called. The result is zero rows. (FWIW: Jena has got this wrong
more than once over the years.) The SPARQL test can't be right (for a start, it
has the wrong variables).
With the example query, where there are no values for the grouping.
Group(exprlist, Ω) = { }

then the aggregation becomes:
 Aggregation(exprlist, func, scalarvals, { } )
   =  { (key, F(Ω)) | key → Ω in { } }

which is { } - there is no key → Ω in { }. This is where max would be
called but if there are zero results from the group step, max aggregation isn't called.
But I found a problem in the spec when it is aggregation without a group by, and the pattern having no rows.
I've tried to write out the details, having got it wrong before, in
https://afs.github.io/sparql-agg-group-empty
as I read the spec, with a possible fix for the no group by case.
The intuition is

group+aggregate: same number of rows as the group
aggregate, no group: one row.

Thanks for analyzing this @afs . I must admit I had a hard time puzzling out where the empty row came from looking purely at the algebra, so I relied on the test case and hand-waved it a bit as "it's the grouping and extension conversions".
The crux of the argument seems to be that, in the spec as currently defined, there is a difference between an aggregate with an explicit grouping clause, and an aggregate without. That in itself seems odd to me as conceptually, an aggregate without an explicit grouping still groups - it just groups on the entire solution. From what I gather of a quick read of your writeup, your proposed fix is actually exactly making that distinction disappear.
I need to take a bit of time to puzzle with it and see where it leads us. Do you reckon this is something we should write up for the SPARQL 1.2 group as well?

Hi Jeen,

Do you reckon this is something we should write up for the SPARQL 1.2 group as
well?

Yes, and raise errata on the SPARQL 1.1 spec for points where we agree the spec
is wrong or needs clarification.
I think it is only one current test that is wrong but the coverage of cases isn't
100%.  Looks like the bad test was generated from a buggy implementation and in
the rush to finish (there was a hard time limit on the WG), things got missed.
Let's work on tests to capture what we want SPARQL to do.
Users expectations comes from SQL. We don't have to follow that but it's good to
know when and why we deviate.
MySQL with an empty table.
mysql> create table DATA (A int, B int);
Query OK, 0 rows affected (2.13 sec)

mysql>  describe DATA;
+-------+------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+------+------+-----+---------+-------+
| A     | int  | YES  |     | NULL    |       |
| B     | int  | YES  |     | NULL    |       |
+-------+------+------+-----+---------+-------+
2 rows in set (0.00 sec)

mysql>  select count(*) from DATA;
+----------+
| count(*) |
+----------+
|        0 |
+----------+
1 row in set (0.00 sec)

mysql>  select sum(A) from DATA;
+--------+
| sum(A) |
+--------+
|   NULL |
+--------+
1 row in set (0.00 sec)

mysql>  select sum(A) from DATA group by B;
Empty set (0.00 sec)

mysql>  select count(*) from DATA group by B;
Empty set (0.00 sec)

in other words, with an empty table, aggregate-no-group is one row, aggregate-group is zero rows.
Suggested new test:
SELECT (count(*) AS ?C) { FILTER(false) } ==> One row, ?C=0
Here's a github repo to collect tests in:
https://github.com/afs/sparql-group-agg.git

Makes sense. And thinking about it a bit more I guess there's some symmetry in the solution.
I'll try and write up some test cases later this week and contribute them to your repo. Thanks for setting it up!

Hi @afs and @jeenbroekstra thank you for the detailed analysis and sorry for the late reply. The intuitive explanation by Jeen makes sense to me. If I got it right, this is precisely the main point of the report written by @afs.
When I filed this issue, I didn't think about the deep implications of using an empty graph. In fact, I discovered the problem using some test data and a graph pattern that didn't match anything. However, I tried to "simplify" the issue by avoiding the failing graph pattern.
If I got the discussion right, when I have a group by and an failing graph pattern, in the "revised" specification, we should still zero solutions (instead of a solution with unbound variables). Am I right?

@manuelfiorelli you are correct. Fix will be included in 3.1.2 release.

thank you for the confirmation and the patch release.


TypeError: holistic.Holistic is not a constructor on tauri

Please make sure that this is a bug and also refer to the troubleshooting, FAQ documentation before raising any issues.
System information (Please provide as much relevant information as possible)

Have I written custom code (no):
OS Platform and Distribution (windows 11):
Programming Language and version ( typescript):
MediaPipe version:

Describe the current behavior:
I want to integrate mediapipe into tauri
my code is
  useEffect(() => {
    const canvasCtx = canvas.current!.getContext("2d")!;
    const holistic = new Holistic({
      locateFile: (file: string) => {
        const path = `https://cdn.jsdelivr.net/npm/@mediapipe/holistic/${file}`;

        console.log(path);
        return path;
      },
    });

    console.log(holistic);

    holistic.setOptions({
      modelComplexity: 1,
      smoothLandmarks: true,
      minDetectionConfidence: 0.5,
      minTrackingConfidence: 0.5,
    });

    holistic.onResults((result: any) => {
      preload.current!.hidden = true;

      canvasCtx.save();
      canvasCtx.clearRect(0, 0, canvas.current!.width, canvas.current!.height);
      canvasCtx.drawImage(
        result.image,
        0,
        0,
        canvas.current!.width,
        canvas.current!.height
      );
      drawConnectors(canvasCtx, result.poseLandmarks, POSE_CONNECTIONS, {
        color: "#00FF00",
        lineWidth: 4,
      });
      drawLandmarks(canvasCtx, result.poseLandmarks, {
        color: "#FF0000",
        lineWidth: 2,
      });
      drawConnectors(canvasCtx, result.faceLandmarks, FACEMESH_TESSELATION, {
        color: "#C0C0C070",
        lineWidth: 1,
      });
      drawConnectors(canvasCtx, result.leftHandLandmarks, HAND_CONNECTIONS, {
        color: "#CC0000",
        lineWidth: 5,
      });
      drawLandmarks(canvasCtx, result.leftHandLandmarks, {
        color: "#00FF00",
        lineWidth: 2,
      });
      drawConnectors(canvasCtx, result.rightHandLandmarks, HAND_CONNECTIONS, {
        color: "#00CC00",
        lineWidth: 5,
      });
      drawLandmarks(canvasCtx, result.rightHandLandmarks, {
        color: "#FF0000",
        lineWidth: 2,
      });
      canvasCtx.restore();
    });

    const camera = new Camera(videoInput.current!, {
      onFrame: async () => {
        await holistic.send({ image: videoInput.current! });
      },
      width: 1280,
      height: 720,
    });
    camera.start();
    console.log(camera);

    return function cleanup() {
      holistic.close();
      camera.stop();
    };
  }, []);

it's ok on "cargo tauri dev"
but it failed on "cargo tauri build"
index-812ec658.js:2980 Uncaught TypeError: holistic.Holistic is not a constructor
    at index-812ec658.js:13131:24
    at Rj (index-812ec658.js:5467:22)
    at Ik (index-812ec658.js:6794:25)
    at index-812ec658.js:6648:5
    at J2 (index-812ec658.js:501:20)
    at MessagePort.R2 (index-812ec658.js:531:13)

Describe the expected behavior:
Pass the test case

does mediapipe support vite build?

Hi @kulame,
Please refer to closed issue #3796 and try out the importing the mediapipe as mentioned in #3796(comment) However, This can be more helpful see the vite support implementation from here.

Just to piggyback off this issue, I am also currently getting a similar error on @mediapipe/face_mesh:

For context, I am using a NextJS + Electron with the help of the library Nextron. Inside FaceMeshComponent.js:
import React, {useRef, useEffect} from 'react';
import Webcam from "react-webcam"
import { FaceMesh } from "@mediapipe/face_mesh";

function FaceMeshComponent() {
    const webcamRef = useRef(null);
    const canvasRef = useRef(null);

    useEffect(() => {
        const faceMesh = new FaceMesh({locateFile: (file) => {
            return `https://cdn.jsdelivr.net/npm/@mediapipe/face_mesh/${file}`;
        }});

        faceMesh.setOptions({
            maxNumFaces: 1,
            refineLandmarks: true,
            minDetectionConfidence: 0.5,
            minTrackingConfidence: 0.5
        });
    }, [])

   return
...

Appreciate any help!

@Zxun2,
Could you please raise a fresh issue with problems you are facing to adopt mediapipe solution in the JS platform? Marking this issue as reference. Thanks!!

Just to piggyback off this issue, I am also currently getting a similar error on @mediapipe/face_mesh:

For context, I am using a NextJS + Electron with the help of the library Nextron. Inside FaceMeshComponent.js:
import React, {useRef, useEffect} from 'react';
import Webcam from "react-webcam"
import { FaceMesh } from "@mediapipe/face_mesh";

function FaceMeshComponent() {
    const webcamRef = useRef(null);
    const canvasRef = useRef(null);

    useEffect(() => {
        const faceMesh = new FaceMesh({locateFile: (file) => {
            return `https://cdn.jsdelivr.net/npm/@mediapipe/face_mesh/${file}`;
        }});

        faceMesh.setOptions({
            maxNumFaces: 1,
            refineLandmarks: true,
            minDetectionConfidence: 0.5,
            minTrackingConfidence: 0.5
        });
    }, [])

   return
...

Appreciate any help!

Hello, I alse got the same error. Have you sloved the problem?
Thanks.

Hi @kulame, Please refer to closed issue #3796 and try out the importing the mediapipe as mentioned in #3796(comment) However, This can be more helpful see the vite support implementation from here.

If anyone still has issues, for me it was due to the vite build system, and the source code of mediapipe not public thus could not be obfuscated.
From the issues @kulame sent I could find a package that handled it with ease: vite-plugin-mediapipe
The code of my script still remained the same as in:
import { FACEMESH_TESSELATION, HAND_CONNECTIONS, Holistic, POSE_CONNECTIONS } from '@mediapipe/holistic';
const holistic = new Holistic({
    locateFile: file => {
      console.log(file)
      return `https://cdn.jsdelivr.net/npm/<EMAIL_ADDRESS>    },
  });

And I also add a vite.config.js in the root of my project that looks like this:
import { mediapipe } from 'vite-plugin-mediapipe';
import { defineConfig } from 'vite'

export default defineConfig(config => {
	return {
		plugins: [
			mediapipe({
				'holistic.js': [
					'VERSION',
					'POSE_CONNECTIONS',
					'HAND_CONNECTIONS',
					'FACEMESH_TESSELATION',
					'Holistic'
				]
			})
		]
	}
});

After including the vite.config.js the build was successful and I was able to deploy the app to production.


image resizer doesn't open

Microsoft PowerToys version
0.72.
Installation method
Microsoft Store
Running as admin
Yes
Area(s) with issue?
Image Resizer
Steps to reproduce
PowerToysReport_2023-08-28-11-09-49.zip
Every time you click on Image Resizer or try to go to the settings the whole thing closes.
✔ Expected Behavior
Image Resizer settings open or the image resizer description opens
❌ Actual Behavior
closes out the box
Other Software
No response

Not able to repro this, going to close. Let us know if you see this again!