Clay cleanup

I'm a programmer today because a man at my church gave me a copy of Linux on a CD when I was a kid and told me to learn C.  He also told me a story of when he was a kid.  There was a small anthill where he was playing in his backyard.  He tried destroying the anthill with a stick, but it kept coming back.  Rather than figure out exactly how to remove this anthill surgically, he poured a flammable liquid (gasoline?  I forget) in the anthill.  He figured he'd pour until it was full, then light it.  But it took a lot longer than he thought, and he poured in a lot of gasoline.  Finally, he lit it, and he says it blew up much of his backyard.  He didn't have ant problems for a long time.
This is the approach I've taken with Clay, both in #1169 and here.  There was some bug in +wake, but that part of the code was the most impenetrable part of clay.  The commit/merge flow was more fragile, but at least you could tell what it was doing.  But +wake was a 200 line impenetrable, stateful function made worse by being almost duplicated in +start-request, except that one had some small but important differences.  Rather that try to find the bug, I re-wrote both of these into a single pure function, +try-fill-sub, which is still long and somewhat complex, but it's stateless, drastically more readable than it was, and commented every few lines.  As a bonus, the bug is gone.  I don't know exactly what the bug was, but there were three or four I noticed and fixed as I was refactoring it.
All that to say, I was hoping this would be a small PR that showed a clean difference between the inside-out state machines of old clay for validating foreign updates and their monadic equivalents.  But alas, it's a 1000 lines.  Should be a lot easier to follow than the last PR, though.  Most of the monadifying is in two commits.  This is foreign simple requests and full updates: https://github.com/urbit/arvo/commit/80e22ab7c21e47dbbbb1ff1e9ec86d5fd895c749, and this is mounting a desk: https://github.com/urbit/arvo/commit/5a1cccdcea0e8fe3d8cec03049640c3b7bdaa7cb
In summary, this contains four changes:

Convert the "foreign requests" flow to the clad transaction monad.  Foreign requests are when we ask for a particular piece of information from another ship's clay, and we need to validate the result.
Convert the "foreign updates" flow to the clad transaction monad.  Foreign updates are when we ask for the entire state of a foreign desk (and validate it).  This is needed for merging, for example.
Convert the "mount" flow to the clad transaction monad.  This involves a round-trip to ford to serialize all our files to the %mime mark.  Because this populates the mime cache, this has to have a lock on the desk state (dome), so we put it in the same queue as committing and merging.  This should make our sync with unix more robust.
Refactor +wake and +start-request to share code, be more readable, and be simpler.  In particular, we now use the same code to check if we can fill a subscription when we first receive it as when we try to update it later on.  No monads, here, just good old-fashioned renaming and refactoring.  Found several bugs; killed them.

This puts a bow on the changes I wanted to make to Clay in this pass, so I'll move on to Jael next.  I'm much more confident in Clay than I was before, and I wouldn't be afraid to hack on it now.  One change I would love is change the foreign update flow to only send the data we don't already have.  Right now, it has a conservative heuristic for guessing whether the subscriber has the blobs referenced in the update, and it sends them if it doesn't know.  But there's plenty of real-world situations where the subscribee doesn't know that the subscriber already has the blobs.  It'd be nice to have an additional round-trip, so we first send just the hashes of the data, and the susbscriber asks for the data of whichever of the hashes it doesn't have yet.

Thanks, fixed those three and also a bug where I was cancelling some ducts more than once when a ship sinks.

      $d  ~|  %totally-temporary-error-please-replace-me  !!
      $p  ~|  %requesting-foreign-permissions-is-invalid  !!
      $t  ~|  %requesting-foreign-directory-is-vaporware  !!
      $u  ~|  %prolly-poor-idea-to-get-rang-over-network  !!
      $v  ~|  %weird-shouldnt-get-v-request-from-network  !!
      $z  ~|  %its-prolly-not-reasonable-to-request-ankh  !!

satisfying

Now that the foreign-update code is monadified, will it work if we reload the vane in the middle of a foreign-update transaction? I'm wondering if there are any edge cases where we've received some Ames message that we won't receive again, and if we throw away our partially done foreign update after receiving the message, we'll lose the update forever.

If you don't put in any special +load handling, this will currently just let the transaction complete (so you'll keep a pointer to the old kernel until it's done).  You're right, though, that we should save the ames messages of the currently running transaction so that we can restart it if needed.  This also applies to the foreign-request flow.
I guess the general principle is "if you need to be able to restart a transaction, you must save all the initial arguments to the transaction".  In this case, for %info, %merg, and %mont we save the whole task.  For foreign-update and foreign-request it's probably better to save [index=@ud (unit rand)] from deserializing the ames message.  If you have a queue of requests, one way to implement this is to not remove from the queue until the transaction is completed.


ignore like .gitignore in GithubLoader

The current GithubLoader implementation only ignores specific files with exact match.
This PR uses .gitignore style file ignoring, with which you can ignore folders and all files with the same(.gitignore = .gitignore in all subfolders, not only root path)
Removes
https://github.com/hwchase17/langchainjs/pull/1177
Adds
Uses the https://www.npmjs.com/package/ignore package to ignore Github files.
User can input array of .gitignore file lines
Note
I am not an expert with this project layout, and didn't have time to run tests. However, I implemented this locally(outside of langchain project) and it worked fine. But maybe I missed something when adding these lines in to the PR.
This means this is a general idea how to implement it. It should be tested

Hey, thanks for this PR! I was looking out for this feature but turns out it's not implemented yet.
My 2 cents:

Relocate the ignore package:
Adjust the dependency type:

Thanks for the information! I made these changes

Ah unfortunately given that this loader is exported from the main langchain/document_loaders file, adding ignore as a dependency here would require us to add it as a core dependency. If we added at as a peer dependency, everyone currently using this would break.
We have a few options:

Treat the old GitHub loader as deprecated and create a new one that requires ignore as a peer dependency
Add ignore as a core dependency
Find a way to implement this without a dependency

All are not ideal but I think option 2 is actually our best bet since it's 0 dep and quite popular - let me think a bit more though.

After discussion with @nfcampos, we'll merge this as is and expect folks to add the dependency when upgrading versions.
Thank you @tonisives! We'll merge tomorrow.


[BUG] inner join fails with Column size cannot be negative

Describe the bug
This same join used to work on older 0.3 versions and it works fine on the CPU side, seems like something recent broke this. This is running on databricks.  I have not yet tried coming up with small way to reproduce.
20/11/13 18:53:17 ERROR Executor: Exception in task 0.2 in stage 21.0 (TID 574)
ai.rapids.cudf.CudfException: cuDF failure at: /ansible-managed/jenkins-slave/slave2/workspace/spark/cudf16_nightly/cpp/src/column/column_view.cpp:41: Column size cannot be negative.
	at ai.rapids.cudf.Table.innerJoin(Native Method)
	at ai.rapids.cudf.Table.access$3500(Table.java:36)
	at ai.rapids.cudf.Table$TableOperation.innerJoin(Table.java:2105)
	at com.nvidia.spark.rapids.shims.spark300db.GpuHashJoin.doJoinLeftRight(GpuHashJoin.scala:310)
	at com.nvidia.spark.rapids.shims.spark300db.GpuHashJoin.com$nvidia$spark$rapids$shims$spark300db$GpuHashJoin$$doJoin(GpuHashJoin.scala:277)
	at com.nvidia.spark.rapids.shims.spark300db.GpuHashJoin$$anon$1.hasNext(GpuHashJoin.scala:226)
	at scala.collection.Iterator$$anon$10.hasNext(Iterator.scala:458)
	at com.nvidia.spark.rapids.GpuHashAggregateExec.$anonfun$doExecuteColumnar$1(aggregate.scala:420)
	at org.apache.spark.rdd.RDD.$anonfun$mapPartitions$2(RDD.scala:844)
	at org.apache.spark.rdd.RDD.$anonfun$mapPartitions$2$adapted(RDD.scala:844)
	at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:60)
	at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:356)
	at org.apache.spark.rdd.RDD.iterator(RDD.scala:320)
	at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:60)
	at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:356)
	at org.apache.spark.rdd.RDD.iterator(RDD.scala:320)
	at org.apache.spark.shuffle.ShuffleWriteProcessor.write(ShuffleWriteProcessor.scala:59)
	at org.apache.spark.scheduler.ShuffleMapTask.runTask(ShuffleMapTask.scala:99)
	at org.apache.spark.scheduler.ShuffleMapTask.runTask(ShuffleMapTask.scala:52)
	at org.apache.spark.scheduler.Task.doRunTask(Task.scala:144)
	at org.apache.spark.scheduler.Task.run(Task.scala:117)
	at org.apache.spark.executor.Executor$TaskRunner.$anonfun$run$9(Executor.scala:639)
	at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:1559)
	at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:642)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

I went back to the 0.2 release where this query worked the last time I ran it and its not failing but with out of memory. Its possible the data changed. The error from 0.2 is:
java.lang.OutOfMemoryError: Could not allocate native memory: std::bad_alloc: RMM failure at: /usr/local/rapids/include/rmm/mr/device/pool_memory_resource.hpp:167: Maximum pool size exceeded
	at ai.rapids.cudf.Table.innerJoin(Native Method)
	at ai.rapids.cudf.Table.access$3200(Table.java:35)
	at ai.rapids.cudf.Table$TableOperation.innerJoin(Table.java:1986)
	at com.nvidia.spark.rapids.shims.spark300db.GpuHashJoin.doJoinLeftRight(GpuHashJoin.scala:290)

The underlying error in cudf is originating from a lack of overflow checking in cudf gather.  Filed https://github.com/rapidsai/cudf/issues/6801

this is essentially just an out of memory, reran and confirmed proper error coming out.
total size of output strings is too large for a cudf column

this is essentially just an out of memory, reran and confirmed proper error coming out.
total size of output strings is too large for a cudf column


Trying to read report

var devices = HidLibrary.HidDevices.Enumerate(1848);
device = devices.FirstOrDefault();
device.OpenDevice();
device.ReadReport(ReadReportCallback);

Gives me System.PlatformNotSupportedException: 'Operation is not supported on this platform.'
I'm on win 10 running .Net 5

I used the source and then it's something else :)

I used the source and then it's something else :)

Hi, i got the same issue, can you share how you fixed it?

I hardly remember but I think I used the source from git rather than the nuget package

