Question about registers with different names but identical layout

This is relatively minor but since it comes up in every DIF library, I thought it would be a good idea to open an issue. Please note that the discussion below is specific to interrupt registers but there may be other cases.
OpenTitan peripherals typically have three interrupt registers: state, enable, and test. DIF libraries typically expose interrupt functionality via four functions: enable/disable, get, clear, test. For a given device, these registers have the same layout, but because their defines in the generated header have different names, the same layout is --typically-- duplicated three or four times in the DIF library (in the form of multiple switch statements). I was wondering if it would be possible to define this layout only once in the generated headers so that this duplication in DIF libraries can be safely avoided (as opposed to using only one set of defines and assuming the others will not change).

@gdk @mcy @silvestrst @lenary @jon-flatley

Good news! This is done for the interrupt registers as of #1881. There are still cases where these might not be generated, but most peripherals can use the #defines added in that PR. (rv_timer is one that cannot).
I'm not sure we yet have other registers that do the same - but yes I agree we should keep an eye on this.

I ran into this problem a while ago (#1206  ) and @lenary has fixed it in #1881 .

Awesome, thanks!


Warning log messages can be confusing because of log suppression

If you deserialize the RTS test system twice in one Julia session, you will see warning messages like below the first time but not the second time.
┌ Warning: Rate 175.0 MW for B2 is larger than the max expected in the range of (min = 47.0, max = 52.0).
└ @ PowerSystems ~/sandboxes/PowerSystems.jl/src/utils/IO/branchdata_checks.jl:148

This happens because we set maxlog to 50. If a user calls PSB.build_system twice they will see different behavior and may be confused.
I think we need a better solution. @jd-lara recommended documenting it.

Potential solution: Add time-based log suppression feature to InfrastructureSystems.MultiLogger. We could keep track of the last time a specific log ID occurred.
Example: Configure a log message to be suppressed after 50 log messages in 5 seconds.
@warn "Noisy log message" maxlog = 50 suppression_timeout = 5s

Suppose that building a system takes 5 seconds and you build a new system every one minute. You would be guaranteed to see the same 50 messages every time.


reduce call to reflect in columnToFieldIndex func

Right now, when ever the columnToFieldIndex called  we call to much reflect function:

call to reflect.Type.FieldByName = (number of cols return from DB)*(number of struct fields)

I have a pull request here in hope of improve this https://github.com/go-gorp/gorp/pull/345

So strange since my fork travis run all test success. Closed PR and fixing

I updated with new PR here https://github.com/go-gorp/gorp/pull/347


Create new file

Entity: File, Action: create (Create new file)
ARGS:
--name
--uuid
--contents
#60

@jgwerner Do we really need an uuid for file creation?


Remove the recommendation to rely on C==$14 to detect SGB

Ok, time to be "that guy".
While it can be a neat trick to know that the SGB boot ROM leaves C==$14, it can lead to both false positives and false negatives in plausible real world scenarios. Therefore I would suggest restoring the recommendation to use MLT_REQ as the recommended way of detecting SGB functionality. Below are the ways in which it could lead to false detection, as well as addressing some of the things mentioned in that text.
False positives
The impact of a false positive is that any attempt to transfer data using _TRN commands will be seen as garbage on the screen.

One of the Gameboy clone boot ROMs will leave C==$14. By my naming conventions it is called fortune_boot.bin but it may exist in variously named clone consoles.
The game may run on a real SGB, through the boot ROM, without access to SGB commands. In particular one common way that this could happen is using the EZFlash Jr cartridge. This cartridge has trouble running on a SGB because of reset line issues. A common workaround to this issue is to hit the reset button at a point which allows the boot ROM to run and the menu to show. However, since the stock firmware of the EZFJ runs first and doesn't have SGB support enabled in its header, communication with the SNES BIOS is locked out after that point, including in the case that the SGB CPU is reset because a game was loaded.

False negatives
The impact of a false negative is that SGB functionality such as borders and screen colorization are disabled, when they don't need to be.

Some cartridge menus on older flash cartridges don't reset the game, but instead store a small trampoline in WRAM which they use to jump to $100 after setting up the cartridge's multi ROM functionality to show the ROM in question. One such example is the EMS 64M USB cartridge if using multi ROM functionality. Such a menu will almost certainly not leave C==$14 or care to leave different register values for SGB compared to DMG.
Older emulators typically don't produce correct initial register values for SGB, instead typically giving values similar to those found on a DMG. On such emulators, SGB functionality will be disabled, even though the game would otherwise run fine in the emulator in question.
There's one scenario where even newer more accurate emulators can fail to produce C==$14, namely in a "SGB+GBC" mode if such a mode exists. Both BGB and mGBA have such a mode and both (not surprisingly) start with the exact initial registers of a GBC. In this mode, SGB functionality is locked out, and the game is shown with an empty, useless border around it instead.

The conclusion is that relying solely on C==$14 for SGB detection is likely to cause real world irritation for a small but significant group of users of the software you create and should not be recommended as the main SGB detection mechanism.
Claims made in the current text

but this method is more complicated

True, but not by much. If you consider that the purpose of detecting SGB mode is typically to send over a border and/or colorize the screen, which in itself takes some setting up, the added effort in programming the detection algorithm is minor. A better solution to this point would be to create a library/example code that a developer can use as is.

and slower than checking the value of the A and C registers after startup.

So, it is true that SGB commands take some time to execute, due to a recommended delay after each command. Nintendo recommends a 70000 M cycle, or ~4 frame delay. Do that twice during detection (once to activate multiple controller mode, and then to deactivate it) and you're looking at an 8 frame delay, or ~133 ms. However, consider that on real hardware, it was directly preceded by a forced delay of anything from a 3.11 s (GBC) to 5.59 s (DMG). Also combine this with the fact that most games are expected to show a copyright, title or similar static screen as the first thing, which can be loaded before this delay and thus essentially absorbs it. Given this context, a one-time 133 ms delay before user input is accepted should barely be perceptible to a human, much less an annoyance.

MLT_REQ detection also has some false negatives, such as if a previously-ran firmware ran a MLT_REQ detection itself, but did not reset it to singleplayer. If the environment cannot be trusted, there's not much that can be done.
Additionally, MLT_REQ detection is known to be very finicky: timings must be obeyed, registers must be polled in the right order, interrupts must be disabled... there's a lot of moving parts, and a lot that can go wrong. (Pokémon Yellow being a famous example of SGB detection gone right for the wrong reasons.)
This complexity is what the current article lumps under "but this method is more complicated".
Also, what are the forced delays you noted calculated from? I don't know of any reasons why such would be needed on DMG or CGB, much less why they are shorter on the latter.
Note also that games may not show a static screen at that point. For example, Aevilia plays an animation (clouds scrolling by) during boot-up, Libbet fades the Nintendo logo out, etc.

Ultimately it's a question of how much effort you're willing to put into supporting broken setups: using boot-up c is much simpler and still correct for a large majority of users, while MLT_REQ is much more error-prone, slower, and still not bulletproof.
SGB+CGB specifically is ill-defined, as it does not emulate any actual hardware configuration (there is not enough bandwidth to transfer 15bpp tiles, and not enough for a hypothetical 8bpp "hack" instead), so every implementation is bound to diverge somehow, at least unless emulators agree on and publish a spec.

Also, what are the forced delays you noted calculated from? I don't know of any reasons why such would be needed on DMG or CGB, much less why they are shorter on the latter.

Forced "delay" is from the bootroms.

SGB+CGB specifically is ill-defined, as it does not emulate any actual hardware configuration (there is not enough bandwidth to transfer 15bpp tiles, and not enough for a hypothetical 8bpp "hack" instead), so every implementation is bound to diverge somehow, at least unless emulators agree on and publish a spec.

And to be clear on this point, it does not invent a new mode with 15 bpp or 8 bpp transfers. It simply behaves as if the hardware was a good old 2 bpp SGB, when SGB transfers are being requested. So if the game happens to not lock out the SGB code paths when GBC is detected, it will (with some probability) "just work".

Note also that games may not show a static screen at that point. For example, Aevilia plays an animation (clouds scrolling by) during boot-up, Libbet fades the Nintendo logo out, etc.

Oh, and another point about this. If you're planning to use a SGB border (which you likely are if you're detecting SGB) you need to display a static screen for a short while anyway for the data transfer of the border graphics. So this is something you need to plan your creative decisions around at any rate.
Aevilia is a GBC only game, so not really applicable. Libbet appears to simply detect SGB the traditional way (meaning the Nintendo logo stays static during detection, even on a DMG) and accept the extra delay that comes with that.

Libbet fades the logo out

Libbet appears to simply detect SGB the traditional way (meaning the Nintendo logo stays static during detection, even on a DMG)

Correct. Libbet detects SGB using MLT_REQ while the logo is still up in order to decide whether to knock away the ®.

GBC (also A+B+Select+Start): Clear tilemap first, no ® deflection
DMG/SGB: Wait 30 frames, detect via MLT_REQ, and schedule ® deflection only if DMG

Perhaps ISSOtm was thinking of 144p Test Suite, which detects SGB while fading out the logo.

Dark gray: Wait 8 frames while (presumably) various things in the SGB front end continue to initialize
Light gray: Detect SGB using MLT_REQ


Logging faulted messages

This is to log faulted messages as at the moment if our custom deserializer falls over we get nothing in our logs and everything looks happy.
However, we end up with messages in our error queues but no logs to backtrack the issue.

Merged/rebased.


Adds testcpp to gitignore and make clean

Also separates building, linking and testing, corrects cpp (preprocessor) variables into c++ ones, and corrects the PHONY targets

Giving up.


Support Vite 5

Add support for Vite 5.
Current configuration:
"peerDependencies": {
    "vite": "^2.0.0 || ^3.0.0 || ^4.0.0"
},

In the meantime, for a temporary workaround (in your own package.json):
"overrides": {
    "vite": "5.0.0"
}

Hi, i'm new to npm ecosystem but shouldn't be accurate to write :
  "overrides": {
    "vite-plugin-node-polyfills": {
      "vite": "^5.0.1"
    }
  }

@bdbvb

@maxnowack Wehn do you think you can this merge I really need this package for Vite 5?

Hey @daiky00, I mentioned this issue from another repository. The PR on SignalDB doesn't fix this issue, but is also just waiting for a fix, since it's blocking the PR from which I mentioned it. It's just a reference.
Fixing this issue should be done by the maintainer of vite-plugin-node-polyfills @davidmyersdev

I was gonna raise a PR but I'm getting issues with PNPM when setting up locally. Unsure if its an issue with my local environment. Bumping vite causes a couple of other deps to need to be bumped too. One of them also has the same peer-dependency issue downstream. Build and tests are failing after that though so probably needs someone more experienced with this stuff to have a look.
The override works for now if I bump other vite plugins.

@TomPlum it seems that is was only on your environment. Installation, building and also the tests are working/passing on my side. I just opened #57 that adds vite v5 to the peer dependencies

Thanks @maxnowack - I'll have a look at sorting my local 👍🏻

Hey @davidmyersdev, can you review this and get this merge? I really need the polyfills since I am migrating from Webpack to Vite 5.

This was released in v0.17.0.


Forwarded parser in cats-parse

Took a little more than I'd hope but here it is.
 I'm unsure where the problem is but it looks encoding related, the tests are ~tests/testOnly org.http4s.*.Forwarded*Spec.
