NLohmann doesn't compile when enabling strict warning policies

What is the issue you have?
Project including nlohmann doesn't compile with strict warning options:

g++ *.cpp -g -o test -pedantic -Wall -Wextra -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wnoexcept -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion -Wsign-promo -Wstrict-null-sentinel -Wstrict-overflow=5 -Wswitch-default -Wundef -Werror -Wno-unused

Please describe the steps to reproduce the issue. Can you provide a small but working code example?

#include "json.hpp"

int main();

What is the expected behavior?

Clean compile, no warnings

And what is the actual behavior instead?
Getting following warnings:

$ g++ *.cpp -g -o test -pedantic -Wall -Wextra -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wnoexcept -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion -Wsign-promo -Wstrict-null-sentinel -Wstrict-overflow=5 -Wswitch-default -Wundef -Werror -Wno-unused

In file included from main.cpp:1:0:
json.hpp:231:33: error: all member functions in class ‘nlohmann::detail::has_mapped_type<T>’ are private [-Werror=ctor-dtor-privacy]
     template<typename T> struct has_##type {                                  \
                                 ^
json.hpp:374:1: note: in expansion of macro ‘NLOHMANN_JSON_HAS_HELPER’
 NLOHMANN_JSON_HAS_HELPER(mapped_type);
 ^~~~~~~~~~~~~~~~~~~~~~~~
json.hpp:231:33: error: all member functions in class ‘nlohmann::detail::has_key_type<T>’ are private [-Werror=ctor-dtor-privacy]
     template<typename T> struct has_##type {                                  \
                                 ^
json.hpp:375:1: note: in expansion of macro ‘NLOHMANN_JSON_HAS_HELPER’
 NLOHMANN_JSON_HAS_HELPER(key_type);
 ^~~~~~~~~~~~~~~~~~~~~~~~
json.hpp:231:33: error: all member functions in class ‘nlohmann::detail::has_value_type<T>’ are private [-Werror=ctor-dtor-privacy]
     template<typename T> struct has_##type {                                  \
                                 ^
json.hpp:376:1: note: in expansion of macro ‘NLOHMANN_JSON_HAS_HELPER’
 NLOHMANN_JSON_HAS_HELPER(value_type);
 ^~~~~~~~~~~~~~~~~~~~~~~~
json.hpp:231:33: error: all member functions in class ‘nlohmann::detail::has_iterator<T>’ are private [-Werror=ctor-dtor-privacy]
     template<typename T> struct has_##type {                                  \
                                 ^
json.hpp:377:1: note: in expansion of macro ‘NLOHMANN_JSON_HAS_HELPER’
 NLOHMANN_JSON_HAS_HELPER(iterator);
 ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from main.cpp:1:0:
json.hpp:471:8: error: all member functions in class ‘nlohmann::detail::has_from_json<BasicJsonType, T>’ are private [-Werror=ctor-dtor-privacy]
 struct has_from_json
        ^~~~~~~~~~~~~
json.hpp:488:8: error: all member functions in class ‘nlohmann::detail::has_non_default_from_json<BasicJsonType, T>’ are private [-Werror=ctor-dtor-privacy]
 struct has_non_default_from_json
        ^~~~~~~~~~~~~~~~~~~~~~~~~
json.hpp:505:8: error: all member functions in class ‘nlohmann::detail::has_to_json<BasicJsonType, T>’ are private [-Werror=ctor-dtor-privacy]
 struct has_to_json
        ^~~~~~~~~~~
In file included from main.cpp:1:0:
json.hpp: In instantiation of ‘void nlohmann::detail::serializer<BasicJsonType>::dump(const BasicJsonType&, bool, bool, unsigned int, unsigned int) [with BasicJsonType = nlohmann::basic_json<>]’:
json.hpp:13069:13:   required from ‘nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::string_t nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::dump(int, char, bool) const [with ObjectType = std::map; ArrayType = std::vector; StringType = std::__cxx11::basic_string<char>; BooleanType = bool; NumberIntegerType = long int; NumberUnsignedType = long unsigned int; NumberFloatType = double; AllocatorType = std::allocator; JSONSerializer = nlohmann::adl_serializer; nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::string_t = std::__cxx11::basic_string<char>]’
json.hpp:18827:25:   required from here
json.hpp:9809:9: error: switch missing default case [-Werror=switch-default]
         switch (val.m_type)
         ^~~~~~
cc1plus: all warnings being treated as errors

Which compiler and operating system are you using? Is it a supported compiler?

GNU/Linux/Fedora, gcc
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --enable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 7.3.1 20180712 (Red Hat 7.3.1-6) (GCC)

Did you use a released version of the library or the version from the develop branch?
I used the newest release, as downloadable here: https://github.com/nlohmann/json/releases/download/v3.2.0/json.hpp

If you experience a compilation error: can you compile and run the unit tests?
Doesn't apply as I use the header only version.

Putting a #pragma GCC system_header at top of json.hpp did the trick. You should consider releasing the file with that pragma and/or fixing those warnings.
Keep up the great work :-)!

There are multiple options as far as switch handling of enums, and it is impossible to make code clean to all of them at once, as one warns when there is no default case, and one warns when the default case is used when all the elements of an enum are also specified.  See #889 and #555
You should be able to do the same as #pragma GCC system_header by including it with <json.hpp> instead of "json.hpp".

Okay that makes perfect sense! I can't include it with <json.hpp> because I need the file to be in the project folder

I would put it in a third_party folder, then adding -isystem third_party to compiler options

Mhh. that might work as well.

I fixed the "all member functions are private" warning. As @gregmarr wrote, there is nothing consistent we can do about warnings in switches.

Thank you! I will close the issue now, I think all that CAN be done was done.


Fix typo in README.md

I realize it is very minor but apparently, my OCD will not let it go.

@tigersoft You're funny. I know the struggle. :) Thanks, Tim


(bug) package hash mismatch

Observed behavior
I'm using this library in a project, and the lint step at the CI pipeline is giving me this error:

Can anyone help me with this issue?
Go version: 1.20.1
Lints used:

go-fmt
golangci-lint: v1.51.2

I've already tried remove cache and re-download go.sum file, but it didn't fix.
Expected Behavior
I expected to be able to lint my application without crashing my CI pipeline but using the v1.4.0 version of go-feature-flag I'm not able to.
It's working with v1.3.0
Steps to reproduce
No response

Hi @vellone-fabricio, thanks for sharing this with me.
I had a look at your problem and was not able to reproduce it.
I made this repo for the test, and it worked on my side.
Can you check if you reproduce it?
https://github.com/thomaspoignant/test-go-feature-flag-1.4.0

Bonjour, @thomaspoignant
Yes, sorry. I tried to reproduce again here and apparently nothing is happening....
Can you close this issue? If in the future I run into this again, I'll reopen it again.
Thank you very much for your attention and for the rapid response!

Thanks for letting me know.
I close the issue and feel free to re-open it if you still have the issue.


missing monyx. ...!!

hello sir
may i request you that i did't receive any BTC amount so kidnly ckeck the transction history .i already talk to u but that's wrong username so
this my username -parasghelani29
thank you.

there is 261.061500 monyx coin missing. .!!!
i repeat this is my username "parasghelani29"
thank you

@parasghelani43 I'll check it, most likely you was affected by the bug in the system and bought more tokens than you could.

@parasghelani43 should be restored


