AWS MSK IAM AUTH not working

Hi,
I am trying to evaluate kpow locally from the docker image. I have a kafka-cluster setup in an aws with only IAM Authentication enabled. I am following the instructions given here to setup my connection fields. I am using the following command to spin up the container
docker run -p 3000:3000 --env-file ./config.env operatr/kpow:latest
I am setting the connection fields config.env file along with the license and broker details.
I am getting the following exception
An error: (java.security.PrivilegedActionException: javax.security.sasl.SaslException: Failed to find AWS IAM Credentials [Caused by com.amazonaws.SdkClientException: Unable to load AWS credentials from any provider in the chain: [software.amazon.msk.auth.iam.internals.EnhancedProfileCredentialsProvider@4528e3d: Profile file contained no credentials for profile 'xxxxx-xxxxxx': ProfileFile(profiles=[]), com.amazonaws.auth.AWSCredentialsProviderChain@105bf791: Unable to load AWS credentials from any provider in the chain: [EnvironmentVariableCredentialsProvider: Unable to load AWS credentials from environment variables (AWS_ACCESS_KEY_ID (or AWS_ACCESS_KEY) and AWS_SECRET_KEY (or AWS_SECRET_ACCESS_KEY)), SystemPropertiesCredentialsProvider: Unable to load AWS credentials from Java system properties (aws.accessKeyId and aws.secretKey), WebIdentityTokenCredentialsProvider: You must specify a value for roleArn and roleSessionName, software.amazon.msk.auth.iam.internals.EnhancedProfileCredentialsProvider@6dea8cc6: Profile file contained no credentials for profile 'default': ProfileFile(profiles=[]), com.amazonaws.auth.EC2ContainerCredentialsProviderWrapper@2bb4f04: Failed to connect to service endpoint: ]]]) occurred when evaluating SASL token received from the Kafka Broker. Kafka Client will go to AUTHENTICATION_FAILED state. 04:27:15.850 ERROR [main] operatr.kafka – Error fetching cluster id java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.SaslAuthenticationException: An error: (java.security.PrivilegedActionException: javax.security.sasl.SaslException: Failed to find AWS IAM Credentials [Caused by com.amazonaws.SdkClientException: Unable to load AWS credentials from any provider in the chain: [software.amazon.msk.auth.iam.internals.EnhancedProfileCredentialsProvider@4528e3d: Profile file contained no credentials for profile 'xxxx-xxxxxx': ProfileFile(profiles=[]), com.amazonaws.auth.AWSCredentialsProviderChain@105bf791: Unable to load AWS credentials from any provider in the chain: [EnvironmentVariableCredentialsProvider: Unable to load AWS credentials from environment variables (AWS_ACCESS_KEY_ID (or AWS_ACCESS_KEY) and AWS_SECRET_KEY (or AWS_SECRET_ACCESS_KEY)), SystemPropertiesCredentialsProvider: Unable to load AWS credentials from Java system properties (aws.accessKeyId and aws.secretKey), WebIdentityTokenCredentialsProvider: You must specify a value for roleArn and roleSessionName, software.amazon.msk.auth.iam.internals.EnhancedProfileCredentialsProvider@6dea8cc6: Profile file contained no credentials for profile 'default': ProfileFile(profiles=[]), com.amazonaws.auth.EC2ContainerCredentialsProviderWrapper@2bb4f04: Failed to connect to service endpoint: ]]]) occurred when evaluating SASL token received from the Kafka Broker. Kafka Client will go to AUTHENTICATION_FAILED state.
I have my aws profile xxxxx-xxxxxx (name masked) configured properly in credentials file. Also I am able to connect to the kafka-cluster from my local using kafka-cli, which also requires setting up the JAAS config in the similar manner.
Can you please help me in resolving this issue?
Regards
Dheeraj

Hi @rampaldheeraj thanks for the report.
I think there are a couple of factors at play here, and they have to do with what the kPow container can see that is available on your local machine (not very much) and how to provide visibility of required things (either with volume mounts or more environment variables).
By default kPow has no access to the file system of the host machine when you run it as you have:
docker run -p 3000:3000 --env-file ./config.env operatr/kpow:latest

That is important, because you have most likely configured a SSL_TRUSTSTORE_LOCATION in your config.env. That truststore is on your local machine. We need to provide that physical truststore to the kPow container as well.
There are a few ways to manage this for production setups, but in your case on a local machine the easiest thing to do is mount a volume that contains the truststore, mapping from your local machine to a path within the container.
Here's a command we use to provide a volume mount from a local directory (containing the truststore), relative to where the docker command is run on macos, to a fixed '/ssl' path within the container.
docker run --volume="$PWD/ssl:/ssl" --env-file ./config.env operatr/kpow:latest

Then configure your truststore in config.env to be located at the mounted volume path:
SSL_TRUSTSTORE_LOCATION=/ssl/your-truststore.jks

The error output in your example is related to this local filesystem / volume mounts issue. In your specific case the container itself has no concept of what AWS account is in use.

I have my aws profile xxxxx-xxxxxx (name masked) configured properly in credentials file. Also I am able to connect to the kafka-cluster from my local using kafka-cli, which also requires setting up the JAAS config in the similar manner.

It's most likely that the kafka-cli on local is using the default credential profiles file - typically located at ~/.aws/credentials (location can vary per platform), and shared by many of the AWS SDKs and by the AWS CLI.
As with the truststore, this credentials file in not available to the container unless we provide it as a volume mount. You will need to either mount that credentials file or provide the credentials via another method. AWS looks in a number of places for credentials, see the default provider chain details here: https://github.com/aws/aws-msk-iam-auth#configuring-a-kafka-client-to-use-aws-iam
You could, for example, set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY in your config.env for testing purposes.
Note in a normal deployment of kPow to ECS/Fargate or EKS or EC2 or similar these credentials are already in place and available to kPow - it's only in your case of running from a local machine that you need to do slightly more work.
If you need any more help just pop an email over to<EMAIL_ADDRESS>Best,
Derek


when de-piping an assignment, try to fit it on one line

Example Input
# given
x =
  y
  |> Enum.map(&f/1)
  |> Enum.join()

# we get
x =
  Enum.map_join(y, &f/1)

# we want
x = Enum.map_join(y, &f/1)

Even without de-piping, I would be happy to see styler format it into one line.
x =
  Enum.map_join(y, &f/1)

should become
x = Enum.map_join(y, &f/1)

amen to that. always wished the formatter would move things up if you increased line length in a codebase, or updated a line to be less long (hence styler!)
i'll spike on that when i work on this issue and see if it can't happen together, thanks for the suggestion


Allow groups to be set for the jenkins-slave user

Mostly so I can add the slave user to the docker group

I closed/re-opened this just to re-trigger the tests.  Looks like the centOS docker/beaker test is as flaky as the Ubuntu one since it worked just fine the 2nd time without changes :/

Looks good.


dotnet restore argument handling.

https://github.com/mawosoft/dotnet-dependency-alert/blob/923454d561fb281d71efa8c4d31424b33ea8ab56/src/checkDependencies.ps1#L113-L117
Same problem as the one fixed in 923454d561fb281d71efa8c4d31424b33ea8ab56, but less likely to happen.

Passing '' as project/solution to dotnet restore doesn't seem to cause any problems, even if followed by other arguments.
OTOH, a $null value in the arguments array is ignored even in older PowerShell versions (back to 5.1) - so maybe we should change it anyway?


New English strings file for covenant2542020.apk

Can you use the attached file for English strings, please. I changed the extension to .txt because .json is not allowed by github issues. Thanks.
en.json.txt

will add this en.json in the build

Has this been added? The latest version today still shows the old strings for many fields.

Please find the attached latest json file we have modified. Please review. This is used in the latest apk in the commit: 3acc6ddceebceb4a556845da8029f845e74a01b4
en_json.txt

Updated en.json file for your reference.
en.json.txt
Latest APK Commit: 451bd70d140700bb7d41d2c32b0d5dcbbd4762b0


A11y_AzureToolsStorageExplorer_DeletePopup_Keyboard: Keyboard focus goes on non-actionable controls(Texts).

“Check out Accessibility Insights! - Identify accessibility bugs before check-in and make bug fixing faster and easier.”
GitHubTags: #A11y_AzureToolsStorageExplorer; #A11yMAS; #A11YTCS; #DesktopApp; #MAS2.1.1; #Keyboard; #Mac;
Environment Details:
Application Name: Azure Tools Storage Explorer
Application Version: 1.10.0
MAC Version 10.14.6 Beta(18G29g)
Repro Steps:

Launch Storage Explorer
Navigate to "Open Connect dialog" pane and Sign in to Azure.
Go to "Manage Accounts" pane and Select the subscriptions you will use. Once selected,
click on "Apply" button.
Navigate to "Blob Containers" of the selected subscription, right click and hit enter on
"Create Blob container" to Create a new Blob container.
Once completed, Navigate to "Upload" button and Upload a blob/file by using "Upload Files"
control.
Once Completed, Right click on uploaded blob and Select "Delete" and hit enter.
Start navigating on the screen using Tab key.
Verify Keyboard focus goes on non-actionable control.

Actual:
Keyboard focus goes on non-actionable controls(Texts) Using Tab key.
Same issue is observed in below Scenarios:

Rename blob
Here in this Scenario Keyboard focus goes on Texts.

SAS URL
Here in this Scenario Keyboard focus goes on Disable controls(Blob, URL, Query string).

Blob Container Properties Tab
Here in this Scenario Keyboard focus goes on Texts.

Properties Tab
Here in this Scenario Keyboard focus goes on Texts.

Undelete Selected
Here in this Scenario Keyboard focus goes on Texts.

Blob Container Actions tab
Here in this Scenario Keyboard focus goes on disabled buttons using Tab key.

Actions tab
Here in the Scenarios keyboard focus goes on disabled buttons using Tab key.

Expected:
Keyboard focus should not go on non-actionable controls(Texts) Using Tab key.
User Impact:
Keyboard only users face difficulty to know whether the control is actionable or not if keyboard focus goes on non-actionable controls using Tab key.
Recommendation:
https://microsoft.sharepoint.com/teams/msenable/mas/Pages/browse-fixes.aspx
MAS Reference:
https://microsoft.sharepoint.com/:w:/r/teams/msenable/_layouts/15/WopiFrame.aspx?sourcedoc={8492c4eb-c179-40ae-8777-cd044ed725a2}
Attachment for Reference:
1962_A11y_AzureToolsStorageExplorer_DeletePopup_Keyboard.pptx

@vinodbk197 , for everything you mentioned here's what I'll be doing:

Delete confirmation - I will remove the focusing.
Rename dialog - I will remove the focusing.
Generate SAS Dialogs - Those inputs are not disabled, they are read only. It is correct for them to be focusable.
Properties panel - Those inputs are not disabled, they are read only. It is correct for them to be focusable.
Undelete confirmation - I will remove the focusing.
Actions panel - I will remove the focusing.
Actions panel - I will remove the focusing.

The changes I have outlined above have been merged into master.