Nah.. it didn`t worked.. do you rewrite the BeginInvoke() method, could you check?


Freeze with tkfiledialog

Required Info

Camera Model
{  D400 }

Firmware Version
(Open RealSense Viewer --> Click info)

Operating System & Version
{Win (10)

Platform
PC

SDK Version
{ legacy / 2.. }

Language
{python }

Issue Description
Hi, my project is to take road survey images with D435 and gps
and I created a program with tkinter to process, output jpeg, txt, and shapefile
when I import library arcpy, everything works fine.
but if I didn't import arcpy, the tkfiledialog will freeze
since now my plan is to use pyinstaller to create exe for others, arcpy is not available and no longer needed, and here raised the issue
from tkinter import *
from tkinter import filedialog
import pyrealsense2

root = Tk()
file = filedialog.askdirectory()

this will make the window no response.
I can see that with tkinter is not a common option with rs, or which GUI is tested and would function well?

This could be similar with #4856. Will further check internally, and see if the community can help this.

another information:
the funciton I use is to create jpg from the bag with multiprocessing.Pool
I can use the tkfiledialog when I import it in the function.
Ex:
import tkfiledialog
import multiprocessing as mp

def rs_func():
    import pyrealsense2 as rs

if __name__ =='__main__':
    p = mp.Pool()
    tkfiledialoge()
    p.map()

as line 161-217 in my application
script

Hi @soarwing52,
It's good to see your have the workaround to resolve this issue.


pgp: additional test

Codecov Report

Merging #24 into master will increase coverage by 0.15%.
The diff coverage is 100%.

@@           Coverage Diff           @@
##           master   #24      +/-   ##
=======================================
+ Coverage   49.84%   50%   +0.15%
=======================================
  Files          28    28
  Lines         313   314       +1
  Branches       59    59
=======================================
+ Hits          156   157       +1
  Misses        131   131
  Partials       26    26

Impacted Files
Coverage Δ

src/pgp/verify.js
90.47% <100%> (+0.47%)
:arrow_up:

Continue to review full report at Codecov.

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


Mac OS Lion (10.7): install package not working and pip issue

I've updated system to lion gold master. I had couchapp installed via installer for Mac OS X. Now couchapp not working at all. On execution command in console "couchapp" nothing happens. I've reinstalled it again via installer, but I had same result. I've tried "env" stuff too.

I've tried to install it via "pip". It have been installed, but still I cannot run it via "couchapp" command in console. But it worked, if I type "/usr/local/bin/couchapp". I know, I have to create symlink, but I think it should be made automatically.

Anyway, thanks for great tool.

fixed.


Add workflow executor unit tests

Currently the unit tests does not compatible with Yaml 2.0. Need to make it work again

Closing v1 issues.


Failing to sign PSBT: Input script doesn't have pubKey:

I have created a funded P2WSH script, which is an HTLC. I now want to create a PSBT which will be signed by another wallet to withdraw the funds.
The problem is that the PSBT signing is throwing the following error: Input script doesn't have pubKey. I am not sure why, or how to add this pubkey to the PSBT correctly.
The following is a details breakdown of the steps I am taking to create, fund and (failing to) redeem the HTLC.
Address from xverse (ordinals): tb1pnz86gezf5dzmja9q86z5agnmgjj29f00nxjj9jx0fsss6kkyh03sjkqhpd
Public Key: 59fff87c1bb3f75d34ea9d1588b72d0df43540695671c7a5ad3ec6a71d44bd79

Script to create the HTLC:
import bitcoin from 'bitcoinjs-lib';
import crypto from 'crypto';

function createHTLC(secret, lockduration, recipientPubKey, senderPubKey, networkType) {
    const network = networkType === 'testnet' ? bitcoin.networks.testnet : bitcoin.networks.bitcoin;
    const secretHash = crypto.createHash('sha256').update(Buffer.from(secret, 'utf-8')).digest();

const recipientHash = bitcoin.crypto.hash160(Buffer.from(recipientPubKey, 'hex'));
const senderHash = bitcoin.crypto.hash160(Buffer.from(senderPubKey, 'hex'));

const redeemScript = bitcoin.script.compile([
    bitcoin.opcodes.OP_IF,
    bitcoin.opcodes.OP_SHA256,
    secretHash,
    bitcoin.opcodes.OP_EQUALVERIFY,
    bitcoin.opcodes.OP_DUP,
    bitcoin.opcodes.OP_HASH160,
    recipientHash, // Hashed recipient public key
    bitcoin.opcodes.OP_ELSE,
    bitcoin.script.number.encode(lockduration),
    bitcoin.opcodes.OP_CHECKLOCKTIMEVERIFY,
    bitcoin.opcodes.OP_DROP,
    bitcoin.opcodes.OP_DUP,
    bitcoin.opcodes.OP_HASH160,
    senderHash, // Hashed sender public key
    bitcoin.opcodes.OP_ENDIF,
    bitcoin.opcodes.OP_EQUALVERIFY,
    bitcoin.opcodes.OP_CHECKSIG,
]);

// Calculate the P2WSH address and scriptPubKey
const redeemScriptHash = bitcoin.crypto.sha256(redeemScript);
const scriptPubKey = bitcoin.script.compile([
    bitcoin.opcodes.OP_0,  // Witness version 0
    redeemScriptHash
]);

const p2wshAddress = bitcoin.payments.p2wsh({
    redeem: { output: redeemScript, network },
    network
}).address;

console.log('\nCreated an HTLC Script!');
console.log('-------------------------------------------------');
console.log('P2WSH Bitcoin Deposit Address for HTLC:', p2wshAddress);
console.log('Witness Script Hex:', redeemScript.toString('hex'));
console.log('Redeem Block Number:', lockduration);
console.log('Secret (for spending):', secret);
console.log('SHA256(Secret) (for HTLC creation):', secretHash.toString('hex'));
console.log('ScriptPubKey Hex:', scriptPubKey.toString('hex'));
console.log('-------------------------------------------------');

// To fund the HTLC, send BTC to the p2wsh.address
// Redeeming the HTLC would involve creating a transaction that spends from this address
// using the provided witnessScript, which would be included in the transaction's witness field
}

// Example usage
createHTLC(
    'mysecret',
    1, // locktime in blocks
    "59fff87c1bb3f75d34ea9d1588b72d0df43540695671c7a5ad3ec6a71d44bd79",
    "59fff87c1bb3f75d34ea9d1588b72d0df43540695671c7a5ad3ec6a71d44bd79",
    'testnet'
);

This successfully creates the P2WSH transaction and gives the following output to the screen
Created an HTLC Script!
-------------------------------------------------
P2WSH Bitcoin Deposit Address for HTLC: tb1q5cyw034kcvsp6fsfx9skeq93vhvuqghmjc9y8xdhjll8m9thrn9q5mv0nr
Witness Script Hex: 63a820652c7dc687d98c9889304ed2e408c74b611e86a40caa51c4b43f1dd5913c5cd08876a914e399056c4ca63571aca44fc2d11b3fdac69a37e06751b17576a914e399056c4ca63571aca44fc2d11b3fdac69a37e06888ac
Redeem Block Number: 1
Secret (for spending): mysecret
SHA256(Secret) (for HTLC creation): 652c7dc687d98c9889304ed2e408c74b611e86a40caa51c4b43f1dd5913c5cd0
ScriptPubKey Hex: 0020a608e7c6b6c3201d260931616c80b165d9c022fb960a4399b797fe7d95771cca
-------------------------------------------------

Then I fund the script via xverse by sending bitcoin directly to
tb1q5cyw034kcvsp6fsfx9skeq93vhvuqghmjc9y8xdhjll8m9thrn9q5mv0nr
https://mempool.space/testnet/tx/be9cc0e300d1c01b7fdbeeff1c99acc0fb8a7d9e8d025547b7bfc9635dedcbb3

The ScriptPubKey on mempool.space seems to match mine
0020a608e7c6b6c3201d260931616c80b165d9c022fb960a4399b797fe7d95771cca
Then it's time to create the PSBT. I can't immediately see any issues with how I am creating this PSBT. Do I need to add the public key somewhere?:
import * as bitcoin from 'bitcoinjs-lib';
import crypto from 'crypto';
import * as tinysecp256k1 from 'tiny-secp256k1';

// Initialize ECC library
import * as bitcoinjs from "bitcoinjs-lib";
import * as ecc from "tiny-secp256k1";

bitcoin.initEccLib(ecc);

function createSpendPSBT(secret, lockduration, scriptPubKeyHex, htlcTxId, htlcOutputIndex, refundAmount, recipientPubKey, senderPubKey, recipientAddress, networkType) {
    const network = networkType === 'testnet' ? bitcoin.networks.testnet : bitcoin.networks.bitcoin;

    const secretHash = crypto.createHash('sha256').update(Buffer.from(secret, 'utf-8')).digest();
    // Recreate the HTLC script using the provided secret
    const recipientHash = bitcoin.crypto.hash160(Buffer.from(recipientPubKey, 'hex'));
    const senderHash = bitcoin.crypto.hash160(Buffer.from(senderPubKey, 'hex'));

    const redeemScript = bitcoin.script.compile([
        bitcoin.opcodes.OP_IF,
        bitcoin.opcodes.OP_SHA256,
        secretHash,
        bitcoin.opcodes.OP_EQUALVERIFY,
        bitcoin.opcodes.OP_DUP,
        bitcoin.opcodes.OP_HASH160,
        recipientHash, // Hashed recipient public key
        bitcoin.opcodes.OP_ELSE,
        bitcoin.script.number.encode(lockduration),
        bitcoin.opcodes.OP_CHECKLOCKTIMEVERIFY,
        bitcoin.opcodes.OP_DROP,
        bitcoin.opcodes.OP_DUP,
        bitcoin.opcodes.OP_HASH160,
        senderHash, // Hashed sender public key
        bitcoin.opcodes.OP_ENDIF,
        bitcoin.opcodes.OP_EQUALVERIFY,
        bitcoin.opcodes.OP_CHECKSIG,
    ]);

    const scriptPubKey = Buffer.from(scriptPubKeyHex, 'hex');

    console.log("Creating PSBT");

    // Create a PSBT
    const psbt = new bitcoin.Psbt({ network: network })
        .addInput({
            hash: htlcTxId,
            index: htlcOutputIndex,
            sequence: 0xfffffffe, // Necessary for OP_CHECKLOCKTIMEVERIFY
            witnessUtxo: {
                script: scriptPubKey,
                value: refundAmount,
            },
            witnessScript: redeemScript,
        })
        .addOutput({
            address: recipientAddress,
            value: refundAmount - 1000, // Subtract a nominal fee
        })
        .setVersion(2)
        .setLocktime(lockduration);

    console.log("PSBT to be signed:", psbt.toBase64());
}

// Example usage (Fill in the actual values)
createSpendPSBT(
    "mysecret",
    0,
    "0020a608e7c6b6c3201d260931616c80b165d9c022fb960a4399b797fe7d95771cca",
    "be9cc0e300d1c01b7fdbeeff1c99acc0fb8a7d9e8d025547b7bfc9635dedcbb3",
    0,
    1000,
    "59fff87c1bb3f75d34ea9d1588b72d0df43540695671c7a5ad3ec6a71d44bd79",
    "59fff87c1bb3f75d34ea9d1588b72d0df43540695671c7a5ad3ec6a71d44bd79",
    "tb1pnz86gezf5dzmja9q86z5agnmgjj29f00nxjj9jx0fsss6kkyh03sjkqhpd",
    "testnet",
);
//createSpendPSBT(secret, lockduration, scriptPubKey, htlcTxId, htlcOutputIndex, refundAmount, recipientPubKey, senderPubKey, recipientAddress, networkType)

This gives me the following PSBT:
cHNidP8BAF4CAAAAAbPL7V1jyb+3R1UCjZ59ivvArJkc/+7bfxvA0QDjwJy+AAAAAAD+////AQAAAAAAAAAAIlEgmI+kZEmjRbl0oD6FTqJ7RKSipe+ZpSLIz0whDVrEu+MAAAAAAAEBK+gDAAAAAAAAIgAgpgjnxrbDIB0mCTFhbICxZdnAIvuWCkOZt5f+fZV3HMoBBVljqCBlLH3Gh9mMmIkwTtLkCMdLYR6GpAyqUcS0Px3VkTxc0Ih2qRTjmQVsTKY1caykT8LRGz/axpo34GcAsXV2qRTjmQVsTKY1caykT8LRGz/axpo34GiIrAAA
When I decode it, so I can inspect the contents, I get the following
{
  "tx": {
    "txid": "a1eaefe490f5d3be11fbd6a5afeffcff20a9e92cfde3363484168c9f5769c57a",
    "hash": "a1eaefe490f5d3be11fbd6a5afeffcff20a9e92cfde3363484168c9f5769c57a",
    "version": 2,
    "size": 94,
    "vsize": 94,
    "weight": 376,
    "locktime": 0,
    "vin": [
      {
        "txid": "be9cc0e300d1c01b7fdbeeff1c99acc0fb8a7d9e8d025547b7bfc9635dedcbb3",
        "vout": 0,
        "scriptSig": {
          "asm": "",
          "hex": ""
        },
        "sequence":<PHONE_NUMBER>
      }
    ],
    "vout": [
      {
        "value": 0.00000000,
        "n": 0,
        "scriptPubKey": {
          "asm": "1 988fa46449a345b974a03e854ea27b44a4a2a5ef99a522c8cf4c210d5ac4bbe3",
          "desc": "rawtr(988fa46449a345b974a03e854ea27b44a4a2a5ef99a522c8cf4c210d5ac4bbe3)#4xpnet5r",
          "hex": "5120988fa46449a345b974a03e854ea27b44a4a2a5ef99a522c8cf4c210d5ac4bbe3",
          "address": "tb1pnz86gezf5dzmja9q86z5agnmgjj29f00nxjj9jx0fsss6kkyh03sjkqhpd",
          "type": "witness_v1_taproot"
        }
      }
    ]
  },
  "global_xpubs": [
  ],
  "psbt_version": 0,
  "proprietary": [
  ],
  "unknown": {
  },
  "inputs": [
    {
      "witness_utxo": {
        "amount": 0.00001000,
        "scriptPubKey": {
          "asm": "0 a608e7c6b6c3201d260931616c80b165d9c022fb960a4399b797fe7d95771cca",
          "desc": "addr(tb1q5cyw034kcvsp6fsfx9skeq93vhvuqghmjc9y8xdhjll8m9thrn9q5mv0nr)#wjcfmgw8",
          "hex": "0020a608e7c6b6c3201d260931616c80b165d9c022fb960a4399b797fe7d95771cca",
          "address": "tb1q5cyw034kcvsp6fsfx9skeq93vhvuqghmjc9y8xdhjll8m9thrn9q5mv0nr",
          "type": "witness_v0_scripthash"
        }
      },
      "witness_script": {
        "asm": "OP_IF OP_SHA256 652c7dc687d98c9889304ed2e408c74b611e86a40caa51c4b43f1dd5913c5cd0 OP_EQUALVERIFY OP_DUP OP_HASH160 e399056c4ca63571aca44fc2d11b3fdac69a37e0 OP_ELSE 0 OP_CHECKLOCKTIMEVERIFY OP_DROP OP_DUP OP_HASH160 e399056c4ca63571aca44fc2d11b3fdac69a37e0 OP_ENDIF OP_EQUALVERIFY OP_CHECKSIG",
        "hex": "63a820652c7dc687d98c9889304ed2e408c74b611e86a40caa51c4b43f1dd5913c5cd08876a914e399056c4ca63571aca44fc2d11b3fdac69a37e06700b17576a914e399056c4ca63571aca44fc2d11b3fdac69a37e06888ac",
        "type": "nonstandard"
      }
    }
  ],
  "outputs": [
    {
    }
  ],
  "fee": 0.00001000
}

When I look at the inputs part of the PSBT, I can see that there is some input in there with my HTLC funds, and a scriptPubKey. Is this not the public key that the error is complaining doesn't exist?
From there I tried to sign it anyway using sats-connect:
const signPsbtOptions = {
      payload: {
        network: {
          type: 'Testnet' // Change to 'Regtest' or 'Mainnet' as necessary
        },
        psbtBase64: `cHNidP8BAF4CAAAAAbPL7V1jyb+3R1UCjZ59ivvArJkc/+7bfxvA0QDjwJy+AAAAAAD+////AQAAAAAAAAAAIlEgmI+kZEmjRbl0oD6FTqJ7RKSipe+ZpSLIz0whDVrEu+MAAAAAAAEBK+gDAAAAAAAAIgAgpgjnxrbDIB0mCTFhbICxZdnAIvuWCkOZt5f+fZV3HMoBBVljqCBlLH3Gh9mMmIkwTtLkCMdLYR6GpAyqUcS0Px3VkTxc0Ih2qRTjmQVsTKY1caykT8LRGz/axpo34GcAsXV2qRTjmQVsTKY1caykT8LRGz/axpo34GiIrAAA`,
        broadcast: false, // Set to true if you want to broadcast after signing
        inputsToSign: [
            {
                address: "tb1pnz86gezf5dzmja9q86z5agnmgjj29f00nxjj9jx0fsss6kkyh03sjkqhpd", //should this be the address of signer or the address of the input?
                signingIndexes: [0] // Assuming you want to sign the first input
            }
        ],
      },
      onFinish: (response) => {
        console.log('Signed PSBT:', response.psbtBase64);
        // Here, you could add additional code to handle the signed PSBT
      },
      onCancel: () => alert('Signing canceled'),
    };

    try {
      await signTransaction(signPsbtOptions);
    } catch (error) {
      console.error('Error signing PSBT:', error);
      alert('Failed to sign PSBT.');
    }

