[CANNOLI-215] Add support for Scala 2.12 in build and release scripts

Fixes #215

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

Coverage remained the same at 13.097% when pulling c915e62b428a9bb05c5f40e3c6426ba4116175ca on heuermh:scala-2.12 into df41fccea3ec95007697284e39f16fbc11411ff8 on bigdatagenomics:master.


Icons for how it works and about us same size

This can be closed change max-width to 70 % to match about us.


Initial changes for iOS support

I figured I'd give iOS building a shot. To even get started, one must build the iOS library for PyTorch. Make sure the TORCH_VERSION from torch-sys matches the PyTorch checkout.
For aarch64-apple-ios-sim you want to run BUILD_PYTORCH_MOBILE=1 IOS_PLATFORM=SIMULATOR IOS_ARCH=arm64 ./scripts/build_ios.sh.
For aarch64-apple-ios you want BUILD_PYTORCH_MOBILE=1 IOS_ARCH=arm64 ./scripts/build_ios.sh
It's unclear how to get x86_64-apple-ios (the x86-64 iOS simulator).
Once you've got that built, IPHONEOS_DEPLOYMENT_TARGET=16.1 LIBTORCH=$PWD/pytorch-checkout/build_ios/install cargo build --target aarch64-apple-ios-sim --example basics
TODO:

[ ] Figure out why  tch::Cuda::is_available and tch::Cuda::cudnn_is_available result in unknown symbols when linking
[ ] Docs?
[ ] Figure out why there's a runtime exception at Exception raised from findSchemaOrThrow at /Users/simlay/projects/torch-sys-source/pytorch/aten/src/ATen/core/dispatch/Dispatcher.cpp:131
[ ] On a clean build targeted at aarch64-apple-ios-sim, I get a pretty unique linking error that's unrelated to this PR:

ld: in /Users/simlay/projects/tch-rs/target/debug/deps/libring-9ce1a2518f1231ce.rlib(aesv8-armx-ios64.o), building for macOS, but linking in object file built for iOS, file '/Users/simlay/projects/tch-rs/target/debug/deps/libring-9ce1a2518f1231ce.rlib' for architecture arm64

Work around is to build for host and then build for cross compiler target.
Here's the runtime error I'm seeing when I run the basics example in the iOS simulator:
"Could not find schema for aten::zeros.
Exception raised from findSchemaOrThrow at /Users/simlay/projects/torch-sys-source/pytorch/aten/src/ATen/core/dispatch/Dispatcher.cpp:131 (most recent call first):
frame #0: _ZN3c106detail14torchCheckFailEPKcS2_jRKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE + 92 (0x100a7aa1c in basics)
frame #1: _ZN3c1010Dispatcher17findSchemaOrThrowEPKcS2_ + 516 (0x100a37234 in basics)
frame #2: _ZN2at4_opsL25create_zeros_typed_handleEv + 48 (0x100a138f0 in basics)
frame #3: _ZN2at4_ops5zeros4callEN3c108ArrayRefINS2_6SymIntEEENS2_8optionalINS2_10ScalarTypeEEENS6_INS2_6LayoutEEENS6_INS2_6DeviceEEENS6_IbEE + 176 (0x100a1387c in basics)
frame #4: _ZN2at5zerosEN3c108ArrayRefIxEENS0_13TensorOptionsE + 248 (0x1009ce27c in basics)
frame #5: _ZN5torch5zerosEN3c108ArrayRefIxEENS0_13TensorOptionsE + 136 (0x1009c592c in basics)
frame #6: at_tensor_of_data + 124 (0x1009c56c8 in basics)
frame #7: _ZN3tch8wrappers6tensor6Tensor10f_of_slice17h8c301062d1683d0dE + 136 (0x1009bdae4 in basics)
frame #8: _ZN3tch8wrappers6tensor6Tensor8of_slice17h3ef2e65ed55dda2cE + 36 (0x1009bdbd0 in basics)
frame #9: _ZN6basics4main17h4585665960def4e9E + 44 (0x1009be1ac in basics)
frame #10: _ZN4core3ops8function6FnOnce9call_once17h166a604c999bde6cE + 20 (0x1009bdd94 in basics)
frame #11: _ZN3std10sys_common9backtrace28__rust_begin_short_backtrace17h133407b50aa38c1eE + 24 (0x1009bdd38 in basics)
frame #12: _ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8df4dd181cd92464E + 28 (0x1009bde84 in basics)
frame #13: _ZN3std2rt19lang_start_internal17h75a83dce357f8b7cE + 380 (0x1009f350c in basics)
frame #14: _ZN3std2rt10lang_start17h53972f716e62a038E + 84 (0x1009bde50 in basics)
frame #15: main + 36 (0x1009be614 in basics)
frame #16: start_sim + 20 (0x100c59fa0 in dyld)
frame #17: 0x0 +<PHONE_NUMBER> (0x100d39e50 in ???)
frame #18: 0x0 +<PHONE_NUMBER>866942976 (0x4865800000000000 in ???)
")', /Users/simlay/projects/tch-rs/src/wrappers/tensor.rs:447:32

@simlay Does it mean it's possible to build and link the torch lib statically? I filed this ticket originally to find out: https://github.com/LaurentMazare/tch-rs/issues/647

@simlay Does it mean it's possible to build and link the torch lib statically? I filed this ticket originally to find out: #647

I believe that would be one result of iOS support. Given that my local iOS pytorchlib directory doesn't have any dylibs (only .a's) I believe so.


mount(<Component />).is(selector) not working, but shallow(<Component />).is(selector) works

Hi, I'm trying to replace our Karma tests with jest + enzyme. It appears to me that .is(selector) is not working correctly for us:
const { mount } = require("enzyme");

const wrapper = mount(
  <FormHelpText>
    Some formatted help text
  </FormHelpText>
);

console.log(wrapper.html());

console.log(wrapper.is("div"));

outputs:
# console.log(wrapper.html());

Some formatted help text

# console.log(wrapper.is("div"));

false # <-- expecting true

Is there anything obviously wrong with this?
<FormHelpText /> is a simple functional component. If I make it just return
 I still get false for wrapper.is('div').
However, I can get true for console.log(mount(
).is("div")).
Also, I get true when using shallow instead of mount.

Using:

react 0.14.9
enzyme 3.1.0
enzyme-adapter-react-14 1.0.2
jest 21.2.1.

This is an intentional difference between shallow and mount; a shallow render "is" what the component renders, a mount "is" the component itself.


Native Notebooks - Kernel Information + Management

Today's Experience:

When a user first connects to a kernel, they're shown a notification in the bottom right corner.

When a kernel is executing a cell, there is an 'In Progress' bar that goes across the top of cell that is running. There is also an 'In Progress' spinner when the cell status bar is not hidden. When the running cell goes off the screen, there is no "In Progress" indicator for the notebook. One thing users can use today as a proxy is the state of the "Interrupt Kernel" item in the global toolbar -- activated or grayed out.

When restarting a kernel, there is both a notification in the bottom right corner and an item in the global status bar.

When interrupting a kernel, there is an item only in the global status bar.

Summary + Additional Thoughts:

There are 4 different locations today that surface different types of kernel related information for users.
Past user studies have shown us the global status bar items are tricky to find, so the interrupt kernel command that doesn't come with a notification can be easy to miss for users.
While there is a proxy for notebook running (interrupt kernel icon) it is static which could also lead users to believe the notebook kernel is frozen unless they scroll down to try and follow the notebook execution to validate.
Adding a global running indicator would be beneficial in the case when a user is working with one notebook, but when working with multiple, this would require they set focus on each one to understand state.
Creating an area that consolidates kernel status/information would reduce the number of places a user needs to look to and could allow us to surface additional information or actions for users such as RAM usage or shut down all kernels.

Related Issues:

https://github.com/microsoft/vscode-jupyter/issues/5654
https://github.com/microsoft/vscode/issues/130811
https://github.com/microsoft/vscode-jupyter/issues/4731
https://github.com/microsoft/vscode/issues/105040
https://github.com/microsoft/vscode/issues/130611
https://github.com/microsoft/vscode-jupyter/issues/7713
https://github.com/microsoft/vscode-jupyter/issues/7864
https://github.com/jupyterlab/jupyterlab/issues/4012

Potential Idea:
We have floated the idea around of a Notebook Panel for quite some time, this could be a good opportunity to surface notebook specific information related to kernel status (busy, idle, disconnected, etc), management (restart, kill, switch), RAM usage, etc. in one location for users.
Very rough mockup of a potential idea below

@davidanthoff /cc
Wanted to get your thoughts on this -- based on what happens with the variable explorer the kernel management may need to live somewhere else

This is an older meta-issue that is capture in other individual issues. Closing as part of issue debt cleanup.


Bug: generateNodesFromDOM removes styles from html

The function $generateHtmlFromNodes generates this code:

underline

strikethrough

align center

align right

But if you convert this html to a node with the function $generateNodesFromDOM you get the following code:

underline

strikethrough

align center

align right

Lexical version: 0.4.1
Steps To Reproduce

Use $generateHtmlFromNodes to generate HTML
Use $generateNodesFromDOM to parse HTML to NODE

Link to code example: https://codesandbox.io/s/lexical-list-parsing-bug-forked-4u27pu?file=/src/Editor.js
The current behavior
Underline, strikethrough and alignment styles are missing
The expected behavior
Styles are not lost

monkey patch for underline style
https://github.com/facebook/lexical/issues/2452#issuecomment-1189672038

I think the $generateNodesFromDOM is not a problem and the issue is somewhere else and I might discover something regarding this.
TL;DR
I've checked the ParagraphNode code and it looks like it does not inherit styles (eg. indent) from the HTML.
Correct me if I'm wrong, but the flow looks like this:
First, the importDOM method is invoked.
static importDOM(): DOMConversionMap | null {
  return {
    p: (node: Node) => ({
      conversion: convertParagraphElement,
      priority: 0,
    }),
  };
}

Then createDOM
createDOM(config: EditorConfig): HTMLElement {
  const dom = document.createElement('p');
  const classNames = getCachedClassNameArray(config.theme, 'paragraph');
  if (classNames !== undefined) {
    const domClassList = dom.classList;
    domClassList.add(...classNames);
  }
  return dom;
}

From there, we run convertParagraphElement and at this point, we create a new, empty paragraph node that inherits __format = 0 and __indent from ElementNode which by default is 0. The imported node is not passed down this function so all styles (e.g. text alignment, text-indent) are basically lost.
function convertParagraphElement(): DOMConversionOutput {
  return {node: $createParagraphNode()};
}

So, when parsing this HTML:

right aligned

I should get a new ParagraphNode with

indent: 2
format: 3

Alignment is now fixed in 0.11 for Heading and Quote nodes, for the remaining HTML - underline, etc. you can override the node and use the example here: https://lexical.dev/docs/concepts/serialization#handling-extended-html-styling


Investigate using Antibody on ZSH Shell

https://getantibody.github.io/

https://github.com/getantibody/antibody/issues/261


[Feature] Add Revolving 3D sphere Text animation

Description
I want to add a new text animation Under Components, which includes a revolving 3D sphere containing a list of texts that rotate faster/slower on mouse hover. Please assign me this issue under @ IWOC 2.0 @ 2k24
Screenshots
Video Demo
https://github.com/Rakesh9100/Beautiify/assets/86418216/78ece031-66e5-4110-8b29-125af92907fc
Checklist

[X] I have checked the existing issues.
[X] I follow Contributing Guidelines of this project.
[X] I am a IWOC'24 contributor.
[ ] I am a JWOC'24 contributor.
[ ] I am a SWOC'24 contributor.

Code of Conduct

[X] I agree to follow this project's "Code of Conduct".

Proceed @SoumyadevSaha

Hi @Rakesh9100 made the PR for adding a Revolving 3D sphere containing a list of texts


Limit amount of items loaded in main window

Toggle loads in the main windows time entries since around a year ago. Which for people who use it daily it can be a lot and severely impacts the performance of the app. Opening the app takes minutes, and doing any operation with time entries is painfully slow.
Adding a configurable limit of the number of entries that are loaded in the main window would make this less of a problem. The default limit should also lower, limiting the display to time entries for the last 30 days or so.

I agree totally, I've found Toggle is really dragging and I have to sign out/in to reduce the number of items in the autocomplete. Even limiting it to 30 days wouldn't be enough for me as I tend to create around 30 items a day.
Ideally the main menu should only load in the last day or two (or 50 entries) and then more as you scroll down. Also the auto complete only really needs to look at recent items.

I agree with this. There is an issue #1790 to solve this issue. There is also "Load more" button at the bottom to make it easy to load more data if needed.
Could you please elaborate what operating system you are using.

I'm using OSX Yosemite 10.10.5
Good to hear it is been taken care of.


General gradient improvements

Improves rendering with a focus on radial gradients:

Implements the repeat and reflect extend modes
Adds full support for COLRv1 style radial gradients based on the two-point conical gradient algorithm at https://skia.org/docs/dev/design/conical/

This makes the radial gradient code in fine much branchier than I’d like but it’s already complex enough that I’d prefer to land what is (hopefully) correct code first and address perf later.
Adds robustness to degenerate cases in gradient encoding:

Radial where p0 == p1 && r0 == r1 renders transparent solid
Empty stops render as transparent solid (no longer crashes!)
Single stop renders as solid

Also fixes a tiny blending bug: clamp alpha in blend.wgsl for the blend_compose function. The Plus mode was generating alpha > 1.0 leading to incorrect rendering.

Does this address https://github.com/linebender/vello/issues/153?

It addresses a great many concerns brought up in that issue, to the point where we can probably close it on merge. There's a longer tail of being more agile about the interpolation color space ([CSS Color Level 4] is quite demanding in this regard) and also a lot of thought about doing interpolation by binary search of gradient stops, with narrowing of the slice done in coarse rasterization, but those would be quite a bit later in the roadmap.

I'm about to review the radial/conical/etc logic, but I'm finding myself a bit nerd-sniped by the change to the "plus" blend mode. There are a few variants of the definition out there, including lighter and plus-lighter. There's a highly relevant discussion on compositing-2. My read of that is that it's fine to always clamp as long as we're talking about SDR, but when we get to HDR, there may be a valid use case for values going out of gamut.
So I'm not going to suggest any changes in this review for now, but put a pin to revisit when we get to HDR.

This is hopefully in good shape now. I'm going to take some time to beef up the example a bit and then I'll merge later today.


Guide section is not accessible through a trivial navigation

Describe the bug
Currently I can only get to the Guides section using the search. No link is provided in the main menu.
Desktop

OS: Win7
Browser: Chrome

Apparently guide sections is in the beta version. But it is apparently down.

This can be closed as the current master has a link to the Guide but has not been deployed to production.


Add the include file to releases

Would you mind adding the single header include file to releases, which can easily be done by uploading via Github online release page. This will make it very easy to integrate with some other build systems and would save some time on low-speed connections too. I know we can download/clone the whole source anyways, but it would be much helpful if a direct download link to main file is provided :)
Thankyou

I just added in the description of each release the following text:
download the header from here

where here is a link to the associated header version.
You can also download the latest version (master branch) from this link:
https://raw.githubusercontent.com/onqtam/doctest/master/doctest/doctest.h

yes absolutely 👍


DataInputSchema can only be a string and not an object

What happened:
Trying to parse workflow definition with dataInputSchema defined as an object fails.
{
   "id": "greeting",
   "version": "1.0.0",
   "specVersion": "0.8",
   "name": "Greeting Workflow",
   "description": "Greet Someone",
   "start": "Greet",
   "dataInputSchema": {
      "schema": {
         "title": "Hello World Schema",
         "properties": {
            "person": {
               "type": "object",
               "properties": {
                  "name": {
                     "type": "string"
                  }
               },
               "required": [
                  "name"
               ]
            }
         },
         "required": [
            "person"
         ]
      }
   },
   "functions": [
      {
         "name": "greetingFunction",
         "operation": "file://myapis/greetingapis.json#greeting"
      }
   ],
   "states": [
      {
         "name": "Greet",
         "type": "operation",
         "actions": [
            {
               "functionRef": {
                  "refName": "greetingFunction",
                  "arguments": {
                     "name": "${ .person.name }"
                  }
               },
               "actionDataFilter": {
                  "results": "${ {greeting: .greeting} }"
               }
            }
         ],
         "end": true
      }
   ]
}

The above dataInputSchema is not accepted because in the code - this is only accepting a string.
What you expected to happen:
As per the spec, the dataInputSchema can be a string or an object.  Both should be accepted
How to reproduce it:
Parse the above Workflow definition using sdk-go
Anything else we need to know?:
Environment:

Go version: go version go1.20.3 darwin/arm64

Hi @k-jay-c! Thanks for reporting it. The code is not expecting a string, but a struct. The function to unmarshal should handle it as an object or string depending on the contents of the string:
https://github.com/serverlessworkflow/sdk-go/blob/main/util/unmarshal.go#L244
There might be a bug there. I don't have the pool to work on it atm, can you try sending a PR?

Got it working, but some one test is failing, will look into tomorrow :)


Set focus on search field when app is made visible, adds option to minimize window on code copy.

This PR adds a couple of improvements for quicker use. With these modifications you are able to open the app from the tray icon, instantly seach for the code you want, copy it to clipboard and enable the app to automatically hide again.

Sets the default focus to search field when the app enters the foreground.
Adds an option to minimize the window automatically after copying TOTP code.

Thanks for the contribution! We have decided not to merge this, since it is designed for a specific workflow, and don't want to clutter the settings with too many options.

I don't see how this is a unique workflow, the sole purpose of this app is to access 2FA tokens and this PR just saves a few steps.

From a UX perspective it's odd that things happens without the user explicitly asking for it, for example not everyone is using the search function to find their credentials, thus not expecting it to suddenly activate. Originally we had the search field automatically populate when you started typing, unfortunately we had to remove this due some people being confused when they tapped their yubikeys by mistake and it started searching for the OTP string (pleasing everyone is sometimes difficult and comes with tradeoffs).
You can quickly activate the search field by cmd/ctrl-f or moving the cursor up, you can copy the code by hitting return or cmd/ctrl-c when you've found it, and you can close the window with cmd/ctrl-w. We believe this to be the most common way of interaction.
Did you try the favorite option btw? If you favorite credentials they will appear in the menu bar/system tray for quick access without opening the window which also can be convenient in some cases.

The keyboard shortcuts do help, as do favourites for some of my colleagues. But some of us have 30+ tokens for various client systems which makes using favourites just as impractical.
Fair enough if you don't wish to pull this, I've made the build from this PR accessible to my team, I just figured that it may be useful to others.


Broken reference in COMPANION doc

COMPANION.md includes a reference to billing account in a different organization but that reference is no longer working.
https://github.com/GoogleCloudPlatform/cloud-foundation-fabric/blame/master/fast/stages/COMPANION.md#L76
After doing some git blame i was able to find the original reference at:
https://github.com/GoogleCloudPlatform/cloud-foundation-fabric/commit/840abd60e70877de6e1cfc3b87c808c1bcaed27d#diff-f0023fa12ecd75713279c09354d32d87837cc40590d438b0e6db252db3023493L142-L160
I wounder if the fix should remove the COMPANION.md reference or revert the removed section from bootstrap README.md

@ludoo @ajlopezn

Fixed, thanks.


Does this support project prefixing for tasks?

Deno version: 2.0.0
Spino version: '0.3.2`
Here is spino dev output:
examples:dev: Task dev vite
@gdn/objecs:dev: Task dev deno run --watch mod.ts
@gdn/objecs:dev: Watcher Process started.
@gdn/objecs:dev: Watcher Process finished. Restarting on file change...
examples:dev:   VITE v5.4.8  ready in 53 ms
examples:dev:   ➜  Local:   http://localhost:5173/
examples:dev:   ➜  Network: use --host to expose
examples:dev:   ➜  press h + enter to show help

You can see it picking up projects: @gdn/objecs and examples.
But if I run spino examples:dev I'll get Task "examples:dev" not found.
Is this currenlty supported? Cheers for the project.

It should be, yes.  If that's not working, it's a bug.

Deno version: 2.0.0 Spino version: '0.3.2`
Here is spino dev output:
examples:dev: Task dev vite
@gdn/objecs:dev: Task dev deno run --watch mod.ts
@gdn/objecs:dev: Watcher Process started.
@gdn/objecs:dev: Watcher Process finished. Restarting on file change...
examples:dev:   VITE v5.4.8  ready in 53 ms
examples:dev:   ➜  Local:   http://localhost:5173/
examples:dev:   ➜  Network: use --host to expose
examples:dev:   ➜  press h + enter to show help

You can see it picking up projects: @gdn/objecs and examples.
But if I run spino examples:dev I'll get Task "examples:dev" not found.
Is this currenlty supported? Cheers for the project.

@jakeklassen Do you have a link to a repo that has this behavior?  I still need to look into it, but one thing I would check is that the example:dev task is within one of the workspace folders defined in the root deno.json

Deno version: 2.0.0 Spino version: '0.3.2`
Here is spino dev output:
examples:dev: Task dev vite
@gdn/objecs:dev: Task dev deno run --watch mod.ts
@gdn/objecs:dev: Watcher Process started.
@gdn/objecs:dev: Watcher Process finished. Restarting on file change...
examples:dev:   VITE v5.4.8  ready in 53 ms
examples:dev:   ➜  Local:   http://localhost:5173/
examples:dev:   ➜  Network: use --host to expose
examples:dev:   ➜  press h + enter to show help

