Multiple injector instances with shared dependencies

I've been looking to all issues, but it seems like this question hasn't been asked yet.
First of all, I didn't try this library yet: I saw it mentioned and thought it might be helpful for my work.
However, I need to understand something before even starting playing with it.
Scenario: WordPress plugin development, with a main plugin + n add-ons (as separate plugins).
The main plugin has a "main" class.
Some of the other add-ons classes may need to use the main class as a depenendecy.
The main class should not be instantiated multiple times.
Now, I guess I could store an instance of Auryn\Injector as a global variable and use that global variable with all other add-ons, but I don't want to use globals (I don't think I need to explain why) if there are better options.
I wonder if, setting a dependency as shared and creating multiple instances of Auryn\Injector (which is most likely what I would need to do anyway if I don't want to use the global variable approach) I would still be able to use this shared dependency.

I've thought about this problem, and although it's a perfectly valid thing to want to do, I haven't been able to come up with a solution internal to this library that wouldn't be one of:
i) Far too complicated.
ii) Far too difficult to use.
iii) Not covering enough use-cases.
iv) all of the above.
For most of the valid but complex use-cases people have asked about, normally they can be solved by extending the Injector, and putting that complex logic in the make() method.
I think something along these lines should work for you:
$mainPluginInjector = new Injector();

// Configure the $mainPluginInjector here.
$mainPluginInjector->share(MainPlugin::class)

$upstreamClasses = [
    MainPlugin::class,
    MainLogger::class
];

$pluginInjector = new DownstreamInjector($injector, $upstreamClasses);

// configure $pluginInjector here.

// $pluginInjector is now ready to use.

class DownstreamInjector extends Injector {

    private $upstreamInjector;

    private $upstreamClasses = [];

    function __construct(Injector $upstreamInjector, array $upstreamClasses, Reflector $reflector = null) {
          parent::__construct($reflector)
     }

    public function make($name, array $args = array()) {
        // Arbitrarily complex logic could go here.
        if (in_array($name, $this->upstreamClasses, true) === true) {
            return $this->upstreamInjector->make($name, $args);
        }
        return parent::make($name, $args);
    }
}

If I understand well this should work:
// main-plugin.php

add_action( 'plugin_loaded', function () {

    $injector = new \Auryn\Injector();
    $injector->make( 'MyPlugin\MainClass' );

    // do some other stuff with $injector obj

    add_filter( 'my_plugin_get_injector_instance', function() use ( $injector ) {
        return $injector;
    } );

} );

// Then in the add-on plugin you can

add_action( 'plugin_loaded', function () {

    $injector = apply_filters( 'my_plugin_get_injector_instance', null );

    if ( ! $injector ) {
        // do some stuff or return
    }

    $injector->make( 'MyAddon\ClassWithMainClassDependency' );

}, 11 );

// ClassWithMainClassDependency.php

namespace MyAddon;
use MyPlugin\MainClass;

class ClassWithMainClassDependency {
    __constructor ( MainClass $obj ) {
         $this->main_class = $obj;
    }
}

It's probable I misread the question. But I've now added some words in commit f93349d5dd98399aa0ac69d2c62ba7cc93e2f3b1

When app-bootstrapping by Auryn is not possible
Sometimes, the initialisation of the application is outside of your control. One example would be writing plugins for Wordpress, where Wordpress is initialising your plugin, not the other way round.
You can still use Auryn by using a function to make a single instance of the injector:
function getAurynInjector()
{
    static $injector = null;
	if ($injector == null) {
		$injector = new \Auryn\Injector();
		// Do injector defines/shares/aliases/delegates here
	}

    return $injector;
}


Add parameter to close all connections when running Copy-SqlDatabase -WithReplace

Is this:
Just place "x" to indicate selection (e.g. "[x]")

[x] feature
[ ] bug:

System Details

Operating system name and version:
Output from $PSVersionTable:

Evaluate $PSVersionTable in PowerShell and paste the output here

PSVersion                      4.0
WSManStackVersion              3.0
SerializationVersion           <IP_ADDRESS>
CLRVersion                     4.0.30319.42000
BuildVersion                   6.3.9600.17400
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0}
PSRemotingProtocolVersion      2.2

Output of dbatools version:

Evaluate (Get-Module dbatools -ListAvailable).Version and paste output here

Script     0.8.948    dbatools

SQL Server version for source/target
2014

Closing this issue. Once build is released/pushed to master this feature will be available addressed.


Render rego

just render-rego for now which does a post to users and a post to session.
just pushing this for the time being and will work on logging in tomorrow with a get for users and a post for session

after that ill have a get for session which will change the update the renderhome to instead of showing login/signup to show our featured repos and edit profile etc which can discuss further on saturday


Configuration Settings

Basic Requirements:

[ ] Allow users to provide a coded configuration to control the system

Design:
Inspiration for this design is based on the supported configuration system for XRE and how MVC utilizes this.
Basic Setup:
This should be used in cases were straight forward configuration is required and no conventions are in play:

[ ] Create GlimpseOptions which will contain all the basic configuration properties - see
[ ] Create GlimpseOptionsSetup : ConfigureOptions<GlimpseOptions> which will be the hook into the system - see
[ ] Descriptor's are used for any List<> properties for the GlimpseOptions to control lazy loading - see
[ ] Extension methods can be used to configure how options are setup - see
[ ] Providers will be used to pull the instance's out of the Options and active any Descriptors - see & see & see
...

Advanced Setup:
When it comes to conventions based options, they should be handled differently:

[ ] Providers are still used, in most cases will have a Default provider which uses the convention and a FixedSet which allows for fixed values to be provided

Options are explicitly not being used in convention scenarios to help avoid confusion and streamline the process

[ ] FixedSet providers are populated via extension methods which are extend off the IServiceCollection
[ ] Default providers scan through the assemblies looking for types at play
...

Application Model:
This is a model that might not be needed by provides a unified view of the complete discovery process:

[ ] A Descriptor Provider is used to build the Application Model - also see
[ ] Model contains not only the mast list of finial processing, but the metadata around
...

