Feature: Make it easier to handle growing models by supporting graph hydration and/or something like MyContext.AllEntities() -- or a better approach you can suggest

In a scenario where a hub & spoke 1:Many domain model grows over time, it becomes cumbersome and fragile to modify the hub entity class with new navigations and modify the dbcontext class with new DBSet properties for every new spoke entity type. For example imagine an extensible model where various devs may add new spoke types (which all derive from... say SpokeTypeBase), but the main hub type and dbcontext are expected to be stable.
Today this can handled for saving to db with TPC by:

Avoid placing navigation properties on the hub class, instead just have nav and FK properties on the spoke classes
Avoid placing something like public virtual DBSet<SpokeTypeBase> AllSpokeEntities on the dbcontext else OnModelCreating will try to create an entity type for SpokeTypeBase and insist on a PK.
Avoid placing DBSet properties on the dbcontext for any of the spoke types (as we don't want to maintain the list)
Add object graphs to the db context not via dbset properties, but like MyContext.Add(each entity)

While this works for saving to DB, creating a nice TPC layout with correct relationships, it leaves no way that I have found to retrieve spoke entities from the db context.
It would be nice if EF could allow for this pattern by either:
A) Supporting automatic object graph hydration so I only need the hub type exposed as a dbset on the dbcontext, and/or
B) Support something along the lines of public virtual DBSet<SpokeTypeBase> AllSpokeEntities on the db context to be used like MyContext.AllSpokeEntities.OfType() or some private analog to be exposed like MyContext.AllSpokeEntities<SpokeType>() .
C) or a better approach to the same problem space that someone else might suggest.
Thanks.

Hey,
I may be missing what you are trying to achieve... but you can already have a DbSet<BaseType> and then run a LINQ query against it and get all derived types included in the query. That works in EF6 and will work in EF7.
~Rowan

Thanks. Your comment made me rethink this-- and I believe I was fighting the wrong battle. By default/convention when I added a DBSet then BaseType was added to the Model as an EntityType and required a Key. I didn't want this as I assumed it was trying to do TPH.
Workaround #1 was to remove the DBSet which is described above which is not ideal
Workaround #2 looks like if I go ahead and give BaseType a Key we no longer fail on model creation with the "requires a key" exception. The db it creates looks like TPC, but including BaseType as a table as it if were a concrete type. This isn't ideal as I think the table would always be empty, but not terrible, except see IndexOutOfRangeException paragraph below.
Workaround #3 was to remove the EntityType for BaseType from the model by using RemoveEntityType(). This gets us past model creation at runtime, but....
When using workarounds 2 or 3 all runtime calls to MyDbContext.Add() fail with a mysterious IndexOutOfRangeException. Also TrackGraph() appears to be broken (nothing happens).
If I can't figure out the IndexOutOfRangeException and TrackGraph behavior I'll post the repro code. I suspect I'm doing something wrong defining the relationships.

This may be heading in the direction of a separate bug, but I'll continue here for now. For some reason EF7beta8 hates this model. Depending on various choices you can make with the model (see comments) it will always fail (but in different places) with NullReferenceException or IndexOutOfRangeException.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading;
using Microsoft.Data.Entity;

namespace ConsoleApplication2
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            //  build hub/spoke object graph
            var toolboxInstance = new Toolbox() {Title = "This toolbox is red"};
            var hammerInstance = new Hammer() {Description = "My favorite hammer"};
            var wrenchInstance = new Wrench() {Description = "My least favorite wrench"};
            toolboxInstance.Tools.Add(hammerInstance);
            toolboxInstance.Tools.Add(wrenchInstance);

            using (var dbc = new ToolsContext())
            {
                //  Note: fails unless we either give ToolBase a Key (explicitly or by convention), or exclude ToolBase from
                //  the model using Model.RemoveEntityType() or Model.Ignore()
                dbc.Database.EnsureCreated();
                dbc.Database.EnsureDeleted();
                dbc.Database.EnsureCreated();

                //  Note: If ToolBase has been removed from the model (not current code state)
                //  These will fail with IndexOutOfRangeException
                //  Also if ToolboxId is a CLR property on any of the Tool classes
                //  (As opposed to auto-generated shadow) then these fail with NullReferenceException
                dbc.Add(toolboxInstance);
                dbc.Add(hammerInstance);
                dbc.Add(wrenchInstance);
                Console.WriteLine(dbc.SaveChanges());
            }

            using (var dbc = new ToolsContext())
            {
                var toolboxesBackFromDb = dbc.Toolboxes.Include(x => x.Tools);
                Console.WriteLine(toolboxesBackFromDb.Count());
                //
                //  Fails with IndexOutOfRangeException
                //
                var toolbox1 = toolboxesBackFromDb.AsEnumerable().FirstOrDefault();
                Console.WriteLine(toolbox1.Tools.Any());
            }
            Thread.Sleep(10000);
        }
    }

    public class ToolsContext : DbContext
    {
        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            optionsBuilder.UseSqlServer(@"server=(localdb)\MsSqlLocalDB;database=HubSpokeExperiment");
        }
        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            //  using reflection here to pick up new tool types as they are created
            //  rather than maintaining static list
            foreach (var t in Assembly.GetExecutingAssembly().DefinedTypes.Where(t => t.IsSubclassOf(typeof(ToolBase))))
            {
                var eb = modelBuilder.Entity(t.AsType());
                eb.HasKey("Id");
            }
        }
        public DbSet<Toolbox> Toolboxes { get; set; }
        public DbSet<ToolBase> Tools { get; set; }
    }

    public class Toolbox
    {
        public Toolbox()
        {
            Tools = new List<ToolBase>();
        }
        public int Id { get; set; }
        public string Title { get; set; }
        public ICollection<ToolBase> Tools { get; set; }
    }

    public abstract class ToolBase
    {
        public string Description { get; set; }
        public int Id { get; set; }
        public Toolbox Toolbox { get; set; }
        //public int ToolboxId { get; set; }
    }

    public class Hammer : ToolBase
    {
        public string SomethingAboutHammers { get; set; }
    }

    public class Wrench : ToolBase
    {
        public string SomethingAboutWrenches { get; set; }
    }
}

Since the issues I'm hitting now are significantly removed from the issue title, I am going to open separate more narrowly scoped issues for those as potential bugs. Thanks.


Feedback 'From: Trial user I have a network connection by...'

Message from Unknown User sent on 2016-06-01 21:36:13 UTC###

From: Trial user
I have a network connection by I'm getting a 401

Link to HockeyApp

https://rink.hockeyapp.net/manage/apps/37020/feedback/560259

Issue moved to artsy/auctions #190 via ZenHub


added input and textarea component

added input and text-area components

preview link: https://deploy-preview-6--peaceui.netlify.app/input(since the default preview link not working)

Good to merge !


Prevent network errors from being sent to Sentry

Description
Prevent "network request failed" errors from being sent to Sentry when the user is offline, to reduce the noise.
In this PR

Make the Logger aware of if the user is online
Make the Logger aware of the network errors that we want to exclude from Sentry
Network errors should still be sent to Sentry if the user is online (this is a genuine error)
Add a remote config value so that we can add network errors that we want to exclude on the fly

Other changes
N/A
Tested
Manually
How others should test
This task does not require testing from QA team
Related issues
N/A
Backwards compatibility
Yes

Hey @MuckT since "How others should test has n/a" hence we are skipping this PR
CC : @kathaypacific


Remove bad HA refs

synced local file(s) with worgarside/github-config-files.

This PR was created automatically by the repo-file-sync-action workflow run #7071155312

This PR is empty, closing it. :no_good:


Observer is different after adjusting localization

When a person adjusts the box in gridview, the observer changes and then appears as if it may have been validated when in fact that was not the intention. Issue discussed in early June meeting with Kevin.
Observer name should change only when validating or changing the class label.
Hoping to have completed by 11/30/2023.

