fix: handle raw identifier in field

fix #3586, using Ident.unraw to handle raw identifier.

Hi @daxpedda, sure! I think I can add a test in tests/wasm/getter_and_setter.rs, It is correctly place to add test case ?

Apologies for the delay!

I think I can add a test in tests/wasm/getter_and_setter.rs, It is correctly place to add test case ?

That seems fine to me.

Hi @daxpedda, it is ok! and thanks for your reply. There is a question for running tests when I follow the guide and run
cargo test --target wasm32-unknown-unknown

my computer throws some error and shows that process panic,
Try find `webdriver.json` for configure browser's capabilities:
Ok
driver status: signal: 9 (SIGKILL)
Error: http://<IP_ADDRESS>:52624/session: status code 500
error: test failed, to rerun pass `--test headless`

Caused by:
  process didn't exit successfully: `cargo run -p wasm-bindgen-cli --bin wasm-bindgen-test-runner -- /Users/litingwei/Desktop/projects/for-osp/wasm-bindgen/target/wasm32-unknown-unknown/debug/deps/headless-4e40f55ce9c3cd6d.wasm` (exit status: 1)

Did I miss something to configure, I haven't changed the webdriver.json yet, thanks for any help, and sorry for bothering you again.

The error usually has nothing to do with the webdriver.json, you could try using WASM_BINDGEN_SPLIT_LINKED_MODULES=1.
Honestly though, the problem here is missing documentation on how to run the tests properly on a local machine. If this doesn't solve your problem I recommend you to not waste any time on this and just use the CI to run tests.

[..], thanks for any help, and sorry for bothering you again.

No, thank you for your contribution, you are helping us here!

CI says formatting still has to be fixed. Other then the nit LGTM.

Hi @daxpedda, thanks for your review, I fixed the fmt problem, thanks ~


Replaces File for Path in several locations. Removes CloudSdkUtil.

fixes #856

@etanshaul @patflynn @aslo

Swaps File for Path in many locations,
Removes CloudSdkUtil and two other unused files.

@joaoandremartins use the assignees field to indicate reviewers. It supports multiple reviewers now.

@patflynn so it appears we're moving to a validate-per-SDK strategy in https://github.com/GoogleCloudPlatform/appengine-plugins-core/pull/209 and there are plans for a validate-per-action later on, which completely changes the way validate works as we discussed it last week.
In that case, since I think this was the only pending item, I suggest PTAL.

@patflynn @etanshaul PTAL

LGTM assuming @etanshaul is good with it and you've tested flex deployment and verified the app comes up after deployed.

reviewing the latest now

Yep, flex deployment tested and seems to be working fine.

:ship:

I added one more comment, but after that, lgtm.

@patflynn @joaoandremartins what is your opinion on including this PR in the next beta release? Since its ready I see no reason not to wait for the merge.


Removing SANDBOX_ from the AuroraField and aurora properties

No need for aurora properties to all have SANDBOX_ prepended so removing it. This will also require and update of internal heron.aurora.

Ping


Fix edit commands on segment select

Following commands weren't working with some conditions:

Label command with segment select
Delete command from command line and GUI with segment select

@seqsense/cloud_engineer please take a look


fix #16762

Description

The method currently makes multiple DB calls

Fetch all workspace ids where the plugin id is not present
Fetch complete workspace details with these ids (1 query per workspace id)
Assign plugin and save each workspace

Fixes # 16762

The fix performs single query to fetch the workspaces with no plugin. It avoids 1 query per workspace id

Type of change

Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?

No tests found in the repo.
Check if installation of plugin to all workspaces works when there are multiple workspaces and also when there are none.

When there are no workspaces where the plugin is not installed
There are multiple workspaces where the plugin is not installed

Checklist:

[ ] My code follows the style guidelines of this project
[ ] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] New and existing unit tests pass locally with my changes

@bhuvanaindukuri this does not look right. The goal of this issue is that we should not be fetching any data in the application memory. Instead we want to create a DB query (just one query) that simply runs on the DB and does the job - which means that we should not be requiring any result from the query.

@bhuvanaindukuri this does not look right. The goal of this issue is that we should not be fetching any data in the application memory. Instead we want to create a DB query (just one query) that simply runs on the DB and does the job - which means that we should not be requiring any result from the query.

@sumitsum - Updated the code as per the requirement

@bhuvanaindukuri can you please explain in the description what your change does ?

@bhuvanaindukuri can you please explain in the description what your change does ?

Updated the details of the fix in the PR description

@bhuvanaindukuri the PR does not exactly do what was intended but does it partially. The bulk update operation seems to perform the updates in batches instead of all at once - which is still much better than doing it one by one as it was being done before. Can you please create a new GitHub issue mentioning the same and link this PR against it ? I am approving the PR.
Ref: https://stackoverflow.com/questions/53296516/is-there-a-default-batch-size-that-is-used-by-mongodb-in-the-bulk-api
Ref: https://www.mongodb.com/community/forums/t/performance-bottleneck-in-bulk-insertion-java/8092/5

@bhuvanaindukuri can you please merge with latest release and update the PR so that CI run may have a better chance at passing.

@bhuvanaindukuri this may be helpful when updating the branch with latest release: https://stackoverflow.com/questions/7244321/how-do-i-update-or-sync-a-forked-repository-on-github
Also, would it be possible for you to provide my account with push / edit access to your PR branch so that I may do such kind of updates(rebase) if required (in case you are not accessible) ?

@bhuvanaindukuri seems like I have write access to the PR. I have rebased the PR. I will now run CI.

/ok-to-test sha=3d85418

/ok-to-test sha=3d85418

Adding test plan approved label since this is a database migration related change. cc: @prapullac


Uploading in nodejs need to re arrange

Hi there from the example
Upload.upload({
url: 'upload/url',
data: {file: file, 'username': $scope.username}
})
This might not be a problem if you use it with other backend but with nodejs with multer this code won't work and you won't find any username in the req.body
So to fix this you need to change to
Upload.upload({
url: 'upload/url',
data: {'username': $scope.username, file: file,}
})

fixed


Update example for JSON formatter in the README

The JSON formatter examples does not have column, length and litner fields in the README. However, those fields are included actually.
For example:
$ scss-lint test.scss --format=JSON
{
  "test.scss": [
    {
      "line": 2,
      "column": 1,
      "length": 1,
      "severity": "warning",
      "reason": "Declaration should be terminated by a semicolon",
      "linter": "TrailingSemicolon"
    },
    {
      "line": 2,
      "column": 10,
      "length": 4,
      "severity": "warning",
      "reason": "Color literals like `#111` should only be used in variable declarations; they should be referred to via variable everywhere else.",
      "linter": "ColorVariable"
    }
  ]
}

This change adds those fields to the example.

Thanks for helping keep our documentation up to date, @pocke!


Method specific sub identifier formats, eg: did:jwk:ipfs:CID

Its possible to compress a did:jwk using content addressing... this can be accomplished without overloading did:jwk but leveraging the naming convention used for multiple network based methods, for example:
did:jwk:ipfs:cid -> cid -> did:jwk:encoded
This would leverage any content id based storage network to shorten the did, but at the cost of a different resolution process for jwk:ipfs when compared to jwk.

Perhaps there is a way to extend did:jwk for WebAuthN use cases, based on this awesome work: https://github.com/excid-io/fido2-sign


Android: Fix wrong constants for Escape, End, Insert, F1 to F12

Escape, End, Insert, F1 to F12 were defined with the wrong keycodes for Android. Pressing F1 was registered as pressing Escape, others were not recognized at all.
It is necessary to change the core constants as there is no code mapping on the Android backend. As long as games only use the defined constants - which they should -, this will not break any projects.

Changing the constants is a little scary, as it's possible someone relies on the values rather than the names, eg maybe in serialized data. I'm OK with the PR as is and changing the constants, but if we wanted to make the fix more safely we'd add a mapping to the Android backend.

I agree and I am not fan of changing the constants myself. However, we historically have no mapping on Android and it is a big change to introduce one.
As long as everyone uses the constants in the code, there should be no problem caused by a change. If someone does not use the constants, this should be changed.
So the only problem I see is that changing the constants will cause incompatiblity for user-saved keybindings. If someone used the concerned keys, he will to reconfigure. I use user-saved keybindings in my games but doubt anyone used the concerned keys in my games - and if, I am okay with the users to reconfigure after the change -, so if no one vetos I suggest to merge this in and see what happens after the release. If there is no reaction at all, we were going good, if there are some issues raised by developers, we know we should introduce a mapping system on the Android backend for future changes.

No veto -> merge

Somewhat belatedly, but this is causing issues for me.
I'm on Windows 10, and when debugging, saw that catching the Escape was no longer working after upgrading LibGDX.
Diving deeper, I saw a mismatch between the keycode given (111) and the one defined (131).
Finding this PR, I feared this was part of a wider problem.
As a simple test, I created an InputListener that does nothing but print the keycodes (pardon my Kotlin, but I'm sure it's basically the same in Java):
val listener = object : InputListener() {
            override fun keyDown(event: InputEvent?, keycode: Int): Boolean {
                println(keycode)
                return false
            }
        }
stage.addListener(listener)

