Lowering error

When executing the following code:
`
@jitclass( [('child1', float64)])
class Myclass(object):
def init(self, child1):
self.child1=child1
def apply(self):
return self.child1
vop = Myclass(2)
@vectorize([float64(int64, int64)],target="parallel", nopython=True)
def foo(s,o):
if np.isfinite(s) and np.isfinite(o):
return vop.apply()
else:
return np.nan
`
I get the following error:
`
raise NotImplementedError("cannot lower constant of type '%s'" % (ty,))
LoweringError: cannot lower constant of type 'instance.jitclass.Myclass#11252600child1:float64'
File "", line 14
[1] During: lowering "$30.1 = global(vop: <numba.jitclass.boxing.Myclass object at 0x2aab04170c50>)"   at  (14)
Failed at nopython (nopython mode backend)
cannot lower constant of type 'instance.jitclass.Myclass#11252600<child1:float64>'
If that may help, when instantiating vop locally inside the foo method as follows, it works fine:
@vectorize([float64(int64, int64)],target="parallel", nopython=True)
def foo(s,o):
vop = Myclass(2)
if np.isfinite(s) and np.isfinite(o):
return vop.apply()
else:
return np.nan
`

@sklam: Can you take a look at this?  Sounds like we're missing the lowering for a global jitclass, which should probably work the same as a global numpy array.

Is there maybe a workaround for that issue, or a local modification in the numba library code I can do in the meantime?
Thanks

This is a duplicate of #2501.


cmake with CUDA on Macbook Pro i7 fails

Below full output from my build command.
I did install the CUDA toolkit on my mac. It comes with a Radeon 450 Pro graphics card.
The card has 2GB memory. Compiling withut CUDA does work, but the miner has a 0.00MH/S hashrate.
I'm not a hero in cpp, but with some instructions I might be able to fix it. Please let me know how I could contribute.
Marcos-MacBook-Pro:build marco$ cmake -DETHASHCUDA=ON ..
-- [hunter] Calculating Config-SHA1
-- [hunter] Calculating Toolchain-SHA1
-- [hunter] HUNTER_ROOT: /Users/marco/.hunter
-- [hunter] [ Hunter-ID: 435b09a | Config-ID: cd01ff3 | Toolchain-ID: 8639299 ]
-- [hunter] BOOST_ROOT: /Users/marco/.hunter/_Base/435b09a/cd01ff3/8639299/Install (ver.: 1.64.0)
-- [hunter] BOOST_ROOT: /Users/marco/.hunter/_Base/435b09a/cd01ff3/8639299/Install (ver.: 1.64.0)
-- Boost version: 1.64.0
-- Found the following Boost libraries:
--   system
-- [hunter] JSONCPP_ROOT: /Users/marco/.hunter/_Base/435b09a/cd01ff3/8639299/Install (ver.: 1.8.0)
-- [hunter] LIBJSON-RPC-CPP_ROOT: /Users/marco/.hunter/_Base/435b09a/cd01ff3/8639299/Install (ver.: 0.7.0-p0)
------------------------------------------------------------------------
-- CMake 3.8.0
-- Build Release / Darwin
------------------------------------------------------------- components
-- ETHASHCL         Build OpenCL components                  ON
-- ETHASHCUDA       Build CUDA components                    ON
-- ETHSTRATUM       Build Stratum components                 ON
------------------------------------------------------------------------

-- Configuring done
-- Generating done
-- Build files have been written to: /Users/marco/code/cpp-ethereum/build
Marcos-MacBook-Pro:build marco$ cmake --build .
[  0%] Built target BuildInfo.h
Scanning dependencies of target devcore
[  3%] Building CXX object libdevcore/CMakeFiles/devcore.dir/CommonData.cpp.o
[  7%] Building CXX object libdevcore/CMakeFiles/devcore.dir/FixedHash.cpp.o
[ 11%] Building CXX object libdevcore/CMakeFiles/devcore.dir/Log.cpp.o
[ 14%] Building CXX object libdevcore/CMakeFiles/devcore.dir/RLP.cpp.o
[ 18%] Building CXX object libdevcore/CMakeFiles/devcore.dir/SHA3.cpp.o
[ 22%] Building CXX object libdevcore/CMakeFiles/devcore.dir/Worker.cpp.o
[ 25%] Linking CXX static library libdevcore.a
[ 25%] Built target devcore
Scanning dependencies of target ethash
[ 29%] Building C object libethash/CMakeFiles/ethash.dir/internal.c.o
[ 33%] Building C object libethash/CMakeFiles/ethash.dir/sha3.c.o
[ 37%] Linking C static library libethash.a
[ 37%] Built target ethash
Scanning dependencies of target ethash-cl
[ 40%] Building CXX object libethash-cl/CMakeFiles/ethash-cl.dir/ethash_cl_miner.cpp.o
In file included from /Users/marco/code/cpp-ethereum/libethash-cl/ethash_cl_miner.cpp:38:
In file included from /Users/marco/code/cpp-ethereum/libethash-cl/ethash_cl_miner.h:15:
/Users/marco/code/cpp-ethereum/libethash-cl/CL/cl.hpp:1829:5: warning: 'const' type qualifier on return type has no effect [-Wignored-qualifiers]
    const cl_type get() const { return object_; }
    ^~~~~~
