Add option to get data from a particular extract

Allow users to get data from a given extract by name. Raise error if extract is not found and maybe suggest nearest names if there is a typo. Take OSM extract source from PbfFileReader init.
convert_extract_to_geodataframe(extract_name: str, ...)
convert_extract_to_parquet(extract_name: str, ...)

TODO:

[ ] Refactor OpenStreetMapExtract to contain name and parent fields
[ ] Add function for displaying a tree of available extracts (both in Python and in CLI)
[ ] Add name matching with existing extracts
[ ] Keep existing IDs for cache compatibility


uv attribute is undefined

TypeError: Cannot read properties of undefined (reading 'array')

My model does not have uv attribute set.

From the docs:

All geometry are expected to have all attributes being used and of the same type.


Add platform image_processing.qrcode

Description:
Add platform image_processing.qrcode
Related issue (if applicable):
Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#8208
Example entry for configuration.yaml (if applicable):
# Example configuration.yaml entry
image_processing:
  - platform: qrcode
    source:
      - entity_id: camera.door

Checklist:

[x] The code change is tested and works locally.
[ ] Local tests pass with tox. Your PR cannot be merged unless tests pass
[x] There is no commented out code in this PR.

If user exposed functionality or configuration variables are added/changed:

[x] Documentation added/updated in home-assistant.io

If the code communicates with devices, web services, or third-party tools:

[x] New dependencies have been added to the REQUIREMENTS variable (example).
[x] New dependencies are only imported inside functions that use them (example).
[x] New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
[x] New files were added to .coveragerc.

If the code does not interact with devices:

[ ] Tests have been added to verify that the new code works.

When trying to use the new QRCode component I’m getting “ImportError: Unable to find zbar shared library”.
How do we get zbar installed in hass.io images ?


Move tests to jest

What the issue is about
Right now we're using karma for some tests and jest for the other ones.
Jest is faster, so we should set up all our tests to use it
Where to start
We're using nx, check out their docs for moving to jest
Search for test in package json to see how we run tests now

Hi,
Please can I work on this issue?
Thanks.

@hansal7014 Go for it, let me know if you get stack at any point,
cc @matt-oconnell who was looking into fixing test, just FYI

@kirjs There are about 50 test files using karma (i.e. with extension '.spec.ts'). Do all of them need to be converted to use Jest? If so, I would like to break up the work app-wise given the large number of tests.

Yes, all apps should use jest in the end.
Breaking the work up per-app would make sense to me.
Also note that some tests are still broken, fixing them doesn't have to be part of this task

hey @hansal7014 there was some work done with this in #1176, not sure what your status is on this, just trying to avoid further redundant work

Hi @kirjs,
Looks like I worked on some tests which are already done in #1176. @Mutmatt, can you tell me if there are any tests remaining which need to be refactored to use Jest.

Hi @kirjs,
Looks like I worked on some tests which are already done in #1176. @Mutmatt, can you tell me if there are any tests remaining which need to be refactored to use Jest.

I primarily tried to get kirjs's tests running and functional. If you look at any other project the tests may be less functional. All of the tests should now be running under the jest framework, though.


Database query results are missing metadata from properties

Report bugs here only for the Node JavaScript library.
If you're having problems using Notion's API, or have any other feedback about the API including feature requests for the JavaScript library, please email support at<EMAIL_ADDRESS>Describe the bug
Currently the SDK doesn't give much outside of an id in the property. Equivalent request in Postman, has detailed JSON with id, type and content.
To Reproduce
Node version: v16.14.2
Notion JS library version: v2.0.0
Steps to reproduce the behavior:
const { Client } = require("@notionhq/client");

const notion = new Client({
  auth: process.env.NOTION_API_KEY
});

(async () => {
  const databaseId = process.env.NOTION_DATABASE_ID;
  const response = await notion.databases.query({
    database_id: databaseId,
    filter: {
      property: "Tags",
      multi_select: {
        contains: "italian",
      },
    },
  });

  console.log(response.results[0].properties);
  console.log(response.results[1].properties);

  process.exit();
})();

Expected behavior
Content inside database item properties
Screenshots

I thought this was a bug too, but it looks like it's intended behaviour - https://developers.notion.com/changelog/releasing-notion-version-2022-06-28
I can see why they did it, but it makes it very frustrating when I want to quickly pull property info from a number of pages at the same time.

@pnome This is a database query vs page query and the equivalent Notion curl commands yield what is stated from the Notion API docs

@Amber-Williams I'm not sure what you mean.
All I know is that prior to the most recent API update I could query a database (like you show in your code example) and I'd get all of the property details.  E.g. if I had a select property, I'd see type: select followed by select : {  all the select property info }
In the most recent version all you get is what you showed. I've been pulling my hair out for hours trying to figure out why it had disappeared, but the ChangeLog says it's intentionally stripped out and you have to make requests to the pages to get property info. The reason being that it was giving timeouts if there was too much info in a page.
If you're comparing to curl or postman, just check which version of the API is being used.
  -H 'Notion-Version: 2022-06-28' \ gives the same results as the 2.0.0 SDK

const getEntries = async () => {
    const { results } = await notion.databases.query({ database_id: databaseId});

    const property_id = results[0].properties['PROPERTY_NAME'].id;

    const propValues = results.map(async res => {
        const { id: page_id } = res;

        const props = await notion.pages.properties.retrieve({
            page_id,
            property_id,
        });

        return prop .number;
    });

    return Promise.all(props);
};

(async () => {
    const res = await getEntries();

    console.log(res);
})();

Hi @Amber-Williams, thanks for opening this issue. What you are seeing is expected behavior as explained by @pnome and @Loque18 (thanks both) and you can find more details about the thought process behind it in our changelog.
You can also find an example of how to use this new endpoint in our sample integration Sync Notion with Github Issues.
If you have any additional questions, please email us at<EMAIL_ADDRESS>Closing this out

Is there any way to fetch properties in bulk?
If not then this change is not ideal for any use case that requires properties from multiple rows - it multiplies the number of requests that a consumer needs to make by the number of rows. For a database with 10 items, a consumer needs 11 api calls to fetch all properties that they require. Given the api is already heavily rate limited this seems really prohibitive - 3 requests per second.

Yeah I get improving the performance of the initial page request call, but as @e-e-e mentions above, this makes this whole API inefficient and almost unusable.  I will continue to use an old API Version and older client until this is resolved, or I may have to find another tool to use.  The bulk option would be a good compromise, but still would require 1 additional request per page.  Maybe having an option to include full responses for specified props on the main query would be a better way.  So as a developer you can opt to pull the fields you need, but not the ones you don't need.

Oh - its actually much worse than I thought - now playing a bit more with the API, I notice that you have to make 1 additional request per property that you would like to access. So if I have a database query which returns 10 items, each with 5 extra properties that I would like to read. With this new api I have to make 10 * 5 + 1 (51) requests to fetch all the data from the query. This not very optimal.
@Amber-Williams is there any alternative?

Yeaa, I've been fetching one table that has 64 rows and 6 properties, and this change just made 1 call into, it seems, 385 (64 * 6 +1), where (64 * 5) of them are just boolean values for checkboxes.

Agreed, being able to get all the properties for a page in a single request is a far better compromise then sending a request for every property on the page.

@e-e-e I opted in to regress the API version on the row page retrieval as so
const fetchRowData = async ({ id }) => {
  const response = await fetch(`https://api.notion.com/v1/pages/${id}`, {
    headers: {
      Authorization: `Bearer ${process.env.NOTION_API_KEY}`,
      "Notion-Version": "2022-02-22",
    },
  });

  return response.json();
};

(async () => {
  try {
    const { results } = await notion.databases.query({
      database_id: process.env.NOTION_DATABASE_ID,
      filter: {
        property: "Tags",
        multi_select: {
          contains: CONTAINS_TAG,
        },
      },
    });

    const databaseRowPromises = results.map(async ({ id }) => {
      const rowData = await fetchRowData({ id });
      return {
        content: rowData.properties.content,
      };
    });

    const data = await Promise.all(databaseRowPromises);

    return data;
  } catch (error) {
    // handle error
  }
})();

That version will be phased out eventually and very well may stay like this due to Notion's use of nested pages and rollups in databases. In which case, the best solution I can think of is to batch fetch rows, cache them, and attempt to keep your cache in sync if/when your app makes updates. Also would need to make use of the GET database's last_edited_by to check if you need to re-fetch the database in instances it isn't your token's bot id. Would be interested to learn how Notion's team recommends to best use the latest version


fix issue #6

This PR addresses #6
Changes:

Add ipywidgets, bump up the llama_index version to 0.8.26 in pip install
Adjust CHUNK_OVERLAP to match the latest API (float between 0 and 1)
Set REDIS_ADDRESS=redis to match docker-compose. (previously - localhost)

Added fix for #5

OPENAI_API_VERSION declared in .env file

@antonum did you test this on Azure Openai or OpenAI or both?

Tested on both. OPENAI_API_VERSION requirement is specific to Azure and should be omitted for OpenAI. As far as I can see API specs deviated enough, so there is no single API version number that one can use for both.
I guess we can add clarification in .env.template like:
# use OPENAI_API_VERSION only when working with Azure OpenAI

Here is the version info from Azure: https://learn.microsoft.com/en-us/azure/ai-services/openai/reference
OpenAI doesn't even explicitly document OPENAI_API_VERSION, but if supplied  - responds with the following error:
'Unsupported OpenAI-Version header provided: 2023-05-15. (HINT: you can provide any of the following supported versions: 2020-10-01, 2020-11-07. Alternatively, you can simply omit this header to use the default version associated with your account.)'


[Doc Improvement][Update provision and deploy cloud resources in Teams Toolkit]

Acrolinx Scorecards
We currently enforce a minimum score of 80.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article
Score
Issues
Scorecard
Processed

msteams-platform/toolkit/provision.md
91
50
link
:white_check_mark:

More info about Acrolinx
Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

Docs Build status updates of commit 5880b5a:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

msteams-platform/toolkit/provision.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

Acrolinx Scorecards
We currently enforce a minimum score of 80.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article
Score
Issues
Scorecard
Processed

msteams-platform/toolkit/provision.md
91
50
link
:white_check_mark:

More info about Acrolinx
Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

Docs Build status updates of commit 8eabb9c:
:warning: Validation status: warnings

File
Status
Preview URL
Details

msteams-platform/toolkit/provision.md
:warning:Warning
View
Details

msteams-platform/toolkit/TeamsFx-multi-env.md
:warning:Warning
View
Details

msteams-platform/toolkit/provision.md

Line 144, Column 140: [Warning: bookmark-not-found] Cannot find bookmark '#use-an-existing-azure-ad-app-for-your-teams-app' in 'toolkit/provision.md'.
Line 145, Column 152: [Warning: bookmark-not-found] Cannot find bookmark '#use-an-existing-azure-ad-app-for-your-teams-app' in 'toolkit/provision.md'.
Line 146, Column 118: [Warning: bookmark-not-found] Cannot find bookmark '#use-an-existing-azure-ad-app-for-your-teams-app' in 'toolkit/provision.md'.
Line 147, Column 140: [Warning: bookmark-not-found] Cannot find bookmark '#use-an-existing-azure-ad-app-for-your-teams-app' in 'toolkit/provision.md'.
Line 148, Column 113: [Warning: bookmark-not-found] Cannot find bookmark '#use-an-existing-azure-ad-app-for-your-bot' in 'toolkit/provision.md'.
Line 149, Column 127: [Warning: bookmark-not-found] Cannot find bookmark '#use-an-existing-azure-ad-app-for-your-bot' in 'toolkit/provision.md'.

msteams-platform/toolkit/TeamsFx-multi-env.md

Line 77, Column 115: [Warning: bookmark-not-found] Cannot find bookmark '#use-an-existing-azure-ad-app-for-your-teams-app' in 'toolkit/provision.md'.
Line 78, Column 107: [Warning: bookmark-not-found] Cannot find bookmark '#use-an-existing-azure-ad-app-for-your-bot' in 'toolkit/provision.md'.
Line 79, Column 126: [Warning: bookmark-not-found] Cannot find bookmark '#skip-adding-user-for-sql-database' in 'toolkit/provision.md'.

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

Acrolinx Scorecards
We currently enforce a minimum score of 80.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article
Score
Issues
Scorecard
Processed

msteams-platform/toolkit/provision.md
91
50
link
:white_check_mark:

More info about Acrolinx
Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

Docs Build status updates of commit 7c6c944:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

msteams-platform/toolkit/provision.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

Acrolinx Scorecards
We currently enforce a minimum score of 80.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article
Score
Issues
Scorecard
Processed

msteams-platform/toolkit/provision.md
91
50
link
:white_check_mark:

More info about Acrolinx
Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

Docs Build status updates of commit ef10ec1:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

msteams-platform/toolkit/provision.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

Docs Build status updates of commit 1a621ef:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

msteams-platform/toolkit/provision.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

Acrolinx Scorecards
We currently enforce a minimum score of 80.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article
Score
Issues
Scorecard
Processed

msteams-platform/toolkit/provision.md
91
50
link
:white_check_mark:

More info about Acrolinx
Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

Docs Build status updates of commit 946f9e8:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

msteams-platform/toolkit/provision.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

Acrolinx Scorecards
We currently enforce a minimum score of 80.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article
Score
Issues
Scorecard
Processed

msteams-platform/toolkit/provision.md
91
50
link
:white_check_mark:

More info about Acrolinx
Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

Docs Build status updates of commit 2216bc8:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

msteams-platform/toolkit/provision.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

The content has been merged with the PR #6470


Cleanup MegaBlocks Installation

This PR cleans up the MegaBlocks installation process. Specifically, it

Adds a pyproject.toml file
Updates the README.md installation instructions
Ignores more files in .gitignore
Adds missing packages to setup.py, i.e. torch and numpy
Adds missing packages for testing to megablocks[dev], i.e. coverage, pytest, pytest_codeblocks, pytest-cov, pre-commit.
Gracefully handles missing torch while running setup.py
Fix style in setup.py: replade ' with " and add license header
Improve long_description by parsing README.md better (taken from composer)
MegaBlocks depends on stk. stk's setup.py unnecessarily imports torch which causes issues with installing stk before we have torch installed. We now install my fork of stk that fixes this issue while waiting for @tgale96 to merge my PR fixing this in stk.

I addressed all of your comments @b-chu except for the one about using my fork of stk.
My fork enables us to set up github actions for MegaBlocks, something we do not need to worry about right now. So I'm going to just use the regular stk version so we can merge this.
Thoughts?

Are we ready to merge? Any other reviewers we should notify?

Tagging @mvpatel2000 for the review before we merge this PR.

Currently using custom forks of packages to resolve installation issues:

<EMAIL_ADDRESS>for stanford-stk
<EMAIL_ADDRESS>for grouped_gemm

Blocked until these are merged. @dakinggg

Closing this PR since #127 changed a lot of things.


Add GNMT Config to Autopilot

Hi, we trained a de-en gnmt model with 8 layers LSTM encoder & decoder using sockeye. The validation bleu on newstests2016.de has reached up to 26.91 both on CPU and GPU. Also, the translate performance is very good on CPU (around 24 sentences/sec on Skylake 8180 one socket) after some optimizations. We are going to add the model config to autopilot to enable out-of-box GNMT task.
@pengzhao-intel @TaoLv
Pull Request Checklist

