[bcs parse error]

i had a transaction block test:
test("transction block encode data", () async {
      var txJson = {
        "version": 1,
        "gasConfig": {"budget": "2000000000"},
        "inputs": [
          {"kind": "Input", "value": 1000, "index": 0, "type": "pure"},
          {
            "kind": "Input",
            "value":
                "0x5bc852f1ca0b36b22ccaab5a859bcb26afa5527aef5638088c2bd841201d2310",
            "index": 1,
            "type": "pure"
          }
        ],
        "transactions": [
          {
            "kind": "SplitCoins",
            "coin": {"kind": "GasCoin"},
            "amounts": [
              {"kind": "Input", "value": 1000, "index": 0, "type": "pure"}
            ]
          },
          {
            "kind": "TransferObjects",
            "objects": [
              {"kind": "Result", "index": 0}
            ],
            "address": {
              "kind": "Input",
              "value":
                  "0x5bc852f1ca0b36b22ccaab5a859bcb26afa5527aef5638088c2bd841201d2310",
              "index": 1,
              "type": "pure"
            }
          }
        ]
      };

      var transactionBlock = TransactionBlock.from(jsonEncode(txJson));
      transactionBlock.setSender(
          "0x5bc852f1ca0b36b22ccaab5a859bcb26afa5527aef5638088c2bd841201d2310");
      var options =
          BuildOptions(client: SuiClient("https://fullnode.devnet.sui.io:443"));
      var txBytes = await transactionBlock.build(options);
      print(txBytes);
    });

i got error:
Invalid argument(s): Incorrect data passed into enum "CallArg", expected object with properties: "Pure | Object | ObjVec".
Received: "1000"
package:bcs/index.dart 974:9                            BCS.registerEnumType.<fn>
package:bcs/index.dart 422:22                           TypeEncodeDecode.encodeRaw
package:bcs/index.dart 729:41                           BCS.registerVectorType.<fn>.<fn>
package:bcs/index.dart 299:31                           BcsWriter.writeVec.<fn>
dart:_internal

This error has been fixed, you can try the latest commit now.


Tighten lint rules on client

Task
Tighten lint rules on client

Task Title
Tighten lint rules on client

User Story
link associated User Story for this task

Epic
link associated Epic, if applicable

T-shirt size default is S(mall)
S

Story Points - Fibonacci (1,2,3,5)
1

@abhisheknairofficial


Added Scaffolder backend module for new backend system support

What does this PR do?
🛑 Please open an issue first to discuss any significant work and flesh out details/direction - we would hate for your time to be wasted.
Consult the CONTRIBUTING guide for submitting pull-requests.

New backend system support for the @aws/plugin-scaffolder-backend-aws-apps-for-backstage
Motivation

Enable declarative configuration for the module instead writing the extension class directly in the packages/backend/src/index.ts see.
example:
// packages/backend/src/index.ts