/Users/marco/code/cpp-ethereum/libethash-cl/CL/cl.hpp:4581:25: warning: 'clCreateImage2D' is deprecated: first deprecated in macOS 10.8 [-Wdeprecated-declarations]
            object_ = ::clCreateImage2D(
                        ^
/System/Library/Frameworks/OpenCL.framework/Headers/cl.h:1170:1: note: 'clCreateImage2D' has been explicitly marked deprecated here
clCreateImage2D(cl_context              /* context */,
^
In file included from /Users/marco/code/cpp-ethereum/libethash-cl/ethash_cl_miner.cpp:38:
In file included from /Users/marco/code/cpp-ethereum/libethash-cl/ethash_cl_miner.h:15:
/Users/marco/code/cpp-ethereum/libethash-cl/CL/cl.hpp:4848:3: warning: 'weak_import' attribute only applies to variables and functions [-Wignored-attributes]
} CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
  ^
/System/Library/Frameworks/OpenCL.framework/Headers/cl_platform.h:63:57: note: expanded from macro 'CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED'
        #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED   CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8
                                                        ^
/System/Library/Frameworks/OpenCL.framework/Headers/cl_platform.h:49:57: note: expanded from macro 'CL_EXTENSION_WEAK_LINK'
    #define CL_EXTENSION_WEAK_LINK       __attribute__((weak_import))
                                                        ^
In file included from /Users/marco/code/cpp-ethereum/libethash-cl/ethash_cl_miner.cpp:38:
In file included from /Users/marco/code/cpp-ethereum/libethash-cl/ethash_cl_miner.h:15:
/Users/marco/code/cpp-ethereum/libethash-cl/CL/cl.hpp:5014:25: warning: 'clCreateImage3D' is deprecated: first deprecated in macOS 10.8 [-Wdeprecated-declarations]
            object_ = ::clCreateImage3D(
                        ^
/System/Library/Frameworks/OpenCL.framework/Headers/cl.h:1180:1: note: 'clCreateImage3D' has been explicitly marked deprecated here
clCreateImage3D(cl_context              /* context */,
^
In file included from /Users/marco/code/cpp-ethereum/libethash-cl/ethash_cl_miner.cpp:38:
In file included from /Users/marco/code/cpp-ethereum/libethash-cl/ethash_cl_miner.h:15:
/Users/marco/code/cpp-ethereum/libethash-cl/CL/cl.hpp:5104:21: warning: 'clCreateFromGLTexture3D' is deprecated: first deprecated in macOS 10.8 [-Wdeprecated-declarations]
        object_ = ::clCreateFromGLTexture3D(
                    ^
/System/Library/Frameworks/OpenCL.framework/Headers/cl_gl.h:116:1: note: 'clCreateFromGLTexture3D' has been explicitly marked deprecated here
clCreateFromGLTexture3D(cl_context      /* context */,
^
5 warnings generated.
[ 44%] Linking CXX static library libethash-cl.a
[ 48%] Built target ethash-cl
[ 51%] Building NVCC (Device) object libethash-cuda/CMakeFiles/ethash-cuda.dir/ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc fatal   : The version ('80100') of the host compiler ('Apple clang') is not supported
CMake Error at ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o.Release.cmake:222 (message):
  Error generating
  /Users/marco/code/cpp-ethereum/build/libethash-cuda/CMakeFiles/ethash-cuda.dir//./ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o

make[2]: *** [libethash-cuda/CMakeFiles/ethash-cuda.dir/ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o] Error 1
make[1]: *** [libethash-cuda/CMakeFiles/ethash-cuda.dir/all] Error 2
make: *** [all] Error 2

never mind. cuda only works for the onboard nvidia, but this one has to few memory. The ATI also doesn't seem to work though it has 2GB memory which also worked on my old laptop.


Figure out how to prevent travis from sometimes timing out

Travis sometimes seems to hit the 5000ms limit during various tests. I have no idea why and don't want to just bump the timeout for all test cases.

There doesn't seem to be any way to fix this.


implement testForAngular Microsoft Edge webdriver

feature request for implementation of testForAngular for Microsoft Edge.
configuration
exports.config = {
  // directConnect: true,
  seleniumAddress: 'http://localhost:17556',
  // Capabilities to be passed to the webdriver instance.
  capabilities: {
    'browserName': 'MicrosoftEdge'
  },

  // Framework to use. Jasmine is recommended.
  framework: 'jasmine',

  // Spec patterns are relative to the current working directory when
  // protractor is called.
  specs: ['example_spec.js'],

  // Options to be passed to Jasmine.
  jasmineNodeOpts: {
    defaultTimeoutInterval: 30000
  }
};

spec:
describe('angularjs homepage', function() {
  it('should greet the named user', function() {
    browser.get('http://www.angularjs.org');

    element(by.model('yourName')).sendKeys('Julie');

    var greeting = element(by.binding('yourName'));

    expect(greeting.getText()).toEqual('Hello Julie!');
  });
});

output:
C:\Users\IEUser\src\protractor>node bin/protractor example/conf.js
Using the selenium server at http://localhost:17556
[launcher] Running 1 instances of WebDriver
Started
F

Failures:
1) angularjs homepage should greet the named user
  Message:
    Failed: Error while running testForAngular: not implemented
  Stack:
    Error: Failed: Error while running testForAngular: not implemented
        at C:\Users\IEUser\src\protractor\node_modules\jasminewd2\index.js:101:16
        at Promise.invokeCallback_ (C:\Users\IEUser\src\protractor\node_modules\selenium-webdriver\lib\promise.js:1329:14)
        at TaskQueue.execute_ (C:\Users\IEUser\src\protractor\node_modules\selenium-webdriver\lib\promise.js:2790:14)
        at TaskQueue.executeNext_ (C:\Users\IEUser\src\protractor\node_modules\selenium-webdriver\lib\promise.js:2773:21)

1 spec, 1 failure
Finished in 0.531 seconds

Quick update - we discussed that this might be a problem with Edge not implementing the webdriver command EXECUTE_ASYNC_SCRIPT. Will investigate.

Investigating a simple test for browser.driver.executeAsyncScript:
describe('async script', function() {
  it('should console output', function() {
    browser.driver.executeAsyncScript(
      'console.log("hello world");'
    );
  });
});

output:
E:\>node bin/protractor example/conf.js
Using the selenium server at http://localhost:17556
[launcher] Running 1 instances of WebDriver
Started
F

Failures:
1) async script should console output
  Message:
    Failed: not implemented
  Stack:
    WebDriverError: not implemented
        at WebDriverError (E:\node_modules\selenium-webdriver\error.js:26:26)
        at Object.checkLegacyResponse (E:\node_modules\selenium-webdriver\error.js:580:13)
        at E:\node_modules\selenium-webdriver\lib\webdriver.js:360:15
        at Promise.invokeCallback_ (E:\node_modules\selenium-webdriver\lib\promise.js:1329:14)
        at TaskQueue.execute_ (E:\node_modules\selenium-webdriver\lib\promise.js:2790:14)
        at TaskQueue.executeNext_ (E:\node_modules\selenium-webdriver\lib\promise.js:2773:21)
        at E:\node_modules\selenium-webdriver\lib\promise.js:2652:27
        at E:\node_modules\selenium-webdriver\lib\promise.js:639:7
        at process._tickCallback (node.js:406:9)
    From: Task: Run it("should console output") in control flow
        at Object.<anonymous> (E:\node_modules\jasminewd2\index.js:81:14)
    From asynchronous test:
    Error
        at Suite.<anonymous> (E:\example\example_spec.js:2:3)
        at Object.<anonymous> (E:\example\example_spec.js:1:1)
        at Module._compile (module.js:413:34)
        at Object.Module._extensions..js (module.js:422:10)
        at Module.load (module.js:357:32)
        at Function.Module._load (module.js:314:12)

1 spec, 1 failure
Finished in 0.047 seconds
[launcher] 0 instance(s) of WebDriver still running
[launcher] microsoft edge #01 failed 1 test(s)
[launcher] overall: 1 failed spec(s)
[launcher] Process exited with error code 1

According to https://dev.windows.com/en-us/microsoft-edge/platform/status/webdriver/details/ (not sure if this is the canonical source) support for execute async script is still "preview".

https://github.com/SeleniumHQ/selenium/blob/master/javascript/node/selenium-webdriver/CHANGES.md#v2520
Support for Edge. in V 2.52

@manoj9788 Yes, that is why we upgraded to 2.52; however, the Edge driver does not support the execute async script yet.

Yep got it :) thanks.

This appears to be working now with release 10586 (version 2.10586). Example here:
https://github.com/cnishina/protractor-examples/tree/master/protractor/edge_spec
Also, added webdriver-manager support for edge: https://github.com/angular/webdriver-manager/pull/56


Does not run with Angular 5

Tested with a new empty project (Angular CLI 1.5.0 and Angular 5)
ng new test-project
npm install ng-trim-value-accessor --save
(include like in README)
ng serve
ERROR in ./node_modules/ng-trim-value-accessor/index.ts
Module build failed: Error: [...]/node_modules/ng-trim-value-accessor/index.ts is not part of the compilation output. Please check the other error messages for details.
    at AngularCompilerPlugin.getCompiledFile ([...]/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:629:23)
    at plugin.done.then ([...]/node_modules/@ngtools/webpack/src/loader.js:467:39)
    at process._tickCallback (internal/process/next_tick.js:109:7)
 @ ./src/app/app.module.ts 9:0-65
 @ ./src/main.ts
 @ multi webpack-dev-server/client?http://<IP_ADDRESS>:0 ./src/main.ts

Found a similar issue with workaround here:
https://github.com/angular/angular/issues/20091

Found some more infos:
The problem could be that you are providing .ts files in the npm package.
See the second half of this comment:

So we don't really support using incorrectly packaged libraries with TS sources. It's something you do at your risk.
https://github.com/angular/angular-cli/issues/8284#issuecomment-341417325

I can now confirm the *.ts files in the library as error source.
As quick check I tried the following:
clone your repo
npm install
npm install --save-dev @types/es6-shim (needed for build)
npm run build
copy the dist/ folder to my-app/node_modules/ng-trim-value-accessor/

My app then builds without problems.

Thanks for the report and rundown. Do you mind submitting a PR for that?

I don't know if I can help with this. I have no experience in creating modules or in publishing anything on npm yet. I only know, that providing .ts files in a module is wrong from the above linked comment.
So it must be something like "compile before uploading it to npm", but how exactly to do this is the question :-)

@moritz-h Can you please verify whether the latest version works for you?

@khashayar Looks good. ng serve runs now also without --aot. In node_module/ng-trim-value-accessor/ are now only the .js and .d.ts files. No other .ts sources. :+1:

Great! Thanks for the PR!


Jbox Modal window disappears if browser window is resized vertically too small

When I resize the browser horizontally, all is good.
If I resize it vertically I see this element changes until top reaches 'auto':
<div id="jBox2" class="jBox-wrapper jBox-Modal jBox-Default jBox-hasTitle jBox-closeButton-title" style="position: fixed; display: block; opacity: 1; z-index: 10000; top: auto; left: auto; right: auto; bottom: auto;">

If top reaches auto, the window disappears. Chrome console says:
Uncaught TypeError: Cannot read property 'outerHeight' of undefined

Are you using the newest version? Sounds like a bug I fixed in 0.4.7
If it's the newest Version, at what browser size does the error occur? When the jBox wrapper reaches the viewport edges or before that?

Hi,
Thanks for replying quickly.
I upgraded to the newest version, and it is the same. It happens when the modal window touches the top of the browser. I see in your demo page the behavior is okay. ( https://stephanwagner.me/jBox/ )
In that case, the element top changes to a negative value. For me, it changes to top:auto and I get the console error on every resize until I make the vertical large enough again.
Try here: http://www.tier2computing.com and click on request service and resize the window.

Ok, I'll close it...
If the error comes up again and you have an example page or fiddle where I can reproduce the error, open it up again and I'll have a look.


isGooglePayAvailable method returns "Not implemented on device" and presentGooglePay method does not show any  paymentResult promise being logged in the console window even though the paymentintent is being sent, rather the app crashes.

Description of the bug:
isGooglePayAvailable method returns "Not implemented on device" and presentGooglePay method does not show any  paymentResult promise being logged in the console window even though the paymentIntent is being sent. Rather the app crashes, and I'm returned to the  home screen of  my android device. Also, after the app crashes, I'm getting a message being logged in the logcat section of Android Studio that says :
To Reproduce:
I am trying to implement GooglePay integration in an ionic + react + capacitor mobile application. I have installed and run capacitor-community/stripe plugin using following commands :
npm install @capacitor-community/stripe
npx cap sync
And then I used “CapacitorStripeProvider” to initialize the plugin like so:
import { CapacitorStripeProvider } from ‘@capacitor-community/stripe/dist/esm/react/provider’;
const App: React.FC = () => (
<CapacitorStripeProvider
publishableKey=“Your Publishable Key”
fallback={
Loading…
}

...

);
export default App;
And then, I followed the official docs of capacitor-community/stripe to implement the Google Pay functionality. I did everything mentioned there. Called different methods such as isGooglePayAvailable, createGooglePayAvailable and presentGooglePayAvailable.
There are several issues that I’m facing after running the code for GooglePay Integration:
1.) On certain android devices, I’m getting a message that says “Not implemented on device” being logged in the console window from the isGooglePayAvailable method even though I have Gpay app installed and logged in in my android device. On other devices, isGooglePayAvailable methods executes successfully and returns resolve: void response.
2.) Also, after having called presentGooglePay method, my android app crashes and I am returned to the home screen of my android device. Also, I am getting native Stripe.presentGooglePay being logged in the console window but I’m not able to see any “result Stripe.presentGooglePay” in the console window.
3.) Also, I’m getting an error in the logcat of Android Studio that says:
Caused by: java.lang.IllegalStateException: presentForPaymentIntent() may only be called when Google Pay is available on this device.
I know all of this must have been quite confusing and cryptic as well to comprehend. So, it would be better if any one could provide me his/her contact details (an email id or anything as such would do), so that I could better make my points clear and share screen to show the code that I’ve used and the errors that I’m getting.
Here's the screenshot of the console messages and errors that I'm getting in the console window.