I'm also unsure about the quoted implementation, if the approach is to run the parser with the parsed string or something else. If it is I don't know what error message to use.
I wanted feedback on this so I haven't yet deleted the parboiled parsers or added MiMa stuff.

Also, we're about to fold the dotty branch into main and give up on the idea of cats-parsed 0.21 release.  So don't worry about the MiMa parsers.

Also, we're about to fold the dotty branch into main and give up on the idea of cats-parsed 0.21 release.  So don't worry about the MiMa parsers.

@rossabaker have you had a change to look at this? I'm stuck in the encoding stuff.

@rossabaker have you had a change to look at this? I'm stuck in the encoding stuff.

I have not.  I'll try to take a deeper look tonight.
One thing we might be able to do in the meantime is merge series/0.22 to and fix the compile errors: the target branch is now on cats-parse-0.3.  Mostly, Parser becomes Parser0 and Parser1 becomes Parser.  There's a scalafix for it, but I don't know whether this is big enough to be worth running, or just fixing up manually.

I have not.  I'll try to take a deeper look tonight.
One thing we might be able to do in the meantime is merge series/0.22 to and fix the compile errors: the target branch is now on cats-parse-0.3.  Mostly, Parser becomes Parser0 and Parser1 becomes Parser.

I'm blocked in the encoding stuff I mentioned in the first comment, and could use some help. I can handle the rest once that's done.

@fredshonorio are you still up for picking this up again?

I'm blocked in the encoding stuff I mentioned in the first comment, and could use some help. I can handle the rest once that's done.

Tests are still failing, but I went ahead and dealt with the cats-parse-0.3 upgrade that's already on the target branch.  Trying to examine the failures before I sleep...

Tests are still failing, but I went ahead and dealt with the cats-parse-0.3 upgrade that's already on the target branch.  Trying to examine the failures before I sleep...

Some of the complication seems to be flowing from the arbitrary RegName, which it was noted was generating encoded values to store in a decoded field.  I cleaned that up, but that's not the only issue.

Some of the complication seems to be flowing from the arbitrary RegName, which it was noted was generating encoded values to store in a decoded field.  I cleaned that up, but that's not the only issue.

ForwardedSpec was failing whenever the RegName begins with a number.  That's because we weren't backtracking from IPv4 addresses.  That's fixed in 1dc3f87.
We store a decoded value, but weren't encoding the rendered value.  That's fixed in f2835c4, along with removing a previous hack around that bug.
With that, ForwardedSpec passes.

ForwardedSpec was failing whenever the RegName begins with a number.  That's because we weren't backtracking from IPv4 addresses.  That's fixed in 1dc3f87.
We store a decoded value, but weren't encoding the rendered value.  That's fixed in f2835c4, along with removing a previous hack around that bug.
With that, ForwardedSpec passes.

It looks like at least two of the outstanding failures in ForwardedRenderingSpec are related to the encoding of weird RegNames, but I need to be up.  I'll try to take another pass tomorrow if nobody else has figured it out.
We need to get a lot more rigorous in the URI about what's encoded and what's not.  That's the main source of trouble here.
/cc @satorg, who worked on the original model.

It looks like at least two of the outstanding failures in ForwardedRenderingSpec are related to the encoding of weird RegNames, but I need to be up.  I'll try to take another pass tomorrow if nobody else has figured it out.
We need to get a lot more rigorous in the URI about what's encoded and what's not.  That's the main source of trouble here.
/cc @satorg, who worked on the original model.

Seems like the problem is in the generator for hostnames.
I'm not sure that it is allowed with arbitrary strings here.
Dont we need to punycode any non-ascii chars for the hostname?

Seems like the problem is in the generator for hostnames.
I'm not sure that it is allowed with arbitrary strings here.
Dont we need to punycode any non-ascii chars for the hostname?

I already took a shot at reforming the hostname generator here.  In practice, non-ASCII characters in a hostname would be punycoded.  But the URI spec intentionally says it doesn't necessarily follow the rules for hostname resolution.
Some of the problem @fredshonorio ran into was that the generator was creating percent-encoded strings, and storing them in a model that stores decoded strings.  I started fixing that in my commits, but I think there may be more nuance.
As we think about a better URI design, a newtype to distinguish percent-encoded values from raw values could help us avoid bugs like this.

I already took a shot at reforming the hostname generator here.  In practice, non-ASCII characters in a hostname would be punycoded.  But the URI spec intentionally says it doesn't necessarily follow the rules for hostname resolution.
Some of the problem @fredshonorio ran into was that the generator was creating percent-encoded strings, and storing them in a model that stores decoded strings.  I started fixing that in my commits, but I think there may be more nuance.
As we think about a better URI design, a newtype to distinguish percent-encoded values from raw values could help us avoid bugs like this.

A possible implementation using arbitraries adapted from ip4s:
Index: laws/src/main/scala/org/http4s/laws/discipline/ArbitraryInstances.scala
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/laws/src/main/scala/org/http4s/laws/discipline/ArbitraryInstances.scala b/laws/src/main/scala/org/http4s/laws/discipline/ArbitraryInstances.scala
--- a/laws/src/main/scala/org/http4s/laws/discipline/ArbitraryInstances.scala	(revision b708314ac351305bf50ee23063d9403c6b2c249e)
+++ b/laws/src/main/scala/org/http4s/laws/discipline/ArbitraryInstances.scala	(date<PHONE_NUMBER>474)
@@ -665,24 +665,55 @@
       .contramap(ipv6 => (ipv6.a, ipv6.b, ipv6.c, ipv6.d, ipv6.e, ipv6.f, ipv6.g, ipv6.h))

   implicit val http4sTestingArbitraryForUriHost: Arbitrary[Uri.Host] = {
-    val http4sTestingRegNameGen: Gen[Uri.RegName] =
-      Gen
-        .frequency(
-          // Focus on things vaguely resembling hostnames
-          // TODO Replace with an ip4s generator for more realism
-          19 -> Gen.stringOf(
-            Gen.frequency(
-              8 -> Gen.alphaNumChar,
-              1 -> Gen.const('-'),
-              1 -> Gen.const('.')
-            )
-          ),
-          // But arbitrary strings are allowed!
-          1 -> getArbitrary[String]
-        )
-        .map(s => Uri.RegName(s))
+    val hostnameGenerator: Gen[Uri.RegName] = {
+      val genLabel: Gen[String] = for {
+        first <- Gen.alphaNumChar
+        middleLen <- Gen.chooseNum(0, 61)
+        middle <- Gen.listOfN(middleLen, Gen.oneOf(Gen.alphaNumChar, Gen.const('-'))).map(_.mkString)
+        last <- if (middleLen > 0) Gen.alphaNumChar.map(Some(_)) else Gen.option(Gen.alphaNumChar)
+      } yield first.toString + middle + last.fold("")(_.toString)
+      for {
+        numLabels <- Gen.chooseNum(1, 5)
+        labels <- Gen.listOfN(numLabels, genLabel)
+        if labels.foldLeft(0)(_ + _.size) < (253 - (numLabels - 1))
+      } yield Uri.RegName(labels.mkString("."))
+    }
+
+    val idnGenerator: Gen[Uri.RegName] = {
+      val DotPattern = "[\\.\u002e\u3002\uff0e\uff61]"
+
+      /** Constructs a `IDN` from a string. */
+      def apply(value: String): Option[Uri.RegName] =
+        value.length match {
+          case 0 => None
+          case _ =>
+            val labels = value
+              .split(DotPattern)
+              .iterator
+              .toList
+            Option(labels).filterNot(_.isEmpty).flatMap { _ =>
+              Try(java.net.IDN.toASCII(value)).toOption.map(Uri.RegName(_))
+            }
+        }
+
+      val genChar: Gen[Char] = Gen.oneOf(Gen.alphaNumChar, Gen.const('δ'), Gen.const('π'), Gen.const('θ'))
+      val genLabel: Gen[String] = for {
+        first <- genChar
+        middleLen <- Gen.chooseNum(0, 61)
+        middle <- Gen.listOfN(middleLen, Gen.oneOf(genChar, Gen.const('-'))).map(_.mkString)
+        last <- if (middleLen > 0) genChar.map(Some(_)) else Gen.option(genChar)
+        str = first.toString + middle + last.fold("")(_.toString)
+        if Try(java.net.IDN.toASCII(str)).toOption.size < 64
+      } yield str
+      for {
+        numLabels <- Gen.chooseNum(1, 5)
+        labels <- Gen.listOfN(numLabels, genLabel)
+        dot <- Gen.oneOf('.', '\u002e', '\u3002', '\uff0e', '\uff61')
+        idn = apply(labels.mkString(dot.toString)) if idn.isDefined
+      } yield idn.get
+    }
     Arbitrary(
-      oneOf(getArbitrary[Uri.Ipv4Address], getArbitrary[Uri.Ipv6Address], http4sTestingRegNameGen)
+      oneOf(getArbitrary[Uri.Ipv4Address], getArbitrary[Uri.Ipv6Address], idnGenerator, hostnameGenerator)
     )
   }

A possible implementation using arbitraries adapted from ip4s:
Index: laws/src/main/scala/org/http4s/laws/discipline/ArbitraryInstances.scala
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/laws/src/main/scala/org/http4s/laws/discipline/ArbitraryInstances.scala b/laws/src/main/scala/org/http4s/laws/discipline/ArbitraryInstances.scala
--- a/laws/src/main/scala/org/http4s/laws/discipline/ArbitraryInstances.scala	(revision b708314ac351305bf50ee23063d9403c6b2c249e)
+++ b/laws/src/main/scala/org/http4s/laws/discipline/ArbitraryInstances.scala	(date<PHONE_NUMBER>474)
@@ -665,24 +665,55 @@
       .contramap(ipv6 => (ipv6.a, ipv6.b, ipv6.c, ipv6.d, ipv6.e, ipv6.f, ipv6.g, ipv6.h))

   implicit val http4sTestingArbitraryForUriHost: Arbitrary[Uri.Host] = {
-    val http4sTestingRegNameGen: Gen[Uri.RegName] =
-      Gen
-        .frequency(
-          // Focus on things vaguely resembling hostnames
-          // TODO Replace with an ip4s generator for more realism
-          19 -> Gen.stringOf(
-            Gen.frequency(
-              8 -> Gen.alphaNumChar,
-              1 -> Gen.const('-'),
-              1 -> Gen.const('.')
-            )
-          ),
-          // But arbitrary strings are allowed!
-          1 -> getArbitrary[String]
-        )
-        .map(s => Uri.RegName(s))
+    val hostnameGenerator: Gen[Uri.RegName] = {
+      val genLabel: Gen[String] = for {
+        first <- Gen.alphaNumChar
+        middleLen <- Gen.chooseNum(0, 61)
+        middle <- Gen.listOfN(middleLen, Gen.oneOf(Gen.alphaNumChar, Gen.const('-'))).map(_.mkString)
+        last <- if (middleLen > 0) Gen.alphaNumChar.map(Some(_)) else Gen.option(Gen.alphaNumChar)
+      } yield first.toString + middle + last.fold("")(_.toString)
+      for {
+        numLabels <- Gen.chooseNum(1, 5)
+        labels <- Gen.listOfN(numLabels, genLabel)
+        if labels.foldLeft(0)(_ + _.size) < (253 - (numLabels - 1))
+      } yield Uri.RegName(labels.mkString("."))
+    }
+
+    val idnGenerator: Gen[Uri.RegName] = {
+      val DotPattern = "[\\.\u002e\u3002\uff0e\uff61]"
+
+      /** Constructs a `IDN` from a string. */
+      def apply(value: String): Option[Uri.RegName] =
+        value.length match {
+          case 0 => None
+          case _ =>
+            val labels = value
+              .split(DotPattern)
+              .iterator
+              .toList
+            Option(labels).filterNot(_.isEmpty).flatMap { _ =>
+              Try(java.net.IDN.toASCII(value)).toOption.map(Uri.RegName(_))
+            }
+        }
+
+      val genChar: Gen[Char] = Gen.oneOf(Gen.alphaNumChar, Gen.const('δ'), Gen.const('π'), Gen.const('θ'))
+      val genLabel: Gen[String] = for {
+        first <- genChar
+        middleLen <- Gen.chooseNum(0, 61)
+        middle <- Gen.listOfN(middleLen, Gen.oneOf(genChar, Gen.const('-'))).map(_.mkString)
+        last <- if (middleLen > 0) genChar.map(Some(_)) else Gen.option(genChar)
+        str = first.toString + middle + last.fold("")(_.toString)
+        if Try(java.net.IDN.toASCII(str)).toOption.size < 64
+      } yield str
+      for {
+        numLabels <- Gen.chooseNum(1, 5)
+        labels <- Gen.listOfN(numLabels, genLabel)
+        dot <- Gen.oneOf('.', '\u002e', '\u3002', '\uff0e', '\uff61')
+        idn = apply(labels.mkString(dot.toString)) if idn.isDefined
+      } yield idn.get
+    }
     Arbitrary(
-      oneOf(getArbitrary[Uri.Ipv4Address], getArbitrary[Uri.Ipv6Address], http4sTestingRegNameGen)
+      oneOf(getArbitrary[Uri.Ipv4Address], getArbitrary[Uri.Ipv6Address], idnGenerator, hostnameGenerator)
     )
   }

