#823 Added obfuscate option to dump shards

Fixes #823
Test Plan

How do we know the code works?

run
 flank [android|ios] run --dump-shards --obfuscate
and compare output file with running
 flank [android|ios] run --dump-shards
Check ObfuscationTest for checking obfuscation results
Checklist

[x] Documented
[x] Unit tested
[ ] release_notes.md updated

Codecov Report

Merging #837 into master will increase coverage by 0.31%.
The diff coverage is 93.93%.

@@             Coverage Diff              @@
##             master     #837      +/-   ##
============================================
+ Coverage     81.23%   81.54%   +0.31%
  Complexity      637      637
============================================
  Files           167      169       +2
  Lines          3240     3300      +60
  Branches        463      469       +6
============================================
+ Hits           2632     2691      +59
+ Misses          343      341       -2
- Partials        265      268       +3

I pushed all documentation changes which were generated

If you add new command you should update

README.md
flank.yml
flank.ios.yml

If you add new command you should update

README.md
flank.yml
flank.ios.yml

this is CLI option not flank settings. --dump-shards are also missed there

If you add new command you should update

README.md
flank.yml
flank.ios.yml

this is CLI option not flank settings. --dump-shards option is also missed there

Right, sorry!

this task must be updated after merging #853


[Event Request] Table 27 "Item" - New publisher

Hello, we need a new Event publisher in the procedure UpdateReplenishmentSystem. Can you please check that? Thank you!
procedure UpdateReplenishmentSystem() Result: Boolean
var
    IsHandled: Boolean;
begin
    IsHandled := false;
    OnBeforeUpdateReplenishmentSystem(Rec, Result, IsHandled);                 <==============
    if IsHandled then
        exit(Result);

    CalcFields("Assembly BOM");

    if "Assembly BOM" then begin
        if not ("Replenishment System" in ["Replenishment System"::Assembly, "Replenishment System"::"Prod. Order"])
        then begin
            Validate("Replenishment System", "Replenishment System"::Assembly);
            exit(true);
        end
    end else
        if "Replenishment System" = "Replenishment System"::Assembly then begin
            if "Assembly Policy" <> "Assembly Policy"::"Assemble-to-Order" then begin
                Validate("Replenishment System", "Replenishment System"::Purchase);
                exit(true);
            end
        end
end;

New Event:
[IntegrationEvent(false, false)]
local procedure OnBeforeUpdateReplenishmentSystem(var Item: Record Item; var Result: Boolean; var IsHandled: Boolean);
begin
end;

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.
Build ID: 48086.


documentation: Web Worker Support

Background
Now that Webpack can detect native web worker usage (new Worker(new URL("./worker.js", import.meta.url))) and bundle automatically, we can claim native web worker support. We've always had this support in snowpack, but due to the lack of support for this in older browsers you were limited by where you could run your application in production.
Now that Webpack 5 automatically bundles this, you have support in both dev and prod.
Feature Request

[x] Document how to use a web worker (not snowpack specific)
[x] Document the limitation that only Chrome and Edge support ESM import/export in workers, so you'll need to dev in one of those browsers. https://caniuse.com/mdn-api_worker_worker_ecmascript_modules
[x] Document that this is only a limitation of development, not production. When you build for production, the webpack bundler will automatically bundle this for production to run on all browsers.
[ ] BONUS: Add a test that validates this behavior.

