linkTokenConfiguration.token:  is invalid, it must contain an environment name.

Hi Plaid
i am trying to run tiny TinyQuickstartReactNative using this variables in the .env file
PLAID_CLIENT_ID=our_plaid_client_id*****
PLAID_SECRET=our_plaid_secret**
PLAID_ENV=DEV
PLAID_SANDBOX_REDIRECT_URI=https://cdn-testing.plaid.com/link/v2/stable/sandbox-oauth-a2a-react-native-redirect.html
PLAID_ANDROID_PACKAGE_NAME=com.tinyquickstartreactnative
however when i click in the "open link button" i am receiving this message error :
{"error": {"displayMessage": "linkTokenConfiguration.token:  is invalid, it must contain an environment name.", "errorCode": "6", "errorDisplayMessage": "linkTokenConfiguration.token:  is invalid, it must contain an environment name.", "errorJson": null, "errorMessage": "linkTokenConfiguration.token:  is invalid, it must contain an environment name.", "errorType": "creation error", "metadata": {"institution": null, "linkSessionId": null, "metadataJson": null, "requestId": null, "status": null}}}

It sounds like the app's backend call to /link/token/create might have failed -- can you verify that you successfully created a link token? You should be able to check your logs at https://dashboard.plaid.com/developers/logs. If the call failed, an error code for the failure should be in the logs.

I view on the logs but not see any call there. Also here you can see my server.js file where i am setting my env variables. It seems that is not taking thos env
/*
server.js – Configures the Plaid client and uses Express to defines routes that call Plaid endpoints in the Sandbox environment. Utilizes the official Plaid node.js client library to make calls to the Plaid API.
*/
import dotenv from 'dotenv';
require('dotenv').config();
import express from 'express';
import {urlencoded, json} from 'body-parser';
import session from 'express-session';
import {Configuration, PlaidApi, PlaidEnvironments} from 'plaid';
import {
PLAID_ENV,
PLAID_CLIENT_ID,
PLAID_SECRET,
PLAID_ANDROID_PACKAGE_NAME,
PLAID_SANDBOX_REDIRECT_URI,
} from 'react-native-dotenv';
dotenv.config();
const {
PLAID_ENV,
PLAID_CLIENT_ID,
PLAID_SECRET,
PLAID_ANDROID_PACKAGE_NAME,
PLAID_SANDBOX_REDIRECT_URI,
} = process.env;
const app = express();
const port = 8080;
console.log(PLAID_ENV);
app.use(
// FOR DEMO PURPOSES ONLY
// Use an actual secret key in production
session({secret: 'bosco', saveUninitialized: true, resave: true}),
);
app.use(urlencoded({extended: false}));
app.use(json());
// Configuration for the Plaid client
const config = new Configuration({
basePath: PlaidEnvironments[PLAID_ENV],
baseOptions: {
headers: {
'PLAID-CLIENT-ID': PLAID_CLIENT_ID,
'PLAID-SECRET': PLAID_SECRET,
'Plaid-Version': '2020-09-14',
},
},
});
//Instantiate the Plaid client with the configuration
const client = new PlaidApi(config);
//Creates a Link token and return it
app.post('/api/create_link_token', async (req, res, next) => {
let payload = {};
//Payload if running iOS
if (req.body.address === 'localhost') {
console.log(PLAID_ENV);
payload = {
user: {client_user_id: req.sessionID},
client_name: 'Plaid Tiny Quickstart - React Native',
language: 'en',
products: ['auth'],
country_codes: ['US'],
redirect_uri: PLAID_SANDBOX_REDIRECT_URI,
};
} else {
console.log(PLAID_ENV);
//Payload if running Android
payload = {
user: {client_user_id: req.sessionID},
client_name: 'Plaid Tiny Quickstart - React Native',
language: 'en',
products: ['auth'],
country_codes: ['US'],
android_package_name: PLAID_ANDROID_PACKAGE_NAME,
};
}
const tokenResponse = await client.linkTokenCreate(payload);
res.json(tokenResponse.data);
});
// Exchanges the public token from Plaid Link for an access token
app.post('/api/exchange_public_token', async (req, res, next) => {
const exchangeResponse = await client.itemPublicTokenExchange({
public_token: req.body.public_token,
});
// FOR DEMO PURPOSES ONLY
// Store access_token in DB instead of session storage
req.session.access_token = exchangeResponse.data.access_token;
res.json(true);
});
// Fetches balance data using the Node client library for Plaid
app.post('/api/balance', async (req, res, next) => {
const access_token = req.session.access_token;
const balanceResponse = await client.accountsBalanceGet({access_token});
res.json({
Balance: balanceResponse.data,
});
});
app.listen(port, () => {
console.log(Backend server is running on port ${port}...);
console.log(PLAID_ENV);
});

I am getting this error when trying to call create_link_token

error catch create_link_token
LOG  [SyntaxError: JSON Parse error: Unexpected character: <]

Running into the same issue

@dfvalenciaviamericas @RevanthGundala did you ever figure this out??

Also, make sure the .env.example file is renamed to .env.
I'm going to close this out since it's a bit old -- if anyone else is seeing the same issue, please re-open a new issue.


robots.txt: Allow Googlebot access to JavaScript, CSS and images

https://developers.google.com/webmasters/mobile-sites/mobile-seo/common-mistakes/blocked-resources:

For optimal rendering and indexing, always allow Googlebot access to the JavaScript, CSS, and image files used by your website so that Googlebot can see your site like an average user. If your site’s robots.txt file disallows crawling of these assets, it directly harms how well our algorithms render and index your content. This can result in suboptimal rankings.

Thanks for your contribution, I agree with you that bb-themes should be removed from robots.txt file, however there is no need to remove bb-uploads as it does not contain any assets. Could you open new pull request with only bb-themes removed?


Use standard datepicker

Added functionality to allow developers to choose between the standard Material DatePicker or a custom datepicker.
Without this, PlutoGrid will always use the build in date picker that does not handle localization.
Before:

After:

Example of usage:
                    child: PlutoGrid(
                        columns: controller.createTableColumns(),
                        rows: rows,
                        selectDateCallback: (PlutoCell cell, PlutoColumn column) async {
                          return showDatePicker(
                              context: context,
                              initialDate: PlutoDateTimeHelper.parseOrNullWithFormat(
                                    cell.value,
                                    column.type.date.format,
                                  ) ??
                                  DateTime.now(),
                              firstDate: startDate,
                              lastDate: DateTime.now());
                        }
                        ),

Please create this in pluto_grid_plus this repo is dead
https://github.com/doonfrs/pluto_grid_plus


bosh ssh docs have a bad example

bosh redis ssh ls -R should be bosh ssh redis ls -R

pretty sure it's been fixed. closing.


Run build_ext in build_python step

This might help with the issue seen here:
https://grpc-testing.appspot.com/job/gRPC_master/15549/config=opt,language=python,platform=macos/testReport/junit/(root)/tests/py_test__not_found_test_NotFoundTest/
ImportError: dlopen(/jenkins/workspace/gRPC_master/config/opt/language/python/platform/macos/src/python/grpcio/grpc/_cython/cygrpc.so, 2): no suitable image found.  Did find:
	/jenkins/workspace/gRPC_master/config/opt/language/python/platform/macos/src/python/grpcio/grpc/_cython/cygrpc.so: truncated fat file.  file length=2461696, but needed slice goes to 2629760

Looks good to me.
*waits for tests*

_beta_features_test.BetaFeaturesTest timeout is a known flake.


Cannot point cocoapods pod to the forked repository

Environment details
QMServices latest version
Expected behavior
Should be able to fork and point the pod in podfile to the forked repository.
pod 'QMServices’, :git => 'https://github.com/username/q-municate-services-ios.git'
Actual behavior
After forking and pointing the pod to the forked repository, it produces the following error
[!] Unable to find a specification for 'QMServices'.
Steps to reproduce the behavior
1- For a repository
2- Point the pod to forked repository

@icarasiaofficial , Hello.
You should modify your podfile with:
pod 'QMServicesDevelopment', :git => 'https://github.com/*username*/q-municate-services-ios.git'

This issue has been solved.


Add moderation to review hook