@hamnis' suggestion passes the tests.  I don't think it's complete per the spec, but I don't think it's incomplete in a way that is interesting enough to hold up progress.

@hamnis' suggestion passes the tests.  I don't think it's complete per the spec, but I don't think it's incomplete in a way that is interesting enough to hold up progress.

Nice, I haven't been able to give it all a full look yet, are there any outstanding issues still?
Regarding your suggestion to use ParseResult.fromParser: I think I can't do it without changing some tests that are expecting specific error messages. Should I do that?
I'll fix the port parser to consume only 5 chars soon.

Nice, I haven't been able to give it all a full look yet, are there any outstanding issues still?
Regarding your suggestion to use ParseResult.fromParser: I think I can't do it without changing some tests that are expecting specific error messages. Should I do that?
I'll fix the port parser to consume only 5 chars soon.

Hmm.  The tests passed for me locally, but I only ran tests/test.  If you see tests failing on the error message, then yes, those would be great to fix.
There's an unmoored doc comment that I'll push in just a moment.

Hmm.  The tests passed for me locally, but I only ran tests/test.  If you see tests failing on the error message, then yes, those would be great to fix.
There's an unmoored doc comment that I'll push in just a moment.


Clarify usage in README

rename var client to git like in the other examples
show that baseurl expects /api/v3

Thanks!


Changes in Sales

Request: We need to change the UI of Sales section for them to be similar to the voucher section. UI changes are in the project in Figma.
Reason: There is a similar flow to both of these section, therefore UI should be similar for consistency reasons.

@dominik-zeglen Can you check if we have the latest design there or are we still missing something?


Log a warning if an unknown config entry is present

It's quite easy to run into situations of invalid log entries, like https://github.com/Deltares/Ribasim/issues/1093.
Logging a warning, when an unknown config entry is present, would be useful for both users and developers.

Right now this is an entry in the core:
ERROR: InvalidKeyError: invalid key my_extra_key, possible keys are: starttime, endtime, input_dir, results_dir, database, allocation, solver, logging... please check documentation for other valid keys

But silently added/ignored in Ribasim Python:
import ribasim

solver = ribasim.Solver(my_extra_key=2)
assert solver.my_extra_key == 2

model = ribasim.Model(filepath="ribasim.toml")
assert model.my_extra_key == 3

Probably the best would be to just give an error here?

Right now this is an entry in the core:
ERROR: InvalidKeyError: invalid key my_extra_key, possible keys are: starttime, endtime, input_dir, results_dir, database, allocation, solver, logging... please check documentation for other valid keys

Interesting, then why did we never notice the extra key mentioned in https://github.com/Deltares/Ribasim/issues/1093

I don't think that key was written to any of our test model TOML files.

I don't think that key was written to any of our test model TOML files.

Hah, that's weird 😅

Will close the issue for now. Logging a warning within Ribasim Core is good enough for now IMO


Temp fix for inline forms

we already have 0.6.6 release (which was broken one). Please create 0.6.7 release

I have updated the PR


Design pattern template

As a: Design system team
I want to: Create a pattern/framework that can be used by the pattern squads to document their patterns
so that: Documentation outputs will be consistent from team to team, making it easier for a consumer of patterns to navigate between patterns.
Acceptance criteria

[ ] Pattern template will reference co-deisgn session outputs
[ ] Pattern template is reviewed by all squad team leaders

Presentable outcomes

[ ] This 1st draft can be used to document a pattern from one of the pattern squads

Sprint Ready Checklist

Acceptance criteria defined
Team has defined steps to satisfy acceptance criteria
Acceptance criteria is verifiable / testable
External / 3rd Party dependencies identified

Related issues:
Resources:
Mockups:
Testing URL: [If applicable a URL to the testing branch]

As discussed as a group, I have outlined a proposal for a change to the structure of the pattern working groups, and a reprioritization of the work overall to incorporate the increased capacity of the design system team and a new method of engagement from the service teams.
https://goa-dio.atlassian.net/wiki/spaces/DS/pages/2286551153/WIP+-+Pattern+squad+working+groups+-+Outline+of+proposal+for+a+change+to+the+structure+of+the+pattern+working+groups
I created a template as a starting point for documentation within Figma, but as each pattern has a different scope and applicable guidance, it will only be so helpful as a common starting point. https://www.figma.com/file/UbIKwjbxuPUvoFNYvMBGpe/?node-id=1610%3A207868


feat: renamed type file to vscode automatically detect bullet-train type

Hi,
I have trying use Typescript types on VSCode, but VSCode is not automatically detecting the bullet train types. This happens because the file is named with bullet-train-nodejs-client.d.ts. To code automatically detects a lib custom type we need to rename this file to index.d.ts.
This PR fixes this.
You can read more about modules here:
https://www.typescriptlang.org/docs/handbook/declaration-files/templates/module-d-ts.html

Thanks @raryson, this is now in 1.0.6!


when extension support will be released?

Hi, we need to upload extension by using terraform, just wondering when this can be used?
https://github.com/elastic/terraform-provider-ec/blob/master/examples/extension_bundle/extension.tf

You'll be able to use it with the upcoming 0.1.0 later this week.

v0.1.0 has been released and available for everyone to use.


Updating api doc link

Please check if the PR fulfills these requirements :clipboard:

[x] The commit message follows our guidelines : link
[x] Docs have been added/updated (for bug fixes/features)
[x] A new branch is created for the change(s) and the changes are not committed on the main or master branch
[x] No credentials or secrets are committed

What kind of change does this PR introduce? (Bug fix, feature, docs update, refactor, chore, test) :information_desk_person: :scroll:
docs update, refactor

Updated the README.md to have the Redocly URL of the OpenAPI specs
Refactored PR template
Added CDPG .svg icon in Open API specs

Checklist :page_with_curl:

[x] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have added reviewers to check the proposed changes

Build finished.

Please check if the PR fulfills these requirements 📋

[x]  The commit message follows our guidelines : link

[x]  Docs have been added/updated (for bug fixes/features)

[x]  A new branch is created for the change(s) and the changes are not committed on the main or master branch

[x]  No credentials or secrets are committed

What kind of change does this PR introduce? (Bug fix, feature, docs update, refactor, chore, test) 💁 📜
docs update, refactor

Updated the README.md to have the Redocly URL of the OpenAPI specs

Refactored PR template

Checklist 📃

[x]  I have made corresponding changes to the documentation

[x]  My changes generate no new warnings

[x]  I have added reviewers to check the proposed changes

Hey @shreelakshmijoshi , can we have followings point in checklist also

If config options changed, is it added in git (./example-config/config.json), notify  devops team with mention @datakaveri/devops in comment,  to add changes in CI pipeline and for deployment

If any backend components ( postgres (flyway files), immudb, redis, rabbitmq, elasticsearch) configs changed, notify  devops team with mention @datakaveri/devops in comment, for necessary changes in iudx-deployment repository and deployments in the environments.

Explicitly mention as comment if this PR requires any cat items  (commit the cat items needed for server in src/test/resources/cat-items?, have a brief readme also) to be created on or depends on for testing of the functionality.
+cc @karun-singh , anything else we would need?

Build finished.

Build finished.

Please check if the PR fulfills these requirements 📋

[x]   The commit message follows our guidelines : link
[x]   Docs have been added/updated (for bug fixes/features)
[x]   A new branch is created for the change(s) and the changes are not committed on the main or master branch
[x]   No credentials or secrets are committed
What kind of change does this PR introduce? (Bug fix, feature, docs update, refactor, chore, test) 💁 📜
docs update, refactor
Updated the README.md to have the Redocly URL of the OpenAPI specs
Refactored PR template
Checklist 📃
[x]   I have made corresponding changes to the documentation
[x]   My changes generate no new warnings
[x]   I have added reviewers to check the proposed changes

Hey @shreelakshmijoshi , can we have followings point in checklist also

If config options changed, is it added in git (./example-config/config.json), notify  devops team with mention @datakaveri/devops in comment,  to add changes in CI pipeline and for deployment
If any backend components ( postgres (flyway files), immudb, redis, rabbitmq, elasticsearch) configs changed, notify  devops team with mention @datakaveri/devops in comment, for necessary changes in iudx-deployment repository and deployments in the environments.
Explicitly mention as comment if this PR requires any cat items  (commit the cat items needed for server in src/test/resources/cat-items?, have a brief readme also) to be created on or depends on for testing of the functionality.
+cc @karun-singh , anything else we would need?

Hello Abhilash,
Thanks for suggesting the changes. I have added the changes here : Update PR Template, Update markdown file

Build finished.

Build finished.

Build finished.

retest this please

Build finished.


Ruby 1.9 fixes,  Limit of 1 for has_one, Remove Freeze for Dalli encoding

I allowed limits of 1 to make has_one work.  I made it work by cutting the size of the records array after the cache hit.  This could work for any limit size, but I wasn't sure if you were concerned about performance.
I had an issue where dalli was trying to change the encoding of the key strings that were frozen.  I removed the freeze on them.  I'm not sure if this is a ruby 1.9 issue.
The other fixes were basic changes for ruby 1.9.

Thanks for the pull-request. I am not using ruby 1.9 yet, so those changes are very welcome and removing the freeze's is fine by me too.
The reason why record cache does not allow for :limit > 1 queries is that it is usually combined with sorting and large amounts of data, in which case the DB is probably faster than retrieving all records first and then sort + limit in memory.
To make sure only the has_one case is supported by the index_cache, I propose:
def cacheable?(query)
  # allow limit of 1 for has_one and Class.find :id
  query.where_id(@index) && (query.limit.nil? || (query.limit == 1 && !query.sorted?))
end