As I suspected, F1, F2, End etc. all gave the pre-PR keycodes.
Basically, although this fixed the keycodes for Android, it ruined them for Windows :(
It's possible I'm not using the keycodes correctly (I basically check keycode == Input.Keys.ESCAPE) in which case I'd be glad to hear of the correct usage I'm not sure what the right solution is... I can think of 2 possible ones
A. Having the keycodes as part of Gdx.input.Keys rather than statically referencing Input.Keys (so you would have a default Keys, but each specific Input override - AndroidInput for example - could override the defaults) - this is probably (?) the more correct way if you were starting from scratch, but currently would mean breaking the existing API in a big way
B. adding ESCAPE_ANDROID, F1_ANDROID or something - super ugly, but wouldn't affect existing projects.
 :D

are you sure you updated your platform dependant dependencies? Check if your lwjgl2 or lwjgl3 backend is on the same version than the core dependency.

You were right, this was a result of caching :(
Apparently, even after running gradle clean and gradle cleanBuildCache, Android Studio itself saves its own build cache. After I ran the cleans and restarted Android Studio, the old code resumed working as usual. I'll put 'restart Android Studio after every gradle change' in my internal checklist.
Thank you again for all your work, I cannot put into words how amazing you guys are :)


Error installing windows Curses

This happens during the "Build" step of Getting Started, on a Windows 10 machine:
Installing windows-curses package
Processing c:\users\sean\.platformio\packages\framework-espidf\tools\kconfig_new\esp-windows-curses
ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'C:\\Users\\sean\\.platformio\\packages\\framework-espidf\\tools\\kconfig_new\\esp-windows-curses'

Also seems cmake and gcc are missing:
ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'C:\\Users\\sean\\.platformio\\packages\\framework-espidf\\tools\\kconfig_new\\esp-windows-curses'

*** Error 1
Reading CMake configuration...
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Configuring incomplete, errors occurred!
See also "C:/Users/sean/Documents/PlatformIO/Projects/M5-Stack-Core2-for-AWS/.pio/build/core2foraws/CMakeFiles/CMakeOutput.log".
See also "C:/Users/sean/Documents/PlatformIO/Projects/M5-Stack-Core2-for-AWS/.pio/build/core2foraws/CMakeFiles/CMakeError.log".

CMake Error at CMakeLists.txt:5 (include):
  include could not find load file:

    C:\Users\sean\.platformio\packages\framework-espidf/tools/cmake/project.cmake

CMake Error at CMakeLists.txt:6 (project):
  No CMAKE_C_COMPILER could be found.

  Tell CMake where to find the compiler by setting either the environment
  variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
  the compiler, or to the compiler name if it is in the PATH.

CMake Error at CMakeLists.txt:6 (project):
  No CMAKE_CXX_COMPILER could be found.

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.

Sorry you're having this strange issue. Quick search netted me this on PIO's community forums: https://community.platformio.org/t/cant-create-esp-idf-project-correctly-in-platformio/16370/17
I tested and found that this issue only arises when you already have the ESP-IDF installed on your machine and then trying to install PIO. The esp-window-curses was introduced in ESP-IDF v4.1. Hopefully doing the steps listed in the forum post helps. I recommend adding your issue to PIO forums or their github issues. I will reach out to PlatformIO and see if there's a simpler solution for everyone.
Closing because this is not an issue with provided software or content or the reference hardware.

@rashedtalukder you might wish to add a warning to your quickstart for Windows users who already have Platform IO installed.  I'll try the steps on the expressif forums and see if that resolves the issues.

The issue arises if you have the ESP-IDF installed already, not PlatformIO. I added the warning yesterday.

Why did it not work when installing Espressif 32 through the embedded tab of platformio? It installed a package of version 4.0.1 and it expected a version 4.4.1... A friend of mine solved this by telling me to add platform = https://github.com/platformio/platform-espressif32.git the .ini file.


It's possible provide the value() method for reverse_iterator?

It's possible provide the value() method for reverse_iterator?
Thanks

The following should work:

int main() {
  tsl::ordered_map<int, int> map = {{0, 2}, {1, 3}};

  for (auto it = map.rbegin(); it != map.rend(); ++it) {
    it.base().value() = 1;
  }
}

I just realised in the base() documentation that The base iterator refers to the element that is next (from the std::reverse_iterator::iterator_type perspective) to the element the reverse_iterator is currently pointing to.
The above will thus not work, I need to check if there's a better solution.


"Get Started" docs should mention that you must add getChildContext in order to avoid muiTheme is undefined error

I was surpriseed to discover that just installing the package and requiring the components is not enough to get you started.
Adding this to the main component does the trick
   childContextTypes: {
        muiTheme: React.PropTypes.object
    },

    getChildContext: function() {
        return {
            muiTheme: ThemeManager.getCurrentTheme()
        };
    },

Seems weird that docs don't mention this on the "Get Started" page.
A number of issues seem to be related to this, see #686, #687

Don't forget to mention where we can get ThemeManager:
var ThemeManager = require('material-ui/lib/styles/theme-manager')();

Do we have to put those codes every time we use a component? Is there a way to eliminate those just like in pre v.0.8.0 version?

Yes please -- I do not want to be forced on a theme manager.

This is actually mentioned on the (Themes)[http://material-ui.com/#/customization/themes] page. However, I do agree that this should be move to the getting started page.

Just saw that... very subtle my friend

This may be unique to Marty and/or ES6 inheritance but I got InvariantViolation errors until I defined childContextTypes outside the class, following the Themes page example:
class OuterMostParentComponent extends React.Component {
  // Important!
  getChildContext() {
    return {
      muiTheme: ThemeManager.getCurrentTheme()
    };
  }
};

// Important!
OuterMostParentComponent.childContextTypes = {
  muiTheme: React.PropTypes.object
};

+1, was really surprised since I thought this is a mature enough project.

@MrOrz Just to clarify the situation with getting the ThemeManager (which, as mentioned, you can currently find on the themes), you don't actually have to require the full path. In ES6/ES2015 syntax, you can use:
import * as mui from 'material-ui';
let ThemeManager = new mui.Styles.ThemeManager();

or in ES5:
var mui = require('material-ui');
var ThemeManager = new mui.Styles.ThemeManager();

@levbrie :+1: I'll update my comment!

I just want to share a related issue, which held me some time...
So... React.cloneElement breaks the context while on 0.13
If so, react will warn you that owner-based and parent-based contexts differ.
https://github.com/facebook/react/issues/4008

Could something be added to the webpack example to explictly show what your'e supposed to do?   I've literally spent 2 days trying to make the theme context thing work.  There is a number of comments stating "You must put this or that somethere" but none of it shows in the example code.   I try to just render a button under react-slingshot and am getting nothing but frustration.
I don't want to abandon material-ui when it's clear I'm the one doing something wrong, but I literally have no idea what I'm supposed to do regarding the theme stuff.  All I know is that it's constantly undefined when I try to use it anywhere outside of the webpack example.   The "works here but not anywhere else" situation is really getting me down.

This really needs to be in the documents even more than it is now.  I do not understand how to use this themepack with es6 and ReactRouter.  I'm about to abandon MaterialUI because of the poor documentation and release notes.

I'm about to abandon MaterialUI because of the poor documentation and release notes.

No worries, we guarantee full refunds. 😄
OTOH, if would like to contribute more positively, this may be the file to start with:
https://github.com/callemall/material-ui/blob/master/docs/src/app/components/pages/get-started/usage.md

For what it's worth, once I got the tags in the right place, it's been working great for me.   I'm also making efforts to improve the error messages and documentation, but it's not ready to submit yet.

@mbrookes I'd be happy to help write functional release notes before the next release.  I was being grumpy because I still do not understand the feature enough to add the right way to do it.  I don't understand why MuiTheme was made a required object and without knowing this, i can't at all contribute the proper way to use it.

@colemannerd It shouldn't be:
https://github.com/callemall/material-ui/pull/4229

i use   let ThemeManager = new mui.Styles.ThemeManager();
but on browser it shows Cannot read property 'ThemeManager' of undefined


browser ping issue

https://github.com/tiagosiebler/binance/blob/2bb5172782e11af60ce0eb704301a524043542ca/src/websocket-client.ts#L300
for browser, i replaced
ws.ping();
ws.pong();

with the follow code
            if(window){
                function getBuffer(bufferSuffix){
                    const ab = new ArrayBuffer(5);
                    const view = new Uint8Array(ab);
                    view[0] = bufferSuffix;
                    view[1] = 0x05;
                    view[2] = 0x00;

                    view[3] = 0x00;
                    view[4] = 0x00;
                    return ab
                }
                const pingBuffer = getBuffer(0x089);
                const pongBuffer = getBuffer(0x08a);

                // ping
               ws.send(pingBuffer);
               // pong
               ws.send(pongBuffer);
             } else {
               ws.ping();
               ws.pong();
             }

the ping and pong works, but the socket connection break and reconnected every 10000ms(options.pingInterval)

Is this a normal phenomenon?

 I hadn't considered just sending them as hex for some reason. How come you've closed this? Did you get it working?

 I hadn't considered just sending them as hex for some reason. How come you've closed this? Did you get it working?

The chrome process ping and pong natively，and no need to process them manually.  So you can consider that the related code in your project can be removed when used in browser runtime.
Since I no longer need to do this manually, I closed the issue


Divide IN_POOL tx state into EXECUTED and PENDING states

Change summary:

Divide IN_POOL tx state into EXECUTED and PENDING states

Related issues: https://github.com/ainblockchain/ain-blockchain/issues/484

Comments addressed. PTAL @liayoo


[FEATURE] refactor usage of import argilla as rg in src and tests

Is your feature request related to a problem? Please describe.
Navigation for the package is unclear because we user import argilla as rg and rg.TextClassificationRecord, but we should use the entire import path like from argilla.client.models import TextClassificationRecord
Describe the solution you'd like
We should directly import from official modules.
Describe alternatives you've considered
N.A.
Additional context
N.A.

@davidberenstein1957 I can work on this!


This error occurs when my slider finishes executing

══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
The following ArgumentError was thrown building AnimatedBuilder(listenable:
AnimationController#e6f76(▶ 1.000)➩Cubic(0.42, 0.00, 0.58, 1.00), dirty, state:
_AnimatedState#b5ad8):
Invalid argument(s): 0.0

The relevant error-causing widget was:
  AnimatedBuilder
  AnimatedBuilder:file:///Users/lee/.pub-cache/hosted/pub.flutter-io.cn/action_slider-0.7.0/lib/src/action_sli
  der_widget.dart:899:16

When the exception was thrown, this was the stack:
#0      double.clamp (dart:core-patch/double.dart:234:7)
#1      _ActionSliderState.build.<anonymous closure>.<anonymous closure>.statePosToLocalPos
(package:action_slider/src/action_slider_widget.dart:906:46)
#2      _ActionSliderState.build.<anonymous closure>.<anonymous closure>
(package:action_slider/src/action_slider_widget.dart:907:30)
#3      ListenableBuilder.build (package:flutter/src/widgets/transitions.dart:1123:48)
#4      _AnimatedState.build (package:flutter/src/widgets/transitions.dart:135:48)
#5      StatefulElement.build (package:flutter/src/widgets/framework.dart:5583:27)
#6      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5471:15)
#7      StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5634:11)
#8      Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#9      BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2895:19)
#10     WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:984:21)
#11     RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:457:5)
#12     SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1325:15)
#13     SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1255:9)
#14     SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1113:5)
#15     _invoke (dart:ui/hooks.dart:312:13)
#16     PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:383:5)
#17     _drawFrame (dart:ui/hooks.dart:283:31)

════════════════════════════════════════════════════════════════════════════════════════════════════

Another exception was thrown: Invalid argument(s): 0.0
Another exception was thrown: Invalid argument(s): 0.0
Another exception was thrown: Invalid argument(s): 0.0
Another exception was thrown: Invalid argument(s): 0.0

I have same problem. Did you find some workaround for this?

Add Try Block on line no.

Nice, thank you, that actually helped!

I apologize for not taking care of this bug sooner. Unfortunately, I've had very little free time in the last few weeks to work on my open source projects.
This error occurs when the width is too small to display the indicator. What kind of behavior would you like to see in this situation? A useful error message would probably be useful.

Can anyone who has experienced this error confirm that it no longer occurs in #12?

I think the changes to this fix are not yet in the version published at https://pub.dev/, perhaps versioning problems

@alejandrogiubel No, this fix has not yet been released. If you need this fix, you can use the current GitHub version in your Flutter project.

@maeddin understood. That's what I did. thank you so much


Ionide on .NET Core (without Mono)

I added VSCode and Ionide to the .NET Core Docker image. Here is my current evaluation of it:

https://youtu.be/qjH1yaWcUHI
https://github.com/ctaggart/dotnet-vscode/issues/3#issuecomment-221028292

Terrific work so far!

Thanks! :)


Enable "Login via GitHub" @ talk.vespene.io

This'd be useful

Should be good to go, thanks for the suggestion!

@mpdehaan, while we are here (login/signup), there's a typo (extra Unicode double quotes) in Terms of Service link when registering at talk.vespene.io:
here

Hey I normally don't get notifications on closed topics... sorry for missing this.
Honestly, I don't know where that is to be configured but I'll take a look real quick.  Discourse is a beast!


GSK-1224 - Feature/fix test arguments

Description
Fixed issue where optional type cannot be extracted properly

I’ve added some tests


Work with .json & .pot

Question:
I have everything working fine and have like 4 files:
en.json, es.json, cat.json and fr.json
but i have to create these files manually.
There is a way to get the lines to translate like gettext does, in .pot format ( to help translator ) but use the power of angular-translate ?!

Maybe #1448 can help you here?


community: add tools support to ChatTongyi(can be used with create_openai_tools_agent)

Description
Tongyi now supports "tools"(Official Docs), and the data structure is compatible with OpenAI tools, therefore it's possible now to use create_openai_tools_agent along with ChatTongyi.
Ex:
from langchain_community.chat_models.tongyi import ChatTongyi
from langchain.agents import AgentExecutor, create_openai_tools_agent
from langchain import hub
from your_tools import your_tool, another_tool

prompt = hub.pull('hwchase17/openai-tools-agent')
tools = [your_tool, another_tool]
llm = ChatTongyi(temperature=0)

agent = create_openai_tools_agent(llm, tools, prompt)
agent_executor = AgentExecutor(agent = agent, tools = tools, verbose = True, handle_parsing_errors=True)

response = agent_executor.invoke(
    {"input": "Your question."}
)
print(response)

I tried the above example in my project, it works fine.
I have run the original integrations tests and they all passed.
To actually test the tools feature itself, I would need to import create_openai_tools_agent from langchain.agents, which is not a dependency of the community package. So I think I should leave the original test as it is.
Dependencies
No dependency is required for this change

@eyurtsev Would you mind take a look at this ?

你介意看看这个吗？

Excuse me, would you mind if i ask a issue about Tongyi?
when I Use ChatTongyi to bulid a Agent. Which outputparser I could use?
ToolsAgentOutputParser() could available to ChatTongyi. But this Parser could not call the tools.
LangChain-core==0.2.1

@eyurtsev Would you mind take a look at this ?

Excuse me, would you mind if i ask a issue about Tongyi?
when I Use ChatTongyi to bulid a Agent. Which outputparser I could use?
ToolsAgentOutputParser() could available to ChatTongyi. But this Parser could not call the tools.
LangChain-core==0.2.1


Is it possible to turn off replacement of "global"

I have a module with code like this:
global.Foo = require('bar/foo');

The output from Webpack ends up looking something like this:
/* 0 */
/***/ function(module, exports, __webpack_require__) {

    /* WEBPACK VAR INJECTION */(function(global) {
    global.Foo = __webpack_require__(1);
    /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))

/***/ },

But I want to actually have the resulting code explicitly reference global rather than replacing it with function() { return this; }(). How do I turn that off for this module?

see node.global option

:+1:

This is the exact question I want to ask.
I am still confused that I can't find any document about the node.global option.Anybody help me?

probably this?

thanks @zhaoshengjun ,but how?
My problem is to use global in none-node env.Usually assign window to global,what if I want to assign another varible to global?
in strict mode (function(){return this})() is sensored and return undefined so I want to replace (function(){return this}()) with just a simple window.
Searched a lot,but still no luck

@stackOverMind Did you get a solution for your problem? We want to do the same in our project i.e. to instruct webpack to use 'window' object instead of 'this'.

[node
Include polyfills or mocks for various node stuff:
console: true or false
global: true or false
](https://webpack.github.io/docs/configuration.html)


Reconsider the name "*ColumnResposible"

The name -Responsible originally intended to represent "Do something on the column which this *ColumnWriter is responsible on".
For example, writeColumnResponsible meant "write the column where this ColumnWriter is responsible on".

Another candidate: InResponse? to represent the same. Found a (very long) example in Chromium:

sanitizeValueInResponseToMinOrMaxAttributeChange looks representing "sanitize a value in which the RangeInputType instance is in response".

(RangeInputType represents <input type="range" ...>. This function (re-)sanitizes a value input from a user when min or max of <input type="range" min="1" max="10"> is changed.)

@muga Similar with Fragile. Another naming discussion. What do you think?

Ah, that InResponse might mean "a reaction to min/max change"? Hmm,

The names are totally local in the library (org.embulk.base.restclient.writer), so this issue may not be much serious. Jfyi.

Thank you for sharing your thoughts.
originally intended to represent "Do something on the column which this ColumnWriter is responsible on".

I totally agree with you and your thoughts. Rather, that's natural I think. Almost objects (i.e. ColumnWriter) are responsible for the state changes on the fields (i.e. Column) that they have. If so, I think that we might be able to take short names in the almost cases as method names like writeColumn and getColumn. How about it?

@muga Agreed, and pushed a PR #29.
btw, calling them writer may be a bit confusing for a reason similar to our discussion on write and PageLoadable at #22. Will revisit that later.

#29 is merged. Closing.


UnboundLocalError when running on Google Colab using TPU runtime

Steps to reproduce

Open new Google Colab notebook and choose TPU runtime.

Install accelerate
!pip install accelerate

Run accelerate config
In which compute environment are you running? ([0] This machine, [1] AWS (Amazon SageMaker)): 0
Which type of machine are you using? ([0] No distributed training, [1] multi-GPU, [2] TPU): 2
What is the name of the function in your script that should be launched in all parallel scripts? [main]:
Traceback (most recent call last):
  File "/usr/local/bin/accelerate", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/dist-packages/accelerate/commands/accelerate_cli.py", line 41, in main
    args.func(args)
  File "/usr/local/lib/python3.7/dist-packages/accelerate/commands/config/__init__.py", line 64, in config_command
    config = get_user_input()
  File "/usr/local/lib/python3.7/dist-packages/accelerate/commands/config/__init__.py", line 37, in get_user_input
    config = get_cluster_input()
  File "/usr/local/lib/python3.7/dist-packages/accelerate/commands/config/cluster.py", line 81, in get_cluster_input
    num_processes=num_processes,
UnboundLocalError: local variable 'num_processes' referenced before assignment

Hello @miguelvictor
Could you try !pip install git+https://github.com/huggingface/accelerate and installing from master.

Hello!
I tried your suggestion and it worked. But i think there's another error:
WARNING:root:Waiting for TPU to be start up with version pytorch-1.8.1...
WARNING:root:Waiting for TPU to be start up with version pytorch-1.8.1...
WARNING:root:TPU has started up successfully with version pytorch-1.8.1

Running:  accelerate-launch /usr/local/lib/python3.7/dist-packages/accelerate/test_utils/test_script.py --config_file=/root/.cache/huggingface/accelerate/default_config.yaml
stderr: WARNING:root:TPU has started up successfully with version pytorch-1.8.1
stderr: Traceback (most recent call last):
stderr:   File "/usr/local/bin/accelerate-launch", line 8, in <module>
stderr:     sys.exit(main())
stderr:   File "/usr/local/lib/python3.7/dist-packages/accelerate/commands/launch.py", line 331, in main
stderr:     launch_command(args)
stderr:   File "/usr/local/lib/python3.7/dist-packages/accelerate/commands/launch.py", line 321, in launch_command
stderr:     tpu_launcher(args)
stderr:   File "/usr/local/lib/python3.7/dist-packages/accelerate/commands/launch.py", line 182, in tpu_launcher
stderr:     xmp.spawn(_AddOneArg(main_function), args=(), nprocs=args.num_processes)
stderr:   File "/usr/local/lib/python3.7/dist-packages/torch_xla/distributed/xla_multiprocessing.py", line 384, in spawn
stderr:     pf_cfg = _pre_fork_setup(nprocs)
stderr:   File "/usr/local/lib/python3.7/dist-packages/torch_xla/distributed/xla_multiprocessing.py", line 201, in _pre_fork_setup
stderr:     dev_count, num_devices))
stderr: ValueError: The number of devices must be either 1 or 8, got 4 instead
Traceback (most recent call last):
  File "/usr/local/bin/accelerate", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/dist-packages/accelerate/commands/accelerate_cli.py", line 41, in main
    args.func(args)
  File "/usr/local/lib/python3.7/dist-packages/accelerate/commands/test.py", line 52, in test_command
    result = execute_subprocess_async(cmd, env=os.environ.copy())
  File "/usr/local/lib/python3.7/dist-packages/accelerate/test_utils/testing.py", line 135, in execute_subprocess_async
    f"'{cmd_str}' failed with returncode {result.returncode}\n\n"
RuntimeError: 'accelerate-launch /usr/local/lib/python3.7/dist-packages/accelerate/test_utils/test_script.py --config_file=/root/.cache/huggingface/accelerate/default_config.yaml' failed with returncode 1

The combined stderr from workers follows:
WARNING:root:TPU has started up successfully with version pytorch-1.8.1
Traceback (most recent call last):
  File "/usr/local/bin/accelerate-launch", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/dist-packages/accelerate/commands/launch.py", line 331, in main
    launch_command(args)
  File "/usr/local/lib/python3.7/dist-packages/accelerate/commands/launch.py", line 321, in launch_command
    tpu_launcher(args)
  File "/usr/local/lib/python3.7/dist-packages/accelerate/commands/launch.py", line 182, in tpu_launcher
    xmp.spawn(_AddOneArg(main_function), args=(), nprocs=args.num_processes)
  File "/usr/local/lib/python3.7/dist-packages/torch_xla/distributed/xla_multiprocessing.py", line 384, in spawn
    pf_cfg = _pre_fork_setup(nprocs)
  File "/usr/local/lib/python3.7/dist-packages/torch_xla/distributed/xla_multiprocessing.py", line 201, in _pre_fork_setup
    dev_count, num_devices))