and I was met with the following error
Input script doesn't have pubKey
My Question
Why doesn't the input script have a public key, and isn't this the purpose of scriptPubKey? How do I provide the public key correctly to sign this psbt?

Thanks for the very detailed description 😄 It helped a lot!
I tried your exact code and it worked perfectly for me. I had no error messages on signing. Here's the combined script I used:
import bitcoin from "bitcoinjs-lib";
import crypto from "crypto";

// Initialize ECC library
import * as ecc from "tiny-secp256k1";

bitcoin.initEccLib(ecc);

function createHTLC(
  secret,
  lockduration,
  recipientPubKey,
  senderPubKey,
  networkType
) {
  const network =
    networkType === "testnet"
      ? bitcoin.networks.testnet
      : bitcoin.networks.bitcoin;
  const secretHash = crypto
    .createHash("sha256")
    .update(Buffer.from(secret, "utf-8"))
    .digest();

  const recipientHash = bitcoin.crypto.hash160(
    Buffer.from(recipientPubKey, "hex")
  );
  const senderHash = bitcoin.crypto.hash160(Buffer.from(senderPubKey, "hex"));

  const redeemScript = bitcoin.script.compile([
    bitcoin.opcodes.OP_IF,
    bitcoin.opcodes.OP_SHA256,
    secretHash,
    bitcoin.opcodes.OP_EQUALVERIFY,
    bitcoin.opcodes.OP_DUP,
    bitcoin.opcodes.OP_HASH160,
    recipientHash, // Hashed recipient public key
    bitcoin.opcodes.OP_ELSE,
    bitcoin.script.number.encode(lockduration),
    bitcoin.opcodes.OP_CHECKLOCKTIMEVERIFY,
    bitcoin.opcodes.OP_DROP,
    bitcoin.opcodes.OP_DUP,
    bitcoin.opcodes.OP_HASH160,
    senderHash, // Hashed sender public key
    bitcoin.opcodes.OP_ENDIF,
    bitcoin.opcodes.OP_EQUALVERIFY,
    bitcoin.opcodes.OP_CHECKSIG,
  ]);

  // Calculate the P2WSH address and scriptPubKey
  const redeemScriptHash = bitcoin.crypto.sha256(redeemScript);
  const scriptPubKey = bitcoin.script.compile([
    bitcoin.opcodes.OP_0, // Witness version 0
    redeemScriptHash,
  ]);

  const p2wsh = bitcoin.payments.p2wsh({
    redeem: { output: redeemScript, network },
    network,
  });

  console.log("\nCreated an HTLC Script!");
  console.log("-------------------------------------------------");
  console.log("P2WSH Bitcoin Deposit Address for HTLC:", p2wsh.address);
  console.log("Witness Script Hex:", redeemScript.toString("hex"));
  console.log("Redeem Block Number:", lockduration);
  console.log("Secret (for spending):", secret);
  console.log(
    "SHA256(Secret) (for HTLC creation):",
    secretHash.toString("hex")
  );
  console.log("ScriptPubKey Hex:", scriptPubKey.toString("hex"));
  console.log("-------------------------------------------------");

  // To fund the HTLC, send BTC to the p2wsh.address
  // Redeeming the HTLC would involve creating a transaction that spends from this address
  // using the provided witnessScript, which would be included in the transaction's witness field

  return secretHash.toString("hex");
}

function createSpendPSBT(
  secret,
  lockduration,
  scriptPubKeyHex,
  htlcTxId,
  htlcOutputIndex,
  refundAmount,
  recipientPubKey,
  senderPubKey,
  recipientAddress,
  networkType
) {
  const network =
    networkType === "testnet"
      ? bitcoin.networks.testnet
      : bitcoin.networks.bitcoin;

  const secretHash = crypto
    .createHash("sha256")
    .update(Buffer.from(secret, "utf-8"))
    .digest();
  // Recreate the HTLC script using the provided secret
  const recipientHash = bitcoin.crypto.hash160(
    Buffer.from(recipientPubKey, "hex")
  );
  const senderHash = bitcoin.crypto.hash160(Buffer.from(senderPubKey, "hex"));

  const redeemScript = bitcoin.script.compile([
    bitcoin.opcodes.OP_IF,
    bitcoin.opcodes.OP_SHA256,
    secretHash,
    bitcoin.opcodes.OP_EQUALVERIFY,
    bitcoin.opcodes.OP_DUP,
    bitcoin.opcodes.OP_HASH160,
    recipientHash, // Hashed recipient public key
    bitcoin.opcodes.OP_ELSE,
    bitcoin.script.number.encode(lockduration),
    bitcoin.opcodes.OP_CHECKLOCKTIMEVERIFY,
    bitcoin.opcodes.OP_DROP,
    bitcoin.opcodes.OP_DUP,
    bitcoin.opcodes.OP_HASH160,
    senderHash, // Hashed sender public key
    bitcoin.opcodes.OP_ENDIF,
    bitcoin.opcodes.OP_EQUALVERIFY,
    bitcoin.opcodes.OP_CHECKSIG,
  ]);

  const scriptPubKey = Buffer.from(scriptPubKeyHex, "hex");

  console.log("Creating PSBT");

  // Create a PSBT
  const psbt = new bitcoin.Psbt({ network: network })
    .addInput({
      hash: htlcTxId,
      index: htlcOutputIndex,
      sequence: 0xfffffffe, // Necessary for OP_CHECKLOCKTIMEVERIFY
      witnessUtxo: {
        script: scriptPubKey,
        value: refundAmount,
      },
      witnessScript: redeemScript,
    })
    .addOutput({
      address: recipientAddress,
      value: refundAmount - 1000, // Subtract a nominal fee
    })
    .setVersion(2)
    .setLocktime(lockduration);

  console.log("PSBT to be signed:", psbt.toBase64());
}

const secret = "mysecret";
const lockTimeBlocks = 1;
const pubKeyHex =
  "59fff87c1bb3f75d34ea9d1588b72d0df43540695671c7a5ad3ec6a71d44bd79";
const networkType = "testnet";

// Example usage
const secretHashHex = createHTLC(
  secret,
  lockTimeBlocks,
  pubKeyHex,
  pubKeyHex,
  networkType
);

// Example usage (Fill in the actual values)
createSpendPSBT(
  secret,
  lockTimeBlocks,
  secretHashHex,
  "be9cc0e300d1c01b7fdbeeff1c99acc0fb8a7d9e8d025547b7bfc9635dedcbb3",
  0,
  1000,
  pubKeyHex,
  pubKeyHex,
  "tb1pnz86gezf5dzmja9q86z5agnmgjj29f00nxjj9jx0fsss6kkyh03sjkqhpd",
  networkType
);

Hey thank you so much for your help here @victorkirov I really appreciate it a lot. Would you be available to jump on a call and help me get my side fixed? Happy to pay you for your time. My email is<EMAIL_ADDRESS>just let me know your hourly rate! Thank you so much. In the meantime I will keep going and post any updates here.

By the way I have forgotten to mention that this is how I am trying to sign the PSBT. Maybe this is nonsense:
try {
        const response = await request('signPsbt', {
            psbt: `cHNidP8BAF4CAAAAAf/UoGc+9SbaxzRZTLVHB3YDgESrjDu+jq7JQ2jsQoPNAAAAAAD+////AQAAAAAAAAAAIlEgmI+kZEmjRbl0oD6FTqJ7RKSipe+ZpSLIz0whDVrEu+MAAAAAAAEBK+gDAAAAAAAAIgAgMUGPfTHD71xsEewff/CntyRXzhVO+mxQI3CpzDq2rnYBBVljqCBlLH3Gh9mMmIkwTtLkCMdLYR6GpAyqUcS0Px3VkTxc0Ih2qRS0cqJm0L2JwTcGpBMsz7FvfDufy2cAsXV2qRS0cqJm0L2JwTcGpBMsz7FvfDufy2iIrAAA`,
            //allowedSignHash: btc.SigHash.SINGLE | btc.SigHash.DEFAULT_ANYONECANPAY,
            signInputs: {
                ["tb1pnz86gezf5dzmja9q86z5agnmgjj29f00nxjj9jx0fsss6kkyh03sjkqhpd"]: [0],
            },
        });

        if (response.status === "success") {
            // handle success response
        } else {
            if (response.error.code === RpcErrorCode.USER_REJECTION) {
                // handle user request cancelation
            } else {
                // handle error
            }
        }
    } catch (err) {
        console.log(err);
    }

@victorkirov could you please share your code that you are using to sign the PSBT? Thank you again, I really  appreciate the help here.

Heya
Sorry, I had a mistake in my script above. Instead of the createHTLC method returning
  return secretHash.toString("hex");

It should return:
  return scriptPubKey.toString("hex");

Here's the correct script:
import bitcoin from "bitcoinjs-lib";
import crypto from "crypto";

// Initialize ECC library
import * as ecc from "tiny-secp256k1";

bitcoin.initEccLib(ecc);