Would it be possible to add a has_one relation to the test model and write some specs? Especially the part of cache invalidation on delete is now missing.
Thanks again for your contribution,
Orslumen

I added the test and put the sorted check

Thanks again for your contribution, it will be part of the next release.


error 9003 in Stata, mu has infinite values on iteration 10;

Dear Sergio Correia,
I am trying to run the manual RESET Test and I keep getting the following error:
.  qui asdoc ppmlhdfe gvc_total regulatory_distance applied_tariff dist_w rta if exp
> !=imp, a(exp_time imp_time pair_id) vce(cluster pair_id) replace

. predict fit, xb
(222,075 missing values generated)

. generate fit2 = fit^2
(222,075 missing values generated)

.  asdoc ppmlhdfe gvc_total regulatory_distance applied_tariff dist_w rta fit2
> if exp!=imp, a(exp_time imp_time pair_id) vce(cluster pair_id) replace
warning: dependent variable takes very low values after standardizing (4.3599e-2
> 1)
Iteration 1:   deviance = 1.6027e+11  eps = .         iters = 6    tol = 1.0e-04
>   min(eta) =  -6.95  P
Iteration 2:   deviance = 5.8990e+10  eps = 1.72e+00  iters = 9    tol = 1.0e-04
>   min(eta) =  -9.40
Iteration 3:   deviance = 2.1738e+10  eps = 1.71e+00  iters = 8    tol = 1.0e-04
>   min(eta) = -12.59
Iteration 4:   deviance = 8.0361e+09  eps = 1.71e+00  iters = 8    tol = 1.0e-04
>   min(eta) = -14.38
Iteration 5:   deviance = 4.2509e+43  eps = 5.29e+33  iters = 8    tol = 1.0e-04
>   min(eta) = -274.18
Iteration 6:   deviance = 1.5638e+43  eps = 1.72e+00  iters = 43   tol = 1.0e-04
>   min(eta) = -275.69
Iteration 7:   deviance = 1.2081e+44  eps = 6.73e+00  iters = 32   tol = 1.0e-04
>   min(eta) = -46.21   S
Iteration 8:   deviance = 4.4444e+43  eps = 1.72e+00  iters = 47   tol = 1.0e-04
>   min(eta) = -47.68
Iteration 9:   deviance = 0.0000e+00  eps = 0.00e+00  iters = 162  tol = 1.0e-04
>   min(eta) =      .
mu has infinite values on iteration 10; aborting
r(9003);

Would you know the reason why this error occurs?
Thank you in advance for your time

Try adding one of the following options:

"sep(fe simplex ir mu)"
"guess(ols)"
"start_inner_tol(1e-2)"
"start_inner_tol(1e-6)"

If I had to guess, the issue looks like bad starting values. Using "guess(ols)" or "start_inner_tol(1e-2)" seem like the most likely fixes, but the others are worth trying. If none of these works, you could try sharing (some of) your data so we can replicate the issue and figure out a fix.

Dear Mr Correia,
Thank you very much for your prompt reply and your help. They are both appreciated. I tried the approaches you suggested, but unfortunately, none of them seems to fix the problem. If it is still possible, I share the data in dropbox since they are quite heavy.
https://www.dropbox.com/s/y3hindyo0xr69yk/Thesis Stata-dataset WIP - bilateral.zip?dl=0
Would you please tell me if you think you can do something or whether other approaches are available?
Thank you in advance for your time and your patience

I found the solution. I did not realize this but step halving is not turned on by default. To activate it, add "use_step_halving(1)" as an option. Based on my tests it solves the problem.
I also have two questions about the variable dist_w

lt looks to me as though you probably want to be using the log of distw instead of the raw value of dist_w?
This variable appears to be collinear with the pair fixed effect. Thus, it may make sense not to include it?

Dear Tom,
I sincerely thank you, this issue has been puzzling me for days. You are right, I admittedly did not notice that dist_w was collinear with the pair FE. Therefore, I replace it with the log of bilateral distance multiplied with years dummies  (obtaining the ln_distance_2005 ... ln_distance_2015). I saw that some papers included distance measurement in this way and it does not get collinear with fixed effects.
Thank you again for your valuable help
Wishing you a pleasant and productive day


Add Griffin Austin to Contributors list and add flags to README

I created a subfolder in assets to hold flags images and added a clickable image in README.md to link to Translations.md

@GriffinAustin, thank you so much for your effort in this direction.
I'd like to suggest a change to this approach. We can have emojis for flags. They will be much more maintainable.
Here are some examples
🇯🇵 :jp:
🇰🇷 :kr: | 🇨🇳 :cn: | 🇺🇸 :us:
🇫🇷 :fr: | 🇪🇸 :es: | 🇮🇹 :it:
🇷🇺 :ru: | 🇬🇧 :gb: | 🇬🇧 :uk:
🇩🇪 :de:

@Roshanjossey Can't believe I didn't see that. So perhaps having each flag link to its corresponding language would make it the most intuitive for the user? I'll get to work once we agree on a plan.

@GriffinAustin,

So perhaps having each flag link to its corresponding language would make it the most intuitive for the user?

Yes, that's the plan. It'd be awesome if you could work on it.

@Roshanjossey
Will do, probably tomorrow or so.

@Roshanjossey Looked into the issue, it seems as though the flags are not images and they are very limited. There are not enough for all of our supported languages.

@GriffinAustin, I checked in https://emojipedia.org/flags/. Could you tell me if there is any flags that we need that are not in this list?
🏴 Black Flag
🏳 White Flag
🏳🌈 Rainbow Flag
🏴☠ Pirate Flag
🇦🇨 Ascension Island
🇦🇩 Andorra
🇦🇪 United Arab Emirates
🇦🇫 Afghanistan
🇦🇬 Antigua & Barbuda
🇦🇮 Anguilla
🇦🇱 Albania
🇦🇲 Armenia
🇦🇴 Angola
🇦🇶 Antarctica
🇦🇷 Argentina
🇦🇸 American Samoa
🇦🇹 Austria
🇦🇺 Australia
🇦🇼 Aruba
🇦🇽 Åland Islands
🇦🇿 Azerbaijan
🇧🇦 Bosnia & Herzegovina
🇧🇧 Barbados
🇧🇩 Bangladesh
🇧🇪 Belgium
🇧🇫 Burkina Faso
🇧🇬 Bulgaria
🇧🇭 Bahrain
🇧🇮 Burundi
🇧🇯 Benin
🇧🇱 St. Barthélemy
🇧🇲 Bermuda
🇧🇳 Brunei
🇧🇴 Bolivia
🇧🇶 Caribbean Netherlands
🇧🇷 Brazil
🇧🇸 Bahamas
🇧🇹 Bhutan
🇧🇻 Bouvet Island
🇧🇼 Botswana
🇧🇾 Belarus
🇧🇿 Belize
🇨🇦 Canada
🇨🇨 Cocos (Keeling) Islands
🇨🇩 Congo - Kinshasa
🇨🇫 Central African Republic
🇨🇬 Congo - Brazzaville
🇨🇭 Switzerland
🇨🇮 Côte D’Ivoire
🇨🇰 Cook Islands
🇨🇱 Chile
🇨🇲 Cameroon
🇨🇳 China
🇨🇴 Colombia
🇨🇵 Clipperton Island
🇨🇷 Costa Rica
🇨🇺 Cuba
🇨🇻 Cape Verde
🇨🇼 Curaçao
🇨🇽 Christmas Island
🇨🇾 Cyprus
🇨🇿 Czechia
🇩🇪 Germany
🇩🇬 Diego Garcia
🇩🇯 Djibouti
🇩🇰 Denmark
🇩🇲 Dominica
🇩🇴 Dominican Republic
🇩🇿 Algeria
🇪🇦 Ceuta & Melilla
🇪🇨 Ecuador
🇪🇪 Estonia
🇪🇬 Egypt
🇪🇭 Western Sahara
🇪🇷 Eritrea
🇪🇸 Spain
🇪🇹 Ethiopia
🇪🇺 European Union
🇫🇮 Finland
🇫🇯 Fiji
🇫🇰 Falkland Islands
🇫🇲 Micronesia
🇫🇴 Faroe Islands
🇫🇷 France
🇬🇦 Gabon
🇬🇧 United Kingdom
🇬🇩 Grenada
🇬🇪 Georgia
🇬🇫 French Guiana
🇬🇬 Guernsey
🇬🇭 Ghana
🇬🇮 Gibraltar
🇬🇱 Greenland
🇬🇲 Gambia
🇬🇳 Guinea
🇬🇵 Guadeloupe
🇬🇶 Equatorial Guinea
🇬🇷 Greece
🇬🇸 South Georgia & South Sandwich Islands
🇬🇹 Guatemala
🇬🇺 Guam
🇬🇼 Guinea-Bissau
🇬🇾 Guyana
🇭🇰 Hong Kong SAR China
🇭🇲 Heard & McDonald Islands
🇭🇳 Honduras
🇭🇷 Croatia
🇭🇹 Haiti
🇭🇺 Hungary
🇮🇨 Canary Islands
🇮🇩 Indonesia
🇮🇪 Ireland
🇮🇱 Israel
🇮🇲 Isle of Man
🇮🇳 India
🇮🇴 British Indian Ocean Territory
🇮🇶 Iraq
🇮🇷 Iran
🇮🇸 Iceland
🇮🇹 Italy
🇯🇪 Jersey
🇯🇲 Jamaica
🇯🇴 Jordan
🇯🇵 Japan
🇰🇪 Kenya
🇰🇬 Kyrgyzstan
🇰🇭 Cambodia
🇰🇮 Kiribati
🇰🇲 Comoros
🇰🇳 St. Kitts & Nevis
🇰🇵 North Korea
🇰🇷 South Korea
🇰🇼 Kuwait
🇰🇾 Cayman Islands
🇰🇿 Kazakhstan
🇱🇦 Laos
🇱🇧 Lebanon
🇱🇨 St. Lucia
🇱🇮 Liechtenstein
🇱🇰 Sri Lanka
🇱🇷 Liberia
🇱🇸 Lesotho
🇱🇹 Lithuania
🇱🇺 Luxembourg
🇱🇻 Latvia
🇱🇾 Libya
🇲🇦 Morocco
🇲🇨 Monaco
🇲🇩 Moldova
🇲🇪 Montenegro
🇲🇫 St. Martin
🇲🇬 Madagascar
🇲🇭 Marshall Islands
🇲🇰 Macedonia
🇲🇱 Mali
🇲🇲 Myanmar (Burma)
🇲🇳 Mongolia
🇲🇴 Macau SAR China
🇲🇵 Northern Mariana Islands
🇲🇶 Martinique
🇲🇷 Mauritania
🇲🇸 Montserrat
🇲🇹 Malta
🇲🇺 Mauritius
🇲🇻 Maldives
🇲🇼 Malawi
🇲🇽 Mexico
🇲🇾 Malaysia
🇲🇿 Mozambique
🇳🇦 Namibia
🇳🇨 New Caledonia
🇳🇪 Niger
🇳🇫 Norfolk Island
🇳🇬 Nigeria
🇳🇮 Nicaragua
🇳🇱 Netherlands
🇳🇴 Norway
🇳🇵 Nepal
🇳🇷 Nauru
🇳🇺 Niue
🇳🇿 New Zealand
🇴🇲 Oman
🇵🇦 Panama
🇵🇪 Peru
🇵🇫 French Polynesia
🇵🇬 Papua New Guinea
🇵🇭 Philippines
🇵🇰 Pakistan
🇵🇱 Poland
🇵🇲 St. Pierre & Miquelon
🇵🇳 Pitcairn Islands
🇵🇷 Puerto Rico
🇵🇸 Palestinian Territories
🇵🇹 Portugal
🇵🇼 Palau
🇵🇾 Paraguay
🇶🇦 Qatar
🇷🇪 Réunion
🇷🇴 Romania
🇷🇸 Serbia
🇷🇺 Russia
🇷🇼 Rwanda
🇸🇦 Saudi Arabia
🇸🇧 Solomon Islands
🇸🇨 Seychelles
🇸🇩 Sudan
🇸🇪 Sweden
🇸🇬 Singapore
🇸🇭 St. Helena
🇸🇮 Slovenia
🇸🇯 Svalbard & Jan Mayen
🇸🇰 Slovakia
🇸🇱 Sierra Leone
🇸🇲 San Marino
🇸🇳 Senegal
🇸🇴 Somalia
🇸🇷 Suriname
🇸🇸 South Sudan
🇸🇹 São Tomé & Príncipe
🇸🇻 El Salvador
🇸🇽 Sint Maarten
🇸🇾 Syria
🇸🇿 Swaziland
🇹🇦 Tristan Da Cunha
🇹🇨 Turks & Caicos Islands
🇹🇩 Chad
🇹🇫 French Southern Territories
🇹🇬 Togo
🇹🇭 Thailand
🇹🇯 Tajikistan
🇹🇰 Tokelau
🇹🇱 Timor-Leste
🇹🇲 Turkmenistan
🇹🇳 Tunisia
🇹🇴 Tonga
🇹🇷 Turkey
🇹🇹 Trinidad & Tobago
🇹🇻 Tuvalu
🇹🇼 Taiwan
🇹🇿 Tanzania
🇺🇦 Ukraine
🇺🇬 Uganda
🇺🇲 U.S. Outlying Islands
🇺🇳 United Nations
🇺🇸 United States
🇺🇾 Uruguay
🇺🇿 Uzbekistan
🇻🇦 Vatican City
🇻🇨 St. Vincent & Grenadines
🇻🇪 Venezuela
🇻🇬 British Virgin Islands
🇻🇮 U.S. Virgin Islands
🇻🇳 Vietnam
🇻🇺 Vanuatu
🇼🇫 Wallis & Futuna
🇼🇸 Samoa
🇽🇰 Kosovo
🇾🇪 Yemen
🇾🇹 Mayotte
🇿🇦 South Africa
🇿🇲 Zambia
🇿🇼 Zimbabwe
🏴 England
🏴 Scotland
🏴 Wales