[x] Changes are complete (if posting work-in-progress code, prefix your pull request title with '[WIP]'
until you can check this box.
[x] Unit tests pass (pytest)
[x] Were system tests modified? If so did you run these at least 5 times to account for the variation across runs?
[x] System tests pass (pytest test/system)
[x] Passed code style checking (./style-check.sh)
[ ] You have considered writing a test
[ ] Updated major/minor version in sockeye/__init__.py. Major version bump if this is a backwards incompatible change.
[ ] Updated CHANGELOG.md

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

The model in this PR is aligned with #479

I am not sure we should call this model 'gnmt'. I assume you are referring to the models in https://arxiv.org/pdf/1609.08144.pdf. Do they also use an embedding size of 256 for example?
I would prefer renaming this configuration to something like '8-layer rnn' to highlight the different architecture to the transformer. We can add a comment or description that this configuration resembles the 'GNMT' architecture described in https://arxiv.org/pdf/1609.08144.pdf.

@fhieber Thanks for advice. I think this config is not exactly the same as GNMT described in paper but is very similar with it and has very good performance and accuracy. However, GNMT in paper also has more than one combinations. It's main idea is to use LSTMs as encoder and decoder and  I think it is free for users to choose 256 or 512 as embedding size and any other configs like encoder/decoder layer numbers, hidden layer numbers, right?

Do the settings not exactly match the GNMT paper?  I like the idea of having presets that correspond to particular published models, but I also agree that we shouldn't call something "GNMT" when it's not.  Perhaps something like gnmt_like to indicate this is as close as we can get in Sockeye and see comparable BLEU scores?

@mjdenkowski Thanks for your advice, I've changed the mdoel name to gnmt_like and add a comment when using this config This is an 8 layer LSTMs model which can resembles the 'GNMT' architecture. And all tests have passed:)

I think implementing more famous published models can really help improve the community of framework and toolkits like sockeye. GNMT is one of this kind of famous models. So we are trying to implement and train it on the top of mxnet and sockeye. I know GluonNLP is also trying to do something similar.
Here in this PR, we want to present a GNMT model as close as possible to the original paper, and also want to make it comparable to the TF implementation for both accuracy and performance. As @xinyu-intel mentioned, we have got 26.91 for BLEU on both CPU and GPU. If you are interested in the performance of this model, I think @xinyu-intel can also share some initial data for it. Anyway, I think it would be great if we can figure out that mxnet and sockeye have the same GNMT model which has better performance compared with other frameworks, right?
So if you find anything in this PR does not align with the original GNMT paper or TF implementation, please kindly point it out. Or if you have a more general implementation for GNMT, please kindly share it with us if possible. We are pleased and looking forward to working with the sockeye community to make this happen.

Totally agree with you @TaoLv and I think its great to have a well-working RNN-type model readily available in Sockeye for others to use! My point was to ask how sure you (or others) are that this configuration is as close as possible to the GNMT model (given that there was a discussion around the correct parameters in #479). I haven't looked into replicating GNMT models in Sockeye, but did for the transformer and there, many details (down to embedding initialization, scaling etc.) are crucial to reproduce published results.
If the config in this PR does equally or better than published results in the GNMT paper, this is awesome! But we should try to be extremely clear on what number in the paper we are comparing against, how we compute it, how - to the best of our knowledge - the setup differs from the published paper, and what language pair/dataset we are reporting this on.
Again, more presets/configs for Sockeye autopilot are super welcome and helpful, but in my experience replicating published models across different toolkits and frameworks in a fair way can be quite complex, and before we make any claim that GNMT models in MXNet/Sockeye do better than previously published results, we need to be absolutely sure about it.
That said, calling the current config gnmt_like is absolutely fine with me and you can always iterate on it to make it more precise (maybe to eventually call it gnmt).

You're right @fhieber. It's not an easy task to implement a publised model and reproduce the accuracy of it. That's why we want to provide model zoo, pre-trained models and fixed configurations to end users. I'm quite OK if you want to merge this PR as a gnmt_like configuration for now. And I still think it's a good start point for us to push this effort forward to create a more general, comparable and efficient GNMT model based mxnet and sockeye.

Can you update the minor version and changelog?

@mjdenkowski added

Glad to see this PR was merged. Now, sockeye autopilot supports both transformer and gnmt_like. So do you think we need to adjust the README of autopilot to promote that and tell users how to run gnmt_like and reproduce the accuracy. @xinyu-intel @fhieber


Not Generating Fields for Customer Type

Generated a class for an entity which has a field with type 'Customer', the special type which can be linked to either Contact or Account entity but the generator didn't add any field(s) for it, all I can see that it has added couple of constants for it under Properties class.
public class Properties
{
            public const string createdby = "createdby";

            public const string createdonbehalfby = "createdonbehalfby";

            public const string Customer_account = "Customer_account";

            public const string Customer_contact = "Customer_contact";
}

Not sure if this is a bug or there's a special way to deal with this? If latter then some example code on how to set it would be highly appreciated.

Hi, could you provide more details? What entities are you trying to generate? What version of CRM?


Question: OCR scoring in the data pipeline

In your reports, use OCR to identify the text in the images and then eliminate scenes with too much text.
I want to know why too much text affects the model generation.
If so, does that mean that it's difficult to improve the model for text generation, such as newspapers, streets with billboards, and various signs on the driveway lines?

We follow the SVD's pipeline. If the video contains much text, it is hard to generate as the captioning model cannot get the text.
In the future, we plan to use OCR model to generate additional captions for generation, and thus make the model able for text generation.


Update arch

My bad, didn't specify but please use Stevia in your views/cells as in ShopTableViewCell/ShopView


Refactored the Mounter::ApplicationWrapper

I didn't go as far as I could, but I basically had the ApplicationWrapper (and therefore Padrino) register itself with the application that is being mounted by setting a @padrino_wrapper class variable on the application. This means that you can customize your app to work better within a Padrino environment.

We will probably won't be able to merge this PR after a5b260fe6fab7b96f91d1af85534fd660ee4a7db. Thank you for addressing the issue though.


fix: revert use Uniform Bucket Level Access in Cloud Storage

Reverts GoogleCloudPlatform/terraform-dynamic-python-webapp#115
The underlying django-storages library does not support uniform bucket level access by default. If it is supported, it's not documented. For now, reverting this change.

Test failure is due to n1-standard-1 availability.


Warning: VirtualizedLists should never be nested inside plain ScrollViews with the same orientation

I am getting this warning since the new expo SDK 36 update. I was able to solve these warnings by wrapping every <Flatlist> with <SafeAreaView> but I can't seem to find a way to do the same with <KeyboardAwareScrollView>.
Any thoughts on this?
Wrapper Component utilizing KeyboardAwareScrollView
import React, { FC } from 'react';
import {
  KeyboardAwareScrollView,
  KeyboardAwareScrollViewProps,
} from 'react-native-keyboard-aware-scroll-view';

/*
 * THE KEYBOARD IS LAVA 🔥🔥🔥
 * */

export const KeyboardAwareView: FC<KeyboardAwareScrollViewProps> = ({ children, ...rest }) => {
  return <KeyboardAwareScrollView {...rest}>{children}</KeyboardAwareScrollView>;
};

KeyboardAwareView.defaultProps = {
  resetScrollToCoords: { x: 0, y: 0 },
  scrollEnabled: true,
  enableOnAndroid: true,
  contentContainerStyle: {
    flexGrow: 1,
    alignItems: 'stretch',
  },
};

Usage
 // Adding <SafeAreaView> here does nothing
<Screen alignItems={'stretch'} justifyContent={'flex-start'}>
          // Adding <SafeAreaView> here does nothing
      <KeyboardAwareView>
             // Adding <SafeAreaView> here does nothing
            <ProfileImage
              onPick={({ uri }) =>
                this.setState(prevState => ({ ...prevState, photo: uri }), this.handleUserInfoSubmit)
              }
              placeholderURI={user.photoURL}
            />
            <ProfileHeading>{user.displayName}</ProfileHeading>
            <ProfileText>{user.email}</ProfileText>

            <ProfileForm>
              <Field>
                <Subheading>{i18n.t('screens.profile.settings.inputs.name')}</Subheading>
                <Input
                  placeholder={'Full Name'}
                  autoCapitalize={'words'}
                  autoCorrect={false}
                  keyboardType={'name-phone-pad'}
                  autoCompleteType={'name'}
                  onChangeText={displayName => this.handleUserInfoInput('displayName', displayName)}
                  value={displayName}
                  defaultValue={user.displayName}
                />
              </Field>

              <Field>
                <Subheading>{i18n.t('screens.profile.settings.inputs.email')}</Subheading>
                <Input
                  placeholder={'Email'}
                  keyboardType={'email-address'}
                  autoCapitalize={'none'}
                  autoCorrect={false}
                  autoCompleteType={'email'}
                  onChangeText={email => this.handleUserInfoInput('email', email)}
                  value={email}
                  defaultValue={user.email}
                />
              </Field>

              <Field>
                <Subheading>{i18n.t('screens.profile.settings.inputs.phoneNumber')}</Subheading>
                <ChangePhoneNumber defaultValue={user.phoneNumber} />
              </Field>
            </ProfileForm>

            <Button onPress={() => (changed ? this.handleUserInfoSubmit() : logout())}>
              {changed
                ? i18n.t('screens.profile.settings.button.updateInfo')
                : i18n.t('screens.profile.settings.button.logout')}
            </Button>
          </KeyboardAwareView>
      </Screen>

Warning:
VirtualizedLists should never be nested inside plain ScrollViews with the same orientation - use another VirtualizedList-backed container instead.
- node_modules/expo/build/environment/muteWarnings.fx.js:18:23 in warn
- node_modules/react-native/Libraries/Lists/VirtualizedList.js:1054:16 in ScrollView.Context.Consumer.props.children
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:14701:25 in updateContextConsumer
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:20459:25 in beginWork$$1
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:19370:24 in performUnitOfWork
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:19347:39 in workLoopSync
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:18997:22 in renderRoot
* [native code]:null in renderRoot
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:18709:28 in runRootCallback
* [native code]:null in runRootCallback
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:5642:32 in runWithPriority$argument_1
- node_modules/scheduler/cjs/scheduler.development.js:643:23 in unstable_runWithPriority
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:5638:22 in flushSyncCallbackQueueImpl
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:5627:28 in flushSyncCallbackQueue
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:18796:28 in batchedUpdates$1
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:2709:30 in batchedUpdates
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:2794:17 in batchedUpdates$argument_0
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:2814:26 in receiveEvent
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:436:47 in __callFunction
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:111:26 in __guard$argument_0
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:384:10 in __guard
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:110:17 in __guard$argument_0
* [native code]:null in callFunctionReturnFlushedQueue

Environment:
  Expo CLI 3.11.2 environment info:
    System:
      OS: macOS 10.15.1
      Shell: 5.7.1 - /bin/zsh
    Binaries:
      Node: 12.14.0 - /usr/local/bin/node
      Yarn: 1.21.0 - /usr/local/bin/yarn
      npm: 6.13.4 - /usr/local/bin/npm
    IDEs:
      Xcode: 11.3/11C29 - /usr/bin/xcodebuild
    npmPackages:
      @types/react: ^16.9.9 => 16.9.16
      @types/react-native: ^0.60.21 => 0.60.25
      expo: ^36.0.0 => 36.0.1
      react: 16.9.0 => 16.9.0
      react-native: https://github.com/expo/react-native/archive/sdk-36.0.1.tar.gz => 0.61.4
      react-navigation: ^4.0.10 => 4.0.10
    npmGlobalPackages:
      expo-cli: 3.11.2

1 same issue

Same issue

It's been a year, but I have done some digging and I think this answers the question why its happening.
(https://forums.expo.io/t/warning-virtualizedlists-should-never-be-nested-inside-plain-scrollviews-with-the-same-orientation-use-another-virtualizedlist-backed-container-instead/31361/9)
In terms of a solution... perhaps trying KeyboardAwareFlatList instead of  KeyboardAwareScrollView could resolve the issue.

I've also got this problem here

Hi,
This issue is weird because the library works perfectly when this is the root component (before navigation component).
But if I want to avoid this kind of nesting, I get strange scroll behaviour (wrong place or huge padding).
What can we do to avoid both issues ?
Regards

anyone has found a solution to this issue? im encountering it now

I found a temporary work around.
             <ScrollView                 style={{ flex: 1 }}                 contentContainerStyle={{ width: SCREEN_WIDTH }} scrollEnabled={false}                 horizontal>                 <FlatList                  {...}                 />             </ScrollView>
It worked for my scenario


Work in progress: Cleanup of crawler.py and getting rid of crawlutils.py in favor of pretty objects

@ricarkol: some tests failing due to reference to crawlutils

Yeap, the tests side is not ready yet, that's mainly the work-in-progress.
On Wed, Nov 23, 2016 at 2:59 PM, Sahil Suneja<EMAIL_ADDRESS>wrote:

@ricarkol https://github.com/ricarkol: some tests failing due to
reference to crawlutils
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/cloudviz/agentless-system-crawler/pull/200#issuecomment-262616561,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AK6ydefjuRFGSfgy30lsPHW8YnUIeLJGks5rBJsUgaJpZM4K4SOV
.

Current coverage is 88.83% (diff: 81.25%)

Merging #200 into master will decrease coverage by 0.69%

@@             master       #200   diff @@
==========================================
  Files            70         76     +6
  Lines          3343       3322    -21
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
- Hits           2993       2951    -42
- Misses          350        371    +21
  Partials          0          0

Powered by Codecov. Last update d1bfd24...2958569

Great! Merging.


[AutoMM] Update conv-lora readme

Issue #, if available:
Description of changes:
Update readme by putting the installation at the beginning since downloading the datasets also requires the installation.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.


adds annotations and logic (all_of, any_of, one_of, not) constraints for review

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

No feedback nor changes made; closing


[DNM] Test branch for Swift-DocC library evolution changes

Do not merge, this is a PR to test https://github.com/apple/swift-docc/pull/123, https://github.com/apple/swift-docc-symbolkit/pull/22, https://github.com/apple/swift-markdown/pull/34

https://github.com/apple/swift-docc/pull/123
https://github.com/apple/swift-docc-symbolkit/pull/22
https://github.com/apple/swift-markdown/pull/34
@swift-ci please build toolchain macOS platform

https://github.com/apple/swift-docc/pull/123
https://github.com/apple/swift-docc-symbolkit/pull/22
https://github.com/apple/swift-markdown/pull/34
@swift-ci please build toolchain Linux platform


[Feature] Broker support COS posix bucket

Why I'm doing:
What I'm doing:
This PR adds the support of COS posix bucket.
With broker, you can use Broker Load to load data from COS posix bucket, and use SELECT INTO OUTFILE to export data to COS posix bucket.
This is maily inspired by https://cloud.tencent.com/document/product/436/82208.
LOAD LABEL db0.label3 (     DATA INFILE("cosn://xxx/some.parquet")     INTO TABLE tbl_student     FORMAT AS "parquet"     (name, age)  ) WITH BROKER  srbroker (
"fs.cosn.bucket.endpoint_suffix" = "cos.ap-guangzhou.myqcloud.com",
"fs.cosn.userinfo.region"="ap-guangzhou",
"qcloud.object.storage.ranger.service.address"="<IP_ADDRESS>:9999",
"hadoop.security.authentication"="kerberos",
"fs.ofs.tmp.cache.dir"="/tmp","fs.cosn.trsf.fs.ofs.user.appid"="12345",
"qcloud.object.storage.kerberos.principal"="hadoop/<IP_ADDRESS>@EMR-ABC",
"kerberos_principal"="hadoop/<IP_ADDRESS>@EMR-ABC",
"kerberos_keytab"="/var/krb5kdc/emr.keytab"
);

SELECT * FROM tbl_student INTO OUTFILE "cosn://some_bucket/parquet/" FORMAT AS PARQUET PROPERTIES (
"broker.name"="srbroker",
"fs.cosn.bucket.endpoint_suffix" = "cos.ap-guangzhou.myqcloud.com",
"fs.cosn.userinfo.region"="ap-guangzhou",
"qcloud.object.storage.ranger.service.address"="<IP_ADDRESS>:9999",
"hadoop.security.authentication"="kerberos",
"fs.ofs.tmp.cache.dir"="/tmp","fs.cosn.trsf.fs.ofs.user.appid"="12345",
"qcloud.object.storage.kerberos.principal"="hadoop/<IP_ADDRESS>@EMR-ABC",
"kerberos_principal"="hadoop/<IP_ADDRESS>@EMR-ABC",
"kerberos_keytab"="/var/krb5kdc/emr.keytab"
);

Fixes https://github.com/StarRocks/starrocks/issues/46020
What type of PR is this:

[ ] BugFix
[x] Feature
[ ] Enhancement
[ ] Refactor
[ ] UT
[ ] Doc
[ ] Tool

Does this PR entail a change in behavior?

[ ] Yes, this PR will result in a change in behavior.
[x] No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

[ ] Interface/UI changes: syntax, type conversion, expression evaluation, display information
[ ] Parameter changes: default values, similar parameters but with different default values
[ ] Policy changes: use new policy to replace old one, functionality automatically enabled
[ ] Feature removed
[ ] Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

[ ] I have added test cases for my bug fix or my new feature
[x] This pr needs user documentation (for new or modified features or behaviors)

[ ] I have added documentation for my new feature or new function

[ ] This is a backport pr

Bugfix cherry-pick branch check:

[x] I have checked the version labels which the pr will be auto-backported to the target branch

[x] 3.3
[x] 3.2
[x] 3.1
[ ] 3.0

@mergifyio backport branch-3.3 branch-3.2 branch-3.1


fix(charts/osm/templates): fixes syntax for tracingAddress

Description:
Adds small fix to tracingAddress for preset-mesh-config.yaml
Signed-off-by: Shalier Xia<EMAIL_ADDRESS>
Testing done:

Affected area:

Functional Area

Other
[ x]

Please answer the following questions with yes/no.

Does this change contain code from or inspired by another project? no

Did you notify the maintainers and provide attribution?

Is this a breaking change? no

Codecov Report

Merging #4140 (71ca42b) into main (ed07ca6) will not change coverage.
The diff coverage is n/a.

:exclamation: Current head 71ca42b differs from pull request most recent head 5252ddf. Consider uploading reports for the commit 5252ddf to get more accurate results

@@           Coverage Diff           @@
##             main    #4140   +/-   ##
=======================================
  Coverage   69.48%   69.48%
=======================================
  Files         210      210
  Lines       11423    11423
=======================================
  Hits         7937     7937
  Misses       3433     3433
  Partials       53       53

Flag
Coverage Δ

unittests
69.48% <ø> (ø)

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

Continue to review full report at Codecov.

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


Remove etcdsnapshot controller from imported cluster

Issue:  #38711

Problem

When the  S3  ETCD snapshots backup is configured directly through RKE2 the rke2 configMap that is used to generates ETCDSnapshots is populated.
Once that cluster is imported Rancher creates ETCDSnapshots based on the configMap but never deletes them.
The deletion occurs based on a machine-plan secret that doesn't exist for imported clusters.
Solution

The ETCDSnapshots are used to store the snapshot location and to be "recovered" on rancher UI. That only can be done to clusters administrated by rancher .
Do not register the snapshotbackpopulate controller for imported clusters.
Testing

Engineering Testing
Manual Testing

Create a cluster with etcds s3 backup configured. Import it to rancher. Check if the ETCDSnapshots were created (they were not supposed to be created).
Create a cluster through rancher with etcds s3 backup enabled.   Please squash on merge, thanks


connection detection or indicator

Show/have indicator when PC lost internet connection or offline so that user knows before taking important actions multiple times... like transfer, comment, post, etc.

implemented


crashes on this object

const deepAssign = require('assign-deep')

const a = {
  b: {}
}

a.b = a

console.log(deepAssign({}, a))

actually isn't this expected? Or should this scrub circular references first? Seems like that is outside the scope of this lib but I'm open to feedback

I think an error similar JSON.stringy(a) gives would be easier to track down for anyone stumbling upon this:
[TypeError: Converting circular structure to JSON]

closing since I think this library does what is intended


uBo WE and retention of blocklists

See: https://discourse.mozilla.org/t/support-ublock-origin/6746/527

This only happens if the indexedDB is disabled by the user.js or PB mode.
I have set Firefox to clean everything on exit without using the PB mode or indexedDB disabled and my lists survive closing the browser.
Using eCleaner will kill the indexedDB, so you need to download and rebuild your blocklists every Firefox start.
There is nothing we can do about this except enabling the indexedDB, disabling PB mode and don't using eCleaner, until Mozilla or Gorhill changes something.

@Forsaked What's your definition of PB mode?
Since you have Firefox cleaning everything on exit, doesn't it delete indexedDB?

My "definition" of PB mode is browser.privatebrowsing.autostart=true, which prevents Firefox in using the indexedDB even if it's enabled in the prefs.
With everything i mean, everything what Firefox itself can clean up on exit: cache, cookies, downloads, formdata, history, offline Apps, sessions and site Settings.

@Forsaked Hmmm... I set up a test with browser.privatebrowsing.autostart=false and dom.indexedDB.enabled=true, and set Firefox to clean everything on exit.  When I do this, uBo loses its blocklists, and they have to be re-downloaded every time the browser starts.
Do you have a different experience?

Yes, my lists don't get cleared.

@Forsaked Thanks. When you restart the browser, and go to the 3rd-party-filters tab in uBo, is the Update now button yellow?

As i told you, no.
I was using the PB mode before the native WE of uBlock landet.
Then i tried to enable the indexedDB only to find out that it is still disabled in PB mode.
So i was forced to disable PB mode and enable indexedDB.
Since then my filter lists stay and i don't need to download them every restart of Firefox, except there is an update.

@Forsaked Sounds good.  We are seeing different things.  Not sure why.  What version of Firefox are you using?

Stable, but also tested on Beta and Nightly.
Did you still use eCleaner?
FF + PB + iDB disabled = uBO list wipe
FF + PB + iDB enabled = uBO list wipe
FF + iDB disabled = uBO list wipe
FF + iDB enabled = uBO works, no wipe

PB mode does not use IDB, so this affects extensions that use it. eg uBo. It will also affect uMatrix when it ports - as this too will use IDB for cached assets. Stylus also uses IDB (but stores the data in profile\browser-extension-data rather than profile\storage ) so I assume that Stylus also breaks in various ways in PB mode - IDK. PB mode also blocks access to cookies. PB Mode is not the magical thing people assume it is. It's very limited IMO.
FF + PB + iDB disabled = uBO list wipe - pointless test as it's PB mode!!
FF + PB + iDB enabled = uBO list wipe - pointless test as it's PB mode!!
FF + iDB disabled = uBO list wipe
FF + iDB enabled = uBO works, no wipe
^^ exactly as Forsaked said. uBo uses IDB and PB mode does not

This only happens if the indexedDB is disabled by the user.js or PB mode.

^^ exactly as Forsaked said

@Gitoffthelawn

I set up a test with browser.privatebrowsing.autostart=false and dom.indexedDB.enabled=true, and set Firefox to clean everything on exit. When I do this, uBo (WebExtensions version) loses its blocklists, and they have to be re-downloaded every time the browser starts.

autostart = false = default
IDB = true = default

So in other words, just use a nilla profile and add uBo, update lists, close, open, check lists - I bet the IDB cache is not wiped
You need to then test with various clear on shutdown items to see IF any of those are clearing IDB. Then try using "everything" under "clear recent history" dialog, etc.
AFAIK nothing clears IDB via the interface or options (but I never checked in-depth)

@Forsaked Not using eCleaner.
@Thorin-Oakenpants Yes.... I'll need to do that.  I thought clearing cookies or offline website data cleared IDB (most likely the latter)... will have to do some experimentation.

@Thorin-Oakenpants Fun Fact: If indexedDB is enabled while in PB mode (which makes it inaccessible), sites which require the indexedDB like Outlook Web App and other, are working.
I think they only check if it is enabled but don't use it.

^^ Yeah. the pref effectively disables the API, but PB mode do it slightly differently (because it is not good to flip pref values like that - eg see RFP decided against this method). It was mentioned here https://www.wilderssecurity.com/threads/firefox-and-indexeddb.395113/ in the first post
my edit in brackets

I've [removed write access to relevant indexedDB folder(s) - same as simulating PB mode] and haven't run into any problems on sites which make use of IndexedDB. It seems that those sites still think that IndexedDB is available although they cannot write to those folders mentioned above.

I figured out the issue.  Thanks to @Forsaked and @Thorin-Oakenpants for their assistance.
I run Firefox within a script.  (I've been meaning to share that script for a while.)  As part of its duties, the script clears out ..\storage\default within the profile.
It turns out, uBo WE stores its data in ..\storage\default.  'nuff said.
What's curious is that some other extensions store their data in ..\storage\permanent.  Besides uBo, I don't know of any other extensions that store their data in ..\storage\default.  To be clear, I'm not saying that any extensions (including uBo) are storing their data in the wrong place.
Anyone understand the difference between ..\storage\default, ..\storage\permanent, and ..\storage\temporary?

right .. so I don't have to waste my time testing clearing IDB then - currently (AFAIK and from numerous zilla tickets) there is nothing in the UI/settings or about:config that will clear IDB, but this will change and the changes better leave extension and internal shit alone
So we can close this then?

Anyone understand the difference between ..\storage\default, ..\storage\permanent, and ..\storage\temporary?

Also stylus uses IDB but seems to store it elsewhere - see earlier comment. Anyone want to look up Storage API limitations etc?

https://bugzilla.mozilla.org/show_bug.cgi?id=1333050 - Implement clearing of IndexedDB in browsingData API - RESOLVED FIXED 58+
https://bugzilla.mozilla.org/show_bug.cgi?id=1047098 - 'Clear Recent History' with 'Cache' or 'Offline Website Data' doesn't clear...  - RESOLVED FIXED 58+
https://bugzilla.mozilla.org/show_bug.cgi?id=1275599 - [meta] Add a site permission management interface - RESOLVED FIXED - FYI

So we can close this then?

One unresolved question before we close:
Anyone understand the difference between ..\storage\default, ..\storage\permanent, and ..\storage\temporary?

https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API/Browser_storage_limits_and_eviction_criteria
can we close this now?

Good find.  Thank you.  Closing now...

Interesting. I actually wiped everything in my permanent folder with FF closed. Restarted FF and voila, I FINALLY have a Stylus' IDB turn up (under default). Also a literal f**ktonne of console errors from one legacy addon has now disappeared. I wonder if something in permanent/chrome was blocking IDB - might explain why I haven't seen anything for the 5 weeks I've had it on. Spooky!
The permanent entries chrome auto reappeared and indexeddb+++fx-devtools did as well as soon as I opened devtools. Another one called moz-safe-about+home has not come back. In my 56 test profile that folder doesn't exist.

^^ as per https://github.com/ghacksuserjs/ghacks-user.js/issues/234#issuecomment-329529558
Those two sites I already have configured to allow JS, images, etc - bare minimum (not cookies) - HuffPo and Guardian, that do not need service workers to spawn idb, I still get nothing - so that's good.
This is about the third major quirk I have come across. Really considering starting a brand new clean profile in 57


swag cant install

I cant install swag

Your swag version
last
Your go version
1.13.6 windows/amd64

Same here, for a workaround I use the binary of this release https://github.com/swaggo/swag/releases/tag/v1.6.4

Same here, for a workaround I use the binary of this release https://github.com/swaggo/swag/releases/tag/v1.6.4

thanks, how can i install binary file?

Same here, for a workaround I use the binary of this release https://github.com/swaggo/swag/releases/tag/v1.6.4

thanks, how can i install binary file?

A better solution for your is just to use this command: go get -u<EMAIL_ADDRESS>In my case I was using a dockerfile and I just needed the binary, so I used wget to download it and I used it.

v1.6.4 or v1.6.5 ?

v1.6.4 or v1.6.5 ?

Last one, v1.6.5, also it is the same error as this old issue https://github.com/swaggo/swag/issues/556, but the fix got reverted recently.

@easonlin404

1.6.5

@bkocadere I think it caused by GO111MODULE=auto, can you execute:
export GO111MODULE=on

and try again
go get -u github.com/swaggo/swag/cmd/swag

@bkocadere I think it caused by GO111MODULE=auto, can you execute:
export GO111MODULE=on

and try again
go get -u github.com/swaggo/swag/cmd/swag

thanks, how can use 'export' in cmd screen ?

sorry, I didn't note that you use windows environment, please refer https://superuser.com/questions/79612/setting-and-getting-windows-environment-variables-from-the-command-prompt/79614 to set environment variables like:
SET GO111MODULE=on

sorry, I didn't note that you use windows environment, please refer https://superuser.com/questions/79612/setting-and-getting-windows-environment-variables-from-the-command-prompt/79614 to set environment variables like:
SET GO111MODULE=on

thanks , working

Yo should close this issue, the bug is still here.

Please use the latest version against master to try again, the issue shoud be fixed by #618.

@bkocadere I think it caused by GO111MODULE=auto, can you execute:
export GO111MODULE=on

and try again
go get -u github.com/swaggo/swag/cmd/swag

Thanks! Its working. I had days with this problem


Support for playing files in jar archive

Use case description
Main use case is about playing files inside APK with not only for example Uri:
Uri.parse(("file:///android_asset/music.mp3"))
But to be able to use files located in jar archive. For example Uri:
jar:file:/data/app/~~4hhLse7uFXE7V7sA==/com.example.composetest-jD6eQ3BeyvfQ==/base.apk!/composeResources/com.example.shared.resources/files/music.mp3
This approache can be used for multiplatform applications (e.i. multiplatform media players using AVPlayer on iOS and Exoplayer on Android with shared code) using Compose Multiplatform which will generated resources Uri for files inside common/shared directory. Mentioned directory "android_asset" is not accessible on iOS and generated resources Uri can't be used on Android. Media files needs to be duplicated to proper platform dependend directories.
More about Compose Multiplatform resources:
https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-images-resources.html
Proposed solution
Be able to use following code:
val mediaItem = MediaItem.Builder().setUri(Res.getUri("files/music.mp3")).build()
Alternatives considered
Only solution I can think of is using custom MediaSource and handling InputStream using method from Compose Multiplatform:
Res.readBytes("files/music.mp3")
with solution mentioned for example here (Exoplayer issue)
Similar issue is opened in Compose Multiplatform repository here and support from this side is not coming. The reasons are mentioned there.
Thank you for consideration!

I can see two possible options here:

The proposed suggestion, which boils down to creating a DataSource implementation that can handle jar: URIs. It seems that, in general,jar: URIs might not be only jar:file:, they could also be jar:http: - see docs here: https://developer.android.com/reference/java/net/JarURLConnection

I suppose we could strictly only support jar:file: URIs
This still seems fiddly though, we will need to handle the general case of locating the JAR file on disk, and then opening it, unless we require the caller to guarantee the bit after the ! can be passed to Class.getResourceAsStream or similar (not sure how that works with e.g. split APKs on Android).

Define a new media3-specific URI scheme for accessing Compose resources specifically, e.g. "composeresource://files/music.mp3", and implement a DataSource that supports these by using Res.readBytes(...).

(2) seems to solve the problem described here, without the fiddliness introduced by (1).
The downside of (2) seems to be that we can only read the entire file into memory in one go, which might not be great for large media files. On the other hand, large media files probably shouldn't be baked into the APK in the first place...
I'm tempted to go with (2), and maybe in future Compose Multi-Platform will add some first-class support for reading resources 'incrementally' and we can update our implementation to use that.

Ah, I didn't realise that the Res class is generated and project-specific, like R classes on Android:

After importing a project, a special Res class is generated which provides access to resources.

This makes (2) a little trickier, though we can either take a super-type of this generated Res class (if one exists) in the constructor of the new DataSource, or instead take a callback that resolves a path to a byte[].

In the meantime, I think you can make this work yourself by defining your own DataSource that wraps ByteArrayDataSource. The only tricky part is that you have to delay the instantiation of ByteArrayDataSource until your outer DataSource.open is called (and this causes a bit of messiness with TransferListener handling). Something like (this uses java.util.Function so you either need to desugar, or min API >= 24, but you could define your own UriResolver interface instead to avoid this). I haven't tested this:
public final class ResolvingByteArrayDataSource implements DataSource {

  public static final class Factory implements DataSource.Factory {

    private final Function<Uri, byte[]> uriResolver;

    public Factory(Function<Uri, byte[]> uriResolver) {
      this.uriResolver = uriResolver;
    }

    @Override
    public DataSource createDataSource() {
      return new ResolvingByteArrayDataSource(uriResolver);
    }
  }

  private final Function<Uri, byte[]> uriResolver;
  private final ArrayList<TransferListener> listeners;

  @Nullable private ByteArrayDataSource delegate;
  @Nullable private Uri uri;

  private ResolvingByteArrayDataSource(Function<Uri, byte[]> uriResolver) {
    this.uriResolver = uriResolver;
    this.listeners = new ArrayList<>(/* initialCapacity= */ 1);
  }

  @Override
  public long open(DataSpec dataSpec) throws IOException {
    uri = dataSpec.uri;
    delegate = new ByteArrayDataSource(uriResolver.apply(uri));
    for (TransferListener listener : listeners) {
      delegate.addTransferListener(listener);
    }
    return delegate.open(dataSpec);
  }

  @Override
  public int read(byte[] buffer, int offset, int length) throws IOException {
    return delegate.read(buffer, offset, length);
  }

  @Override
  public void addTransferListener(TransferListener transferListener) {
    if (!listeners.contains(transferListener)) {
      listeners.add(transferListener);
    }
    if (delegate != null) {
      delegate.addTransferListener(transferListener);
    }
  }

  @Nullable
  @Override
  public Uri getUri() {
    return uri;
  }

  @Override
  public void close() throws IOException {
    uri = null;
    delegate.close();
    delegate = null;
  }
}

Then you would set your player up with this (see https://developer.android.com/media/media3/exoplayer/customization) - this makes your player only work with 'kotlin multi platform' URIs:
ExoPlayer player =
    new ExoPlayer.Builder(/* context= */ this)
        .setMediaSourceFactory(
            new DefaultMediaSourceFactory(
                new ResolvingByteArrayDataSource(uri -> Res.readBytes(uri.getPath())))
        .build();

And you should then be able to play a resource like this:
player.addMediaItem(MediaItem.fromUri("files/music.mp3"));

First thing - great thank to you for all the help and ideas so far! I really appreciate it.
I have tested code above and it's working. I have few things if someone will reuse it too - possibly from Kotlin code:
a)
val uriResolver = { uri: Uri? -> runBlocking { Res.readBytes(uri?.path ?: "") } }
readBytes() is suspend function so it needs to be called similar to this
val player = ExoPlayer.Builder(context).setMediaSourceFactory(         DefaultMediaSourceFactory(ResolvingByteArrayDataSource.Factory(uriResolver))).build()
b) Don't forget to add also media3-common and media3-datasource to Gradle dependencies
c) Convert ResolvingByteArrayDataSource to Kotlin too. I was getting strange NoClassDefFoundError, surely something wrong on my side.
d) Information about desugaring (running this on API level below 24) can be found here.
As you mentioned above about delaying instantiation of  ByteArrayDataSource - mentioned runBlocking { } should do the trick if I understand your point correctly. Surely not pretty solution.
In case that option (2) is way to go - should I create new issue on Compose Multiplatform side about Res.readBytes() reading in on go as you mentioned above? Or it will be more clear what kind of interface will be needed as this will be implemented on this side? In short - let me know if I can do something more. And thanks again.

@Woren I am assuming you don't have a lot of files at hand, a little workaround approach to do is via offloading the files inside the jar to the app's contextual private files directory (Which on Android equals to filesDir, whereas on iOS it is NSHomeDirectory). At app launch, I'd perform some background task through IO coroutines to move them to filesDir for easy and fast access later with media3

@yuroyami Before Compose Multiplatform Resources generation (since 1.6.0) I was using mentioned file:///android_asset and compose-resources (similar but now afaik deprecated approach) directory for other platforms using expect/actual access to those assets. Then I had script which copied files to Android assets directory before build. In my opinion better approach then doing it on each device (wasting resources) and handling updates (adding, removing files etc.) which can be error prone. Also in my case it can be hundreds mostly small files so time for copying will not be on my side.
But as mentioned before workaround using uriResolver seams to be working for now so hopefully until proper solution by Media3/Exoplayer library there will be no need another one. But thanks for the idea! I will keep in mind for another possible problems in other areas. And surely there will be some.

https://github.com/androidx/media/commit/4dd83606931a95bb874ff00407aa8fad02a4328c changes the library's ByteArrayDataSource to allow passing a UriResolver into the constructor that is called during open(), so the wrapper class described above is no longer needed (I will edit my comment).
We are not currently planning any tighter integration with Kotlin Multiplatform Resources - partly because it looks like it will require some additional dependencies that are currently tricky to resolve in the environments where we develop and deploy this library (and it would probably also need to be in a new extension module). I will leave this issue open to track doing something more closely integrated in future.

Thank you for changes with simplifications and more info about the future. I will check mentioned commit when the new version is out. Version 1.6.0 of Compose/Kotlin Multiplatform is one of the first versions with this support (now for example lacking handling larger files) so it will be more mature in coming months/years.

Reading big raw files, like long videos, as a stream is not supported yet. Use the getUri() function to pass separate files to a system API

If someone is still looking at this, and want a more optimized solution that doesn't load the whole content of the file to the memory, here is an attempt at creating a custom DataSource that streams from the Jar resource's InputStream, it's inspired by the AssetDataSource in the library:
class JarResourceDataSource : BaseDataSource(false) {
    private var uri: Uri? = null
    private var inputStream: InputStream? = null
    private var bytesRemaining = 0

    override fun read(buffer: ByteArray, offset: Int, length: Int): Int {
        if (length == 0) return 0
        if (bytesRemaining == 0) return C.RESULT_END_OF_INPUT

        val read = inputStream!!.read(buffer, offset, min(bytesRemaining, length))

        if (read == -1) {
            return C.RESULT_END_OF_INPUT
        } else {
            bytesRemaining -= read
            bytesTransferred(read)
        }

        return read
    }

    override fun open(dataSpec: DataSpec): Long {
        uri = dataSpec.uri
        transferInitializing(dataSpec)

        inputStream = URL(dataSpec.uri.toString()).openConnection().getInputStream()

        bytesRemaining = if (dataSpec.length == C.LENGTH_UNSET.toLong()) {
            inputStream!!.available() - dataSpec.position.toInt()
        } else {
            dataSpec.length.toInt()
        }

        return bytesRemaining.toLong()
    }

    override fun getUri(): Uri? = uri

    override fun close() {
        inputStream?.close()
        uri = null
        inputStream = null
    }
}

Error handling is missing, this is just to give an idea at how to implement this, and it could be easily added.
Now, we can consume this directly same as the suggestions above by passing a custom DataSource.Factory that creates it.
But if someone is using the same MediaPlayer entity for different sources, we can keep the support for the other sources in addition to this one by something like this:
class ExtendedMediaFactory(private val defaultMediaFactory: DefaultMediaSourceFactory) :
    MediaSource.Factory by defaultMediaFactory {

    private val jarResourceMediaSourceFactory = ProgressiveMediaSource.Factory {
        JarResourceDataSource()
    }

    override fun createMediaSource(mediaItem: MediaItem): MediaSource {
        return if (mediaItem.localConfiguration?.uri?.scheme == "jar") {
            jarResourceMediaSourceFactory.createMediaSource(mediaItem)
        } else {
            defaultMediaFactory.createMediaSource(mediaItem)
        }
    }
}

----

ExoPlayer.Builder(context).setMediaSourceFactory(ExtendedMediaFactory(DefaultMediaSourceFactory(context)))

Thanks for the code suggestions @hichamboushaba  - a couple of thoughts if you or others are interested:

You can write a contract test for your JarResourceDataSource by subclassing DataSourceContractTest. This will help give you confidence you've correctly implemented the DataSource interface contract. You can see lots of examples of these in our code base.
For your integration with 'other sources', you should be able to make just a custom ExtendedDataSource instead of an entirely custom MediaSource.Factory (this is one level 'more specific' than a custom MediaSource.Factory). You can see an example in DefaultDataSource. Your ExtendedDataSource would choose to delegate between JarResourceDataSource and DefaultDataSource inside DataSource.open (instead of in MediaSource.Factory.createMediaSource as you have above).

Thank you @icbaker, this is quite helpful, I didn't know about these two points.

Thanks again @icbaker

You're using InputStream.available(), but this doesn't return the total size of the stream, just the amount available without blocking:

I used InputStream#available as the implementation was inspired by the AssetDataSource class which uses it.
If someone needs to change the implementation, in addition to what you suggested, I think there is a an alternative approach, we can use URL(jarUri).openConnection()'s result by calling getContentLength on it, in my testing, this returned the correct size.

You current implementation also ignores DataSpec.position in open() (or not completely ignores, but doesn't use it to offset the read from the InputStream), which means it won't work correctly when being asked to read from an offset within the resource.

That's correct, I missed this, thanks for pointing it.

@Woren Do you have a dummy project implementing this solution?
Looks like the uriResolver fails to readBytes from the uri.path resulting ByteArrayDataSource(uriResolver(uri)) to be null.
uri.path isn't null and looks like the one you gave in https://github.com/androidx/media/issues/1405#issue-2321547609
Files are located into commonMain/composeResources/files and MediaItem.fromUri(Res.getUri("files/my_sound.mp3")) returns an item so I guess the Uri is okay.
Maybe did you add an additional Extractor ?
Currently it looks like this:
@UnstableApi
@ExperimentalResourceApi
actual class AudioPlayer(private val context: Context) {

    private val mediaPlayer = ExoPlayer.Builder(context)
        .setMediaSourceFactory(
            DefaultMediaSourceFactory(
                ResolvingByteArrayDataSource.Factory { uri ->
                    runBlocking { Res.readBytes(uri.path!!) }
                }
            )
        )
        .build()

    actual fun playBackgroundMusic() {
        mediaPlayer.setMediaItem(MediaItem.fromUri(Res.getUri("files/background_music2.mp3")))
        mediaPlayer.prepare()
        mediaPlayer.play()
    }
}

Thanks for helping

What happens if you change your MediaItem instantiation to MediaItem.fromUri("files/background_music2.mp3")?

What happens ? Well, it happens to work...  Still have some problem to deal with URIs. Thanks so much !
To summarize
Here is the full, quick snippet. Don't forget the guidelines, which I obviously didn't follow here.

libs.version.toml
[versions]
# Android only
## Media3
media3 = "1.4.1"

[libraries]
# Android only
## Media3
androidx-media3-datasource = { group = "androidx.media3", name = "media3-datasource", version.ref = "media3" }
androidx-media3-exoplayer = { group = "androidx.media3", name = "media3-exoplayer", version.ref = "media3" }
androidx-media3-common = { group = "androidx.media3", name = "media3-common", version.ref = "media3" }

build.gradle.kts (composeApp)
    sourceSets {
        androidMain.dependencies {
            // Media3
            implementation(libs.androidx.media3.exoplayer)
            implementation(libs.androidx.media3.common)
            implementation(libs.androidx.media3.datasource)
        }
    }

AudioPlayer.kt (androidMain)
@UnstableApi
@ExperimentalResourceApi
actual class AudioPlayer(private val context: Context) {
    private val mediaPlayer = ExoPlayer.Builder(context)
        .setMediaSourceFactory(
            DefaultMediaSourceFactory(
                ResolvingByteArrayDataSource.Factory { uri ->
                    runBlocking { Res.readBytes(uri.path!!) }
                }
            )
        )
        .build()

    actual fun playBackgroundMusic() {
        mediaPlayer.setMediaItem(MediaItem.fromUri("files/background_music.mp3"))
        mediaPlayer.prepare()
        mediaPlayer.play()
    }
}

ResolvingByteArrayDataSource.kt (androidMain)
@UnstableApi
class ResolvingByteArrayDataSource(private val uriResolver: (Uri) -> ByteArray) : DataSource {
    private lateinit var uri: Uri
    private lateinit var byteArrayDataSource: ByteArrayDataSource
    private val listeners = ArrayList<TransferListener>(1)

    class Factory(private val uriResolver: (Uri) -> ByteArray) : DataSource.Factory {
        override fun createDataSource(): DataSource {
            return ResolvingByteArrayDataSource(uriResolver)
        }
    }

    override fun read(buffer: ByteArray, offset: Int, length: Int): Int {
        return byteArrayDataSource.read(buffer, offset, length)
    }

    override fun addTransferListener(transferListener: TransferListener) {
        if (transferListener !in listeners) {
            listeners.add(transferListener)
        }
    }

    override fun open(dataSpec: DataSpec): Long {
        uri = dataSpec.uri
        byteArrayDataSource = ByteArrayDataSource(uriResolver(uri))
        listeners.forEach { byteArrayDataSource.addTransferListener(it) }
        return byteArrayDataSource.open(dataSpec)
    }

    override fun getUri(): Uri = uri

    override fun close() {
        byteArrayDataSource.close()
    }
}

App.kt (commonMain)
@Composable
@Preview
fun App(audioPlayer: AudioPlayer) {
    MaterialTheme {
        Column(
            modifier = Modifier.fillMaxSize(),
            horizontalAlignment = Alignment.CenterHorizontally,
            verticalArrangement = Arrangement.Center
        ) {
            Button(onClick = { audioPlayer.playBackgroundMusic() }) {
                Text("Play")
            }
        }
    }
}

Big thanks to you, @icbaker. So efficient, really appreciate it!


Can't Ctrl-S to pause fancy mode

Sholudn't Ctrl-S / Ctrl-Q work? Aren't we in a terminal?

Probably not since I bet it's in raw mode.

 I'm not sure what layer is disabling this.
My long term plan is to allow explicit pause and even scrollback, because I want the sampling thread to be decoupled from the display.


CI: Intergration Test - TestResource_Observe

CI failure
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃   PANIC  package: github.com/cilium/cilium/pkg/k8s/resource • TestResource_Observe   ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
panic: *resource.resource[*k8s.io/api/core/v1.Node].Events() called from /home/runner/work/cilium/cilium/pkg/k8s/resource/resource_test.go:130 has a broken event handler that did not call Done() before event was garbage collected

goroutine 5 [running]:
github.com/cilium/cilium/pkg/k8s/resource.(*subscriber[...]).processLoop.func1()
	/home/runner/work/cilium/cilium/pkg/k8s/resource/resource.go:607 +0x80
FAIL	github.com/cilium/cilium/pkg/k8s/resource	0.993s

However, the panic message seems to reference this line from a different test: https://github.com/cilium/cilium/blob/11da06e24d3a2d4e7c9e37a8b6f7f984aa662752/pkg/k8s/resource/resource_test.go#L130


PostgreSQL 16 support

Hi,
2.10 fails to build against PostgreSQL 16, which is due this Thursday. Can you please take a look? Errors are below.
Thanks!
Regards, Devrim

/usr/lib64/ccache/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2  -I/usr/pgsql-16/include -Wno-uninitialized -I. -I./ -I/usr/pgsql-16/include/server -I/usr/pgsql-16/include/internal  -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include -flto=thin -emit-llvm -c -o pgtt.bc pgtt.c
pgtt.c:143:12: error: static declaration of 'get_extension_schema' follows non-static declaration
143 | static Oid get_extension_schema(Oid ext_oid);
|            ^~~~~~~~~~~~~~~~~~~~
In file included from pgtt.c:36:
/usr/pgsql-16/include/server/commands/extension.h:50:17: note: previous declaration of 'get_extension_schema' with type 'Oid(Oid)' {aka 'unsigned int(unsigned int)'}
50 | extern Oid      get_extension_schema(Oid ext_oid);
|                 ^~~~~~~~~~~~~~~~~~~~
pgtt.c: In function 'GttHashTableDeleteAll':
pgtt.c:180:21: warning: declaration of 'hentry' shadows a previous local [-Wshadow=compatible-local]
180 |         GttHashEnt *hentry;
|                     ^~~~~~
pgtt.c:1337:17: note: in expansion of macro 'GttHashTableDelete'
1337 |                 GttHashTableDelete(hentry->name);
|                 ^~~~~~~~~~~~~~~~~~
pgtt.c:1326:21: note: shadowed declaration is here
1326 |         GttHashEnt hentry = NULL;
|                     ^~~~~~
pgtt.c: In function 'create_temporary_table_internal':
pgtt.c:1571:25: error: too few arguments to function 'DefineIndex'
1571 |                         DefineIndex(relid,      / OID of heap relation /
|                         ^~~~~~~~~~~
In file included from pgtt.c:35:
/usr/pgsql-16/include/server/commands/defrem.h:27:22: note: declared here
27 | extern ObjectAddress DefineIndex(Oid relationId,
|                      ^~~~~~~~~~~
make[1]: *** [: pgtt.o] Error 1
make[1]: *** Waiting for unfinished jobs....
pgtt.c:143:12: error: static declaration of 'get_extension_schema' follows non-static declaration
static Oid get_extension_schema(Oid ext_oid);
^
/usr/pgsql-16/include/server/commands/extension.h:50:12: note: previous declaration is here
extern Oid      get_extension_schema(Oid ext_oid);
^
pgtt.c:1584:12: error: too few arguments to function call, expected 11, have 10
false); / quiet */
^
/usr/pgsql-16/include/server/commands/defrem.h:27:22: note: 'DefineIndex' declared here
extern ObjectAddress DefineIndex(Oid relationId,
^
pgtt.c:1859:1: error: static declaration of 'get_extension_schema' follows non-static declaration
get_extension_schema(Oid ext_oid)
^
/usr/pgsql-16/include/server/commands/extension.h:50:12: note: previous declaration is here
extern Oid      get_extension_schema(Oid ext_oid);
^

ping

Hi @devrimgunduz, got it but not able to reproduce with gcc.  Anyway there is another compatibility issue with PG16, the regexp compilation is failing and regression test are broken. Working on this first. I will let you know when all will be fixed an a new version released.

Hi Devrim,
I was not able to reproduce this error but I've tried to fix it, all others pending issues have been fixed too . Can you please try to compile latest development code and tell me if this is solved? Also note that new version will remove support to PG version prior 12.
Thanks

Hi @darold ,
Build is crystal clear now. Thanks!
Let me know when you release the new version.
Regards, Devrim

Thanks for the feedback Devrim, new release v3.0 has been published.


Direct query

This PR introduces a new way to query entity states in a web client.
Previously, only the Firebase-based queries were supported. Now, clients may also fetch data directly, bypassing the Firebase DB.
To do that:

in Java initialize the QueryServlet with the BlockingQuryBridge;
in JS web client, do supply neither Firebase client nor a custom client implementation.

Also, a JS web client may now use different implementations for queries, subscriptions, and commands.
For that, initialize the client with 3 different configs for each of the aspects:
const client = init({
    forQuries: { ... },
    forSubscriptions: { ... },
    forCommands: { ... }
});

Also, this PR fixes a security vulnerability by updating the version of Jackson.

@armiol, @dmitrykuzmin, PTAL.

I expect this PR to move the version to 1.2.0 as soon as core-java is ready.

@dmitrykuzmin, PTAL again.


Adding configurations functionality to Capacitor NX commands (NX Console plugin)

So i was wondering if there's a right way to configure the workspace.json for NX to detect different platform options in NX Console extension (for VS Code in my case) because there is no way to pass arguments directly to the command list GUI.
It picks up the commands: add, copy, open, sync, update - but all you can do is click on them and recieve an error.
So i came up with the solution:
old worspace.json:
<some-project-name> {
"architect": {
        "add": {
          "builder": "@nxtend/capacitor:add"
        },
        "copy": {
          "builder": "@nxtend/capacitor:copy"
        },
      ...
 }

new workspace.json:
<some-project-name> {
"architect": {
       "add": {
          "builder": "@nxtend/capacitor:add",
          "options": {
            "platform" : ""
          },
          "configurations": {
            "android": {
              "platform": "android"
            },
            "electron": {
              "platform" : "electron"
            },
            "ios": {
              "platform": "ios"
            }
          }
        },
      ...
 }

This works with NX Console plugin in a way, that any nx command can now be called in a format:
npx nx run <app-cap>:<builder>:<configuration>

for example : npx nx run foo-cap:sync:ios
And it works great :)
EDIT: misclick and then missed "nx" in last command

Also this is the source file of your wonderful repo that is responsible for this generated code :
\nxtend\packages\capacitor\src\schematics\capacitor-project\lib\add-project.ts

And the functuion:
export function addProject(options: NormalizedSchema) {
  return updateWorkspaceInTree((json) => {
    const architect = json.projects[options.project].architect;

    architect.add = {
      builder: '@nxtend/capacitor:add',
    };

    architect.copy = {
      builder: '@nxtend/capacitor:copy',
    };

    architect.open = {
      builder: '@nxtend/capacitor:open',
    };

    architect.sync = {
      builder: '@nxtend/capacitor:sync',
    };

    architect.update = {
      builder: '@nxtend/capacitor:update',
    };

    return json;
  });
}

I hope you find this suggestion helpful :)

I downloaded your repo to try some things out... Ran nx test on it and voila - it passes!
You can try something along these lines in your next release:
\nxtend\packages\capacitor\src\schematics\capacitor-project\lib\add-project.ts

export function addProject(options: NormalizedSchema) {
  return updateWorkspaceInTree((json) => {
    const architect = json.projects[options.project].architect;
    const commands = ['add', 'copy', 'open', 'sync', 'update'];
    const platforms = ['ios', 'android', 'electron'];

    let command: string, platform: string;

    for (command of commands) {
      architect[command] = {
        builder: `@nxtend/capacitor:${command}`,
        options: {
          platform: '',
        },
        configurations: {},
      };

      for (platform of platforms)
        architect[command].configurations[platform] = { platform: platform };
    }

    return json;
  });
}

and tests that i ran (they're not complete, but you get the idea):
\nxtend\packages\capacitor\src\schematics\capacitor-project\schematic.spec.ts

it('should update workspace.json', async () => {
    const tree = await testRunner
      .runSchematicAsync('capacitor-project', options, appTree)
      .toPromise();
    const workspaceJson = readJsonInTree(tree, '/workspace.json');

    expect(
      workspaceJson.projects[options.project].architect.copy.builder
    ).toEqual('@nxtend/capacitor:copy');
    expect(
      workspaceJson.projects[options.project].architect.copy.configurations
        .android.platform
    ).toEqual('android');
    expect(
      workspaceJson.projects[options.project].architect.open.builder
    ).toEqual('@nxtend/capacitor:open');
    expect(
      workspaceJson.projects[options.project].architect.sync.builder
    ).toEqual('@nxtend/capacitor:sync');
    expect(
      workspaceJson.projects[options.project].architect.sync.configurations
        .electron.platform
    ).toEqual('electron');
    expect(
      workspaceJson.projects[options.project].architect.update.builder
    ).toEqual('@nxtend/capacitor:update');
     expect(
       workspaceJson.projects[options.project].architect.update.options
     ).toEqual({platform: ""})
  });

Thanks for this! I don't use Nx Console that much but I did find the issue you were talking about. I also think the configuration approach looks a bit cleaner on the CLI as well. I will definitely consider adding this in for v2!

👍
Thanks, configurations is a great NX feature, makes CLI both shorter and definitely adds to NX Console experience with your modules!

I am working on these changes and it's going well. Should for sure be available for v2. Thanks again @Neurogitmeister!

@Neurogitmeister this has been merged and will be available for v2. I'll try and let you know when a beta is available.


Add a simple tool that can apply a glossary to linkify files.

@juliaferraioli @evasnee @RichieEscarez

Hi Brendan,
I think we should avoid links in titles and headers and then only "linkify" the first instance of the glossary term in each file (unless there is an instance of the term thats qualified with: "Kubernetes"*).

for glossary term x, first determine if "Kubernetes x" exists before looking for term 'x'
if "Kubernetes x" exists, then skip other instances of term 'x' (including plural instances)
if line prefix is #, ##, ###, ####, then skip/look for next instance (titles and headers should be on their own lines)
if glossary term x is not in a title/header, linkify, and then skip to next glossary term

*The first instance might not alway be correct (For example, say you reference "services" in general, and in the next sentence, you continue to define a "Kubernetes service". In this example, linkifying the second instance of "service" would be best).
A good example for avoiding titles/headers would be "Step 2" in the linkification example, where "A Kubernetes 'service' is the best place in this document to "linkify" the "services" term.
Rationale:

in a linear topic, our users should only need a term defined once, that being the first time it appears (so they can learn it and move on (not needing it again while in that topic)
we need to maintain the value of hyperlinked text: if there are too many on a page and throughout the library, the abundance will lower the value/importance (the visual cue becomes commonplace and has the potential for other valid linked terms to get overlooked)
for someone who is already familiar with the concepts, the hyperlinked text might become annoying
multiple instances (especially in close proximity) might be misleading: if two terms are near each other and one is qualified differently than the other, the two hyperlinked terms might be construed as links to separate/different definitions

I think there might be quite a few corner cases regarding parsing the markdown syntax here. Have you considered using a markdown parser like https://github.com/russross/blackfriday ?

@krousey
Hrm, I'm not sure that the blackfriday parser will work for me, since it seems oriented around producing html, and as I could find it doesn't let me walk the AST, or re-output Markdown.
I think that this will do ok (though I agree that incrementally writing a parser by hand is a pretty bad idea ;)
@RichieEscarez
Modified to address your comments, ptal.
Thanks!

@brendandburns You can define your own Renderer and pass it to Markdown. It could render it back to markdown with the modified links. It's just a suggestion, but I think we should be aware of the parsing corner cases and decide which ones are worth handling.

yeah, yeah, I see your point :P
I'll update the parser.


Integrate smoke test for SimpleReport

[ ] Dev team builds smoke test
[ ] Integrate smoke test in build process

Discussion about validation options for ReportStream smoke test: https://usds.slack.com/archives/C01HFHPNJEL/p1618929242421600?thread_ts=1618866027.421200&cid=C01HFHPNJEL


support yandex cloud kms #1341

Summary
Yandex Cloud users with this feature can use cosign solutions.
Closes #1341
Release Note
Support Yandex Cloud KMS provider
Documentation
This change require an update to documentation: https://docs.sigstore.dev/key_management/overview/

👍

Hello guys @bobcallaway @haydentherapper
Could you review this pr please? We have a lot of customers from all over the world who need this feature

is there any chance to get this PR landed?


adding config for uploadTmpBinary. default false

I guess we don't really have unit tests for individual config items?

@soldair Commented. I don't quite understand the use-case, but besides my comments, looks good to me.

when a package is uploaded, instead of placing it on each tarball server with multi-fs, we will place it on one server with a tmp name.
when the document is replicated from couch the tar-follower will download the package from the server where it was uploaded and move it to the correct path.

this makes it so not all package servers need to be available for a publish to be successful
and when people publish the same module version concurrently the process which wins the race to publish to couch also is guaranteed to win the race publishing the tarball.


Reduce MAX_NAME_LENGTH by 1

https://github.com/TAXIIProject/django-taxii-services/blob/master/taxii_services/models.py#L23
This constant should be specified as 255 so that the schema is valid for MySQL. I'm guessing this will also help for other database systems.

Worked perfectly - thanks Mark.

@itchycube, did you change this locally? Either way, it's in the master branch now!

I did just change it locally to test.  Glad's its in there!
Thanks Mark.


feat: [OPS-26952]: Update proxy helm chart internal

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Add temp buffer statistic

I have added a function to get information about the memory usage of the temp buffer

I'm hesitant to add this to the production branch of HomeSpan since the user really can't control the TempBuffers.  However, I can see the use while trying to develop or change the actual HomeSpan library (as opposed to end-users who are developing sketches with the library).  In my own work, I usually add lots of Serial.printf statements so I can see exactly when buffers are being called, along with any other diagnostics that help describe the circumstances during which a buffer was used.  Then I delete all these Serial.printf statement once satisfied everything is working.
There is definitely more room to optimize memory.  If you look at a branch I called "server" you'll see a number of other optimizations I made leading up to, and beyond those in 1.8.1:

Rather than keep a fixed-size buffer that can store up to 16 HAP connections, I completely refactored the connections code to use dynamic storage that is created and destroyed as HAP socket connections are opened and closed.  Prior to iOS 14, HomeKit devices needed to support many simultaneous HAP connections since each controller communicated directly with each HomeKit device.  In other words, if you had 3 iPhones, 2 HomePods, and 3 iMacs, HomeKit would often open and retain 8 simultaneous connections.  However, with the intro of using a HomePod or Apple TV as a Home Hub, HomeKit routes all requests through a single device, and rarely needs to open more than 2 simultaneous connections, which means a fixed buffer supporting 16 HAP connections is a waste of space.  Changing this was quite intrusive and I needed to completely re-work other parts of the code as well (such as Event Notifications) that were tied to HAP Connections.  I did get it working but during testing I noticed some instabilities that may have been because of the code changes, or may have been a result of other HomeKit changes and updates that were occurring around the same time.  Hence the 1.8.1 branch commits stop just before this code change, but I do intend to revisit once 1.8.1 is released since I really liked how this streamlined connection management.

TLV data - These structures are mostly used for pairing and pair-verify calls.  HAP defines 11 different TLV types, and I reserve space for all of them during start-up.  Though it's not a huge amount (about 1.5K), I refactored the code so that space is allocated only when needed, and destroyed after.

SRP data and constants - These structure are used for pairing only, and involve manipulating arbitrary-sized numbers using the MBED TLS Library (which is included into the Espressif IDF).  Some of these numbers can get quite large (taking up 700+ bytes), though the total size used across all data is probably only 3K. Nevertheless, there is a bunch optimization (and a lot of refactoring) I was able to due to keep memory use to a minimum, as well as to deallocate all these structures once pairing is completed.

Since I made the changes (2) and (3) above after (1) in the server branch, these changes are not in 1.8.1.  I may revisit (2) and (3) at some point in the future, but it's a lot of changes for not that much gain.
Other changes in the server branch are related to my goal of refactoring HomeSpan into two components - a server and a wrapper that calls the server.  HomeSpan would continue to use both, so the changes would be hidden from the typical end user.  However, it would be possible to just use the server part without the wrapper.  The server would contain nothing but core HAP functionality so the user can implement their own WiFi connectivity, their own web logging, etc., or they could pick and choose any combinations of HomeSpan functionality, such as including SpanPoint but excluding SpanButton.
In principle this would yield a smaller overall footprint in terms of code size as well as memory usage.  You'll see some of the changes I made in the server branch to separate out "optional" features from core HAP functionality.  Unfortunately, this proved to be more difficult than worthwhile because I am trying to do all of this from within the Arduino IDE, which provides very little control of how libraries are compiled in real time.  If this was just a standalone library to be used in a normal C++ Unix environment, there are lots of ways of ensuring only those components needed are called.  But that's much more difficult in the Arduino IDE.
I think the solution is to use the power of the Arduino IDE to my advantage, instead of fighting it.  If every function I wanted to make optional was in a separate library, users of the server version would be able to add those functions by simple inclusions of *.h files.  However, if I go this route, HomeSpan could not be distributed as a single library through the Arduino Library Manager.  It would only be "installable" from a zip file via GitHub.
Lots to consider for the future...

Thank you for your long explanation. I will close this PR and continue with the work of my context object. I will remove the diagnostic feature at the end.


Authenticator::is_locked returns AuthError::Unauthorized when User doen't exist

This is misleading, and makes it hard to distinguish users that are locked from ones that don't exist.

Please reopen if you still think this is wrong, and there's a reasonable way to limit the information leak.  (I don't think it's reasonable to recommend users of the library avoid revealing a leak we provide.)


Upgrading RabbitMQ library and changing .NET framework target to 4.5.2

Upgrading RabbitMQ dependency. Not sure how you want to handle this as the new library required a higher .NET target. I moved it to .NET 4.5.2.

Hey Chris,
Thanks for this - greatly appreciated.
It all looks good.
Can I ask the reason for the upgrade - is it bug fixes in the underlying dependencies or just a bit of house cleaning? I would rather keep the minimum dependencies up to date so it is all good.
I think we might also need some changes in the nuget file e.g. .net version, dependency versions so could you try the nuget package at https://ci.appveyor.com/project/mdevilliers/signalr-rabbitmq/build/1.0.73/artifacts and check if there are anything that needs tweaked.
Thanks again,
Mark

There are some other libraries that I use that depend on RabbitMQ that
have, or will soon, update their version dependency on RabbitMQ. The
library author. Has made some breaking changes in this major version
change, not with your stuff, but with other aspects of the library. I've
updated the Nuspec to reflect those dependency changes.
Chris
On Wed, Sep 21, 2016 at 2:02 AM Mark deVilliers<EMAIL_ADDRESS>wrote:

Hey Chris,
Thanks for this - greatly appreciated.
It all looks good.
Can I ask the reason for the upgrade - is it bug fixes in the underlying
dependencies or just a bit of house cleaning? I would rather keep the
minimum dependencies up to date so it is all good.
I think we might also need some changes in the nuget file e.g. .net
version, dependency versions so could you try the nuget package at
https://ci.appveyor.com/project/mdevilliers/signalr-rabbitmq/build/1.0.73/artifacts
and check if there are anything that needs tweaked.
Thanks again,
Mark
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/mdevilliers/SignalR.RabbitMq/pull/49#issuecomment-248539812,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABu24ZTQsXko21uKyK2b0kckfDRz7a-tks5qsOR-gaJpZM4KCCmh
.

Awesome - I'll merge in and update the package on nuget.
Thanks for your help,
Mark

The nuget package has been uploaded.