function createHTLC(
  secret,
  lockduration,
  recipientPubKey,
  senderPubKey,
  networkType
) {
  const network =
    networkType === "testnet"
      ? bitcoin.networks.testnet
      : bitcoin.networks.bitcoin;
  const secretHash = crypto
    .createHash("sha256")
    .update(Buffer.from(secret, "utf-8"))
    .digest();

  const recipientHash = bitcoin.crypto.hash160(
    Buffer.from(recipientPubKey, "hex")
  );
  const senderHash = bitcoin.crypto.hash160(Buffer.from(senderPubKey, "hex"));

  const redeemScript = bitcoin.script.compile([
    bitcoin.opcodes.OP_IF,
    bitcoin.opcodes.OP_SHA256,
    secretHash,
    bitcoin.opcodes.OP_EQUALVERIFY,
    bitcoin.opcodes.OP_DUP,
    bitcoin.opcodes.OP_HASH160,
    recipientHash, // Hashed recipient public key
    bitcoin.opcodes.OP_ELSE,
    bitcoin.script.number.encode(lockduration),
    bitcoin.opcodes.OP_CHECKLOCKTIMEVERIFY,
    bitcoin.opcodes.OP_DROP,
    bitcoin.opcodes.OP_DUP,
    bitcoin.opcodes.OP_HASH160,
    senderHash, // Hashed sender public key
    bitcoin.opcodes.OP_ENDIF,
    bitcoin.opcodes.OP_EQUALVERIFY,
    bitcoin.opcodes.OP_CHECKSIG,
  ]);

  // Calculate the P2WSH address and scriptPubKey
  const redeemScriptHash = bitcoin.crypto.sha256(redeemScript);
  const scriptPubKey = bitcoin.script.compile([
    bitcoin.opcodes.OP_0, // Witness version 0
    redeemScriptHash,
  ]);

  const p2wsh = bitcoin.payments.p2wsh({
    redeem: { output: redeemScript, network },
    network,
  });

  console.log("\nCreated an HTLC Script!");
  console.log("-------------------------------------------------");
  console.log("P2WSH Bitcoin Deposit Address for HTLC:", p2wsh.address);
  console.log("Witness Script Hex:", redeemScript.toString("hex"));
  console.log("Redeem Block Number:", lockduration);
  console.log("Secret (for spending):", secret);
  console.log(
    "SHA256(Secret) (for HTLC creation):",
    secretHash.toString("hex")
  );
  console.log("ScriptPubKey Hex:", scriptPubKey.toString("hex"));
  console.log("-------------------------------------------------");

  // To fund the HTLC, send BTC to the p2wsh.address
  // Redeeming the HTLC would involve creating a transaction that spends from this address
  // using the provided witnessScript, which would be included in the transaction's witness field

  return scriptPubKey.toString("hex");
}

function createSpendPSBT(
  secret,
  lockduration,
  scriptPubKeyHex,
  htlcTxId,
  htlcOutputIndex,
  refundAmount,
  recipientPubKey,
  senderPubKey,
  recipientAddress,
  networkType
) {
  const network =
    networkType === "testnet"
      ? bitcoin.networks.testnet
      : bitcoin.networks.bitcoin;

  const secretHash = crypto
    .createHash("sha256")
    .update(Buffer.from(secret, "utf-8"))
    .digest();
  // Recreate the HTLC script using the provided secret
  const recipientHash = bitcoin.crypto.hash160(
    Buffer.from(recipientPubKey, "hex")
  );
  const senderHash = bitcoin.crypto.hash160(Buffer.from(senderPubKey, "hex"));

  const redeemScript = bitcoin.script.compile([
    bitcoin.opcodes.OP_IF,
    bitcoin.opcodes.OP_SHA256,
    secretHash,
    bitcoin.opcodes.OP_EQUALVERIFY,
    bitcoin.opcodes.OP_DUP,
    bitcoin.opcodes.OP_HASH160,
    recipientHash, // Hashed recipient public key
    bitcoin.opcodes.OP_ELSE,
    bitcoin.script.number.encode(lockduration),
    bitcoin.opcodes.OP_CHECKLOCKTIMEVERIFY,
    bitcoin.opcodes.OP_DROP,
    bitcoin.opcodes.OP_DUP,
    bitcoin.opcodes.OP_HASH160,
    senderHash, // Hashed sender public key
    bitcoin.opcodes.OP_ENDIF,
    bitcoin.opcodes.OP_EQUALVERIFY,
    bitcoin.opcodes.OP_CHECKSIG,
  ]);

  const scriptPubKey = Buffer.from(scriptPubKeyHex, "hex");

  console.log("Creating PSBT");

  // Create a PSBT
  const psbt = new bitcoin.Psbt({ network: network })
    .addInput({
      hash: htlcTxId,
      index: htlcOutputIndex,
      sequence: 0xfffffffe, // Necessary for OP_CHECKLOCKTIMEVERIFY
      witnessUtxo: {
        script: scriptPubKey,
        value: refundAmount,
      },
      witnessScript: redeemScript,
    })
    .addOutput({
      address: recipientAddress,
      value: refundAmount - 1000, // Subtract a nominal fee
    })
    .setVersion(0)
    .setLocktime(lockduration);

  console.log("PSBT to be signed:", psbt.toBase64());
}

const secret = "mysecret";
const lockTimeBlocks = 1;
const pubKeyHex =
  "59fff87c1bb3f75d34ea9d1588b72d0df43540695671c7a5ad3ec6a71d44bd79";
const networkType = "testnet";
const toAddress = "2NCvQNVu5wBEKDHMMgcDh5oY17FSdRmmM6a";

// Example usage
const secretHashHex = createHTLC(
  secret,
  lockTimeBlocks,
  pubKeyHex,
  pubKeyHex,
  networkType
);

// Example usage (Fill in the actual values)
createSpendPSBT(
  secret,
  lockTimeBlocks,
  secretHashHex,
  "be9cc0e300d1c01b7fdbeeff1c99acc0fb8a7d9e8d025547b7bfc9635dedcbb3",
  0,
  10000,
  pubKeyHex,
  pubKeyHex,
  toAddress,
  networkType
);

Here is the React component I used to send it to the wallet:
import { useMemo } from 'react';
import { Address, BitcoinNetworkType, RpcErrorCode, request } from 'sats-connect';

type Props = {
  network: BitcoinNetworkType;
  addresses: Address[];
};

const Sign = ({ network, addresses }: Props) => {
  const psbt = 'cHNidP8BAFMAAAAAAbPL7V1jyb+3R1UCjZ59ivvArJkc/+7bfxvA0QDjwJy+AAAAAAD+////ASgjAAAAAAAAF6kU19NHmwjofrBjpTb5RqkbJBlj+GuHAQAAAAABASsQJwAAAAAAACIAIKYI58a2wyAdJgkxYWyAsWXZwCL7lgpDmbeX/n2VdxzKAQVZY6ggZSx9xofZjJiJME7S5AjHS2EehqQMqlHEtD8d1ZE8XNCIdqkU45kFbEymNXGspE/C0Rs/2saaN+BnUbF1dqkU45kFbEymNXGspE/C0Rs/2saaN+BoiKwAAA==';

  const paymentAddress = useMemo(() => {
    return addresses.find((address) => address.purpose === 'payment');
  }, [addresses]);

  const onSign = async () => {
    if (!paymentAddress || !psbt) {
      alert('Payment address or PSBT not found');
      return;
    }

    try {
      const response = await request('signPsbt', {
        psbt,
        signInputs: {
          [paymentAddress.address]: [0],
        },
      });

      if (response.status === 'success') {
        // handle success response
      } else {
        if (response.error.code === RpcErrorCode.USER_REJECTION) {
          // handle user request cancelation
        } else {
          // handle error
        }
      }
    } catch (err) {
      console.log(err);
    }
  };

  return (
    <div className="card">
      <div>
        <button onClick={onSign}>Sign</button>
      </div>
    </div>
  );
};

export default Sign;

@victorkirov Thank you very much, I was able to successfully sign the psbt now
{
  "tx": {
    "txid": "b639a2017f2f3785e93f587fd11edb6fea22a5df2ee9b5dda3b4ee20f5d583fb",
    "hash": "b639a2017f2f3785e93f587fd11edb6fea22a5df2ee9b5dda3b4ee20f5d583fb",
    "version": 0,
    "size": 83,
    "vsize": 83,
    "weight": 332,
    "locktime": 1,
    "vin": [
      {
        "txid": "1abd69a7d0abddc76956a8c78844ad7022aa39baa9fad808c96f41b06623a8d8",
        "vout": 0,
        "scriptSig": {
          "asm": "",
          "hex": ""
        },
        "sequence":<PHONE_NUMBER>
      }
    ],
    "vout": [
      {
        "value": 0.00009000,
        "n": 0,
        "scriptPubKey": {
          "asm": "OP_HASH160 836676150f0f5892416d8bd9bc5e923b494677f3 OP_EQUAL",
          "desc": "addr(2N5E1FYfiQgM5U8aTvU1btZYpiTVPE9ReaK)#00u0x08a",
          "hex": "a914836676150f0f5892416d8bd9bc5e923b494677f387",
          "address": "2N5E1FYfiQgM5U8aTvU1btZYpiTVPE9ReaK",
          "type": "scripthash"
        }
      }
    ]
  },
  "global_xpubs": [
  ],
  "psbt_version": 0,
  "proprietary": [
  ],
  "unknown": {
  },
  "inputs": [
    {
      "witness_utxo": {
        "amount": 0.00010000,
        "scriptPubKey": {
          "asm": "0 3b60863f7120c7470a53b5d4feee9f9272782a789cfd3837c1e11aa747b265ec",
          "desc": "addr(tb1q8dsgv0m3yrr5wzjnkh20am5ljfe8s2ncnn7nsd7puyd2w3ajvhkqurzf2h)#cgxe5kd7",
          "hex": "00203b60863f7120c7470a53b5d4feee9f9272782a789cfd3837c1e11aa747b265ec",
          "address": "tb1q8dsgv0m3yrr5wzjnkh20am5ljfe8s2ncnn7nsd7puyd2w3ajvhkqurzf2h",
          "type": "witness_v0_scripthash"
        }
      },
      "partial_signatures": {
        "0269bf7a1301185625758c324221cf6614e4a4104f90f83f633a8790f62919aa0a": "3045022100b3ed03b14c7d8f9230c2be5caee6ebb1797443282d42c23f3a56ab24171cb2ec022002173ae1d5201a330a76e633df508752c0fb80c5c620aea180b1803242fd3d8a01"
      },
      "witness_script": {
        "asm": "OP_IF OP_SHA256 652c7dc687d98c9889304ed2e408c74b611e86a40caa51c4b43f1dd5913c5cd0 OP_EQUALVERIFY OP_DUP OP_HASH160 a5102a75c05993aa082ca365b5ba7f49bed51758 OP_ELSE 1 OP_CHECKLOCKTIMEVERIFY OP_DROP OP_DUP OP_HASH160 a5102a75c05993aa082ca365b5ba7f49bed51758 OP_ENDIF OP_EQUALVERIFY OP_CHECKSIG",
        "hex": "63a820652c7dc687d98c9889304ed2e408c74b611e86a40caa51c4b43f1dd5913c5cd08876a914a5102a75c05993aa082ca365b5ba7f49bed517586751b17576a914a5102a75c05993aa082ca365b5ba7f49bed517586888ac",
        "type": "nonstandard"
      }
    }
  ],
  "outputs": [
    {
    }
  ],
  "fee": 0.00001000
}

However if I use broadcast: true in the sats-connect signPsbtOptions object, it says:
Transaction Failed
Unknown inputs not allowed

Thanks for your help @victorkirov, I am also working on this. So I now running the signed psbt through bitcoin-cli using the finalizepsbt command. I get this response:
{
"psbt": "cHNidP8BAFMAAAAAAdioI2awQW/JCNj6qbo5qiJwrUSIx6hWacfdq9Cnab0aAAAAAAD+////ASgjAAAAAAAAF6kUg2Z2FQ8PWJJBbYvZvF6SO0lGd/OHAQAAAAABASsQJwAAAAAAACIAIDtghj9xIMdHClO11P7un5JyeCp4nP04N8HhGqdHsmXsIgICab96EwEYViV1jDJCIc9mFOSkEE+Q+D9jOoeQ9ikZqgpIMEUCIQCz7QOxTH2PkjDCvlyu5uuxeXRDKC1Cwj86VqskFxyy7AIgAhc64dUgGjMKduYz31CHUsD7gMXGIK6hgLGAMkL9PYoBAQVZY6ggZSx9xofZjJiJME7S5AjHS2EehqQMqlHEtD8d1ZE8XNCIdqkUpRAqdcBZk6oILKNltbp/Sb7VF1hnUbF1dqkUpRAqdcBZk6oILKNltbp/Sb7VF1hoiKwAAA==",
"complete": false
}
The complete: false flag indicated that the psbt I passed in was not signed correctly, is that right?

Yeah, the PSBT isn't final. Xverse would have signed the input and added a partial sig into the PSBT.
Your script isn't a basic checksigverify, so you need to add the additional bits to unlock your redeem script. It has the format:
IF

ELSE

END
...
CHECKSIGVERIFY
So you need to generate a final sig from the partial sig. The final sig would (as a basic example) have this format for the secret unlock:
[Signature, PubKey, SecretHash, 1]
and for timelock:
[Signature, Pubkey, 0]
The partial sig only has the signature and pubkey, so the PSBT cannot be finalised as is.

@victorkirov thanks for your continual support and help. I have written a script that I believe does what you're suggesting, although I think I might be missing a very small piece of the puzzle. I am decoding the partially signed psbt, and then attempting to create a witness script stack to update the input in my psbt with the witness script info:
import * as bitcoin from 'bitcoinjs-lib';

