 We use link time redirection of malloc and friends in
order to catch all occurrences. Thread creation is hooked by including
gc.h in RTS and the DB client (which are the two places where we create
threads).
An earlier attempt was made to change our source code from using malloc
& friend to GC_MALLOC & friends but as it is exceedingly difficult to
find all mallocs, it regularly produced programs that segfaulted. libuv
and yyjson allows using a custom malloc but other libraries, like
utf8proc, doesn't appear to have functionality for specifying which
malloc to use and so it becomes rather difficult. Thus, this approach
was abandoned in preference of link time redirection of malloc.
Thread creation is hooked in source code as this is the only way that
works on MacOS. GC_USE_DLOPEN_WRAP allows wrapping dlopen so that on
Linux, hooks are installed at run time when the application is
dynamically linked with libpthreads. This facility does not exist on
MacOS which is why we are instead hooking it via source (by setting
GC_THREADS 1 and including gc.h). It ought to be more stable setting
this in source too. This is however untested, libgc even has an error in
gcconfig.h defined for this, so there's some uncertainty if there might
be bugs. It seems to work though.
libgc allows control via environment variables, most notably export
GC_DONT_GC=1 will disable the GC. This can be useful in case we suspect
the GC causes some problems. Once we've gained confidence with the GC,
we should disable this at compile time by setting -DNO_GETENV.
I've tested this primarily with the perf/ring program, which is a form
of benchmarking program that sends messages between actors as fast as
possible. Before this patch, on my laptop, ring consumes around 12GB of
RAM after running for about 1 minute sustaining around 800k messages per
second. With libgc, memory consumption stays constant at 4.5MB while
maintaining roughly the same message rate. I haven't collected a lot of
statistics and the variation between test rounds is probably around 10%.
I cannot see a clear pattern between using GC and not on this
performance.
As far as I understand, libgc does pause all threads every now and then
in order to collect a correct view of registers and similar. This means
that concurrency likely will be hit harder in Acton than the kind of
single threaded / low concurrency applications used in the above
mentioned benchmarking. ring is actually quite "single threaded" in that
there is only one outstanding message in total being passed between the
actors so we might not see those effects clearly.
The longer term plan is obviously to implement our own GC that does
things the Acton way and will be way more efficient in various but until
then... this'll do I think :)

We are seeing intermittent failures on this branch and I've been running some tests in order to get a better view of this.
I've run 1000 iterations for each case
OS              branch  GC      test        FAIL
debian:testing  libgc   yes     db_app         6
debian:testing  libgc   yes     tcp_client     6
debian:testing  libgc   yes     tcp_serv      12
debian:testing  libgc   no      db_app         5
debian:testing  libgc   no      tcp_client    14
debian:testing  libgc   no      tcp_serv      17
ubuntu:20.04    libgc   yes     db_app         0
ubuntu:20.04    libgc   yes     tcp_client     1
ubuntu:20.04    libgc   yes     tcp_serv     132
ubuntu:20.04    libgc   no      db_app         0
ubuntu:20.04    libgc   no      tcp_client     1
ubuntu:20.04    libgc   no      tcp_serv       1
macos12         libgc   yes     db_app         1
macos12         libgc   yes     tcp_client     3
macos12         libgc   yes     tcp_serv       0
macos12         libgc   no      db_app         0
macos12         libgc   no      tcp_client     0
macos12         libgc   no      tcp_serv       1
macos12         main    no      db_app         0
macos12         main    no      tcp_client     1
macos12         main    no      tcp_serv       1

the notable outlier is the tcp_server test on Ubuntu 20.04 which sees 13.2% failures and that is also what I "feel" from CI runs, it fails fairly regularly. With the GC turned off we see a single failure, so that's a stark difference - the GC has definitely made things worse.
However, on other platforms we don't see that. I think it is interesting to note that we have some level of failures even without the GC (see reference tests on main branch at bottom of list).
On debian:testing, which is what I run on my main machine, there is certainly a visible increase of failures with GC turned on. Since we see failures even without the GC my gut feeling is that the test is somehow timing related and the GC makes this worse since it influences timings. This is a guess though, while I have looked at the tests a bit I haven't been able to discern what makes them fail. At least it's not a segfault!
I want to emphasize that I haven't seen a single segfault with this GC configuration! If the GC was broken or didn't interoperate well with our code, I would expect segfaults. As that doesn't happen, I think it's basically sound... although it leaves the increased failure rate a mystery.

It's looking somewhat optimistic. I've now run 2000 test invocations on my local computer without a single failure. It usually fails way earlier, so things are indeed looking good.
All CI tests have passed too, but I'll run through a couple of more runs. We could perhaps consider adding more extensive testing, like adding Ubuntu 20.04 back in, before merging this since we've seen failures on it. On the other hand, I really do think we've addressed those failures with #1088, so perhaps we should just move forward and we'll get around to testing more on older Ubuntu later. As I said, I'll run through quite a few more complete CI runs anyway before we merge this.

For the record, my tests failed around 2500 runs but I don't think the failure is like any other we've seen. It complains about getting the wrong data back from the test server:
testERR: Got unexpected data from server in state 2: 1

I dunno why that is but I reckon it is more likely it has to do with incomplete handling in the test runner script than with Acton itself.


Suppress the REPL's prompt while a command is running

REPLStream's _transform function explicitly calls replserver.displayPrompt which causes a bug printing the REPL prompt before the value returned by a command, if that command happens to output something to the console. It looks like the value was typed by the user, while it really was just returned by the command they ran.
Node.js' behavior:
> console.log('test')
test
undefined
>

SataniaBot's behavior:
> console.log('test')
test
> undefined
>

This patch suppresses printing the prompt while the command invoked from the REPL is running. Basically it replaces the REPL's eval function with a function which first sets the prompt to an empty string, then runs the eval function the REPL would normally run, then sets the prompt back to whatever it was, so SataniaBot's REPL behaves the same as Node.js's REPL.

Thanks sai!!! ♥


Some suggestions

Hi. Ilike the work you are doing on this repo and would like to suggest the following:

I would like to be added as a maintainer of this project to ensure the longevity of the project.
I would suggest you consider adding this project to the list of wagtail packages for more visibility.
I would like to take this project a notch higher with some new blocks and extras.
Thanks.

Hi - thanks for your work!
Would you mind adding inside the uikit grid body options, such as accordeon, switch etc, that the body can contain all uikit features such as embed, or richtextfield options, and so on..... so that this can be edited via the wagtail interface and not in the html code of each page created.


RangeError

flutter_masked_text: ^0.8.0
If you long press to select a number masked input and then try to key got this error
RangeError: Invalid value: Not in range 0..1, inclusive: -1

Update: You can dodge the error defining enableInteractiveSelection: false on textField

HI @andredealmei , could you provide a code sample?

Closing due inactivity.
If the issue persists, let me know but please provide a code sample. =)


Feature Request: IgnoreNullProperties switch on ConvertTo-Json

Summary of the new feature/enhancement
Many REST API that consume JSON don't accept null values, and sometimes when dealing with PowerShell objects this is easier said than done, especially if you're using pre-build .NET stuff. It would be nice if there was a switch parameter on the cmdlet to ignore properties with null values in the JSON string output.
Proposed technical implementation details (optional)
I currently have a solution for this from this thread, but I imagine I'm not the only with this issue, so this could be a nice solution. Given any PowerShell Object:
$PowerShellObject | ForEach-Object {

    $NonEmptyProperties = $_.psobject.Properties | Where-Object {$null -ne $_.Value} | Select-
   Object -ExpandProperty Name

    # Convert object to JSON with only non-empty properties
    $_ | Select-Object -Property $NonEmptyProperties | ConvertTo-Json
}

It would be as simple as:
JsonSerializer _jsonWriter = new JsonSerializer {
                                 NullValueHandling = NullValueHandling.Ignore
                             };

I've been taking a look at this, and it doesn't seem like setting the NullValueHandling alone catches all nulls. For example, the following:
$object = @{
  NotNullProperty = "not-null",
  NullProperty = $null
}

serializes to:
{
  "NotNullProperty": "not-null",
  "NullProperty": null
}

I'm not sure if there's a bug in what I've written so far, or if LanguagePrimitives.IsNullLike should be involved somehow? Is there some other way of checking for $null (and others) that should be used by cmdlets?

I haven't looked into doing this in the C# class yet, but for a temporary fix, and in case someone else needs this functionality, here's what I've come up with (with help from some people on the PowerShell Slack):
function ConvertTo-NoNullsJson {
    <#
    .SYNOPSIS
        Converts an object into JSON format without any null key value pairs.
    .DESCRIPTION
        This function takes a PowerShell Object and passes it to Remove-NullProperties.
        This removes all the properties with null values, and outputs the JSON.
        This is for use with APIs that don't like null values.
    .PARAMETER InputObject
        The object from which to remove null properties.
    .PARAMETER Depth
        An integer representing the level of objects to convert to JSON. This is the same of the ConvertTo-Json cmdlet.
    .EXAMPLE
        $SomeObject | ConvertTo-NoNullsJson -Depth 5
    #>
    [CmdletBinding()]
    param(
        [Parameter(ValueFromPipeline)]
        [object]
        $InputObject,

        [int]
        $Depth = 2
    )
    begin {
        $list = [System.Collections.Generic.List[System.Object]]::new()
    }
    process {
        $list.Add((Remove-NullProperties -InputObject $InputObject))
    }
    end {
        $list | ConvertTo-Json -Depth $Depth
    }
}

_
function Remove-NullProperties {
    <#
    .SYNOPSIS
        Removes null properties from an object.
    .DESCRIPTION
        This function recursively removes all null properties from a PowerShell object.
    .PARAMETER InputObject
        A PowerShell Object from which to remove null properties.
    .EXAMPLE
        $Object | Remove-NullProperties
    #>
    [CmdletBinding()]
    param(
        [Parameter(Mandatory, Position = 0, ValueFromPipeline)]
        [object]
        $InputObject
    )
    foreach ($object in $InputObject) {
        if ($object -is [string] -or $object.GetType().IsPrimitive) {
            $object
            return
        }

        $NewObject = @{ }
        $PropertyList = $object.PSObject.Properties | Where-Object { $null -ne $_.Value }
        foreach ($Property in $PropertyList) {
            $NewObject[$Property.Name] = Remove-NullProperties $Property.Value
        }
        [PSCustomObject]$NewObject
    }
}

It would be as simple as:
JsonSerializer _jsonWriter = new JsonSerializer {
                                 NullValueHandling = NullValueHandling.Ignore
                             };

@iSazonov  Isn't it JsonSerializerSettings here ?

@kvprasoon https://www.newtonsoft.com/json/help/html/P_Newtonsoft_Json_JsonSerializer_NullValueHandling.htm
Your case is also possible.

but it isn't working here...
https://github.com/kvprasoon/PowerShell/blob/jsonnull/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/JsonObject.cs#L479

Sample in https://www.newtonsoft.com/json/help/html/T_Newtonsoft_Json_NullValueHandling.htm
says that this should work.

yeah, I followed that. May be a bug in it !