After clicking the create button createGooglePay method is called and here's the screenshot of the console window that I'm getting:

After clicking on the present button, presentGooglePay method is called and here's the screenshot of the console window:

Here's the code that I've used for GooglePay integration.
import { IonItem, IonLabel, IonList, IonListHeader } from "@ionic/react";
import { useEffect, useState } from "react";
import { Stripe, GooglePayEventsEnum } from "@capacitor-community/stripe";
/**

If you use<EMAIL_ADDRESS>you can write:
import { useCapacitorStripe } from '@capacitor-community/stripe/react';
*/
// import { useCapacitorStripe } from "@capacitor-community/stripe/dist/esm/react/provider";
import { usePaymentSheet } from "../../hooks/usePaymentSheet";
// import { ProcessStatus } from '../../interfaces';
import React from "react";

const GooglePayStripe: React.FC = () => {
const [step, setStep] = useState("initial");
const [isGPayAvailable, setIsGpayAvailable] = useState(false);
const { createPaymentIntent } = usePaymentSheet();
console.log("stripe", Stripe);
console.log(isGPayAvailable);
const checkIfGooglePlayAvailable = () => {
    const isAvailable = Stripe.isGooglePayAvailable().then((res) => {
        console.log("res", res);
    }).catch(e => {
        console.log("isGooglePayAvailable", e);
    });
    console.log(
        "🚀 ~ file: index.tsx ~ line 30 ~ checkIfGooglePlayAvailable ~ isAvailable",
        isAvailable
    );
    if (isAvailable === undefined) {
        setIsGpayAvailable(false);
        setStep("unavailable");
    } else {
        setIsGpayAvailable(true);
        setStep("ready");
    }
};

useEffect(() => {
    checkIfGooglePlayAvailable();

    Stripe.addListener(GooglePayEventsEnum.Completed, () => {
        console.log('GooglePayEventsEnum.Completed');
      });

}, []);

console.log(isGPayAvailable);

return (
    <IonList>
        <IonListHeader>
            <IonLabel>GooglePay</IonLabel>
        </IonListHeader>
        {isGPayAvailable ? (
            <>
                <IonItem
                    button
                    detail
                    disabled={step !== "ready"}
                    onClick={async e => {
                        e.preventDefault();
                        const { paymentIntent } = await createPaymentIntent();
                        try {
                            await Stripe.createGooglePay({
                                paymentIntentClientSecret: paymentIntent
                            });
                            setStep("create");
                        } catch (e) {
                            console.log(e);
                        }
                    }}
                >
                    <IonLabel>Create</IonLabel>
                </IonItem>
                <IonItem
                    button
                    detail
                    disabled={step !== "create"}
                    onClick={async e => {
                        e.preventDefault();
                        try {
                          const result = await Stripe.presentGooglePay();
                          if (result.paymentResult === GooglePayEventsEnum.Completed) {
                            console.log('Woohooo!!')
                          }
                            setStep("present");
                        } catch (e) {
                            console.log(e);
                        }
                    }}
                >
                    <IonLabel>Present</IonLabel>
                </IonItem>
            </>
        ) : (
            <IonItem button detail disabled={true}>
                <IonLabel>Your device does not supports GooglePay.</IonLabel>
            </IonItem>
        )}
    </IonList>
);

};
export default GooglePayStripe;
Here's the code that I've used to get the paymentIntent from the usePaymentSheet hook:
import { useCallback, useMemo } from "react";
export const usePaymentSheet = () => {
const api = useMemo(() => {
if (process.env.REACT_APP_API_URL) {
console.log(
" process.env.REACT_APP_API_URL",
process.env.REACT_APP_API_URL
);
return process.env.REACT_APP_API_URL;
}
return "http://<IP_ADDRESS>:5000/";
}, []);
const createPaymentIntent = useCallback(async (): Promise<{
customer: string;
paymentIntent: string;
ephemeralKey: string;
}> => {
const { customer, paymentIntent, ephemeralKey } = await fetch(
${api}intent,
{
method: "POST"
}
).then(res => res.json());
return {
customer,
paymentIntent,
ephemeralKey
};
}, [api]);
return {
createPaymentIntent
};
};
My package.json file:
{
"name": "RealOrNot",
"version": "0.0.1",
"private": true,
"dependencies": {
"@awesome-cordova-plugins/core": "^5.39.1",
"@awesome-cordova-plugins/pdf-generator": "^5.39.1",
"@awesome-cordova-plugins/photo-viewer": "^5.39.1",
"@capacitor-community/facebook-login": "^3.3.0",
"@capacitor-community/stripe": "^3.6.0",
"@capacitor/android": "^3.4.1",
"@capacitor/app": "1.1.0",
"@capacitor/core": "^3.4.1",
"@capacitor/filesystem": "^1.1.0",
"@capacitor/haptics": "1.1.4",
"@capacitor/keyboard": "1.2.2",
"@capacitor/status-bar": "1.0.8",
"@codetrix-studio/capacitor-google-auth": "^3.1.0",
"@emotion/react": "^11.7.1",
"@emotion/styled": "^11.6.0",
"@google-pay/button-react": "^2.0.0",
"@ionic/react": "^6.0.0",
"@ionic/react-router": "^6.0.0",
"@mui/material": "^5.4.2",
"@paypal/paypal-js": "^5.0.3",
"@paypal/react-paypal-js": "^7.6.0",
"@testing-library/jest-dom": "^5.11.9",
"@testing-library/react": "^11.2.5",
"@testing-library/user-event": "^12.6.3",
"@types/jest": "^26.0.20",
"@types/node": "^12.19.15",
"@types/react": "^16.14.3",
"@types/react-dom": "^16.9.10",
"@types/react-router": "^5.1.11",
"@types/react-router-dom": "^5.1.7",
"axios": "^0.26.0",
"com-sarriaroman-photoviewer": "^1.2.5",
"cordova-pdf-generator": "^2.1.1",
"firebase": "^8.3.1",
"formik": "^2.2.9",
"ionic": "^5.4.16",
"ionicons": "^5.4.0",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-facebook-login": "^4.1.1",
"react-google-login": "^5.2.2",
"react-jwt": "^1.1.4",
"react-native-crypto-js": "^1.0.0",
"react-otp-input": "^2.4.0",
"react-paypal-express-checkout": "^1.0.5",
"react-phone-input-2": "^2.15.0",
"react-redux": "^7.2.6",
"react-router": "^5.2.0",
"react-router-dom": "^5.2.0",
"react-scripts": "^5.0.0",
"react-to-print": "^2.14.4",
"redux": "^4.1.2",
"redux-devtools-extension": "^2.13.9",
"redux-logger": "^3.0.6",
"redux-persist": "^6.0.0",
"redux-thunk": "^2.4.1",
"sass": "^1.49.7",
"scss": "^0.2.4",
"typescript": "^4.1.3",
"web-vitals": "^0.2.4",
"workbox-background-sync": "^5.1.4",
"workbox-broadcast-update": "^5.1.4",
"workbox-cacheable-response": "^5.1.4",
"workbox-core": "^5.1.4",
"workbox-expiration": "^5.1.4",
"workbox-google-analytics": "^5.1.4",
"workbox-navigation-preload": "^5.1.4",
"workbox-precaching": "^5.1.4",
"workbox-range-requests": "^5.1.4",
"workbox-routing": "^5.1.4",
"workbox-strategies": "^5.1.4",
"workbox-streams": "^5.1.4",
"yup": "^0.32.11"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --transformIgnorePatterns 'node_modules/(?!(@ionic/react|@ionic/react-router|@ionic/core|@stencil/core|ionicons)/)'",
"eject": "react-scripts eject",
"lint": "eslint ./src --fix",
"resources": "cordova-res ios && cordova-res android && node scripts/resources.js"
},
"lint-staged": {
"src//*.{ts,tsx}": [
"eslint --ext .tsx --ext .ts ./src --fix"
],
"./src/": [
"prettier --write ."
]
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@capacitor/cli": "^3.4.1",
"@types/react-facebook-login": "^4.1.4",
"@types/react-native-crypto-js": "^1.0.0",
"@types/redux-logger": "^3.0.9",
"@typescript-eslint/eslint-plugin": "^5.12.0",
"@typescript-eslint/parser": "^5.12.0",
"eslint": "^8.9.0",
"eslint-config-airbnb": "^17.1.0",
"eslint-config-prettier": "^4.1.0",
"eslint-config-prettier-react": "0.0.24",
"eslint-plugin-html": "^5.0.3",
"eslint-plugin-import": "^2.16.0",
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-prettier": "^3.0.1",
"eslint-plugin-react": "^7.12.4",
"eslint-plugin-react-hooks": "^1.3.0",
"husky": "^4.3.8",
"lint-staged": "^12.3.4",
"prettier": "^1.19.1",
"pretty-quick": "^3.1.3"
},
"description": "An Ionic project"
}
My capacitor config ---> capacitor.config.json:
{
"appId": "com.realornot.app",
"appName": "Real or Not",
"webDir": "build",
"bundledWebRuntime": false,
"plugins": {
"GoogleAuth": {
"scopes": ["profile", "email"],
"serverClientId": "628669220892-fnk0krfnb75e31ckuvl59d012012v01t.apps.googleusercontent.com",
"forceCodeForRefreshToken": true
}
}
}
Thanks,
Rahul