// Your existing PSBT in base64
const psbtBase64 = "cHNidP8BAFMAAAAAAdioI2awQW/JCNj6qbo5qiJwrUSIx6hWacfdq9Cnab0aAAAAAAD+////ASgjAAAAAAAAF6kUg2Z2FQ8PWJJBbYvZvF6SO0lGd/OHAQAAAAABASsQJwAAAAAAACIAIDtghj9xIMdHClO11P7un5JyeCp4nP04N8HhGqdHsmXsIgICab96EwEYViV1jDJCIc9mFOSkEE+Q+D9jOoeQ9ikZqgpIMEUCIQCz7QOxTH2PkjDCvlyu5uuxeXRDKC1Cwj86VqskFxyy7AIgAhc64dUgGjMKduYz31CHUsD7gMXGIK6hgLGAMkL9PYoBAQVZY6ggZSx9xofZjJiJME7S5AjHS2EehqQMqlHEtD8d1ZE8XNCIdqkUpRAqdcBZk6oILKNltbp/Sb7VF1hnUbF1dqkUpRAqdcBZk6oILKNltbp/Sb7VF1hoiKwAAA==";

// Decode the PSBT
let psbt = bitcoin.Psbt.fromBase64(psbtBase64);

// Secret for the HTLC
const secret = "mysecret";
const secretBuffer = Buffer.from(secret, 'utf-8'); // Ensure it's in UTF-8 format, matching hash generation

const inputIndex = 0; // index of the input in the PSBT

// Check if the input exists and has partial signatures
if (!psbt.data.inputs[inputIndex] || !psbt.data.inputs[inputIndex].partialSig) {
    console.error("No partial signatures found for input at index", inputIndex);
    process.exit(1);
}

// Retrieve all partial signatures for the input
const partialSigs = psbt.data.inputs[inputIndex].partialSig;
if (!partialSigs || partialSigs.length === 0) {
    console.error("No signatures found in partialSig");
    process.exit(1);
}

const [signatureData] = partialSigs;

// Extract the signature and public key from the first (and only) partialSig entry
const signatureBuffer = signatureData.signature;
const publicKeyBuffer = signatureData.pubkey;

// Construct the final script witness stack for the unlock path (not using timelock)
const finalWitnessStack = [
    signatureBuffer,    // Signature in Buffer format
    publicKeyBuffer,    // Public key in Buffer format
    secretBuffer, // Secret in Buffer format (since the script checks SHA256 hash of secret)
    Buffer.from('01', 'hex') // Push '1' onto the stack to choose the unlock path
];

console.log(signatureData.signature.toString('hex'));
console.log(signatureData.pubkey.toString('hex'));
console.log(signatureData.signature.toString('hex'));
console.log('01');

// Manually set the witness stack for the input
if (!psbt.data.inputs[inputIndex].witnessUtxo) {
    console.error("Missing witnessUtxo for input");
    process.exit(1);
}

psbt.data.inputs[inputIndex].finalScriptWitness = finalWitnessStack;

// Complete and finalize the input
try {
    psbt.finalizeInput(inputIndex);
} catch (e) {
    console.error("Error finalizing input:", e.message);
    process.exit(1);
}

// Serialize the updated PSBT
const updatedPsbtBase64 = psbt.toBase64();
console.log("Updated PSBT:", updatedPsbtBase64);

Is my witness script stack in the correct order? For some reason this code does not successfully finalize the psbt. I think I might be missing a step.
Error finalizing input: Can not finalize input #0

Also a little more colour on my previous message, this is the witness stack:
3045022100b3ed03b14c7d8f9230c2be5caee6ebb1797443282d42c23f3a56ab24171cb2ec022002173ae1d5201a330a76e633df508752c0fb80c5c620aea180b1803242fd3d8a01 //signature
0269bf7a1301185625758c324221cf6614e4a4104f90f83f633a8790f62919aa0a //pubkey
6d79736563726574 //secret
01 //path

@BarneyChambers the finalScriptWitness consists of the unlocking bits, followed by the locking script. I think you just need to add the locking script at the end:
const redeemScript = bitcoin.script.compile([
    bitcoin.opcodes.OP_IF,
    bitcoin.opcodes.OP_SHA256,
    secretHash,
    bitcoin.opcodes.OP_EQUALVERIFY,
    bitcoin.opcodes.OP_DUP,
    bitcoin.opcodes.OP_HASH160,
    recipientHash, // Hashed recipient public key
    bitcoin.opcodes.OP_ELSE,
    bitcoin.script.number.encode(lockduration),
    bitcoin.opcodes.OP_CHECKLOCKTIMEVERIFY,
    bitcoin.opcodes.OP_DROP,
    bitcoin.opcodes.OP_DUP,
    bitcoin.opcodes.OP_HASH160,
    senderHash, // Hashed sender public key
    bitcoin.opcodes.OP_ENDIF,
    bitcoin.opcodes.OP_EQUALVERIFY,
    bitcoin.opcodes.OP_CHECKSIG,
  ]);

const finalWitnessStack = [
    signatureBuffer,    // Signature in Buffer format
    publicKeyBuffer,    // Public key in Buffer format
    secretBuffer, // Secret in Buffer format (since the script checks SHA256 hash of secret)
    Buffer.from([1]), // Push '1' onto the stack to choose the unlock path
    redeemScript
];

Hey Victor, yes you are right, thank you for the clarification, after adding the script into the final fitness stack I was able to get a valid psbt base 64 back, that I can finalize:
{
  "hex": "00000000000101d8a82366b0416fc908d8faa9ba39aa2270ad4488c7a85669c7ddabd0a769bd1a0000000000feffffff01282300000000000017a914836676150f0f5892416d8bd9bc5e923b494677f38705483045022100b3ed03b14c7d8f9230c2be5caee6ebb1797443282d42c23f3a56ab24171cb2ec022002173ae1d5201a330a76e633df508752c0fb80c5c620aea180b1803242fd3d8a01210269bf7a1301185625758c324221cf6614e4a4104f90f83f633a8790f62919aa0a086d7973656372657401015963a820652c7dc687d98c9889304ed2e408c74b611e86a40caa51c4b43f1dd5913c5cd08876a914a5102a75c05993aa082ca365b5ba7f49bed517586751b17576a914a5102a75c05993aa082ca365b5ba7f49bed517586888ac01000000",
  "complete": true
}

For some reason, the hex is invalid in some way, as when I try to broadcast it as a raw transaction, I get an error:
bitcoin-cli -testnet sendrawtransaction<PHONE_NUMBER>0101d8a82366b0416fc908d8faa9ba39aa2270ad4488c7a85669c7ddabd0a769bd1a0000000000feffffff01282300000000000017a914836676150f0f5892416d8bd9bc5e923b494677f38705483045022100b3ed03b14c7d8f9230c2be5caee6ebb1797443282d42c23f3a56ab24171cb2ec022002173ae1d5201a330a76e633df508752c0fb80c5c620aea180b1803242fd3d8a01210269bf7a1301185625758c324221cf6614e4a4104f90f83f633a8790f62919aa0a086d7973656372657401015963a820652c7dc687d98c9889304ed2e408c74b611e86a40caa51c4b43f1dd5913c5cd08876a914a5102a75c05993aa082ca365b5ba7f49bed517586751b17576a914a5102a75c05993aa082ca365b5ba7f49bed517586888ac01000000

Are there any additional steps after finalizing that I need to do to the hex?