@avanderhoorn I've worked on a branch regarding the code configuration for Glimpse. It is already functional and fully backward compatible with the current glimpse configurations, it allows for configuration to be defined externally (database, server, custom config files, ...) and provides out of the box a provider based on xml configuration file as this is how users configured glimpse up until now. Adding another default to deal with json configs etc... is just a small step...
I definitely am going to take a look at what you described above, maybe things can be mapped, maybe not...
I didn't make a PR yet of that branch, as I wanted to finish it further to make sure I didn't overlook things, but then I had to take a little break on my work :-(
Have a look at the branch to get an idea about how it works, and I can always give a quick guide over Skype or so if you want too

@CGijbels more than happy to talk it over and see what we can do. My main thinking here is that the config/options in vNext is very different to what it was with classic ASP.Net. I know that we (mainly you) put a huge amount of effort into the config system in the old v2 code base, but with the advent of vNext and how different it is, I'm not sure what else we can do. For instance the next version of MVC is built solely on the base support, web.config doesn't exist, code configurations are preferred over json/environment/etc configurations (particularly when it comes to complex cases, type based black/white listing, etc), dependency injection which is at the core of vNext is a fairly fundamental part of vNext, etc, etc. When looking at this I struggled to see how what we did would natively/cleanly come across. Any ideas?

web.config doesn't exist, code configurations are preferred over json/environment/etc configurations (particularly when it comes to complex cases, type based black/white listing, etc)

the configuration has been built to allow any kind of source for the configuration settings to start with, after which configuration to code can be added as well.
So for vNext it might be enough to implement the IConfigurationSettingsProvider although the hook for that lies in setting the provider to use, through the config, as you can see in the (ConfigurationFactory)[https://github.com/Glimpse/Glimpse/blob/glimpse-configuration-system-refactoring/source/Glimpse.Core/Configuration/ConfigurationFactory.cs] class. Now on the other hand, by specifying a IConfigurationSettingsProvider in a ConfigurationFactory.Create overload might be enough, as that Create method is called by the hosting environment (ASP.Net, OWIN Middleware (see here ,...)
So as long as the hook into the new MVC provides an IConfigurationSettingsProvider to the ConfigurationFactory all should be good to go, and that IConfigurationSettingsProvider can be quite basic as well because code configuration then happens on the resulting ConfigurationSettings
Just wondering, but even with the advent of ASP.NET vNext etc... we only need to provide the hooks into the runtime and maybe other plugins, but we still share the Glimpse Core? Or  is the idea to have 2 Glimpse Core's maintained next to each other? Because the majority of users will still be using ASP.NET vCurrent for the upcoming year(s)...


Fix Navigation Of Section

Issue Type:
[ x] Bug Report
[  ]  Feature Request
[  ] Documentaion
Describe the bug
When we get to each section then we got heading hidden under the navigation bar
Possible solution
We have  to reduce the size of navigation bar not directly because if we reduce directly the switch button gets misplaced

@himanshu007-creator  Please assign


Release helm chart conduktor-gateway_3.3.0

Updated Helm chart to use conduktor-gateway_3.3.0 instead of 3.2.2

A PR already open and ready here https://github.com/conduktor/conduktor-public-charts/pull/107


Pane z-index changes are not specified in Release.md .

Since commit 7ee404a  was merged in Master brach (see https://github.com/Leaflet/Leaflet/pull/3591/files ) , z-index of pane were mutiplied by 100. It might cause problems on apps that were designed for previous version of leaflet. It should be specified in Release.md.

Agreed, we should mention this in the changelog under "Breaking changes" section.

While still technically correct, I think we're beyond the point where this makes any difference for anyone.
The changelog mentions z-indexes being changed, I think that's good enough.


Add AppCompat inflation inject sample

With test. I have this working in a side-project, but we should show it here and write a test to make sure it continues working.

(Someone reminded me of this at the talk. Thanks, person!)

I did the following and it seems to be working okay
class InflationInjectContextWrapper constructor(
  newBase: Context,
  private val inflationInjectFactory: InflationInjectFactory
) : ContextWrapper(newBase) {
  private var inflater: LayoutInflater? = null

  override fun getSystemService(name: String): Any? {
    if (LAYOUT_INFLATER_SERVICE == name) {
      if (inflater == null) {
        inflater = LayoutInflater.from(baseContext)
            .cloneInContext(this)
            .apply {
              factory = FactoryWrapper(factory, inflationInjectFactory)
            }
      }
      return inflater!!
    }
    return super.getSystemService(name)
  }

  private class FactoryWrapper(
    private val factory: LayoutInflater.Factory?,
    private val inflationInjectFactory: InflationInjectFactory
  ) : LayoutInflater.Factory {
    override fun onCreateView(
      name: String,
      context: Context,
      attrs: AttributeSet?
    ): View? {
      return inflationInjectFactory.onCreateView(name, context, attrs)
          ?: factory?.onCreateView(name, context, attrs)
    }
  }
}

Any updates? I get

A factory has already been set on this LayoutInflater

when setting Layout Factory in AppCompatActivity.

@dhruvj Did you try the sample that I posted above?
The problem with using the factory with app compat is there as already a factory set on the inflater by default, which is what allows the app compat version of certain widgets to be inflated instead of their standard counterpart. e.g., TextView gets inflated as AppCompatTextView. LayoutInflater does not allow you to change the factory or factory2 without first making a copy of it via cloneInContext. Once that's done you're free to set a new factory on it. Just be aware that it'll replace the original one which means you lose a lot of the benefits. This issue is solved with the code snippet I posted.

@abyrnes Yes, your solution is working perfectly, although I believe it would be helpful to demonstrate to newcomers where and how to use InflationInjectContextWrapper class you've provided. Something like the following should suffice:
public final class MainActivity extends Activity {

    @Override public void attachBaseContext(Context newBase) {
        super.attachBaseContext(InflationInjectContextWrapper(
            newBase,
            DaggerMainActivity_MainComponent.create().factory()
        ));
    }

    @Override protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.custom_view);
    }

    @Component(modules = ViewModule.class)
    interface MainComponent {
        InflationInjectFactory factory();
    }

}

If you have a BaseActivity, then you can put it there instead and forget about it in subclasses. You do not need to override anything in fragments, since they contain a reference to a host activity and will use the shared inflater. Hope it helps someone.


Enable heat provisioner scheme for Ursula PR tests

Problem resolved:
Currently Ursula PR tests are setup using the Ansible os_* module to provision nodes and other resources.  This approach to provisioning and deployment orchestration for test environments is too cumbersome and not a good fit for creating multiple test environments.
Solution of this commit:
This commit is to add the Heat provisioning capability to the Ursula PR tests and move what we currently have off of Ansible os_* modules onto Heat. Heat is decent at resource provisioning and deployment orchestration and defining environments is much cleaner with the use of templates.

Can one of the admins verify this patch?

"ok to test" to accept this pull request for testing
"test this please" for a one time test run
"add to whitelist" to add the author to the whitelist

ok to test

I just added another commit to my fork: Create tmp folder to avoid failure of ssh_key output by ursula-cil when using heat provisioner.
https://github.com/yangzhang-ibm/ursula/commit/cddf9607c42d81e8ac70f635ae877ab4d8f0904b
Without that, the Jenkins PR test will fail, I think it is kind of ursula-cli bug, while the above commit can resolve it on ursula code side.

Try to make your PR's only one commit.  Don't include merge commits.

I will do more code changes for this feature, and wrap all changes into one commit and then come up with a PR again.

closing this PR, I will create a new one with more code changes.


Break out partial functions into their own module

functions.py was approaching 2k lines. Broke out PartialFunction into a separate module to make it a bit shorter. Even after this, functions.py is 1,471 lines, so maybe we need to do even more!

Btw unrelated but I really don't like the name PartialFunction – let me know if you can think of anything better!


Issue 2541: hasMonth() and hasMonthValue()

Check List:

Fixes partially #2541
Unit tests : YES
Javadoc with a code example (on API only) : YES
PR meets the contributing guidelines

That's a lot of failures....Any reason why there would be this many failures across versions? New to large codebase Java programming, so could use some advice.

Some files are lacking the license header:
[INFO] --- license-maven-plugin:4.1:check (default) @ assertj-core ---
[INFO] Checking licenses...
Warning:  Missing header in: /home/runner/work/assertj-core/assertj-core/src/test/java/org/assertj/core/api/localdate/LocalDateAssert_hasMonthEnum_Test.java
Warning:  Missing header in: /home/runner/work/assertj-core/assertj-core/src/test/java/org/assertj/core/api/localdate/LocalDateAssert_hasMonthInt_Test.java
[INFO] ------------------------------------------------------------------------

You can run:
./mvnw license:format
to get them fixed automatically.

Ok, the header fixed most of the tests, its just one failure which I don't quite know how to interpret.

That's a known issue of pitest, you can ignore it.

That's fine: forks don't have access to the Sonar token so that job gets skipped.

Resolved all notes from @joel-costigliola

Ok, tests are all passing, fixed all of the things from the review @joel-costigliola

Integrated thanks @nith2001!
could you avoid merging main in your branch and rebase instead for the next PR, it makes it easier to integrate as we prefer squashing PR into one commit

Hi @joel-costigliola ! I've never really rebased before, but I just did some Google searching and definitely seems simpler. How would I do that in this case? is there some rebase option I can select in the PR?

That's an opportunity to learn something new then ;-)
So what you would do is rebase the branch corresponding to your PR on main, the end result would be to "move" your branch commits like you had started from the latest main commit.
But don't worry too much about it, if you struggle too much do a merge.

Hmmm, I see. I'll try to do that on that on the next issue I took.
Would it be doing something like this, and then submitting a pull request?


User Handler Instantiated Multiple Times

Hi All,
I have created a user handler and within the instantiation of the class, I set some class variables (Caching some content from DB). I am running with a single bot. However, for the single bot the UserHandler is being instantiated as many as 10 times upon startup of the bot.
Is this normal behaviour? If so, is there any way of being able to cache data across every re-instantiation of the UserHandler?
Thanks in advance and all help is much appreciated!
Wilson.

Yes, it is normal behaviour. UserHandler is instantiated for all UserHandler interface events separately.
For example when 2 users sends trade offer to our bot, first one is processed be single instance of configured UserHandler and second will be processed by another instance.
If you want to store whatever  data persistently you should store it... for example in the Bot class which is instantiated per configured bot. So if you use this example and has configured 3 bots in settings.json each bot should have separated data.


Problems adding Clarity to my Project

Hi!
I know this might not be the right place to ask newbie questions like that but i am really getting desperate:
I just want to make an own project using clarity. But i fail to add it correctly. I already created a clarity snapshot .jar with maven and i added the dependency and repository to my project's pom file as well as the .jar. Then I did mvn clean.
I used the example code (AllChatProcessor) and imported all the clarity classes from the .jar but now the S2UserMessages are still missing.
Then i added the clartiy-protobuf library as .jar. Now the google Protobuf library is missing.
(Error:(13, 26) java: cannot access com.google.protobuf.MessageOrBuilder
class file for com.google.protobuf.MessageOrBuilder not found)
I just feel like I am doing something essentially wrong, and it is a huge newbie mistake. And it could be fixed in like 3 minutes if you know what you are doing.
I am trying to get that running for 3 hours already and at this point i just don#t know what to do anymore.
It would be so great if you could help me out here!
Kind regards and thanks for your time.
Peter

Seems your maven installation is working. Maven keeps downloaded dependencies in a local repository. You do not need to create your own.
I'd
Clone clarity-examples
Do mvn -P matchend package in the root, this will download all dependencies by itself.
This should give you matchend.one-jar.jar in target folder, which can be run with Java -jar target/matchend.one-jar.jar replay.dem
Do you use an IDE?

Am 28.03.2016 um 11:47 schrieb peemoRoyal<EMAIL_ADDRESS>Hi!
I know this might not be the right place to ask newbie questions like that but i am really getting desperate:
I just want to make an own project using clarity. But i fail to add it correctly. I already created a clarity snapshot .jar with maven and i added the dependency and repository to my project's pom file as well as the .jar. Then I did mvn clean.
I used the example code (AllChatProcessor) and imported all the clarity classes from the .jar but now the S2UserMessages are still missing.
Then i added the clartiy-protobuf library as .jar. Now the google Protobuf library is missing.
I just feel like I am doing something essentially wrong, and it is a huge newbie mistake. And it could be fixed in like 3 minutes if you know what you are doing.
I am trying to get that running for 3 hours already and at this point i just don#t know what to do anymore.
It would be so great if you could help me out here!
Kind regards and thanks for your time.
Peter
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub

Hi!
Yes this is working out. I receive the mathend.one-jar.jar.
I am using IntelliJ IDE.
If i want to use the whole clarity package, what do i have to do to install it to my project?
I tried copying it into the lib folder and update mvn but that doesnt quite work. An mvn install does compile but i still cannot import the skadistat package...
I wanna build an parser which parses the .dem files as complete as possible (its for a University Project).
Thanks for your help so far I reeaaally appreciate it!!
Peter

I added it, the pom seems to be fine too, but it look like it doesnt install al dependencies clarity needs.
For example the S2UserMessages are not found, and i also get a runtime error:
Error:(3, 17) java: package org.slf4j does not exist
That a Logger and Logger Factory are missing.

I use IntelliJ myself, and it just works

clone clarity-examples
create new project from existing sources
import from maven metamodel
choose one of the Main.java examples, run it with a path to a replay as a parameter


Fix no linebreak logs

What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #2331
Does this PR introduce a user-facing change?:

NONE

/approve


After lazy loading a tab, the tab content should persist and not getting reinstantiated on tab changes.
What is the current behavior?
A tab change instantiates the new tab content and destroys the previous tab content.
What are the steps to reproduce?
https://stackblitz.com/edit/angular-material2-issue-imxxnk
Click on the tabs and observe the console for ngOnInit and NgOnDestroy messages.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 7.2.15
Material 7.3.7
Is there anything else we should know?
Using matTabContent: lazy loading

This is working as intended; the unrendered tabs are completely destroyed and removed from the DOM when switching between them.

@jelbourn
thx for your reply.
Would be worth to have it documented.
We have a dashboard with with some heavy components within the tabs, which make each of them some 20 backend calls for options. At minimum the lazy loading takes care it doesn't load all tabs at the same time.
However, we also have interactive/editable components under those tabs, the idea was the user can switch between them and save when they are ready. This won't work as they loose their edits.
It would be nice to have it configurable to NOT destroy the content when switching tabs. Can you please add this as a feature request?

@FritzHerbers it seems like you would want to cache that state in a way that's not tied to rendering rather than having the content of each tab eagerly fetch its own data

@jelbourn
It is not only the state of options or model data. We are in the process of developing a "forms" framework on top of ngx-formly. During interacting (also with the backend) the form fields can be enabled/disabled/etc, portions of "included" forms can be exchanged. This state is volatile.
Just wanted to have the lazy-loading with matTabContent and the keeping-alive when not using matTabContent.
Will implement lazy loading using a div and an *ngIf to load (and unload when needed) the tab content.

Yes, Is it possible to have a setting to not reload Mat tab content when switching around tabs?


syntax highlighting in fenced code blocks language option: plaintext

Right now code in fenced codeblocks is defaultly highlighted (language autodetected?). It would be nice if there was a language keyword like none,plaintext, or text that I could stick after the ``` to disable syntax highlighting for that code block.

The keyword no-highlight works when using HighlightJS

```no-highlight
Whatever text
```

I have yet to find a working solution using Prettify.

You can disable syntax highlighting completely.

@vladejs That's not really a solution. I'd like to keep my syntax highlighting in most cases. Sometimes I'd want to not use it because I want to make a plaintext code block.


Check primary keys for all tables

Some dbs require that all tables have primary keys, see

#16802
#21086

We can add a test to keep it from being broken again.

The CI check will keep failing until #21086 is resolved.
--- FAIL: TestPrimaryKeys (0.00s)
    engine_test.go:84: table "foreign_reference" has no primary key
FAIL

@wolfogre just add a primary key to the ForeignReference table and make a migration to add it

@wolfogre just add a primary key to the ForeignReference table and make a migration to add it. This should do it:
PATCH

@zeripath Maybe we should open another PR to add a primary key and mark it closing #21086, I'll follow up once it has been merged. What do you think?

Nah we'd be better off getting the primary key in in this pr and adding the check at the same time.
This is almost there. The only problem is that the migration isn't working for sqlite which probably should be changed to use the recreate table for that db. There's a previous migration that does similar for other tables so those should be checked in case I've missed something.
Then we can merge the fix and do the enforcement at the same time. If we don't then the enforcement may never be possible.

My opinion is to drop that table and remove all dead code.

😂 See? The context is too complicated for me, so I prefer to solve the problem of ForeignReference table in another PR. We need a better place to discuss how to do it, adding a primary key? or dropping it?
I believe it should be neither here nor #21086, so a new PR is needed.

@wolfogre I've fixed the migration.
@wxiaoguang I'm not sure what you mean - is this stuff entirely unused?

@wolfogre I've fixed the migration.
@wxiaoguang I'm not sure what you mean - is this stuff entirely unused?

Yes, I have read the logic  again:

It's not used at the moment (only inserts, no read)
It's badly designed and doesn't look like to be used any more. https://github.com/go-gitea/gitea/issues/21086#issuecomment-1318217453

I think removing ForeignReference needs more work. I prefer to merge this one and removing it on another PR if we really want to remove it. We can find some context in #18446 .

I think removing ForeignReference needs more work. I prefer to merge this one and removing it on another PR if we really want to remove it. We can find some context in #18446 .

What do you mean by "more  work"? At most, 30-minute work is enough, that's far less than the time wasted,  then no more dirty and dead code.

And now we have a new situation, the CI failed with:
        testlogger.go:77: 2022/12/23 03:20:41 ...igrations/base/db.go:67:RecreateTable() [E] Unable to create uniques for table tmp_recreate__foreign_reference. Error: Error 1061: Duplicate key name 'UQE_tmp_recreate__foreign_reference_repo_foreign_type'
        migration_test.go:307:
            	Error Trace:	/drone/src/migration_test.go:307
            	            				/drone/src/migration_test.go:335
            	Error:      	Received unexpected error:
            	            	migrate: Error 1061: Duplicate key name 'UQE_tmp_recreate__foreign_reference_repo_foreign_type'
            	Test:       	TestMigrations/Migrate-mysql-1.7.0

It was caused by recreating the ForeignReference table, I have no idea why. As wxiaoguang said, maybe it's a waste of time to figure it out.
I've changed my mind. I'll try to drop the table, let's see if it's easier.


Remove _arrayReduce

This looks good.  Did you do any tests for whether this affects performance?

I didn't.

Tests fail in 0.12, because array was not iterable then. Wait with merging until 0.12 compat is not a concern.


Document common workflows of weather-tools

After #7 is complete, we should prepare a "cookbook" of common dev-ops workflows that use weather-tools. These should include:

[ ] A walkthrough of using each tool in context with each other on GCP.
[ ] How to use weather-dl to download priority data first.
[ ] How to schedule dataflow jobs in the future (if possible).
[ ] How to set up Alerts and monitoring Dashboards in GCP.
[ ] (reach) using a Cloud Montoring dashboard to view results from the Download Manifest.

Can you please also document how to choose the value of the 'dataset' field in the .cfg file? Or even better, autosuggest values based on the requested ECMWF data fields specified elsewhere in the .cfg file.
For example, some fields (eg 'ttr', 'tsr') are documented by ECMWF to be "single-level", where the 'dataset' field would be called reanalysis-era5-single-levels instead of reanalysis-era5-pressure-levels as shown in the currently checked-in example .cfg files.
I'm guessing, but looks like at the moment, one should inspect the ECMWF URL describing the dataset and use the last part of the URL path, eg: https://cds.climate.copernicus.eu/cdsapp#!/dataset/reanalysis-era5-pressure-levels


Getting blank mask while testing pre-trained model with custom image

Hi.
I tried to use the pretrained model on two custom images and the mask I got was blank despite there being change between the images.I am sharing the before image, after image where I marked the changed point with blue boundary for u to easily figure and also the resulting mask.

@SouravSarkar865 thanks for sharing this.

First: Did you try giving the example images provided in this repo just to make sure that everything else is going fine?
Second: Can you pls try with reshaping/ cropping your images into 256x256 resolution? Because the original model is trained with 256x256 resolution?
How the generated mask has a different shape than the input images?

Thanks.

Hi!
Thank you so much for your response. I did try the example images from the repo first which were working fine and giving the correct mask. As per your instruction I did reshape my images into 256x256 to make sure the generated mask and input images have the same size, yet I was getting a blank image with no mask.
Is there anything else I should do?

Thank you for your response.
The images I provided are containing boats and ships so it can be that due to my input images being different from the kind of images the model has been trained with, I am not getting the desired output.

@SouravSarkar865 I see. Yes the assumption is correct. The provided model only detects the changes in buildings and not the changes in boats. So, the model output is correct. If you would like to detect the changes in boats, I would recommend you to fine tune the provided model for boat change detection.
thanks.


Dynamic Routing: prev/next helper should take collections into account

Reported here: https://forum.ghost.org/t/hiding-content-collection-in-suggested-posts/3716
Summary
If you define more than one collection, the prev/next helper shows posts from another collection.
The helper should take the collection configuration into account. That basically means, it has to use the filter from the target collection.
Steps to reproduce

Add two collections.
Filter by a tag.
Use the prev/next helper.
Serve a post from a collection. The helper shows posts from the other collection too.

I have not looked into a solution yet.
Ghost: master

Any updates on this? Anything we can help on?

This issue is not something easily fixable and we'd need time to properly design where the "filter" piece of data would fit in template rendering process/state.
TLDR
Root of the problem has to do with how routing layer passes data to helpers like prev/next - during render stage helpers don't have enough information to know about collection route's filter.
Longer version
When the template is rendered in routing rendered here, it's the last place where res maintains state about collection route's filter.
To provide additional data all the way to prev/next helper (and other helpers if needed) we could use root property available in root state, similar to how context and apiVersion are passed around.
Note on reproduction steps
To reproduce 2 collection state:
0. Use default Casper theme

Upload following routes.yaml:

routes:
  /signup/: members/signup
  /signin/: members/signin
  /account/: members/account

collections:
  /one/:
    permalink: /one/{slug}/
    template: index
    filter: 'tag:one'
  /two/:
    permalink: /two/{slug}/
    template: index
    filter: 'tag:two'

taxonomies:
  tag: /tag/{slug}/
  author: /author/{slug}/

Create multiple posts with tags "one" and "two"
Navigate to http://localhost:2368/one/
Navigate to any of the posts available in the collection
Observe a bug on the bottom "prev/next" section

I ran into this too today and Google brought me here.
What's the best workaround for this until it's fixed? What do you recommend?

Related issue https://github.com/TryGhost/Themes/issues/246


Pubsub message fields

Rename to topicCIDs should be topicIDs.  See the background discussion.

@diasdavid Needs PR https://github.com/libp2p/js-libp2p-floodsub/pull/49 released.  Then update dependencies.

@diasdavid have you updated dependency to new the floodsub?


fix replacing end of line with newline

Fixes https://github.com/Microsoft/vscode/issues/2586

Hi @sparecycles, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
The agreement was validated by Microsoft and real humans are currently evaluating your PR.
TTYL, MSBOT;

@sparecycles Thank you! I ended up using a very similar approach inspired from your change in dd751e45eeb29fd9839018d9880981e2dd8e9792 --- to distinguish the composition case in the textareaState by checking if the string contains newline --- and to keep track of the version id emitted via contentChange and emit a dummy event if it fell behind.
Thank you once again! -- now I just need to rewrite that logic -- I hate it :)

Looks good!  Glad to have helped.


add unit test cases for states

This PR includes:

test cases for Protocols/states.h

@ethanjli the GIVEN WHEN'S THEN'S have been modified for all test cases, therefore requires one review, if there are major changes then we can have one more. In terms of test cases we have discussed these quite a few times and I think they should be enough, please let me know. Thanks

I will restructure the scenarios in future iterations.

This project is licensed under Apache License v2.0 for any software, and Solderpad Hardware License v2.1 for any hardware - do you agree that your contributions to this project will be under these licenses, too? Yes.
Were any of these contributions also part of work you did for an employer or a client? No.
Does this work include, or is it based on, any third-party work which you did not create? No.


[Don't merge] Try to reproduce test failure of WindowedSubscriberFluxWindowTest

Description
Don't merge. It's just to reproduce test failure of WindowedSubscriberFluxWindowTest in this PR: https://github.com/Azure/azure-sdk-for-java/pull/40700/

API change check
API changes are not detected in this pull request.


Size of exported usdc file is 2kb and it completes processing immediately. I don't think it's a valid export

Describe the bug
A clear and concise description of what the bug is.
I ran teh sample code to produce a scene hello world. The scene.blend file it created is 934 MB. I looked at the images folder and it looks correct. When I ran the export to usdc command it completed immediately and the size of hte file is very small
Steps to Reproduce
What version of the code were you using?
Tell us the commit & commit hash from git log
What command did you run?
(infinigen) andy@andys-pc:~/infinigen/outputs/hello_world/0/fine$ python -m infinigen.tools.export --input_folder .  --output_folder outputs/my_export -f usdc -r 1024
What are your FULL output logs?
Provide the FULL output logs from your command as a txt file.
(infinigen) andy@andys-pc:~/infinigen/outputs/hello_world/0/fine$ python -m infinigen.tools.export --input_folder .  --output_folder outputs/my_export -f usdc -r 1024
Failed to open dir (No such file or directory): /run/user/1002/gvfs/
Skipping non-blend file MaskTag.json
Skipping non-blend file assets
Skipping non-blend file outputs
Skipping non-blend file pipeline_fine.csv
Skipping non-blend file polycounts.txt
USD export of 'outputs/my_export/export_scene.blend/export_scene.usdc' took 18.8 ms
updating: outputs/my_export/export_scene.blend/ (stored 0%)
updating: outputs/my_export/export_scene.blend/export_scene.usdc (deflated 45%)
Skipping non-blend file scene.blend1
Skipping non-blend file version.txt
If this is your first time running Infinigen, what are the full install logs?**
Run pip install -v -e . > logs.txt 2>&1 and send logs.txt as an attachment.
Platform

OS & OS Version:
GPU (?) :
GPU Driver Version (?) :
RAM (GB):

Additional context
Add any other context about the problem here.

In export_logs.log I see:
INFO:root:Exporting to directory export_folder=PosixPath('outputs/my_export/export_scene.blend')
INFO:root:Deleting placeholders collection
DEBUG:root:Triangulating Meshes
DEBUG:root:Triangulating <bpy_struct, Object("Cube") at 0x3b30758>
INFO:root:---------------------------
INFO:root:Camera
INFO:root:Not mesh, skipping ...
INFO:root:---------------------------
INFO:root:Cube
INFO:root:UV Unwrapping
INFO:root:Material.001
INFO:root:Material.001 has no procedural input for DIFFUSE, not using baked textures
INFO:root:No necessary materials to bake on Cube, skipping bake
INFO:root:Material.001
INFO:root:Material.001 has no procedural input for ROUGHNESS, not using baked textures
INFO:root:No necessary materials to bake on Cube, skipping bake
INFO:root:Removed extraneous UV Layer <bpy_struct, MeshUVLoopLayer("UVMap") at 0x3c37008>
INFO:root:Reapplying baked texs on Material.001
INFO:root:Trivial shader graph, using old BSDF
INFO:root:---------------------------
INFO:root:Light
INFO:root:Not mesh, skipping ...
INFO:root:Exporting file to export_file=PosixPath('outputs/my_export/export_scene.blend/export_scene.usdc')

Currently experiencing the same issue

Currently have the same issue

Had the same issue, the problem was that the line to read the blend file was deleted in this commit 2 weeks ago: c01e498. It seems this was by mistake.
To fix, copy this line to infinigen/tools/export.py on line 764:  bpy.ops.wm.open_mainfile(filepath=str(input_blend))
cc @mazeyu please confirm there is no issue with reverting the delete of this line of code.

Hi @ben-martinez , thank you for the help! This fix does work, but I now run in to another issue. I get this error:
Error: No valid selected objects
Traceback (most recent call last):
File "/home/cjacobsen/miniconda3/envs/infinigen/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/cjacobsen/miniconda3/envs/infinigen/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/cjacobsen/git/infinigen/infinigen/tools/export.py", line 1037, in
main(args)
File "/home/cjacobsen/git/infinigen/infinigen/tools/export.py", line 993, in main
folder = export_scene(
File "/home/cjacobsen/git/infinigen/infinigen/tools/export.py", line 767, in export_scene
export_curr_scene(folder, **kwargs)
File "/home/cjacobsen/miniconda3/envs/infinigen/lib/python3.10/site-packages/gin/config.py", line 1605, in gin_wrapper
utils.augment_exception_message_and_reraise(e, err_str)
File "/home/cjacobsen/miniconda3/envs/infinigen/lib/python3.10/site-packages/gin/utils.py", line 41, in augment_exception_message_and_reraise
raise proxy.with_traceback(exception.traceback) from None
File "/home/cjacobsen/miniconda3/envs/infinigen/lib/python3.10/site-packages/gin/config.py", line 1582, in gin_wrapper
return fn(*new_args, **new_kwargs)
File "/home/cjacobsen/git/infinigen/infinigen/tools/export.py", line 920, in export_curr_scene
bake_scene(
File "/home/cjacobsen/git/infinigen/infinigen/tools/export.py", line 695, in bake_scene
bake_object(obj, folderPath, image_res, export_usd)
File "/home/cjacobsen/git/infinigen/infinigen/tools/export.py", line 667, in bake_object
bake_pass(obj, dest, img_size, bake_type, export_usd)
File "/home/cjacobsen/git/infinigen/infinigen/tools/export.py", line 472, in bake_pass
bpy.ops.object.bake(
File "/home/cjacobsen/miniconda3/envs/infinigen/lib/python3.10/site-packages/bpy/3.6/scripts/modules/bpy/ops.py", line 113, in call
ret = _op_call(self.idname_py(), None, kw)
RuntimeError: Error: No valid selected objects
This is related to this issue here: https://github.com/princeton-vl/infinigen/issues/312#issue-2504255810
For reference, I am trying to export the scene created by the hello world demo to usdc. When I render the images or blender file, it seems that the scene generated correctly. Any ideas what might be causing this error?

Had the same issue, the problem was that the line to read the blend file was deleted in this commit 2 weeks ago: c01e498. It seems this was by mistake.
To fix, copy this line to infinigen/tools/export.py on line 764:  bpy.ops.wm.open_mainfile(filepath=str(input_blend))
cc @mazeyu please confirm there is no issue with reverting the delete of this line of code.

This is not a mistake. I intentionally deleted it to make the file reading controlled by execute_tasks.py, the same as other tasks, coarse, fine_terrain etc. (Otherwise there is a low-poly bug issue reported by someone) But I wasn't aware that  infinigen.tools.export might be directly called. Let us take a further look and reply later.

Thank you mazeyu for working on the bug.
Also, glb along with usd support instancing. In the usage notes, you said only usd supports instancing. I have not tried to convert an infinigen usd to glb uet to.see if it still works cause got stuck on this bug.

Instancing Support in glTF/GLB:

glTF 2.0 (which GLB is a binary form of) does support instancing.
It uses a feature called "Mesh Instancing" which allows multiple instances of the same mesh to be rendered with different transforms.

Thank you mazeyu for working on the bug.
Also, glb along with usd support instancing. In the usage notes, you said only usd supports instancing. I have not tried to convert an infinigen usd to glb uet to.see if it still works cause got stuck on this bug.

Instancing Support in glTF/GLB:

- glTF 2.0 (which GLB is a binary form of) does support instancing.
- It uses a feature called "Mesh Instancing" which allows multiple instances of the same mesh to be rendered with different transforms.

The correct location for file reading should be
 for blendfile in targets:
        if blendfile.stem == "solve_state":
            shutil.copy(blendfile, args.output_folder / "solve_state.json")

        if not blendfile.suffix == ".blend":
            print(f"Skipping non-blend file {blendfile}")
            continue

        bpy.ops.wm.open_mainfile(filepath=str(blendfile)) # <-- ADD THIS LINE

        folder = export_scene(
            blendfile,
            args.output_folder,
            format=args.format,
            image_res=args.resolution,
            vertex_colors=args.vertex_colors,
            individual_export=args.individual,
            omniverse_export=args.omniverse,
        )
        # wanted to use shutil here but kept making corrupted files
        subprocess.call(["zip", "-r", str(folder.with_suffix(".zip")), str(folder)])

Export fixes for this and associated issues will be coming in the next patch.


defineComponent : composableFunction references a type with a cyclic structure error

Vue version
3.3.8
Link to minimal reproduction
https://play.vuejs.org/#eNqVVF9P2zAQ/yqWXwAJtQjeSpqpLVRiwJhG9zRPU5pcW1PHjmynK6ry3Xe2SUjabhpvyf35/TndeUdHRdHblEAHNDKp5oUlBmxZEJHI5ZBRaxiNmeR5obQlO5Iq/DLJXMCYVGShVU5Oev1W9OSaSSbtawFknBieztzXkOyYJGTBtbG/ZJLDgBiruVxiMUGqw2jFZKqkaSglSOsYh20FUcMQn54xGfWDA9SLPxbyQiQW8C9qQTge9PUuhVHSdzX9VgM9R+PIv+DL3otREqfjDTDqkLgA/VRYjvoYHQRrLmcTvQTrQozePl9eXF4wel4nSwM3sOASpkpP0LGZchCZB7C6hKYuV1kpUFQA+QJbBGySgs9d5kcLH6M3T4/NR+/OgnbDYfRn02bWvHjg88kK0vUBYQapSHTi7PxFzDcwSpR1AaPzUmY4gpYu7So28BlH9djo7yBxLMDZZiF9aFuq25z72XXCL2YbOAukAL1B4FbLd4lTzR5UmohjiCH9Fc3lgFM5VjJNhLArrcrlapIYMHfy+Te36eqg1C1m2uhz0crnGMXjmfzXUlz1rnwfLjfu1/saj3rW4II1J5b5NXGYfmXrM/NMjHbOC6IZXkQ4mjhcGbPhkmYEVwdkZt7S5BOGBkTCBnS4LyZh6ynDobUEIVJ0jydFhnGAfKvIC8zsyXM3CNEaXtWC3Mfx6a468xKZ1fiOaOm6HN91x/P4o56PPECjow/Q6OQfzsbO2eyIs5rYWd/TUjvaL3VYLVoP6+s67j2J660JcGs6gbEPVGFE1R8BE+an
Steps to reproduce
I create two composable for creating component with defineComponent.
composableA: It creates component which will works as a child. I pass the types for the props
type Base<T = string> = {
	name: T extends string ? string : never;
}

export const composableA = <K>() => {
	const cmp = defineComponent<Base<keyof K>>({});

	return cmp;
};

composableB: This creates a parent and this composable will give back the child and parent together:
export const composableB = <T>() => {
	const componentA = defineComponent({});
	const componentB = composableA<T>();

	return {
		componentA,
		componentB,
	};
};

On code level this is working as expected. If I have type then then name prop will be type safe. But the lint is not so happy about it and I get this error:
The inferred type of 'composableB' references a type with a cyclic structure which cannot be trivially serialized. A type annotation is necessary.
I noticed the problem with the occured with the <Base<keyof K>>. If I not using generic with Base or just using the K like this:
const cmp = defineComponent<K>({});
or
const cmp = defineComponent<keyof K>({});

the error is gone but when I pass it to the Base like this:
const cmp = defineComponent<Base<keyof K>>({});

then it fails
(I'm not sure this is a Vue or a Typescript related issue or mine of course)
What is expected?
Not getting this error
What is actually happening?
Getting this error
System Info
No response
Any additional comments?
No response

This issue is caused mainly because of the generic than the defineComponent, even is not a valid type as for vue props, because the name: never will not make the type valid at runtime, since name will always be a prop of the component.
That said there's a change on the type from passed props to the defineComponent declared props, you can mitigate that with declaring the prop and overriding it's runtime type.
example:
import { PropType, defineComponent } from "vue";

export const composableA = <K>() => {
	const cmp = defineComponent({
		props: {
			name: {
				type: String as unknown as PropType<K extends string ? K : never>
			}
		}
	});

	return cmp;
};

playground
Based on the example provided composableA expects the argument to be a string to work as expected, but the type passed to composableB is an object, which is passed directly to composableA, not sure exactly what is the intention.
Please remember typed only props do not work in vue at runtime! Vue requires actual props to be passed to the component, for validation, otherwise there's no difference between props or attributes.
Based on that there's a workaround, I personally think passing props as argument should only be when using compiler helper defineProps, other usages must be done with care.


Vertex/edge cutting

Included functions for applying the vertex and edge cutting decompositions

Can you please add tests?

I've just added some tests for both functions to verify the scalar results are correct on randomly generated graphs

Could you add docstrings to the main functions you added, with perhaps a reference to your papers where you use them.

Ah I see what goes wrong. You are using match statements, but these were introduced in Python 3.10. PyZX still supports older versions of Python. I see that in that match statement you are also using hard-coded 1 and 2 for the types of Z and X spiders. You can actually replace this by calling the function utils.toggle_vertex for the same functionality.

Can this be merged?


add delete method to Message class

does a HTTP DELETE request to https://discord.com/api/VERSION/channels/CHANNELID/messages/MESSAGE_TO_DELETE_ID

Yeah I like this and TS code looks good to me!


vis voxels

How to visualize voxels in bool volume?

you can cast it to np.int8.

May I ask how to voxelize the mesh?

Yeah, I see.

But how to generate like the following images (real voxel):


auth.useUserAccessGroup(accessGroup) does not work to share authentication between Watch and iPhone

[REQUIRED] Step 1: Describe your environment

Xcode version: Version 12.4
Firebase SDK version: 7.9.1
Installation method: Swift Package Manager
Firebase Component: Auth

[REQUIRED] Step 2: Describe the problem
Steps to reproduce:
I'm trying to use Auth.auth().useUserAccessGroups across both iPhone and WatchOS apps to share authentication. The iPhone app initiates an anonymous sign in and should be sharing the user but the watch app returns nil.

Setup an iPhone and WatchOS app and follow the following steps for cross app authentication https://firebase.google.com/docs/auth/ios/single-sign-on?authuser=0. I set up an app group and used that in both the iphone and watch app.
In the iphone app,  on init, utilize signInAnonymously after calling Auth.auth().useUserAccessGroup
In the watch os app, on init, check the currentUser value after calling Auth.auth().useUserAccessGroup
Run the iphone app and then the watch os app. The watch os app will return nil for user

Relevant Code:
In iPhone app:
init() {
        FirebaseApp.configure()

        do {
            Auth.auth().shareAuthStateAcrossDevices = true
            try Auth.auth().useUserAccessGroup("APP_GROUP_NAME")
        } catch let error as NSError {
            print("Error changing user access group: %@", error)
        }

        if Auth.auth().currentUser === nil {
            Auth.auth().signInAnonymously()
        }

        print(Auth.auth().currentUser?.uid, "user")
    }

In watch app:
init() {
        FirebaseApp.configure()

        do {
            Auth.auth().shareAuthStateAcrossDevices = true
            try Auth.auth().useUserAccessGroup("APP_GROUP_NAME")

            print(Auth.auth().currentUser?.uid, "user")
        } catch let error as NSError {
            print("Error changing user access group: %@", error)
        }
    }

Hi @RohitRajendran, would you mind sharing a minimal repro that I can run locally? It would help us a lot digging into the cause of your issue. Thanks.

Reopening based on conversation in #7840.
Note that watchOS is community supported so it may be awhile before anyone gets to this.

Thanks for re-opening, Paul.
It would be good to have a "best practices for watchOS + iOS Firebase apps" doc that lives somewhere, even community-supported and with huge asterisks that it's not official yet.
I think there are a few options:

Pass a Token
Have the iPhone perform the auth flow and then retrieve a current token via Auth.auth().currentUser.getIDToken, then pass the token to the watch via a WCSession updateApplicationContext on session activation. Until the watchOS app receives the app context, it will have to display a "please log in on your iPhone" message to the user. This has the advantage of not actually requiring FirebaseAuth on the watchOS client at all - the watch app can just use the token in e.g. server API calls directly. The iOS app will be responsible for keeping its watch companion updated as the token renews and the watchOS app may need to enquire about a new token with the iOS parent app if it hears back that the token has expired.

The disadvantage of this approach is that it does not allow for a standalone watchOS app; the watch can only be used as a companion to the iOS app. In reality, very few apps are - or need to be - standalone; the watchOS App Store is a bit of a joke. So this should be fine for most developers.

iCloud Keychain Sync
Use a group/shared keychain between apps and enable iCloud Keychain synchronization, then direct Firebase Auth to use this shared keychain. In theory this enables all of a user's devices that are signed in with their iCloud account to also now be signed in with Firebase as the same user.

I haven't gotten this approach working yet but in theory it could/should work and it enables a full "acts like a peer" approach for watchOS as a client that enables an independent watchOS app experience. The phone and watch don't need to be communicating directly for this to work either; e.g. if the watch has a cellular connection it should be able to complete the iCloud sync.

Proxy
Have the iOS app pull all required data for the watchOS app and send it as app State. When the watchOS app opens, have it request information from (and send information to) the iPhone via WCSession messages.

This has the advantage of allowing for a much simpler and smaller watchOS client - the client never makes any "network" requests at all, just chatting with the host iOS app. No Firebase on-watch! The iOS app can use more sophisticated protocols like gRPC to talk to server backends to fulfill the request, none of which the watchOS app needs to be worried about. And the iOS app can just re-use existing code paths already needed to implement these things. The disadvantage is that all operations must be done in actively paired mode; the watchOS app will stop working altogether without an active WCSession, so the watch can never be far from the phone. That's probably an acceptable tradeoff for most apps.

[DOESN'T WORK] App Group

It should be made clear to developers that setting up an app group for their watchOS extension and iOS app and then asking Firebase Auth to use that app group will NOT magically allow Firebase Auth to work correctly on-watch because app groups are used for on-device sharing and the watch and phone are separate devices. Clearly spelling this out will save developers heartache trying to figure out what's wrong.

@dweekly You are right, app group doesn't support data sharing between watch and iPhone. So unfortunately this issue is expected.  We are looking at the possibilities of supporting this feature. In the meantime, @RohitRajendran and @dweekly It would be great to file a feature request and upvote the issue, which helps us prioritize.

@RohitRajendran @dweekly Can you share a bit about your use case? Do you use other Firebase products on watch that need authentication or you want to only show user data when authentication is confirmed on watch?
For the second case, you can use WatchConnectivity to notify you watch if user has authenticated on the iPhone.

I'm trying to figure this out right now.
@dweekly I'm hesitant to go for the iCloud Keychain sync since I suppose it takes some time for it to sync / will be hard to control that.
I don't really just want to share the ID token retrieved via User.getIDTokenResult() either as it's short-lived and I want the watch app to be able to act independently from the iPhone. I could provide the long-lived refresh token via WatchConnectivity but there doesn't seem a way to use that to actually sign the user in (set the User object) using the Auth framework through public APIs.
I could maybe instead read the whole archived plist data from the keychain, send that to the watch, store it in the keychain there and only then initialize the Auth framework and have it read that data. Doesn't really sound elegant to me though.
Has anybody figured this out yet?
I'll probably go for providing the refresh token via WatchConnectivity, request the ID token from that (via REST) and use it to request Firebase APIs. That means I can't use any of the frameworks on the Watch though as they need the user object to be set for the Auth framework, right?

This issue should be closed. The original usage of an app group (which is solely for exchanges among apps on one device) is the source of error. useUserAccessGroup(teamID.keyChainSharingGroup) does work for login and logout across Watch, iPhone, and Mac when the user has iCloud Keychain sync enabled.


Cargo lock file out of date in 0.6.1

Similar to #88, the lock file is out of sync in the 0.6.1 release tag.

My bad, I fix this ASAP. Sorry!

Strange because when I cargo build locally on master my Cargo.lock file does not change, how come? :thinking:

It does change when I run it. And after running it I can then run cargo fetch --locked which is what didn't work at first.
$ cargo build
    Updating crates.io index
   Compiling toml v0.5.9
   Compiling serde_json v1.0.86
   Compiling erased-serde v0.3.23
   Compiling lettre v0.10.0-rc.7
   Compiling markup5ever v0.11.0
   Compiling html5ever v0.26.0
   Compiling ammonia v3.2.1
   Compiling himalaya-lib v0.4.0
   Compiling himalaya v0.6.1 (/home/caleb/projects/github/himalaya)
    Finished dev [unoptimized + debuginfo] target(s) in 14.20s
$ git diff
diff --git a/Cargo.lock b/Cargo.lock
index 5e42379..be2e16c 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -577,6 +577,8 @@ dependencies = [
 [[package]]
 name = "himalaya-lib"
 version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c6757df2ef0efa6418e90195dd3dcd2f8c144e374ebdc14b5967c7867a419394"
 dependencies = [
  "ammonia",
  "chrono",

I know why: locally I override the himalaya-lib in a way that it points to my local folder:
# ~/.cargo/config.toml

[patch.crates-io]
himalaya-lib = { path = "/path/to/my/himalaya-lib" }

Which leads to a different Cargo.lock.
It is the first release using the lib, I did not see this issue coming back. I will publish a new minor release in the nearest days!

Sorry for the delay, this issue will be fixed by #433!


some question about the Greedy Algorithm

why the three sets are more accurate than the two sets when generating initial layout with greedy alogorithm?

Sorry, it should be the MDS alogorithm?

The MDS algorithm should be basically perfect with 2 sets as well - but I was running into some numerical stability issues with the SVD implementation I was using from numeric.js. I remember investigating and finding that certain inputs were getting NaN values from numeric.js (but passing the same values to the svd implementation in numpy worked fine). I didn't worry about it too much since I found better methods than the basic MDS algorithm


[GHSA-g8pj-r55q-5c2v] Apache Tomcat Incomplete Cleanup vulnerability

Updates

Affected products

Comments
Improve visibility for org.apache.tomcat.embed:tomcat-embed-core
Reasoning -> fixed components are also part of tomcat-embed-core package:
(11.0.x) https://github.com/apache/tomcat/commit/d6db22e411307c97ddf78315c15d5889356eca38
(10.1.x) https://github.com/apache/tomcat/commit/9375d67106f8df9eb9d7b360b2bef052fe67d3d4
(9.0.x) https://github.com/apache/tomcat/commit/44d05d75d696ca10ce251e4e370511e38f20ae75
(8.5.x) https://github.com/apache/tomcat/commit/30f8063d7a9b4c43ae4722f5e382a76af1d7a6bf

Similar to https://github.com/github/advisory-database/pull/3105 I don't follow the linkage from the commits to the org.apache.tomcat.embed:tomcat-embed-core artifact. Can you expand on that?

Hi @darakian , please see details here: https://github.com/github/advisory-database/pull/3105#issuecomment-1866943412
thanks


xSQLServerEndpointState: Removed dependency of SQLPS provider

Pull Request (PR) description

Changes to xSQLServerEndpointState

Cleaned up code, removed SupportsShouldProcess and fixed PSSA rules warnings (issue #258 and issue #230).
Now the defult value for the parameter State is 'Started'.
Updated README.md with a description for the resources and revised the parameter descriptions.
Removed dependency of SQLPS provider (issue #481).

This Pull Request (PR) fixes the following issues:
Fixes #481
Fixes #258
Fixes #230
Task list:

[x] Change details added to Unreleased section of CHANGELOG.md?
[x] Added/updated documentation, comment-based help and descriptions in .schema.mof files where appropriate?
[x] Examples appropriately updated?
[x] New/changed code adheres to Style Guidelines?
[x] Unit and (optional) Integration tests created/updated where possible?

This change is

Codecov Report

Merging #497 into dev will decrease coverage by <1%.
The diff coverage is 57%.

@@         Coverage Diff         @@
##            dev   #497   +/-   ##
===================================
- Coverage    74%    73%   -1%
===================================
  Files        32     32
  Lines      3437   3433    -4
===================================
- Hits       2553   2535   -18
- Misses      884    898   +14

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 80312a8...5cdf4ac. Read the comment docs.

The tests fail because all of the sudden the build worker cannot find the cmdlet Set-SqlHADEndpoint from our SQLPS stubs. Pushing a change to see if this was temporary.
They do work locally.

Closing this PR until I figure out what is going on with the SQLPS stubs on this one.

So Import-Module .. .-Global is needed for the stubs to be loaded into the right scope. Tests should go thru fine now.

Reviewed 3 of 5 files at r1, 1 of 2 files at r2, 1 of 1 files at r4.
Review status: all files reviewed at latest revision, 3 unresolved discussions.

DSCResources/MSFT_xSQLServerEndpointState/MSFT_xSQLServerEndpointState.schema.mof, line 5 at r4 (raw file):

{
    [Key, Description("The name of the SQL instance to be configured.")] String InstanceName;
    [Required, Description("The host name of the SQL Server to be configured.")] String NodeName;

This shouldn't be needed to be required. Change so that default value is env:COMPUTERNAME.

DSCResources/MSFT_xSQLServerEndpointState/MSFT_xSQLServerEndpointState.schema.mof, line 6 at r4 (raw file):

    [Key, Description("The name of the SQL instance to be configured.")] String InstanceName;
    [Required, Description("The host name of the SQL Server to be configured.")] String NodeName;
    [Required, Description("The name of the endpoint.")] String Name;

This need to be Key so more than one endpoint can be started on the same instance.

Tests/Unit/MSFT_xSQLServerEndpointState.Tests.ps1, line 39 at r4 (raw file):

    InModuleScope $script:DSCResourceName {
        $mockNodeName = 'localhost'
        $mockInstanceName = 'SQL2016'

Change this to something else than 'SQL2016'

Comments from Reviewable

Review status: 0 of 6 files reviewed at latest revision, 3 unresolved discussions.

DSCResources/MSFT_xSQLServerEndpointState/MSFT_xSQLServerEndpointState.schema.mof, line 5 at r4 (raw file):
Previously, johlju (Johan Ljunggren) wrote…
This shouldn't be needed to be required. Change so that default value is env:COMPUTERNAME.

Done.

DSCResources/MSFT_xSQLServerEndpointState/MSFT_xSQLServerEndpointState.schema.mof, line 6 at r4 (raw file):
Previously, johlju (Johan Ljunggren) wrote…
This need to be Key so more than one endpoint can be started on the same instance.

Done.

Tests/Unit/MSFT_xSQLServerEndpointState.Tests.ps1, line 39 at r4 (raw file):
Previously, johlju (Johan Ljunggren) wrote…
Change this to something else than 'SQL2016'

Done.

Comments from Reviewable

Reviewed 6 of 6 files at r6.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from Reviewable


Cannot convert wmf image, and the possible solution

Get something like this, I also encounter this with my own code using Pillow
Cannot convert wmf image xxxxxxxx.wmf in slide 24 to png, this probably won't be displayed correctly.
wand can solve this, I add this to a image.py:
def convert_wmf_to_png(input_file, output_png_path):
    """
    Convert WMF data to a PNG file.
    """
    from wand.image import Image

    with Image(filename=input_file) as img:
        img.format = 'png'
        img.save(filename=output_png_path)

Then I replace the image process lines with something like this:
# wmf images, try to convert, if failed, output as original
  try:
    try:
      Image.open(output_path).save(os.path.splitext(output_path)[0] + '.png')
      out.put_image(os.path.splitext(img_outputter_path)[0] + '.png', g.max_img_width)
      notes.append(f'Image {output_path} in slide {slide_idx} converted to png.')
    except Exception:  # Image failed, try another
      from image import convert_wmf_to_png
      convert_wmf_to_png(output_path, os.path.splitext(output_path)[0] + '.png')
      out.put_image(os.path.splitext(img_outputter_path)[0] + '.png', g.max_img_width)
      notes.append(f'Image {output_path} in slide {slide_idx} converted to png.')
  except Exception as e:
    notes.append(
        f'Cannot convert image {output_path} in slide {slide_idx} to png, this probably won\'t be displayed correctly. f{str(e)}'
    )
    out.put_image(img_outputter_path, g.max_img_width)

Since wand must install ImageMagisk, and I am not sure you like this idea, so I did not fork and make a formal merge request.
If some one encounters this, one can merge my code, it works perfectly. And thank you for writing pptx2md, I am using it to parse ppt essays, which makes my life much easier.

see issue#50


password gui with pinentry-mac for handling Casks that require sudo

Solves Issue https://github.com/Homebrew/homebrew-autoupdate/issues/40
You can now pass the argument --sudo to the start command.
If a Cask requires sudo, pinetry-mac will open a gui to ask for the password:

The users currently need to manually run brew install pinentry-mac.
Should I add a check if pinentry-mac is installed and display a hint to the users? (Only if the --sudo argument is used)
Or should we auto-install the dependency if it is missing?

Should I add a check if pinentry-mac is installed and display a hint to the users? (Only if the --sudo argument is used)
Or should we auto-install the dependency if it is missing?

Up to @DomT4 but I think at least it should check in the code.

The window spawned by pinentry-mac steals the focus, and also you can not minimize it. I will look into the docs, maybe there is an option to enable the minimize button.

Focus: --no-global-grab option is already set 👍🏻
Minimize: This is currently not possible with pinentry-mac

This is good work, thank you @swissbuechi. Sort of held off moving on this broader issue because I was trying to think of something both native and lightweight, and never really found anything I was happy with. Agree this is at least better than the status quo and a very visible improvement to the end user.
Will give this another glance over no later than Wednesday but from quick glance it looks like a better workaround than anything I've cooked up 😄.
Thanks for the code review @MikeMcQuaid 🙌🏻

This is good work, thank you @swissbuechi. Sort of held off moving on this broader issue because I was trying to think of something both native and lightweight, and never really found anything I was happy with. Agree this is at least better than the status quo and a very visible improvement to the end user.
Will give this another glance over no later than Wednesday but from quick glance it looks like a better workaround than anything I've cooked up 😄.
Thanks for the code review @MikeMcQuaid 🙌🏻

Thank you 👍🏻
I'm looking forward to your review.
A litte bit off-topic, but could you please unlock issue: https://github.com/Homebrew/homebrew-autoupdate/issues/59 ?
I would like to discuss this and maybe create another PR to provide an option to use StartCalendarInterval.
Maybe you also need to add some labels, so the bot won't auto-close it again.
Thanks.

A litte bit off-topic, but could you please unlock issue: #59 ?

@swissbuechi done, hope that's ok @DomT4, feel free to re-lock if not and: sorry!


Resources

Hello,
Could you be so kind as to write on how to test with resources (for example opening a file from the test-resources directory)?
Thanks

That's a bit out of the scope of this repo, but see this answer on StackOverflow.
You can access /src/test/resources/file.txt in the following way:
	@Test
	public void testOpenResources() throws IOException {
		Path path = Path.of(getClass().getResource("/file.txt").getPath());
		String content = Files.readString(path, StandardCharsets.US_ASCII);
		assertEquals("Hello world\n", content);
	}


Added allegro, caddy, multirust, passpie, td, xar-mackyle, libxdg-bas…

…edir, mockserver, negfix8 and pla

Merged. Thank you very much!


Tooltips auto placement calculates available space wrongly.

If the tooltip is positioned "auto right", then it assumes that its own left + width must be less than the parent width, otherwise it switches to the alternate position:
placement == 'right'  && pos.right + actualWidth      > parentDim.width ? 'left'

However that's not actually true because it ignores the position of the parent (specifically its left offset). Thus it's easy for the tooltip to think there's not enough space when there is.
For example, if you look at the attached screenshot you can see that:
pos.right: 807.75
actualWidth: 191
parentDim.width: 483
parentDim.left: 694.75
parentDim.right: 1177.75

The tooltip should be to the right of the "Add/Remove" button, and clearly there is space: pos.right + actualWidth = 999, while parentDim.right = 1177. However the calculation uses parentDim.width instead of parentDim.right, ignoring the left offset of the parent, so it thinks there isn't enough space.

I'm guessing this is related to an issue I'm having?
I want the tooltips to show up to the right of my text unless there is not enough space. So according to my understanding of the documentation I should use data-placement="auto right", correct?
But when I use auto right the tooltip almost always shows to the left…even when there is not enough space to the left! If I use auto left, then the tooltip almost always shows to the right…unless there is a whole lot of space to the left. So the opposite setting actually seems to have the desired effect!
Does this bug (and/or https://github.com/twbs/bootstrap/issues/15367) explain the behavior I see, or am I experiencing a different issue?

@natevw Can you test if the changes from #15368 fix your problem?

Punting as a won't fix—v4 includes a new positioning library for our affix, tooltips, and popovers.


Multiclass Neural Net Classifier

Created a tensorflow model for classifying the games as home , draw or win. Then for the home_double and away_double I wrote a simple logic in the ml_package/predict.py to obtain those probabilities by adding home with draw and away with draw respectively.
Updated requirements.txt to look for tensorflow versions greater than or the same as 2.10.1 and not just that specific version.

Metric
main
workspace
Change

away_double.metrics.accuracy_score
0.63105
-
-

away_double.model_type
GDBoost
-
-

away_win.metrics.accuracy_score
0.71463
-
-

away_win.model_type
GDBoost
-
-

draw.metrics.accuracy_score
0.77583
-
-

draw.model_type
votting
-
-

home_double.metrics.accuracy_score
0.71463
-
-

home_double.model_type
GDBoost
-
-

home_win.metrics.accuracy_score
0.63105
-
-

home_win.model_type
GDBoost
-
-

multiclass.metrics.accuracy
-
0.52595
-

multiclass.metrics.accuracy_score
-
0.52831
-

multiclass.metrics.loss
-
0.98715
-

multiclass.metrics.val_accuracy
-
0.52705
-

multiclass.metrics.val_loss
-
0.9848
-

multiclass.metrics.validation_accuracy
-
0.52705
-

multiclass.metrics.validation_loss
-
0.9848
-

multiclass.model_type
-
Nural Net
-


To improve UI of Srila Prabhupada Stories

i want to improve the ui of div containers of the story so that it looks more eye catchy and is easier to read with a hover effect on it.

Hey @akshitagupta15june , I am a GSsoc'23 contributor i want you to assign this issue to me as it comes under my technical skills domain and i need to work on it.

Hii @Yashika-Agrawal ,this issue has already been assigned refer #170 . Please refer to other issues to contribute to;
Feel free to raise your own issue, we will review them and assign it
Thank you


ActionView::Template::Error in Communication::Website::SyncWithGitJob@elephant

Error in Osuny
ActionView::Template::Error in Communication::Website::SyncWithGitJob@elephant
undefined method `current_permalink_in_website' for an instance of Administration::Location
View on Bugsnag
Stacktrace
app/views/admin/education/programs/static.html.erb:115 - block in _app_views_admin_education_programs_static_html_erb___521903781539539582_226640
app/views/admin/education/programs/static.html.erb:114 - _app_views_admin_education_programs_static_html_erb___521903781539539582_226640
app/services/static.rb:23 - render
app/models/communication/website/git_file.rb:66 - to_s
app/services/git/analyzer.rb:49 - computed_sha
app/services/git/analyzer.rb:24 - should_update?
app/services/git/repository.rb:89 - block in sync_git_files
app/services/git/repository.rb:84 - each
app/services/git/repository.rb:84 - sync_git_files
app/services/git/repository.rb:26 - sync!
app/models/communication/website.rb:171 - sync_with_git_safely
app/jobs/communication/website/sync_with_git_job.rb:3 - execute
app/jobs/communication/website/base_job.rb:29 - perform

View full stacktrace
Created automatically via Bugsnag

An error linked to this issue has been marked as fixed in Bugsnag
ActionView::Template::Error in Communication::Website::SyncWithGitJob@elephant


[pylint] Add duplicate-bases rule

This is part of https://github.com/charliermarsh/ruff/issues/970

If you're interested, we can autofix this. Take a look at crates/ruff/src/rules/pyupgrade/rules/useless_object_inheritance.rs which is a very similar fix (removes object from class Foo(object)).

@charliermarsh thanks!
remember to cross that off the list 😄


Explicit cost, distance, and duration types

This PR:

[x] Closes #179.
[ ] Adds and passes relevant tests.
[ ] Has well-formatted code and documentation.

Notes:

It is essential that you add a test when making code changes.
This keeps the code coverage level up, and helps ensure the changes work as intended.
When fixing a bug, you must add a test that would produce the bug in the master branch, and then show that it is fixed with the new code.
New code additions must be well formatted. Changes should pass the pre-commit workflow, which you can set up locally using pre-commit.
Docstring additions must render correctly, including escapes and LaTeX.

Q for self: can I reinterpret_cast a Matrix<value_type> to e.g. Matrix<distance_type>, or does that require actual conversion?

To keep it a bit easier I'm going to remove the double/int stuff from this PR. It's only going to be about explicit distance/duration/cost etc. types. Once that works, however, implementing double/int on top of it is barely any work in a follow-up PR.

I'll continue with this tomorrow, and hopefully finish it then.

This is more or less done now. We could type more, but the basics related to cost, distance, duration, and capacity are now all in. A follow up on this will introduce double/int precision on top of the explicit types.

I'll finish this tomorrow morning. I started a benchmark run on commit a356bc089f6f7c4c8e28c083f59bcd0915c6902d, so we should also know tomorrow morning whether this has any impact. I suspect not; the compiler should be smart enough to figure out it's all ints under the hood.

I've responded to or implemented all the comments. The benchmark came back, and as expected this doesn't seem to impact performance. I'll merge this in once the CI passes.


Antd Design V4 support please

Hi, in V4, the icon library is changed. Could you please support it ?  Thanks

Expand collapse icons are not displayed

any update on this?

I saw the pull request #127 fix for this issue. But author have not merged, I don't why??


Improve dashboard view, error table section

From feedback, separation between OSMCHA and attributes is confusing. Users were not sure what to do with each, plus there are some improvements to the table functionality that may help.
Biggest point of feedback is the separation between the two tables and the need to integrate to make the error table easier to use and understand.
Idea: combine the two error feeds, add design changes like filtering/sorting based on error type
Other feedback:

Add date/time and maybe user to know when and who
Add type of feature if there are more than one feature being monitored in the campaign
Sort list by date/time so newer items are listed at the top
Add Open in iD or JOSM functionality. Related to #301.

Idea: combine the two error feeds, add design changes like filtering/sorting based on error type

@smit1678 , I don't think we can combine both of them. One of them is single page request to https://osmcha.mapbox.com, and the other is from overpass. So for the osmcha error, when you click next it will request to osmcha, but for the attribute completeness the pagination is handled in the front end.

@dimasciput What are the ways that we could change the way we're handling pagination? Can we rethink how we're managing both OSMCHA and Overpass data? Having two tables side by side is a significant usability issue.

@smit1678 but they have different id, one of them is from https://osmcha.mapbox.com and the other is from http://www.openstreetmap.org. We can display one table at a time, and add something like checkbox. Or maybe just remove one of the table.

hi @smit1678
both page is really different and as dimas said that the osmcha using pagination.
And also the big different between osmcha and overpass is osmcha error is from changesets, not looking on feature, so if we combine, the content will be mixed and making confuse to user.
osm -> feature completeness
osmcha -> changeset suspicious error
My purpose is still distinct it but making tab to change table, between feature completeness and changeset suspicious error

Hi @smit1678 and @dimasciput, I think there has been one major shift during the past few weeks that puts a new spin onto this discussion. This is the fact that we are now filtering the OSMCha error sets by BB size. This means that where we used to get several hundred pages of OSMCha errors, we now only get a few. This means we could move from a paginated view to a complete view of the OSMCha errors. This would make a combined view at least technically feasible. This means that the only challenge we have is how to meaningfully combine this data into one UI element. Perhaps we should also include @MariaSolovyeva into the discussion.

@dimasciput, I saw your PR, could you perhaps elaborate on how you combined these and specifically, how you sorted the various errors...

@dimasciput and @MariaSolovyeva, let's move the comments from the PR to here.

Hello  @dimasciput and @cchristelis  , what you think of this variant, where the errors counters can work like tabs to select the errors on the table

@dimasciput, just putting @PaulUithol's comment from the PR here:

Are we generating those messages? Some could be clearer. E.g. Error: capacity not found to Error: key "capacity" not present, and don't get what ceramic to pottery is the accepted tag would mean? ~ sent from mobile


Change the message timestamp type from time.Time to int64.

This will reduce the message size by a few bytes.
Makes serialize/deserialize a bit easier.
Gives a small performance increase on high throughput scenarios.

Coverage increased (+0.05%) to 71.522% when pulling 7534e358263f110f99dac51cc9e0a1dbe05536cf on perf/message-timestamp into 5dee093f1b08d6c367a4b20b48071fa7f48c8dca on master.


On boarding status bar

I think we used to hide the status bar when the on boarding component is rendered. Like the full music player. Do we still want that? It's currently not hiding the status bar.

Yeah I say let's go back to removing it for onboarding.

Fixed by #789


Allow Traffic to Be Routed Through VPN

We had discussed this some time ago but my beautifier wreaked havoc on the repository so I didn't want to open a PR. With the new version I started fresh and figured this may be worthwhile to others. The idea here is that the original port works as normal but the new input allows you to define a different external port that will be used for Plex. In practice, I route all of cabernet's traffic through a VPN prior to it connecting to various plugins and internally I need to use the port my VPN container uses for me to access. By default, I made the port number the same as normal so it would not affect users not using a VPN.

I'll take a look

Are you able to connected to Plex when running cabernet through a VPN?

I use a docker image called gluetun which lets me route other docker containers through it using a vpn provider of my choosing. You can choose a port on gluetun to connect to as needed. My changes allowed me to achieve this as needed to be able to route my entire connection through a vpn to view some channels that require it. I need to update again as I have slightly diverged from the most recent updates. If there is interest I can update my PR and try again.

I run cabernet through a docker that runs through a VPN. My issue is that Plex sees the tuner and gets the epg data but won't play anything even though I'm able to play things through VLC.

I'm not sure exactly what the issue is but I plan to update the vpn fork to the latest version today or later this week as I have some plugins that need updating as well. If you need help with your setup you can message me on discord (un: .r00tus3r) and I can try to assist.

I'm not sure exactly what the issue is but I plan to update the vpn fork to the latest version today or later this week as I have some plugins that need updating as well. If you need help with your setup you can message me on discord (un: .r00tus3r) and I can try to assist.

I appreciate it. I'll take sometime this today and tomorrow to try your setup, I'll shoot you a message when I do.

Sorry to hijack this thread: I use a docker image, which contains OpenVPN and privoxy. As mentioned by you, it lets me route traffic through it using a vpn provider.
Is it possible to extend your feature in a way, that several instances of pluto.tv are running, each of them accessing the web through different port resp. different VPNs?

Sorry to hijack this thread: I use a docker image, which contains OpenVPN and privoxy. As mentioned by you, it lets me route traffic through it using a vpn provider. Is it possible to extend your feature in a way, that several instances of pluto.tv are running, each of them accessing the web through different ports resp. different VPNs?

I feel like that is more dependent upon what container service you use to route to each VPN. I use gluetun, I'm not sure if it let's you use multiple VPNs at the same time. Nothing is stopping you from having a separate docker container for each though.

Nothing is stopping you from having a separate docker container for each though.

I have got separate docker container for each vpn connection. But how do I tell cabernet/pluto.tv to route Internet traffic through a specific VPN container? I have been searching for a parameter like --http-proxy <IP_ADDRESS>:9973 (or whatever port the actual VPN uses).

Nothing is stopping you from having a separate docker container for each though.

I have got separate docker container for each vpn connection. But how do I tell cabernet/pluto.tv to route Internet traffic through a specific VPN container? I have been searching for a parameter like --http-proxy <IP_ADDRESS>:9973 (or whatever port the actual VPN uses).

Ahh I see what you mean. The easiest option is one Cabernet and VPN container pair per route you want. What I setup won't natively do what you're trying to achieve. You'd have to fork and make some modifications if you wanted it all in one. It's been awhile since I've looked at the code, I don't think that would be easy to achieve.

Nothing is stopping you from having a separate docker container for each though.

I have got separate docker container for each vpn connection. But how do I tell cabernet/pluto.tv to route Internet traffic through a specific VPN container? I have been searching for a parameter like --http-proxy <IP_ADDRESS>:9973 (or whatever port the actual VPN uses).

Ahh I see what you mean. The easiest option is one Cabernet and VPN container pair per route you want. What I setup won't natively do what you're trying to achieve. You'd have to fork and make some modifications if you wanted it all in one. It's been awhile since I've looked at the code, I don't think that would be easy to achieve.

I guess the big question here is why are you trying to do this? It doesn't seem like the best setup tbh.

Ahh I see what you mean. The easiest option is one Cabernet and VPN container pair per route you want.

Well, I could run Cabernet and VPN in one and the same container, running several container for different regions. But I would like to avoid this setup, as I would have to modify my self-build image every time something changes within cabernet.

I guess the big question here is why are you trying to do this? I
I would like to receive pluto.tv from different countries; in our special case I want to watch german-speaking channels, whereas my wife wants to watch the spanish-speaking ones. The whole thing ideally in conjunction with TvHeadend. If I were only interested in the program offered in a specific region, it would be easier to use the pvr module for pluto integrated into Kodi.

Per the requests python library, you can add a proxy with the following environment variables.
$ export HTTP_PROXY="http://<IP_ADDRESS>:3128"
$ export HTTPS_PROXY="http://<IP_ADDRESS>:1080"
$ export ALL_PROXY="socks5://<IP_ADDRESS>:3434"
https://requests.readthedocs.io/en/latest/user/advanced/#proxies


An error about import

Hi, dwgoon. I'm grateful to your project. However, after installation, I get an error like this
"
Traceback (most recent call last):
File "", line 1, in
File "/pubdata/linkaiqing/python_package/jpegio-master/jpegio/init.py", line 6, in
from .componentinfo import ComponentInfo
ModuleNotFoundError: No module named 'jpegio.componentinfo'
"
Please add "import cython" to "init.py", and "jpegio" is really a  good tool.

Could you please let me know the directory path you have executed the source code?
You can encounter this kind of error if you execute your sources in the directory of JPEG repo.

Of course. "/home/linkaiqing/code/SI_Steg/train.py" is my source code. “/pubdata/linkaiqing/python_package/jpegio-master” is the jpegio code. After installing the JPEG repo, I run this code in my anaconda environment in "/home/linkaiqing/anaconda3/envs/pytorch". Thanks for your help again, I'm really sorry because of my late reply.

Of course.

"/home/linkaiqing/code/SI_Steg/train.py" is my source code.

“/pubdata/linkaiqing/python_package/jpegio-master” is the jpegio code.

After installing the JPEG repo, I run this code in my anaconda environment in "/home/linkaiqing/anaconda3/envs/pytorch".

Thanks for your help again, I'm really sorry because of my late reply.

How did you install jpegio?
I recommend compiling and installing directly from this repository.

I execute the command "python setup.py install" like your README.md. Now I can use the repository successfully, thank you!

@KQL11 Good job! :)


