run error

Traceback (most recent call last):
File "generate.py", line 153, in
main()
File "generate.py", line 142, in main
models = build_or_load()
File "/data/python/DeepJ-icsc/util.py", line 15, in build_or_load
models = build_models()
File "/data/python/DeepJ-icsc/model.py", line 149, in build_models
notes_out = naxis(time_out, chosen, style)
File "/data/python/DeepJ-icsc/model.py", line 111, in f
dense_layer_cache[l] = Dense(int(x.get_shape()[3]))
TypeError: int returned non-int (type NoneType)
run generate.py in CentOS 7.2, tensorflow cpu mode, python 3.5

See https://github.com/calclavia/DeepJ/issues/61


balance a explosive payload craft

A grenade that costs 4 TK is too easy to make. I fixed it.

About the PR

Media

[X] I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Changelog

:cl:

tweak: Balanced a explosive payload craft

Isn't it strange to add silver to a explosive?

Isn't it strange to add silver to a explosive?

for chemical explosion reaction


License

I know it's kind of silly for something as small and intuitive as Stack, but Tim, would you mind putting a license on this?

Sorry to bump, but I would still love a license in this repo.

@creationix  Anything I can do to help with this?

This was added over 4 years ago.  Are you needing something else?
https://github.com/creationix/stack/blob/master/LICENSE

Oops! I think my issue is that the licensed version wasn't posted to npm, so when I npm install it complains that the repo doesn't have a license. If you feel like it and have free time, it would be great to have the license reflected in the npm registry (link), but if you don't then no worries, I can ignore the warning.


After upgrading vnc:chrome_79.0 to 81 or 83, browser container does not start

Good day,
recently, I have started using Selenoid.
However, when upgrading from vnc:chrome_79.0 to vnc:chrome_81.0 or vnc:chrome_83.0, the browser container starts, but browser inside fails. Logs from browser's container obtained with docker logs ...
[1591951406.697][INFO]: Launching chrome: /usr/bin/google-chrome --disable-background-networking --disable-client-side-phishing-detection --disable-default-apps --disable-hang-monitor --disable-infobars --disable-popup-blocking --disable-prompt-on-repost --disable-sync --enable-automation --enable-blink-features=ShadowDOMV0 --enable-logging --load-extension=/tmp/.com.google.Chrome.H28pC7/internal --log-level=0 --no-first-run --password-store=basic --remote-debugging-port=0 --start-fullscreen --test-type --use-mock-keychain --user-data-dir=/tmp/.com.google.Chrome.uZWQb3 data:,
 --- x11vnc loop: waiting for: 109

