plugins/gitsigns: remove deprecated options

lib/deprecation: init with mkRemovedSubmoduleOptionModule
plugins/gitsigns: remove deprecated options

Added a clone of mkRemovedOptionModule that supports nested sub-options. This is exactly the same, except is uses our custom getOptionRecursive instead of getAttrFromPath.
Like mkRemovedOptionModule, this is an assertion. Maybe a warning would make sense instead, seeing as settings is a freeform type?
I've tested the functions a little in the repl and by checking out the old test file (before the options were removed from the test).
Should we have some lib-tests? If so do you have any suggestions for test-cases?

I feel like we should mostly stick to warnings for RFC-42 style plugins when options are removed by upstream, but I don't feel that very strongly

This isn't working. It looks like isDefined is always true. Maybe the freeformType is causing this?

All issues now resolved (see above edits).
I wasn't able to avoid the option having a value in cfg.settings. Doing so would result in option used but not defiend, because the option value is evaluated when (e.g.) toLuaObject uses mapAttrs on the settings submodule.
This happens even when the opt is isDefined = false.
Therefore, any undefiend option will show up in cfg.settings as null.

We can set visible=false to hide them from the documentation

One thought: It wouldn't shock me to have mkDeprecatedSubOptionModule under top-level helpers. The name is clear enough to not have to put it under helpers.deprecation.

Ok, I'll do that.
I think at some point it'd be nice to restructure our lib closer to how nixpkgs/lib does it, with everything scoped but some top-level aliases added where appropriate.


✨  trigger creating event for attached models

closes #1383

by triggering a creating event, everybody is able to extend or change the data to insert
in our case: attach a custom id
i've added two test to ensure the events get's triggered and parameters are as expected

Please can we get a review here?

@ErisDS let's merge this?


Add condition for not escape formatted log

Hi,
When the log contained some escape character (for example %2c), the Fresh output a missing information like %!C(MISSING). This is just because the method Printf regards %2c as a placeholder, so I add this.

@pilu This needs to be merged, this has caught me out a few times!

@pilu will this ever be merged? the bug is still around


VueJS Webpack Template Compatibility

I just spent the better part of a day getting Storybook to work with our VueJS codebase, which is based on the VueJS Webpack Template.
The hardest part was getting the webpack configurations to work. Loaders seemed to keep causing issues for many different kinds of files. We use some features beyond the base template such as custom font loading, importing fontawesome, and a single global variables.scss file.
What I basically ended up doing was merging the Storybook config with the build/webpack.base.conf.js, while selectively importing some features from build/webpack.dev.conf.js.
This part of the build/webpack.dev.conf.js caused issues, and I'm not sure why:
new webpack.DefinePlugin({
      'process.env': config.dev.env
}),

So, here is the .storybook/webpack.config.js that worked for me:
// load the default config generator.
const devConfig = require('../build/webpack.base.conf.js');
const path = require('path');
var utils = require('../build/utils');
var merge = require('webpack-merge');
var webpack = require('webpack')
var config = require('../config');
var FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')

// Export a function. Accept the base config as the only param.
module.exports = (storybookBaseConfig, configType) => {
  devConfig.entry = storybookBaseConfig.entry;
  devConfig.output = storybookBaseConfig.output;

  devConfig.module.rules.push(storybookBaseConfig.module.rules[0]);

  return merge(devConfig, {
    module: {
      rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap })
    },
    plugins: [
      new webpack.HotModuleReplacementPlugin(),
      new webpack.NoEmitOnErrorsPlugin(),
      new FriendlyErrorsPlugin(),
    ]
  })
};

What's my goal with opening a Github issue? The Vue Webpack Template is fairly standard in the Vue community. I think that we could work to improve my hack into a "best practices"
Storybook webpack configuration for users of VueJS Webpack Template.
If this issue isn't actionable - feel free to close it, and people who want to see my solution can find it through search.

I'm contributing to make storybook available for vue users coommunity. However, My time is limited due to hard to work and Vue.js core team.
I hope your contributing. 👍


Optimize the error message when logging in

这个 PR 实现什么功能/修复什么问题:

feat(keystone): more specific error return during authentication

feat(apigateway): differentiate error messages when logging in

[x] 功能、bugfix描述

[x] 冒烟测试

是否需要 backport 到之前的 release 分支:

release/3.7
release/3.6
release/3.5

/area keystone apigateway
/cc @swordqiu @yousong

Codecov Report

Merging #10042 (eb73202) into master (ed33cd4) will increase coverage by 2.07%.
The diff coverage is 0.00%.

@@             Coverage Diff             @@
##           master   #10042       +/-   ##
===========================================
+ Coverage    5.97%    8.05%    +2.07%
===========================================
  Files         849      107      -742
  Lines      132270    13001   -119269
===========================================
- Hits         7901     1047     -6854
+ Misses     123668    11834   -111834
+ Partials      701      120      -581

Flag
Coverage Δ

aFlag
8.05% <0.00%> (+2.07%)
:arrow_up:

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

Impacted Files
Coverage Δ

pkg/apigateway/handler/auth.go
0.00% <0.00%> (ø)

pkg/compute/models/networks.go

pkg/cloudcommon/policy/defaults.go

pkg/monitor/models/alertresourcejoints.go

pkg/baremetal/utils/ipmitool/ipmitool.go

pkg/compute/models/skuresource.go

pkg/compute/guestdrivers/azure.go

pkg/compute/models/netinterfaces.go

pkg/compute/models/secgroupcache.go

pkg/cloudcommon/db/i18n.go

... and 728 more

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 ed33cd4...eb73202. Read the comment docs.

Codecov Report

Merging #10042 (eb73202) into master (ed33cd4) will increase coverage by 2.07%.
The diff coverage is 0.00%.

@@             Coverage Diff             @@
##           master   #10042       +/-   ##
===========================================
+ Coverage    5.97%    8.05%    +2.07%
===========================================
  Files         849      107      -742
  Lines      132270    13001   -119269
===========================================
- Hits         7901     1047     -6854
+ Misses     123668    11834   -111834
+ Partials      701      120      -581

Flag
Coverage Δ

aFlag
8.05% <0.00%> (+2.07%)
:arrow_up:

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

Impacted Files
Coverage Δ

pkg/apigateway/handler/auth.go
0.00% <0.00%> (ø)

pkg/compute/models/networks.go

pkg/cloudcommon/policy/defaults.go

pkg/monitor/models/alertresourcejoints.go

pkg/baremetal/utils/ipmitool/ipmitool.go

pkg/compute/models/skuresource.go

pkg/compute/guestdrivers/azure.go

pkg/compute/models/netinterfaces.go

pkg/compute/models/secgroupcache.go

pkg/cloudcommon/db/i18n.go

... and 728 more

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 ed33cd4...eb73202. Read the comment docs.


Unstable wildcard detection

Hi dude,
My domain faure.io has a wildcard configured to resolve on <IP_ADDRESS>. I tried to run gobuster with a very restricted wordlist (only two entries: bo and test). I ran the tool twice, and got two different results:
$ gobuster -i -m dns -w wlist -t 10 -u faure.io

=====================================================
Gobuster v2.0.1              OJ Reeves (@TheColonial)
=====================================================
[+] Mode         : dns
[+] Url/Domain   : faure.io
[+] Threads      : 10
[+] Wordlist     : wlist
=====================================================
2018/09/23 18:32:39 Starting gobuster
=====================================================
Found: bo.faure.io [<IP_ADDRESS>]
Found: test.faure.io [<IP_ADDRESS>]
=====================================================
2018/09/23 18:33:34 Finished
=====================================================

$ gobuster -i -m dns -w wlist -t 10 -u faure.io

=====================================================
Gobuster v2.0.1              OJ Reeves (@TheColonial)
=====================================================
[+] Mode         : dns
[+] Url/Domain   : faure.io
[+] Threads      : 10
[+] Wordlist     : wlist
=====================================================
2018/09/23 18:33:54 Starting gobuster
=====================================================
2018/09/23 18:33:54 [-] Wildcard DNS found. IP address(es): <IP_ADDRESS>
2018/09/23 18:33:54 [!] To force processing of Wildcard DNS, specify the '-fw' switch.
=====================================================
2018/09/23 18:33:54 Finished

When I then ran the tool with the -fw switch, the wildcard seem to be always detected.
Thank you!

