PM: Simplify device power states

Introduction
Currenty Zephyr defines distint power states for SoC and devices. How they are related is not
clear and a source of problems. This RFC aims to provide some clarity to this area and provide
more flexibility for applications.
Problem description
There are four power states for devices and they are used by the
power subsystem according the power state that the system is
transitioning to.

This relationship is arbitrary (hardcoded) and expects devices drivers to either implement them or return
ENOTSUP. Otherwise the system will fail to transition to a sleep state and continue active.
The majority of device end up just implementing SUSPENDED and ACTIVE states. Some
of them implements LOW_POWER and SUSPENDED the same way.
Another problem with multiple states is that this is disconnected with what device runtime API provides,
suspend (pm_device_put) and active (pm_device_get) only.
Proposed change
Remove LOW_POWER. The system will basically use suspended and active
states. Devices should decide which state to use if they support
more than one low power state.
More information has to be provided to devices to them be able to
select the most appropriated state though. So, the power management
callback implemented by drivers has to be changed. Two additional
parameters are proposed:
uint8_t flags; /* Who is asking for it ? PM_DEVICE_RUNTIME, PM_SUBSYSTEM, ... */
enum pm_state soc_state; /* SoC pm state */

The final version of the callback will look like:
typedef int (*pm_device_control_callback_t)(const struct device *dev,
					    enum pm_device_action action,
					    enum pm_state soc_state,
					    uint8_t flags);

Most drivers will not be impacted right now, since they already support only SUSPENDED and ACTIVE.  Devices that support multiple states will now be abl  to do it properly having enough information to select the best one for a given situation.
The power subsystem will be simpler since will not need to make assumptions about device power states.
Dependencies
This change will impact how device drivers support PM.
Concerns and Unresolved Questions
How applications can fine tune which low power state a device should use (if more than one is implemented). A new function will possibly be added to do this. This can be very fancy like allow to map all possible combinations of soc_state and flags (called from PM_DEVICE_RUNTIME, from PM_SUBSYSTEM, from another host OS, ...) or as simple as select a particular state every time the device is requested to suspend.
Alternatives

@nashif @erwango @gmarull @JordanYates @aurel32  ^^^^

More information has to be provided to devices to them be able to
select the most appropriated state though. So, the power management
callback implemented by drivers has to be changed. Two additional
parameters are proposed:
uint8_t flags; /* Who is asking for it ? PM_DEVICE_RUNTIME, PM_SUBSYSTEM, ... */
enum pm_state soc_state; /* SoC pm state */

The final version of the callback will look like:
typedef int (*pm_device_control_callback_t)(const struct device *dev,
					    enum pm_device_action action,
					    enum pm_state soc_state,
					    uint8_t flags);

Would that be possible to also add the soc_substate in addition to the soc_state? For example on STM32, PM_STATE_SUSPEND_TO_IDLE is mapped to STOP0, STOP1 and STOP2 modes using substates. Depending on the substate, the various peripheral might need specific actions or not.

Would that be possible to also add the soc_substate in addition to the soc_state? For example on STM32, PM_STATE_SUSPEND_TO_IDLE is mapped to STOP0, STOP1 and STOP2 modes using substates. Depending on the substate, the various peripheral might need specific actions or not.

Yes, it should probably be the pm_state_info struct instead of only the enum.

Can Device_State_Off be removed as well so there are only 2 states for the device i.e suspend & active. Drivers can use the soc_state argument to decide the low power operation to perform

I'd not extend callback, but provide some APIs to obtain contextual information if the driver requires it. For example, pm_state_get_next() instead of passing enum pm_state soc_state. Many devices will never care about soc_state, so better make their life easier.
https://github.com/zephyrproject-rtos/zephyr/issues/37056 also describes some problems outlined here, together with information that can be valuable for this discussion.

Can Device_State_Off be removed as well so there are only 2 states for the device i.e suspend & active. Drivers can use the soc_state argument to decide the low power operation to perform

That's indeed a good point.

Can Device_State_Off be removed as well so there are only 2 states for the device i.e suspend & active. Drivers can use the soc_state argument to decide the low power operation to perform

That's indeed a good point.

I was thinking about it as well. Unless someone else come up with a case where it makes sense, I agree that ACTIVE and SUSPENDED are enough.

I'd not extend callback, but provide some APIs to obtain contextual information if the driver requires it. For example, pm_state_get_next() instead of passing enum pm_state soc_state. Many devices will never care about soc_state, so better make their life easier.
#37056 also describes some problems outlined here, together with information that can be valuable for this discussion.

That is a good point, just wondering if making it a different function, instead of a parameter, will not make it harder for drivers developers that need it.


Module 1 exercises [One P. Phefo]

Please "drag & drop" exercise 1 pdf file below.
Botswana Population By District In 2022.pdf

Please "drag & drop" exercise 2 pdf file below.
Population Density.pdf

Please UPDATE THE TITLE of this "Issue" in the title bar above with your name.

If you haven't done so, please go back to Module 1 and make sure to take
the post-training survey. Participating in surveys is required for receiving
the "GALUP Certificate" by the University of Florida.

Well done, One. You clearly grasped the material outlined in Module 1 and successfully applied it to these exercises. Thank you for your participation!


Stream message from one to second client

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context about the feature request here.

Stream messages form client to server, and stream the same messages you get from client, to secound client from server.

Could you describe your question more clearly? Right now, I guess your requirement is to implement a client 1 -> server -> client 2 workflow using streaming. This logic should be implemented in your program, instead of gRPC itself.

This issue is being closed because it has been marked with the label kind/question. This form is for bug reports and feature requests ONLY!
Please post questions on https://groups.google.com/g/grpc-io so that the wider community can help answer.


[framework] CUICatalog: Invalid asset name supplied: '(null)'

Description:
I encountered an issue with MMDrawerViewController where I am getting the following error in the console: "[framework] CUICatalog: Invalid asset name supplied: '(null)'".
Steps to Reproduce:
Initialize MMDrawerViewController with the necessary configuration.
Perform actions that trigger the loading of assets or UI elements.
Expected Behavior:
The MMDrawerViewController should correctly load and display assets without any error messages.
Actual Behavior:
The error message "[framework] CUICatalog: Invalid asset name supplied: '(null)'" is displayed in the console.
Environment:
MMDrawerViewController version: [insert version number]
Xcode version: 14.3
iOS version: iOS16
Device: iPhone12promax
Additional Information:
I have checked my code for any potential issues related to asset names or resource loading, and everything appears to be in order. The error seems to originate from within the MMDrawerViewController framework.
Please let me know if you require any further information or if there is a known workaround for this issue. Thank you for your assistance in resolving this matter.
Thanks!

pod 'MMDrawerController', '~> 0.5.7'

sorry, this issue is a mistake!

please close this issue and thanks your sdk, it's very useful!


Cannot read property 'nativeNode' of undefined