PORT=5900
[0612/084327.629108:ERROR:nacl_helper_linux.cc(308)] NaCl helper process running without a sandbox!
Most likely you need to configure your SUID sandbox correctly
[1591951407.665][INFO]: [f962b411e957c7515016df476a1b5f3f] RESPONSE InitSession ERROR unknown error: Chrome failed to start: crashed.
  (unknown error: DevToolsActivePort file doesn't exist)
  (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)

Operating system: Oracle Linux Server release 7.7
Kernel: 4.14.35-1902.8.4.el7uek.x86_64
Docker: 19.03.1-ol, build ead9442
Selenoid: 1.10.0 (wihtout CM, images are pulled by Docker)
GGR: 1.6.7
GGR UI: 1.1.2
Selenoid UI: 1.10.0

I have found following SO question https://stackoverflow.com/questions/47269579/nacl-helper-process-running-without-a-sandbox-error-when-running-npm-tests however I am not sure how to supply additional parameters to browser container provided by Selenium. There is also this issue about similar problem with some solution recommendations https://github.com/zalando/zalenium/issues/861
Any help is appreciated!

@CuriousOpossum e.g. in webdriver.io you could provide Chrome flags as shown here:
 capabilities: [{
        browserName: 'chrome',
        'goog:chromeOptions': {
            args: ['--no-sandbox'],
        }
    }]

Thank you, I was able to pass these arguments to Chrome WebDriver:

--no-sandbox
--disable-setuid-sandbox

However, event with the new arguments, the browser in container still fails.
Log from browser container:
Waiting X server...
2020/06/15 14:33:05 [INIT] [Listening on :7070]
Waiting X server...
Logging to: /home/selenium/fluxbox.log
Waiting X server...
Waiting X server...
Waiting X server...
Waiting X server...
Waiting X server...
Waiting X server...
Starting ChromeDriver 83.0.4103.39 (ccbf011cb2d2b19b506d844400483861342c20cd-refs/branch-heads/4103@{#416}) on port 4444
All remote connections are allowed. Use a whitelist instead!
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.

 --- x11vnc loop: 1 ---

[1592231586.598][INFO]: [3d52f0f47a0d081f9050a151f624deb6] COMMAND InitSession {
   "capabilities": {
      "firstMatch": [ {
         "browserName": "chrome",
         "goog:chromeOptions": {
            "args": [ "test-type", "disable-infobars", "no-sandbox", "disable-setuid-sandbox", "start-fullscreen" ],
            "extensions": [  ],
            "w3c": false
         },
         "unhandledPromptBehavior": "accept"
      } ]
   },
   "desiredCapabilities": {
      "browserName": "chrome",
      "enableVNC": true,
      "goog:chromeOptions": {
         "args": [ "test-type", "disable-infobars", "no-sandbox", "disable-setuid-sandbox", "start-fullscreen" ],
         "extensions": [  ],
         "w3c": false
      },
      "loggingPrefs": {
         "browser": "ALL"
      },
      "name": "ActivitiesPageTest.testResetRecurringColumns",
      "screenResolution": "2910x1100x8",
      "unexpectedAlertBehaviour": "accept",
      "unhandledPromptBehavior": "accept",
      "version": "83.0"
   }
}
[1592231586.600][INFO]: Populating Preferences file: {
   "alternate_error_pages": {
      "enabled": false
   },
   "autofill": {
      "enabled": false
   },
   "browser": {
      "check_default_browser": false
   },
   "distribution": {
      "import_bookmarks": false,
      "import_history": false,
      "import_search_engine": false,
      "make_chrome_default_for_user": false,
      "skip_first_run_ui": true
   },
   "dns_prefetching": {
      "enabled": false
   },
   "profile": {
      "content_settings": {
         "pattern_pairs": {
            "https://*,*": {
               "media-stream": {
                  "audio": "Default",
                  "video": "Default"
               }
            }
         }
      },
      "default_content_setting_values": {
         "geolocation": 1
      },
      "default_content_settings": {
         "geolocation": 1,
         "mouselock": 1,
         "notifications": 1,
         "popups": 1,
         "ppapi-broker": 1
      },
      "password_manager_enabled": false
   },
   "safebrowsing": {
      "enabled": false
   },
   "search": {
      "suggest_enabled": false
   },
   "translate": {
      "enabled": false
   }
}
[1592231586.600][INFO]: Populating Local State file: {
   "background_mode": {
      "enabled": false
   },
   "ssl": {
      "rev_checking": {
         "enabled": false
      }
   }
}
[1592231586.602][INFO]: Launching chrome: /usr/bin/google-chrome --disable-background-networking --disable-client-side-phishing-detection --disable-default-apps --disable-hang-monitor --disable-infobars --disable-popup-blocking --disable-prompt-on-repost --disable-setuid-sandbox --disable-sync --enable-automation --enable-blink-features=ShadowDOMV0 --enable-logging --load-extension=/tmp/.com.google.Chrome.000SSo/internal --log-level=0 --no-first-run --no-sandbox --password-store=basic --remote-debugging-port=0 --start-fullscreen --test-type --use-mock-keychain --user-data-dir=/tmp/.com.google.Chrome.LwmPL8 data:,
 --- x11vnc loop: waiting for: 105

PORT=5900
[0615/143307.440869:ERROR:nacl_helper_linux.cc(308)] NaCl helper process running without a sandbox!
Most likely you need to configure your SUID sandbox correctly
[0615/143307.441728:ERROR:nacl_helper_linux.cc(308)] NaCl helper process running without a sandbox!
Most likely you need to configure your SUID sandbox correctly
[1592231587.476][INFO]: [3d52f0f47a0d081f9050a151f624deb6] RESPONSE InitSession ERROR unknown error: Chrome failed to start: crashed.
  (unknown error: DevToolsActivePort file doesn't exist)
  (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
[1592231587.476][DEBUG]: Log type 'driver' lost 0 entries on destruction
[1592231587.476][DEBUG]: Log type 'browser' lost 0 entries on destruction

The posts above mention that the problem might be related to /dev/shm not being mounted, however, that is done on the machine running the Docker.
When doing docker inspect ... for the browser container, there seems to be SHM set as well:
“ShmSize”: 268435456

Any more ideas, please?

@CuriousOpossum I would take a look at browser error message in VNC.

@vania-pooh With the problematic Chrome versions, there is always squared logo with Selenoid icon in VNC, meaning there is no graphical output. :-(
However, when trying to figure out what is wrong, the parameter --headless seems to prevent the crash.
As a workaround, that is sufficient, however the VNC functionality is very nice (and is not available when running with --headless, of course).
How is graphical stack done in Selenoid?
Maybe it is necessary to be part of some group in order to have graphical output?
Has anything related changed in Chrome image since version 79?

@CuriousOpossum Chrome requires --privileged to start (Selenoid adds that by default). Nothing special. Could also be SELinux issue. Will it work with SELinux disabled?

@vania-pooh Thank you for suggestions.
SELinux was in permissive mode. When runnign with SELinux disabled, there is no change. :(
The --privileged parameter does not seem to be present in the command from Docker logs. When checking sources of selenoid-images, it seems it is added for Android images only.
Tried adding it manually to arguments when requesting WebDriver, however the browser still fails.
Waiting X server...
2020/06/17 05:38:02 [INIT] [Listening on :7070]
Logging to: /home/selenium/fluxbox.log
Waiting X server...
Waiting X server...
Waiting X server...
Waiting X server...
Waiting X server...
Waiting X server...
Waiting X server...
Starting ChromeDriver 83.0.4103.39 (ccbf011cb2d2b19b506d844400483861342c20cd-refs/branch-heads/4103@{#416}) on port 4444
All remote connections are allowed. Use a whitelist instead!
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.

 --- x11vnc loop: 1 ---

ChromeDriver was started successfully.
[1592372283.016][INFO]: [32434b95cd2abf0990ee1f4f1b5f4556] COMMAND InitSession {
   "capabilities": {
      "firstMatch": [ {
         "browserName": "chrome",
         "goog:chromeOptions": {
            "args": [ "test-type", "disable-infobars", "no-sandbox", "disable-setuid-sandbox", "privileged", "start-fullscreen" ],
            "extensions": [  ],
            "w3c": false
         },
         "unhandledPromptBehavior": "accept"
      } ]
   },
   "desiredCapabilities": {
      "browserName": "chrome",
      "enableVNC": true,
      "goog:chromeOptions": {
         "args": [ "test-type", "disable-infobars", "no-sandbox", "disable-setuid-sandbox", "privileged", "start-fullscreen" ],
         "extensions": [  ],
         "w3c": false
      },
      "loggingPrefs": {
         "browser": "ALL"
      },
      "name": "ActivitiesPageTest.testChooseActivitiesColumns",
      "screenResolution": "2910x1100x8",
      "unexpectedAlertBehaviour": "accept",
      "unhandledPromptBehavior": "accept",
      "version": "83.0"
   }
}
[1592372283.017][INFO]: Populating Preferences file: {
   "alternate_error_pages": {
      "enabled": false
   },
   "autofill": {
      "enabled": false
   },
   "browser": {
      "check_default_browser": false
   },
   "distribution": {
      "import_bookmarks": false,
      "import_history": false,
      "import_search_engine": false,
      "make_chrome_default_for_user": false,
      "skip_first_run_ui": true
   },
   "dns_prefetching": {
      "enabled": false
   },
   "profile": {
      "content_settings": {
         "pattern_pairs": {
            "https://*,*": {
               "media-stream": {
                  "audio": "Default",
                  "video": "Default"
               }
            }
         }
      },
      "default_content_setting_values": {
         "geolocation": 1
      },
      "default_content_settings": {
         "geolocation": 1,
         "mouselock": 1,
         "notifications": 1,
         "popups": 1,
         "ppapi-broker": 1
      },
      "password_manager_enabled": false
   },
   "safebrowsing": {
      "enabled": false
   },
   "search": {
      "suggest_enabled": false
   },
   "translate": {
      "enabled": false
   }
}
[1592372283.018][INFO]: Populating Local State file: {
   "background_mode": {
      "enabled": false
   },
   "ssl": {
      "rev_checking": {
         "enabled": false
      }
   }
}
[1592372283.019][INFO]: Launching chrome: /usr/bin/google-chrome --disable-background-networking --disable-client-side-phishing-detection --disable-default-apps --disable-hang-monitor --disable-infobars --disable-popup-blocking --disable-prompt-on-repost --disable-setuid-sandbox --disable-sync --enable-automation --enable-blink-features=ShadowDOMV0 --enable-logging --load-extension=/tmp/.com.google.Chrome.7A0YF3/internal --log-level=0 --no-first-run --no-sandbox --password-store=basic --privileged --remote-debugging-port=0 --start-fullscreen --test-type --use-mock-keychain --user-data-dir=/tmp/.com.google.Chrome.3Vx2bC data:,
 --- x11vnc loop: waiting for: 103

PORT=5900
[0617/053803.840687:ERROR:nacl_helper_linux.cc(308)] NaCl helper process running without a sandbox!
Most likely you need to configure your SUID sandbox correctly
[0617/053803.843923:ERROR:nacl_helper_linux.cc(308)] NaCl helper process running without a sandbox!
Most likely you need to configure your SUID sandbox correctly
[1592372283.870][INFO]: [32434b95cd2abf0990ee1f4f1b5f4556] RESPONSE InitSession ERROR unknown error: Chrome failed to start: crashed.
  (unknown error: DevToolsActivePort file doesn't exist)
  (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
[1592372283.870][DEBUG]: Log type 'driver' lost 0 entries on destruction
[1592372283.870][DEBUG]: Log type 'browser' lost 0 entries on destruction

Would it be possible to export Docker browser images as flat tar file?
Tried doing it, but failed as I am not that familiar with Docker.


Support tab indentation

Asphalt currently only supports spaces which makes my formatter go haywire, would be useful if you could choose to indent with tabs
Additionally, when indenting with spaces, there should be an option to change how many spaces are used per indent

@spectrius I think having formatting options is a rabbit hole we don't want to go into. Consider ignoring Asphalt's generated files with your formatter.
If you're using stylua, you can create a .styluaignore file and add the generated file path to it.


Update the GARD subset in Mondo

This PR updates the GARD subset in Mondo. In particular it:

Adds gard_rare subset declaration
XREFs to GARD terms (with the ORDO/OMIM terms they were sourced from)

The gard_rare subset declaration is in duplicate on many if not all terms where it is added.

I should have deleted the import.. Now I have to wait again for the QC to pass :D


cue trim bug: conjunctions and definitions

What version of CUE are you using (cue version)?

$ cue version
cue version v0.4.0 linux/amd64

Does this issue reproduce with the latest release?
yes, also tested with master
What did you do?
#def2: {
	in2: string
}
#def1: {
	in1: string
	out: #def2 & {
		in2: in1
	}
}
a: #def1 & {
    in1: "test"
}

This is as much as I was able to simplify the bug. There might be a bit more it could be simplified though. Inlining #def1 or #def2 seems to "fix" it.
What did you expect to see?
probably no change
What did you see instead?
  {
      #def2: {
        in2: string
      }
      #def1: {
        in1: string
        out: {
                in2: string
        }
      }
      a: {
          in1: "test"
          out: {
-             in2: "test"
+             in2: string
          }
      }
  }
Aborting trim, output differs after trimming. This is a bug! Use -i to force trim.
You can file a bug here: https://github.com/cuelang/cue/issues/new?assignees=&labels=NeedsInvestigation&template=bug_report.md&title=

This issue has been migrated to https://github.com/cue-lang/cue/issues/1062.
For more details about CUE's migration to a new home, please see https://github.com/cue-lang/cue/issues/1078.


Use /submit_nochat_api for the Text Completion API in the Client

== 5 passed, 108 warnings in 35.72s ==========


⚠ Bofrost.si has degraded performance

In cbbbdcc, Bofrost.si (https://www.bofrost.si) experienced degraded performance:

HTTP code: 200
Response time: 2688 ms

Resolved: Bofrost.si performance has improved in ae024e6 after 4 days, 9 hours, 53 minutes.


Refresh SQ Docs

https://discuss.sonarsource.com/t/dockerhub-description/8190/2

What is SonarQube?

We have Boilerplate guidelines when describing SonarQube we could use, beyond the current 12 word description. It has been added.

How to use this image

Using “Data Center” Edition rather than DataCenter Edition

Docker Host Requirements

Due for an update based on current requirements

Get Started in Two Minutes Guide

We’ve moved towards wording like Try Out SonarQube

First Installation

The "first" installation is usually when they've tried out SonarQube above? This section is where they get serious about installation (and then configuration), so it's been renamed.

Configuration > Database

“Data Center” Edition rather than Datacenter Edition

Configuration > Use volumes

Now that v7.9 LTS is EOL, can we remove reference to the /opt/sonarqube/conf persistent volume
“Data Center” Edition rather than DataCenter Edition

Advanced configuration > Customized Image

Time to bump this example to sonarqube:8.9-community which means removing the /opt/sonarqube/conf/ example and replacing it with another (adding a custom plugin)

Advanced configuration > Avoid hard termination of SonarQube

SonarQube v7.8 was a while ago (and EOL). We now avoid mentioning it and just stick to discussing the hard termination of SonarQube.

@tobias-trabelsi-sonarsource done :)


Karanmohadikar

This Pull Request resolves Issue #11

Hey @karanmohadikar Great Work on the PR. Thanks for contributing :)


:hook: add ruff pre-commit hook

Codecov Report

Merging #91 (27e88e9) into release-candidate (b91adb0) will decrease coverage by 1.56%.
The diff coverage is 87.39%.

@@                  Coverage Diff                  @@
##           release-candidate      #91      +/-   ##
=====================================================
- Coverage             100.00%   98.44%   -1.56%
=====================================================
  Files                     50       45       -5
  Lines                    972      966       -6
=====================================================
- Hits                     972      951      -21
- Misses                     0       15      +15

Files Changed
Coverage Δ

digimon_card_game/banlists/banlist.py
82.14% <37.50%> (-17.86%)
:arrow_down:

...ard_game/extensions/attrs/validators/validators.py
70.83% <41.66%> (-29.17%)
:arrow_down:

digimon_card_game/decks/deckset.py
92.00% <71.42%> (-8.00%)
:arrow_down:

tests/test_deck.py
98.33% <88.88%> (-1.67%)
:arrow_down:

digimon_card_game/cards/digi_egg_card.py
100.00% <100.00%> (ø)

digimon_card_game/cards/digimon_card.py
100.00% <100.00%> (ø)

tests/assertions/__init__.py
100.00% <100.00%> (ø)

tests/assertions/attributes.py
100.00% <100.00%> (ø)

tests/assertions/dictionary.py
100.00% <100.00%> (ø)

tests/assertions/enum.py
100.00% <100.00%> (ø)

... and 13 more


dockerclient: COPY --from should ignore the source's WORKDIR

When COPY is given --from=${stage|image}, the stage's or image's WORKDIR should not be incorporated into the path where we go to look for the source when the source is not specified with an absolute path name.  We previously incorporated the WORKDIR value, but that is not compatible with what docker build does.

LGTM
@flouthoc @umohnani8 @TomSweeneyRedHat @vrothberg PTAL

LGTM

I don't think I can merge here.


chisel

Transmutation Alchemy - Blade recipe overrides Chisel - Chisel recipe.

Modified the trans alchemy blade recipe to require flint. Added mirrored recipes for the blade as well. Chisel will remain unchanged.


Treasurer screen(s) in the DHO

The treasurers manage the cross-chain redemption of HUSD. The treasurers can use a block explorer or daoctl to create and attest to payments, but it would be easier if there was a GUI screen on the web app. The GUI would also create additional reporting and information for users.
Features
View Redemption Requests

Users should be able to view a list of open and close redemption requests.

View Payments

Users should be able to view any payments made on redemption requests, including the ability to link to a Bitcoin block explorer to see the details of a transaction.

Create Payment

Treasurers should be able to create a new payment that has been made on a request
Payment should include:

Amount (in HUSD relative value)
Network where the payment was made (e.g. BTC)
Transaction ID where the payment was made

Attest Payment

Treasurers should be able to review a list of yet-to-be-confirmed payments and attest that they are true (via submitting a transaction)

Here's an example of what payments look like on daoctl:

DO you think we can use the table from the wallet for this screen with additional fields and actions?

@dappdever Can we rename [Create Payment] to something like [redeem payment], it sounds like the treasurer can submit a redemption this way.

The primary view on this table should have the following columns:

Account name (requestor of the redemption)
Amount of the redemption request (in HUSD)
Requested Date
Entered payment amount (these are payments that have been entered but not yet endorsed by 3 treasurers)
Entered payment amount network (e.g. BTC, ETH, EOS)
Entered payment amount transaction ID (doesn't need to be shown as text, but a button to open in another block explorer window)
Treasurer endorsements (small avatars of the treasurers that have endorsed)

The table can be filtered by:

Confirmed (fully endorsed) redemption requests
Partially endorsed redemption requests
Open (not paid) redemption requests

The "Open redemption requests" view should have a button/action for the treasurer to "Enter transaction details".  The treasurer can then specify the amount (default to the amount on the request), the network (select from drop down), and the transaction ID.
The "Partially endorsed redemption requests" should have an action that allows the treasurer to select check boxes of a list of the rows and click "Endorse".  This will add their endorsement to the payment.

I'm missing a few information.
When you talk about the 'Users' do you mean everyone ?
How can I identify the role Treasurer to display the related  information / buttons ?
What are the smartcontract methods related to this task ?
Thanks

@gregory-latinier for identifying which users are treasurers, we can rely on badges. I will need to implement this this week. All users should be able to view the screen, but only treasurers have the actions available.
The list of redemption requests are in the redemptions table of the bank.hypha:
cleos -u https://api.telos.kitchen get table bank.hypha bank.hypha redemptions                                                                                ! master
{
  "rows": [{
      "redemption_id": 0,
      "requestor": "hyphanewyork",
      "amount_requested": "1.00 HUSD",
      "amount_paid": "1.00 HUSD",
      "notes": [],
      "requested_date": "2020-07-01T01:21:36.000",
      "updated_date": "2020-07-01T01:21:36.000"
    },{
      "redemption_id": 1,
      "requestor": "astoryteller",
      "amount_requested": "7000.00 HUSD",
      "amount_paid": "7000.00 HUSD",
      "notes": [],
      "requested_date": "2020-07-01T04:16:37.500",
      "updated_date": "2020-07-01T04:16:37.500"
    },{

Payments are in the payments table of the same contract:
cleos -u https://api.telos.kitchen get table bank.hypha bank.hypha payments                                                                                ! master
{
  "rows": [{
      "payment_id": 0,
      "creator": "hyphanewyork",
      "redemption_id": 0,
      "amount_paid": "1.00 HUSD",
      "created_date": "2020-07-01T14:05:26.500",
      "confirmed_date": "2020-07-29T15:04:56.000",
      "attestations": [{
          "key": "cometogether",
          "value": "2020-07-29T15:04:56.000"
        },{
          "key": "hyphanewyork",
          "value": "2020-07-01T14:05:26.500"
        }
      ],
      "notes": [{
          "key": "network",
          "value": "N/A"
        },{
          "key": "trx_id",
          "value": "test transaction - n/a"
        }
      ]
    },{
      "payment_id": 2,
      "creator": "hyphanewyork",
      "redemption_id": 1,
      "amount_paid": "7000.00 HUSD",
      "created_date": "2020-07-09T13:15:06.000",
      "confirmed_date": "2020-07-29T15:06:28.500",
      "attestations": [{
          "key": "cometogether",
          "value": "2020-07-29T15:06:28.500"
        },{
          "key": "hyphanewyork",
          "value": "2020-07-09T13:15:06.000"
        }
      ],
      "notes": [{
          "key": "memo",
          "value": "send in a couple of transactions in order to test"
        },{
          "key": "network",
          "value": "BTC"
        },{
          "key": "trx_id",
          "value": "6c77cbb970ebd12aaff278101b65ba89d8c79e9577434b2ea028e43bc8ac1a1f"
        }
      ]

@dappdever Here's my proposed UI for the table (with 3 cases as examples) -

@screenius I think we should have an ID (integer) shown.  Each redemption request has a corresponding unique ID (just increments). It could be possible for a member to have two requests of the same amount on the same day, and we have been using the ID# in the memo of the Bitcoin transactions.
I think "SHOW ID" should perhaps be "VIEW TRX". This should open a new window to the transaction on its native network (not exactly sure which block explorers to use, but we will find one for each network and we can link directly to the transaction on that network with the ID).

When a user hovers over one of the treasurer avatars, it should show the name and the timestamp of when they endorsed the payment.

I imagine we can query the list of payments from our known treasuries and try to line them up so treasurers do not have to copy/paste the transaction ID.  For this, we'll have to figure out how to query from the bitpay core server for this (which is what Copay is using). Might need to come in a subsequent release.

Sounds good. I've added a link to the ID as well. Maybe we need a status field or the PAYMENTS column is enough.

https://fontawesome.com/icons/user-circle?style=regular (for blank avatars)

@sceenius @gregory-latinier - there will need to be a small form/dialog (modal?) for entering a payment.  This is what would appear when a treasurer clicks "Enter Transaction". The fields on this dialog would be:

redemption_id (populated based on the row/button clicked)
amount (defaults to the amount on the redemption request)
network (drop-down with BTC, EOS, ETH, but also allow the treasurer to enter new text)
transaction ID (no default, will be pasted in by user- value will look like this: 6c77cbb970ebd12aaff278101b65ba89d8c79e9577434b2ea028e43bc8ac1a1f)

@gregory-latinier - this is the action that needs to be called:
ACTION newpayment(const name &treasurer, const uint64_t &redemption_id, const asset &amount, const map<string, string> &notes);

The network and trx_id should be put into the notes parameter with those keys.

@gregory-latinier - here's the action details for when a treasurer clicks the endorse button.
ACTION attestpaymnt(const name &treasurer, const uint64_t &payment_id,
                          const uint64_t &redemption_id, const asset &amount, const map<string, string> &notes);

notes of course are not required, but the UI should allow for an optional string with a key of comment

The "View Tx" button should open a new window with a link to a block explorer.
If the network is BTC, the prefix used for the link should be:
https://www.blockchain.com/btc/tx/<trx_id>

If the network is ETH, the prefix used for the link should be:
https://etherscan.io/tx/<trx_id>

If the network is EOS, the prefix used for the link should be:
https://bloks.io/transaction/<trx_id>

@gregory-latinier For the dialog on the "New TRX" (Enter TRX), please use the out-of-the-box Quasar form (similar to the alert mgr).

On the screenshot there are values on the right side.
How are they calculated ?

I think we just use supply for now, per the below queries:
HUSD supply:
cleos -u https://api.telos.kitchen get table husd.hypha HUSD stat
{
  "rows": [{
      "supply": "167745.22 HUSD",
      "max_supply": "-1.00 HUSD",
      "issuer": "bank.hypha"
    }
  ],
  "more": false,
  "next_key": ""
}

SEEDS supply:
cleos -u https://api.telos.kitchen get table token.seeds SEEDS stat
{
  "rows": [{
      "supply": "3141584632.0000 SEEDS",
      "initial_supply": "1500000000.0000 SEEDS",
      "issuer": "seed.seeds"
    }
  ],
  "more": false,
  "next_key": ""
}

HYPHA supply:
cleos -u https://api.telos.kitchen get table token.hypha HYPHA stat                                                                                {
  "rows": [{
      "supply": "2032440.06 HYPHA",
      "max_supply": "-1.00 HYPHA",
      "issuer": "dao.hypha"
    }
  ],
  "more": false,
  "next_key": ""
}

@gregory-latinier For larger amounts (e.g.<PHONE_NUMBER>.0000 SEEDS) can we use a simplified representation, e.g. "3,141M", or "3.14B" - is there a JS function for this, like for times "4 days ago". The function should kick in for amounts >= 1M.

@sceenius @gregory-latinier
After reviewing the indexes and table structure in the contract, I think we should change the screen slightly (just changing the filters on the upper-right of the table).  I think there should be:
Requestor View
This would show all of the redemptions for a specific requestor, with a newest at the top (there is an index for this).  This should probably be the primary/default view for members to see their redemption requests and payments.
- the screen should probably default to the logged in user, but there should also be either drop-down or search box that allows the user to enter any account name
cleos -u https://api.telos.kitchen get table --index 2 --key-type i64 --reverse -L gregory.tk -U gregory.tk bank.hypha bank.hypha redemptions

Open View"
This would be the primary for treasurers, but anyone could view it I imagine.  Perhaps there's a filter at the top for "member view" (for # 1) and "treasurer view" (for this one).  This view would show the redemptions sorted by amount due, with the highest quantities due at the top.
cleos -u https://api.telos.kitchen get table --index 3 --key-type i64 --reverse bank.hypha bank.hypha redemptions

NOTE that the limit will default to 10, so we should either increase that to 1000 or implement table pagination

@gregory-latinier For the Requestor View, can we enable the search box as a filter?

@dappdever @gregory-latinier Can we call this view "Multisignature" instead of Treasury so we don't get confused with the redemption process? Otherwise looks good on my end. I can't really test this further.


Refactor command word

Refactor command word into simpler abbreviation
Update use message for commands accordingly
Edit help window with better UI

LGTM! Nothing to critique in this PR!


Provide an ABI to enable projects written in other languages to use nigiri as a lib

As discussed previously, this PR enables a limited subset of nigiri to be used by other non C++ code. This is just a draft as a basis for further discussion. I have no experience in C++ whatsoever, so please review carefully.
As an example, the wrapping Rust crate(s) I have created are available at traines-source/motis-nigiri-rust.
A couple of decisions/questions that need discussion:

I have decided to create a pure C wrapper that then can be wrapped by the C-ABI compatible language of your choice. While it is possible to have other programming languages interface with C++ directly, this is usually not recommended (see e.g. here and here). The C++ ABI might not be as stable and in particular you pull all sorts of things from the C++ stdlib into your interface. To a certain extent, these types can be treated as opaque, but it's a huge hassle. Rust-specific alternatives like cxx can do this, but I think this would make it more difficult (or impossible?) to use the ABI from other languages.
Instead of providing getters for everything, the functions return (pointers to) structs.
The caller is responsible to call the respective *_destroy_* functions after being done. The nigiri lib then properly frees the memory (see a similar approach here). I chose this approach originally because some struct fields might actually be pointers to nigiri-internal data to avoid copying. But I think by now, most things are copied anyways, for a variety of reasons (e.g. strings need to be copied to be null-terminated, alternative: separate length field).
This unfortunately means that most things are copied at least twice (in the C wrapper and most likely in the calling code).
The nigiri lib has loads of dependencies. It is quite a hassle to link all of them in the right order without the help of CMake. In my Rust wrapper, I grep through the verbose output of ninja to find them, this is quite hacky. I wonder whether there is a better solution (but I'm not the first one). Maybe one could try to build an alternative version of the nigiri lib that statically links all dependencies, but this doesn't seem to be very straightforward either.
I decided to expose transports that are not yet exploded by days. This enables callers to leverage the bitfield advantages. However, the bitfield is not transferred in the nigiri_transport struct (this would be quite cumbersome in pure C), instead, the function nigiri_is_transport_active is provided.
How do we handle transports added in RT? Do we extend the nigiri_event_change struct to cover all necessary information? Or do we just add an rt_added flag to that struct and a function nigiri_get_rt_transport that allows to retrieve from the rt_timetable but otherwise has the same signature as nigiri_get_transport?
Why does a route have multiple claszes (timetable.route_section_clasz_)? Is this to allow for trains that are e.g. both RE and IC? Currently just taking the first.
Commit f13753b contains some unrelated fixes of things that I stumbled upon.

TODOs:

[ ] in/out_allowed
[ ] RT: handle track changes, cancellations/skipped, transports only in RT, possibly more RT special cases
[ ] expose footpaths
[ ] extend structs with further relevant fields (?)
[ ] verify correctness of timestamp handling (currently, caller is responsible for resolution of base_day + day_idx + event_mam)
[ ] error handling
[ ] tests (there are some tests in motis-nigiri-rust)
[ ] passive initialization. Currently, the caller has to initiate loading of the timetable. For other usecases, it might be useful to register some form of callback to be able to use a timetable that someone else (the main motis process) is loading.

:wave: This looks already really nice!
Regarding the issues:

For other languages like NodeJS or Python, there often exist specific ways in C++ (like pybind11) to create bindings. So I would not make the decision for Rust depend on how other programming languages might benefit the most. I would guess that the cxx Rust package would be updated accordingly in case the C++ ABI changes. In the past, the C++ ABI has been quite stable, so I would not consider ABI compatibility of the C++ standard library an issue for a Rust wrapper. However, I lack practical experience with both approaches (C wrapper / cxx crate), so whatever works is fine. I guess it's more important to have something that's convenient to use in Rust, which can be achieved with both approaches.
:+1:
In terms of performance, copying should always be avoided. I'm not a Rust programmer, but the concept of a Slice looks a bit like a "not null terminated" string (aka string_view or span in C++). So I would guess that Rust can deal with data that lacks null-termination.
see (3)
In nigiri, all dependencies are already statically linked. So your last proposal should work. Let me know if you encounter any problems. As long as your approach with reading ninja verbose log works, that's also fine.
:+1:
Currently, GTFS-RT does not support adding new trips. There are proposals to change this and also support added stops. However, at the moment there are no real additional services (that were not already contained in the schedule data) supported in GTFS-RT (and therefore also in nigiri).
Currently, this does not happen. It was a preparation for adding support for trains that are merged and split. Then you have several trains coupled together and therefore more than one clasz. Until this is implemented (which will probably require more changes to nigiri's timetable data model), it's totally fine to only select the first clasz.
Thank you! :smiley:

Regarding TODOs: it might make sense to merge an initial version and then proceed with more PRs later.
Would it make sense to have some kind of testing / CI directly in the nigiri repository so nobody accidentally destroys the compatibility to the Rust code?

Sounds good, thanks for the quick response!

cxx will generate code "on both sides". Maybe pybind11 does a similar thing. But this means that you would have to add new code to nigiri for every new language. Using the pure C way, the defined ABI in nigiri is "authoritative" and anyone wanting to use it can generate bindings out of that for their language of choice. But if there were, say a std::string in that interface, this generation logic needed to somehow handle the conversion from a std::string to the string type of that language directly – or it just generates loads upon loads of bindings for all the methods etc. of std::string and the user has to worry about it manually (which is the case when using Rust's bindgen). So since you're fine with the pure C way, let's stick with that for the time being :)

There are actually multiple reasons why mostly I have to copy:

event_mams: In nigiri, route_stop_times_ are sorted by stop, but I want to return one transport at a time -> copy to new array
stops: route_location_seq_ is an array of stops that also contain in_allowed/out_allowed. Currently, I just transfer a list of location_idx -> copy needed. I would transfer in_allowed/out_allowed in a separate array (not yet implemented). When transferring everything in one array, one could probably avoid the copy by casting the stop::value_type as a pure C struct with matching fields and hope that everything lines up... Sounds ugly to me, but possible.
And finally the strings. Rust certainly uses non-terminated strings, because (just as C++ I suppose) it internally stores the length. But how do we do it in the pure C ABI? We could alternatively add a separate length field next to each of the char ptrs. But since the natural C way is null-termination, it is actually easier to get a Rust string from a null-terminated char ptr than from a char ptr and some additional length :) Independently of that, copying on the Rust side is necessary, if you don't want to defer the *_destroy_*calls until forever or giving the caller (Rust) the complete responsibility to clean up which IMO is a bad idea, but idk. Of course, if we really achieved not copying at all (which I doubt), then we could just return ("copying" :D) structs instead of ptrs and need no *_destroy_* at all.

Mmh. As far as I understood, the libnigiri.a artifact does not contain all the dependencies, absl, utl, geo etc. I think this is the way it is meant to be (see e.g. here for a workaround), since otherwise, when linking that library somewhere else (say in motis), you would possibly quadruple all these dependencies. An executable like nigiri-server on the other hand does contain all these static dependencies. At least that's my current level of confusion, and anyways the Rust build complains about undefined references as long as I don't indicate these dependencies. Or do I have a misconception somewhere?

I thought this is what the schedule relationship ADDED is for. I thought to have seen this somewhere in the nigiri code as well. But, on a side note, I am getting unsupported schedule relationship ADDED log entries when loading some example swiss gtfsrt file. Haven't investigated yet.
Nice, less work :)

merging before TODOs: yes why not if you prefer that. But I think some things (like tests) should be done before merging, I'll hopefully get around to this tomorrow (pending possible changes to memory mgmt/copying, since this may change the interface quite a bit I think).
I don't think we should pull in any Rust-specific stuff. But some tests to just verify that the ABI is working would probably be good. Then at least one also has to change the tests :D Probably these would be quite similar to the one I've written in Rust in nigiri-sys.

Unfortunately, I don't have any experience wrapping C or C++ code with Rust yet. So take everything I write with a grain of salt.
Since the Rust code for read access to timetable data doesn't modify the data and references are valid until the timetable struct gets deallocated (which only happens at program termination in most cases), an alternative to copying data would be to only point to the data in the timetable (which would require to have a Rust type mirroring stop). This would eliminate the need for copies/*_destroy_* and therefore enable a "zero cost abstraction". Therefore, regarding performance (execution time + memory usage) it would not matter if the timetable is used in Rust or in C++ (which would be amazing). For rt_timetable it's a different story since this struct currently gets replaced with each real-time update. So here, references in Rust should only be used until the next real-time update.
Regarding linking: would it be an option to just link all *.a files from the build folder?
The ADDED schedule relation ship is deprecated in favor of DUPLICATE. Both require the trip to be contained in the GTFS-static timetable. It will just be copied to the current day. So currently, there's no way to create a trip with a new stop sequence not already contained in the GTFS-static timetable.
Yes, tests would be nice to have for this PR already.

Well, I have even less experience with that :D
Maybe we're talking about different things, but I think the relevant thing is how to expose everything in the pure C interface. Rust will follow.
E.g. we would need to have a pure C struct to mirror the stop type. Am I correct that then you would use reinterpret_cast and hope that alignment and padding etc. line up? I suspect this will work but is this guaranteed?
And then, we would not offer an API for individual transports, but just give the caller a pointer to the backing arrays of vectors like route_stop_times_ and route_location_seq_ etc.
I think in most use cases (at least in my use case :) this doesn't change anything about the required copy on the caller's side, because the caller most likely does not want to use the same data structure as nigiri. What still disturbs me most is that there will be two copies of everything held in memory indefinitely. I think this is much less desirable than some temporary copies happening while iterating over the transports. So in the distant future, I still think it will be desirable to have an alternative working mode of this ABI, where nigiri will relay the transports to the caller while it is loading them  and never put them into its own data structures.
Linking: Linking everything from the build folder is roughly what I do. But the order is extremely relevant, that's why I have to grep the command ninja is running to build/link nigiri-server.
ADDED, ah, I didn't realize that the gtfs.org and Google documentation about GTFSRT differs that much. But wouldn't this already cover many usecases, like Deutsche Bahn cancelling trains, but adding a replacement train on the same route at the same time? Wonder if that's what it's used for in the Swiss GTFSRT feed as well.

So I have gotten rid of most of the copying now (of course apart from struct allocation and apart from event_mams, I don't see how this would be possible without copying, as long as we keep the transport-centric API). I'm happy :)
For that, I have introduced a mirroring stop type in the C interface. For the time being, it uses reinterpret_cast (see this line), I don't see how this would be possible otherwise without copying (I don't really understand bit_cast, but doesn't it also copy?). At least it works, whether it is UB, idk.
I also added one big test.
Everything else should be fine then :)

Valgrind and address sanitizer seem to be unhappy. Can you please check? :)

Ok, for some reason I thought that delete would not call the destructor...
And the use of reinterpret_cast seems indeed to be UB, at least I suspect that's why with msvc, the tests fail due to garbled stops. So I fear the only non-copy option would be to expose a pointer to the array of uint32_t as you said and have the caller worry about pulling apart the bits. I think that's undesirable, so I reverted to copying with bit_cast for the time being. Let's see.

Looks like MSVC doesn't provide std::bit_cast yet. But it can easily be implemented with std::memcpy.
Linter errors:
/__w/nigiri/nigiri/test/abi_test.cc:333:12: error: variable 'test_event_change_counter' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables,-warnings-as-errors]
static int test_event_change_counter = 0;
           ^
/__w/nigiri/nigiri/test/abi_test.cc:333:12: error: variable 'test_event_change_counter' declared 'static', move to anonymous namespace instead [misc-use-anonymous-namespace,-warnings-as-errors]
/__w/nigiri/nigiri/test/abi_test.cc:393:3: error: variable 'l0_name' of type 'std::string' (aka 'basic_string<char>') can be declared 'const' [misc-const-correctness,-warnings-as-errors]
  std::string l0_name(l0->name, l0->name_len);
  ^
              const
/__w/nigiri/nigiri/test/abi_test.cc:398:3: error: variable 'l9_name' of type 'std::string' (aka 'basic_string<char>') can be declared 'const' [misc-const-correctness,-warnings-as-errors]
  std::string l9_name(l9->name, l9->name_len);
  ^
              const
/__w/nigiri/nigiri/test/abi_test.cc:400:3: error: variable 'l9_id' of type 'std::string' (aka 'basic_string<char>') can be declared 'const' [misc-const-correctness,-warnings-as-errors]
  std::string l9_id(l9->id, l9->id_len);
  ^
              const
/__w/nigiri/nigiri/test/abi_test.cc:409:3: error: variable 'l35_name' of type 'std::string' (aka 'basic_string<char>') can be declared 'const' [misc-const-correctness,-warnings-as-errors]
  std::string l35_name(l35->name, l35->name_len);
  ^
              const
/__w/nigiri/nigiri/test/abi_test.cc:411:3: error: variable 'l35_id' of type 'std::string' (aka 'basic_string<char>') can be declared 'const' [misc-const-correctness,-warnings-as-errors]
  std::string l35_id(l35->id, l35->id_len);
  ^
              const
/__w/nigiri/nigiri/test/abi_test.cc:420:3: error: variable 'l36_name' of type 'std::string' (aka 'basic_string<char>') can be declared 'const' [misc-const-correctness,-warnings-as-errors]
  std::string l36_name(l36->name, l36->name_len);
  ^
              const
/__w/nigiri/nigiri/test/abi_test.cc:422:3: error: variable 'l36_id' of type 'std::string' (aka 'basic_string<char>') can be declared 'const' [misc-const-correctness,-warnings-as-errors]
  std::string l36_id(l36->id, l36->id_len);
  ^
              const
/__w/nigiri/nigiri/test/abi_test.cc:443:3: error: variable 't_name' of type 'std::string' (aka 'basic_string<char>') can be declared 'const' [misc-const-correctness,-warnings-as-errors]
  std::string t_name(transport->name, transport->name_len);
  ^
              const

When you change those lines, can you please convert them to AAA style? Left side of assignment is always auto const, right side would be std::string{ptr, len}.

Fixed now hopefully. I haven't come up with a straightforward alternative for the global variable counting the callback invocations, so I added a NOLINT, since it's just a test. Lmk if you have a better idea.

Since the counter and the test function is only used in one test case, it would be cleaner to have a lambda that captures the local counter variable by reference:
TEST(/* ... */) {
   auto counter = 0U;
   auto const test_fn = [&]() { ++counter; /* ... */ };
   test_fn();
}

I had envisaged that, but apparently it is not possible to pass a capturing lambda as a function pointer (frankly haven't verified it myself, but makes sense). But I could just expect a lambda in the intermediate interface which I have created anyways for the test to avoid having to pass a file path and loading the files from disk. In production code, the function pointer would then be wrapped by two lambdas or the test couldn't test the creation of the nigiri_event_change_t struct.
I think I also know the reason why with msvc, the test is still garbled. Not only reinterpret_cast is UB, but also the layout when using different types in a bitfield (I was naive and used two bools for in/out_allowed) is undefined, on Windows this will apparently use more memory. So I thought:

Great, let's use three uint32_t then, as in the original stop struct. Shoot. In C (not in C++), this is UB, as only fundamental types (i.e. unsigned int) are allowed in a bitfield
Great, let's use unsigned int then. Shoot. A bitfield may not exceed the width of the type, i.e. on 16-bit systems we again would have UB.
Great, I give in and we just return uint32_ts and the caller can use some bitmask. Shoot. Actually the entire bit-level layout of bitfields is implementation-dependent, so I think there is no sure way of knowing which bits to mask.

So, what do we do?

Use three uint32_t for the bitfield, possibly even with reinterpret_cast, since both is UB, but most likely actually works everywhere?
Just copy to normal structs with normal, huge booleans or two/three separate arrays for location_idx, in_allowed, out_allowed?

This is all very interesting and I'm learning a lot, but it's starting to get tedious :D

Usually, C APIs allow the user to pass a void* data pointer for those reasons.
Here's an example: https://github.com/tidwall/rtree.c/blob/master/rtree.h#L68
But if it's only for the test cases, a global variable is also acceptable. But it could make sense to add a user data pointer for better usability of the API. In case there's no user data, it can just be set to null and be ignored in the callback.
As unsigned int is the same as std::uint32_t on all supported platforms and compilers (MOTIS mainly targets x86_64 and aarch64 architecture, but even for x86 or arm this is true), it should be fine to use 3x unsigned int in the C API. Also implementation defined stuff is fine as long as it works on all targeted compilers (MSVC, Clang, GCC) for those platforms (x86_64, aarch64 - if x86 and arm cause problems, I would just drop them). Only UB would be problematic as the compiler behaviour can change drastically between versions when new optimizations are added.

That sounds good. Done. Let's see what will be red next :)

Looks good! 👍

Cool. Thank you for your support! 🙌


(#155) Test multiple allow statements

A rego file should have multiple tests for allowing an action, with
sets of evaluations exclusive to each other.

goland ran some fmt over some other files, apparently

good stuff, though at some point we just have to assume OPA works so dont need to test too much


typos in readme and contributing

In readme, there are a few references to pvlib that should be changed to bifacial_radiance. Specifically in getting support and contributing.
In the contributing.rst documentation, there are some errors copied from pvlib that you might want to fix. see https://github.com/pvlib/pvlib-python/pull/818

I was not able to find those references to pvlib, other than the ones that are meant because we use some of the algorithms, but maybe I fixed them between your comment and me searching for them now.
Updated the contributing guidelines thanks! 💃

Resolved in commit


[sozo] Detect and manage manifests and artifacts discrepancies

Related to DOJ-213, https://github.com/dojoengine/dojo/issues/1625.
sozo uses several file types (previously generated by sozo build and sozo migrate)
as input for migration. All of these files may be corrupt or may have discrepancies due
to an older format version.
This PR introduces a new sozo clean command to clean the project of these files.
sozo clean --manifest-abis cleans only manifest and ABI files.
sozo clean --artifacts cleans only artifacts.
When an anomaly is detected in a file, the user is informed of the problem
and advised to run sozo clean to clean up the project.

If you have an idea of how to add a simple test to ensure we correctly clean the manifest and abis use case it could be great.

Sorry for that @remybar, if you didn't start, we will add the test in the rework of sozo crate once #1546 is merged. If you have started, let me know and I'll wait to merge. :)

If you have an idea of how to add a simple test to ensure we correctly clean the manifest and abis use case it could be great.

Sorry for that @remybar, if you didn't start, we will add the test in the rework of sozo crate once #1546 is merged. If you have started, let me know and I'll wait to merge. :)

Yes, I'm on it but it should be done today. I keep you informed ;-)


You can splat the connection to connect-azaccount

The hashtable that get-automationconnection provides lines up with the parameter names in Connect-AzAccount, so you can just splat it to connect-az account to save some redundancy.
$automationconnection = get-automationconnection -Name AzureRunAsConnection
connect-azaccount @automationconnection

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

ID: 81c284ea-3656-836f-7eab-388773e0e382
Version Independent ID: 71329bef-2d4f-4ff6-5a03-83b99b2269e9
Content: Connection assets in Azure Automation
Content Source: articles/automation/automation-connections.md
Service: automation
Sub-service: shared-capabilities
GitHub Login: @bobbytreed
Microsoft Alias: robreed

@JustinGrote Thanks for your feedback. I have assigned the issue to the doc author for updating the document accordingly.

@bobbytreed Can you please look into this and update the document as applicable.

@VikasPullagura-MSFT & @JustinGrote - Thanks for the suggested approach. I'm going to create a work item to add this in the article as an alternative option after we get through a number of priorities this month.  Thanks!  #please-close  #reassign:@mgoedtel


Collection::isEmpty and isNotEmpty can not prove non-nullability

This reverts parts of https://github.com/laravel/framework/pull/51998 that are wrong.
Those annotations are wrong if the first element of a Collection is null. The following code currently passes PHPStan analysis, but errors when run:
<?php declare(strict_types=1);

namespace App\Console\Commands;

use Illuminate\Console\Command;
use Illuminate\Support\Collection;

final class CollectionError extends Command
{
    protected $signature = 'collection-error';

    public function handle(): void
    {
        $collection = new Collection([null, 2]);

        try {
            $this->empty($collection);
        } catch (\Throwable $e) {
            $this->error($e->getMessage());
        }

        try {
            $this->notEmpty($collection);
        } catch (\Throwable $e) {
            $this->error($e->getMessage());
        }
    }

    /** @param Collection<array-key, int|null> $collection */
    private function empty(Collection $collection): int
    {
        if ($collection->isEmpty()) {
            return 0;
        }

        return $collection->first();
    }

    /** @param Collection<array-key, int|null> $collection */
    private function notEmpty(Collection $collection): int
    {
        if ($collection->isNotEmpty()) {
            return $collection->first();
        }

        return 0;
    }
}

$ php artisan collection-error
App\Console\Commands\CollectionError::empty(): Return value must be of type int, null returned
App\Console\Commands\CollectionError::notEmpty(): Return value must be of type int, null returned

Without the annotations, PHPStan will rightfully complain that first() can return null.

You are correct, but I would argue that the current annotations are better than no annotations.
Having null values in a collection could be seen as an edge case considering how Collections are mostly used.
The annotations should be improved instead of removed, maybe TFirstDefault can be used instead of null in the annotations i added?
The only reason I can see of having null values in a Collection is when you are using it as a key value storage/lookup, and in that case you would not be using isEmpty anyway, you would be relying on has instead.
Having phpstan be able to understand isEmpty/isNotEmpty is very important.

The current annotations hinder the ability of PHPStan to discover potential bugs. The assumption that all users of Laravel generally do not have null in their Collections seems very wild to me.
There might be a better solution, but it has not been found yet. Until then, I propose to remove this code that is actively harmful and invites errors.

The current annotations hinder the ability of PHPStan to discover potential bugs.

I respectfully disagree.

The assumption that all users of Laravel generally do not have null in their Collections seems very wild to me.

This is not my assumption though. My assertion is that in the use cases where you do have null in your Collection isEmpty/isNotEmpty is generally not very useful anyway, has will be the method you need in those cases.

Until then, I propose to remove this code that is actively harmful and invites errors.

Without the annotations phpstan gives false errors and forces you to litter your code with @phpstan-ignore to hide them, or rewrite your code to null check things you know are not null just to please phpstan.
If you have a Collection that looks like your example you will never do isEmpty and then just use the return of first() (or similar methods) — with or without the current annotations.
Generics for Collections need to be improved in general, the current annotations are step in the right direction, but maybe not the end.

I can see how it is generally good practice to apply something like filter() before checking isEmpty() or isNotEmpty(), and I am generally not passing around Collections that contain null. However, I would not expect every developer to do this - or even trust myself to do it correctly 100% of the time. That is why we have tools like PHPStan, to enforce correctness and to avoid silly errors.
What I would personally do is to avoid relying on indirect checks such as isEmpty() or isNotEmpty() before first(). Instead, I would call first(), store the result in a variable and check that directly.
-if ($items->isNotEmpty()) {
-    return $items->first();
+$firstItem = $items->first();
+if ($firstItem) {
+    return $firstItem;

Practicality and pragmatism are certainly important, but I am still convinced that it is preferrable to err on the side of caution when things are not certain. I would rather do an extra check, or perhaps write a seemingly redundant @phpstan-ignore in some cases, rather than have my code pass static analysis but then crash at runtime.
Parts of your original pull request are still left, and they definitely are an improvement. I do appreciate the effort to enable better static analysis with fewer false-positives, I just don't think it should come at the expense of safety and accuracy.

What I would personally do is to avoid relying on indirect checks such as isEmpty() or isNotEmpty() before first(). Instead, I would call first(), store the result in a variable and check that directly.

If you have a Collection that you know may contain null (if it's used as a key value store for instance, but then you would never use first anyway, you would use has/get), then I 100% agree with this, but if you have a Collection containing models or similar (which is a extremely common usage) it's just cumbersome and unnecessary to assign the result of first() to a variable to check for null before using it when you have isEmpty()/isNotEmpty().

I think i found a better solution and opened a new pull request for it: https://github.com/laravel/framework/pull/52184.


Function documented to receive null

The documentation states that we should be able to set null to the deltedAt date which makes sense to allow "undeletion"

We need this at work for our project to continue, please consider merging ASAP.

My changes are passing but the the whole package has other errors. Can we still approve this and merge, thanks?

@crazycodr the phpdoc is invalid there, thank you for pointing this out. However, for "undeletion" functionaity you can use a method which is made exactly for that

Closed by #220.


feat: add layout card animation when a timeline card is opened

Made obsolete by recent changes to the timeline


Could not use Android Back Button when in walkthrough?

Hi! First of all, many thanks for developing such a convenient and powerful walkthrough tool for RN. I have finished developing the walkthrough for our app right now and I am considering utilizing the back button on Android to act as the "Previous" button. However, when in walkthrough, pressing the back button on android does not trigger the function. And after the walkthrough has been finished by tapping the "Finish" or "Skip" button, the handler can be successfully called. I am not usre how to handle it or is it intended? My codes for this functionality is as followed.
import { BackHandler } from 'react-native'
componentWillUnmount () {
    BackHandler.removeEventListener('androidBackButtonPress', this.handleBackPress)
  }

  handleBackPress = () => {
    console.log('test')
    return true
  }
  componentDidMount () {
    BackHandler.addEventListener('androidBackButtonPress', this.handleBackPress)
  }

There is no straightforward way of doing that atm as the navigation functions are not passed into the root copilot component. One way is to define your custom tooltip wherein you have access to handlePrev through its props, and register the event listener in the componentDidMount of that component.


BUG: Add support to replace partitions in date-partitioned tables (#43)

Relates to issue #43
Changes:

Ability to write into a partition of a date-partitioned table by the module inferring insert into a partitioned table from the table decorator or if specified by user
Styling and docstring edits
Fix use schema when appending data to a table with an existing schema (ie. regular appends or date-partitioned tables inserts)
Needs:
Tests for:

stuff is in the right partition
only the target partition is affected
?

Closing as pandas-gbq has changed quite a bit since this PR was opened.


FC Exception encountered while processing chain.push_transaction:

here is my smart contract file: ping.cpp

here is my eosjs script pingpong.js

when I run commend node pingpong.js
here is the process nodeos show information:

here is the error

how should I do?

I get this error as well

@lingyiliu016 , it seems like your JS code declares authorization of user 'child.acnt' but doesn't sign the transaction with the users' private key.
Since your contract doesn't require authorization (eosiolib function require_auth) you don't need to provide authorization.

This can happen if the chainId does not match.  There is a warning in the next eosjs release.  Provide the cleos get info chain_id here Eos.Localhost({chainId: 'hex'}) ..


Feature: keyword completion

Current master:

Just to verify, the expectation is the true is in the completion set?  IMO it should also be at the top.

Yes, true.

C# editor has a dedicated Completion Provider for keywords, http://source.roslyn.codeplex.com/#Microsoft.CodeAnalysis.CSharp.Features/Completion/CompletionProviders/KeywordCompletionProvider.cs
@dsyme where can I get full keyword list? If it's not accessible anywhere in the codebase, I can port this one https://github.com/ionide/FsAutoComplete/blob/master/src/FsAutoComplete.Core/KeywordList.fs (which already has nice "xml docs" for each keyword and is used in Xamarin and FSAC for autocomplete and tooltips). It can be used to filter out types-that-are-also-keywords (like int) to fix https://github.com/Microsoft/visualfsharp/issues/1809 (however, filtering by string names is a bit hacky I think and will not work for qualified names. Could you suggest anything better?)

@vasily-kirichenko There's a keyword list at Microsoft.FSharp.Compiler.Lexhelp.Keywords\keywordNames

__LINE__
__SOURCE_DIRECTORY__
__SOURCE_FILE__

should be included too

My impression is that this has been completed?  @vasily-kirichenko @cloudRoutine  What about LINE etc.?  I don't see them in the autocomplete lists

Yes, those keywords are not added yet,

Keyword completion was implemented long time ago.


Roll Flutter Engine from a8872c8915a2 to 73b39a1d13b8 (1 revision)

https://github.com/flutter/engine/compare/a8872c8915a2...73b39a1d13b8
2024-05-21<EMAIL_ADDRESS>Roll Skia from ca98796cc19e to 4f6568ba7051 (2 revisions) (flutter/engine#52956)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC jonahwilliams@google.com,rmistry<EMAIL_ADDRESS>on the revert to ensure that a human
is aware of the problem.
To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose
To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Commit queue failed; closing this roll.


feat: add gateway rpc + cli command to get balances

This command lists the following:

Total amount of on-chain bitcoin
Local lightning liquidity
eCash across all federations

The primary purpose of this command is to provide a liquidity overview in the gateway UI

Backport failed for releases/v0.4, because it was unable to cherry-pick the commit(s).
Please cherry-pick the changes locally and resolve any conflicts.
git fetch origin releases/v0.4
git worktree add -d .worktree/backport-5823-to-releases/v0.4 origin/releases/v0.4
cd .worktree/backport-5823-to-releases/v0.4
git switch --create backport-5823-to-releases/v0.4
git cherry-pick -x cb46bef2bf1019843970b1359927d82fd4fbd6d3


Add UI mockup to README

First update for the Ui

Ui looks great but I think the website says it has to be the same size as the original. Right now it's too big:

Feel free to resize, update the PR, and merge in your own time! 💯

Codecov Report

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

@@            Coverage Diff            @@
##             master      #12   +/-   ##
=========================================
  Coverage     72.31%   72.31%
  Complexity      400      400
=========================================
  Files            70       70
  Lines          1228     1228
  Branches        124      124
=========================================
  Hits            888      888
  Misses          308      308
  Partials         32       32

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 fa97996...a4a4188. Read the comment docs.


Clear tasks on disabled workers

Description
Clear worker task lists on disable to ensure a consistent internal state.
Motivation and Context
One of the uncaught exceptions I was seeing in my scheduler recently was caused by an exception trying to peek at the worker list of a task with empty worker list during count_pending. I solved this in my fork by ignoring the exception, but I think I've now found the real cause.
After a worker is marked disabled, it will call get_work or count_pending one last time before stopping. This call can fail on count_pending when it has a unique task, as that task will now have no
workers but we try to look up the workers from each task.
Have you tested this? If so, how?
Included unit tests, but I haven't tested this particular fix in production. Should we catch the exception too to be safe?

Looks like one of the e-mail tests might be flaky :(

I think this is ok to merge now. I did add it to production with some extra logging to help figure out if there are other causes for this and one other bug I still don't know any cause for. Hopefully I'll have at least one more fix on Monday.

Thanks @daveFNbuck ! :)


Error running bun run ios: Cannot find module 'ajv/dist/compile/codegen'

Expected Behavior
Running the command bun run ios should start the Expo project on an iOS simulator without errors.
Current Behavior
When attempting to run the project on an iOS simulator using the command bun run ios, the process fails with the error: "Cannot find module 'ajv/dist/compile/codegen'". This issue prevents the Expo project from starting on the iOS simulator.
Possible Solution
Not sure of the exact cause, but it might be related to dependencies not being properly installed or versions of certain packages being incompatible. A potential solution could involve reinstalling node modules or verifying that all required dependencies are correctly installed and up to date.
Steps to Reproduce

Navigate to the project directory in the terminal.
Run the command bun run ios.
Observe that the command fails to execute and outputs an error related to the 'ajv/dist/compile/codegen' module.

Context (Environment)
This issue is occurring in a development environment set up for running Expo projects on iOS simulators. It affects the workflow by preventing the testing and development of the project on iOS devices. The goal is to be able to run the project on an iOS simulator without encountering module-related errors.
Detailed Description
When executing bun run ios, the terminal outputs a series of errors indicating that the module 'ajv/dist/compile/codegen' cannot be found. The error log points to various dependencies within the 'node_modules' directory, suggesting that the issue may be related to a missing or incorrect version of a package dependency. This issue is critical as it halts the development process by not allowing the project to be tested on an iOS simulator.
Resolution
After encountering the issue described, I was able to resolve it by manually installing the ajv package as a development dependency. Here are the steps I took to fix the problem:

I ran the command bun install --save-dev ajv in the terminal within the project directory.
This command added<EMAIL_ADDRESS>to the project's development dependencies, as indicated by the output:[0.27ms] ".env"
bun add v1.0.25 (a8ff7be6)
installed<EMAIL_ADDRESS>4 packages installed [357.00ms]

After installing ajv, I attempted to run the project on an iOS simulator again using the bun run ios command, and the process completed successfully without any errors.

Conclusion
The root cause of the issue was a missing ajv module, which was required by several dependencies within the project. By explicitly adding ajv to the project's development dependencies, the error was resolved, and the project could be run on an iOS simulator as expected.

Hey Chris!
This issue will soon be resolved : https://github.com/danstepanov/create-expo-stack/pull/206
Thanks for your investigation!

Resolved with #206


remove old iframely embeds

In an effort to cut down on the number of hits on the Iframely API, it would be great if posts older than a specified age removed the embed. This might help cut down on long threads with lots of embeds triggering 20+ API calls.

Hm, I'd recommend this be an admin setting, since I can see the case being made that even old posts should have embeds expanded...

Do not see this as necessary - the older posts will fade away naturally anyway. Besides, it will be tricky to implement. For example, there are pinned posts....
We now have a config option for cache TTL. That should address the number of hits concern.


multiprocessing-on-dill in pre-release

Hello
when i try to use bzt that use molotov i got this error with pipenv
[pipenv.exceptions.ResolutionFailure]: Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
  First try clearing your dependency cache with $ pipenv lock --clear, then try the original command again.
 Alternatively, you can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
  Hint: try $ pipenv lock --pre if it is a pre-release dependency.
ERROR: Could not find a version that matches multiprocessing_on_dill (from molotov==2.4->bzt==1.16.2->-r C:\Users\a24309\AppData\Local\Temp\1\pipenvozg8g50xrequirements\pipenv-ivcrzp5z-constraints.txt (line 4))
Skipped pre-versions: 3.5.0a4

pipenv make some checks on versions used and the usage of multiprocessing-on-dill in a pre-release is not a good pratice.
but as i see the package is only provided in a pre release version ...
i open also an issue on the multiprocessing-on-dill git repository
https://github.com/sixty-north/multiprocessing_on_dill/issues/6
Best regards

Seems similiar to https://github.com/ipython/ipython/issues/13454 so you can probably also workaround it by either explicitly requiring the alpha version for multiprocessing_on_dill
[packages]
multiprocessing_on_dill = "==3.5.0a4"
molotov = "*"

(but then you'll need to watch for future releases if you want any updates, but there's been 0 releases in 7 years so...)
Or you could either upgrade your pipenv, because recent pipenv versions will fallback to the available prerelease without errors for prereleased-only packages.

This is actually a pipenv issue but triggered by molotov's choice of rather immature hard dependencies.
So, on our side I think it would be most adequate to move multiprocessing_on_dill to an extra dependency so people can opt out of it at the expense of reduced molotov functionality. I think this should be addressed regardless of package resolvers capability of resolving prereleased-only dependencies.

pipenv allow the pull of pre release with the - - pre option but in general it's not a good idea to make a release that depend on a snap, pre release version.

Looking into it, it seems that the multiprocessing_on_dill usage is ubiquitous across the molotov codebase, so fat chance for the extra requirement idea.
It totally replaces the multiprocessing standard module, so molotov is effectively running a stale copy of multiprocessing 7 years in the past regardless of your python interpreter.
I think, at the very least, the multiprocess project should be considered to replace multiprocessing_on_dill: https://github.com/uqfoundation/multiprocess#major-changes
The alternative is reworking molotov internals to avoid the need to serialize unpickable objects with dill?

I moved to multiprocess -- This will require lots of testing before I release 2.6


[Evaluator] Unable to make pull request to add metadata/citation files

Bug description:
The FAIR evaluator tool fails to extract metadata from my GitHub repository.
To reproduce:

Install Metadata Updater for FAIRsoft

Grant the required read/write permissions for all repositories.

Go to the FAIRsoft evaluator app
In Step 1, select 'GitHub repository' as the metadata source
Enter the URL: 'https://github.com/abnerbog/hydroshare' and proceed without making edits to metadata
In step 4, make a pull request of the metadata file (JSON-LD format) to GitHub repository

This also occurs when making a PR of the citation file (CFF format)
Note that I do not see this error when using the default repository 'https://github.com/inab/oeb-visualizations'

Error message:

Environment:
Device: Dell laptop (x64)
OS: Windows 11 Pro
Browser: Google Chrome

Hi Abner,
The issue occurred because the API (github-metadata-api) couldn’t identify a target branch for the PR, which led to the error. I’ve updated both the API and the front end to ensure the branch name is provided, so this issue should no longer happen.
Thank you for bringing this to our attention!

Thanks so much again Eva!


PARQUET-918: FromParquetSchema API crashes on nested schemas

FromParquetSchema and ReadTable APIs crashed on nested schemas parquet on partial schema reads.
The fix creates a partial schema while building the arrow::Schema object.
4 tests were added - Two for FromParquetSchema API and two for ReadTable, each function is tested with a full schema read and a partial one from a simple nested parquet file.

Note that new tests correctness rely on nested fields comparison being correct
I have found a bug in nested comparisons and submitted a fix to the arrow project - https://github.com/apache/arrow/pull/450

See https://github.com/apache/parquet-cpp/blob/master/src/parquet/arrow/arrow-reader-writer-test.cc#L779. I think if you do a variant of that, but you'll need to use the lower-level file writer API to write the nested data, then that is good.

I have no idea why the last tiny change failed the CI check

Can you rebase? An API change in Arrow was just fixed in https://github.com/apache/parquet-cpp/commit/a48bfaa7e9c649b120eb3c88e0234695042d5d4e

Hm. not sure what just happened

Looks like you rebased on something other than apache/parquet-cpp master branch

I will review in more detail sometime this weekend. Haven't looked into the issue that @advancedxy mentioned

Seems to me the issue @advancedxy mentioned is not related the original one but since its in the same code paths its possible to fix both in the same PR

@itaiin yes, it's not in the selected column code path, but it do relate to nested schema in the FromParquetSchema api.  I believe it's better to fix both in the same pr.

@advancedxy @itaiin sorry for my slow response. This PR looks good. Since I'm looking at this today let me rebase and pull in the @advancedxy fix and see if I can write a test case for it

I didn't get to this today. @itaiin if you have time tomorrow to update this patch, could you do that? otherwise I can try to pick it up in the next couple days

I already have a patch for @advancedxy issue and a test case (his own example).
I'll add them and rebase.

Had a bit of trouble with the rebase and merge again - hope I did it right

Doesn't look right, includes a bunch of other patches

When you are rebasing, the only commands you should be using are
git rebase BRANCH

git add ...
git rebase --continue
Using "pull" or "merge" at any point will put you in a broken state

You can try using git merge --squash to get a clean commit including only your changes

umm yes thats what I did, however it refused to accept them, I guess the last commit screwed everything. i'll try to fix it

Looking good now =)

No prob. sorry for the git problems.

Hmm.. travis failed... that's odd everything builds on my ubuntu machine

Looks like there's something wrong with the Arrow version pinning (it's building against master)

I fixed a small API break that was just merged to Arrow, here is my rebased branch with the fix if you can update this PR https://github.com/wesm/parquet-cpp/tree/PARQUET-918 -- sorry about the disruption

Sorry I wasn't available. Thanks for merging the PR.


Adding persistence functions using LocalStorage, including unit test

Created functions for saving and loading JavaScript objects (libs/storage/storage.js)
Created basic assert() function for unit tests using JSON.stringify() (tests/assert.js)
Created unit tests for persistence functionality (tests/libs/storage/*)

Created pull request for wrong branch - should be 'staging'. Closing.


[release-0.8] Backports for 0.8.1

Backports the following PRs to release-0.8:

Update references to Lighthouse repo (#1009)
Ensure that CRDs are up-to-date (#1008)
Detect OVNKubernetes without Cluster Network Operator (#1001)
Use the PR base branch as reference when linting (#1026)
AKS: Use coredns-custom configmap for lighthouse (#1054)
Fix missing data section in coredns-custom (#1056)
Reconcile ServiceDiscovery before status updates (#1058)
Update GatewayEngine Pod env with the host nodeName (#1019)
chore: update bundle broken links (#1014)
fix: update image pull policy when using image override (#939)
Add ClusterId to lighthouse-coredns env (#1053)
Generate the submariners crd again to update the changes for bundle 0.8.0 (#1007)
Tag released image with branch name (#1025)
fix(subctl): avoid pinning the version and repo to submariners cr (#1004)
fix(subctl): image-override will override the version and repository properties (#1045)

@mkolesnik the patch is pulling :devel images https://github.com/submariner-io/submariner-operator/pull/1063/checks?check_run_id=1832251654#step:4:799  we need to figure out how to pull release-0.8 images in this case.


Add type hinting

To improve readability and testability, use Python type hinting in this project: https://realpython.com/lessons/type-hinting/
We can then also use mypy for static type checking

This is underway, now that #11 and #12 are complete we can make broader use of types and type hinting.


Unexpected Token - Webpack

I am trying to use this in my web app, and webpack is throwing an error when building.
Module parse failed: Unexpected token (1:1896280)
File was processed with these loaders:
 * ./node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.

I have tried babel-loader and no loader.  Is there some way I should be importing this using webpack?

Looks like esbuild-loader works.  Here is my loader configured for only this package:
{
    test: /\.js$/,
    loader: 'esbuild-loader',
    include: path.resolve(__dirname, '../node_modules/brotli-compress'),
    options: {
        target: 'es2015'
    }
}

https://github.com/privatenumber/esbuild-loader


Start work on alternative client

This client will have nicer user interface. The client allows loading
plugins from predefined directories so that implementing internal
extensions is possible.
TODO

[ ] Split help into user help (--help) and admin help (--help-admin).
[x] Figure out a way to split the code into multiple modules.
[ ] Add unit tests.

I like this code structure, loose couple and easy to maintain.

I have rebased the patches on master and restructured the commits so that they are meaningful. It is on pull request #125. So far, I don't have a clear idea on how to reasonably test the code.


gem: thor v0.20.0

This PR updates thor to the next minor version.
Changelog

@indirect r?

@bundlerbot r+

@olleolleolle i think this just needs a rebase to land:)

How about I just open a new PR.


Container: Fixing Reize Observer configuration

Fix for #194
Set up a Resize Observer in render() instead of _render() to capture any changes to the container size that might occur in the next animation frame after the initial render() is called.

@reb-dev It popped up in F5XC, I think it's an Angular-specific thing.


Please consider fixing issues detected by repository checker

Notification from ioBroker Check and Service Bot
Dear adapter developer,
I'm the ioBroker Check and Service Bot. I'm an automated tool processing routine tasks for the ioBroker infrastructure. I have recently checked the repository for your adapter feiertage for common errors and appropiate suggestions to keep this adapter up to date.
This check is based the current head revisions (master / main  branch) of the adapter repository
Please see the result of the check below.
ioBroker.feiertage
   -
ERRORS:

[ ] :heavy_exclamation_mark: [E204] Versions "1.1.3, 1.1.1, 1.0.22" listed at common.news at io-package.json do not exist at NPM. Please remove from news section.

WARNINGS:

[ ] :eyes: [W145] Missing suggested translation into uk of some "common.news" in io-package.json.
[ ] :eyes: [W162] js-controller 5.0.0 listed as dependency but 5.0.19 is recommended. Please consider updating dependency at io-package.json.
[ ] :eyes: [W184] "common.materialize" is deprecated for admin >= 5 at io-package.json. Please use property "adminUI".

SUGGESTIONS:

[ ] :pushpin: [S522] Please consider migrating to admin 5 UI (jsonConfig).

Please review issues reported and consider fixing them as soon as appropiate.
Errors reported by repository checker should be fixed as soon as possible. Some of them require a new release to be considered as fixed. Please note that errors reported by checker might be considered as blocking point for future updates at stable repository.
Warnings reported by repository checker should be reviewed. While some warnings can be ignored due to good reasons or a dedicated decision of the developer, most warnings should be fixed as soon as appropiate.
Suggestions reported by repository checker should be reviewed. Suggestions can be ignored due to a decision of the developer but they are reported as a hint to use a configuration which might get required in future or at least is used be most adapters. Suggestions are always optional to follow.
You may start a new check at any time by adding the following comment to this issue:
@iobroker-bot recheck
Please note that I (and the server at GitHub) have always plenty of work to do. So it may last up to 30 minutes until you see a reaction. I will drop a comment here as soon as I start processing.
Feel free to contact me (@iobroker-bot) if you have any questions or feel that an issue is incorrectly flagged.
And THANKS A LOT for maintaining this adapter from me and all users.
Let's work together for the best user experience.
your
ioBroker Check and Service Bot
@mcm1957 for evidence
Last update at Fri, 06 Sep 2024 07:46:06 GMT

Issue outdated due to RECREATE request. Follow up issue #267 has been created.
This issue will be closed.
your
ioBroker Check and Service Bot


feat: Feature to set HTTP header "Content-Security-Policy"

Added
Introduce CONTENT_SECURITY_POLICY environment variable to set HTTP header "Content-Security-Policy".
Description
Content Security Policy (CSP) is a feature that helps to prevent or minimize the risk of certain types of security threats. It consists of a series of instructions from a website to a browser, which instruct the browser to place restrictions on the things that the code comprising the site is allowed to do.
https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP
Changelog Entry
Introduce CONTENT_SECURITY_POLICY environment variable to set HTTP header "Content-Security-Policy" for improved security.
Checklist

[x] Target branch: Please verify that the pull request targets the dev branch.
[x] Description: Provide a concise description of the changes made in this pull request.
[x] Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
[ ] Documentation: Have you updated relevant documentation Open WebUI Docs, or other documentation sources?
[ ] Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
[ ] Testing: Have you written and run sufficient tests for validating the changes?
[x] Code review: Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
[x] Prefix: To cleary categorize this pull request, prefix the pull request title, using one of the following:

BREAKING CHANGE: Significant changes that may affect compatibility
build: Changes that affect the build system or external dependencies
ci: Changes to our continuous integration processes or workflows
chore: Refactor, cleanup, or other non-functional code changes
docs: Documentation update or addition
feat: Introduces a new feature or enhancement to the codebase
fix: Bug fix or error correction
i18n: Internationalization or localization changes
perf: Performance improvement
refactor: Code restructuring for better maintainability, readability, or scalability
style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)
test: Adding missing tests or correcting existing tests
WIP: Work in progress, a temporary label for incomplete or ongoing work

Thanks!


Add a method to unregister abilities

e.g.
AbilityRegistry#unregisterProvider(AbilityProvider|Class<? extends AbilityProvider)

Implemented by 4b55d974ab8ba5a3b46df6e825c5c5d650994d97.


(PUP-7349) Generated tidy resources should have the same noop-ness

If tidy resource's noop metaparameter is true or false, but not nil,
then generate file resources with the same noop-ness. If the noop
metaparameter is not set, but the Puppet noop setting is, then just
let puppet handle it.

@melissa PR updated and tests passing


DataStore: ClassCastException when setting limit on a stream - cannot cast to HasComparableOperationsIndex

This happens on version 1.1.14 when I map String column using Y/N to Boolean mapper. See screenshot.
Caused by: com.syncron.bpp.common.exception.transfer.ServiceException: [INTERNAL] java.lang.ClassCastException: com.speedment.enterprise.datastore.runtime.internal.fieldcache.IndexedBooleanFieldCache cannot be cast to com.speedment.enterprise.datastore.runtime.internal.fieldcache.trait.indexed.HasComparableOperationsIndex
	at com.speedment.enterprise.datastore.runtime.internal.stream.InitialCacheStream.comparableHelper(InitialCacheStream.java:881) [datastore-runtime-1.1.14.jar:]
	at com.speedment.enterprise.datastore.runtime.internal.stream.InitialCacheStream.findHelper(InitialCacheStream.java:616) [datastore-runtime-1.1.14.jar:]
	at com.speedment.enterprise.datastore.runtime.internal.stream.InitialCacheStream.applyConfig(InitialCacheStream.java:477) [datastore-runtime-1.1.14.jar:]
	at com.speedment.enterprise.datastore.runtime.internal.stream.InitialCacheStream.limit(InitialCacheStream.java:171) [datastore-runtime-1.1.14.jar:]

Enterprise Function

Fixed in Enterprise, perhaps the commit messade reference to the issue number does not work since the issue is reported in open source but fixed in enterprise?
a2e3cd5f0f9594ecb3d31867303b33fd64726269

Fix will be released in speedment-enterprise 1.1.15 (and available in custom built snapshots prior to that).


Robyn one pager: Response curve plot implementation

Add response curves visualization
Implement response curves showing spend vs response relationship
Add carryover effect shading for each channel
Display mean spend points with formatted labels
Support both standalone and subplot integration
Use abbreviated axis labels for large numbers
Add legend with channel colors
Include proper grid and axis styling
Testing:

Graph plotted by R code

Although we have plan to address accuracy later, testing plot and plot from R differs a lot. Is because data is different?

Yes i believe the data used is different. Only way to verify is to use same data for both python and R code and plot graphs which is part of sanity check plan.

If the testing is done on different dataset then this looks good to me. Approved.


PowerShell runspace pool hang during asynchronous batch processing

Prerequisites

[X] Write a descriptive title.
[X] Make sure you are able to repro it on the latest released version
[X] Search the existing issues.
[X] Refer to the FAQ.
[X] Refer to Differences between Windows PowerShell 5.1 and PowerShell.

Steps to reproduce
The hang occurs when PowerShell is running batched commands (with statement separators) that are invoked asynchronously in a runspace pool.
This is not a recent regression, as I see the same behavior in Windows PowerShell (5.1).
$runspacePool = [RunspaceFactory]::CreateRunspacePool()
[void]$runspacePool.SetMaxRunspaces(2)
[void]$runspacePool.SetMinRunspaces(1)
$runspacePool.Open()

$thread = [powershell]::Create()
$thread.RunspacePool = $runspacePool

[void] $thread.AddScript("Write-Output 'Hello'")
[void] $thread.AddStatement().AddScript("Write-Output 'Goodbye'")

Write-Verbose -Verbose "Invoking synchronously..."
$output = $thread.Invoke()
Write-Output $output

Write-Verbose -Verbose "Invoking asynchronously..."
$job = $thread.BeginInvoke()
$output = $thread.EndInvoke($job)
Write-Output $output

Expected behavior
VERBOSE: Invoking synchronously...
Hello
Goodbye
VERBOSE: Invoking asynchronously...
Hello
Goodbye

Actual behavior
VERBOSE: Invoking synchronously...
Hello
Goodbye
VERBOSE: Invoking asynchronously...
# PowerShell hangs here

Error details
No response
Environment data
Name                           Value
----                           -----
PSVersion                      7.2.3
PSEdition                      Core
GitCommitId                    7.2.3
OS                             Microsoft Windows 10.0.22000
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0

Visuals
No response

The problem is with AddStatement(), which doesn't support async.

@WG-engine
we agree it looks like a bug


Fixed the edit account button not hiding when ynab had it set to hidden

Github Issue (if applicable): #1343
Trello Link (if applicable):
Forum Link (if applicable):
Explanation of Bugfix/Feature/Modification:
It looks like this feature was done a while ago. The css for the icons has most likely changed. I'm just setting the visibility of the icons to hidden when the option is set.

First PR so if there are any issues let me know. Also wanted to point out that a lot of the code in the /edit-account-button feature looks to be unused. And the three options of Default / Left / Hidden are slightly incorrect. By default, the button is on the left. So maybe this feature should be fixed up to instead be a 'Hide edit account button' rather than 'Move edit account button'.

@oscargws that's not too hard to believe. YNAB used to always show the button on the right and I think after they moved it we never updated this feature. Would you be interested in making this a hide button feature?

@joshmadewell sure thing. I'll create a different issue and pr for that then!

@joshmadewell this should be good to go


color ANSI controls being printed when using ruff on a GitBash console on windows

The problem only happens when running GitBash within a vscode terminal window, on a regular GitBash window the ANSI emulation works as expected.
$ ruff .
Found 1 error(s).
←[1mtest.py←[0m←[36m:←[0m1←[36m:←[0m8←[36m:←[0m ←[1;31mF401←[0m `httpx` imported but unused
1 potentially fixable with the --fix option.
$ flake8
.\test.py:1:1: F401 'httpx' imported but unused

There's an environment variable you can set to disable them entirely -- is that sufficient?
E.g. NO_COLOR=1 ruff .

Yes, that works for me. Thanks


Grid include min and max value

Can we include min and max values for drawing grid lines?
I want to show grid lines for outer box also like for 0 and max value.
I know border is supposed to be used for this use case but I want the same style as grid lines (dotted / dashed)
and flutter dont allow dotted / dashed border.
Can we have something proper for this?

Hi. We separated the grid (called FlGridData) and border (called FlBorderData) concepts to be able to have some specific features for them.
To solve this issue, we need to make FlBorderData more customizable to support dashed line. (just like what we do in FlGridData)

I solved the problem by customizing the DashdedBorder and passing in FlBorderData

import 'package:flutter/material.dart';

class DashedBorder extends Border {
  final double dashWidth;
  final double dashSpace;

  const DashedBorder({
    super.top,
    super.right,
    super.bottom,
    super.left,
    this.dashWidth = 5.0,
    this.dashSpace = 5.0,
  });

  void _paintDashedSide(Canvas canvas, Rect rect, BorderSide side, {required bool horizontal}) {
    final paint = side.toPaint()
      ..style = PaintingStyle.stroke;
    final double totalWidth = horizontal ? rect.width : rect.height;
    final path = Path();
    double startX = horizontal ? rect.left : rect.top;
    final double endX = horizontal ? rect.right : rect.bottom;
    final double posY = horizontal ? rect.top : rect.left;

    while (startX < endX) {
      path.moveTo(horizontal ? startX : posY, horizontal ? posY : startX);
      path.lineTo(horizontal ? startX + dashWidth : posY, horizontal ? posY : startX + dashWidth);
      startX += dashWidth + dashSpace;
    }

    canvas.drawPath(path, paint);
  }

  @override
  void paint(Canvas canvas, Rect rect, {TextDirection? textDirection, BoxShape shape = BoxShape.rectangle, BorderRadius? borderRadius}) {
    if (top != BorderSide.none) {
      _paintDashedSide(canvas, Rect.fromLTWH(rect.left, rect.top, rect.width, top.width), top, horizontal: true);
    }
    if (right != BorderSide.none) {
      _paintDashedSide(canvas, Rect.fromLTWH(rect.right - right.width, rect.top, right.width, rect.height), right, horizontal: false);
    }
    if (bottom != BorderSide.none) {
      _paintDashedSide(canvas, Rect.fromLTWH(rect.left, rect.bottom - bottom.width, rect.width, bottom.width), bottom, horizontal: true);
    }
    if (left != BorderSide.none) {
      _paintDashedSide(canvas, Rect.fromLTWH(rect.left, rect.top, left.width, rect.height), left, horizontal: false);
    }
  }
}

Is it related to #494 issue? If yes please close this issue and let's follow it in one place.
Thanks!


Allow random access in HDF5TableReader

Please describe the use case that requires this feature.
The HDF5TableReader essentially uses random access in a generator:
for row_index in range(n_rows):
     row = table[row_index]
     ...
     yield containers

But it doesn't expose this underlying random access nature.
Describe the solution you'd like
Change API of HDF5TableReader to allow __getitem__(self, index) to allow random access.

Just out of curiosity, where would this be useful?