For extra context, here is my decoded raw transaction that I get from finalize-psbt
{
  "txid": "b639a2017f2f3785e93f587fd11edb6fea22a5df2ee9b5dda3b4ee20f5d583fb",
  "hash": "46bdc33bc8dbbc522539d6b66c568bb548f625a32321efc54fe1f216a46d113f",
  "version": 0,
  "size": 294,
  "vsize": 136,
  "weight": 543,
  "locktime": 1,
  "vin": [
    {
      "txid": "1abd69a7d0abddc76956a8c78844ad7022aa39baa9fad808c96f41b06623a8d8",
      "vout": 0,
      "scriptSig": {
        "asm": "",
        "hex": ""
      },
      "txinwitness": [
        "3045022100b3ed03b14c7d8f9230c2be5caee6ebb1797443282d42c23f3a56ab24171cb2ec022002173ae1d5201a330a76e633df508752c0fb80c5c620aea180b1803242fd3d8a01",
        "0269bf7a1301185625758c324221cf6614e4a4104f90f83f633a8790f62919aa0a",
        "6d79736563726574",
        "01",
        "63a820652c7dc687d98c9889304ed2e408c74b611e86a40caa51c4b43f1dd5913c5cd08876a914a5102a75c05993aa082ca365b5ba7f49bed517586751b17576a914a5102a75c05993aa082ca365b5ba7f49bed517586888ac"
      ],
      "sequence":<PHONE_NUMBER>
    }
  ],
  "vout": [
    {
      "value": 0.00009000,
      "n": 0,
      "scriptPubKey": {
        "asm": "OP_HASH160 836676150f0f5892416d8bd9bc5e923b494677f3 OP_EQUAL",
        "desc": "addr(3DfoBojgoDqjGLwvFLPjGcZZW7HDQ5N98X)#2qvledz7",
        "hex": "a914836676150f0f5892416d8bd9bc5e923b494677f387",
        "address": "3DfoBojgoDqjGLwvFLPjGcZZW7HDQ5N98X",
        "type": "scripthash"
      }
    }
  ]
}```

Hi Victor thanks for your suggestions you are right. I have managed to get the transaction finalized, for reference here is how I got xverse to play nice with signing the transaction:
psbt.data.inputs[0].witnessScript = Buffer.from(witnessHex, 'hex');
For context, xverse requires this information to sign the transaction. The transaction will now finalize using bitcoin-cli:
bitcoin-cli finalizepsbt cHNidP8BAFMCAAAAAdioI2awQW/JCNj6qbo5qiJwrUSIx6hWacfdq9Cnab0aAAAAAAD+////ASgjAAAAAAAAF6kUg2Z2FQ8PWJJBbYvZvF6SO0lGd/OHAQAAAAABASsQJwAAAAAAACIAIDtghj9xIMdHClO11P7un5JyeCp4nP04N8HhGqdHsmXsAQVZY6ggZSx9xofZjJiJME7S5AjHS2EehqQMqlHEtD8d1ZE8XNCIdqkUpRAqdcBZk6oILKNltbp/Sb7VF1hnUbF1dqkUpRAqdcBZk6oILKNltbp/Sb7VF1hoiKwBCNAFRzBEAiA2PAAUv5ZRplnejL6MDYi0AIyS3gOIY+iqUJRA08YehQIgbm3IYEQOHFo1/mUt+eoTCIxqa7Lc2ATLQ/jiYsmARB8BIQJpv3oTARhWJXWMMkIhz2YU5KQQT5D4P2M6h5D2KRmqCghteXNlY3JldAEBWWOoIGUsfcaH2YyYiTBO0uQIx0thHoakDKpRxLQ/HdWRPFzQiHapFKUQKnXAWZOqCCyjZbW6f0m+1RdYZ1GxdXapFKUQKnXAWZOqCCyjZbW6f0m+1RdYaIisAAA=
{
  "hex": "02000000000101d8a82366b0416fc908d8faa9ba39aa2270ad4488c7a85669c7ddabd0a769bd1a0000000000feffffff01282300000000000017a914836676150f0f5892416d8bd9bc5e923b494677f387054730440220363c0014bf9651a659de8cbe8c0d88b4008c92de038863e8aa509440d3c61e8502206e6dc860440e1c5a35fe652df9ea13088c6a6bb2dcd804cb43f8e262c980441f01210269bf7a1301185625758c324221cf6614e4a4104f90f83f633a8790f62919aa0a086d7973656372657401015963a820652c7dc687d98c9889304ed2e408c74b611e86a40caa51c4b43f1dd5913c5cd08876a914a5102a75c05993aa082ca365b5ba7f49bed517586751b17576a914a5102a75c05993aa082ca365b5ba7f49bed517586888ac01000000",
  "complete": true
}

For some reason, when I broadcast this hex data, I receive an error from bitcoind:
error code: -25
error message:
bad-txns-inputs-missingorspent

The reason seems to be that my vin[0] of my transaction 1abd69a7d0abddc76956a8c78844ad7022aa39baa9fad808c96f41b06623a8d8 is not a transaction thats found on the blockchain. This is confusing to me because I didn't think anything needed to be confirmed on chain until I broadcast my final transaction
I ran this command on a fully synced bitcoin node, so I am not sure what the issue may be
{
  "txid": "a418fe1225a5b8c07655ef0da63387df2b177ca3f35afcfa196f9560ea11fac0",
  "hash": "e9d252d78d2761d05196ef112b0bb2e8698004ad886c3edb362034cb8ba132f9",
  "version": 2,
  "size": 293,
  "vsize": 136,
  "weight": 542,
  "locktime": 1,
  "vin": [
    {
      "txid": "1abd69a7d0abddc76956a8c78844ad7022aa39baa9fad808c96f41b06623a8d8",
      "vout": 0,
      "scriptSig": {
        "asm": "",
        "hex": ""
      },
      "txinwitness": [
        "30440220363c0014bf9651a659de8cbe8c0d88b4008c92de038863e8aa509440d3c61e8502206e6dc860440e1c5a35fe652df9ea13088c6a6bb2dcd804cb43f8e262c980441f01",
        "0269bf7a1301185625758c324221cf6614e4a4104f90f83f633a8790f62919aa0a",
        "6d79736563726574",
        "01",
        "63a820652c7dc687d98c9889304ed2e408c74b611e86a40caa51c4b43f1dd5913c5cd08876a914a5102a75c05993aa082ca365b5ba7f49bed517586751b17576a914a5102a75c05993aa082ca365b5ba7f49bed517586888ac"
      ],
      "sequence":<PHONE_NUMBER>
    }
  ],
  "vout": [
    {
      "value": 0.00009000,
      "n": 0,
      "scriptPubKey": {
        "asm": "OP_HASH160 836676150f0f5892416d8bd9bc5e923b494677f3 OP_EQUAL",
        "desc": "addr(2N5E1FYfiQgM5U8aTvU1btZYpiTVPE9ReaK)#00u0x08a",
        "hex": "a914836676150f0f5892416d8bd9bc5e923b494677f387",
        "address": "2N5E1FYfiQgM5U8aTvU1btZYpiTVPE9ReaK",
        "type": "scripthash"
      }
    }
  ]
}


feat: initial implementation

:tada: This PR is included in version 1.1.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Add LivelinessChanged subscription event

Depends on https://github.com/osrf/ros2_java/pull/15.

Rebased to resolve conflicts


Cleaning mypy errors in utils, type_utils, udf_utils, and telemetry.

Please answer these questions before submitting your pull requests. Thanks!

What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
Fixes #NNNN

Fill out the following pre-review checklist:

[ ] I am adding a new automated test(s) to verify correctness of my new code
[ ] I am adding new logging messages
[ ] I am adding a new telemetry message
[ ] I am adding new credentials
[ ] I am adding a new dependency

Please describe how your code solves the related issue.

This PR cleans up mypy errors in the following files:
src/snowflake/snowpark/_internal/telemetry.py
src/snowflake/snowpark/_internal/type_utils.py
src/snowflake/snowpark/_internal/udf_utils.py
src/snowflake/snowpark/_internal/utils.py

Let's use use # type: ignore[<code>] to only ignore specific errors.


Require a AMP_MODE=true flag to enable AMP Pass

Trying to resolve yaqs/1882487052054822912#a1n7. This will require a similar change to the AMP invocation, which I'll do in a PR shortly.

After this PR is merged, we should merge #56. It will auto-generate new binaries that include the March version of closure and this change. After that, one of us will need to follow the instructions in https://github.com/ampproject/amp-closure-compiler/blob/master/PUBLISH.md and publish a new version to npm.


bump elixir webrtc to 0.3

Before merging, we need to figure out the ex_sdp version conflicts, see https://github.com/membraneframework/ex_sdp/pull/50

@mickel8 I have implemented handling keyframe requests since your last review, could you review my changes?


Issues when adding new attacks into the old version of Counterfit

Hello @moohax,
I'm sorry that I am not sure if you have seen my questions so I opened a new issue.
I am trying to add new attacks to the old version of Counterfit (There is no extraction attack and inference attack in the old version). Could you please give me some tips?
For instance, I consulted the config file in the new Counterfit version and tried to create a new file for utilizing Functionally Equivalent Extraction attack from ART in the old version. Could you please tell me if I need to add some new information in the file? Thank you.

To add extraction attack into the old version, I modified some functions in targets.py and run_scan_utils.py. Could you please tell me if I need to modify other modules? Thank you.

Does it mean I have to add num_neurons into FunctionallyEquivalentExtraction.py? Thank you.


HIVE-26072: Enable vectorization for stats gathering (tablescan op).

After https://issues.apache.org/jira/browse/HIVE-23530 , almost all compute stats functions are vectorizable. Only function that is not vectorizable is "compute_bit_vector" for ndv statistics computation. This causes "create table as select" and "insert overwrite select" queries to run in non-vectorized mode.
Even a very naive implementation of vectorized compute_bit_vector gives about 50% performance improvement on simple "insert overwrite select" queries. That is because entire mapper or reducer can run in vectorized mode.

compute_bit_vector is vectorized via https://issues.apache.org/jira/browse/HIVE-24510


storage traffic type reset ui fix

Description

In the Add Zone Wizard, when a user lands on the Physical Network page, by default the first Physical Network gets initialized with the 3 Traffic Types: Guest, Management and Public. When a user drags the Management or Public Traffic Types from the first Physical Network to a second or nth Physical Network and then clicks the next button to go to the next screen, and then decides to click the previous button to go back to the Physical Network screen, the UI initializes the physicalNetwork again and thus moves these Traffic Types back to their original position in the first Physical Network as if it is the first time the user navigated to this page.
A fix was made so that when a user clicks the previous button to go back to the Physical Network screen, it does not initialize the physicalNetwork again, therefore leaving the user-defined Traffic Type configuration as it was before the next button was clicked.
For example, dragging the Management and Storage Traffic Types to Physical Network 2 does not moved back when clicking the 'Previous' button

Actual Behaviour:
In the Add Zone Wizard, when a user lands on the Physical Network page, by default the first Physical Network gets initialized with the 3 Traffic Types: Guest, Management and Public. When a user drags the Management or Public Traffic Types from the first Physical Network to a second or nth Physical Network and then clicks the next button to go to the next screen, and then decides to click the previous button to go back to the Physical Network screen, the UI initializes the physicalNetwork again and thus moves these Traffic Types back to their original position in the first Physical Network as if it is the first time the user navigated to this page.
Expected Behaviour:
In the Add Zone Wizard, when clicking the previous button to go back to the Physical Network screen, it must not initialize the physicalNetwork again, therefore leaving the user-defined Traffic Type configuration as it was before the next button was clicked.
To reproduce:
Navigate and click Infrastructure in the left pane. Click Zones and click the 'Add Zone' button to create a new zone. The 'Add Zone' wizard will appear and select 'Advanced' on the Zone Type screen. Fill in the required field on the 'set up Zone' page and click next. On the Physical Network screen, drag the Management and/or the Public traffic types to another Physical Network. Drag the Storage traffic type to the physical network.

After adding a label for each traffic type, click the next button to proceed to the Public Traffic screen and then click the Previous button. This will show that the Management traffic type is moved back to Physical Network 1:

Types of changes

[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] New feature (non-breaking change which adds functionality)
[x] Bug fix (non-breaking change which fixes an issue)
[ ] Enhancement (improves an existing feature and functionality)
[ ] Cleanup (Code refactoring and cleanup, that may add test cases)

GitHub Issue/PRs

Screenshots (if appropriate):
How Has This Been Tested?
Manually.
Navigate and click Infrastructure in the left pane. Click Zones and click the 'Add Zone' button to create a new zone. The 'Add Zone' wizard will appear and select 'Advanced' on the Zone Type screen. Fill in the required field on the 'set up Zone' page and click next. On the Physical Network screen, drag the Management and/or the Public traffic types to another Physical Network. Drag the Storage traffic type to the physical network. After adding a label for each traffic type, click the next button to proceed to the Public Traffic screen and then click the Previous button. This will show that the Management traffic type has not moved back to Physical Network 1.

Environment:
KVM hypervisor
Create Advanced Zone.

Checklist:

[x] I have read the CONTRIBUTING document.
[x] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
Testing
[ ] I have added tests to cover my changes.
[ ] All relevant new and existing integration tests have passed.
 I'll keep you posted as I make progress.

Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2205

@blueorangutan test

@borisstoyanov a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan test

@ernjvr a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@ernjvr maybe the community jenkins job fails since this is from your repo?

Trillian test result (tid-2887)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 32676 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr2767-t2887-kvm-centos7.zip
Intermitten failure detected: /marvin/tests/smoke/test_deploy_virtio_scsi_vm.py
Intermitten failure detected: /marvin/tests/smoke/test_privategw_acl.py
Intermitten failure detected: /marvin/tests/smoke/test_vm_life_cycle.py
Intermitten failure detected: /marvin/tests/smoke/test_host_maintenance.py
Intermitten failure detected: /marvin/tests/smoke/test_hostha_kvm.py
Smoke tests completed. 63 look OK, 4 have error(s)
Only failed tests results shown below:

Test
Result
Time (s)
Test File

ContextSuite context=TestDeployVirtioSCSIVM>:setup
Error
0.00
test_deploy_virtio_scsi_vm.py

test_03_vpc_privategw_restart_vpc_cleanup
Failure
1191.37
test_privategw_acl.py

test_02_unsecure_vm_migration
Error
70.95
test_vm_life_cycle.py

test_03_secured_to_nonsecured_vm_migration
Error
47.73
test_vm_life_cycle.py

test_04_nonsecured_to_secured_vm_migration
Error
3653.45
test_vm_life_cycle.py

test_hostha_enable_ha_when_host_in_maintenance
Error
0.41
test_hostha_kvm.py


Add: Migraine Type Prediction

I want to add a Migraine Type Prediction Model which is built using Machine Learning.

@kosuri-indu the issue is assigned.


[Tables] Support geo-redundancy for Cosmos and Storage

Add support for Geo-redundancy in the Tables SDK.
This is supported by Cosmos as multiple failover regions for both read and write.
Initial proposal suggests exposing two client configuration settings:

read_regions: A list of strings with the regional account URLs, in the order that they will be attempted.
write_regions: Same but for write operations.

This should likely be implemented as a custom retry policy.
For SDKs that expose direct configuration of, or replacement of the existing policy - it will need to be investigated how the proposed changes would affect those customers.
The failover strategy should also be adaptable to the Storage failover "secondary" region - which is effectively a single read region. So this implementation should be tested in that context as well.
We will need to document best practice in conjunction with manual failover - i.e. if a customer triggers a manual failover from the Azure portal, this effectively means the primary region now becomes a secondary region, and the account URL will point to the previously secondary region.
Initial implementation will be simplistic, with room for evolution. Examples of further development:

Region cooldown period - if a region is considered unreachable, we don't attempt to contact it again for a configurable period.
Automatic region detection - if the service exposes an API we can automatically detect which regions to retry against.
Better automation around the manual-failover scenario above.

Sample .NET implementation for context:
https://gist.github.com/christothes/ae5bc0c2ea1e0c7495875a6c7e940297

Since this feature ask no longer exists, I'm going to close this issue


Implement any missing calibration tools

Checklist

[X] I've read the contribution guidelines.
[X] I've searched other issues and no duplicate issues were found.
[X] I've agreed with the maintainers that I can plan this task.

Description
This is a sub-ticket of https://github.com/autowarefoundation/autoware.universe/issues/592
Implement any missing calibration tools for sensors.
Purpose
Create calibration tool so that users can generate calibration parameters for sensors.
This includes:

Intrinsic parameter for cameras
extrinsic parameter between cameras (camera-camera calibration)
extrinsic parameter between lidars (lidar-lidar calibration)
extrinsic parameter between a camera and a lidar (camera-lidar calibration)

Definition of done

[ ] missing calibration tools specified in https://github.com/autowarefoundation/autoware.universe/issues/677
[ ] do implementation of the calibraiton tools

@armaganarsln to provide data for lidar-imu calibration

@xmfcx hi, from Autocore's side, we got one well-worked open sourced tool to calibrate lidar and imu for our SLAM related works, see the link: https://github.com/APRIL-ZJU/lidar_IMU_calib
Currently, the original version supported by developers could only works for velodyne lidar packets. We have overwritten the lidar inputs to receive our ouster lidar as well. If necessary, I'm willing to provide ros bags and modified codes.

@JianKangEgon It would be nice if you can provide the rosbag and share the modified branch here. If the change is generic for all lidars, then you may also create PR to the upstream.

@mitsudome-r  okay sure, I'd love to do that. It takes some days to organize documentation, code and sensor data.

@mitsudome-r  Currently, I've organized one public repo, see link: https://gitlab.com/JianKang_Egon/li_calib/-/tree/main/
You can easily check the README for details and try this tool to know if it satisfies your need. For any question, just feel free to let me know.

@armaganarsln to provide data for lidar-imu calibration

@meliketanrikulu could you please provide the rosbag file of Applanix + Velodyne Puck?

@armaganarsln Applanix + Velodyne Puck Data:
https://drive.google.com/drive/folders/1b4hSw8oaMPje2DFNC1TUFukDl2NuduVz?usp=sharing

Thanks @JianKangEgon for the information.
Maybe we can start creating documentation page to list up potential calibration tools that developers might want to use.

@mitsudome-r yeah sure. And now my colleagues and I are parallel working on other calibration tools. Once the documentation page is created, you can assign to shark or me to fulfill it.

@JianKangEgon
Could you start creating PR to update this page?

Autocore merrged a guide for lidar-IMU calibration.
They will proceed to add a guide for lidar-camera and lidar-lidar calibration as well.

@mitsudome-r @armaganarsln yeah sure, for any question, just feel free to let me know

Let's create an issue to add it to autoware documentation page.


Add representation function for enums

In order to fix https://issues.dlang.org/show_bug.cgi?id=6227, we need to recommend the appropriate way of comparing different enum types if the user wants so. This supports that.

Auto-merge toggled on

Auto-merge toggled off

I'm not sure I follow as to why this is fixing the linked bug when the bug talks about DMD giving no warning about the comparison of different enum types when this function is about enum manifest constants.

Why?

@JackStouffer The idea is to have the error message say: "Cannot compare unrelated enums, use std.conv.representation to convert each or both to their representation type".

This function gives a safe way to convert the enums being compared to a comparable type.

Ah, ok. Be careful though, as Phobos already has a function called representation in std.string.

Yah, the use of the same name is intentional.

Let me rename it to asOriginalType which plays nice with OriginalType


don't attempt remove dom elements when not in drawable mode

done in https://github.com/mapbox/gl-draw/commit/c5a951db398d903ea59aa1387db511ccc92acf29


Submissions live feed

Closes #8
Compact version (default)

With details

Sorted by students' name

Looks awesome. How about giving a different backound color to cards instead of using different font colors?

Also, we should use yellow instead of black for those who have intermidiate results.

Looks awesome. How about giving a different backound color to cards instead of using different font colors?

I tried it, but doesn't look very well.

Also, we should use yellow instead of black for those who have intermidiate results.

Also tried it, but I think black looks better (screenshot coming).

Hahah, I dont't mean those pastel colors. I Mean light colors.

This is awesome. You rock :guitar:

I really love you

OK, let's merge this. We will see if we need any color change later


one-click-review-submission seems broken

Description

one-click-review-submission is completly broken, as show in the screenshot.
How to replicate the issue + URL
https://github.com/refined-github/refined-github/pull/6954/files
Extension version
23.9.21
Browser(s) used
Firefox

Thank you for the report! I can confirm the issue and disabled the feature globally.

Thanks @fregante. I also had this issue (before clearing cache).
I <3 this extension and this feature. I can look at fixing if you've not picked it up yet?

Yes, no one has started working on it probably

Clearing extension cache did not work for me so still issue. Or were you talking about clearing browser cache issue?

Note: the "hotfix" simply disables the feature so the website is no longer broken. For the actual fix you'll have to wait the PR above to be finished and then released (maybe in a week)


Asynchronous "manager" to retrigger load operations

Find an OSS library or implement a functionality that allows not only an initial load operation but a retrigger of the load when an action occurs in the frontend (f.e. a button click).

RxJS/React-RxJS could be a solution.
The you can listen on changes from multiple sources (e.g. on load, on button click, ...)
Example from the documentation with an on-click (your example) and timer (must be replaced, e.g. on-load):
import { merge, fromEvent, interval } from 'rxjs';

const clicks = fromEvent(document, 'click');
const timer = interval(1000);
const clicksOrTimer = merge(clicks, timer);

clicksOrTimer.subscribe(x => console.log(x)); // fires when timer or click event happens

I know this lib from developing with angular, so can help you with it.

Take a look at https://github.com/amosproj/amos-ss2021-project2-context-map/blob/ffc199d53af235c6338604b3da1ec0901e0a2606/frontend/src/search/Searchbar.tsx#L67-L73
searchInput$ fires when something is typed in the search input. In your case you would have to write it like that:
  useEffect(() => {
    const sub = merge(of(null), searchInput$.current).subscribe(...);

    return () => sub.unsubscribe();
  }, []);

of(null) fires instantly, so on the initial load (mount) operation. The query loadSearchResult() is  also triggered manually after the reload.
It also prevents memory leaks by unsubscribing to all merged observables on unmount (-> return statement of the function in useEffect).


[Menu] Component unmounting warnings when setting Popover state after Nested menu item callback

Description of problem
I seem to be unable to cleanly manage the open state of a child class component containing a popover with menu and nested menu. Whenever a nested menu item's touchtap is handled, and a callback is fired, I receive a warning when subsequently attempting to setState of the popover's open state to false.
Any references to similar warnings out in the React world point to handling subscriptions in the componentWillUnmount() lifecycle method. However, that doesn't really apply here for this scenario.
The popover is definitely mounted and doesn't unmount. I suppose the only unmounting occurring is in regard to the internal state of the nested menu... perhaps.
Unless I'm reading the stack wrong, the warning seems to dial into popover.js line 164, hating on _this2, which is sparked (in our case, anyways) when a callback request to close the menu occurs... whether in the parent containing component or the child component, which implements the popover/menu/submenu setup.
this.timeout = setTimeout(function () {
_this2.setState({
open: false
});
}, 500)
Note: this only occurs when the secondary child menu is closing. The top level menu closing doesn't invoke warning. Though, maybe that's obvious via _this2?
Steps to reproduce
/* In parent component */
 handleOpenPopover = (event) => {
    this.setState({
      popoverOpen: true,
      popoverAnchor: event.currentTarget,
    });
  };

  closePopoverMenu = () => {
    if (this.state.popoverOpen) {
      this.setState({
        popoverOpen: false,
      });
    }
  };

 render() {
     <CustomPopoverContainingWidget
             items={popoverItems}
             isExpanded={this.state.popoverOpen}
             anchorElement={this.state.popoverAnchor}
             onMenuClosed={this.closePopoverMenu}
             onItemSelected={this.closePopoverMenu}
       />
}

/* In child component called 'CustomPopoverContainingWidget' */
     <Popover
        open={this.props.isExpanded}
        anchorEl={this.props.anchorElement}
        onRequestClose={this.handleRequestClose}
        animation={PopoverAnimationVertical}
      >
        <Menu>
          {items && items.map((item) =>
                <MenuItem
                  key={item.id}
                  primaryText={item.header}
                  rightIcon={<ArrowDropRight />}
                  menuItems={
                      [ <MenuItem primaryText="Submenu Item!"
                             onTouchTap={() => this.props.onItemSelected}
                         />
                      ]}
                />
              )
          }
        </Menu>
      </Popover>

The callback that is invoked with the submenu item is clicked maps back to closePopoverMenu.
closePopoverMenu
Versions

Material-UI: 0.15.4
React: 15.3.1
Browser: Chrome 52.0.7...

+1 Same for me

Same issue, but it ended up working with animated={true}

We have been porting the component on the v1-beta branch. We reimplemented it from the ground-up. While we haven't tested it, I think that the issue is most likely fixed on that branch. Hence, I'm closing it.
Still, we will accept PR fixes until v1-beta takes over the master branch.

I am running into a similar issue where I have a component being displayed in a Popover and I don't want it to unmount when the Popover closes. Would be nice to have the option to allow the popped-over component's state to persist.


UnicodeDecodeError: 'utf8' codec can't decode byte 0x92 in position 48: invalid start byte

I just copy pasted following example:
# -*- coding: utf-8 -*-
from chatterbot import ChatBot

# Create a new instance of a ChatBot
bot = ChatBot(
    'Default Response Example Bot',
    storage_adapter='chatterbot.storage.JsonFileStorageAdapter',
    logic_adapters=[
        {
            'import_path': 'chatterbot.logic.BestMatch'
        },
        {
            'import_path': 'chatterbot.logic.LowConfidenceAdapter',
            'threshold': 0.65,
            'default_response': 'I am sorry, but I do not understand.'
        }
    ],
    trainer='chatterbot.trainers.ListTrainer'
)

# Train the chat bot with a few responses
bot.train([
    'How can I help you?',
    'I want to create a chat bot',
    'Have you read the documentation?',
    'No, I have not'
    # 'This should help get you started: http://chatterbot.rtfd.org/en/latest/quickstart.html'
])

# Get a response for some unexpected input
response = bot.get_response('How do I make an omelette?')
print(response)

I get following error:

Traceback (most recent call last):
  File "C:/Users/ccx/work/pscripts/conversationalspeech/t2.py", line 27, in <module>
    'No, I have not'
  File "C:\Users\ccx\Anaconda2\lib\site-packages\chatterbot\trainers.py", line 82, in train
    statement = self.get_or_create(text)
  File "C:\Users\ccx\Anaconda2\lib\site-packages\chatterbot\trainers.py", line 25, in get_or_create
    statement = self.storage.find(statement_text)
  File "C:\Users\ccx\Anaconda2\lib\site-packages\chatterbot\storage\jsonfile.py", line 46, in find
    values = self.database.data(key=statement_text)
  File "C:\Users\ccx\Anaconda2\lib\site-packages\jsondb\db.py", line 98, in data
    return self._get_content(key)
  File "C:\Users\ccx\Anaconda2\lib\site-packages\jsondb\db.py", line 52, in _get_content
    obj = self.read_data(self.path)
  File "C:\Users\ccx\Anaconda2\lib\site-packages\jsondb\file_writer.py", line 15, in read_data
    obj = decode(content)
  File "C:\Users\ccx\Anaconda2\lib\site-packages\jsondb\compat.py", line 32, in decode
    return json_decode(value, encoding='utf-8', object_hook=json_util.object_hook)
  File "C:\Users\ccx\Anaconda2\lib\json\__init__.py", line 352, in loads
    return cls(encoding=encoding, **kw).decode(s)
  File "C:\Users\ccx\Anaconda2\lib\json\decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Users\ccx\Anaconda2\lib\json\decoder.py", line 380, in raw_decode
    obj, end = self.scan_once(s, idx)
UnicodeDecodeError: 'utf8' codec can't decode byte 0x92 in position 48: invalid start byte

Is there any resolution to this?

I am still unable to use chatterbot due to unicode issues.

Hi @aliabbasjp, sorry about the late reply. Please make sure that you have the latest version of ChatterBot and it's dependencies by running pip install chatterbot --upgrade.
Looking at the traceback you can see that the error is being triggered in jsondb\compat.py which is one of ChatterBot's dependencies. JsonDB recently had some updates and it's possible that you either have an older version or the latest version has a problem.
What version of Python do you have installed?

@gunthercox Yes I am using the updated latest versions of both.

Also I tried on linux with the same exact problem.

That is strange, I can't recreate this issue. I'm wondering if is is possibly a difference with Anaconda and regular Python?

@aliabbasjp
I got same issue when my training dataset is having some  characters like normal white space is causing some issues while I copy data from some other editors which is causing unicode decode error. Pls check your input data, I think that is causing the error.

@deepukr85 @gunthercox  I tried all ways of giving examples but all of them fail like above.

@aliabbasjp can you try to delete existing database.db, retrain your bot? If still problems exists let us know

@vkosuri  where is this database.db ?

i think it will be in your current directory, If you are using Ubuntu try locate database.db

@vkosuri  that worked!

@vkosuri @gunthercox  The problem is that I have to delete this database.db each time I run a new script, as there are multiple bot scripts in a directory.
Moreover same error happens if we pass  unicode training statements  in bot.train
Hence should not be closed.

@aliabbasjp Two things here i observed. May be it will vary.

Python2.7
i. In python 2.7 if you train your bot with regular data, it will create a new file called database.db and then your are trying train your bot with new data which has unicode values with name database.db file Then it is failing.
Python3.x
i. You won't see these failures.

I think @gunthercox have more appropriate answer on this, My initial assumption was, while python2.x trying inserting unicdoe values into json database.db at that it was failing.

@vkosuri I don't have a better answer at the moment. I think recommending to delete the database is a poor solution. I need to look into this further to see if I can recreate the issue. If I can recreate it then I can fix it. Unfortunately when I run the code locally, it works. I can't get any unicode errors to show up. This leads me to believe that there is one of the two following problems happening here:

There is a local error occurring with the system configuration for those who have encountered this error.
There is a decoding issue with the jsondb library: https://github.com/gunthercox/jsondb


Drag to Select

User can enable flag "selectableRowsOnDrag" to allow selection using click and drag.

There is now a PR up for shift + click, which I think will be a bit more in line with selection UX in other platforms, so stayed tuned for that: https://github.com/gregnb/mui-datatables/pull/827.


Users profile page issues

Log in and go to the page /users/profile/

[ ] Notifications button isn't working
[ ] Change digital pin button isn't working.
[ ] On the page "Edit my profile" /users/profile/edit, no text is displayed above the input fields:

Disable the first two temporarily for v2.0, fix the third?


Add support for Storage - Requester Pays

Added system tests. @dwsupplee PTAL

@dwsupplee PTAL

I've added a notice regarding argument whitelist status, and believe this is ready for merge.


Doesn't seem to be working when switching from the latest version of PHP

Hey there!
When I try and switch from php 7.4.5, nothing seems to happen.
brett~/Sites$ switch-php 7.1
Password:
Valet stopped ✔
PHP switched ✔
Valet started ✔

You are now using PHP 7.4.5

I'd expect PHP 7.1 to be in use after running this.

Same here.
❯ php --version
PHP 7.4.6 (cli) (built: May 29 2020 01:44:57) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.6, Copyright (c), by Zend Technologies

❯ switch-php 7.3 -v
 👀  Verifying that Valet is installed...
 🔍  Checking which PHP versions are installed...
 🔀  Switching to<EMAIL_ADDRESS> ==>  Stopping<EMAIL_ADDRESS> ==>  Unlinking<EMAIL_ADDRESS> ==>  Linking<EMAIL_ADDRESS> ==>  Starting<EMAIL_ADDRESS> ✅  PHP switched

You are now using PHP 7.4.6

❯ php --version
PHP 7.4.6 (cli) (built: May 29 2020 01:44:57) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.6, Copyright (c), by Zend Technologies

@eleftrik aha I know exactly what's happening to you - I'll push a fix here in a bit.
@moorebrett0 not sure why yours is doing that... 🤔 Can you try running switch-php in verbose mode and sharing that here? Maybe also give me the output of brew services list while you're at it...

@eleftrik aha I know exactly what's happening to you - I'll push a fix here in a bit.

@jalendport Any news about this? Thank you very much

Hi @jalendport having this same issue when trying to switch from 7.4.7 to 7.2
> switch-php 7.2 -m 1024M -v
 👀  Verifying that Valet is installed...
 🔍  Checking which PHP versions are installed...
 🔀  Switching to<EMAIL_ADDRESS> ==>  Stopping<EMAIL_ADDRESS> ==>  Unlinking<EMAIL_ADDRESS> ==>  Linking<EMAIL_ADDRESS> ==>  Starting<EMAIL_ADDRESS> ✅  PHP switched

You are now using PHP 7.4.7

Same here

Unfortunately I have the same issue. Thank for your support.

Having the same issue, is there any news?

@jalendport -
Verifying that Valet is installed...
Password:
🔍  Checking which PHP versions are installed...
🛑  Stopping Valet...
==>  Stopping nginx...
✅  Valet stopped
🔀  Switching to<EMAIL_ADDRESS>==>  Stopping<EMAIL_ADDRESS>==>  Unlinking<EMAIL_ADDRESS>==>  Linking<EMAIL_ADDRESS>==>  Starting<EMAIL_ADDRESS>✅  PHP switched
⚙  Starting Valet...
==>  Starting nginx...
✅  Valet started

and brew services list:
Name      Status  User  Plist dnsmasq   started root  /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist mysql     started root  /Library/LaunchDaemons/homebrew.mxcl.mysql.plist<EMAIL_ADDRESS>started root<EMAIL_ADDRESS>nginx     started root  /Library/LaunchDaemons/homebrew.mxcl.nginx.plist php       started root  /Library/LaunchDaemons/homebrew.mxcl.php.plist<EMAIL_ADDRESS> started brett<EMAIL_ADDRESS>

@jalendport Just to know... Is this project dead?

Kind of the same as everybody
switch-php 7.4 -v
 👀  Verifying that Valet is installed...
 🔍  Checking which PHP versions are installed...
 🔀  Switching to<EMAIL_ADDRESS> ==>  Stopping<EMAIL_ADDRESS> ==>  Unlinking<EMAIL_ADDRESS> ==>  Stopping<EMAIL_ADDRESS> ==>  Unlinking<EMAIL_ADDRESS> ==>  Linking<EMAIL_ADDRESS> ==>  Starting<EMAIL_ADDRESS> ✅  PHP switched

You are now using PHP 7.2.34

brew services list
Name    Status  User Plist
httpd   started ...  ...
php     stopped
<EMAIL_ADDRESS>stopped
<EMAIL_ADDRESS>started ...  ...
redis   started ...  ...

@jalendport Just to know... Is this project dead?

Doesn't seem so, the last issue closed was in 2019
#12 by souhaiebtar was closed on 16 Nov 2019

same issue here

@jalendport Has this project been discontinued?

@encodia I believe it has.

@encodia I believe it has.

Of course it has... Ok, it's open source, nothing is due to anyone, but in such a case I think it's better to mark a project as discontinued / not maintained.


Problem loading hysplit file with multiple trajectories

There seems to be a bug in the pysplit code intended for reading a hysplit file with multiple trajectories in it. I was able to trace it back and fix the issue, and I'll try to explain it below.
The function load_hysplitfile() (inside file hyfile_handler.py) decides if it is reading a file with a single or multiple trajectories in it:
def load_hysplitfile(filename)
# (... many lines...)
    # Split hydata into individual trajectories (in case there are multiple)
    if multiple_traj:
        hydata, pathdata, datetime = _trajsplit(hydata, pathdata, timedata,
                                                century)
    else:
        print('hmjb', timedata)
        datetime = _getdatetime(century, timedata)

Function _trajsplit() will then sort the hysplit lines, so that all lines corresponding to the same trajectory are grouped:
def _trajsplit(hydata, pathdata, timedata, century):
# (... many lines...)
    # Find number of unique trajectories within `hydata`
    unique_traj = np.unique(hydata[:, 0])

    # Sort the array row-wise by the first column
    # Timepoints from same traj now grouped together
    sorted_indices = np.argsort(hydata[:, 0], kind='mergesort')
    sorted_hydata = hydata[sorted_indices, :]
    sorted_pathdata = pathdata[sorted_indices, :]
    sorted_timedata = timedata[sorted_indices, :]

It then tries to identify (in the sorted arrays) where is the start position (i.e. first line number) for each trajectory.
    # Find first occurrence of each traj, except for the first
    # which is obviously 0
    first_occurrence = [np.nonzero(sorted_indices == u)[0][0]
                        for u in unique_traj[1:]]

The problem happens at this point.
The code takes each trajectories number (in my case, trajectories 1 to 8) and search for all the positions (in the sorted arrays) where that trajectory occurs. The problem is the use of sorted_indices, which hold the positions in the sorted array. If we print the values in sorted_indices[:] we will have numbers 0 to the number of lines in the hysplit file (in my case, 124).
The correct would be to use sorted_hydata[:,0] which is the first column (i.e. ID of trajectory) in the sorted arrays. If we print the values in sorted_hydata[:,0], they will be those in unique_traj (in my case, 1 to 8). The corrected code looks like this:
    # Find first occurrence of each traj, except for the first
    # which is obviously 0
    # BUG first_occurrence = [np.nonzero(sorted_indices == u)[0][0]
    first_occurrence = [np.nonzero(sorted_hydata[:,0] == u)[0][0]
                        for u in unique_traj[1:]]

Could any of the developers have a look and confirm this?

You're completely right, looking through sorted_indices for the first occurrence of each traj is nonsense; we need to look through the traj numbers in the first col of sorted_hydata.  Want to make a PR?

I just submitted the pull request. However, I wasn't able to link it to this issue (for automatic closing it). I think it has to be done by you, right? I'm no expert on github, but I think it would automatically close my open issue once you accept the PR and merge  with the main branch.


Startup fails

When starting up with python gradio_app_sdxl_specific_id_low_vram.py I get the following error:
FileNotFoundError: [Errno 2] No such file or directory: './examples/Robert'

Just create that folder and will work.

@sapg I forget to upload the image of "Robert", I have fixed it.


Can squeezeDet handle arbitrary image resolution?

It seems the image resolution is fixed in the configuration files. Changing the image resolution breaks the system with the pretrained models (leads to error in nn_skeleton.py", line 159, in _add_interpretation_graph).
So, my conclusion is that image resolution has to be fixed and for each resolution, the network needs to be modified(???). Moreover, it cannot handle arbitrary resolutions (big disadvantage, but can still be useful for fixed size datasets or videos).
Is this conclusion correct?

Just resize the image before feeding it to the network?

This seems to be the easiest solution, but it is not practical for most datasets, especially when the aspect ratios are different.

You can pad the images so that they all get to a target aspect ratio.
On Tue, 11 Jul 2017 at 1:27 PM, Muhammet Bastan<EMAIL_ADDRESS>wrote:

This seems to be the easiest solution, but it is not practical for most
datasets, especially when the aspect ratios are different.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/BichenWuUCB/squeezeDet/issues/66#issuecomment-314326814,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AN_wJtUVAPZ-Vhp8ex_sLKIGKNl3wKhTks5sMwe4gaJpZM4OHkLM
.


Add include_directories for OpenMP

This is needed on systems (such as clang on MacOS) that use non-standard locations of omp.h.
Fixes #109

PR to wrong repo


Use the runtime api when calling backend.run

The goal is the run all jobs through the runtime api, so we should call the runtime backend.run when running circuit jobs through this provider

Goal: Use the qiskit runtime api instead of the IQX api to run jobs through backend.run. By default, the circuit-runner runtime program will be used to run these jobs (but other programs like qasm3-runner can also be passed in). There are many parameters that may not be supported by the runtime api and these unsupported keywords will be ignored. Instead of just importing qiskit-ibm-runtime, the ultimate goal is to have qiskit-ibm-runtime depend on qiskit-ibm-provider.
Implementation: Similar to the old implementation in qiskit-ibmq-provider, when the provider is initialized, we will pass the credentials into a runtime service class. This class will only need  a run method that runs jobs through the runtime api. A lot of the code from qiskit-ibm-runtime will initially have to be copied over (but we should try to minimize this).
Notes:

qiskit-ibm-provider is IQX only, no cloud accounts (opens further discussion to how we want to handle multiple channels in the future)
composite jobs are not currently supported by the runtime api but we can possibly add this functionality later

composite jobs are not currently supported by the runtime api but we can possibly add this functionality later

Composite jobs were not supported by the IQX API either. It was entirely done from the client side (using tags).


How to prevent custom headers transformed lowercase?

I try to send custom header, but it send in lowercase which my server doesn't accept it.

nuxt3 issue: https://github.com/nuxt/framework/issues/6657

The keys in the custom 'headers' will be wrapped by the' headers' object and automatically converted to lowercase

Closed according to https://github.com/nuxt/framework/issues/6657#issuecomment-1222238122
Please let us know if you find a provider that cares case-sensitivity.


Update numpy version to correct np.float error

numpy 1.20 removed np.float functionality (used in make_tensors.py) in favor of float and now raises an error. Modified setup to use versions <1.20.

to be honest, I'm not entirely sure that np.float check is doing what I wanted it to. Should probably be using np.issubdtype and np.floating instead. Plus, since Colab now runs Python 3.10 which isn't compatible numpy 1.19, I think fixing those lines of code will be a better solution than changing the version requirement. I'll work on putting that together in the next day or so

Makes sense, I tried just replacing np.float with Python float and that worked too. Might be a bit cleaner.

Yeah I think replacing np.float with float preserves the current functionality, but what I actually intended for that code to do was allow all float dtypes (float32, float64, etc.) to pass that check, while I believe using float or np.float only allows float64 to pass. Will test out both solutions


Add apprenticeship contract for handler

Description :sparkles:
Add apprenticeship attachment doc to handler's application view.

As per spec HL-629
Implementation done according to: "Voidaan toteuttaa joko otsikon Palkkatukipäätös alle ...",  because in this section there was already a field Onko kyseessä oppisopimus? Kyllä / Ei.

See image, first application does not have "oppisopimus" selected.

Codecov Report

Merging #1806 (3790c69) into develop (a8d126b) will decrease coverage by 42.85%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##           develop    #1806       +/-   ##
============================================
- Coverage    66.71%   23.87%   -42.85%
============================================
  Files          920       92      -828
  Lines        26585     2036    -24549
  Branches      2559      500     -2059
============================================
- Hits         17737      486    -17251
+ Misses        8501     1503     -6998
+ Partials       347       47      -300

Impacted Files
Coverage Δ

...pplicationReview/paySubsidyView/PaySubsidyView.tsx
62.96% <100.00%> (+1.42%)
:arrow_up:

...components/applicationReview/ApplicationReview.tsx
0.00% <0.00%> (ø)

...onents/applicationsArchive/ApplicationsArchive.tsx
0.00% <0.00%> (ø)

...gApplicationActions/HandlingApplicationActions.tsx
0.00% <0.00%> (ø)

frontend/tet/shared/src/components/MapScripts.tsx

...d/tet/shared/src/components/ScreenReaderHelper.tsx

...nd/benefit/applicant/src/hooks/useMessagesQuery.ts

...d/shared/src/components/forms/inputs/TextInput.tsx

...ackend/shared/shared/oidc/tests/test_oidc_views.py

...ponents/forms/inputs/SocialSecurityNumberInput.tsx

... and 837 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more