@kvprasoon I took your changes and figured a way to work around this problem (hope that's ok). Here's my code: https://github.com/mdalepiane/PowerShell/blob/jsonnull/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/JsonObject.cs#L725
What do you think of this approach?

@mdalepiane I think you may want to move the null-value check to first thing in the loop there. That way, if you end up with a key that can't be cast to string properly (unlikely, but I suppose it can happen) which also has a null value, it'll be ignored. If the value is null and you're ignoring null values, there's no reason to error out in the case that the key can't be serialized correctly -- even if it could, you'd be skipping it anyway.

https://github.com/JamesNK/Newtonsoft.Json/blob/23be46f665887c9be03faf7864ae98890ca08246/Src/Newtonsoft.Json.Tests/Documentation/SerializationTests.cs#L762-L806
It seem works.

I'd prefer to get understanding why this does not work before fix.

I've found an issue in Newtonsoft.Json repo (#1997) that's exactly our problem here. It seems that NullValueHandling.Ignore is not yet supported for Dictionary objects. I'm looking at a fix for that too, but it might take a while.

@mdalepiane Thanks for the investigation! I think we can use a workaround for the case. But I still expect that NullValueHandling = NullValueHandling.Ignore should be used to address other scenarious.

@iSazonov while working on that I figured out there's a catch: when preprocessing the objects, before calling JsonConvert, we actually convert JObject and CustomObjects into dictionaries. So the workaround will have to be applied to those types too. You think this is still a way to go?

You think this is still a way to go?

Yes, I'd expect a consistency. Please create tests for all cases.

Please create tests for all cases.

Done! I added the following tests to cover all places where code was added:

TestDictionaryConvertToJsonWithIgnoreNullPropertiesFalse
TestDictionaryConvertToJsonWithIgnoreNullPropertiesTrue
TestObjectConvertToJsonWithIgnoreNullPropertiesFalse
TestObjectConvertToJsonWithIgnoreNullPropertiesTrue
TestJObjectConvertToJsonWithIgnoreNullPropertiesFalse
TestJObjectConvertToJsonWithIgnoreNullPropertiesTrue

I tried to use workaround sample code posted by @mgeorgebrown89 to achieve the similar goal: get rid of null properties in json.
Having this json as an input (result of az cli invocation):
{
      "automatic": true,
      "compositeIndexes": null,
      "excludedPaths": [
        {
          "path": "/\"_etag\"/?"
        }
      ],
      "includedPaths": [
        {
          "indexes": null,
          "path": "/*"
        }
      ],
      "indexingMode": "consistent",
      "spatialIndexes": null
}

I passed it to external command line tool. The tool complained while deserializing the json that null values couldn't be assigned to properties. So I needed to strip properties with null values.
Proposed script didn't work for me because of the weird handling that powershell does to arrays.
So I modified it a bit to enforce array handling. Sharing together with the test case.
But, again, I'd love to see the feature built-in to the cmdlet to avoid these tricky workarounds.
# Original workaround functions - for the sake of demonstrating the issue
function ConvertTo-NoNullsJson {
    <#
    .SYNOPSIS
        Converts an object into JSON format without any null key value pairs.
    .DESCRIPTION
        This function takes a PowerShell Object and passes it to Remove-NullProperties.
        This removes all the properties with null values, and outputs the JSON.
        This is for use with APIs that don't like null values.
    .PARAMETER InputObject
        The object from which to remove null properties.
    .PARAMETER Depth
        An integer representing the level of objects to convert to JSON. This is the same of the ConvertTo-Json cmdlet.
    .EXAMPLE
        $SomeObject | ConvertTo-NoNullsJson -Depth 5
    #>
    [CmdletBinding()]
    param(
        [Parameter(ValueFromPipeline)]
        [object]
        $InputObject,

        [int]
        $Depth = 2
    )
    begin {
        $list = [System.Collections.Generic.List[System.Object]]::new()
    }
    process {
        $list.Add((Remove-NullProperties -InputObject $InputObject))
    }
    end {
        $list | ConvertTo-Json -Depth $Depth
    }
}

function Remove-NullProperties {
    <#
    .SYNOPSIS
        Removes null properties from an object.
    .DESCRIPTION
        This function recursively removes all null properties from a PowerShell object.
    .PARAMETER InputObject
        A PowerShell Object from which to remove null properties.
    .EXAMPLE
        $Object | Remove-NullProperties
    #>
    [CmdletBinding()]
    param(
        [Parameter(Mandatory, Position = 0, ValueFromPipeline)]
        [object]
        $InputObject
    )
    foreach ($object in $InputObject) {
        if ($object -is [string] -or $object.GetType().IsPrimitive) {
            $object
            return
        }

        $NewObject = @{ }
        $PropertyList = $object.PSObject.Properties | Where-Object { $null -ne $_.Value }
        foreach ($Property in $PropertyList) {
            $NewObject[$Property.Name] = Remove-NullProperties $Property.Value
        }
        [PSCustomObject]$NewObject
    }
}

# Alternative implementation (limited to handle an object that was created via CreateFrom-Json)
function Remove-NullPropertiesForObject([object] $InputObject)
{
    if ($InputObject -is [string] -or $InputObject.GetType().IsPrimitive) {
        $InputObject
        return
    }

    $NewObject = @{ }
    $PropertyList = $InputObject.PSObject.Properties | Where-Object { $null -ne $_.Value -and $_.MemberType -eq 'NoteProperty' }
    foreach ($Property in $PropertyList) {
        if ($Property.Value -is [array]) {
            $NewObject[$Property.Name] = @(Remove-NullPropertiesForArray($Property.Value))
        }
        else {
            $NewObject[$Property.Name] = Remove-NullPropertiesForObject($Property.Value)
        }
    }
    [PSCustomObject]$NewObject
}

function Remove-NullPropertiesForArray([array] $InputObject)
{
    [array]$r = @()
    foreach ($item in $InputObject) {
        if ($item -is [array]) {
            $newItem = @(Remove-NullPropertiesForArray($item))
        } else {
            $newItem = Remove-NullPropertiesForObject($item)
        }

        $r += $newItem
    }
    $r
}

$t = @'
{
      "automatic": true,
      "compositeIndexes": null,
      "excludedPaths": [
        {
          "path": "/\"_etag\"/?"
        }
      ],
      "includedPaths": [
        {
          "indexes": null,
          "path": "/*"
        }
      ],
      "indexingMode": "consistent",
      "spatialIndexes": null
}
'@

Write-Host Testing complex object case
Write-Host 1
$t | ConvertFrom-Json | ConvertTo-NoNullsJson
Write-Host 2
Remove-NullPropertiesForObject($t | ConvertFrom-Json) | ConvertTo-Json

And this is the output:
Testing complex object case
1
{
    "indexingMode":  "consistent",
    "automatic":  true,
    "includedPaths":  {
                          "path":  "/*"
                      },
    "excludedPaths":  {
                          "path":  "/\"_etag\"/?"
                      }
}
2
{
    "indexingMode":  "consistent",
    "automatic":  true,
    "includedPaths":  [
                          {
                              "path":  "/*"
                          }
                      ],
    "excludedPaths":  [
                          {
                              "path":  "/\"_etag\"/?"
                          }
                      ]
}

Please create tests for all cases.

Done! I added the following tests to cover all places where code was added:

TestDictionaryConvertToJsonWithIgnoreNullPropertiesFalse
TestDictionaryConvertToJsonWithIgnoreNullPropertiesTrue
TestObjectConvertToJsonWithIgnoreNullPropertiesFalse
TestObjectConvertToJsonWithIgnoreNullPropertiesTrue
TestJObjectConvertToJsonWithIgnoreNullPropertiesFalse
TestJObjectConvertToJsonWithIgnoreNullPropertiesTrue

Any update on the feature request? Has been a while

Please create tests for all cases.

Done! I added the following tests to cover all places where code was added:

TestDictionaryConvertToJsonWithIgnoreNullPropertiesFalse
TestDictionaryConvertToJsonWithIgnoreNullPropertiesTrue
TestObjectConvertToJsonWithIgnoreNullPropertiesFalse
TestObjectConvertToJsonWithIgnoreNullPropertiesTrue
TestJObjectConvertToJsonWithIgnoreNullPropertiesFalse
TestJObjectConvertToJsonWithIgnoreNullPropertiesTrue

Any update on the feature request? Has been a while

"A while" :D Yes.


Unify padding parsers, make SUI operate on struct Thickness

The code in #17909 was not completely right for padding values with fewer than four components, and it was doing some fragile string math (that is: if you wanted to change the third element in the padding it would parse out the whole thing, edit the third value, and then format it again).
This pull request moves the control's padding parser into cppwinrt_utils (for lack of a better place) and makes the settings UI use it to parse the padding out into a Thickness as early as possible. Then, the controls operate directly on the Thickness' members rather than parsing the padding string again.
To handle two-way serialization properly, we also required a function that converts a thickness back into a reduced string representation (i.e. when all four values are N, it will return "N").
As a bonus, this pull request also:

removes another use of std::getline
fixes an issue where resetting the padding would change it (infinitesimally) and cause it to be set again
adds a readout of the current padding value in the expander itself


Weird sweep transaction

Relai: https://github.com/breez/breez-sdk-relai/issues/52
Outputs are swept to the same addresses resulting in loosing fees:
Channel was closed here: https://blockstream.info/tx/463972904772472b38fa1cc907e5143a5af1a008cb373179c22f4d824d72e11f
Two first outputs are anchors and it seems that the 3rd and the 5th are the user's outputs.
The 302744 sats output was swept here: https://blockstream.info/tx/34f9063fbb2e935dd45225c9b45e68dadcd6857e145911d85e20ccee1bdf6bc0
The 72000 sats seems to be swept here: https://blockstream.info/tx/fe770e36682f73a91ee4fbe535828825f2900067492777510d1fa834f9161f93
But this transaction is really strange since it takes two outputs and send them to the same address so it only looses fees.

Any update?

Did I not have an extensive timeline prepared for this issue? I seem to remember looking into the 72k output (that's an HTLC second stage TX being materialized and then swept).
As far as I can see all outputs are swept correctly, and can be unilaterally spent. The one missing output was #2, which as mentioned above was first moved forward, via the second stage HTLC transaction (a81993c61a586c4d99e8050d70139e03223dfa7a540140d3f59261842a23a1c6:0), and then finally swept after the timeout expired in 00299a87a7180571762ff322d44817816656c1170a7ff20fce83606c658f11a6:0.
Notice that the second stage HTLC transaction is dropped on-chain before the HTLC timeout expires, and as such it is normal for an HTLC to be laying on-chain for a while before the timeout expires, and it can be swept.


TypeError: expected string or bytes-like object

I am using Google Colab for continued pretraining, and this error occurs when I switch from a T4 to an A100 GPU. Additionally, I use !pip install triton==2.3.0 to prevent bugs that arise when adding the LM block in QLoRA.

This code works well if I am using T4, so I guess there is something wrong with the version.

Facing the same issue in T4 as well

Facing the same issue in T4 as well in colab. Moreover, while trying to run from my linux PC, this error does not come, instead the downloading stuck at around 95% (see screenshot). Anyone knows a solution? Thanks in advance.

@Muhammadkamrul On downloading, try before importing Unsloth and put:
import os
os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "0"
import unsloth

@TanmayDoesAI @lkyllx0 Are you both using triton == 2.3.0?

@danielhanchen  Yes, I am using triton == 2.3.0.
I am using it because when I run trainer.train(), it throws an error stating that "the first input (fp16) must match the second input (fp32)."

Getting the same error on  a 4090 via docker.
Installation
FROM nvcr.io/nvidia/pytorch:23.12-py3
RUN pip install datasets==2.17.1
RUN pip install --upgrade bitsandbytes wandb transformers unsloth-zoo
RUN pip install "unsloth[cu123-torch220] @ git+https://github.com/unslothai/unsloth.git"

from unsloth import FastLanguageModel
  File "/usr/local/lib/python3.10/dist-packages/unsloth/__init__.py", line 174, in <module>
    from .models import *
  File "/usr/local/lib/python3.10/dist-packages/unsloth/models/__init__.py", line 15, in <module>
    from .loader  import FastLanguageModel, FastVisionModel
  File "/usr/local/lib/python3.10/dist-packages/unsloth/models/loader.py", line 15, in <module>
    from ._utils import is_bfloat16_supported, HAS_FLASH_ATTENTION, HAS_FLASH_ATTENTION_SOFTCAPPING
  File "/usr/local/lib/python3.10/dist-packages/unsloth/models/_utils.py", line 406, in <module>
    if Version(xformers_version) >= Version("0.0.27"):
  File "/usr/local/lib/python3.10/dist-packages/packaging/version.py", line 198, in __init__
    match = self._regex.search(version)
TypeError: expected string or bytes-like object

Will check apologies!

Any updates? Unsloth seems unusable for newcomers without this

Getting the same error on a 4090 via docker.
Installation
FROM nvcr.io/nvidia/pytorch:23.12-py3
RUN pip install datasets==2.17.1
RUN pip install --upgrade bitsandbytes wandb transformers unsloth-zoo
RUN pip install "unsloth[cu123-torch220] @ git+https://github.com/unslothai/unsloth.git"

Traceback
from unsloth import FastLanguageModel
  File "/usr/local/lib/python3.10/dist-packages/unsloth/__init__.py", line 174, in <module>
    from .models import *
  File "/usr/local/lib/python3.10/dist-packages/unsloth/models/__init__.py", line 15, in <module>
    from .loader  import FastLanguageModel, FastVisionModel
  File "/usr/local/lib/python3.10/dist-packages/unsloth/models/loader.py", line 15, in <module>
    from ._utils import is_bfloat16_supported, HAS_FLASH_ATTENTION, HAS_FLASH_ATTENTION_SOFTCAPPING
  File "/usr/local/lib/python3.10/dist-packages/unsloth/models/_utils.py", line 406, in <module>
    if Version(xformers_version) >= Version("0.0.27"):
  File "/usr/local/lib/python3.10/dist-packages/packaging/version.py", line 198, in __init__
    match = self._regex.search(version)
TypeError: expected string or bytes-like object

I was able to fix the error. First, i downgraded xformers to 0.0.26.post1 (>0.027), but then, i got another error:
  File "/app/train_cpt.py", line 1, in <module>
    from unsloth import FastLanguageModel
  File "/usr/local/lib/python3.10/dist-packages/unsloth/__init__.py", line 174, in <module>
    from .models import *
  File "/usr/local/lib/python3.10/dist-packages/unsloth/models/__init__.py", line 16, in <module>
    from .granite import FastGraniteModel
  File "/usr/local/lib/python3.10/dist-packages/unsloth/models/granite.py", line 15, in <module>
    from .llama import *
  File "/usr/local/lib/python3.10/dist-packages/unsloth/models/llama.py", line 19, in <module>
    from ._utils import *
  File "/usr/local/lib/python3.10/dist-packages/unsloth/models/_utils.py", line 325, in <module>
    from transformers.models.llama.modeling_llama import logger
  File "/usr/local/lib/python3.10/dist-packages/transformers/models/llama/modeling_llama.py", line 40, in <module>
    from ...modeling_utils import PreTrainedModel
  File "/usr/local/lib/python3.10/dist-packages/transformers/modeling_utils.py", line 48, in <module>
    from .loss.loss_utils import LOSS_MAPPING
  File "/usr/local/lib/python3.10/dist-packages/transformers/loss/loss_utils.py", line 19, in <module>
    from .loss_deformable_detr import DeformableDetrForObjectDetectionLoss, DeformableDetrForSegmentationLoss
  File "/usr/local/lib/python3.10/dist-packages/transformers/loss/loss_deformable_detr.py", line 4, in <module>
    from ..image_transforms import center_to_corners_format
  File "/usr/local/lib/python3.10/dist-packages/transformers/image_transforms.py", line 22, in <module>
    from .image_utils import (
  File "/usr/local/lib/python3.10/dist-packages/transformers/image_utils.py", line 59, in <module>
    from torchvision.transforms import InterpolationMode
  File "/usr/local/lib/python3.10/dist-packages/torchvision/__init__.py", line 6, in <module>
    from torchvision import _meta_registrations, datasets, io, models, ops, transforms, utils
  File "/usr/local/lib/python3.10/dist-packages/torchvision/_meta_registrations.py", line 26, in <module>
    def meta_roi_align(input, rois, spatial_scale, pooled_height, pooled_width, sampling_ratio, aligned):
  File "/usr/local/lib/python3.10/dist-packages/torchvision/_meta_registrations.py", line 18, in wrapper
    if torchvision.extension._has_ops():
AttributeError: partially initialized module 'torchvision' has no attribute 'extension' (most likely due to a circular import)

Then i installed torchvision and it worked. FA2 was broken, though.
I think it would be nice to have an official Dockerfile.
Dockerfile
FROM nvcr.io/nvidia/pytorch:24.04-py3

RUN apt-get update && apt-get install -y git

RUN pip install --upgrade pip

RUN pip install --no-cache-dir packaging setuptools wheel

RUN pip install torchvision==0.18.0 --no-deps

WORKDIR /app

COPY requirements.txt .

COPY . /app

RUN pip install -r requirements.txt

COPY . .

ENTRYPOINT ["python", "train_cpt.py"]

requirements.txt
wandb==0.15.2
ninja==<IP_ADDRESS>
einops==0.8.0
transformers==4.47.1
huggingface-hub==0.27.0
bitsandbytes==0.45.0
xformers==0.0.26.post1
flash-attn==2.7.2.post1
unsloth_zoo==2024.12.1
unsloth[cu125-torch230] @ git+https://github.com/unslothai/unsloth.git

Still facing this problem on H100 environment...

Was able to solve this by installing a few other dependencies and adding a parameter. I'm using Google Colab.
I had to install the latest version of xformers, torch, torchvision and torchaudio.
%%capture
!pip install unsloth
!pip uninstall unsloth -y && pip install --upgrade --no-cache-dir --no-deps git+https://github.com/unslothai/unsloth.git
!pip install bitsandbytes triton unsloth-zoo xformers --upgrade --no-cache-dir --no-deps
!pip install --upgrade torch torchvision torchaudio

And add num_proc=1 to the dataset part.
EOS_TOKEN = tokenizer.eos_token # Must add EOS_TOKEN
def formatting_prompts_func(examples):
    instructions = examples["instruction"]
    inputs       = examples["input"]
    outputs      = examples["output"]
    texts = []
    for instruction, input, output in zip(instructions, inputs, outputs):
        # Must add EOS_TOKEN, otherwise your generation will go on forever!
        text = alpaca_prompt.format(instruction, input, output) + EOS_TOKEN
        texts.append(text)
    return { "text" : texts, }
pass

from datasets import load_dataset
dataset = load_dataset("yahma/alpaca-cleaned", split = "train")
dataset = dataset.map(formatting_prompts_func, batched = True, num_proc=1,)


Add max-instances and concurrency options

Only adds options if defined by user (otherwise doesn't pass a default value, allowing downstream systems to specify)
Resolves #227
Addresses request in #108, but doesn't scale the solution as suggested.
Tested in isolation, pending automated testing

Thanks! This looks good to me.  Unfortunately we don't have any automated integration tests.  So I'll let you merge this after when you are ready / feel good with sufficient manual testing.


Network inspection not working with OkUrlFactory

If you are using OkHttp + Volley, you are likely using OkUrlFactory via a class like the one below. Unfortunately OkHttp's network interceptors do not support the OkUrlFactory.
https://github.com/square/okhttp/wiki/Interceptors#availability
import com.android.volley.toolbox.HurlStack;
import com.squareup.okhttp.OkHttpClient;
import com.squareup.okhttp.OkUrlFactory;

import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;

/**
 * An {@link com.android.volley.toolbox.HttpStack HttpStack} implementation which
 * uses OkHttp as its transport.
 */
public class OkHttpStack extends HurlStack {
    private final OkUrlFactory mFactory;

    public OkHttpStack() {
        this(new OkHttpClient());
    }

    public OkHttpStack(OkHttpClient client) {
        if (client == null) {
            throw new NullPointerException("Client must not be null.");
        }
        mFactory = new OkUrlFactory(client);
    }

    @Override protected HttpURLConnection createConnection(URL url) throws IOException {
        return mFactory.open(url);
    }
}

Any ideas on an OkHttp UrlConnection friendly way of integrating Stetho?

@bryanstern you can integrate HttpURLConnection using StethoURLConnectionManager.  If you depend on okhttp-urlconnection, you can likely make this work pretty easily through subclassing HurlStack.  Note that you could probably more easily implement a better OkHttpStack than the one Google provided in Volley.  Basically all you'd need is:
public HttpResponse performRequest(...) {
  Response okHttpResponse = mOkHttpClient.newCall(convertToCall(request, params)).execute();
  return convertToApacheResponse(okHttpResponse);
}

@jasta Thanks for suggestion. I ended up just implementing Volley's HttpStack interface and performing the request directly with OkHttp, doing away with okhttp-urlconnection. Once I feel more confident in the code, I'll post that gist up for those interested.

Here is the gist, just set the network interceptor on the OkHttpClient you pass in. https://gist.github.com/bryanstern/4e8f1cb5a8e14c202750

@bryanstern closing now that a solution exists.  I think if we're going to merge something in it's most likely to be from #51 or something like it which more generically supports Volley.


FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory

I have an application with is in production, and today I get a weird error.

In the route logs not a route has been called, and looking at this error it informs that it was in an express module.
Was it a mistake in something else or a possible error in express.
obs: this happened 2 times
#########
Express : 4.17
Node :  10
OS : CentOS7
PM2 : 3,51

This looks like your app just ran out of memory.  This could have happened at any allocation, it just so happened to be in express code.  I would look for a memory leak, that is the usual culprit for this kind of error.


Using Freelook and Zoom at the same time changes zoom max and min values

Operating system or device - Godot version:
Linux Mint 18.1 - Godot 3.0 custom build
Issue description:

When you hold down the RMB and Scroll, the extent that you can zoom changes.
This also changes the speed at which you can zoom.
Steps to reproduce:

Go to a 3d scene with something to look at as a reference point
hold down the right mouse button and scroll until you are to the minimum value for zoom the very helpful scroll bar in the scene view should not be filled
let go of the right mouse button
keep using the scroll wheel

This is by design. Using the mouse wheel and RMB increases your speed because it decreases zoom.
The semantic behind it is the following:

Zooming out increase panning speed and freelook speed (including when you are using freelook)
Zooming in decreases panning speed and freelook speed
They are linked together.

@Zylann I was going to file an issue yesterday as well, but I now understand the controls after reading your explanation.
However, would it be possible to place the two visual scrollbars in different positions?
It had seemed to me that the difference between them was a bug.
You could possible place it horizontally to differentiate it from the normal mode scroll bar. Or you could add a text hint box somewhere that says "FreeLook Enabled: Scroll to change movement sensitivity" or something like that. Just basically anything to guide users without having to Google the controls.

@HummusSamurai It took me a little while to settle on this: there is only one conceptual value to indicate, which is the size of your reference frame. It can be interpreted in freelook as a speed, and in normal mode as a zoom, but it's the same source value for both, which is why there is only one bar.
Currently freelook behaves like a mix between Unity and Blender.
You should try it to :)
I'm not sure if adding text is a good solution, I don't want to clutter the viewport if possible^^

@Zylann Should I close the issue or leave it open for discussion?

@zylann I had tried when I posted, and I think there could be a teeny visual helper to be able to tell what's happening.
Don't get me wrong, I love the controls and the changes they produce, I just would prefer if there was a hint to help the user realise what's happening and what's changing. (aka I don't want anything to change other than visual helpers).

I realize the usefulness of this design after using it for a while. Being able to control zoom speed and to basically navigate by toggling between orbit, zoom, and freelook is awesome. CLOSING ISSUE.


[7.x] Fix cookies method to return array

The data type returned in the cookies comment is array, but actually the instance of GuzzleHttp\Cookie\CookieJar is returned, which is also defined in the test file. So modified the cookies method to return the array.

Why not fix the doc block instead of changing the implementation ?
Also this is considered a breaking change, so i doubt that it will be accepted on the current version branch

Why not fix the doc block instead of changing the implementation ?
Also this is considered a breaking change, so i doubt that it will be accepted on the current version branch

Maybe you are right. But I think the original intention of the author is to return an array but not an instance that looks more complicated, right?

People may already be using CookieJar in their apps so will just have to fix the doc for now.


Email designs

New emails designs.. the emails that you see on this Pull Request are generated by a small tool created to generate yetu emails... take a look at the tool to see how it works: https://github.com/yetu/yetu-mails

LGTM

LGTM


Readme Example with tensorrt: expected input[2, 4, 64, 64] to have 3 channels, but got 4 channels instead

I am using the img2img example given in the readme. But it doesn't compile tensorrt successfully. I got such an error:
RuntimeError: Given groups=1, weight of size [64, 3, 3, 3], expected input[2, 4, 64, 64] to have 3 channels, but got 4 channels instead

I feel the problem is in the vae decoder compilation part. I found that Wrapper's code seems to be fine, it doesn't use accelerate_with_tensorrt, but I'm not too familiar with this piece and I don't see where the problem is.
example code:
import torch
from diffusers import AutoencoderTiny, StableDiffusionPipeline
from diffusers.utils import load_image

from streamdiffusion import StreamDiffusion
from streamdiffusion.acceleration.tensorrt import accelerate_with_tensorrt
from streamdiffusion.image_utils import postprocess_image

# You can load any models using diffuser's StableDiffusionPipeline
pipe = StableDiffusionPipeline.from_pretrained("KBlueLeaf/kohaku-v2.1").to(
    device=torch.device("cuda"),
    dtype=torch.float16,
)

# Wrap the pipeline in StreamDiffusion
stream = StreamDiffusion(
    pipe,
    t_index_list=[32, 45],
    torch_dtype=torch.float16,
)

# If the loaded model is not LCM, merge LCM
stream.load_lcm_lora()
stream.fuse_lora()
# Use Tiny VAE for further acceleration
stream.vae = AutoencoderTiny.from_pretrained("madebyollin/taesd").to(device=pipe.device, dtype=pipe.dtype)
# Enable acceleration
stream = accelerate_with_tensorrt(
    stream, "engines", max_batch_size=2,
)

prompt = "1girl with dog hair, thick frame glasses"
# Prepare the stream
stream.prepare(prompt)

# Prepare image
init_image = load_image("assets/img2img_example.png").resize((512, 512))

# Warmup >= len(t_index_list) x frame_buffer_size
for _ in range(2):
    stream(init_image)

# Run the stream infinitely
while True:
    x_output = stream(init_image)
    postprocess_image(x_output, output_type="pil")[0].show()
    input_response = input("Press Enter to continue or type 'stop' to exit: ")
    if input_response == "stop":
        break

how to solve this problem？


fix header logo

Header logo is difficult to see - i guess the options are - 1) to pick a lighter color scheme (preferably a color from the NF Data Portal Palette), 2) to drop the logo on a white/light background (Stockard may have this already if you ask!), or 3) both of the above!