ValueError: The number of devices must be either 1 or 8, got 4 instead

My config file looks like this:
{
compute_environment: LOCAL_MACHINE,
distributed_type: TPU,
fp16: false,
machine_rank: 0,
main_process_ip: null,
main_process_port: null,
main_training_function: main,
num_machines: 1,
num_processes: 4
}

I installed xla and tpu libraries like this:
!pip install cloud-tpu-client https://storage.googleapis.com/tpu-pytorch/wheels/torch_xla-1.8.1-cp37-cp37m-linux_x86_64.whl

{
compute_environment: LOCAL_MACHINE,
distributed_type: TPU,
fp16: false,
machine_rank: 0,
main_process_ip: null,
main_process_port: null,
main_training_function: main,
num_machines: 1,
num_processes: 4
}

As the error says "The number of devices[num_processes] must be either 1 or 8, got 4 instead". If you adjust num_processes to 8 it works. I create a small colab example.
Or is there a specific reason why you defined num_processes as only 4?

My apologies for misunderstanding that error message. I thought devices refer to the TPU core count and not the num_process in the config 😅. I just tried it and it works now. Thanks!


Put the 'New user joined the chat' & 'User left' messages into the middle and use different colors with it

I would like to work on this issue under JWOC after the current issue assigned to me in this project gets resolved. Please assign it to me.