add an option to control whether to add a barrier for every slice in evolution_instruction (issue #708)

Summary
The evolution_instruction introduces a lot of barrier when using feature map functions. It makes a simple circuit very deep and it's bad for hardware jobs.
Details and comments

 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.Wen Guan seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.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.Wen Guan seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

@wguanicedew Wen, in order to merge this PR we need you to sign the CLA (Contribution License Agreement) so we can accept your contribution. I have copied the above info from the CLAassitant

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.

I have signed the cla. I am not sure why it shows it's pending.

Seems whatever you did - maybe going into the CLA again - fixed things, as it appears fine now. Thx!


performance about fine-tuning TERA with output layer by minimizing a CTC loss

Thanks your great work. I am a big fan of professor Hung-yi Lee, he's online course helps me a lot.
I have read the TERA paper, the ASR comparison experiments was conducted within the DNN/HMM framework.
Have you ever tested the performance about fine-tuning TERA with output layer by minimizing a CTC loss?

Hi, thanks for reading our work!
Sadly I haven't tested with CTC.


MS Office Failing due to unchecked APIs

According to Microsoft, our app is failing submission due to unchecked use of webkitAudioContext().
I searched for uses of new webkitAudioContext() and found several in john-travoltage, one in phet-io, and one in sherpa (used only by molecule-shapes).
We are using webkitAudioContext() in vibe/js/Sound.js, but we appear to checking correctly for its presence here.

One problem in remedying this problem is that we cannot view console output errors while it is running in PPT for Mac.

Can you elaborate on "our app"?  Are we submitting one composite app, with all of the sims, or is one sim in particular failing?

@samreid
We are submitting a manifest file, which points to an office store app hosted at https://phet.colorado.edu/office-mix/store.html.  You can run the app in a browser here.
To view the app in Powerpoint on a Mac, you'll need a copy of the manifest and then follow these instructions.
Basically, the app itself is working, but when we load some of the simulations into memory they are getting stuck at the splash screen.  MS suggests this is due to unchecked calls to the WebKitAudioContext constructor, but this is happening on sims that I don't think actually call that function, Arithmetic for instance.  Most of our sims use the Sound.js api, which checks for the presence of the constructor before calling it (code).

I'll go ahead and add checks to the webkitAudioContext()

Unassigning while @mattpen pursues the strategy in the preceding comment.

The app was published after MS pushed updates to Powerpoint for OSX.  This issue does not appear to be affecting our sims elsewhere, and I couldn't locate any instances of unchecked calls to this API anyway, so I'm going to close for now.


Function metadata available in middleware/FunctionContext

Description
Hello, can I access custom metadata about a function method in middleware? For example, I may want middleware to run on most functions but make an exception for some. For this, I was thinking of adding an attribute to the function method and reading this in the middleware (or “UseWhen”). However I can’t see how this is possible. Are there any other approaches? I can’t base it on trigger type or input type.

It's not straightforward forward, but you could use reflection to get access to the attribute on the invoked function.
file static class FunctionContextExtensions
{
    public static MethodInfo GetTargetFunctionMethod(this FunctionContext context)
    {
        // More terrible reflection code..
        // Would be nice if this was available out of the box on FunctionContext

        // This contains the fully qualified name of the method
        // E.g. IsolatedFunctionAuth.TestFunctions.ScopesAndAppRoles
        var entryPoint = context.FunctionDefinition.EntryPoint;

        var assemblyPath = context.FunctionDefinition.PathToAssembly;
        var assembly = Assembly.LoadFrom(assemblyPath);
        var typeName = entryPoint[..entryPoint.LastIndexOf('.')];
        var type = assembly.GetType(typeName);
        var methodName = entryPoint[(entryPoint.LastIndexOf('.') + 1)..];
        var method = type?.GetMethod(methodName);
        return method;
    }
}

It's not straightforward forward, but you could use reflection to get access to the attribute on the invoked function.
file static class FunctionContextExtensions
{
    public static MethodInfo GetTargetFunctionMethod(this FunctionContext context)
    {
        var entryPoint = context.FunctionDefinition.EntryPoint;
        var assemblyPath = context.FunctionDefinition.PathToAssembly;

        var assembly = Assembly.LoadFrom(assemblyPath);
        var typeName = entryPoint[..entryPoint.LastIndexOf('.')];
        var type = assembly.GetType(typeName);
        var methodName = entryPoint[(entryPoint.LastIndexOf('.') + 1)..];
        var method = type?.GetMethod(methodName);

        return method ?? throw new Exception("Could not get target function from the context");
    }
}

We have a set of APIs that were recently introduced that may help here.
We'll flag this for review and provide more information when that is available.

@stevendarby, similar to @SeanFeldman's suggestion, i also use reflection. however, i do it differently. i highly recommend that you separate out the reflection code from the run-time execution of your function. you can also cache (or, in my case, load the results as a singleton in a container) and initialize the attribute analysis at app start time (or lazily on first function hit).
i use this technique to manage authentication (jwt validation) and authorization (scope validation).
public class FunctionAuthRules
{
    private readonly HashSet<string> _anonymousFunctions = new(){"RenderSwaggerUI","RenderSwaggerDocument"};
    private readonly Dictionary<string, string> _scopedFunctions = new();

    public FunctionAuthRules() : this(GetAppDomainMethods())
    {
    }

    protected FunctionAuthRules(IEnumerable<MethodInfo> methods)
    {
        foreach (var method in methods)
        {
            var functionName = method.GetCustomAttribute<FunctionAttribute>()?.Name;

            if (functionName is null)
            {
                continue;
            }

            if (method.GetCustomAttribute<AllowAnonymousAccessAttribute>() is not null)
            {
                _anonymousFunctions.Add(functionName);
            }

            if (method.GetCustomAttribute<RequireScopeAttribute>() is { } scoped)
            {
                _scopedFunctions.Add(functionName, scoped.RequiredScope);
            }
        }
    }

    public bool AllowAnonymousAccess(FunctionContext context)
    {
        return _anonymousFunctions.Contains(context.FunctionDefinition.Name);
    }

    public string? RequiredScope(FunctionContext context)
    {
        var hasScope = _scopedFunctions.TryGetValue(context.FunctionDefinition.Name, out var scope);

        return hasScope ? scope : null;
    }

    private static IEnumerable<MethodInfo> GetAppDomainMethods()
    {
        return AppDomain.CurrentDomain.GetAssemblies()
            .SelectMany(a => a.GetTypes())
            .SelectMany(t => t.GetMethods());
    }
}

here is the scope attribute:
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
public class RequireScopeAttribute : Attribute
{
    public string RequiredScope { get; }

    public RequireScopeAttribute(string requiredScope)
    {
        RequiredScope = requiredScope;
    }
}

then you can leverage your "rules" in a middleware:
public class JwtBearerAuthenticationMiddleware : IFunctionsWorkerMiddleware
{
    private readonly IJwtValidationService _jwtValidationService;
    private readonly FunctionAuthRules _rules;
    private readonly ILogger _logger;

    public JwtBearerAuthenticationMiddleware(IJwtValidationService jwtValidationService, FunctionAuthRules rules, ILogger logger)
    {
        _jwtValidationService = jwtValidationService;
        _rules = rules;
        _logger = logger;
    }

    public async Task Invoke(FunctionContext context, FunctionExecutionDelegate next)
    {
        var requestData = await context.GetHttpRequestDataAsync();

        if (requestData is null)
        {
            throw new InvalidOperationException("Unable to get request data");
        }

        if (_rules.AllowAnonymousAccess(context))
        {
            await next(context);

            return;
        }

        if (!requestData.TryGetJwt(out var jwt))
        {
            context.GetInvocationResult().Value = requestData.CreateResponse(HttpStatusCode.Unauthorized);
            _logger.Warning("Authorization header not found");

            return;
        }

        var jwtValidationResponse = await _jwtValidationService.ValidateJwt(jwt!);

        if (!jwtValidationResponse.IsValid)
        {
            context.GetInvocationResult().Value = requestData.CreateResponse(HttpStatusCode.Unauthorized);
            _logger.Warning("Unauthorized: {Request_Uri}", requestData.Url);

            return;
        }

        context.SetApiClaimsPrincipal(new ApiClaimsPrincipal(jwtValidationResponse.ToUserPrincipal()));

        await next(context);
    }
}

and
public class RequireScopeMiddleware : IFunctionsWorkerMiddleware
{
    private readonly FunctionAuthRules _rules;
    private readonly ILogger _logger;

    public RequireScopeMiddleware(FunctionAuthRules rules, ILogger logger)
    {
        _rules = rules;
        _logger = logger;
    }

    public async Task Invoke(FunctionContext context, FunctionExecutionDelegate next)
    {
        var requestData = await context.GetHttpRequestDataAsync();

        if (requestData is null)
        {
            throw new InvalidOperationException("Unable to get request data");
        }

        if (_rules.RequiredScope(context) is { } requiredScope)
        {
            var principal = context.GetApiClaimsPrincipal();

            if (principal is null)
            {
                context.GetInvocationResult().Value = requestData.CreateResponse(HttpStatusCode.Unauthorized);
                _logger.Warning("Unauthorized: {Request_Uri}", requestData.Url);

                return;
            }

            if (!principal.HasScope(requiredScope))
            {
                context.GetInvocationResult().Value = requestData.CreateResponse(HttpStatusCode.Forbidden);
                _logger
                    .ForContext(nameof(principal.ClientId), principal.ClientId)
                    .ForContext(nameof(principal.Scopes), principal.Scopes)
                    .ForContext("RequiredScope", requiredScope)
                    .Warning("Forbidden: {Request_Uri}", requestData.Url);

                return;
            }
        }

        await next(context);
    }
}


Enable Windows integration tests via Appveyor

This was a joint effort between me and @oleggromov
Changes

Make scripts compatible with Windows via cross-env;
Use concurrently to start the integration-server in background to be compatible with Windows;
Don't build before running the tests (it is not used anyway);
Uses babel-register when running Jasmine;
Use karma-detect-browsers to find which browsers are available to run the tests.

Integration
I've enabled Appveyor integration on my fork as you can see in https://ci.appveyor.com/project/pirelenito/mappersmith
@tulios will need to login in Appveyor and setup the integration here as well.
Status
This PR started with the motivation to have a way of testing a fix for a know bug in IE11, but the status of the tests are much worse than initially imagined.
We need help to move forward and merge it.

@tulios you might decide as well to have this merged and stabilize the Windows tests at a latter PR.
It is up to you.


Missing Utility CSS classes in design system

The design system css is missing the utility css classes like:

spacing
typography (font-weight, font size, etc.)
colors

Expected Behavior
Should be also included in the storyblok-design-system.css file. Otherwise, we have to either manually create one or add third-party library.
Current Behavior
The design system css is missing the utility css classes

Steps to Reproduce

Install the storyblok design system:

npm install @storyblok/design-system

Add it to any project in the entry point like main.ts

import<EMAIL_ADDRESS>

And then try to use it. It won't be applied.

Ran into the same issue. I've downgraded to version 3.19.4 for now, since this is the latest version where these utility classes work.

Hi thanks for mentioning it, I will check to include the helper classes into the main CSS file again. We're currently doing a lot of refactoring for our main app

@Reyno-Skeps @h-ARTS fixed here: https://github.com/storyblok/storyblok-design-system/releases/tag/v3.23.1<EMAIL_ADDRESS>


user setting: Change "Mobile push notifications always" to be a sub-setting.

"Mobile push notifications always" is now a sub-setting of "Mobile push notification when offline".

Hi @alirizwi, thanks for making these changes!  We'd be happy to merge your PR afterwards :)

@synicalsyntax, I have fixed my commit message to match Zulip's commit guidelines. Please review it.

Can your shorten your main commit message to use imperative voice and be less than 80 characters? Something like "user settings: Change "Mobile push notifications always" to be a subsetting"

@synicalsyntax, I have changed main commit message as you told. Please review it

@synicalsyntax, Please review my commit. Thanks

Hi @alirizwi can you please change the title of this PR to something that describe the issue?

@tommyip, I have changed the title of the PR. Please review it. Thanks

I tested the changes, the logic works but the Mobile push notifications always (even when online) option is not greyed out when Mobile push notifications when offline is not checked. Have a look at the code for Desktop notifications  and its subsetting.

@tommyip, I have fixed that issue, now the Mobile push notifications always (even when online) option is greyed out when Mobile push notifications when offline is not checked. Please review it. Thanks

@tommyip, Please review the commit and if any further change is required inform me. Thanks

Looks good to me. @rishig?
By the way you don't need to sign off your commits.

@rishig @tommyip , Please review the commit. Thanks

@rishig as a quick follow-up, do we want to change the description for the setting to remove the "always" or something?

It's sort of a weird setting, so I think the "always" helps. I'd leave it as is?

OK.


building SBE encoding/decoding on an IoT microcontroller, e.g. ESP32-S3

@OleksandrKvl
Thanks for your help and patience.  based on success getting sbepp to build, I have a few questions:
Q1:  I want to send message using SBE between linux server and IoT endpoint (Espressif ESP32-S2, using esp-idf cross dev tools).  In my case, I have 3 data fields I want to exchange with  IoT endpoint, so msg schema is simple.  Once I generate C++ encode/decode stubs and add them to my IoT project, what additional files are needed to build and compile in this other compile environment?
Note: ESP32 esp-idf tools use gnu and most of the libraries are same as linux so it's not a constrained tool set as you might expect.
Q2: Do you have any suggestions how I go about getting the necessary source into my IoT project for building?
Thanks

Q1. To use generated headers, you need to link to sbepp::sbepp CMake target which is just a simple way to link to <sbepp/sbepp.hpp> header. And some parts of C++11 standard library of course.
Q2. I'm not familiar with IoT specifics, if you have CMake there then use a standard approach like FetchContent sbepp into your build tree and just use it. In my envs I use Conan to manage deps, it does most of the things for me.
Generally, if you can't build sbeppc on the run, you have to generate headers once, store them in your source tree and then bring sbepp library into your project in any way you prefer.

@OleksandrKvl
I will explore this and let you know.   I searched the web and could not find anyone else attempting this which is a surprise.
I hope I can leave this open till I reach some conclusion?
Thx

No problem

Closing it as there's no activity. You can re-open it later.


Hide Reset Nether Button

For users that don't need it, being able to hide the reset nether button as a config option would be nice.

This has been removed in newer versions.


[Documentation]: Property Graph Index

Documentation Issue Description

The second last cell of the documentation should be "chroma_collection=collection" and not "collection=collection"
I was following the code using an open-sourced tool stack - I was using Groq's LLaMA3 70Bn as my LLM and the "BAAI/bge-small-en" embeddings model. When executing the same cell in point 1 (i.e. the creation of the property graph index using chroma as the vectorDB), I got a "DuplicateIDError" raised by ChromaDB. I think there might be something wrong with the interaction of the graph and vector stores?

Documentation Link
https://docs.llamaindex.ai/en/latest/examples/property_graph/property_graph_basic/

When testing with qdrant (I enabled hybrid search on this) I got a different error:
UnexpectedResponse: Unexpected Response: 400 (Bad Request)
Raw response content:
b'{"status":{"error":"Format error in JSON body: value Paul graham is not a valid point ID, valid values are either an unsigned integer or a UUID"},"time":0.0}'

Can I check if this is related?
Here's how I defined my qdrant vector store:
from llama_index.vector_stores.qdrant import QdrantVectorStore
from qdrant_client import QdrantClient, AsyncQdrantClient

client = QdrantClient(host="localhost", port=6333)
aclient = AsyncQdrantClient(host="localhost", port=6333)
vector_store = QdrantVectorStore(
    collection_name = "graph_collection",
    client = client,
    aclient = aclient,
    enable_hybrid = True,
    batch_size = 20
)

Sorry @logan-markewich I'm still facing the same error but the issue has been marked as closed. I did see that the files on the main branch have been updated and I did pip install -U llama-index just in case.

@tituslhy try updating again, it should be relased (the prs close issues on merge, but sometimes it can take a day or two to release, especially changes in core)


feat(frontend): add token prop to transaction card components

Motivation
After PR #3537 , we can provide the token to the Transaction card components, to show the Token logo in the unified transaction list.
Changes

Make prop token for EthTransaction and adapt the usage, removing the derived store and providing the input from its parents, like EthTransactions.
Map token for all the UI transactions.
Adapt AllTransactionsList.

Tests
Test adapted and here results.

[OISY-130]


Page Specific Custom JavaScript

Hugo Version:  Hugo Static Site Generator v0.64.1/extended darwin/amd64 BuildDate: unknown
I have a custom JavaScript file that I want to run on a specific page. I added the following configuration to the front-matter of my post:
assets:
  js:
    - "js/example.js"

However, the custom-js.html partial is looking at the global site parameters to find the custom JS:
{{- range site.Params.assets.js -}}

To get the page-specific JavaScript to work, I had to change that line to the following:
{{- range $.Param "assets.js" -}}

Is this the optimal way of doing this, or is there a better approach?
~Thanks

config.toml is global settings.
You should create an user-side shortcode ?

Yes, that may be a more robust solution -- thank you.
Though, it may be a limitation that the shortcode content is rendered in the middle of the document, whereas the parameterized partial is rendered at the bottom of the document.

Another way:
https://github.com/cntrump/hugo-notepadium/issues/42#issuecomment-578563793

I like that solution the most! Thanks for your help.


Fixed typo in docs/ref/contrib/postgres/fields.txt.

I noticed there was a missing parenthesis in the documentation for a code excerpt.
I'm not sure if the indentation is quite right though.

just add brackets in two different lines for proper indentation

I'm not sure where to put brackets 🤔 I was thinking maybe of doing something like that:
Event.objects.filter(
    start__contained_by=DateTimeTZRange(
        timezone.now() - datetime.timedelta(hours=1),
        timezone.now() + datetime.timedelta(hours=1),
    )
)

Or just keep the initial indentation.

@b0uh Thanks :+1: Welcome aboard :boat:


1:M relationships and searching collections by custom header field

I am trying to create a 1:M relationship ("An release belongs to 1 artist, and an artist can have M releases") in Grav by using a custom field (uuid) defined via a blueprint, like so:
Release:
# blueprints/release.yaml
title: Release Entry
extends@: default

form:
  fields:
    tabs:
      type: tabs
      active: 1

      fields:
        advanced:
          fields:
            overrides:
              fields:
                header.uuid:
                  type: text
                  label: 'Unique ID - do not modify'
                  data-default@: '\Grav\Theme\Upitup::uuid'
                  readonly: true
        content:
          fields:
            header.artist:
              type: select
              label: Select artist
              data-options@: '\Grav\Theme\Upitup::getArtists'

Artist:
#blueprints/artist.yaml
title: Artist Entry
extends@: default

form:
  fields:
    tabs:
      type: tabs
      active: 1

      fields:
        advanced:
          fields:
            overrides:
              fields:
                header.uuid:
                  type: text
                  label: 'Unique ID - do not modify'
                  data-default@: '\Grav\Theme\Upitup::uuid'
                  readonly: true

My theme functions are defined as follows:
class Upitup extends Theme
{

    public static function uuid()
    {
        return uniqid(null, true);
    }

    public static function getArtists()
    {
        $page = Grav::instance()['page'];
        $collection =<EMAIL_ADDRESS>=> '/artists']);

        $options = [];
        foreach ($collection as $artist) {
            $options[$artist->header()->uuid] = $artist->title();
        };

        return $options;
    }