@FredKSchott , I have been looking into this issue and I'm running into a bit of a snag.
I followed the documentation in webpack [on how to setup  a web worker with workbox]((https://webpack.js.org/guides/progressive-web-application/#root). But Im running into a bit of a snag.
This is the error I get:

These are the changes I made as per the webpack documentation
Is this something you can help me out with? If thats not feasible, I do plan to raise an issue on webpack github repo to be able to get it to work.

I have raised the issue on webpack js documentation site just in case.

Heya, thanks for snowpack, really enjoying it so far. Running into a bit of a problem where FF&Safari won't work because both of the WebWorker implementations don't seem to support import-ing from inside a worker. Any idea for a workaround within snowpack?

I have a difficulty configuring this setup:

Typescript
WebWorker
WASM inside WebWorker

currently, my code looks like this:
const worker = new Worker('./worker.js');
worker.onmessage = ({ data }) => console.log('From Worker ->', data);
worker.postMessage(MsgToWorker.HiWorker);

Note I do have worker.ts file.
In DEV
With that code I get
GET http://localhost:8080/worker.js 404 (Not Found)

if I change my code to
const worker = new Worker('./worker.ts'); // <---- .ts

I got the same 404 response.
In PROD
When I generate with worker.ts in the source I get this:
// generated code
const worker = new Worker('./worker.ts'); // <-- should it be .js?

Thus, I don't know how to configure that properly :(

I was also caught by the need to add the './_dist_/ prefix to the worker uri
@FredKSchott I think this might be snowpack specific, and so maybe worth adding to your checklist for this issue?

I've been trying web workers with snowpack, and I've come up with the required steps to make it work (ish)
This snippet should nearly work:
const worker = new Worker(
        new URL('../../../my-worker.js', import.meta.url),
        {
          name: 'my-web-worker',
          type: import.meta.env.MODE === 'development' ? "module" : "classic"
        }
      );

Some notes for the documentation:
When creating a Worker, snowpack relies on the native support from webpack 5. The first argument of the Worker is a URI with the location of the file in the final bundle. Please note that this URI is not fully resolvable against your local filesystem. The URI should point to the address where the browser can get the web worker file. In order to help Webpack to create the right URI, we have to pass import.meta.url as the URL context. See the release notes for this new feature
When using typescript, the file extension should always be .js.
The second argument of the Worker is an object with options. In development, Snowpack will emit a module and we need to pass that configuration to the Worker constructor. Otherwise, the script won't be able to import any dependencies. Please note, that support for web worker modules is limited at the moment
In production, however, the type of your web worker will depend on the build configuration. If not using module as output, then "classic" is the preferred option.
TODO
I would gladly formalise these notes in a PR. However, there is still something that I couldn't get to work.
Snowpack's hmr-client has a reference to window which doesn't play nice in the web worker's module since window will never be defined as a global. I've patched this file on my end and all seems good so far. Would removing that reference to window be feasible? Again, happy to open a PR for that one too

Tackling in #2027

Here's how I bundled web workers:
https://github.com/Birch-san/liquidfun-play/pull/2

install unofficial webpack 5 plugin @efox/snowpack-plugin-webpack5

this is similar to the official WIP plugin, which was closed in December
has a couple of missing dependencies. you'll need to install these yourself:

core-js
file-loader

load Worker as { type: 'classic' } in production bundle:

const worker = new Worker(new URL('./worker.js', import.meta.url), {
  type: import.meta.env.MODE === 'development' ? 'module' : 'classic'
})

modify the webpack config

We use Webpack's DefinePlugin to make available at compile-time a global variable __SNOWPACK_ENV__ with value "production":
snowpack.config.js
const { DefinePlugin } = require('webpack')

/** @type {import("snowpack").SnowpackUserConfig } */
module.exports = {
 plugins: [
    ['@efox/snowpack-plugin-webpack5', {
      /** @param {import("webpack").Configuration } config */
      extendConfig: (config) => {
        config.plugins.push(new DefinePlugin({
          __SNOWPACK_ENV__: JSON.stringify('production')
        }))
        return config
      }
    }]

enjoy your bundle

snowpack build

You can also refer to my pull request for an example of how to serve the bundle via a local webserver.


FEATURE : Add 'Guidelines' Button for the Website

Guidelines Button Missing on Rubik's Cube Website
Describe the bug
Currently, there is no guideline button available on the Rubik's Cube website, which makes it challenging for users to understand how to play the game.
To Reproduce
Steps to reproduce the absence of the guideline button:

Navigate to the Rubik's Cube website.
Look for a guideline button in the user interface.
Observe that there is no such button available.

Expected behavior
There should be a visible and easily accessible guideline button on the Rubik's Cube website that provides instructions on how to play the game.
Additional context
The addition of a guideline button which includes visual information will enhance user experience and make it easier for new users to understand how to interact with the Rubik's Cube website.

hey @Dev-tanay
kindly assign me the issue.


Change "docs/home" to "docs"

Address #1073 partially
With some minor changes that allow a blank string slug in sidebar.json, this can be done without making the docs homepage a special exemption.
The existing redirect from /docs to /docs/home also had to be reversed.

@rogermparent please also update description a little bit - it only partially fixes the ticket.

and one minor thing I noticed - nav link (and it other places) ends with / for DOC

check the code base for instances of doc/home. content\blog\2020-04-30-gsod-ideas-2020.md and src\gatsby\models\docs\onCreateMarkdownContentNode.js have it, at least.

Part of this branch was removing doc/home from the docs model node creator, and it turns out after a ripgrep that that blog post was the only other instance! Thanks for pointing that out.

Looks good to me, all concerns are fixed as far as I can tell.

Why does the link on the top menu end with slash / ? I mean, where in the code is that? I don't see it in the source code changes.

 However if you load any area outside of docs, after clicking on docs the slash goes away once you're in the docs. Not really a problem... but funny

@rogermparent yes, this is not good (mean prefetch does not work and most likely we hit a redirect). I actually checked this when this branch was deployed, so not sure wha't going on here. Could you please create a ticket to investigate and fix this?

Got it, I'm not sure what's up but I'll get started investigating it.

Looks like some leftover Sidebar link behavior was the culprit (even the top nav bar still sources from it). I've got a quick fix at #1265 now, but it's worth further decoupling the sidebar from all the links outside of itself in the future.


New Code Warning if global procedures are declared inside an Object that has set its Access property to internal

Hi,
The access property of an AL object can be easily overlooked, especially in objects with much code in it. If set to internal global procedures cannot be called from another app, which makes sense but a code-warning which indicates that global procedures inside an access restricted object cannot be called from another app would be a helpful indicator.
Thanks and best regards,
Michael

I guess just to protect against developers not noticing the Access = Internal at the top of the codeunit, and adding procedures without access modifier, thus thinking they'll be public, and only finding out later when trying to use the app as a dependency that they aren't.

Hmm, but do we really want to see warnings for something that's usually intended behaviour? In our projects, we often use Internal objects to hide the implementation.
So yes, it could be added but please set it hidden by default.

I'm not sure if we want to add this for a few reasons:

It will be very noisy on existing code. I suspect there are many internal objects with procedures not marked with local or internal.
We'll ideally want a code action to add internal on any global procedures in an internal object.
It will make the language more verbose. It would mean every procedure on an internal object will need a internal or local modifier.

We'll need more feedback from the partner community to see if we really want this. You can post this to our Ideas forum at https://aka.ms/BusinessCentralideas, or vote up the idea if its already there. We're constantly monitoring top Ideas and will consider them for a future release.


Add a link "download zip" when all files are downloaded

Some torrents contain a lot of files and it would be great it we could download them all in a single zip. For the moment I use cakebox (with peerflix folder) which has this feature, but it's the only reason I use cakebox.

related to #40

Perhaps a 'live' version of zip is possible, to download zip when files are still in progress.

As a workaround: all the files in a torrent are downloaded locally in temp folder anyway:

On Linux/MacOS: /tmp/torrent-stream
On Windows: %TEMP%\torrent-stream

No one had a solution? zip download all files.

Would be great if this gets implemented...

OK, I've had some free time to work on this. The torrent title in the header is now a link to the zip archive.

Please install the latest version and see if it works for you.

Wow, I was working on this at the moment. Very happy!

@asapach So far it works great. Thanks a lot! Owe you for this!
I was trying to use node-archiver too, but I had some problems with streams and was struggling with tailing-stream, you did a great job!

Thanks, @dachinat

@asapach Do you have an address that you can share? I can send you some of our national food. It's kind of sweet, made from thickened grape-juice (see pictures) I think you're going to like.


Use Pydantic BaseModel instead of dataclass

This PR ports the autogen code over to use the pydantic BaseModel instead of the pydantic dataclass.  The behavior is essentially the same (the two things are extremely similar in design and function), but this makes a number of things more straightforward, makes inheritance much easier (no funny business with non-default args following default args), and I hope this will make it easier to pull some of the stuff out of the autogen code and into some "real" python that we can lint/check etc...
@jmuhlich, I know you're busy, but if you have a moment to let me know if you're terribly against this idea, that'd be great.  Otherwise, I'll probably push forward with it.
(edit: I've taken the opportunity to clean up a number of other things here as well, fixes #66, and improves typing around ids, so this PR has unfortunately become a bit bloated)

actually @JacksonMaxfield, if you have a moment to run your tests against this branch, that'd be helpful too.  It shouldn't change anything externally... but would be nice to know that it doesn't affect your stuff before merging to master

actually @JacksonMaxfield, if you have a moment to run your tests against this branch, that'd be helpful too.  It shouldn't change anything externally... but would be nice to know that it doesn't affect your stuff before merging to master

Hey @tlambert03 seems like there is a single change from current as a result of this!
Seems that the OME.images[i].pixels.dimension_order is now a string rather than something? To be honest I don't know what type it was before but this is my code currently:
# Create dimension order by getting the current scene's dimension order
# and reversing it because OME store order vs use order is :shrug:
dims = [d for d in scene_meta.pixels.dimension_order.value[::-1]]

Simply dropping the .value at the end is enough to make my tests pass again!

Hey @tlambert03 seems like there is a single change from current as a result of this!
Seems that the OME.images[i].pixels.dimension_order is now a string rather than something? To be honest I don't know what type it was before but this is my code currently:
# Create dimension order by getting the current scene's dimension order
# and reversing it because OME store order vs use order is :shrug:
dims = [d for d in scene_meta.pixels.dimension_order.value[::-1]]

Simply dropping the .value at the end is enough to make my tests pass again!

Thanks!  That's very helpful.  I think this has to do with the way the pedantic constrained string classes had a value attribute (instead of just acting like a string). This behavior actually seems more desirable! I'll check to see if it affects anything else￼

Thanks!  That's very helpful.  I think this has to do with the way the pedantic constrained string classes had a value attribute (instead of just acting like a string). This behavior actually seems more desirable! I'll check to see if it affects anything else￼

Agree that this behavior seems more valuable! So no worries for me there!

Agree that this behavior seems more valuable! So no worries for me there!

This may break some stuff for @toloudis. (re: your temporary OmeTiffWriter / metadata cleaner, I would just strict version pin ome-types until 4.x OmeTiffWriter is released)

This may break some stuff for @toloudis. (re: your temporary OmeTiffWriter / metadata cleaner, I would just strict version pin ome-types until 4.x OmeTiffWriter is released)

I’m also happy to try to make it backwards compatible here too if you want to point me to anything it breaks on your end @toloudis

I’m also happy to try to make it backwards compatible here too if you want to point me to anything it breaks on your end @toloudis

I'll have a chance to pull this branch and try it out tomorrow! Thanks for the heads-up.  I think the dimension_order thing looks like an improvement.

actually.  @JacksonMaxfield  and @toloudis, I haven't really seen any of the code where you use ome-types.  If you can point me to the most recent branches that I could look at, I'd be curious, and I can add some more tests here to make sure your needs are being tested locally as well

All of the 4.x code is on main for aicsimageio: https://github.com/AllenCellModeling/aicsimageio/tree/main
I don't have access to @toloudis code anymore unfortunately

Specifically here is the OmeTiffReader: https://github.com/AllenCellModeling/aicsimageio/blob/main/aicsimageio/readers/ome_tiff_reader.py

OK, so... I could make this compatible with your current tests by undoing just one line in this PR: setting use_enum_values back to False in the pydantic Model Config.
Do you like all of the enum values to be raw Enum instances? or just strings?  I'm torn; I can see +/- either way... sometimes it's nice to have the raw enum object to see all available options.
A third option is to use an Enum subclass that provides a __str__ method, so that you could do str(scene_meta.pixels.dimension_order)[::-1] (as well as scene_meta.pixels.dimension_order.value)

Yea on giving it some more thought I think having the raw Enum objects returned is probably the way to go? Idk I am on the fence too but I think I side in that direction. Simply because I like the explicitness of it all. Plus allowing the other enum options like name is cool too.

Idk I am on the fence too but I think I side in that direction.

great. I'm leaning that way too.  It's easy to get the string from the enum, but hard to go the other way.  will stick with that.  That should mean this PR won't affect your stuff at all

All of the 4.x code is on main for aicsimageio: https://github.com/AllenCellModeling/aicsimageio/tree/main
I don't have access to @toloudis code anymore unfortunately

https://github.com/allen-cell-animated/cellbrowser-tools/ has been public for a while (arguably it shouldn't be yet, but oh well!)

Thanks both, I've reverted the enum change back to the original behavior.  so i think at this point it shouldn't change your tests.  will merge tomorrow.  feel free to keep suggesting changes to #77 if you'd like to ensure more things are tested on my end against aicsimageio

I just released 0.2.4 without this change.  Will merge now and when it releases it will be 0.3.0


User-facing links should point to ui.adsabs instead of api.adsabs

The current version produces user-facing links which point to api.adsabs.harvard.edu, and those should link instead to ui.adsabs.harvard.edu. From an email by the ADS support staff:

For future reference, ui.adsabs.harvard.edu is our standard URL for access via a web browser, while the api.adsabs.harvard.edu is the standard URL for making API queries from the command line or Python.

This is mostly a minor issue, but it can indeed cause problems. In particular, (at least, as of yesterday), the following fails:

open an arXiv abstract page with the extension open
click on the link with the paper title on the right-hand sidebar, going to api.adsabs.harvard.edu
create a new account
attempt to link this new account to an existing ORCID account.

This produces an error from ORCID saying "redirect URI doesn't match your registered redirect URIs", and the ADS support staff have confirmed that this is because the call was made from the api.* domain.
Instead of forcing ADS to try to figure out which clients to redirect to ui.*, why not link directly there from the extension?

Thank you for looking into this, that does make sense. It is fixed on 4ee430f and cb871e1 and will be rolled out soon.


Add support for `` inside of Marked Link Brackets

Question, does `[[ link ]]` not work as intended? With the current behavior, the text inside brackets is taken (almost) verbatim to find symbols, and while ` isn't a very common symbol, it still introduces some complexity that it would be nice to avoid.

Hmm, I didn't try that because I would usually expect everything inside of
a code fence to not be interpreted.
On Sat, Aug 31, 2019, 6:12 PM Gerrit Birkeland<EMAIL_ADDRESS>wrote:

Question, does [[ link ]] not work as intended? With the current
behavior, the text inside brackets is taken (almost) verbatim to find
symbols, and while ` isn't a very common symbol, it still introduces some
complexity that it would be nice to avoid.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/TypeStrong/typedoc/pull/1091?email_source=notifications&email_token=AAFZTDBNB45LRYNKNEQ75P3QHMJGHA5CNFSM4IPVHMW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5TYEYI#issuecomment-526877281,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAFZTDHFTNEGVBVQ6TBXMNLQHMJGHANCNFSM4IPVHMWQ
.

Released  in 0.16.11 :)


Send data as byteArray instead

Hi,
I was thinking about using this module for one of my applications. However, I need to send data as a byte array, so I wondered if this is possible, as the documentation only states base64 data?
The company I'm working together with forces me to use a byteArray for the data I'm sending them so I have no way around it.
Thanks in advance.

This is explained in detail in #181. In summary: just use base64 encoder and decoder.

Przemek, any idea why the base64 encoded string has line breaks in it and at the end?

It is a bug which was introduced by my mistake...
On iOS I can set encoding/decoding options to:
// Use zero or one of the following to control the maximum line length after which a line ending is inserted. No line endings are inserted by default.
public static var lineLength64Characters: NSData.Base64EncodingOptions { get }
public static var lineLength76Characters: NSData.Base64EncodingOptions { get }

// Use zero or more of the following to specify which kind of line ending is inserted. The default line ending is CR LF.
public static var endLineWithCarriageReturn: NSData.Base64EncodingOptions { get }
public static var endLineWithLineFeed: NSData.Base64EncodingOptions { get }

Currently we are using: self.base64EncodedString(options: .endLineWithCarriageReturn)
On Android:
/**
* Default values for encoder/decoder flags.
*/
public static final int DEFAULT = 0;
/**
* Encoder flag bit to omit the padding '=' characters at the end
* of the output (if any).
*/
public static final int NO_PADDING = 1;
/**
* Encoder flag bit to omit all line terminators (i.e., the output
* will be on one long line).
*/
public static final int NO_WRAP = 2;
/**
* Encoder flag bit to indicate lines should be terminated with a
* CRLF pair instead of just an LF.  Has no effect if {@code
* NO_WRAP} is specified as well.
*/
public static final int CRLF = 4;
/**
* Encoder/decoder flag bit to indicate using the "URL and
* filename safe" variant of Base64 (see RFC 3548 section 4) where
* {@code -} and {@code _} are used in place of {@code +} and
* {@code /}.
*/
public static final int URL_SAFE = 8;
/**
* Flag to pass to {@link Base64OutputStream} to indicate that it
* should not close the output stream it is wrapping when it
* itself is closed.
*/
public static final int NO_CLOSE = 16;

Currently we are using DEFAULT (by mistake) previously was NO_WRAP
Let me test it and fix it. I will send PR.

ah - thanks!
in the mean time, workaround (on receive notification / read characteristic):
		let value = characteristic.value;
		value = value.replace(new RegExp(String.fromCharCode(10), "g"), "");
		decoded = Base64.toByteArray(value);

Added PR: #194

Sorry for the late answer. Thank you for the input, everything is working fine now :)

Hi i want to read data from Bluetooth..do you have any example?

So I've spent countless hours trying to understand why the commands I was sending to my external device using bluetooth was not working.
The device accepts byte arrays such as [0x10, 0x01]. I've tried so many different ways of encoding it in base64 with nothing actually working.
After working along side with another colleague we came to the conclusion that it just doesn't work because of how the ascii table works.
It's a great project, however I took an hour to switch libraries that accepts the ability to send byte arrays and it now works.
Please consider accepting byte arrays.

I've been using version 1.0.2 and after spending countless hours trying to send commands to my device, it just doesn't work.
I tried to encode [0x10, 0x01] into base64, I've tried (I think) almost every possible way. I worked with a colleague yesterday to try and finally get it working. We came to the conclusion that it was an issue with the ascii table.
I switched libraries that accepts byte arrays and it works fine now.

Someone managed to send byte array encoded as base64 using this library, without changing the peripheral protocol?


How do we capture the events emitted from custom vue components in the editor component?

Hey
How do we listen for the events emitted from custom vue component extensions?
<editor-content
  :editor="editor"
  class="editor__content"
  @myevent="myEventHandler"
/>

This doesn't seem to work.
The editor contains an extension that uses a Vue component which emits "myevent".
Feels like I am missing a middle step here.
Thanks!

Hey, I had the same problem and here is what I did:
In the mark-component, instead of
this.$emit('myevent')
I used
 this.$parent.$emit('myevent')
and then
<editor-content   :editor="editor"   class="editor__content"   @myevent="myEventHandler" />
should work. This way the editor-content emits this event and we can listen for it in editor wrapper. Hope it helps.

@jgabis Ohh - didn't think about that. Thanks!
I ended up passing a callback as an option to the extension, which is then invoked from the custom views. Not sure if I'll run into issues with it later or not - but for now, it solved my immediate use-case.


Cancelled TaskRun and PipelineRun Steps keep an invalid status

Came across some slight inconsistency in cancelled resources. The steps in a PipelineRun or TaskRun which has been cancelled keep their status' and reason messages.
Expected Behavior
Steps should reflect their state.
running and cancelled -> cancelled
terminated and cancelled -> terminated (which is the case)
waiting and cancelled -> not run (or cancelled ?)
Actual Behavior
These step states do not get updated on cancel.
Steps to Reproduce the Problem

Run a pipelineRun
Cancel
See the status of the steps in the pipelineRun and taskRun Resources

Additional Info
Relevant piece of a cancelled taskRun which was a part of a cancelled pipelineRun
spec:
  inputs: {}
  outputs: {}
  podTemplate: {}
  serviceAccount: default
  status: TaskRunCancelled
  taskRef:
    kind: Task
    name: task7
  timeout: 1h0m0s
status:
  conditions:
  - lastTransitionTime: "2019-09-30T16:31:02Z"
    message: TaskRun "gone-runnin-999-cancel-me2-task7-lgbtf" was cancelled
    reason: TaskRunCancelled
    status: "False"
    type: Succeeded
  podName: gone-runnin-999-cancel-me2-task7-lgbtf-pod-5db557
  startTime: "2019-09-30T16:30:24Z"
  steps:
  - container: step-task7step1
    name: task7step1
    waiting:
      reason: PodInitializing
  - container: step-task7step2
    name: task7step2
    waiting:
      reason: PodInitializing
  - container: step-task7step3
    name: task7step3
    waiting:
      reason: PodInitializing
  - container: step-task7step4
    name: task7step4
    waiting:
      reason: PodInitializing
  - container: step-task7step5
    name: task7step5
    waiting:
      reason: PodInitializing

The same from the pipelineRun
status:
  completionTime: "2019-09-30T16:31:02Z"
  conditions:
  - lastTransitionTime: "2019-09-30T16:31:01Z"
    message: PipelineRun "gone-runnin-999-cancel-me2" was cancelled
    reason: PipelineRunCancelled
    status: "False"
    type: Succeeded
  startTime: "2019-09-30T16:30:23Z"
  taskRuns:
    gone-runnin-999-cancel-me2-task1-2wwgs:
      pipelineTaskName: task1
      status:
        conditions:
        - lastTransitionTime: "2019-09-30T16:31:01Z"
          message: TaskRun "gone-runnin-999-cancel-me2-task1-2wwgs" was cancelled
          reason: TaskRunCancelled
          status: "False"
          type: Succeeded
        podName: gone-runnin-999-cancel-me2-task1-2wwgs-pod-3e124f
        startTime: "2019-09-30T16:30:24Z"
        steps:
        - container: step-task-one-step-one
          imageID: docker-pullable://ubuntu@sha256:b88f8848e9a1a4e4558ba7cfc4acc5879e1d0e7ac06401409062ad2627e6fb58
          name: task-one-step-one
          running:
            startedAt: "2019-09-30T16:30:41Z"
        - container: step-task-one-step-two
          imageID: docker-pullable://ubuntu@sha256:b88f8848e9a1a4e4558ba7cfc4acc5879e1d0e7ac06401409062ad2627e6fb58
          name: task-one-step-two
          running:
            startedAt: "2019-09-30T16:30:53Z"

It is possible to work out what has completed or will not run of course so this might be expected, if so feel free to close. If not I'd be happy to take this on.

/kind bug

/assign


Extensions - Improve notification dialog when installing an extension

When installing an extension, the Extensions viewlet is focused and the @installed query is being executed. It would be better if the notification that confirms the installation would contain a View Details which would load the Extensions viewlet and would select the installed extension.

Moving this to backlog, feel free to assign to Milestone you wish.

We closed this issue because we don't plan to address it in the foreseeable future. If you disagree and feel that this issue is crucial: we are happy to listen and to reconsider.
If you wonder what we are up to, please see our roadmap and issue reporting guidelines.
Thanks for your understanding, and happy coding!


I would like to update a previous upload

[Please easy english or easy japanese]
Feature description
I would like to update a previous upload. Is it possible with Slack APIs? If yes, you could output the unique Id in the actions output. Then add a new action input called "upload-id: string" that when set updates the previous upload.

@AllanOricil
https://api.slack.com/methods?filter=files
Slack API cannot edit file, so we should delete and re-upload.
Do you want slack-delete-file action?

You could just call the delete api when we configure your action to update an upload

@AllanOricil
I published v2.1.0. This version include delete_file_id_before_upload input option and uploaded_file_id output.
Those option are simple modification. So, if you want more option, please tell me.

@MeilCli you are fast


Training model for Japanese Text facing this issue, please help

Traceback (most recent call last):
File "train.py", line 96, in
training_model.fit_generator(train_generator, steps_per_epoch=int(train_generator.nb_samples / train_generator.batch_size), epochs=cfg.nb_epochs, verbose=1, workers=cfg.nb_workers, use_multiprocessing=True, callbacks=callbacks)
File "/home/eleven/ocr_keras/lib/python3.6/site-packages/keras/legacy/interfaces.py", line 91, in wrapper
return func(*args, **kwargs)
File "/home/eleven/ocr_keras/lib/python3.6/site-packages/keras/engine/training.py", line 1732, in fit_generator
initial_epoch=initial_epoch)
File "/home/eleven/ocr_keras/lib/python3.6/site-packages/keras/engine/training_generator.py", line 100, in fit_generator
callbacks.set_model(callback_model)
File "/home/eleven/ocr_keras/lib/python3.6/site-packages/keras/callbacks/callbacks.py", line 68, in set_model
callback.set_model(model)
File "/home/eleven/ocr_keras/lib/python3.6/site-packages/keras/callbacks/tensorboard_v2.py", line 116, in set_model
super(TensorBoard, self).set_model(model)
File "/home/eleven/ocr_keras/lib/python3.6/site-packages/tensorflow_core/python/keras/callbacks.py", line 1532, in set_model
self.log_dir, self.model._get_distribution_strategy())  # pylint: disable=protected-access
AttributeError: 'Model' object has no attribute '_get_distribution_strategy'

It seems to be a compatibility issue between TF and Keras. Are you using TF v2? I only used this code in TF v1 so it doesn't include any features that are only in TF v2. You can either try it in TF v1 or if you want to use TF v2, you could try to change keras imports so that it imports tensorflow.keras instead. I found this issue with the same error message. https://github.com/googlecolab/colabtools/issues/925

@kurapan by now you might have resolved possibly.
but you may give it a try
https://github.com/googlecolab/colabtools/issues/925#issuecomment-633889012


[ECS] Bugfix version BC breaks... again...

After composer update, I got this when running ECS:
 [ERROR] Class 'Symplify\SymplifyKernel\Console\AbstractSymplifyConsoleApplication' not found

Thinking it's one of your every day BC breaks I checked composer outdated:
symplify/coding-standard             v9.3.0   v9.3.11   Set of Symplify rules for PHP_CodeSniffer and PHP CS Fixer.
symplify/easy-coding-standard        v9.3.0   v9.3.11   Use Coding Standard with 0-knowledge of PHP-CS-Fixer and PHP_CodeSniffer.
symplify/easy-coding-standard-tester v9.3.0   v9.3.11   The Best Way to Test Sniffs and Fixers
symplify/phpstan-rules               v9.3.0   v9.3.11   Set of Symplify rules for PHPStan
symplify/set-config-resolver         v9.3.11  v9.3.11   Resolve config and sets from configs and cli opptions for CLI applications
Package symplify/set-config-resolver is abandoned, you should avoid using it. No replacement was suggested.

Clearly symplify packages were held back on v9.3.0 instead of updating properly. Of course that's no excuse for these versions to be incompatible with each other but let's move on.
When forcibly increasing the versions in my composer.json I got this:
    - Only one of these can be installed: symplify/easy-coding-standard[v9.3.3, ..., v9.3.11], friendsofphp/php-cs-fixer[v2.16.3, ..., v2.19.0]. symplify/easy-coding-standard replaces friendsofphp/php-cs-fixer and thus cannot coexist with it.

Isn't this weird? Afaik ECS was internally using php-cs-fixer classes. :thinking: I couldn't find any note in the changelog or release notes to suggest that something changed about this.

After changing friendsofphp/php-cs-fixer constraint to ^3.0, composer update passed but php-cs-fixer was not installed. Clearly due to the fact that ECS claims that it's replaced. But running ECS caused this:
 [ERROR] Interface 'PhpCsFixer\Fixer\ConfigurationDefinitionFixerInterface' not found

Okay, this interface was removed in php-cs-fixer 3.0. I was using it in my custom fixer with a note to replace with ConfigurableFixerInterface.
After that my Normalizer callback stopped working:
	protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
	{
		return new FixerConfigurationResolver([
			(new FixerOptionBuilder('file_matchers', 'List of regular expressions to match the files.'))
				->setAllowedTypes(['array'])
				->setNormalizer(
					static function (Options $options, array $value): array {
						foreach ($value as $regex) {
							Strings::match('', $regex);
						}

						return $value;
					}
				)
				->setDefault(['~.*~'])
				->getOption(),
		]);
	}

PHP Fatal error:  Uncaught TypeError: Argument 1 passed to App\Module\Core\PhpCsFixer\ImmutableObjectHasConstructorFixer::App\Module\Core\PhpCsFixer\{closure}() must be an instance of Symfony\Component\OptionsResolver\Options, instance of ECSPrefix20210513\Symfony\Component\OptionsResolver\OptionsResolver given, called in /app/vendor/symplify/easy-coding-standard/vendor/symfony/options-resolver/OptionsResolver.php on line 982 and defined in /app/src/Module/Core/PhpCsFixer/ImmutableObjectHasConstructorFixer.php:97

If course I'm not using $options there so I don't care about the type and I fixed it by simply removing the typehint.
However if I did need to use it then it would be big issue since I'm receiving a prefixed version instead so even using \Symfony\Component\OptionsResolver\OptionsResolver wouldn't have worked. Certainly something to look into with these callbacks... and prefixed version...

Also I'm very unpleasantly surprised that the change to prefixed version and php-cs-fixer 3.0 is not mentioned in changelog, release notes, migration textfile or anywhere else.

Hi,
it's right in the release post: https://tomasvotruba.com/blog/introducing-ecs-prefixed-and-downgraded-to-php-71/ Also checked by composer.json.
I'm investing my free time in here and would expect at least polite communication from your side too.
Closing for too much emotional rant at once.

it's right in the release post: tomasvotruba.com/blog/introducing-ecs-prefixed-and-downgraded-to-php-71

I don't follow your blog. I look at the github repo. The post is NOT linked from the repo anywhere.

You should, I post regularly about Symplify/Rector updates there.

That's cool but as a symplify user confused about a new version, how am I supposed to know that's the source to look at? :-P


Change README to markdown (badly)

This still needs code formatting and to change the badge link/style

Superseded by #27.


vsprojects/vcxproj/grpc++/grpc++.vcxproj

the file \src\cpp\common\core_codegen.h is embedded twice in the grpc++.vcproj. This causes an error with visual studio 2015 when the project will be reloaded.
Here is the snippet from the current projectfile where the the two lines with core_codegen.h are embedded. In he original file it matters the lines 339 and 343. line 343 should be deleted..
  <ItemGroup>     <ClInclude Include="$(SolutionDir)\..\src\cpp\client\secure_credentials.h" />     <ClInclude Include="$(SolutionDir)\..\src\cpp\common\core_codegen.h" />     <ClInclude Include="$(SolutionDir)\..\src\cpp\common\secure_auth_context.h" />     <ClInclude Include="$(SolutionDir)\..\src\cpp\server\secure_server_credentials.h" />     <ClInclude Include="$(SolutionDir)\..\src\cpp\client\create_channel_internal.h" />     <ClInclude Include="$(SolutionDir)\..\src\cpp\common\core_codegen.h" />     <ClInclude Include="$(SolutionDir)\..\src\cpp\common\create_auth_context.h" />     <ClInclude Include="$(SolutionDir)\..\src\cpp\server\dynamic_thread_pool.h" />     <ClInclude Include="$(SolutionDir)\..\src\cpp\server\thread_pool_interface.h" />   </ItemGroup>

We fixed this one, I believe.


fix: Update example deployment

What type of PR is this? (check all applicable)

fix

Description
Updates the aws deployment example.

This PR is included in version 1.7.3 :tada:


Run in foreground

Please provide a -fg option to run the process in the foreground. There are valid use-cases where people (including me) might want to run a go process with chroot/setgid/setuid in the foreground (ie, further restricting access in a docker container - which explicitly needs a foreground process).
If you'd like I can give a stab at the C code here and submit a PR, but I'm far from an expert in the area, I haven't touched C code in something like a decade.

I can see the use case - I will implement it with a flag, but not "-fg" as that is 2 chars.


Low rating? (temporary)

Hi @KAMiKAZOW! I saw that you rated the extension (thank you for doing so). I would like to know why you gave it a low rating so I can improve it :-)