backend.add(import('@aws/plugin-scaffolder-backend-aws-apps-for-backstage')

For Moderators

[ ] Compile, build, tests successful before merge?

Additional Notes

Relates to issue: https://github.com/awslabs/harmonix/issues/116

Hello @z-sourcecode ,
Not sure how to bump the package version.
Should i do it manually ?


azure: add support for uploading files >4MB

Currently Azure implementation supports only putting/uploading files smaller than 4MB. We should be able to upload files of arbitrary size.

In the case of Block Blobs, you need first to create a block block. Then add different block, each maximum 4MB. Each block should have a unique ID so that you can use them after uploading with PutBlockList to combine them into a single file.
The Azure Storage Python SDK for example has some helpers to do this:
https://github.com/Azure/azure-storage-python/blob/master/azure/storage/blob/_upload_chunking.py
Apparently, you could also use PutAppendBlob and AppendBlog to do the same (see https://github.com/Azure/azure-sdk-for-go/issues/129#issuecomment-229263839)

The following repo might give you some clues on how to do this:
https://github.com/schreibe72/abc

fixed in https://github.com/graymeta/stow/pull/162


Fix assert condition.

mtim is expected to change, so the old value should be not equal to the
new value.

IMO current master is ok. Note thst fd_filestat_get is executed twice.
st_mtim is the current value.
old_mtim is the previous value
new_mtim is the value we set in fd_filestath
_set_times
So we want st_mtim == new_mtim

Ah, I misread the code. Thanks for clarifying!


Performance difference between papers and released weights

Hello @MCC-WH
Thank you for sharing the good code.
I have noticed a huge performance difference between your paper and the released weight, especially on the +1M experiments.

ROxf-M
+1M
RPar-M
+1M
ROxf-H
+1M
RPar-H
+1M

TOKEN-R50-Paper
79.42
73.68
88.67
77.56
59.48
49.55
76.49
58.92

TOKEN-R50-Released weights
79.79
67.36
88.08
74.33
62.68
45.70
75.49
52.68

TOKEN-R101-Paper
82.28
75.64
89.34
79.76
66.57
51.37
78.56
61.56

TOKEN-R101-Released weights
82.16
70.58
89.40
77.24
65.75
47.46
78.44
56.81

The same goes for the DELG you reproduced.

ROxf-M
+1M
RPar-M
+1M
ROxf-H
+1M
RPar-H
+1M

DELG-R101-Reproduced-Paper
78.24
68.36
88.21
75.83
60.15
44.41
76.15
52.40

DELG-R101-Reproduced-Released weights
78.55
66.02
88.58
73.65
60.89
41.75
76.05
51.46

Could you please check if the performance of the paper has errors?
If the performance of the paper is correct, could you please share the model (R50-Token, R101-Token) weights used in the paper to check the paper's performance?
It should also be noted that this may also affect the reviews/results of many (landmark) image retrieval papers submitted or to be submitted to the conferences/journals.

Hi, Thanks for your interest in our work! In the arixv version of our paper, the performance does differ from the publicly available model. Since I neglect to do cropping operations for the query images. The performance of the public model should now be the real performance. We have updated the errors in the official camera ready version submitted to AAAI. We will update the arixv version in the near future. Please refer to the official version provided by AAAI. Thanks again for noticing the issue.

@sungonce

Hi again,
Thanks for the fast reply :D
I checked the difference between the arxiv version and the AAAI version and confirmed that the real performance was updated correctly.
Thanks again for the reply and looking forward to good research in the future.

Thanks! I also noticed your paper at CVPR2022, a very nice and solid solution!

hello,Can you provide training codes about CVNet @sungonce


Adding custom generation for spanish

Changes:

I've added custom generation translation for spanish, as well as CVSSv3 fields translation
I've added a spreadsheet with common vulnerabilites from OWASP's WSTG and ASVS so that users don't have to create vulns from scratch.
I've added a script to automatically parse such spreadsheet to json so that users can import it
I've added a script in Selenium to merge vulns from the spreadsheet in spanish and in english.

So, this is a awesome feature and I personally think that we should make a new project with a startup database based on  CWE/OWASP/CVSS. May I suggest you to make a PR containing only backend/src/translate/es.json and backend/src/translate/es.json ?
For the database project, I just created https://github.com/pwndoc-ng/pwndoc-ng-database , you can PR your database here, I'll rework the architecture in the future.

yeah haha I've messed up with branches. Im closing this one and opening another one


feat: 1486 add details of expected fees margin close out to deal ticket

Related issues 🔗
Closes #1486
Description ℹ
Add details of expected fees, margin usage, close out etc. to deal ticket
Demo 📺

Technical 👨🔧

[x] move all hooks from console-lite to deal-ticket lib
[x] create a hook to retrieve all

@MadalinaRaicu A few suggestions based on what's been built so far:

Lose 'Est price' - I don't think this is needed as it's shown in the ticket.
Change 'Notional size' to 'Notional value' which I think it's the standard label and is more self-explanatory
Rather than prefixing with 'Est' on the label, use the '~' prefix on the value (like we do with price in the ticket). This keeps the focus on the name part of the label.
Change 'close out to 'Liquidation price (variable)' as we call it liquidation price elsewhere, and I think it's important to point out it isn't an estimate of what it will be, it's a variable number which will change.
Can we show the values in text-neutral-500 dark:text-neutral-300 (same as the value tables in the market info panel)
The liquidation price doesn't change when you change size and shows a value even when your wallet isn't connected - I'm not sure this is right as I'd expect the value to be a function of the available margin?

@MadalinaRaicu A few suggestions based on what's been built so far:

Lose 'Est price' - I don't think this is needed as it's shown in the ticket.
Change 'Notional size' to 'Notional value' which I think it's the standard label and is more self-explanatory
Rather than prefixing with 'Est' on the label, use the '~' prefix on the value (like we do with price in the ticket). This keeps the focus on the name part of the label.
Change 'close out' to 'Liquidation price (variable)' as we call it liquidation price elsewhere, and I think it's important to point out it isn't an estimate of what it will be, it's a variable number which will change.
Can we show the values in text-neutral-500 dark:text-neutral-300 (same as the value tables in the market info panel)
The liquidation price doesn't change when you change size and shows a value even when your wallet isn't connected - I'm not sure this is right as I'd expect the value to be a function of the available margin?

everything updated as you suggested. except last point.
if party balance is coming as undefined we just consider it 0. this is the formula (marginMaintenanceLevel - positionAccountBalance - generalAccountBalance) / volume + markPrice. this is why a value is shown.


Could not find artifact com.trustwallet:wallet-core:jar:3.1.35 in github (https://maven.pkg.github.com/trustwallet/wallet-core)

Describe the bug
Hi, I met "Could not find artifact com.trustwallet:wallet-core:jar:3.1.35 in github (https://maven.pkg.github.com/trustwallet/wallet-core)" Error while importing wallet-core as maven dependency in a java project. But the wallet-core-proto import is successful.
I have read https://developer.trustwallet.com/developer/wallet-core/integration-guide/android-guide and configured the token properly
To Reproduce
Tried:

Generate a token with "read:package"

Configured setting.xml with:

github

github

github
https://maven.pkg.github.com/trustwallet/wallet-core

true

github
myusername
mytoken

3. Add maven dependency

com.trustwallet
wallet-core
3.1.35

Expected behavior
I would like to use HDWallet feature in my java project
Screenshots

Additional context
IDE: Intellij IDEA

Hi @jjjb91052, could you please try to use the latest tag? 3.1.36
Please also note that we plan to make a new release today, so it can be changed to 3.1.37

Feel free to re-open the issue if the problem hasn't gone


init commit for help modal

Signed-off-by: Aditya Chatterjee<EMAIL_ADDRESS>Description
Haven't put in the instructions yet, just put styling and the modal.
This PR fixes #
Notes for Reviewers
Big DO NOT MERGE
Signed commits

[ ] Yes, I signed my commits.

Let's merge.


Direction in onStepEnter undefined when overflow set on parent

I have the following css styles applied to my main page container:
. parent {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    overflow: auto;
}

response.direction undefined in the onStepEnter and onStepExit callbacks.
Looking at scroll.js, it uses window.pageYOffset.
What do you think about adding in the option on .setup to pass in a container element, then use .scrollTop on that element for the calculation? If no element is passed, then window.pageYOffset could be used by default.

thanks for the PR. just tweaked a little to simplify code. should be available in the latest release3.1.0


Txadmin Automatic logged out when logged in

I have updated my FX Server to the lates build and my tx admin to the latest but when i log in at my browser (not on our server browser) i automatically logged out when logged in

Hey my friend, as you can read, this is the Issues part of github and not support, to get proper help join our discord

This is not an issue with txAdmin, its either with your browser or maybe even the cfx.re proxy.
Also, this is not supporthub.


ngx.share does not work between preread_by_lua_block and balancer_by_lua_block

Just trying to come up with custom load balancing for plain TCP (stream):

It looks like the only preread_by_lua_block in stream -> server section can contain logic like making calls to DNS, pinging servers (checking if ports are open, etc.). Here I try to cache in shared memory small object. It's used on the next connection open in the server section to check if it's within TTL and if it's we skip DNS look ups and pings
In balancer_by_lua_block we need to read that cached value from share memory but it's nil. As per documentation it looks like expected.

so the question is - why shared memory is not supported between lua blocks? Reason? Any other way to cache value globally to reuse on the next call other than going external caches way (Redis,Memcache, etc)
Note: one option is to use _G. Any race conditions accessing (set, update) vars in it?
thanks! And great work on lua nginx stuff!

Sorted.


Add Arr methods to support csv/array conversions.

This adds convenient Arr::fromCsv() and Arr::toCsv() methods to convert strings of csv to an array and likewise, array to a csv string.
Example of current flow:
$csv = 'apple, banana, orange';

$fruits = explode(',', $csv);
$fruits = array_map('trim', $fruits); // ['apple', 'banana', 'orange']

$fruits = ['apple', 'banana', 'orange'];
$fruits = implode(',', $fruits); // 'apple,banana,orange'

New flow:
Arr::fromCsv('apple, banana, orange'); // ['apple', 'banana', 'orange']
Arr::toCsv(['apple', 'banana', 'orange']); // 'apple,banana,orange'

This additional method will not affect current users and eases the development flow when converting data between array and csv. Tests are included.

Thanks but this doesn't seem correct, sorry. Feel free to release this as a package if you want 👍

I appreciate your feedback. I see where the confusion lies. In the project I work on, sometimes we have simple columns that have a comma-separated list. The intention wasn't full-blown csv conversion, but rather an affordance for those columns or simple comma-separated values in a request parameter. I see how it wouldn't fit all use cases though. Happy to keep it as a macro for our team.


add option to delay sign with a key file only containing public key

Fixes: https://github.com/gluck/il-repack/issues/222
trying to revive the pull request: https://github.com/gluck/il-repack/pull/146
@gluck - I also incorporated your feedback of only being able to specify the public key if delaysign option is set.
Let me know what it would take to get this change in and publish a new version to NuGet.org .
We are trying to utilize this tool to merge some of our assemblies in https://github.com/nuget/nuget.client . We have given ILRepack a shot in the past, but because we delaysign our assemblies with a public key, we haven't had success and have had to revert to ILMerge.

Thanks ! LGTM

We're just replacing ILMerge with ILRepack, but we do have the same problem. With this commit, it works.
@gluck please let me know too, when you published a new version to nuget.org.

@cwuethrich can you help me figure out if there is a way to download artifacts for this PR? How were you able to test this commit?

Hi @cwuethrich / @rohit21agrawal,
I have no immediate plans to release, but I enabled artifact support on AppVeyor, so you should be able to get the latest build here:
https://ci.appveyor.com/api/project/gluck/il-repack/artifacts/build/distributions/ILRepack.2.0.16.nupkg
LMK if it works.
Cheers.

@gluck the link doesn't work. maybe you can paste it as a zip file?

Sorry I missed an 's' in the URL, edited it, LMK

@rohit21agrawal I debugged this part and built it with my local clone.
@gluck thanks for the link, it worked (Y)

@gluck would you have any concerns if we publish this package to a publicly consumable myget feed for the sake of our CI?

No concern, maybe considering naming the version differently to avoid confusion with the official release when it comes, but up to you.

FYI 2.0.16 was released


Cannot read property 'reset' of undefined

Failed to minify the bundle. Error: static/js/main.1869b185.js from UglifyJs
TypeError: Cannot read property 'reset' of undefined
    at Array.forEach (<anonymous>)
    at compiler.run (/project/node_modules/react-scripts/scripts/build.js:130:23)
    at emitRecords.err (/project/node_modules/webpack/lib/Compiler.js:269:13)
    at Compiler.emitRecords (/project/node_modules/webpack/lib/Compiler.js:375:38)
    at emitAssets.err (/project/node_modules/webpack/lib/Compiler.js:262:10)
    at applyPluginsAsyncSeries1.err (/project/node_modules/webpack/lib/Compiler.js:368:12)
    at next (/project/node_modules/tapable/lib/Tapable.js:218:11)
    at Compiler.compiler.plugin (/project/node_modules/webpack/lib/performance/SizeLimitsPlugin.js:99:4)
    at next (/project/node_modules/tapable/lib/Tapable.js:220:14)
    at /project/node_modules/sw-precache-webpack-plugin/lib/index.js:98:18
    at <anonymous>

This happens when I add a function with async/await.

Can you please provide a reproducible demo?

Hmm, not sure what happened, but removing node_modules and running npm install fixed it.


The visibility selection to control ACL in the uploader should be configurable

It should be possible for application administrators to decide whether the visibility selection to control ACL should be offered in the uploader or not.
Reason: At our institution (University of Bern) and I guess also in many other institutions the uploaded videos get the visibility from the series they are part of.

Can you explain this a bit more with respect to https://tobira.opencast.org/~manage/upload? The "Access policy" part of that page would disappear once you have selected a series because that series then decides the visibility/access policies?

My suggestion would be to not hide the UI, but make it greyed-out "read only", showing the access policy of the series. And add a note "access is determined by series" (in a more user friendly way).
I think we will tackle this as part of the more general "what's the deal with inheriting ACLs from series?" task. We should really look into this...

My first thought was to give application administrators the opportunity to hide the Access policy part on the upload page totally. We are doing this in Opencast when people manually upload videos into a series. But the idea of Lukas to make it greyed-out "read only" and add a note which explain this sounds reasonable to.
I would not expect this to be de default but to make it configurable: Institutions should be able to decide whether they want the access policy part on the upload page in write or read only mode.
Let's discuss this in an upcoming meeting.

Questions for that discussion:

Can you see the accessibility rules of the series you select for your upload (so that you don't select a public series by accident)?
Can you upload an episode without selecting a series?
Or will that orphan episode automatically become part of the user's series?

Can you see the accessibility rules of the series you select for your upload (so that you don't select a public series by accident)?

That's what I suggested and I think it makes sense.

Can you upload an episode without selecting a series?

That's configurable.

Or will that orphan episode automatically become part of the user's series?

No such feature exists yet.


Added a demonstartion notebook featuring the usage of Langchain with AutoGen

Why are these changes needed?
I was trying to use AutoGen powerful agentic framework with the other LLM's but i have seen autogen explicitly supports fewer LLM Providers by default and for the others you need to write a custom configuration, that too is difficult to design for different LLM's/LLM Provider's out there. Since the existing library like LangChain handles the tedious task of LLM compatibility, ig to have this notebook to show the how to use Langchain library with Autogen opens up the space for all the LLM supported by langchain used with Autogen. I have found this related notebook agentchat_langchain.ipynb which shows the langchain with autogen but i feel its not very simple and clear for the new users to understand.
Checks

[x] I've included any doc changes needed for https://microsoft.github.io/autogen/. See https://microsoft.github.io/autogen/docs/Contribute#documentation to build and test documentation locally.
[x] I've added tests (if relevant) corresponding to the changes introduced in this PR.
[x] I've made sure all auto checks have passed.

@microsoft-github-policy-service agree

Hey @Kirushikesh, thanks for creating this. Can I just clarify, it seems more that this is the use of LangChain's huggingface library as opposed to integration with LangChain?
Do you think a huggingface client class would be a similar outcome in this approach? It has been mentioned before on AutoGen's Discord and it may be worth creating one.

Hello @marklysze , for the first question no its not about langchain-huggingface instead its how to use Langchain with Autogen. Currently Langchain supports atmost all the LLM's out there from various the LLM Providers. We can load any LLM through Langchain which creates an abstraction and then use that LLM Class(BaseLanguageModel) with Autogen agentic capabilities. For demonstration i have selected HuggingFace in the notebook. We can literally use it with any LLM supported in Langchain, for ex: the below code explains how to use OpenAI LLM loaded through Langchain in Autogen, yes i know we can use the OpenAI model directly this is just for the demonstration of langchain.
import os
import json
from dotenv import load_dotenv
from langchain_openai import ChatOpenAI

load_dotenv()

class CustomModelClientWithArguments(CustomModelClient):
    def __init__(self, config, **kwargs):
        print(f"CustomModelClientWithArguments config: {config}")

        self.model_name = config["model"]
        gen_config_params = config.get("params", {})

        self.model = ChatOpenAI(model=self.model_name, **gen_config_params)
        print(f"Loaded model {config['model']}")

os.environ["OAI_CONFIG_LIST"] = json.dumps([{
    "model": "gpt-4o-mini",
    "model_client_cls": "CustomModelClientWithArguments",
    "n": 1,
    "params": {
        "max_tokens": 100,
        "top_p": 1,
        "temperature": 0.1,
        "max_retries": 2,
    }
}])

config_list_custom = autogen.config_list_from_json(
    "OAI_CONFIG_LIST",
    filter_dict={"model_client_cls": ["CustomModelClientWithArguments"]},
)

assistant = AssistantAgent("assistant", llm_config={"config_list": config_list_custom})
assistant.register_model_client(
    model_client_cls=CustomModelClientWithArguments,
)

user_proxy.initiate_chat(assistant, message="Write python code to print Hello World!")

Thanks @Kirushikesh, would you be able to test some non-OpenAI models, such as Anthropic's and Meta's Llamas. The role and name fields aren't always compatible with AutoGen messages.

Hello @marklysze, unfortunately i don't have anthropic api-keys may be you can help me with this. For Meta Llama do you mean using the model through HuggingFace? If yes, the notebook already demonstrate how to load any model from huggingface, its just about changing microsoft/Phi-3.5-mini-instruct to meta-llama/Meta-Llama-3.1-8B-Instruct.
Just to demonstrate the use of Non-OpenAI model with Langchain, i have used Google Gemini Model loading through langchain here which also works.
import os
import json
from dotenv import load_dotenv
from langchain_google_genai import ChatGoogleGenerativeAI

load_dotenv()

class CustomModelClientWithGemini(CustomModelClient):
    def __init__(self, config, **kwargs):
        print(f"CustomModelClientWithGemini config: {config}")

        self.model_name = config["model"]
        gen_config_params = config.get("params", {})

        self.model = ChatGoogleGenerativeAI(model=self.model_name, **gen_config_params)
        print(f"Loaded model {config['model']}")

os.environ["OAI_CONFIG_LIST"] = json.dumps([{
    "model": "gemini-1.5-flash",
    "model_client_cls": "CustomModelClientWithGemini",
    "n": 1,
}])

config_list_custom = autogen.config_list_from_json(
    "OAI_CONFIG_LIST",
    filter_dict={"model_client_cls": ["CustomModelClientWithGemini"]},
)

assistant = AssistantAgent("assistant", llm_config={"config_list": config_list_custom})
assistant.register_model_client(
    model_client_cls=CustomModelClientWithGemini,
)

user_proxy.initiate_chat(assistant, message="Write python code to print Hello World!")

Output:
[autogen.oai.client: 09-03 02:34:47] {484} INFO - Detected custom model client in config: CustomModelClientWithGemini, model client can not be used until register_model_client is called.
CustomModelClientWithGemini config: {'model': 'gemini-1.5-flash', 'model_client_cls': 'CustomModelClientWithGemini', 'n': 1}
Loaded model gemini-1.5-flash
user_proxy (to assistant):

Write python code to print Hello World!

--------------------------------------------------------------------------------
assistant (to user_proxy):

```python
# filename: hello.py
print("Hello World!")

Let me know if you have any additional questions.

For some reason I am not able to request a review from @marklysze -- double checking what happened there.

For some reason I am not able to request a review from @marklysze -- double checking what happened there.

Thanks @gagb, it may be that my permissions have changed? It looks like I can still add a review. I'll try to do a review shortly.

Thats weird-- double checking asap!

Thanks @Kirushikesh for the Gemini code sample, that worked for me. Unfortunately the notebook code isn't working for me. It's not getting past this block of code in the init of the CustomModelClient.
        pipeline = HuggingFacePipeline.from_model_id(
            model_id=self.model_name,
            task="text-generation",
            pipeline_kwargs=gen_config_params,
            device=self.device
        )

It is pulling down the tensors but just stops at that point, without an exception. I'm not sure why. I'm running in AutoGen's dev container (docker). Though I ran the Gemini code above and it worked okay. Perhaps it's when pulling a model down.
Is there another model you have had success with (that pulls down to run locally)?

@marklysze i am not sure what's the issue, its literally loading the model from huggingface. I have tried with mistralai/Mistral-7B-Instruct-v0.1 model as well it worked.

Thats weird-- double checking asap! We are having slightly trouble accessing repo management – will add you asap.

@marklysze -- your role had auto-expired. I believe it was restored can you please check? @jackgerrits told me that you need to accept some invite?

Thats weird-- double checking asap! We are having slightly trouble accessing repo management – will add you asap.

@marklysze -- your role had auto-expired, so sorry about this! I believe it was restored can you please check? @jackgerrits told me that you need to accept some invite?

Sorry about the auto-expire! As soon as you accept I can double check the role too

Thats weird-- double checking asap! We are having slightly trouble accessing repo management – will add you asap.

@marklysze -- your role had auto-expired, so sorry about this! I believe it was restored can you please check? @jackgerrits told me that you need to accept some invite?

Sorry about the auto-expire! As soon as you accept I can double check the role too

Thanks @gagb and @jackgerrits, got it and I've accepted, if you can check the role that would be appreciated :)

@marklysze i am not sure what's the issue, its literally loading the model from huggingface. I have tried with mistralai/Mistral-7B-Instruct-v0.1 model as well it worked. Btw i am running it in my local machine not in docker setup. Can you just test whether its possible for you to download a model from huggingface.

Thanks @Kirushikesh, I'll give Mistral a go... It's downloading the models, yep (e.g. Llama 3.1 8B downloaded almost 20GB)

Thats weird-- double checking asap! We are having slightly trouble accessing repo management – will add you asap.

@marklysze -- your role had auto-expired, so sorry about this! I believe it was restored can you please check? @jackgerrits told me that you need to accept some invite?

Sorry about the auto-expire! As soon as you accept I can double check the role too

Thanks @gagb and @jackgerrits, got it and I've accepted, if you can check the role that would be appreciated :)

All sorted now!

Thanks @gagb and @jackgerrits, got it and I've accepted, if you can check the role that would be appreciated :)

All sorted now!

Looks good, thanks!

Sorry @Kirushikesh, I had limited success in getting it running in Docker or my Ubuntu environment. I tried Llama 3.1 8B and Mistral 7B v0.3.
Would you be able to test using a couple of my test python scripts under https://github.com/marklysze/AutoGenClientTesting?
test_calc.py
test_chess.py

@marklysze , sorry i am not sure if there is some issue in my code. I can resolve if you point any, So you want me to use these scripts test_calc.py, test_chess.py to test my current notebook right?. Also the scripts requires tool-calling capabilities which is not possible with llama or mistral models in huggingface ig am i write?

@marklysze , sorry i am not sure if there is some issue in my code. I can resolve if you point any, So you want me to use these scripts test_calc.py, test_chess.py to test my current notebook right?. Also these scripts requires tool-calling capabilities which is not possible with llama or mistral models in huggingface ig if i am right.
Can you please tell me whats the error you are facing when running in the docker/ur ubuntu environment?

As I can't test it (it's literally just stopping, no exceptions), I can't check that the custommodelclass works in various scenarios. It seems that tool calling is available, though I don't have any experience using the huggingface API.
So, it would be good for you/someone to test various AutoGen workflows and see how they go.

@Kirushikesh also run the command pre-commit run --all-files to fix this code formatting. thanks

Hello @marklysze, sorry for the delay in addressing the issue.
First, i have updated the notebook by the following changes:

Changed the model from Phi-3.5 to Mistral7Bv0.2
Added HuggingFace Login code snippet since Mistral is a gated model it requires huggingface login.

(I remember you mentioned that you have tried Llama3.1 and Mistral and the notebook terminated, both are gated models may be you have not logged in caused the issue)
Testing the notebook on AutoGenClientTesting programs:

Even though, tool calling is possible in Huggingface thanks for your referrence, but integrating it with the  Autogen framework is still an open issue.

But i have tried the same code with other non function calling programs[ test_code_gen.py & test_reflection.py].

The Code to test the CODE GENERATION AND EXECUTION (test_code_gen.py)
from pathlib import Path

from autogen import AssistantAgent, UserProxyAgent
from autogen.coding import LocalCommandLineCodeExecutor

# Setting up the code executor
workdir = Path("coding")
workdir.mkdir(exist_ok=True)
code_executor = LocalCommandLineCodeExecutor(work_dir=workdir)

# Setting up the agents

# The UserProxyAgent will execute the code that the AssistantAgent provides
user_proxy_agent = UserProxyAgent(
    name="User",
    code_execution_config={"executor": code_executor},
    is_termination_msg=lambda msg: "FINISH" in msg.get("content"),
)

system_message = """You are a helpful AI assistant who writes code and the user executes it.
Solve tasks using your coding and language skills.
In the following cases, suggest python code (in a python coding block) for the user to execute.
Solve the task step by step if you need to. If a plan is not provided, explain your plan first. Be clear which step uses code, and which step uses your language skill.
When using code, you must indicate the script type in the code block. The user cannot provide any other feedback or perform any other action beyond executing the code you suggest. The user can't modify your code. So do not suggest incomplete code which requires users to modify. Don't use a code block if it's not intended to be executed by the user.
Don't include multiple code blocks in one response. Do not ask users to copy and paste the result. Instead, use 'print' function for the output when relevant. Check the execution result returned by the user.
If the result indicates there is an error, fix the error and output the code again. Suggest the full code instead of partial code or code changes. If the error can't be fixed or if the task is not solved even after the code is executed successfully, analyze the problem, revisit your assumption, collect additional info you need, and think of a different approach to try.
When you find an answer, verify the answer carefully. Include verifiable evidence in your response if possible.
IMPORTANT: Wait for the user to execute your code and then you can reply with the word "FINISH". DO NOT OUTPUT "FINISH" after your code block."""

# The AssistantAgent, using Huggingface model, will take the coding request and return code
assistant_agent = AssistantAgent(
    name="Together Assistant",
    system_message=system_message,
    llm_config={"config_list": config_list_custom},
)

assistant_agent.register_model_client(model_client_cls=CustomModelClient)

# Start the chat, with the UserProxyAgent asking the AssistantAgent the message
chat_result = user_proxy_agent.initiate_chat(
    assistant_agent,
    message="Provide code to count the number of prime numbers from 1 to 10000.",
)

The Output:
[autogen.oai.client: 09-14 08:38:33] {484} INFO - Detected custom model client in config: CustomModelClient, model client can not be used until register_model_client is called.
CustomModelClient config: {'model': 'mistralai/Mistral-7B-Instruct-v0.2', 'model_client_cls': 'CustomModelClient', 'device': 0, 'n': 1, 'params': {'max_new_tokens': 500, 'top_k': 50, 'temperature': 0.1, 'do_sample': True, 'return_full_text': False}}
2024-09-14 08:38:36.694675: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
Loaded model mistralai/Mistral-7B-Instruct-v0.2 to 0

------------------------------------------------------------------------------
Writer (to User):

 Title: Navida: The Unsung Hero in the World of Quantum Computing

Navida, a pioneering company in the quantum computing industry, is making strides in making this advanced technology more accessible and affordable for researchers and businesses. Navida's quantum computing system, the Q-bit One, is a 1-qubit quantum processor, which means it is a two-level quantum system that can represent both 0 and 1 at the same time, thanks to the principle of superposition. This compact, desktop-sized device uses a unique approach to quantum computing called ion-trap quantum computing, where electric fields are employed to trap and manipulate ions, making the system more stable and reliable than other methods.

Navida's mission is not to compete with industry giants in terms of qubit count but to provide an entry-level quantum computing system for exploration and innovation. The Q-bit One can be used for various applications, including optimization problems, machine learning, and quantum chemistry.

Navida's team of experienced physicists and engineers is dedicated to pushing the boundaries of what's possible with quantum computing. They are constantly improving the Q-bit One's performance and functionality while exploring new applications for their technology.

Despite being a newcomer to the quantum computing scene, Navida has already gained attention from researchers and businesses worldwide. Their affordable and accessible quantum computing system is opening up new possibilities for innovation and discovery. However, it is essential to be aware of the regulatory landscape in this field. For instance, the National Institute of Standards and Technology (NIST) is developing quantum-resistant cryptography standards to protect against quantum computers' ability to break traditional encryption algorithms. Navida, like other quantum computing companies, will need to comply with these regulations to ensure the security and integrity of their systems.

In conclusion, Navida is an exciting and innovative company that is making quantum computing more accessible and affordable for researchers and businesses. Their unique approach to ion-trap quantum computing and commitment to pushing the boundaries of what's possible make them a company to watch in the rapidly evolving world of quantum technology. Stay tuned for more updates on Navida and their groundbreaking work in the world of quantum computing while ensuring technical accuracy and regulatory compliance.

--------------------------------------------------------------------------------

User (to Together Assistant):

Provide code to count the number of prime numbers from 1 to 10000.

--------------------------------------------------------------------------------
Together Assistant (to User):

 Here's the Python code for finding prime numbers up to 10000:

```python
def is_prime(n):
    """
    Helper function to check if a number is prime
    """
    if n <= 1:
        return False
    for i in range(2, int(n**0.5) + 1):
        if n % i == 0:
            return False
    return True

primes = []
for num in range(1, 10001):
    if is_prime(num):
        primes.append(num)

print(len(primes))
\```

This code defines a helper function `is_prime` to check if a number is prime. The main loop iterates through numbers from 1 to 10000 and checks if each number is prime using the helper function. If a prime number is found, it is added to a list called `primes`. Finally, the length of the list `primes` is printed, which represents the number of prime numbers found.

--------------------------------------------------------------------------------

\>\>\>\>\>\>\>\> NO HUMAN INPUT RECEIVED.

\>\>\>\>\>\>\>\> USING AUTO REPLY...

\>\>\>\>\>\>\>\> EXECUTING CODE BLOCK (inferred language is python)...
User (to Together Assistant):

exitcode: 0 (execution succeeded)
Code output: 1229

--------------------------------------------------------------------------------
Together Assistant (to User):

 FINISH

The code executed successfully and printed the number of prime numbers found between 1 and 10000, which is 1229.

--------------------------------------------------------------------------------

\>\>\>\>\>\>\>\> NO HUMAN INPUT RECEIVED.

The Code to test the LLM Reflection (test_reflection.py)
writer = AssistantAgent(
    name="Writer",
    llm_config={"config_list": config_list_custom},
    system_message="""
    You are a professional writer, known for your insightful and engaging articles.
    You transform complex concepts into compelling narratives.
    You should imporve the quality of the content based on the feedback from the user.
    """,
)

user_proxy = UserProxyAgent(
    name="User",
    human_input_mode="NEVER",
    is_termination_msg=lambda x: x.get("content", "").find("TERMINATE") >= 0,
    code_execution_config={
        "last_n_messages": 1,
        "work_dir": "tasks",
        "use_docker": False,
    },  # Please set use_docker=True if docker is available to run the generated code. Using docker is safer than running the generated code directly.
)

critic = AssistantAgent(
    name="Critic",
    llm_config={"config_list": config_list_custom},
    system_message="""
    You are a critic, known for your thoroughness and commitment to standards.
    Your task is to scrutinize content for any harmful elements or regulatory violations, ensuring
    all materials align with required guidelines.
    For code
    """,
)

def reflection_message(recipient, messages, sender, config):
    print("Reflecting...", "yellow")
    return f"Reflect and provide critique on the following writing. \n\n {recipient.chat_messages_for_summary(sender)[-1]['content']}"

writer.register_model_client(model_client_cls=CustomModelClient)
critic.register_model_client(model_client_cls=CustomModelClient)

task = """Write a concise but engaging blogpost about Navida."""

user_proxy.register_nested_chats(
    [{"recipient": critic, "message": reflection_message, "summary_method": "last_msg", "max_turns": 1}],
    trigger=writer,
)

res = user_proxy.initiate_chat(recipient=writer, message=task, max_turns=2, summary_method="last_msg")

The Output:
[autogen.oai.client: 09-14 08:36:33] {484} INFO - Detected custom model client in config: CustomModelClient, model client can not be used until register_model_client is called.
[autogen.oai.client: 09-14 08:36:33] {484} INFO - Detected custom model client in config: CustomModelClient, model client can not be used until register_model_client is called.
CustomModelClient config: {'model': 'mistralai/Mistral-7B-Instruct-v0.2', 'model_client_cls': 'CustomModelClient', 'device': 0, 'n': 1, 'params': {'max_new_tokens': 500, 'top_k': 50, 'temperature': 0.1, 'do_sample': True, 'return_full_text': False}}

Loading checkpoint shards: 100%
 3/3 [00:09<00:00,  3.01s/it]
Loaded model mistralai/Mistral-7B-Instruct-v0.2 to 0
CustomModelClient config: {'model': 'mistralai/Mistral-7B-Instruct-v0.2', 'model_client_cls': 'CustomModelClient', 'device': 0, 'n': 1, 'params': {'max_new_tokens': 500, 'top_k': 50, 'temperature': 0.1, 'do_sample': True, 'return_full_text': False}}
Loading checkpoint shards: 100%
 3/3 [00:09<00:00,  3.03s/it]
Loaded model mistralai/Mistral-7B-Instruct-v0.2 to 0
User (to Writer):

Write a concise but engaging blogpost about Navida.

--------------------------------------------------------------------------------
Writer (to User):

 Title: Navida: The Unsung Hero in the World of Quantum Computing

Navida, a relatively new player in the quantum computing industry, is making waves with its innovative approach to building a quantum computer that is accessible to researchers and businesses alike. While IBM, Google, and other tech giants have been leading the charge in quantum research, Navida is focusing on making this cutting-edge technology more accessible and affordable.

Navida's quantum computing system, called the Q-bit One, is a 1-qubit quantum processor. It may not sound impressive compared to the 53-qubit quantum computer IBM recently unveiled, but Navida's goal is not to compete with the big players in terms of qubit count. Instead, they aim to provide an entry-level quantum computing system that researchers and businesses can use to explore the potential of quantum computing without the need for massive investments.

The Q-bit One is a compact, desktop-sized device that can be used for various applications, including optimization problems, machine learning, and even quantum chemistry. Navida's system uses a unique approach to quantum computing, which they call "ion-trap quantum computing." This technology uses electric fields to trap and manipulate ions, making the system more stable and reliable than other quantum computing methods.

Navida's team of experienced physicists and engineers is dedicated to pushing the boundaries of what's possible with quantum computing. They are constantly working on improving the Q-bit One's performance and functionality, and they are also exploring new applications for their technology.

Despite being a newcomer to the quantum computing scene, Navida has already gained the attention of researchers and businesses around the world. Their affordable and accessible quantum computing system is opening up new possibilities for innovation and discovery, and it's only a matter of time before Navida becomes a household name in the world of quantum computing.

In conclusion, Navida is an exciting and innovative company that is making quantum computing more accessible and affordable for researchers and businesses. Their unique approach to ion-trap quantum computing and their commitment to pushing the boundaries of what's possible make them a company to watch in the rapidly evolving world of quantum technology. Stay tuned for more updates on Navida and their groundbreaking work in the world of quantum computing.

--------------------------------------------------------------------------------
Reflecting... yellow

********************************************************************************
Starting a new chat....

********************************************************************************
User (to Critic):

Reflect and provide critique on the following writing.

  Title: Navida: The Unsung Hero in the World of Quantum Computing

Navida, a relatively new player in the quantum computing industry, is making waves with its innovative approach to building a quantum computer that is accessible to researchers and businesses alike. While IBM, Google, and other tech giants have been leading the charge in quantum research, Navida is focusing on making this cutting-edge technology more accessible and affordable.

Navida's quantum computing system, called the Q-bit One, is a 1-qubit quantum processor. It may not sound impressive compared to the 53-qubit quantum computer IBM recently unveiled, but Navida's goal is not to compete with the big players in terms of qubit count. Instead, they aim to provide an entry-level quantum computing system that researchers and businesses can use to explore the potential of quantum computing without the need for massive investments.

The Q-bit One is a compact, desktop-sized device that can be used for various applications, including optimization problems, machine learning, and even quantum chemistry. Navida's system uses a unique approach to quantum computing, which they call "ion-trap quantum computing." This technology uses electric fields to trap and manipulate ions, making the system more stable and reliable than other quantum computing methods.

Navida's team of experienced physicists and engineers is dedicated to pushing the boundaries of what's possible with quantum computing. They are constantly working on improving the Q-bit One's performance and functionality, and they are also exploring new applications for their technology.

Despite being a newcomer to the quantum computing scene, Navida has already gained the attention of researchers and businesses around the world. Their affordable and accessible quantum computing system is opening up new possibilities for innovation and discovery, and it's only a matter of time before Navida becomes a household name in the world of quantum computing.

In conclusion, Navida is an exciting and innovative company that is making quantum computing more accessible and affordable for researchers and businesses. Their unique approach to ion-trap quantum computing and their commitment to pushing the boundaries of what's possible make them a company to watch in the rapidly evolving world of quantum technology. Stay tuned for more updates on Navida and their groundbreaking work in the world of quantum computing.

--------------------------------------------------------------------------------
Critic (to User):

 Title: Navida: The Unsung Hero in the World of Quantum Computing

The article provides a good introduction to Navida and its innovative approach to making quantum computing more accessible and affordable. However, there are a few areas that could use improvement in terms of technical accuracy and regulatory compliance.

1. Technical Accuracy:

a. The article mentions that Navida's quantum computing system, called the Q-bit One, is a "1-qubit quantum processor." While it is true that the Q-bit One is a 1-qubit system, it is essential to clarify that a qubit is a two-level quantum system, not a single bit. A single bit can only represent a 0 or 1, whereas a qubit can represent both 0 and 1 at the same time, a property known as superposition.

b. The article states that Navida's system uses a unique approach to quantum computing, which they call "ion-trap quantum computing." It is important to note that ion-trap quantum computing is just one of several approaches to building a quantum computer. Other approaches include superconducting quantum computing, topological quantum computing, and trapped-ion quantum computing, among others.

2. Regulatory Compliance:

The article does not mention any regulatory compliance issues related to quantum computing. However, it is essential to be aware of the regulatory landscape in this field. For instance, the National Institute of Standards and Technology (NIST) is developing quantum-resistant cryptography standards to protect against quantum computers' ability to break traditional encryption algorithms. It would be beneficial to include a brief mention of regulatory compliance in the article.

Overall, the article provides a good overview of Navida and its innovative approach to quantum computing. However, it is crucial to ensure technical accuracy and regulatory compliance to maintain credibility and provide accurate information to readers.

--------------------------------------------------------------------------------
User (to Writer):

 Title: Navida: The Unsung Hero in the World of Quantum Computing

The article provides a good introduction to Navida and its innovative approach to making quantum computing more accessible and affordable. However, there are a few areas that could use improvement in terms of technical accuracy and regulatory compliance.

1. Technical Accuracy:

a. The article mentions that Navida's quantum computing system, called the Q-bit One, is a "1-qubit quantum processor." While it is true that the Q-bit One is a 1-qubit system, it is essential to clarify that a qubit is a two-level quantum system, not a single bit. A single bit can only represent a 0 or 1, whereas a qubit can represent both 0 and 1 at the same time, a property known as superposition.

b. The article states that Navida's system uses a unique approach to quantum computing, which they call "ion-trap quantum computing." It is important to note that ion-trap quantum computing is just one of several approaches to building a quantum computer. Other approaches include superconducting quantum computing, topological quantum computing, and trapped-ion quantum computing, among others.

2. Regulatory Compliance:

The article does not mention any regulatory compliance issues related to quantum computing. However, it is essential to be aware of the regulatory landscape in this field. For instance, the National Institute of Standards and Technology (NIST) is developing quantum-resistant cryptography standards to protect against quantum computers' ability to break traditional encryption algorithms. It would be beneficial to include a brief mention of regulatory compliance in the article.

Overall, the article provides a good overview of Navida and its innovative approach to quantum computing. However, it is crucial to ensure technical accuracy and regulatory compliance to maintain credibility and provide accurate information to readers.

--------------------------------------------------------------------------------
Writer (to User):

 Title: Navida: The Unsung Hero in the World of Quantum Computing

Navida, a pioneering company in the quantum computing industry, is making strides in making this advanced technology more accessible and affordable for researchers and businesses. Navida's quantum computing system, the Q-bit One, is a 1-qubit quantum processor, which means it is a two-level quantum system that can represent both 0 and 1 at the same time, thanks to the principle of superposition. This compact, desktop-sized device uses a unique approach to quantum computing called ion-trap quantum computing, where electric fields are employed to trap and manipulate ions, making the system more stable and reliable than other methods.

Navida's mission is not to compete with industry giants in terms of qubit count but to provide an entry-level quantum computing system for exploration and innovation. The Q-bit One can be used for various applications, including optimization problems, machine learning, and quantum chemistry.

Navida's team of experienced physicists and engineers is dedicated to pushing the boundaries of what's possible with quantum computing. They are constantly improving the Q-bit One's performance and functionality while exploring new applications for their technology.

Despite being a newcomer to the quantum computing scene, Navida has already gained attention from researchers and businesses worldwide. Their affordable and accessible quantum computing system is opening up new possibilities for innovation and discovery. However, it is essential to be aware of the regulatory landscape in this field. For instance, the National Institute of Standards and Technology (NIST) is developing quantum-resistant cryptography standards to protect against quantum computers' ability to break traditional encryption algorithms. Navida, like other quantum computing companies, will need to comply with these regulations to ensure the security and integrity of their systems.

In conclusion, Navida is an exciting and innovative company that is making quantum computing more accessible and affordable for researchers and businesses. Their unique approach to ion-trap quantum computing and commitment to pushing the boundaries of what's possible make them a company to watch in the rapidly evolving world of quantum technology. Stay tuned for more updates on Navida and their groundbreaking work in the world of quantum computing while ensuring technical accuracy and regulatory compliance.

--------------------------------------------------------------------------------

@ekzhu please merge the PR. i dont have the access.
Thanks @Kirushikesh for the PR.

This PR is against AutoGen 0.2. AutoGen 0.2 has been moved to the 0.2 branch. Please rebase your PR on the 0.2 branch or update it to work with the new AutoGen 0.4 that is now in main.

@rysweet  i have rebased the PR to the autogen 0.2 branch. Please review.


'gem install sqlite3' fails on FreeBSD

Gem installation fails on FreeBSD because the Makefile for the Ruby/C glue only looks  for /usr/include/sqlite3.h and /usr/lib/libsqlite.so.  On FreeBSD, the locations are /usr/local/include/sqlite3.h /usr/local/lib/libsqlite3.so and because sqlite3 is installed through the ports system.

gem_make.out.txt

I install ruby into my home dir but this worked for me:
gem  install sqlite3 -- --with-sqlite3-include=/usr/local/include/ --with-sqlite3-lib=/usr/local/lib

I would welcome documentation changes, or changes to the extconf.rb file to make the gem install more easily on FreeBSD. I would also welcome someone adding FreeBSD to the CI pipelines, maybe something similar to what Nokogiri does: https://github.com/sparklemotion/nokogiri/blob/main/.github/workflows/ci.yml#L334-L358
Worth noting, the extconf.rb has been completely rewritten since May 2020, and so we should make sure it's still a problem, and if


Make sure the first result in most recents is highlighted when user uses CMD+K

Explanation of Change

Fixed Issues

$ https://github.com/Expensify/App/issues/51894
PROPOSAL: https://github.com/Expensify/App/issues/51894#issuecomment-2454259867
Tests
Same as QA Steps

[x] Verify that no errors appear in the JS console

Offline tests
Same as QA Steps
QA Steps

Navigate to search with CMD+K or click on the search icon (only on the Desktop web and Desktop app)
Verify that the top-most result in Recent chats is highlighted
Type in the search bar
Verify that the chat query is highlighted
Close the search bar
Repeat steps 1-2
Click on Enter
Verify that the user navigated to the highlighted Recent chats

[x] Verify that no errors appear in the JS console

PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:

[x] I verified that all the inputs inside a form are aligned with each other.
[x] I added Design label and/or tagged @Expensify/design so the design team can review the changes.

[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
https://github.com/user-attachments/assets/44aa3901-8512-4278-a16e-32288f110b5f

Android: mWeb Chrome
https://github.com/user-attachments/assets/5cd62dcc-ca28-4580-aacb-793ff215fef4

iOS: Native
https://github.com/user-attachments/assets/ea27184f-c5a4-4cbd-aa15-aa89e5f3172a

iOS: mWeb Safari
https://github.com/user-attachments/assets/5ee3b256-f4a2-403b-a193-d0eddd5e671e

MacOS: Chrome / Safari
https://github.com/user-attachments/assets/22efa102-0147-49f5-bda0-9e150daa4461

MacOS: Desktop
https://github.com/user-attachments/assets/98b6e102-af35-450a-b940-fd0838f72ef3

Reviewer Checklist

[ ] I have verified the author checklist is complete (all boxes are checked off).
[ ] I verified the correct issue is linked in the ### Fixed Issues section above
[ ] I verified testing steps are clear and they cover the changes made in this PR

[ ] I verified the steps for local testing are in the Tests section
[ ] I verified the steps for Staging and/or Production testing are in the QA steps section
[ ] I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[ ] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)

[ ] I checked that screenshots or videos are included for tests on all platforms
[ ] I included screenshots or videos for tests on all platforms
[ ] I verified tests pass on all platforms & I tested again on:

[ ] Android: Native
[ ] Android: mWeb Chrome
[ ] iOS: Native
[ ] iOS: mWeb Safari
[ ] MacOS: Chrome / Safari
[ ] MacOS: Desktop

[ ] If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
[ ] I verified proper code patterns were followed (see Reviewing the code)

[ ] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
[ ] I verified that comments were added to code that is not self explanatory
[ ] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[ ] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
[ ] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[ ] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
[ ] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[ ] I verified the JSDocs style guidelines (in STYLE.md) were followed

[ ] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[ ] I verified that this PR follows the guidelines as stated in the Review Guidelines
[ ] I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
[ ] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[ ] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[ ] If a new component is created I verified that:

[ ] A similar component doesn't exist in the codebase
[ ] All props are defined accurately and each prop has a /** comment above it */
[ ] The file is named correctly
[ ] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[ ] The only data being stored in the state is data necessary for rendering and nothing else
[ ] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[ ] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[ ] All JSX used for rendering exists in the render method
[ ] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[ ] If any new file was added I verified that:

[ ] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[ ] If a new CSS style is added I verified that:

[ ] A similar style doesn't already exist
[ ] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)

[ ] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[ ] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[ ] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[ ] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[ ] If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:

[ ] I verified that all the inputs inside a form are aligned with each other.
[ ] I added Design label and/or tagged @Expensify/design so the design team can review the changes.

[ ] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[ ] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
[ ] I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: Native

Android: mWeb Chrome

iOS: Native

iOS: mWeb Safari

MacOS: Chrome / Safari

MacOS: Desktop

@nyomanjyotisa why is the conditional !isWeb && !isDesktop? Are we trying to exclude those platforms specifically or just large screen devices in general? Because if it's the latter, we should be using useResponsiveLayout to get the screen width instead and then there's no need to create platform specific files

@luacmartins I would like to confirm one last thing. I think whenever the search modal opens then only we need to focus first recent item.
Do we need to focus when a user types and clears the search input? Bcoz this scenario doesn't look right to me and leads to unwanted or more conditional code.

There wasn't really a conclusion in the thread above, but I think we can go with clearing the selection if the recent chats section disappears and then later appears again.

@nyomanjyotisa Plz resolves the conflicts.
I think we don't require below test steps.

Clear the search query
Verify that the top-most result in Recent chats is not highlighted

All looks good, once you merge main and fix conflicts I will approve.

We just need to resolve conflicts @nyomanjyotisa

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

failing with original issue on MWeb
https://github.com/user-attachments/assets/c9e0908a-000f-44e4-ad00-07fec0bf0738

@nyomanjyotisa @Pujan92 can you have a look into this?

@mvtglobally these changes are specifically for larger screens as mentioned in the test steps and not for the native/mWeb.


Release/3.34.0

Release/3.34.0

This PR includes changes from from this PR
Would love to merge #4 before


Build CTK with already installed VTK

My configuration: QT5.14.2 /VS2019 MSCV 2017x64/VTK 8.2/CMake3.18.0.  I added the path of VTK_DIR and CTKData_DIR in CMake by adding entry. I also selected CTK_LlB_VisualizationVTKICore、CTK_LIB_Visualization/VTKWidgets、CTK_LIB_Visualization/VTK/Widgets_USE_TRANSFER_FUNCTION and CTK_USE_SYSTEM_VTK during the configure process. The following error occurred when I generated ALL_BUILD in VS. I wonder if this is a version issue, how can I solve this problem. I want to use CTK for volume rendering in Qt.Hope someone here can help me ！

I don't see any error messages. Maybe they are in Chinese. To get help, please copy here the full build log (not screenshots). I don't think any CTK maintainer speak Chinese, so either translate the messages or build using English Visual Studio IDE and build tools.

This was helpful. It seems that you tried to build CTK with VTK-8.x or earlier (which does s not support PBR). Current CTK version is only compatible with VTK-9.x or later. You can either upgrade your VTK or use an older CTK version.

Thanks a lot！That's great. I think the suggestion makes sense. I will try it again.But I wonder where can I download the older version of CTK and what version might be appropriate？ I'll be looking forward to your next answer. @lassoan

You can check the revision history of the file that fails to complete to see which commit introduced the commit that made CTK incompatible and use any version before that.


[ENH] meta-object mixins

This PR adds meta-object mixins - previously, the package provided only classes inheriting from BaseObject or BaseEstimator, which can create multiple inheritance conflicts if downstream needs to inherit from an abstract desceendant of BaseObject or BaseEstimator.
This is also more in line with the actual use cases in sktime and skpro.

Codecov Report

Merging #216 (2f64a37) into main (d840e75) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
@@            Coverage Diff             @@
##             main     #216      +/-   ##
==========================================
- Coverage   83.59%   83.57%   -0.03%
==========================================
  Files          43       43
  Lines        2841     2843       +2
==========================================
+ Hits         2375     2376       +1
- Misses        466      467       +1

Files Changed
Coverage Δ

skbase/base/__init__.py
100.00% <100.00%> (ø)

skbase/base/_meta.py
36.16% <100.00%> (+0.57%)
:arrow_up:

... and 1 file with indirect coverage changes


feat(codecs): Add formatting options to Codecs.array(..)

:tada: This PR is included in version 1.4.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


simple search

Can you please explain how I can make a simple search on one of my collections? I followed the typesense tutorials but I can't get anything to work with your package. Thanks

Ignore my previous message. I found out how to do a search using your package. Thanks

Hey @kiloki-official! Glad to know you got the search working. If you're looking for working examples, check out the example/console-simple directory.


Check for no internet

In order to create a more "app-like" experience we want to show a native Android screen when the user is not connected to the internet. This prevents the less than ideal scenario of the user attempting to load the website in the shell and seeing a browser error.

Any chance I can get a set of eyes on this @colinta?

Other than comment about ElloUtil, looks great!


Check and evaluate cuelang (base for timoni)

Timoni is based on cuelang. It will be hard to understand timoni without understanding cuelang. We also want to evaluate if we can extend timoni with new features, like schema and doc generation.
### Tasks
- [x] learn cuelang and try it
- [ ] do a knowledge sharing session

It's a great research topic I never got to do. Let's keep it as a research topic, I'll just remove priorities.


timeout error

I found issue similar to my #32, maybe you already know how to fix it.
Cursor at line 4 and I tried to write const

I have the same issue, altough my project size is pretty small (10 files, 1000 lines total)

I think this issue maybe the server while shut down after idle 5 minutes.
So if Send an empty request to server every 4 minutes while keep the connect alive and avoid this problem.   Who can try it ?

You want the server to time out and close itself, because otherwise it'll continue to waste memory as the file sits unused in your editor. The plugin should automatically restart the server when it needs it. If that's not working for you, you could try to debug it.

I agree with @jeremytm
The problem seems to be happening very frequently on any decent sized JS project.
Tern on Sublime Text seems to time out on any decent size JS project, but Tern seems to work fine with deoplete-ternjs

I get this message, seemingly at random, so often it completely undermines the value of Tern. It would be nice with at least some more info, so I can debug whatever causes the timeout.

I filter out the timed out error message. And I create a PR    #189
tern.py

def report_error(message, project):
  # filter the timed out error message
  if message != "timed out":            # add this line to filter out the "timed out" error message
    if sublime.ok_cancel_dialog(message, "Disable Tern"):
      project.disabled = True


Remove the root. prefix from everywhere except root.

After a discussion with @olafurpg, I propose the following changes to the spec:

_root_. is no longer part of the owner chain used to create global symbols (but it's still part of its own owner chain, and it's still everyone else's direct or transitive owner)
_empty_. becomes part of the root package

Fixed in https://github.com/scalameta/scalameta/issues/1422.


Bug fix for underscheduled GAU allocation bug

Critical Changes
Changes

We fixed an issue causing the default General Accounting Unit amount to be calculated improperly when the Opportunity was not fully scheduled.

Issues Closed
New Metadata
Deleted Metadata

@KietTruongSFDO Should there be a GH issue for this bug? I think NPSP usually does Issues for bugs.

@markross-sfdo @KietTruongSFDO No. If I'm understanding correctly, this is a bug of code that was not merged to master yet and therefore was never in customers' hands. Therefore, we don't need (or want) an issue for it. Thanks.

Hi @markross-sfdo and @lianeyee, can you guys take a look at these change notes real quick? Thanks!

Hi @KietTruongSFDO. Should this be noted as a "future release" change?

@lianeyee This is already fixed and in the code now.

@KietTruongSFDO Sorry, I wasn't clear. I mean it looks like this change was for Payment Allocations. We've been release noting items for those features with language like "This feature/change is intended for use in a future release and should have no visible impact on your org." Should that be included in this release note?


Generated TypeAdapter should use final for local variable declarations

Steps to Reproduce
Enable prefer_final_locals in the analysis_options.yaml file of a project that also generates hive type adapters.
The linter will show errors for the generated code. Currently, there's no way to opt-out of linting in generated files.
Code sample
Here's the code being generated:
@override
User read(BinaryReader reader) {
  var numOfFields = reader.readByte();
  var fields = <int, dynamic>{
    for (var i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
  };
  return User(...);
}

It would be nice if we used final instead of var:
@override
User read(BinaryReader reader) {
  final numOfFields = reader.readByte();
  final fields = <int, dynamic>{
    for (var i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
  };
  return User(...);
}

The reason why the entire project does not use final locals is that it is not recommended by the pendatic project.

prefer_final_locals does not reflect common usage.

Oh, I see. That's fine then

Same issue.  I'm using analysis_options which does require prefer_final_locals and it would be great if you could fix it as I have to fix them by hand to get rid of the warnings.

I'm also seeing
"Type annotate public APIs"
@override
final typeId = 0;


[WIP] Remove deprecated code

Summary
This PR removes:

CircuitQNN
EstimatorQNN
TwoLayerQNN
QuantumKernel
All opflow related code

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

6 of 6 (100.0%)  changed or added relevant lines in 4 files are covered.
20 unchanged lines in 3 files lost coverage.
Overall coverage decreased (-1.4%) to 91.478%

Files with Coverage Reduction
New Missed Lines
%

qiskit_machine_learning/connectors/torch_connector.py
1
90.18%

qiskit_machine_learning/kernels/trainable_kernel.py
1
97.87%

qiskit_machine_learning/neural_networks/sampling_neural_network.py
18
46.0%

Totals

Change from base Build<PHONE_NUMBER>:
-1.4%

Covered Lines:
2018

Relevant Lines:
2206

💛  - Coveralls

Though in this case they are all absolute links so it would not help - in principle yes!

Unless they were all relative urls so once you navigated to whatever version folder they were copied to, once they were no longer the current version, they would all still work. Anyway something for the future if/when versions of docs ever happen


Unnecessary re-evaluation of subscribers & leaking in dispatch

Specifically this line, https://github.com/reactjs/redux/blob/master/src/createStore.js#L175
Just looking through the src this line stuck out to me because if there was no "mutex" in place this is would be a race cond. (Though the mutex doesn't cover the subscriber part, so if it were somehow in a multi-threaded environment, the subscribers could possibly not be in sync here, though even in a single- threaded environment subscribers are still able to be added, explanation further down.)
Right now there is no benefit to re-evaluate the length on every loop and goes against https://github.com/reactjs/redux/blob/master/src/createStore.js#L85
"The subscriptions are snapshotted just before every dispatch() call." (emphasis mine)
So we should cache as things are suppose to be "frozen" anyway.
===
Related to this issue, specifically "The subscriptions are snapshotted just before every dispatch() call."
If this is correct spec, this does not happen by the way. New subscribers can be leaked into a dispatch during dispatch (during the mutex lock). As reducers can add subscribers and they will be called when listeners are called.
This pull does not address that. As I am unsure if this is truly unintended. But I can add to this pull. I am opening it up with minimal changes to get the conversation going on these issues.

I would feel a lot better about this if there was a test case. I'm not sure if it's practically able to be triggered.

As reducers can add subscribers

Nope, they cannot. Otherwise they aren't pure functions and would violate the predictable nature of Redux.

@timdorr Test case for the length caching? Well caching the length is not fixing a bug, it's just removing unnecessary part of re-evaluating the length of subscribers every time it loops. Since the length should never change / subscribers can't be added during dispatch, why does the length need to be recalculated?
As for

Nope, they cannot. Otherwise they aren't pure functions and would violate the predictable nature of Redux.
Right. I was just bringing up that it can be done, whether a user does it or not is one thing, the option is there. It is the same thing as this https://github.com/reactjs/redux/blob/master/src/createStore.js#L164 with this line they don't have the option to at all.

Length is a property, not a function call. Nothing is getting reevaluated on each loop. There is no performance difference here, as it will just deref a pointer when this gets compiled down to IR/machine code by any of the major JS engines.
Your original post made it seem like there is a subtle spec violation here. Is there one? That's what there should be a test case for.

Yes with most modern JITs the performance doesn't matter. But that's beside the point. I guess I should rephrase, performance being equal, I am referring to the fact it will re-evaluate because the length property could change versus it can never change if it were cached. The potential (theoretically at least) for mutations on the length can exist in the future.
So if performance doesn't matter, then we are talking about programmer's intent. And that is not our intention to ever have the length of the array to change, so why does the possibility exist?

Fine, you can say under no current circumstances will this occur now. Fair enough, I was just raising the point that it could lead to something unexpected, and if both codes are the same performance wise, why not play it safe?

Like I mentioned this is just a pull request to get discussion going on possible changes. But as per https://github.com/reactjs/redux/blob/master/src/createStore.js#L85 if this is still the intention, then the current code does not do that. As per the actual source it does not do this. It actually snapshots after dispatch. Which is why you can subscribe during a dispatch in a reducer.

There are many different ways this can be addressed but I am not sure what route the maintainers would like to take or any.
I've pointed out the simplest and easiest solution is caching the length of the subscribers. If you cache the length before dispatch as per L85 comments says it does, then even if the length changed (more subscribers get added as explained in 2. this is possible), you still only call the same listeners. And whether you care about 2., it does more closely follow the comment in L85 as far as programmer's intent.

I am actually going to close this, I don't feel like this pull is heading anywhere. As I don't understand why I need to explain myself so much or feel like I need to defend myself. I don't feel like this is a partnership in a problem, but the opposite.
This was meant to be a trivial change... and not a proposition for a major change. It seemed obvious to me there is mismatch in the code. But I am not the maintainer, I understand that.
Length should never change as per comments in the code, so why should the possibility for the loop to evaluated a different length exist?
For the subscribers being snapshotted as the comments say before, but the code clearly shows after. Which is correct?  Like I said in the original post, I don't know which is correct so I am opening for discussion before I make the right changes. But the code or the comment of what the code does, one of them is obviously wrong.
As for reducers ability to add subscribers, this can be done as of now as I mentioned. If docs are enough fine, but there's already existing code in other places to put limits on things on top of the docs.

Hey, thanks for PR. I think that we rely pretty heavily on listeners not changing during dispatch. We have safeguards in place to ensure that. (See how we copy array lazily if subscribers change during dispatch.)
Therefore we don't want to add a safeguard here because it might prevent a more important bug from surfacing early in the future. If subscribers do get mutated we want to fail early rather than make such a bug dormant and unnoticed.

The lazy array copying happens after dispatch, not during.
As mentioned several times already, you can add new subscribers during a dispatch through a reducer:
https://jsbin.com/zomunu/1/edit?js,console
There is a safeguard to stop dispatching from a dispatch, but not subscribing. Why safeguard one but not the other?
This introduces side effects from leaking into redux. With this I can actually dispatch from a dispatch.
https://jsbin.com/zomunu/edit?js,console
_warning this is an infinite loop since dispatching from a dispatch is recursive. But you can open it in a new tab to see I'm not lying.
And the safeguard I proposed was just to start discussion, I was open to whatever method after discussion as mentioned in the original post.

There is no need to make this emotional :wink:

There is a safeguard to stop dispatching from a dispatch, but not subscribing. Why safeguard one but not the other?

You’re right—it should have been safeguarded. There is no particular reason we don’t safeguard subscriptions while reducer is running other than we forgot to do it. I’m happy to accept a pull request that prevents subscriptions and unsubscriptions while the reducer is running, analogous to how we prevent dispatches. Since it’s technically a breaking change, it would need to be submitted against the next branch.
Thanks for pointing out the issue! I apologize if my tone was dismissing because this was not my intention. I was just proposing that we should fail hard for cases we don’t want to support rather than have half-working safeguards against them.
I would also suggest that in the future, to avoid bikeshedding and confusion, you include the failing test case in the pull request. This would make it much easier to see what problem you are trying to solve rather than debate whether the problem exist.
Thank you again!

@gaearon I admit after a bit I am emotional, but it's not about whether I can make this pull happen. It's that I feel I'm repeating myself because people do not believe me. If it was a clear "I understand, but it's not an issue" then ok.
I closed the issue because I did not feel it was going to go anywhere, and I did not want it to force a resolution if maintainers did not feel there was a problem.
Everything I've been saying is just an expansion or repeating my original post. I say "hey reducers can subscribe", I'm told they cannot. I've been saying subscriptions happen during and not before but I'm told this is not true either.
I mean if someone took even 1 minute to look at the code itself they would realize I am not making this stuff up. But point noted that I will have a clear example from the get go next time.
And I see your point about bike shedding, but there is a bigger issue that I keep trying to point out.
Again if people would assume I'm not making things up or assume I and others have valid points to contribute they can see this.
I will make a new issue we can talk further about it there and we can leave the misunderstandings here.

@hnry Sorry if I contributed to any feelings of excess resistance. We definitely want contributions on this project and I'm sorry if I discouraged that for you.
Much like Dan said, a test was suggested because it's the clearest way to get across the issue you're trying to fix. It also helps prevent a regression later on.
Interestingly, assuming you could change the spec, you could do this more simply as a reversed loop:
for (var i = listeners.length; i >= 0; i--) {

I think my main style issue is excess terseness. That would be better represented as a var length = listeners.length on the line beforehand. That would be more comprehensible to more people. Single letter variables are often a source of confusion, especially for beginners.


docs: improve <CommunityNote>

Hi Rom,
Besides the hasExtension prop you mentioned in your comment, I've also added the tool prop.
Example:
tool => toolName = ant
toolTitle from pageContext.pageTitle = Ant Design
Please take a look and review this PR.

For some tools it doesn't make sense to create an extension. So we should have an option to not show the contrib note, e.g. with hasExtension={null}.

For some tools it doesn't make sense to create an extension. So we should have an option to not show the contrib note, e.g. with hasExtension={null}.

Does this also mean we don't show the full community-led notes ?
If what you mean is just not showing the note below,

[!NOTE]
There isn't a Vike extension for Redux yet, but contributions welcome to create one.

that can already be achieved by excluding the hasExtension prop.
e.g.  <CommunityNote tool="tailwind" url="https://tailwindcss.com" />.
I also think we can improve the assertion, if hasExtension is undefined, then the tool prop should be optional

Only not showing the note.

I'll start applying the new props to all the community-led pages now

Ok neat :eyes:

I'll start applying the new props to all the community-led pages now

Done! Let me know if I missed anything.
FYI, I've removed the backticks (`) from the styled-jsx page title.

:100: Let me have a look :eyes:

FYI, I've removed the backticks (`) from the styled-jsx page title.

:dizzy:

Perfect! Great move to not add the note to the Docker and ngnix pages. Intervention-- :grin:


Request for alphabetic sort by author and title

Would it be possible to add a sorting option to the song results to order them alphabetically by Author, then Song Title?
This would greatly help locate songs by artists without having to search for them one-by-one, and would also help to group together not only an artist's songs, but also group together the same song when mapped by several different uploaders.

Adding it would be simple it's just the search affects the ranking of songs in the list, we can try to do that, worth a try ig


scapy is GPL but PTF is not

PTF is licensed under Apache 2.0, but links against scapy, which is GPL 2+. This licensing is incompatible. PTF needs to either find an Apache 2.0-compatible replacement for scapy or be released under a GPL-compatible licence.

Adding @jnfoster. I think from a p4.org usage perspective, changing the ptf license to a GPL-compatible one is fine, since ptf is used as a binary. But it may goe against the p4.org charter / philosophy to produce software under a GPL license.

Thanks. I'll look into it with the TST.

How painful would it be to detangle Scapy from PTF?

If there is an alternative Python package we can use to craft network packets, it should not be too painful (we may have to redefine some custom headers, such as INT). But after a quick search I couldn't find one, so writing such a library from scratch is likely to mean much more work.

I think it might make sense to ask some layers to take a (second) look, since PTF is simply importing Scapy modules. I might be wrong, but I doubt that Scapy license is really so restrictive.

Python's import is equivalent to linking in C/C++. This would be fine if scapy were LGPL, but it's GPL, alas.

I am not a lawyer, but they do not seem to be equivalent. Linking in C/C++ is done with the binary code (and that's precisely the reason for LGPL), where as in case of Python we are importing modules in source code.
Where does it say that linking the binary library and importing Python modules are?

To be more precise, Python's import is equivalent to #include in C/C++, which usually induces linking. These are mechanisms that create a more intimate connection with the imported/included/linked component (e.g., sharing an address space and data structures) than what is typically available via the command-line or IPC mechanisms if the component were a self-contained program. For GNU's take, see https://www.gnu.org/licenses/gpl-faq.en.html#MereAggregation.
As an aside, one could conceivably create a GPL server wrapper around a GPL library and make requests to the server from non-GPL code. AGPL was created to close this loophole.

I think we should take a look at how Scapy is used in PTF. For example, the functions like simple_tcp_packet() are very convenient, but not essential to the framework.  The other place is the Mask module, but, again, it is essential for the tests more than for the framework.
In other words,  I wonder whether it might be possible to separate Scapy in such a way, that people can write tests with it if they have it (and if they feel comfortable importing and using it in their own tests), but the framework doesn't have to rely on it.
It might not be easy, since legally speaking tests are imported into PTF :), but I think it makes sense to at least ask.

How are we using Scapy in PTF? If we're just using it as a Python library for parsing/deparsing and representing common packet formats, I wonder if we could switch to another open-source library without much pain.
For example, it's been a long time, but I really liked how POX represented packets...
https://github.com/noxrepo/pox/tree/eel/pox/lib/packet
And it's Apache2-licensed.
Someone would have to do the work to port, but is swapping out Scapy for POX a possible path forward?

I do not think that POX is a good replacement for Scapy, so it would be nice to modularize PTF so that people can have a choice, rather than replace a good package with not-so-good one.

Creating a packet interface for PTF sounds good.
Just curious: what do you not like about POX?

Try to code the basic stuff, like quickly creating a packet from  scratch of parsing it in POX and I think it will be pretty clear. It is also designed more for scripting rather than interactive work.

Fair enough. I had a pleasant experience but that was building SDN controllers a loooong time ago and not in the settings you're using it.

having skimmed only https://github.com/p4lang/ptf/blob/master/src/ptf/packet.py and ignorant of any other current or planned feature usage of scapy -- I believe the BSD licensed dpkt is a possible alternative.

Hi all,
Reopening discussion, as we have a proposal for making PTF more independent from Scapy: https://github.com/p4lang/ptf/pull/147
This is the initial proposal and we are open for the discussion on how to improve it to meet your needs in this topic.
To summarize, our proposal is to make packet module pluggable. Thus, one can develop his/her own packet manipulation framework and then, create a 'packet module implementation' which utilizes this framework. By default, it will be Scapy (current packet.py contents are moved to packet-scapy.py).

My proposed solution has been approved by some ppl and I need to have a review from one of the maintainers. Who is able to check it out? This will enable pipeline with tests to be run.

Addressed by https://github.com/p4lang/ptf/pull/147


WIP Implement USS

Ref fw issue tillitis/tillitis-key1#2 and PR https://github.com/tillitis/tillitis-key1/pull/9
See in code comments, copypasted here:
     // TODO
     //
     // The (user input string for the) secret USS should probably not be passed
     // as a cmdline arg. So ask user to to type it then? Can also read it from
     // file passed on cmdline, with classic "-" meaning stdin.
     //
     // But how to make this usable in mkdf-ssh-agent?
     //
     // Do users need to understand that the string they input (by some means)
     // is not used directly, but is hashed to become the USS (32 bytes)?
     //

Rebased, minor changes, squashed and merged.