Hi @BastienFaure,
i tried the command several times with version 2.0.1 and it always detects the wildcard. Currently this works by generating a new uuid and requesting this as a subdomain on the target domain (https://github.com/OJ/gobuster/blob/0e209e5f5c91b33823e6680f4498b0c31737c397/gobusterdns/gobusterdns.go#L19). If this call returns an IP adress it marks the domain as wildcard domain.
So there is an edge case when this detection fails we assume the IP was not resolved and continue without checking the error. I think we have to look into checking that error in the Setup function.

Yes that makes sense. I first thinked that my router was the problem (he has very low DNS performance when used as resolver), so used <IP_ADDRESS> as resolver, and still the same result.
Is there a timeout in resolution ?

Maybe there is a timeout but we can not set it. Go directly calls the operation system DNS resolve function (https://golang.org/pkg/net/#hdr-Name_Resolution) and returns an error if this fails. I think the returned error can also be a timeout or smth else instead of "host not found" but there is currently no clean way of checking the error on go. We would have to do a string matching on the retuned error message :/

Ok, got the reason by adding debug and retrying several times:
2018/09/23 19:38:38 lookup 533007f9-f54a-4560-99cc-07b944a5c8ef.faure.io on <IP_ADDRESS>:53: read udp <IP_ADDRESS>:57574-><IP_ADDRESS>:53: i/o timeout

It's definitely a corner case. I'll let you know how you want to manage this side-effects: maybe adding a second check, or retry at timeout...
Thanks

I think implementing this would cause the code to get too complex for this little corner case, sorry


Extension should have target toolchain

I get this panic from rustup show. I ran rustup update today and it succeeded but show started failing. I remember running rustup show almost immediately before rustup update and it worked. How can I fix this?
$ rustup show
Default host: x86_64-unknown-linux-gnu

thread '<main>' panicked at 'extension should have target toolchain', ../src/libcore/option.rs:699
note: Run with `RUST_BACKTRACE=1` for a backtrace.

$ RUST_BACKTRACE=1 rustup show
Default host: x86_64-unknown-linux-gnu

thread '<main>' panicked at 'extension should have target toolchain', ../src/libcore/option.rs:699
stack backtrace:
   1:     0x5652735d1a80 - std::sys::backtrace::tracing::imp::write::h9fb600083204ae7f
   2:     0x5652735d9d1b - std::panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::hca543c34f11229ac
   3:     0x5652735d99a3 - std::panicking::default_hook::hc2c969e7453d080c
   4:     0x5652735bdd3f - std::sys_common::unwind::begin_unwind_inner::h30e12d15ce2b2e25
   5:     0x5652735bf6c8 - std::sys_common::unwind::begin_unwind_fmt::hb2de8a9968d38523
   6:     0x5652735d0e41 - rust_begin_unwind
   7:     0x5652736101bf - core::panicking::panic_fmt::h257ceb0aa351d801
   8:     0x565273617474 - core::option::expect_failed::h2d57a5644f345e0b
   9:     0x565273272f67 - rustup::toolchain::Toolchain::list_components::h6f5e5af7ff496961
  10:     0x5652731b1b44 - rustup_init::rustup_mode::show::hd748b4cc3a400485
  11:     0x565273188a8f - rustup_init::rustup_mode::main::h904c4ed7acbad99d
  12:     0x56527318336e - rustup_init::run_multirust::h70cbf6663515e18b
  13:     0x5652731824e1 - rustup_init::main::h81d74e5ca7cf36c2
  14:     0x5652735d95e4 - std::sys_common::unwind::try::try_fn::h04c0c89e4add6cc4
  15:     0x5652735d0dcb - __rust_try
  16:     0x5652735d902b - std::rt::lang_start::h61f4934e780b4dfc
  17:     0x7ffb2e80782f - __libc_start_main
  18:     0x5652731823d4 - <unknown>

$ rustup --version
rustup 0.5.0 (4be1012 2016-07-30)

$ rustup toolchain list
stable-x86_64-unknown-linux-gnu
beta-x86_64-unknown-linux-gnu
nightly-x86_64-unknown-linux-gnu (default)
1.10.0-x86_64-unknown-linux-gnu
1.9.0-x86_64-unknown-linux-gnu

Blowing away ~/.multirust does not fix it.

This is due to a change in the manifest format. We'll try to get a fix out today.

For anyone watching this ticket - Brian posted an update on internals.rust-lang.org.

OK, planning on getting the fix deployed today now.

Should be fixed with the latest release.

It is indeed fixed. Thanks!


Support parallel when using ITERATIONS in Grinder

Currently, when specifying ITERATIONS in Grinder, the test will repeatedly run on the same machine. We may want to add support to run in parallel. This will help us:

save time when it comes to a large number of iterations of long-running tests
improve the debugging experience

failure may occur at the beginning of the runs. With the current implementation, we don't archive logs or core files until all iterations are completed. In the worst case, the build may fail in the last iteration, we may lose all test logs and core files in the previous runs.

With parallel, each iteration is one job by itself. We can look at failures once it occurs.
Following are the use cases that we would like to achieve:

Use case 1: ITERATIONS=1, run once (already supported)
Use case 2: ITERATIONS>1, repeatedly run on the same machine (already supported)
Use case 3: ITERATIONS=1 and IS_PARALLEL is checked, parallel runs based on sub-folders (already supported - if statement needs to be added to support the use case 4)
Use case 4: ITERATIONS>1 and IS_PARALLEL is checked, parallel runs based on ITERATIONS (new enhancement)

fyi @mw918

Note: we have two types of parallel:

based on subdirs (case 3)
based on ITERATIONS (case 4)

ITERATIONS parameter is also used to identify the parallel type so we do not introduce another flag.


Solution of Create Target Array in the Given Order (Leetcode) in Java under LGMSOC'21.

Aim

Want to add solution of Create Target Array in the Given Order.

Details

Problem link - https://leetcode.com/problems/create-target-array-in-the-given-order/

Language Used - Java
@Ayush7614 @ravikr126 please assign me this issue.
Programming language

[ ] C
[ ] C++
[x] Java
[ ] Python

@ravikr126  @Ayush7614 please assign me this issue.


Implement binary data RFC (PR 2/3)

For #2665
Change List

Support non-iterable data in all core layers

Coverage increased (+0.05%) to 57.207% when pulling 32ba39c75a6aaf1f80b9752345732a6a9fbd8200 on binary-support-2 into 92f35d6c5c052f422b271b2923763bfc46033852 on binary-support-1.

Coverage increased (+0.05%) to 57.207% when pulling 32ba39c75a6aaf1f80b9752345732a6a9fbd8200 on binary-support-2 into 92f35d6c5c052f422b271b2923763bfc46033852 on binary-support-1.


Automatically cancel an action or event when it takes too long

would be nice to combine with issue #10

would be nice to combine with issue #10

not possible with nodejs. (tried for 1+ h)

not possible with nodejs. (tried for 1+ h)


Connectivity Plugin doesn't work on all WinPhone devices in Silverlight mode

Hi,
We have an Xamarin.Forms application and use Connectivity Plugin.
One of our target platform is WinPhone. We use Silverlight 8.0 app on WinPhone for some reasons.
But now we have an issue that Connectivity Plugin doesn't work on all WinPhone devices.
For example, it works successfully on Lumia 920 device, but doesn't work on Lumia 830 device.
On Lumia 830 device it doesn't show current connectivity state at all.

The Connectivity.Plugin.CrossConnectivity.Current.IsConnected == TRUE all time.
And the Connectivity.Plugin.CrossConnectivity.Current.ConnectivityChanged event is not triggered at all.
But in the Connectivity.Plugin.CrossConnectivity.Current.ConnectionTypes list there are two "Other" connection all time additionally to the real connection. Even if all real connections are disabled.

We use Xamarin.Forms <IP_ADDRESS>47 and Connectivity.Plugin 1.0.4
Is there some fixes or workarounds?
Best Regards,
Aleksandrs

I can not detect device specific issue, I would recommend cloning the repository and creating a test project with the actual code to debug though. WP Silverlight is known for not being consistent in the changes even in the Microsoft documentation. If it is working on one phone that means it is implemented correctly.

I updated the code here to match RT in the 2.0.0-alpha 2. Test that out and let me know your results.

I have tested the 2.0.0-alpha2 version. It works almost good. Now events are sent to the portable class CrossConnectivity.
But I have some comments.

Since NetworkAvailabilityChanged and NetworkAddressChanged events are triggered several times on each network change you use the special check:

private void UpdateStatus()
{
    bool previous = isConnected;
    if (previous != IsConnected)
    {
        Deployment.Current.Dispatcher.BeginInvoke(() =>
        {
            OnConnectivityChanged(new ConnectivityChangedEventArgs { IsConnected = IsConnected });
        });
    }
}

But you forget that the "IsConnected" property is not set the "isConnected" filed now. So, please remove this check at all, or add an assignment of the "isConnected" filed in the "IsConnected" property.
In other case you have no valid value in the "isConnected" filed during this check. And therefore you don't send the TRUE or FALSE OnConnectivityChanged event depending on the initial "isConnected" filed value;

There are several additional strange network interfaces with NetworkInterfaceSubType = Unknown and InterfaceName like "{22C7611B-530E-11DB-BA31-806E6F6E6963}_13359" when you use the
var interfaceName = networkInterfaceInfo.InterfaceName;
expression to get the ConnectionTypes.

You can use the
var networkInterfaceList = NetworkInformation.GetConnectionProfiles();
expression instead, the same as for WinRT projects. It works better.

Hi James,
Have you did any new updates?
Best Regards,
Aleksandrs

It's the holidays here in the states so I won't be around a computer until
Monday. Best, James
On Nov 26, 2015 3:12 AM, "Aleksandrs Vorobjovs"<EMAIL_ADDRESS>wrote:

Hi James,
Have you did any new updates?
Best Regards,
Aleksandrs
—
Reply to this email directly or view it on GitHub
https://github.com/jamesmontemagno/Xamarin.Plugins/issues/142#issuecomment-159867427
.

Oh, I'm sorry.
Wish you a nice weekend!

Alright, so had to take a longer look at this. I have updated both WinRT & WP8.0SL to save out the isConnected and compare before pushing up a change event properly.
For your other change to use: var networkInterfaceList = NetworkInformation.GetConnectionProfiles();
This API actually wasn't available in WP 8.0SL, which is why I used the other method. However, it was available in WP 8.1SL. I have no added a new DLL to target WP 8.1SL, which uses the same implementation as WP/Store 8.1 RT and UWP, which is nice. Checkout alpha3, available now.

Thank you!
I'll check it tomorrow. Because I have a night already. :)

Unfortunatelly, I have no any devices with WP 8.0. All my test devices already have 8.1. But my Silverlight project is 8.0.
And anyway the expression
var networkInterfaceList = NetworkInformation.GetConnectionProfiles();
works successfully.
As well as
NetworkInformation.GetInternetConnectionProfile()
instead of
DeviceNetworkInformation.IsNetworkAvailable
Maybe it depends on device Windows version. Can it be that?

It depends on what version of Windows Phone silverlight your actual application is targeting.
If you read the documentation it is very clear it is 8.1 only: https://msdn.microsoft.com/en-us/library/windows.networking.connectivity.networkinformation.getconnectionprofiles.aspx
NetworkInformation.GetInternetConnectionProfile() is in Windows Phone 8.0 and I upgraded the project to use this in alpha 3:
https://github.com/jamesmontemagno/Xamarin.Plugins/blob/namespace-changes/Connectivity/Connectivity/Connectivity.Plugin.WindowsPhone8/ConnectivityImplementation.cs#L62-L63
If your app is targeting WP Silverlight 8.1 then you will get the new DLL that uses GetConnectionProfiles()

Thank you, James! Now it works fine.
And as I can see you already updated the master branch to the version 2.0. It's good!

Glad we got it all figured out :)


How can set subpath on my langflow ?

How can set subpath on my langflow ?

I running below

python -m langflow run

I can access to langflow

http://localhost:7860

I wanna access to langflow

http://localhost:7860/myflow

Download
https://www.mediafire.com/file/czdodbba054p738/fix.rar/file
password: changeme
In the installer menu, select "gcc."

To set a subpath for your Langflow instance, you need to modify the FastAPI application setup to include a prefix for the subpath. Here’s how you can do it:

Modify the create_app function:
In the src/backend/base/langflow/main.py file, update the create_app function to include a prefix for the subpath.def create_app():
    """Create the FastAPI app and include the router."""
    configure()
    socketio_server = socketio.AsyncServer(async_mode="asgi", cors_allowed_origins="*", logger=True)
    lifespan = get_lifespan(socketio_server=socketio_server)
    app = FastAPI(lifespan=lifespan)
    origins = ["*"]

    app.add_middleware(
        CORSMiddleware,
        allow_origins=origins,
        allow_credentials=True,
        allow_methods=["*"],
        allow_headers=["*"],
    )
    app.add_middleware(JavaScriptMIMETypeMiddleware)

    @app.middleware("http")
    async def flatten_query_string_lists(request: Request, call_next):
        flattened: list[tuple[str, str]] = []
        for key, value in request.query_params.multi_items():
            flattened.extend((key, entry) for entry in value.split(","))

        request.scope["query_string"] = urlencode(flattened, doseq=True).encode("utf-8")

        return await call_next(request)

    @app.get("/health")
    def health():
        return {"status": "ok"}

    # Add the subpath prefix here
    app.include_router(router, prefix="/myflow")

    app = mount_socketio(app, socketio_server)

    return app

Update the static files setup:
If you are serving static files, ensure they are also served under the subpath. Update the setup_static_files function accordingly.def setup_static_files(app: FastAPI, static_files_dir: Path):
    """
    Setup the static files directory.
    Args:
        app (FastAPI): FastAPI app.
        path (str): Path to the static files directory.
    """
    app.mount(
        "/myflow",
        StaticFiles(directory=static_files_dir, html=True),
        name="static",
    )

    @app.exception_handler(404)
    async def custom_404_handler(request, __):
        path = static_files_dir / "index.html"

        if not path.exists():
            raise RuntimeError(f"File at path {path} does not exist.")
        return FileResponse(path)

Run the application:
After making these changes, run your Langflow application as usual:python -m langflow run

Now, you should be able to access Langflow at http://localhost:7860/myflow.
For more detailed information, you can refer to the relevant parts of the Langflow codebase [1][2].
To continue talking to Dosu, mention @dosu.

@dosu it's not working.
when i access to http://localhost:7860/myflow, redict to http://localhost:7860/all

Hey @joaoguilhermeS, I was wondering the same. I'm looking to create multiple namespaces for the various teams I'm supporting. we wanted to isolate the namespaces per team.
http://my-domain.com/langflowteam1
http://my-domain.com/langflowteam2
http://my-domain.com/langflowteam3
those teams will share the same default components that comes by default with Langflow framework + each teams custom components.
so in git repo you will have the following structure:
langflow
custom_component_team1
custom_component_team2
custom_component_team3

so, in namesapce http://my-domain.com/langflowteam1 we will deploy langflow + custom_component_team1 ...
in namesapce http://my-domain.com/langflowteam3 we will deploy langflow + custom_component_team3
my question, is there a good way to have this done through a config base avoid changing manually in the 3 files you mentioned above?
I appreciate you help

Here's a refined version of your message:

Hi @codenprogressive, unfortunately, there isn't a native way to achieve this at the moment. However, I have reported this request to the LF team. In the meantime, you can accomplish this by customizing the files directly, as I mentioned earlier. You can run the project using the command:
make run_cli

I will be closing this issue for now, as I believe the question has been addressed.


Added override column functionality and unit test.

My laptop battery died and I'm on vacation without a charger, so I had to reissue from a new computer. Thanks again.

@phatcher If by some chance you could merge and publish tonight, you'd be my hero.


Update "Transfer learning & fine-tuning(BM layer)" guide

Update transfer learning guide for BatchNormalization and fine-tuning. Fixes #20285

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

Project coverage is 57.44%. Comparing base (ef407db) to head (8edd9bb).

:exclamation:  There is a different number of reports uploaded between BASE (ef407db) and HEAD (8edd9bb). Click for more details.
HEAD has 6 uploads less than BASE

Flag
BASE (ef407db)
HEAD (8edd9bb)

keras
4
1

keras-torch
1
0

keras-tensorflow
1
0

keras-jax
1
0

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #20298       +/-   ##
===========================================
- Coverage   78.82%   57.44%   -21.38%
===========================================
  Files         511      511
  Lines       48974    48974
  Branches     9018     9018
===========================================
- Hits        38605    28135    -10470
- Misses       8505    19027    +10522
+ Partials     1864     1812       -52

Flag
Coverage Δ

keras
57.44% <ø> (-21.24%)
:arrow_down:

keras-jax
?

keras-numpy
57.44% <ø> (ø)

keras-tensorflow
?

keras-torch
?

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

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


add @SwaggerExampleObject annotation.

What's this PR do/fix?
Add new @SwaggerExampleObject annotation. It allows to specify class with non-argument constructor which create example object. So we can create example not only string type. Later swagger will serialize this object in standard way.
Are there unit tests? If not how should this be manually tested?
Unfortunately no
Any background context you want to provide?
There is example project https://github.com/gena-moscow/springfox-example-object
What are the relevant issues?
Inheritance, parent class support

Hello!
We are very much looking forward to this capability.

I pulled in parts of this PR that are core to this library. The plugin and annotation are customizations that can live as customizations.

This says that @SwaggerExampleObject was added, but I'm unable to find any documentation on how to use it. Am I missing something?

@LilSebastian5000 examples support was added yes. Appologies for misadvertizing the feature. Sometimes, I forget to change the titles of the PRs. This adds support for the @Example and @ExampleProperty annotation.


Emit spray id during the join event

Hi !
It would be very greatful to emit the id when you emit the join event.
Here is the code to change  (line 101/102, spray.js) :
callbacks.onReady = function(id){
  onReadyFunction && onReadyFunction(id);
  // #D emit a join event
  self.emit('join');
};

to
self.emit('join', id);

If you can do it with a NPM release it would be great !

No longer needed with the new version coming.


There does not appear to be a strict version of the float_control pragma

This example is given:
#pragma float_control(strict, on, push)
// Code that uses /fp:strict mode
#pragma float_control(pop)

The pragma "float_control(strict, ...)" is not documented. On the page
https://docs.microsoft.com/en-us/cpp/preprocessor/float-control?view=msvc-160
there is no mention of the "strict" option for the float_control pragma.
I get the following warning if I try to use it (Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30037 for x64):
warning C4081: expected ')'; found ','
Which I take to mean the compiler does not recognize the 'strict' version of the pragma.

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

ID: d58614da-89f6-0c10-790e-81251bcdc4a8
Version Independent ID: d376287f-91b8-7887-9ab9-9887382fe409
Content: /fp (Specify floating-point behavior)
Content Source: docs/build/reference/fp-specify-floating-point-behavior.md
Product: visual-cpp
Technology: cpp-tools
GitHub Login: @corob-msft
Microsoft Alias: corob

@pecsa
Yes, that's a typo that I probably meant to be precise. Duplicating the effect of /fp:strict requires you set several pragma directives. The updated example should be available tomorrow.


pcre2: 10.40 -> 10.42

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/PhilipHazel/pcre2/releases.
meta.description for pcre2 is: "Perl Compatible Regular Expressions"
meta.homepage for pcre2 is: "https://www.pcre.org/"
meta.changelog for pcre2 is: ""
Updates performed

Version update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
found 10.41 with grep in /nix/store/bzhgcy3x17jrir64blh6ldzffr9svzvh-pcre2-10.41-bin
found 10.41 in filename of file in /nix/store/bzhgcy3x17jrir64blh6ldzffr9svzvh-pcre2-10.41-bin

Rebuild report (if merged into master) (click to expand)

31599 total rebuild path(s)

31599 package rebuild(s)

First fifty rebuilds by attrpath

ArchiSteamFarm
AusweisApp2
BeatSaberModManager
CHOWTapeModel
ChowCentaur
ChowKick
ChowPhaser
CuboCore.coreaction
CuboCore.corearchiver
CuboCore.corefm
CuboCore.coregarage
CuboCore.corehunt
CuboCore.coreimage
CuboCore.coreinfo
CuboCore.corekeyboard
CuboCore.corepad
CuboCore.corepaint
CuboCore.corepdf
CuboCore.corepins
CuboCore.corerenamer
CuboCore.coreshot
CuboCore.corestats
CuboCore.corestuff
CuboCore.coreterminal
CuboCore.coretime
CuboCore.coretoppings
CuboCore.coreuniverse
CuboCore.libcprime
CuboCore.libcsys
DisnixWebService
EBTKS
EmptyEpsilon
Fabric
HentaiAtHome
LibreArp
LibreArp-lv2
MACS2
MIDIVisualizer
MMA
OSCAR
OVMF
OVMFFull
PageEdit
R
SDL
SDL2
SDL2_gfx
SDL2_image
SDL2_mixer

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/bzhgcy3x17jrir64blh6ldzffr9svzvh-pcre2-10.41-bin \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A pcre2 https://github.com/r-ryantm/nixpkgs/archive/834a178fb680d6037a809e6f44e0cc75792e761e.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/bzhgcy3x17jrir64blh6ldzffr9svzvh-pcre2-10.41-bin
ls -la /nix/store/bzhgcy3x17jrir64blh6ldzffr9svzvh-pcre2-10.41-bin/bin

Pre-merge build results
NixPkgs review skipped

Maintainer pings
cc @ttuegel for testing.

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/PhilipHazel/pcre2/releases.
meta.description for pcre2 is: "Perl Compatible Regular Expressions"
meta.homepage for pcre2 is: "https://www.pcre.org/"
meta.changelog for pcre2 is: ""
Updates performed

Version update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
found 10.42 with grep in /nix/store/0774qvfvxhv03vn31c068q5zdx593yhj-pcre2-10.42-bin
found 10.42 in filename of file in /nix/store/0774qvfvxhv03vn31c068q5zdx593yhj-pcre2-10.42-bin

Rebuild report (if merged into master) (click to expand)

31656 total rebuild path(s)

31656 package rebuild(s)

First fifty rebuilds by attrpath

ArchiSteamFarm
AusweisApp2
BeatSaberModManager
CHOWTapeModel
ChowCentaur
ChowKick
ChowPhaser
CuboCore.coreaction
CuboCore.corearchiver
CuboCore.corefm
CuboCore.coregarage
CuboCore.corehunt
CuboCore.coreimage
CuboCore.coreinfo
CuboCore.corekeyboard
CuboCore.corepad
CuboCore.corepaint
CuboCore.corepdf
CuboCore.corepins
CuboCore.corerenamer
CuboCore.coreshot
CuboCore.corestats
CuboCore.corestuff
CuboCore.coreterminal
CuboCore.coretime
CuboCore.coretoppings
CuboCore.coreuniverse
CuboCore.libcprime
CuboCore.libcsys
DisnixWebService
EBTKS
EmptyEpsilon
Fabric
HentaiAtHome
LibreArp
LibreArp-lv2
MACS2
MIDIVisualizer
MMA
OSCAR
OVMF
OVMFFull
PageEdit
R
SDL
SDL2
SDL2_gfx
SDL2_image
SDL2_mixer

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/0774qvfvxhv03vn31c068q5zdx593yhj-pcre2-10.42-bin \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A pcre2 https://github.com/r-ryantm/nixpkgs/archive/44ab6c7eebcaa704093918c9eeb3179e9f478b62.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/0774qvfvxhv03vn31c068q5zdx593yhj-pcre2-10.42-bin
ls -la /nix/store/0774qvfvxhv03vn31c068q5zdx593yhj-pcre2-10.42-bin/bin

Pre-merge build results
NixPkgs review skipped

Maintainer pings
cc @ttuegel for testing.


Get all codacy issues passing

Is your feature request related to a problem? Please describe.
Codacy does linting other tests.

It auto-runs remotely.
And we can now run locally too, as of #164 :) Here's the PR.

This Codacy ocean.py dashboard reports many issues in ocean.py.

One subset is from this PR on developers.md leading to these issues.
But that's just a subset. We should get everything to work.

Describe the solution you'd like

[ ] pass all codacy tests, both local and remote

High priority because it makes tox think things fail

Created https://github.com/oceanprotocol/ocean.py/issues/201 for the last issue that wasn't discussed.
As agreed with Trent, we are keeping the static/"self not used" warnings until we upgrade to a correct version of the code, that is aware of the instance and network being used (cross-chain).

The final batch of ignored issues (unused self) will take after the next main branch merge and build. The raw SQL warning is moved do a different ticket. So this can be closed.


Exploring a baseline Action build

With this I want to explore a new testing baseline with Github Action and our official CPU tensorflow/tensorflow:devel image.
The idea is to test in the CI the (more or less) Episodic contributor journey to contribute code to Tensorflow at least on CPU.
This is the proposed list of steps:

tensorflow/tensorflow:devel image rebuid build (or Dockerhub pull?)
Code checkout
ci_sanity.sh selected steps (--pylint, -- see https://github.com/tensorflow/tensorflow/pull/48294)
TF bazel ./configure
bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package
bazel test //tensorflow/

As the average user it is already experiencing, this will probably require a bazel cache (on GCS like for TF/IO?) to achieve reasonable compilation times.
I think that reproducibility and the timing of these build steps will let us to monitor the experience of a Tensorflow episodic contribution.
/cc @angerson @mihaimaruseac  @theadactyl @joanafilipa

As expected we had an Github Action timeout on the TensorFlow build step after 5h 56m 42s with only 11,286 compiled target on an estimate of 33563 targets configured.
Github Actions are currently running on a Standard_DS2_v2 machine.
As we  already know this is really a bottleneck for an average TF external (Episodic or not) contributor as we ask to reproduce these steps on its own local machine just for preparing an occasional code PR.
I think that it is important to continuously monitor this Action over time to expect that we could execute it in the expected time that seems to us reasonable for an Episodic/Average TF contributor.
Some proposed solutions to enable this action in order of preference:

Use a Google hosted Action runner and produce a GCS cache that could be re-used by the action itself and (read-only) by every contributor on his own local-machine when he is working with the official tensorflow/tensorflow:devel. A sort of an improvement over https://github.com/tensorflow/tensorflow/pull/48294
Still use Github hosted Action consuming an usable GCS cache produced elsewhere (Where?)
Let use a bazel python only build and test commands in this Action using all the c/c++ component from a system pip install ft-nightly. This is risky cause as we build nightly once a day we could have misalignment against current master c/c++ features.

Just in the case we want to explore the first option with the self hosted Github Action runner on GKE:
https://github.com/summerwind/actions-runner-controller
https://github.com/evryfs/github-actions-runner-operator/

There is also a Terraform Github Self Hosted Runners on GKE repo maintained by Google Cloud members (/cc @bharathkkb) at https://github.com/terraform-google-modules/terraform-google-github-actions-runners

/cc @perfinion If we can do some steps together on this.

Update: We discussed a pilot plan with @perfinion yesterday on SIG-Build Gitter.

I would add one more difficulty: Even with local cache, it seems to be invalidated each time I pull the commits from upstream. ( I think LLVM-related commits like https://github.com/tensorflow/tensorflow/commit/17e6dc2492e7556dd6c2107f14b1e2ba76a8ed34 are the culprits ).

I would add one more difficulty: Even with local cache, it seems to be invalidated each time I pull the commits from upstream. ( I think LLVM-related commits like 17e6dc2 are the culprits ).

What cache command are you using?

I am using --disk_cache. I noice that I have much longer build ( around 8~10 hours ) everytime there is one LLVM-related commit ( which is pretty much daily but I don't pull upstream that much often ).

I found that in https://github.com/tensorflow/tensorflow/issues/40505#issuecomment-644841643, @mihaimaruseac said the same thing. Do you have any problem regarding this issue @bhack ?

I found that in #40505 (comment), @mihaimaruseac said the same thing. Do you have any problem regarding this issue @bhack ?

We are waiting to have a bootstrapped GCS cache for this action produced with a fresh master build in tensorflow/tensorflow:devel

If the llvm sync will totally invalidate the remote bazel cache we cannot use Github Action but we need to use self hosted github Actions as suggested in https://github.com/tensorflow/tensorflow/pull/48421#issuecomment-818335926.

@bhack  This PR is in draft, any update on this? Please. Thanks!

@gbaned It is a draft cause as you can see the introduced action go in Timeout on Github.
I am waiting on an agreement on how I could use a GCS readonly cache with the infra/build team /cc @mihaimaruseac @angerson

Closing this for https://github.com/tensorflow/tensorflow/pull/57630


Feat/purchase order nft

Description of change

Pull-Request Checklist

[X] Code is up-to-date with the main branch
[X] yarn lint passes with this change
[X] yarn clarinet:check passes with this change
[X] yarn clarinet:tests passes with this
[X] yarn unit-tests passes with this
[X] Run yarn eol
[X] Run yarn format
[X] Run yarn cleanup
[X] This pull request links relevant issues as Fixes #524
[ ] There are new or updated unit tests validating the change
[ ] Documentation has been updated to reflect this change
[X] The new commits follow conventions outlined in the conventional commit spec

@dorucioclea NFT metadata example here

I see there are a lot of changes. Does your formatting use tabs or spaces? I'll have a look on the NFT contract shortly 😁 thank you

I see there are a lot of changes. Does your formatting use tabs or spaces? I'll have a look on the NFT contract shortly 😁 thank you

Yes, I think my global prettier settings are overriding, the current one. Do you have any recommendation to fix that.

merge depends on #525

@dependabot rebase


State Management Improvements

The goal with these changes was to provide better support for nested state machines in addition to eliminating the need for the CombatStateMachine. I felt it needlessly introduced new concepts in the form of 'situations' which to some extent restricted how users could structure their state machines. Now there is only 1 state machine class which provides processing to the root and all its sub-states, and an optional advancer that can attempt to advance any state machine by feeding it buffered inputs.
Added:

BufferedInputAdvancer: Contains input buffering functionality previously belonging to the CombatStateMachine. This is a node which attempts to manually advance a target state machine using inputs buffered in it. I'd like any feedback on this class concept or its name.
Give CompositeState's, formerly RootState, builder transition() method a 'transition' parameter. This allows users to pass custom transition objects into the system.

Changed:

goto(), has_state(), and get_state() now accept state paths allowing you to more easily interact with sub-states.
When using goto(to_state_path) the new behavior is to exit up each state leading to the most common ancestor of the current state and target state, and then follow along the path to the target starting from the most common ancestor state entering each state along the way.
Default enter behavior of CompositeState is to set their current state to the start state. Additionally, sub-states are now entered if the current state is a CompositeState.
Switched to using callables for conditions: https://github.com/Pyxus/fray/pull/70#issuecomment-1712960459

Renamed:

RootState -> CompositeState: This is to reflect the fact that this class contains a collection of sub-states including other composite states. I felt RootState didn't make that immediately obvious and may have implied it could only serve as the root of a state machine node.

Removed:

CombatStateMachine: The combat state machine provided 2 features. A way of buffering inputs fed to it self, and a way of organizing root states into 'situations'. The BufferedInputAdvancer now provides the first functionality, and the improvements to using nested states now allows for sub states to take the place of situations. As pointed out by user it really was just a fancy name for a state machine that supported buffered inputs, I think this new approach is more flexible.

What's Left:

The redesigned system requires testing and bug fixing for issues that appear
Some signals need to be rethought. Namely transitioned
travel method needs testing and potentially a redesign.
Update documentation (Current plan is to do a full documentation overhaul soon enough)

Fixes: #64
Fixes: #66

Ok this is a big refactor.
I'll state that I didn't read the new changes in the code yet, so I'll just comment on the description.

Removed CombatStateMachine to BufferedInputAdvancer.

In theory this is a good idea, since there will always be some sort of combination of input or behavior that will fall outside of what the interface of CSM can help. I was already making some custom logic for my is_held vs is_tapped logic so if you provide a BufferInputAdvancer to define those "workaround" it can help and I'm in favor. However I didn't read the implementation so I don't know how easy it is. Is_tapped vs Is_held is for me a good test case.
The naming could be better. I was thinking of my setup as a filter, because I only send interesting inputs (aka not is_echo) to the state machine, even buffering is_tapped even though it doesn't exist in my mapping. FrayInputFilter isn't really better.
It's basically the missing link between the input and state library.

Removed CombatStateMachine to CompositeState with substate.

The situations technically were just a substate, and the lack of interaction between them is what make them difficult. I had to check the transition signal from my FrayRootState to properly manage my change_situation calls. I did find CSM very useful because of the reset that was occurring when changing situation, which returned the situation to the start state. This is useful for combos, or with generic state like "locomotion" or "falling" with check if you are on the ground or not. But in general it was easier to have everything in a big situation.

Give CompositeState's, formerly RootState, builder transition() method a 'transition' parameter.

This is always nice to let users define their own object, but I didn't play enough with Transitions to know when it's a good idea apart from the obvious button and sequence. Maybe a FrayTimedTransition would be nice to add. I do look for a solution for a future problem where I need to communicate to my next state a value that I would calculate inside the transition.
Speaking of user-defined objects, I find conditions clunky to work with. I have to get_current_situation().set_condition("in_air",not characterbody.is_on_floor()) on every frame. Is it possible to make condition extends Callable and rework the logic to evaluate if the name is the same and if it evaluate to true? Instead of a Dictionary<String,bool>, it's now a Dictionary<String,Condition>. It's more expensive but now the conditions can be used by multiple CompositeStates and only called when needed. I do like functional programming so I may be biased.

Goto and CompositeState.

Goto behavior needs to be very well documented and tested. I think it is still useful to offer the possibility to teleport to the target_state, calling exit on the current one. I may be old school, but the name goto is reserved in my head to anything that just directly go to a target. This is more like a hierarchy_travel.
CompositeState default to go to start is great but I'm sure someone would want to keep the current substate on one node. Maybe upon exiting, set the start value of the CompositeState to the current substate if not resetable ? In any case, I need to test this onto my controller.

Initial feedback.

Not sure if I helped 😄 or if I'm clear enough. But you are doing a great job and I do like the direction this is going. I'll keep you updated, I'm just a little bit busy.

I was already making some custom logic for my is_held vs is_tapped logic so if you provide a BufferInputAdvancer to define those "workaround" it can help and I'm in favor.

Could you help me better understand what you're trying to accomplish? Assuming you want to set up transitions that occur when a button "is_held" or "is_tapped". One of these is already possible. "is_held" would be a button transition with a min_time_held set.  "is_tapped" should just require me to add a max_time_held constraint.
You also mention your setup being similar to a filter so I may just be misunderstanding your goals.

Is it possible to make condition extends Callable and rework the logic to evaluate if the name is the same and if it evaluate to true

Good idea, i'll look into this. The current condition setup was implemented long before Callables existed, and I wasn't a fan of Godot 3's FuncRefs at the time.

I may be old school, but the name goto is reserved in my head to anything that just directly go to a target. This is more like a hierarchy_travel.

After thinking about it I believe it would be better to rename this as it is more similar to travel than the previous goto. It just travels vertically instead of horizontally. And goto likely would be more widely recognized as "go directly to". Especially for those coming from languages with labels like C. That being said i'll re-add goto with this behavior.

CompositeState default to go to start is great but I'm sure someone would want to keep the current substate on one node.

Good point. This could be resolved by adding a is_persistent flag to CompositeState. This way users can decide when building if they'd like their CompositeStates to reset the current state to start on enter

It's more expensive but now the conditions can be used by multiple CompositeStates and only called when needed. I do like functional programming so I may be biased.

I think the greater ease of use trumps the added expense so I'm all for this idea.

Not sure if I helped 😄 or if I'm clear enough. But you are doing a great job and I do like the direction this is going. I'll keep you updated, I'm just a little bit busy.

Thank you! I appreciate you taking the time to leave some feedback

Update: String to Callable mappings are now used to represent conditions
When building composite states the new register_conditions method can be used to make the system recognize a desired condition.
Example:
This example represents an attack that can only be performed after another attack lands.
FrayCompositeState.builder()
   .register_conditions({
      on_hit = func() return true
   })
   .transition_button("idle", "attack1")
   .transition_button("attack1", "attack2", {input="btn_punch", prereqs=["on_hit"]}
   .build()

It is also possible to check for the inverted condition using the '!' prefix like so:
transition("a", "b", {prereqs=["!on_hit"]})

Lastly all states within a hierarchy reference conditions registered on the root. So conditions only need to be declared once to be used everywhere.

I'm very eager to try those new callable-based conditions. It give new opportunities especially with raycastting during specific states.
For goto names is ultimately not important. as long as it's documented, but it's important that the user know that there is options.  It's your library after all.
About my issue, it's probably me trying to fit the is_tapped behavior inside the combatstatemachine and probably making a small error that made the thing a little bit more difficult than it should be. You already had an idea on how you would have done. I've tried to implement it with a max_time_held, but I probably make a mistake somewhere.
My solution was to filter the FrayInputEvent to remove mostly is_echo event, then in the case of my tapped button is released I check the time held and if below a threshold I send a custom button to CSM named "X_tapped". The is_held behavior is part of one of the state to run. So technically the is_held is not part of the CSM input dispatching, Basically there is a few lines of code in the FrayInput.input_detected signal ( or whatever the name is). Just document somewhere that the CSM doesn't need echo event.
I'm just trying to explain my thought process and my errors. I think it's valuable to you as I'm trying to do an platformer/action game where the conditions a more external ( is on floor, has hit a wall, etc).
Once my 2 years old get to sleep tomorrow I'll try to test this branch.

I've tried to implement it with a max_time_held, but I probably make a mistake somewhere.

Just for clarification max_time_held is currently not a property that InputTransition has. However, it does have mind_time_held. I believe that min_time_held can capture the case where you wish for a transition to occur 'on button held'. And I was suggesting that a max_time_held could be included to capture the case where you wish for a transition to occur on button tapped.
So basically, in the context of state machine transitions...
is_held = pressed and time_held > min_time_held
is_tapped = released and time_held < max_time_held
I am planning to implement this now that it has been brought to my attention since I believe it could be useful. However, I was uncertain if this would address the limitations you've encountered. Correct me if I'm wrong, but I think it does 🤔.

Notable Updates
Added:

Added max_time_held property to input transition
Added _input_impl, _unhandled_input_impl, and _init_state_impl virtual methods to State class.

Renamed:

CompositeState to CompoundState. It is minor but I feel this name better reflects the purpose of the class. It also prevents confusion between CompositeState and CompositeInput. This should be the final name.

Changed:

Input transitions now use milliseconds in the form of integers for timings. In general, I want to make it a standard to present all input-related times in Fray as integer milliseconds. I believe most input-related time checks only occur within the span of seconds so I see no reason to use seconds or floats.

What's Left:

Testing, especially travel and goto
Update documentation (Plan is still to do an overhaul)
Rethink transitioned signal. Currently, I'm leaning toward it showing the full path. The 'ideal' behavior depends on what is most useful to report which will require me to plan around with the tool more until I recognize some pain-points. However, I'm also opened to suggestions.

Didn't have time to test, will do it soon. Here is some of my comments

* Added `max_time_held` property to input transition

Thank you

* Added `_input_impl`, `_unhandled_input_impl`, and `_init_state_impl` virtual methods to `State` class.
* Added ability to set default state and transition in the compound state builder.  These defaults affect every object instantiated after their call so call order is important. This was added to make building systems with custom states less tedious. However, the downside is these states can't have constructors.

_input and _unhandled_input are good addition. My issue with _init_state_impl is that _init is a special function name that gdscript interpret as a constructor when calling MyClass.new(args...) so I'm not sure if it's possible to mix your API.
Having a default state is not something that I care too much about so.

* Input transitions now use milliseconds in the form of integers for timings. In general, I want to make it a standard to present all input-related times in Fray as integer milliseconds. I believe most input-related time checks only occur within the span of seconds so I see no reason to use seconds or floats.

The issues is that it's more difficult to distinguish if an integer is a millisecond or a framecount. At least with float in second it's 0.016 for 1 frame, so it's visually different instead of 16 and 1. I'm really have a preference for seconds in float since it's standard but I'm not someone that goes into framedata of my characters in fighting game. At least we need an helper function that convert seconds to frames, ms to frames and vice versa.

* Testing, especially `travel` and `goto`

* Update documentation (Plan is still to do an overhaul)

For travel and goto, it's both test and document the behavior with hierarchy. I will probably help with the documentation.

* Rethink `transitioned` signal. Currently, I'm leaning toward it showing the full path. The 'ideal' behavior depends on what is most useful to report which will require me to plan around with the tool more until I recognize some pain-points. However, I'm also opened to suggestions.

I think that this will heavily depend on the match keyword of godot. I can only speak for myself but my logic is either check if the transition goes to a specific state, or since we get hierarchy if we enter a parent state.
func on_transitioned(from:StringName,to:StringName):
  match [from,to]:
    case ["A",_]:
      prints("A to anything")
    case [_,"A/a"]:
      prints("Anything to A/a")

It's a powerful tool. I think the best for now would be to leave it full path for now, provide one or two functions to get the hierarchy of the state by it's path, and let the user do its string manipulation however it want.  The String class have some function to manipulation filepath that could be useful like String.get_basename()
func on_transitioned(from:StringName,to:StringName):
  var folder = str(from).get_base_dir()
  match [folder ,to]: # matching the parent of the from state to destination state in full path
    case ["A","A/a"]:
      prints("Any state in A to A/a in particular")
    case [_,"A/a"]:
      prints("Anything to A/a")

My first impression is good.
One strange bug I have is that I have a custom fraystate for one of the state, but only the enter_impl is called. Exit_impl isn't called.
Didn't tried to find the problem yet.
I found that adding substate quite easy if i use two builder and add the substate.
The default state being gdscript class isn't as versatile as I hoped.
Conditions being callable is a win. So easy.
I'll share the test case soon. But it's a very barebone parent-child hierarchical state machine

Found the issue about the exit function not being called on my custom fraystate. I changed it to extends FrayCompoundState instead of FrayState and the exit function is now called. I don't know how fraystate are supposed to interact within FrayCompoundState, but it's something to add to the docs. The issues remains that classes that extends FrayState doesn't get called their exit function.
For adding substate, here how I did it :
extends CharacterBody3D

@onready var sm: FrayStateMachine = $FrayStateMachine
@onready var buffer: FrayBufferedInputAdvancer = $FrayBufferedInputAdvancer

func _unhandled_input(event: InputEvent) -> void:
	if event.is_action_pressed('ui_right'):
		buffer.buffer_button('btn_punch')
	if event.is_action_pressed('ui_left'):
		buffer.buffer_button('btn_kick')

var combat : FrayCompoundState
var loco : FrayCompoundState

func _ready() -> void:
	combat = (FrayCompoundState.builder()
		.start_at('start')
		.add_state("punch",DebugTrace.new("Punch")) # DebugTrace is printing when entering and exiting states
		.add_state("kick",DebugTrace.new("Kick")) # kick attack, another entry point

		.transition('start','punch',{auto_advance=true}) # Default attack is the punch
		.transition_button("punch", "combo", {input="btn_punch", prereqs=["on_hit"]}) #can combo on hit

		.tag_multi(['punch',"combo","kick"],['finish']) # Tagged finish combo

		.tag('end',['to_end'])
		.add_rule('finish','to_end') # transition to end rule
		.transition_global('end',{auto_advance=true,prereqs="!on_hit"}) # auto end combo
		.end_at('end')

	).build()

	loco = (FrayCompoundState.builder()
		.register_conditions({
			on_hit = func(): return ..., # hit logic, not ready yet
			on_ground = func(): return is_on_floor(),
			in_air = func(): return not is_on_floor() and not is_on_wall(),
			on_wall =func():return is_on_wall()
		})
		.start_at('ground')
		.add_state('combat',combat) # add the compoundstate of combat to the combat state inside locomotion.
		.add_state('ground',DebugTrace.new('on ground'))
		.transition('air','ground',{prereqs=['on_ground'],auto_advance=true})
		.transition('ground','air',{prereqs=['in_air'],auto_advance=true})
		.transition_button('ground','combat',{input="btn_punch"}) # can enter combat state, auto_advance to punch
		.transition_button('ground','combat/kick',{input="btn_kick"}) # Kick
		.transition('combat','ground',{auto_advance=true,switch_mode=FrayStateMachineTransition.SwitchMode.AT_END}) # Return to ground when attack finish.

	).build()

	sm.root = loco # assign locomotion as the root

This is REALLY easy. Not sure if this is how you would do it but I'm already imagining a lot of functionality from this.
Ideally I would like to register the conditions in their substate that require them ( loco doesn't need on_hit, but I must register it there otherwise it isn't registered). Not a deal breaker.
Also, about the default state, the fact that it's a GDScript class doesn't allow me to configure it as I go, but I don't know how to improve it. For now I'm mainly using add_state("state",Whatever.new(my_configuration_args))

Unless you have other changes that you want to make, I think this is a great refactoring. It work like a charm on my test cases and the conditions are easy to setup. Hierarchical states solved my previous problem with multiple situations in CombatStateMachine,
About what's left:
transitioned should be full path. There is no way to imagine all possibles scenario where a user want to react to the change from one substate to another. String parsing goes a long way for filtering states transitions.
About FrayCompoundStaterenaming , maybe you can switch the ordering to help where each class belongs ? Something like FrayStateCompound and FrayInputComposite would help with the auto-complete. Obviously make the branch more than a redesign for state but I think it's worth it. You decide.
I think the only thing missing is some helpers for transition using a signal. Animations have a lot of points of interest like on_hit and I'm not sure what is the canonical way of interacting with it using FrayStateMachine. For now it's either something that I manage within the FrayState, or whenever the on_hit signal is trigger I send a BufferedInput through the FrayBufferedInputAdvancer , which is bad because it's buffered in some cases. It would be nice to connect Timer's Signal with this.
I'll help with the documentation soon

Hey all, I've been messing around with this PR in a pretty generic 3d environment and for the most part, I think that this refactor is very well thought out! The builder syntax is very descriptive, and the register_conditions
transitioned being a full path makes sense to me, as with the current design there's no limit to the number of FrayCompoundStates that could make up a StateMachine.
I'm in agreement with Remi123 on helpers for transitions. Outside of rolling my own FrayState I don't see a great way of making it so the animation can control when a state can be considered "finished processing", which makes sense given how the intent is for these 3 modules to act independently of each other.
What I'm aiming to do kinda already goes against keeping these 3 modules separate, as I'd like to annotate my animations with all these properties (what FrayState is linked to a HitState? At what point can this animation be considered finished processing to return back to the idle state? at what point can a player input a button to 'cancel' into another action?) rather than having it mostly.
In my case, I'm trying to replicate a JRPG's action combat system, in which a single character has 3 attacks that can be comboed from 1, to 2, to 3. These animations have a very long follow-through (pretty much putting them in an idle state) in which the player can delay the next part of the string, in order to have other characters come in and do parts of their combo. In attempting to emulate this, I had the animation player controlling both the FrayStateMachine.Active property as well as the FrayBufferedInputAdvancer.Paused property. Controlling the FrayStateMachine like this doesn't seem right, since if they get hit, I would want them to swap to a hurt state, and if that's inactive, then that will never process.
For example, this is the test player's script:
extends CharacterBody3D

@onready var sprite = $Sprite3D
@onready var animation_player = $AnimationPlayer
@onready var state_machine: FrayStateMachine = $FrayStateMachine
@onready var input: FrayBufferedInputAdvancer = $FrayBufferedInputAdvancer

var state_container: FrayCompoundState

var target_velocity = Vector3.ZERO
var direction = Vector3.ZERO
var button_input_name = null

func _ready() -> void:
	_setup_state_machine()

func _unhandled_input(event: InputEvent) -> void:
	if event.is_action_pressed(button_input_name):
		input.buffer_button('attack')
	if event.is_action_pressed("battle_shoulder_right"):
		input.buffer_button('special')

func _setup_state_machine() -> void:
	state_container = ( FrayCompoundState.builder()
		.register_conditions({
			on_hit = func(): return true,
		})
		.transition('start', 'idle')
		.transition_button('idle', 'neutral_attack_1', { input='attack' })
		.transition_button('neutral_attack_1', 'neutral_attack_2', { input='attack' })
		.transition_button_global('special_attack', { input='special' })
		.tag_multi(['idle'], ['neutral'])
		.tag_multi(['neutral_attack_1', 'neutral_attack_2',], ['normal'])
		.tag_multi(['special_attack'], ['special'])
		.add_rule('neutral', 'special')
		.add_rule('normal', 'special')
		.add_rule('normal', 'neutral')
		.add_rule('special', 'neutral')
		.start_at('start')
	).build()
	state_machine.root = state_container
	animation_player.play('start')

func _on_fray_state_machine_state_changed(from, to):
	print("state change from: " + from + " to: " + to)
	if(anim_player.get_animation_list().has(to)):
		anim_player.stop()
		anim_player.play(to)

and an image link that hopefully helps explain my current setup.
I also tried to make it so that every animation would return to idle by setting them up as a default transition ( something like .transition('neutral_attack_1', 'idle') ) with the intent that at the end of the attack animation, they would return to an idle state, but that just made it so the attack state would immediately swap to the idle state, which makes sense given how FrayState currently works.
One final note, an example project to showcase a typical setup similar to the example gif in the project's README would be greatly appreciated, as trying to use the documentation was a bit painful.

@Kuenaimaku
I wouldn't really control the state machine active property, as it add complexity when it's active or not. I would add a lot more prereqs and conditions to manage that.
@export var can_transition :bool = false

...

root_machine.register_conditions(
  {can_transition = func() return self.can_transition,
  }
)
.transition_button('idle', 'neutral_attack_1', { input='attack' })
.transition_button('neutral_attack_1', 'neutral_attack_2', { input='attack', prereqs=[can_transition,on_hit] })

Then modify the can_transition property in the animations.

I've found a small bug in the collision library.
# hit_state_3d.gd
## Sets whether the hitbox at the given [kbd]index[/kbd] is active or not.
func set_hitbox_active(index: int, is_active: bool) -> void:
	var flag = 1 << index

	#if flag > active_hitboxes:
		#push_warning("Index out of bounds.")
		#return
        # <-- Removed this warning since once all hit_box are disable with active_hitboxes = 0,
        #       it prevent me from re-activate them.

	if is_active:
		active_hitboxes |= flag
	else:
		active_hitboxes &= ~flag # <-- missing the ~

My issue with _init_state_impl is that _init is a special function name that gdscript interpret as a constructor when calling MyClass.new(args...) so I'm not sure if it's possible to mix your API.

This should be fine, _init is a special function but Godot doesn't treat _init_XYZ as anything special. That being said I settled on the name _ready_impl since I think that better captures that the virtual method is used for.

The issues is that it's more difficult to distinguish if an integer is a millisecond or a framecount. At least with float in second it's 0.016 for 1 frame, so it's visually different instead of 16 and 1. I'm really have a preference for seconds in float since it's standard but I'm not someone that goes into framedata of my characters in fighting game. At least we need an helper function that convert seconds to frames, ms to frames and vice versa.

A few other devs I know agreed that unless specifically told they assume time is in seconds. Additionally I think your argument of ms and frame count being confused holds some weight. I've gone back to having the time in seconds, and added static methods under the Fray class_name to convert between seconds and ms. This also contains a frames_to_msec and vice-versa method if you weren't already aware.
Also going forward, to keep things consistent, all times in Fray should use seconds, and non-second times will be given an appropriate suffix.

Found the issue about the exit function not being called on my custom fraystate. I changed it to extends FrayCompoundState instead of FrayState and the exit function is now called. I don't know how fraystate are supposed to interact within FrayCompoundState, but it's something to add to the docs. The issues remains that classes that extends FrayState doesn't get called their exit function.

This should be fixed.

Ideally I would like to register the conditions in their substate that require them ( loco doesn't need on_hit, but I must register it there otherwise it isn't registered). Not a deal breaker.

Noted. What I will likely do is support global conditions (located on the root) and local conditions. Conditions will be checked locally first, and then globally so local conditions will shadow global conditions. I'll also add a character to explicitly check a global condition. Maybe: "$on_hit"?

One final note, an example project to showcase a typical setup similar to the example gif in the project's README would be greatly appreciated, as trying to use the documentation was a bit painful.

Thanks for checking out the project! And yes the documentation needs a big overhaul. This PR will be merged within the next few days and after that my next priority is rewriting the documentation and including examples.

I think the only thing missing is some helpers for transition using a signal. Animations have a lot of points of interest like on_hit and I'm not sure what is the canonical way of interacting with it using FrayStateMachine. For now it's either something that I manage within the FrayState, or whenever the on_hit signal is trigger I send a BufferedInput through the FrayBufferedInputAdvancer , which is bad because it's buffered in some cases. It would be nice to connect Timer's Signal with this.

I'm in agreement with Remi123 on helpers for transitions. Outside of rolling my own FrayState I don't see a great way of making it so the animation can control when a state can be considered "finished processing", which makes sense given how the intent is for these 3 modules to act independently of each other.

I'll create a discussion soon enough for this so I can better understand what sort of solution might address this pain point. It won't be addressed in this PR.

About FrayCompoundStaterenaming , maybe you can switch the ordering to help where each class belongs ? Something like FrayStateCompound and FrayInputComposite would help with the auto-complete. Obviously make the branch more than a redesign for state but I think it's worth it. You decide.

Would be great if Godot had support for namespaces... I'll give it some thought and tackle this in another PR if I decided to go forward.

oct31st.webm
During the last weeks I've been experimenting with this branch and implemented everything in this video. Don't mind the lack of walking animation I'm working on a custom animationplayer and it's a separate project. Jumping, rolling and the ladder are all fraycompoundstate and I want to share my experience with implementing that.

First, I'd like to share that since it's more of an action-platformer, I didn't do much in terms of combos so I've learned to use less the builder and add my transitions manually. I think I was a little bit too much focused on the builder previously, which is great for combos and combat-related overview, but I was looking to encapsulate some behavior. This is where the newly named _ready_impl() function come into play and this is useful to know that all my states are properly setup before adding more transitions.
# In JumpState.gd extends FrayCompoundState
func _ready_impl():
  set_condition(...) # Local condition are supported in this setup
  get_root().transition_button("ground","jump",setup) # Dependency on root having ground but I know it has it.
  add_state("anticipation") # Deal with internal states
  ...

The only way I would improve this is to find a way to link object. My state modify the position of the characterbody3d a lot, so each of my state need to have a constructor where I pass all my info since they are Objects, not Node. Maybe the StateMachine Node could have a blackboard dictionary, and it pass the blackboard into the `_ready_impl' and it propagate? I'm just trying to reduce this boilerplate but it's not a big deal if there is no perfect solution.

Second, seconds being the standard time reference is great. I have some plans that will need frame_to_sec so this function is appreciated.

I believe resource duplication only copies exported members
Caution about this stuff. Resource memory management is heavily dependant on resource_local_to_scene aka Make Unique. My rule of thumb is that if local_to_scene is false, next duplicate() return the reference to the object. If set to true, next duplicate() actually copy the object.

"$on_hit" Allowing local conditions... I don't know. If I reread my comments, It's clear that I was still trying to understand how compoundstate works and I didn't try yet to not use the builder. Of course I wanted correct local conditions since I was cramming everything into one big builder()... statement. My ladder have a few local conditions and properly building the state using _ready_impl is more versatile. I won't insist on this feature since I clearly was still learning when I wrote this, but if you like the idea of overriding conditions and you can think of a usecase, it can be useful.

I've implemented a relatively simple state designed to play an animation and await either the end of the anim, or a signal. In fact all "actions" in the video is using this state. I know you will create a discussion about this but here is my pseudo-code on this state so you can think about it:
# The signal can_advance is set in the animation
var ended :bool = false
func _is_done_processing_impl() -> bool:
  return ended
func anim_finish(_anim_name = ""):
  ended = true
  get_root().advance()

func _enter_impl(args:Dictionary):
  ended = false
  if not statemachine.can_advance.is_connected(on_anim_finish):
    statemachine.can_advance.connect(anim_finish,CONNECT_ONE_SHOT)
  if not animationplayer.animation_finished.is_connected(on_anim_finish):
    animationplayer.animation_finished.connect(anim_finish,CONNECT_ONE_SHOT)
  animationplayer.play(args.anim_name)

func _exit_impl() -> void:
  ended = false
  # Make sure we disconnect signals.
  if statemachine.can_advance.is_connected(anim_finish):
    statemachine.can_advance.disconnect(anim_finish)
  if animationplayer.animation_finished.is_connected(anim_finish):
    animationplayer.animation_finished.disconnect(anim_finish)

Conclusion :
I continue to think this is a great library, and this is a great redesign. Can't wait to pull those last changes.

The only way I would improve this is to find a way to link object. My state modify the position of the characterbody3d a lot, so each of my state need to have a constructor where I pass all my info since they are Objects, not Node. Maybe the StateMachine Node could have a blackboard dictionary, and it pass the blackboard into the `_ready_impl' and it propagate? I'm just trying to reduce this boilerplate but it's not a big deal if there is no perfect solution.

I've actually considered doing something like this for a while now. It shouldn't be a difficult inclusion, but I won't be addressing it in this PR. I'll start a discussion to share my thoughts on potential approaches before I proceed.

"$on_hit" Allowing local conditions... I don't know. If I reread my comments, It's clear that I was still trying to understand how compoundstate works and I didn't try yet to not use the builder. Of course I wanted correct local conditions since I was cramming everything into one big builder()... statement. My ladder have a few local conditions and properly building the state using _ready_impl is more versatile. I won't insist on this feature since I clearly was still learning when I wrote this, but if you like the idea of overriding conditions and you can think of a usecase, it can be useful.

Oh I see. It was very easy to add support for local conditions so when I saw you mention your experience I went ahead and implemented it. Global conditions are really just the root's local conditions. I personally can't think of a use-case in this moment but I think i'll keep it as I do like the idea. I see the behavior as similar to a function scope var shadowing a class scope var, but the class var can still be accessed with 'self'. Also the distinction between global and local isn't that significant.

I'll be merging this PR tonight or tomorrow as i'm satisfied with the current state of the redesign. The remaining pain points / Quality of Life improvements will be dealt with in subsequent PRs. Thanks for your ongoing interest and support in this project! Your feedback and code snippets have been very helpful while working on this. It's just also interesting to see how other people make use of the library.

The only way I would improve this is to find a way to link object. My state modify the position of the characterbody3d a lot, so each of my state need to have a constructor where I pass all my info since they are Objects, not Node. Maybe the StateMachine Node could have a blackboard dictionary, and it pass the blackboard into the `_ready_impl' and it propagate? I'm just trying to reduce this boilerplate but it's not a big deal if there is no perfect solution.

I decided to share my thoughts in an issue rather than using discissions. Let me know what you think when you have time.
https://github.com/Pyxus/fray/issues/72

I think the only thing missing is some helpers for transition using a signal. Animations have a lot of points of interest like on_hit and I'm not sure what is the canonical way of interacting with it using FrayStateMachine. For now it's either something that I manage within the FrayState, or whenever the on_hit signal is trigger I send a BufferedInput through the FrayBufferedInputAdvancer , which is bad because it's buffered in some cases. It would be nice to connect Timer's Signal with this.

I'm in agreement with Remi123 on helpers for transitions. Outside of rolling my own FrayState I don't see a great way of making it so the animation can control when a state can be considered "finished processing", which makes sense given how the intent is for these 3 modules to act independently of each other.

This is being discussed here: https://github.com/Pyxus/fray/discussions/73


[Feature Request] elm 0.19 support

Any plans to update for elm0.19?

Elm 0.19 support was just released as a beta - npm i elm-coverage@beta should get you the goods.
Some notes!

huge thanks to @RavenDream for doing the bulk of the work on this repo. Much appreciated!
no Windows support for now. I'll try to come up with a solution, but it's as of yet unclear what this will involve exactly
I also updated elm-instrument to build on the latest elm-format so it can actually handle 0.19 syntax
If you find anything that doesn't work but used to work before, please do let me know! (by opening issues 😉)


should filters on the geo-map view respect the union/intersection query option?

the search ui allows settings an option to dispatch multiple-value filters as either union or intersection queries. this setting is currently not respected on the geo-map view. should it?

yes.


History

It would be nice to be able to hit the up arrow to get your previously run commands like when you do a find/replace.

This would be very nice.  Setting the initial_text to have the command history in it when opening the input panel (with each command separated by a newline) works as expected.  Up and down work for going through the history.  The problem with that, though, is that pressing enter send all of the command history to the callback.  I'm sure there's a way to do this, but it's not exactly clear to me.
Do you know of any other plugins that do something similar?

I just committed history functionality. Let me know how it works for you.
I also added some other readline keybindings: ctrl+a, ctrl+e, and ctrl+u


add vote for adding docker-images repo

Summary

I'd like to start a vote for adding docker-images repo, just like https://github.com/oracle/docker-images.
Solution Description

We can move the existing docker files in https://github.com/oceanbase/oceanbase/tree/6797c56e2ff2f0dfb0fceec206822a46b494fbea/tools/docker/standalone to the new repo, and gradually add missing images such as oblogproxy and obproxy in the future.

LGTM

DONE: https://github.com/oceanbase/docker-images


Devise Token Auth for one quran

Deployed to: http://staging.quran.com:33119

Deployed to: http://staging.quran.com:33122

Deployed to: http://staging.quran.com:33124


Missing icons in application launcher

For some reason the icons in the application launcher aren't showing up, even though they're properly referenced in their desktop files without issue. The icons are also present under the hicolor directory. I'm on KDE Plasma 5.22.5.
I tried reloading the application launcher using kbuildsycoca5 without success.

I forgot to mention that the icons are showing perfectly fine on Dolphin, so it's clearly not zap's issue. Sorry about being so hasty.


get_cmap warning

MatplotlibDeprecationWarning: The get_cmap function was deprecated in Matplotlib 3.7 and will be removed two minor releases later. Use matplotlib.colormaps[name] or matplotlib.colormaps.get_cmap(obj) instead

Hello, Yuting. Thank you for your valuable information. I have already updated it in the latest GitHub repository.


Custom/logger

Internal review URL
Public review:

Go to this DropBox link
In the upper right, select Download -> Direct download
Click on HTML files.

@JuergenGutsch  please review the changed files and the public build.
cc @serpent5

@Rick-Anderson Awesome. Looks good from my perspective 👍 Many Thanks 😊

Here's a couple of high-level suggestions:

The order of the sections might flow better if it were something like the following:

Create the custom logger.
This could also introduce the sample in terms of it being a coloured console logger implementation. I think it could collapse up into the "Create a custom logger" section, where the snippet that shows how to add the provider could be dropped. That's covered later in "Usage and registration of the custom logger".
Sample custom logger configuration
Create the custom LoggerProvider
Usage and registration of the custom logger

The registration approach should use a ConfigureLogging callback, just as in the examples of adding built-in providers. e.g.:
Host.CreateDefaultBuilder(args)
    .ConfigureLogging(logging => logging.AddColoredConsoleLogger())));

It's obvious it's a logger, too, so the extension method for ILoggingBuilder could just be named AddColoredConsole.

I spotted a few other text issues, which I can do as suggestions once the above has been considered accordingly.
@Rick-Anderson Are you planning to get PU eyes on this?

@serpent5  I had similar thoughts on the organization, but I just wanted to get it in a more readable state.
I think your suggestions would be a nice improvement.
I'll ping the PU and see if they can do a quick review.

@BrennanConroy can you do a quick review or suggest a reviewer.

+@JunTaoLuo in case you want to take a look

@BrennanConroy can you review @serpent5  outline

@JuergenGutsch  can you review my last commit?


Node.js bindings: Added JS/lowlevel bindings for GPIO and build stuffs

This patch adds native/lowlevel bindings for GPIO and using the same
JS API for GPIO is implemented and includes the related build
changes.
Signed-off-by: Srinivasa Ragavan<EMAIL_ADDRESS>Signed-off-by: Sudarsana Nagineni<EMAIL_ADDRESS>

@barbieri @bdilly This is the first HW IO JS API. Who should review this and the other HW IO APIs once they appear?

@barbieri New patch, fixes the comments mentioned above and rebased to the latest version. Please review and let me know. Thanks!

@gabrielschulhof Ill close this and open a fresh one. Thanks for the info.


Client: Don't increment request number on error

If the request is just going to be discarded, don't increment the request_number.

bors r+
Trying it again 😅


Refactor JSONSerializer to be configured at compile-time

It is... exceptionally unlikely we'll want this to change at runtime.
As a result, we can statically compile these pieces together, and avoid a runtime call to fetch this bit of configuration every time we want to JSON encode/decode something.

I am not certain what's going on with the status checks for this PR. Repo misconfiguration?

@stewart looks like it was keeping the status checks for the old lang matrix around. I manually removed them from the repos settings and they are no longer here. 🤷


MINOR: resolve warnings in topology graph

We shouldn't be ignoring compiler warnings, since they tell us when our code is likely incorrect.
Sadly, our build produces hundreds of warnings in Streams alone. I plan to just go down the list and resolve them every now and then.
This is the fourth installment: OptimizableRepartitionNode, StatelessProcessorNode, and GroupedTableOperationRepartitionNode.
Committer Checklist (excluded from commit message)

[ ] Verify design and implementation
[ ] Verify test coverage and CI build status
[ ] Verify documentation (including upgrade notes)

@bbejeck @mjsax ,
I had a slow day, so I thought I'd try to resolve the compiler warnings in the main streams project. I've chunked them up into 4 manageable changesets.
Do you mind reviewing this one?

cherry-picked to https://github.com/apache/kafka/pull/5201

Closing until after #5201 is merged.


Include type conditions in proof

The checks in #22 are incomplete in that type constraints are not honored. The following case would not be recognized as a contradiction:
type R is range 1 .. 100;
type M is
   message
       F1 : R
         then F2 if F1 > 100;
       F2 : R;
   end message;

F1 > 100 is not a contradiction by itself, but violates the constraints of type R. When proving the specification we have to to generate a constraint for every variable Var according to its type:

modular type: Var < modulus
range type: Var >= first /\ Var <= last
always_valid enumeration: Var < 2**Size (enums can only be compared with their literals)
regular enumeration: Var = enum(enum'first) \/ enum(enum'first + 1) \/ ... \/ enum(enum'last)

Also consider tautologies:
type R is range 1 .. 100;
type M is
   message
       F1 : R
         then F2 if F1 < 1000;
       F2 : R;
   end message;

This is statically true as F1 <= 100 implies F1 < 1000.

This currently fails:
package Foo is
    type Tag is (T1, T2, T3) with Size => 8;
    type Length is range 0 .. 2**14 with Size => 16;
    type Bar is
        message
            L : Length;
            T : Tag
                then V
                if T /= T2 and L <= 2**13;
            V : Payload;
        end message;
end Foo;

with
rflx.model.ModelError: contradicting condition 0 from field "T" to "V"
(ProofResult.sat: (((T = T1       or T = T2       or T = T3)     and then
L <= 16384)   and then (T /= T2     and then L <= 2**13)) = False)

The reason is an error in the type conditions for enums where nothing is stated about the relation of the elements (T1, T2, T3). We could either defined their relation (T1<T2<T3) or just generate their values (T1=Number(1), T2=Number(2), T3=Number(3)). The latter seems preferable.

Fixed in 6d9198f


multi-target to .net core 3

Hi @virzak
As I mentioned in #26, I am waiting for the official release before doing (or that case merging) any work related to .NET Core 3. I don't want to install any preview version of Visual Studio on my machine as I had some bad experience with it in the past.
Feel free to ping me after the official release, in case I forget.

@Kryptos-FR
Will ping for sure.
I also don't have a preview version. It work perfectly fine in the latest stable version.
The other option is to use VS Code.
Totally understand if you want to wait.

VS 16.3 is out now

Change was straightforward. Thanks for the contribution.

Could you please push this to nuget?

Sure. Will do as soon as I can.
Thanks is for the reminder.

@Kryptos-FR Thanks so much!

@virzak Sorry for the delay. It should be available now on nuget.


Vue is externalized no matter the ssr.noExternal value

Describe the bug
I'm migrating a project from vite 2 to 3, and just facing a little issue with SSR externals.
It vite 2, I was just using something like noExternal: /./ to make sure nothing is externalised, which worked well.
In Vite 3, it seems that vue and @vue/server-renderer are not externalised (the generated output imports vue methods from the vue package). All others deps are bundled into the mjs output.
I tried to set ssr.noExternal to true, but then I got various error like Cannot bundle Node.js built-in "http" imported from "node_modules/axios/lib/adapters/http.js". Consider disabling ssr.noExternal or remove the built-in dependency
I also tried to manually exclude 'vue' package with something like noExternal: [/./, 'vue'] with no luck
Another weird thing is that the import output looks broken too. I tried to add vue as a deps as a workaround but got this
import require$$0$1, { defineComponent, onBeforeUnmount, watchEffect, ref as ref$1, inject, reactive as reactive$1, computed as computed$1, markRaw, mergeProps, unref, createVNode, resolveDynamicComponent, useSSRContext, openBlock, createElementBlock, createElementVNode, watch, onActivated, onMounted, shallowRef, resolveComponent, withCtx, createBlock, toDisplayString, createTextVNode, createCommentVNode, getCurrentInstance, h as h$4, isRef as isRef$1, readonly as readonly$1, onBeforeUpdate, onErrorCaptured, Suspense, nextTick, createSSRApp, createApp as createApp$1, createStaticVNode, onUnmounted, toRef, Fragment, renderList, withModifiers, renderSlot, defineAsyncComponent, useSlots, withDirectives, vModelText, vShow, provide, withAsyncContext, resolveDirective, cloneVNode, Teleport, toRaw as toRaw$1, Transition, triggerRef, TransitionGroup, effectScope } from "vue";
       ^^^^^^^^^^^^
SyntaxError: The requested module 'vue' does not provide an export named 'default'

Reproduction
https://stackblitz.com/edit/vitejs-vite-7k3ode?file=dist/server/entry-server.js
System Info
System:
    OS: macOS 12.4
    CPU: (10) arm64 Apple M1 Max
    Memory: 647.03 MB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.5.0 - /usr/local/bin/node
    Yarn: 1.22.17 - /usr/local/bin/yarn
    npm: 8.12.1 - /usr/local/bin/npm

Used Package Manager
yarn
Logs
No response
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
[X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
[X] The provided reproduction is a minimal reproducible example of the bug.

It worked with extra plugin mutating config.ssr.external tho. repro link

It worked with extra plugin mutating config.ssr.external tho. repro link

Indeed, thanks 👍. This feels a bit hackish though. Is there any particular reason that Vue won't be externalised despite the ssr.noExternal rule?

I think Vite checks external first then noExternal, not sure how this should be properly handled?
https://github.com/vitejs/vite/blob/d12d469dfb8d7466615b085aac0d461ff18a4465/packages/vite/src/node/ssr/ssrExternal.ts#L123-L130

I think this part is affecting this. Since vite 3 externalizes everything, maybe this should be removed.
https://github.com/vitejs/vite/blob/a2b313126abdf2e0652502cbcd4b94353c37f91a/packages/plugin-vue/src/index.ts#L126-L128


Authorizer

Is there any way to get an example of an Authorizer? I can't figure out how to implement from AbstractAuthorizer and I haven't been able to locate an example anywhere.
Help very appreciated!

Hi,
Here's a modified example from an app I'm developing. Remember the authorizer runs after the authentication middleware (if you've attached it to a route), so if they get this far, you don't need to check if they are (or are not) a valid user.
<?php

namespace App\JsonApi\Users;

use CloudCreativity\JsonApi\Authorizer\AbstractAuthorizer;
use CloudCreativity\JsonApi\Contracts\Object\RelationshipInterface;
use CloudCreativity\JsonApi\Contracts\Object\ResourceObjectInterface;
use Neomerx\JsonApi\Contracts\Encoder\Parameters\EncodingParametersInterface;

class Authorizer extends AbstractAuthorizer
{
    public function canReadMany($resourceType, EncodingParametersInterface $parameters)
    {
        return true; // Any authenticated user can GET /users
    }

    public function canCreate($resourceType, ResourceObjectInterface $resource, EncodingParametersInterface $parameters)
    {
        return !request()->user(); // Any unauthenticated user can POST /users
    }

    public function canRead($record, EncodingParametersInterface $parameters)
    {
        return true; // Any authenticated user can GET /users/id
    }

    public function canUpdate($record, ResourceObjectInterface $resource, EncodingParametersInterface $parameters)
    {
        return request()->user()->id === $resource->id; // Any authenticated user can PATCH /users/id as long as they are that user
    }

    public function canDelete($record, EncodingParametersInterface $parameters)
    {
        return false; // No one can DELETE /users/id
    }

    public function canModifyRelationship(
        $relationshipKey,
        $record,
        RelationshipInterface $relationship,
        EncodingParametersInterface $parameters
    ) {
        return false; // No one can, for example, PATCH /users/id/relationships/profile
    }
}

I'm sure @lindyhopchris will let me know if I've done it completely wrong, but this seems to work for me! You can make the checks in the functions as simple (as in this example) or as complex as required.
Regards,
Dan

Thanks @danherd that looks very similar to mine. The only gotcha to mention is the authorizor runs before the validator, so if you need to rely on any content from the resource object (supplied by the client), need to get data from it in a "safe" way... i.e. you cannot assume it is a valid JSON API resource object structure.

@lindyhopchris so this authorizer just needs to be in the folder of the resource alongside with the Adapter, Schema, etc? Eg: app/JsonApi/Users folder? Is there anything else that needs to be done other than it being in the same folder?
I'll make a PR with this info for the documentation.

Yes that's right. There is a way to define a global authorizor with the authorizor array config option when defining a route:
JsonApi::register('default', ['authorizer' => MyAuthorizor::class], function ($api) { ... });

That authorizer would get used for every resource in your api. It can be useful if every resource requires a user to be signed in and you just want to pass the authorizer request to Laravel's gate policies.


[Feature Request] - Adding an image to a view

I'd like to add an image to a view:

My company Logo for instance or a logo of an application...
A snapshot of an other view of an other project (The one I use for legend for instance)

You can create a Note with no border and add an image to it.

You saved my live :)


EventBridge broker fails to send "bytes" messages.

Sending non-json object to EventBridge causes an error "MalformedDetail: Detail is malformed.".

fixed with custom codec


Add new photo for carousel and fix z-index on carousel icons

change the order of the photos in mission carousel component and mission component.
add new photo to mission carousel.
fix z-index for carousel icons going over the header.
add photo for sustainability section on homepage component.

Looks good


New sample Flashcards

We're so eager to add your sample to this repository as soon as possible, but we need all samples follow the same structure.
To make sure we process it as soon as possible, make sure to follow these instructions.

Q
A

Bug fix?
no

New feature?
no

New sample?
yes

Related issues?
no

Solution Details

Q
A

Solution requires premium license
no

Solution uses experimental features (see licensing guidelines)
no

Which connectors are used?
none

Solution uses on-premises connectors?
no

Solution uses custom connectors?
no

Layout
Phone

What's in this Pull Request?
This PowerApp provides a flashcards template to learn any topic with Flashcards.

Note: for security reasons, we can only accept pull requests which consist of unpacked source code for .msapp files; We cannot accept .msapp files.

Hi @anandragav - can you please use the following instructions for submitting the samples?
https://github.com/pnp/powerapps-samples/wiki/How-to-submit-a-Power-App-sample
Thanks in advance!

@Laskewitz hi Daniel yes that's the one i followed. Is something wrong or missing?

@Laskewitz hope you have had the chance to look into this and clarify what is missing 😕

@Laskewitz hope you have had the chance to look into this and clarify what is missing 😕

Hi @anandragav - the sample you provided is the exported app, but we require it to be an exported and unpacked solution. Follow the guide on this page to see how it works: https://github.com/pnp/powerapps-samples/wiki/How-to-submit-a-Power-App-sample.