@Roshanjossey Ok I added the table of flags and languages. Thoughts?

@GriffinAustin, could you please add the changes as a new pull request? This pull request already has a lot of unneeded changes for images of flags and all. It'd be much better if you raise a new pull request.

Yes, here it is

Closing this in favour of #5600


Use without websocket

Hello,
If I use alternative variant request actually infinity waits response but if use web socket it will work fine.
$ curl -X POST -v -T decoder-test.wav "http://localhost:8080/client/dynamic/recognize"
*   Trying ::1...
* Connected to localhost (::1) port 8080 (#0)
> POST /client/dynamic/recognize HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.47.0
> Accept: */*
> Content-Length: 113324
> Expect: 100-continue
>
< HTTP/1.1 100 (Continue)
* We are completely uploaded and fine
``

Fixed after update to latest code from this repository.


Please provide feedback on your OpenAPI experience with BAML

Please leave any and all feedback about your experience using baml via our OpenAPI generators on this issue!
We're actively working on this and expect that we will have to do work to address pain points that users run into (including  if, say, you're having trouble installing npx and would rather we provide a universal installer). We'll be prioritizing work based on whether or not someone runs into it, and will update this issue when we do!

Re stability: we're actively working on the OpenAPI generator and may need to make backwards-breaking changes to stabilize the API.
Open questions:

reserved namespace members (e.g. exposing the streaming API may cause potential namespace conflicts)
semantics of optional fields (we currently don't use OpenAPI 3.0.x's nullable, nor do we use 3.1.x's oneOf: [type, 'null'])
how we'll expose raw API responses
how we'll expose dynamic types or tracing
exceptions, including user-caused exceptions, are currently returned as 5xx and not 4xx

If we have to make a backwards-breaking change to stabilize our OpenAPI support, we'll be sure to update this issue and work with any affected users to make sure that their use case will be supported moving forward.

At the moment the OpenAPI key is read from an ENV variable. Would it be possible to add support to pass this key as a header on the call to the OpenAPI RESTful endpoint.
We have a requirement where there is a proxy in from our our LLM accounts that exposes oauth authentication. So the token is only valid for 1 hour.

At the moment the OpenAPI key is read from an ENV variable. Would it be possible to add support to pass this key as a header on the call to the OpenAPI RESTful endpoint. We have a requirement where there is a proxy in from our our LLM accounts that exposes oauth authentication. So the token is only valid for 1 hour.

@k-brady-sap thats a great idea. I think likely we can just add support for our ClientRegistry and this will solve it. https://docs.boundaryml.com/docs/calling-baml/client-registry
Would that work for you?

@hellovai   Yes that approach will probably work all right.  Will be it ok to create a new llm client for every request?  We might also need to pass additional headers that contain request specific information (e.g. tenantID) - so would end up creating a new client for each request.  Would we need to delete the client after the LLM call to ensure that the client registry doesn't get full up of obsolete clients?

Hi @hellovai  and team. I always get a message that says Error generating clients: Client generation failed (screenshot below), any ideas on what I can try? I am running it with npx @boundaryml/baml dev --preview

I have also tried changing the version to 0.56.1 while troubleshooting it with a colleague but saw no changes.
Contents of my generators.baml:
// This helps use auto generate libraries you can use in the language of
// your choice. You can have multiple generators if you use multiple languages.
// Just ensure that the output_dir is different for each generator.
generator target {
    // Valid values: "python/pydantic", "typescript", "ruby/sorbet", "rest/openapi"
    output_type "rest/openapi"

    // Where the generated code will be saved (relative to baml_src/)
    output_dir "../"

    // The version of the BAML package you have installed (e.g. same version as your baml-py or @boundaryml/baml).
    // The BAML VSCode extension version should also match this version.
    version "0.55.3"

    // 'baml-cli generate' will run this after generating openapi.yaml, to generate your OpenAPI client
    // This command will be run from within $output_dir
    on_generate "openapi-generator generate -i openapi.yaml -g java -o . --additional-properties invokerPackage=com.boundaryml.baml_client,modelPackage=com.boundaryml.baml_client.model,apiPackage=com.boundaryml.baml_client.api,java8=true && cd ../baml_client && mvn clean install"

    // Valid values: "sync", "async"
    default_client_mode "sync"
}

@hellovai Yes that approach will probably work all right. Will be it ok to create a new llm client for every request? We might also need to pass additional headers that contain request specific information (e.g. tenantID) - so would end up creating a new client for each request. Would we need to delete the client after the LLM call to ensure that the client registry doesn't get full up of obsolete clients?

yep thats completely ok! and our clients allow you to pass in headers: see the headers property here https://docs.boundaryml.com/docs/snippets/clients/providers/openai

EDIT: Solved

Glad you were able to solve this @lily-sap !

would it be possible to allow the log output of the BAML service to be logged as json instead of plain text.  The Baml service will be running in a pod in kubernetes and the logs of all the pods are sent to Kibana. Logging in Json format would make them much more searchable in kibana.  Thanks.

@k-brady-sap  just curious, which language are you using BAML with? That's a good idea -- perhaps we add a flag to configure this.

@k-brady-sap just curious, which language are you using BAML with? That's a good idea -- perhaps we add a flag to configure this.

We're using Java.
Yes a flag or env variable will work to configure this.

ok, I'll get a release out by Monday to enable a preview of this feature

@k-brady-sap can you try version 0.66.0?
You should be able to see baml logs as json

This is the schema we emit on each request in baml_event in the log
struct BamlEventJson {
    // Metadata
    start_time: String,
    num_tries: usize,
    total_tries: usize,

    // LLM Info
    client: String,
    model: String,
    latency_ms: u128,
    stop_reason: Option<String>,

    // Content
    prompt: Option<String>,
    llm_reply: Option<String>,
    // JSON string
    request_options_json: Option<String>,

    // Token Usage
    tokens: Option<TokenUsage>,

    // Response/Error Info
    parsed_response_type: Option<String>,
    parsed_response: Option<String>,
    error: Option<String>,
}

#[derive(Valuable)]
struct TokenUsage {
    prompt_tokens: Option<u64>,
    completion_tokens: Option<u64>,
    total_tokens: Option<u64>,
}

some notes:

Expect this interface to remain unstable for a bit -- we will give you as much advance notice as we can before we change the schema.
Let us know if this schema works, or if we need to iterate on it

@aaronvg This is what the Json output looks like.  It looks like the json object is getting serialized as part of a plain text log output..
I have set two env variables like this in docker-compose file
BAML_LOG: "INFO"
BAML_LOG_JSON: 1

FROM node:22

WORKDIR /app
COPY baml_src/ baml_src/

# If you want to pin to a specific version (which we recommend):
# RUN npm install -g @boundaryml/baml@VERSION
RUN npm install -g<EMAIL_ADDRESS>
USER node

CMD ["baml-cli", "serve", "--preview", "--port", "2024"]

2024-11-08 15:25:28 [2024-11-08T15:25:28Z WARN  baml_runtime::cli::serve] BAML-over-HTTP is a preview feature.
2024-11-08 15:25:28
2024-11-08 15:25:28     Please provide feedback and let us know if you run into any issues:
2024-11-08 15:25:28
2024-11-08 15:25:28         - join our Discord at https://docs.boundaryml.com/discord, or
2024-11-08 15:25:28         - comment on https://github.com/BoundaryML/baml/issues/892
2024-11-08 15:25:28
2024-11-08 15:25:28     We expect to stabilize this feature over the next few weeks, but we need
2024-11-08 15:25:28     your feedback to do so.
2024-11-08 15:25:28
2024-11-08 15:25:28     Thanks for trying out BAML!
2024-11-08 15:25:28
2024-11-08 15:25:28 [2024-11-08T15:25:28Z INFO  baml_runtime::cli::serve] BAML-over-HTTP listening on port 2024, serving from ./baml_src
2024-11-08 15:25:28
2024-11-08 15:25:28     Tip: test that the server is up using `curl http://localhost:2024/_debug/ping`
2024-11-08 15:25:28
2024-11-08 15:25:28     (You may need to replace "localhost" with the container hostname as appropriate.)
2024-11-08 15:25:28
2024-11-08 15:26:13 [2024-11-08T15:26:13Z WARN  baml_runtime::cli::serve] BAML_PASSWORD not set, skipping auth check
2024-11-08 15:26:19 [2024-11-08T15:26:19Z INFO  baml_events] baml_event=BamlEventJson { start_time: "2024-11-08T15:26:13.507Z", num_tries: 1, total_tries: 1, client: "OpenAI", model: "gpt-4o-mini", latency_ms: 6177, stop_reason: "stop", prompt: "......", llm_reply: ".....", request_options_json: "{\"max_tokens\":4096}", tokens: TokenUsage { prompt_tokens: 1055, completion_tokens: 743, total_tokens: 1798 }, parsed_response_type: ".....", parsed_response: ".....", error: () }

ah I missed one configuration on our end for the release -- let me re-test and release a patch

I just released another patch in 0.68.0 to fix this

I just released another patch in 0.68.0 to fix this

Thanks - yes the latest version works great and the logs are displaying correctly in Kibana.

Is there a way to set temperature per request without modifying whole client via Client Registry?


Direct2CPS Scheduling/Calling Problem

The direct2cps dialect has a bug as demonstrated in
https://github.com/NeuralCoder3/thorin2/blob/test/direct_old_var/lit/direct/ad_mem.thorin.disabled
The bug manifests in the test case only in complex circumstances.
Two cps2ds calls are used with functions that contain cps2ds where a function is created that is called.
Removing some of the complexity resolves the bug.
The dialect rewrites the function but only introduces new lambdas for the continuations.
To do so, the body of the old functions is replaced.
Therefore, the origin of the bug is unclear.

The issue has been resolved due to recent changes in thorin2.
Also see archive/test/direct_old_var

Current branch: https://github.com/NeuralCoder3/thorin2/tree/direct_fix
Example command ./build/bin/thorin -d direct -o - -VVVV lit/direct/ad_mem.thorin.
The issue persists even if the pass degenerates to identity by replacing
https://github.com/NeuralCoder3/thorin2/blob/direct_fix/dialects/direct/passes/cps2ds.cpp#L48
with
if (auto app = def->isa<App>(); app && false) {

The issue was that nested lambda rewrites overwrote the current lambda screwing up the call trace.
The debugging problem was that the error was hidden and only occurred at the debug dump of the world.
The recursive lambda call is self was also hidden in op rewrites in some cases.
The solution is to explicitly handle lamdas and to manage a meta call stack.

I had similar probls when implementing SSAConstr, CopyProp, etc. To me the problem seems to be that you just shouldn't rewrite the body. What you should do instead is a reduction of the nominal in question and replace everything with the desired Defs up front.
So instead of this:
if (auto app = def->isa<App>()) {
    if (auto callee = app->callee()->isa_nominal<Lam>()) {
        map[some_old_value] = some_new_value;
        // and do sth later on with map
    }
}

You should do it like this:
if (auto app = def->isa<App>()) {
    if (auto callee = app->callee()->isa_nominal<Lam>()) {
        auto new_ops = callee->reduce(/*my_new_args*/);
        // ...
     }
}