actually, this and #13 should probably also be defined in www/config.json, not in the body of the app like it currently is

Going to look into how to remove what I think is a hardcoded setting, but currently, the only header (skin) colors accepted are blue, black, purple, green, red, yellow.
From the log error I got when attempting to use a hex value for skin here:
'arg' should be one of “blue”, “black”, “purple”, “green”, “red”, “yellow”

For now, I have changed the header color to 'blue' (as close as I could get to portal logo colors, I think) and I'm using a portal logo with a white background, as suggested. See changes here:
https://shiny.synapse.org/users/rallaway/NF_data_curator_staging/

ah, interesting, i think we need to use CSS to change the colors beyond the presets (https://stackoverflow.com/questions/50467136/how-to-create-custom-shinydashboard-skin/50467293)

that makes sense! I think that should be a quick fix, but I'm going to save that for after I experiment with the schema a bit more.


nodejs - pass global variable to promise callback in parse

consider this code
for (var i = 0; i < data.length; i++){
    query.equalTo("objectId",data[i].id).first().then(
        function(object){
            object.set("username", data[i].username);
            object.save();
        }
    );
}

in this example data[i] inside the then callback is the last element of the array
consider this 2nd example that normally work in javascript world
assume we use some API which connect to mongodb and has function called update
for (var i = 0; i < data.length; i++){
    query.eq("_id",data[i].id).update(data[i].username);
}

eq returns the object, update updates that object and save it.
will it not be awesome if something like this is possible ... (not sure if it will also even work)
for (var i = 0; i < data.length; i++){
    query.equalTo("objectId",data[i].id).first().then(
        function(object, data[i]){
            object.set("username", data.username);
            object.save();
        }
    );
}

someone suggested to use let instead of var. I didn't test this because i fixed using recursive calls


issues with gitfs

I tried to install gitfs using brew install gromgit/fuse/gitfs-mac
but I get this error when I try to mount my git repo
Traceback (most recent call last):
  File "/opt/homebrew/bin/gitfs", line 33, in <module>
    sys.exit(load_entry_point('gitfs==0.5.1', 'console_scripts', 'gitfs')())
  File "/opt/homebrew/Cellar/gitfs-mac/0.5.2/libexec/lib/python3.9/site-packages/gitfs/__init__.py", line 19, in mount
    from gitfs.mounter import start_fuse
  File "/opt/homebrew/Cellar/gitfs-mac/0.5.2/libexec/lib/python3.9/site-packages/gitfs/mounter.py", line 21, in <module>
    from pygit2 import Keypair, UserPass
  File "/opt/homebrew/Cellar/gitfs-mac/0.5.2/libexec/lib/python3.9/site-packages/pygit2/__init__.py", line 33, in <module>
    from .blame import Blame, BlameHunk
  File "/opt/homebrew/Cellar/gitfs-mac/0.5.2/libexec/lib/python3.9/site-packages/pygit2/blame.py", line 27, in <module>
    from .ffi import ffi, C
  File "/opt/homebrew/Cellar/gitfs-mac/0.5.2/libexec/lib/python3.9/site-packages/pygit2/ffi.py", line 27, in <module>
    from ._libgit2 import ffi, lib as C
ImportError: dlopen(/opt/homebrew/Cellar/gitfs-mac/0.5.2/libexec/lib/python3.9/site-packages/_cffi_backend.cpython-39-darwin.so, 2): Symbol not found: _ffi_prep_closure
  Referenced from: /opt/homebrew/Cellar/gitfs-mac/0.5.2/libexec/lib/python3.9/site-packages/_cffi_backend.cpython-39-darwin.so
  Expected in: flat namespace
 in /opt/homebrew/Cellar/gitfs-mac/0.5.2/libexec/lib/python3.9/site-packages/_cffi_backend.cpython-39-darwin.so

I have MacOS running on Big Sur Version 11.5.2
Apple M1 chip

I've updated the cffi resource in the formula, as it seems to be somewhat old. Can you brew reinstall gromgit/fuse/gitfs-mac and try your mount again? Thanks much!


In compilation mode, empty class may still generate a new hash name

In compilation mode, empty class may still generate a new hash name.

https://github.com/voorjaar/windicss/commit/663a4c946fcf746230fa890a1e92b7ac3b2a1449 fixed this.

https://github.com/voorjaar/windicss/commit/663a4c946fcf746230fa890a1e92b7ac3b2a1449 fixed this.


Menu Button layout

Finish the menu button layout.

The menu button layout is done, with config ability to specify buttons and locations as well as shortcut/icon names. Will open shortcuts.


Stakepools are not shown immediately in wallet after they are registered.

Context
https://input-output-rnd.slack.com/archives/GBT05825V/p1595052799003600

Information
-

Version
2020.7.6 (git revision: cf3847dd08d1c1848c675a1ee94ae12c1d85aadf)

Platform
all

Installation
Daedalus / From source

Steps to Reproduce

Register a stake pool in epoch (stake pool registered successfully and visible in the ledger state)
Run list stake pools in the wallet.

Expected behavior
Stake pool that was registered in epoch should be immediately visible in the wallet in the same epoch.
Actual behavior
Stake pool is visible in epoch + 2

Resolution

QA

Copying from slack for visibility:

I believe we should also make sure to, in the case pools have the same non-myopic rewards (they might all have 0 in the first epoch?), then order them randomly based on a user-specific seed. We did this for jormungandr (for the first epoch).
Think this is mentioned in the delegation design spec

even if that might technically be a separate ticket

This is a necessary limitation until we are done with the retirement certificates story. As a matter of fact, we currently rely on the ledger's state to know whether pools are active or not.
We are processing and discovering pool's registration certificates ourselves, indeed but I am not quite sure about the status of the retirement discovery and handling at the moment? cc @jonathanknowles

This is a necessary limitation until we are done with the retirement certificates story. As a matter of fact, we currently rely on the ledger's state to know whether pools are active or not.
We are processing and discovering pool's registration certificates ourselves, indeed but I am not quite sure about the status of the retirement discovery and handling at the moment?

I'll try to shed some light on this.
Current status
When constructing the list of pools to return in GetStakePools, we currently rely on two data sources:

Our database record of registration and retirement certificates.
The data returned by local state query (via getStakeDistribution).

As for the former (our database record), we update this whenever we process a new block, and we currently record all registration and retirement certificates, together with the order in which we see them. So from the perspective of populating the database with the correct data, the work for ADP-313 is already complete (apart from an outstanding integration test).
As for the latter (data returned by LSQ), the work for ADP-313 has not materially changed the way this code works.
Current behaviour of the ListStakePools endpoint
When including a pool within ListStakePools, there are three distinct potential cases:

DB data present?
LSQ data present?
Included in ListStakePools?

:heavy_check_mark:  Yes
:heavy_check_mark: Yes
:heavy_check_mark: We can construct a complete ApiStakePool object.

:negative_squared_cross_mark: No
:heavy_check_mark: Yes
:heavy_check_mark: We can construct an ApiStakePool object, but the optional fields will all be missing.

:heavy_check_mark: Yes
:negative_squared_cross_mark: No
:negative_squared_cross_mark: We are unable to construct an ApiStakePool object at all.

For more information, see the function combineDbAndLsqData, which merges DB data with LSQ data.
Current behaviour relating to pool retirement
As mentioned above, we record all registration certificates and retirement certificates in the order that they appear (which is well-defined, even for the case where multiple certificates appear in the same block or even the same transaction).
The wallet currently treats a retirement certificate as though it augments the latest-known registration for a pool. In other words, the retirement data is just an "extra piece of data" that we bolt on to the registration data included in a ApiStakePool value.
There is the added complication of re-registration: a later registration certificate can override an earlier retirement certificate. In this case, we take care to NOT indicate that a pool is retiring.
We handle this by only calling combineChainData with the result of readPoolLifeCycleStatus, which does the work of determining the order of precedence of certificates for us.
 (Though this is planned in https://jira.iohk.io/browse/ADP-376).
So if a pool disappears from the ListStakePools, it is because there is no longer LSQ data available for that pool.

So, now that we store retirement certificates, we could change this particular behavior here:
https://github.com/input-output-hk/cardano-wallet/blob/5161dde504e3326b47833de30e2c462348d8ab96/lib/shelley/src/Cardano/Wallet/Shelley/Pools.hs#L205-L207
to not drop pools that we are aware of but aren't active yet. The question is what do we do with:
a. The non myopic member reward
b. The relative owned stake
c. The saturation
a)
In the past, we were dealing with ranking and desirability, which were calculations based on the performance. For new pools, we used to set the performance to the average performances of top existing pools, to give newcomers a chance / some visibility. Now that we don't have this much control and I don't think that using an average non-myopic member rewards would do here (because it completely disregard cost & margin which could be incredibly high...)
b)
Until the pool becomes active / listed in the LSQ, the only stake it can have would be its own pledge :thinking: ... Although there's also no guarantee that operators did honor their pledge. Regardless, the pledge wouldn't be delegated before the next epoch at least. So perhaps 0 is a more sensible default here.
c) This can be calculated from the relative stake (and the desired number of pools). So solving b. also solves c.