@lonnylundsten I made an issue for this (#19) when we discussed this behavior before, and closed it after concluding that the observation's observer does not change when the box is modified or verified -- except in the case when the label is changed. I'm wondering if we're conflating terms ("observer" is overloaded between the observation and the bounding box).
For this issue, do you mean the observer in the bounding box JSON, or the observer in the observation (annotation)?
For context, a long time ago when we first designed vars-localize and vars-gridview, we made these distinctions:

Observation "observer": who created the annotation or who last updated its concept
Bounding box "observer": who created the bounding box or last updated its dimensions
Bounding box "verifier": who last verified the bounding box dimensions as accurate

In my last testing of gridview per #19, I checked that changes to these values are made only as follows:

User verifies a bounding box as-is (empty concept/part boxes) --> both observers are unmodified, verifier is updated
User resizes/moves a bounding box --> observation observer is unmodified, bounding box observer is updated, verifier is unmodified
User renames a bounding box's observation --> observation observer is updated, bounding box observer is unmodified, verifier is updated

Do we want to change that? If not, are you noticing something other than that happening?

This issue is being reported by Kris and Larissa. I will ask them to verify and determine it is/is not working as expected. If its A-OK, I'll close this issue.

Thanks @lonnylundsten for testing! It sounds like gridview is in fact doing what's described above, but we may need to sync on how we want to name these fields or define the logic behind how they're populated/updated. I'll close this issue but we can open new ones if we want to make any changes.


Fix/Expire entities after the expiration epoch

Related to https://github.com/nspcc-dev/neofs-node/issues/1674.

It was decided that a token expiration != an object expiration cause we use terms from JWT that differ from object expiration.


release-20.1: pgdate: parse infinity/-infinity as max/min supported timestamp

PR: https://github.com/cockroachdb/cockroach/pull/50365
From release notes:

Previously, using infinity evaluated to a negative, i.e., "-292277022365-05-08T08:17:07Z". This has been fixed to be the maximum supported timestamp in PostgreSQL that is not infinity. Likewise, -infinity is the smallest supported value. Note this does currently does not behave exactly like infinity in PostgreSQL (this is a work in progress and may be resolved later).  [#50365][#50365] {% comment %}doc{% endcomment %}

More details from @otan:
In CockroachDB, infinity::timestamp/tz casts to the highest and lowest representable value, whereas in psql, infinity is always higher than any other timestamp. This is not new behavior; it's just that infinity now represents a large timestamp value as opposed to an invalid one in CRDB.
crdb:
demo@<IP_ADDRESS>:59246/defaultdb> select 'infinity'::timestamp;
              timestamp
--------------------------------------
  294276-12-31 23:59:59.999999+00:00
(1 row)

psql:
otan=# select 'infinity'::timestamp;
 timestamp
-----------
 infinity
(1 row)

psql:
otan=# select 'infinity'::timestamp > '  294276-12-31 23:59:59.999999+00:00'::timestamp;
 ?column?
----------
 t
(1 row)

crdb:
demo@<IP_ADDRESS>:59263/defaultdb> select 'infinity'::timestamp > '  294276-12-31 23:59:59.999999+00:00'::timestamp;
  ?column?
------------
   false
(1 row)


Fix for flaky Windows tests preventing deployment

This PR copies govuk-frontend by making Windows tests optional:

Why? Since the<EMAIL_ADDRESS><EMAIL_ADDRESS>upgrade Windows tests runs keep timing out:

This PR tackles the issue with:

Only build once per test run via pretest
This also fixes jest --watch running a full rebuild on every edit

Run GitHub tasks in parallel
Speeds up our GitHub workflow and gives each task a separate container

Run GitHub tasks in Linux by default
Windows test runs are now optional but may return

The status checks will need changing
These don't exist in the PR anymore:
Build & Test (ubuntu-latest)
Build & Test (windows-latest)

Oh, I wasn't aware of that. If we already have a solution on govuk-frontend, I wouldn't mind having it on this one as well to keep the output tidy, please 😄

Oh, I wasn't aware of that. If we already have a solution on govuk-frontend, I wouldn't mind having it on this one as well to keep the output tidy, please 😄

@romaricpascal Done, here's one that's been re-run:
https://github.com/alphagov/govuk-design-system/actions/runs/4296180852
If you click into the Build job you'll see the skipped steps


[improve][broker] Remove locallyAcquiredLock when removeOwnership

Fixes #18196

Master Issue: #18196
Motivation

Modifications
change get to remove
Verifying this change

[ ] Make sure that the change passes the CI checks.

(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)

Added integration tests for end-to-end deployment with large payloads (10MB)
Extended integration test for recovery after broker failure

Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes

[ ] Dependencies (add or upgrade a dependency)
[ ] The public API
[ ] The schema
[ ] The default values of configurations
[ ] The threading model
[ ] The binary protocol
[ ] The REST endpoints
[ ] The admin CLI options
[ ] Anything that affects deployment

Documentation

[ ] doc
[ ] doc-required
[x] doc-not-needed
[ ] doc-complete

Matching PR in forked repository
PR in forked repository:

Please rebase the branch

Please rebase the branch

done

Codecov Report

Merging #18197 (9b35de2) into master (6c65ca0) will increase coverage by 35.47%.
The diff coverage is n/a.

@@              Coverage Diff              @@
##             master   #18197       +/-   ##
=============================================
+ Coverage     34.91%   70.39%   +35.47%
+ Complexity     5707      436     -5271
=============================================
  Files           607       26      -581
  Lines         53396     2246    -51150
  Branches       5712      245     -5467
=============================================
- Hits          18644     1581    -17063
+ Misses        32119      492    -31627
+ Partials       2633      173     -2460

Flag
Coverage Δ

unittests
70.39% <ø> (+35.47%)
:arrow_up:

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

Impacted Files
Coverage Δ

...java/org/apache/pulsar/proxy/stats/TopicStats.java
58.82% <0.00%> (-41.18%)
:arrow_down:

...pache/pulsar/proxy/server/ProxyServiceStarter.java
60.66% <0.00%> (-1.34%)
:arrow_down:

...a/org/apache/pulsar/proxy/server/ProxyService.java
80.00% <0.00%> (-0.94%)
:arrow_down:

...apache/pulsar/proxy/server/DirectProxyHandler.java
63.63% <0.00%> (ø)

...apache/pulsar/proxy/server/ParserProxyHandler.java
91.86% <0.00%> (ø)

...ache/pulsar/proxy/server/BrokerProxyValidator.java
89.15% <0.00%> (ø)

...sar/proxy/server/TargetAddressDeniedException.java
100.00% <0.00%> (ø)

...in/java/org/apache/pulsar/PulsarBrokerStarter.java

.../org/apache/pulsar/PulsarClusterMetadataSetup.java

...g/apache/pulsar/PulsarClusterMetadataTeardown.java

... and 579 more


[Bug][3.5.0] Pinia store not persisting to client-side

Environment

Operating System: Darwin
Node Version:     v16.16.0
Nuxt Version:     3.5.0
Nitro Version:    2.4.1
Package Manager<EMAIL_ADDRESS>Builder:          vite
User Config:      modules, cwa, extends, srcDir, typescript
Runtime Modules<EMAIL_ADDRESS>Build Modules:    -

Reproduction
I'm not sure how to make a minimal reproduction right now, but it is apparent in my module. Using 3.4.* I have my store data populated on server-side and shows on client side. When upgrading to 3.5.0 the SSR shows the data and then disappears on client-side
Describe the bug
As described above. I also have some video reproductions.

v 3.5.0

https://github.com/nuxt/nuxt/assets/25174262/e6008423-3cf6-453f-be3d-f41ee32a3155

v 3.4.x

https://github.com/nuxt/nuxt/assets/25174262/f87ddae5-dc85-4b3c-9a81-c31ec1bd2441
Additional context
I am not implementing stores in a standard way I suppose. But still there is a BC break.
My storage classes are initialised here:
https://github.com/components-web-app/cwa-nuxt-module/tree/nuxt3/src/runtime/storage
And this is initialised from a module which includes a plugin that creates a class instance of CWA which will create a new storage class in the constructor.
Logs
No response

Would you try defining a custom reviver + reducer with definePayloadReducer and definePayloadReviver? See example at https://nuxt.com/docs/api/composables/use-nuxt-app#payload.
You probably can work around this as well by disabling experimental.renderJsonPayloads.

Hey @silverbackdan
I see that you are using Nuxt Dev Tool. Please try disabling Nuxt Dev Tool and see if this issue gets resolved.
Issue
I had similar issue where the Pinia store shows data when printing window.__NUXT__.pinia in console, and even in nuxtApp.payload.data - but then nothing is available when accessing Pinia store (productStore.data) on the client-side.  Data flashes on the screen for a split second, then disappears and throw Hydration completed but contains mismatches error in console.
If disabling doesn't work, remove Nuxt Dev Tool altogether.  Doing this somehow, stopped resetting Pinia store state. HTH.
Versions:

"nuxt": "^3.5.0"
"@pinia/nuxt": "^0.4.11",
"pinia": "^2.1.1"

Does someone have a reproduction for where devtools are causing this issue? If we can raise it upstream on https://github.com/nuxt/devtools hopefully we can resolve. (cc: @antfu)

Does someone have a reproduction for where devtools are causing this issue? If we can raise it upstream on https://github.com/nuxt/devtools hopefully we can resolve. (cc: @antfu)

Hey @danielroe / @antfu
Stackblitz does not replicate the issue being discussed here. :(
I've created this repo with a branch - with steps in the README file - to reproduce the bug.
https://github.com/Krutie/nuxt-3-lessons/tree/issue-20941

Mine appears to be a little more complex. I removed dev tools and then got the error
"getActivePinia()" was called but there was no active Pinia

This had started happening in tests since the latest update and then I updated my plugin to set active pinia in test mode - however I see after removing dev tools, that this could be the root cause. Some update has resulted in me trying to call a pinia store, from a constructor in a ref, after my stores are setup, but results in this error.
So perhaps the dev tools is suppressing this error somehow in my use case, or setting an active pinia instance automatically when my module/plugin seems to have an issue..
Perhaps something in a Nuxt Pinia module update is simply resulting in the active pinia store not always being set and then the dev tools is setting again... or something...

Mine appears to be a little more complex. I removed dev tools and then got the error
"getActivePinia()" was called but there was no active Pinia. Did you forget to install pinia? const pinia = createPinia() app.use(pinia) This will fail in production.

This had started happening in tests since the latest update and then I updated my plugin to set active pinia in test mode - however I see after removing dev tools, that this could be the root cause. Some update has resulted in me trying to call a pinia store, from a constructor in a ref, after my stores are setup, but results in this error.
So perhaps the dev tools is suppressing this error somehow in my use case, or setting an active pinia instance automatically when my module/plugin seems to have an issue..
Perhaps something in a Nuxt Pinia module update is simply resulting in the active pinia store not always being set (or in my case, not set in time) and then the dev tools is setting again...

@Krutie Thanks for the great repro! Fix will landed in the next DevTools release


feat: add GenerateDataKey permissions

What type of PR is this?
/kind bug
What this PR does / why we need it:
This PRs adds the GenerateDataKey permissions required for the replication after some changes in the AWS side.
It also adds the required permissions for batch replication jobs.
Does this PR introduce a user-facing change?
- Adds required permission for batch replication
- Adds GenerateDataKey permission for rule based replication

/priority important-soon

/approve


fix: Move My Collection down in mobile menu

Addresses CX-2692
Description
Move "My Collection" entry down in the mobile menu.

~Thank you for the quick solution Ole! but I have a concern about it~ nvm 😂

haha


[SALEOR-4568] Extend account register mutation

I want to merge this change because I need that accountRegister consumes also first & last name.

Impact

[ ] New migrations
[ ] New/Updated API fields or mutations
[ ] Deprecated API fields or mutations
[ ] Removed API types, fields, or mutations
[ ] Documentation needs to be updated

Pull Request Checklist

[ ] Privileged queries and mutations are guarded by proper permission checks
[ ] Database queries are optimized and the number of queries is constant
[ ] Database migration files are up to date
[ ] The changes are tested
[ ] GraphQL schema and type definitions are up to date
[ ] Changes are mentioned in the changelog

Task linked: SALEOR-4568 Extend accountRegister mutation


Fixes #13071: Help option for commands was not working in modules

Q
A

Is bugfix?
yes

New feature?
no

Breaks BC?
no

Tests pass?
yes

Fixed issues
#13071

@dynasource There were no tests for #12028. Added unit tests to cover both #12028 and #13079 issues.

Merged. Thank you!


adding example to README

not sure if this belongs in README but thought someone else might need this

We used to have an examples folder, but the author deleted it, so I think documentation is currently the best place to put examples. Our docs are sparse right now because we just got them set up here: https://github.com/webview/docs.

@dandeto Considering that the example is specific to the language used in this repository it may make sense to include examples in their corresponding repositories. The docs can then link to them. I have seen this being used successfully in the ESP IDF. It may also make the maintenance of the examples easier as they are lying next to the libraries code and serve as a regression test.

@justjosias We definitely need examples. @petabyt and I have been talking about this for a while. I personally like the idea of having an examples folder again that covers the most common use cases. We also need comprehensive documentation with basic examples (webview.dev) and maybe a wiki for other situations the community wants to cover (like this one, probably).
Feel free to open an issue for this if there isn't one already.

This might sound like a trivial question, but how do I add a commit to this PR? I moved the example an examples. I used the GitHub CLI, but when I do git push -u origin readme_scrape_example I get a 403. What is the recommended workflow here?

@nicklasfrahm It should work now. I've authorized you to write to branches.

@justjosias @dandeto this should be good to merge.

Okay. Maybe we can modify the old examples and add them back to the repo. Thanks for the work on this one 👍


Add option to toggle left sidebar

It would be nice if there were an option to hide the left sidebar; I use one account with Protonmail, so having the sidebar open at all times is kind of just a waste of space for me.
Thanks!

Great idea, I will implement this through a shortcut in the short-term and later in the settings panel

Like this!

Thanks @BeatPlus for implementing this #153. It's now possible to toggle the sidebar with Ctrl + Shift + H.


Adding McCrary (2008) test for manipulation in the running variable

Hi Nikos!
I have added the McCrary density test for manipulation in the running variable. I include some tests, and also some comparisons to established packages in R and in Stata for three datasets, including Lee (2008). The results matches. I added a small example in the README, plus the plots for the comparisons, and a test of time.
The package seems to perform well in relatively small samples. However, when I increased the sample size to one million, the Julia implementation is ~4 times slower than the other two. I still need to figure this out and improve the speed here.
Let me know if you have any comment.

Hi Pablo! Happy holidays!
Thanks a lot for contributing this code! I will take a more careful look later to figure out the slowdown (it should not happen with Julia)!
I have a few initial remarks:

Since your changes, Evan's PR is in the repo, so you need to resolve the conflicts.
I like the timings etc. you added, but think they should be removed from the README (the README should  be short and perhaps contain just a quick example explaining how to use the McCrary functionality). Once we have a better documentation system in place for this package, we can find a better place for it!
The interface right now does not look very "Julian" and is closer to how one would write a package in R or other languages. Of course this package is still in very early stages, so it's not clear what the best interface is. To make it more unified with other functionality in this package, perhaps you could define a McCraryTest type ( that e.g. contains the bandwidth as a field) , a fit method for it that returns a FittedMcCraryTest. See for example the code for local linear regression. Then you could define plotting functionality for the FittedMcCraryTest with Plot recipes (https://docs.juliaplots.org/latest/recipes/) instead of loading Plots.jl which is a very heavy dependency.

I would be happy to talk more about any of these points or provide guidance!

Hi Nikos! Happy holidays too!
Sorry for the delay in my response. I was out of town for the holidays and just come back.
I will start working on your comments. Thank you for them :)
I will let you know if I have any issue.

Hi Nikos! Happy holidays too!
Sorry for the delay in my response. I was out of town for the holidays and just come back.
I will start working on your comments. Thank you for them :)
I will let you know if I have any issue.

Codecov Report

Merging #15 (f68fab9) into master (7405152) will increase coverage by 7.31%.
The diff coverage is 93.33%.

@@            Coverage Diff             @@
##           master      #15      +/-   ##
==========================================
+ Coverage   61.78%   69.09%   +7.31%
==========================================
  Files           7        8       +1
  Lines         348      453     +105
==========================================
+ Hits          215      313      +98
- Misses        133      140       +7

Impacted Files
Coverage Δ

src/RegressionDiscontinuity.jl
100.00% <ø> (ø)

src/density_test.jl
93.33% <93.33%> (ø)

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 7405152...f68fab9. Read the comment docs.

Codecov Report

Merging #15 (f68fab9) into master (7405152) will increase coverage by 7.31%.
The diff coverage is 93.33%.

@@            Coverage Diff             @@
##           master      #15      +/-   ##
==========================================
+ Coverage   61.78%   69.09%   +7.31%
==========================================
  Files           7        8       +1
  Lines         348      453     +105
==========================================
+ Hits          215      313      +98
- Misses        133      140       +7

Impacted Files
Coverage Δ

src/RegressionDiscontinuity.jl
100.00% <ø> (ø)

src/density_test.jl
93.33% <93.33%> (ø)

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 7405152...f68fab9. Read the comment docs.

Hi Nikos!
I hope this message finds you well.
I added the points you made to the code. I created a McCraryTest type, with the default values to be those calculated by McCrary (2008). The fit(McCraryTest(), data::RunningVariable) returns FittedMcCraryTest.
Let me know if you have more comments!
Best

Hi Nikos!
I hope this message finds you well.
I added the points you made to the code. I created a McCraryTest type, with the default values to be those calculated by McCrary (2008). The fit(McCraryTest(), data::RunningVariable) returns FittedMcCraryTest.
Let me know if you have more comments!
Best

Thanks a lot @pvalenzuelac for contributing this and I apologize for the delay in getting back to you. The functionality looks great to me and I am going to merge it as soon as tests finish! I think some of my last remarks really pertain to the package more generally so I will try to think about how to resolve them from a broader perspective.
One last remark about the tests: they occasionally fail, because they are random (e.g. testing if a null p-value is >0.05 will fail 5% of the time :), that's why I commented these tests out for now). A fix is to 1) test the outcome over multiple replicates (to check for the statistical behavior of the p-values) and 2) to set a random simulation seed, say by writing:
using Random
Random.seed!(1)


Source Control has wrong casing

Issue Type: Bug

Somehow have VSCode think your repository lives in c: drive instead of C: drive.
Attempt to stage something in the source control tab.
That's it. It throws an error then.

I've found that by using the same line manually, it still happens. But when I set the c: to C:, it works fine. No idea what happened. It hasn't always been like this. Only happened within the last couple of weeks.
 There have been several reports similar to yours that were solved by upgrading Git.

Yes, check your Git version and make sure you update to 2.27.


Last column can't be edited if parent width is a percentage

http://plnkr.co/edit/wKVrbMx663uBe6OxZzNy?p=preview
If I try to show an editable grid in a div where the parent width is a percentage less than 100% (like a Bootstrap column < col-md-12), cells in the last column aren't editable:
Workarounds:

Scroll the horizontal scrollbar to the right before clicking the cell (not ideal)
Set an explicit px width on the grid (not ideal for fluid layouts)
Add the ui-grid-selection directive to the grid.  For some reason, if the row header is there this works fine (close enough, even though I don't want the user to select anything)

Details:
If you don't have the row header, this particular fireScrollingEvent is raised because it decided that the x scroll change was 1%: https://github.com/angular-ui/ui-grid.info/blob/4496502fefce8110ff329f7a8e34033f7fade1ea/release/ui-grid-unstable.js#L11799
Edit
I think there are two bugs here:

grid.gridWidth can be a float when the parent is percentage based, and this line should really be using Math.ceil(grid.gridWidth) instead.  Implementing that fixes this issue.
Row header width isn't taken into account inside of the scrollToIfNecessary function.

I've added the first line as you suggest, thanks for that fix.
On row header width, I think that it maybe isn't taken into account because it's not in the body render container, and the scroll only applies to the body, not the left (or right) pinned container.  Does that make sense?


fix/emojis-and-vulgar-fractions: hunspell should not check it

What does this PR accomplish?

🩹 Bug Fix
🦚 Feature

Closes # .
Changes proposed by this PR:

Notes to reviewer:

📜 Checklist

[ ] Works on the ./demo sub directory
[X] Test coverage is excellent and passes
[X] Documentation is thorough

Test for emojis
error: spellcheck(Hunspell)
  --> /home/tmhdev/Documents/rust_samples/recursion_rust/src/fibonnacci.rs:2
   |
 2 |  😘🤗🦀
   |  ^^^
   |   Possible spelling mistake found.

error: spellcheck(Hunspell)
  --> /home/tmhdev/Documents/rust_samples/recursion_rust/src/fibonnacci.rs:2
   |
 2 |  😘🤗🦀⅔⅔
   |  ^^^^^
   |   Possible spelling mistake found.

error: spellcheck(Hunspell)
  --> /home/tmhdev/Documents/rust_samples/recursion_rust/src/fibonnacci.rs:3
   |
 3 |  ⅔⅔
   |  ^^
   |   Possible spelling mistake found.

I ran again and the possible mistake is not seen.
This PR refers to https://github.com/drahnr/cargo-spellcheck/issues/141

Just checking if the changes will be in this part of the code. Still need to find something for fractions, maybe https://crates.io/crates/unicode-segmentation

The code location is correct :+1: , it would be nice to make it a separate module, since other backends might want to allow whitlisting emojis and graphemes as well.
Note that graphemes are multiple unicode characters, so a more fully future lib might make more sense i.e. unic

ok, not sure if the other unicode should also be included here besides emojis and vulgar fractions. I only focused on those two. Feel free to drop any tips about it. I could not find in unic a better way to handle with vulgar fractions, maybe I am missing something? Another possibility, would be to find if the char is in the ranges of vulgar fractions but maybe not so readable.

Hi @drahnr, thanks for fixing the test back to working :pray: . So if regex is a too expensive operation, and also convert to the name as it was done before, then another option would be have the VULGAR FRACTIONS* hard-coded and then simple check if a char is on that list and use unic emoji for check of the emoji. What do you think? Which approach you propose and do you mean to add a flag to enable the check of chars and emoji?

The expensive part is the refer compilation, not applying the compiled regexp :) so if you wrap that in a lazy static it should be fine.
If you have a better/faster idea, go for it. If unsure, measure with i.e. a criterion bench or a simple cputime crate.

I tend to prefer unic since the general plan would be to move in that direction anyways

Ping :upside_down_face:

@laysauchoa finally got around to taking another look at this, and I'd say this is good to go as is now :)

The CI issue is unrelated to these changes, it's just the first time it popped up - filed https://github.com/bminixhofer/nlprule/issues/68 but is most likely a lazycell issue.


Bo: updated MediaController(not-tested)

I'm opening this PR so I can comment on the code as we go. @bojms45

@bojms45 Closing while we reconsider the search functionality. I might just make a new branch off master instead. I'll keep you posted!


add stuff and fix stuff i made long time ago

I hope you didn't already have your own way to make rating show mid song
and I change the rating text hope it is ok
about fix NPS is that if you have show NPS off it will have | before everything else which isn't right and it has been bothering me for a while now cuz I make it happen and not fix it
and I remove combo break from top info cuz it is now on rating too

Manually merged


Update documentation: add warning that it's impossible to change Jetty settings, among others "maxFormContentSize"

Since there is no option to change Jetty settings through Spark config, pls, just add relevant info to the documentation. So that others do not have to waste their time as I did. I understand this is minor issue but still. Adding warning seems to be ta fair solution, doesn't it? Thx.
Original issue:
https://github.com/perwendel/spark/issues/314 - "How to change Jetty settings through SparkJava? / Form too Large Exception / org.eclipse.jetty.server.Request.maxFormContentSize"

get the jetty source from git and change maxFormContentSize,maxFormKey in the Rquest.java.
Then it solved

But you have to do it each time you want to use new version of Spark -> new version of Jetty. Nope, not good enought for us. We're already using Dropwizard.
I created this issue because I just want docs to be updated. I want others to be warned so that everyone can make their decision if they're fine with this problem or not.
Thx anyway :)