Got the same issue, followed the docs and everything compiles successfully. However when I comment out the isGooglePayAvailable() my app crashes. When I uncomment the isGooglePayAvailable() the console says "Not implemented" like in your case. I am also using capacitor 3.6.0. A colleague has the same code as me but on capacitor 2.6.4 and everything works fine, however I cannot change the capacitor versions for obvious reasons
This is console after I comment out the isGooglePayAvailable() => No Error, but App crashes

This is console after I add the isGooglePayAvailable() => Error, but App doesn't crash

The function I use on click button

@rahul-raj07 @nxj1129   Please try this code:
const isAvailable = Stripe.isGooglePayAvailable().then(() => true).catch(() => false);

isGooglePayAvailable method is return void(or error).
This is how it is used in the demo.:
https://github.com/capacitor-community/stripe/blob/master/demo/angular/src/app/tab1/tab1.page.ts#L135

@rdlabo I tried this code also, but I get the same error unfortunately

@rahul-raj07 @nxj1129 I understand. Sorry, I forgot to release current version to npm.
I released v3.7.0. Please try this. https://github.com/capacitor-community/stripe/releases/tag/v3.7.0

@rahul-raj07 @nxj1129
In android device（android app)、 isGooglePayAvailable is checked here:
https://github.com/capacitor-community/stripe/blob/master/android/src/main/java/com/getcapacitor/community/stripe/StripePlugin.java#L64
If always false, you may not have enough settings. This demo's url will help you:
https://github.com/capacitor-community/stripe/blob/master/demo/angular/android/app/src/main/AndroidManifest.xml#L37-L39
https://github.com/capacitor-community/stripe/blob/master/demo/angular/android/app/src/main/res/values/strings.xml#L8-L12
Thanks.

@rahul-raj07 @nxj1129 have u found a solution fo that issue ??

This Issue is closed because there are no updates. If there are any updates, please start a new Issue.
Thank you.


logo and branding

the logo we have today is pretty basic.  just words.

something iconic that alludes to mozilla and eugenetech would be great.

Do you have any preferences on color?
Where/on what will it be used?
What's the style? (Modern, retro, vintage, quirky, classic)

With the timeframe, I'd consider using the one we have and redirecting this effort to designing promo assets ASAP. We should start promoting no later than 10/31 or 11/1 if at all possible.

I ended up going with this

I'm asking the community for help:  https://eugenetech.switchboardhq.com/posts/41501-open-eugene-fest-needs-a-more-festive-logo

style guide from Mozilla: https://docs.google.com/presentation/d/1O7e-8burb_YBE0z29T7I0qxGHQ38mzrdikQEPEe9oy8/edit?usp=sharing

branding chat meeting sunday at noon:  https://calendar.google.com/event?action=TEMPLATE&tmeid=NDE2czc1ZmQ4M2xkNGtqaTAzOWFsbDRtMWwgZXVndGVjaGNhbEBt&tmsrc=eugtechcal%40gmail.com


Force stop error (Crash error)

Hi friend,
PBJvision not working when start to record in ios 6.1.6 (iPod 4th Gen), Please help me
am waiting for reply.............

@manisolutions14 hi, thanks for interest in the project. most folks use stackoverflow.com for general inquires and discussion.
it is always good to include backtraces or specific logs for problems you may encounter.

Thnk piemonte......


Where is the matching of anchor box and ground truth?

Hi, I read the two matching functions in matching_utils.py in ssd_encoder_decoder, but I can't find out where are these functions called. I searched all files in this repo with keyword matching_utils. Does anyone know where does the matching happen? I only know it has to happen before calculating the loss function, but I don't know they should be called in which module. Thank you!

I am sorry that's a stupid question, it's used immediately by ssd_encoder, please delete this issue since I don't know how to delete it.....


Email responsiveness issue?

I was wondering email responsiveness issue is being resolved yet?

can u share some screenshots?

Closing due to inactivity.

Closing due to inactivity.


minor tweaks/improvements to climatology and util functions; extended tests

Thanks for submitting a PR, your contribution is really appreciated!
Here's a quick checklist that should be present in PRs (you can delete this text from the final description, this is
just a guideline):

[ ] Create a new changelog file in the changelog folder, with a name like <ISSUE NUMBER>.<TYPE>.rst. See CHANGELOG.rst for details.
[ ] Include documentation when adding new features.
[x] Include new tests or update existing tests when applicable.

Working with the climatology function has uncovered some shortcomings. This pull request addresses some of these.

@klindsay28: I dropped the time_bound variable because it was not being computed correctly and was therefore wrong. You are absolutely correct, however: we should include a correct time_bound variable and associated bounds attribute in the output.
Do you have suggestion for how it should be computed?  I can try to look at this today.

The following might be a step in the correct direction:

tb_out_lo = dset[tb_name][:,0].groupby(time_dot_year).min(dim=time_coord_name).rename({"year": time_coord_name})
tb_out_hi = dset[tb_name][:,1].groupby(time_dot_year).max(dim=time_coord_name).rename({"year": time_coord_name})
d2_name = dset[tb_name].dims[1]
tb_out = xr.concat((tb_out_lo, tb_out_hi), dim=d2_name)

(Sorry for the long lines. I couldn't figure out how to get line wrapping with 'insert a quote' or 'insert code' to work.)

@klindsay28, thanks, that works. I have implemented. Testing now and hope to have a PR shortly.
cc @andersy005


Fix indentation of gitusage list

Created Jira QUARKS-30 for unrelated travis PubSubTest failure.
merging the PR.


w2ui grid request interval

Hi there
I love this library, and have been using the grid combo editable functionality. In this case I needed to be able to control the combo (with remote data source) I had a requirement to be able to control the interval for the ajax callout, so I made the following changes in the w2ui-1.4.2.js (Apologies if this approach is not cool, but I am fairly new to Git and not sure how the whole Pull thing works...)
=======================
FROM: (line 10724)
...
markSearch      : false
};
TO:
...
markSearch      : false,
interval        : 0             // how long to delay the ajax call for
};
=========================
FROM: (line 10750)
if (options.url) this.request(0);
TO:
if (options.url) this.request(options.interval);
=======================
FROM: (line 11643)
if (typeof interval == 'undefined')  interval = 350;

TO:
if (typeof interval == 'undefined') {
if (options.interval && options.interval > 0)
interval = options.interval;
else
interval = 350;
}

I integrated the changes, but please submit a pull request next time. It would be a good time to learn how to do it :). Also, note that you will need to change /src/* filtes, because they are bundled together by Grunt and put into /dist/* folder.


User Data Validation Improvement

FEATURE REQUEST
Inspiration
From learning about cross-database relation exceptions and the difficulty surrounding using multiple databases (i.e. the validation database) to handle load scripts with side-effects, we discover we have a choice to make on how to handle the validation of data without committing that data to the database.
Manually including .using(db) clauses introduces undesirable overhead, and turns out to have challenges relating to instance methods that make new queries (e.g. any method that makes a call like Model.objects...).    Those fresh database queries will get the default database even though the object containing the method was created using a query to the validation database.
In learning about how to handle this, it was discovered that you can override Django's default "database router" by creating your own derived class that overrides its 4 methods.  This would make all the usages of .using(db) clauses unnecessary.  All you would have to do is tell the router to direct queries to the validation database.
However, the only reason we're using a second database in the first place is 2-fold:

The load scripts have side-effects (i.e. the dry-run/debug mode makes changes to the database).
Subsequent load script runs depend on the previous runs having committed their data to the database.

There's also the issue of the load scripts stopping mid-load, causing the user to have to run the validation iteratively to learn of each issue 1 by 1, so either way, the load scripts need to be refactored.
Description
The choices for implementation are:

Implement a database router (and remove all the .using(db) clauses and any customized code to work around other issues, like calls to the method in MultiDBMixin [in a coming quick-fix PR])
Refactor the load scripts to not have database side-effects, then refactor the validation view to wrap all the load scripts in an atomic transaction

Alternatives
See the description.  A choice needs to be made before this issue can proceed.
Dependencies
none
Comment
A PR with a quick fix is coming.  There is a stack post that goes into more detail about the cross-db relations and possible solutions.
The database router solution should make it unnecessary to put calls to full_clean behind a conditional so that it only runs when the database is the default database.

ISSUE OWNER SECTION
Assumptions
none
Requirements
This will be broken down into phases per load script to produce PRs that are more readily consumable.  Each phase should be accompanied by new and all-working tests.

Phase 1

[x] 1. Load scripts generate as many actionable errors as possible in 1 run
[x] 2. If a load action in the script requires input involved in a previous error, skip that load action
[x] 3. Make it possible to control the verbosity of the loads
[x] 4. Raise error on unknown headers

Phase 2

[x] 5. Make it possible to defer mass auto-updates outside of the load scripts (so it can be run by either load_study or load_study_set)

Phase 3

[x] 6. Dry-run mode has no database side-effects when there's an exception or when run in dry run mode (and specifically when not run in --validate mode)

[x] 6.1. Wrap loading code in an atomic transaction

Phase 4

[ ] 7. Validation page works by running in dry-run mode on the main database

Phase 5

[ ] 8. Remove the validation database

[ ] 8.1. Remove .using(db), .save(using=db), and if self.db == settings.TRACEBASE_DB: rec.full_clean()
[ ] 8.2. Revert database settings
[ ] 8.3. Update docs

Phase 6

[ ] 9. Add the ability to skip all autoupdates/buffering and caching updates so that validation mode doesn't take time doing that

Limitations
none
Affected Components

change: DataRepo/management/commands/load*
change: DataRepo/utils/*load*
change: Tracebase/settings.py

DESIGN
Interface Change description
No changes in user experience other than receiving more errors in 1 run on the validation page.  The --database and --validate options will go away on the command line.  --debug will change to --dryrun.  An option to disable auto-update will be added.
Code Change Description
The load scripts will be changed to buffer all errors in a self.errors array attribute.  Different model loads will be encapsulated in methods, with required inputs (some of which may require successful prior model loads).  If a required input is from a previous failed model load, the model load is skipped so as to not output useless errors.  There will be a new requirement to report unrecognized (optional) headers as an error.
Tests

[ ] 1. Load scripts generate as many actionable errors as possible in 1 run - test that self.errors can contain multiple errors
[ ] 2. If a load action in the script requires input involved in a previous error, skip that load action - test that (e.g.) a tissue error will not be followed by a sample error in the same run

Make it possible to control the verbosity of the loads - unnecessary test

[ ] 4. Raise error on unknown headers - input a bad header for an optional column and check that an error about it is raised
[ ] 5. Make it possible to defer mass auto-updates outside of the load scripts (so it can be run by either load_study or load_study_set) - Try deferring auto-updates using the new option and check that the buffer is populated after the run

Dry-run mode has no database side-effects (when not run in --validate mode) - test unnecessary (see 6.1)

[ ] 6.1. Wrap loading code in an atomic transaction - Run a successful load and check that nothing in the DB has changed

Validation page works by running in dry-run mode on the main database - existing tests should suffice

Remove the validation database - tests unnecessary

8.1. Remove .using(db), .save(using=db), and if self.db == settings.TRACEBASE_DB: rec.full_clean() - tests unnecessary
8.2. Revert database settings - tests unnecessary
8.3. Update docs - tests unnecessary

I've been reading about Django's database routers this morning on stack and in the django docs:

Multiple Databases in Django 3.2

It looks like the database router class may not be well suited for having a process temporarily use a different database.  It looks like it's for having different models use different databases.  I wondered about possibly creating either a class variable or an instance variable to use to switch databases, but I don't think a class variable would be restricted to just the validation view load script runs, and an instance variable would have to be set for every model object involved (which is back to the same annoying need for having .using(db) everywhere...
So I'm leaning toward a refactor to accomplish a few things:

Gather as many errors as possible to spit back in 1 run, to cut down on the need for successive runs
Make dry-runs not have any side-effects
Adjust methods to allow things to run inside an atomic transaction block (so that there aren't exceptions about queries being performed)
Turn off auto-updates during a dry run of multiple scripts and perform buffered autoupdates once they leave the atomic transaction block

I have a post in the Django forum asking about routers and if they can handle our use-case, because this refactor would be a much larger undertaking in comparison.  If the database router could fix the issues with multiple databases, I think it would be a relatively small effort.  And someone replied while I was composing this comment.  He said you can accomplish the goal of a separate database, but by launching a separate task (e.g. using celery) that is configured to use a different database.  He confirmed my doubts that a database router could do this.  And knowing how much overhead there is associated with tasks/celery, I think that we should go the refactor/atomic-transaction route.

The separate database strategy could still work, but it would require that the load scripts don't call model methods that make fresh queries...  And I also don't know how to deal with full_clean.  Either way, a refactor would be necessary to at least better consolidate errors for users.

Definitely leaning towards a refactor that removes the extra validation database, if the router is not process specific.  Fills me with unease that I don't know what database I might be addressing (or that it could switch, depending on the context).

Yeah, I have similar concerns.  That's why I edited my latest PR to comment out the link to the validation page.  Though the guy on the Django forum did say that you can make it process-specific by launching a new process with a separate settings file.  That would certainly be quicker than a refactor, but I feel like there are other advantages to a refactor as well, so I started trying out a small refactor to at least buffer "some" errors in the sample loader.

ToDo, phase 4

[ ] Add test for when accucor cannot run (maybe if there's is at least 1 exception from sample table loader and an exception for every row/sample in the accucor file, clear out the errors and set state to UNCHECKED)
[ ] Catch the ValidationError exceptions that happen where there are duplicate compound/label count issues and ignore them, so processing may proceed
[ ] Add test to ensure user can proceed to submit when there are only warnings
[ ] Add test to ensure submission link is not presented when there are errors in the sample sheet
[ ] Add test to ensure submission link is not presented when there are errors in any accucor file
[ ] Add tests to ensure the database doesn't change
[ ] See if I can include proper tracebacks in the aggregated exceptions (current work-around is saving it as a string in exception.tb_str).  Might need to always do a raise/except everywhere.
[ ] OPTIONAL: Move the cull_warnings and buffer_exception methods to a TraceBaseLoader superclass

Incidentally, regarding the "proper tracebacks" item in the TODO list above, I gained insight into tracebacks this morning that I didn't understand before.  A traceback isn't created at the creation of the exception object. It's not created at the moment it's raised.  And it's not created when it's caught.  It's built from the bottom up, as the exception travels up the stack, thus it stops being built when it's caught.
I guess I never really thought about it before. To me, it was a black box.  I think I implicitly assumed that when the exception object was constructed, it constructed the whole traceback, and that when you caught an exception, it sliced the difference between the exception point and the catch.  And I never scrutinized my assumption.  I don't think I ever even knew I was assuming it.  And I think I was applying my knowledge of the caller() function in perl, which I understood(/assumed?) to keep a constant record of the call stack.
I gained this insight thanks to the person who answered my stack question about why I wasn't getting the full traceback when I buffered an exception.  He was spot on in understanding the (implicit) assumption I was making.

After running the new cold exposure data through the dev validate interface in my sandbox, I have a few things I want to address.  Perhaps I'll do this in phase 4.5...

[ ] Figure out the reason behind an empty sample name in DuplicateValues errors and create a specific error
[ ] Study names in the DuplicateValues error are broken - fix
[ ] Simplify sample name report - Including study name this way is confusing
[ ] Filter units from infusion_rate values and issue a warning when they're included
[ ] Create a separate file input for isocorr files
[ ] Line break missing samples and duplicate Isotopes
[ ] Label the atom counts in the dupe isotopes error for clarification
[ ] Make more informative Dupe MSRun errors
[ ] Report MissingSamplesError in the context of the sample file instead of database
[ ] Create MissingCompounds error that lists the compounds

So it turns out that the MAX_LABELED_ATOMS has to be the max number of atoms in the compound with the most atoms that have a label applied.  In the cold exposure data, that was fatty acid C34:1, which has a formula of C34H66O2. So I should:

[ ] Create a specific exception that reports the issue described above and it should include the formula, and why it's creating a record with a label count higher than MAX_LABELED_ATOMS.  It should catch this case:

ValidationError: {'count': ['Ensure this value is less than or equal to 30.']}

All of the todo items in the comment above are now complete.  There remain a couple of housekeeping items I want to keep in mind as I move on to phase 5:

[ ] Run the original Cold Exposure data through to make sure everything is handled correctly
[ ] Wrap ValidationsErrors, IntegrityErrors, and all unanticipated exceptions in a generic exception that indicates the row of the input file where the exception was encountered and the data on that row.  It should also suggest creating a custom exception.
[ ] Make a final pass on the code changes to remove debug prints, commented code, and fill in any docstrings where methods are not entirely clear

[ ] Improve ExistingMSRun to not list samples if all samples in common with another accucor/isocorr file account for all samples in the current accucor/isocorr file

New changes in #678 were previously overlooked.  Re-opening.


[KYUUBI #2643][FOLLOWUP] generate spnego auth token dynamically for e…

…very request

Why are the changes needed?

How was this patch tested?

[ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

[ ] Add screenshots for manual tests if appropriate

[ ] Run test locally before make a pull request

spnego token is for one-time use.

Codecov Report

Merging #2786 (d7c7943) into master (d2ceb04) will decrease coverage by 0.02%.
The diff coverage is 81.08%.

@@             Coverage Diff              @@
##             master    #2786      +/-   ##
============================================
- Coverage     62.20%   62.17%   -0.03%
  Complexity      201      201
============================================
  Files           464      464
  Lines         20839    20842       +3
  Branches       2815     2815
============================================
- Hits          12962    12959       -3
- Misses         6617     6620       +3
- Partials       1260     1263       +3

Impacted Files
Coverage Δ

...ava/org/apache/kyuubi/client/KyuubiRestClient.java
80.72% <72.00%> (-1.78%)
:arrow_down:

...in/java/org/apache/kyuubi/client/BatchRestApi.java
100.00% <100.00%> (ø)

...main/java/org/apache/kyuubi/client/RestClient.java
80.70% <100.00%> (-0.34%)
:arrow_down:

...g/apache/kyuubi/operation/BatchJobSubmission.scala
87.17% <0.00%> (-2.57%)
:arrow_down:

...ache/kyuubi/operation/KyuubiOperationManager.scala
78.46% <0.00%> (-1.54%)
:arrow_down:

...in/scala/org/apache/kyuubi/config/KyuubiConf.scala
96.77% <0.00%> (-0.11%)
:arrow_down:

Continue to review full report at Codecov.

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

thanks, merging to master


Update Fingerprints for Kia Carnival 2023 in Taiwan

This is the 8 seater Kia Carnival (2023 Premium version) in Taiwan.
Car
Which car (make, model, year) this fingerprint is for:
Kia Carnival 2023 (Premium version) in Taiwan
Route
A route with the fingerprint:
00227110bdc60587/2024-03-29--16-02-14

Forgot to make the route public, just did it, route should be available now.

Already fuzzy fingerprints on master


clean up init files

Coverage increased (+0.0%) to 88.26% when pulling c02d362adc16d0fc017290b62575b2c4b773b7ce on phobson:fix-imports into 1ef7d390862997b6c2694ec284717c97653774b6 on Geosyntec:master.


Social Security Numbers (SSN)

Name / Description

Social Security Numbers
Sample Snippets

True Positives
123-45-6789

False Positives
[snippet]

[optional] Propose Solution

[0-9]{3}-[0-9]{2}-[0-9]{4}

The simplest before/after pair would be \A|[^0-9-] and \z|[^0-9-].
To deal with possible FPs it might make sense to extend it to \A|[^0-9A-Za-z-] and \z|[^0-9A-Za-z-].


Fix case typo in MarketCurrency

quoteCurrency: market.marketCurrency should be market.MarketCurrency
This causes quoteCurrency to be undefined.
Fixed the typo.

fix is for BittrexAPI


Added types for createInput and FormKitTypeDefinition

Added the V type to allow for node types to stop the tsc error on create input

Thanks 👍


TypeFilter example is misleading with how ActionFilterAttribute is used

The documentation on [TypeFilter] is using a somewhat misleading example:
[TypeFilter(typeof(AddHeaderAttribute), Arguments = new object[] { "Author", "Steve Smith (@ardalis)" })]
public IActionResult Hi(string name)
{
    return Content($"Hi {name}");
}

This suggests that the combination of [TypeFilter] and a filter attribute implementation (AddHeaderAttribute) is a useful combination. However, [TypeFilter] is actually supposed to be used with any kind of filter implementation, and a filter attribute that inherits from ~FilterAttribute is meant to be used as an attribute directly.
I understand that AddHeaderAttribute was probably chosen because it was a filter that was implemented earlier in that topic (so readers know it already). But it was introduced as a filter attribute that can be used directly as an attribute. And that’s the primary reason why you would inherit from ~FilterAttribute: To implement a filter and a filter factory at the same time that can be used as an attribute.
Since the type filter example is part of the dependency injection topic, using the AddHeaderAttribute filter is actually a bad fit anyway since it does not require any service dependencies.
If the filter implementation had additional service dependencies, it would be a better example for the DI topic. For example this implementation that has an additional service dependency:
public class AddHeaderWithDependenciesAttribute : ResultFilterAttribute
{
    public AddHeaderWithDependenciesAttribute(string name, string value, ISomeService someService)
    {
        // …
    }

    // …
}

This could be added like this, and it would work just fine since that’s what the TypeFilter attribute does:
[TypeFilter(typeof(AddHeaderWithDependenciesAttribute), Arguments = new object[] { "Author", "Steve Smith (@ardalis)" })]
public IActionResult Hi(string name) { … }

However, since it’s a filter attribute, inheriting from ResultFilterAttribute, I would also expect to be able to use it as a filter directly but that won’t work because the constructor will also require the service dependency:
[AddHeaderWithDependenciesAttribute("foo", "bar", !?!?!)]
public IActionResult Hi(string name) { … }

So, long story short, I would appreciate if the example for TypeFilter would actually use a filter implementation (not a filter attribute!) that used both passed and injected arguments. For example:
[TypeFilter(typeof(AddHeaderWithDependenciesFilter), Arguments = new object[] { "Example value" })]
public IActionResult Example()
{
    return Content("Example");
}

public class AddHeaderWithDependenciesFilter : IResultFilter
{
    private readonly string _value;
    private readonly ILogger<AddHeaderWithDependenciesFilter> _logger;
    public AddHeaderWithDependenciesFilter(string value, ILogger<AddHeaderWithDependenciesFilter> logger)
    {
        _value = value;
        _logger = logger;
    }

    public void OnResultExecuted(ResultExecutedContext context)
    { }
    public void OnResultExecuting(ResultExecutingContext context)
    { }

    // …
}

@dougbu please review and provide new sample code (or suggest another reviewer).


Update Reason
The model is neither used in a standard document or triangle document, which indicates that the model is not used anymore.
If there are still reasons to still have this model in the repository, please provide a short rationale in the comments. If not, please indicate with a "+1" that you are OK with deprecating the model.
Deprecating a model means, that it will be removed after two Tractus-X releases from the repository. For details, please refer to the GOVERNANCE process.
MS1 Criteria

[ ] The model that should be deprecated exists and is not deprecated already
[ ] The respective model does not affect existing use cases (aspect is either used in higher versions or replaced by a different aspect)
[ ] A shared aspect, which will be deprecated, is not used by any released aspect model

@JulianSchererZF please check this request

@bs-jokri what do you mean with the Aspect Model is not used in a standard or triangle?
See standard document of the model as well as the triangle for quality here:

CX-0092: https://github.com/catenax-eV/product-standardization-prod/tree/main/standards/CX-0092-AspectModelQualityTaskAttachment
CX-0071: https://github.com/catenax-eV/product-standardization-prod/tree/main/standards/CX-0071-TriangleQualityEarlyWarningFieldandRootCause

Request rejected

@modelling_team --> Please close this issue and do NOT deprecate the model
@agg3fe

Closing issue as no deprecation is required.


get_posts product_variation

Hey guys.
I have a get_posts function that selects ALL product variations ('post_type' => 'product_variation'). Now this function returns the variations for EVERY language. How can is modify the call to select only variations for the current language? 'lang' => 'de' does not work. Or is there another way to select ALL product variations?

why don't you post the code for your function?
probably you should get the variable products (the products are filtered by language) and then get the variations of those products.

I dont think the code is necessary, because I described it well. But here you go:
get_posts(array( 			'nopaging' => true, 			'post_type' => 'product_variation', 			'post_status' => 'publish', 			'lang' => 'de', 			'suppress_filters' => true ))
Is there a reason why you dont link the variations together as translations? So we can use default polylang functionality to select this variations or use functions like pll_get_post?

I meant the wider context, not just that one line, as it's hard to advise the best way to do it without understanding what you are trying to do.
Use wc_get_products() to get woocommerce products and you just get the variable products by language and access their variations from there.
eg
wc_get_products( array ('type' => 'variable') )
would return the variable products
I have floated the idea of re-engineering the variations in #168, but actually this would cause more overhead on the taxonomy tables which are some of the biggest queries in this setup already and probably not worth it since there is essentially no point in getting the variations by themselves.
There is essentially no point in getting the variations by themselves because Product variations are not complete products without getting other information attached the parent which is not available at the variation level, so to be compliant and compatible with wooCommerce you should be following its api in this way.
Unless you have some completely different use case which you haven't explained and I haven't been able to imagine.

Thanks for the detailed answer! That makes sense because of the overhead. BUT you should consider a compromise, because if you disable the plugin, you lose all the translations for the variations. I did this once to try another plugin and had a huge mess after that. If you use normal translations then your plugin is more compatible with other plugins like Polylang for Woocommerce etc.

Polylang for WooCommerce is a paid plugin and if they want to implement a migration script they are welcome.
Hyyan plugin was written about 2 years earlier than Polylang for WooCommerce so didn't take this into account.
Hyyan plugin is only supported by the community / unpaid volunteers in their spare time, anyone is welcome to submit such a migration script if they want to, including you.
Then maybe we can close this down and just tell people to use the paid version :)
Is it any good?  The trouble with closed source and lack of a public issues list is you really can't tell the coverage and extent of issues unless you buy it.  Which I don't want to do in case I unconsciously and unintentionally use ideas from that in fixes to this one.
I don't think you should lose the links by deactivating and reactivating though.
It would also be possible to reestablish the Hyyan links but doing a script based on the code sample in #168


Missing exports on web version

Bug
The index.web.js file only exports default, it should also export useSafeArea, SafeAreaProvider, SafeAreaConsumer and SafeAreaContext.

this library is deprecated, use react-native-safe-area-context instead :)

this library is deprecated, use react-native-safe-area-context instead :)


Reformat Python code for 2023.03 release

This patch applies yapf (v0.31.0, yapf -i -r -p -vv .) and isort (v5.12.0, isort .) on the root of the repo.
At some point I'd also love to run some linter, e.g. flake8 to remove unused imports, but that requires some manual work, and I won't do it on this review.

Thanks for doing this cleanup work @ricrogz