@MRayermannMSFT
For scenario "Connect to Azure Storage" also keyboard focus is going on non actionable controls  by using tab key.
Same issue observed through out the application where non actionable controls receives keyboard focus while navigating using tab key.

@MRayermannMSFT  Verified this issue in Microsoft Azure Tools Storage Explorer Application Version: 1.12.0 in MAC Version: Catalina 10.15.3, this issue is no longer reproduced. Hence Closing the bug.

GithubTags:#Closed;

GitHubTags:#BM-TCS-StorageExplorer-Mac-Sep2019;


Fix license acceptance in omnibus/kitchen.yml

The omnibus/kitchen.yml is currently broken due to the lack of an explicit license acceptance.

Fixed in #9030


Lint

Judging by our 3 different file naming conventions and countless more variable naming conventions, I think it's time to standardise.
After doing some research, I think we should go with pycodestyle; it uses the PEP 8 convention, which we started using with #115.

After some consideration, we will go with pylint due to it's ability to integrate with IDEs and code editors.

I did not understand the complete issue but I think, I can help can someone link or please refer to what all are the pending items in this issue.

I did not understand the complete issue but I think, I can help can someone link or please refer to what all are the pending items in this issue.

There is an old list of files in #124 . This PR is mainly about addressing the numerous different code styles we have running throughout the project, and also removing redudant code (mainly code that's commented out). As for code style, I plan to follow most of PEP8, but I don't have a list of what I'm deeming unreasonable.
You can make a new PR superseeding #124 , but if you're looking for more immediate merges than I'd recommend working on issues with the 'bug' flair too.


Edit-files-faster incompatible file icons extension

File icons for github, bitbucket, gitlab causes two icons to appear if used with this feature. Maybe it could be integrated.

We cannot possibly be compatible with all other extensions. You can disable the feature in the settings.

I thought about this when implementing the feature but the fix is too complex.
You could ask the other extension to:

add a octicon-file class to their new icon
place replace the existing .octicon-file element

So it should work regardless of the order in which the 2 extensions are executed


Do you use nix/misc/systemv/nix-daemon?

It seems that we have this untested misc/systemv/nix-daemon file in the Nix package manager, and I was wondering whether you are using it.
It would be great if we could reuse your testing infrastructure to make sure that any changes to it are correct.
Context:

https://github.com/NixOS/nix/pull/11103

Nope, FreeBSD isn't a sysv init system so we're using a fork with a specific freebsd-rc daemon configuration added. See here: https://github.com/rhelmot/nix/tree/freebsd-staging/misc/freebsd-rc

Ah ok, that answers the question then.
I think we could accept that file upstream if you can provide an expression that tests it, but I'll close this for now.
Thank you!


Common acronyms should be in all uppercase

In v1, we used to have a Nunjucks filter for making all common acronyms uppercase. Can we please restore this functionality at some point?

Fixed in 13fe159


V2.1.1 cov merge tool darwin workaround

This merges v2.1.1 into the cov_merge_tool branch, and has a fix for a possibly clang specific issue with the new API.
There were two merge conflicts, both in 'includes/fc4sc_coverpoint.hpp', where I chose the incoming v2.1.1 patch but left in the conflict marking behind comments for your review.  These are in commit: https://github.com/amiq-consulting/fc4sc/commit/22353bb9d2df655a7a363df770517d25dd138866
With clang on both CentOS and MacOSX, the unit tests fail compilation attempting to access the "deleted" bin_wrapper copy constructor.  Workarounds were put in behind FC4SC_DARWIN_WORKAROUNDS ifdefs, but I think that was incorrectly named as the same issue surfaced on CentOS+clang.
With FC4SC_DARWIN_WORKAROUNDS defined, unit tests pass on both CentOS and MacOS.

Hi,
Thank you for your fixes, I have merged them into the branch, along with the merge from label v2.1.1.
Note that we plan on keeping the code as simple and straight-forward as possible. For this reason, I have removed the #ifdefs directives and reverted the gtest suite directory's Makefile to the version before your workaround fixes.
I have tested compiling with clang on CentOS and it works now.
The updates are available starting with the following commit: fc8a280a2d31d05e76ff67900c53b1de8318e513.
Best Regards


Configuration environment variables are not read when configuration file is not present

Configuration environment variables are not read when configuration file is not present

Fixed in https://github.com/RedHatInsights/ccx-notification-writer/pull/95


Style/787; COUNTRY=rbd

This fixes issue [787].
This complete the PR https://github.com/WFP-VAM/prism-app/pull/852 by updating style according to sketch
How to test the feature:

[ ] Use rbd with 2 layers => https://prism-882.surge.sh/?baselineLayerId=ch_phase&date=2023-05-27&hazardLayerIds=rainfall_dekad
[ ] Use southsudan with 3 layers => http://localhost:3000/?hazardLayerIds=flood_events%2Crainfall_dekad%2Cconflict_fatalities&date=2022-12-11
[ ] Move cursor of the timeline
[ ] Select date from the date picker of the timeline

Screenshot/video of feature:

Figma designs:

There is a known bug when we try to select any date on the Timeline. I'm on it :)

Hi @wadhwamatic, I kept the grey layer that represent available or selectable dates in the calendar. Should we keep that layer or not ?

@JulienPathtech - I don't see value in the grey layer anymore since the intersections are clearly illustrated by the individual layer's bars. Selectable dates in the calendar should still appear though and that is based on the intersection of selected layers. Hope this is clear!

@JulienPathtech - great start on this! I took a quick look for now and noticed a bug when you toggle between English and French (click 'FR') in the top right
Minor graphical issue: I expected the rectangle in the timeline and the handle for the slider to move together. I see that the rectangle waits until the layers are loaded. Instead, perhaps the rectangle should disappear until the layers are loaded for the new date.

Update