My goal is to show the Artist of a a specific Release. All I could figure out so far is to get all Pages of type "Artist" and checking one by one for the specific uuid I"m looking for, which is obviously suboptimal. Like so:

{% set artists = page.evaluate([{'@page':'/artists'}]) %}
{% for artist in artists %}
    {% if artist.header.uuid == page.header.artist %}
       Release by {{ artist.title }}
    {% endif %}
{% endfor %}

I read the manual twice but I couldn't figure out what's the best way to achieve this simple scenario.
Is there a recommended way in Grav to filter collections by a custom value?
Many thanks!

Right now you need to do something like this -- create a collection of pages and find the one(s) you want to display. You can probably use some caching, but this isn't something that's supported out of the box (look into how taxonomies work for example).
What you described is something I'm working on when I have some spare time and some of the base classes are already in Grav 1.4 and there are multiple improvements in Grav 1.5 to start supporting customizable pages/objects with relations between them. My goal is to have all of this fully integrated with Grav 2.0.

Thanks @mahagr and looking forward to seeing relationship support in Grav 2.
One last question: would it be a terrible idea to use creatively taxonomy tags to automatically store primary IDs (e.g. in my example above a creation-time uuid) upon creation of pages (Artists and Releases in my case) to be used later on for taxonomy filtering?


stable-diffusion-webui-tensorrt\scripts\trt.py", line 6, in      from modules import script_callbacks, sd_unet, devices, shared, paths_internal ImportError: cannot import name 'sd_unet' from 'modules' (unknown location)

stable-diffusion-webui-tensorrt\scripts\trt.py", line 6, in
from modules import script_callbacks, sd_unet, devices, shared, paths_internal
ImportError: cannot import name 'sd_unet' from 'modules' (unknown location)

update to dev commit

update to dev commit

The new 1.5 should work as well


feat: termination_by?

the user can now write termination_by? to see the termination argument
inferred by GuessLex, and turn it into termination_by … using the “Try
this” widget or a code action.
To be done later, maybe: Avoid writing sizeOf if it's not necessary.

This seems to be a bootstrapping issue, stage 2 doesn’t build.


CI for Node

add node.js to a new branch

Contains the compiled JavaScript
Initializes with two players
Starts the game with a random player
Starts the game with a random player


net/url: Userinfo should support encoding/gob

Currently the encoding/gob package does not support embedded structs with no exported fields. See #5819.
This is problematic for the net/url package. I cannot serialize a url.URL into a gob because url.Userinfo has no exported fields. I can't be the only one who has needed to serialize a struct with a URL in it.
This is solvable without modification to the encoding/gob if we fix url.Userinfo. This is possible by implementing encoding.BinaryMarshaler and encoding.BinaryUnmarshaler:
func (u *Userinfo) UnmarshalBinary(data []byte) error {
	return nil
}

func (u *Userinfo) MarshalBinary() (data []byte, err error) {
	return nil, nil
}

Or perhaps encoding/gob should let you register marshal/unmarshal funcs for a given concrete type yourself, then net/url can remain happily oblivious of gob.
/cc @robpike

Implementing encoding.BinaryMarshaler and encoding.BinaryUnmarshaler seems very sane to me, since it solves that problem for other binary encodings, too. Please remember that the generic marshaler/unmarshaler support in package encoding has been introduced exactly to solve those problems in a generic way and per type that needs it.

If we're going to do something for url.URL, why not give URL MarshalText/UnmarshalText methods instead? Why work on this tiny piece of the URL instead of the whole thing?
That said, we have to proceed very carefully here because of backwards compatibility concerns. It may not happen for 1.6.

This works too. MarshalText could call URL.String, and UnmarshalText could call url.Parse. It is very straightforward.
How would this break backward compatibility? If someone is relying on the fact that url.URL cannot be marshaled or unmarshaled?

@chowey It's a change in behavior. It can surprise people. And if it can, it will. We've struggled with this when adding custom encodings for other types as well.

1 this is an issue for me as well

+1


pylint failing helix-machines validation