Because your Extension makes Wikipedia unusable. How is anybody supposed to read anything here?

I found there's a Dark Mode under Gadgets, so your extension is useless anyway.

The Dark Mode gadget is not available for all languages (and it's only for users with an acount, right?). It's true that the grey-on-white is not ideal, but it occurs outside of normal articles.

I just fixed it, will include in next release:

IThat's not true @KAMiKAZOW - the Gadget is only available for users which means that this extension is not useless.

Look, I rated the extension the way it worked for me or more precisely how it did not.
I got tagged though online stalking, so just leave me alone if you don't agree. I did not look to be involved with this extension on GitHub.

I understand your point of view, sorry for bothering you. Just wanted the feedback


Will etcdctl3 still support backup?

Saw this https://github.com/coreos/etcd/issues/4896.
My questions are:

Will etcdctl3 still support backup? I could not see backup command code under etcdctl3.
What's the main purpose of snapshot/recover in #4896? What's the different with backup?

Snaphost = backup: check out https://github.com/coreos/etcd/blob/master/etcdctl/README.md#snapshot-subcommand


ENH: Robust and fast numerical derivative for error propagation

Is your feature request related to a problem? Please describe.
I am a particle physicist by trade, and error propagation is very important for us. We need to propagate errors through complex functions that may execute arbitrary code and whose analytical behavior we do not understand in detail. Therefore, it is important to have a reliable and fast black-box derivative that just works and does not require expert knowledge about the function.
Describe the solution you'd like.
I wrote the jacobi library (docs) which I would like to include in scipy. Jacobi is an implementation of John d'Errico's DERIVEST algorithm for matlab written from scratch. Jacobi has remarkable features that make it ideal for this use case. It is a fast, safe-to-use, black-box numerical derivative for many applications. I think it is a great match for a foundational scientific library like scipy. On top of the derivative, I wrote a function propagate which uses the derivative to do error propagation for any vector-valued function.
Jacobi uses an adaptive algorithm to compute the numerical derivative. It converges fast if the derivative is trivial (constant or linear) and it can handle functions which have poor numerical accuracy (they are numerically noisy, use single precision arithmetic etc.). The amount of numerical noise is detected automatically and propagated into an error estimate for the derivative, which is computed alongside the derivative. This is fairly unique for such a library. By default, the algorithm runs until the error on the result does not improve anymore (usually when it reaches machine precision), but one can also set an accuracy target and jacobi will stop once the estimated error drops below this target.
jacobi uses polynomial extrapolation, which is a higher-order form of Richardson extrapolation. Thanks to extrapolation, it can compute numerical derivatives to machine precision. The polynomial fit also provides the error estimate on the extrapolated derivative.
jacobi is written in pure Python and the implementation is written in a concise way by me, a Python expert and author and maintainer of several open source Python and C++ libraries. I am also the designer and author of Boost Histogram in the Boost C++ project. Jacobi uses only 250 lines. It is very fast, too, because it uses numpy array math efficiently. It is faster than numdifftools by up to a factor of 2 to 1000, depending on the problem.
Describe alternatives you've considered.

scipy.misc.derivative is too difficult to use correctly. The step size dx has to be provided by the user, it is not determined automatically. I cannot run this function like a black box and get my derivative to machine precision, I need to know what I am doing and set the parameters dx and order to suitable values, which I can only do optimally if I already know a lot about my function and its implementation. jacobi is a black-box derivative. It just works, parameters like step size and order are determined automatically from an iterative analysis of the function response.
scipy.optimize.approx_fprime or scipy.optimize.approx_derivative are not robust, cannot achieve machine precision unless "cs" step is used which is rarely possible in practice, and do not provide an error estimate. They call a low-order finite difference formula, which has sqrt(EPS) precision at best (unless "cs" step is used, which is rarely possible in practice), while jacobi often achieves EPS. They are not robust, because these algorithms cannot detect that the function is noisy; the step size that each algorithm selects to find the optimum between truncation error and round-off error is only valid for a function that calculates the correct result within a few ULPs. Non-trivial functions often do not achieve this. It is also possible that some part of the internal calculation is done in single precision, but the inputs and outputs are double precision. In that case, neither algorithm can detect the right step size. jacobi handles this case just fine, because it detects the precision of the calculation by probing the function response iteratively.
numdifftools offers a black-box derivative, but it is neither robust nor fast. It does not provide an error estimate. The implementation is also much more complex than jacobi due to excessive use of code structuring.
automatic differentiation libraries like JAX are very intrusive, this is bad. They cannot be integrated into an existing code base, one has to write the application around the AD library. Jacobi can be integrated into any application and it can calculate the derivative for any function, whatever the implementation of that function does (it could call into C or Fortran, use numba, etc.).

Additional context (e.g. screenshots, GIFs)
Jacobi is not intended to provide first derivatives for numerical minimizers like those accessible via scipy.optimize.minimize. It is not a replacement for scipy.optimize.approx_fprime or scipy.optimize.approx_derivative. Numerical minimizers are designed to handle imperfect derivatives that can be computed very fast. Jacobi is not fast enough for those applications and too accurate.
Check out https://hdembinski.github.io/jacobi/ for plots and benchmarks that show how well jacobi works.

The license of the Matlab program appears to be the two-clause BSD (FreeBSD), which is compatible. 👍 I'll take a look.
Can you see a need for implementing other algorithms if we were to include this one? There was talk of a (scipy.diff)[https://github.com/scipy/scipy/issues/7457] subpackage a while ago (and long before that one, I think).

I rewrote the code from scratch using only the documentation of the algorithm, so the original license shouldn't be a concern, but like you said it is also compatible.
I agree with the API choice in https://github.com/scipy/scipy/issues/7457

Have you considered https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.approx_fprime.html#scipy.optimize.approx_fprime

Can you see a need for implementing other algorithms if we were to include this one?

No, I don't see that need. The precision, speed, and robustness of jacobi outperform other numerical algorithms known to me. It is possible to be faster than jacobi by sacrificing precision or robustness. I think we don't want to sacrifice robustness. jacobi also offers a tolerance keyword to trade precision against speed.
I have researched numerical derivatives for a long time and I haven't come across anything as good as DERIVEST/jacobi for this problem.

Have you considered https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.approx_fprime.html#scipy.optimize.approx_fprime

@j-bowhay Thanks for reminding me, I added why approx_fprime is not an alternative to my initial statement.

As a drive-by comment, when there's a comparison to other tools, it'd be nice to compare to approx_derivative. (I realize these two are very different)

My comments regarding approx_fprime and approx_derivative are the same, because those two functions despite some differences in implementation, fundamentally are based on the same concept. They do a single finite-step to compute the derivative, while jacobi uses several steps at different step lengths and extrapolates to zero step length.

Is that like Richardson extrapolation?

Polynomial extrapolation is generalized Richardson extrapolation. Richardson is linear extrapolation. Polynomial extrapolation uses a higher order polynomial.

This sounds great to me.
Where do you think it belongs in SciPy? Do you think it deserves a new subpackage, scipy.diff?

Polynomial extrapolation is generalized Richardson extrapolation. Richardson is linear extrapolation. Polynomial extrapolation uses a higher order polynomial.

How do you select the defeee of this polynomial? What controls the extrapolation not going away from the data?

The degree of the polynomial is 3 and it is fitted with the last 4 values in a series where the step size is always reduced. For a smooth function, reducing the step size always improves the derivative until round-off error takes over. The algorithm iterates until the round-off error is dominant. There is no control that the extrapolation is going away from "the data" but you never have that guarantee. I cannot give you proof, but the algorithm works because convergence is basically guaranteed.

Is there a published paper on such an approach ?

John d'Errico wrote up the ideas on which I based my implementation, but I don't know of any publication.

Where do you think it belongs in SciPy? Do you think it deserves a new subpackage, scipy.diff, or would it fit into an existing subpackage?

@mdhaber I am not sure what the best place would be. I think it should not go to scipy.optimize, to not create a false association with optimization for which the algorithm is not intended.
Perhaps it is reasonable to add a whole submodule like scipy.diff, assuming we probably want to add more functionality in the future. Right now, jacobi can only compute the jacobi matrix (first derivative). Eventually I want to also add the hessian as well, at the very least. In principle, one could also consider calculating even higher derivatives.
We could also discuss where the error propagation code should go that uses the jacobi matrix. scipy.stats?

I'd lean toward scipy.diff. The idea has been met favorably before - it was a Google Summer of Code project five years ago, but the code just didn't turn out to be something we could release publically.
Just so that it's all in one place, here is some background reading:

gh-2035
a fairly detailed scipy.diff proposal
mailing list discussion
gh-7457
SciPy 1.9.0 detailed roadmap  calls for more extensive differentiation capabilisities
The SciPy 1.1.0 roadmap was the last to mention scipy.diff by name

But I think you make a strong case for why this is different and superior in some ways to existing tools: very accurate derivatives for black-box (and potentially noisy) functions, IIUC.
Before we add a whole submodule, though, we'll need to hint at where it's going. Could you suggest what other functions and classes the submodule might have?

We could also discuss where the error propagation code should go

Is that as simple as multiplying the derivatives by some finite errors on the input to calculate finite errors on the output?

Is that as simple as multiplying the derivatives by some finite errors on the input to calculate finite errors on the output?

Yes, the math is simple: for a function y = f(x) where x and y can be vectors of arbitrary length (generalizing this, we could allow for arbitrarily shaped arrays x and y), one computes the Jacobian and then via C_y = J C_x J^T, where C_x is the covariance matrix (or in general a "tensor") of the input and C_y is the covariance matrix (or in general a "tensor") of the output.
The implementation of the propagate function in jacobi is a bit more complex to handle special cases, e.g. what if C_x or C_y are scalars. I decided to also cover the use-case where f has several independent arguments f(x, y, ...). This is convenient for the users, and the computation can be more efficient since we know that correlations between x and y are zero.

I can see why the error propagation code might belong in stats. On the other hand, it is a relatively simple calculation if you already have the Jacobian, so users will probably need it most often when computing the Jacobian with a feature in scipy.diff. From that perspective, I can see an argument for putting it in scipy.diff, too.
Would you be willing to write out a few thoughts on what you think a scipy.diff might look like in two years? I think people will want to see what besides the Jacobian code (and possibly this error propagation code) will go there before creating a new subpackaage. Then, I think we should send an email to the mailing list about it, and if there are no concerns, we can go ahead and implement it.

scipy.misc.derivative is too difficult to use correctly. The step size dx has to be provided by the user, it is not determined automatically. I cannot run this function like a black box and get my derivative to machine precision, I need to know what I am doing and set the parameters dx and order to suitable values, which I can only do optimally if I already know a lot about my function and its implementation. jacobi is a black-box derivative. It just works, parameters like step size and order are determined automatically from an iterative analysis of the function response.
scipy.optimize.approx_fprime or scipy.optimize.approx_derivative are not robust, cannot achieve machine precision unless "cs" step is used which is rarely possible in practice, and do not provide an error estimate. They call a low-order finite difference formula, which has sqrt(EPS) precision at best (unless "cs" step is used, which is rarely possible in practice), while jacobi often achieves EPS. They are not robust, because these algorithms cannot detect that the function is noisy; the step size that each algorithm selects to find the optimum between truncation error and round-off error is only valid for a function that calculates the correct result within a few ULPs. Non-trivial functions often do not achieve this. It is also possible that some part of the internal calculation is done in single precision, but the inputs and outputs are double precision. In that case, neither algorithm can detect the right step size. jacobi handles this case just fine, because it detects the precision of the calculation by probing the function response iteratively.

Would the addition of scipy.diff replace these in the long term?

As info: I guess it was some other scipy issue or mailing list thread that mentioned https://github.com/maroba/findiff.
For several tests in scikit-learn, a better numerical derivative function would have been very convenient!

@mdhaber I would like to start working on this in the next week. Do you have any suggestions how to start? Should I write function stubs first so that we can review the structure or should I start with a copy of my existing Jacobi library and we start iterating from there?

@lorentzenchr mentioned FinDiff, which allows you to compute arbitrary orders of derivatives. Jacobi can only do first derivatives at the moment, although the algorithm should generalize to higher orders.
The key feature that Jacobi has and FinDiff seems to lack, is the robustness of the derivative against noise in the function, and that you can specify in advance how accurate you want the derivative to be with a tolerance. FinDiff uses higher order formulas and you can specify the accuracy by the order of the formula, but that does not tell you anything about the final tolerance of the derivative.

Do you have any suggestions how to start?

I think it's worth hammering out where we think it should go. To some extent, that will determine who will review it and help maintain it in the future.
if you envision a new module, I'd suggest writing more about what the module would look like in a few years when more features have been added (
https://github.com/scipy/scipy/issues/17059#issuecomment-1263964068).
I can also see this function in scipy.stats next to the proposed sobol under a "sensitivity analysis" heading (global vs local). Once it can do second derivatives, it would also be useful internally for an accurate calculation of the Fisher information matrix for confidence intervals of fit.
Once we have a proposed location, it does need an email to the mailing list.

Should I write function stubs first so that we can review the structure or should I start with a copy of my existing Jacobi library and we start iterating from there?

In the meantime, yes,  I think it's good to start looking at function signatures. Maybe with a draft of the documentation that would appear in SciPy?

A slight preference for integrate over optimize and stats I think, but definitely not ideal. stats would probably be better than optimize.

~three functions (e.g. derivative, jacobian, hessian) would not really be enough for a full-blown sub-package

Sure, it would be a very small subpackage, but is that a problem? As long as we communicate the scope of the subpackage clearly, having a few very general purpose tools be exposed in a sensible place seems worth it. I haven't looked through the history, but maybe being less ambitious and starting small will be enough to make it doable.

differentiate is great, but it's for a very specific task. I would hazard a guess that optimize._numdiff.approx_derivative would offer 90% of what people wanted. Perhaps we could make that public?
But then approx_derivative does have many drawbacks. It doesn't offer arbitrary order, and its functionality is specifically targeted to help minimisation. If one wants to develop further features then it's getting into a discussion of a full-blown subpackage that would replicate a lot of what numdifftools offers.

I would hazard a guess that optimize._numdiff.approx_derivative would offer 90% of what people wanted. Perhaps we could make that public?

Sure, that would be great in optimize as a replacement or alternate method for the already-public scipy.optimize.approx_fprime. As you note, derivative, jacobian, and hessian would be geared toward a different task.

scalar derivatives, Jacobians, and Hessians

Clarity of scope and naming is important. If I see derivative, jacobian, hessian I would assume that they would differentiate anything, including the general non-elementwise R^n --> R^m.
If the suggestion is to have elementwise derivative, jacobian, hessian for R^1 --> R^1, then a name should be along the lines
elementwise_scalar_derivative, elementwise_scalar_hessian, etc.
i.e. general names like derivative shouldn't be use if they're not geared towards a wider scope of differentiation functionality.

I would assume that they would differentiate anything, including the general non-elementwise R^n --> R^m.

I think there's a misunderstanding. jacobian is for R^n --> R^m functions. The meaning of "elementwise" in that context is that it can evaluate not only the Jacobian at a point in a vectorized call (no loops), but it can do arbitrary numbers of points (arranged in an array with an arbitrary number of dimensions) in a single call. hessian would be similar. They are all built up from differentiate.

The meaning of "elementwise" in that context is that it can evaluate not only the Jacobian at a single point in a vectorized call (no loops), but it can do arbitrary numbers of points in a single call

ok. The misunderstanding arose from reading the differentiate docstring.

func(x)[i] must equal func(x[i]) for all indices i

There's no way that this can be the case for R^n -> R^m where x.shape == (n,).
I had a look at the gh-20063 and compared the jacobian function given there against approx_derivative for a simple example. The output from jacobian is less accurate. I wasn't expecting that given the default order for finite differences is 8.
The simple example was:
def f(x):
    return np.array([np.sin(x[0]), np.cos(x[1]), np.sin(x[1]) * np.cos(x[2])])

These are great things to bring up when jacobian is under review. There's not a PR for that yet, so I went ahead and responded in https://github.com/scipy/scipy/pull/18811#issuecomment-2062999571. In short, the maximum absolute accuracy of the zero elements (~2e-13) is somewhat high because the default atol is too strict (essentially 0), but the absolute accuracy of the nonzero elements is better than 1e-14.
In case others are just coming to this issue, please see https://github.com/scipy/scipy/issues/17059#issuecomment-2062195681!

The meaning of "elementwise" in that context is that it can evaluate not only the Jacobian at a single point in a vectorized call (no loops), but it can do arbitrary numbers of points in a single call.

Maybe, it’s worth to consider some standard for the axis of the function argument x, e.g. first axis is for the "points/elements", the other axis for the function signature $R^{m,..,n} \rightarrow R^{?}$.

Yes, that I've thought about a lot in this and other contexts. As you wrote, there could be a fixed convention - and currently, the convention is for the 0th axis to correspond with the dimensionality of the input. This allows functions written like the example above to work without modification when x becomes multidimensional. Of course, the other option is to accept an axis argument. (But usually axis means the axis along which a reduction occurs, which isn't happening here.)

Sorry for my silence, but I really think this is a great development, and I hope you, @mdhaber, can push through with scipy.diff or rather scipy.differentiate, which has a nicer symmetry with scipy.integrate.

@HDembinski @laurent90git

Is there a published paper on such an approach ?

I also sometimes use polynomial extrapolation to zero and I "accidently" stumbled over this issue which seems to be quite mature already. However, for completeness I want to add that this approach is described in
Schwarz H.R., Köckler N. Numerische Mathematik, 2011, DOI
It's a german source which I think is a bit unfortunate because the content is really good. In the book version from 2009 (first publication was 1986 and I think it was already described there), example 3.5 in chapter 3 "Interpolation and Approximation" demonstrates how polynomials can be used to extrapolate accurate derivatives. There, they fit fully determined polynomials, e.g., the mentioned 4 data points for degree 3. I personally prefer to add a few more data points because then, error estimates are quite straightforward by computing the confidence interval at the extrapolated value (when you compute the small SVD, you get them basically for free).
However, they don't mention how the step size of the derivation can be chosen automatically to enhance the numerical precision in this context and I like the function/data-driven approach I found in this issue.

Thank you for the pointer to this resource, that's very much appreciated. In principle, the step from linear extrapolation to polynomial extrapolation is natural, but since it is not covered in most text books, I wouldn't call it "well established".


Add the ability to download gcloud SDK

If user has the module without the Cloud SDK installed, the module will proceed to install the SDK. This scenario is needed when we publish the module to the PowerShell Gallery without the SDK.

This change is

@ILMTitan PTAL

Thanks!


DSPaSh

Distributed execution of shell files.
This PR contributes the following

Compiler:  Infrastructure to execute bash scripts over a cluster of machines. This includes graph splitting, managing workers' load, distributing tasks while makings sure reads/writes to files/named pipes happen as if they were done locally.
Runtime: An implementation for simple pipe over sockets to better control communication/socket behavior
Additional flag --distributed_exec to the pash runtime
Setup scripts to build runtime

This commit depends on changes in main that are not synced with future yet.

@tammam1998 would it be best to review this together on Tuesday?

Yes let's review together on Tuesday! We need to review both the new code, but also make sure that any changes to already existing PaSh code do not cause any issues :)

Added docs and removed changes unrelated to the PR. The PR is ready for merge


Working with the time zone

Hey,
I used SunKit and MoonKit in my upcoming application. I like them and it's great that the classes are still alive and that you keep improving them.
In practical implementation, I've encountered difficulties when working with time zones and would have a tip for an improvement that would greatly simplify their use.
My difficulties:
When I want to use a Sun class for a time zone other than the current time zone, I have to work very carefully with the time zone.
For example: the facility is located in Prague and I need the position of the sun during the day in Cupertino.

Before initializing, I need to calculate the time zone offset in Cupertino and pass it to the Sun class as a Double
pre-shift each date set via setDate() to the Cupertino time zone
in addition, I have to recalculate and set setTimeZone() before setDate() because the previous date could have a different DST

This is not a safe and convenient solution.
That's why I propose to initialize the Sun class with the TimeZone class.
The Sun class can then do all the necessary conversions for time zones by itself:

calculate the time zone offset itself
adjust the time passed via setDate by itself
calculate the DST itself

Michal Kus

Hi Michal, thanks to have starred both SunKit and MoonKIt.
Please be aware that the date you are setting with setDate method is timezone agnostic.
It's more easy for me to explain it with an example:
   ```

let naplesLocation: CLLocation = .init(latitude: 40.84014, longitude: 14.25226)
let timeZoneNaples: Date = 1
//Step1: Creating Sun instance in Naples and with timezone +1
var sunUnderTest = Sun.init(location: naplesLocation, timeZone: timeZoneNaples)
//Step2: Setting current date 11/03/23 10:22 as date.
var dateUnderTest = Date()
sunUnderTest.setDate(dateUnderTest)
let tokyoLocation: CLLocation = .init(latitude: 35.68946, longitude: 139.69172)
let timeZoneTokyo: Double = 9
sunUnderTest.setLocation(tokyoLocation)
sunUnderTest.setTimeZone(timeZoneTokyo)
sunUnderTest.azimuth   //This is the azimuth of the Sun in Tokyo at 11/03/23 10:22 local time in Tokyo,no conversion is needed

Said that, I get your point, and I will work to improve SunKit and the way It handles timezones and location changes on the branch related to this issue.
The issue will stay open until the changes are on master.

Thank you, and I will look forward to the edit.
Even in its current state, your libraries are good and usable. Unfortunately the current work with the Date class is not correct.

Hi Michal,
here you can find more on what has been done: Link.

Thank you for your lightning response.


Make BlazorMobile, ElectronNET aware

Make BlazorMobile, ElectronNET aware.
As it would be nice if the two can work together without bug / friction.
Meaning:

[x] BlazorMobile initialization from Blazor in .NET Core / ElectronNET should work
[x] BlazorMobile initialization from Blazor in .NET Core / ElectronNET do not need any external device as it is itself the whole app environment.
[x] Dropping local websocket code and behavior in ElectronNET as this bridge is not required.
 In reality, this is not really needed in ElectronNET as Blazor code and ASP.NET Core are in the same memory space. But we need to mimic a consistent behavior in order to have a sort of "Plug and play" full portable BlazorMobile app.

When this will be done we should be able to ship application on Windows, Linux and macOS.

Done !
I'm pretty sure that some things must be improved and tested, but samples are working on the test project.
The only downside is that there is no built in way to show a system alert from ElectronNET, while Xamarin.Forms was prepared to. Only writting to the Console on the current test sample, but this can be easily worarounded with a call to a Web dialog , or with some other service injection.

Added task


The Car's App

In this branch we did the following:

Fetched data from the car API
Performed reducers actions
Add filters routers
Added components
Styled components
Performed Units tests
Deployed the App

Hi @peterrobert,
Seems like yo forgot to write the changes that I have to implement

@camilevahviraki kindly check above on the last review

@codepantha on the change requested for the readme

Thank you @peterrobert,


Missing Cognito Groups and User Group Membership

Cognito stores groups and user membership information which is critical for associating users with Roles and therefore with shared permissions. Even if the roles fell outside of the scope of Cognito User Pools (being in Identity pools, not user pools), having the group information and membership would be an important part of the functionality of Cognito that should be retained through backup, restore, and migration.

Yes this will be very handy

Same here we needed to import the groups as well

There is a way to do it, you need to get the group in the generated file and then when resetting the json you need to assign the new group.

I'm going to try to do it.

I've created a PR that I think addresses this: https://github.com/rahulpsd18/cognito-backup-restore/pull/37

My tool supports backing up and restoring groups and relations: https://github.com/mifi/cognito-backup

My tool supports backing up and restoring groups and relations: https://github.com/mifi/cognito-backup

I was tired but its not working

My tool supports backing up and restoring groups and relations: https://github.com/mifi/cognito-backup

I am getting cli.js file errors

Same here we needed to import the groups as well

Hey bro did you find the any solution for the group


It doesn't work properly in firefox

I've used this module but in firefox it doesn't calculate width of each slider correctly!
it's okay in Chrome,Opera & Microsoft Edge but not in firefox.

Same here. Did you find a solution yet?

Well it's a bug in this module, I hadn't enough time to fix the bug so I've used other library for it vue3-carousel-nuxt

I think the bug comes from the version of swiper. I added those lines into package.json file and reinstall then it works.
"resolutions": {
    "swiper": "^11.0.5"
  }

this is just a temp solution, the owner should upgrade the version of swiper modules to remove this issue totally.

Moving away from swiper vue in favor of elements as noted in the important update discussion. If you want to test please check out the latest draft PR that is open.
Thanks,
CP


Added Pagination Component to Storybook

Added a Pagination component story to Storybook for better visualization and testing.
Maintained state in the Storybook story to demonstrate the Pagination component's functionality.

Ready for review and feedback.

I am new to this. Apologize if the last merge was not correct but I think the build failed. I have updated the packages/index.tsx

I am new to this. Apologize if the last merge was not correct but I think the build failed. I have updated the packages/index.tsx

no worries

I am new to this. Apologize if the last merge was not correct but I think the build failed. I have updated the packages/index.tsx

No worries, I can help you


Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.

Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.

This is a duplicate of #634

This was fixed with #662 and will be released shortly as<EMAIL_ADDRESS>


Fix typos

Fix typos and grammatical errors in the How to Contribute file

How-to-Contribute.md
Fixed typos

@EnigmaDamn Thank you. But why didn't you make a pull request?


Electron 37

Added a default background image with relative config
Also merged master onto electron-37 branch to take care of conflicts

@lneir Please review.

pr not needed.


Annotations/QueryCount.php

This file is not covered by test, despite the corresponding parameter is defined: https://github.com/alexislefebvre/LiipFunctionalTestBundle/blob/39d450b883e11c76defd5b67bcab5182dc75ae8d/Tests/App/config.yml#L31

See https://github.com/liip/LiipFunctionalTestBundle/issues/207.


Doesn't seem to work with ES Class components

I converted the child components and those worked good, but after I converted the parent component, which was an ES Class, it no longer worked. I think the @ on the args isn't passing the data to the child components. Here's my code:
<LayoutsList
  @name='Preview'
  @type='preview'
  @sortable=false
  @layouts={{previewLayouts}}
  @dataset={{dataset}}
  @onChangeOrder={{route-action 'changeOrder'}}
  @onAdd={{route-action 'add'}}
  @onEdit={{route-action 'edit'}} />

And passing {{@name}}  to a child component doesn't work, but {{name}} does. cc @pzuraq
P.S. Using @ args in a non ES Class component does work.

Can you post the template and class definition for the component?

<h4>{{@name}}</h4>

{{#if @sortable}}
  <SortableDataTable
    @editIdKey='pk'
    @addLabel='Add Layout'
    @data={{@layouts}}
    @columns={{@columns}}
    @onAdd={{action @onAdd}}
    @onSort={{action @onChangeOrder @layouts}} />
{{else}}
  <DataTable
    @editIdKey='pk'
    @data={{@layouts}}
    @columns={{@columns}} />
{{/if}}

import Component from '@ember/component';
import { get } from '@ember/object';
import { action } from '@ember-decorators/object';
import uuid from 'npm:uuid';

export default class LayoutsList extends Component {
  sortable = true;

  constructor() {
    super(...arguments);

    let type = this.type;
    let dataset = this.dataset;
    let actions = [
      {
        name: 'Edit',
        icon: 'fa-pencil',
        primary: true,
        action: (datum) => {
          let layoutId = get(datum, 'pk') || uuid.v4();
          let datasetId = get(dataset, 'id');

          return this.onEdit(datasetId, layoutId, type);
        }
      }
    ];

    let columns = [
      { name: 'Name', key: 'name' }
    ];

    if (type !== 'preview') {
      columns.push({ name: 'Type', key: 'layoutType' });
    }

    columns.push({ name: 'Actions', type: 'actions', actions });

    this.columns = columns;
  }

  @action
  add() {
    let dataset = this.dataset;
    let type = this.type;
    let layoutId = uuid.v4();
    let datasetId = get(dataset, 'id');

    return this.onAdd(datasetId, layoutId, type);
  }
}

Note that {{@name}} and {{@sortable}} (ones not passed to child components render fine.

Can you help whip up a repro? I suspect there is an interaction with how we expect the setter CP to be ran in the polyfill, but having a demo would make it easier to dig in...

One note is that @columns will be null because it’s not an argument passed to <LayoutList>, it’s set directly on the class in the class constructor.

Ah, and that note solved the issue. Reaping benefits already from this setup! My bad!


MD051 support icon

[🔀 distributive](#🔀-distributive)

## 🔀 Distributive

...

This rule expects the GitHub representation which is described at the bottom of the documentation and does not include emoji: https://github.com/DavidAnson/markdownlint/blob/main/doc/md051.md
If that representation is used, no warning is produced: https://dlaa.me/markdownlint/#%25m%23 🔀 Distributive

[🔀 distributive](%23-distributive)

The rule is operating as intended.

Maybe this is an issue on vscode. The #-distributive without the emoji does not work.

From what I can tell, GitHub web does not recognize the link in your example - whereas it does for the link that markdownlint accepts in my demo. In the interest of supporting a single canonical way of defining heading links which are not part of the CommonMark specification, GitHub seems to be the next-best authority on Markdown (see: GitHub Flavored Markdown). As such, I feel the current behavior of markdownlint is reasonable and I encourage you to open an issue in the VS Code repo for them to allow or convert to GitHub's approach.

Hi, I stumbled upon this issue as well. I realised that mkdocs removes the leading -, hence in your case the correct link would be #distributive. Do you think there is the space to add a possibility to configure the removal of leading dashes? Thanks!

@giacomorebecchi, can you link to the documentation, specification, or implementation of that mkdocs behavior?

@giacomorebecchi, can you link to the documentation, specification, or implementation of that mkdocs behavior?

I couldn't find an explicit reference in the documentation, but, after a bit of deep-diving, I found out that:

Anchoring links in mkdocs are calculated by the toc extension
toc calls the slugify function to transform a Heading into the correct link (see here the source code)

slugify(" My test 🐛", "-") == "my-test"
slugify("🐛 My test 🐛", "-") == "my-test"

The reason is that it calls strip before replacing whitespaces with -

FYI you can see that the issue on vscode is closed: https://github.com/microsoft/vscode-markdown-languageservice/issues/171
Next version of vscode will have the fix.

Thanks! It sounds like VS Code is also standardizing on GitHub behavior. That doesn't mean markdownlint can't also allow other forms, but it makes it a bit less interesting in my mind.

@DavidAnson I understand that it looks minor to you, but do you see the opportunity to accept a contribution to make this behaviour parametrisable? It would turn out to be very useful for me! If yes, I could try to work on it (although I've never written anything in JS, but that would be a nice chance to learn). Thanks in advance!

@giacomorebecchi I'm not intimidated by the amount of work here. I am questioning whether it is a good change to add. So far, when dealing with syntax and behavior that is not part of the CommonMark specification, I have used the GitHub-Flavored Markdown specification and that has worked well. This behavior is not described there, but by matching GitHub, I feel this behavior is consistent with that spirit.
The kind of changes here do not seem to lend themselves to expressing abstractly with text or regular expression, so the customization mechanism may need to be implementing multiple behaviors in the rule and allowing people to choose among them. (Allowing both implementations together creates situations where mistakes are not detected.) That is additional complexity for me to deal with and it opens the door for people with other scenarios to want to add them as well. My impression (and I do not have data for this, so would welcome it!) is that GitHub and VS Code represent the vast majority of the use of heading links in practice, so the benefits of doing so are limited.

@DavidAnson I understand your point, thanks for the detailed explanation! I have no data regarding usage of GitHub and VSCode w.r.t. Mkdocs. I think I will proceed by making an alternative extension to toc that follows GitHub-Flavored Markdown specification. Thanks again for your work and support!


Version 1.0.0 Testing

I tested the new version 1.0.0 of the application and the controls do not appear to work except for Orientation. Is there a button I need to press to have the changes take effect immediately? Also, the load and save settings does not appear to work. I have to stop/and start the service to have changes take affect.

Fixed with this merge - https://github.com/monkeymademe/picamera2-WebUI/pull/64/commits
sorry about that bad merging before
New version https://github.com/monkeymademe/picamera2-WebUI/releases/tag/v1.0.1 is out


cli.py

changing some words in this program

We format code for better readability. It is required. Plus, I do not see why you would want to write code like... the way you have.
Going through PEP-8 Guide might help you understand why this pull request is not redundant but also "harmful"


connection tracking state-policy if-bound for transparent bridges

Hi,
default pf connection tracking ignores the interface, this state-policy is called "floating".
For transparent bridges this does not work if multiple networks share the same firewall, as the "allowed outgoing packet" from network <IP_ADDRESS>/24 creates a state which is used to allow the packet to enter network <IP_ADDRESS>/24 - without evaluating any rules of the associated interfaces, as there is a state.
> <IP_ADDRESS>
> +------------+
>              |
>              |
>              |
>              |
>              |
>         +----v----+      +---------+
>         | IIF0001 +------> OIF0001 +----+
>         +---------+      +---------+    |
>                                         |
>               +-------------+           |
>               |             <-----------+
>               | Router      |
>               |             +-----------+
>               +-------------+           |
>                                         |
>         +---------+      +----------+   |
>   +-----+ IIF0002 <------+ OIF0002  <---+
>   |     +---------+      +----------+
>   |
>   |
>   |
>   |
>   +--------> <IP_ADDRESS>

Imagine IIF* and OIF* to be on the same pfsense machine - even if the drawing can be read otherwise.
With netgate/pfsense they choose to remove the functionality to evaluate the state-policy from kernel. While it does not fix the issue, it adds a lot to the principle of least surprise. It is surprise to see rules to be if-bound when dumping, but not having any form of changed behaviour.
if-bound can be a per-rule option or set globally. I think both options can be valid at times.
For now I could live with a standardized but cheap way to smear a
set state-policy if-bound

to the head of rules.debug.

@commonism we'll add an option, sounds reasonable to me. If I can find some time around the weekend, I'll prepare a patch.

@commonism as promised, https://github.com/opnsense/core/commit/09a13913ec94040f3f15f49306aa789904f5c481 adds an option in the advanced section.


Add SIGQUIT event handler

I have an app that uses a SIGQUIT signal to terminate a process.
IMO this should also be supported.

Sounds good. Released in 2.3.0. Thanks for the patch!

Thanks :+1:


K8SSAND-1780 ⁃ Unable to open hint directory /opt/cassandra/data/hints

Hi, I got error message like below:
ERROR [BatchlogTasks:1] 2022-09-15 01:42:42,107 CassandraDaemon.java:587 - Exception in thread Thread[BatchlogTasks:1,5,main]
org.apache.cassandra.io.FSWriteError: java.io.IOException: Unable to open hint directory /opt/cassandra/data/hints
...
Caused by: java.io.IOException: Unable to open hint directory /opt/cassandra/data/hints
...
ERROR [BatchlogTasks:1] 2022-09-15 01:42:42,107 DefaultFSErrorHandler.java:64 - Stopping transports as disk_failure_policy is stop

Also there're other error messages like Reading cardinality from Statistics.db failed for /var/lib/cassandra/data/system_auth/role_permissions-3afbe79f219431a7add7f5ab90d8ec9c/nb-4001-big-Data.db
I got another issue #401. I don't know if they are related but they happened in two different nodes of same cluster. #401 happens right after deployed few days ago, this issue happens today.
How should I fix it? Thanks for help!
┆Issue is synchronized with this Jira Task by Unito
┆friendlyId: K8SSAND-1780
┆priority: Medium

I'm beginning to wonder if this has nothing to do with cass-operator, but the SMB CSI driver you're using. Could you try with something else? The CSI -> SMB sounds pretty hacky approach in most cases.

okay. I know there's local-path-storage to store in local, but local sounds will directly cost kubernetes node compare to mount to other server using csi-smb. Is that correct? Do you have another better way to mount and persist data? Thanks.

Hey, at least one thing is wrong in that StorageClass, since cass-operator requires
volumeBindingMode: WaitForFirstConsumer for a StorageClass. Also, we use uid=999, gid=999 for our cassandra user, so that might also be something that causes issues on your end if the SMB server user rights look wrong (I don't know why they need to be enforced in a CSI driver though).

As to which CSI driver is correct for your use-case, it's difficult to say - that's a bit more complex and depends entirely on your hardware setups, software, network, policy etc. and is out of scope of this project. We do personally test with cloud provider CSIs and local-paths (and some other local-path-alikes), but beyond that we can't sadly test every possible one.

thank you, let me tweak the storage class and see.

I changed to "volumeBindingMode: WaitForFirstConsumer" , uid=999, gid=999 but still has #401 issue. Let me try the local-path-storage.

That depends entirely how you want to store the data. local-path-storage stores it on the disk of the Kubernetes node.


feat: add support for llama 3.1 8b and 70b for groq

Added support for LLaMA 3.1 in GROQ. Will include support for the 405b version upon its public release.

Hi @mapringg - thanks! I literally just added it to the big-agi-2 branch. I'll go ahead and compare to your impl :)

@mapringg - some info:

thanks for the responsiveness!
I've merged the changes queued up for big-agi-2, as there were a couple more changes (max tokens out)
I put the same hidden models as you did - good picks :D
apologies I didn't merge yours, but was literally over the same data (would have conflicted)
below some insights on how I performed the change, with big-AGI-2

(do not use big-agi 2 yet! too unstable and will corrupt data)

(do not use big-agi 2 yet! too unstable and will corrupt data)

@enricoros No problem. I use this project daily and would like to help in any way that I can.

@mapringg feel a good feature that's missing and would make you more efficient - and add that. I'm here if you have any questions. I'll merge any quality code.


Show no mentors found when no mentors after filter

Added an image and a caption to display when no mentors are found

Awesome job !


fix(es/compat): change array spread syntax result on loose mode

Description:

Related issue:

Closes #7354

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.lsdyi seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

@Kaciras Sorry to push code without tests. I'm new to this repo🥹, kind of confused where I can complete whole testing process. I noticed we can write input/index.js and inpuit/.swcrc which I think are input example, but I'm confused how I can generate output, which is output/index.js

You can do UPDATE=1 cargo test

Also, can you sign the CLA?

CI is failing. You can update snapshots with UPDATE=1 cargo test

@kdy1 Thank you for the reminder. I'm

Hello @kdy1 , I update the testing file and snapshots. Could you please help me check the code?

Thanks for the CR yesterday @kdy1 , is there anything I can do with this PR?

Please remove the redundant clone. It's removable

Good afternoon ☕ @kdy1  I've removed the redundant clone() method and collected list elements in a specific new for loop. Could you please help me check whether the code meets expectation?


TypeError thrown when event received.

TypeError thrown when event received.
Running in nodejs, I watch for the following event:
    event Transfer(address indexed _from, address indexed _to, uint256 _value);

When the event occurs, an exception is thrown:
Error: [ethjs-filter] while decoding filter change event data from RPC '[{"logIndex":"0","transactionIndex":"0","transactionHash":"0x6b0d1c8f2b072615aab822459b6318bfad01dca4663c2c4d41c6cdd1d84b3033","blockHash":"0x1f603b873f6e016ce99a2f4a34b13e877cbdd94308e4fc4fbd42f1d8a132cb1a","blockNumber":"17","address":"0x345ca3e014aaf5dca488057592ee47305d9b3e10","data":"0x0000000000000000000000000000000000000000000000001bc16d674ec80000","topics":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef","0x000000000000000000000000627306090abab3a6e1400e9345bc60c78a8bef57","0x000000000000000000000000f17f52151ebef6c7334fad080c5704d77216b732"],"type":"mined"}]': TypeError: Cannot read property 'slice' of undefined
    at C:\Development\sandbox\ethereum\repl-alliance\node_modules\ethjs-filter\lib\index.js:29:31
    at C:\Development\sandbox\ethereum\repl-alliance\node_modules\ethjs-query\lib\index.js:101:16
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:160:7)

The problem appears to be caused in the decodeEvent function.  My topics array contains only a single value - 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.  This was set by eth-contract v0.1.9 and is the hash of the signature of the Transfer event.  However, the code in decodeEvent looks for a value in topics[1].
The event has two indexed 'inputs' and is not anonymous, but there is only a single item in the topics array (the signature), so the .slice is called on undefined, and the exception is thrown.

Ah, nice catch! This module will eventually be moved over to ethers.js module, but do you have a fix in the meantime?
Sent from my iPhone

On Apr 8, 2018, at 11:34 PM, kybernetikos<EMAIL_ADDRESS>wrote:
TypeError thrown when event received.
Running in nodejs, I watch for the following event:
event Transfer(address indexed _from, address indexed _to, uint256 _value);

When the event occurs, an exception is thrown:
Error: [ethjs-filter] while decoding filter change event data from RPC '[{"logIndex":"0","transactionIndex":"0","transactionHash":"0x6b0d1c8f2b072615aab822459b6318bfad01dca4663c2c4d41c6cdd1d84b3033","blockHash":"0x1f603b873f6e016ce99a2f4a34b13e877cbdd94308e4fc4fbd42f1d8a132cb1a","blockNumber":"17","address":"0x345ca3e014aaf5dca488057592ee47305d9b3e10","data":"0x0000000000000000000000000000000000000000000000001bc16d674ec80000","topics":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef","0x000000000000000000000000627306090abab3a6e1400e9345bc60c78a8bef57","0x000000000000000000000000f17f52151ebef6c7334fad080c5704d77216b732"],"type":"mined"}]': TypeError: Cannot read property 'slice' of undefined
at C:\Development\sandbox\ethereum\repl-alliance\node_modules\ethjs-filter\lib\index.js:29:31
at C:\Development\sandbox\ethereum\repl-alliance\node_modules\ethjs-query\lib\index.js:101:16
at
at process._tickCallback (internal/process/next_tick.js:160:7)
The problem appears to be caused in the decodeEvent function. My topics array contains only a single value -0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. This was set by eth-contract v0.1.9 and is the hash of the signature. However, the code in decodeEvent looks for a value in topics[1].
The event has two indexed 'inputs' and is not anonymous, but there is only a single item in the topics array (the signature), so the .slice is called on undefined, and the exception is thrown.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

do you have a fix in the meantime?

That depends a little.  I don't have enough background in the code to be confident with suggesting a fix at the moment.
I look at decodeEvent, and I see that it separates indexed values from nonindexed values.  I don't really understand why it needs to read some values from the topics (the indexed values) and some values from the data (the nonindexed values).  Is it because data doesn't include indexed values?
If data doesn't include indexed values, and they're not in the topics array either, then I'm not sure where they can be read from.  Or does data sometimes include indexed values and not other times?  In which case, we could check to see if the values are in topics and use them from there, and if not, try to read them from data.

I'll take a closer look today, can you provide what network you are on? (Eg rinkeby)
Sent from my iPhone

On Apr 9, 2018, at 9:45 AM, kybernetikos<EMAIL_ADDRESS>wrote:
do you have a fix in the meantime?
That depends a little. I don't have enough background in the code to be confident with suggesting a fix at the moment.
I look at decodeEvent, and I see that it separates indexed values from nonindexed values. I don't really understand why it needs to read some values from the topics (the indexed values) and some values from the data (the nonindexed values). Is it because data doesn't include indexed values?
If data doesn't include indexed values, and they're not in the topics array either, then I'm not sure where they can be read from. Or does data sometimes include indexed values and not other times? In which case, we could check to see if the values are in topics and use them from there, and if not, try to read them from data.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

I've been running against ganache and ganache-cli.
(which incidentally shows another problem - the first 16 watchers for the node don't seem to work properly - I think the watcher ids are being set without a leading 0 which ganache expects, or something like that)
My smart contract is https://github.com/ConsenSys/Tokens/blob/master/contracts/eip20/EIP20.sol which and my listen code is
            // e.g. event = EIP20.Transfer
            const filter = event({ delay:10000 });

            filter.new({
                "fromBlock": "latest",
                "toBlock": "latest"
            }).then((filterId) => {
                console.log('\nFilter id ' + filterId + ' created.');
                filter.watch((err, result) => {
                    if (err) {
                        console.log('\nEvent error:', err);
                    } else {
                        console.log('\nEvent:', name + '.' + evtName, result);
                    }
                });
            });

Will review tomorrow.
Sent from my iPhone

On Apr 9, 2018, at 2:51 PM, kybernetikos<EMAIL_ADDRESS>wrote:
I've been running against ganache and ganache-cli.
(which incidentally shows another problem - the first 16 watchers for the node don't seem to work properly - I think the watcher ids are being set without a leading 0 which ganache expects, or something like that)
My smart contract is https://github.com/ConsenSys/Tokens/blob/master/contracts/eip20/EIP20.sol which and my listen code is
        // e.g. event = EIP20.Transfer
        const filter = event({ delay:10000 });

        filter.new({
            "fromBlock": "latest",
            "toBlock": "latest"
        }).then((filterId) => {
            console.log('\nFilter id ' + filterId + ' created.');
            filter.watch((err, result) => {
                if (err) {
                    console.log('\nEvent error:', err);
                } else {
                    console.log('\nEvent:', name + '.' + evtName, result);
                }
            });
        });

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

I'm faced to the same error. Trying to understand it, to make my project work.
In ethjs-contract (https://github.com/ethjs/ethjs-contract/blob/master/dist/ethjs-contract.js)
On line 7398, we have
return abi.decodeEvent(methodObject, logData, filterTopcis);
With filterTopcis defined on line 7388
      var filterTopic = '0x' + keccak256(methodObject.name + '(' + filterInputTypes.join(',') + ')');
      var filterTopcis = [filterTopic];

So abi.decodeEvent is called with a filterTopcis with a single element.
But in eth-abi (https://github.com/ethjs/ethjs-abi/blob/master/src/index.js), on line 147 :
const topic = new Buffer(topics[i + topicOffset].slice(2), 'hex');
with
const topicOffset = eventObject.anonymous ? 0 : 1;
So the decodeEvent may looks like for topics[1] if the event is not anonymous, which leads to the error seen. I still wonder how this could be solved...
(by the way... filterTopcis -> filter Topics )