Add functionality to the review hook, which was a placeholder before. It uploads certain appstream keys to the new moderation backend (see https://github.com/flathub/website/pull/1405) and marks the job as needing review if necessary. In the future the review hook will also contain the validation scripts that are currently in buildbot.

Superseded by #13


feat(nfts): upgrade TrailblazersBadges Contract and Integrate with BasedOrBoosted

Overview
This PR includes significant updates to the TrailblazersBadges contract to make it upgradeable using OpenZeppelin's upgradeable contracts library. Additionally, it integrates the BasedOrBoosted contract to provide dynamic metadata based on the user's movement status.
Changes Summary
1. Migration to ERC721 Standard:
Updated TrailblazersBadges to use the ERC721 standard instead of ERC1155.
2. Upgradeable Contract Implementation:
Implemented upgradeable pattern using OpenZeppelin's ERC721Upgradeable, OwnableUpgradeable, and Initializable contracts.
Modified the constructor to an initializer function.
3.Integration with BasedOrBoosted Contract:
Added functionality to TrailblazersBadges to fetch and use movement status (neutral, based, boosted) from the BasedOrBoosted contract.
Adjusted the tokenURI function to return different URIs based on the movement status.
4. Curly Bracket Imports:
Modified imports to use curly bracket style where applicable.

Tests are failing

Do we still want to merge this PR, if not, please close it.

@2manslkh this PR is taking very long. Will you get it ready or closed?


Discriminated Union with callable discriminator is invalidly serialized

Initial Checks

[X] I confirm that I'm using Pydantic V2

Description
I'm using Pydantic with Django models (and FastAPI). I have a use case where I have a DJango model that has a couple of GenericForeignKeys to other models, and I'm using Discriminated Unions to detect the correct schema to use when serializing these objects.
With Pydantic 2.8.2, this works perfectly, but after updating to 2.9.1 things broke down. What happens is that the union field's value is returned as a string, almost as if repr() was called on it. Maybe there's an internal serializer that's called twice?
I re-read the documentation about the feature, and at a quick glance didn't spot any functionality changes. I also checked the changelog, and one of these PRs might have introduced something causing this:
https://github.com/pydantic/pydantic-core/pull/1397
https://github.com/pydantic/pydantic-core/pull/1398
I've tested 2.9.0 and its beta versions through to the just released 2.9.2. 2.8.2 is the last version where this works.
Example Code
import typing as t

import pydantic
from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.contenttypes.models import ContentType
from django.db import models

class GenericModel(models.Model):
    target_content_type = models.ForeignKey(ContentType, ...)
    target_object_id = models.IntegerField()
    target = GenericForeignKey(ct_field='target_content_type', fk_field='target_object_id')

class FirstTarget(models.Model):
    name = models.CharField(max_length=255)

class SecondTarget(models.Model):
    something = models.IntegerField()

ModelSchemaMapping = dict[
    t.Type[models.Model],
    t.Type[pydantic.BaseModel]
]

def get_generic_fk_schema(mapping: ModelSchemaMapping):
    fallback_tag = 'Other'

    def discriminator_func(v):
        if isinstance(v, tuple(mapping.keys())):
            # This returns the Django model name, like 'FirstTarget'
            return v._meta.object_name
        return fallback_tag

    valid_choices = [
        t.Annotated[
            schema,
            pydantic.Tag(model._meta.object_name)
        ]
        for model, schema in mapping.items()
    ]

    return t.Annotated[
        t.Union[
            *valid_choices,
            # Fallback that only returns the model's primary key as the union value.
            # Basically this shouldn't happen if I've defined my mappings correctly.
            t.Annotated[
                int,
                pydantic.BeforeValidator(lambda obj: obj.pk),
                pydantic.Tag(fallback_tag)
            ]
        ],
        pydantic.Discriminator(discriminator_func)
    ]

class DjangoSchema(pydantic.BaseModel):
    model_config = pydantic.ConfigDict(
        from_attributes=True,
        arbitrary_types_allowed=True
    )

class FirstSchema(DjangoSchema):
    id: int
    name: str

class SecondSchema(DjangoSchema):
    id: int
    something: int

class GenericSchema(DjangoSchema):
    id: int
    target: get_generic_fk_schema({
        FirstTarget: FirstSchema,
        SecondTarget: SecondSchema
    })

first_obj = FirstTarget.objects.create(name='foobar')
generic_obj = GenericModel.objects.create(
    target_content_type=ContentType.objects.get_for_model(FirstTarget),
    target_object_id=first_obj.pk
)

schema = GenericSchema(target=generic_obj.target)  # target == first_obj
schema.model_dump()

# Expected result
{'id': 1, 'target': {'id': 1, 'name': 'foobar'}}

# Actual result
{'id': 1, 'target': "id=1 name=foobar"}

Python, Pydantic & OS Version
pydantic version: 2.9.1
        pydantic-core version: 2.23.3
          pydantic-core build: profile=release pgo=false
                 install path: /home/atte/Projects/some-project-name/.venv/lib/python3.11/site-packages/pydantic
               python version: 3.11.8 (main, Feb 12 2024, 14:50:05) [GCC 13.2.1 20230801]
                     platform: Linux-6.8.7-arch1-1-x86_64-with-glibc2.39
             related packages: typing_extensions-4.12.2 fastapi-0.109.2 pydantic-extra-types-2.9.0 pydantic-settings-2.5.2
                       commit: unknown

I come from a Django/DRF background, and there's definitely been some learning curve in trying Pydantic out when compared to DRF's serializers. If there's some other way to do this, I'll gladly refactor my code, but until then, I've been forced to pin to pydantic==2.8.2.

Hey @attevaltojarvi,
Thanks for your question - happy to look into this. Could you try to reduce this down to a purely pydantic reproduction? Thanks!

I don't think it's possible, since the whole point of this is me being able to serialize arbitrary class instances, which should be possible with from_attributes=True. I think this setup should match what the old V1 orm_mode setting did? Shouldn't that style still be OK?
If you feel that you can't test this, I can create a minimal reproduction repo you could clone and run. What I can confirm is that this happens both when run through a FastAPI instance, as well as just opening up a Python shell, importing the relevant classes, instantiating the Pydantic model manually, and calling .model_dump(). The nested object is dumped as a string representation of the model schema, and not a dictionary as it should.

Perhaps you could just use arbitrary classes, but not inherit from django models for the repro?

Sure, I can do that tomorrow 👍

@sydney-runkle I tested this using plain Python classes:
import typing as t
import pydantic

def get_generic_fk_schema(mapping: dict):
    fallback_tag = 'Other'

    def discriminator_func(v):
        if isinstance(v, tuple(mapping.keys())):
            return v.__class__.__name__
        return fallback_tag

    valid_choices = [
        t.Annotated[
            schema,
            pydantic.Tag(klass.__name__)
        ]
        for klass, schema in mapping.items()
    ]

    return t.Annotated[
        t.Union[
            *valid_choices,
            t.Annotated[
                int,
                pydantic.BeforeValidator(lambda obj: obj.id),
                pydantic.Tag(fallback_tag)
            ]
        ],
        pydantic.Discriminator(discriminator_func)
    ]

class Target:
    def __init__(self, pk, name):
        self.id = pk
        self.name = name

class Model:
    def __init__(self, pk, target):
        self.id = pk
        self.target = target

class TargetSchema(pydantic.BaseModel):
    model_config = pydantic.ConfigDict(from_attributes=True, arbitrary_types_allowed=True)

    id: int
    name: str

class Schema(pydantic.BaseModel):
    model_config = pydantic.ConfigDict(from_attributes=True, arbitrary_types_allowed=True)

    id: int
    target: get_generic_fk_schema({
        Target: TargetSchema
    })

target = Target(1, 'foobar')
model = Model(1, target)

s = Schema(id=model.id, target=target)
s.model_dump()

>>> {'id': 1, 'target': {'id': 1, 'name': 'foobar'}}

So I guess the problem lies somewhere in how Pydantic treats a Django model. Surely, there's a lot of magic happening in those models, but I'd guess the it'd still be a simple getattr(obj, field_name) lookup to get the nested target out of the main instance.
Looking at the original example code, the actual union part of this process seems to work correctly, since the correct schema is selected for the target. It's just been serialized wrong. If the union wouldn't work, the code would default to the fed object's pk attribute and return that.

Hmph, wasn't able to find the issue the issue (not super easy to repro with django). I do think this was probably caused by the union serializer changes, but seems like a pretty specific use case, so I don't think fixing this is going to be high priority for now.
Happy to consider PRs / contributions with a fix!

Unfortunately I don't have any experience on Rust, so it's a bit tough to whip up a PR. It's probably either one of those PRs, or a combination, causing this.
I understand that this might seem like a really out-there use case, but surely I cannot be the only person in the world using these two packages together. Pydantic is a pretty-much de facto solution for parsing objects, and used by FastAPI which feels like the next big thing in the Python API space. This is actually our use case as well: we've been researching for possibilities on how to move on from DRF, which currently doesn't (and probably won't) support async views.

I'll try to investigate if there's an easy workaround in the meantime. Thanks for looking into this!

OK so I went through the PRs that were merged to pydantic-core between 2.21.0 and 2.22.0, and it is indeed the tagged union serializer changes that makes this happen - the previous merged PR worked fine.
I tested this a bit by doing
def log(v, handler):
    print(handler)
    return handler(v)

class GenericSchema(DjangoSchema):
    id: int
    target: t.Annotated[get_generic_fk_schema({
        FirstTarget: FirstSchema,
        SecondTarget: SecondSchema
    }), pydantic.WrapValidator(log)]

and the Rust printouts were identical with the last working version and the first failing one.
Is there anything more that I could do to help you to get to the bottom of this?

@attevaltojarvi,
Thanks for confirming the source of the issue. I'll try to track this down this weekend and see what I come up with.


Simple support for using large or unbounded sets of textures over time

This PR fixes two issues when loading a large number of textures over time. For example, our use case is browsing massive image stacks of microscopy data, so while the size of textures in use at any given time is reasonable, a browsing session over several hours may cover dozens of GB of image data.

The ImageLoader for each texture is retained, which can accumulate memory and crash the browser.
The default texture caching strategy is cumulative, which while appropriate for games with a known, in-memory limit on the total number of textures required, does not fit our use case. Again this results in an OOM browser crash.

The current implementation solving 2, creating a LRU cache manager wrapping BaseTextureCache, is a bit rough, but I wanted to gauge interest in merging before cleaning it up since it meets our needs as is.

Interesting changes, sounds like you are not destroying the base textures when you are done with them though (which removes them from the cache).
https://github.com/GoodBoyDigital/pixi.js/blob/v2.x/src/pixi/textures/BaseTexture.js#L166
You will want to do myTexture.destroy(true); so the base texture is destroyed as well and both are cleaned out of the cache.
I like the .once() update, but I'm not conviced the LRU is the way to do this. Or more importantly that it seems out of Pixi's scope.
(P.S. you should upgrade to v3, it is easy and many app even "just work" and warn you on what to change).

Right, the textures are not destroyed because they may be quickly needed again if the user browses back over that part of the image stack (i.e., which textures will be reused has some locality but is not predictable), hence the need for a caching manager. But I agree it's probably outside of Pixi's scope, and it's easy to hack this into Pixi for those who do need it.
Should I close this PR and open one with just the ImageLoader fix?
We've been very happy with Pixi and will definitely upgrade to v3 in a future relase. Thanks for the great software.

Hey guys - this all looks quite interesting. My two pence.. this could make a nice module / plugin for pixi?


[Azure Monitor Management]  Missing required parameters on operation "AlertRules_CreateOrUpdate"

As per the documentation https://msdn.microsoft.com/en-us/library/azure/dn933805.aspx operation of CreateOrUpdate also requires following parameters:
condition
actions
but they are not marked as "required" in the swagger definition at arm-insights/2016-03-01/swagger/insightsManagementClient_AlertRules.json#L19
@gucalder Could you please validate this?

@gucalder Could you please verify?

Actions is not required. It is possible to have an alert rule without actions.
Condition is required. I am fixing this in the monitor folder as we intend to deprecate the insights folder at some point in time.

BTW: The referred documentation is the previous version, not the version auto generated from the spec. That documentation was manually created, it will probably have some bugs like the one in "required Actions."

@kirthik can you close this since it is being fixed in the new folder?

@gucalder and @johnkemnetz : please link this bug in the commit id. That should automatically close the bug when commit is merged. If it is already merged, please provide it here, I will close the bug then.

Actions is actually a very special case. I'll need to walk through the code with the devs to mark this as required.
I am marking only condition for the moment, and then I'll review actions later. In some cases calls with Actions = null work as we are doing in our PowerShell cmdlets.


InstructorDocumentEmbedder is breaking

Hi, I am trying to load InstructorDocumentEmbedder:
doc_embedder = InstructorDocumentEmbedder(
model="intfloat/multilingual-e5-large-instruct",
instruction=doc_embedding_instruction,
batch_size=32
)
but on sentence-transformers 2.7.0  getting this error,
TypeError: INSTRUCTOR._load_sbert_model() got an unexpected keyword argument 'token'
tried reverting it back to sentence-transformers 2.2.2 but then getting another error, .cache/torch/sentence_transformers/intfloat_multilingual-e5-large-instruct/sentence_xlnet_config.json'
Please let me know if there's other way around to make it running or alternative to run instruct base embeddings. Much appreciated.
Describe your environment (please complete the following information):

OS: ubuntu 22.04
Haystack version: haystack-ai==2.0.1
Integration version: instructor-embedders-haystack==0.4.0

Hey!
You should use https://docs.haystack.deepset.ai/docs/sentencetransformersdocumentembedder. It's well documented.
This integration focuses instead on INSTRUCTOR embedding models: https://haystack.deepset.ai/integrations/instructor-embedder

ok, should i use for e5-instruct in this approach?
doc_embedder = SentenceTransformersDocumentEmbedder(model="intfloat/multilingual-e5-large-instruct",
prefix=TASK_SPECIFIC_INSTRUCTION)
I saw instruct embedding integration, so got confused if I should use that one instead.

I'm closing the issue.
Feel free to open another issue for bugs or a discussion at https://github.com/deepset-ai/haystack/discussions.


Change JSDoc @typedef to not apply to following expression

Suggestion

🔍 Search Terms
✅ Viability Checklist
My suggestion meets these guidelines:

[x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
[x] This wouldn't change the runtime behavior of existing JavaScript code
[x] This could be implemented without emitting different JS based on the types of the expressions
[x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
[x] This feature would agree with the rest of TypeScript's Design Goals.

⭐ Suggestion
Change JSDoc @typedef to not apply to following expression
📃 Motivating Example
Using @typedef like interface is great for JS files. But if any expression comes after it, TypeScript tries to apply that typedef to that expression. This means we have to make sure to put it at the end of a file and make sure nothing comes after it. Not ideal.
💻 Use Cases
See above.

@sandersn plausibility check?

I don't understand this, can you make a full example?

@typedef is usually supposed to be independent of the following statement, except for grabbing its name if you leave it off. It definitely should not apply the defined type to the following expression.
Any example I can think of is a bug, so please do post any you find.


2 short memos

Added a memo on converting to cosmological units and a memo on how the cross phase term is calculated in FHD calibration for fully polarized calibration

Can you add these to the list in the readme (with links)?


ns countries not shown in DataBrowser

Data for ns countries is not shown in the Data Browser.
I see that the content is pushed to the publication.js document, in the ns_country_classes element.
I'm pretty sure this element is ignored by DataBrowser.
But, maybe DataBrowser doesn't have to know about classes and ns_country_classes.  Maybe we just combine them both into one classes array, and that goes into units.

@IanMayo, I pulled the latest changes and checked. I was not able to replicate this issue in develop or 150_class_across_multiple_files branches.

I get the above issue when I run python -m legacyman_parser.parser data on develop.
Issue #173 is the main priority right now, but this issue could be due to one unit being used for two countries.

this issue could be due to one unit being used for two countries

Yep, that's indeed the reason. In the mock data, Britain is referenced as a non-standard country as well from Europe region. I was not able to replicate this issue since the href in Europe was invalid due to case-sensitivity issues.
Should we expect this kind of data in real environment, where a country is there as a non-standard country as well in a region?
On a different aspect, should we further strengthen that assert to check for case-insensitive matches?

Could we extend the test to include improved diagnostics, such as listing where the class is referenced from?
I don't know the answer to how we deal with the real data - I'm going to have to do some inspection of the data, and maybe discussion(s) with the stakeholders.

Okay. That assert is going to help us decide whether we can stick with regeneratable unique ids to be used as bookmarks in DataBrowser instead of integers being used now.

Yes, persistent IDs will be good, so favourites remain valid.

Could we extend the test to include improved diagnostics, such as listing where the class is referenced from?

Let me try. I'll make this diagnostic as part of the assert itself.

We'll see if this is a valid scenario in real data, i.e. same country being referenced from different locations, or same country having two similarly named units in the same sub-category, and we'll take a call on either muting this assert or changing the data.


How can i get the exact x and y coordinates of a text entity

What exactly do you need?
Text entity at the end is just a Bitmap, that has XY coordinates, as any rectangular.


Updating motion controller and gestures in Unity article

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

mixed-reality-docs/gestures-and-motion-controllers-in-unity.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Add caching

How do you cache a video that's downloaded over the network?

I am interested by this too :+1:

This might be a good solution: https://github.com/johanneslumpe/react-native-fs

Another approach would be to write downloaded assets to a temp directory and load them from there when available. I've only worked with the Obj C part of the native code, but this approach would work there (I assume it could work on the Java side as well).
Wouldn't it be better to think of this as an implementation detail of the native code and maintain the current API?

I'd be up for implementing this for iOS to start with. My initial proposal is that caching is disabled by default, but requested on a per-clip basis like so:
// Cache video locally (write to temp directory)
<Video source={{uri: "https://foo.com/clip1.mp4", cache: true}} ... />

// Don't cache video
<Video source={{uri: "https://foo.com/clip1.mp4"}} ... />

The cache option would be ignored for local files, since it's only relevant for files loaded over the network.
The native code would then first look for the asset on disk, loading it from there if found, or otherwise load it remotely as usual.
There are at least a couple of decisions that have to be made around this:

Setting the total maximum size (in MB) of the files cached by the library. This could be a fixed size (30MB?), perhaps with some configuration option to override the default max size on the React class?
When should the temp dir be cleared/deleted? Does it have to be cleaned out at all if the max size of the temp dir is reasonable? Or should the each instance of the component delete assets older than e.g. 10 minutes when it's initialized? This caching should probably be mostly ephemeral, e.g. for switching to full-screen mode or changing the UI hierarchy while conceptually maintaining the same underlying "player context".

Would be great to get some feedback on this. I'll probably start work on this soon at any rate, so the sooner the better.

Sounds like a good approach!

It would be nice to be able to configure how much to cache.
It would also be nice to configure a TTL on the cache, and the cache would get purged either when its full or when the TTL is met.

Not sure how I feel about this, but how about being able to configure the params like this?
// Use smart defaults (30MB cache size & purge in 10 minute )
<Video source={{uri: "https://foo.com/clip1.mp4", cache: true } ... />

// Configure cache to 50MB & purge in 1 hour
<Video source={{uri: "https://foo.com/clip1.mp4", cache: { size: 50, expiresIn: 3600 }} ... />

@jamesfzhang The thing with that approach is that these parameters should probably be set globally for the app. For example, if one writes something like this:
<View>
  <Video source={{uri: "https://foo.com/clip1.mp4", cache: { size: 50, expiresIn: 3600 }} ... />
  <Video source={{uri: "https://foo.com/clip1.mp4", cache: { size: 40, expiresIn: 4800 }} ... />
</View>

Which set of cache settings does one use? This could work fine if users are instructed to always use the same cache settings for the same clip/s, but it feels a bit hacky — I think it would be better to globally configure this somewhere so that it applies to all instances of Video, but I'm not sure what's the best way to go about that. Modifying the class directly?

I was under the impression that the configurations would be set per video, as opposed to global.
But I guess just using global configs would be fine too? Maybe you'd need to add a VideoConfiguration class?

They could be set per video, but it's not clear which settings should take precedence when there are several Video instances mounted using the same clip, which is OK (if we can assume that users stick to providing the same config via props to each instance) but not ideal. Otherwise there's no way to know e.g. whether https://foo.com/clip1.mp4 should be invalidated in 3600 seconds or 4800 seconds above.
Something like this would work (maybe not particularly pretty, but then again it only has to be written once):
// require this file instead of require('react-native-video') where Video is to be used
var Video = class extends (require('react-native-video').default) {
  cacheOptions() { return {size: 50, expiresIn: 3600} };
}
module.exports = Video;

Then the cache settings would be applied globally through the app, and only once.
Thoughts on this?

The second case (multiple configs) may be overkill to start with, we could just go for a single global configuration for starters.

A really easy solution is the one that @cancan101 mentioned, using react-native-fs, but yeah as @thsig mentioned there will huge issue with the usage of the disk space if we are just storing everything without an expire limit.
Otherwise I agree with @thsig , let's keep it simple first, nah?
Here is the code that is doing the thing to cache Image, but it is permanent storage, it is never removed :/
https://github.com/mohebifar/react-native-ximage/blob/master/src/Storage.js#L64-L66
One super easy solution to clean the cache is to make a function which check all cached video of the specific application/folder and which deletes the old videos.
Something like this:
module.exports.deleteCache = function (cacheKey, time) {
  const videos = readCache(cacheKey);
  videos.forEach((video) => {
    if (videoOld(video, time) {
      deleteVideo(video);
    }
  });
}

The function will be accessible for the developer and we don't have to care if he/she is going to use it.

Maybe it would be better to separate the caching implementation from react-native-video, but have an API for react-native-video to receive pre-loaded AVAsset-s (and the equivalent for Android) under the covers. It seems to me that this library should primarily concern itself with playback and offload other concerns to other libraries where possible.
What about something like this?
<Video
  source={{uri: "https://foo.com/clip1.mp4"}}
  cacheName='StevesCache' />

When receiving new sources, the native code would publish a notification to the channel named cacheName (e.g. via the NSNotificationCenter system in iOS, and the Java equivalent on Android), which would then be received by the StevesCache native module class.
The cache module implementation would then publish a message to the ReactNativeVideo channel, where the payload would be an array whose elements are either AVAsset* (or the Java equivalent) or null, depending on whether the requested URI was found by cache implementation's cache.
I'm suggesting an array, assuming that multiple-video playback will be added to the library at some point (whether my branch is merged or not, this is probably on the roadmap anyway), so that would pre-empt having to change the API later, possibly after other libraries start depending on it.
Then react-native-video would treat the cached assets as fully buffered and proceed from there, buffering non-cached assets as usual.
Thoughts, @brentvatne? We might need functionality like this soon, so I'd probably be up for writing the initial iOS implementation. I'm also very open to alternate implementation ideas.

I have a feeling there may be a better way – proxying requests to server. One could set himself as AVAssetResourceLoader and then check in his own cache if such video has been cached or else load from URL. This approach has been described:

http://leshkoapps.com/wordpress/audio-streaming-and-caching-in-ios-using-avassetresourceloader-and-avplayer/
http://vombat.tumblr.com/post/86294492874/caching-audio-streamed-using-avplayer

Based on uri we could initialize under the hood one cache for every custom protocol, eg.:
<Video
  source={{uri: "stevesCache://foo.com/clip1.mp4"}}
/>

...

<Video
  source={{uri: "globalCache://foo.com/clip1.mp4"}}
/>

Maybe we could use uri as stevesCache://https://foo.com… to be able to specify target request, I don't know how NSURL would handle such URL.
Customizing cache capacity would require calls to some kind of Cache.setCacheCapacity('stevesCache', 40 * 1024 * 1024)

Hi, all:
I want to know when to publish this function? It waste a lot of flow now.

Any updates here? @thsig, definitely think you should take over the repo :)

good point @getnashty! @thsig I have added you as a collaborator on this repo. let me know your npm username and I can give you npm publish access, brentvatne at gmail dot com

This hasn't been touched for a while, but since iOS natively supports offline caching now it's worth reviving: https://developer.apple.com/reference/avfoundation/avassetdownloadurlsession/1650938-makeassetdownloadtask
Video explaining the process. Starts at about 16:20: https://developer.apple.com/videos/play/wwdc2016/504/
Looks like this could all be handled behind the scenes in this package, and all the user has to decide is if the video should be cached and provide it the key name + download location that would be needed to look the task up again.
From the video:

He points out that the video can be played at ANY time during the download process, and it's smart enough to use whats been downloaded already and continue downloading to the cache as the video plays.
Sidenote: A sibling package to this that only does the downloading could be helpful as well. Would be used to load videos even without a react-native-video on the screen. (app is in background, preload video, etc..)

@duhseekoh That's fantastic, thanks for posting that! I should pay more attention to updates.
I've been working on a native iOS app with Swift (which I started a few years ago), and now I'm going rewrite it in React Native. I have been wanting to cache downloaded videos for a very long time, but it was going to be a ton of work. I totally agree, AVAssetDownloadTask changes everything, and video caching should be pretty to implement now. I'm just very worried about the Java and Windows versions.
I'm going to need this for my app, so I would like to contribute caching for iOS. I might be able to figure out Android, too. Worst case would be that caching only works on iOS and is just ignored on other platforms.

Maybe it would be better to separate the caching implementation from react-native-video

@thsig - I'm not sure about that, I think most developers would just love to pass cache={true}, and have it use some sane defaults. E.g. A LRU cache with a max size of 100MB would be great for my app (lots of short videos.) I think it would probably work well for most video sharing apps.
I don't know if a cacheTTL option is even necessary. I can't think of any app that has a dynamic video for a given URL, where you want to reload it after a certain period of time. So I think we really just need cache={true}, and a global option to specify the maximum amount of cached data.

@duhseekoh From the looks of it AVAssetDownloadTask requires HLS, right? So you can't use it for any arbitrary video. That seems different than what this issue is about.

any updates on this?

if we use react-native-fs approach,, does it mean the video has to be downloaded fully, before react-native-video can access it? Please correct me if I'm wrong,, but what I want to happen is while the video is playing (and at the same time downloading) in the backgroud, the video file is cache somewhere.

waiting publish this function ...

Is anyone working on this feature?

Would also love to have caching in react-native-video

+1

+1

+1

+1

等待更新

+1

keep follwing...坐等更新

+1

+1

+1

My app's video resources are all online, hence viewable by using the form:
{uri: ''}
But now I would like to offer the user the option to download videos for offline viewing. Yet this appears to be incompatible with RN's way of handling resources of this kind - or with react-native-video's current support for addressing locally stored video content.
This is kind of related to the question of caching. Does anyone have any suggestions?

For those interested I started implementing caching for ios here: https://github.com/n1ru4l/react-native-video/tree/implement-ios-caching

🙌🏽
On Thu, Mar 1, 2018 at 2:45 PM, Laurin Quast<EMAIL_ADDRESS>wrote:

For those interested I started implementing caching for ios here:
https://github.com/n1ru4l/react-native-video/tree/implement-ios-caching
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/react-native-community/react-native-video/issues/99#issuecomment-369757434,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKEVzci2WCGkU7HjROi_Ccnp8I-UScvqks5taHoAgaJpZM4GG5sc
.

--
Best Regards,
Freddie Cabrera

Here you go: https://github.com/react-native-community/react-native-video/pull/955

Hey guys, any update on this? Thanks in advance!

@hkdahal You could help out by testing my implementation. The instructions are listed in the Pull Request (#955).

Hello. Did anyone solve the problem of caching video?

@DavitVosk I ended up using this library: https://github.com/kfiroo/react-native-cached-image with that PR: https://github.com/kfiroo/react-native-cached-image/pull/110/commits/31ad016afabcbe42e3c1eb058a0d9a57b0fb615f
which allows you to cache all file extensions, instead of only images.

@rnowm Thanks for an answer. Can you please give me an example how you use that package with react-native-video?

@DavitVosk You could use my fork (https://github.com/react-native-community/react-native-video/pull/955) published to npm as @n1ru4l/react-native-video. Sadly nobody is giving me feedback so it seems like this will not be merged any time soon.
I am using my fork in a production application, so I can ensure you it works. However it is not up to date with the upstream changes, I will try to rebase/merge master soon.
If you try my fork feel free to provide feedback and possible enhancements 😊

@n1ru4l thanks for an answer. So what does it differ from the real rn-video package?

@DavitVosk You can read the differences in the pull request #955

@n1ru4l, it looks a great solution if it works))). Now trying your package but receive several errors like no such file or directory: .../node_modules/react-native-video/ios/RCTVideoPlayerViewController.m. Can you please help me to understand what was the problem. So I had already installed rev-video package, so I unlinked it and now linking your package manually

ok I see that react-native-video folder is not directly situated in node/modules - it is located in n1ru4l folder in node/modules. Its route should be changed... I copied the all react-native-video folder directly into node/modules and the errors went away. But now I get the following error: SPTPersistentCache/SPTPersistentCache.h file not found

Anyone has solved this problem?

@DavitVosk I am not sure how others have solved it (looks like my way is similar to @rnowm), but the way I solved it on my project is I started writing my own downloader based off of this project: https://github.com/kfiroo/react-native-cached-image. Once you make that downloader work, you could load the local file path as your source uri.
Something like:
const mediaUrl = MEDIA.cached ? `file://${MEDIA.url}` : MEDIA.url
<Video source = { uri: mediaUrl } />

@hkdahal thanks for your answer. Can you please share your created downloader file that we can use it? Thanks

@hkdahal Also can you please explain how that work? You use https://github.com/kfiroo/react-native-cached-image package with https://github.com/kfiroo/react-native-cached-image/commit/31ad016afabcbe42e3c1eb058a0d9a57b0fb615f PR, but how react-native-video sees that the videos are cached? How they interact with each other?

@DavitVosk I will create a gist or share a separate project that does the interaction between these packages later this weekend. I will mention you over there.

@BunHouth @DavitVosk Sorry for the late answer. Did you all setup the package like described in the Pull Request? Lets continue there and stop spamming this issue 😅https://github.com/react-native-community/react-native-video/pull/955

@n1ru4l It's not spamming if people are trying your package and responding with roadblocks it's very healthy discussion.
I see you added SPTPersistentCache in your podspec as dependency. Any idea why the header isn't found?

@roycclu It is better to discuss possible problems related to the pull request in the comments of the pull request..

@roycclu @BunHouth @DavitVosk I updated my pull request (#955). Please check out the private fork<EMAIL_ADDRESS>or the example app, located under (examples/video-caching) (if you do not know how to setup your project with cocoapods.
Would love to hear your feedback (in the discussion of #955)!

Just as info for anybody else looking for caching solution, as this is not yet available out of the box - we have been using:

As caching is not yet availalbe out of the box for react-native-video on both Android and IOS, we have been using:
https://github.com/joltup/rn-fetch-blob to download our videos from S3, (it supports progress callback so you can add progress-bars etc), save it to a device storage and point react-native-video to URI like so:
    rfblob.config({
        fileCache: true,
        path: filePath // where you want to save a file
      }).fetch('GET', 'your-hosting-url/file.mp4')
        .then(result => {
           const filePath = result.path();
           const sourceForVideoPlayer = {
               uri: 'file://' + filePath
           }
        })
    }

And when Video Player component is mounted, we check if there is already a file on device storage with matching name and if so, we just load video from storage instead of downloading it once more.
Of course, you also need to clean your cache directory by yourself but this is a small trade off for solution that works on both IOS and Android.
Maybe it will help someone else, as soon as caching is supported on both platforms, we will be happy to switch

As caching is not yet availalbe out of the box for react-native-video on both Android and IOS, we have been using:
https://github.com/joltup/rn-fetch-blob to download our videos from S3, (it supports progress callback so you can add progress-bars etc), save it to a device storage and point react-native-video to URI like so:
    rfblob.config({
        fileCache: true,
        path: filePath // where you want to save a file
      }).fetch('GET', 'your-hosting-url/file.mp4')
        .then(result => {
           const filePath = result.path();
           const sourceForVideoPlayer = {
               uri: 'file://' + filePath
           }
        })
    }

And when Video Player component is mounted, we check if there is already a file on device storage with matching name and if so, we just load video from storage instead of downloading it once more.
Of course, you also need to clean your cache directory by yourself but this is a small trade off for solution that works on both IOS and Android.
Maybe it will help someone else, as soon as caching is supported on both platforms, we will be happy to switch

hello, is there any way to download the video with rn-fetch-blob, and play the video while downloading?It's so long for waiting the downloading task complete.

@webbin No, there is not.
For android video caching I am currently using this: https://github.com/n1ru4l/react-native-video/commit/0e1c7c273e2793392580bda2c1f9926092547546 (uses a HTTP proxy to cache the file).
The idea came from this article: https://instagram-engineering.com/improving-video-playback-on-android-2f6c6a0058d
I use this is my private fork and hope I will have the time to someday do a proper implementation for react-native-video.

Have there been any plans for implementing the cache functionality in this library?

Hi there! What about caching video files when a url ends like https://.../file.mp4?access_token=xxx ?

@igor-lemon feel free to send a pull request that allows registering a cache key normalizer.

Any update?

@vargajacint We just created a fork to add basic caching feature to the <Video/> component (Android and ExoPlayer only, since caching is already native on iOS)
You can find it here: https://github.com/jowapp/react-native-video
(@n1ru4l if you think it's worth it, we can send a PR)
tl;dr: just reference our repo in your package.json react-native-video entry and add the useCache prop to your <Video/> component. For more details and advanced features, have a look at our updated README
[Note: We are Jow, a wonderful startup based in Paris, offering delighful recipes and helping do your grocery shopping according to what you like to eat. And we're also hiring talented people, especially back & front developers!)]

Hi @antoinemaillard . Thanks for providing this repo!
Does this work for HLS?
If useCache prop is set, cache will be used for all non-streamed content (ie. except for Microsoft SmoothSteaming, DASH, HLS)

I see that it does support HLS but when I try to console log the cache stats with:
ExoPlayerCache.getCacheStats()
  .then(cacheStats => {
    console.log(cacheStats)
  })

It shows an empty object. Yet, with an mp4, I see all of the stats.
Also, does this handle deleting the cached video as well?
Thanks :)

Hi @antoinemaillard . Thanks for providing this repo!
Does this work for HLS?
If useCache prop is set, cache will be used for all non-streamed content (ie. except for Microsoft SmoothSteaming, DASH, HLS)

I see that it does support HLS but when I try to console log the cache stats with:
ExoPlayerCache.getCacheStats()
  .then(cacheStats => {
    console.log(cacheStats)
  })

It shows an empty object. Yet, with an mp4, I see all of the stats.
Also, does this handle deleting the cached video as well?
Thanks :)

@antoinemaillard Thank you for your fork enabling caching on Android! Is there any way to imperatively cache video ahead of time in order to be able to play it instantly? (Something like Image.prefetch() in React Native or FastImage.preload() in React Native FastImage)

Hi @antoinemaillard . Thanks for providing this repo!
Does this work for HLS?

looking at the code there is support for those types of media but for some reason the cache does not work
case C.TYPE_DASH:
    DataSource.Factory dataSourceFactory = buildDataSourceFactory(false);

    mediaSource = new DashMediaSource.Factory(
            new DefaultDashChunkSource.Factory(mediaDataSourceFactory),
            buildDataSourceFactory(false)
    ).setLoadErrorHandlingPolicy(
            config.buildLoadErrorHandlingPolicy(minLoadRetryCount)
    ).createMediaSource(uri);
    break;

given a url like https://fictive-api.com/dash/1766e4a8f33d49a497e9ff0fe59c130c.mp4/manifest.mpd it will detect that the type is DASH, play the video but won't cache :(

Thank you for your fork enabling caching on Android! ~Is there any way to imperatively cache video ahead of time in order to be able to play it instantly? (Something like Image.prefetch() in React Native or FastImage.preload() in React Native FastImage)~
Nevermind, I managed to achieve it by downloading the videos in advance with React Native FS and playing them from local source.

Can you tell me how you did this ??


gc/ssa.go contains some Intel-flavored idioms (and maybe an error)

Cherry spotted this, came to me for a sanity check.  In insertWBmove and insertWBstore this code appears:
	flagaddr := s.newValue1A(ssa.OpAddr, Ptrto(Types[TUINT32]), aux, s.sb)
	// TODO: select the .enabled field. It is currently first, so not needed for now.
	// Load word, test byte, avoiding partial register write from load byte.
	flag := s.newValue2(ssa.OpLoad, Types[TUINT32], flagaddr, s.mem())
	flag = s.newValue1(ssa.OpTrunc64to8, Types[TBOOL], flag)

Note the 32-bit-load followed by a Trunc64to8 -- as far as we know, not a bug, but not quite what was intended.  The Intel flavoring is the wide load followed by truncate; on other platforms a load byte is going to work just fine because they lack the partial-register craziness.
Since this is in writebarrier code, we actually care.

That should be Trunc32to8.
We could just use all 32-bit operations on amd64, no reason to use the byte instructions.
MOVL foo(SB), AX
TESTL AX, AX
JNE dowritebarrier

Related (alternative fix): #15245

Thanks @randall77 and @josharian. As we may have alternative fix, I leave it unchanged on amd64 for now, except Trunc64to8 -> Trunc32to8.

I believe this is fixed.  On all archs we now use 32-bit operations.


Replace the XPath overrides with a more intuitive syntax, add support for properties

[x] This contribution adheres to CONTRIBUTING.md.

What does this Pull Request accomplish?
Replace the existing XPath-based overrides system with a cleaner syntax, and add support for reading properties from the configuration file. The result is a cleaner system for overrides, and a solution to the existing problem of getting setup-specific information not included in the system definition, e.g. the FPGA IP used in the SLSC loopback tests.
Why should this Pull Request be merged?
The existing XPath configuration method assumes the user is intimately familiar with the system definition file format, as well as XPath queries, and provides many opportunities for error. The new syntax is more intuitive, and more directly maps to the system definition explorer.
An example configuration file is shown below.
[Overrides]
"Targets/Controller/IP Address" = "<IP_ADDRESS>"
"Targets/Controller/Loop Rate" = 100

[Properties]
"FPGA Loopback IP" = "<IP_ADDRESS>"

What testing has been done?

The existing test to open and close a VeriStand connection now also reads a singular property.
A test has been written to ensure overrides are applied to a system definition correctly.

There are a few VIs which still use XPath in their implementation, e.g. GetTargetIPAddresses.vi and GetExecutionMode.vi. I can do the work to retrofit them now, but I'm okay with leaving them as is for now to keep the already large pull request from growing larger if preferred.


Larastan unable to detect $this context switch when declaring Mixin and Macros.

Larastan Version: 0.7.10
--level used: 5
Pull request with failing test:

Description
------ -------------------------------------------------------------------------
  Line   MacroServiceProvider.php
 ------ -------------------------------------------------------------------------
  192    Call to an undefined method MacroServiceProvider::toBase().
 ------ -------------------------------------------------------------------------

Laravel code where the issue was found
class MacroServiceProvider extends ServiceProvider
{
    protected function registerCollectionMacros()
    {
        Collection::macro('isAssoc', function () {
            return Arr::isAssoc($this->toBase()->all());
        });
    }
}

$this->toBase() inside the closure refer to Collection::toBase().

Hi,
This is a limitation of PHPStan. I couldn't find the issue now, but I think there was an open issue about this in PHPStan repo. If not maybe you can open a new feature request that suggests functionality to change the type of $this via extension code.
For now you can something like:
Collection::macro('isAssoc', function () {
	/** @var \Illuminate\Support\Collection $this */
    return Arr::isAssoc($this->toBase()->all());
});


WRN-12676: Cross-Platform Enact Android: Picker - tall string is truncated

Checklist

[X] I have read and understand the contribution guide
[x] A CHANGELOG entry is included
[X] At least one test case is included for this feature or bug fix
[X] Documentation was added or is not needed
[ ] This is an API breaking change

Issue Resolved / Feature Added
Changed the font for picker Item and Button to Noto Sans to display the tall glyphs correctly.
Resolution
Additional Considerations
The font was applied only to pickerItem and Button because it had no impact on the rest of the components. The change of fonts does not fix the problem for joined picker.
Links
WRN-12676
Comments

Seems that the difference between PC and Mobile device are the different font families available on the device
Mobile vs PC:

I think the changelog should be moved to 'Changed' category

I think the changelog should be moved to 'Changed' category

The problem is treated as a bug that's why it is marked as a fix not a feature change.

This issue will be solved on https://github.com/enactjs/enact/pull/2990


Enable to collect metrics for all components by default

What this PR does / why we need it:
It's a kind of a breaking change so be sure to announce on the release note.
Which issue(s) this PR fixes:
Fixes #
Does this PR introduce a user-facing change?:

Enable to collect metrics for all components by default

/approve


onCountrySelectedIsCalledTooManyTimes

When I am adding a listner onCountry selected keeps running for too many times and crashes the app. what I am trying to do is if I select a country the country code automaticaly gets selected or vice versa

It seems that you have introducing a circular dependencies for both of the listener and the country code view. The simplest hack is by using a boolean variable as a flag to differentiate if listener need to be called.
Because this issue is already to old (Though this is because of my laziness), I'll close this for now. Just re-open the issue if you want to discuss about the problem.


Sequential processing

                dRi = fcn_singleOrthonormalMatrixGeneration(angles,mus,partial_difference=True,index_pd_angle=iAngle) # TODO: Sequential processing

https://github.com/msiplab/TanSacNet/blob/fda9ca7f20ca0420b7f480b7d2da8de93a4a289c/code/appendix/torch_tansacnet/orthonormalTransform.py#L367

Refactoring the backward method of GivensRotaitons4Synthesizer in orthonormalTransform.py to reflect the sequential differential calculation process.


Broadcast events

Emits an event when:

A Habitat fails to validate (will have to be removed when #185 is implemented, because an invalid Habitat shouldn't even be creatable in the first place)
One of the sub-resources fails to be created
A Habitat is synced successfully (not sure we really need this)

To test: create a Habitat and type kubectl describe hab
Closes #221.

OK, removed the sync event, PTALA.

I guess you need something like
...
- apiGroups:
  - ""
  resources:
  - events
  verbs:
  - get
  - update
  - patch
  - create

In the operator RBAC rules


Intersection Node of two Linked Lists

Hello @rudrakshi99 @nakul-19 @plazzy99
I am a GSSoC21 participant.
What I want to contribute : (suggest if something needs to be added)

Naive and optimized approach for finding the intersection node of two linked lists
My code will be in C++
The code will be commented for easy understanding
Also the code will include 2-3 testcases

I will explain the space and time complexity of both the approaches.
@rudrakshi99 @nakul-19 @plazzy99 please assign me this issue

I would like to work on this issue, I am a GSSOC'21 participant. Please assign me this issue.

I would like to provide a solution for this problem in JAVA as a GSSOC'21 participant.
@rudrakshi99 @nakul-19 @plazzy99 Kindly assign me this issue.

I would like to contribute to the same Problem statement in Python.

Go ahead @Meghna180401 and @zenithexpo with java and python respectively

I would like to code it in JAVA, please assign me this issue. I am GSSOC21 participant.

I am a GSSOC'2021 participant. Please assign me this work.I am good at C++,C,Java and python.Also good at algorithm and data structures.I will write programmes with detailed explanation and proper commenting.

Hey, I am a GSSOC'21 participant. I would like to contribute the C++ code for this problem statement. I will make sure that the code is easy to understand and is commented properly. Please assign this issue to me. Thankyou!

I am a GSSoC'21 participant.
I assure you I can handle this issue as I am extremely good at DSA, problem-solving, and C++.
It would be really great if you assign this issue to me.
Hoping for a good outcome from your side.

I am a GSSOC'21 participant and would like to contribute C++ code for this issue. Please assign this issue to me.

@Rohan27s @tarun26091999  since no one is working on this can I take up this issue??


chore(solc): improve remapping errors

Motivation
make errors more useful
ref https://github.com/foundry-rs/foundry/issues/2626

Solution

PR Checklist

[ ] Added Tests
[ ] Added Documentation
[ ] Updated the changelog

Some missing import I think

bumped


Feature: Enabled tags by default and removed option to turn them off

*Resolved

Closes #9586

Details of Changes
-Removed Tag ToggleSwitch
-Removed all the code that was executed at change of the toggle status
-Removed all the ifs that checked if tags were enabled (Now their code is always executed)
Validation

Built and ran the app, everything worked fine

As noted in the issue, we're not ready to merge this just yet, let's keep this open in the meantime.

@ferrariofilippo last thing, can you add the link icon back to the button? It should look like this.

Ok, I fixed it

@ferrariofilippo excellent work! Thank you for contributing to Files, this change will be included in the next release.


Support init scripts from Workspace

see https://docs.databricks.com/api/azure/workspace/clusters/get

@microsoft-github-policy-service agree company="Siemens AG"

I completed the change in #156, closing this PR.


Release: v1942 - minorverison=54

Release Candidate:
5.4.4  🎉
Minor Version :
54
Features :

Added support for Create and Delete operations for RecurringTransaction entity.
Added Samples for Create and Delete operations  under  _Samples
Schema update for MV=54

Docs :
https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/recurringtransaction

@bsivalingam : Requesting review on the support for Create and Delete of RecurringTransaction


[Feature] Ability to set role when previewing docs in local development server

Problem description
The ability to manage RBAC for docs is coming soon, but there is not currently a good way to preview what docs a role can see before pushing to production.
Why would it be useful?
It would be useful to preview what the docs look like for a given role before they go live.
Describe the solution (optional)
Add the ability to set an optional role when starting the docs development server. For example
fern docs dev [--role <role>]
Additional context
Ideally we could also build impersonation into preview URLs, but this would be a great place to start.

To be more clear, I guess you would be setting the viewer
fern docs dev [--viewer <role>]


ForgeBrainLib conflicts with SmartBrainLib, causing immediate crash on load.

As the issues page for ForgeBrainLib is closed and I am unable to access it, I am reporting this issue here instead, as this is the only mod that currently deps FBL.
Describe the bug
Having ForgeBrainLib and SmartBrainLib together causes the game to immediately crash on load, likely due to mixin conflicts, due to ForgeBrainLib straight up being a fork of SmartBrainLib.
To Reproduce
Steps to reproduce the behavior:

Install FBL and SBL in the same installation.

Expected behavior
"Note: The package has been relocated from "net.tslat.smartbrainlib" to "com.klikli_dev.forgebrainlib" to allow SBL and FBL to coexist in the same installation." - ForgeBrainLib README.md
It is expected behavior for SBL and FBL to be able to coexist in the same installation without the game immediately exploding, as can be gathered from the FBL documentation.
System (please complete the following information):

FBL Version: 1.19.2-1.0.0
OS: WIN 10
Minecraft Version: 1.19.2
Modpack Link and Version, or list of mods: ForgeBrainLib, SmartBrainLib

Additional context
latest.log is practically empty and contains absolutely zero things that are helpful, but I might as well upload it
latest.log

Thank you for the report! You are right, they should work alongside, I will look into it after the holidays to get a dix


Feature request: Referencing current ramp & more

Sometimes I need to reference the current ramp from a label, for example, in my battery or wireless module, I want both my percentage and ramp icon to be of the same color, but placeholders do not work in ramps, so an option would be to add a way to reference the current ramp (or conditional formatting). I also miss a way to replace the default functionality of volume module, and a way to have a general alt option, like date-alt. The last think I would want to know is if there is a way to send via IPC a request to update a module,  so there is no need for intervals. Thanks.

Closing. I'll add a reference to this in #84


No information about historic messages service inside chatterino app

Checklist

[X] I'm reporting a problem with Chatterino
[X] I've verified that I'm running the most recent nightly build or stable release
[X] I've looked for my problem on the wiki
[X] I've searched the issues and pull requests for similar looking reports

Describe your issue
Currently the in app does not present information about who is faciliating the historic messages service, nor the privacy policy, or terms of service. (The wiki does say so, but I believe it could also be in the app). And there is also an undocumented hardcoded limit of 800 maximum messages to load.
Also changing the service is unnecessarily difficult, CHATTERINO2_RECENT_MESSAGES_URL (and similarly CHATTERINO2_LINK_RESOLVER_URL and CHATTERINO2_PROXY_URL[1]) could be moved into settings/external and be easily available for change by the user.

[1] For CHATTERINO2_PROXY_URL it might be better left as both an ENV var, since a user could set up multiple different environments to set this parameter in multiple different ways, and it could still be inside settings, and the setting be ignored if it exists as an environment variable.
Screenshots
Preview of historic messages setting

Versus preview of link preview setting

OS and Chatterino Version
Chatterino Nightly 2.5.0-beta.1 (commit 25a69fd1) built on 2024-04-07 with Qt 6.5.0, MSVC 193833135 Running on Windows 11 Version 23H2, kernel: 10.0.22631

Duplicate of #1311

Duplicate of #1311

I believe the issues I listed could benefit from having a discussion before creating any directed issues, whilst the linked issue seems to be addressing the problem of non information, it is of different nature, and the listed proposed solutions only address my issue in part. For example I never saw any installer, I downloaded the release zip, and the proposed solution of system message does not seem to hint at choosing a different service host.
Should I then make a new issue (if it does not exist) for each:

hardcoded limit of 800 messages
not user friendly setting of

CHATTERINO2_RECENT_MESSAGES_URL

CHATTERINO2_LINK_RESOLVER_URL

CHATTERINO2_PROXY_URL

Whilst nobody is probably going to change the default link resolver, I could see people changing their recent messages provider to add in features that are not present in the current one provided (e.g. longer timeframes or larger message set). And proxy settings are quite common that they should be inside the settings.


Uncaught Error: Unexpected value 'LibModule' imported by the module 'SharedModule'. Please add a @NgModule annotation.

Uncaught Error: Unexpected value 'LibModule' imported by the module 'SharedModule'. Please add a @NgModule annotation. I get this error when I import the libModule... any solution?

Are you using anywhere symlinks in your projects? I had something similar with symlinks and had to declare the module/package in my tsconfig.json "paths".

I don't know what is symlinks....
I just took the library as is change the angular version to ^4.4.6 npm install and npm run build enter to dist library and npm link it and in my app run npm link quickstart-lib and import the the module and compile works well but in the browser I get this problem... any suggestions?

A symlink is what "npm link" creates on your hard drive. So you could try adding your library in the paths property of your tsconfig.json (in your angular application)
// tsconfig.json
...
"paths": {
    "your-library/*": ["../node_modules/your-library/*"],
}

Thanks for your'e quick answer but its still doesn't resolve the problem

forget to answer the solution.... just delete the node_modules from the package

@idanaim I am curious - What did you do to resolve the issue?  You deleted the node_modules in the quickstart and then did an npm install?

Hey @ralberts no. I run npm install run build and then deleted the node_modules


Dev setup is only ready after a node anouncement after the channel creation

Recently we've changed the interval from every minute to every 10 minutes. That increases the time we have to wait before we can make use of the channel in our development setup.
If we try to fund our wallet before the node announcement we get the following error on the coordinator
Failed to accept/forward incoming HTLC: Unable to decode our hop data

And a no route error on the faucet.
I propose to on top of the interval that we make a node announcement after the channel ready event (with a small delay).

I think its fine for a productive setup, though.

Removed the MVP badge from this, because the most pressing issue seems to be solved.

I have the assumption that this error is not related to node announcement because we can the channel to send funds from LND to the coordinator.
This is what we tried:

fund coordinator
mine blocks
fund lnd
mine blocks
open channel
mine blocks
create invoice on coordinator (curl -G -d 'amount=12345' -d 'description=test' -d 'expiry=12345' http://localhost:8000/api/invoice)
paste invoice in online faucet

The error above only comes when trying to pay an invoice of the app.
Maybe @klochowicz can chip in who made it work today. Did you still notice this error?


Android build not working

plugin version - https://www.npmjs.com/package/@idpass/smartscanner-capacitor
capacitor version - 5 (https://capacitorjs.com/docs/)
getting error in android studio as follows ,

the same problem here :(

@feldiazp
I was able to fix this by making changes in the build of the files below
build.gradle -<EMAIL_ADDRESS>

proguard-rules.pro -<EMAIL_ADDRESS>Add these lines at the end of the file
-dontwarn java.lang.invoke.StringConcatFactory -dontwarn org.idpass.lite.IDPassReader

This works for capacitor versions 5 and 6.


Add assertions

Yeah, that's the principle of this add-on... to make assertions !
For now, there only is assert_that primitive in TestCase classes.

Expand assertions in assert_that
Create assertions for all Godot base type

Basic assertions, int, string and signal assertions available. Done !


Import six directly instead of via sklearn

Sklearn have removed externals.six in version 0.23
This library should be updated to import six directly intead

Excellent! Thank you for contributing this patch.


Screenshot mismatch in docs

The screenshot in the Doc is different from what I see. Perhaps the screenshot is taken long time ago?

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

ID: f7e8d08b-7c18-5407-dc4f-fa7bbfe53fb3
Version Independent ID: da35a785-c7fe-57e8-2d02-3daefd0284da
Content: Use Azure Cosmos DB explorer to manage your data
Content Source: articles/cosmos-db/data-explorer.md
Service: cosmos-db
GitHub Login: @deborahc
Microsoft Alias: dech

@jeffrey008 Thank you for the feedback.
The Azure portal UI is continuously evolving. The "Open Full Screen" text has now moved to the tool tip instead.

Tagging @deborahc for info.


Reset ManageIQ automate domain to get the latest changes with bin/update

Developers doing a git pull does not update the automate domain.  Adding this to bin/update to avoid future confusion.

@miq-bot assign @gmcculloug
cc @tinaafitz @mkanoor Please review

@bdunne
Looks good.

@bdunne
If someone is making changes to the ManageIQ domain (still in Postgres) and they run bin/update their ManageIQ domain is going to get deleted.
This would be good for non automate developers.

@mkanoor To be clear, are you saying this too risky to be here since it could inadvertently destroy data in the ManageIQ domain?  In the future this would likely include other domains like provider-specific ones.

:turtle:

@bdunne Can we have an option to refresh the Automate domain as part of some global settings like git-config

@mkanoor Wouldn't any changes always be stored in files on your branch?
Maybe we could add an environment variable that you could set if you don't want that behavior.  What do you think?

If you are working on changes in the model you will likely not have an export of those changes stored on disk.  I like the idea of an environment variable as a work-around.  👍

@bdunne
Most of the time we recommend users to make changes using the CFME Automate Explorer, which makes changes in the Postgres Database. When users make changes in the directly on the File System we get whole lot of inconsistencies, internal name doesn't match external name etc. We could use the environment variable that Automate Developers could use.
http://talk.manageiq.org/t/creating-a-pull-request-for-enhancements-to-manageiq-automate-domain/1041

@gmcculloug @mkanoor Updated, please review.

👍


[RFC] Deprecate CheckpointHooks off LightningDataModule, PrecisionPlugin

Proposed refactor
Following the addition and alignment of Stateful API in issue #11429, deprecate CheckpointHooks on_save/load_checkpoint(checkpoint_dict) off LightningDataModule and PrecisionPlugin.
Motivation
Now that LightningDataModule and PrecisionPlugin can contribute and load their own component state with Stateful APIs, I don't think there's much use cases where these components need access to edit or peek at other component states in the checkpoint dictionary - could we deprecate CheckpointHooks off these components?
Pitch
Deprecate CheckpointHooks off LightningDataModule and PrecisionPlugin.
Issue deprecation warning if on_save/load_checkpoint are overridden, remove in v1.8.
Additional context
issue #11429

If you enjoy Lightning, check out our other projects! ⚡

Metrics: Machine learning metrics for distributed, scalable PyTorch applications.

Lite: enables pure PyTorch users to scale their existing code on any kind of device while retaining full control over their own loops and optimization logic.

Flash: The fastest way to get a Lightning baseline! A collection of tasks for fast prototyping, baselining, fine-tuning, and solving problems with deep learning.

Bolts: Pretrained SOTA Deep Learning models, callbacks, and more for research and production with PyTorch Lightning and PyTorch.

Lightning Transformers: Flexible interface for high-performance research using SOTA Transformers leveraging Pytorch Lightning, Transformers, and Hydra.

cc @justusschock @awaelchli @akihironitta @rohitgr7 @ananthsub @ninginthecloud @tchaton

From the context I understand that you are proposing to replace the on_x_checkpoint with state_dict() and load_state_dict() on the LightningDataModule. But this is not in line with the hook language and design principle behind Lightning IMO.

state_dict() on a nn.Module has a default implementation. That makes it not a hook.
If one overrides state_dict to add to the returned dict, one has to call super(), something that does not really exist in Lightning, because (almost) every method relevant to the user is a hook. Lightning clearly wants to avoid exposing this pattern to minimize the number of times the user has to ask herself "do I need to call super here or not??".
on_load_checkpoint/on_save_checkpoint expresses in simple and unambiguous words when this hook is called and what it is supposed to do. state_dict() only expresses the latter.

While it may not seem like a big deal to remove it from the LightningDataModule, it definitely would be for the LightningModule IMO. And if we only have it on the LM, then we would again have to answer the question the users have:
Q: LM has the on_x_checkpoint hook but LDM does not. Can we add it for consistency? It would be very useful!
A: No, but you can use state_dict() on the LDM
Q: Why is it state_dict on LDM but on LM we have a different one?
A: ...
With these concerns I strongly recommend against going with this RFC. My same argument applies to Callback and LM.
(not saying we shouldn't do the Stateful changes)

On the same page about adding Stateful consistency across components (issue #11429), keeping on_save/load_checkpoint for LM, Callbacks, and deprecating on_save/load_checkpoint for PrecisionPlugin.
re: keeping LDM on_save/load_checkpoint:
I feel the main question is are there any use cases where data state needs to edit or peek at other component states? I haven't seen any myself and can't think of examples where this is needed.

If there are no use cases, it's leaner to just offer Stateful PyTorch convention. We shouldn't offer these hooks if they don't add any value just for the sake of consistency with LM hooks.
If there are use cases, we should keep these hooks for LDM.

If one overrides state_dict to add to the returned dict, one has to call super()

mind clarifying? With the Stateful changes users would just need to implement state_dict/load_state_dict in their own components, there's no need for any super() calls

on_load_checkpoint/on_save_checkpoint expresses in simple and unambiguous words when this hook is called and what it is supposed to do. state_dict() only expresses the latter.

I guess the hook name might be a bit more explicit about the when, but I feel state_dict/load_state_dict PyTorch convention carries this when implication itself - everyone calls these when they save and load states.

My fear is that #11893 will be used as a motivation to remove the same hooks on the LM and callbacks. Furthermore, #12232  will send the signal that since we have state_dict() on the Callback now, we won't need the on_*_checkpoint hooks anymore there, and they get removed. I'm trying to fight back on this and I'm trying to explain there is a difference between the state dict methods and the hook that gets called by the Trainer, and the fact that we need both of them.

there is a difference between the state dict methods and the hook that gets called by the Trainer

totally agree, this is the distinction from the Stateful issue #11429:

independently contributing/loading one’s own local component state (aligning with PyTorch primitives: state_dict/load_state_dict)
operating and depending on global component state (Lightning CheckpointHooks: on_save/load_checkpoint)

and the fact that we need both of them

This issue is for auditing, for each component, if we need to additionally offer 2.

LM deprecation was not proposed because we've seen plenty of use-cases for customizing model save/load, and 2. also allows this without having to override nn.Module state_dict/load_state_dict.
Callback deprecation was not proposed because a user could be doing anything in their own Callbacks, it makes sense to offer 2. if the callback needs access to component states.
LDM and precision plugin deprecation were proposed because we could not see any use cases where these components would need to edit or peek at other component states. from above,

If there are no use cases, it's leaner to just offer Stateful PyTorch convention. We shouldn't offer these hooks if they don't add any value just for the sake of consistency with LM hooks.
If there are use cases, we should keep these hooks for LDM.


Update init.py

This change properly handles chunk sizes that are not exactly 1280 bytes.

REAME.md should be updated as well.

openWakeWord will split chunks into 1280-sample segments so there is no need to split chunks in the plugin.  However, if the chunk size is not a multiple of 1280-samples, then openWakeWord will drop the extra data which will lead to a loss of performance.  A better solution is to default to a multiple of 1280 (perhaps 3840 as that's close to the current 4096) and add to the README that chunk size, if it is changed, should be a multiple of 1280.  We could also detect the chunk size in the plugin initialization portion and raise a warning if its not a multiple.


Spark 0.22.0 stuck with ConsoleTransport

I just tried new version 0.22.0 on Spark and noticed that it fails to emit anything to Marquez backend. Instead I noticed that in the log it's always using ConsoleTransport even if I set spark.openlineage.consoleTransport=False.
If I change the package to old 0.21.1 it works as expected.
I'm setting the backend url with spark.openlineage.host parameter.

I just noticed that the config parameters that I was using were deprecated in https://github.com/OpenLineage/OpenLineage/pull/1711
I changed to the new parameters and it works now.

spark.openlineage.transport.type = http
spark.openlineage.transport.url = http://marquez-backend

However, I think it would be good to update the documentation as well:
https://openlineage.io/docs/integrations/spark/


[WIP] Check services/plans for bindability before allowing binding

Fixes #251
Fixes #257
Also fixes displaying errors when creating a project which already exists
Removes filters that were added to common.
Depends on https://github.com/openshift/origin-web-common/pull/90 and release of origin-web-common.

Prerequisites are complete, removed WIP

Added WIP as this now depends on https://github.com/openshift/origin-web-common/pull/90

Removed WIP status, ready for final reviews.


Tinifed umblogo.png

This is a micro-optimisation, I ran the umblogo.png through TinyPNG and it compressed down from 520 bytes to 330 bytes, (woo hoo 63% smaller!)
I was tinkering around with stuff during CodeCabin, and got around to sending it all over now.

you are just following me around tidying up all my using blocks 😉

You know me so well. 😆


[CLI helper] switch filesys/lsof to process/lsof

filesys/lsof isn't always collected, so using process/lsof instead.

@mustafakemalgilor @dosaboy
filesys/lsof isn't typically collected as part of sosreports; rather process/lsof is always there.
So I've modified to use the latter. The difference is that the latter doesn't have TID and TASKCMD fields.
I am not sure if these fields are needed to implement something in hotsos (lsof isn't actually used anywhere yet, so I couldn't confirm). If those two fields are needed, then we probably will have work with upstream to get those.
Otherwise please check if this PR is OK.

lsof parsing is chiefly implemented for issue #451. For now, we don't rely on TID/TASKCMD so it should be fine.


Using Lync as channel

There was an earlier similar issue regarding custom channel for a custom chat app (https://github.com/Microsoft/BotBuilder/issues/1215?_pjax=%23js-repo-pjax-container). My question is regarding custom channel but for a "Microsoft" app, Lync.
My Bot is working with Skype. I want to use Lync as a channel instead of Skype. Lync is whats available in my company, Skype is not allowed. Any pointer?
Thanks

The Bot Framework does not have a Skype for Business (Lync) channel.  It has a channel for Microsoft Teams, though:
https://blog.botframework.com/2016/11/02/teams-announce/

@willportnoy Thanks.
My requirement is specific to Lync. It will be hard to change in a regulations heavy company. I am looking into UCMA/UCWA Lync development also.
I am still looking for a solution of integration Bot framework with Lync. So if anyone else have any suggestion?
Thanks

A member of my team had successfully created a bot using UCWA and it worked fine. I had also created one using Lync 2013 SDK, you may find it here.

The Skype for Business team did a demo late last year of Bot Framework integration. We don't have a release date but we know this is frequently requested.
We make announcements when we launch new channels, so please stay tuned.
Please at-mention or open a new issue if you have further questions.

Thanks ankitbko.
Its great.
Just saw your comment.
Thanks again

@dandriscoll - Any status on Skype for Business channel?

Nothing to report at the moment, sorry.

I don't see Lync channel for integration at dev.botframework.com. Is there any plan to release the same? In our case its not possible to migrate lycn to skype for business at client side. Let me know road map for the same and alternate ways to achieve it.


Fixes to subchannel and its index

Stressed by concurrent_connectivity_test, some issues became apparent:

A double "connecting" weak unref in subchannel.c
The need to "necromance" a subchannel if it's looked up after its shutdown but prior to its destruction.

Issues: #9088 #11116 #11187


Nt/account switch fix

What does this PR?
After testing a number of scenarios and trying to recreate the environment being faced by users, added a bunch snippets to help avoid embarrassing situations
1 - purges malformed accounts
2 - logs out of app instead of logging into malformed account
3 - rearranged logout structure to avoid creating an undefined auth data state
4 - moved isLogingOut state to uiReducer so it gets reset on every app launch if routine is interupted for some reason
Screenshots/Video
showing toast when auto detecting malformed user data detected on launch and when switching to logged in user after logging out

showing logout prompt if invalid account detected regular account switch

refine text button account switch sheet

using in app action modal instead of OptionsModal

Added account verification mechanism on startup, account switch and logout if malformed keys data is detected.


Use nix for CI

I mean... seriously?

How do you suggest nix should solve the issue? Isn't it identical to pinning ubuntu to 20.04, for instance?

The difference is that ten years from now you don't want to use Ubuntu 20.04, but Nix will still be around.
But really, Nix is overkill here.  Why not just use mlkit for CI?  I hear it's a pretty decent SML compiler.

Oh look, there's already install-mlkit.


Add the ability to override package_source

Pull Request (PR) description
Allows you to specify manage_package_source to override the modules behaviour when you want to specify your own package_source. The existing functionality in the module is not enough, as sometimes it is necessary to specify an undefined value, (for example, if you are using yum to install from your own repos - the source parameter to the package type needs to be undef) which at the moment gets overridden by the value from $splunk::params::server_pkg_source

Hi @beezly. thanks for the PR! Can you take a look at the inline comments I made and the failing spec tests?

@bastelfreak I've added datatypes to those two classes and fixed the failing tests. It looks like one job is going to fail (https://travis-ci.org/voxpupuli/puppet-splunk/jobs/461227416) but I believe that is unrelated to the changes I've made (it's failing to restart the ssh service when setting up a debian 8 docker container to run the tests in). I'll give it a nudge and see if it passes a second time.

Also - apologies for the close/reopen. It was the only way I could get Travis to re-run the tests after the failed run earlier.

Also - apologies for the close/reopen. It was the only way I could get Travis to re-run the tests after the failed run earlier.

That's fine.  I think it's even documented as a way to rerun tests in one of @bastelfreak's presentations.

@alexjfisher @beezly correct, closing/reopening is totally fine.


[Joy] Improve variant customization experience

Preview https://deploy-preview-30878--material-ui.netlify.app/experiments/joy/variant/
CodeSandbox https://codesandbox.io/s/joy-cra-typescript-forked-h9zus?file=/src/App.tsx
Improve variant customization experience
This PR moves the variant generation from the default theme to run time generation so that developers only need to configure the variables.
Before
Joy defines variant tokens (theme.palette.primary.*) and variants (theme.variants.*) separately. Consequently, if developers want to add/remove some tokens that Joy provides as a default, they will have to adjust the theme.variants as well.

Take Strapi clone as an example:

Joy
Strapi

Initially, Joy does not define the token outlinedBg (the background of the outlined variant).

https://www.figma.com/file/9jClRdtL7DgQcG4iYU6MzC/Strapi---UI-Kit-🧩-(Community)?node-id=9974%3A117504

To make Joy looks like Strapi, here is what the developer have to do:

add outlinedBg to theme.palette.primary.outlinedBg

<CssVarsProvider theme={{
  colorSchemes: {
    light: {
      palette: {
        primary: {
          outlinedBg: 'var(--palette-primary-200)',
        }
      }
    }
  }
}}>

add backgroundColor to theme.variants.outlined

<CssVarsProvider theme={{
  variants: {
    outlined: {
      primary: {
        // the extra stylesheet that will be merged with the default variant
        backgroundColor: 'var(--palette-primary-outlinedBg),
      }
    }
  }
}}>

module augmentation for typescript

This is just only for primary color, I have to do this for 4 colors. This takes a lot of effort just to customize the background, so it made me think that the process should be easier.
New
I came to realize that the variant tokens in theme.palette.* are already explicit.

If you want to customize the background of the outlined variant, you would specify theme.palette.$color.outlinedBg and you expect the style to work.
if you want to customize the background (hover state) of the outlined variant, you would specify theme.palette.$color.outlinedHoverBg and that should be done.

The process of building variant styles should be done after Joy has combined the default theme + user-input tokens via <CssVarsProvider theme={{ colorSchemes: { light: { palette: { ... } }} }}>.

[x] I have followed (at least) the PR section of the contributing guide.

Just to make sure I understand correctly, under the variants key, we can basically specify styles for each variant + color + state(hover, disabled, active)?
It is not clear except for colors how other CSS properties are being added. Are there some docs, or can you point me to the code that does this?

Just to make sure I understand correctly, under the variants key, we can basically specify styles for each variant + color + state(hover, disabled, active)?

Yes, those variants that you specify (higher priority) will be merged with the variants generated from the palette tokens.

It is not clear except for colors how other CSS properties are being added. Are there some docs, or can you point me to the code that does this?

It is in createCssVarsProvider.js. In line 109-113, we generate the CSS variables and the vars object from mergedTheme (palette is excluded):
const { css: rootCss, vars: rootVars } = cssVarsParser(mergedTheme, {
  prefix,
  basePrefix: designSystemPrefix,
  shouldSkipGeneratingVar,
});

then in line 216, the CSS variables is attach to global stylesheet:
<GlobalStyles styles={{ ':root': rootCss }} />


Some APIs have no test

Summary
When I run the coverage test, I find:

in AbstractUrlAssert: hasNoPath() and hasNoParameters() have no test.
in AbstractUriAssert:hasNoPath() has no test.

Actually, Intellij IDEA tells me that they are never used.
I am happy to raise this as a PR if this issue is considered valid.

Yes please, improving test coverage is always good!
This gap is also mentioned in the Sonar report: https://sonarcloud.io/component_measures?id=joel-costigliola_assertj-core&metric=new_lines_to_cover&view=list

OK, thanks! I think I may have to wait for my last PR being merged.

When I write tests for haveNoPath(), I am very confused.
According to javadoc, these assertions succeed:
assertThat(new URL("http://www.helloworld.org")).hasPath("");
assertThat(new URL("http://www.helloworld.org")).hasNoPath();

assertThat(new URI("http://www.helloworld.org")).hasPath("");
assertThat(new URI("mailto:java-net@java.sun.com")).hasNoPath();

But these assertions fail:
assertThat(new URI("http://helloworld.org")).hasNoPath();  // empty path

This assertion throws an IllegalArgumentException:
assertThat(new URL("http://helloworld.org/pages")).hasPath(null);

Well, I think this is a little confusing. I prefer to have hasPath(null)=hasNoPath()=hasPath("") both in urls and uris.


Practice Exercise- setup.sh is failing in learning module 'Create a new API in API Management from a function app' under az-204 online learning

This is autogenerated. Please review and update as needed.
Describe the bug
**Description: **
While going through the Module and Practice Exercise, while performing the step bash setup.sh run the script is failing and ended up creating a blank second function app without any function, meaning, created OrderFunction without actual function in it.
Command Name
az functionapp deployment source config-zip
Errors:
The command failed with an unexpected error. Here is the traceback:
HTTPSConnectionPool(host='orderfunctiond48098a994.scm.azurewebsites.net', port=443): Read timed out. (read timeout=3)
Traceback (most recent call last):
  File "/opt/az/lib/python3.6/site-packages/urllib3/connectionpool.py", line 426, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/opt/az/lib/python3.6/site-packages/urllib3/connectionpool.py", line 421, in _make_request
    httplib_response = conn.getresponse()
  File "/opt/az/lib/python3.6/http/client.py", line 1354, in getresponse
    response.begin()
  File "/opt/az/lib/python3.6/http/client.py", line 307, in begin
    version, status, reason = self._read_status()
  File "/opt/az/lib/python3.6/http/client.py", line 268, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/opt/az/lib/python3.6/socket.py", line 586, in readinto
    return self._sock.recv_into(b)
  File "/opt/az/lib/python3.6/site-packages/urllib3/contrib/pyopenssl.py", line 326, in recv_into
    raise timeout("The read operation timed out")
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/az/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/opt/az/lib/python3.6/site-packages/urllib3/connectionpool.py", line 725, in urlopen
    method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "/opt/az/lib/python3.6/site-packages/urllib3/util/retry.py", line 403, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/opt/az/lib/python3.6/site-packages/urllib3/packages/six.py", line 735, in reraise
    raise value
  File "/opt/az/lib/python3.6/site-packages/urllib3/connectionpool.py", line 677, in urlopen
    chunked=chunked,
  File "/opt/az/lib/python3.6/site-packages/urllib3/connectionpool.py", line 428, in _make_request
    self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
  File "/opt/az/lib/python3.6/site-packages/urllib3/connectionpool.py", line 336, in _raise_timeout
    self, url, "Read timed out. (read timeout=%s)" % timeout_value
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='orderfunctiond48098a994.scm.azurewebsites.net', port=443): Read timed out. (read timeout=3)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 231, in invoke
    cmd_result = self.invocation.execute(args)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 657, in execute
    raise ex
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 720, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 691, in _run_job
    result = cmd_copy(params)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
    return self.handler(*args, **kwargs)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/appservice/custom.py", line 390, in enable_zip_deploy_functionapp
    remove_remote_build_app_settings(cmd, resource_group_name, name, slot)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/appservice/custom.py", line 522, in remove_remote_build_app_settings
    should_contain=app_settings_should_contain)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/appservice/custom.py", line 980, in validate_app_settings_in_scm
    scm_settings = _get_app_settings_from_scm(cmd, resource_group_name, name, slot)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/appservice/utils.py", line 74, in call
    raise exception
  File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/appservice/utils.py", line 70, in call
    return func(*args, **kwargs)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/appservice/custom.py", line 1009, in _get_app_settings_from_scm
    response = requests.get(settings_url, headers=headers, auth=(username, password), timeout=3)
  File "/opt/az/lib/python3.6/site-packages/requests/api.py", line 75, in get
    return request('get', url, params=params, **kwargs)
  File "/opt/az/lib/python3.6/site-packages/requests/api.py", line 60, in request
    return session.request(method=method, url=url, **kwargs)
  File "/opt/az/lib/python3.6/site-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/opt/az/lib/python3.6/site-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/opt/az/lib/python3.6/site-packages/requests/adapters.py", line 529, in send
    raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='orderfunctiond48098a994.scm.azurewebsites.net', port=443): Read timed out. (read timeout=3)

To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

Put any pre-requisite steps here...
az functionapp deployment source config-zip -g {} -n {} --src {}

Expected Behavior
Environment Summary
Linux-5.4.0-1047-azure-x86_64-with-debian-10.2 (Cloud Shell)
Python 3.6.10
Installer: DEB

azure-cli 2.23.0

Extensions:
ai-examples 0.2.5
ssh 0.1.5

Additional Context

Screenshot of the Function App

route to service team

Please open a new issue if this still repros with the latest version of CLI.