The validation done using pylint as part of image creation is failing.
First glance is that the command parameters have changed in recent update, meaning we need to update the validation scripts to match (and that there isn't any actual linting problem)
2023-10-02 18:29:11Z pr-windows.10.amd64-baseimages-update: Traceback (most recent call last):
2023-10-02 18:29:11Z pr-windows.10.amd64-baseimages-update:   File "C:\h\w\A3610919\w\A7810956\u\validate.py", line 214, in <module>
2023-10-02 18:29:11Z pr-windows.10.amd64-baseimages-update:     if not run_pylint():
2023-10-02 18:29:11Z pr-windows.10.amd64-baseimages-update:   File "C:\h\w\A3610919\w\A7810956\u\validate.py", line 173, in run_pylint
2023-10-02 18:29:11Z pr-windows.10.amd64-baseimages-update:     pylint_results = Run(['--errors-only', '--disable=no-member', script_dir], do_exit=False)
2023-10-02 18:29:11Z pr-windows.10.amd64-baseimages-update: TypeError: Run.__init__() got an unexpected keyword argument 'do_exit'
2023-10-02 18:29:11Z pr-windows.10.amd64-baseimages-update: ['Test' END OF WORK ITEM LOG: Command exited with 1]

Release Note Category

[ ] Feature changes/additions
[ ] Bug fixes
[ ] Internal Infrastructure Improvements

Release Note Description

PR !34184.
Draft for now while the validation pipeline runs for testing. If that succeeds, I'll publish.


fix(clustering) event for config sync is generated 2 times

This problem is because we register events 2 times, each for 1 implementation of a control plane.
I also refactored a little bit. They cannot share 1 copy of the config cache because they have different handling of the message.
For wRPC, it's protobuf(gzip(json_encode(config)) + other_fields), and for webSocket it's gzip(json_encode(config + other_fields)).

This is redundant to #9082.
As we will refactor CP/DP later, I prefer #9082. So this PR is closed.


Keras Nadam optimizer behaves different to ApplyAdamOp with use_nesterov option

This is copied and adopted from here: https://github.com/tensorflow/tensorflow/issues/53204
System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 16.04 (but irrelevant)
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: No
TensorFlow installed from (source or binary): binary (but irrelevant)
TensorFlow version (use command below): 2.3, 2.7.0, current master
Python version: 3.7
Bazel version (if compiling from source): -
GCC/Compiler version (if compiling from source): -
CUDA/cuDNN version: -
GPU model and memory: -

Describe the current behavior
Nadam as implemented in the kernel via the use_nesterov option (tensorflow/tensorflow/core/kernels/training_ops_gpu.cu.cc) behaves different to tf.keras.optimizers.Nadam.
We observed this problem (here: https://github.com/rwth-i6/returnn/issues/766#issuecomment-979216833) where the model converged in TF 1 with the old Nadam and does not anymore with TF 2 with the new Nadam.
Specifically, in the kernel, you have this code:
const T mul_factor = (*lr_) * sqrt(static_cast<T>(1.0) - (*beta2_power_)) /
                     (static_cast<T>(1.0) - (*beta1_power_));

...

auto m_i = m[i];
auto g_i = grad[i];
auto v_i = v[i];

m_i += one_minus_beta1 * (g_i - m_i);
v_i += one_minus_beta2 * (g_i * g_i - v_i);
if (use_nesterov) {
  var[i] -= mul_factor * (m_i * beta1 + one_minus_beta1 * g_i) /
            (epsilon + sqrt(v_i));
} else {
  var[i] -= mul_factor * m_i / (epsilon + sqrt(v_i));
}

m[i] = m_i;
v[i] = v_i;

And in the Keras Nadam optimizer, we have this code:
g_prime = grad / coefficients['one_minus_m_schedule_new']
m_t = (coefficients['beta_1_t'] * m +
       coefficients['one_minus_beta_1_t'] * grad)
m_t = tf.compat.v1.assign(m, m_t, use_locking=self._use_locking)
m_t_prime = m_t / coefficients['one_minus_m_schedule_next']
v_t = (coefficients['beta_2_t'] * v +
       coefficients['one_minus_beta_2_t'] * tf.square(grad))
v_t = tf.compat.v1.assign(v, v_t, use_locking=self._use_locking)
v_t_prime = v_t / coefficients['v_t_prime_denominator']
m_t_bar = (coefficients['one_minus_m_t'] * g_prime +
           coefficients['m_t_1'] * m_t_prime)
var_t = var - coefficients['lr_t'] * m_t_bar / (
    tf.sqrt(v_t_prime) + coefficients['epsilon'])

There are differences is the calculation of m_t and v_t. While mathematically the same, the variant in the kernel is probably numerically more stable. The difference is
m_i = m_i + one_minus_beta1 * (g_i - m_i);

vs
m_i = beta1 * m_i + one_minus_beta1 * g_i;

I think the first variant is better here. I think this should be adopted in the Keras code.
Another difference is mul_factor vs lr, and how var[i] (var_t) is calculated.
Describe the expected behavior
I would expect that Nadam as implemented in the kernel via the use_nesterov option (tensorflow/tensorflow/core/kernels/training_ops_gpu.cu.cc, available since TF 1, also still in current master), which could be used via tensorflow.contrib.opt.NadamOptimizer in TF 1, is conceptually the same as tf.keras.optimizers.Nadam.
Also, TF provides the ApplyAdamOp with Nesterov support. I would expect that Keras Nadam makes use of that anyway, as it should also be a bit more efficient.

This was closed without comment. Has this been fixed? What commit?


Unrecognized extension value in extension set ([object Object]) when adding basicSetup

Here's the full code of the component in question:
import {
  Button,
  Modal,
  ModalBody,
  ModalCloseButton,
  ModalContent,
  ModalFooter,
  ModalHeader,
  ModalOverlay,
} from '@chakra-ui/react';
import { basicSetup } from '@codemirror/basic-setup';
import { indentWithTab } from '@codemirror/commands';
import { javascript } from '@codemirror/lang-javascript';
import { Extension } from '@codemirror/state';
import { EditorView, keymap, ViewUpdate } from '@codemirror/view';
import { useEffect, useMemo, useState } from 'react';
import { Node } from 'react-flow-renderer';
import CodeMirror from 'rodemirror';

type RuleEditorProps = {
  node: Node;
  isOpen: boolean;
  onSave: (rule: string) => void;
  onClose: () => void;
};

const DEFAULT_RULE = `(function(_providers) {
  // rule logic goes here
    \n
  return { nextState: "", attributes: {} };
  /* eslint-disable no-undef */
})(_providers)\n`;

export default function RuleEditor(props: RuleEditorProps) {
  const { node, isOpen, onSave, onClose } = props;
  const { state } = node.data;

  const [value, setValue] = useState(state.rule || DEFAULT_RULE);
  const [editorView, setEditorView] = useState<EditorView | null>(null);

  const handleSave = () => {
    onSave(value);
    onClose();
  };

  const handleClose = () => {
    onClose();
  };

  const handleChange = (v: ViewUpdate) => {
    if (v.docChanged) {
      setValue(v.state.doc.toString());
    }
  };

  useEffect(() => {
    if (!editorView) return;

    const pos = value.indexOf('here\n');
    const transaction = editorView.state.update({
      selection: { anchor: pos + 7, head: pos + 7 },
    });

    editorView.focus();
    editorView.dispatch(transaction);
  }, [editorView]);

  const extensions = useMemo<Extension[]>(() => [basicSetup, keymap.of([indentWithTab]), javascript()], []);

  return (
    <Modal isOpen={isOpen} onClose={handleClose} isCentered>
      <ModalOverlay />
      <ModalContent maxW="56rem">
        <ModalHeader>Rule Editor - {node.data.label}</ModalHeader>
        <ModalCloseButton />
        <ModalBody>
          <CodeMirror
            extensions={extensions}
            value={value}
            onUpdate={handleChange}
            onEditorViewChange={(editorView) => setEditorView(editorView)}
          />
        </ModalBody>

        <ModalFooter>
          <Button size="sm" onClick={handleSave} colorScheme="blue">
            Save
          </Button>
        </ModalFooter>
      </ModalContent>
    </Modal>
  );
}

And here's the stack trace:
react-dom.development.js:12023 Uncaught Error: Unrecognized extension value in extension set ([object Object]). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.
    at inner (index.js:2004:23)
    at inner (index.js:1979:17)
    at inner (index.js:1979:17)
    at inner (index.js:1979:17)
    at flatten (index.js:2008:5)
    at Configuration.resolve (index.js:1916:25)
    at EditorState.create (index.js:2741:43)
    at index.js:70:31
    at commitHookEffectListMount (react-dom.development.js:23049:26)
    at commitPassiveMountOnFiber (react-dom.development.js:24816:13)

EDIT: In case it's relevant, here's also package.json:
{
  "name": "cognito-editor",
  "private": true,
  "version": "0.0.0",
  "scripts": {
    "dev": "vite",
    "build": "tsc && vite build",
    "preview": "vite preview",
    "test": "env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha -r ts-node/register 'src/**/*.test.ts'",
    "test:watch": "env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha -w -r ts-node/register 'src/**/*.test.ts'",
    "storybook": "start-storybook -p 6006",
    "build-storybook": "build-storybook"
  },
  "dependencies": {
    "@chakra-ui/icons": "^2.0.1",
    "@chakra-ui/react": "^2.1.2",
    "@codemirror/basic-setup": "^0.20.0",
    "@codemirror/commands": "^6.0.0",
    "@codemirror/lang-javascript": "^6.0.0",
    "@codemirror/state": "^6.0.0",
    "@codemirror/view": "^6.0.0",
    "@crinkles/digl": "^0.4.0",
    "@emotion/react": "^11",
    "@emotion/styled": "^11",
    "@types/lodash": "^4.14.182",
    "eslint-config-prettier": "^8.5.0",
    "eslint-config-react-app": "^7.0.1",
    "eslint-plugin-mocha": "^10.0.5",
    "framer-motion": "^6",
    "lodash": "^4.17.21",
    "react": "^18.0.0",
    "react-dom": "^18.0.0",
    "react-flow-renderer": "^10.3.5",
    "react-icons": "^4.4.0",
    "rodemirror": "^1.6.7",
    "zustand": "^4.0.0-rc.1"
  },
  "devDependencies": {
    "@babel/core": "^7.18.2",
    "@storybook/addon-actions": "^6.5.8",
    "@storybook/addon-essentials": "^6.5.8",
    "@storybook/addon-interactions": "^6.5.8",
    "@storybook/addon-links": "^6.5.8",
    "@storybook/builder-vite": "^0.1.36",
    "@storybook/react": "^6.5.8",
    "@storybook/testing-library": "^0.0.11",
    "@types/chai": "^4.3.1",
    "@types/mocha": "^9.1.1",
    "@types/node": "^17.0.38",
    "@types/react": "^18.0.0",
    "@types/react-dom": "^18.0.0",
    "@vitejs/plugin-react": "^1.3.0",
    "babel-loader": "^8.2.5",
    "chai": "^4.3.6",
    "mocha": "^10.0.0",
    "simple-zustand-devtools": "^1.0.1",
    "ts-node": "^10.8.0",
    "typescript": "^4.6.3",
    "vite": "^2.9.9"
  }
}

If I remove basicSetup from the list of extensions, it works. Any hints?

OK, after checking the dependencies on your example projects, I found that I needed to update all my @codemirror/* dependencies to ^0.19 on my package.json file.
It might be a good idea to add this info to instructions, and feel free to close this issue.
Thanks!

Yeah CodeMirror has interesting install behavior, worsened by the fact that it (was) not following semver yet. Looks like someone opened an issue at codemirror/dev#858. I'm ok with clarifying in the docs that this is only a small wrapper and any errors are likely due to CodeMirror and not this package.

I ran into the same problem and spent quite a lot of time until seeing @fcoury 's solution. Thank you for saving my day! Codemirror folks please make the default installation work.

i think the issue is that @codemirror/basic-setup is deprecated (and still depending on the v0.20 packages) and has been renamed to just codemirror. see https://discuss.codemirror.net/t/codemirror-6-0-has-been-released/4498

This looks correct.
import { basicSetup } from 'codemirror';

Works for me


How can you override Haskell package versions with devenv?

I was trying this method basically in devenv.nix (typing from memory):
 let myHaskellPackages =
      super.haskell.packages.ghc96.override (old: {
        overrides = self.lib.composeExtensions (old.overrides or (_: _: {}))
          (hself: hsuper: {
            ghc = hsuper.ghc // { withPackages = hsuper.ghc.withHoogle; };
            ghcWithPackages = hself.ghc.withPackages;

            amazonka-core = hself.callCabal2Nix "amazonka-core" "${inputs.amazonka}/amazonka-core";
          });
      });
in {
  languages.haskell = {
    enable = true;
    package = myHaskellPackages.ghc;
  };
}

Should this work?
Is there a better way?
My error was that the wrong version of amazonka-core was used rather than what my flake=false input specified as 2.0.0-rc2 which implies to me that for some reason the override did not happen.

In the commit above you can see a reproduction of what I'm trying to do and how it fails.

Here's a reproduciton of my error with the error:
Warning: The package list for 'hackage.haskell.org' does not exist. Run 'cabal
9
update' to download it.
10
Resolving dependencies...
11
Error: cabal: Could not resolve dependencies:
12
[__0] trying: devenv-haskell-example-<IP_ADDRESS> (user goal)
13
[__1] unknown package: amazonka-core (dependency of devenv-haskell-example)
14
[__1] fail (backjumping, conflict set: amazonka-core, devenv-haskell-example)
15
After searching the rest of the dependency tree exhaustively, these were the
16
goals I've had most trouble fulfilling: devenv-haskell-example, amazonka-core

That actually differs from my error locally a bit:
~/code/devenv-haskell-example $ devenv shell cabal build
Building shell ...
Resolving dependencies...
Error: cabal: Could not resolve dependencies:
[__0] trying: devenv-haskell-example-<IP_ADDRESS> (user goal)
[__1] next goal: amazonka-core (dependency of devenv-haskell-example)
[__1] rejecting: amazonka-core-1.6.1 (conflict: devenv-haskell-example =>
amazonka-core==2.0.0)
[__1] skipping: amazonka-core-1.6.0, amazonka-core-1.5.0, amazonka-core-1.4.5,
amazonka-core-1.4.4, amazonka-core-1.4.3, amazonka-core-1.4.2,
amazonka-core-1.4.1, amazonka-core-1.4.0, amazonka-core-1.3.7,
amazonka-core-1.3.6, amazonka-core-<IP_ADDRESS>, amazonka-core-1.3.4,
amazonka-core-<IP_ADDRESS>, amazonka-core-1.3.2, amazonka-core-1.3.1,
amazonka-core-1.3.0, amazonka-core-<IP_ADDRESS>, amazonka-core-<IP_ADDRESS>,
amazonka-core-1.2.0, amazonka-core-1.1.0, amazonka-core-1.0.1,
amazonka-core-1.0.0, amazonka-core-0.3.6, amazonka-core-0.3.5,
amazonka-core-0.3.4, amazonka-core-0.3.3, amazonka-core-0.3.2,
amazonka-core-0.3.1, amazonka-core-0.3.0, amazonka-core-1.3.5,
amazonka-core-1.3.3, amazonka-core-0.2.3, amazonka-core-0.2.2,
amazonka-core-0.2.1, amazonka-core-0.2.0, amazonka-core-0.1.4,
amazonka-core-0.1.3, amazonka-core-0.1.2, amazonka-core-0.1.1,
amazonka-core-0.1.0, amazonka-core-0.0.8, amazonka-core-<IP_ADDRESS>,
amazonka-core-0.0.7, amazonka-core-0.0.6, amazonka-core-0.0.5,
amazonka-core-0.0.4, amazonka-core-0.0.3, amazonka-core-0.0.2,
amazonka-core-0.0.1, amazonka-core-0.0.0 (has the same characteristics that
caused the previous version to fail: excluded by constraint '==2.0.0' from
'devenv-haskell-example')
[__1] fail (backjumping, conflict set: amazonka-core, devenv-haskell-example)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: devenv-haskell-example, amazonka-core

I think I was confused here.

I saw devenv downloading haskell libraries
this led me to assume "oh it's installing Haskell project dependencies with Nix"
those Haskell dependencies were probably just for haskell-language server

So I believe the answer here is:
In devenv you don't override haskell packages because it only provides ghc, cabal, etc and doesn't manage installing Haskell libraries.

I think you'd want to use:
languages.haskell.package = haskellPackages.ghcWithPackages (pkgs: [pkgs.direct-sqlite])

Where you can then define your own packages in there.

@ParetoOptimalDev does that resolve your issue?

Hi @domenkozar, thanks for following up.
I think it will resolve my issue but I won't have time to verify until I'm done with converting some node docker projects into devenv.


Support docker daemon running on host (mesos slave) which listens on unix socket only.

Currently we assume that the docker daemon listens on a tcp port 2376.

@mwl can we close this? I don't think we have this assumption any more. I think it was from a time when we were following docker logs?

Hi,
this has nothing to do with docker logs it's just, that in the default mesos cluster environment the docker daemon listens on the unix socket not on the tcp port... So to avoid have the admin to install the docker daemon on the tcp port for all the mesos nodes, we should support having the docker daemon running on tcp or socket...

Ah - sorry accidentally I reopened it... I will close it but reopen if you agree...


fix: should check hasAnyCollateralAsset before burn nToken

Security Checklist

[ ] 1. Re-Entrancy
[ ] 2. Arithmetic Over/Under Flows
[ ] 3. Unexpected Ether
[ ] 4. Delegatecall
[ ] 5. Default Visibilities
[ ] 6. Entropy Illusion
[ ] 7. External Contract Referencing
[ ] 8. Short Address/Parameter Attack (off chain)
[ ] 9. Unchecked CALL Return Values
[ ] 10. Race Conditions / Front Running
[ ] 11. Denial Of Service (DOS)
[ ] 12. Block Timestamp Manipulation
[ ] 13. Constructors with Care
[ ] 14. Uninitialized Storage Pointers
[ ] 15. Floating Points and Precision
[ ] 16. Tx.Origin Authentication
[ ] 17. Address.isContract Re-Entrancy via Constructor

⚠ NOTES ⚠
Make sure to think about each of these exploits in this PR.

@zhoujia6139 can this be merged into #11  because it's similar thing, overall any change regarding collateral balance will need to be well designed and tested so it'll take time to merge

yeah. these two pr do have some little connection. but this one is more simple and urgent, if there are no more question we can merge it soon.


DM: use sync-diff-inspector to check data

What problem does this PR solve?
DM may need to compare shard merge tables later, the compareData we used currently is not enough.
What is changed and how does it work?
use our sync-diff-inspector to check data for DM tasks.
Check List
Tests

Unit test

@mahjonp @yeya24 PTAL


Update ro.coffee

Few highly visible changes and translated "Hints:" as "Indicii".

Hi @cdumitrascu . Thanks for the translations! So we can merge this in, can you sign the CLA?

Hi @cdumitrascu . Thanks for the translations! So we can merge this in, can you sign the CLA?

Closed as CLA not signed. Feel free to reopen it.


IBMCloud MachinePool support

HIVE-1621

/test e2e

Test improvements look good to me @2uasimojo, thank you!

This looks great. Couple of nits inline, then I think we're good to go.

/test e2e-gcp


packet.decode_header: reverse ack_message_id list

Previously, the order was not preserved, and since the order is relevant for the hmac computation, the hmac failed.
/cc @reynir

the code is a bit intricate -- since we pass arr_len to the recursive function, we start to read the last acked message_id. Previously, we were then prepending that id to a list, and calling the recursive function, so we ended up with <last>::<previous-to-last>::..::<first>::[] -- which is reversed.
Since that function was not tail-recursive as well, I decided to switch it to a tail-recursive version where still the last message id is read first, but then the recursion is called with <last-message-id>::[], and since it always prepends, we end up with the right order <first>::..::<last>::[].


CSA 2015 FRQs + Association Between FRQs and Our Project

Association Between FRQs and Our Project
FRQ 1 (Arrays/ArrayLists + 2D Arrays)
This question from this FRQ has three parts (A, B, and C) and they all centered on both one and two dimensional arrays of integers. Whereas part A focused just one one dimensional arrays, part b and c were questions that emphasized writing methods for two dimensional arrays. For our ASL project, we have many instances of using ArrayLists, such as the ones we used to create the Frames API controller  as shown below:
// FrameApiController.java
 private List<List<Integer>> convertToMNIST(String imageData) {
        try {
            byte[] imageBytes = Base64.getDecoder().decode(imageData);
            ByteArrayInputStream bis = new ByteArrayInputStream(imageBytes);
            BufferedImage image = ImageIO.read(bis);

            BufferedImage resizedImage = new BufferedImage(28, 28, BufferedImage.TYPE_BYTE_GRAY);
            Graphics2D g = resizedImage.createGraphics();
            g.drawImage(image, 0, 0, 28, 28, null);
            g.dispose();

            List<List<Integer>> mnistData = new ArrayList<>();
            for (int y = 0; y < 28; y++) {
                List<Integer> row = new ArrayList<>();
                for (int x = 0; x < 28; x++) {
                    int pixel = resizedImage.getRGB(x, y) & 0xFF;
                    row.add(pixel);
                }
                mnistData.add(row);
            }
            return mnistData;
        } catch (IOException e) {
            e.printStackTrace();
            return null;
        }
    }

To sum up what this code segment is doing, the convertToMNIST method uses an ArrayList to represent an image pixel's values in a 2D structure. The outer ArrayList, mnistData, stores each row of the image as an inner ArrayList of integers, where each integer represents the grayscale intensity of a pixel. Similar to FRQ 1, this segment iterates over the pixels of a resized 28x28 image, converting each pixel's intensity to an integer, and organizing these into rows and columns to mimic the format required by MNIST dataset-compatible models. This is what ultimately allowed us to see our database in the backend filled with a long list of numbers corresponding to the pixel's intensity.
This code segment is similar to the first FRQ here in that they both required iteration through a list of integers. The FRQ required iteration in order to calculate the sum of one and two dimensional arrays and the Frames API controller needed iteration in order to convert each pixel's greyscale intensity into an integer.
FRQ 2 (Classes)
Question 2 from this FRQ had just one part, which asked students to write the entire hiddenWord class in order to model a game that is quite similar to Wordle. This question required several if statements to be able to answer it, as there needed to be different outputs depending on if the user guessed a correct letter in the correct place, guessed a correct letter in the wrong place, or just guessed a letter that was not in the word. Our ASL project as expected had several classes as well as if statements within those classes, with one example being the LeaderboardApiController class as shown below:

// LeaderboardApiController.java
@RestController
@RequestMapping("/api/leaderboard")
public class LeaderboardApiController {

    @Autowired
    private LeaderboardJpaRepository repository;

@GetMapping("/")
public ResponseEntity<List<Leaderboard>> getLeaderboard() {
    List<Leaderboard> leaderboard = repository.findAllByOrderByScoreDesc();
    System.out.println("Fetched leaderboard data: " + leaderboard);
    return new ResponseEntity<>(leaderboard, HttpStatus.OK);
}

@PostMapping("/update/{playerName}/{score}/{streak}")
public ResponseEntity<Leaderboard> updateScoreAndStreak(@PathVariable String playerName, @PathVariable int score, @PathVariable int streak) {
    List<Leaderboard> leaderboardList = repository.findByPlayerNameIgnoreCase(playerName);
    Leaderboard leaderboard;
    if (leaderboardList.isEmpty()) {
        leaderboard = new Leaderboard(playerName, score, streak);
    } else {
        leaderboard = leaderboardList.get(0);
        leaderboard.setScore(leaderboard.getScore() + score); // Add score to existing total
        leaderboard.setRecentStreak(streak); // Update recent streak
    }
    repository.save(leaderboard);
    return new ResponseEntity<>(leaderboard, HttpStatus.OK);
}}

Much like how the FRQ uses if statements to decide what type of character (*, +) to put in place of the letter that the user guessed, the above code segment uses if statements to figure out what to do with the leaderboard once a user has finished the game. If the leaderboard was previously empty and a user just completes a game, they will be added as a new entry to the leaderboard with their name along with the number of points they earned from that game and most recent streak. Otherwise, if the user was already on the leaderboard, the number of points that they earned from their game will be added to their total score on the leaderboard.  Their most recent streak will be updated too if it was different from the previous game they played.
FRQ 3 (2D Arrays + Methods and Control Structures)
The third FRQ had a mixture of both 2D Arrays and Control Structures across both parts (A and B) of the question. Part A asked students to write a method that returned the value of something at a specific row and column and part B asked students to write a method that removes a column from the matrix once it is called. While our current ASL project does not implement 2D Arrays that much (which we look forward to including as we head into Trimester 3), it does use several methods and control structures. One example of a method and control structure we used was the receiveDataAndPredict method used in the Predictions API Controller, as shown below:
public ResponseEntity<String> receiveDataAndPredict(@RequestBody List<List<Integer>> mnistData) {

        System.out.println("---------PostMapping");
        String predictionResult = predictionService.predictAndSave(mnistData);
        System.out.println("predictionResult=" + predictionResult);
        return new ResponseEntity<>(predictionResult, HttpStatus.OK);
    }
    return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
    }

Essentially, the receiveDataAndPredict method takes an image's pixel data (i.e. greyscale intensity), predicts what the image represents (what letter of the alphabet) using a service (predictionService), and returns that prediction to the user and a status code indicating that the request was successfully processed.
Much like how FRQ 3 had a condition of returning an entry's value if the requested row and column indeed had a non zero entry, the code segment above has a condition of returning a specific status code if the request was processed successfully. Overall, this specific implementation of methods and control structures is very similar to that implemented in FRQ 3 in that they both required if and else statements as well as ways of indicating something to be true or false.
FRQ 4 (Interfaces, includes Methods and Control Structures and some Classes)
This question was about creating interfaces, which is technically no longer tested on the AP Exam. However, the question did have topics that continue to be relevant for the AP Exam, making this question important for me to practice on to ensure that I am well prepared of the upcoming AP Exam. Classes were definitely involved in this question, as key words such as "implements" were used to show that the MultipleGroups class is also a NumberGroup class. Methods and control structures were also used here, with the contains method determining if a certain number fell within the test range used for the runtime version. We implement something similar to this in our project in the JPA Repository for the leaderboard shown below:
// LeaderboardJpaRepository.java

public interface LeaderboardJpaRepository extends JpaRepository<Leaderboard, Long> {
    List<Leaderboard> findAllByOrderByScoreDesc();
    List<Leaderboard> findByPlayerNameIgnoreCase(String playerName);
}

Although this code segment is shorter compared to the other examples shown, it still was important in making sure that the leaderboard was sorted in order of highest points to lowest points. What separates our implementation from what FRQ 4 uses is the fact that the key word in our project is "extends" while the key word in the question was "implements". While extends is used to extend a class's existing functionality, implements is used to include attributes of an interface in your class. Overall, though, both implementations demonstrate the important concept of inheritance for classes and how they all end up working together to achieve a desired functionality.
Reflection/Key Takeaways/Observations

Originally, I had trouble thinking about how the FRQs on College Board were related to the projects we worked on this trimester, as both of them seem very different. However, as I took the time to analyze the similarities/differences between the FRQs and our project work, I now see how we are able to take what College Board expects us to know and use it for more complex purposes, such as building a website and connecting the frontend and backend together with an API
One thing that I noticed across all of these FRQs was that it was quite difficult for me to pinpoint exactly what kind of question that College Board was asking. There were really no FRQs that just had one topic as its theme, as all of the types of questions we have learned about (Methods/Control Structures, Arrays/ArrayLists, etc.) have to work together in order to achieve a desired functionality. For most of the FRQs, there was always a mix of at least two of the concepts implemented in the questions
While I was able to complete all of these FRQs, I definitely need to improve on setting a timer for myself so that I can simulate what the testing environment will be like on the real AP exam, as I will not get unlimited time to answer all of these questions
While 2D arrays were not implemented into our ASL project too much, we definitely do have plans of how we can apply our knowledge of 2D arrays to the images we are using in our project as we head into the third trimester of the school year
I realize that I should definitely take the time to do these practice FRQs on my own time rather than just waiting for them to be assigned in class, as if I only rely on practice questions we do in class, I will be severely limiting the knowledge that I will need to have going into the AP Exam

Q1.  List of List is certainly a 2D structure.  Just of reference type, not of primitive type.  CB always seems to test on primitive type, which, IMO is for less functional than what you did.  BTW, you should have a constant defined for 28...  I heard you might need to store something bigger for more accuracy.
Q2.  Interesting how you went for class purpose on this one, it is good to think about functionality.  Most just translate to POJO vs @RestController.
Q3  A good way to look at usage of 2D arrays is thinking of the purpose of what it is doing.  There are usually 10 ways to solve a problem and believe you are looking at that.  However, in so doing we should think of how we do things in ROW order or alternately in COL order, how we manipulate elements like you did when performing grey scale.
Q4 Your response, as well as others, inspired me to re-comment this... https://github.com/nighthawkcoders/spring_portfolio/blob/master/src/main/java/com/nighthawk/spring_portfolio/mvc/person/PersonJpaRepository.java
I like your attitude for study FRQs.  I am thinking of providing time, but ultimately it is your test to pass with regards to time and paper.

Issue reflection grade (4/3.6)

FRQ 1 (Arrays/ArrayLists + 2D Arrays): Implementing 2D arrays for image processing helped emaad get a better understanding of nested data structures and their practical applications beyond theoretical problems.

FRQ 2 (Classes): Creating classes for his project's API controllers helped him with hands-on experience in OOP and this is showing the importance of class design in solving hard problems.

FRQ 3 (2D Arrays + Methods and Control Structures): Working with methods and control structures in the context of 2D arrays showed how adaptive these constructs in manipulating data structures are for specific outcomes.

FRQ 4 (Interfaces, includes Methods and Control Structures and some Classes): The use of interfaces and the implementation relationship in his project helped him appreciate the power of abstraction and polymorphism in creating flexible and reusable code.

Overall he had a very good association with his project to the FRQ, and could see how PBL has most definitely enhanced his learning.

FRQ (4/3.6)

Was very detailed in each of the FRQ and was formatted well. Had the college board answer and the code block running. Also had a detailed reflection going into the code explaining the overall concept of the frq for example number 2 he talked about how the problem was a classes type question. He also went through each of the thought processes of each one which gets a good idea of how he is thinking. He did this for every single FRQ, with the same theme of doing how you would answer on college board, then the run-able code in a cell, and then reflection.

Issue reflection grade (4/3.6)

FRQ 1 (Arrays/ArrayLists + 2D Arrays): Implementing 2D arrays for image processing helped emaad get a better understanding of nested data structures and their practical applications beyond theoretical problems.
FRQ 2 (Classes): Creating classes for his project's API controllers helped him with hands-on experience in OOP and this is showing the importance of class design in solving hard problems.
FRQ 3 (2D Arrays + Methods and Control Structures): Working with methods and control structures in the context of 2D arrays showed how adaptive these constructs in manipulating data structures are for specific outcomes.
FRQ 4 (Interfaces, includes Methods and Control Structures and some Classes): The use of interfaces and the implementation relationship in his project helped him appreciate the power of abstraction and polymorphism in creating flexible and reusable code.
Overall he had a very good association with his project to the FRQ, and could see how PBL has most definitely enhanced his learning.

FRQ (3.8/3.6)

Was very detailed in each of the FRQ and was formatted well. Had the college board answer and the code block running. Also had a detailed reflection going into the code explaining the overall concept of the frq for example number 2 he talked about how the problem was a classes type question. He also went through each of the thought processes of each one which gets a good idea of how he is thinking. He did this for every single FRQ, with the same theme of doing how you would answer on college board, then the run-able code in a cell, and then reflection.

This review is confusing to me.   FRQs should be more like a checklist.   Did they meet objectives of CB (review requirements like Luna on Raymond) and of Teacher (does it run, in notebook, all methods implemented).
Second part should be more like style above.  But, it should contain classic glows/grows,  or something you found interesting.


Public headers get installed again into ${INSTALL_INCLUDE_DIR}/pointmatcher.

(Fixed regression introduced with 1066b29d61e1f55abd93c8e3cf.)

Ouuuu good catch


[Bug] Invite success text is always plural even when only 1 user is invited

The invite text says: "Users have been invited." when I invited only one user. It should say, 'The user has been invited successfully' for one email and 'Users have been invited' for multiple emails.

@kaushik94 this is another good first issue that you can pick up


Enable coverage data generation and upload to codecov

Closes #50

Merging even if there is absolutely no code coverage for now, because this provides a baseline.


TSP_REPLY Digest must also go over the VID's of the envelope

Currently only the payload is hashed.

Note that in the earlier spec, the digest was computed over the payload-before-encryption. This causes it to be unknown to outside parties (which feels like it's a good thing, since a thread-id seems to act like a "cookie" for relationships, and knowledge of a thread-id also demonstrates possession of a private key).
In the current implementors draft it seems to just go over the publically visible message; I'm not sure what benefit that conveys. (Implementation-wise, it also has the a slight performance downside that it might force us to always compute a hash over every input -- of course compared to the other crypto going on that is negligible)


Automatically generate SPDX3 model classes from spec

An attempt to automatically generate the SPDX3 model classes from the spec to make it easier to keep the model representation up to date with the spec.
At this point it mostly does what it needs to do, but there are a few exceptions and special cases that still need to be addressed manually.

This is stale, and https://github.com/JPEWdev/shacl2code is expected to replace it


[ENH] streets/network and points need to be in the same CRS/EPSG

@sjsrey @ljwolf
Currently, there is no way to enforce that the line data and point data are in the same coordinate reference system. When they are in wildly different projections an uninformative AssertionError with no message is thrown from libpysal.cg.rtree (meaning there are no points within a Rect object when building the lookup tree).  Furthermore, if the lines and points are in similar CRSs there might be no error, but the results would be invalid as the spatial relationship / locations between the lines and points would  not be preserved. Enforcing, or at minimum checking for, the same crs is a simple one-liner when the input data is a geopandas.GeoDataFrame, but do we have a method for this baked in when the input is pysal.io/libpysal.io ?

I think the crs handling should be done outside of pysal/libpysal.

In util.py (the operation may actually be happening in this line) maybe add:
try:
    r = cg.Rect(x0, y0, x1, y1)
except AssertionError as e:
    raise e('There are no point within `cg.Rect`. Check data coordinate reference systems.')

This would at minimum throw an informative error while not strictly enforcing any actual crs checking or transformations.

Closing this issue for as not able to consistently reproduce or come up with a universal/efficient solution.


"Failed to register service '{guid}'" - Using a Flow with PowerApps within solution

We're having an issue completing a PowerApp solution that uses a Flow within the same solution, as seen in the attached screenshot.
We have never been successful in associating a solution-aware Flow with PowerApp, however no issues with non-solution aware Flows.
Full guid - '979f2e0d-1380-46c9-9d6f-f6981bb434d6'
We've tested it in various clean scenarios to nail down the issue without success. All non-solution-aware Flows work fine.

@wallissam  Thanks for your feedback. For product-related feedback, visit https://powerusers.microsoft.com/t5/PowerApps-Community/ct-p/PowerApps1. Closing this issue.


Ability to rewrite settings on import

now we could write code like
window.__meteor_runtime_config__ = {
  DDP_DEFAULT_CONNECTION_URL: 'http://example.com',
};
require('meteor-client');

to rewrite config settings. Sometimes it is much handier than rebuild full bundle just to reconfigure a bit.

Thank you!


Add precise cv to grid fine tuning

Codecov Report
Attention: 34 lines in your changes are missing coverage. Please review.

Comparison is base (c8d62be) 92.74% compared to head (519f0d2) 91.22%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #32      +/-   ##
==========================================
- Coverage   92.74%   91.22%   -1.52%
==========================================
  Files          41       41
  Lines        2039     2074      +35
==========================================
+ Hits         1891     1892       +1
- Misses        148      182      +34

Flag
Coverage Δ

pytest
91.22% <5.55%> (-1.52%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Files
Coverage Δ

bluecast/ml_modelling/xgboost.py
75.45% <5.55%> (-10.50%)
:arrow_down:

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


How to build correctly on linux?

Helo @0xc0de
I've tried to build this on unix, by git cloning this repo (using recurse-submodules), and running cmake.. then the make command. But I'm getting huge error log, which keeps repeating this error:
/home/mm/Desktop/Hork-Source/Source/./Core/BaseMath.h:1377:33: error: could not convert ‘value.TSprintfBuffer<32>::Sprintf(format.Data, (* reinterpret_cast<const uint16_t*>(& _Value)))’ from ‘char*’ to ‘AString’
 1377 |             return value.Sprintf(format.Data, *reinterpret_cast<const uint16_t*>(&_Value));
      |                    ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                 |
      |                                 char*

In the project desc it mentions linux as a supported platform. But how do I build it correctly ? Am I missing a steps in the cmake process?

Hello, LeavesOfFruit
What compiler are you using? Try to fix function signature from char* Sprintf(const char* _Format, ...) to const char* Sprintf(const char* _Format, ...). Please let me know if it helped.

Hi
Thank for the reply. I have now changed the return types to return const value.Sprintf(format.Data, *reinterpret_cast<const uint8_t*>(&_Value));
But I'm still getting many errors:
/home/mm/Desktop/Hork-Source/Source/Core/BaseMath.h:1389:24: error: expected primary-expression before ‘const’
 1389 |                 return const value.Sprintf("%s%I64x", prefixStr, Temp);
      |                        ^~~~~
/home/mm/Desktop/Hork-Source/Source/Core/BaseMath.h:1389:23: error: expected ‘;’ before ‘const’
 1389 |                 return const value.Sprintf("%s%I64x", prefixStr, Temp);
      |                       ^~~~~~
      |                       ;
/home/mm/Desktop/Hork-Source/Source/Core/BaseMath.h:1389:30: error: ‘value’ does not name a type
 1389 |                 return const value.Sprintf("%s%I64x", prefixStr, Temp);
      |                              ^~~~~

In addition, Im getting errors with Memory.h files as well:
/home/mm/Desktop/Hork-Source/Source/./Platform/Memory/Memory.h: In function ‘void Platform::Memset(void*, int, size_t)’:
/home/mm/Desktop/Hork-Source/Source/./Platform/Memory/Memory.h:76:14: error: ‘memset’ is not a member of ‘std’; did you mean ‘wmemset’?
   76 |         std::memset(_Dst, _Val, _SizeInBytes);
      |              ^~~~~~
      |              wmemset

Which linux distro have you managed to build Hork on? Did you use any special configs to get it to build?

Hello, LeavesOfFruit Try to fix function signature from char* Sprintf(const char* _Format, ...) to const char* Sprintf(const char* _Format, ...). Please let me know if it helped.

Hi
Which line of code should I change to being a const char*? Could you show me an example of which line should be changed to it? Thank z

Hello, LeavesOfFruit Try to fix function signature from char* Sprintf(const char* _Format, ...) to const char* Sprintf(const char* _Format, ...). Please let me know if it helped.

Hi
Which line of code should I change to being a const char*? Could you show me an example of which line should be changed to it? Thank z

Please update to the latest version. I just fixed the build on GCC.

Thank ver much ! I've just managed to compile it now!


OLS-425 Sprint-6-Schema

Request you to review the Sprint-6 OLS feature schema
https://telecominfraproject.atlassian.net/wiki/spaces/WIFI/pages/2408087553/Release+4.0+Items

Hi @Cahb  @mikehansen1970
Please review my updated changes based on discussion last week. Summary table of these changes now done are:

For the capabilities, System limits and abilities is we'd like to convey, and not the real numbers/ranges per configurable or subset of parameters. Such could be handled via config rejections or simply truncations by the OLS-c.
But, capabilities POV, similar to hardware capabilities, it'd be nice if we have the switch advertise what max it can do so that one does not oversubsribe nor tend to undersubscribe in the first place.

@Cahb @mikehansen1970
I have addressed review comments like this.  Please check and let me know how it looks.


'Delete patient' not working in sandbox

Thanks for creating an issue! Please fill out this form so we can be sure to have all the information we need, and to minimize back and forth.

What are we trying to do?

Steps to recreate:

log in to sandbox using the<EMAIL_ADDRESS>account
search for a patient (without a sent pledge) and go to their patient record by clicking the link
click the big red Delete this patient button and affirm that yes, you want to do that

At this point, it should redirect you back to the main call list dashboard and flash a notice that it's deleted the patient.
Instead, it seems to do nothing?

What feature or behavior is this required for?

Admins being able to delete dupe patients

How could we solve this issue? (Not knowing is okay!)

No idea! Dig in and go bug squashing.

Anything else?

I'm able to recreate on sandbox and locally, looks like it's responding with a 404 on first hit but succeeding on page refresh. Digging in more!

@lperson can you do me a solid and take care of this? been meaning to take care of it for awhile

Starting to take a look at this bad boy fyi


Use hasattr(x, 'child_nodelists') to generalize nodelist search

A more comprehensive fix for issue 47: Use hasattr(x, 'child_nodelists') to generalize the search for block definitions. To paraphrase a comment in the Django source "does x quack like a nodelilst owner?"

Thanks!


Bug: FitbitConnected Widget disappears when Fitbit is in "Needs Reconnection" State

I was using view builder to build a simple UI that allows you to connect Fitbit.
This Fitbit Connect widget has a flag for "Hide when connected".
This widget remains hidden when the Fitbit Connection Status is "Needs Reconnection", so there is no way to reconnect the Fitbit account from the dashboard.
i.e. .. this never shows up is "Hide when connected is checked off"

Fixed via https://github.com/CareEvolution/MyDataHelpsUI/pull/226 @Suvarna-Thejas-CE


OnEnter state schedules are now executed immediately

Bevy version
v0.14.0-rc.3
What you did
I have an example in which I use a state to (destructively) switch between pages, There is a setup system to prepare a container for these while keeping a menu and footer around them, and OnEnter / OnExit systems to manage cleanup and spawning.
What went wrong
In bevy 0.13.x, adding OnEnter(MyState::StateOne) would have been executed after Startup.
Since the extraction of States, these are immediately executed which means a start up state cannot be guaranteed in the systems.
Additional information
To work around this one must either add a default None state or similar to each state or remove setup entirely since the OnEnter will not be repeated. Also, updating the state resource need mutable access to the Resource, but if a chain of commands is used to setup the
world state, changing the resource will always be too early. A Command + EntityCommand should be provided that can be plugged
into a setup chain to properly schedule the state update, but I haven't seen this yet.

I made a command extension like so:
pub trait UpdateStatesExt<'w, 's, 'a> {
    fn next_state<C: States + FreelyMutableState>(&mut self, state: C);
}

impl<'w, 's, 'a> UpdateStatesExt<'w, 's, 'a> for Commands<'w, 's> {
    fn next_state<C: States + FreelyMutableState>(&mut self, state: C) {
        self.add(|world: &mut World| {
            if let Some(mut old_state) = world.get_resource_mut::<NextState<C>>() {
                old_state.set(state);
            } else {
                warn!(
                    "Failed to set state: {}, state not initialized!",
                    std::any::type_name::<C>()
                );
            }
        });
    }
}

and I can use it with commands.next_state(Page::Layout); in the appropriate place in my setup system.

I'm confused by the "What you did" section of this issue. There seems to be some missing context.

I'm confused by the "What you did" section of this issue. There seems to be some missing context.

Updated, sorry about that I am worked on the upgrade while sick.

IMO this is an intended part of the design: there should never be a gap (including at startup) where you are in a state but its invariants have not been applied. I definitely understand that it's frustrating to migrate, but I much prefer the existing design.
@lee-orr @MiniaczQ, I value your opinion here, but I'm leaning towards closing as wont-fix.

IMO this is an intended part of the design: there should never be a gap (including at startup) where you are in a state but its invariants have not been applied. I definitely understand that it's frustrating to migrate, but I much prefer the existing design.
@lee-orr @MiniaczQ, I value your opinion here, but I'm leaning towards closing as wont-fix.

I understand the design decision around it, my main issue was that out of the box it was not possible to synchronize system generated content with the state-generated ones. With the command extension I can solve my sync issues, but bevy doesn't (or at least I haven't seen) offer a good way to do it.

I think the actual solution you may be looking for is using sub states or computed states.
The way these work, the parent states OnEnter runs before the child state's one, so you can do the parent state set up, and then the child state stuff.

I think the actual solution you may be looking for is using sub states or computed states.
The way these work, the parent states OnEnter runs before the child state's one, so you can do the parent state set up, and then the child state stuff.

yeah that works for me, it's just most cases need to introduce an extra (single-variant) state to govern as a root since the overall container needs to be managed (at least for UI it is quite usual)

IMO this is an intended part of the design: there should never be a gap (including at startup) where you are in a state but its invariants have not been applied. I definitely understand that it's frustrating to migrate, but I much prefer the existing design.
@lee-orr @MiniaczQ, I value your opinion here, but I'm leaning towards closing as wont-fix.

I understand the design decision around it, my main issue was that out of the box it was not possible to synchronize system generated content with the state-generated ones. With the command extension I can solve my sync issues, but bevy doesn't (or at least I haven't seen) offer a good way to do it.

I think the current "intended approach" is that, when using states, they form the structural basis for setup and teardown rather than relying on Startup. I immediately jump to something like a loading state as the "classic" example of the situation we're in here.
The other option, which was discussed but we never implemented, is the ability to remove a mutable state (basically set it to None) at will, and re insert it later. If we added this, it would enable you to do the Startup stuff while those states are None, and then set them to their initial values.

IMO this is an intended part of the design: there should never be a gap (including at startup) where you are in a state but its invariants have not been applied. I definitely understand that it's frustrating to migrate, but I much prefer the existing design.
@lee-orr @MiniaczQ, I value your opinion here, but I'm leaning towards closing as wont-fix.

I understand the design decision around it, my main issue was that out of the box it was not possible to synchronize system generated content with the state-generated ones. With the command extension I can solve my sync issues, but bevy doesn't (or at least I haven't seen) offer a good way to do it.

I think the current "intended approach" is that, when using states, they form the structural basis for setup and teardown rather than relying on Startup. I immediately jump to something like a loading state as the "classic" example of the situation we're in here.
The other option, which was discussed but we never implemented, is the ability to remove a mutable state (basically set it to None) at will, and re insert it later. If we added this, it would enable you to do the Startup stuff while those states are None, and then set them to their initial values.

Nah, the additional variant and the command extension works miracles for me. It lets me bridge the two approaches as needed and I have fine control over what's in the world when the state changes regardless of schedule

For what it's worth, I think the StateTransition schedule running twice in the same frame, but only on the very first frame (in Startup and then after PreUpdate), doesn't make sense and should be changed.
If we consider a state type like enum Foo { A, B, C } to be defining three mutually exclusive states that the app can be in, then before the initial state transition, the app is just... not in any of them yet. Which is fine. With state disabling / enabling, this will become more obvious.


taginfo for relation roles

Enabled taginfo suggestions for roles on relation members and memberships.

Awesome, thanks!!


python3Packages.spotipy: 2.16.1 -> 2.17.1

Motivation for this change
Update to latest upstream release 2.17.1
Change log: https://github.com/plamere/spotipy/blob/master/CHANGELOG.md#2171---2021-02-28
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

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

3 packages built:

home-assistant
python38Packages.spotipy
python39Packages.spotipy


Add summary info; fixes #34

Codecov Report

Merging #35 into master will increase coverage by 0.7%.
The diff coverage is 100%.

@@            Coverage Diff            @@
##           master      #35     +/-   ##
=========================================
+ Coverage   95.15%   95.86%   +0.7%
=========================================
  Files           5        6      +1
  Lines         681      749     +68
=========================================
+ Hits          648      718     +70
+ Misses         33       31      -2

Impacted Files
Coverage Δ

lineage/snps.py
100% <100%> (ø)

lineage/individual.py
96.05% <100%> (-0.08%)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0ddad9e...9bb0368. Read the comment docs.


Please delete my data from this package

Hi,
I kindly ask you to delete all my data from this package.
Thanks
michelecurletta

@michelecurletta Hi! It's done in 1.0.3. Please check.


[UI] Missing error code/message for mesheryctl system restart

Current Behavior

When attempting to restart with mesheryctl system restart, I didn't see any error message.
Desired Behavior

./mesheryctl system restart
Meshery deployments will be deleted from your cluster. Are you sure you want to continue [y/n]? y
Restarting Meshery...
Stopping Meshery resources...
Deleting Meshery Namespace...
Meshery resources are stopped.
Starting Meshery...

Meshery deployed on Kubernetes.
Meshery is starting...
Error:

Screenshots/Logs

Needs to have the appropriate error message/code for this when attempting to restart the resources with mesheryctl system restart.
Environment

Browser: Chrome Safari Firefox
Host OS: Mac Linux Windows
Meshery Server Version: stable-v
Meshery Client Version: stable-v
Platform: Docker Kubernetes

Contributor Guides and Handbook

🎨 Wireframes and designs for Meshery UI in Figma
🖥 Contributing to Meshery UI
🙋🏾🙋🏼 Questions: Discussion Forum and Community Slack

bump

I think I can fix this. Can you assign me this issue? @acald-creator

Is any error printing? @acald-creator

@leecalcote Sir PR is failing again and again without even making changes. I created a test PR to check the same in PR #7319

These unit tests changed yesterday. Be sure to pull the latest changes from master / HEAD.

I have pulled the latest code several times... Formatted the code now getting only 1 error instead of 3... progressing


Support nested objects in set_attribute_by_name() via magicattr

Fix
I propose using magicattr for implementing set_attribute_by_name(). While this does introduce an additional dependency, I think it is better than the alternatives of either reinventing the wheel or using exec() directly.
Problem
Originally, set_attribute_by_name() sets an attribute specified by its string name via regex. However, for a name such as "some_list[0].some_attrib", it would be matched by module_pattern, which would in turn interpret "some_list[0]" as the name of a submodule and an attribute of the parent object obj, and call getattr(obj, "some_list[0]") to retrieve it. However, getattr() does not support accessing the member of a list/dict attribute directly and would thus fail.
Fixes #882. While #882 concerns the issue of using both a list of predictors and that the predictors are typed, I think the use of typed predictors is not the root cause of the issue. The original regex implementation works just fine with non-nested list/dict attributes, but when using typed predictors, note that TypedPredictor wraps a Predict object in the predictor attribute. Therefore, the actual predictor/parameter would not be named as "predictor_list[0]", but rather "predictor_list[0].predictor" and trigger the issue.
I encountered this issue without using typed predictors, but rather simply using assert_transform_module() on nested modules with lists and dicts of other modules.

Ah interesting, thanks @theta-lin !
@Shangyint thoughts?

Thanks @theta-lin!
This is a great improvement over the existing error-prone code. LGTM to merge.

Thanks @theta-lin !


[Nextcloud] Error after upgrading to 10.0.1: unexpected newline

I'm getting
Fatal Error Zend OPcache cannot allocate buffer for interned strings
./run: line 5: syntax error: unexpected newline

from the Wonderfall/nextcloud container after startup.
I've tried tag 10.0 and latest and an image pulled 44 hours ago.
I'm using an image from 13 days ago now and it works again.

I've just upgraded flawlessly, I couldn't reproduce it. If you didn't try the following trick, could you run manually run.sh in a container so you can maybe get more details from /var/log/php7/error.log ?

Yeah seems to be a problem on my host. I pulled it locally and it works there.
I'm going to investigate it.