Hey @swarnarkadas , I would like to work on this issue under JWOC.Can you please assign it to me.

@swarnarkadas  I want to work on this issue under JWOC

@singhalaman23, You are assigned

I want to work on this issue under JWOC


Mongo.child_spec/2 returns data in deprecated format

I was trying to override Mongo child_spec:
Supervisor.child_spec(Mongo, id: {Mongo, 1})
And it caused an error, because Supervisor expects child_spec as a map, and Mongo returns as a tuple:
** (BadMapError) expected a map, got: {Mongo, {Mongo, :start_link, [[]]}, :permanent, 5000, :worker, [Mongo]}         (stdlib) :maps.put(:id, {Voting.Foo, 1}, {Mongo, {Mongo, :start_link, [[]]}, :permanent, 5000, :worker, [Mongo]})         (elixir) lib/supervisor.ex:703: anonymous fn/2 in Supervisor.child_spec/2         (elixir) lib/enum.ex:1826: Enum."-reduce/3-lists^foldl/2-0-"/3         (voting) lib/voting/supervisor.ex:40: Voting.Supervisor.init/1         (stdlib) supervisor.erl:294: :supervisor.init/1         (stdlib) gen_server.erl:365: :gen_server.init_it/2         (stdlib) gen_server.erl:333: :gen_server.init_it/6         (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
I assume this is happening because of the Supervisor.Spec.worker/3 call inside the Mongo.child_spec/2 function.
I am new in Elixir, maybe i am wrong. Thank you)

Maps as child specs are supported from Elixir 1.5. This project currently aims to work with Elixir ~> 1.3 (see the mix.exs file). Until we drop support for < 1.5, we will continue to use it. If a new version of Elixir drops support for it and we need to support < 1.5, we can do some kind of version checks. However, I do not think that is currently necessary.


cmake cleanup nuttx dependency handling

closes #6501
closes #6820
closes #6881

This fixes a few different dependency issues with the Nuttx build. The dependencies based on nuttx-export files disappearing were breaking the dependency chain. There were also situations where changes from a successful incremental build (that rebuilt nuttx) wouldn't be picked up until the next invocation.
I've tested this locally in different situations that were previously problematic.
@davids5 could you make sure this doesn't break anything for you?

@dagar
RE:build in place with hardlinks. I think we would have to test that. I do not think will work well.  The last thing built would leave it's mark (config.h and symlinks) on the Nuttx directories.
The defconfig of each target conditions the code for each build. It controls the simlinks for chip and board.
The config.h included in each build dir helps eclipse to display the conditionally compiled code. But now I would not be able to debug the IO build that is build first and the FMU build built second.
Anything clever we do to "reapply the patches"  would be complex and possibly not worth it. But there may be something not so clever that can be done by extracting the names from the patch files and if the src is newer recopy all the files in that patch and re-apply it.

@davids5 can you try the update?

@dagar Not seeing th patches appled under Nija Please add back "USE_TERMINAL"

USES_TERMINAL is for interactive commands like the menuconfig helpers. I shortened the patch apply step comment so you can see the numbering on semaphore. If you want to check it locally you can do ninja | less or ninja -v.

@dagar
make check locally needs to print the application as does make <hwtarget>
USE_TERMINAL did what I needed.
If you want to modify the underlying ninja or non ninja builds in the Makefile and have an alternate cli option that is fine. Jut please document it.

This is more ninja than cmake, where it's intended to be silent unless there's something worth showing. If you use the makefile generator it will list every single thing it builds by default.
What do you need here? Seeing the list of patches the build system knows about, verifying the patch order, or seeing that they applied cleanly? With the current setup, it will show the command with output if anything happens other than the patch applying cleanly.
If you're worried about the build system picking up new patches we should be explicitly listing them just like we do for uorb messages. https://github.com/PX4/Firmware/blob/master/msg/CMakeLists.txt#L34

@davids5 added environment variables for nuttx build output
PX4_NUTTX_BUILD_VERBOSE and PX4_NUTTX_PATCHES_VERBOSE
You can also use VN=1 and VNP=1 at the top level makefile.

@dagar Once this passes https://github.com/PX4/Firmware/pull/7069 it fixes the lost warnings.

@dagar Looking good!


Address own review comments on PR #1748

Category

Review

Overview

Implement the comments I made in my review of the PR
Done:

Table behavior in mobile mode
Email edit validation
User deletion redirect to manage user page on success
Password saving unticks the confirm checkbox
Username/E-Mail save button added "type=submit" and "form.resetDirty()" on settle
Formatted and organize import on changed files.

Not addressed:

Allow normal users to edit themselves.
Avatar is default in all cases.

Screenshot

Can you make it so that it doesn't go on a new row ? Maybe you can make the text overflow on the email to "…" (on mobile I mean)

Can you make it so that it doesn't go on a new row ? Maybe you can make the text overflow on the email to "…" (on mobile I mean)

At first it would have been the badges and username wrapping weirdly. I wanted to make it so all infos are kept shown but at least good looking.
I made it so it would take less space height wise. I'll let Mani decide how he wants to handle it further.

IMO Tag's approach is better and more compact


[WIP] Retry on failed request to mirror node

Signed-off-by: georgi-l95<EMAIL_ADDRESS>Description:

Introduce axios-retry for retrying failed requests to the mirror node
Add environmental variables for delay and retry counts ( 0 retry counts disables axios-retry )

Related issue(s):
Fixes #669
Notes for reviewer:

Checklist

[ ] Documented (Code comments, README, etc.)
[ ] Tested (unit, integration, etc.)

Codecov Report
Base: 70.68% // Head: 70.57% // Decreases project coverage by -0.10% :warning:

Coverage data is based on head (a22bcd9) compared to base (ce99832).
Patch coverage: 50.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #679      +/-   ##
==========================================
- Coverage   70.68%   70.57%   -0.11%
==========================================
  Files          16       16
  Lines        1170     1176       +6
  Branches      206      209       +3
==========================================
+ Hits          827      830       +3
- Misses        286      289       +3
  Partials       57       57

Impacted Files
Coverage Δ

packages/relay/src/lib/clients/mirrorNodeClient.ts
89.93% <50.00%> (-1.57%)
:arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Compile Issue on Fresh Minimal Bionic Beaver