Chatwoot user identification

Features:

Fix Chatwoot injection script
Send username, userId, and org name to Chatwoot for better user tracking
Chatwoot darkmode
Implement Winow extension type
Reset chatwoot session on logout (was recommended in their docs)

Fixes:

Remove config helper so it isn't accidentally used on the client. Config should be read from $session
Move gqlUrl and secure to config sub-property in Session
Linting

Task linked: CU-2fmg6hk Ensure that users are properly linked and populated in Chatwoot

Only thing pending is this, if we want to implement it
https://www.chatwoot.com/docs/product/channels/live-chat/sdk/identity-validation

Need to implement

HMAC identity verification
Investigate conversation vs. contact custom attributes

Setting conversation attributes via the SDK is not possible at the moment

Will create a PR for infra

Infra has been yeeted


Next-translate overriding custom middleware and query parameters

What version of this package are you using?
V2.4.4
What operating system, Node.js, and npm version?
Windows 11, node v18.6.0, npm v9.7.1
What happened?
I have encountered an issue with the Next-translate package where it overrides custom middleware and interferes with query parameters. Although Next-translate automatically reads the lang parameter, it is causing problems when trying to create custom middleware for handling redirects and rewriting URLs.
In my scenario, I need to redirect /en/example-page to /example-page and rewrite the content with /en/example-page. To achieve this, I have added the following code in my custom middleware:request.nextUrl.searchParams.set("lang", defaultLocale); followed by return NextResponse.rewrite(request.nextUrl);  However, Next-translate overrides this logic and when I navigate to /example-page, the lang parameter I set is omitted and it becomes params:{lang: example-page}. If I remove the Next-translate wrapper, the parameters are correctly passed to the page, params:{lang:en}.
I would appreciate any guidance on the documentation regarding creating custom middleware or if there is a way to disable the part of the Next-translate package that overrides the query parameter. It would be helpful to have more information on how to work around this issue.
Attached below is the middleware logic for reference. Please note the last if block where I am rewriting the page if the valid locale cannot be found from the path."
function middleware(request: NextRequest) {
  const pathname = request.nextUrl.pathname;
  const originalPath = new URL(request.url).pathname;
  const currentLocale = getLocale(originalPath);

  // Check if the default locale is in the pathname
  if (currentLocale === defaultLocale) {
    // we want to REMOVE the default locale from the pathname,
    // and later use a rewrite so that Next will still match
    // the correct code file as if there was a locale in the pathname
    const result = originalPath.replace(`/${defaultLocale}`, "");
    const newUrl = new URL(result, request.nextUrl.origin + "/");

    return NextResponse.redirect(newUrl);
  }

  const pathnameIsMissingValidLocale = !locales.find(
    (locale) => locale === currentLocale
  );

  if (pathnameIsMissingValidLocale) {
    const newUrl = new URL(
      `/${defaultLocale}${pathname}`,
      request.nextUrl.origin
    );

    request.nextUrl.href = newUrl.href;
    request.nextUrl.pathname = newUrl.pathname;
    request.nextUrl.searchParams.set("lang", defaultLocale);
    newUrl.searchParams.set("lang", defaultLocale);

    // rewrite it so next.js will render `/` as if it was `/pl`
    return NextResponse.rewrite(request.nextUrl);
  }
}

