duplicate variable-definition in generated code (golang)

It seems that after the merge of PR #518 the variable i is defined multiple times (once per map-field) which results in a compiler error.
Here's the line causing the issue: https://github.com/envoyproxy/protoc-gen-validate/pull/518/files#diff-f8225a1531f2fe61141b5466d79ef77ce6910263343191fe1f4c6fdc0ef9035fR41
Here's a sample of the generated code:
func (m *ErrorCounter) validate(all bool) error {
	sorted_keys := make([]string, len(m.GetCounts()))
	i := 0
	// ...

	sorted_keys := make([]string, len(m.GetComponents()))
	i := 0
        // ...

@akonradi can you confirm this issue?

Looks like when I added the sorting, I forgot to put the definitions for
those temporaries inside local scopes. The fix should be simple, I'll have
it out in a few hours.
-Alex
On Mon, Sep 27, 2021, 4:51 AM Florian Purchess @.***>
wrote:

It seems that after the merge of PR #518
https://github.com/envoyproxy/protoc-gen-validate/pull/518 the variable
i is defined multiple times (once per map-field) which results in a
compiler error.
Here's the line causing the issue:
https://github.com/envoyproxy/protoc-gen-validate/pull/518/files#diff-f8225a1531f2fe61141b5466d79ef77ce6910263343191fe1f4c6fdc0ef9035fR41
Here's a sample of the generated code:
func (m *ErrorCounter) validate(all bool) error {
sorted_keys := make([]string, len(m.GetCounts()))
i := 0
// ...
sorted_keys := make([]string, len(m.GetComponents()))
i := 0
// ...
@akonradi https://github.com/akonradi can you confirm this issue?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/envoyproxy/protoc-gen-validate/issues/521, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAWWJKDI3OQYURKRXUDKKI3UEAWALANCNFSM5E2ANLOQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

@akonradi thanks for your super quick response!


[jvm-packages] the current version of xgboost does not consider missing value in prediction

this PR is to fix it
@yanboliang @superbobry would you please help to review?

Codecov Report

Merging #3529 into master will decrease coverage by 0.08%.
The diff coverage is 71.42%.

@@             Coverage Diff              @@
##             master    #3529      +/-   ##
============================================
- Coverage     45.73%   45.65%   -0.09%
  Complexity      188      188
============================================
  Files           166      166
  Lines         13221    13225       +4
  Branches        445      445
============================================
- Hits           6047     6038       -9
- Misses         6970     6983      +13
  Partials        204      204

Impacted Files
Coverage Δ
Complexity Δ

.../scala/ml/dmlc/xgboost4j/scala/spark/XGBoost.scala
73.59% <100%> (ø)
0 <0> (ø)
:arrow_down:

...dmlc/xgboost4j/scala/spark/XGBoostClassifier.scala
63.9% <66.66%> (+0.35%)
18 <0> (ø)
:arrow_down:

.../dmlc/xgboost4j/scala/spark/XGBoostRegressor.scala
62.27% <66.66%> (+0.45%)
16 <0> (ø)
:arrow_down:

src/data/sparse_page_raw_format.cc
41.5% <0%> (-22.65%)
0% <0%> (ø)

src/data/sparse_page_dmatrix.cc
92.3% <0%> (-0.6%)
0% <0%> (ø)

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 2bb9b9d...f15c96b. Read the comment docs.

thanks


[Fixes #852] TestHost: OnStarting and OnCompleted callbacks of response are not being awaited

@Tratcher

:up: :date:


ENH: Add macOS Azure Pipelines configuration

I'm a Program Manager on Azure Pipelines. Let me know if you have any questions or suggestions. I'm happy to help!

Hi @kaylangan, thanks for reaching out!
I am trying Azure Pipelines for our community-driven scientific open source project:

http://www.itk.org/
https://www.frontiersin.org/articles/10.3389/fninf.2014.00013/full

So far, I love it! It solves so many problems that exist for scientific library continuous integration testing. In particular, the cross-platform test systems, C/C++ compiler capability, and long build times are wonderful. Thank you!
Could you please help me with the following issues?:

On macOS, the build directory is long, which results in very long absolute paths for our builds:
https://open.cdash.org/testDetails.php?test=689064392&build=5547048

Do you have any suggestions on how to use shorter paths?

Could our account, itkrobot, https://dev.azure.com/itkrobot/, please get more build agents? We typically have a lot of community activity. See e.g. our current Gerrit activity,
http://review.source.kitware.com/#/q/status:merged

and I think we will use the current 10 agents pretty quickly if we adopt Azure Pipelines for the main repository.

Rebasing on master...

@kaylangan we improved the build to work with the macOS agent build directory, but help with more build agents would still be welcome :-)

@thewtex I'm glad you were able to get the build going on the macOS agent!
I looked at your Gerrit activity and I think you should have more than enough resources with 10 parallel pipelines. Have you been running into issues with the limits? Are you planning on adding more projects or builds?

@kaylangan a much larger load is anticipated if Azure Pipelines are adopted for the main repository:
https://github.com/InsightSoftwareConsortium/ITK
-- there are more contributions and the builds are significantly longer.

@thewtex I see. Does this not include the ITK reviews that would need builds? I had assumed it did; it looked like max 10-12 per day (and <5 on average).
If the concern is around time limits, you can set the time limit to be longer than an hour and as long as 6 hours.

@thewtex I see. Does this not include the ITK reviews that would need builds? I had assumed it did; it looked like max 10-12 per day (and <5 on average).

Yes, currently there around 10-12 commits per working day. Each one of these commits goes through approximately 3-4 revisions (Patch Sets) as the contributor replies to reviews and addresses issues identified by CI testing. Here is the distribution:

from: https://www.frontiersin.org/articles/10.3389/fninf.2014.00013/. Each change is tested on macOS / Linux / Windows and some changes also get builds for features like Python wrapping. So, current ballpark is: 10 commits * 3 revisions * 3 build systems  = 90 builds / days. These are not concurrent, but they do not count extra builds, like Python, or increased participation from moving to GitHub :-) :octocat:

If the concern is around time limits, you can set the time limit to be longer than an hour and as long as 6 hours.

This is a fantastic!!

Ah, I see. Unfortunately, right now, we won't be able to offer your project additional pipelines. We're currently making exceptions only for really, really large projects that have a sustained need for more than 10 pipelines. I know that's probably not what you were hoping to hear.
That said, if you're really strapped for resources, you can hook up your GitHub org to multiple Azure DevOps orgs, so if you wanted to map each of your repos to their own Azure DevOps org that could help capacity for your main project.


fix: added decimals in the allocation

Closes #97
https://github.com/scaffold-eth/OP-RetroPGF3-Discovery-Voting/assets/56735482/d2fc14a0-fe6c-4bbf-8053-a14468adb28e

Requesting review from @escottalexander on this one since he's doing quite a bit to the AllBallot.tsx file currently to make sure everything can merge cleanly.


Add Internalization Support for Spanish (PR)

Possibly a good resource: https://flutter.dev/docs/development/accessibility-and-localization/internationalization
Would be nice to see if it supports default (generic es) as fallback with localized overrides (es_PR).


Create layouts for forensic images

Template layout for all forensic images
Template layout for an individual page of forensic image(s)
Linking back and forth between manuscript page and forensic page (and vice versa)

Does the Image model work well enough for this? Or will it need modifications?


build multiplat manifests with buildah

Signed-off-by: Evan Baker<EMAIL_ADDRESS>
Reason for Change:

Issue Fixed:

Requirements:

[ ] uses conventional commit messages

[ ] includes documentation
[ ] adds unit tests

Notes:

/azp run

patching together various runs, tests have passed


Fix Project Title Alignment

Fixes #1028
Describe the changes you have made in this PR -
I have added Media Query for the Project name and also removed the pull right style from the sign in option to fix the issue .
Additionally I have added favicon to the simulator page.
Screenshots of the changes (If any) -

Coverage remained the same at 84.266% when pulling ff04275c2c24032253aba919fe1a68dd547a0379 on Shivansh2407:patch-25 into 478909f6b397bc4e2100b5730833e411c66f5c56 on CircuitVerse:master.

Please review @tachyons and @nitin10s 👍

@nitin10s review please 👍

@satu0king Please review 👍

@nitin10s Please review this 👍

@nitin10s Please review this 👍

Sure @nitin10s . I will update the PR with the requested changes soon 👍🏻.

@Shivansh2407

@Shivansh2407 are you working on this ?

I will update this PR soon @aayush-05.

Updated Screenshots :

Please review @nitin10s  👍

@nitin10s please review 👍

is it necessary? as the simulator is not available for smaller screens? @nitin10s

This can come into action when resizing (zoom in and out) of webpage will be done.

I kind of agree with Shivansh, @abstrekt is this PR valid regarding the new design of simulator?

oh right, sorry my bad

@Shivansh2407  please check this PR and close/fix as required


HIVE-24704: Ensure that all Operator column expressions refer to a column in the RowSchema

What changes were proposed in this pull request?

Why are the changes needed?

Does this PR introduce any user-facing change?

How was this patch tested?

@jcamachor I've cleaned up the changes a bit - could you please take a look?


[WFCORE-3765] Explicitly list all dependencies, organizing them by ho…

…w they are used. Use 'provided' scope for dependencies that are not required to be visible to the embedding app's classloader at runtime.
Also, drop use of WildFlySecurityManager to avoid the requirement for elytron on the embedding app's classpath.
Also, drop use of wildfly-common Assert, even though it's only required on the modular classloader side, just to cut the pom footprint and help avoid it leaking to the embedded app side.
https://issues.jboss.org/browse/WFCORE-3765
This will conflict with #3202. I planned to wait on this and fix conflicts when #3202 is merged. But if there are going to be delays on #3202, which is a Feature, then this can go first.

@jamezp re the 'assert' stuff I'd originally thought to switch those to nullVar once your PR restoring that method was in. But I realized waiting is silly; my restoring it and using it here shouldn't cause a conflict. So I did.

@bstansberry No problem and makes sense. I can rebase my PR on top of this once it's merged. This one is more important IMO.

Core - Full Integration Build 7190 outcome was FAILURE using a merge of bd922558df8a2c7082c49e8374e92730232e3b3f
Summary: Tests failed: 1 (1 new), passed: 4331, ignored: 140 Build time: 01:32:16
Failed tests
org.jboss.as.test.clustering.cluster.jpa2lc.ClusteredJPA2LCTestCase.testEntityCacheReplication: java.lang.AssertionError
	at org.jboss.as.test.clustering.cluster.jpa2lc.ClusteredJPA2LCTestCase.testEntityCacheReplication(ClusteredJPA2LCTestCase.java:158)
------- Stdout: -------
 [0m11:10:36,219 INFO  [org.hibernate.hql.internal.QueryTranslatorFactoryInitiator] (default task-1) HHH000397: Using ASTQueryTranslatorFactory
 [0m


[Reveal] Close button makes page skip to last occurence of data-open button

Hi, I hope I am right here and explain everything properly …
I use reveal to open a modal on my page:

 ………
There are three buttons (and a link) with data-open="ProbeessenModal":
<button class="button secondary hollow rm-rounded" data-open="ProbeessenModal">Hochzeits-Probeessen</button>
One button in the top part of the page, one in the middle, one near the bottom. Everything works fine.
But when the modal is called from the topmost button and the user clicks the close button
<button class="close-button" data-close aria-label="Close reveal" type="button"> 		    ×
the modal is closed. But the page skips to the last occurence of the button near the bottom.
So the users might be confused and might miss important parts of the page.
I could probably make four identical modals with four different IDs. But this would bloat my code and would be error-prone.
Is there anything I can do to have the modal close at the part of the page where it was called?
Thanks for helping
Reinhard

https://github.com/zurb/foundation-sites/commit/9fce99e34709e5ec5a2dc1e0ac98e5f1e8c6af84#diff-5b5e0861de0a3864db2c3c28919700b7
I guess this fixes it. You can test it here

Best fix I have seen for this yet. Thanks Daniel.


Explicit "on" signal for climate

I digged through config files and they all appear to have no explicit ON signal, so I guess SmartIR tries to send mode change command when AC should be turned on and it doesn't work for me.
My AC unit is Panasonic CS-YW9MKD, the remote looks like this:

The signals for on and off are explicit:

When I change mode or temp with ac in off mode, it beeps that the command is received but doesn't turn on
If I click on, hide the remote and click power button again (ac doesn't receive this one), and then click power button again, AC beeps that it received the signal but doesn't turn off = explicit on is sent again
Same works in reverse - turn off AC, hide remote and turn on, unhide and click power button - again beep that signal is received but it stays off

Is it possible to support such mode of operation in SmartIR? Broadlink's IHC works well with my AC unit.

Oh wait, I should have just recorded signals for power on with respective mode instead of to switch to respective mode. Probably need to add this clarification to the docs though.


[terra-date-picker][terra-date-time-picker] Split Date Picker Input

Summary

Split Date Picker Input into 3 separate inputs: day, month and year.
PS. Used https://github.com/cerner/terra-framework/pull/1004 as initial reference.

Closes #468
Deployment Link

https://terra-framew-split-date-uw47dd.herokuapp.com/
Testing

Jests and WDIOs
Additional Details

The following have been addressed since https://github.com/cerner/terra-framework/pull/1004:

Updated "Date Format Order" logic to use DMY, MDY and YMD.
"Date Separator" ( / , - , . ) is now read from the respective translation files.
Refined date value splitting logic by using String.prototype.split() instead of String.prototype.substring().
Refined Styles to be consistent with the original "DateInput".
Updated orion-fusion-theme and clinical-lowlight-theme to reflect the default style changes and also use all the new theme variables.
Refined code to reuse date splitting logic.
Added ability to navigate between the inputs using "Left" and "Right" arrow keys.
Added auto focusing/flow though to previous input when "Deleting" values.
Added auto prepending of "0" only for "Day"(when input value >= 4) and "Month"(when input value >= 2) Inputs.
Enforced strict entry of values, i.e., only accepting values from "01-12" for Month, "01-31" for Day and "1900-2100" for Year.
Implemented "Initial Text Selection" and "Input Highlight" similar to "TimeInput".
Used VisuallyHiddenText instead of aria-label to allow screen readers to read consolidated Date value.
Fixed clearing/removal of invalid default value on focus.
Fixed "cursor jumping to the end" issue when deleting values.
Attaching id on the DIV, wrapping the input elements, instead of the input elements directly.
Updated terra-dev-site examples to use hooks.
Fixed terra-date-time-picker focus sequence issue when updating an existing complete date.

Focus jumping from date picker to time input after entering month, should go to date.

We could restrict the user to enter year value not greater than 2100 and not lesser than 1900. similar to Month and date field.

Focus jumping from date picker to time input after entering month, should go to date.

@benbcai, @neilpfeiffer your suggestions and thoughts on this behaviour?

Focus jumping from date picker to time input after entering month, should go to date.

@benbcai, @neilpfeiffer your suggestions and thoughts on this behaviour?

@avinashg1994 For this case, after completing the month the focus should advance to the next input (i.e. day input) as described by @neilpfeiffer's comment.

We could restrict the user to enter year value not greater than 2100 and not lesser than 1900. similar to Month and date field.

That was a similar question i had, but then it was decided that we would not want to restrict the user input for every character, since they might want to go back and edit/change the value while entering the year. But the restriction was added only for the final (4th input) which determines whether the value is within the range or not and then rejecting it based on that.

Focus jumping from date picker to time input after entering month, should go to date.

@benbcai, @neilpfeiffer your suggestions and thoughts on this behaviour?

@avinashg1994 For this case, after completing the month the focus should advance to the next input (i.e. day input) as described by @neilpfeiffer's comment.

Addressed here https://github.com/cerner/terra-framework/pull/1208/commits/c7153efaf0e9699d070a0dc6b2ef8c7602922538

Did both of these have to be updated at the same time for this to work correctly? Wondering if this could have been a small PR to review.

Not able to navigate from month to year in Date-Input when it is read-only. Can you verify this behavior once since I am not sure if it is issue with deployment..!

Not able to navigate from month to year in Date-Input when it is read-only. Can you verify this behavior once since I am not sure if it is issue with deployment..!

This behaviour also exists in TimeInput as well.
Also, since there are no defined standards for readonly input elements when specified using the html attribute. There is another issue open to investigate further on this : https://github.com/cerner/terra-framework/issues/1317

This behaviour also exists in TimeInput as well.
Also, since there are no defined standards for readonly input elements when specified using the html attribute. There is another issue open to investigate further on this : #1317

@avinashg1994 Do you know why it allows to navigate from month to day but not from day to year?

This behaviour also exists in TimeInput as well.
Also, since there are no defined standards for readonly input elements when specified using the html attribute. There is another issue open to investigate further on this : #1317

@avinashg1994 Do you know why it allows to navigate from month to day but not from day to year?

The reason behind this behaviour is because even though the date inputs are made "Readonly" using the html attribute, the "KeyDown" event handler is still being triggered, which contains the logic for input navigation using the arrow keys.

@avinashg1994 Do you know why it allows to navigate from month to day but not from day to year?

The reason behind this behaviour is because even though the date inputs are made "Readonly" using the html attribute, the "KeyDown" event handler is still being triggered, which contains the logic for input navigation using the arrow keys.

@avinashg1994 But why does it allow moving from the month input to the year input and it doesn't let you move from day to year? Are the attributes applied differently for the year input vs month/day?

After some more investigation, like the month/day inputs the year input currently can also receive focus programmatically using the left/right arrow key when it is read-only. It is just that you can to first tab into it just like the the month/day inputs. With that I don't see any inconsistency among these inputs.
Until we fully define read-only behaviors on form input on #1317 we should for now disallow navigation using left/right arrow keys between the inputs and set focus programmatically when the inputs are read-only. We could check for inputAttributes.readOnly in handleDayInputKeydown, handleMonthInputKeydown and handleYearInputKeydown before proceeding to set input focus programmatically.

After some more investigation, like the month/day inputs the year input currently can also receive focus programmatically using the left/right arrow key when it is read-only. It is just that you can to first tab into it just like the the month/day inputs. With that I don't see any inconsistency among these inputs.
Until we fully define read-only behaviors on form input on #1317 we should for now disallow navigation using left/right arrow keys between the inputs and set focus programmatically when the inputs are read-only. We could check for inputAttributes.readOnly in handleDayInputKeydown, handleMonthInputKeydown and handleYearInputKeydown before proceeding to set input focus programmatically.

@benbcai, Navigation using left and right arrow key have been disabled when the date picker is configured to be readOnly.

Functional review complete.

Functional review complete.

@neilpfeiffer , @benbcai , @avinashg1994. so in the scenario for the input up and dow arrow key actions. so when the date is '03/30/2021', the focus is on month input and user enters down arrow key then the date becomes '02/30/2021' which is invalid as there are only 28 days in February. so in this case should we skip 02 when down arrow key is pressed and go to '01' ?
https://user-images.githubusercontent.com/45097016/107625014-b947bf00-6c81-11eb-8c29-dbd0b45e2585.mov

@neilpfeiffer , @benbcai , @avinashg1994. so in the scenario for the input up and dow arrow key actions. so when the date is '03/30/2021', the focus is on month input and user enters down arrow key then the date becomes '02/30/2021' which is invalid as there are only 28 days in February. so in this case should we skip 02 when down arrow key is pressed and go to '01' ?

I think there are three possible options here. The question is which one feels right.

The option that @ShettyAkarsh proposed above.
Keep how it currently works. When this scenario occurs, the date would be invalid and not accepted.
Similar to how it works in Outlook. Keep 02 as the month but auto update the day to 28 or 29 for leap years. Would this cause safety concerns because the component is auto changing the user's intended input without the user acknowledging it?

Here is another example of a spin button date picker from https://www.w3.org/TR/wai-aria-practices-1.1/examples/spinbutton/datepicker-spinbuttons.html

@neilpfeiffer , @benbcai , @avinashg1994. so in the scenario for the input up and dow arrow key actions. so when the date is '03/30/2021', the focus is on month input and user enters down arrow key then the date becomes '02/30/2021' which is invalid as there are only 28 days in February. so in this case should we skip 02 when down arrow key is pressed and go to '01' ?

I think there are three possible options here. The question is which one feels right.

The option that @ShettyAkarsh proposed above.
Keep how it currently works. When this scenario occurs, the date would be invalid and not accepted.
Similar to how it works in Outlook. Keep 02 as the month but auto update the day to 28 or 29 for leap years. Would this cause safety concerns because the component is auto changing the user's intended input without the user acknowledging it?

Here is another example of a spin button date picker from https://www.w3.org/TR/wai-aria-practices-1.1/examples/spinbutton/datepicker-spinbuttons.html

for myself the outlook option looks more appropriate if we go with option 1. as during kEY UP or DOWN there is high chances of the number skipping that occurs going unnoticed for the users.  @neilpfeiffer  could you please provide your thoughts on which will be better option for this scenario ?


Dockerfile: pass BUILDTAGS to go build

Looks like there's an issue; perhaps quoting is incorrect? (haven't checked);
#23 0.636 malformed import path "-trimpath": leading dash
#23 0.636 malformed import path "-ldflags": leading dash
#23 0.636 malformed import path "-X github.com/distribution/distribution/v3/version.Version=2.7.0-2007-ge1a30f7d -X github.com/distribution/distribution/v3/version.Revision=e1a30f7d2c609a9ad2f73b3566dab69cf5c89298 -X github.com/distribution/distribution/v3/version.Package=github.com/distribution/distribution/v3 -s -w": leading dash
#23 0.636 malformed import path "-o": leading dash

Codecov Report

Merging #3703 (e54c298) into main (4bf3547) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #3703   +/-   ##
=======================================
  Coverage   57.38%   57.38%
=======================================
  Files         105      105
  Lines       10832    10832
=======================================
  Hits         6216     6216
  Misses       3932     3932
  Partials      684      684

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 4bf3547...e54c298. Read the comment docs.

squahsing into 1 commit just in case

blocked by https://github.com/distribution/distribution/pull/3702. So cherry pick into there maybe?

There is a whole chain of PRs 😬 I'd love someone with proper knowledge of GCS to review #3702 but I dont think we have anyone in @distribution/distribution-maintainers whos got that knowledge 🤔

From digging.. it was after https://github.com/distribution/distribution/commit/87f93ede9e5de6e86a2d2aefb2d5d8fe7ce98274#diff-dd2c0eb6ea5cfc6c4bd4eac30934e2d5746747af48fef6da689e85b752f39557L25 that tags were lost

FTR there's a new PR up to fix the GCS driver (the previous one was closed): https://github.com/distribution/distribution/pull/3929

blocked by https://github.com/distribution/distribution/pull/3929

There is also https://github.com/distribution/distribution/pull/3926

There is a whole chain of PRs 😬 I'd love someone with proper knowledge of GCS to review https://github.com/distribution/distribution/pull/3702 but I dont think we have anyone in @distribution/distribution-maintainers whos got that knowledge 🤔

What's the plan with v3 if there is no GCS maintainer? add new maintainer? kill off GCS driver?

@kaovilai Could you rebase this PR since https://github.com/distribution/distribution/pull/3929 has now been merged.

Closing, addressed in https://github.com/distribution/distribution/pull/3950


Capturing bases with nerve gas doesn't 'capture' their scanners

After you capture a base with nerve gas, the original owner of the base is still is posession of its scanners. You will still get 'eye' from it and he will still see you.
I'm not sure whether its scanners work for you as well or only for the original owner.
Imported from trac ticket #31,  created by TigerEye on 01-05-2010 at 11:27, last modified: 07-01-2010 at 22:25

someone please re validate this after changes for alliances in r480s
Trac comment by Imago on 06-14-2010 at 07:59

10.07.01 Build
Nerve gas captures base and whole base scan range, eye disappears when enemy base is captured.  Confirmed fixed.
BBT
Trac comment by Big_Beta_Tester on 07-01-2010 at 22:25


Sort entities from batch loader by using js

Motivation
Postgres variadic function has limitation in 100 arguments, literally you can't pass more than 100 arguments into a postgres function
Approach
Sort entities by refs by using javascript

The following preview packages were published:

Name
Version
Install Command

@frontside/backstage-plugin-batch-loader
0.1.1-dl-remove-field-fn-from-loader.0
yarn add @frontside/backstage-plugin-batch-loader@dl-remove-field-fn-from-loader

Generated by @thefrontside/actions


chore: Refactoring API wiring for actions and JS actions to support private entity renaming on EE

Description
Refactoring API wiring for actions and JS actions to support private entity renaming on EE. Also handles a couple of other issues (refer the issue attached below)
PR fixes following issue(s)
Fixes #29762
Type of change

Chore (housekeeping or task changes that don't impact user perception)

Testing

How Has This Been Tested?

[x] Manual
[ ] JUnit
[ ] Jest
[x] Cypress

Checklist:
Dev activity

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[ ] PR is being merged under a feature flag

QA activity:

[ ] Speedbreak features have been covered
[ ] Test plan covers all impacted features and areas of interest
[ ] Test plan has been peer reviewed by project stakeholders and other QA members
[ ] Manually tested functionality on DP
[ ] We had an implementation alignment call with stakeholders post QA Round 2
[ ] Cypress test cases have been added and approved by SDET/manual QA
[ ] Added Test Plan Approved label after Cypress tests were reviewed
[ ] Added Test Plan Approved label after JUnit tests were reviewed

Summary by CodeRabbit
Summary by CodeRabbit

New Features

Enhanced action and JS object naming capabilities with new context-aware options.
Added support for organizing actions and JS objects within modules.

Improvements

Streamlined the process of renaming actions and JS objects to be more intuitive and context-sensitive.

Refactor

Updated internal type declarations for consistency and future extensibility.

User Interface

Improved UI elements to reflect the new naming and organizational features for actions and JS objects.

Bug Fixes

Corrected logic to ensure proper handling of the isPublic flag within JS collections.

/ok-to-test


How to get the inception-resent-v1 layers?

Hi, can I know how to get the total number of layers in inception-resent-v1 and their name ?

It will be much easier with keras implementation and using model summary for getting the model layer statistics
-link https://github.com/nyoki-mtl/keras-facenet
-load the model and weights, compile model and then use model.summary to know layer stats


[FLINK-20806] Correct error message in TaskExecutor.disconnectJobManagerConnection

Correct error message in TaskExecutor.disconnectJobManagerConnection

Thanks for the review @zentol. Merging this PR now.


fix readthedocs PR builds

fixes recently failing readthedocs builds like:
https://readthedocs.org/projects/teuthology/builds/22250705/

OK.  Good reason for the change.  It's good to explain every nonobvious change when submitting new code, if not for right now, for 2 years from now when someone tries to understand.  Thanks for the explanation.

I'll keep that in mind when writing new commits. Thank you.


Deploy to production

@marko-bekhta Staging seems stable enough... shall we try this? Could you please trigger the merge when you have time to watch/clean up the prod environment as necessary?

Let's do this ! 😃 🤞🏻


 This is my first non-minor Alephant change, so don't be too harsh on the code! I look forward to the feedback. The Sequencer one will definitely be easier, once this one has been reviewed and changed.

One last point, this will probably take 30+ minutes to review.

Hi @samfrench left some comments for you. Thanks

@BBCMarkMcDonnell, I finally addressed all of the points you raised/suggested.

It is a good suggestion about a reusable gem. Obviously that will be sometime, and the framework may change in other ways, so we will go with this for now.
I moved the initialising default value to the constructor as I wasn't doing it underneath for any particular reason. I thought nil could be passed in if other gems weren't passing in the second parameter, then I thought nil would override the default constructor?
I agree with the point about using mustache syntax for interpolation. I used to use it, but other people advise against it. It's just personal preference, and I do prefer it.
I removed the method signatures from the rspec describe blocks, as they can get out of date. Looking at previous code written, I don't usually include them.
I haven't sorted out the test leaking into the next, as I'm not sure if that's a must-have for this PR. I noticed previously this was an issue, so it is still present. I could raise a ticket for that, or that could halt this PR until resolved.

Any other points for this PR, or is this ready to go?

Hi Sam, no problem. Just to let you know that I'll review this later today.

Hi @samfrench the test can be deferred to another PR if you've not got time right now. As long as the tests are passing then their leakiness can be cleaned up later

Otherwise :cake:

Hi @samfrench
Using an instance variable for the Dalli client should be OK in the sense that it ultimately points to a singular ElastiCache endpoint. so if there was a concurrency issue whereby multiple clients were created, they would still ultimately be calling the same underlying cache service (as far as I'm aware - don't know if @zygotic99 would argue that's bad logic on my part)

@Integralist / @BBCMarkMcDonnell I think that all makes sense.  That's how Newsbeat uses Elasticache - the same underlying service endpoint - and although Newsbeat isn't a paragon of good code it does work and, when fixed in AMP, the Elasticache code does work.  Erm...
Anyway, sounds fine to me
@samfrench


TRN field accepting more than 15 digits and les than 15 digitd

Both in customer module and vendor module

while edit the TRN field it accepts more than 15 digits


Number field

Final changes made, decimal working with procure as testing, during input and after saving the tickets.

Functionality checked


man pages - consistency fixes

podman-generate and -play had the wrong NAMEs.
podman-restart and -volume-prune the wrong SYNOPSIS.
All the rest are varying degrees of minor:

missing a space between the NAME and description
multi-line SYNOPSIS that could be collapsed into one
use of UPPER CASE in synopsis instead of asterisks
improper use of double asterisks for options
varlink and version were transposed in podman-1
fixed inconsistencies between the description in
the man page and that in the parent manpage. These
are too numerous for me to fix all.

Added: script that could be used in CI to prevent future
such inconsistencies. It cannot be enabled yet because
there are still 35+ inconsistencies in need of cleaning.
This will be difficult to review on github. I suggest
pulling the PR and running 'git log -1 -p | cdif | less'
'cdif' is a handy tool for colorizing individual diffs between
lines:
http://kaz-utashiro.github.io/cdif/
There are other such tools; use your favorite. Comparing
without visual highlights may be painful.
I also encourage you to run hack/man-page-checker and suggest
more fixes for the problems it's finding.
Signed-off-by: Ed Santiago<EMAIL_ADDRESS>

GREAT WORK
LGTM
If you can get it to pass the tests.

Thanks. Yeah, CI is failing all around; x509 cert expired

/lgtm
/approve


ConsumerStatefulWidget is not getting an updated state in the didChangeDependencies, when requesting it from AutoDisposeNotifier

Describe the bug
I've faced a situation in which I don't know if that's how it was supposed to happen according to the Riverpod's laws, or if it's a Riverpod bug.
I have already solved the situation, but the solution was basically a workaround.
In summary, I have updated a provider from a method call, which was called inside a widget that was built in the didChangeDependencies function. But when I called the state after the update, it remained the same old state.
The issue is likely that the widgets I'm creating inside didChangeDependencies are not being automatically rebuilt when the state of the notifier changes.
When I use ref.read to get the state of a provider, it creates a subscription to that provider, but that subscription is only active for the lifetime of the widget that called ref.read. So if I create a widget inside didChangeDependencies that calls ref.read, and then the state of the provider changes, that widget will not be automatically rebuilt to reflect the new state.
The solution that I came up with was to wrap the widget built inside the didChangeDependencies with the Consumer widget, which made the code work exactly as I wanted it to. With the Consumer ref, I could get the newly updated state from the AutoDisposeNotifier.
The thing is: Wasn't it supposed to reflect the update on the Ref of the ConsumerStatefulWidget?
If it was supposed to be like that, then sorry beforehand for not knowing it before posting this issue in here.
Also : It doesn't matter if I change the ref.read to ref.watch (I've tried it already).
Below is a sample code (I've reduced most of the code, as far as possible) :
SampleScreen
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';

import '../controllers/sample_controller.dart';

class SampleScreen extends ConsumerStatefulWidget {
  const SampleScreen({super.key});

  @override
  ConsumerState<ConsumerStatefulWidget> createState() => _SampleScreenState();
}

class _SampleScreenState extends ConsumerState<SampleScreen> {
  final GlobalKey<AnimatedListState> _listKey = GlobalKey<AnimatedListState>();
  final PageController _pageController = PageController(
    initialPage: 0,
  );
  late final List<String> _messages;

  late final VoidCallback _goToNextScreen;

  late List<Widget> _lowerButtons;
  late Widget _backButton;

  var _hasStarted = true;

  void _goToPage(int nextPageIndex) {
    print("\nGOING TO NEXT PAGE\n");
    final currentIndex = ref.read(onboardingControllerProvider);
    print("NEXT PAGE: $nextPageIndex");
    print("CURRENT PAGE: $currentIndex");

    // Don't do anything at the limit of the message page's list
    if (nextPageIndex >= _messages.length || nextPageIndex < 0) {
      return;
    }

    // swiping right
    if (nextPageIndex > currentIndex && currentIndex == 0) {
      print("HAS SWIPED TO RIGHT!");
      _lowerButtons.insert(1, _backButton);
      print("CURRENT LOWER BUTTONS AFTER INSERT : ${_lowerButtons.length}");
      _listKey.currentState!.insertItem(1);
    }

    // swiping left
    else if (nextPageIndex < currentIndex && currentIndex == 1) {
      print("HAS SWIPED TO LEFT!");
      _lowerButtons.removeAt(1);
      print("CURRENT LOWER BUTTONS AFTER REMOVE : $_lowerButtons");
      _listKey.currentState?.removeItem(
        1,
        (context, animation) => FadeTransition(
          opacity: animation,
          child: _backButton,
        ),
      );
    }

    ref
        .read(onboardingControllerProvider.notifier)
        .onPageChanged(nextPageIndex);
  }

  @override
  void didChangeDependencies() {
    if (_hasStarted) {
      print("HAS STARTED!!!!");

      _messages = ref.read(sampleControllerProvider.notifier).messages;

      _goToNextScreen =
          () => print("Here we can use GoRouter to go to the next page");

      _lowerButtons = <Widget>[
        Consumer(
          builder: (context, ref, child) {
            return ElevatedButton(
              onPressed:
                  (ref.read(onboardingControllerProvider.notifier).state ==
                          _messages.length - 1)
                      ? _goToNextScreen
                      : () {
                          _goToPage(ref.read(onboardingControllerProvider) + 1);
                          _animatePageViewToMessagePage(
                              ref.watch(onboardingControllerProvider));
                        },
              style: ElevatedButton.styleFrom(
                disabledBackgroundColor: const Color.fromRGBO(23, 104, 46, 0.5),
                minimumSize: const Size.fromHeight(54.0),
                backgroundColor: const Color.fromRGBO(23, 104, 46, 1.0),
                shape: RoundedRectangleBorder(
                  borderRadius: BorderRadius.circular(
                    10.0,
                  ),
                ),
              ),
              child: Text(
                (ref.watch(onboardingControllerProvider) ==
                        _messages.length - 1)
                    ? "GET STARTED"
                    : "NEXT",
                style: const TextStyle(color: Colors.white),
              ),
            );
          },
        ),
        Row(
          mainAxisAlignment: MainAxisAlignment.end,
          children: [
            TextButton(
              onPressed: _goToNextScreen,
              //child: skipText.,
              child: const Text(
                "Skip",
                style: TextStyle(
                  color: Color.fromRGBO(23, 104, 46, 1.0),
                  fontWeight: FontWeight.w400,
                  fontSize: 12.0,
                  height: 1.5,
                ),
              ),
            ),
          ],
        ),
      ];

      _backButton = Consumer(
        builder: (context, ref, child) {
          return ElevatedButton(
            onPressed: () {
              _goToPage(ref.read(onboardingControllerProvider) - 1);
              _animatePageViewToMessagePage(
                  ref.read(onboardingControllerProvider));
            },
            style: ElevatedButton.styleFrom(
              minimumSize: const Size.fromHeight(54.0),
              backgroundColor: const Color.fromRGBO(168, 174, 170, 0.5),
              shape: RoundedRectangleBorder(
                borderRadius: BorderRadius.circular(
                  10.0,
                ),
              ),
            ),
            child: const Text(
              "BACK",
              style: TextStyle(
                color: Color.fromRGBO(23, 104, 46, 1.0),
              ),
            ),
          );
        },
      );

      _hasStarted = false;
    }

    super.didChangeDependencies();
  }

  void _animatePageViewToMessagePage(int pageIndex) {
    if (_pageController.page!.round() !=
        ref.read(onboardingControllerProvider)) {
      _pageController.animateToPage(
        ref.read(onboardingControllerProvider),
        duration: const Duration(milliseconds: 400),
        curve: Curves.easeInOut,
      );
    }
  }

  @override
  Widget build(BuildContext context) {

    final mediaQuery = MediaQuery.of(context);

    final messagePages = List.generate(
      _messages.length,
      (index) => Center(
        child: Text(_messages[index]),
      ),
    );

    return Scaffold(
      body: SafeArea(
        child: Padding(
          padding: const EdgeInsets.all(12.0),
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              Container(
                constraints: BoxConstraints(
                  minHeight: 203,
                  maxHeight: mediaQuery.size.height * 0.4242,
                ),
                padding: const EdgeInsets.symmetric(
                  horizontal: 31.0,
                ),
                child: PageView.builder(
                  controller: _pageController,
                  onPageChanged: (nextPageIndex) => _goToPage(
                    nextPageIndex,
                  ),
                  itemBuilder: (_, index) =>
                      messagePages[index % messagePages.length],
                ),
              ),
              Flexible(
                child: SizedBox(
                  height: mediaQuery.size.height * 0.173,
                  child: AnimatedList(
                    key: _listKey,
                    initialItemCount: _lowerButtons.length,
                    shrinkWrap: true,
                    itemBuilder: (context, index, animation) {
                      return FadeTransition(
                        opacity: animation,
                        child: _lowerButtons[index],
                      );
                    },
                  ),
                ),
              )
            ],
          ),
        ),
      ),
    );
  }
}

SampleController
import 'package:flutter_riverpod/flutter_riverpod.dart';

final sampleControllerProvider =
    NotifierProvider.autoDispose<SampleController, int>(
  () => SampleController(),
  name: r'sampleControllerProvider',
);

class SampleController extends AutoDisposeNotifier<int> {
  late final List<String> _messages;

  @override
  int build() {
    print("BUILDING CONTROLLER ...");

    // Here we coupld supply the message from other Provider, that's why I left this list in here
    _messages = <String>["Message1", "Message2", "Message3"];

    return 0;
  }

  List<String> get messages => _messages;

  void onPageChanged(int indexPage) {
    print("OK, CHANGING PAGE TO THE NEXT PAGE: $indexPage");
    state = indexPage;
    print("--- CURRENT STATE : $state");
  }
}

To Reproduce
Copy the SampleScreen and SampleController, put them inside the main.dart and call the screen in the MaterialApp of a simple application.
Then just remove the Consumer widget that wraps the ElevatedButtons in the sample code that was given above.
Then run it and compare the prints.
You can see that the ref gotten from the Consumer can get the updated state, but not the same for the ref of the ConsumerStatefulWidget.
Expected behavior
The Ref from the ConsumerStatefulWidget was supposed to get the updated state from the AutoDisposeNotifier which it was reading (ref.read) or watching (ref.watch) inside the didChangeDependencies.
The expected behavior happens when you run the sample code above without modifying it, by using the Consumers.

flutter_riverpod: ^2.3.4
flutter doctor -v
[✓] Flutter (Channel stable, 3.7.10, on macOS 13.3.1 22E261 darwin-arm64, locale en-BR)
    • Flutter version 3.7.10 on channel stable at /Users/user/Development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 4b12645012 (6 days ago), 2023-04-03 17:46:48 -0700
    • Engine revision ec975089ac
    • Dart version 2.19.6
    • DevTools version 2.20.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at /Users/user/Library/Android/sdk
    • Platform android-33, build-tools 33.0.1
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E222b
    • CocoaPods version 1.12.0

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)

[✓] VS Code (version 1.77.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.62.0

[✓] Connected device (1 available)
    • Chrome (web) • chrome • web-javascript • Google Chrome 112.0.5615.49

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

Using ref.read/ref.watch to cause didChangeDependencies to update is not supported.
Do this inside build instead of didChangeDependencies


Disable cgo by default

As discussed in #29, this disables cgo by default. To avoid making it impossible to override – maybe somebody builds their extension for exactly one architecture and does want to use cgo for it – it's not hard-coded in the environment, but set as an optional input parameter that defaults to 0.
Closes #29

I see you usually merge without squashing, should I squash the commits in my branch?


Filtering Words

Just had Chilly use the word rape in a random post. Is there anyway to have a word filter so that this doesn't happen?

Hey there, sorry for the long wait! The dataset Chilly was trained on was based on the chatlogs from the server where the bot is primarily used. I've tried filtering out the bad words, but it seems like one still snuck in.
I haven't touched Chilly in a short while, but recently I've been working on completely rewriting him and improving/removing/adding some features. When that comes out (hopefully within next 2 weeks) I'll also make sure to filter out the r-word. Will close this issue when that happens!

Oh! Thank you for this. I had completely forgotten about it.
We've really been enjoying Chilly in our little server, so I'm glad to know
it's still being given love.
On Mon, Nov 18, 2024 at 5:01 PM Dex @.***> wrote:

Hey there, sorry for the long wait! The dataset Chilly was trained on was
based on the chatlogs from the server where the bot is primarily used. I've
tried filtering out the bad words, but it seems like one still snuck in.
I haven't touched Chilly in a short while, but recently I've been
working on completely rewriting him and improving/removing/adding some
features. When that comes out (hopefully within next 2 weeks) I'll also
make sure to filter out the r-word. Will close this issue when that happens!
—
Reply to this email directly, view it on GitHub
https://github.com/dexmoh/FreezerBot/issues/2#issuecomment-2484221525,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/BIGDXAZTWT5NLPNE5J6A4VL2BJPSLAVCNFSM6AAAAABSAVHPMWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOBUGIZDCNJSGU
.
You are receiving this because you authored the thread.Message ID:
@.***>

Glad you're liking Chilly ^^ I went through Chilly's chatbot data and hopefully removed most of the bad terminology! I've also reworked how his chatbot works so the sentences now might be a bit more random and nonsensical, I might work on this more in the future.
The new version is out, you can check it out here. You can DM me on discord (dexmoh) if there's anything else!


HBASE-27542 Remove unneeded distcp log cleanup after incremental backups

:confetti_ball: +1 overall

Vote
Subsystem
Runtime
Comment

+0 :ok:
reexec
0m 39s
Docker mode activated.


Add online data file retrieval functionality to wealth.py

This PR adds online file data retrieval functionality to wealth.py, following some of the suggestions in Issue #514. This approach could then be implemented for any large data calls required in OG-USA rather than posting data to this repository. @jdebacker

@jdebacker. What is the URL of the SCF data files called in wealth.py lines 21-23? I am looking at the SCF data page, and I want to know if the data are the Stata .dta files of the "full data set" or "tables based in intenral and external data" or "summary extract public data".

@rickecon I'm not sure which were used.
BTW, I see that only pandas.read_csv() allows you to read a zip file directly from a URL.  read_stata() etc can take a URL, but since the SCF files are zipped, you need to use requests or similar to download the zip before you can use ZipFile or similar to unzip and then pass to the pandas.read_x function.

@jdebacker . Yes. I found the files on the SCF website, and they have nice, uniform URLs. And I have some good code for unzipping them. The first seven packages that I import in utils.py are the following.
import os
import sys
import requests
from zipfile import ZipFile
import urllib.request
from tempfile import NamedTemporaryFile
from io import BytesIO StringIO

I am trying to write this code so that we can use these new functions to go get any files we want that are stored online elsewhere.

Codecov Report

Merging #517 into master will decrease coverage by 0.63%.
The diff coverage is 14.63%.

@@            Coverage Diff             @@
##           master     #517      +/-   ##
==========================================
- Coverage   66.25%   65.62%   -0.64%
==========================================
  Files          48       48
  Lines        5812     5882      +70
==========================================
+ Hits         3851     3860       +9
- Misses       1961     2022      +61

Impacted Files
Coverage Δ

ogusa/utils.py
75.7% <20.45%> (-8.97%)
:arrow_down:

ogusa/wealth.py
10% <7.89%> (-3.96%)
:arrow_down:

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 a76287d...5e9424b. Read the comment docs.

OK, Travis CI is passing. I now just need to write some tests so that codecov will pass.

@jdebacker. I have been working with the wealth.py and test_wealth.py files in this PR. The code for fetching the SCF .zip files is working well. The moments are slightly different that what is currently in the test_compute_wealth_moments() test in test_wealth.py. The current expected moments are the following.
expected_moments = np.array([
    -0.004314198, 0.019807056, 0.062817143, 0.0644862, 0.121936608,
    0.39036657, 0.344894446, 0.837576949, 4.76976036])

The new computed moments that I get from downloading the data and rerunning the test are the following:
expected_moments = np.array([
    -4.31399943e-03, 1.98061283e-02, 6.28176665e-02, 6.44863983e-02,
    1.21936999e-01, 3.90366793e-01, 3.44893838e-01, 8.37576804e-01,
    4.76978025e+00])

As you can see, these are really close. I am proposing in this PR to replace these new expected moments with the old ones. And I might actually try to include the 2016 SCF data as well. I am also proposing changing the tolerance in the test's np.allclose() command to be a relative 0.001.
assert(np.allclose(expected_moments, test_moments, rtol=0.001))

@jdebacker. One last thing before this is ready for your review. The get_wealth_data() and compute_wealth_moments() functions in wealth.py use multiple years of the SCF. The current default is 2013, 2010, and 2007. I noticed that we don't inflation adjust those numbers anywhere in those functions so that they are comparable and rankable. The U.S. CPI for all items the years 2016, 2013, 2010, and 2007 is the following (link to data).

Year
CPI (2015=100)

2016
101.26

2013
98.29

2010
92.00

2007
87.48

That is a 15% difference between the 2007 numbers and the 2016 numbers. I think we need to inflation adjust. I am going to add the inflation adjustment to this PR.

@jdebacker. One last thing before this is ready for your review. The get_wealth_data() and compute_wealth_moments() functions in wealth.py use multiple years of the SCF. The current default is 2013, 2010, and 2007. I noticed that we don't inflation adjust those numbers anywhere in those functions so that they are comparable and rankable. The U.S. CPI for all items the years 2016, 2013, 2010, and 2007 is the following (link to data).

Year
CPI (2015=100)

2016
101.26

2013
98.29

2010
92.00

2007
87.48

That is a 15% difference between the 2007 numbers and the 2016 numbers. I think we need to inflation adjust. I am going to add the inflation adjustment to this PR.

With the inflation adjustment, the wealth moments change only slightly to the following:
expected_moments = np.array([
    -4.39579116e-03, 1.98789938e-02, 6.28189159e-02, 6.43303277e-02,
    1.21509918e-01, 3.91059782e-01, 3.44792006e-01, 8.37800157e-01,
    4.76076018e+00])

If I add the 2016 SCF to the scf_yrs_list argument in get_wealth_data(), I get the following moment list.
expected_moments = np.array([
        -4.36938131e-03,  1.87063661e-02,  5.89720538e-02,  6.10665862e-02,
        1.17776715e-01,  3.87790368e-01,  3.60041151e-01,  8.45051216e-01,
        4.97530422e+00])

I am adding 2016 to the default list. Inflation adjustment is done.
@jdebacker. I think this PR is ready for your review.

@rickecon This is looking good.  The inflation adjustment was a nice catch.

@rickecon Had a couple small comments.  But I think once tests added for those other two functions added to utils.py, this will be ready to merge.

@jdebacker. I think this PR is ready for you.

I fixed the small changes in the code you recommended.
I added two more tests for the two other functions I added in utils.py.
I merged in the changes from your plotting PR #519 that was merged in tonight.
All Travis CI and codecov tests are passing.

Not super important, but if you want to be sure that the documentation that will be posted to the OG-USA ReadTheDocs will reflect your new additions, you should edit docs/source/utils.rst to add the three new functions  to the automodule list as below:
.. _utils:

Utilities Functions
=================================================

**Utilities Functions**

ogusa.utils
------------------------------------------

.. currentmodule:: ogusa.utils

.. automodule:: ogusa.utils
  :members: mkdirs, pct_diff_func, convex_combo, read_file, pickle_file_compare,
    comp_array, comp_scalar, dict_compare, to_timepath_shape, get_initial_path,
    safe_read_pickle, save_return_table, print_progress, fetch_files_from_web, not_connected

In my last commit, I added 8 packages to environment.yml, all of which are imported in utils.py.
- sys
- os
- urllib.request
- tempfile
- zipfile
- pkg_resources
- io
- requests

This creates an error when building the conda environment conda env update -f environment.yml.
ResolvePackageNotFound:
  - urllib.request
  - io
  - pkg_resources
  - zipfile
  - sys
  - tempfile
  - os

This happened before when I added these. This time I tried adding these same package to the conda.recipe/meta.yaml and got the same error. I think these packages are already dependencies of the packages in the environment.yml. I propose that we drop them. @jdebacker

@rickecon Those packages are in the Python standard library. So, they are already included when you install Python.

@jdebacker I added the new functions in utils.py to the docs/source/utils.rst file. It now reads:
:members: mkdirs, pct_diff_func, convex_combo, read_file, pickle_file_compare,
    comp_array, comp_scalar, dict_compare, to_timepath_shape, get_initial_path,
    safe_read_pickle, rate_conversion, save_return_table, Inequality,
    read_cbo_forecast, print_progress, fetch_files_from_web, not_connected

I added the three new functions from this PR (print_progress, fetch_files_from_web, not_connected), and I added a function (rate_conversion) and a class (Inequality) that were already in utils.py but were not in utils.rst.
It seems to me like the Inequality class should be in wealth.py rather than utils.py.

@rickecon sounds good.  Wasn't sure if you those were standard packages.  Thanks @hdoupe for the comments.

@rickecon I don't think it makes sense to have Inequality in wealth.py since its used for measures on inequality for variables besides wealth.

No problem. Sorry for leaving the same comment twice! I wasn't sure if my first one was buried in the file changes.

Great additions here @rickecon !  and thanks for cleaning up some stuff too.  Merging.


Introduce @_extern(c) to declare C function without Clang module

Motivation
Currently the only proper way to reference a C function from Swift is by importing it through Clang module.
However there are a number of places using the incorrect @_silgen_name way to reference C function. (The attribute expects Swift calling convention and it causes calling convention mismatch.)
These incorrect references happened because defining a new Clang module requires non-trivial work mostly around the build system. (Also there is a very complex issue, which is not easy to solve with Clang module approach https://github.com/apple/swift/pull/67853#issuecomment-1760710859)
So this PR adds a new variant of @_extern for C function declaration. Also this unlocks a way to declare a function with C calling convention imported through Wasm’s import mechanism by mixing with @_extern(wasm)
Description
The new attribute unlocks declaring a C function in Swift source code. The declared function interfaces are limited to be C-compatible, so no async, no throws, and no ref counted types are allowed. (We might be able to unlock the use of ref counted type in theory but it introduces a lot of complexities)
Examples:
@_extern(c, "swift_demangle")
public func _stdlib_demangleImpl(
  mangledName: UnsafePointer<CChar>?,
  mangledNameLength: UInt,
  outputBuffer: UnsafeMutablePointer<CChar>?,
  outputBufferSize: UnsafeMutablePointer<UInt>?,
  flags: UInt32
) -> UnsafeMutablePointer<CChar>?

@_extern(wasm, module: "wasi_snapshot_preview1", name: "random_get")
@_extern(c) // NOTE: Just for calling it with C calling convention
func wasi_random_get(
  buffer: UnsafeMutablePointer<UInt8>,
  count: UInt32
) -> Int32

Resolves rdar://115802180 and unblock https://github.com/apple/swift/pull/67853

Alternative consideration: Allow @_cdecl without body
We initially planned this approach, but didn’t take it for the following reason

The current semantics of @_cdecl is “expose the Swift declaration to C/Objective-C world” and it allows having Objective-C types in its interface.

Thus it requires a native-to-foreign thunk to be emitted within the module, which defines the @_cdecl function.

The new mode (without body) would add a semantics: “if no function body is defined, reference a C function corresponding to the Swift function declaration”.

This requires a foreign-to-native thunk to be emitted within the module, which declare the @_cdecl function.

The problem here is we have to determine if a function with @_cdecl requires foreign-to-native thunk based on where function declarations come from because a @_cdecl function without body declared within a compiling module and imported @_cdecl function both do not have body.

@swift-ci Please smoke test

@swift-ci Please smoke test

@swift-ci Please smoke test Apple Silicon

@swift-ci Please test Apple Silicon

@swift-ci Please smoke test

@swift-ci Please test

@swift-ci test

@swift-ci Please test

@swift-ci Please build toolchain

@swift-ci Please smoke test

@swift-ci Please smoke test

@swift-ci build toolchain

@swift-ci Please smoke test

The new mode (without body) would add a semantics: “if no function body is defined, reference a C function corresponding to the Swift function declaration”.
This requires a foreign-to-native thunk to be emitted within the module, which declare the @_cdecl function

Note that the foreign-to-native thunk is still necessary in general. Currently this crashes the compiler:
@_extern(c)
func foo(x: Int)

func bar(_: (Int) -> Void) {}

func bas() {
    bar(foo)
}

It would be cool if we treated these like we do functions imported from Clang and generate the foreign-to-native thunk as a shared thunk on demand.


Entity pictures not showing on Card 3

I added the cards in my dashboard. Really cool.
I have one issue: The pictures for my router and satellite in card 3 don't show.
In the code it seems to look into the local i.e. www folder in the subfolder velop_nodes on my HA instance for pictures
getEntityPicture: |
            () => {
              if (states[vars['ID_ENTITY_PICTURE']]) {
                return states[vars['ID_ENTITY_PICTURE']].state
              } else {
                if (states[vars['ID_MODEL']]) {
                    return '/local/velop_nodes/' + states[vars['ID_MODEL']].state + '.png'
                }
              }
            }

However on my HA there is no velop_nodes folder in my www folder. Is that supposed to be created during setup in HACS? Or do I manually need to upload it there? If the later where can I get the images?
On and one other thing, not a bug but a questions: in card 2 there is that huge globe icon that should show if my router is connected to the internet or not. I would like to make that a tad smaller. I found where to change the color in the code but I could not find the part where I can set the icon size. Can you point me to that?
Thanks.

However on my HA there is no velop_nodes folder in my www folder. Is that supposed to be created during setup in HACS? Or do I manually need to upload it there? If the later where can I get the images?

You'll need to create the folder. I just used images that I found using a search engine.

I would like to make that a tad smaller. I found where to change the color in the code but I could not find the part where I can set the icon size. Can you point me to that?

You should be able to look at the documentation for the button-card to look at options that the card offers.


owner-email is not filled out when using private Redmine project

Importing emails as tickets into a private Redmine projects leads to the 'owner-email' custom field not being filled out.
As far as I understand, there is a check if the system user 'Anonymous' has the permission 'treat_user_as_supportclient' in that project. The user 'Anonymous' doesn't seem to have this in a private project:
Private project:
> User.anonymous.roles_for_project(Project.find_by_identifier('kaazootest'))
  AnonymousUser Load (0.4ms)  SELECT `users`.* FROM `users` WHERE `users`.`type` IN ('AnonymousUser') LIMIT 1
  Project Load (0.2ms)  SELECT `projects`.* FROM `projects` WHERE `projects`.`identifier` = 'kaazootest' LIMIT 1
 => []

Public project:
> User.anonymous.roles_for_project(Project.find_by_identifier('kaazootest'))
  AnonymousUser Load (0.5ms)  SELECT `users`.* FROM `users` WHERE `users`.`type` IN ('AnonymousUser') LIMIT 1
  Project Load (0.2ms)  SELECT `projects`.* FROM `projects` WHERE `projects`.`identifier` = 'kaazootest' LIMIT 1
  Role Load (0.6ms)  SELECT `roles`.* FROM `roles` WHERE `roles`.`builtin` = 2 LIMIT 1
  Member Load (0.3ms)  SELECT `members`.* FROM `members` WHERE `members`.`project_id` = 273 AND `members`.`user_id` IN (216, 217)
 => [#<Role id: 2, name: "Anonymous", position: 2, assignable: true, builtin: 2, permissions: [:view_calendar, :view_documents, :view_files, :view_gantt, :view_issues, :add_issues, :treat_user_as_supportclient, :browse_repository, :view_changesets, :view_time_entries, :view_wiki_pages, :view_wiki_edits], issues_visibility: "default">]

This has worked before when we used a private project with an older version of Redmine and an older version of this plugin.

Please check (search) closed issues before creating new ones: #75


{AKS} Remove deprecated code

Related command

Description

Remove v1 decorator.
Fix model imports in custom.py.
Sort out imports and remove useless code.
Mark deprecation for several files.

Testing Guide

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change
[Component Name 2] az command b: Add some customer-facing feature

This checklist is used to make sure that common guidelines for a pull request are followed.

[ ] The PR title and description has followed the guideline in Submitting Pull Requests.

[ ] I adhere to the Command Guidelines.

[ ] I adhere to the Error Handling Guidelines.

AKS


Silhouette score on leiden/louvain returning -1 or NaN

I am using a similar code as in #222. In particular I want to compute the silhouette score after executing the leiden algorithm (similar results also using louvain):
> from sklearn.metrics import silhouette_score

> res_array = [.05] + list(np.linspace(.1, 1.6, 16))
> res_array = [round(r, 2) for r in res_array]

> for res in res_array:
>    sc.tl.leiden(adata, resolution=res)
>    print(silhouette_score(adata.uns['neighbors']['distances'].todense(),
            adata.obs[f'leiden'],
            metric='precomputed'))

running Leiden clustering
    finished (0:00:00.59) --> found 6 clusters and added
    'leiden', the cluster labels (adata.obs, categorical)
-1.0
running Leiden clustering
    finished (0:00:00.57) --> found 7 clusters and added
    'leiden', the cluster labels (adata.obs, categorical)
-1.0
running Leiden clustering
    finished (0:00:00.38) --> found 8 clusters and added
    'leiden', the cluster labels (adata.obs, categorical)
-1.0
running Leiden clustering
    finished (0:00:00.48) --> found 8 clusters and added
    'leiden', the cluster labels (adata.obs, categorical)
-1.0
running Leiden clustering
    finished (0:00:00.95) --> found 12 clusters and added
    'leiden', the cluster labels (adata.obs, categorical)
nan
running Leiden clustering
    finished (0:00:00.67) --> found 14 clusters and added
    'leiden', the cluster labels (adata.obs, categorical)
nan
running Leiden clustering
    finished (0:00:00.97) --> found 16 clusters and added
    'leiden', the cluster labels (adata.obs, categorical)
-1.0
running Leiden clustering
    finished (0:00:00.67) --> found 16 clusters and added
    'leiden', the cluster labels (adata.obs, categorical)
nan
running Leiden clustering
    finished (0:00:00.85) --> found 18 clusters and added
    'leiden', the cluster labels (adata.obs, categorical)
nan
running Leiden clustering
    finished (0:00:00.85) --> found 19 clusters and added
    'leiden', the cluster labels (adata.obs, categorical)
nan
running Leiden clustering
    finished (0:00:01.05) --> found 19 clusters and added
    'leiden', the cluster labels (adata.obs, categorical)
nan
running Leiden clustering
    finished (0:00:00.77) --> found 19 clusters and added
    'leiden', the cluster labels (adata.obs, categorical)
nan
running Leiden clustering
    finished (0:00:00.89) --> found 19 clusters and added
    'leiden', the cluster labels (adata.obs, categorical)
nan
running Leiden clustering
    finished (0:00:00.85) --> found 21 clusters and added
    'leiden', the cluster labels (adata.obs, categorical)
nan
running Leiden clustering
    finished (0:00:00.85) --> found 21 clusters and added
    'leiden', the cluster labels (adata.obs, categorical)
nan
running Leiden clustering
    finished (0:00:01.46) --> found 22 clusters and added
    'leiden', the cluster labels (adata.obs, categorical)
nan
running Leiden clustering
    finished (0:00:01.28) --> found 26 clusters and added
    'leiden', the cluster labels (adata.obs, categorical)
nan

Is this expected with Leiden/Louvain clustering and Silhouette score?

The distance matrix you are passing might not be what sklearn wants: by densifying you'll get many zeros that sklearn probably assumes to be true zeros (it likely expects a dense distance matrix with all values actually be computed).
Simply pass the data matrix X_pca to circumvent this.


[WIP] use second db handle for writes only

change 'user_engine' to a 'WriteSession' instead, so the master db connection is used for writes only

cherry-picked and force updated to set these changes against the current dev branch

updated change summary:

changed user_engine to WriteSession.

made sure sql statements and timing are logged for all engines, and engines are tagged with identifiers.

added eager-loading of roles when fetching users from db via orm.

removed some unnecessary methods -- those used very few times, or some made irrelevant by the eager-loaded roles.

added @default_session provider decorator.

allows a default (and hopefully appropriate) session for the decorated method, which will be used as a context manager if an already open session is not passed instead.

removed individual session context managers from individual User ORM method calls, and replaced them with the @default_session decorator.

i tried to add the 'session' argument to @default_session decorated functions as the last non-defaulted argument, so we didnt need to put 'session=None', but it looks kinda weird and isnt a very standardizing convention.  suggestions for alternatives are welcome.

added session context managers to the admin page implementation, so one session can be used for a whole (single) admin operation.


Proposal for a blog post on how do plugins work

Describe the blog post your would like to write
A blog post on how do plugins in OpenSearch. How are they loaded and what are the limitations...
What is the title of the blog post?
How do plugins work
Who are the authors?
@ashwin-pc for Dashboards.
@owaiskazi19 @saratvemulapalli - for OpenSearch
What is the proposed posting date?
11/29

@stockholmux not really. With the work we are doing for 2.0, we have been learning how things work and wanted to put out the learnings for the community.

Ok Sounds good - we might have some other blog posts that will want this timeline, but I'm flexible

@saratvemulapalli How's this coming?

@stockholmux the content is almost ready.
I'll move this up to Wednesday 11/24 if thats works for you.

@saratvemulapalli That's fine but I don't think you'll get many eyeballs. In the US, Turkey will be on folk's mind by that point.

@stockholmux Is there a better date that you suggest?

@stockholmux makes sense. We'll have the PR out for OpenSearch (while @ashwin-pc is working on another one for Dashboards).
I'll move the date to Monday 11/29 if thats the best time to publish it.

closed by #546

@stockholmux we should keep this open as @ashwin-pc is working on the second piece of the blog post for Dashboards.
It's up to you if you'd like this to be a different issue.

I have a general question here. Don't you prefer to have this blog post content be added as official documentation for Open Search? I couldn't find under Open Search any documentation for how the Plugin system works.

@asafm if you think that helps we would be more happy to publish the content in our documentation.
Do you mind opening an issue in https://github.com/opensearch-project/documentation-website?

@saratvemulapalli https://github.com/opensearch-project/documentation-website/issues/426 Thanks!


Fails Inelegantly When Opening Trade Not Found

This worked just fine for my personal taxable account, but failing to find an opening trade caused an ugly error and dump.
Traceback (most recent call last):
  File "C:\Users\DailyUse\anaconda3\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\DailyUse\anaconda3\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\DailyUse\anaconda3\Scripts\tw.exe\__main__.py", line 7, in <module>
  File "C:\Users\DailyUse\anaconda3\lib\site-packages\src\app.py", line 28, in main
    app(_anyio_backend='asyncio')
  File "C:\Users\DailyUse\anaconda3\lib\site-packages\asyncclick\core.py", line 1159, in __call__
    return anyio.run(self._main, main, args, kwargs, **({"backend":_anyio_backend} if _anyio_backend is not None else {}))
  File "C:\Users\DailyUse\anaconda3\lib\site-packages\anyio\_core\_eventloop.py", line 56, in run
    return asynclib.run(func, *args, **backend_options)  # type: ignore
  File "C:\Users\DailyUse\anaconda3\lib\site-packages\anyio\_backends\_asyncio.py", line 230, in run
    return native_run(wrapper(), debug=debug)
  File "C:\Users\DailyUse\anaconda3\lib\asyncio\runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "C:\Users\DailyUse\anaconda3\lib\asyncio\base_events.py", line 616, in run_until_complete
    return future.result()
  File "C:\Users\DailyUse\anaconda3\lib\site-packages\anyio\_backends\_asyncio.py", line 225, in wrapper
    return await func(*args)
  File "C:\Users\DailyUse\anaconda3\lib\site-packages\asyncclick\core.py", line 1162, in _main
    return await main(*args, **kwargs)
  File "C:\Users\DailyUse\anaconda3\lib\site-packages\asyncclick\core.py", line 1083, in main
    rv = await self.invoke(ctx)
  File "C:\Users\DailyUse\anaconda3\lib\site-packages\asyncclick\core.py", line 1693, in invoke
    return await _process_result(await sub_ctx.command.invoke(sub_ctx))
  File "C:\Users\DailyUse\anaconda3\lib\site-packages\asyncclick\core.py", line 1429, in invoke
    return await ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\DailyUse\anaconda3\lib\site-packages\asyncclick\core.py", line 783, in invoke
    rv = await rv
  File "C:\Users\DailyUse\anaconda3\lib\site-packages\src\plot\commands.py", line 43, in plot
    pf = Portfolio(petl.data(table), net_liq=netliq)
  File "C:\Users\DailyUse\anaconda3\lib\site-packages\src\plot\plot.py", line 61, in __init__
    self._calculate()
  File "C:\Users\DailyUse\anaconda3\lib\site-packages\src\plot\plot.py", line 232, in _calculate
    raise TastyworksCLIError(f'Closing trade present but opening trade missing for trade:\n{t}')
src.utils.TastyworksCLIError: Closing trade present but opening trade missing for trade:
2017-05-19: VNQ x5.0 at $409.8

@Graeme22

Thanks for posting. Let me take a look.

Would you be willing to send me your transaction history CSV?

You could just send me the VNQ related rows, perhaps.

Okay, so this looks like I had a few shares in an ACAT transfer. It's a pretty edge case, but there might need to be some kind of handling for it as the script would be otherwise never usable for that account.

Could I get the CSV from tastyworks? That has the transactions formatted the same way as the API.

Good to know what the source of the problem is though.

Yes, I agree completely. I would have provided that, but I'm not sure how that's done. I didn't see a link on the TastyWorks.com website.

Afaik you have to use the client. Go to transactions > choose custom date range >  enter date before creation of the account > scroll to bottom to load all transactions. Then click CSV to export.

Here you go, my apologies for not finding this sooner.
NOTE: Had to rename it to .txt because GitHub doesn't support .csv as an extension.
tastyworks_transactions_x9999_2015-08-01_2021-08-05.txt

Ok I think I know what it is. What date did you open your account? My guess is this line from plot/commands.py doesn't fetch all the transactions because the ACAT dates some of them before the creation of your account:
history = await acc.get_history(sesh, params={
    'start-date': start_date.isoformat() + 'Z',
    'end-date': datetime.now().isoformat() + 'Z',
})

Specifically, the entry of 2017/04/18 may be before that creation date.

I don't actually know when I transferred the account, but it was somewhere around that time. But, there isn't an entry for the actual transfer/opening of the account in the CSV. I moved the dates back to 2015 which is definitely before the acct opening and there aren't any other entries than what I've provided.
There might need to be some provision to provide a cost basis and/or just disclude certain entries in the calculation. It may even be a nice feature to simply have the user select a start/end date for the charting. But, YMMV.

What I really want to do is just fetch ALL transactions, regardless of date. Custom date range can't be done because closing trades could occur without an opening trade present. The plotting method basically plays back all transactions and figures out when profits/losses are realized, which requires the entire transaction history.
I'll leave this open until I find a solution for that. This sounds like an edge case assuming the problem is what I'm guessing. I'll let you know if I come up with something so we can verify it does actually solve the problem.

@GenusGeoff could you see if it works with the current main branch?

Closing as stale, please reopen if the issue persists.


Implement client upgradability feature for Tendermint client in Cairo

Namely implemeting the upgrade handler under the ICS07TendermintComponent.

Note that we probably won't integrate this on the relayer and test in the near future. So this may be defered.


Create Landing Page

[x] Use design ideas created during summer to create a landing/homepage for the app.
[ ] Fix Link functionality.
[ ] Get text for landing page message. Ask Renuka.
[ ] Discuss create account area on landing page with team.

waiting for response from Renuka about what we want the page to say.

The remaining open tasks are blocked by Issue 106

This task is being handled by Evon Tech at the request of sponspor. Will assist but yet unsure of role.


Installation instructions for minima 3

Right now the README documentation is very weird because although most people are probably using Minima 2, the documentation explains mostly how to use Minima 3, but it also only shows how to install the Minima 2 theme using the gem 🤔. It would be nice to have installation instructions for both Minima 2 and 3, an explanation between the (small, albeit relevant) differences between both differences including the distribution method (Minima 3 is only available through GitHub AFAIK).
TLDR
Add to the README this line:
gem "minima", github: "jekyll/minima"

I'll fork minima this week and create a PR for these changes if no one does it before that.

Also, it would be cool to have the gem updated to v3, but I guess this isn't happening lol.

@DoodlesEpic what would it take for the gem to be updated to v3?

Unfortunately the suggested gem "minima", github: "jekyll/minima" doesn't appear to work, at least not in my particular case.  After relaxing various gemfile constraints and trying bundle install I get a tangle of dependency issues:
Resolving dependencies...
Could not find compatible versions

    Because jekyll >= 3.9.0, < 4.0.0.pre.alpha1 depends on kramdown >= 1.17, < 3
      and jekyll >= 3.6.0.pre.beta1, < 3.9.0 depends on kramdown ~> 1.14,
      jekyll >= 3.6.0.pre.beta1, < 4.0.0.pre.alpha1 requires kramdown >= 1.14, < 3.
    And because jekyll >= 4.0.0.pre.alpha1, < 4.2.0 depends on kramdown ~> 2.1
      and jekyll >= 2.0.0, < 3.6.0.pre.beta1 depends on kramdown ~> 1.3,
      jekyll >= 2.0.0, < 4.2.0 requires kramdown >= 1.3, < 3.
(1) Because github-pages >= 9, < 14 depends on kramdown = 1.2.0
      and github-pages < 9 depends on kramdown = 1.0.2,
      github-pages < 14 requires kramdown = 1.0.2 OR = 1.2.0.
    Thus, jekyll >= 2.0.0, < 4.2.0 is incompatible with github-pages < 14.
(2) So, because github-pages >= 203 depends on minima = 2.5.1,
      jekyll >= 2.0.0, < 4.2.0 requires minima = 2.5.1.

    Because github-pages >= 135, < 178 depends on minima = 2.1.1
      and github-pages >= 44, < 147 depends on liquid = 3.0.6,
      github-pages >= 44, < 178 requires minima = 2.1.1 or liquid = 3.0.6.
(3) So, because github-pages >= 28, < 44 depends on jekyll = 2.4.0,
      github-pages >= 28, < 178 requires minima = 2.1.1 or liquid = 3.0.6 or jekyll = 2.4.0.

(4) Because github-pages >= 14, < 32 depends on kramdown = 1.3.1
      and github-pages < 14 requires kramdown = 1.0.2 OR = 1.2.0 (1),
      github-pages < 32 requires kramdown = 1.0.2 OR = 1.2.0 OR = 1.3.1.
    And because github-pages >= 28, < 178 requires minima = 2.1.1 or liquid = 3.0.6 or jekyll = 2.4.0 (3),
      github-pages < 178 requires minima = 2.1.1 or liquid = 3.0.6 or jekyll = 2.4.0 or kramdown = 1.0.2 OR = 1.2.0 OR = 1.3.1.
    And because github-pages >= 178 depends on jekyll-sass-converter = 1.5.2
      and jekyll >= 4.3.0 depends on jekyll-sass-converter >= 2.0, < 4.0,
      jekyll >= 4.3.0 requires minima = 2.1.1 or liquid = 3.0.6 or kramdown = 1.0.2 OR = 1.2.0 OR = 1.3.1.
    And because jekyll >= 4.3.0 depends on kramdown >= 2.3.1, < 3.A
      and jekyll >= 3.5.0 depends on liquid ~> 4.0,
      jekyll >= 4.3.0 requires minima = 2.1.1.
    And because jekyll >= 2.0.0, < 4.2.0 requires minima = 2.5.1 (2),
      jekyll >= 2.0.0, < 4.2.0 OR >= 4.3.0 requires minima = 2.1.1 OR = 2.5.1.
(5) So, because minima = 2.1.1 OR = 2.5.1 could not be found in https://github.com/jekyll/minima.git (at master@8537486)
      and every version of minima depends on jekyll >= 3.5, < 5.0,
      every version of minima requires jekyll >= 4.2.0, < 4.3.0.

    Because github-pages >= 29 depends on terminal-table ~> 1.4
      and github-pages < 32 requires kramdown = 1.0.2 OR = 1.2.0 OR = 1.3.1 (4),
      either kramdown = 1.0.2 OR = 1.2.0 OR = 1.3.1 or terminal-table ~> 1.4.
    And because jekyll >= 4.2.0, < 4.3.0 depends on kramdown ~> 2.3
      and jekyll >= 4.2.0, < 4.3.0 depends on terminal-table ~> 2.0,
      jekyll >= 4.2.0, < 4.3.0 cannot be used.
    And because every version of minima requires jekyll >= 4.2.0, < 4.3.0 (5),
      minima cannot be used.
    So, because Gemfile depends on minima >= 0,
      version solving has failed.

note the snippet
    And because jekyll >= 2.0.0, < 4.2.0 requires minima = 2.5.1 (2),
      jekyll >= 2.0.0, < 4.2.0 OR >= 4.3.0 requires minima = 2.1.1 OR = 2.5.1.

I ran into the same problem

I am also having the problem that @jzohrab and @ethan-dowler had. Has anyone found a solution?

The recommended solution for those who are using Jekyll 3.x is to connect with the repository via the jekyll-remote-theme plugin.
# _config.yml

plugins:
  # existing plugins
  - xyz
  # add remote-theme plugin
  - jekyll-remote-theme

# Use remote-theme plugin to load `minima` repository. But first, ensure the `theme` key is disabled.
# theme: minima
remote_theme: "jekyll/minima"

[! NOTE]
If you're not using the github-pages gem, then you will have to explicitly list the jekyll-remote-theme gem in your Gemfile.*

[! WARNING]
jekyll/minima:master is under active development and considered unstable. Future changes may break existing builds.
To ensure stable builds, use a commit SHA to configure remote_theme key.
e.g. remote_theme: jekyll/minima@1234567

🤦 I was setting remote-theme instead of remote_theme. There goes a few hours of my life I won't get back...


[1.3]update to update pb3.14

Checklist before submitting

[ ] Did you read the contributor guide?
[ ] Did you update any affected documentation?
[x] Did you write any tests to validate this change?

Description
Update TensorFlow text to use protobuf 3.14 which we are standardizing on for Open-CE 1.3.x
Review process to land

All tests and other checks must succeed.
At least one maintainer must review and approve.
If any  maintainer requests changes, they must be addressed.

https://github.com/open-ce/open-ce/issues/445


EXCEPTION: HTTPConnectionPool

EXCEPTION: HTTPConnectionPool(host='subdomain.target.com', port=80): Max retries exceeded with url: /?v=%24%7B%24%7B%3A%3A-j%7Dndi%3Armi%3A%2F%2Fchat1.indiamart.com.e15k45j9m8164k91k1i9477h821c680ve.interact.sh%2Fs2lowg2%7D (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f2a00d59fd0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))

It seems that you're not able to connect that host, or maybe their WAF is blocking your request.

it's not possible that every domain us blocking your requests


Add support for linked modules

Like imported modules, linked modules can be added by any crate with the wasm_bindgen::link_to! macro and the existing module, raw_module or inline_js attributes. In contrast to imported modules, no imports are added to the JS shim generated by wasm-bindgen. Instead, the macro expands to an expression of type String that contains a link. This link may be relative and is suitable for creating workers or worklets, or dynamic imports.
Internally, the macro invocation wasm_bindgen::link_to!(module = "/src/task/worker.js") expands to code like (simplified):
{
	pub static _GENERATED: [u8; …] = …; // Program in custom section
	extern "C" {
		fn __wbindgen_link_9fdd114fc6bc2308() -> String; // link function
	}
	__wbindgen_link_9fdd114fc6bc2308()
}

This link function is implemented in the JS shim:
    imports.wbg.__wbindgen_link_9fdd114fc6bc2308 = function(arg0) {
        const ret = new URL('snippets/wasm-bindgen-futures-b12f15e5e844bdeb/src/task/worker.js', import.meta.url).toString();
        …
    };

The main reason for this approach is that it works both without bundlers and with bundlers (like webpack >= 5) that detect the new URL(…, import.meta.url) syntax, bundle and minify the linked file, and change the link. Depending on the target, the correct alternative for import.meta.url is used.
This is a useful part of #3034. In contrast to #3034, importing the JS shim is not supported, so this PR can only be used for pure JS workers or worklets (not considering workarounds).
Fixes #2335 (Just create a script element or dynamically import your linked module before using JS classes from Rust)

Apologies but I personally do not have the time to adequately review new major features like this. Others may be able to but I will be unable to provide review or issue support for this if it lands.

Requesting my own review so I don't forget. This is something I've experimented with and can be very useful when it comes to lazy loading modules

I needed to rebase because of #3073. Because the link_to! macro is new, strict attribute checking can be enabled without breaking change.

I switched to always absolute URLs so chdir or history.replaceState don't break the links. I added documentation, tests, all specific suggestions, and a fix for inline_js (covered by the tests).

I don't really think that link_to! should inherit the same way of specifying modules as #[wasm_bindgen], because some of the options don't really make sense - e.g., I don't think wasm_bindgen::link_to!(raw_module = "foo") makes much sense.
As currently implemented, that would return the URL of a file named foo in the directory of the wasm-bindgen glue code, which doesn't seem like something you'd ever want to do.
An alternate way for it to work would be for it to return "foo" untouched, so that importing the URL would result in import("foo"), but that isn't really an actual URL and wouldn't work when passed to a Worker, which is the main purpose of this API. Also, you may as well skip link_to! and write "foo" directly.
So, I think there should be two ways of using the API:

wasm_bindgen::link_to!(inline_js = "...") (same as current version)
wasm_bindgen::link_to!("./foo.js"), which expands to wasm_bindgen::link_to!(inline_js = include_str!("./foo.js"))`

Note that you might need to use a macro_rules! wrapper over a private proc macro to accomplish the second one, since include_str! resolves relative to the current source file and I don't believe there's any way to do that from within a proc macro.

I don't think wasm_bindgen::link_to!(raw_module = "foo") makes much sense. As currently implemented, that would return the URL of a file named foo in the directory of the wasm-bindgen glue code, which doesn't seem like something you'd ever want to do.

Relative paths (./, ../) and absolute paths in both module and raw_module attributes are consistently handled like imported modules, regardless of using webpack or not. For module paths (not starting with ./, ../, /) it is slightly more complex.
Webpack implements module resolution on new URL('…', import.meta.url) as a fallback. So it would return a link to the .-export of package foo if the file foo does not exist. Browsers would also pick up the file if it exists and fail otherwise (failure is the correct outcome if you forgot to run the bundler). I think this ambiguity is acceptable in contrast to not supporting module paths at all. Most likely, file extensions are used to disambiguate between modules (and their exports) and files.
However, this functionality (for imported and for linked modules) is also be usable with just the module attribute. I think the raw_module attribute was introduced precisely to allow paths relative to the output glue code, so users can supply their own scripts. I can't see another use case for the existing raw_module attribute. If this is supported in imported modules, it should also be supported in linked modules for consistency.

So, I think there should be two ways of using the API:

I would not like a syntax that sometimes uses attribute names (for inline_js) and sometimes does not (for file names). Also, I can't see how your proposal with a macro_rules! wrapper would work. The proc macro would receive a token stream literally containing include_str!("…"), which it cannot process without eager expansion, which proc macros cannot do. Also, I like that file names of linked JS modules are also used for the output snippets (useful for debugging). File names would be lost when expanding to inline_js.

It would be okay to disallow some cases by compile_error! in this PR first, so they can be discussed and maybe allowed later. However, all existing options are reasonable (at least as reasonable as in #[wasm_bindgen]) and do work, so they should be expressible in the link_to! API. Therefore, we shouldn't treat "foo" as "./foo" for example.

It can be argued that module paths in link_to! may lead to surprising behavior because they only do module resolution as a fallback if the file does not exist. Therefore, I disallowed module paths to get this PR merged quickly. A future PR can allow them without breaking change (or even interpret them as relative paths instead).

@Liamolucko, as this PR seems to be stalled again, would you merge it if only the inline_js attribute was allowed? (There, we proposed exactly the same syntax.)

@Liamolucko, as this PR seems to be stalled again, would you merge it if only the inline_js attribute was allowed? (There, we proposed exactly the same syntax.)

Oh, sorry, this had just completely slipped my mind; that wasn't the problem.
I didn't realise that Webpack supported resolving packages with new URL(...); I thought it just behaved the same as it would un-bundled and used it as a purely as a hint to include the referenced files. Knowing that, module paths make more sense, although I think it still makes sense to leave them to a follow-up to work out the specifics (e.g. should resolving packages work in Node too?)
So, in light of that, I think the design of the macro is fine as-is. I'll just take another look at the code before merging this.

@Liamolucko, do you have any other concerns?

@Liamolucko, do you have any other concerns?

Yeah - I'm a bit concerned that this won't work with any bundlers other than Webpack. I don't want people who are using esbuild, rollup, etc. to have their code suddenly stop working in browsers other than Chrome because wasm-bindgen-futures switched to using this for its Atomics.waitAsync polyfill. There isn't any way that I'm aware of to get this to work universally, though.
I suppose a compromise could be to disable it in wasm-bindgen-futures by default, and then make it clear in the docs for link_to! that you might need to manually configure your bundler to include the linked modules, and then people who specifically choose to use it can do that.

Other bundlers are a valid concern. Luckily, it can be solved at bindgen time, because the generated JS import code can choose to return a data URI. It took me some time though to figure out embedding the content in AuxImport::LinkTo is a lot nicer than trying to pass WasmBindgenAux to the import code generator. Compared to compile time approaches, this prevents a dependency to set the feature unexpectedly. Also, this guarantees a consistent link-or-embed behavior and allows to display explanatory text if links are needed. Alternatively, links could be allowed automatically if embedding is impossible (maybe displaying a hint).
@Liamolucko, I'm sorry for the delay. Do you accept this approach? If so, I'll have to add tests with embedding probably. Is there anything else missing (I don't think so)?

@Liamolucko, I have overlooked the other suggestion. It is committed now.


Unexpected end of stream

Hi,
First I want to thanks you for providing this library.
Our server is setup to use SPDY but anytime I try to call a webservice, I got an error.
Logs are :
SPDY [WARNING] loaded DEBUG build of SPDY framework
SPDY [INFO] register origin: <SPDYOrigin: 0xc488c70>
SPDY [DEBUG] origin registered: <SPDYOrigin: 0xc488c70>
SPDY [INFO] start loading https://XXXXXXXX/sts/SecurityTokenService/UT
SPDY [INFO] session connecting to <SPDYOrigin: 0xc7b1910>
SPDY [DEBUG] session using TLS
SPDY [DEBUG] sent client SETTINGS
SPDY [DEBUG] sent WINDOW_UPDATE.0 (+10420224)
SPDY [DEBUG] sent SYN_STREAM.1
SPDY [DEBUG] sent DATA.1! (1161)
SPDY [DEBUG] socket connected to XXXXXXX
SPDY [DEBUG] socket read[0] (173)
SPDY [DEBUG] received DATA.1013478509 (165)
SPDY [DEBUG] sent RST_STREAM.1013478509
SPDY [DEBUG] socket scheduling read[1] (0:0)
SPDY [WARNING] session connection error: Error Domain=SPDYSocketErrorDomain Code=6 "Unexpected end of stream." UserInfo=0xc79eb40 {NSLocalizedDescription=Unexpected end of stream.}
SPDY [INFO] session connection closed
SPDY [INFO] stop loading https://XXXXXXXX/sts/SecurityTokenService/UT
Do you have any idea of the reason or causes of this problem.
Thanks in advance.

I have just same issue. Is it client or server side issue?
Is it possible to debug?


Push new Release to CocoaPods

Cocoapods is still pointing to > KCSelectionDialog 0.1.3

I'm sorry too late.


Temporary fix on line numbers not showing up properly

The line numbers were not showing up as expected when double or triple digits were reached, the simplest method to solve this issue would be to increase the width, however this is only a fix for double digits, as triple digits would require too much spacing and would interfere with the aesthetics. I am not familiar with CSS counters and i would use a counter in javascript instead however i am not sure if this is avoided in the first place for a reason, and this is my first PR so i added a temporary fix by modifying the spacing value from 1rem to 1.1rem to fix the issue up till double digits

Thanks for the PR @Ripwords! Appreciate the report on the bug as well 👍
I think we'll have to adjust the width depending on the font-size as well. I can reproduce this if I go to a larger font size on the PR build:

I didn't realise that the font size affected it as well. Thanks for the feedback!

Ok I've resolved this in https://github.com/stevebauman/showcode/pull/6, thanks again for the report 😄
Let me know if you encounter any further issues ❤