Can configure jetty now, thanks to #813

Awesome!!!!
BIG THX to everyone involved! :)
Cheers


readme update

readme updated, screenshots weren't visible, and headings fixed (classic heading instead of the # symbol showing)
This PR

[x]
[ ]
[ ]

Follows #.
Related to #.
Fixes #.

Thanks @TheAdnan!


Create Application Menu Utilities

Issue Description
Create application menu style utilities that launch further into the utility menu.
Issue Type

[x] New Feature
[ ] Enhancement
[ ] Bug
[ ] Other

JIRA created


[bug] MacOS notification not working with safari in example API app

Describe the bug
Notification API not working in MacOS with Safari as default browser
Reproduction
Clone the example of api from tauri repo and run it.
Then go to notification tab and click on send notification.

Expected behavior
No response
Platform and versions
Operating System - Mac OS, version 12.1.0 X64

Node.js environment
  Node.js - 16.13.1
  @tauri-apps/cli - 1.0.0-beta.10
  @tauri-apps/api - 1.0.0-beta.8

Global packages
  npm - 8.3.1
  pnpm - Not installed
  yarn - 1.22.17

Rust environment
  rustc - 1.58.0
  cargo - 1.58.0

Rust environment
  rustup - 1.24.3
  rustc - 1.58.0
  cargo - 1.58.0
  toolchain - stable-x86_64-apple-darwin (environment override by RUSTUP_TOOLCHAIN)