What did you expect to happen?
I expect my custom middleware's parameter setup to be preserved after rewriting the page.
Are you willing to submit a pull request to fix this bug?
I might if it's not very complicated

I think is related with the breaking change from Next.js >= 13.2, we explained in the 2.3 release notes: https://github.com/aralroca/next-translate/releases/tag/2.3.0 we proposed a solution without the middleware meanwhile this is not fixed in the Next.js repo. The Next.js issue is this one: https://github.com/vercel/next.js/issues/49883

I'm not entirely sure if this issue is specifically related to next-translate because the official example of Next13 with appdir i18n routing appears to correctly rewrite or redirect params in the latest Next.js version (https://github.com/vercel/next.js/blob/canary/examples/app-dir-i18n-routing/middleware.ts). It's possible that the issue arises from having the next-translate-plugin defined inside next-config.js. @aralroca, I can confirm that rewriting and redirecting work if the next-translate-plugin is removed from next.config.js.

The problem comes using i18n inside next.config.js: https://github.com/vercel/next.js/blob/07591042870766a6d846263e28d3a9400a5bd3e6/examples/app-dir-i18n-routing/next.config.js#L8
Our plugin is adding the i18n routing. The idea is to keep this to allow partial migrate from pages to app router. But looks that this i18n config of Next.js is breaking the middleware with app router...