Current work in branch direct_scheduling.
To recap:
The problem is that res = cps2ds fun args calls are unordered to a certain degree.
This freeness results in wrong translations to cps calls.
The general idea of the translation is to generate a cps call and use the argument
of the continuation in place of the previous direct result.
res = cps2ds fun args
...

becomes
fun(args, fun_cps_cont)

.cn fun_cps_cont [res] = {
...
}

However, this procedure becomes problematic in more complex situations (e.g. lit/direct/ad_mem2)
where many parallel and nested cps2ds calls are present.
One kind of problem:
{
a = cps2ds f1 x
}
b = cps2ds f2 y

If x contains b or y contains a, a certain order and nesting of calls is required.
This concept can be nested more indirectly such that the dependency is not found using depth first search.
We possibly need to first call a function found later on in an outer scope.
One Idea:
We could impose a strict ordering using mem/locks. However, this would increase the complexity at many other places and impose artificial constraints.
Previous Translation:
At the point of encountering a cps2ds call (ds call for short):

We replace the body of the current function with the cps call and
Place the original body with the continuation argument substituted for the call in the continuation.

h:
b = f a
C[b]

=>
h:
    f'(a,h_cont)

h_cont(b):
    C[b]

f : A -> B
f': .Cn [A, ret: .Cn[B]]

Idea:
Place the call smartly and not directly at the old call to capture the dependencies.
Problem:
The default schedulers for the calls are not sufficient.
The dependencies/nestings of the calls between each other are not taken fully into account.
Attempt:
Separate the stages:

Find ds calls, prepare cps calls and continuations
Replace ds calls with continuation arguments (do not place cps calls yet)
Place the cps calls taking the uses of the continuation arguments and the cps call arguments into account

Possibly, a good enough place for the calls might be enough:
We want the place the call so low (depth large)
that all arguments of the call are in view.
But simultanously it needs to be high (depth small)
enough that the result (from the continuation) can be accessed at the previous cps2ds call sites.
Linked to the depth is the call nesting.
As we place function calls, we order and nest functions.
This property is strictly linked to the depth:
If the place is main, we replace the body of main with the call to fun and continue
the body of main in fun_cps_cont.
If the place is other_cps_cont, we implicitely nest the function fun to be called after other.

I think we should discuss this online in our next meeting. I've difficulties following you here.


Decide on default functionality and engines that are part of "core" Tulip

We need to sort out what Tulip should do "out of the box". Things like whether we use jtlv and gr1c, how to deal with cvxopt, etc. There are a couple of issues related to this; please add some comments on this here.
(moved here from python-control/python-control#39)

gr1c is now the default GR(1) solver and is a required dependency as of<PHONE_NUMBER>9067960fbd021008393b4d4d90dd1b. This decision was reached via the tulip-control-discuss mailing list thread around 21 Jan 2015.

This issue has been essentially answered other places, in particular in the issues listed above and during discussions at various meetings. The original summary still captures it: "The Temporal Logic Planning (TuLiP) toolbox is a Python package for automatic synthesis of correct-by-construction embedded control software." Three clarifications:

emphasize toolbox;
while it definitely is a Python package, there are many interfaces to non-Python software;
it may soon also have capabilities for verification, i.e., for deciding properties about structures that were not generated by it.

For posterity, note that cvxopt became optional upon the merging of pull request #122.


[PE-D] Sequence of commands error

After using listvendor, I cannot enter editvendor?

I'm sorry, I do not mean to be harsh.

Labels: severity.High type.FunctionalityBug
original: justintanyf/ped#11

I also can't replicate this.


Test that ref to input works with custom inputComponent

As noted in https://github.com/moroshko/react-autosuggest/issues/269, the input property is undefined on ref callbacks. The underlying problem seems to be here in react-autowhatever, and while I don't know how to fix it (because I still don't understand exactly why it is happening) this pull request modifies the test case to demonstrate the problem.
Maybe because ref is not a real property and hence doesn't get passed to the custom inputComponent along with the other props?

Thanks @rybesh, I just fixed this in v7.0.0.


Enable SSL backends with CA cert verification

For users that really want hop by hop SSL termination.

I like this as a feature add, but have a couple requests:

Could this be simplified a little, to one property for determining whether it verifies?
Can you move the logic for generating the ssl directives up where it can be easier to read, vs all on one line?
I would like to see  support for still verifying SSL certificates, but not providing a ca_file (seems like right now, you either have it on, and provide a ca_file, or it's disabled)
It seems like verifyhost should only be added if ssl verification is enabled, but this looks like it will add it regardless, if the property is set.
Does this support need to be extended to the other backends in the haproxy config (http-routed-backend, and tcp-backends)?

Hi Geoff
I have a commit to simplify this ;  some comments

will do, i'll change the setting from boolean to an enumeration, one of "verify, noverify, anything else implies off".
will do but haproxy requires a single line so I'll have to use ERB trim mode creatively
ca file is mandatory for ssl cert verification; I've clarified the description that it's optional and only needed for verify mode.
fixed
Yeah, ideally we would have an ssl verify setting per backend.    I'll include this.

One final note is the assumption of a single backend_ca_file for SSL verification is that all the backends would have the same CA chain.    I think this is reasonable until someone comes up with a case where you're proxying different private CA backends (I'd think it would be rare).


Host on GitHub pages

Not sure how to do this, probably can be done with Travis
I'd like to deploy it at exphp.github.io/unsafe-gotchas

Done, though I have to update it manually (copy the book/ directory from here to the unsafe-gotchas/ directory in that repository)


Documentation on adding a custom template to the mixer

I was looking up documentation on how I can attach a custom template to the mixer binary, but the documentation is TBD.
Is there a blog post that I can refer to ? Are there plans of writing up the missing documentation ?

I don't believe that the documentation has ever been written, and at this point, I don't foresee it getting written. Mixer is being replaced by an in-proxy extension mechanism, and that work will be coming to the forefront in 1.4 and 1.5 releases.
The best thing may be to ask if anyone has experience with this on discuss.istio.io.


PyTest tests discovery is not work properly

Environment data

VS Code version: Version: 1.40.1
Commit: 8795a9889db74563ddd43eb0a897a2384129a619
Date: 2019-11-13T16:47:44.719Z
Electron: 6.1.2
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Darwin x64 18.7.0
Extension version (available under the Extensions sidebar): Name: Python
Id: ms-python.python
Description: Linting, Debugging (multi-threaded, remote), Intellisense, code formatting, refactoring, unit tests, snippets, and more.
Version: 2019.10.44104
Publisher: Microsoft
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-python.python
OS and version: MacOS Siera
Python version (& distribution if applicable, e.g. Anaconda): 3.6.9
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): pyenv
Relevant/affected Python packages and their versions: XXX
Jedi or Language Server? (i.e. what is "python.jediEnabled" set to; more info #3977): Language Server

Expected behaviour
pytest tests discovering is work normally
Actual behaviour
pytest tests discovering is not work
Steps to reproduce:
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]
pytest.ini
[pytest]
addopts=
        -svv
        --env=cloud
        --html=reports/html/report.html
        --self-contained-html
        --clean-alluredir
        --cache-clear
        --alluredir=reports/allure
        --junit-xml=reports/report.xml
        # -n auto
        # --hypothesis-show-statistics
        # --dup-fixtures
        # --dead-fixtures
        # --fulltrace
        # --setup-show
        # --fixtures-per-test
        # --verbose
        # --fixtures

in conftest.py
...
def pytest_addoption(parser):
    parser.addoption('--env', action='store', default='cloud',
                     help='Test run environment: cloud')
    parser.addoption(
        "--runslow", action="store_true", default=False,
        help="run slow tests"
    )
...

Logs
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
> python3.7 -c "import sys;print(sys.executable)"
> python3.6 -c "import sys;print(sys.executable)"
> python3 -c "import sys;print(sys.executable)"
> python2 -c "import sys;print(sys.executable)"
> python -c "import sys;print(sys.executable)"
> ~/Dropbox/DC_work/DC_AutoTests/automation-services/.venv/bin/python -c "import sys;print(sys.executable)"
> /usr/local/bin/conda info --json
Starting Microsoft Python language server.
> /usr/local/bin/pipenv --version
cwd: ~/Dropbox/DC_work/DC_AutoTests/automation-services
> /usr/local/bin/conda env list
> ~/Dropbox/DC_work/DC_AutoTests/automation-services/.venv/bin/pylint --disable=missing-docstring --disable=redefined-outer-name --msg-template='{line},{column},{category},{symbol}:{msg}' --reports=n --output-format=text ~/Dropbox/DC_work/DC_AutoTests/automation-services/conftest.py
cwd: ~/Dropbox/DC_work/DC_AutoTests/automation-services
> /usr/local/bin/conda env list
> /usr/local/bin/pipenv --venv
cwd: ~/Dropbox/DC_work/DC_AutoTests/automation-services
> /usr/local/bin/pipenv --py
cwd: ~/Dropbox/DC_work/DC_AutoTests/automation-services
##########Linting Output - pylint##########

--------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)