We're getting up and running with angular-hmr in our existing ng2 project but are experiencing a rather puzzling issue. Google has nothing to tell us on this matter. The error is as follows and I hope you can aid us in understanding why this is happening.
This behaviour occurs when we alter any code file in order to trigger a hot update.
[WDS] App hot update...
dev-server.js?b7b7:45 [HMR] Checking for updates on the server...
VM23616:623 Uncaught TypeError: Cannot read property 'nativeNode' of undefined
    at removeDebugNodeFromIndex (eval at <anonymous> (http://localhost:31337/main.bundle.js:2521:1), <anonymous>:315:39)
    at eval (eval at <anonymous> (http://localhost:31337/main.bundle.js:5087:1), <anonymous>:143:148)
    at Array.forEach (native)
    at DebugDomRenderer.destroyView (eval at <anonymous> (http://localhost:31337/main.bundle.js:5087:1), <anonymous>:143:22)
    at CompiledTemplate.proxyViewClass.AppView.destroy (eval at <anonymous> (http://localhost:31337/main.bundle.js:5136:1), <anonymous>:222:27)
    at CompiledTemplate.proxyViewClass.DebugAppView.destroy (eval at <anonymous> (http://localhost:31337/main.bundle.js:5136:1), <anonymous>:619:38)
    at eval (eval at <anonymous> (http://localhost:31337/main.bundle.js:1643:1), <anonymous>:672:67)
    at Array.forEach (native)
    at ApplicationRef_.ngOnDestroy (eval at <anonymous> (http://localhost:31337/main.bundle.js:1643:1), <anonymous>:672:29)
    at AppModuleInjector.destroyInternal (/AppModule/module.ngfactory.js:1017:28)
    at AppModuleInjector.NgModuleInjector.destroy (eval at <anonymous> (http://localhost:31337/main.bundle.js:2569:1), <anonymous>:189:14)
    at eval (eval at <anonymous> (http://localhost:31337/main.bundle.js:4681:1), <anonymous>:46:18)
    at hotApply (http://localhost:31337/commons.bundle.js:528:14)
    at hotUpdateDownloaded (http://localhost:31337/commons.bundle.js:312:13)
    at hotAddUpdateChunk (http://localhost:31337/commons.bundle.js:292:13)
    at webpackHotUpdateCallback (http://localhost:31337/commons.bundle.js:37:12)
    at http://localhost:31337/0.8db03e9f109e4726aaa2.hot-update.js:1:1

also having this issue

this issue is happening to me when I switch back and forth between two modules.

Had same error.
In hybrid application, downgraded (footer) component was registered twice in a module.
So Angular throw this error, when tried to delete this component for second time

@Maritims were you able to resolve this issue?

@Maritims were you able to resolve this issue?

Sadly no. I've stopped working with Angular since for many reasons.

Have the same error with hybrid app.
Angular throws this error when app goes from the page that has downgraded component.
@antontemchenko were you able to fix that?

Have the same error with hybrid app.
Angular throws this error when app goes from the page that has downgraded component.
@antontemchenko were you able to fix that?

As i wrote earlier, in my case this error showed up when downgraded component was registered twice.
So looking for duplicated registration of the component in module resolved the problem.

Thank you!
I found that I had the same problem - I registered the same component as downgraded directives with different names.

Fixed problem. In my case the problem was including in template a micro-tag as custom elements into another.


Create encrypt-data-using-camellia.yml

This rule covers the Camellia cipher covered here -> https://github.com/gpg/libgcrypt/blob/355f5b7f69075c010fe33aa5b10ac60c08fae0c7/cipher/camellia.c .  I'll upload the sample to capa-testfiles and I have a couple more planned rules off that sample.  Rather than uploading them in bulk, I'll post them up one at a time for review to make the PR's a bit more painless.
The tables are larger than what capa allows (large tables of DWORDs) so I converted them to bytes and truncated at a 256 cutoff.

so I converted them to bytes and truncated at a 256 cutoff.

this makes sense

thank you!


Add Triaging IOT content

Probably a tile on the customer page in developer.ibm.com

tracking in upstream


Add autosave path configuration

Closes #806
Demo
https://user-images.githubusercontent.com/34857220/155188081-463dac93-2887-431b-990f-ebe036dc4c16.mov

@jonatanklosko I've applied more of the suggestions besides the button to icon change as I personally didn't like it (but feel free to change it on your own 😉 ). You can have a look


[Soft 603] FWXV CI

I added a --define option to scons, not sure now we want to have that but right now it just plops it down in the build.


0.97 - Can't use vite-aliases

ERROR: [plugin: externalize-deps] Failed to resolve entry for package "vite-aliases". The package may have incorrect main/module/exports specified in its package.json: No known conditions for "." entry in "vite-aliases" package
I think you need to change package.json and how tsup compile tho. I'll send you a PR

@Subwaytime I will give it to your judgement to close this issue since the more I dig up, I starting to believe that this is an issue with vite-plugin-solid.
The main issue with SolidJS in vite using vite-aliases are :

Aliases are not generating in config.resolve.alias

Generator {
  options: {
    dir: 'src',
    prefix: '@',
    deep: true,
    depth: 1,
    createGlobalAlias: true,
    createLog: false,
    logPath: 'src/logs',
    adjustDuplicates: false,
    useAbsolute: false,
    useConfig: true,
    useIndexes: true,
    useTypescript: true,
    root: '***Omitted***'
  },
  fullPath: '***Omitted***',
  aliases: [],
  directories: Set(0) {},
  paths: {},
  searched: false,
  servermode: 'serve'
}

ERR_PACKAGE_PATH_NOT_EXPORTED  ( current workaround is to update the package.json ).

Couldn't find package.json for vite-aliases Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in ***Omitted***\node_modules\vite-aliases\package.json
    at new NodeError (node:internal/errors:387:5)
    at throwExportsNotFound (node:internal/modules/esm/resolve:365:9)
    at packageExportsResolve (node:internal/modules/esm/resolve:589:7)
    at resolveExports (node:internal/modules/cjs/loader:522:36)
    at Function.Module._findPath (node:internal/modules/cjs/loader:562:31)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:971:27)
    at Function.resolve (node:internal/modules/cjs/helpers:109:19)
    at***Omitted***node_modules/vite-plugin-solid/dist/esm/index.mjs:53:35
    at Array.map (<anonymous>)
    at getSolidDeps (***Omitted***node_modules/vite-plugin-solid/dist/esm/index.mjs:48:21) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}

Your example is working well so I figures it's because of another vite plugins. I haven't check with react but I will later.
I'm using Windows 10 btw, haven't test it on Linux.

Ill have a look!

@Subwaytime thanks bro, tbh vite-aliases helping me big time for years before vite 3 came and ruin everything.
And thanks to your plugin, I had an idea to build yet-another-front-end starter kit using solidjs, will sponsor you next month.

Same here

Error Stack trace
X [ERROR] [plugin externalize-deps] Failed to resolve entry for package "vite-aliases". The package may have incorrect main/module/exports specified in its package.json: No known conditions
for "." entry in "vite-aliases" package

  node_modules/esbuild/lib/main.js:1327:27:
    1327 │         let result = await callback({
         ╵                            ^

  at packageEntryFailure (file:///C:/Jivy/exberry/app/trading-ui/node_modules/vite/dist/node/chunks/dep-4da11a5e.js:34841:11)
  at resolvePackageEntry (file:///C:/Jivy/exberry/app/trading-ui/node_modules/vite/dist/node/chunks/dep-4da11a5e.js:34836:9)
  at tryNodeResolve (file:///C:/Jivy/exberry/app/trading-ui/node_modules/vite/dist/node/chunks/dep-4da11a5e.js:34584:20)
  at file:///C:/Jivy/exberry/app/trading-ui/node_modules/vite/dist/node/chunks/dep-4da11a5e.js:63472:44
  at requestCallbacks.on-resolve (C:\Jivy\exberry\app\trading-ui\node_modules\esbuild\lib\main.js:1327:28)
  at handleRequest (C:\Jivy\exberry\app\trading-ui\node_modules\esbuild\lib\main.js:697:19)
  at handleIncomingPacket (C:\Jivy\exberry\app\trading-ui\node_modules\esbuild\lib\main.js:719:7)
  at Socket.readFromStdout (C:\Jivy\exberry\app\trading-ui\node_modules\esbuild\lib\main.js:647:7)
  at Socket.emit (node:events:513:28)
  at addChunk (node:internal/streams/readable:315:12)

This error came from the "onResolve" callback registered here:

  node_modules/esbuild/lib/main.js:1251:20:
    1251 │       let promise = setup({
         ╵                     ^

  at setup (file:///C:/Jivy/exberry/app/trading-ui/node_modules/vite/dist/node/chunks/dep-4da11a5e.js:63465:27)
  at handlePlugins (C:\Jivy\exberry\app\trading-ui\node_modules\esbuild\lib\main.js:1251:21)
  at buildOrServeImpl (C:\Jivy\exberry\app\trading-ui\node_modules\esbuild\lib\main.js:942:5)
  at Object.buildOrServe (C:\Jivy\exberry\app\trading-ui\node_modules\esbuild\lib\main.js:750:5)
  at C:\Jivy\exberry\app\trading-ui\node_modules\esbuild\lib\main.js:2085:17
  at new Promise (<anonymous>)
  at Object.build (C:\Jivy\exberry\app\trading-ui\node_modules\esbuild\lib\main.js:2084:14)
  at build (C:\Jivy\exberry\app\trading-ui\node_modules\esbuild\lib\main.js:1931:51)
  at bundleConfigFile (file:///C:/Jivy/exberry/app/trading-ui/node_modules/vite/dist/node/chunks/dep-4da11a5e.js:63432:26)

The plugin "externalize-deps" was triggered by this import

  vite.config.ts:3:28:
    3 │ import { ViteAliases } from 'vite-aliases';
      ╵                             ~~~~~~~~~~~~~~

failed to load config from C:\Jivy\exberry\app\trading-ui\vite.config.ts
error when starting dev server:
Error: Build failed with 1 error:
node_modules/esbuild/lib/main.js:1327:27: ERROR: [plugin: externalize-deps] Failed to resolve entry for package "vite-aliases". The package may have incorrect main/module/exports specified i
n its package.json: No known conditions for "." entry in "vite-aliases" package
  at failureErrorWithLog (C:\Jivy\exberry\app\trading-ui\node_modules\esbuild\lib\main.js:1566:15)
  at C:\Jivy\exberry\app\trading-ui\node_modules\esbuild\lib\main.js:1024:28
  at runOnEndCallbacks (C:\Jivy\exberry\app\trading-ui\node_modules\esbuild\lib\main.js:1438:61)
  at buildResponseToResult (C:\Jivy\exberry\app\trading-ui\node_modules\esbuild\lib\main.js:1022:7)
  at C:\Jivy\exberry\app\trading-ui\node_modules\esbuild\lib\main.js:1134:14
  at responseCallbacks.<computed> (C:\Jivy\exberry\app\trading-ui\node_modules\esbuild\lib\main.js:671:9)
  at handleIncomingPacket (C:\Jivy\exberry\app\trading-ui\node_modules\esbuild\lib\main.js:726:9)
  at Socket.readFromStdout (C:\Jivy\exberry\app\trading-ui\node_modules\esbuild\lib\main.js:647:7)
  at Socket.emit (node:events:513:28)
  at addChunk (node:internal/streams/readable:315:12)

Having this error too

@nichita-pasecinic these look like two different errors, so ill fix them seperately! Thanks for the report

@Subwaytime
Actually this might have anything to do with no type: module on their package.json.
@monarcode , @nichita-pasecinic do you have those ?

I will add this also to the readme file, as installation instructions. The ESM move should have been more clear! Sorry about that

@Subwaytime Actually this might have anything to do with no type: module on their package.json as I mentioned on my PR back then.
@monarcode , @nichita-pasecinic do you have those ? Because it will give those errors on your app when you don't have those as mentioned in #44 (comment)

i removed type: module when installed vite-aliases at first... this is how i get it to work normally..is that the issue?

@monarcode most probably, yes.

@Subwaytime , I don't have type defined in my package.json

try adding them, You use Vite 3 ? Because I don't think vite-aliases pasca 0.95 support Vite 2 anymore.

adding "type":"mofule" fixed the issue for me 👍🏽

@tsanyqudsi I'd better define the resolve config on my own, there is no much work done by vite-aliases in order to support the feature we all need. There is few simple steps to get aliases work without this dependency
tsconfig.json
{
  "compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "@/*": [
        "src/*"
      ],
      "@shared": [
        "./src/shared"
      ]
    }
  }
}

vite.config.ts
resolve: {
    // aliases should match the one defined in tsconfig.alias.json
    alias: [
      { find: '@', replacement: path.resolve(__dirname, 'src') },
      {
        find: '@shared',
        replacement: path.resolve(__dirname, 'src', 'shared'),
      }
    ],
  },

The only thing that remains to do is to sync your aliases in those two places!

@nichita-pasecinic i deleted the comment, as thats not part of the conversation. Vite-aliases is meant for bigger projects where having distinct aliases per folder is important for managing and organizing the code base. Having one alias is totally fine but it also just turns your aliases into an entire path.

yarn run v1.22.19
$ vite
✘ [ERROR] [plugin externalize-deps] Failed to resolve entry for package "vite-aliases". The package may have incorrect main/module/exports specified in its package.json: No known conditions for "." entry in "vite-aliases" package

    node_modules/vite/node_modules/esbuild/lib/main.js:1327:27:
      1327 │         let result = await callback({
           ╵                            ^
           ```

@thisVioletHydra This has already been reported upwards, you need to add "type":"module" to your package.json, as the latest version moved entirely to ESM.

its good solution but my postcss crashed if i set type: module 🙃

@thisVioletHydra do you have the error report for when your postcss crashed ?
Most probably it has nothing to do with vite-aliases but the implemenation of vite ( https://github.com/vitejs/vite/issues/10192 )

I will close this issue since it's need to be more specific and the discussion is widening.

@thisVioletHydra This has already been reported upwards, you need to add "type":"module" to your package.json, as the latest version moved entirely to ESM.

yes,it's useful


Move "Framework-provided services" from "Dependency injection" to ".NET Generic Host"

The Framework-provided services section should be moved to the .NET Generic Host page since Host and ConfigureServices is not really part of Dependency Injection.
The "Framework-provided services" section would be more useful in the context of .NET Generic Host.
The examples for dependency injection should not use Microsoft.Extensions.Hosting, IMHO.
Hosting is built on top of DI, documents for DI should assume readers have no knowledge of Hosting.
Example for how to combine DI, Logging and Configuration by using HostBuilder would be better suited for the .NET Generic Host page.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 8fd55089-b683-2202-6641-c7b61a132f14
Version Independent ID: cc5f00d0-fb50-1229-8fa2-e66b1f45b284
Content: Dependency injection in .NET
Content Source: docs/core/extensions/dependency-injection.md
Product: dotnet-fundamentals
GitHub Login: @IEvangelist
Microsoft Alias: dapine

Hi again @Genteure
Thanks for posting this issue.
After reading through it a few times, I'm not sure that I agree entirely. I do think that there is potential for the Generic Host article to be updated with some of the bits from the DI article, but I believe that the DI article is perfectly fine to rely on the HostBuilder. Console applications in .NET are best suited when using a hosting solution, without it there isn't an instance of an IServiceCollection and corresponding IServiceProvider. This comes for free with the HostBuilder. We have decided that is the best way to provide DI details in our docs. Since we're building out content for .NET, we prefer to rely on the existing infrastructure in place rather than building out too much conceptual articles. One could argue that discussing DI philosophically would be advantageous, but I think we really just need a bit more cross-linking between the two articles. Does that make sense?

Hi again @Genteure
Thanks for posting this issue.
After reading through it a few times, I'm not sure that I agree entirely. I do think that there is potential for the Generic Host article to be updated with some of the bits from the DI article, but I believe that the DI article is perfectly fine to rely on the HostBuilder. Console applications in .NET are best suited when using a hosting solution, without it there isn't an instance of an IServiceCollection and corresponding IServiceProvider. This comes for free with the HostBuilder. We have decided that is the best way to provide DI details in our docs. Since we're building out content for .NET, we prefer to rely on the existing infrastructure in place rather than building out too much conceptual articles. One could argue that discussing DI philosophically would be advantageous, but I think we really just need a bit more cross-linking between the two articles. Does that make sense?

TLDR: Avoid "circular dependency documents", provides a starting point without too much noise.

Some backstory:
My experience with learning ASP.NET Core was ..."confusing"?
Microsoft does a great job with documentations, but sometimes documents for A mentions B and documents for B mentions A.
It was really hard to understand the full picture without being familiar with all of them in the first place.
I usually end up with 100~ browser tabs open, with 5 tabs of A, 3 tabs of B, 7 tabs of C...
I can find what I need pretty fast after working with ASP.NET Core for sometime, and have no problem understanding, but it was really really hard to begin with.
My personal opinion is to avoid "circular dependency documents" as much as possible.
Documents for something at the bottom of the stack shouldn't contain things from above.

This comes for free with the HostBuilder.

It also come with logging and configurations. That is unnecessary for someone to use or understand DI.
This also reminded me when I was exploring Identity, I went as far as looking up source codes trying to figure out how to disable the included UI.
It's integrated seamlessly, easy to setup, easy to use until someone try to disable part of it. A bit off topic, and my memory might be off about this.
I like that DependencyInjection, Logging, and Options is separated and flexible, I think documentations for those should also be "separated" and flexible.

Console applications in .NET are best suited when using a hosting solution, without it there isn't an instance of an IServiceCollection and corresponding IServiceProvider. This comes for free with the HostBuilder.

I agree partially.
There are times that HostBuilder is not really needed or can be used, or it is not a console application at all.
As a example, the project I'm working on is a WPF desktop application, with core logic in a .NET Standard project so it could be ported to console, moving away from Autofac because I don't need the features.
It has logging and configuration systems already in place. I might change the logging to Microsoft.Extensions.Logging but that's for another day.
using Microsoft.Extensions.DependencyInjection;
var services = new ServiceCollection();

Works perfectly fine.
Developers will be able to copy and run the code, it will not be conceptual only.

One could argue that discussing DI philosophically would be advantageous

That's not the point I'm trying to make. It could use some philosophy. But for me personally, I just want to know about Microsoft.Extensions.DependencyInjection and only Microsoft.Extensions.DependencyInjection.

I think we really just need a bit more cross-linking between the two articles.

I agree, but not too much. Dependency Injection should remains Dependency Injection.
Again that's my personal opinion ;)

TLDR: Avoid "circular dependency documents", provides a starting point without too much noise.

Some backstory:
My experience with learning ASP.NET Core was ..."confusing"?
Microsoft does a great job with documentations, but sometimes documents for A mentions B and documents for B mentions A.
It was really hard to understand the full picture without being familiar with all of them in the first place.
I usually end up with 100~ browser tabs open, with 5 tabs of A, 3 tabs of B, 7 tabs of C...
I can find what I need pretty fast after working with ASP.NET Core for sometime, and have no problem understanding, but it was really really hard to begin with.
My personal opinion is to avoid "circular dependency documents" as much as possible.
Documents for something at the bottom of the stack shouldn't contain things from above.

This comes for free with the HostBuilder.

It also come with logging and configurations. That is unnecessary for someone to use or understand DI.
This also reminded me when I was exploring Identity, I went as far as looking up source codes trying to figure out how to disable the included UI.
It's integrated seamlessly, easy to setup, easy to use until someone try to disable part of it. A bit off topic, and my memory might be off about this.
I like that DependencyInjection, Logging, and Options is separated and flexible, I think documentations for those should also be "separated" and flexible.

Console applications in .NET are best suited when using a hosting solution, without it there isn't an instance of an IServiceCollection and corresponding IServiceProvider. This comes for free with the HostBuilder.

I agree partially.
There are times that HostBuilder is not really needed or can be used, or it is not a console application at all.
As a example, the project I'm working on is a WPF desktop application, with core logic in a .NET Standard project so it could be ported to console, moving away from Autofac because I don't need the features.
It has logging and configuration systems already in place. I might change the logging to Microsoft.Extensions.Logging but that's for another day.
using Microsoft.Extensions.DependencyInjection;
var services = new ServiceCollection();

Works perfectly fine.
Developers will be able to copy and run the code, it will not be conceptual only.

One could argue that discussing DI philosophically would be advantageous

That's not the point I'm trying to make. It could use some philosophy. But for me personally, I just want to know about Microsoft.Extensions.DependencyInjection and only Microsoft.Extensions.DependencyInjection.

I think we really just need a bit more cross-linking between the two articles.

I agree, but not too much. Dependency Injection should remains Dependency Injection.
Again that's my personal opinion ;)

To further clarify:

but sometimes documents for A mentions B and documents for B mentions A.

What I meant is documents for B depends on A in some way.
Some link for how to use B with A in a harmonious, integrated way would really help, after someone understand how B works in standalone.

To further clarify:

but sometimes documents for A mentions B and documents for B mentions A.

What I meant is documents for B depends on A in some way.
Some link for how to use B with A in a harmonious, integrated way would really help, after someone understand how B works in standalone.


[feat|sde-backend] : First draft new policies changes

Description
Added

Draft code changes of Policies.

Pre-review checks
Please ensure to do as many of the following checks as possible, before asking for committer review:

[x] DEPENDENCIES are up-to-date. Dash license tool. Committers can open IP issues for restricted libs.
[x] Copyright and license header are present on all affected files

@ChetanT-System please update copy right in existing file which has been modified

Updated Please check again

merge after #86

Please have a look at all copyright header year formats and adjust them same as with previous PRs. Also apply these for your future PRs as well.

@almadigabor  I have updated all copy rights issues of PR #87. Once PR #87 merge then only I can resolve the conflict issue of copy right header. same updated for Next PR. Please review and merge this PR.


[Bug]: Cannot use passwords in environment for mongodb connections

Apache Hop version?
SNAPSHOT-20230206
Java version?
11.0.18
Operating system
Docker
What happened?
./hop-encrypt.sh -hop password
# Returns Encrypted 2be98afc86aa7f2e4bb18bd63c99dbdde

Create an environment DEV, with variable "MONGODB_PASSWORD" and value "Encrypted 2be98afc86aa7f2e4bb18bd63c99dbdde"
Create a connection to a MongoDB instance using this variable ${MONGODB_PASSWORD} in the password field.
Launch a pipeline using the connection, see that the pipeline does not work, authentication failed.
I have also tried putting unencrypted password in the environment.
It seems like the mechanism to use passwords in mongodb is not the same as relational databases, because in those the functionality of encrypted passwords inside environments is working (I did not tri unencrypted passwords for those).
Issue Priority
Priority: 3
Issue Component
Component: Transforms

My bad, relaunching the project did the trick.

Edit: unencrypted passwords in environment work. But encrypted passwords do not.

.take-issue


ERROR: Read resource response is null for resource google_storage_bucket_iam_member.tfer*

Running terraformer plan google --resources=cloudsql,gcs,iam,instances I receive
2021/05/17 16:08:48 ERROR: Read resource response is null for resource google_storage_bucket_iam_member.tfer--xxx-002D-rfq-002D-sql-002D-dumps
2021/05/17 16:10:18 ERROR: Unable to refresh resource tfer--xxx-002D-sql-002D-dumps

(x-ed out some details)
I have no idea what that means ;)
(I guess tfer is short for terraformer? But there is no such member.)
version v0.8.13
Provider: google

I am struggling with this too, is there any solution?


Can‘t use in Safari 13 (macOS Mojave and Catalina)

Version

[ ] Version 1
[ ] Version 2

My Problem
Can‘t use in Safari 13(macOS catalina)

@mrdragonma can you provide any more details?
Did you try building it using the Safari 12 steps? Any error messages or stack traces?

Btw, I'm working on a build for Safari 13 + Catalina to help solve this.

@mrdragonma can you provide any more details?
Did you try building it using the Safari 12 steps? Any error messages or stack traces?

I build it using Safari 12 steps. When the empty box GUI appear,the Safari's extensions don't have vimari. As far as I know, the extension policy has changed in Safari 13 for security. You can notice it.

@nchase
I build it using Safari 12 steps. When the empty box GUI appear,the Safari's extensions don't have vimari. As far as I know, the extension policy has changed in Safari 13 for security. You can notice it.

Any updates for Safari 13? Thanks!

Follow along with https://github.com/televator-apps/vimari/issues/139. The app is currently waiting for review.

@mrdragonma can you try https://github.com/televator-apps/vimari/releases/tag/v2.0.2 and let me know if that version works for you?

@mrdragonma can you try https://github.com/televator-apps/vimari/releases/tag/v2.0.2 and let me know if that version works for you?

I'm using Safari 13.0 (14608.1.49) with macOS 10.14.6 (18G95) .
Navigation between tabs and closing tabs not working. Others seems working great.

Navigation between tabs and closing tabs not working.

That's because the tab navigation and tab closing is still using the old Safari extension functions. (Which no longer exist/work)
Example: https://github.com/televator-apps/vimari/blob/c9dfd59cd0d5305ef7d9e0f73ec11b7648ef7aff/Vimari Extension/js/injected.js#L39-L40
safari.self.tab.dispatchMessage no longer exists. With Safari's new extension model you have to dispatch the message to the extension's Swift/app context and handle it there.
And to make matters more fun the new extension model doesn't support changing and closing tabs. (Unless things have changed since I last looked)
If there is no better way to do tabs I posted a way to do it in an old issue: https://github.com/televator-apps/vimari/issues/103#issuecomment-414159407 (2nd part)
Also @danielcompton https://github.com/televator-apps/vimari/blob/master/Vimari Extension/js/global.js isn't used at all as far as I can tell. Not sure if you're keeping it around for a reason, pretty much all of it is using the old extension API.

And to make matters more fun the new extension model doesn't support changing and closing tabs. (Unless things have changed since I last looked)

Thankfully they have changed, though I'm not sure in which version of SafariServices, which makes feature detection tricky. I've pushed 1b787b5649bcbb7355805428e220917c5dc67fd5 which implements changing tabs. I'll do closing tabs in a little bit.

Not sure if you're keeping it around for a reason, pretty much all of it is using the old extension API.

Mostly just for reference while I translate things over. I'll remove it once everything is implemented in the new model.

I think this is resolved now.


Fix: Sapp confirmTXs modal width.

Travis automatic deployment:
https://pr1072--safereact.review.gnosisdev.com/app

Travis automatic deployment:
https://pr1072--safereact.review.gnosisdev.com/app

Travis automatic deployment:
https://pr1072--safereact.review.gnosisdev.com/app

Looks good to me.
Checked on Chrome, Firefox and Opera


Why I cannot download youtube in Windows10?

PS C:\Users\chris> annie https://www.youtube.com/watch?v=iv-8-EgPEY0
{"level":"debug","time":"2021-05-15T13:46:15+08:00","message":"Unable to extract json from default url, trying embedded url"}
Downloading https://www.youtube.com/watch?v=iv-8-EgPEY0 error:
Error extracting sts from embedded url response

Or
PS C:\Users\chris> annie "https://www.youtube.com/watch?v=iv-8-EgPEY0"
{"level":"debug","time":"2021-05-15T13:45:30+08:00","message":"Unable to extract json from default url, trying embedded url"}
Downloading https://www.youtube.com/watch?v=iv-8-EgPEY0 error:
Error extracting sts from embedded url response

What's wrong?

"Youtube made a few changes to video pages and so annie youtube extractor does not work anymore."
view #839.

"Youtube made a few changes to video pages and so annie youtube extractor does not work anymore."
view #839.

ths


Some of the returned values are performance dependant - stddev

This one is more complex as change. stdDev value in histogram depends on how fast values are added to the histogram on the server. In order to reuse existing expected values and filter the value that is not always the same, I've had to implement some parsing before comparing the returned string with expected string.
In case you don't like it I'm open for suggestions.

Hi @doychin.
Thanks for the PR.
Can you please resolve the conflict?

Conflict was introduced by commit https://github.com/apache/tomee/commit/e7e80823b6014eb2e2a45d25234a5b661eeed8b1
This commit also contains the fix I propose in #347.

Ok. If the fix is already in, probably you can close this PR.

No. Only the fix for PR #347 is in. The problem with that commit is that it changes 2 files. One that introduces the conflict and that change is not OK. The test will fail again on next run.
The other is the same fix I propose in #347.
If you can revert that commit then you should be able to apply both PR #347 and this (#349)

I've rebased and fix the conflict. Should be ok now. Thank you @doychin


Appstudio update test-component-pac-issn

Pipelines as Code configuration proposal

Pipelines as Code CI/test-component-pac-issn-on-pull-request has successfully validated your commit.

StatusDurationName

✅ Succeeded
9 seconds
init

✅ Succeeded
15 seconds
clone-repository

✅ Succeeded
38 seconds
build-container

✅ Succeeded
19 seconds
sanity-inspect-image

✅ Succeeded
22 seconds
deprecated-base-image-check

✅ Succeeded
3 minutes
clair-scan

✅ Succeeded
2 minutes
clamav-scan

✅ Succeeded
18 seconds
sbom-json-check

✅ Succeeded
8 seconds
sanity-optional-label-check

✅ Succeeded
7 seconds
sanity-label-check

✅ Succeeded
12 seconds
show-summary

Pipelines as Code CI/test-component-pac-issn-on-pull-request has successfully validated your commit.

StatusDurationName

✅ Succeeded
5 seconds
init

✅ Succeeded
12 seconds
clone-repository

✅ Succeeded
33 seconds
build-container

✅ Succeeded
1 minute
clamav-scan

✅ Succeeded
12 seconds
deprecated-base-image-check

✅ Succeeded
10 seconds
sanity-inspect-image

✅ Succeeded
8 seconds
clair-scan

✅ Succeeded
8 seconds
sbom-json-check

✅ Succeeded
5 seconds
sanity-optional-label-check

✅ Succeeded
5 seconds
sanity-label-check

✅ Succeeded
6 seconds
show-summary

Pipelines as Code CI/test-component-pac-issn-on-pull-request has successfully validated your commit.

StatusDurationName

✅ Succeeded
5 seconds
init

✅ Succeeded
12 seconds
clone-repository

✅ Succeeded
33 seconds
build-container

✅ Succeeded
1 minute
clamav-scan

✅ Succeeded
12 seconds
deprecated-base-image-check

✅ Succeeded
10 seconds
sanity-inspect-image

✅ Succeeded
8 seconds
clair-scan

✅ Succeeded
8 seconds
sbom-json-check

✅ Succeeded
5 seconds
sanity-optional-label-check

✅ Succeeded
5 seconds
sanity-label-check

✅ Succeeded
6 seconds
show-summary


Latex Inside Python Code

Hello, everyone. This package is great for rendering Python code inside LaTeX. However, I want to be able to insert LaTeX inside the Python code (this has to do with inserting Unicode characters inside (emojis), and I need to stick with pdfLatex, not LuaLatex or XeLaTeX_. How can I go about this?

This works fine with XeLaTeX


Media recording directly in browser

Would like to be able to have Nunaliit users record audio/video directly in the browser as an optional alternative to choosing a file for upload.
This site documents a bunch of libraries and demos of recording media in the browser using WebRTC/MediaRecorder APIs.
https://www.webrtc-experiment.com/

This is an interesting example of streaming the audio to the server as it is recording. It may be better than trying to capture the whole thing on the client and sending it in a big blob while the user waits afterwards.

Interesting problem. The WebRTC site offers a great example of this tech at https://www.webrtc-experiment.com/RecordRTC/ . I like this example because it allows the user to define the type of recording session (audio, audio+video, etc) as well as defining which hardware to use for recording, and prompting the user for permission to access the hardware. I also like the idea of either saving the file to disk or directly to the atlas db.
Since I suspect this tech will likely be a modification of the existing upload file option we use for our schema docs. Should we create a new option for schemas that creates an audio recording button which opens a ui window with the options described above? Or is this approach too narrow in scope and should be extended to be a new atlas tool page which allows users to record new media content which can be attached to existing docs, after the fact?

I think we need a new "File" widget that allows for selecting or drag&dropping a file or recording a new file (audio only or video with audio) directly in the browser.
For audio only recordings, PCM/WAV data created by the browser should be compressed to MP3 on the client side before sending.  This library seems to be the best available code for that: https://github.com/zhuker/lamejs


Throw exception if no snapshot is found and check for TNSSnapshot.blob

Currently, if there is no snapshot found when there should be, no exception is thrown and the runtime crashes at a later point. With no exception thrown, diagnosing where the issue is, becomes a little bit harder having to check the APK or even debug it.
This PR introduces an exception throw when no snapshot is found and also introduces a check for TNSSnapshot.blob removing the need for the CLI team to rename the TNSSnapshot.blob to snapshot.blob.

test --android-runtime-tests

test --android-runtime-tests


[BUG] prediction module loads the profiler output twice

Describe the bug
After adding a new folder raw_metrics/app_id under rapids_4_spark_qualification_output, it looks like there is something broken in
            # search profile sub directories for appIds
            app_ids = find_paths(
                prof, RegexPattern.app_id.match, return_directories=True
            )

Because this means that we return the directory twice. Once under Qualification and once under Profiler
Another problematic issue in the code is that the prediction module would not find any think to load despite there is output generated by the core tools.
    for dataset, input_df in processed_dfs.items():
        if not input_df.empty:
            # ...
        else:
             logger.warning('Nothing to predict for dataset %s', dataset)

2024-06-04 22:25:07,738 WARNING spark_rapids_tools.tools.model_xgboost: Nothing to predict for dataset qual_20240605032442_CD14eAde

This has been resolved in https://github.com/NVIDIA/spark-rapids-tools/pull/1076


⚠ Bofrost.es has degraded performance

In 736a16b, Bofrost.es (https://www.bofrost.es) experienced degraded performance:

HTTP code: 200
Response time: 1579 ms

Resolved: Bofrost.es performance has improved in ec67071 after 6 minutes.


Modelled 2200114 - Whiskers Creek - campground roads

Comments mention - "There are four bridges in total within 200m, with 2 inventoried. Other two bridges should be added to bcfishpass.  "
Can close once complete.

Closed via PR #419


Make terms of use and deposit agreement editable in the UI

Fixes #405, #406
@projecthydra-labs/hyrax-code-reviewers

@jcoyne I added a new safeguard to prevent sending messages to ContentBlock that aren't white-listed. Ready for re-review.

@cbeer @jcoyne OK, ready for another round of review.

@jcoyne Needs review. (Maybe the stale review dismissal feature isn't the best.)


fix formatting, run typescript tests on staging

Codecov Report
Base: 42.22% // Head: 56.02% // Increases project coverage by +13.80% :tada:

Coverage data is based on head (5966296) compared to base (3a53441).
 Consider uploading reports for the commit e1509bc to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1149       +/-   ##
===========================================
+ Coverage   42.22%   56.02%   +13.80%
===========================================
  Files          14       17        +3
  Lines        1035      539      -496
===========================================
- Hits          437      302      -135
+ Misses        512      237      -275
+ Partials       86        0       -86

Impacted Files
Coverage Δ

dotnet/Trinsic/AccountService.cs
50.00% <ø> (ø)

dotnet/Trinsic/CredentialService.cs
44.11% <ø> (ø)

dotnet/Trinsic/ProviderService.cs
36.70% <ø> (ø)

dotnet/Trinsic/TemplateService.cs
42.85% <ø> (ø)

dotnet/Trinsic/TrustRegistryService.cs
51.35% <ø> (ø)

dotnet/Trinsic/WalletService.cs
36.36% <ø> (ø)

go/services/services.go

go/services/service_base.go

go/services/storage.go

go/services/template_service.go

... and 27 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


13-09-24: Add MoJ Design components

adding in MOJ frontend components

Not working on it at this point of time.


Upgrading from docker 1.7.0 to 1.7.1 loses images?

This is on Ubuntu 14.04.2 LTS. I did an upgrade and post upgrade the images are all gone:
$ docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
cat /etc/default/docker
DOCKER_OPTS="-g /home/docker --iptables=false"
It looks to me that perhaps the storage driver changed during the upgrade? On an un-upgraded host I see:
$ docker info
Containers: 11
Images: 124
Storage Driver: vfs
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 3.14.32-xxxx-grs-ipv6-64
Operating System: Ubuntu 14.04.2 LTS
CPUs: 8
Total Memory: 62.94 GiB
Name: XXXXX
ID: FOD4:IYDO:Q2VL:JLRC:PPTI:AT57:7SSF:QBCU:UW3A:4Y26:WYO2:JOGK

On an upgraded host I see:
docker info
Containers: 0
Images: 0
Storage Driver: devicemapper
 Pool Name: docker-9:2-4718673-pool
 Pool Blocksize: 65.54 kB
 Backing Filesystem: extfs
 Data file: /dev/loop0
 Metadata file: /dev/loop1
 Data Space Used: 305.7 MB
 Data Space Total: 107.4 GB
 Data Space Available: 107.1 GB
 Metadata Space Used: 733.2 kB
 Metadata Space Total: 2.147 GB
 Metadata Space Available: 2.147 GB
 Udev Sync Supported: false
 Deferred Removal Enabled: false
 Data loop file: /home/docker/devicemapper/devicemapper/data
 Metadata loop file: /home/docker/devicemapper/devicemapper/metadata
 Library Version: 1.02.82-git (2013-10-04)
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 3.14.32-xxxx-grs-ipv6-64
Operating System: Ubuntu 14.04.2 LTS
CPUs: 8
Total Memory: 62.94 GiB
Name: XXXXXX
ID: 2OIX:UCYC:HCLE:R5DA:F2DG:CSTQ:6PIL:BXOU:LZQK:4VAM:WKMP:UXUP

Hi!
Please read this important information about creating issues.
If you are reporting a new issue, make sure that we do not have any duplicates already open. You can ensure this by searching the issue list for this repository. If there is a duplicate, please close your issue and add a comment to the existing issue instead.
If you suspect your issue is a bug, please edit your issue description to include the BUG REPORT INFORMATION shown below. If you fail to provide this information within 7 days, we cannot debug your issue and will close it. We will, however, reopen it if you later provide the information.
This is an automated, informational response.
Thank you.
For more information about reporting issues, see https://github.com/docker/docker/blob/master/CONTRIBUTING.md#reporting-other-issues

BUG REPORT INFORMATION
Use the commands below to provide key information from your environment:
docker version:
docker info:
uname -a:
Provide additional environment details (AWS, VirtualBox, physical, etc.):
List the steps to reproduce the issue:
1.
2.
3.
Describe the results you received:
Describe the results you expected:
Provide additional info you think is important:
----------END REPORT ---------
#ENEEDMOREINFO

This is because on 1.7.0 you were using the vfs graphdriver.
When you upgraded to 1.7.1 the devicemapper driver became available, and as such was used as vfs should never really be used unless nothing else is supporter of it was specified in the daemon startup.
With 1.7.0 there were some configurations which docker refused to run devicemapper with, these restrictions were relaxed a bit in 1.7.1.

This was suprising and should have been mentioned in the release notes.

From Changelog:

Fix implicit devicemapper selection with static binaries

Ah, very descriptive and informative!

@newhook Your images are not gone.
If you want to access your old images you can start docker with -s vfs and they will be available.


Trim aspnet package referenced individually

This needs some design/exploration.
The current trimming mechanism relies on both the property MicrosoftNETPlatformLibrary being set and he package to trim being in the restore graph. This means that all apps referencing individual packages must also reference Microsoft.AspNetCore.App or Microsoft.AspNetCore.All if they want their output trimmed which may defeat the purpose of referencing the individual packages in the first place.
I see two ways around this:

We change the trimming mechanism to not rely on the restore graph of the project to figure out which binaries can be trimmed. This will need to be a change in the dotnet sdk, so not sure how feasible this is for 2.1.
As suggested by @davidfowl, we could add an implicit reference to the aspnet metapackages and exclude them from compile/build/intellisense, at which point they only exist in the restore graph and is only used for trimming.

Note that for the second approach, we will need to think about when/where to add the implicit reference. Do we update the SDK to add this reference like they do for NETCore.App? Do we add this reference for all apps or condition this so that the reference is only added when referencing aspnet packages?
cc @DamianEdwards @Eilon @muratg

We didn't talk about this one today either.

Do we need another design meeting?

Might not hurt

Tracking work in https://github.com/aspnet/Universe/issues/967

@JunTaoLuo This one's dev branch only, right?

Right, this will be post 2.1.

@DamianEdwards @natemcmaster is this something we still want to explore?

I think at this point we're not trying to change much about the 2.2 metapackage/sharedfx implementation. We're overhauling this in 3.0 anyways, so it's IMO it's probably not worth investing much in new assembly trimming strategies for 2.2.

👍 wanted to double check before closing.


serdes : dataflow

need to be able to serialize and deserialize dataflow graphs

done.
https://github.com/tweakoz/orkid/commit/40b0950b9312e5e91ec2828f25c617e0fd8d6978


Renamed callContractMethod to call for ReadOperation

Summary of Changes
Fixes #727
Test Data or Screenshots
Local and remote tests runs correctly locally
By submitting this pull request, you are confirming the following:

I have reviewed the Contribution Guidelines.
I have performed a self-review of my own code.
I have updated my repository to match the develop branch.
I have included test data or screenshots that prove my fix is effective or that my feature works.
I have checked that all tests work and swiftlint is not throwing any errors/warnings.

@albertopeam I've changed the target branch to develop-4.0. It just wasn't up to date.


Upgrade to Dart 2.0.0

cc @kevmoo @kwalrath

Problems in the bowels of our dependencies to sort through.
~/dart/dart-services
$ pub get
Resolving dependencies... (1.5s)
The current Dart SDK version is 2.0.0.

Because no versions of rpc match >0.6.0-dev.1 and rpc 0.6.0-dev.1 depends on gcloud >=0.2.0+12 <0.6.0, rpc >=0.6.0-dev.1 requires gcloud >=0.2.0+12
  <0.6.0.
So, because gcloud >=0.1.0 <=0.6.0 requires SDK version >=1.5.0 <2.0.0 or >=2.0.0-dev.54.0 <2.0.0 and dart_services depends on rpc >=0.6.0-dev.1,
  version solving failed.

@kevmoo helped with that one in dart-lang/rpc#131 but there's more to knock out.
~/dart/dart-services
$ pub get
Resolving dependencies... (1.5s)
The current Dart SDK version is 2.0.0.

Because appengine >=0.4.4+1 depends on gcloud ^0.5.0 and appengine >=0.2.0
  <=0.4.4 requires SDK version >=1.5.0 <2.0.0, appengine >=0.2.0 requires gcloud
  ^0.5.0.
Because gcloud 0.5.0 requires SDK version >=2.0.0-dev.54.0 <2.0.0 and no
  versions of gcloud match >0.5.0 <0.6.0, gcloud ^0.5.0 is forbidden.
Thus, appengine >=0.2.0 is forbidden.
So, because dart_services depends on appengine >=0.4.0, version solving
  failed.

We likely need to get Martin Kusterman involved w/ reviews to pkg:appengine
– but you could get a PR going
On Tue, Aug 7, 2018 at 1:35 PM Janice Collins<EMAIL_ADDRESS>wrote:

@kevmoo https://github.com/kevmoo helped with that one in
dart-lang/rpc#131 https://github.com/dart-lang/rpc/pull/131 but there's
more to knock out.
~/dart/dart-services
$ pub get
Resolving dependencies... (1.5s)
The current Dart SDK version is 2.0.0.
Because appengine >=0.4.4+1 depends on gcloud ^0.5.0 and appengine >=0.2.0
<=0.4.4 requires SDK version >=1.5.0 <2.0.0, appengine >=0.2.0 requires gcloud
^0.5.0.
Because gcloud 0.5.0 requires SDK version >=2.0.0-dev.54.0 <2.0.0 and no
versions of gcloud match >0.5.0 <0.6.0, gcloud ^0.5.0 is forbidden.
Thus, appengine >=0.2.0 is forbidden.
So, because dart_services depends on appengine >=0.4.0, version solving
failed.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/dart-lang/dart-pad/issues/845#issuecomment-411193242,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABCioYi1cMjHVT2bFZGAKV66dtgHFkPks5uOfoQgaJpZM4Vwp2v
.

yeah.  it's not going to be completely trivial.  gcloud breaking changes impact this

:-/
On Tue, Aug 7, 2018 at 2:02 PM Janice Collins<EMAIL_ADDRESS>wrote:

yeah. it's not going to be completely trivial. gcloud breaking changes
impact this
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/dart-lang/dart-pad/issues/845#issuecomment-411201499,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABCilFtw_zNcIey_gFr_KQlHbmtbepoks5uOgBqgaJpZM4Vwp2v
.

another package protobuf has problems that are fixed, but not published.  https://github.com/dart-lang/protobuf/pull/117

The appengine package also has problems, but I'm part-way through a fix.  https://github.com/dart-lang/appengine/issues/80

Protobuf problems are fixed and published.  Appengine has a fix (dart-lang/appengine#81), and I've got test versions of dart-services and dart-pad that work with 2.0 now.

#846 for the front-end

Remaining blockers are gone with the recent appengine publish; when the backend change at dart-lang/dart-services#350 lands and is deployed we can close this out.  Hoping to do this Monday.

Great! Can you let us know once it is live?

will do.

2.0.0 stable is now live, will monitor closely for a while for problems in case we need to revert.  But if you hear nothing else back on this issue, you can assume we're good.


Multiple users have requested a tagging system to filter the OAR by groups of contributors specific to their interest

Overview
Multiple users have requested an additional tag to enable them to filter their searches of the OAR by groups of users specific to their interest.
Is your feature request related to a problem? Please describe.
Certain user groups would like to be able to see at a glance which contributors to the OAR fall within their scope of interest.
Examples include:

Membership bodies, such as the German Partnership for Sustainable Textiles, whose members include brands, NGOs, certifying schemes etc
Retailers such as Zalando who would like to see all of the Zalando brands on the OAR through one quick search

Describe the solution you'd like

A tag / filter mechanism for certain users to filter searches by their specific needs.

Additional Context
Users requesting this would be prepared to pay for the development of these additional filters.

Noting here that I received an additional request for a tagging mechanism from a brand which would like to tag the sub-brands within its group on the OAR

https://django-taggit.readthedocs.io/en/latest/ is a popular, generic tagging library for Django


Refactor autoderef/method resolution

don't return the receiver type from method resolution; instead just
return the autorefs/autoderefs that happened and repeat them. This
ensures all the effects like trait obligations and whatever we learned
about type variables from derefing them are actually applied. Also, it
allows us to get rid of decanonicalize_ty, which was just wrong in
principle.

Autoderef itself now directly works with an inference table. Sadly
this has the effect of making it harder to use as an iterator, often
requiring manual while let loops. (rustc works around this by using
inner mutability in the inference context, so that things like unifying
types don't require a unique reference.)

We now record the adjustments (autoref/deref) for method receivers
and index expressions, which we didn't before.

Removed the redundant crate parameter from method resolution, since
the trait_env contains the crate as well.

in the HIR API, the methods now take a scope to determine the trait env.
Type carries a trait env, but I think that's probably a bad decision
because it's easy to create it with the wrong env, e.g. by using
Adt::ty. This mostly didn't matter so far because
iterate_method_candidates took a crate parameter and ignored
self.krate, but the trait env would still have been wrong in those
cases, which I think would give some wrong results in some edge cases.

Fixes #10058.

bors r+

As seen in the metrics:


New Blocktype that allows you to type up answers

Is it possible to create a new Blocktype that let you type the answers. After you click the card, the answer shows up and you can correct what you have typed with the correct answer.

A spelling area has been added to the original blocktype-card


Component Testing Framework

Description

This PR creates a new feature to test individual components as code is refactored. This testing framework consists of a driver, utility python script, and a run script. The latter gets a subset of the grid if requested, calls the driver, and calculates differences between states captured from GEOS and the driver's results. Changes were also made within current MAPL files to allow for capturing of states and restoring export variables.

Motivation and Context

This testing framework allows for data within fields in individual components to be verified as code is refactored and/or changed.
How Has This Been Tested?

This was tested with Sea Salt, Nitrate, Dust, and Gravity Wave Drag components at different phases, with and without subsetting the restart states.
Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Trivial change (affects only documentation or cleanup)

Checklist:

[ ] I have tested this change with a run of GEOSgcm (if non-trivial)
[ ] I have added one of the required labels (0 diff, 0 diff trivial, 0 diff structural, non 0-diff)
[x] I have updated the CHANGELOG.md accordingly following the style of Keep a Changelog

The testing framework seems to be working fine after rebasing. I just tested it quickly with Nitrates.


Can TrapTagger export bounding boxes?

Congrats on what could be the best platform for processing CT images out there. I have asked to register and cannot wait to try it.
I was wondering whether TrapTagger is able to export the bounding boxes that MD generates, and whether it can export into formats such as COCO CT or Camtrap DP

Since Val and I communicated directly over email, I never got around to responding here. Historically, TrapTagger did not support the export of bounding boxes simply due to the fact that nobody had asked for that feature.
I have now added both a dedicated COCO export, along with the ability to export bounding boxes in the csv generator.


feat(connectors): moved vault credentials config files

Description
Changed the default location of connector vault credentials config files to secrets/vault.
Verification Steps
CI should pass with existing unit tests.
Checklist (Definition of Done)

[X] All acceptance criteria specified in JIRA have been completed
- [ ] Unit and integration tests added that prove the fix is effective or the feature works (tested against emulated and non-emulated OCM environment)
- [ ] Documentation added for the feature
[x] CI and all relevant tests are passing
[ ] Code Review completed
[ ] Verified independently by reviewer
[ ] All PR comments are resolved either by addressing them or creating follow up tasks
- [ ] Required metrics/dashboards/alerts have been added (or PR created).
- [ ] Required Standard Operating Procedure (SOP) is added.
- [ ] JIRA has been created for changes required on the client side

@valdar can you review? It's basically making the code default values the same as the values in config for sre vault service config from https://github.com/bf2fc6cc711aee1a0c2a/cos-fleet-manager/pull/189

@valdar can you review this PR too?


Create aur folder for PKGBUILDS

As of right now, there's only the hyprland-git package, but once Hyprland gets a release tag, there will probably also be hyprland and hyprland-bin packages made.

lgtm, thank you


Add Google Search Engine Clone

I'm a GSSo'C 22 contributor, I love this cloning project & I want to add Google Search Engine Clone, Please assign me this issue tomorrow so I will work on it

Can I work on this under GSSoC 22

I too want to work on this issue @Rayman-Sodhi will you please assign it to me

Hi  @gurjeetsinghvirdee     you can work on this issue ur project should have a working link and you should add that in the main website too once done with creating it .
Deadline -  5-6 days

Ok sure I will complete in 2-3 days 🧡

@Rayman-Sodhi https://github.com/khushi-purwar/WebDev-ProjectKart/issues/403


feat: support for object, interface and input type extensions

Addresses https://github.com/typed-graphql-builder/typed-graphql-builder/issues/25
I'm not entirely sure about the API
Option 1: Extra files
typed-graphql-builder --schema schemafile.gql --schemaExtensions ext1.gql --schemaExtensions ext2.gql ...

Cons: tedious to specify if lots of files. Apollo seems to recommend a separation of concerns strategy which could lead to many files scattered throughout a project.
Option 2: Option 1 + globs
Cons: need extra logic to auto-exclude original schema from globs
Option 3: (works in the PR): stdin
Simply concatenate all your gql files and pass them to the tool :sweat_smile:
cat src/**/*.gql | npx typed-grapql-builder --schema - --output - > api.ts

cons: could this cause syntax errors?

Decided to go with:

support for multiple schema arguments i.e. --schema url --schema localfile ...
support for globs for localfiles i.e. --schema '**/*.gql'


Turning opt_debug=true makes KTF die somewhere in printing page table

Let me know if you need output and can't reproduce.

This bug is introduced by commit:
bf71e10 pmm: allocate more 4K pages

Fixed by PR #46


Any example for "high-quality" training data?

I'm not sure whether my training data is high-quality enough. They're from solo radio cuts.
And so I want some examples to compare with.

https://huggingface.co/datasets/vctk/tree/main
you can search "VCTK"


Module fails when system is not configured

The logic leads to a fail() when the current system is not included in the list of servers.
I understand this, but is there away to do this that does not fail the whole puppet run?
Our provision/installation is highly automated, but things get difficult when the first puppet run fails and is not able to setup the basic essentials of a system.
I would prefer to replace the fail() with a prominent message for the client.

only option would be a notify I guess, that's probably ok yeah.  Do you want to do a PR to that effect?

Sure, Would you want the behavior to be selectable?
something like:
$fail_on_missing_config = true

nah I think notify is fine here https://github.com/choria-io/puppet-nats/blob/master/manifests/init.pp#L46 the other one should stay as is

Thank you @houtmanj


ci/cache: Fix cache priming for Docker only

Currently if only docker changed and not bazel its creating an empty cache, this should fix

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:]

pushing through


RE-721 Implement pre_merge_test hook

This patch implements the RPC Release Engineering pre_merge_hook
as documented in [1] making use of the existing job definition
in the rpc-gating repo.
For the most part it intentionally does not change how the job
is executed - it is meant to be a simple transfer of all logic
from rpc-gating into the rpc-openstack repository so that the
RPC-O team can own the entire test execution in a branched
repository.
The Jenkinsfile is removed as it is unused.
[1] https://rpc-openstack.atlassian.net/wiki/spaces/RE/pages/19005457/RE+for+Projects

recheck_cit_issue

recheck_issue_link

recheck_cit_artifact

recheck_xenial_swift_deploy

The xenial_swift_deploy test result was executed using the adjusted jobs from https://github.com/rcbops/rpc-gating/pull/462 to show that this PR delivers a working test set.

@hughsaunders Yes I've removed the job after testing it to prevent it interfering with other PR's.

Hmm, on second thoughts, this modifies bootrstrap-aio, which will probably break existing jobs, and possibly the upgrade jobs that will be left over?

@hughsaunders The existing jobs didn't break as far as I could see. The trusty-deploy-swift job appears to be failing normally in tempest, and tje xenial-deploy-swift job passed just fine.

recheck_ xenial_swift_deploy

Current failures appear to be due to https://rpc-openstack.atlassian.net/browse/RO-2796

recheck_cit_artifact - https://rpc-openstack.atlassian.net/browse/RO-2796 has been resolved
The minorupgrade jobs have been removed by https://github.com/rcbops/rpc-gating/commit/01f05822fdbd9910677c4123c5c3686b199f442a


adds create detector api flow

Signed-off-by: Subhobrata Dey<EMAIL_ADDRESS>Description
adds create detector api flow
Check List

[X] New functionality includes testing.

[ ] All tests pass

[ ] New functionality has been documented.

[ ] New functionality has javadoc added

[X] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

I have a concern i wanted to call out with regards to the use of index document models in request layer which i have noticed in both Alerting, SAP i.e. usage of Detector in IndexDetectorRequest..
this doesnt seem to be a right practive..
I feel it would be better to have a Detector DTO at rest layer which should be used to build or which can be built from Detector document stored in the index.
This ensures fields of detector which dont need to be exposed are abstracted away from rest responses and transport level responses(if required)
@getsaurabh02 @sbcd90 what are your thoughts on this.

Codecov Report

Merging #32 (bc67c4d) into main (cdf1495) will decrease coverage by 8.37%.
The diff coverage is 42.87%.

@@             Coverage Diff              @@
##               main      #32      +/-   ##
============================================
- Coverage     74.09%   65.72%   -8.38%
- Complexity      600      694      +94
============================================
  Files            78       95      +17
  Lines          2054     2801     +747
  Branches        387      455      +68
============================================
+ Hits           1522     1841     +319
- Misses          373      767     +394
- Partials        159      193      +34

Impacted Files
Coverage Δ

...rch/securityanalytics/SecurityAnalyticsPlugin.java
0.00% <0.00%> (ø)

...arch/securityanalytics/mappings/MapperApplier.java
0.00% <0.00%> (ø)

...earch/securityanalytics/mappings/MapperFacade.java
0.00% <0.00%> (ø)

...analytics/resthandler/RestIndexDetectorAction.java
0.00% <0.00%> (ø)

...rch/securityanalytics/rules/types/SigmaString.java
83.00% <ø> (ø)

...yanalytics/settings/SecurityAnalyticsSettings.java
0.00% <0.00%> (ø)

...lytics/transport/TransportIndexDetectorAction.java
0.00% <0.00%> (ø)

...search/securityanalytics/util/DetectorIndices.java
0.00% <0.00%> (ø)

...earch/securityanalytics/util/RestHandlerUtils.java
0.00% <0.00%> (ø)

...earch/securityanalytics/util/RuleTopicIndices.java
0.00% <0.00%> (ø)

... and 11 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


Two's complement representation

Many times in the docs I see that the arguments passed to functions should be represented using two's complement representation. My question is how to convert a number to its two's complement representation.
What I tried is to go with:
number.not().add(1)

However this does not bring correct results. The numbers I'm working with are very large negative integers. I want to convert a large integer to to its hex signed 2's complement.

Can you give an example of the operation that you want to do and the output that you expect?

how about
let invert = str => str.split('').map(x => x === "0" ? "1" : "0").join('')
let myOnesComplement = bn => new BigNumber(invert(bn.toString(2)), 2)
let myTwosComplement = bn => myOnesComplement(bn).addn(1)

print(myOnesComplement(new BigNumber("-4", 10)))
// "decimal = 3, binary = 11"
print(myTwosComplement(new BigNumber("-4", 10)))
// "decimal = 4, binary = 100"

@Yaffle could You post fixed variant, please

@srghma it should look like BigInt.asUintN  perhaps

But how to invert infinite leading 0s? I thought this works by using a finite numeral with a floating (movable) sign bit, so only the sign bit must be inverted and included with the numeral (regardless if it's 0 or 1), am I missing something?

let invert = str => str.split('').map(x => x === "0" ? "1" : "0").join('')

Can be converted to:
let invert = str => str.replace(/./s, c => c === "0" ? "1" : "0")

But it's slightly less readable, I guess


Update RouteCollectionInterface.php

Q
A

Is bugfix?
✔

Also could you fix getRouteTree?

getRouteTree

getRouteTree returns tree of strings, e.g.:
- /api
--- /user
--- /article

I meant the missing argument. https://github.com/yiisoft/router/blob/a586e87793c695468efb986d5c87a0431513afbe/src/RouteCollection.php#L65

Thanks!


Cannot serialize Alias Sampling

I was trying to take serialize Alias Sampling:
import numpy as np
from qualtran.serialization.bloq import bloqs_to_proto
from qualtran.bloqs.state_preparation import StatePreparationAliasSampling

coeffs = np.array([1.0, 1, 3, 2])
mu = 3

state_prep = StatePreparationAliasSampling.from_lcu_probs(
    coeffs, probability_epsilon=2**-mu / len(coeffs)
)
bloqs_to_proto(state_prep)

However I got the following error:
ValueError: Cannot serialize (SelectionRegister(name='selection', bitsize=2, iteration_length=4, shape=(), side=<Side.THRU: 3>),) of unknown type <class 'tuple'>

@tanujkhattar is out for a while and would be the best person to investigate this

Each Bloq has class attributes. StatePreparationAliasSampling has an attribute:
    selection_registers: Tuple[SelectionRegister, ...] = attrs.field(
        converter=lambda v: (v,) if isinstance(v, SelectionRegister) else tuple(v)
    )

which isn't actually documented (@tanujkhattar please address when you're back); but it presumably lets you re-configure the Registers used for selection. Crucially, this/these (?) registers contain the iteration_length that gives the range of indices that will appear in the selection register.
It doesn't look like this feature is used within the qualtran codebase: usually the from_lcu_probs factory method is used instead which uses one register named "selection".
Meanwhile: the serialization code only handles certain types when used as class attributes: https://github.com/quantumlib/Qualtran/blob/main/qualtran/protos/args.proto#L37
We'd need to add support for class attributes that are Register (SelectionRegister) types.
How urgent is this? In the meantime: you could patch it ~sortof like
diff --git a/qualtran/bloqs/state_preparation.py b/qualtran/bloqs/state_preparation.py
index 718095af..016fa6b0 100644
--- a/qualtran/bloqs/state_preparation.py
+++ b/qualtran/bloqs/state_preparation.py
@@ -84,9 +84,8 @@ class StatePreparationAliasSampling(PrepareOracle):
         (https://arxiv.org/abs/1805.03662).
         Babbush et. al. (2018). Section III.D. and Figure 11.
     """
-    selection_registers: Tuple[SelectionRegister, ...] = attrs.field(
-        converter=lambda v: (v,) if isinstance(v, SelectionRegister) else tuple(v)
-    )
+    sel_bitsize: int
+    sel_range: int
     alt: NDArray[np.int_]
     keep: NDArray[np.int_]
     mu: int
@@ -109,12 +108,21 @@ class StatePreparationAliasSampling(PrepareOracle):
         )
         N = len(lcu_probabilities)
         return StatePreparationAliasSampling(
-            selection_registers=SelectionRegister('selection', (N - 1).bit_length(), N),
+            sel_bitsize=(N - 1).bit_length(),
+            sel_range=N,
             alt=np.array(alt),
             keep=np.array(keep),
             mu=mu,
         )

+    @property
+    def selection_registers(self) -> Tuple[SelectionRegister, ...]:
+        return (
+            SelectionRegister(
+                'selection', bitsize=self.sel_bitsize, iteration_length=self.sel_range
+            ),
+        )
+
     @cached_property
     def sigma_mu_bitsize(self) -> int:
         return self.mu
@@ -158,7 +166,7 @@ class StatePreparationAliasSampling(PrepareOracle):
     ) -> cirq.OP_TREE:
         selection, less_than_equal = quregs['selection'], quregs['less_than_equal']
         sigma_mu, alt, keep = quregs.get('sigma_mu', ()), quregs['alt'], quregs.get('keep', ())
-        N = self.selection_registers[0].iteration_length
+        N = self.sel_range
         yield PrepareUniformSuperposition(N).on(*selection)
         yield cirq.H.on_each(*sigma_mu)
         qrom_gate = QROM(

Thank you!
I'll test these patches and see if I run into any other issues!

Unfortunately with the changes you suggested I got the following:
File ~/.../Qualtran/qualtran/serialization/args.py:49, in arg_to_proto(name, val)
     47 if isinstance(val, cirq.Gate):
     48     return args_pb2.BloqArg(name=name, cirq_json_gzip=cirq.to_json_gzip(val))
---> 49 raise ValueError(f"Cannot serialize {val} of unknown type {type(val)}")

ValueError: Cannot serialize () of unknown type <class 'tuple'>

So it turns out that arg_to_proto doesn't handle two types of data which appear in this Bloq:

empty tuple: ()
a list of numpy arrays [array([2, 2, 3, 3]), array([5, 4, 7, 0])]

So I added this extremely unsafe and hacky logic:
    if isinstance(val, tuple):
        return args_pb2.BloqArg(name=name, ndarray=_ndarray_to_proto(np.ndarray(val)))
    if isinstance(val, list) and len(val) != 0 and isinstance(val[0], np.ndarray):
        return args_pb2.BloqArg(name=name, ndarray=_ndarray_to_proto(np.stack(val)))

The first one is wrong because apparently np.ndarray(()) creates an array with only 0 in it – I guess some version of a protobuf null would be more appropriate here.
The second one might be giving correct results, this is what I get when I print out the protobuf object:
  bloq {
    name: "QROM"
    args {
      name: "data"
      ndarray {
        shape: 2
        shape: 4
        dtype: "np.dtype(\'int64\')"
        data: "\002\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\003\000\000\000\000\000\000\000\003\000\000\000\000\000\000\000\005\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\007\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
      }
    }

Also, when I tried to load it back with bloqs_from_proto(my_proto_obj) I got:
ValueError: Unable to find a Bloq corresponding to bloq_proto.bloq.name='StatePreparationAliasSampling'
So I added the following entries to the RESOLVER_DICT in serialization/bloq.py:
    'StatePreparationAliasSampling': StatePreparationAliasSampling,
    'PrepareUniformSuperposition': PrepareUniformSuperposition,

and then this hit me:
  File "<attrs generated init qualtran.bloqs.prepare_uniform_superposition.PrepareUniformSuperposition>", line 4, in __init__
    _setattr('cvs', __attr_converter_cvs(cvs))
  File "/.../Qualtran/qualtran/bloqs/prepare_uniform_superposition.py", line 52, in <lambda>
    converter=lambda v: (v,) if isinstance(v, int) else tuple(v), default=()
TypeError: iteration over a 0-d array

So it looks like the fact that cvs has not been serialized properly hits me back.
I hope it's helpful :)

Extra comment – the logic with RESOLVER_DICT in bloq_id_to_bloq seems a bit suspicious to me.
First, it will fail for any bloqs which are not on the list
Second, I think it should be handling Alias Sampling just right cause it's a composite bloq. Actually, I thought it is, cause I can use decompose_bloq on it. But then I checked and it actually isn't. So I'm obviously wrong – so the logic works kind of makes sense, but I'm just letting you know it's a bit confusing for an outside user on how these things are structured.
So I wanted to ask – is the first thing by design? I can imagine you might want to restrict the set of available basic bloqs for deserialization. But on the other hand I can also imagine this being temporary solution that will be replaced by something more robust (e.g. autogenerated or user-provided RESOLVER_DICT) ?

We synced offline, but capturing here.

Resolver dict is by design to avoid potentially executing arbitrary code. We do a similar thing in Cirq; but there we have a test to make sure that everything is added to the resolver dict
AliasSampling is a bloq. Anything with a 'name', (i.e. 'alias sampling') is a bloq. When you ask for its decomposition, you get a collection of bloqs that are all wired up. These are contained in CompositeBloq.

re: serialization: @tanujkhattar would be the best person to fix this properly but he is out for a bit. The original design of the serialization was supposed to be restrictive about what types of values you could include in bloq attributes. But we never actually tested that so there are now bloqs that include additional types of values in their attributes.
I like your hack; but instead of hacking things into ndarray; you could try json.dumps-ing the attributes to the string_val field in the BloqArg proto message. You'd have to deserialize it too. The following is my idea but untested
--- a/qualtran/serialization/args.py
+++ b/qualtran/serialization/args.py
@@ -11,6 +11,7 @@
 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
+import json
 from typing import Any, Dict, Union

 import cirq
@@ -38,15 +39,13 @@ def arg_to_proto(*, name: str, val: Any) -> args_pb2.BloqArg:
         return args_pb2.BloqArg(name=name, int_val=val)
     if isinstance(val, float):
         return args_pb2.BloqArg(name=name, float_val=val)
-    if isinstance(val, str):
-        return args_pb2.BloqArg(name=name, string_val=val)
     if isinstance(val, sympy.Expr):
         return args_pb2.BloqArg(name=name, sympy_expr=str(val))
     if isinstance(val, np.ndarray):
         return args_pb2.BloqArg(name=name, ndarray=_ndarray_to_proto(val))
     if isinstance(val, cirq.Gate):
         return args_pb2.BloqArg(name=name, cirq_json_gzip=cirq.to_json_gzip(val))
-    raise ValueError(f"Cannot serialize {val} of unknown type {type(val)}")
+    return args_pb2.BloqArg(name=name, string_val=json.dumps(val))

 def arg_from_proto(arg: args_pb2.BloqArg) -> Dict[str, Any]:
@@ -55,7 +54,7 @@ def arg_from_proto(arg: args_pb2.BloqArg) -> Dict[str, Any]:
     if arg.HasField("float_val"):
         return {arg.name: arg.float_val}
     if arg.HasField("string_val"):
-        return {arg.name: arg.string_val}
+        return {arg.name: json.loads(arg.string_val)}
     if arg.HasField("sympy_expr"):
         return {arg.name: parse_expr(arg.sympy_expr)}
     if arg.HasField("ndarray"):

This approach immediately throws: *** TypeError: Object of type ndarray is not JSON serializable .
Ok, so I made the following changes to make it work:

I added custom np json decoder (source: https://pynative.com/python-serialize-numpy-ndarray-into-json/) to deal with np arrays, so the line of interest looks like this:
return args_pb2.BloqArg(name=name, string_val=json.dumps(val, cls=NumpyArrayEncoder))

There were still some issues, so in the end instead of passing coeffs (input to StatePreparationAliasSampling.from_lcu_probs)  as np.array I just passed them as a list.

In QROM the __attrs_post_init__  complained a bit, so I fixed it by casting d to numpy array:
shapes = [np.array(d).shape for d in self.data]
And removed two last assertions for checking if self.selection_bitsizes and self.target_bitsizes are tuples, as after deserialization they ended up being lists.

With all those changes when I do:
proto_stuff = bloqs_to_proto(state_prep)
reconstructed = bloqs_from_proto(proto_stuff)

I get the following:
(Pdb) reconstructed
[StatePreparationAliasSampling(sel_bitsize=2, sel_range=4, alt=array([2, 2, 3, 3]), keep=array([5, 4, 7, 0]), mu=3), PrepareUniformSuperposition(n=4, cvs=()), Split(n=3), CirqGateAsBloq(gate=cirq.H), QROM(data=[[2, 2, 3, 3], [5, 4, 7, 0]], selection_bitsizes=[2], target_bitsizes=[2, 3], num_controls=0), Join(n=3), LessThanEqual(x_bitsize=3, y_bitsize=3), CSwap(bitsize=2)]
(Pdb) state_prep
StatePreparationAliasSampling(sel_bitsize=2, sel_range=4, alt=array([2, 2, 3, 3]), keep=array([5, 4, 7, 0]), mu=3)

Which is a bit surprising as I was expecting only one output, but I guess since:
state_prep == reconstructed[0] yields True, this is fine.
Just FYI as another minor unintuitive thing :)
So I can do my stuff and you have a list of minor issues to fix, so I  think we can call it a success 🎉 !

Props for powering through.
bloqs_to_proto will construct a BloqLibrary proto message which has multiple bloqs in it. This needs to be documented (https://github.com/quantumlib/Qualtran/issues/333) but when you ask to serialize StatePreparationAliasSampling it will serialize that bloq (ie its attributes/signature) and its decomposition (ie a DAG of subbloqs). The subbloqs (ie attributes/signature) will also be serialized in the BloqLibrary as the nodes (or node data, depending on how you think about it) in the decomposition DAG.  There's a sneaky argument max_depth that controls how deep we go.

Admittedly, I didn't bother to read the documentation of bloqs_to_proto 😅
But it makes sense 👌

That's probably for the best as there currently isn't any 💀

Sorry @mstechly, the initial prototype for serialization was added a while ago and it hasn't kept up with all the new things we've added to Qualtran. I appreciate your patience for powering through the rough edges!
Right now, SelectionRegister serialization is not supported because SelectionRegister is supposed to be deprecated and removed soon after we implement the more general Quantum Data Types in Qualtran proposal.
Is full serialization support a priority for you to unblock ongoing work or was it a oneoff experiment? If it's not a priority,  I'll hold off adding serialization support for SelectionRegister (and this implies all Unary Iteration derived bloqs would run into an error).

Not a priority, thanks @tanujkhattar !

Has this been fixed?

Yes, this is now fixed. Serialization of symbolic alias sampling is blocked on serializing the Shaped object; but that's independent of the bloq serialization overall. Non symbolic alias sampling bloqs serialize fine now and we have tests that verify this. I think this can be closed. We can track getting rid of the long list of "not yet serializable" blocks in a separate issue


Don't trigger audio taunts while typing

that is already fixed in https://github.com/overload-development-community/olmod/pull/302

Linked 'em.  Thanks.


tests: add a test for directory mode

Related to: https://github.com/adsharma/py2many/issues/391

Not sure how tests/expected/*.py are ignored in pyflakes. I should probably use the same mechanism.

rm tests/cases/*.py tests/expected/*.py in https://github.com/adsharma/py2many/blob/main/.github/workflows/main.yml#L121-L122

go, julia, kotlin, nim and rust fail the newly added test, only on windows.
Failure mode: no files in the target dir.
I first thought if it's an issue with handling paths. In that case - cpp and dart should fail too. But they pass.

IMO, raise SkipTest on Windows for this test on any that dont pass.
We already have bad Windows support, and this is just another issue to add to it.
Lets get this in and fix release blockers.

for reference, https://github.com/adsharma/py2many/issues/339 is the issue about Julia and Kotlin failing on Windows.
btw, https://github.com/adsharma/py2many/pull/390 is ready

Noting the debug information here and going with your suggestion of SkipTest:
>           assert output.diff_files == []
E           AssertionError: assert ['bar.go', 'baz.go', 'foo.go'] == []
E             Left contains 3 more items, first extra item: 'bar.go'
E             Full diff:
E             - []
E             + ['bar.go', 'baz.go', 'foo.go']

D:\a\py2many\py2many\tests\test_cli.py:447: AssertionError
---------------------------- Captured stdout call -----------------------------
Transpiling whole directory to D:\a\py2many\py2many\tests\dir_cases\test1-go-generated:
writing to: D:\a\py2many\py2many\tests\dir_cases\test1-go-generated\bar.go 47 bytes
writing to: D:\a\py2many\py2many\tests\dir_cases\test1-go-generated\bar.go done
writing to: D:\a\py2many\py2many\tests\dir_cases\test1-go-generated\baz.go 54 bytes
writing to: D:\a\py2many\py2many\tests\dir_cases\test1-go-generated\baz.go done
writing to: D:\a\py2many\py2many\tests\dir_cases\test1-go-generated\foo.go 168 bytes
writing to: D:\a\py2many\py2many\tests\dir_cases\test1-go-generated\foo.go done

Finished!
Successful: 3
Failed to convert: 0

It certainly looks like a race condition, where py2many/cli.py:_format_one() is still running the formatter in the background, even after run() has returned. Documentation says it returns only after the process has completed.


can you validate implicitly vs. keytab?

Is there a way to use this library on a domain-connected machine to validate tokens, but without having to use a manual keytab file(and instead use the existing domain membership of the computer in question as the connection back to the directory)?

In a manner of speaking, yes. You have to extract the machine password. This requires admin (or system) rights, and you need to set a registry flag to get a decrypted version of the password. This is the worst case security scenario, so it's not recommended for any production systems. At that point you're better off just handing it off to AcceptSecurityContext to get the identity.
That said, the gist of how it works can be found here: https://github.com/SteveSyfuhs/Kerberos.NET/blob/master/KerbDump/Form1.cs#L114
I have not documented the registry key you need to set, but it can be found online.

oh, true.  so i'd need a handle (from AcquireCredentialsHandle) (with the principal set to the expected SPN?) and then pass in the raw credential to AcceptSecurityContext? The workflow here on the windows/sspi side is.. not the most intuitive thing.

Yes, that's how it works. Instead of doing all this manually, a slightly saner approach might be to use a library like:

https://github.com/antiduh/nsspi
https://github.com/Waffle/waffle

Yes, i've been digging into nsspi but for some reason my spnego kerberos tickets are returning a CONTINUE from AcceptSecurityContext even though the same ticket validates correctly with no further input through your excellent lib.

Even with a SPNEGO/kerberos ticket?  That would do it.  I wonder if I can tell nsspi whether to just ignore that part...

SPNEGO is just a wrapped Kerb ticket in this scenario. AFAIK you can't do that from the server side. The client requests it when it calls InitializeSecurityContext with the ISC_MUTUAL_AUTH flag.
https://msdn.microsoft.com/en-us/library/windows/desktop/aa374770(v=vs.85).aspx

Sorry, I meant ignore that required response and still get at the authenticated user session info.  All this to try and avoid having to make customers generate a keytab but still be able to proxy validate the token.
Essentially, what I'm trying to do is
browser <-> webserver <-> remote API server <-> domain server
browser<->WS is doing the SPNEGO/kerb exchange, i'm extracting the token and then ferrying that offto a remote server that can talk to the domain.  Remote API server is IIS/.NET so trying to avoid keytab.
But of course that browser request is going to have the SPN of HTTP/webserver, so I know I need that SPN added to the DC, but was hoping at the API server I could just say "this token is meant for HTTP/webserver even though you are HTTP/apiserver" and leverage the SSPI stuff to piggyback on the fact that the API server is joined to the domain already...

So trying to make sure I understand this.  (Though perhaps I'm just trying to square peg/round hole this too much...)   To be able to essentially proxy the auth check (the webserver has no direct linkage to the domain, either domain membership or even access to the necessary ports; I just want to pass the existing encoded token along for a "who is this, and is it valid?" check) I'd need the same underlying password for the account associated with the WS SPN as well as the validation API service SPN?
I'm trying to do
Browser -> WS -> Validation API Service (which can talk to DC)

I will have to have an SPN for the hostname of the web server
The SPN of the validation API service will definitely be different
That SPN has to be associated with a user acct
The Validation service (running on a DC as part of IIS, but NOT using the built-in windows auth stuff) will have an SPN as well.

If the passwords to both accounts associated with the SPN are the same, the validation should be successful.
But this seems wonky, when I can go and create the SPN for the webserver and use the kerberos.net stuff with that keytab for my SPN and not worry about lining up the passwords etc.
Yes?  (i wouldn't blame you if I'm completely lost you, I'm not entirely sure where I am myself!)

...but I'm not sure I can get around this ->

That's because the ticket sent by the client has the Mutual Auth flag set. This tells the server to return an authenticatable piece of data back to the client to prove it's really the right server, and then the client sends a final 'ok' to the server, which is used to generate the identity.

Anyway, this is not a Kerberos.NET problem (K.N actually gives me an enablement path that doesn't require that last handshake) so I'm going to close this.


invoke incantation of MUDRammer reveal

I've just open-sourced MUDRammer — A Modern MUD Client for iPhone and iPad, my pride and joy :)

Thx


Fixes #312: To be OS agnostic, replace \n by %n in error messages

apply this fix to java 8 assertions

Thanks, I should have already done that (shame on me).

Integrated, thanks.


Fix #64: Rebind RELP connections after configurable amount of messages have been sent

Two new configuration properties: relp.rebindRequestAmount with a default of one million and relp.rebindEnabled with the default value false.
RelpConnectionPool keeps count of sent messages for each connection with a HashMap, and gives out a new connection when the rebindRequestAmount of sent messages is reached.

perhaps this kind of https://github.com/kortemik/lsh_01/commit/80b5ee189c871b286de5b9dffd26a4d4d1442328 could be used for a generic pool?


use new project system for benchmarks

Good work 👍 I am wondering how to create new projects with the new system. Is this a new project type is the wizard and I was not able to find it?


venv is missing inside the Docker image

Hi,
If you pull "nexsoltech/pgassistant:1.3" and do an inspection of the layer, it seems that all commands related to the venv are not present (https://github.com/nexsol-technologies/pgassistant/blob/main/Dockerfile#L21)
As a result, the image doesn't work on OpenShift, as not all libraries are available.
If I rebuild the image from your image with this inside my Dockerfile, it's working fine
RUN python -m venv /home/pgassistant/venv
ENV PATH="/home/pgassistant/venv/bin:$PATH"

RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r /home/pgassistant/requirements.txt

RUN pip install --no-cache-dir --upgrade pip
RUN pip install --no-cache-dir -r /home/pgassistant/requirements.txt

Can you check what's happening with the image build ?

Could you please pull again the 1.3 image. I have optimized the docker layers. Hope it will help !

The new 1.3 is working fine, I will close this issue. Thanks


fix: invalid go version errors in CI

Related to https://github.com/cgrindel/rules_swift_package_manager/issues/846.

Once this is merged, I should be able to rebase most of the outstanding Renovate PRs and merge them.


Add AdaptVQE tutorial

Closes #1167

I added in some more explanations to the text descriptions.
I commented the code a bit more.
I added in refactored code for real hardware in step 3.

But I also came into some issues.

I only have the open plan and this one tutorial exceeds an entire month's worth of usage limits so I could not actually run it on the hardware
At the start when defining the molecule, mol.energy_elec and mol.energy_tot don't work for me and I can't find source code where they would work in the same way as energy_nuc. Maybe I am just missing something but could be worth checking.

Any suggestions or insights would be appreciated. Thanks!

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Allow inheritance of Options from ParentCommand to Subcommand on need basis.

Hi - At present in picocli, a subcommand inherits all options of its parent command. The option in parent command is considered as global command. (Ref: https://picocli.info/#parentcommand-annotation).
We have a use case where we have a family of commands (like "backup", "backup list", "backup status"). Here backup was considered as a ParentCommand and list/status as subcommand. The "backup" command needs a required option "backupname", whereas "backup list" command does not need this "backupname".
When we use this setup then "backup list" command also inherits backupname option and thus it does not solve the purpose.
Is there any way to restrict the option to not get passed to subcommand.

Hey @remkop  - I apologies for the delay in my response. Yes, your suggestion/approach helped us to move forward. Thanks for your quick help.
There was one small thing noted - as the backupname was marked as optional, so the default help display content puts this option in square bracket.
Regards,
Kaushal