I'm going to close this issue because is out of the scope of our library. This should be fixed after Next.js fixes this issue: https://github.com/vercel/next.js/issues/49883


Update to 18.06.0-ce (GA), deprecate Edge releases

See https://blog.docker.com/2018/07/extending-support-cycle-docker-community-edition/ and https://docs.docker.com/install/ for more information.

Docker 18.06 CE will be the last release with a 4-month maintenance lifecycle.
The planned Docker 18.09 CE release will be supported for 7 months with Docker 19.03 CE being the next release in line.

We do not plan to consume the new nightly builds here because the update frequency will be too high.
FYI @thaJeztah :heart:

$ ./generate-stackbrew-library.sh
# this file is generated via https://github.com/docker-library/docker/blob/595ad0c92090937dcb7c200900fb97e36d36c412/generate-stackbrew-library.sh

Maintainers: Tianon Gravi<EMAIL_ADDRESS>(@tianon),
             Joseph Ferguson<EMAIL_ADDRESS>(@yosifkit)
GitRepo: https://github.com/docker-library/docker.git

Tags: 18.06.0-ce, 18.06.0, 18.06, 18, stable, test, latest
Architectures: amd64, arm32v6, arm64v8, ppc64le, s390x
GitCommit: 595ad0c92090937dcb7c200900fb97e36d36c412
Directory: 18.06