App directory structure
/dist
/node_modules
/public
/src-tauri
/src

App
  tauri.rs - 1.0.0-beta.8
  build-type - bundle
  CSP - default-src blob: data: filesystem: ws: wss: http: https: tauri: asset: customprotocol: 'unsafe-eval' 'unsafe-inline' 'self' img-src: 'self'
  distDir - ../dist

Stack trace
No response
Additional context
No response

We need more information on this issue. I don't see a relation between Safari as default browser and the notification not working (I just tested it and it's working ok) @ShivamJoker
@jmcartlamy can you write an example app? did you enable the notification allowlist? also if you already clicked deny on the permission request dialog before, you'd need to $ rm $HOME/Library/Application\ Support/com.your.bundleid/.tauri-settings.

Can I request that examples be added directly to the docs? https://tauri.studio/docs/api/js/modules/notification has 0 examples.
There should be an example with the Notification Web API and also an example using window.__TAURI__.notification.sendNotification
I tried this but I get no notification on Windows.

Yeah, there's no examples, and since I've never used the Notification API, I'm getting problems:
The docs say I can use Notification, but simply calling
Notification.requestPermission() in the frontend panics Tauri:
thread 'main' panicked at 'This API cannot be called on the main thread. Try using `std::thread::spawn` or `tauri::async_runtime::spawn`.', C:\Users\maste\.cargo\registry\src\github.com-1ecc6299db9ec823\tauri-runtime-wry-0.2.1\src\lib.rs:1129:8
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
webview2: panic in callback function. Aborting because it's UB to unwind across FFI boundaries.
error: process didn't exit successfully: `target\debug\app.exe` (exit code: 0xc0000409, STATUS_STACK_BUFFER_OVERRUN)

The svelete example doesn't even work on Windows. There's no error messages either.

@elibroftw that panic is caused by an outdated tauri-runtime-wry dependency. Yours is 0.2.1, but the latest is 0.3.x. Try running cargo update in your src-tauri dir (probably a good idea to make sure that your dependencies in Cargo.toml are up-to-date too)

Is there a way for the notification permission to be true by default?

Is there a way for the notification permission to be true by default?

Not on macOS at least, because the OS will prompt the user first. I don't know enough about windows or the different linux DEs to know if they have similar checks in place.

On Windows and Linux, I've never had to accept permissions to see notifications from an app. Therefore there shouldn't be an artificial alert box for something that is not needed on Linux and Windows.

@lucasfernog After testing the example API app, I see it's working correctly. I re-tested on my project and it turns out that it works now too. The way macOS handles notifications is very particular and I must have missed the permission request dialog.

hey @ShivamJoker & @lucasfernog, I am getting the same problem like above, I am trying to make rocket.chat desktop in tauri as a Google summer of Code project, and I am stuck with the notifications part, I have injected a script in the webview and also defined a command for the same, I take the notification data and I trigger the notification provided by the tauri api, Can you please have a look on my code, I would be really really really grateful to you. Thanks
Injection Script
// Listen for the 'notification' event
const sendNotification = (notificationObj) => {
  const notificationData = { title: notificationObj.title, body: notificationObj.text}
  window.__TAURI__.invoke('send_notification', { notificationData }).then((message) => console.log(message)).catch((e) => console.log("Error Occured", e));
}

self.addEventListener('notification', (event) => {
  event.preventDefault();
  window.__TAURI__.notification.isPermissionGranted().then((isPermissionGranted) => {
    console.log("Notification Permission", isPermissionGranted)
    if (isPermissionGranted === false) {
      window.__TAURI__.notification.requestPermission().then((permission) => {
        if (permission !== 'granted') {
          return;
        }
        sendNotification(event.detail.notification)
      });
    } else {
      sendNotification(event.detail.notification)
    }
  })
});

Tauri Command
#[tauri::command]
fn send_notification(notification_data: serde_json::Value) {
    let title = notification_data["title"].as_str().unwrap();
    let body = notification_data["body"].as_str().unwrap();
    // let tag = notification_data["tag"].as_str().unwrap();
    // let data = notification_data["data"].as_str().unwrap();
    println!("Notificatin Recieved with title {} and body {}", title.to_string(), body.to_string());

    let notification: Notification = Notification::new("com.rocket.chat").title(title.to_string()).body(body.to_string());

    let result = notification.show().map_err(|e| e.to_string());

match result {
    Ok(()) => println!("Ok, Notification Shown"),
    Err(e) => println!("Error: {}", e),
}
}


Update main.rs with CoInitializeEx

This is part PR, part question. My understanding is that one needs to call CoInitialize/CoInitializeEx to initialize COM for a given process/thread before making use of any COM interfaces. I see this happening in some examples, however not this one targeted directly at COM.
Can anybody clarify this topic for me? This example seems to run fine for me on my machine, however all documentation I can find seems to suggest that such a call is required. So how are we getting away without it here?

Don't think this is needed as it's not a COM API. Probably a mistake; I suspect the intention here was to showcase use of the IUri::CreateUri instead.

CoInitializeEx creates or joins an apartment that certain APIs may require from the calling thread. This does not apply to all COM interfaces. A COM interface is just a vtable, a virtual function table, following certain conventions. Apartments are a feature of COM that many APIs don't require.

And if you really do need an apartment, it's almost always better to use CoIncrementMTAUsage. Here's an example:
https://github.com/microsoft/windows-rs/issues/3166#issuecomment-2231756285

Yes, you can safely call CoIncrementMTAUsage and let the MTA live until the process terminates. This is actually safer since COM lifetime is usually unpredictable.


Draco Webwork URL Rewritten incorrectly in Electron

Hi,
I've encountered a bug when loading Cesium under electron - when utilising draco encoding only. The URLs to load the draco webworker gets rewritten incorrectly at some point - but the URL to WASM is fine.
Webworker URL
WASM Url
I've done some experimenting and the error occurs in how the url is rewritten sometime after it is set in Scene/DracoLoader.js but before it reaches WorkersES6\decodeDraco.js  - if I manually inject the correct URL into the decodeDraco(...) function then it works correctly. Sorry I can't be more precise but I am not familiar enough with the codebase to go into more detail

Hi @beachtom, have you tried setting the CESIUM_BASE_URL global variable to the root cesium directory?

Yes - we are setting it in our webpack build - all other workers and the draco WASM seem to load fine. Really not sure why it is not rewriting it properly.

Ah, thanks @beachtom. Would you be able to show us your webpack configuration?

vue.txt
Attached - we are building with vue cli - I attach the config file here


On Ipad, moving a block with an input a couple times makes the whole webpage freeze

On Ipad, when adding a block with a prefilled input (such as mySprite.x, or "for value of list"), moving it (and its embedded block) a couple times makes the whole page freeze. The simulator keeps running, but all the rest is unresponsive. The only way to exit is refresh/close the tab.

fixed with https://github.com/Microsoft/pxt-blockly/pull/230


allow builds to fail on rubinius

I'm interested in knowing if the build works on rubinius, but these days it's not used enough to make it worth failing the build

It's disappointing to see failures like this


Absent information in 399.md and 999.md files

In files 399.md and 999.md should be something😿

Closing this down as all of the READMEs have been updated now...


Error "Activity is cancelled by the user" after selecting an email address from prompt

Hi,
Thanks for creating this repository. I tried to consume it. It works well until I select an email address from the list of accounts present on the phone. Once I select, it throws exception with a message "Activity is cancelled by the user".
Any input is appreciated. Thanks.

Hello @boopathyraj25
thanks for bug report. On what device do you consume this package ?

Android version, API version
real device or emulator ?

this package is still work in progress because the underlying credential manager API has a few bugs that will be fixed when
1.3.0 will be set as stable version. Current one is 1.2.2

Because of that we dont use it yet. After v1.3.0 is released I will finish the library and deploy it as nuget package.


Twitter link showing removed when post is still available

https://feline-bold-halibut.ngrok-free.app/scrapes/723
Hello,
I am trying to archive this link: https://x.com/annvandersteel/status/1851376200444244449 and am getting this error message “The post you requested below has unfortunately been removed before we could archive it” even though the video is still online.
If you could please provide some guidance that would be much appreciated!
Regards,
KELLY JONES
Journalist
She/Her

This later worked for me and showed completed in Grigori for all submissions, so I think this has been solved


Not resolving names of native applications on Windows when not using extensions

The problem is in GetCommand().

Need to retest this.  Tests now show this to not be a problem.

This appears to be resolved after several tests.


Cannot load embeddings on M1 Pro Macbook

I created an embedding named keqing, initialization text is girl, initialization text(negative) is *, on my M1 Pro macbook.
When restart the web-ui to loading the embeddings, the error was:
Warning: caught exception 'Torch not compiled with CUDA enabled', memory monitor disabled
No module 'xformers'. Proceeding without it.
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Loading weights [7d13c797] from /Users/lxy/PycharmProjects/stable-diffusion-webui/models/Stable-diffusion/nsfw_pro.ckpt
Applying cross attention optimization (InvokeAI).
Model loaded.
Error verifying pickled file from /Users/lxy/PycharmProjects/stable-diffusion-webui/embeddings/keqing.pt:
Traceback (most recent call last):
  File "/Users/lxy/PycharmProjects/stable-diffusion-webui/modules/safe.py", line 131, in load_with_extra
    check_pt(filename, extra_handler)
  File "/Users/lxy/PycharmProjects/stable-diffusion-webui/modules/safe.py", line 89, in check_pt
    unpickler.load()
  File "/Users/lxy/PycharmProjects/stable-diffusion-webui/modules/safe.py", line 62, in find_class
    raise Exception(f"global '{module}/{name}' is forbidden")
Exception: global 'torch._utils/_rebuild_device_tensor_from_numpy' is forbidden

The file may be malicious, so the program is not going to read it.
You can skip this check with --disable-safe-unpickle commandline argument.