This is a necessary limitation until we are done with the retirement certificates story. As a matter of fact, we currently rely on the ledger's state to know whether pools are active or not.

I don't know if this is equivalent but pool is visible in the ledger state immediately after it is registered, at least it is visible when querying with cardano-cli:
$ cardano-cli shelley query ledger-state --testnet-magic 42 | grep QAPool3

   "url": "https://piotr-iohk.github.io/adrestia-qa-board/QAPool3.json"

But maybe it is not marked as "active" yet...

So if a pool disappears from the ListStakePools listing, it is because there is no longer LSQ data available for that pool.

So from the observation retired pool is no longer visible in the LSQ data since e + 4, where e is the retirement epoch -> https://github.com/input-output-hk/cardano-wallet/pull/1931#discussion_r457417183

@KtorZ wrote:

a)
In the past, we were dealing with ranking and desirability, which were calculations based on the performance. For new pools, we used to set the performance to the average performances of top existing pools, to give newcomers a chance / some visibility. Now that we don't have this much control and I don't think that using an average non-myopic member rewards would do here (because it completely disregard cost & margin which could be incredibly high...)

b)
Until the pool becomes active / listed in the LSQ, the only stake it can have would be its own pledge thinking ... Although there's also no guarantee that operators did honor their pledge. Regardless, the pledge wouldn't be delegated before the next epoch at least. So perhaps 0 is a more sensible default here.