Tags: 18.06.0-ce-dind, 18.06.0-dind, 18.06-dind, 18-dind, stable-dind, test-dind, dind
Architectures: amd64, arm32v6, arm64v8, ppc64le, s390x
GitCommit: 595ad0c92090937dcb7c200900fb97e36d36c412
Directory: 18.06/dind

Tags: 18.06.0-ce-git, 18.06.0-git, 18.06-git, 18-git, stable-git, test-git, git
Architectures: amd64, arm32v6, arm64v8, ppc64le, s390x
GitCommit: 595ad0c92090937dcb7c200900fb97e36d36c412
Directory: 18.06/git

$ ./update.sh
18.06: 18.06.0-ce (stable)

@thaJeztah I note that 18.06.0 is still pushed to https://download.docker.com/linux/static/edge/ -- should we still tag this release as docker:edge?

@tianon good catch; we're pushing to "edge", so that people that only subscribed to the "edge" channel wouldn't miss out on getting the stable releases (in other words; make sure that "edge" gets a release each month, and not skip the month that happens to be a stable release).
If we previously tagged those releases as "edge" as well; I'd say: yes, let's do it one more time to close the chapter.
(Hope I make sense  here 😅)

We do not plan to consume the new nightly builds here because the update frequency will be too high.

understandable; I'll check with the release team as well if they had plans to push automated nightly builds somewhere

Perfect sense, thanks :+1: