Simplify binding when there are a lot of classes/methods/functions to bind

Hello,
I was using AngelScript for a project, and might be interested to switch to PocketPy, as a scripting language for a small game.
There are several advantages in PocketPy, for example no need to implement strings and lists/arrays yourself, and the fact that it's (almost) the well known python instead of a specific language.
One of the things AngelScript can do that PockerPy can't do currently, is to bind a function just in one line. There's no need to write a lambda wrapper for each of the functions/methods you want to make available in scripts.
This makes much less work when you have to register many classes/method/functions.
The idea would be to go towards something like this:
struct Point {
  double x;
  double y;

  Point (double x1, double y1): x(x1), y(y1) {}

  double length () {
    return sqrt(x*x + y*y);
  }

  void add (const Point& pt) {
    x += pt.x;
    y += pt.y;
  }

  PY_CLASS(Point, builtins, Point, vm, mod, type){
    vm->bind_constructor<Point, double, double>(type, "__new__(self, x=0, y=0)");
    vm->bind_field(type, "x", &Point::x);
    vm->bind_field(type, "y", &Point::y);
    vm->bind_method(type, "length(self)", &Point::length);
    vm->bind_method(type, "add(self, other)", &Point::add);
  }

};

Basically it would use some template obscure magic to translate from:
vm->bind_method(type, "length(self)", &Point::length);

to approximatively:
vm->bind(type, "length(self)", [](VM* vm, ArgsView args){
  Point& self = py_cast<Point&>(vm, args[0]);
  return py_var( self.length() );
});

I may share some code if interested.

Hi @qtnc
First, please allow me to invite you to join our discord server https://discord.gg/WWaq72GzXv I am glad to provide suggessions for your bindings of your game.
Currently, the officially supported bindings are like this:
vm->bind(type, "length(self)", [](VM* vm, ArgsView args){
  Point& self = py_cast<Point&>(vm, args[0]);
  return py_var( self.length() );
});

We want to make users know what happens inside the binding. And this is easy to debug than templates.
I know you want to have an easier way. There are solutions.
You can check this https://pocketpy.dev/bindings/#automatic-bindings we have a repo to demonstrate how to generate bindings from metadata. And in this repo, I use some undocumented binding apis. For exmaple, _bind(...).
https://github.com/blueloveTH/pkpy-bindings/blob/main/output/raylibw.cpp#L2012
    _bind(vm, mod, "InitWindow(width: int, height: int, title: str) -> None", &InitWindow);
    _bind(vm, mod, "CloseWindow() -> None", &CloseWindow);
    _bind(vm, mod, "WindowShouldClose() -> bool", &WindowShouldClose);
    _bind(vm, mod, "IsWindowReady() -> bool", &IsWindowReady);
    _bind(vm, mod, "IsWindowFullscreen() -> bool", &IsWindowFullscreen);
    _bind(vm, mod, "IsWindowHidden() -> bool", &IsWindowHidden);
    _bind(vm, mod, "IsWindowMinimized() -> bool", &IsWindowMinimized);
    _bind(vm, mod, "IsWindowMaximized() -> bool", &IsWindowMaximized);

You can find many useful practice in it.

Have a look at https://github.com/blueloveTH/pocketpy/blob/main/include/pocketpy/bindings.h for all convenient macros and templates.


[Question/Feedback]: Module-support creation child resources (Bicep)

Check for previous/existing GitHub issues

[X] I have checked for previous/existing GitHub issues

Description
I've used the Bicep CARML modules in the past for creating child resources like a secret in a already existing key-vault and a route in a existing routeTable.
I was using the secret child resource of the key-vault CARML module as follows:
module vaults './modules/key-vault/vault/secret/main.bicep' = {...}
I've tried to use the same method with AVM but this does not work.
Auto-complete error msg is telling me this resource(secret) does not exist.
Similar to the key-vault resource, I've tried to add a new network route into an existing routeTable using the Bicep code below, the result is that

Existing routes get deleted, scary!! (Open issue since 2016: https://github.com/Azure/azure-quickstart-templates/issues/2786)
The route listed in the code below gets created.

resource ref_existingRTHub 'Microsoft.Network/routeTables@2023-05-01' existing = {
  name: route1
  scope: resourceGroup(rgSecurity)
}

module route 'br/public:avm/res/network/route-table:0.2.1' = {
  scope: resourceGroup(rgSecurity)
  name: 'test'
  params: {
    name: ref_existingRTHub.name
    routes: [
      {
        name: 'routex'
        properties: {
          nextHopType: 'VirtualAppliance'
          addressPrefix: '<IP_ADDRESS>/24'
          nextHopIpAddress: '<IP_ADDRESS>'
        }
      }
    ]
  }
}

Is there a way to create these 2 child-resource today using AVM?
If not, will it be possible with AVM in the future?

@Azure/avm-core-team-technical-bicep, can you please help with this issue?

Hey @dewolfs,
Thanks for opening this issue - it's a fact of which we're very much aware. Let me provide you with the short & long for it:
Short answer:

As per the way the Public Registry is implemented today, it was not possible to publish child-modules separate from its parents
As such, you cannot reference e.g. a avm/res/key-vault/vault/key module directly from the registry, but can only deploy it through its parent avm/res/key-vault/vault - UNLESS you actually grab the module folder locally as we opted to retain the structure, we established in CARML
However, we kept the door open to make this possible in the future if there is a demand and figure out how to make it possible

Long answer:

The Public Registry versions & publishes only top-level modules. Amongst other things the reason is that modules must be pre-registered upon first publishing first & the CI would need to be able to recursively version & publish modules in the same way the CARML CI did.
This is something we have on our radar since we started migrating the modules, but opted to get the library migration done first, and then expand upon that basis. As you can imagine, too many moving parts are a breeding ground for problems 👀
That being said, the CARML CI will continue to exist, and we'll see to ensure it is fully compatible with AVM. Today it is to an extent, but some changes are still required and I'm working on keeping the features as aligned as possible. Once the migration is done, I can focus on it fully. However, you could essentially take the modules in the avm/res folder and throw them into CARML's modules folder and it should almost work as is. Some Pester tests may need updating, and you'd need to add a version.json file to the child modules as well as a telemetry parameter to each child's interface. Once done, it should pretty much operate as before.

Note: There is one inherent danger with what you described above with the VNET and I want to elaborate a bit on the issue you linked. Some modules (especially in the Network namespace like RouteTable, NSG, VNET, VPN-Gateway, etc.) also have their child-modules (e.g. subnet for vnet) as a property. You may notice, that our module implementation in those cases appears a bit odd on our part as we essentially deploy each child twice (first via the property, then directly via the child-module). The reason is that those module will remove the child-resources if they're not deployed via the property - yet the property does not offer the same set of features as the dedicated child-resource. Does that sound cryptic? I bet it does, so let me provide an example:

Imagine you deploy the VNET using the raw resource (i.e., resource vnet 'Microsoft.Network/virtualNetworks@(...)) without specifying the optional subnets property. This deployment will work like a charm without issue
Now imagine you add a subnet either in the portal, or by deploying a subnet resource via the corresponding ARM endpoint (i.e.,  resource vnet 'Microsoft.Network/virtualNetworks/subnets@(...). Again, either will work like a charm
This is where it gets problematic. If you now were to deploy the original vnet deployment again without changing anything, the deployment will go ahead and DELETE the subnet you created after. Why? Well, because you did not provide it using the subnets property. It's essentially running a 'complete' deployment on the resource as opposed to the 'incremental' module - but this is by design.
You can observe this behavior also for the other previously mentioned Network resources - and I only know it from the Network namespace. This has nothing to do with the publishing issue, but given you mentioned that you're deploying routes via the child module I thought you should know. Be careful not to re-deploy the RouteTable itself or you're in for some fun.


Error: Could not open Info.plist file

Hi there,
MANY THANKS for your work - my Moms 2010 MBP constantly crashing with kernal panic driving her crazy!
When I tried your tool with the admin account on this book I get the following output with an error:
 | Checking compatibility
 MBPModelVersion :  MacBookPro6,2 ➔ Compatibility : OK ✓
  | macOS version :
 OS X 10.11
  | Checking SIP Status
 SIP Disabled
  | Searching for AppleGraphicsPowerManagement.kext
 AppleGraphicsPowerManagement.kext found
  ********** Starting MBP GPU Fix **********
 Disabling Kext Signing verification :  ✓
 Copying Info.plist file
 Previous Info.plist file removed
 Could not open Info.plist file
 ********************* MBP GPU Fix FAILED *********************

Any ideas for me?

Closing issue : This was resolved by changing user account to an admin one (see #78)

Thanks for your answer,
unfortunately not.
First I tried as a non-admin user (resulting in issue 78 :-)
Since I got an error there because of missing admin rights I switched to the admin account and here I got the error described above -> Could not open Info.plist file

Please can you try to apply the suggestions I made on issue https://github.com/julian-poidevin/MBPMid2010_GPUFix/issues/65 ?
Tell me if you need more help.

Hello and thanks for the GPU fix program. I think my problem is similar (or the same) to the one on this thread. When I try to run the program (from admin user), I get the log below with FAILED message. Any help would be greatly appreciated.
| Checking compatibility
MBPModelVersion :  MacBookPro6,2 ➔ Compatibility : OK ✓
| macOS version :
OS X 10.11
| Checking SIP Status
SIP Disabled
| Searching for AppleGraphicsPowerManagement.kext
AppleGraphicsPowerManagement.kext found
********** Starting MBP GPU Fix **********
Disabling Kext Signing verification :  ✓
Copying Info.plist file
Patching Info.plist

FindChild  - key|MacBookPro6,2
NextSibling  - dict
FindChild  - key|LogControl
ModifyIntValue  - integer|1
FindSibling  - key|Vendor10deDevice0a29
FindSibling  - key|BoostPState
FindSibling  - key|BoostTime
FindSibling  - key|Heuristic
FindSibling  - key|IdleInterval
ModifyIntValue  - integer|10
RemoveSiblingLabel - P3HistoryLength Not found
FindSibling  - key|SensorSampleRate
ModifyIntValue  - integer|10
FindSibling  - key|Threshold_High
FindSibling  - key|Threshold_High_v
FindSibling  - key|Threshold_Low
FindSibling  - key|Threshold_Low_v
Info.plist successfully patched
| Loading Kernel Extension
Removing existing kext in tmp :  ✓
Copying actuel kext into tmp :  ✓
Copying patched Info.plist into kext :  ✓
Changing permission of kext :  ✗ : cp: /tmp/AppleGraphicsPowerManagement.kext/Contents/Info.plist: No such file or directory

Removing existing kext :  ✓
Copying patched kext into Extension :  ✓
Loading modified kext :  ✓
********************* MBP GPU Fix FAILED *********************

Thanks SchmollTroll. I reset SMC and PRAM. That made a noticeable difference, but then was getting an error saying that the file was missing. I assumed it meant AppleGraphicsPowerManagement.kext. It was there, but I tried reinstalling it with KextBeast. The program did not seem to be working either. But after the 4th try, the GPU Fix stopped giving me the error and ran with success. After restarting, my MacBook ran for over an hour without crashing (it had been crashing literally every 1-3 min after startup). I was excited thinking it was fixed. But alas... after some time I got the kernel panic again and from there on out it was just as before (seems to be even worse, actually). I've reran the GPU Fix program several times now, but with the same result (does not fix it). I guess this is a dead end, unless someone has other ideas...

(in case this is helpful to anyone else…)
I think I may have figured out why it hadn't resolved the kernel panic in my case. I had various problems that kept me from successfully running hte GPU Fix and in the course troubleshooting I mistakenly installed AppleGraphicsPowerManagement.kext in the /library/extensions/ folder instead of in /system/library/extension/. I don't know much about ktext and how it works, but when I went back and deleted it and reran the GPU Fix, I stopped crashing. I've now been running the MacBook Pro for 2 days without a crash (previously it was crashing almost as quickly as the laptop could start up).

@SchmollTroll Can you please confirm that your issue is solved ?

It's the notebook of my mother so I don't have direct access to it most of the time but since she always called me when it crashed (and she did not call me during the past days) it seems to be solved.

Some days ago I worked with this book for about 5 hours (most of the time I used VMware Fusion to run some tools to sort my mothers TV channels :-P ) WITHOUT any crash.
Today my mom tries to edit some photos and had 3 kernel panics...

Maybe she updated MacOS. You have to re-apply the patch after every OS update.
Re-apply the patch and let me know.

TNX! Good hint - I think there was a security update!


Import alias fails after being re-exported from another namespace via an export declaration when only import aliases are exported

Bug Report
I found the using import Something = Namespace.Something then re-exporting that from a namespace leads to some strange behaviour, but only when import alises are the only things exported.
🔎 Search Terms
"Cannot use namespace" as value
🕗 Version & Regression Information

This probably has existed for a while
Tested in 5.2.0-dev.20230529

⏯ Playground Link
https://www.typescriptlang.org/play?ssl=24&ssc=86&pln=2&pc=3#code/CYUwxgNghgTiAEBbA9sArhBAXEBnL8A3gLABQ8SqGCADlGANYCMRZFFYyAdvvDvkwBc8fDACWXAOYBuNu048C-LAGZhXNIgBGIGLPLsQADxrIYBQnzxYmAGiv4V8AL76KzuSnSZ4dRgCZWAwoxRFNzBxt4AF5femYAOmUmN3ZQ8KVrJ1i-ROUVVIpjDKJIu0inVzkPAy9qOMYnEmD4dLNMgRiGhn8k6xS5ELD2iq7c3vzC+GKRy2T7fJdUmrk2iNyAURN2lhz4pj6BVLWCTe3zQL2Aw5tj4fX4rYzs7pUbgYMT7qf2gBYx+ITfr6OQKXj5YRYACeNBAyAAZt9zqpUjMIpYzhkWFBcGV7Jj2oEcZF-AssvjHsj-sTlP8qqRnEA
💻 Code
declare module pack1 {
  const test1: string;
  const test3: number;
  export { test1, test3 };
}
declare module pack2 {
  import test1 = pack1.test1;
  import test3 = pack1.test3;
  export { test1, test3 };
}
declare module pack3 {
  import test1 = pack2.test1;
  import test3 = pack2.test3;
  export { test1, test3 };
}

import packExport1 = pack1.test1;
import packExport2 = pack2.test1;
import packExport3 = pack3.test1;
import packExport4 = pack2.test1;

declare const test3: typeof packExport3;
export { packExport1 as test1, packExport2 as test2, test3, packExport4 as test4 };

🙁 Actual behavior
The types are inferred correctly, but the type checker errors:
> npx tsc test.d.ts
test.d.ts:12:18 - error TS2708: Cannot use namespace 'pack2' as a value.

12   import test1 = pack2.test1;
                    ~~~~~

test.d.ts:13:18 - error TS2708: Cannot use namespace 'pack2' as a value.

13   import test3 = pack2.test3;
                    ~~~~~

test.d.ts:18:22 - error TS2708: Cannot use namespace 'pack2' as a value.

18 import packExport2 = pack2.test1;
                        ~~~~~

Found 3 errors in the same file, starting at: test.d.ts:12

🙂 Expected behavior
No errors.
Workaround
Add some other declaration and export it from any namespace that only exports import aliases:
// no diagnostics, everything is fine now
declare namespace pack1 {
  const test1: string;
  const test3: number;
  export { test1, test3 };
}
declare namespace pack2 {
  import test1 = pack1.test1;
  import test3 = pack1.test3;
  export const __dummyExport: string; // edit: actually, i discovered this doesn't need to be exported
  export { test1, test3 };
}
declare namespace pack3 {
  import test1 = pack2.test1;
  import test3 = pack2.test3;
  export const __dummyExport: string;
  export { test1, test3 };
}

import packExport1 = pack1.test1;
import packExport2 = pack2.test1;
import packExport3 = pack3.test1;
import packExport4 = pack3.test3;

declare const test3: typeof packExport3;
export { packExport1 as test1, packExport2 as test2, test3, packExport4 as test4 };

Workaround 2
Use export import:
// no errors
declare namespace pack1 {
  const test1: string;
  const test3: number;
  export { test1, test3 };
}
declare namespace pack2 {
  export import test1 = pack1.test1;
  export import test3 = pack1.test3;
}
declare namespace pack3 {
  export import test1 = pack2.test1;
  export import test3 = pack2.test3;
}

import packExport1 = pack1.test1;
import packExport2 = pack2.test1;
import packExport3 = pack3.test1;
import packExport4 = pack3.test3;

declare const test3: typeof packExport3;
export { packExport1 as test1, packExport2 as test2, test3, packExport4 as test4 };

I’m not sure what to do about this. I simplified the test case down to
declare module pack1 {
  const test1: string;
  export { test1 };
}
declare module pack2 {
  import test1 = pack1.test1;
  export { test1 };
}
export import test1 = pack2.test1;

Whether a namespace is considered instantiated (has a runtime representation) is decided syntactically by the binder. The rule that’s in place is that import ... never makes a namespace instantiated, export import ... always makes a namespace instantiated, and export { ... } only does if one of the things it exports can be determined to be valuey. We walk up from the export declaration until we find the definition of test1 at import test1 = pack1.test1, and we stop because that doesn’t count as valuey because there’s no export modifier. In this case, since everything is in the same source file, it’s possible that we could so better by walking up higher, but we don’t really want to use a rule that can’t be applied consistently between local imports and cross-file imports.
After reviewing the source code, I think this is a design limitation, and it’s also clear that the workaround that best represents the intention is export import. Maybe it would be worth adding a checker error when it discovers that an uninstantiated namespace actually exports a value via an alias.
Note that there’s no issue or inconsistency with emit, since export {} declarations aren’t allowed in non-ambient namespace declarations.

Actually, it might make more sense to say that any re-export of an import alias should make the namespace count as instantiated. That might result in some false positives, but it makes as much sense as export import SomeType = mod.SomeType counting towards instantiation 🤷


[MRG] Make base badge URL available in the loading screen as well

We also need to add the base URL data to the loading page. This was missed in #859, noticed after deploying on mybinder.org

Self-merge as this is a fix to a bug from a previous PR and should be uncontroversial.


Add TypeScript CRA example

Issue:
What I did
I have created an example incorporating CRA2, TypeScript, TSLint, Jest, Enzyme

Closes #5006

@shilman Can you help me with broken build? Looks like its totally not related to the changes I have made. Would be very helpful to move this forward

This PR is containing changes from wrong commits (probably needs a merge from next).
IMO we don't need this as an example app, considering maintenance cost. Better having it as a CLI test. If this more like having a working example, it can also be done out of the monorepo..

I can see that storybook itself is migrating over TypeScript. Its a very popular setup. Because of that I thought it makes sence to have a similar example setup as well. It looks easy now but I spent half a day to make it working as it required quite a bit of investigation. IMO if this is out of monorepo less people will find it. What do you think?

@mucsi96, mind solve the conflicts + fix the linter?


Feature/add bson column type

Support bson column type for

drizzle-kit
drizzle-orm
drizzle-typebox
drizzle-valibot

Includes a set of tests for singlestore and a green pipeline is expected
Note: When defining the default value of a bson type column during table creation, the default value of the column is converted to hexa code to be accepted by the engine.
The CREATE TABLEstatement generated by drizzle-kit for the default value of {"key":"value"} will be
CREATE TABLE `table` (
        `bson` bson DEFAULT 0x14000000026b6579000600000076616c75650000 /* hexa code for {"key":"value"} */
);

The SingleStore team is working to accept json literals for bson columns default values.
This would work in the future
CREATE TABLE `table` (
        `bson` bson DEFAULT '{"key":"value"}'
);

When the json literals are supported we can simplify the code and remove the BSON external package.

reminder to add back the removed BSON column type from #11  to this PR


Cannot imort doopl: ImportError

Hi @vlkong ! I get the following error:
ImportError: Could not import OPL wrappers. Make sure than OPL bin directory is in the PATH
They appear to exist in Path, but I still get errors.
Can you help me?
ILOG: 12.6.2
PYTHON: 3.6.8

Hi,
doopl does not support COS 12.6, you need 12.8 to 12.10 - please upgrade your CPLEX.
Best regards


Responses have changed.

The contents of the JSON responses returned by chrome need to be accessed via the result key.
Currently the return statements created by the generator (example: return Node.from_json(json['root'])) will raise a KeyError.
To fix this, return statements should be changed to Node.from_json(json['result']['root'])
Can you point me to what part of the generator code handles this? I can fix it and create a pull request.

This actually hasn't changed. The result key is part of the RPC-ish protocol. This project assumes that you implement the RPC framing in a higher level library (but see #12 as a potential change there), so at that higher level you would unpack the response, check for errors, and if everything was okay, then you'd convert the json['result'] to a native Python CDP type.
For example, see https://github.com/HyperionGray/trio-chrome-devtools-protocol/blob/0.5.0/trio_cdp/init.py#L139.
I don't think we could add the ['result'] in this project right now even if we wanted to, because from_json() is used recursively, i.e. objects will call this to create objects out of subdictionaries, and those subdictionaries won't have a result key in them.

Oo ok that makes sense now, thank you for the detailed explanation!
I will close this issue. :)


TypeError: must be real number, not NoneType in some indicators

Acceleration, AccumulationDistribution, BollingerBands, ChaikinOsc, CoppockCurve, RVI, StochasticRSI are broken after changes in #2
It's because now v() returns None instead of 0 when buffer is not empty and those indicators pass v() results to isfinite() or do math on it which yields errors like:

TypeError: must be real number, not NoneType and
TypeError: unsupported operand type(s) for *: 'int' and 'NoneType'

This could be fixed by either reverting None to 0 or adding guards against None before calling isfinite/doing math. Which one is better? Asking, because I don't quite understand the reason behind switching to None as original issue seemed to revolve around issue with <=.
This was caught by unit tests proposed in PR #3
======================================================================
ERROR: test_add (tests.Acceleration_test.AccelerationTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/qm/git/bfx-hf-indicators-py/tests/Acceleration_test.py", line 59, in test_add
    indicator.add(candles[i]['close'])
  File "/home/qm/git/bfx-hf-indicators-py/bfxhfindicators/acceleration.py", line 49, in add
    if not isfinite(roc):
TypeError: must be real number, not NoneType

======================================================================
ERROR: test_add (tests.AccumulationDistribution_test.AccumulationDistributionTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/qm/git/bfx-hf-indicators-py/tests/AccumulationDistribution_test.py", line 49, in test_add
    indicator.add(candles[i])
  File "/home/qm/git/bfx-hf-indicators-py/bfxhfindicators/accumulation_distribution.py", line 42, in add
    if isfinite(prev):
TypeError: must be real number, not NoneType

======================================================================
ERROR: test_add (tests.BollingerBands_test.BollingerBandsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/qm/git/bfx-hf-indicators-py/tests/BollingerBands_test.py", line 229, in test_add
    indicator.add(candles[i]['close'])
  File "/home/qm/git/bfx-hf-indicators-py/bfxhfindicators/bbands.py", line 49, in add
    'top': middle + (self._m * stddev),
TypeError: unsupported operand type(s) for *: 'int' and 'NoneType'

======================================================================
ERROR: test_add (tests.ChaikinOsc_test.ChaikinOscTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/qm/git/bfx-hf-indicators-py/tests/ChaikinOsc_test.py", line 59, in test_add
    indicator.add(candles[i])
  File "/home/qm/git/bfx-hf-indicators-py/bfxhfindicators/chaikin_oscillator.py", line 48, in add
    self._adl.add(candle)
  File "/home/qm/git/bfx-hf-indicators-py/bfxhfindicators/accumulation_distribution.py", line 42, in add
    if isfinite(prev):
TypeError: must be real number, not NoneType

======================================================================
ERROR: test_add (tests.CoppockCurve_test.CoppockCurveTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/qm/git/bfx-hf-indicators-py/tests/CoppockCurve_test.py", line 73, in test_add
    indicator.add(candles[i]['close'])
  File "/home/qm/git/bfx-hf-indicators-py/bfxhfindicators/coppock_curve.py", line 48, in add
    if not isfinite(short) or not isfinite(long):
TypeError: must be real number, not NoneType

======================================================================
ERROR: test_add (tests.RVI_test.RVITest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/qm/git/bfx-hf-indicators-py/tests/RVI_test.py", line 59, in test_add
    indicator.add(candles[i]['close'])
  File "/home/qm/git/bfx-hf-indicators-py/bfxhfindicators/relative_volatility_index.py", line 70, in add
    if not isfinite(stddev):
TypeError: must be real number, not NoneType

======================================================================
ERROR: test_add (tests.StochasticRSI_test.StochasticRSITest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/qm/git/bfx-hf-indicators-py/tests/StochasticRSI_test.py", line 191, in test_add
    indicator.add(candles[i]['close'])
  File "/home/qm/git/bfx-hf-indicators-py/bfxhfindicators/stochastic_rsi.py", line 70, in add
    if not isfinite(rsi):
TypeError: must be real number, not NoneType

Nothing after almost 2 years?

yes it is disappointing


Make the UX more flexible

Currently the layout doesn't really use flex and it looks pretty bad on small screens.

[x] Add breakpoints to make the layout flexible
[ ] Make cards more flexible and without predefined size (what about preview images?)
[x] Move the <main> tag to the base.html.twig file

[ ] Make the navigational tabs responsive in some kind of way...


Move Jupyter idletime to Jupyter container

Since we will introduce general web-based tool support in https://github.com/DSD-DBS/capella-collab-manager/pull/1355, we also removed most of the Jupyter specific code.
We should also replace the idletime_minutes metric expression from Jupyter and replace it with an Prometheus exporter in the Jupyter container.

Done with https://github.com/DSD-DBS/capella-dockerimages/pull/292 and https://github.com/DSD-DBS/capella-collab-manager/pull/1603


Update Upload.php

特殊文件名可能会引起bug

English please.

A special filename like '.cpp.cpp' may cause problems.

Beautiful !
:+1:


Choking on Long Lines

Using xi-mac, I opened a relatively large XML file (2.1MB) and was quickly met with the spinny beachball of death.
Given the rope data structure design decision, I thought I'd use this as a sort of ground-truth test for large file handling.
Let me know if this ticket isn't appropriate, or if it isn't in the appropriate place.
Including file for independent verification.
Jobe_142274871.txt

This isn't about filesize as much as it is inefficiencies around handling extremely long lines. Some of this is definitely the client, where the drawing code isn't very efficient, but there's some slowdown in the core as well. Maybe rename the issue to "choking on long lines"?

Updated! Anytime! :)

Dup of #80, but this should probably be filed against the xi-mac project because as far as I can tell the core is not the problem here.
In profiling, the call to CTLineGetOffsetForStringIndex dominates (this is to position the cursor). Ultimately this should probably be filed against Apple. In any case, might be interesting to do some performance analysis; because it's this slow I suspect it might be O(n^2). Can't wait to see the blog post at accidentallyquadratic :)

Cross-filed @ https://github.com/google/xi-mac/issues/20
It's certainly a sufficiently-large n. :)


Change Cluster connect message

We should change the above message to:
"Click on Connect to load the resources from your cluster and watch for changes."

@devcatalin search in this section should have the same look&feel as in files search and the rest of the accordion elements. Should I create a separate issue for this?

@julioramosest I've updated the Screenshot because I added the wrong one to this issue.
You can create a new issue for the search of images


[AVM Module Issue]: The property "privateDnsZoneGroupName" is not allowed on objects of type "params". Permissible properties include "privateDnsZoneGroup".

Check for previous/existing GitHub issues

[X] I have checked for previous/existing GitHub issues

Issue Type?
Bug
Module Name
avm/res/storage/storage-account
(Optional) Module Version
No response
Description
We have made a local copy of the storage-account module and changed the relevant paths. We then get the following errors:
Error BCP104: The referenced module has errors.
C:\bicep\avm\res\storage\storage-account\main.bicep(536,7) : Error BCP037: The property "privateDnsZoneGroupName" is not allowed on objects of type "params". Permissible properties include "privateDnsZoneGroup".
C:\bicep\avm\res\storage\storage-account\main.bicep(537,7) : Error BCP037: The property "privateDnsZoneResourceIds" is not allowed on objects of type "params". Permissible properties include "privateDnsZoneGroup".
(Optional) Correlation Id
No response

Hey @e-kve,
could you let me know which version of the Private Endpoint module you're referencing? Could it be that it is 0.7 or newer? If so, the PE interface changed (which is implemented in exactly the location your error message mentions):
https://github.com/Azure/bicep-registry-modules/blob/8e5729753f9a887bda5c000e63eec8e3086abeb8/avm/res/storage/storage-account/main.bicep#L536-L537
@krbar is actually currently working on updating all AVM modules to use that latest interface, changing for example
privateDnsZoneGroupName: privateEndpoint.?privateDnsZoneGroupName
privateDnsZoneResourceIds: privateEndpoint.?privateDnsZoneResourceIds

to
privateDnsZoneGroup: privateEndpoint.?privateDnsZoneGroup

Thanks for your reply.
We used v0.7 of the Private Endpoint module. Will retry with the latest version of relevant modules.

Sounds good. Then this is definitely the reason. The interface simply changed :) Please apply the necessary updates and try again 💪

The issue is solved in the latest version. Thanks.


Install instructions

On the instructions it states to run the script as root. Inside the script it states not to run it as root.
It also states that git/default.nix needs to be changed when in reality that information is in git.nix
Also, I launched the script off a fresh install of the gnome ISO with no desktop, and after running the script and not seeing any errors pop up I had reboot the computer still into a no desktop environment

The instructions for the install script where false, the install script needs to be run normally (because I found out that if it is run as root, the creation of the directories and the copy of the wallpapers don't work). I also fixed the path of the git.nix file (it is the one in ./modules/home/git.nix).
Also for your problem it is kinda weird, does the rebuild run correctly ? It is supposed to take quite some time. With the current version of the install script it should ask you for root password after copying the files. Can you give more information on what happen when you run the script ?

The instructions for the install script where false, the install script needs to be run normally (because I found out that if it is run as root, the creation of the directories and the copy of the wallpapers don't work). I also fixed the path of the git.nix file (it is the one in ./modules/home/git.nix).
Also for your problem it is kinda weird, does the rebuild run correctly ? It is supposed to take quite some time. With the current version of the install script it should ask you for root password after copying the files. Can you give more information on what happen when you run the script ?

I will try another install later on today to fully clarify, have to head out at the moment but I greatly appreciate the quick reply.

Got an update ?

Closing because no update


apk-tools: 2.12.5 -> 2.12.6

Small bugfix release.

Motivation for this change
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
21.11 Release Notes (or backporting 21.05 Relase notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

CVE-2021-36159

Result of nixpkgs-review pr 131600 run on x86_64-linux 1

2 packages built:

alpine-make-vm-image
apk-tools


Added supported browsers

Build still failing.

@allthingssmitty don't really worry about the tests. The main repo hasn't had tests in the past, I turned them on for the work I'm doing on 1.0.0. We could add a basic test to just see if it is building without errors.

@GarthDB ahhh, well that explains it then. I thought I had missed a step. Thanks!


500 Error when uploading WSDL

I created a new project and tried to upload wsdl file, nothing happens visually, no error message, no info message. Debug windows in Firefox shows the following:
XHRPOSThttp://<IP_ADDRESS>:8080/castlemock/api/rest/soap/project/WoVYCI/wsdl/file
[HTTP/1.1 500  47ms]
timestamp	"2021-03-23T20:38:43.399+00:00"
status	500
error	"Internal Server Error"
message	""
path	"/castlemock/api/rest/soap/project/WoVYCI/wsdl/file"

I have the same issue when using NTLM authentication.

Hi @Dmitri-Filatov and @antoinemeeus.
Unfortunately, there is too little information to go on to investigate these issues.
Please read our FAQ for more information: https://github.com/castlemock/castlemock/wiki/FAQ#i-get-an-error-when-i-upload-my-wsdl-file-why
Thanks!

@karldahlgren i'm facing same issue using this wsdl

Hi @vitalii-kalancha.
Please read and follow the instructions:

However, the WSDL file NEEDS TO be obfuscate and minimized before before sending it to us. We will NOT accept any WSDL files that can be connected or associated with a company, organization or government. Please send the WSDL file as an attachment and not as a link.

Source: https://github.com/castlemock/castlemock/wiki/FAQ#i-get-an-error-when-i-upload-my-wsdl-file-why
Thank you!
Best regards,
Karl Dahlgren


hostAlias test fails when hostAliases can be created

What steps did you take and what happened:
After running the Sonobuoy scanner (https://scanner.heptio.com) on an AWS cluster with K8s v1.11.9, we passed every conformance test except for the ability to create hostAliases. However, creating a pod/deploy with a hostAliases field worked as expected.
What did you expect to happen:
All conformance tests, including hostAlias, to pass.
Anything else you would like to add:
Log from scanner of the particular failed conformance test
/workspace/anago-v1.13.0-rc.2.1+ddf47ac13c1a94/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/framework.go:699
Timed out after 60.000s.
Expected
    <*errors.errorString | 0xc000b53350>: {
        s: "expected hosts file to contain entries from HostAliases. Got:\n# Kubernetes-managed hosts file.\n<IP_ADDRESS>\tlocalhost\n::1\tlocalhost ip6-localhost ip6-loopback\nfe00::0\tip6-localnet\nfe00::0\tip6-mcastprefix\nfe00::1\tip6-allnodes\nfe00::2\tip6-allrouters\n[REDACTED_IP]\tbusybox-host-aliasesaliases9939ca20-50ba-11e9-9945-4aecb9c4c94c\n\n# Entries added by HostAliases.\n<IP_ADDRESS>\tfoo\n<IP_ADDRESS>\tbar\n",
    }
to be nil
/workspace/anago-v1.13.0-rc.2.1+ddf47ac13c1a94/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/common/kubelet.go:183

Environment:

Sonobuoy version: scanner.heptio.com
Kubernetes version: (use kubectl version): 1.11.9
Kubernetes installer & version: Kops 1.11.1
Cloud provider or hardware configuration: AWS
OS (e.g. from /etc/os-release):  Debian Stretch
Sonobuoy tarball (which contains * below): N/A

The fact that this just fails a particular test points to either a potential problem in the test or your configuration.
I would recommend filing this bug against kubernetes/kubernetes with the /area conformance since it is a conformance test. Someone more familiar with the hostAlias features may be able to help you.
One note would be that at this point your version is pretty out of date though and I'm not sure that they  would investigate more without first having you upgrade (I dont know if much dev has happened around that feature or tests). The best information I can find indicates 3 minor releases is supported and with the release of 1.14, that means that 1.11 isnt any more.
In any case, the fact that you were able to run the scan, get the results, and the plugins were able to run indicates that the bug doesn't reside in Sonobuoy.
Sorry I can't help further.


Add log when Poco Exception

Signed-off-by: CalvinNeo<EMAIL_ADDRESS>What problem does this PR solve?
Issue Number: ref #6580
The result may be invalid in SchemaDiff::deserialize. Don't know why, just add some log here.
void SchemaDiff::deserialize(const String & data)
{
    Poco::JSON::Parser parser;
    Poco::Dynamic::Var result = parser.parse(data);

Problem Summary:
What is changed and how it works?
Check List
Tests

[ ] Unit test
[ ] Integration test
[ ] Manual test (add detailed scripts or steps below)
[ ] No code

Side effects

[ ] Performance regression: Consumes more CPU
[ ] Performance regression: Consumes more Memory
[ ] Breaking backward compatibility

Documentation

[ ] Affects user behaviors
[ ] Contains syntax changes
[ ] Contains variable changes
[ ] Contains experimental features
[ ] Changes MySQL compatibility

Release note

None

/merge

/rebuild

/run-integration-test


Add  more badges to readme

[x] Added New Badges

Thanks for your contribution!
Not sure how helpful all these badges are right now. I'll have to think about it and compare with some of our other repos.

Thanks for your contribution!
Not sure how helpful all these badges are right now. I'll have to think about it and compare with some of our other repos.

Thanks.

After looking at this again, I don't feel like adding these badges proves to be very useful.
I'm sure there might be some cases where adding some more badges to the readme might add value, but I think it's best to briefly discuss those in a small ticket beforehand.
For now I'll close this issue, even though I really appreciate you taking the time to submit this PR.


Filtering out nonsense events

Hi,
I found that the event sequence given by scrappie is longer than the "move" sequence given by guppy. How did you filter out those events aren't mapped?

I checked out more reads and found the length of paired sequence (event sequence and move sequence) is different, not just one is longer than the other. I used sigtk to segment events and it used the same code in scrappie, so they should have the same length. Do you know the reason and how did you fix it?

I've uploaded a template read's result in a public repository, you can take a look.

Scrappie/Uncalled4 event detection is a low-level raw signal preprocessing step which groups similar stretches of signal into events, attempting to only split events at k-mer boundaries. It hardly does any signal filtering, except for some occasional filtering of obvious current spikes during Uncalled4 event detection, and doesn't attempt to identify template DNA vs adapter/barcodes or other signal noise. The Guppy move table doesn't use this type of "events", rather it simply groups the signal into fixed-length blocks (e.g. five raw time points) and annotates them by which basecalled nucleotides they approximately correspond to. This fixed block length means many "move" will span multiple k-mers, and is very often off by one or more bases. Uncalled4 aligns Scrappie-style events guided by the move table, but only incorporates this information after event detection.
If you just want to identify the "template" DNA region, then you can use the "template start" ("ts") BAM tag to find the start, and the end can be computed based on the number of moves ("mv" tag length - 1) multiplied by the move block length (the first element in "mv" tag, usually 5). If you want more accurate base-by-base alignments, then that is what Uncalled4 is for! If you want to get started with Uncalled4 I recommend using uncalled4 align ... -tsv-out, which will output a TSV file with reference-to-signal alignment coordinates.

Thanks for your reply, I understand.


add docs for ftl.PostgresDatabase

For example, adding the DSN to the project file
currently the only mention is in the unit testing section
https://tbd54566975.github.io/ftl/docs/reference/unittests/#databases

This isn't documented because the support isn't really "working", it's a hack.


Validate post-block state root

At present the state data (proof) is for the block prior to the current block. The block transactions are applied to this state. That
results in the state root in the current block.
The proof from the prior block can be updated by tracking the state changes after each transaction. After the last
transaction the state root can be checked to match that which is in the header.

Related: #6


Make "CTRL+ARROW" stops configurable

Summary of the new feature / enhancement
Currently when you hit ctrl+left arrow (for example), it will move your cursor back by word, stopping at spaces, periods, quotes, etc, but not other symbols like tilda (~).
It would be nice to add support for stopping at additional chars, and make those chars configurable in your powershell profile.
Example of usecase:
> dotnet test --filter FullyQualifiedName~Some.Namespace.ToMyTest|

if my cursor is at the end, and I press CTRL+LEFTARROW twice, the cursor will be at Some.|, if I press it one more time it will be at --filter
THIS behavior differs from bash and chrome and VS Code, etc, which stops at the tilda (~), and feels unnatural
Proposed technical implementation details (optional)
No response

In my profile I have
Set-PSReadlineOption -BellStyle None  -EditMode Windows -WordDelimiters "`~!£#%^&*()=+[{]}\|;:'`",.<>/?"

Which does what you want.  It's a constant annoyance that these change from place to place. Fortunately Windows Terminal and VS Code have similar settings so I'm able to have the same ones everywhere.  Note that I don't want $ to be break so that I get a $VarName as one block. You may so adjust accordingly.   (Similarly you may not want to force linux pwsh into working like windows, or the mute the bell sound as I do !)

@jhoneill thank you I didnt know about that option


Add support for React Native

🚀 Feature Proposal
Currently, @loadable/babel-plugin is strictly tied to Webpack and will transform code to call module.require. React Native does not support Webpack, but it does just bundle all of the files.
Motivation
This allows @loadable/component to work in a React Native + React Native Web app without code changes.
Example
Adding an option to the plugin (e.g. noWebpack) to make requireSync() call require() directly, and also have isReady() always return true.
Pitch
This would simplify sharing code between mobile and web.

I've taken a whack at adding support for this, but I can't get the tests to pass: https://github.com/unifurse/loadable-components/tree/no-webpack


Add portugues transalation to ABOUT page

I'm starting to translate the site into Portuguese, this is the first page I'm doing and I hope everything goes well-. If I'm doing something wrong, please let me know.
Use this page to open Pull requests for changes to the Bitcoin Core project
website at bitcoincore.org.

Hello, Whats is this RSS failed?

Hello, Whats is this RSS failed?

This "RSS failed" is an alert telling everybody
that your proposed changes would break the site
in a predictable way.
To break the site, you have to do so
in a non predictable way.

Olá, O que é este atrasou RSS?

Este "RSS a esperada" é um alertando todas as suas alterações que cumpririam o site de uma esperança esperada.
Para quebrar o site, você deve fazê-lo de forma não previsível.

Thanks for the answer.
Do you know how I can translate without "breaking the site"?
I followed the readme documentation and just translated the strings from the file, so I still can't understand what's wrong.

Do you know how I can translate without "breaking the site"?
I followed the readme documentation and just translated the strings from the file, so I still can't understand what's wrong.

What's wrong is that existing links break or new links are created pointing to nowhere.
Whatever it is failing in each of your PRs,
it's explained in each failure "details".
You can use a top-down approach by taking another language translation PR
and replacing the locale language translation for portuguese.
You can use a bottom-up approach by cycling rounds of hunting down CI failures and reviewer comments.

Do you know how I can translate without "breaking the site"?
I followed the readme documentation and just translated the strings from the file, so I still can't understand what's wrong.

What's wrong is that existing links break or new links are created pointing to nowhere. Whatever it is failing in each of your PRs, it's explained in each failure "details".
You can use a top-down approach by taking another language translation PR and replacing the locale language translation for portuguese.
You can use a bottom-up approach by cycling rounds of hunting down CI failures and reviewer comments.

Thank you Kate.
I will try to add pt-br/rss page
Regards


Include flag to authenticate with the kube-controller-manager kubeconfig

While going through Deploying the DNS Cluster Add-on, I attempted to apply the coredns cluster add-on, but ran into an authentication issue on my controllers:
Oct 01 14:18:10 controller-0 kube-controller-manager[3945]: E1001 14:18:10.611587    3945 leaderelection.go:320] error retrieving resource lock kube-system/kube-controller-manager: endpoints "kube-controller-manager" is forbidden: User "system:anonymous" cannot get resource "endpoints" in API group "" in the namespace "kube-system"

Once I modified the service file to authenticate with the kube-controller-manager.kubeconfig file and applied to all 3 controllers, ran sudo systemctl daemon-reload, and restarted services (sudo systemctl restart kube-apiserver kube-controller-manager kube-scheduler), I was able to successfully continue with the guide.
Please let me know if you need more information.

I'm not entirely sure what caused the issue I ran into, however after completing the tutorial again, I didn't run into this issue. I'll close this PR.


Feature/material.design.flavour

changed app design to material (still - much more should be done...)
plus base changes:  gradle and Android Studio 2.x compatibility

Automated message from Dropbox CLA bot
@kosiara, thanks for the pull request! It looks like you haven't yet signed the Dropbox CLA. Please sign it here and update the thread so we can consider merging your code.

@smarx Signed the CLA,
Regards
BK

@kosiara, thanks for your contribution! The app has been upgraded to Material design (#35) .  If there are changes in this PR that you'd like to see added to the app, please resubmit them as a new PR.


Plugin v0.1.0 doesn't work for me with Telerik platform

Hi,
I am trying to use the push plugin with Telerik platform. At the end of my login procedure (includes authenticating the user with Telerik platform) I call the method below. After reading a little here I moved the location of the require to the exact spot where the plugin is actually used:
public registerPushDevice() {
    var pushPlugin = require("nativescript-push-notifications");

    /* register pushPlugin with Telerik platform */

    this.telerik.push.register(this.devicePushSettings, () => {
      console.log("Successful registration in Telerik Platform. You are ready to receive push notifications.");
    }, (error) => {
      console.log('Failed to register push device in Telerik Platform');
      console.dump(error);
    });
  }

This results in in an error { "code": "MODULE_NOT_FOUND" }. The thing is that AFAIK the pushNotification module is found properly, because if I register with firebase directly it works just fine:
public registerPushDevice() {
    var pushPlugin = require("nativescript-push-notifications");

    /* register pushPlugin with Firebase directly */

    pushPlugin.register({ senderID: this.config.telerik.googleFirebaseSenderId }, (data) => {
      console.log("Successful registration in Firebase. You are ready to receive push notifications.");
    }, (error) => {
      console.log('Failed to register push device in Firebase');
      console.dump(error);
    });
}

Any idea what might be going on? I already updated the everlive-sdk to the latest v1.9.2 but it didn't help either. I did update the build.gradle and google-services.json according to the docs (I guess otherwise the Firebase registration would not work). Also I removed and re-added the android platform to rule out any issues with that.
Thanks!

Answered in - http://www.telerik.com/forums/nativescript-push-plugin-not-working-with-telerik-platform

Fixed in 0.1.1.

Indeed working! Thanks so much @AntonDobrev :)


Expose easier way to get common locations: Cache, Config, Profile

Summary of the new feature/enhancement
This is similar to https://github.com/PowerShell/PowerShell/issues/11223 but a bit broader...
The cache and config are internal:
https://github.com/PowerShell/PowerShell/blob/b1e998046e12ebe5da9dee479f20d479aa2256d7/src/System.Management.Automation/CoreCLR/CorePsPlatform.cs#L143-L150
If a Host needs to implement $PROFILE support, they have to implement all of it from scratch.
We can expose Cache, Config and even a way to get the Profile. Every host shouldn't need to implement this on their own.
Proposed technical implementation details (optional)
Make cache and config public... and consider making something like this public too:
https://github.com/PowerShell/PowerShell/blob/b1e998046e12ebe5da9dee479f20d479aa2256d7/src/System.Management.Automation/engine/hostifaces/HostUtilities.cs#L225-L252
And other utilities in that class that other hosts would love.

Given that the body text here doesn't really capture https://github.com/PowerShell/PowerShell/issues/11223, I should add that these concepts are essentially something proposed to be added to the PSHost API as something that should have a sane default and be overridable, providing a way both for the host to communicate its configuration of certain common locations, but also for modules to query those locations.
Examples are:

CurrentUser/AllUser module directories
CurrentUser/AllUser profile paths
Cache directory
Config directory

My feeling is that these make sense as host APIs because hosts operate at the level of being built for a particular environment.
My proposed API is essentially something like:
public class PSHost
{
...

    // I know a boolean parameter is used above, but I'm conscious that boolean parameters are warned against in design literature
    public virtual string GetCurrentUserProfilePath() => DefaultGetCurrentUserProfilePath();

    ...
}

@rjmholt Cache and config are engine features, so not host specific nor are the SpecialFolders host-specific.
@TylerLeonhardt It would be nice to fix this for both C# and PowerShell users. @JamesWTruher and I thought using ~ notation would work of scripters.  For example, ~cache/zork would expand to <pathToCache>/zork. This would also be available to C# users through the existing Path APIs.

Cache and config are engine features, so not host specific nor are the SpecialFolders host-specific.

In that case, it sounds like we need a well known static surface within the engine.

Yeah. Exposing it via paths is a nice-to-have for scripters, but there should also be a concrete surface within the engine it gets exposed directly in. Perhaps something in ExecutionContext or InvocationInfo?


Updated Index.html

🛠 Fixes Issue #594
Color of FAQ and Contact link in Navbar have been fixed when active.

👨💻 Changes proposed
Updated index.html

✔ Check List (Check all the applicable boxes)

[ ] My code follows the code style of this project.
[ ] This PR does not contain plagiarized content.
[ ] The title of my pull request is a short description of the requested changes.

📷 Screenshots

@SauravMukherjee44, I suggest marking such pull requests as spam so that Hacktoberfest maintainers can disqualify those abusing users.

No sir,  I was just working on the issue, but just got sick seriously and
as a newbie I was confused with the conflicts part and therefore by mistake
made this not working PR.
On Wed, 12 Oct, 2022, 5:21 am Petr Portnov | PROgrm_JARvis, <
@.***> wrote:

@SauravMukherjee44 https://github.com/SauravMukherjee44, I suggest
marking such pull requests as spam so that Hacktoberfest maintainers can
disqualify those abusing users.
—
Reply to this email directly, view it on GitHub
https://github.com/SauravMukherjee44/CodeIN-Community-Website/pull/595#issuecomment-1275411528,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A3DTMM2T72WH6GZKYDJU273WCX4OTANCNFSM6AAAAAARAYPUKE
.
You are receiving this because you authored the thread.Message ID:
@.***
com>

@

as a newbie

@
created around 9 pull requests in random HTML-repositories throughout the last days
It is the very definition of the spam, sir

I was confused with the conflicts part and therefore by mistake
made this not working PR

Also, lol, you literally updated 3 newlines and even GitHub's GUI renders zero conflicts. Please, be so kind not to lie to strangers.

Honestly, creating spam PRs having zero need to the open-source community is just breaking the whole idea of Hactoberfest which is aiming at quality contributions to actually useful projects, not just spam ones (both PRs and repos) only aimed at getting free T-shirts who could have gone to people actually deserving them.


Codec-related refactorings and quality of life improvements

This (draft, at the time of writing) PR makes the following changes in an attempt to improve code quality in areas of the codebase that are related to svm-codec:

Reduce macro usage; implement a trait BytesPrimitive: AsRef<[u8]> + AsMut<[u8]> for Address, TemplateAddr, State and others.
Leverage the new BytesPrimitive trait to implement common features with generics, as well as unifying encoding and decoding logic.
Unify encode_xyz and decode_xyz functions in svm_codec under a Codec trait. This helps discoverability, can benefit from writing generic unit tests and improves error handling.
Overhaul the wasm API. Rewrite buffering logic with safety in mind and greatly reduce amount of code.
Exploratory work for providing a Typescript typed wrapper around svm_codec::api::wasm.

I've turned BytesPrimitive::len() into an associated constant BytesPrimitive::N and also fixed all other issues, I think. I'll wait for CI.


chore(main): release 1.6.1

:robot: I have created a release beep boop
1.6.1 (2024-12-16)
Bug Fixes

requirements: Install packages in user space (6debe51)

This PR was generated with Release Please. See documentation.

:robot: Created releases:

1.6.1
:sunflower:


Slave Modbus RTU over TCP

I am attempting to create a holding register for simulating a modbus RTU slave. I am working in python and need some direction to create this. Any suggestions.

It's very useful cause there are a lot of 485-Ethernet (485-GPRS) gateways. I also need it.

Hi guys,
is there any chance to get RTU over TCP connection?


Address naming convention

The naming convention formerly referred to as application-stack-detail-verion is somehwat obsolete.
I'm deleting it (judiciously, I hope) from the docs, in #945 . But the naming convention in general, and Moniker, still need to be addressed in the docs. So we'll have a look after that PR is done.

@spinnakerbot remove-label stale


Lighter colors

Lighter colors
This change makes the top bar and auth lighter to make the UI easier on the eyes. However, I do like the original darker colors and would like to see them brought back in a "dark theme" somewhere down the road.
Other changes:

Fixed a defect where errored fields were not highlighting after submission
Added a gradient to the top bar
Increased the font weight of the auth title
Tweaked the names of some CSS classes to improve readability
Brought some CSS classes over from feature/game-page

Screenshots
Before

After

Any thoughts on this @tlscotarius?

I agree that the original dark colors are a little too harsh, but I'm not sure I like the current lighter colors.  I like the idea of a gradient, but not a fan of the dark red transitioning to a pink-ish color.  Maybe make the ending red of the gradient be darker (rather than pink).  Also, shift the start of the gradient further to the right so that all of the 'Republic of Rome Online" text is in the darker red.
Also, I'm not a fan of the red for the title bar and then blue for the sign-in form.  Not sure if making the login form all red would be better though.  Might clash.  Probably good to look at some color.  Maybe worth going to a site like coolor.co to generate a color scheme and use the Tyrian Purple (#630330) as a starting point.

I agree that the original dark colors are a little too harsh, but I'm not sure I like the current lighter colors. I like the idea of a gradient, but not a fan of the dark red transitioning to a pink-ish color. Maybe make the ending red of the gradient be darker (rather than pink). Also, shift the start of the gradient further to the right so that all of the 'Republic of Rome Online" text is in the darker red.
Also, I'm not a fan of the red for the title bar and then blue for the sign-in form. Not sure if making the login form all red would be better though. Might clash. Probably good to look at some color. Maybe worth going to a site like coolor.co to generate a color scheme and use the Tyrian Purple (#630330) as a starting point.

You make good points (I wasn't that sure about these proposed colours either). I've marked this as draft as I'll need to make a few changes.


doesn't save parent model before one-to-many relations when primary key is predefined

Issue type:
[ ] question
[X] bug report
[ ] feature request
[ ] documentation issue
Database system/driver:
[ ] cordova
[ ] mongodb
[ ] mssql
[X] mysql / mariadb
[ ] oracle
[ ] postgres
[ ] sqlite
[ ] sqljs
[ ] react-native
[ ] expo
TypeORM version:
[ ] latest
[X] @next
[ ] 0.x.x (or put your version here)
Steps to reproduce or a small repository showing the problem:

issue was caused by nullable: true value


Rename Model into Partition and implement Node.getRoot

The first item is just a simple refactoring of something I noticed while working on Node.getRoot.
For the second point, I wrote two tests: one for the "normal" case, and one to handle circular hierarchies.

Good point @dslmeinte I have updated the Changelog and moved it to a separate file


Assignment fixes

Okay, will do thanks :)

Avoid working on a forked repo and create pull requests from there unless you make CI run on pull_request too. (it's unnecessary anyway since you all have access to the repo and can create local branches)

The thing is that we did not want to work with the assignment since we had more advanced code. So merging to the master was not necessary. But we will fix that on Monday.
Thanks for the feedback Dimitri and have a nice W-e

@alrapal no, that's not what forking is 😛
I don't know where this more advance code is but you could still have created a local branch, done the assignment, have the CI verify it and not merge it.

Ok! I see.
So if I understand correctly:

Create a local branch from the remote master
Make changes on that local branch
When done, make a merge request between local branch and master.
If this is correct, is it possible to do the following:

Since we have been working in pairs.

Create a local branch from the remote master
Make changes on that local branch
Push the changes to a remote branch of that local branch so that colleagues can have the changes and continue working on it
When done, make a merge request between remote branch and master?

Create a local branch from the remote master
Make changes on that local branch
Push the changes to a remote branch of that local branch so that colleagues can have the changes and continue working on it
When done, make a merge request between remote branch and master?

This should be your default way of working, yes.

@platisd I just thought that it's also protected like your smartcar shield repository so I forked it first :)

The master branch here is indeed protected so you cannot push to it directly. You need to create a pull request and get it reviewed before being allowed to merge.
The difference is that unlike the smartcar_shield repo, here you actually have access to create your own remote branches and of course merge pull requests.

Yeah right, thanks :)

This should be your default way of working, yes.

Ok, that is what we have been doing so far, but it is good to have confirmation!
Have a nice Sunday!


Speed-up load time  for safe-apps

This PR closes #1282.
I found a way to improve the time safe-apps take to load.
What I did was changing the blocker request we were doing until ALL the safe-app were loaded. Now it first generates a mock item in the list until the request for the safe-app is resolved, once it finishes the mocked data is replaced by the real data. If there is an error, the mocked item is removed from the list.
before: https://www.loom.com/share/e5eb0f2bc3c14ad2bfe3c9986d957ed2
after: https://www.loom.com/share/f12da1401b0747f881b3485b7d78734d
@francovenica a full for safe-apps regression is required, meaning the complete flow (add, remove, disabled, etc) no need to test the functionality of each safe-app.

Travis automatic deployment:
https://pr1564--safereact.review.gnosisdev.com/rinkeby/app

Travis automatic deployment:
https://pr1564--safereact.review.gnosisdev.com/rinkeby/app

:clap: Ohh, I'm loving the direction this is taking.
This approach triggered some questions/suggestions from the UX perspective. Is there any chance the list is a fixed list with the enabled apps, and render something around

Compound // this loaded successfully
Idle [...loading]
OpenZeppelin [failed][retry?]

The idea is to have:

the names beforehand (at least a hardcoded value, that will later be changed to what the sApp provides),
a fixed list (no reordering apps based on their successful/failed load status) so no jumping elements in the list,
and a state for the apps (that is, inform the user if it failed to load and the chance to re-load it)

@fernandomg

This approach triggered some questions/suggestions from the UX perspective. Is there any chance the list is a fixed list with the enabled apps, and render something around
Compound // this loaded successfully
Idle [...loading]
OpenZeppelin [failed][retry?]

it might be possible, we could make it fixed, if one app was successfully loaded, we should not "add" any state, it will be inferred because the user will see the de proper icon and name. For the loading status, we are already showing the dots and loading as the name. In case of a failure, I used the same strategy as before by removing the item from the list, I do not remember why we did it in that way, but as this ticket is intended to improve performance I didn't want to change any logic. Anyways I think is a good suggestion I would ask @tschubotz his opinion, one thing to have in mind is that we do not have any information about the safe app, we only have the URL to load from (IPFS hash or HTTP) so that's the only information we could show to the user in case of a failure, it's not user friendly IMO.

The idea is to have:

the names beforehand (at least a hardcoded value, that will later be changed to what the sApp provides),
a fixed list (no reordering apps based on their successful/failed load status) so no jumping elements in the list,
and a state for the apps (that is, inform the user if it failed to load and the chance to re-load it)

not possible, as I said previously we do not have that information beforehand, we only have the URL.
not possible related to 1.
argued above.

One thing we could do.. is to render the loading status, until all the requests have finished, in that way, we can sort the list by app name and remove the ones which have had problems to load avoiding undesired flickers.

I am not a big fan of this change. Doesn't speed up anything but adds a weird jumping in the list, basically, the list is unusable until everything is loaded. Displaying a skeleton for a list item would do the same job IMO.
I would keep this ticket in backlog until we decide what to do with the safe app list. If we decide to move it to the backend, it will be a lot easier

I am not a big fan of this change. Doesn't speed up anything but adds a weird jumping in the list, basically, the list is unusable until everything is loaded. Displaying a skeleton instead of a spinner would do the same job IMO.
I would keep this ticket in backlog until we decide what to do with the safe app list. If we decide to move it to the backend, it will be a lot easier

disagreed, it speeds up a lot, now, the user sees content immediately, before it had to wait several seconds looking a green loading icon. The value is for the users, not for us, the developers.
The last proposal I suggested will avoid the flickers on the list.

the user sees content immediately

I don't see it as an improvement worth taking QA resources to make it to the release because the list is still basically unusable.
Your last proposal sounds good to me. Maybe we can display a locally stored list first, and also some kind of loading spinner that would prevent interactivity until everything is loaded

We took #1294 in to the 2.15.0 release yesterday. Does it make sense to merge them?
Regarding the question about the static list, this sounds like it's related to #990 . However, I'm afraid we don't have consensus yet on how to deal with that, yet.

@tschubotz this implementation does not affect #990.
it's fine to merge it in v2.15.0

Travis automatic deployment:
https://pr1564--safereact.review.gnosisdev.com/rinkeby/app

Travis automatic deployment:
https://pr1564--safereact.review.gnosisdev.com/volta/app

Travis automatic deployment:
https://pr1564--safereact.review.gnosisdev.com/volta/app

Travis automatic deployment:
https://pr1564--safereact.review.gnosisdev.com/rinkeby/app

Travis automatic deployment:
https://pr1564--safereact.review.gnosisdev.com/volta/app

Travis automatic deployment:
https://pr1564--safereact.review.gnosisdev.com/rinkeby/app

Travis automatic deployment:
https://pr1564--safereact.review.gnosisdev.com/volta/app

Travis automatic deployment:
https://pr1564--safereact.review.gnosisdev.com/rinkeby/app

@nicosampler For me this is unusable right now. There should be any type of infinite loop or memory leak.
Trying to launch mainnet locally and opening the Apps tab freezes the frontend.

Travis automatic deployment:
https://pr1564--safereact.review.gnosisdev.com/volta/app

Travis automatic deployment:
https://pr1564--safereact.review.gnosisdev.com/rinkeby/app

@nicosampler
So I open the Apps tab while not being an owner. It loaded with the "Loading" messages in the tab fairly quick which is fine. Then I connected with the owner to see the apps but it seems the they themselves won't load until you click on them, and by load I mean load the full content, so you end up seeing the loading icon anyways
So, is this fix only for the fast loading of the UI in general (the tabs on the side) or should it also load the apps?
Could it bee that it load all the page and tabs quickly because I wasn't an owner first and then It took a long time to load each app individually as I was clicking on them?
https://www.loom.com/share/c0e2d9d9868443dd96d8052976a838b4

once you click on an app, it will take the usual time because it needs to download the full app. the improvement it's only for the initial load (the list)

Ok, The initial load of the UI (The tabs and thier content) is working fine
Checked in Chrome and Firefox

@nico, is this PR still valid? If so, we should fix https://github.com/gnosis/safe-react/pull/1564#discussion_r521761465

@nicosampler, is this PR still valid? If so, we should fix https://github.com/gnosis/safe-react/pull/1564#discussion_r521761465

Travis automatic deployment:
https://pr1564--safereact.review.gnosisdev.com/rinkeby/app

Travis automatic deployment:
https://pr1564--safereact.review.gnosisdev.com/volta/app

@nicosampler, is this PR still valid? If so, we should fix #1564 (comment)

This pr was merged to https://github.com/gnosis/safe-react/pull/1600 and the issue you are reporting was fixed there.


Generated code for nested input types with default values fails

This issue was originally found in the maven plugin implementation of codegen.
input SomeKindOfInput {
  nestedInput: NestedInput = {enumField : ENUM_VALUE1}
}

input NestedInput {
  enumField: SomeKindOfEnum!
}

Generates an invalid Java file:
public class SomeKindOfInput {
  private NestedInput nestedInput = ObjectValue{objectFields=[ObjectField{name='enumField', value=EnumValue{name='ENUM_VALUE1'}}]};
}

Thanks for reporting @deweyjose. We will look into a fix in the coming weeks. In the meantime, if you are blocked, please feel free to open a PR.

Hi @srinivasankavitha,
Not blocked currently, thanks for taking a look!


import dataset in mne

Hi,
I need to import a dataset for use in mne-python, but can not find a way to do so.The dataset was obtained from the paper referenced below.
moabb supported this dataset an I used below code to import but I had error.I attach the picture of error for you to see.
Thanks fo help!
paper:
Jaeyoung Shin, Alexander von Lühmann, Benjamin Blankertz, Do-Won Kim, Han-Jeong Hwang and Klaus-Robert Müller, "Open Access Dataset for EEG+NIRS Single-Trial Classification," IEEE Trans. Neural Syst. Rehabil. Eng., online published.
The code that I used :
import moabb
import mne
import os
import zipfile
from moabb.datasets import Shin2017A
dataset = Shin2017A()
data = dataset.get_data(subjects=[1])

I have tried this, and it succeeds without error:
import moabb
from moabb.datasets import Shin2017A
dataset = Shin2017A()
data = dataset.get_data(subjects=[1])
data
# {1: {'session_0': {'run_0': <RawArray  |  None, n_channels x n_times : 33 x 120436 (602.2 sec), ~30.4 MB, data loaded>}, 'session_2': {'run_0': <RawArray  |  None, n_channels x n_times : 33 x 119236 (596.2 sec), ~30.1 MB, data loaded>}, 'session_4': {'run_0': <RawArray  |  None, n_channels x n_times : 33 x 120851 (604.2 sec), ~30.5 MB, data loaded>}}}

It seems like maybe your data has been corrupted...  perhaps you should delete and re-download the EEG-fNIRS dataset?
As a side note, this error should probably have been reported to MOABB, not to MNE-Python.  Other than import mne there are no MNE-Python commands being used in your example script (and mine succeeds without even importing mne), and the traceback is entirely within the moabb and zipfile namespaces (look at the file paths in each line of the traceback; whatever comes after lib or lib/site-packages is a clue to where the error is happening). I realize that moabb is using mne under the hood, but it doesn't appear to be mne code that is failing in this case.


Downsample branch

Hey!
Here's the downsample function I wrote to downsample count matrices. Now the function is also loaded via the api.
Best,
Malte

thank you very much! one thing that we could consider is renaming this to "downsample_counts"; for some people, "downsampling observations" is an alias to "subsampling observations" and for these the function name is not descriptive enough. what do you think? can I make this change?

Sounds good to me.

Also, you may want to change the error that is shown if a non-AnnData object is passed to the function. I put it as TypeError, because I didn't find how you have previously called that error.


Update joda-time to 2.10.10

Updates joda-time:joda-time from 2.10.6 to 2.10.10.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "joda-time", artifactId = "joda-time" } ]

labels: library-update, semver-patch

Superseded by #156.


Nested expansion sometimes doesn't work

Description
It looks like there is some issue when trying to expand a snippet from inside another.
First snippet:
snippet s1
	local ${1:var} = ${0:value}

Second snippet:
snippet s2
	require(${1:modname})

Steps to Reproduce

Expand the first snippet.
Jump to the second tab stop.
Expand the second snippet.

Expected Result
The modname placeholder gets selected.
Actual Result
The placeholder is skipped and the cursor jumps to the end of the line.
Additional Context
No response

Commenting out this block fixes it, but it surely breaks something else
https://github.com/dcampos/nvim-snippy/blob/1860215584d4835d87f75896f07007b3b3c06df4/lua/snippy/buf.lua#L103-L109


Missing info on secdir review page

Describe the issue
When I accept a new secdir review, at the top of the review page, I get:

If you enter the review below, the review will be sent to , with a CC to .

Note that both email addresses (or alias expansions) are missing. Seen on Chrome on Mac.
Code of Conduct

[X] I agree to follow the IETF's Code of Conduct

This looks like js that has become disconnected from the rendered template.

Fix in my other account, but can't make pull requests anymore, so someone else needs to do it.
https://github.com/ietf-tools/datatracker/compare/main...kivinen:datatracker:fix-7488

Fixed by ##7710.


Fix #77: Load all images from glance 2

The openstack4j does not implement pagination for glance 2 so it needs to be done explicitly.

Yeah, that openstack4j dependency is not public due to the stale state of the library. I prefer to control the explicit library version than just use -SNAPSHOT.

I have deployed this hotfix internally and provided it will work correctly until tomorrow, I will release this.

I really appreciate it @olivergondza .
Let me know if you need something.
Best regards.

Hello @olivergondza
Hope it is still not live as i can see some check failed in last merge.

@maggosourabh, the only failure I got is the one from building with unreleased dependency. Do you have some other problem in mind?

@olivergondza Thank you.
Let me fetch the new code and see if it works for me.


Add ping endpoint implementation and tests with mocking

Motivation
JIRA: https://issues.jboss.org/browse/AEROGEAR-2100
Description

Add Ping implementation to dao
Add Ping endpoint implementation
Add golang/mock lib
Add unit tests for /healthz/ping

ping @darahayes this targets your branch at #10

@aliok I've tried using the library you've discussed at #14, with its codegen features. Still not very confident about best practices around naming mocking and testing packages...

Okay so this PR introduces a mocking library github.com/golang/mock
whereas the other PR https://github.com/aerogear/aerogear-metrics-api/pull/14/ introduces a different mocking library + assertion library.
I think we should figure out which library to use before merging both of these PRs.
@aliok @paolobueno I'm leaning towards the style used in #14 because there's less code involved. The code generation seems a bit overkill. What do you think folks?

@paolobueno I am sorry I haven't seen this PR at all and went away and introduced Testify in my PR.
I agree with @darahayes . I think Testify suits us better than Gomock as we don't need the code generation for now.

I think using testify is fine if it suites your purposes. My own opinion is you do not need an assert library as simply writing go code works fine and does not introduce a DSL for testing and also ensure we fully understand the behavior of the assert

if thing != ""{
  t.Fatal("expected thing not to be empty")
}

The above cannot be misunderstood or have unexpected behavior whereas passing off to a third party library can have unexpected and unknown side effects. In the end it on saves you 2 lines of code. So I would suggest asking is it worth it really.
The mocking in testify looks useful though

@maleck13
assertion libraries help with printing the actual value as well.
If we remove assertion statements from Testify, we might consider this:
if thing != ""{
  t.Fatal("expected thing not to be empty but it was " + thing)
}

where we also print the actual value.
Also, when comparing structs, we might need to use "deepEqual", which is something additional.
Especially with structs (or anything that's a bit large), some IDEs provide nice diff view for expected values and actual values from the test logs.
Assertion libraries help with both. Plus, things like "list contains item", "string ends with substring" etc. you need to write more code yourself.
I think I am a bit biased since I am mainly a Java guy and I love Hamcrest there. The thinking might be different in Golang.

@aliok Now that I've seen both testify/mock and gomock in action I think they're very similar.
The boilerplate you had to write for testify has the same shape as the ones generated by gomock's mockgen and testify's documentation recommend https://github.com/vektra/mockery just the same.
IMO there's benefit in doing this generation and marking it as such with the kind of header that mockgen includes so that they can be regenerated on interface changes down the line.
Apart from library choice I'm more concerned about codebase structure around this:

is pkg/*/interfaces.go a common pattern?
If so are mocks to be placed in the test files that utilize them? Or maybe on a separate mocks.go file?
Are tests to be placed on the package being tested? Or maybe on a separe test_{pkg} package

The second point is because it seems that tests in the same package can end up introducing circular dependencies.

Apart from library choice I'm more concerned about codebase structure around this:
is pkg/*/interfaces.go a common pattern?

defining interfaces inside the package that needs to consume the service is a common thing and generally good practice, this file just groups them together as part of the package so you can easily locate them.
If so are mocks to be placed in the test files that utilize them? Or maybe on a separate mocks.go file?

I like a mocks package where we group all the mocks. however there is no reason not to define them as part of the test unless they are going to be used across many tests
Are tests to be placed on the package being tested? Or maybe on a separe test_{pkg} package

Unit Tests should always be defined with the package they are testing with the structure _test.go
The one exception to this is for integration or e2e tests, they are sometimes located in a different package test/integration so that when you run go test ./pkg it only runs fast unit tests

I would tend to agree with Craig here. Testify is nice but I don't really
see the point in introducing an assertion library. It's just syntactic
sugar. Remember that this repo should serve as a good project for
upskilling other team members. With that in mind I think we should keep the
dependency footprint low. What do you guys think?
On 21 Feb 2018 1:27 p.m., "Craig Brookes"<EMAIL_ADDRESS>wrote:
Apart from library choice I'm more concerned about codebase structure
around this:
is pkg/*/interfaces.go a common pattern?
defining interfaces inside the package that needs to consume the service
is a common thing and generally good practice, this file just groups them
together as part of the package so you can easily locate them.
If so are mocks to be placed in the test files that utilize them? Or
maybe on a separate mocks.go file?
I like a mocks package where we group all the mocks. however there is no
reason not to define them as part of the test unless they are going to be
used across many tests
Are tests to be placed on the package being tested? Or maybe on a
separe test_{pkg} package
Unit Tests should always be defined with the package they are testing with
the structure _test.go The one exception to this is for integration or e2e
tests, they are sometimes located in a different package test/integration
so that when you run go test ./pkg it only runs fast unit tests
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/aerogear/aerogear-metrics-api/pull/17#issuecomment-367324596,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIQVPOAzwyVZgE_a28R1vaweyYjaCWkxks5tXBkxgaJpZM4SM2wn
.

With that sentiment in mind... I will probably remove the use of boom in
the next few days... As much as I love it :)
On 21 Feb 2018 1:32 p.m., "Dara Hayes"<EMAIL_ADDRESS>wrote:

I would tend to agree with Craig here. Testify is nice but I don't really
see the point in introducing an assertion library. It's just syntactic
sugar. Remember that this repo should serve as a good project for
upskilling other team members. With that in mind I think we should keep the
dependency footprint low. What do you guys think?
On 21 Feb 2018 1:27 p.m., "Craig Brookes"<EMAIL_ADDRESS>wrote:
Apart from library choice I'm more concerned about codebase structure
around this:
is pkg/*/interfaces.go a common pattern?
defining interfaces inside the package that needs to consume the service
is a common thing and generally good practice, this file just groups them
together as part of the package so you can easily locate them.
If so are mocks to be placed in the test files that utilize them? Or maybe on a separate mocks.go file?
I like a mocks package where we group all the mocks. however there is no
reason not to define them as part of the test unless they are going to be
used across many tests
Are tests to be placed on the package being tested? Or maybe on a separe test_{pkg} package
Unit Tests should always be defined with the package they are testing
with the structure _test.go The one exception to this is for integration or
e2e tests, they are sometimes located in a different package
test/integration so that when you run go test ./pkg it only runs fast unit
tests
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/aerogear/aerogear-metrics-api/pull/17#issuecomment-367324596,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIQVPOAzwyVZgE_a28R1vaweyYjaCWkxks5tXBkxgaJpZM4SM2wn
.

Remember that this repo should serve as a good project for upskilling other team members.
I guess many guys on the team will know about Hamcrest on Java and Chai on Node and if not they're probably familiar with the concept :)

I don't like the idea that something unrelated to the instance/implementor
of the MetricCreator interface could be used here. If we decouple them then
you'd have to ask what even is a Pingable? I think there's a clearer
intention if our health handler expects the MetricCreator to tell us if
everything is healthy.
Perhaps instead of Pingable, the MetricCreator interface should also
include an IsHealthy function (just rename Ping). The behaviour stays the
exact same but the intention is much clearer - the health check handlers
aexpect the MetricCreator to tell us the result of IsHealthy.
Right now it's just checking the underlying db connection but perhaps that
could include more checks/logic in the future. This approach removes the
need to come up with new names and interfaces.
How do you feel about that idea?
On 21 Feb 2018 14:05, "Paolo Bueno"<EMAIL_ADDRESS>wrote:

@paolobueno commented on this pull request.
In pkg/web/healthzHandler.go
https://github.com/aerogear/aerogear-metrics-api/pull/17#discussion_r169645583
:

}

-func NewHealthHandler() *healthHandler {

return &healthHandler{}
+func NewHealthHandler(pingTarget Pingable) *healthHandler {

return &healthHandler{

pingTarget: pingTarget,

It's an interface so I aimed to make it as decoupled as possible. I'm
going to think about this name better.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/aerogear/aerogear-metrics-api/pull/17#discussion_r169645583,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIQVPLlkcOTwvFmffJjapLW9CqL3A06cks5tXCKogaJpZM4SM2wn
.

Going to rename the method to IsHealthy() then, but I think it's idiomatic in go to make interfaces as small as possible since they aren't implemented explicitly.
If we make the health handler request the mobile.MetricCreator interface even test mocks would need to implement a noop Create() method, so still a small type HealthCheckable interface {IsHealthy() (bool, error)} is important to have. Same reason the metrics handler is using web.MetricsServiceInterface instead of mobile.MetricCreator too.
Pointing towards what should be the health check target should be up to documentation and not to be enforced via locking up references to types.

Pull Request Test Coverage Report for Build #34

15 of 22 (68.18%) changed or added relevant lines in 4 files are covered.
5 unchanged lines in 2 files lost coverage.
Overall coverage increased (+15.0%) to 42.132%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

cmd/metrics-api/metrics-api.go
0
1
0.0%

pkg/dao/dao.go
0
3
0.0%

pkg/web/healthzHandler.go
14
17
82.35%

Files with Coverage Reduction
New Missed Lines
%

pkg/dao/dao.go
1
0.0%

pkg/web/router.go
4
77.78%

Totals

Change from base Build #33:
15.0%

Covered Lines:
83

Relevant Lines:
197

💛  - Coveralls


found a hole in a oneblock files

I'm trying to syncing the eos mainnet , and all components were started and all seemed working in a good condition until encountering this error:
found a hole in a oneblock files (merger/bundle.go:90) {"bundle_lower_block": 1784100, "missing_block_num": 1784169, "missing_block_id": "1f870f97"}

By checking the dfuse.log.json , I find blockfiles  /home/adu/eostest/dfuse-data/storage/merged-blocks/0001784100.dbin.zs was not created :

indexer got stuck

Hi, from the block ID I see that you are trying to sync EOS Mainnet from the start.
This requires a few customization flags, it does not work out of the box.
I suggest that you first read " Sync'ing a large chain #26 " and try with the "phase1.yaml" approach. The "merge-and-store-directly" flag is key, and also the fact that you need to run mindreader instance separately from the rest to improve your chance of processing 128 million blocks without a hiccup (Most of the dfuse components are not meant to run on a chain that is not "ready" (already synced))
Note that "merge-and-store-directly" does not support "stopping and restarting" the process, so if it stops, you will have to restore your nodeos from a snapshot.
Your mindreader node is probably broken (dirty state), and you can see this with  "dfuseeos start mindreader -vvv", you will have to restore it from a state snapshot.
Closing this issue, because you are trying to do something that is "guaranteed to not work" (as discussed in issue #26)


Duplicate tagName accepted when tagging files

cs2103 is accepted as a tagName, but there is one tag named cs2103 already

Fixed by #92


Cold/Flu: Missing entry in ODS

In the first we investigation we found that there is an issue with DJ and ODS data sync on 12th June for Cold/Flu submission.
:Bhumin - Add more details on it.

Mike has added the missing data in the database and Heather has confirmed everything is correct.


heimer: 2.2.0 -> 2.4.0

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/juzzlin/heimer/releases.
meta.description for heimer is: "Simple cross-platform mind map and note-taking tool written in Qt"
meta.homepage for heimer is: "https://github.com/juzzlin/Heimer"
meta.changelog for heimer is: ""
Updates performed

Version update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact

Checks done (click to expand)

built on NixOS

The tests defined in passthru.tests, if any, passed

/nix/store/raglcc646ndi7f4hqzl9xdb5lanl8x8i-heimer-2.4.0/bin/heimer passed the binary check.

/nix/store/raglcc646ndi7f4hqzl9xdb5lanl8x8i-heimer-2.4.0/bin/.heimer-wrapped passed the binary check.

0 of 2 passed binary check by having a zero exit code.

2 of 2 passed binary check by having the new version present in output.

found 2.4.0 with grep in /nix/store/raglcc646ndi7f4hqzl9xdb5lanl8x8i-heimer-2.4.0

found 2.4.0 in filename of file in /nix/store/raglcc646ndi7f4hqzl9xdb5lanl8x8i-heimer-2.4.0

directory tree listing: https://gist.github.com/811399f059d655f36055e03bc22e0fe8

du listing: https://gist.github.com/6a37aa73325e577039302ff66cf95098

Rebuild report (if merged into master) (click to expand)

3 total rebuild path(s)

1 package rebuild(s)

1 x86_64-linux rebuild(s)
1 i686-linux rebuild(s)
0 x86_64-darwin rebuild(s)
1 aarch64-linux rebuild(s)

First fifty rebuilds by attrpath
heimer

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/raglcc646ndi7f4hqzl9xdb5lanl8x8i-heimer-2.4.0 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A heimer https://github.com/r-ryantm/nixpkgs/archive/518f0d857d54398ef402e1a2d9c9debe13203386.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/raglcc646ndi7f4hqzl9xdb5lanl8x8i-heimer-2.4.0
ls -la /nix/store/raglcc646ndi7f4hqzl9xdb5lanl8x8i-heimer-2.4.0/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package built:

heimer

Maintainer pings
cc @dtzWill for testing.

Result of nixpkgs-review pr 118221 at 518f0d85 run on x86_64-linux 1

1 package built successfully:

heimer

1 suggestion:

warning: unclear-gpl
gpl3 is a deprecated license, please check if project uses gpl3Plus or gpl3Only and change meta.license accordingly.
Near pkgs/applications/misc/heimer/default.nix:20:5:
   |
20 |     license = licenses.gpl3;
   |     ^

Result of nixpkgs-review pr 118221 run on x86_64-linux 1

1 package built:

heimer


[BUG] Completed Payment feed card showing as pending after executing the TX

[BUG] Completed Payment feed card showing as pending after executing the TX
Also reproduced on prod!
Preconditions: 2 accounts available
Steps:

send a tx from 1st to 2nd account
open the payment link via 2nd account
observe the result for both accounts

Actual result:
The feed tx card is showing as pending on the account who sent the amount
The feed tx card showing as completed on the account who received the amount
Expected result:
The feed tx cards show as red and green after executing the payment for both accounts
Env:
dev.gooddollar.org 2.25.0
Device:
Windows 10 // Google Chrome
Attachments:
Private Zenhub Video
Private Zenhub Image

@L03TJ3 this is a bug,  because we no longer listen to "withdraw" events of payment links. as we rely on the TX history from the explorers API. The explorer API is only able to give us TX the user did, but the withdraw is done by the recipient.
We need to also query the logs for withdraw from the explorers API
https://docs.blockscout.com/for-users/api/rpc-endpoints/logs
https://docs.celoscan.io/api-endpoints/logs
The logs needs to be filtered with the "from" equal to the user (ie sender)
event PaymentWithdraw(
		address indexed from,
		address indexed to,
		address indexed paymentId,
		uint256 amount
	);

Thats means that topic0 should equal the event hash 0x39ca68a9f5d8038e871ef25a6622a56579cda4a6eedf63813574d23652e94048
and topic1 should equal the bytes32 padded address of the user. see fo example:

@L03TJ3 it still shows as pending

@vldkhh did you test it with a new payment? or are you looking at an older one?

verified on prod

@L03TJ3 please re-check this, looks like latest fixes broke something. It still reproduces with send via link
Private Zenhub Image

@sirpy The flow is the same as described above. Completed Payment feed card showing as pending after executing the TX. And it reproduces only with the "SEND via LINK" method. It was fixed last week but not it still showing as pending for me
Steps:

send a tx via Link from 1st to 2nd account
open the payment link via 2nd account
observe the result for both accounts

Expected:
The feed tx card is showing as pending on the account who sent the amount
Actual:
The feed tx card showing as completed on the account who received the amount

@sirpy
Private Zenhub Video

works fine here
Private Zenhub Video

@sirpy yes placed the vid on wrong ticket

looks like it was a cache issue, it working fine now


Forcing to use rev5 for cilium image for bugfix (bsc#1173039)

Why is this PR needed?
Fixes #1173039
What does this PR do?
Provides caasp-cilium-image revision update for the bug fix for bsc#1173039
Anything else a reviewer needs to know?
Info for QA

Ensure skuba downloads the correct image with rev5 label
Test the image for resolution of the bug described in bsc#1173039

Related info
Info that can be relevant for QA:

PR to be merged to access the image https://github.com/SUSE/caasp-container-images/pull/88
Upstream Commit for the cilium source: https://github.com/cilium/cilium/commit/ef01850f7cb6c53933d28438c94411b15e557370
caasp-cilium-image build version rev5 is used for testing

Status BEFORE applying the patch
Status AFTER applying the patch
Docs
Merge restrictions
(Please do not edit this)
We are in v4-maintenance phase, so we will restrict what can be merged to prevent unexpected surprises:
What can be merged (merge criteria):
    2 approvals:
        1 developer: code is fine
        1 QA: QA is fine
    there is a PR for updating documentation (or a statement that this is not needed)

Manifest version bump is also needed :)

@jenting can you please point me to how a manifest version bump should be done ?

Conflict because master already uses 1.7.5 and this bugfix for caasp4 has nowhere to go unless a new branch (release-caasp-4.2.2) is created.

From what I see here, we have cilium 1.5.3 in CaaSPv4. Upgrading to 1.6.6 for adding a patch seems a bit overkill. Can't the patch be applied to 1.5.3 or what am I missing ?

I will answer myself. The 1.5.3 are in the "test" files. The versions.go contain the 1.6.6
LGTM

I just checked the failing tests. They are about these tests you are changing. Could you please review the tests?

Now its much simplified, since the versions in the test files are taken care of by @mrostecki in https://github.com/SUSE/skuba/pull/1223 and https://github.com/SUSE/skuba/pull/1224

https://github.com/SUSE/caasp-container-images/pull/101 could help fix the skuba-test issue of missing cilium-operator image.