Error loading emedding keqing.pt:
Traceback (most recent call last):
  File "/Users/lxy/PycharmProjects/stable-diffusion-webui/modules/textual_inversion/textual_inversion.py", line 134, in load_textual_inversion_embeddings
    process_file(fullfn, fn)
  File "/Users/lxy/PycharmProjects/stable-diffusion-webui/modules/textual_inversion/textual_inversion.py", line 104, in process_file
    if 'string_to_param' in data:
TypeError: argument of type 'NoneType' is not iterable

Error verifying pickled file from /Users/lxy/PycharmProjects/stable-diffusion-webui/embeddings/keqing-neg.pt:
Traceback (most recent call last):
  File "/Users/lxy/PycharmProjects/stable-diffusion-webui/modules/safe.py", line 131, in load_with_extra
    check_pt(filename, extra_handler)
  File "/Users/lxy/PycharmProjects/stable-diffusion-webui/modules/safe.py", line 89, in check_pt
    unpickler.load()
  File "/Users/lxy/PycharmProjects/stable-diffusion-webui/modules/safe.py", line 62, in find_class
    raise Exception(f"global '{module}/{name}' is forbidden")
Exception: global 'torch._utils/_rebuild_device_tensor_from_numpy' is forbidden

The file may be malicious, so the program is not going to read it.
You can skip this check with --disable-safe-unpickle commandline argument.

Error loading emedding keqing-neg.pt:
Traceback (most recent call last):
  File "/Users/lxy/PycharmProjects/stable-diffusion-webui/modules/textual_inversion/textual_inversion.py", line 134, in load_textual_inversion_embeddings
    process_file(fullfn, fn)
  File "/Users/lxy/PycharmProjects/stable-diffusion-webui/modules/textual_inversion/textual_inversion.py", line 104, in process_file
    if 'string_to_param' in data:
TypeError: argument of type 'NoneType' is not iterable

Loaded a total of 0 textual inversion embeddings.
Embeddings:
Running on local URL:  http://<IP_ADDRESS>:7860

To create a public link, set `share=True` in `launch()`.

My pytorch version is as follows:
open-clip-torch         2.7.0
pytorch-lightning       1.7.6
torch                   1.12.1
torchdiffeq             0.2.3
torchmetrics            0.10.3
torchsde                0.2.5
torchvision             0.13.1
Here are some related issues I found:
https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/5634
https://discuss.pytorch.org/t/cant-get-attribute-rebuild-parameter-on-module-torch-utils/32603
https://github.com/AUTOMATIC1111/stable-diffusion-webui/discussions/5431

Solved now! Just follow this issue and pull the latest repo of sd web-ui and restart. For me, I encountered the ModuleNotFoundError, and simply 'pip install blendmodes' worked for me.


Link to contributor graph broken in master/README.md

Thanks for pointing this. The link has been corrected :+1:


Replace icons with SFSymbols

Use SFSymbols only for iOS 13.

I'm wondering has anyone started working on this?

Not as far as I know.
I was playing around with SFSymbols in the “support-dark-theme” branch.
Sent with GitHawk

I'll take care of it 👍🏻


Add datacenter discovery

This commit adds the concept of "datacenter" to our xDS protocol. Unlike other resources, there's slightly different behaviour between proxies to relays and relays to agents. When a relay queries for a datacenter from the agent, the agent returns its own QCMP port and ICAO location. The host then adds the address of remote agent to identify the datacenter. When the proxy then queries the relay for datacenters, it gets all of the relay's agent's addresses, ports, and ICAO codes.
This will be used with a future commit to measure the distance between proxies and agents.

Superseded by #854


music

music doesnt work

Gotta be more descriptive than that.

the site doesn't work, what makes you think the music will???

I think JS music code seems hardcoded or error?

the site doesn't work, what makes you think the music will???

Not sure why you're asking. Considering you are banned.

the site doesn't work, what makes you think the music will???

Not sure why you care at all actually, Considering you are banned.

You can get banned?

Yes, I did by saying "So long, Gay Bowser" and having had posted this image in the discord at a bad time.

Yes, I did by saying "So long, Gay Bowser" and having had posted this image in the discord at a bad time.

Actually you were banned for repeatedly making suicide jokes and then evading the mutes we gave you

Closing this... reopen if you can describe the issue


add practicameteor:core to package, update mocha to 3.2.0. Allows for further refactoring

Simply adding core files to ./core and updating imports. No changes to code.  Updated to Mocha 3.2.0
There are many opportunities to simplify and refactor at a later date.
https://github.com/DispatchMe/meteor-mocha/issues/8

As far as I remember, we can't do this. All mocha test driver packages have to use the same mocha instance or bad things happen when your app is using multiple drivers. That's why we worked together to make mocha-core.


automatic release to Gitlab

Please describe your problem. Include links to any relevant pages or files.
On latest version documentation I see no automatic release guide for Gitlab, did you stop supporting this? It was previously supported

You can find that information here.