c) This can be calculated from the relative stake (and the desired number of pools). So solving b. also solves c.

So it would seem that the only sensible default for each of these values is zero?
I've coded up a PR that does this here: https://github.com/input-output-hk/cardano-wallet/pull/1936

@piotr-iohk

So from the observation retired pool is no longer visible in the LSQ data since e + 4, where e is the retirement epoch -> #1931 (comment)

Assuming we use the approach suggested above (to use default values for LSQ data when LSQ data is not available), this would mean that retired pools no longer disappear from the list returned by ListStakePools, unless we either:

exclude retired pools from the ListStakePools listing (by filtering out pools where currentEpoch >= retirementEpoch); or
garbage collect retired pools from the pools database (https://jira.iohk.io/browse/ADP-376).

(or some combination of the above: we would probably wish to provide a grace period before we garbage collect data relating to pools that have retired, to protect against rollbacks)

@jonathanknowles IMO, it's not a or statement, but a and then, where the first one (exclude retired pools from listing) MUST be done as part of the retirement certificates story. We should not show pools that are retired (which I believe we do not currently because of the way we combine data from the LSQ, a retired pool wouldn't show up). Yet if we change this behavior such that some pools not returned by the LSQ are now combined with default values, then we have to be careful about what pools (i.e. not show retired pools!).

@KtorZ wrote:

(exclude retired pools from listing) MUST be done as part of the retirement certificates story.

As far as I know, this requirement is not yet an explicit part of ADP-313, which merely states:

"As a wallet user, I want to check if and when a stakepool will retire, so that I can make an informed choice about which stakepool to delegate my stake."

In other words the story doesn't specify a preference between:

keeping retired pools in the list, but indicating that they are retired; and
removing retired pools from the list.

Of course, if we wanted to remove pools from the list returned by ListStakePools, we could just filter out pools where currentEpoch >= retirementEpoch.
@KtorZ Do you agree with this filtering approach? If so, I'll add a ticket to the milestone.
As for garbage collection of retired pool entries from the database, we have a story for that here:
https://jira.iohk.io/browse/ADP-376

As far as I know, this requirement is not yet an explicit part of ADP-313

Make it so then :upside_down_face: ! It should've been.

Of course, if we wanted to remove pools from the list returned by ListStakePools, we could just filter out pools where currentEpoch >= retirementEpoch.

Yes, though this filtering needs to happen inside a database query and NOT in-memory after fetching pools.

Make it so then upside_down_face ! It should've been.

Done!
I've added the following requirement to those listed in ADP-313:

Prevent listing of retired pools: The wallet must not include pools that have already retired in the list of known pools returned by the API ListStakePools operation.

Also:

Yes, though this filtering needs to happen inside a database query and NOT in-memory after fetching pools.

:+1:

LGTM. Pool is immediately visible in wallet after registering. You can also delegate to it.
Checked on MC4:
241:<PHONE_NUMBER>2bb67ba7a009260a424b59d20dd90e880571bfb1ff0fab
Margin: 5%
Cost: 340000000 lovelace
Pledge:<PHONE_NUMBER> lovelace
Metrics:
  Saturation: 0
  Non-myopic member rewards: 0 lovelace
  Produced blocks: 0
  Relative stake: 0%
Metadata:
  Homepage: https://github.com/input-output-hk/adrestia
  Name: Adrestia QA
  Ticker: QAQA1
  Description: The pool that tests all the pools!!!


extracted method from registerMultifactorProviderAuthenticationWebflow()

This pull request was made automatically by me, a refactoring bot. Pull request I make are supposed to improve readability and maintainability of your source code. I am currently in development and this refactoring is part of an evaluation. Unfortunately, I cannot respond to comments yet so please consider this while reviewing this pull request. If you reject the pull request, I would appreciate any feedback so that my developers can further improve me.

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

I don't see a reason for this refactoring


Made home text and logo redirect to home section

Related Issue
None
Fixes #281
Description
This pull request fixes the issue where clicking the logo and the "Home" link in the navigation bar did not redirect to the home section. The href attributes of both the logo and the "Home" link have been updated to include #home, and the home section has been assigned the corresponding id="home". This ensures that both elements now properly navigate to the home section on the page.
Linking the logo and "Home" link to the home section improves navigation by providing users with an intuitive way to return to the top of the page. It enhances user experience and follows established web design conventions for consistent, predictable navigation.
Fixes #281
Type of PR

[x] Feature enhancement