> /usr/local/bin/conda info --json
> /usr/local/bin/pipenv --version
cwd: ~/Dropbox/DC_work/DC_AutoTests/automation-services
> ~/Dropbox/DC_work/DC_AutoTests/automation-services/.venv/bin/python ~/.vscode/extensions/ms-python.python-2019.10.44104/pythonFiles/testing_tools/run_adapter.py discover pytest -- -s --cache-clear .
cwd: ~/Dropbox/DC_work/DC_AutoTests/automation-services
> /usr/local/bin/conda --version
> /usr/local/bin/pipenv --venv
cwd: ~/Dropbox/DC_work/DC_AutoTests/automation-services
> /usr/local/bin/pipenv --py
cwd: ~/Dropbox/DC_work/DC_AutoTests/automation-services
> ~/Dropbox/DC_work/DC_AutoTests/automation-services/.venv/bin/pylint --disable=missing-docstring --disable=redefined-outer-name --msg-template='{line},{column},{category},{symbol}:{msg}' --reports=n --output-format=text ~/Dropbox/DC_work/DC_AutoTests/automation-services/conftest.py
cwd: ~/Dropbox/DC_work/DC_AutoTests/automation-services
##########Linting Output - pylint##########

--------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)

> ~/Dropbox/DC_work/DC_AutoTests/automation-services/.venv/bin/pylint --disable=missing-docstring --disable=redefined-outer-name --msg-template='{line},{column},{category},{symbol}:{msg}' --reports=n --output-format=text ~/.pyenv/versions/3.6.9/Python.framework/Versions/3.6/lib/python3.6/pathlib.py
cwd: ~/.pyenv/versions/3.6.9/Python.framework/Versions/3.6/lib/python3.6
##########Linting Output - pylint##########
************* Module pathlib
140,2,warning,fixme:XXX extended paths should also disable the collapsing of "."
1122,2,warning,fixme:XXX untested yet!
1127,2,warning,fixme:FIXME this must defer to the specific flavour (and, under Windows,
1,0,convention,too-many-lines:Too many lines in module (1464/1000)
19,4,error,import-error:Unable to import 'nt'
20,7,error,no-member:Module 'sys' has no 'getwindowsversion' member
21,8,error,import-error:Unable to import 'nt'
44,0,refactor,useless-object-inheritance:Class '_Flavour' inherits from object, can be safely removed from bases in python3
49,20,error,no-member:Instance of '_Flavour' has no 'sep' member
53,14,error,no-member:Instance of '_Flavour' has no 'sep' member
54,17,error,no-member:Instance of '_Flavour' has no 'altsep' member
62,29,error,no-member:Instance of '_Flavour' has no 'splitroot' member
80,30,error,no-member:Instance of '_Flavour' has no 'splitroot' member
51,4,refactor,too-many-branches:Too many branches (14/12)
89,4,refactor,too-many-arguments:Too many arguments (7/5)
98,30,error,no-member:Instance of '_Flavour' has no 'casefold' member
98,53,error,no-member:Instance of '_Flavour' has no 'casefold' member
161,20,refactor,no-else-return:Unnecessary "else" after "return"
175,4,refactor,no-self-use:Method could be a function
178,4,refactor,no-self-use:Method could be a function
187,12,refactor,no-else-return:Unnecessary "else" after "return"
205,4,refactor,no-self-use:Method could be a function
234,8,refactor,no-else-return:Unnecessary "else" after "return"
231,4,refactor,no-self-use:Method could be a function
290,12,refactor,no-else-return:Unnecessary "else" after "return"
282,4,refactor,no-self-use:Method could be a function
297,4,refactor,no-self-use:Method could be a function
300,4,refactor,no-self-use:Method could be a function
305,19,warning,protected-access:Access to a protected member _accessor of a client class
348,26,warning,unused-argument:Unused argument 'parts'
348,4,refactor,no-self-use:Method could be a function
351,4,refactor,no-self-use:Method could be a function
357,4,refactor,no-self-use:Method could be a function
377,0,refactor,too-few-public-methods:Too few public methods (0/2)
384,4,error,no-self-argument:Method should have "self" as first argument
387,19,error,not-callable:strfunc is not callable
390,4,error,no-self-argument:Method should have "self" as first argument
393,19,error,not-callable:strfunc is not callable
428,12,error,no-self-argument:Method should have "self" as first argument
433,26,warning,unused-argument:Unused argument 'target_is_directory'
439,4,refactor,no-self-use:Method could be a function
382,0,refactor,too-few-public-methods:Too few public methods (1/2)
486,18,warning,protected-access:Access to a protected member _accessor of a client class
489,15,error,no-member:Instance of '_Selector' has no '_select_from' member; maybe 'select_from'?
467,0,refactor,too-few-public-methods:Too few public methods (1/2)
494,40,warning,unused-argument:Unused argument 'is_dir'
494,48,warning,unused-argument:Unused argument 'exists'
494,56,warning,unused-argument:Unused argument 'scandir'
494,4,refactor,no-self-use:Method could be a function
492,0,refactor,too-few-public-methods:Too few public methods (0/2)
506,19,warning,protected-access:Access to a protected member _make_child_relpath of a client class
508,25,warning,protected-access:Access to a protected member _select_from of a client class
498,0,refactor,too-few-public-methods:Too few public methods (1/2)
522,17,warning,protected-access:Access to a protected member _flavour of a client class
529,31,warning,protected-access:Access to a protected member _make_child_relpath of a client class
530,33,warning,protected-access:Access to a protected member _select_from of a client class
514,0,refactor,too-few-public-methods:Too few public methods (1/2)
539,23,warning,unused-argument:Unused argument 'pat'
548,27,warning,protected-access:Access to a protected member _make_child_relpath of a client class
558,35,warning,protected-access:Access to a protected member _select_from of a client class
537,0,refactor,too-few-public-methods:Too few public methods (1/2)
582,20,warning,protected-access:Access to a protected member _drv of a client class
583,21,warning,protected-access:Access to a protected member _root of a client class
584,22,warning,protected-access:Access to a protected member _parts of a client class
587,8,refactor,no-else-return:Unnecessary "else" after "return"
595,15,warning,protected-access:Access to a protected member _from_parsed_parts of a client class
602,0,refactor,useless-object-inheritance:Class 'PurePath' inherits from object, can be safely removed from bases in python3
623,12,warning,self-cls-assignment:Invalid assignment to cls in method
638,25,warning,protected-access:Access to a protected member _parts of a client class
649,15,error,no-member:Class 'PurePath' has no '_flavour' member
656,27,warning,protected-access:Access to a protected member _parse_args of a client class
657,8,warning,protected-access:Access to a protected member _drv of a client class
658,8,warning,protected-access:Access to a protected member _root of a client class
659,8,warning,protected-access:Access to a protected member _parts of a client class
661,12,warning,protected-access:Access to a protected member _init of a client class
667,8,warning,protected-access:Access to a protected member _drv of a client class
668,8,warning,protected-access:Access to a protected member _root of a client class
669,8,warning,protected-access:Access to a protected member _parts of a client class
671,12,warning,protected-access:Access to a protected member _init of a client class
676,8,refactor,no-else-return:Unnecessary "else" after "return"
677,32,error,no-member:Class 'PurePath' has no '_flavour' member
679,19,error,no-member:Class 'PurePath' has no '_flavour' member
687,27,error,no-member:Instance of 'PurePath' has no '_flavour' member
707,12,error,no-member:Instance of 'PurePath' has no '_flavour' member
722,15,error,no-member:Instance of 'PurePath' has no '_flavour' member
730,34,error,no-member:Instance of 'PurePath' has no '_flavour' member
736,31,warning,protected-access:Access to a protected member _cparts of a client class
736,49,error,no-member:Instance of 'PurePath' has no '_flavour' member
736,66,warning,protected-access:Access to a protected member _flavour of a client class
746,46,error,no-member:Instance of 'PurePath' has no '_flavour' member
746,67,warning,protected-access:Access to a protected member _flavour of a client class
748,30,warning,protected-access:Access to a protected member _cparts of a client class
751,46,error,no-member:Instance of 'PurePath' has no '_flavour' member
751,67,warning,protected-access:Access to a protected member _flavour of a client class
753,31,warning,protected-access:Access to a protected member _cparts of a client class
756,46,error,no-member:Instance of 'PurePath' has no '_flavour' member
756,67,warning,protected-access:Access to a protected member _flavour of a client class
758,30,warning,protected-access:Access to a protected member _cparts of a client class
761,46,error,no-member:Instance of 'PurePath' has no '_flavour' member
761,67,warning,protected-access:Access to a protected member _flavour of a client class
763,31,warning,protected-access:Access to a protected member _cparts of a client class
790,8,refactor,no-else-return:Unnecessary "else" after "return"
809,8,refactor,no-else-return:Unnecessary "else" after "return"
818,27,error,no-member:Instance of 'PurePath' has no '_flavour' member
819,37,error,no-member:Instance of 'PurePath' has no '_flavour' member
819,56,error,no-member:Instance of 'PurePath' has no '_flavour' member
830,12,error,no-member:Instance of 'PurePath' has no '_flavour' member
870,13,error,no-member:Instance of 'PurePath' has no '_flavour' member
924,19,error,no-member:Instance of 'PurePath' has no '_flavour' member
929,15,error,no-member:Instance of 'PurePath' has no '_flavour' member
935,13,error,no-member:Instance of 'PurePath' has no '_flavour' member
937,31,error,no-member:Instance of 'PurePath' has no '_flavour' member
667,8,warning,attribute-defined-outside-init:Attribute '_drv' defined outside __init__
668,8,warning,attribute-defined-outside-init:Attribute '_root' defined outside __init__
669,8,warning,attribute-defined-outside-init:Attribute '_parts' defined outside __init__
697,12,warning,attribute-defined-outside-init:Attribute '_str' defined outside __init__
730,12,warning,attribute-defined-outside-init:Attribute '_cached_cparts' defined outside __init__
742,12,warning,attribute-defined-outside-init:Attribute '_hash' defined outside __init__
887,12,warning,attribute-defined-outside-init:Attribute '_pparts' defined outside __init__
998,4,warning,arguments-differ:Parameters differ from overridden '__new__' method
1000,12,warning,self-cls-assignment:Invalid assignment to cls in method
1002,15,warning,protected-access:Access to a protected member _flavour of a client class
1005,8,warning,protected-access:Access to a protected member _init of a client class
998,0,warning,unused-argument:Unused argument 'kwargs'
1008,4,warning,arguments-differ:Parameters differ from overridden '_init' method
1014,29,warning,protected-access:Access to a protected member _accessor of a client class
1032,4,refactor,no-self-use:Method could be a function
1035,22,warning,unused-argument:Unused argument 'name'
1062,19,error,no-member:Instance of 'Path' has no '_flavour' member
1062,19,warning,protected-access:Access to a protected member _flavour of a client class
1095,18,error,no-member:Instance of 'Path' has no '_flavour' member
1096,35,error,no-member:Instance of 'Path' has no '_flavour' member
1107,18,error,no-member:Instance of 'Path' has no '_flavour' member
1108,35,error,no-member:Instance of 'Path' has no '_flavour' member
1130,8,warning,protected-access:Access to a protected member _init of a client class
1141,12,error,no-member:Instance of 'Path' has no '_flavour' member
1148,17,error,no-member:Instance of 'Path' has no '_flavour' member
1150,8,warning,protected-access:Access to a protected member _init of a client class
1174,4,refactor,too-many-arguments:Too many arguments (6/5)
1440,22,error,no-member:Instance of 'Path' has no '_flavour' member
1030,8,warning,attribute-defined-outside-init:Attribute '_closed' defined outside __init__
984,0,refactor,too-many-public-methods:Too many public methods (35/20)
10,0,warning,unused-import:Unused contextmanager imported from contextlib
5,0,convention,wrong-import-order:standard import "import os" should be placed before "import ntpath"
7,0,convention,wrong-import-order:standard import "import re" should be placed before "import ntpath"
8,0,convention,wrong-import-order:standard import "import sys" should be placed before "import ntpath"
9,0,convention,wrong-import-order:standard import "from collections import Sequence" should be placed before "import ntpath"
10,0,convention,wrong-import-order:standard import "from contextlib import contextmanager" should be placed before "import ntpath"
11,0,convention,wrong-import-order:standard import "from errno import EINVAL, ENOENT, ENOTDIR" should be placed before "import ntpath"
12,0,convention,wrong-import-order:standard import "from operator import attrgetter" should be placed before "import ntpath"
13,0,convention,wrong-import-order:standard import "from stat import S_ISDIR, S_ISLNK, S_ISREG, S_ISSOCK, S_ISBLK, S_ISCHR, S_ISFIFO" should be placed before "import ntpath"
14,0,convention,wrong-import-order:standard import "from urllib.parse import quote_from_bytes as urlquote_from_bytes" should be placed before "import ntpath"

------------------------------------------------------------------
Your code has been rated at 6.09/10 (previous run: 6.08/10, +0.01)

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging)
Error Python Extension: 2019-11-14 15:40:50: Python Extension: displayDiscoverStatus [Error: ERROR: usage: run_adapter.py [options] [file_or_dir] [file_or_dir] [...]run_adapter.py: error: argument --env: invalid choice: 'cloud' (choose from 'qa', 'staging', 'develop', 'production', 'master', 'local', 'test')Traceback (most recent call last):  File "/Users/user/.vscode/extensions/ms-python.python-2019.10.44104/pythonFiles/testing_tools/run_adapter.py", line 18, in <module>    main(tool, cmd, subargs, toolargs)  File "/Users/user/.vscode/extensions/ms-python.python-2019.10.44104/pythonFiles/testing_tools/adapter/__main__.py", line 90, in main    parents, result = run(toolargs, **subargs)  File "/Users/user/.vscode/extensions/ms-python.python-2019.10.44104/pythonFiles/testing_tools/adapter/pytest/_discovery.py", line 35, in discover    raise Exception('pytest discovery failed (exit code {})'.format(ec))Exception: pytest discovery failed (exit code 4)	at ChildProcess.<anonymous> (/Users/user/.vscode/extensions/ms-python.python-2019.10.44104/out/client/extension.js:9:37710)	at Object.onceWrapper (events.js:288:20)	at ChildProcess.emit (events.js:200:13)	at maybeClose (internal/child_process.js:1021:16)	at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)]
t.log @ console.ts:137
$logExtensionHostMessage @ mainThreadConsole.ts:39
_doInvokeHandler @ rpcProtocol.ts:398
_invokeHandler @ rpcProtocol.ts:383
_receiveRequest @ rpcProtocol.ts:299
_receiveOneMessage @ rpcProtocol.ts:226
(anonymous) @ rpcProtocol.ts:101
fire @ event.ts:580
fire @ ipc.net.ts:453
_receiveMessage @ ipc.net.ts:733
(anonymous) @ ipc.net.ts:592
fire @ event.ts:580
acceptChunk @ ipc.net.ts:239
(anonymous) @ ipc.net.ts:200
t @ ipc.net.ts:28
emit @ events.js:200
addChunk @ _stream_readable.js:294
readableAddChunk @ _stream_readable.js:275
Readable.push @ _stream_readable.js:210
onStreamRead @ internal/stream_base_commons.js:166