@eitanief, GitLab is definitely still supported, and we have a issue (#666) open to write a GitLab setup page but it isn't there yet. The information we have is scattered in current issues too. If you have a specific question, please let us know


react example is not working

I tried to convert the convert the example to a react.js component and everything seems to be fine but onTrack function never is added peerConnection.
component:
 import React, { useState, useEffect, useRef, useCallback } from "react";
const DID_API = {
  key: "your-api-key",
  url: "https://api.d-id.com",
  service: "clips",
};

function DiDAvatar() {
  // States for all the labels and buttons
  const [peerStatus, setPeerStatus] = useState("");
  const [iceStatus, setIceStatus] = useState("");
  const [iceGatheringStatus, setIceGatheringStatus] = useState("");
  const [signalingStatus, setSignalingStatus] = useState("");
  const [streamingStatus, setStreamingStatus] = useState("");

  // Refs for the video element and the peer connection
  const videoElement: any = useRef(null);

  const [peerConnection, setpeerConnection] = useState<any | null>(null);
  // Refs for IDs and statuses
  let sessionClientAnswer;

  const [streamId, setstreamId] = useState("");
  const [newSessionId, setnewSessionId] = useState("");

  let videoIsPlaying = false;
  let lastBytesReceived;
  const maxRetryCount = 3;
  const maxDelaySec = 4;

  const presenterInputByService = {
    talks: {
      source_url: "https://d-id-public-bucket.s3.amazonaws.com/or-roman.jpg",
    },
    clips: {
      presenter_id: "rian-lZC6MmWfC1",
      driver_id: "mXra4jY38i",
    },
  };

  // Check API key
  useEffect(() => {
    return () => {
      stopAllStreams();
      closePC();
      // Any other cleanup can go here
    };
  }, []);

  useEffect(() => {
    if (peerConnection) {
      console.log("HERE");
      peerConnection.addEventListener(
        "icegatheringstatechange",
        onIceGatheringStateChange,
        true,
      );
      peerConnection.addEventListener("icecandidate", onIceCandidate, true);
      peerConnection.addEventListener(
        "iceconnectionstatechange",
        onIceConnectionStateChange,
        true,
      );
      peerConnection.addEventListener(
        "connectionstatechange",
        onConnectionStateChange,
        true,
      );
      peerConnection.addEventListener(
        "signalingstatechange",
        onSignalingStateChange,
        true,
      );
      peerConnection.addEventListener("track", onTrack, true);
    }
  }, [peerConnection]);

  const playIdleVideo = () => {
    videoElement.current.srcObject = undefined;
    videoElement.current.src = "/videos/rian_idle.mp4";
    videoElement.current.loop = true;
  };

  const stopAllStreams = () => {
    // Check if the peer connection exists and has streams
    if (videoElement.current.srcObject) {
      console.log("stopping video streams");
      videoElement.current.srcObject
        .getTracks()
        .forEach((track) => track.stop());
      videoElement.current.srcObject = null;
    }
  };

  const closePC = () => {
    if (peerConnection) {
      // Close the peer connection
      peerConnection.close();
      setpeerConnection(null);
      setPeerStatus("closed");
      setIceStatus("");
      setSignalingStatus("");
      setStreamingStatus("Stream ended");
      peerConnection.removeEventListener(
        "signalingstatechange",
        onSignalingStateChange,
        true,
      );
      peerConnection.removeEventListener("track", onTrack, true);
      console.log("stopped peer connection");
    }
  };

  // Handlers for peer connection state changes
  const onIceGatheringStateChange = () => {
    if (peerConnection) {
      const status = peerConnection.iceGatheringState;
      setIceGatheringStatus(status);
    }
  };

  const onIceCandidate = (event) => {
    console.log("onIceCandidate", event);
    if (event.candidate) {
      const { candidate, sdpMid, sdpMLineIndex } = event.candidate;
      fetch(`${DID_API.url}/${DID_API.service}/streams/${streamId}/ice`, {
        method: "POST",
        headers: {
          Authorization: `Basic ${DID_API.key}`,
          "Content-Type": "application/json",
        },
        body: JSON.stringify({
          candidate,
          sdpMid,
          sdpMLineIndex,
          session_id: newSessionId,
        }),
      });
    }
  };

  const onIceConnectionStateChange = () => {
    const status = peerConnection.iceConnectionState;
    setIceStatus(status);
    if (status === "failed" || status === "closed") {
      stopAllStreams();
      closePC();
    }
  };

  const onConnectionStateChange = () => {
    const status = peerConnection.connectionState;
    setPeerStatus(status);
  };

  const onSignalingStateChange = () => {
    const status = peerConnection.signalingState;
    setSignalingStatus(status);
  };
  const onVideoStatusChange = (videoIsPlaying, stream) => {
    let status;
    debugger;
    if (videoIsPlaying) {
      status = "streaming";
      const remoteStream = stream;
      runVideoElement(remoteStream);
    } else {
      status = "empty";
      playIdleVideo();
    }
    console.log("onVideoStatusChange", status);
  };
  const runVideoElement = (stream) => {
    if (!stream) return;
    videoElement.current.srcObject = stream;
    videoElement.current.src = "rian_idle.mp4";
    videoElement.current.loop = false;

    // safari hotfix
    if (videoElement.current.paused) {
      videoElement.current
        .play()
        .then((_) => {})
        .catch((e) => {});
    }
  };

  let statsIntervalId;
  async function onTrack(event) {
    debugger;
    if (!event.track) return;
    const stats = await peerConnection.getStats(event.track);
    stats.forEach((report) => {
      if (report.type === "inbound-rtp" && report.mediaType === "video") {
        const videoStatusChanged =
          videoIsPlaying !== report.bytesReceived > lastBytesReceived;

        if (videoStatusChanged) {
          videoIsPlaying = report.bytesReceived > lastBytesReceived;
          onVideoStatusChange(videoIsPlaying, event.streams[0]);
        }
        lastBytesReceived = report.bytesReceived;
      }
    });
  }
  // Other utility functions like createPeerConnection, setVideoElement, etc.
  const createPeerConnection = async (offer, iceServers) => {
    const peerConnection = new RTCPeerConnection({ iceServers });

    const remoteDescription = new RTCSessionDescription(offer);
    await peerConnection.setRemoteDescription(remoteDescription);
    console.log("set remote sdp OK");

    const sessionClientAnswer = await peerConnection.createAnswer();
    console.log("create local sdp OK");

    await peerConnection.setLocalDescription(sessionClientAnswer);
    console.log("set local sdp OK");

    setpeerConnection(peerConnection);
    return sessionClientAnswer;
  };
  const fetchWithRetries = async (url, options, retries = 1) => {
    try {
      return await fetch(url, options);
    } catch (err) {
      if (retries <= maxRetryCount) {
        const delay =
          Math.min(Math.pow(2, retries) / 4 + Math.random(), maxDelaySec) *
          1000;

        await new Promise((resolve) => setTimeout(resolve, delay));

        console.log(
          `Request failed, retrying ${retries}/${maxRetryCount}. Error ${err}`,
        );
        return fetchWithRetries(url, options, retries + 1);
      } else {
        throw new Error(`Max retries exceeded. error: ${err}`);
      }
    }
  };

  // Handler functions for buttons
  const handleConnectClick = useCallback(async () => {
    if (peerConnection && peerConnection.connectionState === "connected") {
      return;
    }

    stopAllStreams();
    closePC();

    const sessionResponse = await fetchWithRetries(
      `${DID_API.url}/${DID_API.service}/streams`,
      {
        method: "POST",
        headers: {
          Authorization: `Basic ${DID_API.key}`,
          "Content-Type": "application/json",
        },
        body: JSON.stringify(presenterInputByService[DID_API.service]),
      },
    );

    const {
      id: newStreamId,
      offer,
      ice_servers: iceServers,
      session_id: newSessionId,
    } = await sessionResponse.json();
    sessionStorage.setItem("streamId", newStreamId);
    setstreamId(newStreamId);
    setnewSessionId(newSessionId);

    try {
      sessionClientAnswer = await createPeerConnection(offer, iceServers);
    } catch (e) {
      console.log("error during streaming setup", e);
      stopAllStreams();
      closePC();
      return;
    }

    const sdpResponse = await fetch(
      `${DID_API.url}/${DID_API.service}/streams/${sessionStorage.getItem("streamId")}/sdp`,
      {
        method: "POST",
        headers: {
          Authorization: `Basic ${DID_API.key}`,
          "Content-Type": "application/json",
        },
        body: JSON.stringify({
          answer: sessionClientAnswer,
          session_id: newSessionId,
        }),
      },
    );
  }, [streamId]);

  const handleStartClick = async () => {
    // connectionState not supported in firefox
    if (
      peerConnection?.signalingState === "stable" ||
      peerConnection?.iceConnectionState === "connected"
    ) {
      const playResponse = await fetchWithRetries(
        `${DID_API.url}/${DID_API.service}/streams/${streamId}`,
        {
          method: "POST",
          headers: {
            Authorization: `Basic ${DID_API.key}`,
            "Content-Type": "application/json",
          },
          body: JSON.stringify({
            script: {
              type: "text",
              subtitles: "false",
              provider: {
                type: "microsoft",
                voice_id: "en-US-JennyNeural",
                // voice_config: {
                //   style: "string",
                //   rate: "0.5",
                //   pitch: "+2st",
                // },
                language: "English (United States)",
              },
              ssml: true,
              input: "Hello World! And welcome to getitAI.",
            },
            ...(DID_API.service === "clips" && {
              background: {
                color: "#FFFFFF",
              },
            }),
            config: {
              stitch: true,
            },
            session_id: newSessionId,
          }),
        },
      );
      console.log("playResponse", playResponse);
    }
  };

  const handleDestroyClick = async () => {
    await fetch(`${DID_API.url}/${DID_API.service}/streams/${streamId}`, {
      method: "DELETE",
      headers: {
        Authorization: `Basic ${DID_API.key}`,
        "Content-Type": "application/json",
      },
      body: JSON.stringify({ session_id: newSessionId }),
    });

    stopAllStreams();
    closePC();
  };

  // Rendering
  return (

      <video width="400" height="400" ref={videoElement} autoPlay />

        Status: {peerStatus} | {iceStatus} | {signalingStatus} |{" "}
        {streamingStatus}

      <button className="btn" onClick={handleConnectClick}>
        Connect
      </button>
      <button className="btn" onClick={handleStartClick}>
        Start
      </button>
      <button className="btn" onClick={handleDestroyClick}>
        Destroy
      </button>

  );
}

export default DiDAvatar;

When you setstreamId(newStreamId); inside of handleConnectClick, the state does not change quickly enough for that variable to make it inside of the API url. I assigned it to a local variable in that function and was able to get the connection status.
I unfortunately ran out of credits after that and could not test further. If you find an end-to-end solution, please update this post with it 🤝

@AndreLCanada yes I fixed that.
Now for some reason the onTrack function is never really applied to
      peerConnection.addEventListener("track", onTrack, true);

is there an official react implementation of this demo?

is there an official react implementation of this demo?

Would love to see that from the Team!

This is a React app https://chat.d-id.com/, they should really release that code

@Lionardo did you manage to fix the issue with ontrack not working? It seems to work as soon as you do initialise the peer connection

The team released ai agents and there is a demo in React. It uses a similar concept to the streams. I adapted this code and it worked https://github.com/de-id/agents-sdk/blob/main/src/createStreamingManager.ts

thanks woozay

When you setstreamId(newStreamId); inside of handleConnectClick, the state does not change quickly enough for that variable to make it inside of the API url. I assigned it to a local variable in that function and was able to get the connection status.
I unfortunately ran out of credits after that and could not test further. If you find an end-to-end solution, please update this post with it 🤝

Hi,
I’m currently trying to test agents using talk streams in a Flutter application, similar to the demo, but I’ve run out of credits. Is there a way to test agents without credits? Do we need credits to test it, or is there an alternative method for development and testing purposes?
Any help would be greatly appreciated!


Flink 20153 batch documentation

@tillrohrmann I'm guessing you're referring to the fact that users could configure execution.runtime-mode in the flink-conf.yaml? It's not a setting of the cluster but still only of every job that happens to be started with that flink-conf.yaml. But yes, I understand the concern. This is a side effect of the fact that everything is configurable at all levels, including for example the parallelism, which is also more a per-job thing but was always configurable from the flink-conf.yaml.
We're not advocating that users should configure some things (including the runtime mode) in the flink-conf.yaml, even though they theoretically could.


added config for ffmpeg / video thumbnails

This PR requires merging enhancement/video-thumbnails from sulu/sulu

@stemod please copy the link to the connected PR in the description (:


feat: customize realsense node and register component

Description

This PR makes a few tweaks to the realsense camera component for better integration in the AICA system:

Rename parameters with a dot to use an underscore (dots are not allowed in the schema)
Use string parameters to get the topic parameter

Additionally, I'm deciding for this first version that only the rgb and depth modules are active and the rest of the modules are inactive for now. It would require a lot more work to update all other parameters too to make the node AICA compliant.

Review guidelines

Estimated Time of Review: 10 minutes

Checklist before merging:

[ N/A] Confirm that the relevant changelog(s) are up-to-date in case of any user-facing changes

@yrh012 good with you?


Migration option shows up for C++ projects, contrary to documentation

This page states "You should now be able to see the migration option. Note that this option is not supported and will not show up for ASP.NET and C++ project types." This is not true on VS2019 16.4.5; right-clicking on an unmanaged C++ project's packages.config file does show the option Migrate packages.config to PackageReference..., but attempting to perform the operation fails with a message that the "project is not eligible for migration."

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

ID: 6a154e5f-436d-6297-ec05-4d134a2404f9
Version Independent ID: 1c782e82-db9a-bf77-05ef-cd49374aee36
Content: Migrating from package.config to PackageReference formats
Content Source: docs/consume-packages/migrate-packages-config-to-package-reference.md
Product: nuget
GitHub Login: @karann-msft
Microsoft Alias: karann

So you will leave bad documentation?  I understand that in this case it is not critical, but this should be simple to address.

Yes, this feedback is still actionable.

Very sorry for the delayed response. We are phasing out GitHub issues as the feedback mechanism on documentation content and replacing it with a new feedback system. If you believe your feedback needs to be addressed, please submit a PR, or use the Feedback link on the article, or copy the content here to a new issue at https://github.com/NuGet/Home/issues

We apologize for the inconvenience. We are phasing out GitHub issues as the feedback mechanism on NuGet documentation content and replacing it with a new feedback system using the Feedback link within the articles. If you believe your feedback needs to be preserved and addressed, please submit a PR or open a new issue at https://github.com/NuGet/Home/issues


Initial support for AIX platform.

Set wlp's shell to /bin/sh as AIX doesn't have bash.
Set the group to wlpadmin as AIX can't have groups > 8 characters
Don't install Java on AIX as the java cookbook doesn't support it. We must
assume that Java is already on the LPAR.

OK, thanks, makes sense.


Snapshot output keep changing on every save action (CRA, Enzyme)

Hey there,
I'm running into some issues and I can't tell what I'm doing wrong.
I'm using Create React App (using React 16.1) with Enzyme (3.2.0) and Styled Components 2.2.3.
This is the component I'm trying to test:
// @flow

import React, { Component } from 'react'
import { Switch } from 'react-router'
import { Route } from 'react-router-dom'
import styled from 'styled-components'
import routes from './routes'
import DebugMenu from './components/DebugMenu'

type Props = {
}

const RouteWithSubRoutes = (route) => {
  return (
    <Route path={route.path} render={props => {
      return <route.component {...props} routes={route.routes} />
    }} />
  )
}

class App extends Component<Props> {
  render () {
    return (
      <AppWrapper>
        {process.env.NODE_ENV === 'development' &&
          <DebugMenu routes={routes} />
        }
        <Switch>
          {routes.map((route, i) => (
            <RouteWithSubRoutes key={i} {...route} />
          ))}
        </Switch>
      </AppWrapper>
    )
  }
}

const AppWrapper = styled.div`
  position: absolute;
  width: 100%;
  height: 100%;
`

export default App

And this is my test:

import React from 'react'
import { shallow } from 'enzyme'
import App from './App'
import { MemoryRouter } from 'react-router-dom'
// import renderer from 'react-test-renderer'

describe('App Specs', () => {
  it('Should match with the snapshot for this component', () => {
    const wrapper = shallow(
      <MemoryRouter initialEntries={['/']}>
        <App />
      </MemoryRouter>
    )
    expect(wrapper).toMatchSnapshot()
  })
})

I've configured my test setup for Enzyme by setting a setupTest.js file:
import Enzyme, { shallow, render, mount } from 'enzyme'
import Adapter from 'enzyme-adapter-react-16'
import toJson from 'enzyme-to-json'
import 'jest-styled-components'

// React 16 Enzyme adapter
Enzyme.configure({ adapter: new Adapter() })
// Make Enzyme functions available in all test files without importing
global.shallow = shallow
global.render = render
global.mount = mount
global.toJson = toJson

// Fail tests on any warning
console.error = message => {
  throw new Error(message)
}

When I run yarn test in watch mode, every time I save, the snapshot for this test changes and thus fails:
 FAIL  src/App.spec.js
  ● App Specs › Should match with the snapshot for this component

    expect(value).toMatchSnapshot()

    Received value does not match stored snapshot 1.

    - Snapshot
    + Received

    @@ -29,11 +29,11 @@
             "canGo": [Function],
             "createHref": [Function],
             "entries": Array [
               Object {
                 "hash": "",
    -            "key": "0af0tp",
    +            "key": "u968bq",
                 "pathname": "/",
                 "search": "",
                 "state": undefined,
               },
             ],
    @@ -43,11 +43,11 @@
             "index": 0,
             "length": 1,
             "listen": [Function],
             "location": Object {
               "hash": "",
    -          "key": "0af0tp",
    +          "key": "u968bq",
               "pathname": "/",
               "search": "",
               "state": undefined,
             },
             "push": [Function],
    @@ -79,11 +79,11 @@
               "canGo": [Function],
               "createHref": [Function],
               "entries": Array [
                 Object {
                   "hash": "",
    -              "key": "0af0tp",
    +              "key": "u968bq",
                   "pathname": "/",
                   "search": "",
                   "state": undefined,
                 },
               ],
    @@ -93,11 +93,11 @@
               "index": 0,
               "length": 1,
               "listen": [Function],
               "location": Object {
                 "hash": "",
    -            "key": "0af0tp",
    +            "key": "u968bq",
                 "pathname": "/",
                 "search": "",
                 "state": undefined,
               },
               "push": [Function],

      at Object.it (src/App.spec.js:14:21)
          at Promise (<anonymous>)
      at Promise.resolve.then.el (node_modules/p-map/index.js:46:16)
          at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:169:7)

What am I doing wrong?

Did some further digging and it looks like it might be related to the fact that this App component is wrapped in Memory Router.
Found this link that seems very similar to my case: https://swaac.tamouse.org/testing/2017/08/02/TIL-enzyme-shallow-render-with-memoryrouter-doesnt-work/

enzyme doesn't support snapshots, so I'm not sure what to debug there. This might be an issue with enzyme-to-json.

I fixed this by snapshotting the component instead of the parent <Router>
Try:
expect(wrapper.find(App)).toMatchSnapshot()

To repeat; I strongly discourage snapshot testing in any form due to its brittleness, but if you insist on using it, the only thing enzyme would support there is .debug() output.


Add address/keepalive to TcpConnection

Add address/keepalive to TcpConnection.

Hi @damon-kwok,
The changelog - added label was added to this pull request; all PRs with a changelog label need to have release notes included as part of the PR. If you haven't added release notes already, please do.
Release notes are added by creating a uniquely named file in the .release-notes directory. We suggest you call the file 58.md to match the number of this pull request.
The basic format of the release notes (using markdown) should be:
## Title

End user description of changes, why it's important,
problems it solves etc.

If a breaking change, make sure to include 1 or more
examples what code would look like prior to this change
and how to update it to work after this change.

Thanks.


Integrate Welcome Bot

Hello there,
I can add a welcome bot config file having a proper message that will show up when any user will open up an issue or pull-request for the first time as a part of DWOC. Please assign me this issue.
For reference, kindly check out: https://github.com/apps/welcome
THANK YOU

Not required currently.

Not required currently.


[Proposal] Each expectation should have own test

I have proposal of improving tests and placing each expectation in its own test, because it is a best practice in software testing for several key reasons:
Clarity and Precision: Each test should ideally assess only one specific behavior or condition. This clarity helps in quickly identifying what exactly is failing when a test does not pass.
Easier Debugging: When a test fails, it's much easier to diagnose the issue if the test is only checking one thing. If a test containing multiple assertions fails, it can be unclear which assertion was the cause, requiring additional time to debug.
Isolation of Failures: If a test is checking multiple conditions and one fails, it can mask other failures in the same test. Isolated tests ensure that each failure is reported separately.
Focused Test Intent: Each test should have a clear intent or reason for existence, which is easily communicated through its name and structure. This helps other developers understand the purpose of the test and the specific conditions it is designed to check.
Maintainability: When tests are focused and isolated, they are easier to maintain and modify. If the functionality changes, you only need to update the relevant tests, without worrying about unintended consequences on unrelated assertions within the same test.
Avoiding False Positives/Negatives: Separate tests reduce the risk of false positives (where tests pass when they should fail) or false negatives (where tests fail when they should pass) due to complex interactions between assertions.
Performance Analysis: If tests are separated, it's easier to pinpoint performance issues.

@fabian-hiller i will create a draft PR for string and email. Tests are not included in the main build, my opinion is that libraries should be well tested, so some more boilerplate code in the repo is totally ok. Each test case will be more self explanatory, what actually is testing.

I am looking forward to your implementation and am very happy for your support. Testing is particularly important for a library like Valibot.

Thanks again for your feedback. With the rewrite, we have improved all the tests.


CPLP-1213 services

In this PR the tasks CPLP-1213 & CPLP-1345 are resolved.
Please also take a look at the Database PR

looks good. I did not yet set this to "approved" since we have a few comments in the devenv pr. Would wait for the devenv pr to fix first


Take list of users as a YAML list of strings or numbers, rather than doing string parsing

The to: '9' syntax is silly; that should be to: [9]. We should not need to use regexes to figure out whether the input looks numeric, because YAML already gives us that information.

That what I had in mind but getInput from @actions/core returns a string... but maybe there's another way to retrieve input values?

@andersk Could you please elaborate on what you had in mind? Am I missing something or is it a limitation we will have to live with?

Closing, feel free to reopen with additional information on how we could improve things.


Improve how EpicsMotor deals with .velocity and .acceleration

Lifting a comment from slack from @dperl-dls .
If you try to set the velocity of an EpicsMotor out of bounds via yield from bps.mv(mtr.velocity, target) it will hang (I assume that the IOC clips the velocity to its valid range).
I think there are 3 things that can fix this and we probably should do all three.

set "sensible" limit on the velocity and acceleration components of EpicsMotor (simplest)
make at least the read and write timeouts runtime mutable (also simple, but has broader consequences)
write a EpicsMotorVelocity(EpicsSignal) class that knows how to dig out VMAX (and add VMAX to EpicsMotor) and use that to check limits (bit of work, but most correct, lets us give better error messages, fail before we touch hardwore to reduce clean up, etc)

I believe if you do a caput callback on the velocity it will return quickly, then you can caget the value to see whether it got clipped...

Moving to using put-complete + checking is a better option than 1 and 2 and complimentary with 3.


Stylistically changed placement of text

Alphabetically organized the placement of certain lines. This makes reading the code a bit easier, especially when attempting to locate a certain attribute.
If you like these changes, I would appreciate if you could accept the PR. Participating in Hacktoberfest.
Also, I'm a LOL player as well and will keep track of this project. #teemo

@bsphair Thank you for the contribution! I agree it definitely makes it easier to read. Please do keep track of the project and feel free to help out if you are interested!


Fix release-only builds of libwebp

Describe the pull request

What does your PR fix?
This PR makes it possible to build libwebp with VCPKG_BUILD_TYPE "release". Error before this change:

-- Building x86-windows-rel
CMake Error at scripts/cmake/vcpkg_replace_string.cmake:13 (file):
  file failed to open for reading (No such file or directory):

    D:/a/1/s/packages/libwebp_x86-windows/debug/lib/pkgconfig/libwebp.pc
Call Stack (most recent call first):
  ports/libwebp/portfile.cmake:64 (vcpkg_replace_string)
  scripts/ports.cmake:142 (include)

Which triplets are supported/not supported? Have you updated the CI baseline?
All triplets, in particular with VCPKG_BUILD_TYPE added.

Does your PR follow the maintainer guide?
-/-

Please get failure logs here.

All changes done.

What is needed to move this forward?


⚠ Samsung has degraded performance

In 2ae68cd, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2298 ms

Resolved: Samsung performance has improved in ea18753.


ADD Feature: get trend topics

Description
Wrote Python code to pull trending information from the Big Kinds site using the Selenium web driver.
Dependencies

selenium
webdriver_manager

Fixes #1
Type of change

[ ] Bug fix
[X] New feature
[ ] Breaking change
[ ] This change requires a documentation update

How Has This Been Tested?
Run test code below
python run.py

고생하셨습니다! 굿굿


Package no longer builds with gulp 4.0.0

Gulp 4.0.0 needs series() and parallel() methods to combine tasks, arrays are no longer sufficient. This line (43) in gulpfile.js fails:
gulp.task('build-test', ['concat', 'compile', 'test'])

I've now upgraded to glup 4.0.0 for real now, sorry for the trouble.


9138 flexible top menus

Tom, here are the changes for the configurable top menus.  Steve

I am back in the US, and ready to get to work on this thing again.  I
could, however, use some suggestions for where to start learning about the
test system.  Is there a good example of a more-or-less stand-alone test
in the Gather code that I could take a look at?
thanks,
Steve
On Fri, 1 Mar 2019, Tom Smyth wrote:

@smoyth commented on this pull request.
Great progress Steve! Still some work left I think. We need some test coverage for sure.
Can you also provide some screenshots of what your setting value looks like and what that translates into for the menu.
UI PRs should usually have screenshots please.
Also please prepend the issue number to all commit messages. This makes investigating bugs, cherry-picking, etc. easier in
the future.

In app/helpers/nav_helper.rb:

     name: :reservations,

     path: lens_path_if_present("reservations"),

   permitted: policy(Reservations::Reservation.new(resource:

     Reservations::Resource.new(community: current_community))).index?,

   permitted: policy(Reservations::Reservation.new(resource:                        Reservations::Resource.new(communi

ty: current_community))).index?,
Please fix all hound errors or explain why can't be fixed.

In app/helpers/nav_helper.rb:

     name: :wiki,

     path: "/wiki",
     permitted: policy(Wiki::Page.new(community: current_community)).show?,
     icon: "info-circle"

 }

]

 )

end

Add in any items defined in Settings, unless the path for that item i "none"

settings_topmenu.each do |menuitem|

 next if menuitem[1] == "none"

 items.push(

   name: menuitem[0],

   path: menuitem[1],

   permitted: true,

   icon: "info-circle"

Perhaps link as the icon?

In app/helpers/nav_helper.rb:

     name: :wiki,

     path: "/wiki",
     permitted: policy(Wiki::Page.new(community: current_community)).show?,
     icon: "info-circle"

 }

]

 )

end

Add in any items defined in Settings, unless the path for that item i "none"

settings_topmenu.each do |menuitem|

 next if menuitem[1] == "none"

 items.push(

   name: menuitem[0],

   path: menuitem[1],

   permitted: true,

   icon: "info-circle"

These can all be on one line I believe. That is preferred when available.

In config/locales/en/custom_fields.yml:

@@ -36,6 +36,7 @@ en:
hints:
community:
settings:

     top_menu_customizations: "Enter links in Markdown format, like this: [link-name](link-path).  A link-path of 'non

e' will remove a link completely. All other text and markup will be ignored. "
Nice. Please remove blank space at end.
link-name might be a bit confusing. How about:
"Enter links in Markdown format. Example: Link Name. If the link name matches an existing one it will
override the default URL. A URL of 'none' will remove a link completely. All other text and markup will be ignored."

In app/helpers/nav_helper.rb:

@@ -6,35 +6,68 @@ def nav_items
sample_period = Work::Period.new(community: current_community)
sample_job = Work::Job.new(period: sample_period)
sample_shift = Work::Shift.new(job: sample_job)

items = [

 {

Build up the main menu list

items = []

check if there are any main menu items defined in Settings.

c_settings_topmenu = current_community.settings.top_menu_customizations
settings_topmenu = if c_settings_topmenu.nil?

                    []

                  else

                    # create an array of arrays from the setting string.

                    c_settings_topmenu.scan(%r{\[([\w\- ]+)\]\(([\w/\.:%&\?]+)\)})

If you call .to_h on this you'll actually get an ordered hash of the form {"Foo" => "https://...}
That might make things a little cleaner below.

In app/helpers/nav_helper.rb:

@@ -6,35 +6,68 @@ def nav_items
sample_period = Work::Period.new(community: current_community)
sample_job = Work::Job.new(period: sample_period)
sample_shift = Work::Shift.new(job: sample_job)

items = [

 {

Build up the main menu list

items = []

check if there are any main menu items defined in Settings.

c_settings_topmenu = current_community.settings.top_menu_customizations
settings_topmenu = if c_settings_topmenu.nil?

                    []

                  else

                    # create an array of arrays from the setting string.

                    c_settings_topmenu.scan(%r{\[([\w\- ]+)\]\(([\w/\.:%&\?]+)\)})

                  end

add each standard main menu item unless that item has been overridden

in the Settings.

unless settings_topmenu.any? { |h| h[0] == :people.to_s }

Can we please match on the translated version of :people? See config/locales/en/nav.yml. That way this will still work if we
introduce other languages later. It's also more intuitive because you'll be entering exactly what you see in the nav bar as
the link name.

In app/helpers/nav_helper.rb:

@@ -6,35 +6,68 @@ def nav_items
sample_period = Work::Period.new(community: current_community)
sample_job = Work::Job.new(period: sample_period)
sample_shift = Work::Shift.new(job: sample_job)

items = [

 {

Build up the main menu list

items = []

check if there are any main menu items defined in Settings.

c_settings_topmenu = current_community.settings.top_menu_customizations
settings_topmenu = if c_settings_topmenu.nil?

                    []

You can simplify this part a bit. Try
settings_topmenu = current_community.settings.top_menu_customizations || []
settings_topmenu = settings_topmenu.scan(%r{[([\w- ]+)](([\w/.:%&?]+))})

In app/helpers/nav_helper.rb:

@@ -6,35 +6,68 @@ def nav_items
sample_period = Work::Period.new(community: current_community)
sample_job = Work::Job.new(period: sample_period)
sample_shift = Work::Shift.new(job: sample_job)

items = [

 {

Build up the main menu list

items = []

check if there are any main menu items defined in Settings.

c_settings_topmenu = current_community.settings.top_menu_customizations
settings_topmenu = if c_settings_topmenu.nil?

                    []

Thinking about this a bit more, I think this parsing logic should be in a very simple class so that we can write unit tests
for it, which it definitely should have. This kind of text parsing is quite error prone so I'd want to test a few different
combinations of input.
Can you give that a shot? Perhaps MenuCustomizationParser. See app/models/work/quota_calculator.rb for an example of a
service class like that. The constructor argument should be the value of the setting.

In app/helpers/nav_helper.rb:

@@ -6,35 +6,68 @@ def nav_items
sample_period = Work::Period.new(community: current_community)
sample_job = Work::Job.new(period: sample_period)
sample_shift = Work::Shift.new(job: sample_job)

items = [

 {

Build up the main menu list

items = []

check if there are any main menu items defined in Settings.

c_settings_topmenu = current_community.settings.top_menu_customizations
settings_topmenu = if c_settings_topmenu.nil?

                    []

                  else

                    # create an array of arrays from the setting string.

                    c_settings_topmenu.scan(%r{\[([\w\- ]+)\]\(([\w/\.:%&\?]+)\)})

                  end

add each standard main menu item unless that item has been overridden

in the Settings.

unless settings_topmenu.any? { |h| h[0] == :people.to_s }

This matching work can and should be done in the class. So in here you'd end up with like menu_customization.has?(:people).

In app/helpers/nav_helper.rb:

     name: :wiki,

     path: "/wiki",
     permitted: policy(Wiki::Page.new(community: current_community)).show?,
     icon: "info-circle"

 }

]

 )

end

Add in any items defined in Settings, unless the path for that item i "none"

s/i/is/

In app/helpers/nav_helper.rb:

     name: :wiki,

     path: "/wiki",
     permitted: policy(Wiki::Page.new(community: current_community)).show?,
     icon: "info-circle"

 }

]

 )

end

Add in any items defined in Settings, unless the path for that item i "none"

settings_topmenu.each do |menuitem|

 next if menuitem[1] == "none"

 items.push(

   name: menuitem[0],

   path: menuitem[1],

   permitted: true,

   icon: "info-circle"

 )

end

I'm realizing that the way this is implemented, if you customize the path for e.g. meals, it goes to the end. Is that true?
Not sure if that is optimal. Can you change it so the order of the canonical items is respected, and only new ones get
tacked on the end?

In config/locales/en/custom_fields.yml:

@@ -36,6 +36,7 @@ en:
hints:
community:
settings:

     top_menu_customizations: "Enter links in Markdown format, like this: [link-name](link-path).  A link-path of 'non

e' will remove a link completely. All other text and markup will be ignored. "
meals:
reimb_instructions: "What cooks should do with their receipts in order to get reimbursed. May include requestin
g cooks enter amounts via Gather's meal edit page, using the built-in reimbursement form, or some other process."
show_reimb_form: "Whether to show a printable reimbursement form (including grocery and pantry amounts and reim
bursement method) on the meal summary page. Uncheck if you prefer an electronic reimbursement process."
In addition to the model spec, we need to have a feature spec to cover the code in the helper. Nothing too complex, just set
up a community with e.g. a Meals URL override, a new custom link, and a 'none' override, login, and check that the right
links are shown with the right URLs.

In app/helpers/nav_helper.rb:

     name: :wiki,

     path: "/wiki",
     permitted: policy(Wiki::Page.new(community: current_community)).show?,
     icon: "info-circle"

 }

]

 )

end

Add in any items defined in Settings, unless the path for that item i "none"

settings_topmenu.each do |menuitem|

 next if menuitem[1] == "none"

 items.push(

   name: menuitem[0],

   path: menuitem[1],

   permitted: true,

   icon: "info-circle"

 )

end

You might consider taking an array of symbols like %i[people meals work ...], iterating over that, taking the custom link if
defined, else building the original one.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the
thread.[AhTqQwuLLTNgt2YnAysxhaMNJv9dKV61ks5vSZpZgaJpZM4bOtUh.gif]

Hi Steve! Let's start with the model specs. Check out app/models/work/quota_calculator.rb and its accompanying test file spec/models/work/quota_calculator_spec.rb.
You should perhaps start with a tutorial on RSpec. I don't know of a good one off hand but I'm sure there are lots.


[5.1] fix:Undefined property: stdClass::$column_name for run mysql 8.0.25

My Laravel Project Version is v5.1.46,Recently I need to use MySQL 8.0.25 version,But there are some anomalies,The error message is as follows:
ErrorException in MySqlProcessor.php line 18:
Undefined property: stdClass::$column_name
When you read the column_name attribute in lowercase, you will be told that the column_name attribute does not exist. When you read the column_name attribute in lowercase, you will be told that the column_name attribute does not exist.
Code path:src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php
Function as follows:
/**      * Compile the query to determine the list of columns.      *      * @return string      */     public function compileColumnExists()     {         return 'select column_name from information_schema.columns where table_schema = ? and table_name = ?';     }
In MySQL 8.0.25, column_name is returned in uppercase, so alias as column_name is needed.
This issue has been fixed in Laravel High version and now requests the authorities to merge the PR and release a new version v5.1.47.
Thank you very much!

Laravel 5.1 is not maintained anymore. You will need to upgrade to Laravel 6 or Laravel 8 ASAP.

However, our online project is using Laravel 5.1 and cannot upgrade to Laravel 6 due to historical reasons. The database is ready to upgrade to MySQL 8.0 because it needs better performance.

Now there are still many old projects using Laravel 5.1, and due to many historical reasons, Laravel version cannot be upgraded, not only in our company, but also in many other companies. We hope the authorities can merge the PR and release a small version. Thank you very much!

Now there are still many old projects using Laravel 5.1, and due to many historical reasons, Laravel version cannot be upgraded, not only in our company, but also in many other companies. We hope the authorities can merge the PR and release a small version. Thank you very much!

What historical reasons?

Now there are still many old projects using Laravel 5.1, and due to many historical reasons, Laravel version cannot be upgraded, not only in our company, but also in many other companies. We hope the authorities can merge the PR and release a small version. Thank you very much!

What historical reasons?

There is a lot of business-side code, and updating the Laravel version would require significant changes in the business-logic code to accommodate the new version's syntax

Is there a more convenient way to override the methods of the MySqlGrammar class outside of the framework

You could fork Laravel and use your own repository in the composer.json
However, staying up to date is the better option. Laravel does not introduce a lot of breaking changes so upgrading should be easy. Just follow the upgrade guides step by step and you will see what parts of your business-logic need refactor.


Some presentation CSS samples?

Hi. Do you know any resources with CSS templates for impress.js?
As a back-end developer, I'm not fluent in CSS and that place would be helpful.

You can find some content in the Wiki page. I guess that is the best place I can recommend :)
Closing as solved then...


Definition - Stress the gtkapi

Stress the gkapi requesting information from each service. Service, functions, packages. Try to get the maximum number of requests that the gtkapi can support simultaneously

I've created some recipes in scala to use gatling. Current we have around 70 request/second maximum. We should automate this test and include it in the pipeline

HI, @felipevicens
That's a good number, taking into account that we haven't yet optimised anything, with caching, e.g. But we also haven't yet started to validate the user, collecting KPIs, etc., which will slow this down a bit....