Screenshots / videos (if applicable)
(https://drive.google.com/file/d/10bxWOstdqp-WJw8XKcSFx11ugiLgMGvZ/view?usp=drivesdk)
Checklist:

[x] I have made this change from my own.
[x] My code follows the style guidelines of this project.
[x] I have performed a self-review of my own code.
[x] I have made corresponding changes to the documentation.
[x] My changes generate no new warnings.
[x] I have tested the changes thoroughly before submitting this pull request.
[x] I have provided relevant issue numbers and screenshots after making the changes.

@Abankita

Please see the conflicts highlighted in the image above. Resolve the conflicts in the mentioned files. Ensure you pull all the latest changes before pushing your feature/bug fixes to the main branch. After resolving the conflicts, please open a new PR for review.
Thank you!


CFFL

CFFL

Linter check found the following problems:
The following problems have been found:
ERROR: /tmp/abs_8aqwzuhxda/clone/recipe/meta.yaml:27: missing_wheel: For pypi packages, wheel should be present in the host section
WARNING: /tmp/abs_8aqwzuhxda/clone/recipe/meta.yaml:32: python_build_tool_in_run: The python build tool setuptools is in run depends
ERROR: /tmp/abs_8aqwzuhxda/clone/recipe/meta.yaml:68: missing_pip_check: For pypi packages, pip check should be present in the test commands
WARNING: /tmp/abs_8aqwzuhxda/clone/recipe/meta.yaml:77: missing_description: The recipe is missing a description
Errors were found


Stabilize mapOrElse for Maybe/Nullable/Undefinable

Fix https://github.com/karen-irc/option-t/issues/244

This change is

bors r+


chore(main): release 1.7.1

:robot: I have created a release beep boop
1.7.1 (2023-09-19)
Bug Fixes

check for update nil noed (9861818)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/aidanaden/canvas-sync/releases/tag/v1.7.1 :sunflower:


Test script for testing command entry points

This PR creates a tests suite for testing entry points installed by rpm or pip.

/packit copr-build

/packit copr-build

/packit copr-build

/packit copr-build


Fix ops.Nonzero.compute_output_spec().

nonzero returns a tuple of N 1D integer tensors, one per dimension in the input.
Also changed nonzero unit tests to be more interesting by actually exercising the case where there are zeros.

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 57.22%. Comparing base (c8a7f28) to head (f993013).

:exclamation:  There is a different number of reports uploaded between BASE (c8a7f28) and HEAD (f993013). Click for more details.
HEAD has 3 uploads less than BASE
| Flag | BASE (c8a7f28) | HEAD (f993013) |
|------|------|------|
|keras|4|1|

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #19910       +/-   ##
===========================================
- Coverage   79.01%   57.22%   -21.79%
===========================================
  Files         499      499
  Lines       46441    46441
  Branches     8550     8551        +1
===========================================
- Hits        36694    26575    -10119
- Misses       8020    18218    +10198
+ Partials     1727     1648       -79

Flag
Coverage Δ

keras
57.22% <100.00%> (-21.65%)
:arrow_down:

keras-jax
?

keras-numpy
57.22% <100.00%> (ø)

keras-tensorflow
?

keras-torch
?

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


[NIRPS] Run LBL on SPIRou

@CharlesCadieux  could you add the steps here that you currently have to do (I'll copy them into the description)


refactor: Switch to remote API and rewrite of code

BREAKING CHANGE:
New API and rewrite.

should we chase this or leave this?

Leaving it for now. If I can get multicar working with it we could continue but don’t want to limit either side.

On Jan 3, 2022, at 1:06 PM, Fuat Akgün @.***> wrote:

should we chase this or leave this?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.

@rappazzo  Any chance you could test this PR for us for Hyundai USA? I suspect it has issues we need to resolve in our new API.

I'll put it in today and run it over the weekend

Yes that is correct.  Please read the warnings here: #219.

Seems to be missing a dependency
Logger: homeassistant.util.package
Source: util/package.py:100
First occurred: 8:53:05 AM (3 occurrences)
Last logged: 8:53:31 AM

Unable to install package hyundai_kia_connect_api==10.18.15: ERROR: Could not find a version that satisfies the requirement hyundai_kia_connect_api==10.18.15 (from versions: 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 1.2.0, 1.3.0, 1.4.0, 1.5.0, 1.6.0, 1.7.0, 1.7.1, 1.7.2, 1.7.3, 1.7.4, 1.8.0, 1.8.1, 1.8.2, 1.10.1, 1.10.2, 1.10.4, 1.11.0, 1.12.0, 1.12.1, 1.14.0, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.17.1, 1.17.3, 1.18.7, 1.18.8, 1.18.10, 1.18.11, 1.18.12, 1.18.13, 1.18.14, 1.18.15) ERROR: No matching distribution found for hyundai_kia_connect_api==10.18.15 WARNING: You are using pip version 20.2.4; however, version 21.3.1 is available. You should consider upgrading via the '/usr/local/bin/python3 -m pip install --upgrade pip' command.

To install, (via samba) I moved the contents of config/custom_components/kia_uvo to a backup location, and then copied the files from https://github.com/fuatakgun/kia_uvo.git:externalAPI to that dir.  New contents:
❯❯ ls custom_components/kia_uvo | head -n 1000
__init__.py
binary_sensor.py
config_flow.py
const.py
coordinator.py
entity.py
manifest.json
sensor.py
strings.json
translations

Typo in requirements on my part when I bumped it recently.   I also just made some larger changes to align it back to the current core implementation.

New errors:  Error setting up entry <my-email-address> for kia_uvo Traceback (most recent call last):   File "/usr/src/homeassistant/homeassistant/config_entries.py", line 313, in async_setup     result = await component.async_setup_entry(hass, self)  # type: ignore   File "/config/custom_components/kia_uvo/__init__.py", line 24, in async_setup_entry     coordinator = HyundaiKiaConnectDataUpdateCoordinator(hass, config_entry)   File "/config/custom_components/kia_uvo/coordinator.py", line 41, in __init__     self.vehicle_manager = VehicleManager(   File "/usr/local/lib/python3.9/site-packages/hyundai_kia_connect_api/VehicleManager.py", line 37, in __init__     self.api: ApiImpl = self.get_implementation_by_region_brand(   File "/usr/local/lib/python3.9/site-packages/hyundai_kia_connect_api/VehicleManager.py", line 99, in get_implementation_by_region_brand     return HyundaiBlueLinkAPIUSA(region, brand)   File "/usr/local/lib/python3.9/site-packages/hyundai_kia_connect_api/HyundaiBlueLinkAPIUSA.py", line 83, in __init__     "username": self.username, AttributeError: 'HyundaiBlueLinkAPIUSA' object has no attribute 'username'

This is the exact sort of testing needed for this brand. Thank you!  I have updated the API so you can either pull a new copy of the manifest file or edit the file to show 1.18.16.

Unexpected error fetching kia_uvo data: 'Vehicle' object has no attribute 'vin'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 187, in _async_refresh
    self.data = await self._async_update_data()
  File "/config/custom_components/kia_uvo/coordinator.py", line 80, in _async_update_data
    await self.async_update_all()
  File "/config/custom_components/kia_uvo/coordinator.py", line 89, in async_update_all
    await self.async_check_and_refresh_token()
  File "/config/custom_components/kia_uvo/coordinator.py", line 104, in async_check_and_refresh_token
    await self.hass.async_add_executor_job(
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.9/site-packages/hyundai_kia_connect_api/VehicleManager.py", line 85, in check_and_refresh_token
    self.initialize()
  File "/usr/local/lib/python3.9/site-packages/hyundai_kia_connect_api/VehicleManager.py", line 50, in initialize
    self.update_all_vehicles_with_cached_state()
  File "/usr/local/lib/python3.9/site-packages/hyundai_kia_connect_api/VehicleManager.py", line 57, in update_all_vehicles_with_cached_state
    self.update_vehicle_with_cached_state(self.get_vehicle(vehicle_id))
  File "/usr/local/lib/python3.9/site-packages/hyundai_kia_connect_api/VehicleManager.py", line 60, in update_vehicle_with_cached_state
    self.api.update_vehicle_with_cached_state(self.token, vehicle)
  File "/usr/local/lib/python3.9/site-packages/hyundai_kia_connect_api/HyundaiBlueLinkAPIUSA.py", line 164, in update_vehicle_with_cached_state
    state = self._get_cached_vehicle_state(token, vehicle)
  File "/usr/local/lib/python3.9/site-packages/hyundai_kia_connect_api/HyundaiBlueLinkAPIUSA.py", line 126, in _get_cached_vehicle_state
    headers["vin"] = vehicle.vin
AttributeError: 'Vehicle' object has no attribute 'vin'

1.8.17 should solve that next one.

Unexpected error fetching kia_uvo data: can't compare offset-naive and offset-aware datetimes
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 187, in _async_refresh
    self.data = await self._async_update_data()
  File "/config/custom_components/kia_uvo/coordinator.py", line 80, in _async_update_data
    await self.async_update_all()
  File "/config/custom_components/kia_uvo/coordinator.py", line 89, in async_update_all
    await self.async_check_and_refresh_token()
  File "/config/custom_components/kia_uvo/coordinator.py", line 104, in async_check_and_refresh_token
    await self.hass.async_add_executor_job(
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.9/site-packages/hyundai_kia_connect_api/VehicleManager.py", line 86, in check_and_refresh_token
    if self.token.valid_until <= dt.datetime.now(pytz.utc):
TypeError: can't compare offset-naive and offset-aware datetimes

1.18.18 may resolve this.  Typically this is a time format issue.   This does mean it has already logged in successfully which is progress.

Unexpected error fetching kia_uvo data: type object 'datetime.datetime' has no attribute 'timedelta'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 187, in _async_refresh
    self.data = await self._async_update_data()
  File "/config/custom_components/kia_uvo/coordinator.py", line 80, in _async_update_data
    await self.async_update_all()
  File "/config/custom_components/kia_uvo/coordinator.py", line 89, in async_update_all
    await self.async_check_and_refresh_token()
  File "/config/custom_components/kia_uvo/coordinator.py", line 104, in async_check_and_refresh_token
    await self.hass.async_add_executor_job(
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.9/site-packages/hyundai_kia_connect_api/VehicleManager.py", line 85, in check_and_refresh_token
    self.initialize()
  File "/usr/local/lib/python3.9/site-packages/hyundai_kia_connect_api/VehicleManager.py", line 45, in initialize
    self.token: Token = self.api.login(self.username, self.password)
  File "/usr/local/lib/python3.9/site-packages/hyundai_kia_connect_api/HyundaiBlueLinkAPIUSA.py", line 108, in login
    valid_until = (datetime.now(pytz.utc) + datetime.timedelta(seconds=expires_in))
AttributeError: type object 'datetime.datetime' has no attribute 'timedelta'

Thanks for sticking with this.  Really appreciate it.  Unfortunately I don't have a way to access a USA car.
Next is: 1.19.1

It's not a problem, I'm happy to help when I can.
Setup failed for kia_uvo: unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 181, in _async_setup_component
    component = integration.get_component()
  File "/usr/src/homeassistant/homeassistant/loader.py", line 522, in get_component
    cache[self.domain] = importlib.import_module(self.pkg_path)
  File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/config/custom_components/kia_uvo/__init__.py", line 15, in <module>
    from .coordinator import HyundaiKiaConnectDataUpdateCoordinator
  File "/config/custom_components/kia_uvo/coordinator.py", line 7, in <module>
    from hyundai_kia_connect_api import VehicleManager
  File "/usr/local/lib/python3.9/site-packages/hyundai_kia_connect_api/__init__.py", line 4, in <module>
    from .HyundaiBlueLinkAPIUSA import HyundaiBlueLinkAPIUSA
  File "/usr/local/lib/python3.9/site-packages/hyundai_kia_connect_api/HyundaiBlueLinkAPIUSA.py", line 40, in <module>
    class HyundaiBlueLinkAPIUSA(ApiImpl):
  File "/usr/local/lib/python3.9/site-packages/hyundai_kia_connect_api/HyundaiBlueLinkAPIUSA.py", line 43, in HyundaiBlueLinkAPIUSA
    last_loc_timestamp = dt.now() - dt.timedelta(hours=3)
AttributeError: module 'datetime' has no attribute 'now'

1.19.2

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 313, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/config/custom_components/kia_uvo/__init__.py", line 24, in async_setup_entry
    coordinator = HyundaiKiaConnectDataUpdateCoordinator(hass, config_entry)
  File "/config/custom_components/kia_uvo/coordinator.py", line 41, in __init__
    self.vehicle_manager = VehicleManager(
  File "/usr/local/lib/python3.9/site-packages/hyundai_kia_connect_api/VehicleManager.py", line 37, in __init__
    self.api: ApiImpl = self.get_implementation_by_region_brand(
  File "/usr/local/lib/python3.9/site-packages/hyundai_kia_connect_api/VehicleManager.py", line 99, in get_implementation_by_region_brand
    return HyundaiBlueLinkAPIUSA(region, brand)
  File "/usr/local/lib/python3.9/site-packages/hyundai_kia_connect_api/HyundaiBlueLinkAPIUSA.py", line 57, in __init__
    dt.fromtimestamp(ts) - dt.utcfromtimestamp(ts)
AttributeError: module 'datetime' has no attribute 'fromtimestamp'

1.19.3

Unexpected error fetching kia_uvo data: unsupported operand type(s) for -: 'datetime.datetime' and 'NoneType'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 187, in _async_refresh
    self.data = await self._async_update_data()
  File "/config/custom_components/kia_uvo/coordinator.py", line 81, in _async_update_data
    await self.hass.async_add_executor_job(
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.9/site-packages/hyundai_kia_connect_api/VehicleManager.py", line 67, in check_and_force_update_vehicles
    f"time diff - {(started_at_utc - vehicle.last_updated_at).total_seconds()}"
TypeError: unsupported operand type(s) for -: 'datetime.datetime' and 'NoneType'

Hopefully getting close.   Added the last update commands needed for it in 1.19.4.
This past error occurs in the refresh of the data so past login issues at this point which is good.

needs to import re
Unexpected error fetching kia_uvo data: name 're' is not defined
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 187, in _async_refresh
    self.data = await self._async_update_data()
  File "/config/custom_components/kia_uvo/coordinator.py", line 80, in _async_update_data
    await self.async_update_all()
  File "/config/custom_components/kia_uvo/coordinator.py", line 89, in async_update_all
    await self.async_check_and_refresh_token()
  File "/config/custom_components/kia_uvo/coordinator.py", line 104, in async_check_and_refresh_token
    await self.hass.async_add_executor_job(
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.9/site-packages/hyundai_kia_connect_api/VehicleManager.py", line 85, in check_and_refresh_token
    self.initialize()
  File "/usr/local/lib/python3.9/site-packages/hyundai_kia_connect_api/VehicleManager.py", line 50, in initialize
    self.update_all_vehicles_with_cached_state()
  File "/usr/local/lib/python3.9/site-packages/hyundai_kia_connect_api/VehicleManager.py", line 57, in update_all_vehicles_with_cached_state
    self.update_vehicle_with_cached_state(self.get_vehicle(vehicle_id))
  File "/usr/local/lib/python3.9/site-packages/hyundai_kia_connect_api/VehicleManager.py", line 60, in update_vehicle_with_cached_state
    self.api.update_vehicle_with_cached_state(self.token, vehicle)
  File "/usr/local/lib/python3.9/site-packages/hyundai_kia_connect_api/HyundaiBlueLinkAPIUSA.py", line 163, in update_vehicle_with_cached_state
    vehicle.last_updated_at = self.get_last_updated_at(
  File "/usr/local/lib/python3.9/site-packages/hyundai_kia_connect_api/HyundaiBlueLinkAPIUSA.py", line 462, in get_last_updated_at
    m = re.match(r"(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})", value)
NameError: name 're' is not defined

10.19.5

Unexpected error fetching kia_uvo data: 'HyundaiBlueLinkAPIUSA' object has no attribute 'force_refresh_vehicle_state'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 187, in _async_refresh
    self.data = await self._async_update_data()
  File "/config/custom_components/kia_uvo/coordinator.py", line 81, in _async_update_data
    await self.hass.async_add_executor_job(
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.9/site-packages/hyundai_kia_connect_api/VehicleManager.py", line 72, in check_and_force_update_vehicles
    self.force_refresh_vehicle_state(vehicle)
  File "/usr/local/lib/python3.9/site-packages/hyundai_kia_connect_api/VehicleManager.py", line 81, in force_refresh_vehicle_state
    self.api.force_refresh_vehicle_state(self.token, vehicle)
AttributeError: 'HyundaiBlueLinkAPIUSA' object has no attribute 'force_refresh_vehicle_state'

1.19.5 stubs out that.  It looks like for some reason the Hyundai USA implementation never had force refresh implemented.  At a future time we will need to look into how to call that.

Looks like it's working now.

Awesome!  What sensors are missing that you had before and want?   Data logs will help with that too but essentially mapping is done here:https://github.com/Hyundai-Kia-Connect/hyundai_kia_connect_api/blob/9c846174d64cf63ef755feb47e72997b2ff7706d/hyundai_kia_connect_api/HyundaiBlueLinkAPIUSA.py#L162-L278
And then we create the sensor in the repo you provided if it isn't already.

I think the only sensor that I am missing from before that I care about is the odometer.  The Hyundai app provides actual tire pressure but that wasn't in the previous version (was just OK/Not OK).

If it is in the app it should be an option for us.  I can take a look at adding it unless something you want to take one!  I will work on those missing data points in the next few days.

1.20.0 adds the required odometer call.  It does the prep work for location as well.  Currently location doesn't have an entity created for any region in this new version.   Hope to have that soon though.  I am assuming it will cause an error since I am coding blind and new to this.


Add boost::sml

Signed-off-by: Bogdan Vaneev<EMAIL_ADDRESS>

Description of the Change

Add new external library for state machines - https://github.com/boost-experimental/sml
Benefits

State machines can be coded easier, code is more "verbose"
Possible Drawbacks

None
Usage Examples or Tests [optional]
Added sml_test

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@e36a9c3). Click here to learn what that means.
The diff coverage is 100%.

@@            Coverage Diff            @@
##             master      #61   +/-   ##
=========================================
  Coverage          ?   79.64%
=========================================
  Files             ?      111
  Lines             ?     3512
  Branches          ?        0
=========================================
  Hits              ?     2797
  Misses            ?      715
  Partials          ?        0

Impacted Files
Coverage Δ

deps/sml/boost/sml.hpp
88.35% <ø> (ø)

test/deps/sml_test.cpp
100% <100%> (ø)

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 e36a9c3...0f6bd40. Read the comment docs.


search_symbols fails with None is not iterable

Hello! First of all, great work you are doing, I really love it!
I've tried your new search_symbols feature and it seems to work in general, but apparently not in all cases and it is not clear why.
The content of the response is None such that json() returns None which is not iterable so it fails: https://github.com/hide-org/hide-sdk/blob/main/hide/client/hide_client.py#L197
https://github.com/django/django/ is one repository where I see that it fails. I assume this is related to some problem with the LSP. I see that warning, but it probably is not my setup. Other Python repositories work fine for me. Any idea what might cause this?

hey! thanks for reporting. i think the problem here is us not handling empty lsp responses properly.
i assume that for symbol search when nothing is found lsp returns None and we simply forward it as an API call response.
i will try to reproduce this bug and get back to you. what query did you use?

That does not seem to be the case. In the other cases, it comes back to me even in these cases. Example queries: "test", "__init__".

Sorry it took me so long but I see what's the problem now. hide fails to detect the main language for Django is Python. I suspect there's a flaw in our language detection algorithm. I'm looking at it now.

Great news! Would it be possible to manually select the language as well?
Some pointers that might avoid creating your own detector: this seems to be the language detector used for Github https://github.com/github-linguist/linguist There is a Go port, but that doesn't seem to be maintained anymore: https://github.com/dayvonjersen/linguist

Would it be possible to provide the language as an argument in the create_project call?

For Go, there's even a better one https://github.com/go-enry/go-enry It's faster and also based on Linguist. I'm working on integrating it right now.

We got go-enry integrated now. The language detection should work a lot better now. I tried creating a project for django and it worked perfectly. Check it out and let us know how it works!
Looking into adding the languages argument in the create project request.

I can confirm that it works for django now. I still face the same issues with other repositories, e.g., https://github.com/sphinx-doc/sphinx
I assume this is the related error message Failed to start LSP server. Diagnostics will not be available. error="Language Gettext Catalog is not supported"

adding the languages parameter here https://github.com/hide-org/hide/pull/125
should go live today or tomorrow

the PR's merged. adding support in sdk now.

SDK updated, get the latest with pip install -U hide-py

tested it with hide-py. works. Thank you!


Never cache the catchall route

The catchall should never be cached, because it leads to random trash being written to the .htaccess file. Make this the default and don't allow users to override it.

It's now recommended to return an unplug\not_found() from the catchall route which has caching disabled by default, so I think that's cool. (Also see #1 )


Mobile and Desktop Version Implementation for Capstone Project

Description:
This pull request introduces the implementation of both mobile and desktop versions of the Capstone project. It includes:

Addition of responsive design to the index.html and about.html pages to cater to various screen sizes.
Styling updates in style.css and about.css to enhance the visual appeal and responsiveness of the website.
JavaScript logic in main.js to handle dynamic elements on the webpage.

Hello reviewer! 👋

I'm submitting this pull request for the review of my capstone project, which has now been deployed using GitHub Pages. However, I would like to bring your attention to an issue that I encountered with the stylelint linter:
"Invalid value for background-clip (style.css:126:3, style.css:691:5): This means you've used an invalid value for the background-clip property. The background-clip property can take the values border-box, padding-box, or content-box. Make sure you are using one of these valid values in your CSS."
I kindly request your feedback and guidance on how to address these stylelint linter errors effectively. If you have any information on how to solve them or another way to achieve the desired effect, it would be greatly appreciated.
Thank you in advance for your time and assistance. I'm looking forward to your valuable feedback! 🙏

Hello again!!

Just a quick message:
Could you please take a moment to read the first comment on the PR?
I have initiated a thread in the support chat, but I would greatly appreciate some early feedback. Time is running out for me to submit the capstone project, so if there are any required changes to the design or overall functionality, I would prefer to address them promptly instead of waiting for a response and then scrambling to resolve any issues that may arise. Thank you for your assistance.


Added enhancement Validate configuration and update the status

This is reference to issuse #6
Added Functionality:
When a user make changes in their .github/settings.yml file in branch other than master then their config file is validated if that they changed it according to .yml syntax,
- If yes
Their Status is set to success
- If error is occured
Their status is set to error

Yes still relevant.

Yes relevant

yes


production style inject throws error

Currently running into an issue where the development build is fine on 3.1.6, but the production build throws the following error:
common.js:663 Error
    at sheetForTag (ap2.js:601)
    at t.inject (ap2.js:601)
    at e.inject (ap2.js:601)
    at r.generateAndInjectStyles (ap2.js:601)
    at r.t.generateAndInjectStyles (ap2.js:601)
    at ap2.js:601
    at n (ap2.js:601)
    at r.t.componentWillMount (ap2.js:601)
    at mountClassInstance (common.js:662)
    at beginWork (common.js:662)

Kind of amusing that in the original code: This should never happen😂
// Source: https://github.com/threepointone/glamor/blob/master/src/sheet.js#L32-L43
var sheetForTag = function sheetForTag(tag) {
  if (tag.sheet) {
    // $FlowFixMe
    return tag.sheet;
  }

  for (var i = 0; i < document.styleSheets.length; i += 1) {
    if (document.styleSheets[i].ownerNode === tag) {
      // $FlowFixMe
      return document.styleSheets[i];
    }
  }

  // NOTE: This should never happen
  throw new Error('');
};

Version
npx envinfo --packages --markdown (filtered a bit)
System:

OS: macOS High Sierra 10.13

Binaries:

Node: 8.9.4
Yarn: 1.3.2
npm: 5.6.0

Browsers:

Chrome: 63.0.3239.132

Packages:

browserify: ^14.1.0 => 14.5.0
jest-styled-components: ^4.11.0-1 => 4.11.0-1
styled-components: ^3.1.6 => 3.1.6

Reproduction
Working on it ¯_(ツ)_/¯
Steps to reproduce
Working on it ¯_(ツ)_/¯
Expected Behavior
No Error, rendered page
Actual Behavior
Error, everything breaks

@tabrindle Very intriguing! This should indeed never happen as far as I could tell when I wrote this. I suspect that the input to this function is already borked when this fails.
A reproduction would certainly help 😞

As with my last issue, this is part of a super massive mono repo, paring it down is a chore. Will do my best.
In the mean time, would screenshots of the debug from the breakpoints help?

@tabrindle yep! that would definitely help; the input to the function and the caller would certainly be helpful :+1:

It's entirely possible there is more than one instance. Part of my issue yesterday was that this project had 5 different versions bundled with it. 🤦♂
Also possible there is manual style tag manipulation. Part of what I'm removing in favor of styled-components is a dynamic style sheets implementation 🤦♂

This suggests that there is something going on with the length of StyleSheetList:

Fixed.
Once again, not really a styled-components bug, but a footgun that should perhaps at least be documented (I volunteer as tribute). Unlike in previous versions, it looks like you cannot have more than one copy of the code in your application, or this can happen. Seems like 2.4.0 and earlier are happy enough with multiple instances.
Turns out that styled-components was included in both bundles that were loaded, and upon loading the second bundle something bad happened. I'm assuming styled-components does something on init that is incompatible with another instance? It would be great if there was a warning in the console about this like react with the same issue. Discussion here.
Most interesting about this is that it works fine in dev, but prod it breaks because of the SPEEDY enhancements. Is there an blessed/easy way to enable/disable this?
Thank you so much for your help!

Well don't I feel silly now, you guys are already on it! The duplication warning got merged 6 hours ago :-)
https://github.com/styled-components/styled-components/pull/1412
So the only other outstanding issue might be how to enable speedy in dev.

So the only other outstanding issue might be how to enable speedy in dev.

The issue is that styles injected in speedy mode unfortunately aren't editable in DevTools :cry: That makes it very unsuitable for dev, as much as we'd love to have that consistency

@mxstbr I think we could actually force-enable speedy in dev through the StyleSheetManager?

How so?

@mxstbr by adding a prop for it to make this behaviour configurable

I think that's a great idea actually.

Oh god so we're back at config eh? :wink: I like making the config component-based a lot more than making it styled.config({ }) or something.

@mxstbr I feel like the StyleSheetManager would definitely be a nice solution! Unfortunately—as discussed in DMs—the manager's sheet/target is not working in all edge cases and scenarios yet 😢

Yea I had the same error, got me very confused.
  // NOTE: This should never happen
  throw new Error('');

wasn't really helpful in finding out what the problem was. :grinning:
In the end it was simply because of double importing of styled-components but which was made less obvious with React working properly and styled-components too in dev-environment. Maybe add check for double importing? Or at least add // have you accidentally double-imported your styled-components before the throw Error().

@TeemuKoivisto That's a good suggestion, I think I'll add some warnings in development. I don't really see any reason against it :)


Updated to Kotlin 1.4.10, Coroutines 1.3.9, Serialization 1.0.0

I'm sure there's more work to do, but thought I would get this opened in the meantime even if it requires more work. I may or may not have time this week to finish up this work, so if anybody wants to run with this and tidy up the rest I won't be offended.
A few comments for the changes I made... I noticed the existing project convention was androidAndroidTest for the source folders, but I didn't see them getting used. I've renamed them to androidTest to follow the standard convention. Subsequently, I see failing tests now. Some help here might be warranted.
Closes #81
Closes #82

androidAndroidTest is a kotlin multiplatform thing androidTest is the normal instrumented test dir but KM prefixes it with the target name (which is android)

Gotcha, I'll revert that change then. Learned something new.

This looks promising. The serialization changes look painful - the dangers of depending on experimental apis I guess. Is it working? Also what happened to @ImplicitReflectionSerializer?

@ImplicitReflectionSerializer was deprecated in the 1.0 API stabilization. serializer() in the underlying implementation seems to be the suggested path.
Regarding "Is it working". Yes, this part I was able to verify the tests passing locally before moving on to the other modules.

Regarding the removal of the cocoapods plugin. The 1.4 release adds some default behavior to that plugin generating podspec files that I think is undesirable when it doesn't seem like it's being used at the moment. Let me know if you disagree, but seemed like a harmless change.

Not as bad as I anticipated on the build side.

I can confirm that these changes are working correctly. I'm using these changes on my project and all is working. Thx @CoreyKaylor for your work!.
Serialization is ok, Flow is still working :) :+1:

Any feedback?

Getting through it, I saw kotlinx.serialization 1.0.0-RC2 came out last week, is it a quick upgarde?

I saw in the releases notes of kotlinx.serialization - Support of custom serializers for nullable types is added (#824) and can see some changes in the PR in regards to handling nullable type.
Sadly the current serialization tests are a bit thin on the ground. Do nullable types still serialize ok? Would be worth adding a few tests for those

I'm out of town for a few more days. I'll take a look at this if I find some time this week, or when I return Sunday.

No guarantees on this attempt at the nullability test. Flying a bit blind on my local development environment. Ideally, some of these get pulled out to a commonTest module instead. Probably worth a separate PR though.

Any further feedback?

Getting kind of silly at this point.

@CoreyKaylor sorry for the delay, I made some changes, could you confirm its' still working in your project and then I'll merge it in.
GitLive is waiting for proguard to support 1.4 before we will upgrade so I can't confirm it works in our project yet.

Possibly @vsouhrada could help out verifying. My Macbook is shipped off for service and won't be back for a few more days.


Modify Get Help page

I will make the page responsive and i will fix the navbar and currently by going to the get help page we can not see the connect with us form properly to do so we have to scroll ,that thing i will fix. thank you for your time.

Solve this first then open other issues @SO1ee  #28

Hey @2024-SANDHYA  , with @SO1ee and your consent , Can I work on this issue ?

Only one person will work on one issue @Kunal0220
@SO1ee You have 4 more days to create a PR

@2024-SANDHYA ,Made a PR on this issue please check.
issues it resolve- now this page is completely responsive including navigation bar and i have modified the design a little. Thank you for your time!

@2024-SANDHYA ,Made a PR on this issue please check. issues it resolve- now this page is completely responsive including navigation bar and i have modified the design a little. Thank you for your time!

Just create the PR I'll check no need to mention everytime @SO1ee


Documentation cross-reference and table improvements

We're  using some pretty difficult syntax and features... not your fault... and largely owing to having to port from MS word a few years ago.
I added a ./docs/CONTRIBUTING.md with some ideas how we can improve the document and workflow. Specifically to the number of tables (and figures) this means using the 'numref' role to automatically number things (so we don't have to renumber the whole section anytime something changes. Similarly, I noticed many of the cross-references have weird spacing (e.g., FIgure1-2 instead of Figure 1-2).  Finally, many of the tables are unreadable owing to excessive column widths (e.g., the Table "CanFlood model level summaries").
The following should be addressed per the new CONTRIBUTING.md guidelines:

[ ] revise all figure and table references to use the 'numref' roll (rather than manually number). Not all figures need a number. We may lose the section number, but this is fine.
[ ] revise all cross-references to be human readable e.g. Table1.1 should be revised to Table 1.1 (numref will automatically do this for tables and figures, but sections may need to be cleaned manually).
[ ] check the width of the tables. Any that are unreadably long should be converted to a csv-table to get the text to wrap.

For re-building tables, it may be easier to use the original manual .docx which is here.


searchEntry.dn is string, not DN object

The docs say

All request objects have the dn getter on it, which is "context-sensitive" and returns the point in the tree that the operation wants to operate on. [...] The DN object itself is documented at DN.

SearchEntry inherits from LDAPMessage and has a dn property, so I assumed it to be a DN object. Instead, it is a string, and needs to be parsed manually. Is this a bug or intended?

⚠ This issue has been locked due to age. If you have encountered a recent
problem that seems to be covered by this issue, please open a new issue.
Please include a minimal reproducible example
when opening a new issue.


We need a new model for job post promotion that doesn't assume custodial funds

Current job promotion logic assumes a custodial wallet. The costs should probably be paid at one time and count towards a month worth of promotion.

I'm think we reuse boost on the job board:

boost lasts 1 month wrt to "promotion status"
jobs are ranked boost desc, created_at desc

Also, we improve the boost meaning elsewhere to support ad-like functionality:

highest boost in the last month (in a given territory or all territories if we're in home) is pinned to the top
boost that isn't the highest in a month otherwise works like normal and ranks higher temporarily


Key up event

Hello, I am calling function when user press enter by using key_up event.
Problem when I have open list for emojis and select emoji using enter same function call as well.
I just want to call function when have focus on main input.

You can check whether is picker is opened or not,
ref https://github.com/mervick/emojionearea/issues/244

I am open another list as well, how can I check that list?

Please provide example of your code at https://jsfiddle.net/, then I will show you

You can set events for each instance separately

https://jsfiddle.net/1v03Lqnu/1177/
When emoji picker open then enter keyup also work.

waiting for your response?

Use keypress instread of keyup,
Example
https://jsfiddle.net/1v03Lqnu/1196/
It's not related to emojionearea, it's default events behavior,
you can't prevent default after keyup, because it's already printed

keypress is not detect enter key code 13.

yes I checked fiddle but it's not work in my app.

I am using it with angularjs, other keys are working with keypress but enter key is not detect.

create example at jsfiddle

maybe it related to angularjs?


engine(dm): ext storage takes no effect for syncer

What did you do?
create engine with s3
What did you expect to see?
syncer load table structure from s3
What did you see instead?
syncer get table info from downstream
Versions of the cluster
DM version (run dmctl -V or dm-worker -V or dm-master -V):
(paste DM version here, and you must ensure versions of dmctl, DM-worker and DM-master are same)

Upstream MySQL/MariaDB server version:
(paste upstream MySQL/MariaDB server version here)

Downstream TiDB cluster version (execute SELECT tidb_version(); in a MySQL client):
(paste TiDB cluster version here)

How did you deploy DM: tiup or manually?
(leave TiUP or manually here)

Other interesting information (system version, hardware config, etc):
>
>

current status of DM cluster (execute query-status <task-name> in dmctl)
(paste current status of DM cluster here)

https://github.com/pingcap/tiflow/blob/fb93ddde4843bb3f24480b55d5100373b849c098/dm/syncer/syncer.go#L2886


Aligning the contract

Targets #{ISSUE_ID}
2012
Description
aligning the contract file
Checklist:

[ ] I have performed a self-review of my own code.

i follow some wrong steps for this pr so, I delete this pr.