damn it's in new version pytest, issue, sorry for disturbing
Traceback (most recent call last):
  File ".../.venv/bin/pytest", line 8, in <module>
    sys.exit(main())
  File ".../.venv/lib/python3.6/site-packages/_pytest/config/__init__.py", line 71, in main
    config = _prepareconfig(args, plugins)
  File ".../.venv/lib/python3.6/site-packages/_pytest/config/__init__.py", line 216, in _prepareconfig
    pluginmanager=pluginmanager, args=args
  File ".../.venv/lib/python3.6/site-packages/pluggy/hooks.py", line 286, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File ".../.venv/lib/python3.6/site-packages/pluggy/manager.py", line 92, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File ".../.venv/lib/python3.6/site-packages/pluggy/manager.py", line 86, in <lambda>
    firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
  File ".../.venv/lib/python3.6/site-packages/pluggy/callers.py", line 203, in _multicall
    gen.send(outcome)
  File ".../.venv/lib/python3.6/site-packages/_pytest/helpconfig.py", line 89, in pytest_cmdline_parse
    config = outcome.get_result()
  File ".../.venv/lib/python3.6/site-packages/pluggy/callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File ".../.venv/lib/python3.6/site-packages/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File ".../.venv/lib/python3.6/site-packages/_pytest/config/__init__.py", line 733, in pytest_cmdline_parse
    self.parse(args)
  File ".../.venv/lib/python3.6/site-packages/_pytest/config/__init__.py", line 946, in parse
    args, self.option, namespace=self.option
  File ".../.venv/lib/python3.6/site-packages/_pytest/config/argparsing.py", line 109, in parse_setoption
    parsedoption = self.parse(args, namespace=namespace)
  File ".../.venv/lib/python3.6/site-packages/_pytest/config/argparsing.py", line 83, in parse
    self.optparser = self._getparser()
  File ".../.venv/lib/python3.6/site-packages/_pytest/config/argparsing.py", line 100, in _getparser
    arggroup.add_argument(*n, **a)
  File ".../.pyenv/versions/3.6.9/Python.framework/Versions/3.6/lib/python3.6/argparse.py", line 1352, in add_argument
    return self._add_action(action)
  File ".../.pyenv/versions/3.6.9/Python.framework/Versions/3.6/lib/python3.6/argparse.py", line 1556, in _add_action
    action = super(_ArgumentGroup, self)._add_action(action)
  File ".../.pyenv/versions/3.6.9/Python.framework/Versions/3.6/lib/python3.6/argparse.py", line 1366, in _add_action
    self._check_conflict(action)
  File ".../.pyenv/versions/3.6.9/Python.framework/Versions/3.6/lib/python3.6/argparse.py", line 1505, in _check_conflict
    conflict_handler(action, confl_optionals)
  File ".../.pyenv/versions/3.6.9/Python.framework/Versions/3.6/lib/python3.6/argparse.py", line 1514, in _handle_conflict_error
    raise ArgumentError(action, message % conflict_string)
argparse.ArgumentError: argument --env: conflicting option string: --env


chore(notifications): add new analytics events (part 1)

Description

When the Notification Center is opened, a new analytics event notification_center_opened is dispatched, with a number of notifications currently visible to the user (notificationsCount field).

Analytics events for bundled notifications (e.g. supercharge) are dispatched with a new type bundled_notification. What was formerly in the notificationType field is now placed in the notificationId field to match remote notifications.

Impression analytics event with notificationPosition on screen is dispatched when a notification becomes visible for the first time. Notification is considered visible when it fully fits into the viewport within 0.5 seconds (to avoid dispatching impressions while user just scrolls really fast).

Test plan

The first two changes are ensured by enhanced unit tests.
For the third change I was not able to make a unit test, because the event handler onViewableItemsChanged does not fire during test execution for some reason. I've opened the issue in RN repo seeking a feedback. Tested manually on iOS and Android emulators.

Related issues

Partially fixes RET-801

Backwards compatibility
Not compatible, because it alters the fieldset of analytics events for bundled notifications.

Thank you for suggesting it.each! I am tempted to try it out, as you have noticed some repetition in the tests I added. However, this would change the way the tests are organized, from grouping them by notification type to grouping them by test type. Since the notifications are not completely generic, and many of them have their peculiarities, I would prefer to keep them grouped by notification type for now.


Fixing encoding in xml export

Fixing encoding in xml export, specifying utf-8.

Should fix this issue https://github.com/intezer/analyze-community-ghidra-plugin/issues/37


Electric heaters should be imported from ETE

These two electric technologies need to be added to the list of imported technologies.

households_water_heater_resistive_electricity
households_space_heater_electricity

This is relevant for https://github.com/quintel/etmoses/issues/626

Can we close this @grdw?


[BEAM-10093] ZetaSql Nexmark variant

Copy/paste/modify job. Split the test classes to make it easy to run just one of them. After this we can add a Jenkins run to report benchmarks.

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Choose reviewer(s) and mention them in a comment (R: @username).
[ ] Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
[ ] Update CHANGES.md with noteworthy changes.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

CC @tysonjh discussed this one offline today

Tests passed. Fixing checkstyle.

Timed out in a Flink test: https://builds.apache.org/job/beam_PreCommit_Java_Commit/11590/
May or may not share a cause with https://issues.apache.org/jira/browse/BEAM-9843

run java precommit

Flake in direct runner ParDoLifecycleTest
https://builds.apache.org/job/beam_PreCommit_Java_Phrase/2267/testReport/junit/org.apache.beam.sdk.transforms/ParDoLifecycleTest/testTeardownCalledAfterExceptionInStartBundleStateful/

run java precommit

Seems this is already known in https://issues.apache.org/jira/browse/BEAM-8101

PTAL.

Modified each SqlQuery2, etc, class to have just the amount of variation necessary
Made each test class run as @Enclosed with an inner class for each dialect. I don't love this use of inheritance, but it seems to be how JUnit wants things. It has a clearer test signal than using @Parameterized across the dialects, and allows separate @Ignore for broken/unsupported features.

Did not do:

Jenkins job to publish benchmarks; planning that as a followup
Any other refactor to make suites more manageable


test add doris and sqlserver jdbc catalog test case

Proposed changes
Issue Number: close #xxx

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall

run buildall

run p0

run buildall


how to use the test data to draw a missrate picture?

Refer to Alignedried_demo.py. Please change the image path by yourself.


Set an attribute to execute the query on

Hello, i really like this project for being useful, but there is something i've been stuck on and it's been a bit confusing too.
The current situation is: i connect to my collection, i make the query with range, coords and an attribute "name" to search on. What i get is an error from Firebase asking for me to create an index. The index currently sets an attribute g in ascending order to make the index. It took me some time to assume that this is the attribute used for the query (because i am really dumb reading the documentation sometimes, i'm sorry (also about the d. attribute >-<) :/)
The problem comes when i need it to query the coordinates in the documents with an attribute called coordenadas (portuguese for "coordinates").
How would i be able to use a custom attribute to query the coordinates on?
If this feature is not existent yet, i think it would be something really useful to implement.
thank you for the attention =^-^=

When you encode a document you are able to set the field in your document for the location. So instead of coordinates you can tell geofirestore to use coordenadas. However for the query you don't need that, as we query on the g field.
I guess if your question is how do you encode a document into geofirestore using a custom field like coordenadas it would look like this....
geoFirestore.add({ coordenadas: new firebase.firestore.GeoPoint(37.79, -122.41)}, 'coordenadas');

Let me know if that helps, or answers the question!

Thank you, that should help ^-^
(sorry for the late reply though)


While compiling CUDA code, following error is given.  "error: expression must have integral or enum type" Why is this error? what are the possible mistakes that I made???

@chanaka611 we've had problems with CUDA, still unresolved. See if anything in #52 helps you fix or diagnose the issue.