Hi, I think there might be a few dependencies missing from the dependency list.
I'm building on a fresh minimal Ubuntu 18.04 install.
After installing cmake, xorg-dev, libglu1-mesa-dev, and libsuitesparse-dev, make still fails:
log of standard and error out
At first, I thought that this was just a library-finding issue, but it still happens after running sudo ldconfig
I suspect that this is a dependency that is already on most systems, since the compile succeeded on another machine (running Ubuntu 17.10) already used for TF development with those packages installed.
I'm using GCC 4.7 (version described by package) or 7.3.0 (gcc --version), which makes the diagnostic message a little mystifying to me. Installing 4.8 did not help either.  Version 4.6 does not appear to be in the repos anymore; maybe this is the problem?

Additional information:
Since this issue seems to be in the glm dependency, I installed libglm-dev, removed that folder, and turned it into a symlink to /usr/include/glm.  That builds, but shows only a white screen where the mesh and flattening should be shown --- only the toolbar and window title can be seen.  Opening an .obj does not fix that problem.

Here's another update:
The problem has been isolated on two separate laptops (both integrated; one intel and one AMD) to be building GLM and running under Ubuntu 18.04 instead of 17.10.
I suspect that what broke it is building with GCC 7.3 instead of 7.2.  I looked at the GLM issues board and saw that they have an issue with GCC 7.3.
Solution: Downgrade from GCC 7.3 to 7.2.

Thanks for looking into this, @david-morris!


Implement Just-In-Time building and execution of chaincode within a Kubernetes job

Is it possible to enhance the developer experience by implementing Just-In-Time (JIT) compilation and execution of chaincode within a Kubernetes job? Below is some pseudocode for OCI artifacts, though using an HTTP URL might be acceptable as well.
cat << IMAGEJSON-EOF > image.json
{
  "name": "ghcr.io/hyperledger-labs/jit-chaincode",
  "digest": "sha256:802c336235cc1e7347e2da36c73fa2e4b6437cfc6f52872674d1e23f23bba63b"
}
IMAGEJSON-EOF
cat << METADATAJSON-EOF > metadata.json
{
    "type": "k8s",
    "label": "go-contract"
    "jit_artifact_url":  "localhost:5000/hello-artifact:latest"
}
METADATAJSON-EOF

chaincode build and publish
mkdir chaincode
echo "Chaincode on this artifact" > ./chaincode/source.code
echo "Chaincode build script on this artifact" > ./chaincode/build
echo "Chaincode release script on this artifact" > ./chaincode/release
echo "Chaincode run script on this artifact" > ./chaincode/run
echo "Chaincode content for this artifact" > ./chaincode/readme.md
echo "{\"doc\":\"readme.md\"}" > config.json

oras push localhost:5000/hello-artifact:latest \
  --config config.json:application/vnd.acme.rocket.config.v1+json \
  artifact.txt:text/plain \
  ./docs/:application/vnd.acme.rocket.docs.layer.v1+tar

JIT Job yaml example of getChaincodeJobSpec()
apiVersion: batch/v1
kind: Job
metadata:
  name: chaincode
spec:
  template:
    spec:
      initContainers:
      - name: just-in-time
        image: alpine
        command: ["/bin/sh", "-c"]
        args:
        - |
          oras manifest fetch localhost:5000/hello-artifact:latest
          oras pull localhost:5000/hello-artifact:latest
          ./build
          ./release
        volumeMounts:
        - name: artifact-volume
          mountPath: /artifact
      containers:
      - name: create-db
        image: postgres
        command: ["/bin/sh", "-c"]
        args:
        - |
          ./run
        volumeMounts:
        - name: artifact-volume
          mountPath: /artifact
      volumes:
      - name: artifact-volume
        emptyDir: {}

refs

https://oras.land/docs/how_to_guides/pushing_and_pulling
https://github.com/hyperledger-labs/fabric-builder-k8s/blob/dc794f332a1ab0b4f5fa38ab3dd22ed8afa770bd/internal/util/k8s.go#L221