You can see it picking up projects: @gdn/objecs and examples.
But if I run spino examples:dev I'll get Task "examples:dev" not found.
Is this currenlty supported? Cheers for the project.

I think I'm understanding your request a little more now as I dive in.  In turbo, this would be the equivalent of filtering by the package name.  For instance, turbo dev --filter="example".  Currently we do not have filtering, but I'd love it. Is that what you are asking for?


mbus firewall rules

currently the agent uses iptables to create mbus firewall rules.
as we now use cgroupv2 these rules wont work anymore.
we could add this now to the stemcell. or the agent
if we put it in the stemcell it would look something like the script below
and we could use systemd to run this when the bosh agent is ready.
as the rules won't be added if the cgroup does not exists which is done once the agent is started.
and it should also be renewed if the agent restarts.
#!/bin/bash

mbusurl=$(cat settings.json | jq -r .mbus)
mbushost=$(echo ${mbusurl#*//} | cut -d':' -f1)
mbusport=${mbusurl##*:}

if [ -z "$mbusurl" ]; then
  echo "No mbus url found in settings.json"
  exit 1
else
    if [[ $mbusurl =~ https://* ]]; then
        echo "mbus url contains https and no rules are needed"
        exit 0
    fi
fi

echo "my nats ip $mbushost and por $mbusport"

nft add chain inet filter nats_postrouting '{ type filter hook postrouting priority 0 ; policy accept ; }'
nft add rule inet filter nats_output socket cgroupv2 level 2 "system.slice/bosh-agent.service" ip daddr $mbushost tcp dport $mbusport log prefix "\"Matched cgroup bosh-agent nats rule: \"" accept
nft add rule inet filter nats_output skuid 0 ip daddr $mbushost tcp dport $mbusport log prefix "\"Matched skuid director nats rule: \"" accept
nft add rule inet filter nats_output ip daddr $mbushost tcp dport $mbusport log prefix "\"dropped nats rule: \"" drop

this pr should fix this issue
https://github.com/cloudfoundry/bosh-agent/pull/332

we now skip firewall creation due the fact that we are now using temp credentials.
fixxed in https://github.com/cloudfoundry/bosh-agent/pull/332/files


updated macpass to version 0.6-alpha

Good spot you're right. I think I pasted the appcast url wrong. I used the command in the docs. Retried and got the same value.
Did a forced push on my branch.

Thank you for the contribution. It was merged directly as 8768a891c462fd095a1434b711039cdf14d09b14 to keep commit history cleaner. Your contribution is still credited to you.


Move to constants

https://github.com/varunmehta/gric-diwali/blob/master/src/main/java/org/glenrockindiancommunity/integrate/Talk2Stripe.java#L62

Not worth it, easier to make code change and deploy.


MM-12424 Properly set softInputMode on Android

Setting this value as per https://github.com/wix/react-native-navigation/blob/master/docs/android-specific-use-cases.md#adjusting-soft-input-mode. It was previously set through the AndroidManifest, but that's not used once we switch to the NavigationActivity used by that library.
Setting this causes the app content to shrink appropriately when the soft keyboard is visible.
Ticket Link
https://mattermost.atlassian.net/browse/MM-12424
Device Information
This PR was tested on: Nexus 5 (Android 6.0)

@hmhealey is this for 1.13 ?

cherry-picked 1.13


fix(xtask): 🐛 Fix package commands; update release ci

This includes also the removal of appimage build code and removal of enable-messagebox feature.

@The-personified-devil Here i do not remove the prepare-deps command. I only incorporate it into package-streamer/launcher/client, which is only invoked by release CI workflows, which already have no cache. Users are instead instructed to run prepare-deps + build-streamer/client

ah right, sorry I only skimmed it on my phone when waking up


bug/detectron2-not-installed

Describe the bug
I have unstructured 0.5.12 and detectron2 0.6 installed.
This code:
from unstructured.partition.auto import partition

elements = partition("example-docs/layout-parser-paper.pdf")

will output the message:

detectron2 is not installed. Cannot use the hi_res partitioning strategy. Falling back to partitioning with the fast strategy

To Reproduce

Complete all the steps in the quickstart  section with local-inference.

Confirm that detectron2 is installed with pip show detectron2

Run:

from unstructured.partition.auto import partition

elements = partition("example-docs/layout-parser-paper.pdf")

Expected behavior
No detectron2 is not installed. Cannot use the hi_res partitioning strategy. Falling back to partitioning with the fast strategy. message
Screenshots
NA
Desktop (please complete the following information):

OS: Debian GNU/Linux 11 (bullseye)
Browser: NA
Python version: 3.8.16

Additional context
NA

I, too, have similar problems.
After following the install instructions, and a seemingly successful installation.
When I try to partition documemts, an error message says that "detectron2 wasn't correctly installed". Without any further hints.

Closing this one out. As of 0.7.0, detectron2 is installed with ONNX. If you upgrade that should resolve the installation issues.


support regex not containing word

for example "^topic(?!.*bob).*" is accepted in java

This is an example of a lookaround assertion. This kind of structure is not strictly regular and can't be converted into a finite state machine, so unfortunately it's not possible for greenery to support it.


conflictchecks() code doesn't handle versioning

Since ConflictChecks() doesn't handle versioning yet, false positive conflicts might be displayed on screen.
pacaur -S asp-git
:: Package(s) asp-git not found in repositories, trying AUR...
:: resolving dependencies...
:: looking for inter-conflicts...
:: python2 and python are in conflict (python). Remove python? [y/N] y

AUR Packages  (1):

Name                Old Version  New Version

aur/asp-git                      latest

Repo Packages (4):

Name                Old Version  New Version  Download Size

community/asciidoc               8.6.9-1           0.17 MiB
extra/docbook-xml                4.5-6             0.08 MiB
extra/docbook-xsl                1.78.1-1          0.70 MiB
extra/python2                    2.7.8-1           9.63 MiB

Repo Download Size:   10.58 MiB
Repo Installed Size:  83.49 MiB

:: Proceed with installation? [Y/n] n

The asciidoc dependency of asp-git requires python2, which conflicts with python<3:
Conflicts With : python<3

Note that answering "yes" to the conflict question will not have any effect, as binary conflicts are correctly handled by pacman. This is a display issue only.
Edit: another example here.

Expac doesn't allow to retrieve the conflicting version as of yet. Only the conflicting name (%C) is available.

Done in edc9bbb77d32cf6fd7107eb5a8cd15c9031e14e6. At the moment, requires expac-git.


Select webmap widget not working with 3.13 API

@CTDisasterManagement can you provide a link to where this is occurring so I can test/send it to development?

Here is the link:
http://<IP_ADDRESS>/LimNextGen/ism_testing/?appid=750a3d38e8574f8bb7ebacfa986263ed&edit=t
Username/Password: bisen123

@CTDisasterManagement looks like once I click the pagination arrow to the left it starts working. Like the page number is not being set correctly or its not starting up.
Also, I see this error:
TypeError: Cannot read property 'geometry' of undefined {stack: (...), message: "Cannot read property 'geometry' of undefined"} "TypeError: Cannot read property 'geometry' of undefined
    at Object.g.graphicsExtent (http://jsdev.arcgis.com/3.13/init.js:1292:108)
    at declare._zoomToFeature (http://<IP_ADDRESS>/LimNextGen/ism_testing/js/AreaOfInterest.js:666:57)
    at null.<anonymous> (http://<IP_ADDRESS>/LimNextGen/ism_testing/js/AreaOfInterest.js:429:30)
    at g.hitch (http://jsdev.arcgis.com/3.13/init.js:177:296)
    at a._resolve (http://jsdev.arcgis.com/3.13/init.js:1723:9)
    at a._query.n (http://jsdev.arcgis.com/3.13/init.js:1724:61)
    at http://jsdev.arcgis.com/3.13/init.js:1726:113
    at c (http://jsdev.arcgis.com/3.13/init.js:76:221)
    at d (http://jsdev.arcgis.com/3.13/init.js:76:10)
    at b.Deferred.resolve.callback (http://jsdev.arcgis.com/3.13/init.js:77:350)"

@CTDisasterManagement might not want to put password in here since it's public.

@CTDisasterManagement I posted the latest code from the AGOL viewer for this on Basecamp. Can you take a look and see what might be different or causing the issue?
Thanks

@driskull
We compare the given code and in Grid.js(line number 126) "this.grid.startup();" statement was missing hence we added the above statement and it is working fine with 3.13 API.
Thanks!

Awesome!!! thanks @CTDisasterManagement


How to get Root Project Folder only

Hi All,
I couldn't get only the RootFolder (Projects) present under Sites but its pulling all nested projects.
For example:
https://SERVERURL/#/site/Main/projects/111
Under this there are 5 Projects (ie) Test1, Test2, Test3. Test4, Test5
While using Python TSC, it pulls all Main + 5 Projects not only the Main when using the function server.projects.get().
Is there a way to pull only root projects not sub or nested projects

I also facing similar issue . I am logging to tableau server using TSC and downloading all the workbooks in local and pushing to git .But not able to generate the parent child relations hope it is not able to identify the RootFolder (Projects)   by TSC. Please confirm we can achieve this by TSC.

@dzucker-tab any luck??

Yes, I can confirm that the topLevelProject attribute hasn't been exposed in TSC yet. Thanks much for calling this out this gap, as you can see @shinchris just pushed a PR to address this and I'll see if I can get it tested and merged this week.
If you need a quicker fix, the workaround I can think of is to use the response from a REST request in combination with your TSC script.

This has been fixed with PR #497 in our 'development' branch.
req_option = TSC.RequestOptions()
req_option.filter.add(TSC.Filter(TSC.RequestOptions.Field.TopLevelProject, TSC.RequestOptions.Operator.Equals, True))

all_projects, pagination_item = server.projects.get(req_option)

@dzucker-tab Cool thanks !!
@shinchris Thanks :) , and any ETA when this will be added to new release?

@shinchris  Thanks a lot .Any ETA when this will be added to the new releases ?


Problem Training

Hello!
As anyone managed to train the model using the cityscapes weights? Can you share the code for analysis? I've been following the code specified on the README but so far I haven't been able to execute an epoch due to erros on the last layers while training (even tho i can predict correctly).

I am closing this issue as the error was on the training callbacks and not on the model itself.


Login with Microsoft AD authentication using signInWithWebUI is not successful.

Describe the bug
There is a pattern in which login with Microsoft AD authentication using SignInWithWebUI is not successful. This issue occurs when Microsoft Intune Conditional Access is set to require an app protection policy. This setting requires authentication to be performed on Edge. However, signInWithWebUI uses ASWebAuthenticationSession. Therefore,  Microsoft authentication screen will appear asking to launch in Edge. After launching Edge, a HostedUI error screen is displayed in the browser. After that, if entering the email address on the Hosted UI screen, the app will call back. When returning to the app, the Microsoft authentication screen remains displayed.

Steps To Reproduce
Steps to reproduce the behavior:
1. Open the app and login with Hosted UI
2. Launch Edge from the Microsoft authentication screen
3. Enter the email address on HostedUI
4. Authentication not completed

Expected behavior
No error occurs in HostedUI after launching Edge from the Microsoft authentication screen. Then, return to the app, close the Microsoft authentication screen, and complete the sign-in.
Amplify Framework Version
2.28.0
Amplify Categories
Auth
Dependency manager
Swift PM
Swift version
5.1
CLI version
12.10.1
Xcode version
15.3
Relevant log output
<details>
<summary>Log Messages</summary>

INSERT LOG MESSAGES HERE

```
Is this a regression?
Yes
Regression additional context
No response
Platforms
No response
OS Version
iOS 16, 17
Device
iPad
Specific to simulators
No response
Additional context
No response

@bbdev9805 Thanks for submitting the issue.  We will attempt to reproduce the issue and investigate further.

@harsh62 Yes, This issue has not been solved.

@harsh62  How should I provide the logs and the amplifyconfiguration.json file? The redirect URI is set up correctly. The issue occurs when authentication is required on Edge, as described below. If Microsoft Intune Conditional Access is not configured, the ASWebAuthenticationSession appears and the sign-in completes successfully.

This issue occurs when Microsoft Intune Conditional Access is set to require an app protection policy. This setting requires authentication to be performed on Edge.

@harsh62 Is there any update regarding this issue?
I have rechecked the actual behavior. After displaying the authentication screen with signInWithWebUI and launching Edge to complete the authentication, it returns to the app via a callback. Since the app is launched from the Edge app via a callback, the SceneDelegate is triggered, and the callback URL contains the code. However, the signInWithWebUI API does not return a result, and the authentication screen remains displayed. Is it possible to complete the sign-in process when the authentication is completed and the user returns to the original app via a callback after transitioning to Edge?

Thanks for the additional details and sorry for losing track.
We're trying to reproduce this issue but are having trouble setting up an app with Microsoft AD authentication. Once we sort that out, we'll post an update here.
Thanks.


WIP: Add directory support for wiki

It's not ready to review.

But would you like to clean up your stale PRs first?

But would you like to clean up your stale PRs first?

Yes, I'm waiting for #32343, #32178, and #32987 to be reviewed and merged. Most of the others, including this one, will be kept in draft status until those ready-to-view PRs are merged.

Yes, I'm waiting for #32343, #32178, and #32987 to be reviewed and merged.

If you could make time right, then no wait I guess.

Most of the others, including this one, will be kept in draft status until those ready-to-view PRs are merged.

Maybe you could close these stale PRs to reduce the pending list since most they have various essential problems and not worth to review, and in case others would work on them.

Closed as there is no time to continue.


Generated theme doesn't work w/ WAB v 1.3

I generated a theme using default responses to all prompts and then copied to WAB v1.3 stemapp. I then createad a new app using the Default template and tried to apply the theme. I see this error in the console:

This appears to be an issue w/ WAB v1.2 as well (at least on my machine). I see the same error in WAB v1.2.

Closing b/c we will drop theme subgenerator at v2. See #38


Remove NFT tag from FRIES token

Since FRIES is a utility token on a NFT project. Our previous mistake on tagging it as nft has caused it to display in "NFT" section in wallet instead of in token. This token is divisible and shall not be classified as NFT for user to transfer.
I know it doesn't going to be automerged because of deletion of one line
But I hope it gets merged by Solana Labs team soon since it seems like we are really struggle from our token not displaying and working properly on Phantom wallet because of that nft tag
I apologize, it was my fault, I thought it's safe to tag our governance token with nft tag since it's highly connected to our NFT project.
Don't want to ping anybody but hope it resolves soon <3
I agree to not ping anybody on Discord/Twitter/email about this pull request. Instead I will inquire by posting a new comment in the pull request if needed.

PRs are reviewed in bulk and and can take up to two weeks to be merged.
This repository is managed using an auto merge action. Please ensure your PR has no deleted lines, and it will be merged.
Please provide the following information for your token.
Please include change to the src/tokens/solana.tokenlist.json file in the PR.
DON'T modify any other token on the list.
At minimum each entry should have

Token Address:
Token Name:
Token Symbol:
Logo: (logo should be uploaded under assets/mainnet//*.<png/svg>)
Link to the official homepage of token:
Coingecko ID if available (https://www.coingecko.com/api/documentations/v3#/coins/get_coins__id_):

We hope this gets merged by Solana Labs team asap since we are really struggle from our token not displaying and working properly on Phantom wallet because of that nft tag.
We apologize, it was our fault, I thought it's safe to tag our governance token with nft tag since it's highly connected to our NFT project.

We are really struggle from our token not displaying and working properly on Phantom wallet because of that nft tag. Really appreciate Solana team could help get this merged to just delete 1 line

Really appreciate Solana team could help get this merged to just delete 1 line

Really hope this get's resolved please as we are unable to decide how we can proceed with this not fixed.

hope this get's resolved please.

Please advise how we can get this fixed.


adds B-50wstETH-50NEXT to AllowList

Description
Please include a summary of the change and if relevant which issue is fixed. Please also include relevant motivation and context.
Type of change

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Dependency changes
[ ] Code refactor / cleanup
[ ] Documentation or wording changes
[ ] Other

How should this be tested?
Please provide instructions so we can test. Please also list any relevant details for your test configuration.

[ ] Test A
[ ] Test B

Visual context
Please provide any relevant visual context for UI changes or additions. This could be static screenshots or a loom screencast.
Checklist:

[ ] I have performed a self-review of my own code
[ ] I have requested at least 1 review (If the PR is significant enough, use best judgement here)
[ ] I have commented my code where relevant, particularly in hard-to-understand areas
[ ] If package-lock.json has changes, it was intentional.
[ ] The base of this PR is master if hotfix, develop if not

This was done automatically here: https://github.com/balancer/frontend-v2/pull/4163


Problem dealing with extra parameters on subcircuits

In my netlist I have the following subcircuit:
.SUBCKT memristor TE BE XSV
.params Ron=893 Roff=1833 D=0.2212 uv=0.0108 p=4.64 xo={xo}

* Biolek Window Function
.func f(V1,I1)={1-pow((V1-stp(-I1)),(2*p))}

* Memristor I-V Relationship
.func IVRel(V1,V2) = V1/(Ron*V2 + Roff*(1-V2))

* Circuit to determine state variable
Gx 0 XSV value={I(Gmem)*Ron*uv*f(V(XSV,0),I(Gmem))/pow(D,2)}
Cx XSV 0 {1}
.ic V(XSV) = xo

* Current source representing memristor
Gmem TE BE value={IVRel(V(TE,BE),V(XSV,0))}

.ENDS memristor

I get an error "Unknown component type for '.params' "

Ho @ricardoedgarsilva ,
I might be able to work on this shortly, it should be pretty easy to skip all statements that start with a dot.
In the meantime can you try to remove all those lines that start with a dot and see if it gets parsed?


fix #108 - added support for 'data-size', 'data-min-size' and 'data-m…

…ax-size'
Added support for 'data-*'

Landed in 29876be561545275462d30682432a6717bafc5ee


Change the render order of the Axes in LineChart

In the LineChart component, the Axes should render before the DataSet so that axis tick paths (if configured to span across the chart) don't cover up any paths rendered by the DataSet. This change will also make the render order consistent with the ScatterPlot component, in which Axes are rendered first.
This affects the look/aesthetics of the graph, but also affects tooltip rendering; a tick line intersecting a point on the graph will cause the tooltip to hide if the cursor is placed on the tick line rather than the data line.

Good catch! Thanks a lot for taking the time to send a pullreq.


Bash on Windows / Cygwin detection

Hello,
I've read #6 so I have an idea of your thoughts, but I wanted to check how you feel about adding msys / cygwin detection routines. As you're no doubt aware they have some different considerations when it comes to handling terminal behaviour. In my case I'm trying to fix a bug relating to if shell.is_bash() { linux_behaviour() } that fails on Windows.
I haven't seen a Rust implementation of the common routine that exists in other languages, zig go, c - there are various quality of Python examples too.
One the one hand, this seems like the obvious place for the logic to live, if it doesn't go into a crate called is-msys-or-cygwin. It's similar in nature to the other items here in terms of code, and purpose. I also think this can be done without further dependencies.
On the other hand, I'm pretty sure it'll be an FFI call and therefore unsafe.
Do you have any thoughts? Have you handled this issue differently elsewhere?

This request looked a bit confused. On the one hand, you seem to be asking to detect msys/cygwin but on the other, your shell.is_bash() snippet suggests what you want is shell detection. AIUI, msys/cygwin are not shells. They are terminal emulators.
Can you elaborate a bit more on the motivation here?
I note that I was the one who originally brought code very similar to what you've linked to the atty crate. So I'm not sure it's true that there isn't a Rust implementation. Indeed the logic got moved to the standard library via the IsTerminal trait.
But that only queries for "is a terminal or not." You seem to be after something different. It's not clear to me.

Thanks for that snippet, I was surprised that I couldn't find it on GH but I was searching for the regex, rather than a check without an regex dependency. To be honest I did check your repos looking for it as I'd assumed you'd have to have tackled this for at least ripgrep. I'm a big fan of your work!
As for the purpose, you're correct to say this is a little confused. I was hoping to use the general function in a couple of different usecases. For example if you want to print a path, you could say if !windows() || is_msys() {print_forward_slashes()}. Whether that's a good idea I guess is a separate discussion though. If you know of any semi-official resources for writing cross-platform CLIs I'd be really interested.
In the original case, I think I'm safe to say if shell.is_bash() && is_windows() and be confident that I'm on msys/cygwin as I'm not aware of any other widely-used bash-on-Windows implementations
Anyway thanks for your swift reply, I'll close this issue.


[requirejs] use modules.js like node tern plugin?

modules.js manages now compeltion for required module for tern node plugin. I tell me if requirejs tern plugin should do the same thing to avoid marke node with required field?

Things work the way they are now. If you want to fix this, go ahead, but I am not in a hurry to do something about it.


Bug?

When i die, and if i have above 20 health (10 hearts), I will not spawn with the full amount of hearts. Here is my config: https://pastebin.com/B9HbikGx

Did you try to recreate this issue without the mod installed? I can't see what would cause this since basically everything that touches health is disabled in your config. I'll look into it if it doesn't happen without the mod.

The mod used is paraglider. I have no idea what you meant by disabling the mod paraglider. If so, I am unable to get above 10 hearts. Anything below 10 hearts is fine. Excess hearts after 10, using the paraglider mod, will not work.

Then its a bug in paraglider, this has nothing to do with statskeeper.

okay, thanks for the response!


Link not found , provided on Godoc page.

Page where I found link https://godoc.org/github.com/CenturyLinkLabs/docker-reg-client/registry#ImageService , link which is not available ,  https://docs.docker.com/reference/api/registry_api/#put-image-layer_1

@vibhordubey333 The Regsitry API docs are now at https://docs.docker.com/registry/spec/api/. The godoc needs to be updated to point to this URL instead. Please get in touch with them. I'm closing this issue here, but feel free to add a comment.


Added onChanged callback to CodeField

I think the onChanged callback should've been on CodeField and not CodeController.
CodeController extends TextEditingController and it's possible to use addListener there.
The issue for me is this callback fires on every text change, focus change etc. onChanged on CodeField fires only if the text changes, which may in many cases be more useful.

Cool, that's a great addition! Can you please resolve the conflicts?

Should be ok now!

Thanks!

Could you please release a new version on pub.dev? Thank you!


Assume 443 on empty port. Fixes #9

Tested using:
pnpm test

Added test and updated existing tests using tcp://.

lmao GitHub Actions prohibits listening on port 443 https://github.com/Ethan-Arrowood/socket/actions/runs/6388518205/job/17338481439?pr=11#step:11:33
this works fine locally. but fails in CI. I don't love relying on a public endpoint in tests, but I guess we have to in this case.


Failed on HTTPS sites.

From @PhillippOhlandt on February 26, 2015 21:39
Hey I want to build myo control on my websites wich use https.
The websocket cannot be initiated.
Uncaught SecurityError: Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS.
Copied from original issue: stolksdorf/myo.js#23

Hmm, there doesn't seem to be any easy solution. It might require a change to the way Myo Connect does it's web socket. I'll look into it.

From @PhillippOhlandt on February 27, 2015 20:29
Yes it would be cool if the PC and Mac programm can be updated to support wss://

The diagnostics site fails as well (as an example) when accessed over https  https://diagnostics.myo.com/

@jeffbryner thanks for the headsup. Any https site using Myo.js will run into this problem unfortunately. It's pretty low priority to update Myo Connect with wss, but I'll see what I can do.

Understood. I'll see if I can work around it by setting up a nginx ssl proxy somewhere (local or remote) in the system.

FWIW, I figured out how to configure nginx as a local reverse proxy which allows the connection to succeed. Here's some docs: http://mozdef.readthedocs.org/en/latest/advanced_settings.html#myo-with-tls-ssl


Circuit Breaker stays permanently open if HystrixObservableCommand is used in some scenarios where no onComplete callback is called.

Hystrix version used is 1.5.13.
RxJava version 1.2.4.
b5c1d206f7ca6845220444bab9428d2fbdc91b2a
If HystrixObservableCommand is used in combination with Zip, Head, First operations, the circuit breaker will stay permanently open. See the attached unit test proving it.
The problem is that markOnCompletedcallback in AbstractCommand (line 597 - https://github.com/Netflix/Hystrix/blob/v1.5.13/hystrix-core/src/main/java/com/netflix/hystrix/AbstractCommand.java#L597) is never called for those RxJava operators. Only onUnsubscribe is called.
There was an attempt to solve the problem. See the commit b5c1d206f7ca6845220444bab9428d2fbdc91b2a. But it fixes the problem only partially (for non observable commands). After the fix, the circuit breaker does not stay in half-open state, it returns always to open state ;).
This problem makes Hystrix unusable for many Observable scenarios (zip-ing multiple downstream calls is not reliable any more due to this bug).
HystrixCircuitBreakerTest.java.txt

Another side effect is that the success statistics may get wrong since there is some event stream logic in markOnCompleted callback.

any updates on this issue?


add alpha asynchronous binding operation support

Adds alpha support for the proposed asynchronous binding flow coming to the OSB spec (PR #334).

@vaikas-google I made some design sketches in #1209 , and the response I got was to duplicate the logic for now. I'm all for refactoring to make common across both resources at a later date!

@arschles I don't think that kube uses the Alpha and Beta prefix. See api_changes.md. The originating identity headers fields are feature gated and alpha and do not use the Alpha label either.

@arschles As @staebler said, for schemas and originating identity, we didn't prefix with Alpha, so I also didn't prefix here. (Originating identities should actually be migrated out of an alpha feature now that they're in 2.13 though :sweat_smile: )

@kibbles-n-bytes @staebler this is different than schemas and originating identity, though, isn't it? the field names in the resources may change name or disappear altogether. was that the case with schemas/orig. ident?

Setting to "in-progress" while I address PR comments.

@arschles That was the case with schemas; for example, ServiceInstanceCreateParameterSchema didn't have Alpha as part of its resource name even before 2.13 support (link).
I think you're thinking of the resources from the OSB client, which were prefixed with Alpha inconsistently; the osb.Plan object had the field AlphaParameterSchemas of type *AlphaParameterSchema, but the request objects had the field OriginatingIdentity of type AlphaOriginatingIdentity. But @pmorie suggested when I made the changes to the OSB client to not prefix with Alpha.

@staebler I made the changes based off your feedback, please take a look!


Inferred nested generic fails validation.

Initial Checks

[X] I confirm that I'm using Pydantic V2

Description
When nesting generic models, unless the inner model's type is also concretely typed the outer validation fails.
It's trivial to fix for this simple example, but for more complex/dynamic cases I haven't found any way of getting round this without coming up with something outside of pydantic.
Runtime type is 'Inner'
Traceback (most recent call last):
  File "repo/ptest.py", line 41, in <module>
    fails = Holder[int](inner=inferred)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "repo/venv/lib/python3.11/site-packages/pydantic/main.py", line 164, in __init__
    __pydantic_self__.__pydantic_validator__.validate_python(data, self_instance=__pydantic_self__)
pydantic_core._pydantic_core.ValidationError: 1 validation error for Holder[int]
inner
  Input should be a valid dictionary or instance of Inner[int] [type=model_type, input_value=Inner(inner=1), input_type=Inner]
    For further information visit https://errors.pydantic.dev/2.4/v/model_type

Example Code
import typing as tp

from pydantic import BaseModel

T = tp.TypeVar("T")

class Inner(BaseModel, tp.Generic[T]):
    inner: T

class Holder(BaseModel, tp.Generic[T]):
    inner: Inner[T]

inferred = Inner(inner=1)
tp.reveal_type(inferred)  # Type of "inferred" is "Inner[int]" (Pylance)

works = Holder[int](inner=Inner[int](inner=1))
fails = Holder[int](inner=inferred)

Python, Pydantic & OS Version
pydantic version: 2.4.2
        pydantic-core version: 2.10.1
          pydantic-core build: profile=release pgo=false
                 install path: repo/venv/lib/python3.11/site-packages/pydantic
               python version: 3.11.6 (main, Oct  2 2023, 13:45:54) [Clang 15.0.0 (clang-15<IP_ADDRESS>)]
                     platform: macOS-14.1-arm64-arm-64bit
             related packages: mypy-1.6.1 pyright-1.1.335 typing_extensions-4.8.0 email-validator-2.1.0 fastapi-0.103.2

Hi @zakstucke,
Thanks for reporting this. I'm inclined to think this is not a bug due to the fact that typing generics don't support isinstance or issubclass checks, so pydantic doesn't support these either.
From the pydantic docs on generic models:

While it may not raise an error, we strongly advise against using parametrized generics in isinstance checks.
For example, you should not do isinstance(my_model, MyGenericModel[int]). However, it is fine to do isinstance(my_model, MyGenericModel). (Note that, for standard generics, it would raise an error to do a subclass check with a parameterized generic.)
If you need to perform isinstance checks against parametrized generics, you can do this by subclassing the parametrized generic class. This looks like class MyIntModel(MyGenericModel[int]): ... and isinstance(my_model, MyIntModel).

For example, in your use case:
print(isinstance(Inner(inner=1), Inner[int]))
#> False

helps to explain why you're getting the validation error that you are.
The initial (ish) decision to not support this kind of behavior is discussed here: https://github.com/pydantic/pydantic/pull/4970#issuecomment-1405342820.
Happy to discuss further, but for now, the behavior you're seeing can be explained by the fact that pydantic has mirrored the support / behavior of standard typing generics.

Hi @sydney-runkle, whilst the links you referenced are likely the cause of the internal behaviour, I do believe this is a bug / undesirable behaviour.
A perfectly valid datastructure fails because a manual type was not added to Inner, where Inner could infer the type itself from it's attribute inner.
To put it another way, this also works:
Holder[int](inner=Inner(inner=1).model_dump())

Which continues to show the strangeness of Inner(inner=1) failing.
In my use case, Inner objects come in externally and are validated without static knowledge of the type, only at Holder creation is static knowledge of the type known, meaning statically typing Inner in my scenario is not just verbose but also not possible.  Removing the generic is also not possible as type hinting on the nested object from the Holder is required.
At the minute the only solution I can come up with that doesn't cause a performance hit is converting Inner to a dataclass to avoid pydantic validation.

@sydney-runkle I also forgot to mention this is a regression from V1, the same example in 1.10.13 works fine:
import typing as tp

from pydantic.generics import GenericModel as BaseModel

T = tp.TypeVar("T")

class Inner(BaseModel, tp.Generic[T]):
    inner: T

class Holder(BaseModel, tp.Generic[T]):
    inner: Inner[T]

inferred = Inner(inner=2)
tp.reveal_type(inferred)  # Type of "inferred" is "Inner[int]" (Pylance)

works = Holder[int](inner=Inner[int](inner=1))
works = Holder[int](inner=inferred)

Hi @zakstucke,
Indeed, this behavior was different in V1. We changed the behavior of generic models a bit as to more closely match that of standard (typing) generics.
In the case of standard generics, it makes more sense to not support isinstance and issubclass checks, as the behavior of a type List[int] object is no different than that of a type List object.
However, in our case, parametrized generics are subclasses. Thus, there can be different behavior attached to a parametrized generic model, say MyModel[int] compared to the unparametrized MyModel. I understand, thus, your desire to support isinstance and issubclass checks here. As your case shows, a ValidationError is raised when this kind of check fails.
Also to your point, it's a bit counterintuitive that the dumped data validates correctly compared to that which is also valid, but stored in an unparametrized Inner instance.
One thing that has been mentioned by the team thus far is that a change in this behavior could wait until V3 when we can restructure some of the Generic behavior in a more significant way. That being said, I have noticed that many people have requested this kind of change take place in V2 (which is what I assume you're asking for).
Happy to explore more what a solution to this might look like, keeping in mind that we want to keep changes as performant and non-breaking as possible.

I was actually thinking of a slightly different behaviour to what I understand you to be saying: inferring Inner[int] subclass from the T value passed into Inner when Inner is unparameterized, before taking into account the Holder. I suppose I'm saying how static analysers handle the shown example, rather than how pydantic follows the run time semantics currently as you say. However I can imagine there could be a lot of edge cases and might not be the best approach after thinking more deeply and your comments.
If there was a way to get around it concisely in my case where Inner[T] isn't known until later that would be awesome, I spent a while battling it yesterday and came to the conclusion I had to revert to a dc and forgo validating T to the outer Holder.  (external users operate on this type so the model_dump() workaround isn't something I could use either)

The reason that this worked in v1 but not in v2 is that in v2 we explicitly disallow non-subclass model instances, whereas in v1 we would just dump the data and revalidate it in that case.
You can replicate this behavior with validators, here is an example of how you could use a reusable base class to get this behavior for your generics:
import typing as tp

from pydantic import BaseModel, model_validator, ValidationError

T = tp.TypeVar("T")

class LaxGeneric(BaseModel):  # Could rename this.. not sure what the best name is.
    @model_validator(mode='wrap')
    @classmethod
    def dump_on_non_subclass(cls, values, handler):
        """
        This validator is used to revalidate the dumped data if you get a non-parametrized generic
        as an input to a parametrized input field of a type that is a subclass of `LaxGeneric`.
        """
        # The approach used here assumes that validation won't have side-effects, so it's safe to attempt to run twice.
        # If that is wrong, you should use the logic from the exception handler below prior to the first attempt to use
        # the handler.
        try:
            return handler(values)
        except ValidationError as exc:
            if not isinstance(values, BaseModel):
                # If a basemodel wasn't passed, validation didn't fail due to a non-parametrized generic instance
                raise

            if not any(e['type'] == 'model_type' and e['loc'] == () for e in exc.errors()):
                # Only try to handle errors that are model_type errors
                # (Might need to tweak the condition a bit... but this worked/made sense to me)
                raise

            origin = cls.__pydantic_generic_metadata__.get('origin')  # the non-parametrized version of this class
            if origin is None:
                # This is just to handle the case where you accidentally create a subclass of this that is not generic
                # and attempt to instantiate it. You could drop this branch if you won't ever do that.
                raise
            if not isinstance(values, origin):
                # This means the input data was not an instance of a subclass of the non-parametrized version of this
                # class, so it probably makes sense to just raise the error. If you wanted to be even more lax, you
                # could drop this condition (and most of the logic related to generic origins, etc.) and it will
                # always attempt to revalidate the dumped data.
                raise

            # This assumes that validating dumped data is idempotent, but if it isn't, it's not clear to me what you'd
            # want to do here anyway. But you could change the logic as necessary for your use case.
            return handler(values.model_dump())

class Inner(LaxGeneric, tp.Generic[T]):
    inner: T

class Holder(LaxGeneric, tp.Generic[T]):
    inner: Inner[T]

inferred = Inner(inner=2)
tp.reveal_type(inferred)  # Type of "inferred" is "Inner[int]" (Pylance)
#> Runtime type is 'Inner'

works = Holder[int](inner=Inner[int](inner=1))
works = Holder[int](inner=inferred)
print(works)
#> inner=Inner[int](inner=2)

There are different ways we could make this work better but likely involve changes in pydantic-core for performance reasons. Also will likely interact closely with any changes that make generics behave more like standard library typing generics (e.g., not using different subclasses for different parametrizations).
So I don't know that I can give a timeline for improving this behavior at the library level, other than I'd hope that we can improve it as part of the v3 release at the latest (but that is currently unplanned).

@dmontagu I can confirm this works as a solution for my current use case. Thanks!

@zakstucke, would you like to leave this issue open? We could mark it with a v3 tag to reflect the fact that we'll likely make some changes to generic behavior in v3.

Seems static/class method constructor-helpers have the same issue, except where explicit typing doesn't solve it.
from typing import reveal_type
from pydantic import BaseModel

class Foo[T](BaseModel):
    value: T

    @staticmethod
    def new(value: T):
        return Foo[T](value=value)

foo1 = Foo[int](value=1)
# Pyright shows: 👍 "Type of 'foo1' is 'Foo[int]'"
#        Prints: 👍 "Runtime type is 'Foo[int]'"
reveal_type(foo1)

foo2 = Foo[int].new(1)
# Pyright shows: 👍 "Type of 'foo2' is 'Foo[int]'"
#        Prints: 👎 "Runtime type is 'Foo'"
reveal_type(foo2)

class Bar(BaseModel):
    foo: Foo[int]

Bar(foo=foo1)  # 👍
Bar(foo=foo2)  # 👎 "foo: Input should be a valid dictionary or instance of Foo[int]"

Only solution in this case is for Foo to subclass that LaxGeneric example.

I just don't use pydantic when there are generics involved because it's too aggressive and the error messages offer little to no insights.

I would suggest adding and documenting LaxGeneric in V2 until this is ironed out in V3. My users are scientists who've had a pretty hard time understanding this behavior. As a result, I've had to apply LaxGeneric to all my user-facing models.


update variable from business variable panel using datasource. Unable to use template variables in public dashboards (grafana issue)

Hello!
I have the problem with Grafana. Basically, grafana documentation says that I cant use template variables in public dashboards. I thought may be with your Business variable plugin I could update my created variable by using datasource query (for example Postgresql) in your panel, contain my values from query in variable and cheat somehow this limitation (template variables are not supported).
I'm using Grafana v11.1.4. and Business variable plugin 3.4.0
Thanks)

Business Variable panel tightly integrated with Grafana's variables, which are not supported in the public dashboards.


Fix Chat Minimize Issue

Closes https://github.com/WideChat/Rocket.Chat/issues/613

tested and verified


[Question] Shield Dolby Vision Profile 7 Compatibility

I recently purchased an Nvidia Shield TV Pro and I've read around the internet that it doesn't properly support DV P7. It disregards the EL, which most likely doesn't affect MEL DV, but could affect FEL DV. JVP states it fully supports all profiles, so I wonder what this means. Can the hardware itself tamper with the proper processing that's done by JVP, or am I worrying over nothing?

I would suggest looking into something like https://www.reddit.com/r/ShieldAndroidTV/comments/zouqxy/dv_for_dummies_and_fel_layer_handling/
Just Player doesn't really do anything to DV as it uses ExoPlayer defaults so it really depends what ExoPlayer and the device are capable. I never had a chance to test a DV so I don't know much about that.

As I understand it, it ignores the 12-bit master and plays the 10-bit master. Shouldn't make a difference since there are no 12-bit panels afaik.


[Bug]  Connection refused on android

Describe the bug
Using:

flutter_rust_bridge = "1.30.0"  on cargo.toml
flutter_rust_bridge: ^1.31.0 on pubspec.yaml

I meet a connection error while trying to run my android app.
With IOS no problem !!!
This is the error:

This the generated JniLibs dir :

And this how I integrate the generated lib into my flutter code:

Hope you will be able to help me :)
Codegen logs with RUST_LOG=debug env variable
2022-05-24T17:44:58Z DEBUG lib_flutter_rust_bridge_codegen::commands] execute format_dart path=/Users/henrijoelsedjame/development/TESTS/FLUTTER/todo_app/lib/bridge_generated.dart line_length=80
[2022-05-24T17:44:58Z DEBUG lib_flutter_rust_bridge_codegen::commands] execute command: bin=sh args=["-c", "dart format /Users/henrijoelsedjame/development/TESTS/FLUTTER/todo_app/lib/bridge_generated.dart --line-length 80"] current_dir=None cmd="sh" "-c" "dart format /Users/henrijoelsedjame/development/TESTS/FLUTTER/todo_app/lib/bridge_generated.dart --line-length 80"
[2022-05-24T17:44:59Z DEBUG lib_flutter_rust_bridge_codegen::commands] command="sh" "-c" "dart format /Users/henrijoelsedjame/development/TESTS/FLUTTER/todo_app/lib/bridge_generated.dart --line-length 80" stdout=Formatted /Users/henrijoelsedjame/development/TESTS/FLUTTER/todo_app/lib/bridge_generated.dart
    Formatted 1 file (1 changed) in 0.47 seconds.
     stderr=
[2022-05-24T17:44:59Z INFO  lib_flutter_rust_bridge_codegen] Success!
[2022-05-24T17:44:59Z INFO  flutter_rust_bridge_codegen] Now go and use it :)

To Reproduce
No response
Expected behavior
No response
Generated binding code
No response
OS
Android
Version of flutter_rust_bridge_codegen
1.30.0
Flutter info
No response
Version of clang++
No response
Version of ffigen
No response
Additional context
No response

That seems a bug of your rust code instead of frb. Check network permission and your rust code.

You're right, the problem come from the connection to postgresql database.
I don't know why, but it works fine with IOS.
Adding permissions to my android manifest file do not change anything.
I'm still investigating.
thank you for taking time to respond ;)

You are welcome :)


feat: chapter 13 - (challenge)

Chapter 13: Fragment Navigation (challenge)
This pull request shows a solution for the chapter's challenge.
Topics Covered

No Untitled Crimes

How to Test
To test the new feature, you can do the following:

Clone the repository.
Install the dependencies.
Run the application.
The new feature should be available.

Screenshots

Known Issues
There are no known issues with this pull request.
References
Reviewers
Thanks!

Looks good to me.


Make autocompletion in REPL work

There was a bug in internal/inspect_repl.js that caused REPL to crash
when trying to invoke autocomplete. Steps to reproduce:

Start the debugger.
Run repl command.
Type any letter.
Press <Tab>.
Node crashes with TypeError: elem.indexOf is not a function.

The reason is that Node's REPL expects a completion group to be an
array of strings while node-inspect passed an instance of ScopeSnapshot.
This commit fixes it by adding completion groups for REPL as properties
of ScopeSnapshot instances and returning them when evaluating ".scope".

Thanks & sorry for the delay. Tested locally & verified. Not sure myself if our current test setup allows sending <Tab>, might be a good thing to follow up on (so that we can get a regression test for this).
CI run: https://ci.nodejs.org/view/x - Diagnostics/job/node-inspect-continuous-integration/13/

CI passes apart from the windows failures/ we're seeing on master as well.


Is there have the multiple databases handle by HikariCP?

I want to use HikariCP to connects the database in my application. But here I have many databases in my application to be used. So I want to know whether there have some way or capsulation of code to handle multiple databases that can preserve multiple connection of databases in some time, instead of creating the DataSource repeatedly when which DataBase is needed. I tend to do that because I don't want to increase the new costs when change to connect database frequently.

This is not an issue IMHO. Should be closed. Your question belongs on StackOverflow. Having said that, you might want to create a Map<String,HikariDataSource> and spin them up at startup or as they are requested.


Validate k8s 1.11 for 1.6

The 1.11 release cycle begins on Tuesday, April 3rd, 2018, and ends
on release day, Tuesday, June 26th.

https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.11.md

Fixed rancher cloud provider k8s code to adapt to k8s 1.11, the binary is up: https://github.com/rancher/kubernetes/releases/tag/v1.11.0-rancher1. Also released 1.11 kubectld: https://github.com/rancher/kubectld/releases/tag/v0.8.8.
@moelsayed could you take care updating k8s package and adding a template.

K8s Automation runs using  k8s 1.11 - k8s:v1.11.0-rancher1-2 succeeded with no new issues on the following configurations:

Ubuntu 16.04 hosts
Rhel 7.5 , native docker 1.12 with selinux enabled
Rhel 7.5 , native docker 1.13 with selinux enabled

P1 tests for RBAC enabled K8s setup and K8s setup with  cloud provider set to AWS succeeded.


Empty author name issue resulting from empty user/organization first and last names

Need to make first and last names mandatory fields when a user signs up to fix this issue.

@danames @dtarb @martinseul I looked into the code and found the reason first name and last name on user signup page are optional is that we are using the default Django User model that includes username, first_name, last_name and email and the default Django User model has username and email fields as required but first_name and last_name as optional. So it is not that straightforward to make first_name and last_name required since we would have to move first_name and last_name to UserProfile model rather than using the default Django User model to manage these fields. After giving this a bit of more thought, I think forcing users to input first_name and last_name might be too restrictive anyway. I am proposing instead of always using first_name and last_name to display Authors on the resource landing page, we should use username to represent the author if first_name and last_name are empty. What do you think?

@hyi I think that is a cop out.  I think we need to find a way to have required fields be required fields, and our naming model has firstname and lastname as required fields.   See https://stackoverflow.com/questions/8466851/making-first-name-last-name-a-required-attribute-rather-than-an-optional-one-in for some options.
We have in the past discussed our people name model quite a lot (#45, #855) , and sometimes I have suggested revisiting it to remove inconsistencies such as our resource author name model just having one name field while our user model has firstname, only one middle initial and lastname.  There may be merit in revisiting these questions, but I think that to address the current concern that we should just enforce that there be a first and last name.

I think I may agree with @hyi  on this one. First and Last names are sort of arbitrary given all the different naming conventions people use in different cultures. I assume that's why django has not made them mandatory. Also for the purposes of an organization joining HydroShare it would be nice to be able to keep the names blank. Though I don't like using "username" for the author. But using "Organization" makes a lot of sense. "Organization" is required in our django data model...

@danames Agreed Organization is much better than username to represent users with empty first and last names for Authors. However, Organization was optional initially and changed to required later with a popup reminder for existing users to fill in organizations if not filled in already, so there is a possibility that a small portion of existing users may still have organizations empty, in which case we could use username as the last resort if both names and organizations are empty. I'll wait for the follow-up weigh-in from @dtarb before starting implementation.

@hyi and @danames - we already allow Organizations to be Authors of resources. The "correct" way to do this is by adding a new author to the resource as an organization on the "Add Author" dialog. This will ensure that the authorship and the citation are created and displayed correctly on the resource landing page. If you want to have an "organizational" account for HydroShare, I would recommend NOT using it as an author of a resource because the name will not be displayed correctly in the authorship and citation on the landing page. Ownership of resources by an organizational account should be fine. Also - you should consider using a HydroShare Group rather than an organizational user account as our user accounts are designed around individual people.
Given the amount of thought that went into our user/people model - I'm with @dtarb on requiring names for users.

I think there will be a lot of cases where resources should be "owned" by
an organization. Can a "group" own a resource? If that's the case, then I
think we can delete our organiational "individual" account and create a
group one.
However, I see "Geotrust CDM" "CZO Shale Hills" "CZO National" and
other organizations appear to have "individual" accounts. So our
instructions and/or messaging is not working?
Looks like they used "CZO" for first name and "National" for last name
which seems wrong...

Daniel P. Ames, Ph.D., P.E.
Professor, Civil & Environmental Engineering,Brigham Young University,
Provo, Utah, USA
President, International Environmental Modelling & Software Society
Editor-in-Chief, Environmental Modelling & Software
http://ceen.et.byu.edu/faculty/person/Daniel-P.-Ames
http://ceen.et.byu.edu/content/dan-ames
http://www.researchgate.net/profile/Daniel_Ames
http://scholar.google.com/citations?user=S0GUCeUAAAAJ

On Tue, Oct 6, 2020 at 9:37 PM Jeff Horsburgh<EMAIL_ADDRESS>wrote:

@hyi https://github.com/hyi and @danames https://github.com/danames -
we already allow Organizations to be Authors of resources. The "correct"
way to do this is by adding a new author to the resource as an organization
on the "Add Author" dialog. This will ensure that the authorship and the
citation are created and displayed correctly on the resource landing page.
If you want to have an "organizational" account for HydroShare, I would
recommend NOT using it as an author of a resource because the name will not
be displayed correctly in the authorship and citation on the landing page.
Ownership of resources by an organizational account should be fine. Also -
you should consider using a HydroShare Group rather than an organizational
user account as our user accounts are designed around individual people.
Given the amount of thought that went into our user/people model - I'm
with @dtarb https://github.com/dtarb on requiring names for users.
[image: image]
https://user-images.githubusercontent.com/3485902/95284308-20102400-081b-11eb-908d-e94f1a8e2bcd.png
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/hydroshare/hydroshare/issues/3991#issuecomment-704671783,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AA2PZ5AJ4KJPINAWWT2IWBTSJPPAVANCNFSM4SFH7GFQ
.

I’ve worked this through and the following is a lengthy post for how I think this should be resolved.  I’ve tried to be thorough, to avoid further band aids.
HydroShare has users and authors.  These are separate concepts.  Users may own a resource.  When a user creates a resource they become the owner and their profile information is copied (a convenience function) into the author records for the resource as they are often the author.  They may then edit the author records if they want to add or change authors.  (Technically authors are creators in Dublin Core terminology).
There is an established need for users to be individuals as well as organizations.  This is manifested by a CUAHSI organizational account as well as many CZO organizational accounts.  There is not the concept of “groups” owning anything (and I suggest we keep it that way).
The user model includes the following fields

Firstname
Lastname
Organization
email
(others not germane to this discussion not listed)

The author model includes options for Person and Organization.  For person it includes the following fields

Name*
Organization
Email
(others not germane here not listed)

For Organization it includes

Organization*
Email
(others not germane here not listed)

There are the following inconsistencies

The sign up page for users does not require Firstname and Lastname to be entered, however user profile editing does require these fields.
The user model does not naturally support organizational accounts
The convenience function mapping from the user model to author model creates a blank author name entry for user accounts without firstname and lastname
The resource landing page does not enable opening and thus editing of authors where name is present but blank, as created by a user who has blank firstname and lastname.  Thus it is not possible for a user to correct this author problem on an existing resource.

Suggested solution

Drop the requirement for First and Last names to be given.  This better supports organizations and also protects privacy (we had one user who did not want their name to be on a public website).  User accounts are uniquely identified by their email address with the Organization field serving as an attribute, and Firstname and Lastname as additional attributes if provided.  This follows the rationale that an account is validated by the user responding to email received at the email address given when creating an account.  A user account in HydroShare can be for whatever entity creates it, person or Organization.
Correct the convenience function that writes resource authors to handle the case where user firstname and lastname are blank.  In these cases create an Organization author record, with the Author name the Organization name.  A user will have the ability to edit this if needed.
Add a new user type called “Organization” to our current list of user types.  The user type field is already required and set to be chosen from a fixed list.  [This is not essential for fixing problems, but I think is needed because organization accounts do not neatly fit into existing categories.]

Some further justification.
This is presently a problem for the CUAHSI organizational account where the profile is

It is not possible at present for the CUAHSI user to fix this without entering both a firstname and lastname.  It is also not possible for an administrator to fix this.
There are CZO users with profiles such as

This has
Firstname: CZO
Lastname: IML
Organization: CZO
If this user creates the resource and does not actively edit the Author record, the citation will be
IML, C, (year). “title” …
If it was purely and Organization user, with better name “Intensively Managed Landscapes Critical Zone Observatory” this would go on the Author Organization field and be cited
Intensively Managed Landscapes Critical Zone Observatory, (year). “title”
Following are details.  There are multiple issues.  @hyi, if you want to split this into separate issues for implementation, feel free.
First Issue
Relax requirements on Firstname and Lastname.
Sign up page

Note that this change suggests the need for “Organization” to be added as an allowed user type.
User profile editing page

Second Issue
Resources where the Author is missing.  This is caused by the first issue of a resource having an author that is empty.  I was able to create an account without names to test this out.  This shows up as below in view mode

And in edit mode

In the bag metadata we have the following where the Dublin Core creator is blank (and as a reminder the Dublin Core creator term we label as author on our interface)

When a resource is created, the author information is copied from the profile of the user creating the resource.  This is a convenience function, because often the user creating the resource is the author.  But this does not have to be the case.  Authors on resources can then be added to, removed, and edited.  The “bug” here is that there is no text to click on to edit the blank author.
I suggest that to fix this, the convenience function that creates authors from owners be changed to create an Organization author when the owner user does not have firstname or lastname.  Change the Django and bag metadata so that the creator entry is

Then the Author created becomes an organization Author.  The basis for thinking this, is that if I add an organization author to a resource I get the following (without a name term)

In the implementation of this, there will need to be a migration or management command that finds all resources where hsterms:name is blank and deletes the name entry from the creator record, so that these creator records become Organizations.
An issue to address here is what to do when there are blank first and last names and multiple organizations.  Right now the creator record gets set up like

I suggest that we do nothing, except remove the blank hsterms:name entry.  This treats the list of organizations as one organization with a long name.  I debated creating separate Organization author entries for each, but decided against this because they are all associated with a single organization user.  It is quite easy for a resource editor to change these author entries as needed.

Third Issue
If I add “Other person” author to a resource, the Name field is indicated as required.  However, this is not enforced.  If I enter only an organization (e.g. “uwrl”)

I get uwrl as an author

But if I go to view mode I get “null” instead of UWRL

If I go back to edit mode, I still see null.
If I download the bag and look at the bag metadata I see

Null was automatically entered, but evidently not displayed until switching to view mode.
I suggest the fix is to not allow save changes on the Add Author form if Name has not been filled in, as Name is indicated as required.  If a user wants to create an Organization author entry, they should use the Organization option, not Other Person option.
Fourth issue
I suggest allowing an administrative user to edit the profile of any user.  This will be helpful for editors to help users fix up profiles that are incorrect.  This will require adding the edit button for administrator users when viewing any user profile so they can access it in edit mode.

Fifth issue
Metadata for user with space in last name.  If I have a space in a users last name, such as

I get the following under how to cite

This is correct.  If I Edit Author, I see the comma following Tarboton, indicating that “Drennan Tarboton” is the lastname and Debbie first name for citation purposes.

However, if I look at the bag metadata I see

There is no indication where the firstname ends and lastname begins in hsterms:name.  Thus bag importing has no way to get this right.
The text for this comment is also in https://docs.google.com/document/d/1cHHC55jN4srMMCeWXtIWhjTMXe-EA50d/edit#

@dtarb - regarding the first issue - could we move the "User Type" drop down to the top of the form and then make the form respond to what they select? The issue is - if someone selects a user type of "Organization" but then enters a first and last name, what should the system do with that? I suggest that if the person selects a user type of "Organization" then the name fields should not appear on the form for entry and they only have the option to enter the "Organization". You might say that an organization should have a contact person. If that's the case, when a user of type "Organization" authors content in HydroShare, is the organization's name or the contact person's name listed as the Author? If we keep the first and last name fields for users of type organization, then I suggest the organization name is listed as the author when that user creates content.
Also, on the existing form, the "Organization(s)" text entry box implies that there can be multiple organizations entered. For a user of type "Organization" this would not seem to be the desired behavior. I suggest modifying that on the form so that only one organization name is entered for a user type of "Organization". We could leave this as is, but it will likely result in weird entries.
Finally - What is the purpose of a user account with no first and last name? I understand that some may not want their names to appear on a public website. That is fine. They can choose not to sign up for an account, and they can choose not to share content in HydroShare. I'm just wondering what a user should be able to do with a user account that has no name? Doesn't that mean that they are essentially the same as an anonymous, unauthenticated user?

@horsburgh I am happy if you want to flesh out and specify an alternative approach.  I was trying to develop an approach that was simple and had the least disruption to what we have.  The approach you are suggesting is certainly viable, but seems to add additional logic to the sign up and profile editing forms.
With respect to no first and last name, there was a case of a user who signed up for an account with an obviously fake name.  I chided them over not using their real name and they came back saying they had been in the military and did not want their real name on any public website due to security concerns.  You may say that we do not check fake names, so using fake names is OK.  You said above they have the choice as to whether to get an account.  In their case they were required to get an account to do homework of a university class that was using HydroShare (a practice we should value).  So while certainly a user can put something in for firstname and lastname, allowing them to be left blank meets that need directly.

@dtarb @horsburgh @danames Creating a new user type of "Organization" is a bit confusing to me since (1) Each user can be associated with multiple organizations which is also a required field on user signup page; (2) All other user types are associated with an individual user, so a "Organization" user type seems to be an "outlier" to me among other supported user types; (3) Organization seems to me to fit more as a group rather than as a user. Can czo users be created as one czo group with multiple "normal" users in the czo group? Somehow treating/fitting an "Organization" into our user model feels a bit confusing to me.

@dtarb One question to confirm with you regarding your fourth issue: allow admin to edit profile of any users. While working on this, I found our code has assumed the requesting user (which would be admin in this case) is the user whose profile to be updated and this logic is used almost everywhere in our code involving profile update. To allow admin to edit profile of any users, I have to update the logic everywhere, so I am questioning a bit on whether the benefit of allowing this is worth the effort. Also, when an admin logs in, there is no link that would take the logged in admin to the profile page of a user the admin wants to update, and the admin has to fine the user's id and manually types in the URL of the profile page of the user in order to get to the user profile page to update other user's profile. So I am also not sure how much the admin will really use this functionality to update another user's profile. I'm leaning toward not implementing this given the work being involved with little value-add, but want to get your thought.

I am OK putting issue 4 on an enhancement list to consider for later.
There are many ways to get to the profile page of a user.  E.g. if you click on their name in Discover for a resource they are author of or their name in a group, or their name on a resource landing page where they are an author, or owner.  Note that the admin user can use HydroShare just like a regular user.  Once at the profile page I was just suggesting there be an edit button that could then take them to editing.  This is exactly the same pattern that an admin user can use to edit a resource.

vs

If you have implemented other items and are deferring on issue 4, please put it in a separate issue before closing this issue.

@dtarb OK. Thanks for the info. I'll take a stab at this first while I am at it then.

I tested the deployment of the branch to fix this issue on dev-hs-3.cuahsi.org.
I think that issues 1, 2, 4 and 5 are essentially fixed.  Good work!  On issue 1 there are some additional labeling changes I would like.  See below.
I found the following problem with issue 3.  If I try to add an Organization Author to a resource, I get an error “Name is required” even though there is not a name field to add.

Also, when this issue was first written we forgot to note that Contributors should be treated identically as Authors to the extent possible.  Thus we should not have the following in metadata when there is an organization contributor.

The contributors area on a resource landing page should say
“People or Organizations that contributed …”

Also – to avoid the awkwardness of name and organization for organization contributors I suggest a layout that just has the column header “Contributor” as indicated that combines name and organization entries, separated by a comma.  Omit the comma if one of the fields is empty.  Also add an active hyperlink if it exists.  There are two possible links.  I suggest that if there is a homepage link that it be given preference, and that the hydroshare profile link only be used if there is no homepage link.
The add contributor dialog, just like the add author dialog should include organization contributors.
@horsburgh may want to comment on this.
Some small refinements
On the sign up page I think it should say “Names may be omitted if you do not wish to provide them or are creating an Organization user account.”  I.e. expand the text below.

Also add on the profile editing page below First name, middle name, Last name
“If this is an account for an Organization User, First name, Middle name and Last name may be left blank.  Resources created by this user will then be created with the Organization for the resource author/creator.”

Also add “Organization” to the list below for users to indicate that the account is representing an organization.  @Castronova @martinseul  may want to comment on this.

@dtarb I should be able to take care of other issues easily except for the Organization Author. While trying to fix these issues, I found Organization Author is implemented as a Creator without names. I thought this should suffice without introducing an "Organization user" on the user sign up page. We may discuss the potential value-add of having an organization user, since I don't yet see the value-add especially after I have fixed these related empty author name issues.

I would change the text added below First name, Middle name, and Last Name to the following:

If this user account is for an Organization, First name, Middle name, and Last name may be left blank. Any resources created by an Organization user will list the Organization as the resource author/creator.

Otherwise, I think these suggested changes seem fine.
@hyi - we have at least several "Organization users" in HydroShare now.  I think it's just recognizing that people are already using the system in this way.

@horsburgh Yeah, I think I get your point. With the fixes I made, when a user signs up without providing first and last names, the user has to fill up the organization required field, and this organization is used throughout HydroShare now to represent the user. From the Creator metadata element perspective, this user without name is managed in the same way as an Organization Author being added to an existing resource. So I thought when a user wants to sign up as an organization user, the user just need to leave the name blank and fill in the organization required field and we don't need to add an "Organization" type to the user type dropdown. We can make the explanation text below the first and last name clearer to cover this case. My point is that we don't need to add an "Organization" type to explicitly mark the user without name as such, and we can treat all users without names as Organization user, which might be sufficient to meet our needs.

@hyi I agree with @horsburgh wording changes.  The suggestion for an "Organization" to be on the list of user types is just an issue of labeling.  It is not intended to impact functionality at all.  If you are creating a user account to, for example be used by RENCI to own and be an author for resources that RENCI shares or publishes, RENCI does not really fit into any of the categories in the user type list.  It is just to provide a category for Organizations to fit in to.  It may be used in reporting (we have this number of types of users), but not for any actual website functionality.

@horsburgh @dtarb Adding an Organization type in the dropdown was a bit confusing to me initially, but after thinking this a bit more with the help of your clarifications, it starts to make sense to me. I'll address this as you suggested then. Thanks for the clarifications.

@hyi I reviewed changes again.  Two small things

I think "Organization" should be near the bottom (just above other) in user type.  Not first.  It is a rare case and we do not want it chosen by mistake.
Is it possible to avoid the indent wrapping here

Nice touch to switch to Organization user type automatically when names are blank in profile editing.

@dtarb Have updated the cuahsi test VM with fix to these two small things. Please take a quick look when you get a chance and let me know if you notice any further issues.

@hyi I am happy with the changes.

Deployed. Closing.


refine Remove mutable variables in the function

Proposed changes
Remove mutable variables in the function.


Read DBPF File

[x] Read Header
[x] Analyze Header for proper fields
[x] Implement DBPF Entry
[x] Unit tests for DBPF Entry
[x] Implement DBPF TGI
[x] Unit tests for DBPF TGI
[x] Read Index
[x] Map TGIs
[x] Map Entries
[x] Implement QFS Decompress
[ ] Implement QFS Compress
[ ] Expand unit tests for comp + decomp to cover more TGI types
[x] Read individual entry data
[x] Interpret/parse individual entry data meaningfully

QFS / RefPack Resources:

https://www.wiki.sc4devotion.com/index.php?title=DBPF_Compression
http://wiki.niotso.org/RefPack

Implementations:

https://github.com/memo33/jDBPFX/blob/master/src/jdbpfx/util/DBPFPackager.java
https://github.com/Killeroo/SC4Parser/blob/master/SC4Parser/Compression/QFS.cs
https://github.com/fbstj/dbpf/blob/c/qfs.c
https://github.com/wouanagaine/SC4Mapper-2013/blob/master/Modules/qfs.c
https://www.wiki.sc4devotion.com/index.php?title=DBPF_Source_Code
https://github.com/marcboudreau/godbpf/blob/master/qfs/qfs.go

All items are completed; QFS related items are moved outside of the scope of this project to QFS.net project.


[2024-11-18 07:34:31.099087][] ERROR: Worker errored: Bunny\Channel::__construct(): Argument #1 ($connection) must be of type Bunny\Connection, null given, called in /opt/app/vendor/bunny/bunny/src/Client.php on line 154

Oh this is a bug? I thought the constructor arguments changed for v0.6.x and thus I pinned our composer ver to 0.5.5 😄

@fronbasal Caught this on one of my services at home using 0.6 and this came up. It is a bug for sure, but it was surprising to see. Just logged it here to fix before 0.6 will be out

Gotcha! Also saw this in dev and stage just a few days ago. Thank you for this amazing library and your engaged, skillful maintenance of this repository ♥

Gotcha! Also saw this in dev and stage just a few days ago. Thank you for this amazing library and your engaged, skillful maintenance of this repository ♥

If you have a stacktrace of it, please post it here or email it to me if you rather not have that public. It might help fix this.


ci: Use clang-tidy tools from toolshed

This sets up the clang_tidy ci target using the recently added/experimental aspect from toolshed
The upstream needs some work before we can fully enable this for CI - but this at least allows it to be run locally, and makes it easier to run ci testing in the interim
For some reason, using the bazel clang-tidy binary we have setup in the repo fails flakily so i also need to investigate that further. For now it uses the host clang-tidy

Commit Message:
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

cc @wbpcode

/lgtm deps