Fix when selected a point in the Timeline (https://github.com/WFP-VAM/prism-app/pull/882#issuecomment-1599108150)
Removed grey / intersection layer
Make the whole cursor moving when selected (There is a drawback to this -> tooltip is not available arround the cursor : /. If I use a lower z-index on the cursor, it breaks its display). We can keep it or revert to previous version

I'm waiting your feedbacks

Looks great. I think it's ok this way @JulienPathtech, it only blocks the tooltip and clicks for the day before and the day after, which I think is fine since there are two other ways to move to these dates already.

@JulienPathtech great work this feels really nice I agree with the comments of @ericboucher regarding the colors in the theme, if that is possible, also another addition seems to me that the dateSelector component is a little bit higher, would be nice if it was a little bit lower to give more space in the map because with the legends enabled this seems a little bit too crowded wdyt @ericboucher @wadhwamatic ?

@JulienPathtech - this is looking good but I still see an issue when I toggle to French - the cursor moves to 1-January.
English:

French:

Looks like this bug was introduced with the UX revamp. @JulienPathtech can you have a look? My guess would be that this has something to do with the fact that French dates and English dates have month and days inverted

Update, I found the issue, which was actually due to the fact that Frenchies don't capitalize months! There might be a better way to do it than what I did @JulienPathtech. Since you've been head down in this component for a few days, let me know if you can think of a better approach.

Update :

@ericboucher I use the datesAreEqualWithoutTime helper.
Added comments

For your point about the Timeline @HarryMytilinaios , I agree. Here are my problems :

If I lower / center the Timeline the SVG desapear at the bottom
I reworked the SVG cursor so it perfectly match the Timeline in size but it's height and width are fixed

So I don't find any good solution to lower the Timeline that ATM.


New API path?

The problem
I haven't had a chance to see if the underlying automations are working (out of town).  But, seems like the API path may have changed and needs updated per log entries.
What version of Home Assistant Core are you running?
core-2024.9.2
What was the last working version of Home Assistant Core?
No response
Diagnostics information
Unknown exception while updating Pura data: 401 Client Error: Unauthorized for url: https://trypura.io/mobile/api/users/devices?types=wall%2Ccar%2Cplus
Unknown exception while updating Pura data: 502 Server Error: Bad Gateway for url: https://trypura.io/mobile/api/users/devices?types=wall%2Ccar%2Cplus
Traceback (most recent call last):
File "/config/custom_components/pura/coordinator.py", line 50, in _async_update_data
if devices := await self.hass.async_add_executor_job(self.api.get_devices):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pypura/pura.py", line 98, in get_devices
return self.__get("users/devices", params={"types": "wall,car,plus"})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pypura/pura.py", line 223, in __get
return self.__request("get", url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pypura/pura.py", line 218, in __request
response.raise_for_status()
File "/usr/local/lib/python3.12/site-packages/requests/models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://trypura.io/mobile/api/users/devices?types=wall%2Ccar%2Cplus
Anything in the logs that might be useful?
No response
Additional information
No response

This looks intermittent at the moment. But I do see a new api path that has more data that I'm already working on adding. Thanks!


pretty_print() problem with right to left language

Hi!
It seems pretty_print() print the tree from left to right but for right to left languages, print the words in leaves in the wrong order.
Is there a way to solve this?
an example:

As far as I know, there is no direct solution for your problem in NLTK. But you can solve the problem by reversing the list that contains your leaves using reverse. Maybe in the future pretty_print method support such feature.
i.e:
tree = Tree('ROOT',[Tree('PRP', ['مهند']), Tree('VBP', ['انا'])])
tree.pretty_print()

ROOT
|
S
|
PRP       VBP
|         |
مهند      انا
If we did reverse the tree leaves as shown the in below code.
leaves = [Tree('PRP', ['مهند']), Tree('VBP', ['انا'])]
leaves.reverse()
tree = Tree('ROOT',Tree('S',leaves)

It will produce  a tree is in the correct order.
ROOT

|_
VBP      PRP
|        |
انا      مهند
Regards.

How to reverse more complicated sentences like:
[Tree('S', [Tree('VPS', [Tree('N', ['آشپزها']), Tree('VP', [Tree('PP', [Tree('PREP_EZ', ['برای']), Tree('N', ['مهمانها'])]), Tree('MV', [Tree('N', ['آشپزی']), Tree('V', ['می\u200cکنند'])])])]), Tree('PUNC', ['.'])])]

@n-zare You can simply recursively reverse trees:
from nltk.tree import Tree

tree = Tree.fromstring(
    "(S (VPS (N آشپزها) (VP (PP (PREP_EZ برای) (N مهمانها)) (MV (N آشپزی) (V می\u200cکنند)))) (PUNC .))"
)

def invert_tree(node):
    """Revert `node`, i.e. the rightmost child becomes the leftmost child for each node.

    :param node: Either a node or a leaf of a tree.
        `Tree` for a node, and `Any` for a leaf.
    :type node: Union[Tree, Any]
    :return: A copy of `node` but with all children recursively reverted.
        The return type is identical to the input type.
    :rtype: Union[Tree, Any]
    """
    if not isinstance(node, Tree):
        return node
    return Tree(node.label(), map(invert_tree, reversed(node)))

# Print the original tree
tree.pretty_print()
# Print the inverted tree
invert_tree(tree).pretty_print()

which produces:
                                 S
                       __________|________________
                     VPS                          |
   ___________________|_____                      |
  |                         VP                    |
  |              ___________|_________            |
  |             PP                    MV          |
  |        _____|_____            ____|_____      |
  N    PREP_EZ        N          N          V    PUNC
  |       |           |          |          |     |
آشپزها   برای      مهمانها     آشپزی     می‌کنند  .

                   S
  _________________|__________
 |                           VPS
 |                       _____|__________________
 |                      VP                       |
 |             _________|___________             |
 |            MV                    PP           |
 |       _____|____            _____|_____       |
PUNC    V          N          N        PREP_EZ   N
 |      |          |          |           |      |
 .   می‌کنند     آشپزی     مهمانها       برای  آشپزها

In short, revert_tree will take a node, and if it's a Tree object, create a new object with the same label but with the children reversed. Beyond that, revert_tree is recursively applied on all children.
Perhaps there would be a use case for an revert method on Tree objects. I'd like to see some discussion on this.

Tom Aarsen

But It doesn't solve the problem because it reversed leaves too. I need to reverse only leaves or reverse the tree without reversing leaves.

In that case I'm afraid I don't think I understand what you are looking for.

For Right to left languages, pretty_print print the tree structure from left to right but print the sentence from right to left. So you can see that words are not exactly in their place and under the edges.

If I understand correctly, which I'm not sure that I do, then that would suggest that the issue isn't with pretty_print, but that the way your build your tree isn't correct. If I take your example of a more complex tree, and print that out, then I get:
tree = Tree('S', [Tree('VPS', [Tree('N', ['آشپزها']), Tree('VP', [Tree('PP', [Tree('PREP_EZ', ['برای']), Tree('N', ['مهمانها'])]), Tree('MV', [Tree('N', ['آشپزی']), Tree('V', ['می\u200cکنند'])])])]), Tree('PUNC', ['.'])])
print(tree)

produces
(S
  (VPS
    (N آشپزها)
    (VP (PP (PREP_EZ برای) (N مهمانها)) (MV (N آشپزی) (V می‌کنند))))
  (PUNC .))

And this structure matches completely with tree.pretty_print():
                                 S
                       __________|________________
                     VPS                          |
   ___________________|_____                      |
  |                         VP                    |
  |              ___________|_________            |
  |             PP                    MV          |
  |        _____|_____            ____|_____      |
  N    PREP_EZ        N          N          V    PUNC
  |       |           |          |          |     |
آشپزها   برای      مهمانها     آشپزی     می‌کنند  .

I struggle to see an issue with pretty_print here. tree.draw() gives identical results, too.
If you want a different order somehow, then maybe you should change how you make your tree, like:
tree = Tree.fromstring("""
(S
  (VPS
    (VP (PP (PREP_EZ برای) (N مهمانها)) (MV (N آشپزی) (V می‌کنند)))
    (N آشپزها))
  (PUNC .))
""")
tree.pretty_print()

                                     S
                           __________|____________
                         VPS                      |
                      ____|_________________      |
                     VP                     |     |
          ___________|_________             |     |
         PP                    MV           |     |
    _____|_____            ____|_____       |     |
PREP_EZ        N          N          V      N    PUNC
   |           |          |          |      |     |
  برای      مهمانها     آشپزی     می‌کنند آشپزها  .

The structure is correct. For example with this tree:
(S
  (VPS
    (N آشپزها)
    (VP (PP (PREP_EZ برای) (N مهمانها)) (MV (N آشپزی) (V می‌کنند))))
  (PUNC .))

the desired output is like this:

but the pretty_print output is like below which need some replacements as arrows indicate it.

Upon reinspection - you're totally right. I can't believe I missed it - I didn't check precisely enough. My apologies. I'll see if I can look into this soon.

It will be great, thanks.

I am not sure whether this analysis is right or not, but one can notice when reversing leaves' value while preserving their pos values outputs the correct tree.
i.e:
tree = Tree('S', [Tree('VPS', [Tree('N', ['آشپزها']), Tree('VP', [Tree('PP', [Tree('PREP_EZ', ['برای']), Tree('N', ['مهمانها'])]), Tree('MV', [Tree('N', ['آشپزی']), Tree('V', ['می\u200cکنند'])])])]), Tree('PUNC', ['.'])])
tree.pretty_print()

the above snippet of code outputs a wrong tree while replacing the values as shown in the below snippet outputs the right tree.
tree = Tree('S', [Tree('VPS', [Tree('N', ['می\u200cکنند']), Tree('VP', [Tree('PP', [Tree('PREP_EZ', ['آشپزی']), Tree('N', ['مهمانها'])]), Tree('MV', [Tree('N', ['برای']), Tree('V', ['آشپزها'])])])]), Tree('PUNC', ['.'])])
tree.pretty_print()

Reversing the leave values while keeping the pos_values or in general, the subtree label might be the solution or a quick fix for the problem.

I think a core aspect of the issue might be that right-to-left text struggles to be printed correctly everywhere. For example:
tree = Tree.fromstring("(S آشپزها)")
print(tree[0])

outputs the following when copied from my terminal:
آشپزها

but it visually looks like this in my terminal:

Similarly, with a bigger tree:
tree = Tree.fromstring("""
(S
  (VPS
    (N آشپزها)
    (VP (PP (PREP_EZ برای) (N مهمانها)) (MV (N آشپزی) (V می‌کنند))))
  (PUNC .))
""")
tree.pretty_print()

Outputs this when copied:
                                 S
                       __________|________________
                     VPS                          |
   ___________________|_____                      |
  |                         VP                    |
  |              ___________|_________            |
  |             PP                    MV          |
  |        _____|_____            ____|_____      |
  N    PREP_EZ        N          N          V    PUNC
  |       |           |          |          |     |
آشپزها   برای      مهمانها     آشپزی     می‌کنند  .

And this is what it actually looks like in my terminal:

I am unsure what NLTK can do about this.

Totally agree, part of the problem is in the language itself, or right to left languages in general. I believe a quick fix might be putting an attribute called reverse which gives you the option to reverse the leaves or not in case you are dealing with right to left languages.
i.e:
class TreePrettyPrinter:
     def __init__(self, tree, sentence=None, highlight=(), reverse = False):
     ...................
           if reverse:
              \\ reverse the leaves

@12mohaned  based on this code you sent:
leaves.reverse() tree = Tree('ROOT',Tree('S',leaves)
just leaves reverse and we lose the middle nodes, how can I reverse leaves while preserving their pos values as you said?

I believe the code I sent earlier is wrong. It does reverse the values and the tags. So nothing really happens. But, I am not sure I understand your concern about losing the middle ones, but reversing the leaves won't affect the middle nodes(the middle nodes won't be reversed,thus will preserve their positions).

So yes, temporary answer is to reversing just leaves, but how? I have hundreds of tree strings that I want to print them and I should reverse their leaves to have a correct output. Is it possible with a code snippet?

Sorry for the late reply, honestly I do not know whether this code snippet is an appropriate solution for your case or not.


Unable to load story with decorator

What version of vite are you using?
2.9.9
System info and storybook versions
Environment Info:
System:
OS: macOS High Sierra 10.13.6
CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
Binaries:
Node: 16.14.2 - /usr/local/bin/node
Yarn: 3.2.0 - /usr/local/bin/yarn
npm: 8.6.0 - /usr/local/bin/npm
Browsers:
Chrome: 101.0.4951.64
Edge: 101.0.1210.53
Firefox: 97.0.1
Safari: 13.1.2
npmPackages:
@storybook/addon-actions: ^6.5.5 => 6.5.5
@storybook/addon-essentials: ^6.5.5 => 6.5.5
@storybook/addon-interactions: ^6.5.5 => 6.5.5
@storybook/addon-links: ^6.5.5 => 6.5.5
@storybook/builder-vite: ^0.1.35 => 0.1.35
@storybook/testing-library: ^0.0.11 => 0.0.11
@storybook/vue3: ^6.5.5 => 6.5.5
Describe the Bug
Adding a decorator prevents Storybook from rendering the story. I have tested this both with Storybook for Vue (webpack) and Storybook for Vite. The issue only appears to surface with Vite.
Steps to reproduce:
npm init vite

project name: test
framework: vue
variant: vue
cd test
npm install
npx sb init --builder @storybook/builder-vite
npm run storybook

Open stories/Button.stories.js. Find the Primary story and append the decorator:
export const Primary = Template.bind({});
// More on args: https://storybook.js.org/docs/vue/writing-stories/args
Primary.args = {
  primary: true,
  label: 'Button',
};
Primary.decorators = [() => ({ template: '
<story />
' })];

Save and run storybook:
npm run storybook

Result
Button fails to load.
Error returned from the browser's console:
> [Vue warn]: Failed to resolve component: story
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.
  at <Anonymous>
  at <App>

Link to Minimal Reproducible Example
No response
Participation

[X] I am willing to submit a pull request for this issue.

I managed to code a work-around using Vue 3 render functions:
import { h } from 'vue'
Primary.decorators = [(story) => h('div', {
  style: {
    margin: '3em'
  }
}, h(story()))];

Additional docs on the Vue 3 Render Functions can be found here.

Wow, could be... same error message and both relating to the template property... but without digging into the source code, I have no idea!

For anyone having trouble with global decorators:
I had trouble adding global decorators in my preview.js file like I used to do in CRA or nextjs. Doing it with vite i had the following error:
[vite] Internal server error: Failed to parse source for import analysis because the content contains invalid JS syntax. If you are using JSX, make sure to name the file with the .jsx or .tsx extension.
So i ended doing what this guy did, but instead of .tsx i kept .jsx for .storybook, so no extra config to do.

Yes, any file with JSX syntax needs to be named either .tsx or .jsx for vite.  @adamSneller I see now that your story is named stories/Button.stories.js, it should be stories/Button.stories.jsx instead.
I'm going to close this for now, but let me know if anyone thinks there's still an issue here.


Latest qunit with phantomjs swallows exceptions from other scripts

When running qunit (1.11.0) under phantomjs (1.8.1), exceptions in scripts that are not qunit test files are swallowed. They do not show up in phantomjs' console output.

Phantomjs 2.0 is still not ready. PhantomJS 1.x is still bad. Whatever.

Phantomjs 2.0 is still not ready.

Huh?

See https://github.com/Medium/phantomjs/issues/288 which lead me eventually to https://github.com/ariya/phantomjs/issues/12948


Add opentera-teleop-service frontend for robot session management.

This will require to connect to OpenTera's API and teleop service API to manage online robots, and start session.

APIs will be defined by @doumdi.


Coils?

Just wondered if you had a version of the code that wrote and read coils/bits?
Thanks

Not yet, feel free to submit PR


Types: (Function component) cannot be used as a JSX component

Reopening because the other issue went OT. Sorry about that
error TS2786: 'TagIcon' cannot be used as a JSX component.
  Its return type 'ReactElement<any, any> | null' is not a valid JSX element.

147      <TagIcon/>
          ~~~~~~~

I'm using @primer/octicons-react and I'm aliasing react to jsx-dom in Webpack config, but TypeScript doesn't seem to automatically accept this:
import React from 'jsx-dom';
import {TagIcon} from '@primer/octicons-react';

document.body.append(<TagIcon/>)

Unless I include this type in my global.d.ts:
declare module 'react' {
	const FC = (): JSX.Element => JSX.Element;
	const React = {FC};
	export default React;
}

Question is: Aren't these types automatically included in jsx-dom? If not, should they?

I can’t include a declaration for React because there will be conflict for people who have both libraries installed.

Indeed, the main issue is that my suggestion doesn’t actually work out of the box and it requires aliasing react to jsx-dom.
Once I have a better idea of how the library works on my codebase, perhaps I can document how to alias React components and make them work with typescript.


Navigation, Styles and Bug fixes

[x] After login redirect to HomePage (not userlist)
[x] States implemented in HomePage
[x] Seamless navigation through Header

closes #55


Checksum for release v0.3.0 changed ⚠

It seems like the checksum for release v0.3.0 changed, but no new releases happened recently
➜ go mod download
verifying<EMAIL_ADDRESS>checksum mismatch
        downloaded: h1:KreOFWGTmaTF4YaL3bHA5tdLRELp+2y6JIq65ILpsOk=
        go.sum:     h1:n04eW19PyUpnEochKGn15ZvCmKkcpzA188vH6XBnOMA=

SECURITY ERROR
This download does NOT match an earlier download recorded in go.sum.
The bits may have been replaced on the origin server, or an attacker may
have intercepted the download attempt.

Both MinIO and podman-tui have the original checksum recorded, so this happened somewhere, just want to make sure the dependency has not been compromised

Problem has been fixed, some proxy yesterday was causing this.


Add pauseAnimationAtEnd parameter

Pull Request
🤨 Rationale
Attempt to fix #983. Chromatic is also researching a server-side fix, but wanted to test this as a workaround.
👩💻 Implementation
Use the Chromatic Storybook parameter:
chromatic: { pauseAnimationAtEnd: true }
🧪 Testing

✅ Checklist

[ ] I have updated the project documentation to reflect my changes or determined no changes are needed.

Adding the delay parameter didn't appear to resolve the issue. The Firefox snapshot still shows the spinner after the initial position.
Chromatic devs are investigating.

The chromatic: { pauseAnimationAtEnd: true } parameter appears to be holding the spinner results steady for a few runs. Worth considering adding it back…

Chromatic support confirms that they don't yet support pausing animations within ShadowDOM, but have an outstanding ticket to track that work. They'll notify us when that is complete.
We could add a pause method to the Spinner API and call IsChromatic() to disable animation for Chromatic, but I don't think it's worthwhile. Abandoning this PR.


Opensearch getting started, upgrading, and plugin list

Adding more documentation for opensearch now we have a bit more info about how the upgrade process is going to work. Oh and updating the icon!

Fixes #108. Fixes #109.


to open PR FAO Miro

@mnedelchev-vn this is FAO you to fix step 2 as per the hiccup you found, pls

Hey @m4sterbunny , I've add my changes to the Flair integration page. The issue was that you have to use an unique namespace when integrating Flair and the thing is that if you don't use an unique value then the script will fail without returning a proper error explaining what is causing the issue. So I just highlighted that the namespace value should be unique. Please check my changes.


Removal of Dotnet 6 Support

Removal of Dotnet 6 Support for future versions since dotnet 6 is almost obsolete in Dotnet Maui.

Done with #20


[Gallery] Hover state

Hovering over an image in the gallery (in gallery tab or in homepage gallery) should have styling that matches current firefly site:

Submitter profile pic / name
Text size/weight
Spacing
Truncate long prompts
Button styling

Firefly:

Franklin:

@tom-hightower I think this is now fixed. Can you please check https://main--firefly--adobecom.hlx.page/ to see if this looks good.
Please reopen and let us know specific issues to be fixed.


Pipeline

Initializing PR for pipeline work

Hi @vanislekahuna there are a couple of conflicts that need to be fixed
src/etl/experimental_code.ipynb
src/etl/initialize_load.py
Can you please ensure the code on main and here matches the correct solution?


adapt to package name convention change

as the title, e.g., src package name changed from odc-stats.version.tar.gz to odc_starts.version.tar.gz

Why the change?


v0.8.2 breaks IE and Safari

The 0.8.2 release breaks IE and Safari

I'm surprised that safari doesn't support default parameters.  0.8.2 added a feature for developers that isn't used so its not hard to remove.  Cutting a new release...

fixed in v0.8.3 release


panicked at: called Result::unwrap() on an Err value: Error("invalid type: null")

Hello, after a while I realized that queries can return NULL when a record is not found.
I think it was what is described here. "Error handling: Queries do not return Result types, but will in a future version."
I'm looking at the struct Query impl to see how serde_json could handle this behind the scenes.
Was there any progress on this?
thanks.

Yeah, this will be implemented in the next release. Try using the master branch directly (for the library and CLI) and you should find it works.


custom curser gets hidden behind other elements

the custom cursor goes behind text and the scroll bar when hovering over them

well yes
the text editor is a html element but the cursor is in the canvas
I don't have any way to fix it for now but there are some options that i will try
1 - adding a second cursor on the screen.
2 - making the text editor inside the canvas like pico-8 that is a very complex work


added usage of chromeoptions.binary

We need this to use both Chrome and Chrome Canary ( for headless ).

Coverage increased (+0.02%) to 63.899% when pulling 3615f3986d29cc3bb5283417d8a2724788645f18 on nobiinu-and:support-chromeoptions-binary into 7dd7024b42582f4246dc3c0d84577546b7884fc1 on codeborne:master.

Codecov Report

Merging #546 into master will decrease coverage by 0.01%.
The diff coverage is 55.55%.

@@             Coverage Diff              @@
##             master     #546      +/-   ##
============================================
- Coverage     59.95%   59.93%   -0.02%
- Complexity      718      720       +2
============================================
  Files           133      133
  Lines          2622     2626       +4
  Branches        266      267       +1
============================================
+ Hits           1572     1574       +2
- Misses          947      948       +1
- Partials        103      104       +1

Impacted Files
Coverage Δ
Complexity Δ

...codeborne/selenide/webdriver/WebDriverFactory.java
67.81% <55.55%> (-0.42%)
36 <0> (+2)

Continue to review full report at Codecov.

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

Coverage increased (+0.06%) to 63.938% when pulling 1d0808ab77987380d7c42f927e76494a55e2b063 on nobiinu-and:support-chromeoptions-binary into 7dd7024b42582f4246dc3c0d84577546b7884fc1 on codeborne:master.

@nobiinu-and Hi Tohijuki!
Sorry for a long delay with reviewing your pull request.
But now I realize that this problem is already solved by PR https://github.com/codeborne/selenide/pull/627. Am I right?
If so, we can abandon your PR?
Anyway, thank you for your contribution!

@asolntsev thanks for your reply.
yes, we can abandon this PR :)


performance audit

will do some analysis and track stuff here

actually, i do not think we have any performance issue at all for v1 ... function is running under 2ms

The preloading time is very long. When multiple interfaces are opened at the same time, the initialization time will burst.
For the solution, we generate a cache of complements before release, and only those completions with modified configurations are loaded when the user loads, which can effectively reduce the initialization time.

Yes we could do that :)


fix formatting

because it hurts  :)

Wow, you are completely right! - It really does look ugly.
Thanks for the fix! :)


pickling error when multiprocessing for batched continuation of environments

Hi All!
Thanks for the amazing melting pot environments. I am trying to train agents using jax on the environments. To enable this, I keep a batch of environments - which is just a list of let's say 32 environments - and I call the step function on all of them in a for loop. To make it a bit faster I wanted to call the step function for each one using multiprocessing. But I got cannot pickle 'dmlab2d.dmlab2d_pybind.Lab2d' object. I am wondering if you have suggestions for me for what I want to do.

No good suggestions sorry.
Looks like you'll have to find a way to avoid pickling Lab2d objects. Perhaps try just pickling the substrate name an have the processes spin up the environment themselves?
If you want Lab2d to support pickling you'll need to make a feature request at https://github.com/google-deepmind/lab2d. I expect they won't have time for this I'm afraid.

Oh, I see. I just cannot make the process spin up its own environment as I want agents to interact with a batch of environments back and forth. Thanks for the swift reply.


Multi-cargoArtifacts - inheriting artifacts from multiple previous steps

We started complex builds with cross-compiled projects (think: Android app built for different targets, or multi-arch (lipo) MacOS binaries, or wasm + a native web server), it seemed like it would make sense to sometimes inherit from multiple things to merge the content in side ./target.

One reason I've avoided implementing general artifact merging is dealing with potential ambiguities on which file should "win" in the case of a collision (plus we might not have timestamps to help us out). When working with different targets it might be simpler since they go in their own subdirectories, but that also begs the question where the utility comes from having the completely separate targets built as one output to begin with?

but that also begs the question where the utility comes from having the completely separate targets built as one output to begin with?

Mostly that it allows the same state as a one would see locally when working in a dev shell.
But yes, this is a delicate feature that users could misuse. Possibly it can be done as an extension to crane as well.

FWIW there shouldn't be anything stopping one from merging artifacts, and individual projects might have a better understanding of where it is safe to do merging (it's hard to assume anything relating to a a build system because everyone has special build rules for stuff :smile: )

How would I merge artifacts exacly?
Here is my use case: I need to run a wasm test (wasm32-uknown-unknown build) in the environment with other stuff from native build.
Ideally I'd like to do:
  wasmTest = craneLibTests.mkCargoDerivation {
    pname = "wasm-test";

    cargoArtifacts = [ craneMultiBuild.ci.workspaceBuild workspaceBuild ];
    buildPhaseCargoCommand = "patchShebangs ./scripts; SKIP_CARGO_BUILD=1 ./scripts/tests/wasm-test.sh";
  };

and have crane extra incremental artifacts from both workspaceBuild (which in this case is going to be wasm), and from craneMultiBuild.ci.workspaceBuild (which in this case will be native build using ci build profile).
I'm not sure if crane exposes anything right now that I could use to somehow do it "manually". But I really think that crane could just detect an array and map over it in order.

A super naive way to do it "manually" would be to

This is not going to work with use-zstd, especially incremental one, no? If the "take this cargoArtifact and extra here" would be exposed, that might work.
But then again ... it seems much easier to handle in crane, than even maintain, document and debug people breaking it in ad-hoc ways, IMO.

I mean I think the following would work the way we extract things today if you wanted to just blindly extract it all

This will work. I guess I can with it for now.

I'm not intimately familiar with how exactly cargo manages all the files in the target directory so I've been holding off on building some kind of "general artifact merging" solution

How about just implementing it and documenting as "experimental" (or keep hidden), and just see how it goes. Let's face it - users doing non-trivial things need to be aware of lower level details of how cargo works and debug issues all the time anyway. And if they find problem, oftentimes it's helpful to refine or they even come up with a PR.

BTW. Does the build workspace (subset) submission also needs some multi-cargoArtifacts? https://github.com/TheNeikos/crane-workspaces/blob/main/lib/mergeTargets.nix

I don't know, I haven't had the time to really dig in and understand those internals yet


Nested structure with std::optional types

It seems like gives an error when deserializing nested structs that have optional fields. Example:
struct Child
{
  std::optional<int32_t> age; // Error because couldn't find "age"
};

struct Parent
{
  Child child;
};

could you provide a complete example

https://github.com/fantasy-peak/yaml_cpp_struct/blob/9724ab3be8ccac787196036ebcd24d55243eec7b/example/main.cpp#L174

I'm using v1.0.2 via xmake.
main.cpp:
#include <optional>

#include <yaml_cpp_struct.hpp>

struct Settings
{
  int32_t port;
  std::optional<int32_t> thread_count;
};
YCS_ADD_STRUCT(Settings, thread_count);

struct Config
{
  Settings settings;
};
YCS_ADD_STRUCT(Config, settings);

int main(int argc, char **argv)
{
  auto [config_opt, error] = yaml_cpp_struct::from_yaml<Config>("./config.yaml");
}

config.yaml
settings:
    port: 5555

Error:
Exception thrown at 0x00007FFA5FEAAB89 in yaml_cpp_struct_optional_test.exe: Microsoft C++ exception: YAML::InvalidNode at memory location 0x00000091A25DEC90.

Debugging status before throwing exception:

This exception seems to be thrown by yaml cpp

---
settings:
  port: 50

[9:49:06] root:bin git:(main*) # xmake build -v -y
[100%]: build ok, spent 0.021s
warning: You are working in the project directory(/root/github/yaml_cpp_struct/example) and you can also
force to build in current directory via run `xmake -P .`
[9:49:08] root:bin git:(main*) # xmake install -o .
installing example ..
installing example to . ..
install ok!
[9:49:10] root:bin git:(main*) # valgrind --log-file=a.txt --tool=memcheck --leak-check=full -s  --track-origins=yes ././example ../config.yaml
50
-1
[9:49:13] root:bin git:(main*) # cat a.txt
==105428== Memcheck, a memory error detector
==105428== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==105428== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==105428== Command: ././example ../config.yaml
==105428== Parent PID: 99174
==105428==
==105428==
==105428== HEAP SUMMARY:
==105428==     in use at exit: 0 bytes in 0 blocks
==105428==   total heap usage: 359 allocs, 359 frees, 113,936 bytes allocated
==105428==
==105428== All heap blocks were freed -- no leaks are possible
==105428==
==105428== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

could you use test branch for test ? https://github.com/fantasy-peak/yaml_cpp_struct/tree/test


MudDataGrid: Removed duplicate code from filter header cell

Description
I found duplicate code in FilterHeaderCell.razor
ps: It's my first pr on github, I hope I'm not missed something

How Has This Been Tested?

unit (by existing test) and debug
Types of changes

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

[ ] The PR is submitted to the correct branch (dev).
[ ] My code follows the code style of this project.
[ ] I've added relevant tests.

I will attach the image that you posted in discord just in case

@henon ready for merge.


Disable ID Resolution for Text Mining KPs

Individual SmartAPI TRAPI interface should enable id resolution by default.
If the SmartAPI is from text mining teams, disable the id resolution module.

fixed in: https://github.com/biothings/BioThings_Explorer_TRAPI/commit/f3f506759c54386fc8394d27b3240a7327b2317b

fixed in: https://github.com/biothings/BioThings_Explorer_TRAPI/commit/f3f506759c54386fc8394d27b3240a7327b2317b


removed trasfer w call

Replaced transfer method with call method as per the audit report.

@techpandora @kishan79 @vishaldantuluri
closes #29


Move Nearby query to the backend

Summary:
As of now, the SPARQL query to fetch nearby items needing pictures is part of the commons app codebase(nearby_query.rq).
This has several disadvantages.

any query optimization is tied up with app updates. This, in turn, means that the optimization would be served only to users on the latest app version. This also exposes us to a big risk if something goes wrong with the query. In that case, only app update can fix the issue. As the user base grows, this might become difficult.
The app is not able to take advantage of server-side caching. The high precision location would mean the caching can be quite limited but as of now, we do not have client-side caching as well. As the user base grows, this would start looking more advantageous.
The app has to deal with the whole parsing logic for the query response. The logic can be extracted out and the app can simply consume the relevant JSON response containing a list of Place objects. NearbyPlaces:getFromWikidataQuery looks quite complicated as of now.
The app would get a clean API interface where it simply passes the LatLng, lang and radius. For eg.

{
    "lat": 22.23,
    "long": 77.23,
    "radius": 1,
    "language": "en"
}

It would be great if we can host if on tools forge as part of commonsmisc and query the JSON API interface instead.

Good point @maskaravivek. Totally agree with it .

While I agree it would reduce complexity on the app side, there are also demerits:

The complexity would just get moved to the server side.
It adds a point of failure.
It requires us to make sure that 24 hours a day we have someone awake with credentials to the server and who can fix it quickly.
It is another non-standard API to create and maintain.
It makes it impossible to refactor variable names or data structure, for fear of breaking something for some users. So in a few years the non-standard API will be bloated with many worthless variables that are only used in one version of the app. For instance if version 2.9.1 puts all translations in the JSON, then all later version have to do it too (so that 2.9.1 users don't get a crash), even if we realize that embedding all translations is a bad idea. A way to reduce that is to introduce API versions, but that also adds complexity.
I don't believe cache would benefit anyone. With only a few thousand users around the globe, there is zero chance that two queries will be made with the same latitude and longitude. Also, people add P18 properties using the app, so caching is probably not a good idea in the first place.
It makes forking the app less easy. Let's say some WikiProject forks the app for their own purpose and starts changing Nearby to only show monuments, for instance. Now it is relatively easy, but with a non-standard API it would be very complex.

The SPARQL API is a very solid standard defined by the W3C. Its Wikidata implementation is also rock-solid, with an uptime we can not even dream of reaching. Using a self-hosted non-standard API instead is not unthinkable, but it would require much stronger benefits, I would say.

Closing this as #249 and #2358 should take care of this.


.NET core support for bulkexecutor

But the Microsoft.Azure.Graphs.BulkImport package only targets net461. Can a netstandard1.6 target be added?

This would be needed to be able to use it in Azure Functions v2.

Please use 2.0.0-preview2 which supports .NET Standard 2.0 which should work with .NET Core applications.


Images are not showing in the listing

In Readme:
In the built project:

Repositories:

https://github.com/oguzhnatly/flutter_carplay#readme/blob/master/example/lib/main.dart
https://github.com/danielmessi13/carplay_test/tree/image_not_show

Hello, @danielmessi13. Thank you for reporting your concern about the bug, and providing your GitHub project repository.
I've tested and ran your project with the image_not_show branch, and it works perfectly with the images in the listing --- as you expected. Could you please re-test it by removing and deleting Xcode caches, Flutter project caches, or directly deleting the project and cloning it from your project? Kindly let me know if this does not work for you.


[Numpy] Numpy compatible bitwise_and operator

Description
Numpy element-wise operator bitwise_and added.
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.

[x] Changes are complete (i.e. I finished coding on this PR)
[x] All changes have test coverage:
Unit tests are added for small changes to verify correctness (e.g. adding a new operator)
[x] Code is well-documented
[x] To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

Changes

Added a new InferShape method ElemwiseIntType that can be used to constrain dtypes to ints.
Added numpy element-wise operator: bitwise_and

Comments

Since boolean array is not supported yet, this operator now only supports calculation between integer scalars  / ndarrays. May need some change to support boolean arrays in the future. @reminisce

@haojin2


Add automatic linting

Motivation and Context

Add linters to enforce better code quality and catch bugs prematurely.
Future PR TODOs:

Stabilize home_robot_hw code and apply linting
Use submodules for lseg and detic

Changelog

Add isort, mypy, and flake8 to pre-commit

Excluded home_robot_hw from checks due to existing branches with non-trivial changes in the package
Excluded copied third party modules lseg and detic

Update CircleCI to directly test with pre-commit
Rename examples/ to projects/
Add experimental module in home_robot and excludes linting tests from it

How Has This Been Tested

Types of changes

[x] Docs change / refactoring / dependency upgrade
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Thanks for doing this, Austin! Super helpful for maintaining code quality.

Also, take a look at conflicts before merging.


XkbGetKeyboard failed to locate a valid keyboard! on Raspberry Pi

After successfully building on a Raspberry Pi 1, it fails with a segmentation fault when I try to run a node program.
The only time it works, is when the desktop GUI is running, and the program is run from there using the terminal, SSH does not work at all
Expected Behavior
I expected it not to fail, and to not exit immediately.
Current Behavior
When running the example program example/example.js this is sent to the console
on_library_load [456]: XOpenDisplay failure!
load_input_helper [1907]: XkbGetKeyboard failed to locate a valid keyboard!
Segmentation fault

Steps to Reproduce (for bugs)

Get a Raspberry Pi 1
Build
Run example

Context
I cannot use iohook unless from GUI terminal
Your Environment

Version used: master
Environment name and version (e.g. Chrome 39, node.js 5.4): Node v10.15.2
Operating System and version (desktop or mobile): Raspbian Buster

Have you tried setting environment variable DISPLAY=:0?

I can confirm the some of the same behavior, Raspberry Pi (4) w/Raspbian Buster Lite.  In my case, I do not have X installed. However, the messages are the same about no keyboard as well as the segmentation fault.
on_library_load [456]: XOpenDisplay failure!
load_input_helper [1907]: XkbGetKeyboard failed to locate a valid keyboard!
Segmentation fault

I did not realize this library was dependent on X (might be nice to add that to requirements), but since it is, that would explain why it does not work on SSH.
The segmentation fault does seem like a bug, perhaps due to cleaning up resources after the unusual code path of no keyboard?

The segmentation fault was pretty easy to locate.  In libuiohook/src/x11/input_helper.c, starting at line 1904 is the following:
 else {
                logger(LOG_LEVEL_ERROR,
                                "%s [%u]: XkbGetKeyboard failed to locate a valid keyboard!\n",
                                __FUNCTION__, __LINE__);
        }

        // Get the map.
        keyboard_map = XkbGetMap(disp, XkbAllClientInfoMask, XkbUseCoreKbd);

The failure is that after the error happens, the code still proceeds to try to get the map.  If instead you add a "return;" to just after the logger call, the segmentation violation goes away.
 else {
                logger(LOG_LEVEL_ERROR,
                                "%s [%u]: XkbGetKeyboard failed to locate a valid keyboard!\n",
                                __FUNCTION__, __LINE__);
                return;
        }

        // Get the map.
        keyboard_map = XkbGetMap(disp, XkbAllClientInfoMask, XkbUseCoreKbd);

Of course the code doesn't do much as no keyboards were found, but at least the code doesn't crash.

I doubt I will fix this. If this is still an issue and someone is interested, please reopen and express interest and I may allocate some time to it as I do have a few RPis around so I can repro and fix.

如果你在远程服务器上工作，但无法连接到物理显示器，可以考虑使用虚拟显示工具，如Xvfb（X Virtual Framebuffer）。你可以通过以下命令来安装和
启动它：
```sh
sudo apt-get install xvfb
Xvfb :99 -screen 0 1024x768x24 &
export DISPLAY=:99


Update CI images for new Fedora versions

Fedora 38 is released, and Fedora 36 is end-of-life.
See also: https://gitlab.com/BuildStream/buildstream-docker-images/-/merge_requests/218

hmm not sure what's going on with the github runners, all the test jobs seem to get stuck with:

Waiting for a runner to pick up this job...

and then seem to timeout

I'm pretty sure the problem is that there is no longer any ubuntu-18.04 runner hosted by github.

I'm pretty sure the problem is that there is no longer any ubuntu-18.04 runner hosted by github.

OK, if thats the issue i can update the PR :)

It seems that every change I make to the CI config requires a maintainer to re-approve the PR, which makes it almost impossible for me to iterate on this PR usefully.

I'm sorry about the approval policy, but i also don't think we have too much control over it. It's something set by the Apache team globally. The announcement around this did mention some resources that we can try reaching out to see if we can get some exceptions. I'll give that a go but not holding my breath for it.


Please document dependency version requirements.

This package is currently rather difficult to get working due to tf/keras issues.
Installing current versions leads to import errors when training:
python ../../submodules/diploSHIC/diploSHIC.py train train test model
2021-06-08 14:43:18.605122: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory
2021-06-08 14:43:18.605144: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
Traceback (most recent call last):
  File "../../submodules/diploSHIC/diploSHIC.py", line 126, in <module>
    from keras.utils.layer_utils import convert_all_kernels_in_model
ImportError: cannot import name 'convert_all_kernels_in_model' from 'keras.utils.layer_utils' (/home/molpopgen/src/polygenic_classification/prototype/single_core_training/training/lib/python3.8/site-packages/keras/utils/layer_utils.py)

This is for the following versions in a clean venv:
pip show keras
Name: Keras
Version: 2.4.3
Summary: Deep Learning for humans
Home-page: https://github.com/keras-team/keras
Author: Francois Chollet
Author-email<EMAIL_ADDRESS>License: MIT
Location: /home/molpopgen/src/polygenic_classification/prototype/single_core_training/training/lib/python3.8/site-packages
Requires: numpy, pyyaml, h5py, scipy
Required-by:
(training)

pip show tensorflow
Name: tensorflow
Version: 2.5.0
Summary: TensorFlow is an open source machine learning framework for everyone.
Home-page: https://www.tensorflow.org/
Author: Google Inc.
Author-email<EMAIL_ADDRESS>License: Apache 2.0
Location: /home/molpopgen/src/polygenic_classification/prototype/single_core_training/training/lib/python3.8/site-packages
Requires: h5py, tensorflow-estimator, typing-extensions, flatbuffers, astunparse, protobuf, keras-nightly, google-pasta, six, tensorboard, wheel, keras-preprocessing, wrapt, gast, absl-py, grpcio, termcolor, numpy, opt-einsum
Required-by:

Google searches suggest that the import error is fixed by installing earlier versions of tf.  However, pip seems to reject that now:
pip --version
pip 20.1.1 from /home/molpopgen/src/polygenic_classification/prototype/single_core_training/training/lib/python3.8/site-packages/pip (python 3.8)

pip install tensorflow==1.15.2
ERROR: Could not find a version that satisfies the requirement tensorflow==1.15.2 (from versions: 2.2.0rc1, 2.2.0rc2, 2.2.0rc3, 2.2.0rc4, 2.2.0, 2.2.1, 2.2.2, 2.3.0rc0, 2.3.0rc1, 2.3.0rc2, 2.3.0, 2.3.1, 2.3.2, 2.4.0rc0, 2.4.0rc1, 2.4.0rc2, 2.4.0rc3, 2.4.0rc4, 2.4.0, 2.4.1, 2.5.0rc0, 2.5.0rc1, 2.5.0rc2, 2.5.0rc3, 2.5.0)
ERROR: No matching distribution found for tensorflow==1.15.2

pip install tensorflow-cpu==1.15.2
ERROR: Could not find a version that satisfies the requirement tensorflow-cpu==1.15.2 (from versions: 2.2.0rc1, 2.2.0rc2, 2.2.0rc3, 2.2.0rc4, 2.2.0, 2.2.1, 2.2.2, 2.3.0rc0, 2.3.0rc1, 2.3.0rc2, 2.3.0, 2.3.1, 2.3.2, 2.4.0rc0, 2.4.0rc1, 2.4.0rc2, 2.4.0rc3, 2.4.0rc4, 2.4.0, 2.4.1, 2.5.0rc0, 2.5.0rc1, 2.5.0rc2, 2.5.0rc3, 2.5.0)
ERROR: No matching distribution found for tensorflow-cpu==1.15.2

The solution to this is to provide a requirements.txt that you have verified to work.

I have been ruining into the same problem, and I highly recommend to create a virtual environment to run some of the sub program of diploSHIC.
Here is the workflow I've done:

create a new ven with python <= 3.7 since the version of keras and tensorflow compatible with diploSHIC do not work with higher python version
conda create -n ven python=3.6 anaconda
conda activate ven

install the appropriate version of tensorflow and keras
pip install tensorflow==1.15.2
pip install keras==2.4.3

you're all set to run the diploSHIC.py train and  diploSHIC.py predict tools. Note that I only activate the ven to run those two tools and I run the rest of diploSHIC using my normal environment:
Python 3.8.8
numpy 1.21.4
scipy 1.6.2
pandas 1.2.4
scikit-allel 1.3.2
scikit-learn 0.24.1

It is possible for it all to work in a single venv, but it was non-trivial to work out.  The following works on Python 3.8 and I believe also 3.9:
scikit-allel
# scipy
scipy==1.4.1
matplotlib
keras
tensorflow-cpu<=2.3
sklearn

hey @molpopgen and @jdaron -- i'm currently working on #39 which cleans up these issues and will provide a clean pip install. i'll close this issue for now and move conversation to that PR if it suits you all ok

reopening this issue as @molpopgen points out #39 doesn't provide a sufficient fix to the issues here

i'd encourage you guys to check out the new pip package and confirm that it works on your systems. it should be able to be installed on a clean virtual environment simply with pip install diploshic.
so far i've been able to confirm that this install works on a mac systems and linux

Dear Andrew,
I've been testing the new version of diploSHIC, which I installed using pip install diploshic. However I am still getting an error while launching diploSHIC fvecSim diploid (see bellow). I generated this error with numpy==1.19.5 while with numpy==1.21.4 (pip install -U numpy) I don't get this error and the program is running smoothly.
Do you think it could be a problem with my conda environement ?
RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd
Traceback (most recent call last):
File "/home/daron/anaconda3/bin/makeFeatureVecsForSingleMsDiploid.py", line 5, in
from diploshic.msTools import *
File "/home/daron/anaconda3/lib/python3.8/site-packages/diploshic/init.py", line 1, in
from diploshic.fvTools import *
File "/home/daron/anaconda3/lib/python3.8/site-packages/diploshic/fvTools.py", line 7, in
import diploshic.shicstats as dps
ImportError: numpy.core.multiarray failed to import

@jdiron -- try to install and ignore the wheel.  Seems like there's a problem, so you can ask pip to use the source package.
Also, if you are on Linux, you may also try a plain venv instead of conda.

). I generated this error with numpy==1.19.5 while with numpy==1.21.4 (pip install -U numpy) I don't get this error and the program is running smoothly.

Aha-- this is important. The error is due to something being compiled against the numpy C API.  This API is fickle.  @andrewkern -- you probably have to pin the package to the exact numpy versions used, else the wheels will be very fragile.

Dear Andrew, I've been testing the new version of diploSHIC, which I installed using pip install diploshic. However I am still getting an error while launching diploSHIC fvecSim diploid (see bellow). I generated this error with numpy==1.19.5 while with numpy==1.21.4 (pip install -U numpy) I don't get this error and the program is running smoothly. Do you think it could be a problem with my conda environement ?
RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd Traceback (most recent call last): File "/home/daron/anaconda3/bin/makeFeatureVecsForSingleMsDiploid.py", line 5, in from diploshic.msTools import * File "/home/daron/anaconda3/lib/python3.8/site-packages/diploshic/init.py", line 1, in from diploshic.fvTools import * File "/home/daron/anaconda3/lib/python3.8/site-packages/diploshic/fvTools.py", line 7, in import diploshic.shicstats as dps ImportError: numpy.core.multiarray failed to import

hi @jdaron -- yes I think this is a conda issue. in likelihood you have conflicting package versions in that old environment.  can you try this again in a clean (brand new) conda install? i.e.,
conda create -n test_diploshic python=3.9 --yes
conda activate test_diploshic
pip install diploshic

I've been running the whole diploshic workflow in a virtual env and everything run smoothly, thanks a lot for making those updates.

awesome-- great to hear.
@molpopgen is this working on your systems too now?

awesome-- great to hear.
@molpopgen is this working on your systems too now?

Haven't had time to test.  Will try to in a few days.

hey @molpopgen -- should we close this issue?

No -- setup.py doesn't address this issues.  There's no version numbers pinned/ranges pinned for  tensorflow/keras.
Also, the version numbers for this package make it difficult/impossible to realistically used.  Adding a 3 to 0..3333 when bumping is still the same semver, so a user has a hard time pinning to anything other than exact versions.


Gatsby localhost different to Netlify deploy

Hi,
I'm fairly new to Gatsby. I actually came across it when was looking for templates for my portfolio.
I found a great example and I started customizing it following the guide on Gatsby's website.
I managed to customize the Hero/Intro section and that worked well, however when I moved on to the About section and Footer the changes would not take place when deploying to Netlify.
I removed all the MDX files and I'm confused because I can't understand where they coming from when deploying
I've attached a short video to hopefully make things clearer
Video

All sorted, cloned a fresh copy of the project and followed the guide on how to edit content. Pretty straightforward if you read the documentation.


Patches WebUSBDevice to force reconfiguration deviceClass 0xff

Changes
Tries to detect if deviceClass 0xff devices have not been configured by default (macOS) and then uses the workaround to set configuration manually.
Tested with Sony MDS-JB980 hardware through netmd-js library using node-usb WebUSB on macOS.
Fixes

#61 - So that it works for WebUSB without hacks prior using WebUSB

Checklist

[X] Tested the change acts as expected
[X] Checked the change doesn't remove or change existing functionality
[x] Considered how the feature impacts the product and tested around it (not just the happy paths)
[ ] Where possible, executed the hardware tests on multiple operating systems

Sorry this has been a bit quiet, I'm trying to decide what to do.
Concerns:

The forced reopen doesn't feel right
However, neither does exposing the open(false) functionality through webusb
you can't check for interfaces without it being opened initially
setConfiguration is already exposed on the webusb class

Would this be a better approach?
            if (!this.opened) {
                // Don't read config descriptor of vendor-specific devices on macos
                // https://github.com/node-usb/node-usb/issues/61
                if (this.deviceClass === 0xff && platform() === 'darwin') {
                    this.device.open(false);
                } else {
                    this.device.open();
                }
            }

And then call selectConfiguration on webusb later? Or does that still fall over due to needing device.configDescriptor @jounii ?

Concerns:

The forced reopen doesn't feel right
However, neither does exposing the open(false) functionality through webusb

Yes I wasn't happy about it either, but couldn't figure any other way besides having non-standard callback exposed. A bit like the devicesFound, but for beforeOpen or afterOpen or maybe configureDevice for doing manually the re-open.. Or maybe just a flag to allow "forced reopen" or so. The platform() check sounds good to limit to macOS. The existing devicesFound comes too late as it expects the device being opened successfully and listed.

you can't check for interfaces without it being opened initially
setConfiguration is already exposed on the webusb class

And then call selectConfiguration on webusb later? Or does that still fall over due to needing device.configDescriptor @jounii ?

I will test, but I recall it did not find the device unless the interfaces array was initilized and without the setConfiguration the device was basically considered non-existing as interfaces was empty array and thus considered "opened", yet not really opened.

I've reimplemented your fix in https://github.com/node-usb/node-usb/pull/739 , which i think is a little neater.
I'm not able to test this, but can't see why it wouldn't work and fix the issue. Feedback is helpful though!

I've reimplemented your fix in #739 , which i think is a little neater.
I'm not able to test this, but can't see why it wouldn't work and fix the issue. Feedback is helpful though!

Looks great and neat solution. I will test. I have been occupied with other things and didn't yet get back to this.

Closing this in favour of #739


update dependencies

~/src/node-stdlib-browser $ npm install
npm WARN deprecated<EMAIL_ADDRESS>See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated<EMAIL_ADDRESS>Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated<EMAIL_ADDRESS>Please update to the latest object-keys
npm WARN deprecated<EMAIL_ADDRESS>https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated<EMAIL_ADDRESS>See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated<EMAIL_ADDRESS>Use eslint-config-nitpick.
npm WARN deprecated<EMAIL_ADDRESS>The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated<EMAIL_ADDRESS><EMAIL_ADDRESS>is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.

added 1377 packages, and audited 1378 packages in 5m

165 packages are looking for funding
  run `npm fund` for details

19 vulnerabilities (10 moderate, 9 high)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.

~/src/node-stdlib-browser $ ncu

Checking package.json
[====================] 70/70 100%

 buffer                     ^5.7.1  →    ^6.0.3
 console-browserify         ^1.1.0  →    ^1.2.0
 crypto-browserify         ^3.11.0  →   ^3.12.0
 events                     ^3.0.0  →    ^3.3.0
 pkg-dir                    ^5.0.0  →    ^7.0.0
 punycode                   ^1.4.1  →    ^2.1.1
 readable-stream            ^3.6.0  →    ^4.2.0
 string_decoder             ^1.0.0  →    ^1.3.0
 timers-browserify          ^2.0.4  →   ^2.0.12
 vm-browserify              ^1.0.1  →    ^1.1.2
 @babel/cli                 ^7.2.3  →  ^7.18.10
 @babel/core                ^7.2.2  →   ^7.19.1
 @babel/preset-env         ^7.12.1  →   ^7.19.1
 @babel/register            ^7.0.0  →   ^7.18.9
 @rollup/plugin-babel       ^5.2.1  →    ^5.3.1
 @rollup/plugin-commonjs   ^20.0.0  →   ^22.0.2
 @types/mocha               ^8.2.3  →    ^9.1.1
 @types/node               ^16.3.0  →  ^18.7.21
 babel-plugin-istanbul      ^6.0.0  →    ^6.1.1
 core-js                    ^2.6.5  →   ^3.25.3
 cpy                        ^8.1.2  →    ^9.0.1
 del                        ^6.0.0  →    ^7.0.0
 esbuild                  ^0.14.23  →   ^0.15.9
 eslint                    ^7.31.0  →   ^8.24.0
 eslint-config-prettier     ^8.3.0  →    ^8.5.0
 eslint-plugin-import      ^2.23.4  →   ^2.26.0
 eslint-plugin-jsdoc       ^33.3.0  →   ^39.3.6
 eslint-plugin-mocha        ^8.0.0  →   ^10.1.0
 eslint-plugin-prettier     ^3.4.0  →    ^4.2.1
 eslint-plugin-promise      ^5.1.0  →    ^6.0.1
 eslint-plugin-unicorn     ^31.0.0  →   ^43.0.2
 esm                       ^3.0.51  →   ^3.2.25
 execa                      ^5.1.1  →    ^6.1.0
 husky                      ^4.3.0  →    ^8.0.1
 lint-staged               ^10.4.2  →   ^13.0.3
 mocha                      ^8.2.0  →   ^10.0.0
 nodemon                    ^2.0.6  →   ^2.0.20
 np                         ^7.6.0  →    ^7.6.2
 parse-node-version         ^1.0.1  →    ^2.0.0
 prettier                   ^2.4.0  →    ^2.7.1
 rollup                    ^2.32.1  →   ^2.79.1
 typescript                 ^4.3.5  →    ^4.8.3
 webpack                   ^5.65.0  →   ^5.74.0

Run ncu -u to upgrade package.json

I recommend using renovatebot to manage and update dependencies with a configuration file like this https://github.com/theoparis/typescript-template/blob/main/renovate.json.

Packages are explicitly left at older version for proper browser support.


Update README.md

mentions hour when referring to minute attribute

Hi. Your friendly Curry bot here. Just letting you know that all commit authors have become authorized to contribute. I have added the "Signed CLA" label to this issue so it can easily be found in the future.

Obvious fix! Thanks!


Menu modding

Hey guys,
So I have been looking into modding the menu, rendering extra stuff, because I want to add my own Crusader Trail as a third trail. However, it is farm from easy to do so. But here are some progress:

Here you can see that I have cloned the First Trail, moved it to the right and set its data to the Warchest trail. These icons are ID based, so adding a 4th (First Edition, Warchest, Skirmish + new) is not as easy. My method of modifying menus is that I look up the array of buttons in the current menu, when it runs in the rendering function, I override the address of the array, I copy the whole array to a new location and add more items to the array.
At the moment, I have no idea how would I add new graphics for it, or how to assemble a whole new screen for the trail, but baby steps does it I suppose.
Maybe this menu rendering knowledge could be used to make a starting unit selection screen for the players in the Setup Identity screen.

Tho the normal Crusader is the only game that can run Scenarios right now. Do you think, it would be possible, to run Scenario maps also in Extreme? That would be so cool

Actually, it IS possible to run scenarios in SHC-E - and even castle builder games - as has been discovered years ago:
http://stronghold.heavengames.com/cgi-bin/forum/display.cgi?action=ct&f=4,3889,60,720
https://www.strongholdnation.co.uk/article/163-custom-scenarios-freebuilds-in-crusader-extreme

That aside, amazing to see the progress you guys make! :)

You could think about copying parts of the invasion mode troop selection menu, the one with the sliders.

@LordHansCapon Have you looked into issue #318 yet? Or @J-T-de ?

Just thinking on the Starting Unit selection balance. Can we do a points system?
I.e. you have 48 points to use, and each unit has a defined value, I have found that the game records a weighted current units value already, and from my testing the values are as follows:
slave = 1,
Slinger=2,
A.Bow = 8
H.A=16
Assassin= 14
A.Sword = 20
Fire Thrower = 16
E.bow=5,
spear = 4,
mace=10,
pike=10,
xbow=10,
E.Sword = 30,
Knight=35,
engineer=5,
tunnellor=5,
monk = 8

If so, we would need to balance also that multiple units are stronger than fewer.
So we could do use the points and then add +1 cost for each unit chosen so far on the next unit.

I feel like that would be up to the user. if i wanted 2 HA, 2 engineers, and 1 slinger (bad for multiple) its not bad cos those are the units im likely to recruit with my starting gold anyways, i dont think a player that wants 24 slingers should be forced to get less because they are getting more of the weaker type. I cant imagine a scenario where selecting more cheaper/weaker/worse units would give an unfair advantage, or if it did, thats the cost of using your points for the expensive stuff.
I can imagine someone countering my 2 HA and 1 slinger with 48 slaves, i can move out and kill them earlier on, or i can spend some gold on more troops. ultimately once the dust settles i will be in the stronger position still.

I have the impression, you guys overcomplicate things. Your suggestions are nice and all, but is it really necessary to balance out these details to the last? You are still the player, you can still do whatever you want (and except if everyone in multiplayer agrees to choose the same starting troops, you can't use it in multiplayer). I really like the current implementation, it is simple, yet you are able to choose it to your liking. And if one combination is OP for you, just use it, or don't.
Side note:
laddermen and tunnelers are no valid starting troops, but therefore an unmanned fire ballista (but this could be changed)

Mate, this entire patch is "unnessacary" and "overcomplicated" but it
improves the game anyway. I am giving my preference. I would personally
prefer it to be balanced for multiplayer (which is what I play 90% of
the time) without defeating the purpose of having configurable start troops
(by telling ppl what they have to have). You dont need to agree with the
extent I ask for, but that doesnt mean that my request is not beneficial
for my situation.
As it stands an unbalanced unit selection feature is useless to me, for my
usage of the patch. Doesnt mean I should tell ppl they shouldn't ask for it
for their usage.
On Thu, 20 Feb. 2020, 2:53 am J-T-de<EMAIL_ADDRESS>wrote:

I have the impression, you guys overcomplicate things. Your suggestions
are nice and all, but is it really necessary to balance out these details
to the last? You are still the player, you can still do whatever you want
(and except if everyone in multiplayer agrees to choose the same starting
troops, you can't use it in multiplayer). I really like the current
implementation, it is simple, yet you are able to choose it to your liking.
And if one combination is OP for you, just use it, or don't.
Side note:
laddermen and tunnelers are no valid starting troops, but therefore an
unmanned fire ballista (but this could be changed)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Sh0wdown/UnofficialCrusaderPatch/issues/504?email_source=notifications&email_token=ALGGWTS5Q5WZB45RAWS7LBDRDVIXNA5CNFSM4KI26SQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMIJPEY#issuecomment-588289939,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ALGGWTVUFMRI4WEOXWGUEP3RDVIXNANCNFSM4KI26SQQ
.

This was not meant to be an offense. I implicitly excluded multiplayer from my argumentation, as in the current form, this edit is not compatible with multiplayer (except everyone in multiplayer agrees to the same startup troops, which is again balanced).
I agree that balance is needed for multiplayer, but I am rather sure, that with the current possibilities of the UCP, it is not possible to implement this feature for multiplayer (one workaround for two players exist, if they coordinate stuff beforehand, but then you can anyway agree on everything).

@LordHansCapon
Maybe we can try to hook the DDraw.dll with this https://github.com/elishacloud/dxwrapper
it allow us to run a Process or inject a custom .dll into the Crusader Process. With this we can maybe add new draw Code with a Custom dll. But I'm not 100% sure now, i just found out that we can run Crusader with Directx9 instead of DirectDraw(maybe Directx7).

Hi,
I was wondering if maybe we could add oil-engeneers to the ranged starting units?

Hey,
The game has an array of starting units which does not include the oil engineers as far as I remember. So no, I don't think it is possible currently. It would require more work for a pretty low benefit.

Would be possible to add more than 16 AI characters by this method? As we already have AIC and AIV editors would be great to game other people AI's together with default characters without eliminating some of them...

This cheat table helps modifying buttons. Just hover over a button and "hover item" will show you where it is.
(Structures: Menu, Menu item)
Menu.CT.zip

This cheat table helps modifying buttons. Just hover over a button and "hover item" will show you where it is.
(Structures: Menu, Menu item)
Menu.CT.zip


Add Spring Boot Starter for Easy Rules

A Spring Boot Starter for Easy Rules to make it even easier to get up and running for Spring Boot projects.

Coverage increased (+0.3%) to 83.577% when pulling<PHONE_NUMBER>7fd684a10c8d5ddd1fe971942cc707 on andersonkyle:spring-boot into c9c9f47f826364dff6ec6e71167a368cb9e1de6a on EasyRules:master.

Hi Kyle,
Fantastic! This is awesome 👍 thank you very much.
Indeed, it's easier to get started with this starter.
Please correct me if I'm wrong, I'm not spring boot expert.
If I understand well, I can start like this:

create a blank maven project
add spring boot easy rules starter in the pom
Create my rules (they will be scanned by the EasyRulesAutoConfiguration class)
Write my easy rules app, For example:

@SpringBootApplication
@EnableEasyRules // I know, this annotation does not exist yet. What it the equivalent in your PR?
public class EasyRulesApplication {

	@Autowired
	private RulesEngine rulesEngine;

	public static void main(String[] args) throws Exception {
		rulesEngine.fireRules();
	}

}

Is this correct? I quickly saw your changes but not (yet) in details.
Many thanks upfront
Best regards
Mahmoud

Hi Mahmoud,
Your understanding is correct.  EasyRulesAutoConfiguration provides the RulesEngineFactoryBean which in turn generates a RulesEngine bean already populated with all of your Rules.
We don't need an @EnableEasyRules annotation because we're using conditions on the autoconfiguration to determine whether it is enabled or not.
@ConditionalOnClass(RulesEngineFactoryBean.class)
@ConditionalOnMissingBean(RulesEngineFactoryBean.class)

EasyRules will only be autoconfigured if the RulesEngineFactoryBean class is present on the classpath, and if there isn't a RulesEngineFactoryBean already defined.

Ok, great. It's even easier than I thought 😄
There still a point I don't understand enough. It's about rules registration.  Let's say this is my spring boot app (without EnableEasyRules annotation):
@SpringBootApplication
public class EasyRulesApplication {

	@Autowired
	private RulesEngine rulesEngine;

	public static void main(String[] args) throws Exception {
		rulesEngine.fireRules();
	}

}

From the EasyRulesAutoConfiguration#rulesEngineFactoryBean I see that rules should be managed by Spring (which I understand) and they are taken from a spring application context. My question is: where do I tell spring boot which application context to load rules from (be it xml or annotation app context) ?

Most Spring Boot apps call this static helper method to create and run a new ApplicationContext
@SpringBootApplication
public class EasyRulesApplication {

	@Autowired
	private static RulesEngine rulesEngine;

	public static void main(String[] args) throws Exception {
                SpringApplication.run(EasyRulesApplication.class, args);
		rulesEngine.fireRules();
	}

}

The context will automatically include all your Beans, Components, Services, etc. via @Configuration and @ComponentScan.  You can certainly override this behavior and do it yourself but I'd say the majority of Spring Boot apps leverage this autoconfiguration that takes care of a lot of the Spring Framework plumbing.

Coverage increased (+0.3%) to 83.577% when pulling 2ec0ab6f8299f634e586ac457d76814eb2fa1538 on andersonkyle:spring-boot into c9c9f47f826364dff6ec6e71167a368cb9e1de6a on EasyRules:master.

Thank you for updating the PR. This starter is great! making something easy easier 😉
I'm merging your changes.
Thank you!

Hi there;
I can not get the spring annoteted rules when I use the spring boot starter.

	@Autowired
	private ApplicationContext applicationContext;

	public void coin() {
		RulesEngine rulesEngine = RulesEngineBuilder.aNewRulesEngine().build();
		rulesEngine.getParameters().setSkipOnFirstFailedRule(true);
		rulesEngine.registerRule(new DummyRule());
		rulesEngine.registerRule(applicationContext.getBean(SpringManagedRule.class));
		rulesEngine.fireRules();
	}

The dummy rule is successfully registering however SpringManagedRule is not registering.

import java.util.List;
import org.apache.commons.collections.CollectionUtils;
import org.easyrules.annotation.Action;
import org.easyrules.annotation.Condition;
import org.easyrules.spring.SpringRule;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import com.netas.aydes.geologicalsurvey.dao.dto.impl.GsBuildingFormDTO;
import com.netas.aydes.geologicalsurvey.service.GsBuildingFormService;
@SpringRule
public class SpringManagedRule {
private static final Logger logger = LoggerFactory.getLogger(DummyRule.class);

@Autowired
private Service service;

@Condition
public boolean when() {
	return !service.isNotEmpty(0);
}

@Action
public void then() {
	logger.info("Hey, I'm managed by Spring");
}

}

Do you have any idea what I am doing wrong. I am using 2.4.1.SNAPSHOT. Your tutorials works perfectly. But I can not find a way of binding spring rule when I use spring-boot.
Thanks.

Hi Kyle,
I am testing this new starter to prepare release v2.5 and getting some errors.
Here is the project I'm using for test: https://gist.github.com/benas/2d42444a627c3eca1e3b5eff0897d856
When I run the app, I get the error in error1.log.
Looks like spring boot starter web is missing. I tried to add in the starter, rebuild the starter and rerun the app. And now I get the error in error2.log.
Do you have an idea on what's happening? Or I forgot to add something?
I'm expecting to only add the starter dependency in my project and it should.
Your help is much appreciated!
Kind regards
Mahmoud

I found the problem. Looks like putting classes in the default package is the cause (see issue 986 in spring boot project). So I've put classes in a org.test package and now there is no more dependencies problem. But I get a NullPointerException on the rules engine:
Caused by: java.lang.NullPointerException
	at org.test.EasyRulesApp.main(EasyRulesApp.java:16)
	... 6 more

Hi Mahmoud,
A quick suggestion is to put the spring-boot-starter-parent POM as the Parent of your POM.
Also try using the spring-boot-maven-plugin instead of the exec plugin.
Run your app with mvn spring-boot:run
I'm traveling these next few days and am away from my laptop but as soon as I get back I can give you a more thoughtful answer.
Regards,
Kyle

One more suggestion, if the above doesn't work, add spring-boot-starter as a dependency to your app and then run it again.

Ok great, thank you for these suggestions!

I'm traveling these next few days and am away from my laptop but as soon as I get back I can give you a more thoughtful answer.

No problem, have a safe travel!

I found the problem. By adding the spring-boot-starter as a dependency, more logs appear now and I see the following :
2017-05-14 23:19:15.600  WARN 14171 --- [           main] f.a.AutowiredAnnotationBeanPostProcessor :
Autowired annotation is not supported on static fields:
private static org.easyrules.api.RulesEngine org.test.EasyRulesApp.rulesEngine

So I updated the app to this:
@SpringBootApplication
public class EasyRulesApp {

    public static void main(String[] args) throws Exception {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(EasyRulesApp.class, args);
        RulesEngine rulesEngine = applicationContext.getBean(RulesEngine.class);
        rulesEngine.fireRules();
    }
}

and now it is working fine.
Thank you for your helpful suggestions!


Added link to YouTube channel

Codecov Report

Merging #409 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #409   +/-   ##
=======================================
  Coverage   74.75%   74.75%
=======================================
  Files           9        9
  Lines        1101     1101
=======================================
  Hits          823      823
  Misses        227      227
  Partials       51       51

Flag
Coverage Δ

#unittests
74.75% <ø> (ø)
:arrow_up:

Continue to review full report at Codecov.

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


Remove useless CoerceUnicode class

The original class we imported from ibm_db_sa was this: https://github.com/IBM/sqlalchemy-ibmi/blob/a737630a61c6eae990ba5e5b4190c0177e9fd093/ibm_db_sa/ibm_db_sa/reflection.py#L28-L34
This is basically pointless. It seems that this was changed for Python 3 support here: https://github.com/IBM/sqlalchemy-ibmi/commit/657888b69656663b3dc0429336b86eb38f3bada2#diff-23f8c2093bac5bb5b04f8def0f590b6bL33 This sort of makes sense, as in Python 2, there was a difference between str and unicode types and str.decode would deocde the bytes in the str to a unicode object. In Python 3, there is just str, which is Unicode. I'm not sure why they didn't make it continue working with Python 2, though :man_shrugging:.
I think we can just replace all references to sa_types.Unicode instead.

Will remove once the reflector is merged in master


[BUG] w2grid in advanced search

no dropdownlist
https://jsfiddle.net/mansurdegrmenci/ewrtLcjm/4/

ACK.
list fields (outside of forms) are broken in the current master's dist.
Another example: http://jsfiddle.net/596yqpk0/ based on http://w2ui.com/web/demos/#/fields/3

"backspace" in dropdownlist does not work.

"backspace" in dropdownlist does not work.

Backspace does not work for w2list in firefox browser.

This seems to be fixed.
At least your fiddle https://jsfiddle.net/mansurdegrmenci/ewrtLcjm/4/ and my fiddle http://jsfiddle.net/596yqpk0/  are now working correctly.
Can you please conform?

This seems to be fixed.
At least your fiddle https://jsfiddle.net/mansurdegrmenci/ewrtLcjm/4/ and my fiddle http://jsfiddle.net/596yqpk0/ are now working correctly.
Can you please conform?

thank you. no error appears. "backspace" still doesn't work :)

I can reprocude backspace not working in inline editing of lists.
I've created a new issue for this: #2095
I will close this issue, as the original issue has been fixed.


docs: update readme with end-of-life message

Applies the same wording seen in https://github.com/angular/bower-angular/pull/49

I did the readme update in 8e355ece7d432acda13a9ea464be04b434f2ee12 and removed the bit about moving to protractor


Energy Monitoring

First of all thx for such a smart and easy way to integrate Meross devices to HomeKit.
I was wondering, whether it is possible to not only switch devices on and off, but also to receive energy meter data.
I am using the smart plug MSS310 with offers power consumption information. It would be beyond awesome to have this information in HomeKit. Is this possible or am I overseeing something?
Thx!!
Pedro

Thanks for the plugin. I would also love to see the energy usage exposed in HK.

Energy monitoring is exposed to homekit by the plugin.
The info, however, is only visible via the Eve app for HomeKit, as this kind of information is not exposed by the Home app itself.

Would it be possible to pass on the value of the sockets and current electricity consumption to Homekit as Lux? Then automations and scenes depending on the lux value would also be possible.
Thanks in advance.
Daniel