Hi @y12studio, thanks for opening the issue. Adding some sort of development mode was something we considered previously (see #29). I'm even more convinced that I was then that the chaincode as a server (ccaas) builder is the right option for chaincode development- it's now provided in core Fabric and, once it's set up, gives you a really tight develop/test/debug loop since there is no docker build/publish step at all, and no need to go round the chaincode lifecycle loop either. I definitely think the ccaas builder workflow could be improved in terms of getting it set up to begin with, but would that address your use case?

Hi @jt-nti , thank you for sharing your thoughts on the chaincode-as-a-server (ccaas) builder. I completely agree that the ccaas builder provided in core Fabric significantly simplifies the develop/test/debug loop by eliminating the need for the Docker build/publish step and bypassing the chaincode lifecycle loop. This makes it a compelling option for chaincode development.
However, there are a few nuances to consider. First, the ccaas_builder external builder requires the chaincode to integrate with the gRPC ChaincodeServer, which is not a necessity for the k8s_builder external builder. As a result, developers may have to manage two versions of their chaincode: one for ccaas_builder and another for k8s_builder.
Furthermore, the configuration requirements vary between the two builders. For example, the connection.json file included in the chaincode package is not required for k8s_builder, which means two versions of the configuration also need to be maintained.
Although the ccaas builder workflow offers significant advantages, it might be worth considering enhancements to the build/release/run process within the Kubernetes job of k8s_builder to make it more developer-friendly. This is purely a suggestion and does not require adoption.

Hi @y12studio, there are definitely some differences between deploying with the k8s and ccaas builder, and making the k8s builder as developer friendly as possible would be good.
I think it's possible for chaincode to run unchanged in either client or server mode with the latest contract APIs though, which would help. If so, it would definitely be good to update the samples to make it obvious how to achieve that.
Building and deploying chaincode with the k8s builder in a development environment isn't too bad with the Fabric samples Kubernetes test network, e.g.
./network chaincode deploy sample-contract <path_to_contract_source>

Adding a new tutorial to the documentation to cover the chaincode developer experience might identify other enhancements that could be made without breaking the k8s builder's link to the Fabric chaincode lifecycle.

Enhancing the documentation for chaincode developers using k8s_builder might be the best solution. From your explanation, I now understand that this model could potentially cause confusion or disruption to the existing process. The complexity of the multi-build-release-run process contributing to this confusion was an issue I hadn't considered before.

Hi @y12studio, sorry it took a while but I've finally got around to writing a tutorial for developing and debugging chaincode before deploying it with the k8s builder. It's currently in PR #151 while I try and get some feedback so any comments would be great. Thanks.

Closing this now there is documentation covering the ccaas builder to develop chaincode.


Change the wording of the result page

ready for review.

@KaitCrawford @smn @miltontony @saeedmb8 ready for review. when travis.

+1


Google Earth Engine as recipe destination

There are two ways to ingest raster data into Google Earth Engine:

put COGs into a GCS bucket and point EE at them by creating a COG-based asset,
put any geotiffs (not just COGs) into a GCS bucket and supply an optional manifest file to ingest them as an asset with tiles stored internally.

Note that even in the former case just producing the files is not enough, strictly speaking - the ingestion also requires an EE call to create an asset, though in most cases the call will be trivial. The latter case is useful because it does not need reprocessing to COGs and because it's generally faster to read assets with internal tiles.
If there is community interest, it would be nice to support EE as a recipe destination. That should lead to better code reuse.

Hi @simonff and welcome! 👋
We discussed this question at yesterday's meeting. Everyone on the call was very happy at the prospect of interoperability between Pangeo Forge and GEE.
Of the two ways you enumerated, the first one is the most compatible with our goals. We have already planned to support COG outputs (see https://github.com/pangeo-forge/pangeo-forge/issues/63).
I think what is missing to move forward with this is a specific dataset to serve as a use case. If you have one on mind, please feel free to suggest it in https://github.com/pangeo-forge/staged-recipes/issues. The way we are steering development of Pangeo Forge is all around these use cases.

I don't have specific use cases yet, but this maybe a chicken-and-egg problem - EE users don't use pangeo-forge much, AFAIK, because they don't have a reason to if the EE destination is not supported.
I'd like to create a simple proof-of-concept example for a single-file dataset. Having COG support is 95% of the work.
The other, harder, issue is uploading vectors. Are there any plans for vector recipes?


Push user preferences to FEAGI

Two new endpoints has been implemented.
GET: /v1/system/user_preferences
PUT: /v1/system/user_preferences
When user change any of the following preferences, call the put so FEAGI hold the value.

Advanced mode
UI magnification

bumping this for visibility but should FEAGI really be storing this info?


Stop using "Create new edition"

It's a concept that users don't need to know, and it confuses them.
This comes from user testing.

LGTM


BUG: Removing student from a team on Github doesn't get reflected in app

STR:  Add a student to two teams in Github. Run refresh github teams job.  Student shows up on two teams.  Remove student from one of those teams in Github.  Run refresh github teams job.
Observed: Student still shows up on both teams in Github Linker and Slack Bot
Desired: Student only shows up in one of the two teams.

#211 will resolve this via a webhook that is received when a user is removed from a team. For now, the only way to resolve this is to run the “Purge Github Info” (approximate name) and then the refresh team jobs again to flush out the old data, as the teams job doesn’t delete any existing records right now.


More Security Resolutions

Whitespace and alias fixes

Fixed:

https://github.com/MWGMorningwood/Immy-Scripts-Shared/security/code-scanning/92
https://github.com/MWGMorningwood/Immy-Scripts-Shared/security/code-scanning/91
https://github.com/MWGMorningwood/Immy-Scripts-Shared/security/code-scanning/90
https://github.com/MWGMorningwood/Immy-Scripts-Shared/security/code-scanning/89


[CROSSDATA-52] [Mongo Datasource] Upgrade to Spark 1.5

Branch feature/spark-1.5 merged supporting Spark 1.5

+1 LGTM

+1


Display file while moving with arrows in the explorer

VSCode Version: 1.8.1
OS Version: Linux

There is a feature from sublime, when selecting a file in the sidebar (click only once) and then by using the arrows to navigate to the next file displayed in the sidebar, the content of the file changes the next instant. In vscode you need to press enter after focusing on the file.
This is really helpful when wanting to check small thing in many files. Especially in git diff, if there are small changes you can navigate fast just with the arrows.

If you implement this feature make sure it's an opt-in. I can see how someone can like this feature, but for me as keyboard-only user this feature is very distracting.


Remove unnecessary logo.svg file from template.

I think that having an image file on the project template is just cumbersome, since virtually every user will have to delete it.
Other famous CLI tools for creating projects (such as rails or ember-cli) also display images on the first welcome screen, but neither add the actual image file to the generated project.

I think it's less about showing a logo, and more about showcasing to a new user how they might be able to use images in React. Most of the template code is there for that purpose.

The point was to demonstrate how importing images works in Webpack (which is not obvious to anyone who has never worked with it). I think people will try to use strings in src directly if they don't see this example, and will be frustrated that this doesn't work. Do you have an alternative way of explaining this pattern to users? Perhaps, some lint rules could help? Also, I'm curious: how often do you create new apps?

(...) showcasing to a new user how they might be able to use images in React.
I think people will try to use strings in src directly if they don't see this example

Makes a lot of sense. You guys have convinced me =]

The point was to demonstrate how importing images works in Webpack (which is not obvious to anyone who has never worked with it).

Yes, I saw it first time after creating my first create-react-app!


Animation doesn't play on the right widget when they are moved in the stack before starting the animation.

Steps to Reproduce

Create a Stack of Stateful widgets each one having an AnimationController, a GestureDetector and a VoidCallback.
Have the GestureDetector send the VoidCallback when any of the the wigdets is tapped. The VoidCallback triggers a rebuild of the Stack (setState) with the widgets reordered to have the tapped widget at the bottom of the stack (last item) in order to have it draws on top of all the other widgets in the Stack.
After sending the VoidCallback, the GestureDetector calls forward() on the AnimationController.
Notice how the widget that animates is not the one that was tapped. Instead, it's the one just after.

Hypothesis: The AnimationController and the Stack are somehow using the position of the widget in the Stack to play the animation. But they are not taking the reordering of the Stack in consideration, effectively playing the animation on the widget that is at the position of the tapped widget before reordering.
Note: Doing step 3 before step 2 yield the same result. Tested on iOS only.

Logs

flutter run --verbose
No exception here.

flutter analyze
Nothing here related to the issue.

flutter doctor -v
[✓] Flutter (Channel beta, v0.7.3, on Mac OS X 10.13.6 17G65, locale en-GB)
    • Flutter version 0.7.3 at /Users/mario/dev/flutter
    • Framework revision 3b309bda07 (3 weeks ago), 2018-08-28 12:39:24 -0700
    • Engine revision af42b6dc95
    • Dart version 2.1.0-dev.1.0.flutter-ccb16f7282

[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at /Users/mario/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-27, build-tools 27.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
    • All Android licenses accepted.

[!] iOS toolchain - develop for iOS devices (Xcode 9.4.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 9.4.1, Build version 9F2000
    • ios-deploy 1.9.2
    ! CocoaPods out of date (1.5.0 is recommended).
        CocoaPods is used to retrieve the iOS platform side's plugin code that responds to your plugin usage on the Dart side.
        Without resolving iOS dependencies with CocoaPods, plugins will not work on iOS.
        For more info, see https://flutter.io/platform-plugins
      To upgrade:
        brew upgrade cocoapods
        pod setup

[✓] Android Studio (version 3.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 28.0.1
    • Dart plugin version 173.4700
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

[✓] Connected devices (1 available)
    • iPhone • 995f3a6eb01e8c6c241fb5de3ea98ab82384e894 • ios • iOS 11.4.1

! Doctor found issues in 1 category.

Here is a link to a video of the issue:
https://drive.google.com/file/d/1VdkZPKc2boOIMm7Xa5T91CZL926crNGv/view?usp=sharing
When I press a message it goes at the bottom of the Stack but the one under animates instead.

Here is a demo app with the issue:
https://gist.github.com/quentinleguennec/45b0297247eda36fab9786155e57232f

Could it be a problem with missing keys? I have not tried your example, but that would make sense when you are reordering elements in a children-list.
https://docs.flutter.io/flutter/foundation/Key-class.html
See for example use of keys in: https://flutter.io/cookbook/gestures/dismissible/

Thanks @sigurdm !
That was it, I added a UniqueKey and now it works as expected!


PrismaClient is unable to be run in the browser.

Bug description
Got this error in the prismaClient configuration file.

How to reproduce

Expected behavior
No response
Prisma information

generator client {
  provider = "prisma-client-js"
}

datasource db {
  provider = "postgresql"
  url  	= env("DATABASE_URL")
  directUrl = env("DIRECT_URL")
  shadowDatabaseUrl = env("SHADOW_DATABASE_URL")
}
model Account {
  id                String  @id @default(cuid())
  userId            String
  type              String
  provider          String
  providerAccountId String
  refresh_token     String? @db.Text
  access_token      String? @db.Text
  expires_at        Int?
  token_type        String?
  scope             String?
  id_token          String? @db.Text
  session_state     String?

  user User @relation(fields: [userId], references: [id], onDelete: Cascade)

  @@unique([provider, providerAccountId])
}

model Session {
  id           String   @id @default(cuid())
  userId       String
  expires      DateTime
  sessionToken String   @unique
  accessToken  String   @unique
  createdAt    DateTime @default(now())
  updatedAt    DateTime @updatedAt
  user         User     @relation(fields: [userId], references: [id])
}

model User {
  id            String    @id @default(cuid())
  name          String?
  email         String?   @unique
  emailVerified DateTime?
  image         String?
  createdAt     DateTime  @default(now())
  updatedAt     DateTime  @updatedAt
  accounts      Account[]
  sessions      Session[]
}

model VerificationRequest {
  id         String   @id @default(cuid())
  identifier String
  token      String   @unique
  expires    DateTime
  createdAt  DateTime @default(now())
  updatedAt  DateTime @updatedAt

  @@unique([identifier, token])
}

import { PrismaClient } from '@prisma/client';

declare global {
    // eslint-disable-next-line no-var, no-unused-vars
    var cachedPrisma: PrismaClient;
}

let prisma: PrismaClient;
if (process.env.NODE_ENV === 'production') {
    prisma = new PrismaClient();
} else {
    if (!global.cachedPrisma) {
        global.cachedPrisma = new PrismaClient();
    }
    prisma = global.cachedPrisma;
}

export const db = prisma;

Environment & setup

OS: macOS
Database: PostgreSQL
Node.js version: v19.7.0

Prisma Version
prisma                  : 4.16.2
@prisma/client          : 4.16.2
Current platform        : darwin-arm64
Query Engine (Node-API) : libquery-engine 4bc8b6e1b66cb932731fb1bdbbc550d1e010de81 (at node_modules/.pnpm/@prisma+engines<EMAIL_ADDRESS>Migration Engine        : migration-engine-cli 4bc8b6e1b66cb932731fb1bdbbc550d1e010de81 (at node_modules/.pnpm/@prisma+engines@4.16.2/node_modules/@prisma/engines/migration-engine-darwin-arm64)
Format Wasm             : @prisma/prisma-fmt-wasm 4.16.1-1.4bc8b6e1b66cb932731fb1bdbbc550d1e010de81
Default Engines Hash    : 4bc8b6e1b66cb932731fb1bdbbc550d1e010de81
Studio                  : 0.484.0

I am implementing next auth, here's my auth file:
import { db } from '@/lib/db';
import { PrismaAdapter } from '@next-auth/prisma-adapter';
import { NextAuthOptions } from 'next-auth';
import GoogleProvider from 'next-auth/providers/google';

function getGoogleCredentials(): { clientId: string; clientSecret: string } {
    const clientId = process.env.GOOGLE_CLIENT_ID;
    const clientSecret = process.env.GOOGLE_CLIENT_SECRET;
    if (!clientId || clientId.length === 0) {
        throw new Error('Missing GOOGLE_CLIENT_ID');
    }

    if (!clientSecret || clientSecret.length === 0) {
        throw new Error('Missing GOOGLE_CLIENT_SECRET');
    }

    return { clientId, clientSecret };
}

export const authOptions: NextAuthOptions = {
    secret: process.env.NEXTAUTH_SECRET,
    adapter: PrismaAdapter(db),
    session: {
        strategy: 'jwt',
    },
    pages: {
        signIn: '/',
    },
    providers: [
        GoogleProvider({
            clientId: getGoogleCredentials().clientId,
            clientSecret: getGoogleCredentials().clientSecret,
        }),
    ],
    callbacks: {
        async session({ token, session }) {
            if (token) {
                session.user.id = token.id;
                session.user.name = token.name;
                session.user.email = token.email;
                session.user.image = token.picture;
            }

            return session;
        },
        async jwt({ token, user }) {
            const dbUser = await db.user.findFirst({
                where: {
                    email: token.email,
                },
            });

            if (!dbUser) {
                token.id = user!.id;
                return token;
            }

            return {
                id: dbUser.id,
                name: dbUser.name,
                email: dbUser.email,
                picture: dbUser.image,
            };
        },
        redirect() {
            return '/';
        },
    },
};

Could you please provide us with a reproduction repository?

Somehow it seems this is included in your frontend? The Prisma Client would then throw an error.

I'm having a similar issue but mine is in the edge I believe. Any suggestions? For context, I'm also using nextauth with next13 with a similar auth setup as @millsp

I'm having a similar issue but mine is in the edge I believe. Any suggestions? For context, I'm also using nextauth with next13 with a similar auth setup as @exosky12

Could you please provide us with a reproduction repository?

Somehow it seems this is included in your frontend? The Prisma Client would then throw an error.

I'm just trying to initialize Prisma, not calling anything for now @millsp :/

This code suggests that at some point something called new PrismaClient either in the browser-side code or somehow it was bundled incorrectly. It would help us if you could share a small repro repository with what is happening.

Yes, I think the problem comes from my getServerSession, how can I get the actual session (next auth) without causing troubles ?
I will do a reproduction repository as fast as possible.

This code suggests that at some point something called new PrismaClient either in the browser-side code or somehow it was bundled incorrectly. It would help us if you could share a small repro repository with what is happening.

I know it's not a Repo, but this error is happening to me when I use Prisma from a Server Function (server action) that's being called from a Client Component in NextJS using the App Router.

It would be really, really helpful if someone could take the time to put a case like this into a reproduction repository. We'll be able to take that and make it run any time, but setting it up from scratch will take us to properly reserve time for this - which we barely have any right now. Sorry - so please someone help us out. Thanks!

I had this same error and I was able to resolve it by updating the auth file.
Instead of using Prisma Adapter directly in the authOptions, use it seperately
Instead of this
export const authOptions: NextAuthOptions = {
    secret: process.env.NEXTAUTH_SECRET,
    adapter: PrismaAdapter(db),
    session: {
        strategy: 'jwt',
    },

Do this
const adapter = PrismaAdapter(prisma);
export const authOptions: NextAuthOptions = {
    secret: process.env.NEXTAUTH_SECRET,
    adapter: adapter,
    session: {
        strategy: 'jwt',
    },

Update me if this works out for you, it did for me anyway!

I got the same error because I was passing data as props that were called in the layout file I assigned as a client component, "use client".

Hi, everything good? I had the same problem few minutes ago, after a some tries, the thing was everything the frontend and how i treated the client side button.
I just made an AuthenticationButton recieving provider.id from getProviders method in Server Component:
import { AuthenticationButton } from '@/components/AuthenticationButton';
import { getProviders } from 'next-auth/react';
import Image from 'next/image';
import { FcGoogle } from 'react-icons/fc';

export default async function SignUp() {
  const providers = await getProviders();

  return (

            <Image src='/promogate-logo.svg' alt='Promogate Logo' width={120} height={60} />

          {
            Object.values(providers!).map((provider, i) => {
              return (
                <AuthenticationButton key={i} className='border border-gray-500 p-2 w-full text-sm text-center'
                providerId={provider.id}>
                  <FcGoogle />
                  Cadastrar-se com {provider.name}
                </AuthenticationButton>
              )
            })
          }

  )

'use client'
import { openSans } from '@/application/utils/fonts'
import { signIn } from 'next-auth/react'
import React, { ButtonHTMLAttributes } from 'react'

interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
  children: React.ReactNode,
  className?: string,
  providerId: string
}

export function AuthenticationButton({ children, className, providerId, ...rest }: ButtonProps) {
  return (
    <button {...rest} className={'p-4 rounded-lg rounded-tl-none flex justify-center items-center gap-x-4' + ' ' + className}
    style={openSans.style} onClick={() => signIn(providerId)}>
      {children}
    </button>
  )
}

No prisma errors doing this.

I had a similar issue due to me importing a prisma instance in my nextauth-file. I then exported the authOptions to be used with getServerSession, which I then had imported in a file shared between both the backend and the frontend

The same error occurred in my monorepo repository as well.
The cause was that I consolidated both frontend and backend functions into index.ts. As you all have pointed out, it was directly because I imported authOptions, but be careful as there seems to be a pattern where it's indirectly imported.
index.ts (Bug occurs)
export { default } from "next-auth";
export { signIn, signOut, useSession } from "next-auth/react";
export { authOptions } from "./src/auth-options";
export { getServerSession } from "./src/get-session";

👇Fixed
client.ts
export { default } from "next-auth";
export { SessionProvider, signIn, signOut, useSession } from "next-auth/react";

server.ts
export { authOptions } from "./src/auth-options";
export { getServerSession } from "./src/get-session";

package.json
  "files": [
    "client.ts",
    "server.ts"
  ],

Can someone please help us get a working reproduction of the problem? The code snippets above might be helpful if you know Next.js and next-auth, but it would take us quite some time to put that together. It would be amazing if one of you could create a new project and implement the minimal code to show the problem - and then put it on GitHub. Thank you!

While we still don't have a reproduction of this issue, I don't think this is a Prisma issue per se.
The problem to me is that Prisma Client should be used in a backend JS runtime (e.g., Node.js) only, but when developing isomorphic Next.js projects (in which the separation between frontend and backend isn't necessarily super clear at first glance), the Prisma Client instance can easily leak into the frontend.
And, since these leaks cause Prisma Client to run in a browser (which is not supported), the runtime error above is thrown.

In addition to what @jkomyno said, we recently fixed the fact that that we threw errors when doing new PrismaClient and now we moved these errors to only happen if you try emitting a query in your front-end (which obviously cannot work).


git install issue

clone metadrive git repo or fetch will lead to an error:
remote: Enumerating objects: 791, done.
remote: Counting objects: 100% (750/750), done.
remote: Compressing objects: 100% (416/416), done.
error: RPC 失败。curl 92 HTTP/2 stream 0 was not closed cleanly: CANCEL (err 8)
error: 预期仍然需要 7614 个字节的正文
fetch-pack: unexpected disconnect while reading sideband packet
fatal: 过早的文件结束符（EOF）
fatal: fetch-pack：无效的 index-pack 输出

This affects installing pip via git (pip install git+), git config --global http.postBuffer 20000000 will not make pip valid.
I'm not sure if the repo is too big causing this problem?

It works from my side. And we have a unit test for checking this and it works fine as well. So I guess there might be something wrong on your side.

It might be related to the poor network connection to github.

Most likely it's a network issue. You can try several times at different times, and I've also encountered this problem.
大概率是网络问题，可以在不同时间段多尝试几次，我也遇到了这个问题。


D&c regression 115

Closes #115

getting there, but we can't merge in it's current state
need to add the PCA params, as that isn't part of the grid search, use the custom PCA class and the hyperparam grid to get those
also need to remove all the redundant timeseries analysis code
so basically, put the PCA params into the grid search and tidy up the whole notebook

getting there, but we can't merge in it's current state
need to add the PCA params, as that isn't part of the grid search, use the custom PCA class and the hyperparam grid to get those
also need to remove all the redundant timeseries analysis code
so basically, put the PCA params into the grid search and tidy up the whole notebook

Added the PCA-specific hyperparameters, in the parameter grid for each model.
Removed the timeseries analysis code
I've cleaned this notebook, moved imports into one cell etc. But it would be better if we can have separate trello ticket for tidying up all the noteboks in one.

Please add 4 PCA components (currently goes 2,3,5???) and remove 5.
Time series analysis code is still in this notebook

Decomposition removed (time series)
File saved as given name on trello (name of file defined as constant)
Removed Random Forest and Gradient boosting models
Best model is being automatically selected, instead manually selecting LR model
Write up for plots
Please check section 6, to be removed or keep it?

Redundant code moved to specified file


Send Blank keys via Send-SeKeys

We have tests in UD that send empty strings to SendKeys.
Send-SeKeys -Element $Element -Keys ''

This doesn't work because the value is mandatory for keys. Probably should just remove the mandatory and send an empty string when you do that. This is valid for selenium.

best way might be to just have allow null or empty.

Pretty sure there's an [AllowEmpty] attribute or something somewhere in the PS libraries...


basic config leads to python unexpected indent

Behavior
Sending the following with visual send command (<space>sc):
def test():
    print(1)

def test2():
    print(2)

Leads to the following error:
Python 3.10.6 (main, May 29 2023, 11:10:38) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> def test():
...     print(1)
... def test2():
  File "<stdin>", line 3
    def test2():
    ^^^
SyntaxError: invalid syntax
>>>     print(2)
  File "<stdin>", line 1
    print(2)
IndentationError: unexpected indent
>>>
>>>

This error persists even if ignore_blank_lines = false
Setup
Using NVIM v0.9.1
I placed  the iron directory in the runtime path ~/.config/nvim/lua, for simple testing.
nvim -u NORC
:lua require('mytest')
-- ~/.config/nvim/lua/mytest.lua

require("iron.core").setup {
  config = {
    -- Whether a repl should be discarded or not
    scratch_repl = true,
    -- Your repl definitions come here
    repl_definition = {
      sh = {
        -- Can be a table or a function that
        -- returns a table (see below)
        command = { "zsh" },
      },
    },
    -- How the repl window will be displayed
    -- See below for more information
    repl_open_cmd = require("iron.view").split.vertical('50%')
  },
  -- Iron doesn't set keymaps by default anymore.
  -- You can set them here or manually add keymaps to the functions in iron.core
  keymaps = {
    send_motion = "<space>sc",
    visual_send = "<space>sc",
    send_file = "<space>sf",
    send_line = "<space>sl",
    send_until_cursor = "<space>su",
    send_mark = "<space>sm",
    mark_motion = "<space>mc",
    mark_visual = "<space>mc",
    remove_mark = "<space>md",
    cr = "<space>s<cr>",
    interrupt = "<space>s<space>",
    exit = "<space>sq",
    clear = "<space>cl",
  },
  -- If the highlight is on, you can change how it looks
  -- For the available options, check nvim_set_hl
  highlight = {
    italic = true,
  },
  ignore_blank_lines = true, -- ignore blank lines when sending visual select lines
}

Update
A few things. First, it seems the ignore_blank_lines from the config is being ignored during setup, if I set the default to be 'false' in the source core.lua, then the blank lines are included, and the pasting into the python repl works since the new lines are interpreted literally.
More importantly, things work fine with ipython.
I did some reading, and it seems that there is a lot of discussion about whether the default python repl should include "bracketed paste" as a feature:

https://bugs.python.org/issue43379
https://bugs.python.org/issue42819
https://bugs.python.org/issue39820

I don't know exactly what to make of all this. But perhaps the specific version of python (either built or downloaded) may or may not include bracketed paste.
If there is a simple solution I am not seeing please let me know.

I was having this same issue. By using some of your links to bug reports as jumping off points, I was able to find this question (question is about Mac, but I'm on linux) which implicates newer bash readline versions with having bracketed paste on by default.
I was able to fix the issue in my Iron REPL (python v3.10.12) by adding set enable-bracketed-paste off to my .inputrc and restarting the REPL. I hope this helps fix your problem!

I have the same issue.

Setting ignore_blank_lines = false in any of the following doesn't change the behaviour:

init.lua
site/pack/packer/start/iron.nvim/lua/iron/core.lua

For example this code:

def my_func():
    matches = [1, 2, 3]
    for match in matches:
        print(match)

Gives the following output:
In [1]:

In [1]:

In [1]: def my_func():
   ...:         matches = [1, 2, 3]
   ...:             for match in matches:
   ...:                         print(match)
  Cell In[1], line 3
    for match in matches:
    ^
IndentationError: unexpected indent

In [2]:

On my other laptop (Void Linux), this works with iPython not Python, on this
machine (SUSE Aeon) neither works.
The following is an example that doesn't work on either machine regardless of ipython:
Click Me

def split_into_tokens(html_text: str):
    tokens = []
    pattern = r"(?:<(h[1-6])>([^<]+)</\1>|([^<]+))"
    matches = re.findall(pattern, html_text)

    current_token = {}
    for match in matches:
        heading_level = match[0]
        heading_text = match[1].strip()
        other_text = match[2].strip()

        if heading_level:
            if current_token:
                tokens.append(current_token)
            current_token = {heading_level: heading_text, "p": ""}
        elif other_text:
            if current_token.get("p"):
                current_token["p"] += "\n"
            current_token["p"] += other_text

    if current_token:
        tokens.append(current_token)

    return tokens

I haven't been able to figure this out, for the moment, I'm using Fterm and  Tmux / Zellij.

@RyanGreenup I had the same issue, got the answer from this post
So the config starts with this. The key difference being the format = require("iron.fts.common").bracketed_paste.
That groups together the whole selected block and pastes it in in one go instead of line by line.
iron.setup {
  config = {
    ignore_blank_lines = true, -- ignore blank lines when sending visual select lines
    -- Whether a repl should be discarded or not
    scratch_repl = true,
    -- Your repl definitions come here
    repl_definition = {
      python = {
        command = "ipython",
        format = require("iron.fts.common").bracketed_paste,
      }
    },
    -- How the repl window will be displayed
    -- See below for more information
    repl_open_cmd = require('iron.view').bottom(40),
  },

I tried slime in the interim but I was having a similar issue.
I tried the solution by @gnsiva and that seems to have solved it, although when I comment it back out the problem is entirely solved so :shrug: .

hey @damca , I believe this issue is fixed now. Could you try updating the plug in. I was having the same issue and the last PR for this plugin addressed it. This problem no longer exists on my end.

I believe this is solved now, if this problem continues, please make another issue with an example that causes the same error.


majority-element.py 中的第一种方法貌似错了

for i in xrange(1, len(nums)):
if nums[idx] == nums[i]:
cnt += 1
else:
cnt -= 1
if cnt == 0:
idx = i
cnt = 1
感觉不对呀

This problem is tricky. Note that the majority element is is the element that appears more than [n/2] times. And try to think about it :)

oh,it's my misunderstanding. got it~ thanks :)


Mobile libraries should provide detailed unit tests

Unit tests should be provided for all parts of the mobile libraries.  Unit testing should be a big focus moving forward so automated testing can become part of the build process and ensure new code and pull requests don't break any existing code.
Unit tests for RPC classes are currently being written by the Livio team.

PR #240 has been merged.


[WIP] Fixes for SPD manifold and MMatrix

I've made some changes trying to get SPD manifolds working with MMatrix. Let's see how this goes in CI.
Ref. https://github.com/JuliaArrays/StaticArrays.jl/issues/696 and https://github.com/JuliaArrays/StaticArrays.jl/issues/697

For example one of my optimization problems in on the product manifold P(3)^{112x112x50}, i.e. a very large product manifold of 3x3 SPDs, there it might really be beneficial to use MMatrix (the Matlab version on just one vertical slice is for example

That also looks like a great application for PowerManifold and HybridArray, it uses the efficient linear algebra from StaticArrays.


[Question] Paying Custom CMI Recipes

Hejo,
it is possible to reward custom block, furnance or brewing recipes from CMI in jobs? I have tried it this way:
    Craft:
      '!Test':
        income: 1
        points: 2
        experience: 4

But the item is not recognized. Am I doing something wrong or is this a bug or is it more of a feature request? And if it is a feature request, should I create a ticket under Jobs or under CMI?
Jobs: 4.12.0
CMI: <IP_ADDRESS>
Paper 1.13.2 - 632

CMI creates regular recipes and you can only recognize them by their result material name, nothing more.


Adding new models Claude October, Gemini Pro 002, Gemini Flash 002. Some minor typo and bug fixes

Adding new models:
Claude Sonnet 3.5 October Release
Gemini Pro 002
Gemini Flash 002.
Some minor typo and bug fixes that I noticed while trying to run the benchmarking

Hi @maxwbuckley, thanks for the PR! Can you please split the PR in two? Ideally, one with the code changes and one with the new results. It would make it a lot easier to review the code. Thanks a lot!

Thanks for splitting! However, in this PR I still see the Python code changes. Can you please double check?

Closing as it has been added in #41


Review updates to task-version-update feature

I create a task with an old version, and fill its properties

Then I update it

And properties are still there

All as expected.

Quick check: @zonia3000, could you please remind me how/where we define the logic for matching an "old" tasks to a set of "new" ones? We should review whether this changes with fractal-server v2.7.0

For each task having a schema and a version we build the list of its update candidates looking for tasks having:

a defined schema and version
the same name and type of the target task
a version greater than the one of the target task

Logic is here: https://github.com/fractal-analytics-platform/fractal-web/blob/3d39133b7a1b3a6fec53a248b854f5d110374935/src/lib/components/v2/workflow/version-checker.js#L31

Thanks!
I think the current logic works most of the time, but we could tighten it a bit.
The high-level goal would be to also require that the task-group pkg_names match.
Here is one possible way of making it work
Instead of fetching /api/v2/task we fetch /api/v2/task-group, and on top of that we also fetch the specific task group of the current task.
Now we can filter task groups first, similar to
(
	task_group.version !== null &&
	task_group.pkg_name === current_task_pkg_name &&
       ...
)

where ... include some indirect checks, namely that the task_group.task_list includes one task such that

name is the given one
type is the given one
current checks about args_schema are valid

In this way, if two different task groups (pkgA version 1.2.3 and pkgB version 2.3.4) both include a task named test, we won't expose this is a valid version update.

Side remark: it's true that the filtering becomes quite more complex, but in principle the check on pkg_name matching should reduce the number of actual checks to a handful.
Also: when fetching /api/v2/task-group, I would also include only_active=True (which possibly makes the list even shorter).

I've added this check in PR #616


Questions-Refactor

On platform is unnecessary, as we have discussed at the previous meeting.
You should check if the laser reading is nan, before checking intersection.
*it=std::numeric_limits::quiet_NaN(); should be enough at
https://github.com/NumanAvci/laser_filters/blob/5f918d73f75959bb2dd16cfd54016acd32b834a7/src/PlatformFilter.cpp#L70-L78

https://github.com/NumanAvci/laser_filters/blob/5f918d73f75959bb2dd16cfd54016acd32b834a7/src/PlatformFilter.cpp#L90-L93
Unnecessary spaces - tabs.

https://github.com/NumanAvci/laser_filters/blob/5f918d73f75959bb2dd16cfd54016acd32b834a7/src/PlatformFilter.cpp#L106
Why the 2nd parameter is called scan_data_range_index, isn't it just range?
https://github.com/NumanAvci/laser_filters/blob/5f918d73f75959bb2dd16cfd54016acd32b834a7/src/PlatformFilter.cpp#L11-L31
Why do you request the tf once at initialization, is the robot never going to move?
Is robot position, or laser position important here?

https://github.com/NumanAvci/laser_filters/blob/5f918d73f75959bb2dd16cfd54016acd32b834a7/src/PlatformFilter.cpp#L109
Why do you add 135 degrees here? (The overall transformation you do here with cos-sin seems to be correct). Also what about the start - end of the lidar point. The line we check for intersection starts at laser sensors origin and ends at its respective range reading.
For checking coincidences, intersections ==0 is never a good option. Due to numerical errors, measurement noises you will never get exactly zero, rather value < fabs(epsilon) is a better approach given that epsilon is small enough.
https://github.com/NumanAvci/laser_filters/blob/5f918d73f75959bb2dd16cfd54016acd32b834a7/src/PlatformFilter.cpp#L124

There seem to be unnecessary calculations here. If you have an explanation of the method share the link, reference.
https://github.com/NumanAvci/laser_filters/blob/5f918d73f75959bb2dd16cfd54016acd32b834a7/src/PlatformFilter.cpp#L131-L135
Why do you need this? https://github.com/NumanAvci/laser_filters/blob/5f918d73f75959bb2dd16cfd54016acd32b834a7/src/PlatformFilter.cpp#L159
Check boost for intersection managing. We can refer to a line-to-line intersection or line-to-polygon intersection.
https://www.boost.org/doc/libs/1_64_0/libs/geometry/doc/html/geometry/reference/algorithms/intersection/intersection_3.html

Change this to a function:
https://github.com/NumanAvci/laser_filters/blob/f27fa1857e72ea12d20d188891e13fe7dce40328/src/PlatformFilter.cpp#L132-L136


Test mandate device

This pull request includes:

[ ] adequate testing for the new functionality or fixed issue
[ ] adequate documentation informing people about the change

cherry-picked your last commit - thanks @yih-redhat !