Fix type argument finalization of some recursive generic types

The VM has fixed this issue see CL and dart2js works too.  However, DDC returns this error:
http://<IP_ADDRESS>:40713/root_dart/out/ReleaseX64/generated_compilations/dartdevc-strong/tests_language_2_regress_29949_test/regress_29949_test.js:48:
Uncaught ReferenceError: T is not defined

https://dart-review.googlesource.com/c/sdk/+/16337

fixed!


Update README.md

Please verify the following:

[x] ~Everything works on iOS/Android~ N/A
[x] yarn ci:test jest tests pass with new tests, if relevant
[x] ./docs/ has been updated with your changes, if relevant

Describe your PR
I'm not a native english speaker, but is my proposition not a little bit more correct, english-wise? 😅

:tada: This PR is included in version 3.2.2 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Add support for flux-angular

The flux-angular project adds .store as another type of provider.  e.g.:
angular.module('app', ['flux']).store('MyStore', function () {
});

Is it possible to add support for this?  If not, is it something that can be accomplished with the regex option?

Sure - I'll add it to the next release. regexp won't help you in the meantime but ngInject will.

+1. I've just spend an hour trying to figure out why all our tests (which run minified code) fail. Since we'd switched from ng-min to ng-annotate we never had any problems with annotations (thank you so much for that!), so I totally forgot that it can actually be the problem :)

@szimek glad to hear that it's been working mostly well for you! make sure that you have ng-strict-di enabled to reduce the pain of any future problems: https://github.com/olov/ng-annotate#highly-recommended-enable-ng-strict-di-in-your-minified-builds


Support Basic Authentication

Description
Android application doesn't support basic authentication.
ex: it should authenticate with<EMAIL_ADDRESS>Devices and Versions
Your Rocket.Chat.Android version: 2.6.1
Your Rocket.Chat Server version: 0.69.2
Steps to reproduce

Authenticate with<EMAIL_ADDRESS>see error: "An error has occurred while checking your server version, please try again"
=> authentication doesn't work

@antony360 Yes it works... are you using 2FA?

not on our side

@antony360 What's your server URL? As far as I can see, you cannot even connect to it.

It is reproducible in local net with dockerized version and some nginx/traefik in front of RC with basic/auth enabled

@andypost Is the SSL valid? If not you need to choose "http://" instead.

It is valid checked on https://www.ssllabs.com

@rafaelks you can check it out on http://64f11a42.ngrok.io or even https://64f11a42.ngrok.io
you can repro that setup the following way :
docker run --name db -d mongo:3.0 --smallfiles
docker run --name web --link db -d rocket.chat
sudo docker run -d   -e FORWARD_PORT=3000 -p 80:80 --link web:web --name basicauth beevelop/nginx-basic-auth
ngrok http 80

and this is how it looks like when the server info request comes from android app :

and locally (docker / ngrok / chromium) :

Oh, now I'm understanding what you guys are talking about... it really doesn't work for iOS and Android. That's the first time we have this kind of request, hehe... in theory, this should be added as a Header parameter, it works on the browser and other tools because they're doing that under the hood.
Any ideas how to solve this problem in the apps? We could try identifying this information and creating the headers on the request, but honestly, this would need to be saved for future requests as well... 🤔

Since it looks like the app is using okhttp client under the hood, then it's a matter of implementing its authenticator : https://square.github.io/okhttp/3.x/okhttp/okhttp3/Authenticator.html
URL string should be passed to java.net.URL and then getUserInfo could be used to get login and password https://docs.oracle.com/javase/7/docs/api/java/net/URL.html#getUserInfo()
If URL isn't processed somewhere in between, then this could happen here https://github.com/RocketChat/Rocket.Chat.Android/blob/master/app/src/main/java/chat/rocket/android/server/infraestructure/RocketChatClientFactory.kt#L29 I believe

+++ b/core/src/main/kotlin/chat/rocket/core/RocketChatClient.kt
@@ -29,11 +29,13 @@ import kotlinx.coroutines.experimental.channels.Channel
 import okhttp3.HttpUrl
 import okhttp3.MediaType
 import okhttp3.OkHttpClient
+import okhttp3.Credentials
+import java.net.URL
 import java.security.InvalidParameterException

 class RocketChatClient private constructor(
-    internal val httpClient: OkHttpClient,
-    baseUrl: String,
+    internal var httpClient: OkHttpClient,
+    var baseUrl: String,
     userAgent: String,
     internal val tokenRepository: TokenRepository,
     internal val logger: Logger
@@ -66,6 +68,20 @@ class RocketChatClient private constructor(
     internal val socket: Socket

     init {
+        //if userinfo add basic auth interceptor
+        URL(baseUrl).getUserInfo()?.let{
+            val credentials = it.split(":")
+            httpClient = httpClient.newBuilder().addInterceptor { chain ->
+                val originalRequest = chain.request()
+
+                val builder = originalRequest.newBuilder()
+                        .header("Authorization", Credentials.basic(credentials[0], credentials[1]))
+                val newRequest = builder.build()
+                chain.proceed(newRequest)
+            }.build()
+            baseUrl = baseUrl.replace(it+"@","")
+        }
+
         url = sanitizeUrl(baseUrl)
         agent = userAgent

That get it working but not for the avatar images loading (those requests doesn't go thru that http client obviously) + the userinfo is displayed in the left sidebar, as part of the server URL (which is not OK).
I will dig a bit deeper ASAP (maybe later today).

diff --git a/app/src/main/java/chat/rocket/android/dagger/module/AppModule.kt b/app/src/main/java/chat/rocket/android/dagger/module/AppModule.kt
index 496d907b..a7bb2c74 100644
--- a/app/src/main/java/chat/rocket/android/dagger/module/AppModule.kt
+++ b/app/src/main/java/chat/rocket/android/dagger/module/AppModule.kt
@@ -53,6 +53,7 @@ import chat.rocket.android.server.infraestructure.SharedPrefsConnectingServerRep
 import chat.rocket.android.server.infraestructure.SharedPrefsCurrentServerRepository
 import chat.rocket.android.util.AppJsonAdapterFactory
 import chat.rocket.android.util.HttpLoggingInterceptor
+import chat.rocket.android.util.BasicAuthInterceptor
 import chat.rocket.android.util.TimberLogger
 import chat.rocket.common.internal.FallbackSealedClassJsonAdapter
 import chat.rocket.common.internal.ISO8601Date
@@ -109,6 +110,7 @@ class AppModule {
     fun provideOkHttpClient(logger: HttpLoggingInterceptor): OkHttpClient {
         return OkHttpClient.Builder()
             .addInterceptor(logger)
+            .addInterceptor(BasicAuthInterceptor())
             .connectTimeout(15, TimeUnit.SECONDS)
             .readTimeout(20, TimeUnit.SECONDS)
             .writeTimeout(15, TimeUnit.SECONDS)
diff --git a/app/src/main/java/chat/rocket/android/util/BasicAuthInterceptor.kt b/app/src/main/java/chat/rocket/android/util/BasicAuthInterceptor.kt
index e69de29b..b5b8d5dc 100644
--- a/app/src/main/java/chat/rocket/android/util/BasicAuthInterceptor.kt
+++ b/app/src/main/java/chat/rocket/android/util/BasicAuthInterceptor.kt
@@ -0,0 +1,33 @@
+package chat.rocket.android.util
+
+import chat.rocket.android.BuildConfig
+import okhttp3.Credentials
+import okhttp3.Request
+import okhttp3.Headers
+import okhttp3.Interceptor
+import okhttp3.MediaType
+import okhttp3.OkHttpClient
+import okhttp3.Response
+import timber.log.Timber
+import java.net.URL
+import java.io.IOException
+
+class BasicAuthInterceptor : Interceptor {
+
+    init {
+        Timber.d("Basic authentication")
+    }
+
+    @Throws(IOException::class)
+    override fun intercept(chain: Interceptor.Chain) : Response {
+        var authenticatedRequest = chain.request().newBuilder().build()
+
+        URL(chain.request().url().toString()).getUserInfo()?.let {
+            val request = chain.request()
+            val credentials = it.split(":")
+            authenticatedRequest = request.newBuilder()
+            .header("Authorization", Credentials.basic(credentials[0], credentials[1])).build()
+        }
+        return chain.proceed(authenticatedRequest)
+    }
+}
diff --git a/build.gradle b/build.gradle
index 39812fdb..6bf5e3f0 100644
--- a/build.gradle
+++ b/build.gradle
@@ -10,7 +10,7 @@ buildscript {
     }

     dependencies {
-        classpath 'com.android.tools.build:gradle:3.2.0-rc03'
+        classpath 'com.android.tools.build:gradle:3.2.0'
         classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
         classpath "org.jetbrains.dokka:dokka-gradle-plugin:${versions.dokka}"
         classpath 'com.google.gms:google-services:4.0.2'

Following @jbguerraz suggestion i added interceptor on app side it authenticate only if authentication data on url, and loads avatar, now need to hide user data from side bar url.

https://github.com/jbguerraz/Rocket.Chat.Android/commit/192f4dc336403ce82268a373bc213f17bb06fd21
This works quite well (avatar are OK, userinfo is removed from URLs) but that doesn't survive an application restart : the app tries to connect but fail, only a logout / login will helps
Need to find out what's the proper way to persist those http basic authentication credentials so it survives application restarts

Created PR that addresses this issue using a model to store basic auth data mb need some further improvements plz add any comments and opinions about it,  it is a good start.

Since this was added fun String.isValidUrl(): Boolean = Patterns.WEB_URL.matcher(this).matches()
now basic auth url doesn't allow to click on connect button

Thank you guys! We'll be reviewing this PR shortly! :-)


When I predict my test data, I've met KeyError: 'score'!

KeyError                                  Traceback (most recent call last)
/usr/local/lib/python3.6/site-packages/pandas/core/indexes/base.py in get_loc(self, key, method, tolerance)
   2897             try:
-> 2898                 return self._engine.get_loc(casted_key)
   2899             except KeyError as err:

pandas/_libs/index.pyx in pandas._libs.index.IndexEngine.get_loc()

pandas/_libs/index.pyx in pandas._libs.index.IndexEngine.get_loc()

pandas/_libs/hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.get_item()

pandas/_libs/hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.get_item()

KeyError: 'score'

The above exception was the direct cause of the following exception:

KeyError                                  Traceback (most recent call last)
<ipython-input-6-c53796a8d62d> in <module>
      1 test_dataset = ImagePredictor.Dataset.from_folder('../../input0/test/')
----> 2 pred = predictor.predict(test_dataset)
      3 print(pred)

/usr/local/lib/python3.6/site-packages/autogluon/vision/predictor/predictor.py in predict(self, data, as_pandas)
    522         else:
    523             # single image
--> 524             ret = proba.loc[[proba["score"].idxmax()]]
    525             ret = self._label_cleaner.inverse_transform(ret['id'].rename('label'))
    526         if as_pandas:

/usr/local/lib/python3.6/site-packages/pandas/core/frame.py in __getitem__(self, key)
   2904             if self.columns.nlevels > 1:
   2905                 return self._getitem_multilevel(key)
-> 2906             indexer = self.columns.get_loc(key)
   2907             if is_integer(indexer):
   2908                 indexer = [indexer]

/usr/local/lib/python3.6/site-packages/pandas/core/indexes/base.py in get_loc(self, key, method, tolerance)
   2898                 return self._engine.get_loc(casted_key)
   2899             except KeyError as err:
-> 2900                 raise KeyError(key) from err
   2901
   2902         if tolerance is not None:

KeyError: 'score'

How can I solve this problem?

This seems like something particular to your data. Could you provide a colab notebook or script with a minimally reproducible example?

I have solved this problem！If you have this problem, you can do it.
At first, my data set was stored like this：
dataset
|
|---train
|         class1
|                0.jpg
|                1.jpg
|                 ....
|         class2
|                0.jpg
|                1.jpg
|                 ....
|
|---test
|          0.jpg
|          1.jpg
|          2.jpg
|          ....

You will meet 'KeyError: score'，you can：
dataset
|
|---train
|        class1
|                0.jpg
|                1.jpg
|                 ....
|        class2
|                0.jpg
|                1.jpg
|                 ....
|
|---test
|         test
|                 0.jpg
|                 1.jpg
|                 2.jpg
|                 ....

Solve it！

Thanks! I'll re-open this for now as I think the error message can be improved to be less vague.

@Innixma  i think the from_folders should also pick a single folder, either train, val or test. because ultimately it has to create a dataframe. this saves the hassle of arranging data in a particular structure.
What I am saying, if data structure is like
data
-class0
--image0
--image1
...
--imagen
-class1
--image0
--image1
...
--imagen
All the images with their class should be picked. and after that user can split it with sklearn train_test_split, or by random index

@talhaanwarch Yes, this is a good observation and is also how I would like the structure to be formatted.
Currently, the structure is based on GluonCV's expected input structure, so any changes to the structure have to go through GluonCV.
In general, I think there should be no concept of train and test data until the data is passed into .fit. A better approach would be to instead:
train_data = ImageDataset('path/to/train/')
test_data = ImageDataset('path/to/test/')

Or
data = ImageDataset('path/to/data/')

train_data, test_data = split_data(data=data, test_frac=0.2, random_state=42)

This strategy would then be identical to the one used in TabularDataset.
@zhreshold Thoughts?

Such usage is supported by from_folder rather than from_folders:
basically
data = ImageDataset.from_folder('path/to/data/')
train_data, _, test_data = data.random_split(test_size=0.1, random_state=0)


Race conditions when using MassTransit's test harness in unit tests

Contact Details
No response
Version
8.x
On which operating system(s) are you experiencing the issue?
Windows, Linux
Using which broker(s) did you encounter the issue?
In-Memory
What are the steps required to reproduce the issue?
We started using MassTransit's test harness in unit tests as an alternative to mocking `IBus` `ConsumeContext<T>`, etc. Some of our tests started failing randomly, because sometimes the `harness.Consumed.Any<Event>()` calls would not wait for the event consumption and instead would return immediately.

[Here](https://github.com/CarlosZaldivar/MassTransitExample/blob/master/MassTransitExample/Program.cs.) I provide an example of what I think is an untangled, reliably failing execution path that replicates the race condition.

Is that a bug, me doing something wrong or is the test harness unsuitable to be used in units tests (that by nature run in parallel)?

What is the expected behavior?
All harness.Consumed.Any<Event>() calls should await.
What actually happened?
Some harness.Consumed.Any<Event>() calls return immediately.
Related log output, including any exceptions
No response
Link to repository that demonstrates/reproduces the issue
https://github.com/CarlosZaldivar/MassTransitExample

Changed like this:
await using var provider1 = new ServiceCollection()
    .AddMassTransitTestHarness(x =>
    {
        x.AddConsumer<Subscriber1>();
    })
    .BuildServiceProvider(true);

var harness1 = provider1.GetRequiredService<ITestHarness>();
await harness1.Start();

await harness1.Bus.Publish(new Event1());
Assert.That(await harness1.Consumed.Any<Event1>(), Is.True);

await using var provider2 = new ServiceCollection()
    .AddMassTransitTestHarness(x =>
    {
        x.AddConsumer<Subscriber2>();
    })
    .BuildServiceProvider(true);

var harness2 = provider2.GetRequiredService<ITestHarness>();
await harness2.Start();

await harness2.Bus.Publish(new Event2());
Assert.That(await harness2.Consumed.Any<Event2>(), Is.True);

Where the test harness is utilized without waiting, it works as expected. They technically shouldn't conflict with each other, but you can always just limit the unit tests so that they don't run in parallel if it causes issues for you.

I think your example works, because the harness creation and Start() are run before each test. If I change the code to this:
await using var provider1 = new ServiceCollection()
    .AddMassTransitTestHarness(x =>
    {
        x.AddConsumer<Subscriber1>();
    })
    .BuildServiceProvider(true);

await using var provider2 = new ServiceCollection()
    .AddMassTransitTestHarness(x =>
    {
        x.AddConsumer<Subscriber2>();
    })
    .BuildServiceProvider(true);

var harness1 = provider1.GetRequiredService<ITestHarness>();
await harness1.Start();

var harness2 = provider2.GetRequiredService<ITestHarness>();
await harness2.Start();

await harness1.Bus.Publish(new Event1());
Assert.That(await harness1.Consumed.Any<Event1>(), Is.True);

await harness2.Bus.Publish(new Event2());
Assert.That(await harness2.Consumed.Any<Event2>(), Is.True);

then the second assert fails. With unit tests running in parallel we don't have control over (and we shouldn't worry about) when the initialization in each test happens. If this issue cannot be fixed, then I think MassTransit should at least mention in the documentation that the test harness cannot reliably be used in parallel and should not be used in unit tests, which should always be independent of each other.

Well, I've clearly shown that you shouldn't call Start until you're actually using the test harness. And the test harness is used for 1,000's of tests in MassTransit itself. Therefore, it should be used in unit tests. You shouldn't call Start and then sleep for several seconds, as that's going to exhaust the built-in timeouts. Threading is complex enough, sounds like you're trying to make it more complex with decoupled test fixtures which is just going to make things worse for you.


SendZc doesn't work.

I tried to use SendZc and got "{ code: 22, kind: InvalidInput, message: "Invalid argument" }". This is strange because when I use Send for the same task I don't get any errors. I use SendZc like
fn send_zc(&mut self, fd: Fd, buf_ptr: *const u8, len: usize, data: u64) {     self.register_entry(opcode::SendZc::new(types::Fd(fd), buf_ptr, len as _).build(), data); }
where self.register_entry just register the entry with the data.
I've read a code of the crate tests and there just SendZc is used instead of Send. Need I to set some flags or give some new guarantees?

Sometimes this can be caused by the kernel version. Perhaps SendZc isn't supported on the kernel you are trying. Often looking at the man page for liburing will tell you when the io_uring feature you are trying to use was introduced to the kernel.


feat(core): allow multiple Apps

Change the meaning of App to represent the application the user
is defining (as opposed to the internals of the CDK program). The
names of Apps (if given) will be incorporated into the Stack name,
so that it becomes possible to instantiate your Stacks multiple
times just like other constructs (without having to make the
id parameter unique). A new stack property stackName exists
to force the stack to a different name.
If a single App is instantiated without parameters, the observable
behavior of your CDK app won't change. If you insantiate more than
one App, all of them must receive ids.
To represent the CDK internals, a new class called Program exists,
which the user doesn't need to interact with.
app.run() is no longer necessary, and is deprecated. It still
exists to avoid breaking existing programs, but will be removed
in a future release.
Fixes #1479.

Pull Request Checklist

[x] Testing

Unit test added
CLI change?: manually run integration tests and paste output as a PR comment
cdk-init template change?: coordinated update of integration tests with team

[x] Docs

jsdocs: All public APIs documented
README: README and/or documentation topic updated

[x] Title and Description

Change type: title prefixed with fix, feat will appear in changelog
Title: use lower-case and doesn't end with a period
Breaking?: last paragraph: "BREAKING CHANGE: <describe what changed + link for details>"
Issues: Indicate issues fixed via: "Fixes #xxx" or "Closes #xxx"

[x] Sensitive Modules (requires 2 PR approvers)

IAM Policy Document (in @aws-cdk/aws-iam)
EC2 Security Groups and ACLs (in @aws-cdk/aws-ec2)
Grant APIs (only if not based on official documentation with a reference)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license.

@rix0rrr any updates on this?


Consider logging exception stack traces

Using any of the Log* overloads that take an Exception as argument only logs the exception type and message.
Consider logging a stack trace for levels Error and Critical at least. Would be interesting for Debug and Trace too. Definitely not for Information and Warning.

I think all the log levels should behave the same. So all including stacktrace.

Are you talking about a specific provider (eg Console)? As far as I understand, the logger itself takes the whole exception object and forwards it to the providers, so they are free to log as much as they want.

Hello. Is this still considered a bug and needs to be solved?
I'm currently looking for a good point to start contributing to the repo.

Hi!
To be honest I don't know what's the proposed change here.
We could log the exception stacktrace with ${exception}

Console logger already does this, if there is another logger that doesn't please file a new issue.


Added onlychanged flag for watch method

We decided we wanted this boolean option independently of whether we implement the trigger method or not.

Coverage increased (+0.01%) to 78.078% when pulling 220b0a5493b2a11ac3d75f0cb2745fddaee5d475 on onlychanged_watch_flag into 9179ba92492d680437b83a5000bddd62e453f06e on master.


Make KafkaError more catch friendly and efficient

Currently, to catch rdkafka specific errors it is required to compare a string, for example:
do {
    try self.kafkaProducer.send(record)
    return
} catch let error as KafkaError where error.description.contains("one possible rdkafka error") {
// handle exception
} catch let error as KafkaError where error.description.contains("second possible rdkafka error") {
// handle exception
} catch let error as KafkaError where error.description.contains("third possible rdkafka error") {
// handle exception
} catch {
// handle unknown exception
}

It would be nice to have errors listed as public enum somewhere:
do {
    try self.kafkaProducer.send(record)
    return
} catch let error as KafkaError where error.code == .onePossibleRdKafkaError {
// handle exception
} catch let error as KafkaError where error.code == .secondPossibleRdKafkaError {
// handle exception
} catch let error as KafkaError where error.code == .thirdPossibleRdKafkaError {
// handle exception
} catch {
// handle unknown exception
}

Since it might be an often error: e.g. RD_KAFKA_RESP_ERR__QUEUE_FULL/RD_KAFKA_RESP_ERR_MSG_SIZE_TOO_LARGE/RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION/RD_KAFKA_RESP_ERR__UNKNOWN_TOPIC/RD_KAFKA_RESP_ERR__FATAL/RD_KAFKA_RESP_ERR__STATE

The second part should already be possible. Why can't you write catch let error as KafkaError where error.code == .onePossibleRdKafkaError? The errors codes are defined as static lets and the ErrorCode is Equatable.

Hi Franz!
Thank you for looking into it. Yes, for sure we can, but there are some problems with it:

All librdkafka errors are converted to the only one error, in particular .rdKafkaError (aka .underlying error)
No original code propagated to KafkaError, only string description (which might not always required)

Other thoughts regarding errors for librdkafka that might be related to the original issue.
librdkafka has several attributes for errors that would be nice to attach to KafkaError:

rd_kafka_error_is_fatal - important to restart the whole client (or whole application) due to broker/communication error
rd_kafka_error_is_retriable - it could be due timeout, full queue etc and up to downstream application to decide what to do with it, I believe that it is important information
(for future) rd_kafka_error_txn_requires_abort - this error means that transaction should be aborted. I don't think that this particular error should be exposed - it can be handled automatically within transactional api but report final state - transaction is aborted
Would be nice to see original error code of librdkafka as a part of KafkaError (at least in some debug information)

Thanks in advance!

I think we should definitely take those properties of the rd kafka errors into consideration but I don't think we should expose the rd kafka error in a nicer way. At best you don't have to catch the error at all.
It would be great if you can open issues where you currently have to catch rd kafka errors and do logic on your side and we can investigate if we can do this better in our library.

Sure, let me bring an example here so far, if it make sense I can move it to a different issue.
Currently, if queue is full (which may happen time to time on bursts, especially with transactions), that error is being converted to string. We receive some error that contains rdKafkaErorr...Queue is full...
For sure we can have something like the following:
extension KafkaError {
    var queueFull: Bool {
        description.contains("rdKafkaError") && description.contains("Queue full")
    }
}

do {
    self.kafkaProducer.send(...)
} catch let error as KafkaError where error.queueFull {
 /// retry or whatever
}

That is fragile in case description will change at some point and not efficient in case we want to process this specific error.
Other thing that we handle all errors and wish to commit them to our event log that has limited number of characters (250 bytes to be precise). Kafka error codes or any swift enum that is raw representable suit wonderful, so we can pack them compactly.
That are two main reasons why we ask to make them a little bit more efficient, in other words, we want to:

catch some errors without additional overhead or fragile string parsing
log any errors without writing their big string representation

Therefore, if that make sense for the library, I can open one or two cases for both problems.

So in general anytime you have to access the underlying rdkafka error we have to think about wether we either need to handle that error inside our library here and do something with it or if we should create a higher level error from it. I don't want users to ever reach for the rdkafka error and do logic based on it. That would be leaking to much implementation details.

Hi @FranzBusch. Sure, I agree that it might not be good to provide rdkafka error code as is.
However, swift-kafka-client may mimic some error codes and provide description based on that.
Regarding my previous example. While preparing code for other issue (https://github.com/swift-server/swift-kafka-client/issues/132), I had to make the following code to be able to run the sample (https://github.com/ordo-one/swift-kafka-client/blob/bulk-variants/Sources/ForTesting/Snapshot/main.swift#L13-L23):
        while true { // Note: this is an example of queue full
            do {
                try producer.send(message)
                break
            } catch let error as KafkaError where error.description.contains("Queue full") {
                continue
            } catch {
                print("Caught some error: \(error)")
                throw error
            }
        }

In case of example for issue https://github.com/swift-server/swift-kafka-client/issues/132 there just 15_000_000 messages and that error can appear up to 175k times. Which is okay but on every such exception we have to compare this string.
I am not sure what are the best practice for wrapping errors in swift. But my thoughts are that it would be nice to have an enumeration that would allow to compact such error and make lazy string description evaluation.
This is a live example of error, though other errors such as different timeouts, purges, retries could appear for this and other operations.
Do you have something in mind how it could be handled without comparing strings in the application that uses the library?


EXCEPTION_ACCESS_VIOLATION

Question
Hi, I got the problem with that whatever I do I can't run minecraft and always during launching EXCEPTION_ACCESS_VIOLATION appears.
Java version:
I tried <IP_ADDRESS> and 8.0.362.9 but both doesn't seems to work.
<!--
[hs_err_pid3376.log](https://github.com/adoptium/adoptium-support/files/10926640/hs_err_pid3376.log)

@xsedlife This is usually caused by mods or needing to upgrade your graphics drivers.   Please try disable the mods and upgrading the drivers and report back here.

I've already updated by drivers and I also tried to play vanilla minecraft but with the same result. There is still exception_access_violation.

There should be an hs_err_.log file dumped to teh folder of your minecraft install or $TEMP or $TMP - if you can post that up here we might be able to see what is going on

hs_err_pid13944.log

That log file reports you are using 1.8.0_51 as opposed to the latest 1.8.0_362.  Recommend you change the underlying JVM and upload a new log.

Alright, vanilla minecraft seems fixed but when I try to run a modpack with ATLauncher the error appears.
hs_err_pid14800.log

OK you'll need to file this issue with the mod pack owner in that case, it's a crash caused by them overloading some memory when they shouldn't.


setScrollFactor not behaving as documented

According to the documentation, setScrollFactor should make the object move in sync with the camera if set to a value of 1, and not move at all if set to a value of 0. The actual behavior is the other way around though.
reproduction:
https://jsfiddle.net/29oc1849/5/

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

A value of 1 means it will move exactly in sync with a camera. A value of 0 means it will not move at all, even if the camera moves.

I think that's correct, but in sync may be giving the wrong impression. It means in equal proportion.

@samme , yeah the wording was a bit off, but you agree that the implementation and documentation does not match?

No, I think they match.
1 means a camera scroll of +1px (on the game world) shifts the rendering -1px (on the game canvas).
0 means a camera scroll of 1px (on the game world) shifts the rendering 0px (on the game canvas).

Hmm, if that's the case, I think the documentation could state this more clearly in other words. I can still not interpret it any other way.

This is working as intended and the jsfiddle demonstrates it. The scroll factor value is the relationship between the camera movement and the object. So a value of 1 means 1:1, i.e. the camera moves 1px, the object will move 1px. A value of 0 means the object never moves. A Value of 2 means for every 1px the camera moves, the object will move 2px, and so on. This is why a value of 1 keeps the object in-sync with the camera, because however much it moves, the object retains its place in the game world.

@photonstorm thanks for the additional explanation,
I guess my only concern after @samme's previous explanation was the language in the documentation, but I guess it's a PEBCAK :)


chore(main): release 1.6.9

:robot: I have created a release beep boop
1.6.9 (2023-10-17)
Bug Fixes

🔧 优化 isPackaged 判断条件解决某些情况下资源路径解析异常的问题 (fbd1885)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/viarotel-org/escrcpy/releases/tag/v1.6.9 :sunflower:


New #mock_call implementation improperly runs authenticity token verification on all requests

A recent change altered the behavior of omniauth when run in test mode. See below for details.
The change appears to have been introduced here https://github.com/omniauth/omniauth/commit/1b784ffa5f128bea1a22d7d26477f73bb6b3cd08 .
Configuration

Provider Gem: omniauth-*
Ruby Version: 2.7.2
Framework: Rails
Platform: Mac

Expected Behavior
When calling an Omniauth strategy while in test mode, the mock checks and tests should be executed in a way that mirrors normal mode.
In regular mode it would look like this:

Execute request_call phase if on_request_path? is true: https://github.com/omniauth/omniauth/blob/v2.0.1/lib/omniauth/strategy.rb#L192
Within request_call, execute authenticity token verification: https://github.com/omniauth/omniauth/blob/v2.0.1/lib/omniauth/strategy.rb#L236

In other words, token verification only occurs if we are on the request path.
Again the expectation is that test mode would behave the same way: only executing verification if we are on the request path.
Actual Behavior
When test mode is true, mock_call is used early in the execution of the middleware. Unfortunately, the authenticity token verification happens differently than it does in normal mode.
See https://github.com/omniauth/omniauth/blob/v2.0.1/lib/omniauth/strategy.rb#L302 .
The verification happens before the check to on_request_path? is made. As a result, the verification happens on very request, not just those that are on the request path provided by omniauth.
The problem is twofold:

Any request executed while in test mode that is not part of Omniauth and that does not require a CSRF token will fail (an example would be API calls that are part of the same application).
The behavior is different than normal/production mode, meaning developers might inadvertently rely on this addtional verification check which would not be executed in outside of test mode.

Steps to Reproduce

Set  OmniAuth.config.test_mode = true
Execute any non-GET request to any endpoint on the same application that is not on the Omniauth request path.
The on_failure block is triggered.

Fix
For what it's worth the fix seems relatively straightforward: Move the request_validation_phase check...

from here: https://github.com/omniauth/omniauth/blob/v2.0.1/lib/omniauth/strategy.rb#L302
to here: https://github.com/omniauth/omniauth/blob/v2.0.1/lib/omniauth/strategy.rb#L315
So that it behaves in a similar manner as https://github.com/omniauth/omniauth/blob/v2.0.1/lib/omniauth/strategy.rb#L236-L237 and is called only after the on_request_path? check.

Happy to add a pull request but wanted to submit the issue first in case I was missing something

Opened a PR reproducing this issue, with a fix: https://github.com/omniauth/omniauth/pull/1033

Closed via #1033
Released in OmniAuth v2.0.2


test(PanoViewer): apply changed interface

Issue
#72
Details
apply changed interface followed by #44

Coverage increased (+0.2%) to 45.845% when pulling 43da74c99080a5490c4dd2522f6270b23d6a3965 on jongmoon:video#44 into 97c33a1146335da67e32648acc69d244718217ee on naver:video#44.


[Errno 36] File name too long on eCryptfs

Filesystem: EXT4
OS: Ubuntu Linux 14.04 LTS
youtube-dl --version: 2<IP_ADDRESS>
When I try to download a Vimeo video:
youtube-dl --ignore-errors --restrict-filenames https://vimeo.com/80352108
I got the following error:
ERROR: unable to open for writing: [Errno 36] File name too long: ...

Post the full output of youtube-dl when run with --verbose option.

Command:
youtube-dl --verbose --ignore-errors --restrict-filenames https://vimeo.com/80352108
Output:
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'--verbose', u'--ignore-errors', u'--restrict-filenames', u'https://vimeo.com/80352108']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2<IP_ADDRESS>
[debug] Python version 2.7.6 - Linux-4.0.4-x86_64-with-Ubuntu-14.04-trusty
[debug] exe versions: avconv 9.18-6, avprobe 9.18-6, ffmpeg 2.6.3, ffprobe 2.6.3, rtmpdump 2.4
[debug] Proxy map: {'no': 'localhost,<IP_ADDRESS>/8,::1'}
[vimeo] 80352108: Downloading webpage
[vimeo] 80352108: Extracting information
[vimeo] 80352108: Downloading webpage
[debug] Invoking downloader on u'https://pdlvimeocdn-a.akamaihd.net/19466/858/207887776.mp4?token2=1433607436_7bc3e3622d36ab86380807a519b67bb7&aksessionid=021f61e14dcae728'
ERROR: unable to open for writing: [Errno 36] File name too long: 'Oliver_Stone_-_La_historia_no_contada_de_Estados_Unidos_09_-_Bush_y_Clinton_-_El_triunfalismo_americano_y_el_nuevo_orden_mundial-80352108.mp4.part'
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/downloader/http.py", line 155, in real_download
    (stream, tmpfilename) = sanitize_open(tmpfilename, open_mode)
  File "/usr/local/bin/youtube-dl/youtube_dl/utils.py", line 249, in sanitize_open
    stream = open(encodeFilename(filename), open_mode)
IOError: [Errno 36] File name too long: 'Oliver_Stone_-_La_historia_no_contada_de_Estados_Unidos_09_-_Bush_y_Clinton_-_El_triunfalismo_americano_y_el_nuevo_orden_mundial-80352108.mp4.part'

Works perfectly for me under ext4. It's not even close to filesize limit (255).

I will check the ext4 mount options.

What's the length of the full path you run youtube-dl in?

/usr/local/bin/youtube-dl

I mean where you download this file.

/home/user/Descargas/OliverStone

What's the output of getconf NAME_MAX /home/user/Descargas/OliverStone && getconf PATH_MAX /home/user/Descargas/OliverStone?

NAME_MAX=143
PATH_MAX=4096
I didn't mention that my /home/user folder is encrypted with ecryptfs. I've just found the answer in this bug that will not be fixed in Ubuntu: https://bugs.launchpad.net/ecryptfs/+bug/1018050. Anyway, Should the filename be truncated?

NAME_MAX=143 that's it.
Only if we truncate or shorten manually in youtube-dl before writing.

A workaround is to download in /tmp and then move the file to the dest folder with a shorter name or use the youtube-dl [...] -o <filename> option.

It is not only for Vimeo, but for all services.
I sometimes get this error. I believe it is due to a Linux encrypted home. Encrypted home makes the maximum filename size much shorter.

Bug is still here, running cd /tmp helped thx, but permanent fix would be very nice to have.

Long path names are also a problem on Windows. Using symbolic links or juncture points is also a way to fix the issue (so you don't have to add some messy movement operation) but it makes file structures cluttered.
Please add support for longer file names or have some way to truncate all or part of the string in the options.
EXAMPLE
--output 'C:\longafname\look\how\long\i\keep\growing\%(uploader)s\%(title)st20\%(title)st20-%(id)s.%(ext)s'

Where t20 is the truncate delimiter and 20 is the number of characters before the string gets truncated.

Your fork didn't fix the problem for me.

This bug still occurs on recent version as shown below:
youtube-dl -v https://www.youtube.com/watch?v=ej9z7iHbQrU&feature=em-uploademail
[1] 5323
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'https://www.youtube.com/watch?v=ej9z7iHbQrU']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.03.10
[debug] Python version 2.7.12 (CPython) - Linux-4.10.0-38-generic-x86_64-with-LinuxMint-18.3-sylvia
[debug] exe versions: ffmpeg 2.8.11-0ubuntu<IP_ADDRESS>, ffprobe 2.8.11-0ubuntu<IP_ADDRESS>
[debug] Proxy map: {}
[youtube] ej9z7iHbQrU: Downloading webpage
[youtube] ej9z7iHbQrU: Downloading video info webpage
[youtube] ej9z7iHbQrU: Extracting video information
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on u'https://r4---sn-4g5ednly.googlevideo.com/videoplayback?ipbits=0&mime=video%2Fmp4&initcwndbps=425000&itag=137&fvip=6&expire=1521390146&sparams=aitags%2Cclen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&mt=1521368409&key=yt6&beids=%5B9466591%5D&gir=yes&id=o-ADC9UEeEVtJVg4JGOHO25u5BieQtDOuk3iwnRvVbgFhq&mn=sn-4g5ednly%2Csn-nv47lnls&mm=31%2C26&aitags=137&pl=22&dur=1158.040&lmt=1521368369457417&ip=<IP_ADDRESS>&ms=au%2Conr&keepalive=yes&ei=4j2uWt2PI5mZ1gLFgpXABg&mv=m&source=youtube&requiressl=yes&clen=525258987&c=WEB&signature=17C234BD72940B8314578E5E4E1562BCFFBCE296.BC887A9E49ABDB6015D36B243989EC3681C61714&ratebypass=yes'
ERROR: unable to open for writing: [Errno 36] File name too long: '\xe2\x80\xab\xd8\xa7\xd9\x84\xd8\xaf\xd9\x86\xd9\x8a\xd8\xa7 \xd8\xb1\xd9\x88\xd8\xb2\xd9\x8a _ \xd8\xad\xd9\x84\xd9\x82\xd8\xa7\xd8\xaa \xd9\x83\xd8\xa7\xd9\x85\xd9\x84\xd8\xa9 _ \xd8\xb1\xd8\xb3\xd9\x88\xd9\x85 \xd9\x85\xd8\xaa\xd8\xad\xd8\xb1\xd9\x83\xd8\xa9 \xd8\xb9\xd8\xb1\xd8\xa8\xd9\x8a\xd8\xa9 \xd9\x84\xd9\x84\xd8\xa3\xd8\xb7\xd9\x81\xd8\xa7\xd9\x84 _  SPACETOON _ \xd8\xa7\xd9\x84\xd8\xb1\xd8\xb3\xd8\xa7\xd8\xa6\xd9\x84 \xd9\x88\xd8\xa7\xd9\x84\xd8\xaf\xd8\xb9\xd9\x88\xd8\xa7\xd8\xaa-ej9z7iHbQrU.f137.mp4.part'
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/youtube_dl/downloader/http.py", line 249, in download
    ctx.tmpfilename, ctx.open_mode)
  File "/usr/lib/python2.7/dist-packages/youtube_dl/utils.py", line 457, in sanitize_open
    stream = open(encodeFilename(filename), open_mode)
IOError: [Errno 36] File name too long: '\xe2\x80\xab\xd8\xa7\xd9\x84\xd8\xaf\xd9\x86\xd9\x8a\xd8\xa7 \xd8\xb1\xd9\x88\xd8\xb2\xd9\x8a _ \xd8\xad\xd9\x84\xd9\x82\xd8\xa7\xd8\xaa \xd9\x83\xd8\xa7\xd9\x85\xd9\x84\xd8\xa9 _ \xd8\xb1\xd8\xb3\xd9\x88\xd9\x85 \xd9\x85\xd8\xaa\xd8\xad\xd8\xb1\xd9\x83\xd8\xa9 \xd8\xb9\xd8\xb1\xd8\xa8\xd9\x8a\xd8\xa9 \xd9\x84\xd9\x84\xd8\xa3\xd8\xb7\xd9\x81\xd8\xa7\xd9\x84 _  SPACETOON _ \xd8\xa7\xd9\x84\xd8\xb1\xd8\xb3\xd8\xa7\xd8\xa6\xd9\x84 \xd9\x88\xd8\xa7\xd9\x84\xd8\xaf\xd8\xb9\xd9\x88\xd8\xa7\xd8\xaa-ej9z7iHbQrU.f137.mp4.part'

^C
[1]+  Exit 1                  youtube-dl -v https://www.youtube.com/watch?v=ej9z7iHbQrU$

I have also recently been experiencing this with Twitter video sources. MacOS 10.14.6, downloading to /Users/thomasrussellmurphy/Downloads, typically. The immediate workaround is to re-run with --id, producing a low-informative-value output file name, but successfully acquiring the file. I can provide the most recent problem link, if necessary.

this doesnt' work: -o '%(title)st20'

This output format fixes it:

-o %(title).100s.%(ext)s

Replace the 100 with whatever you want, a character limit of 240 works good for me. This still should be implemented in to youtube-dl, though.

@chovy This output format fixes it:

-o %(title).100s-%(id)s.%(ext)s

Replace the 100 with whatever you want, a character limit of 220 works good for me on Windows. This still should be implemented in to youtube-dl, though.

I think the limit depends not on the number of characters, but on the number of bytes.
echo -n "one" | wc --bytes  # 3

# not latin characters
echo -n "раз" | wc --bytes  # 6

In my case(Linux), the limit is 255 bytes for the entire path(filename).

Issue is also due to Unicode Support missing.
https://twitter.com/i/status/1249722477577564162
Steps:

cd /tmp
youtube-dl --verbose  https://twitter.com/i/status/1249722477577564162

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--verbose', u'https://twitter.com/i/status/1249722477577564162']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2020.03.08
[debug] Python version 2.7.12 (CPython) - Linux-4.4.0-140-generic-x86_64-with-Ubuntu-16.04-xenial
[debug] exe versions: ffmpeg 2.8.15, ffprobe 2.8.15
[debug] Proxy map: {}
[twitter]<PHONE_NUMBER>577564162: Downloading guest token
[twitter]<PHONE_NUMBER>577564162: Downloading JSON metadata
[twitter]<PHONE_NUMBER>577564162: Downloading m3u8 information
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on u'https://video.twimg.com/ext_tw_video/1249722345406656513/pu/vid/320x180/T0NEatsKJCrzxJSc.mp4?tag=10'
ERROR: unable to open for writing: [Errno 36] File name too long: 'Kumar Bhanu KS ### \xf0\x9f\x87\xae\xf0\x9f\x87\xb3 - Sri Sri Mahasannidhanam \xf0\x9f\x99\x8f #SringeriJagadGuru Beautifully explained in the below Upanyasa how one must use his money; please watch  Can you find anyone who is not greed for money  No man will not be greedy for money, and if he earns Rs.10, he thinks-1249722477577564162.mp4.part'
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/youtube_dl/downloader/http.py", line 250, in download
ctx.tmpfilename, ctx.open_mode)
File "/usr/local/lib/python2.7/dist-packages/youtube_dl/utils.py", line 2046, in sanitize_open
stream = open(encodeFilename(filename), open_mode)
IOError: [Errno 36] File name too long: 'Kumar Bhanu KS \xf0\x9f\x87\xae\xf0\x9f\x87\xb3 - Sri Sri Mahasannidhanam \xf0\x9f\x99\x8f #SringeriJagadGuru Beautifully explained in the below Upanyasa how one must use his money; please watch  Can you find anyone who is not greed for money  No man will not be greedy for money, and if he earns Rs.10, he thinks-1249722477577564162.mp4.part'
am wondering, if these could help...

Encoding these to Unicode \xf0\x9f\x87\xae\xf0\x9f\x87\xb3 - Sri Sri Mahasannidhanam \xf0\x9f\x99\x8f
Renaming the output file name to have first 250 Letters & 5 digit counter

+1 for automatic truncating

This issue affects a large number of twitter videos as youtube-dl attempts to use the full tweet as the filename.  EXT4, NTFS, and HFS support only 255 characters per filename, but the current max-tweet is 280 characters.
Truncating filenames to 255 characters (including extension) should fix "File name too long" in all conceivable use cases.


Anything for spark streaming?

I couldn't find a streaming fixture, is there anything coming up?

Unfortunately, no plans for now. Will be happy to see new PR if you would like to participate :)


bpf: nat: share rewrite logic in RevSNAT path

ICMP_FRAG_NEEDED / ICMPV6_PKT_TOOBIG packets contain the original packet,
which potentially needs to be RevSNATed. We then use the obtained RevSNAT
entry to also rewrite the outer ICMP packet (note that a lookup for the
ICMP tuple would find no revSNAT entry).
For rewriting the outer ICMP packet, return the RevSNAT entry and just
follow the normal packet path. This reduces program size.

/ci-verifier

/ci-verifier

/test

/test

/ci-eks


SEIR model ode equation mistake

In /src/components/SimulationSEIR.vue line 130
dydt[3] = this.r * y[2] - this.m * y[3];
should be
dydt[3] = this.y * y[2] - this.m * y[3];
Or the recovered line won't show on the line chart.

Thanks Spirallock! =)
Fixed it!


Create custom eoAPI runtime

Build a custom stac service runtime for EOEPCA.

[x] Create dockerfile to build runtime.
[x] Upload to registry (idelally using harbor) via CI.
[x] Adjust k8s to deploy container for eoAPI.
[x] Ensure end-to-end automatic deployment on container definition changes.

This is a precondition for:

the whole STAC API transaction topic:

https://github.com/developmentseed/eoapi-k8s/issues/33
https://github.com/EOEPCA/resource-discovery/issues/90
https://github.com/EOEPCA/resource-discovery/issues/99

https://github.com/EOEPCA/data-access/issues/95

Deployed yesterday some changes to it in order to make the first alpha of STAC manager work. The custom runtime works.


Authentication not working on mobile devices. 🔐

Error description:
Unable to process the request due to missing initial state. This may happen if browser sessionStorage is inaccessible or accidentally cleared. 😭

https://github.com/firebase/firebase-js-sdk/issues/4256
The issue is from firebase side

Can we fix it? @Souravvmishra

🎉 The GSSOC'23 program has reached its conclusion, prompting us to officially close all pull requests (PRs) and issues. We extend a heartfelt thank you for your amazing contributions! 🙌 Keep the coding spirit alive with the same enthusiasm, and may luck 🍀 favor you in all your future coding adventures!


optional_HAVE_INITIALIZER_LIST is undefined

The class declares initialize_list functions under a optional_CPP11_OR_GREATER preprocessor block but the header is in a optional_HAVE_INITIALIZER_LIST block.
We should either:

Change the #include to be wrapped by #if optional_CPP11_OR_GREATER
Change the declarations of the initializer_list functions to be wrapped in optional_HAVE_INITIALIZER_LIST and add a define for optional_HAVE_INITIALIZER_LIST

I suspect 2 is wanted.

Happy to contribute either.

Thanks @mattyclarkson
Would there be cases that warrant separating blocks that are now wrapped in optional_CPP11_OR_GREATER into blocks of optional_CPP11_OR_GREATER and of optional_HAVE(INITIALIZER_LIST)?

I would say not, but the code has a define for initialiser lists so assumed that it was there because there is a reason to have seperate defines.

As a note: optional_HAVE( INITIALIZER_LIST ) is currently only used to guard inclusion of
<initializer_list>.

Defined in 096ce6d7e45ef184de2c8ddcae45da4a9d539da5


Use Guzzle query (resolves issue #1)

Use Guzzle query (resolves issue #1)

Codecov Report

Merging #2 into develop will not change coverage.
The diff coverage is 0%.

@@          Coverage Diff           @@
##             develop   #2   +/-   ##
======================================
  Coverage          0%   0%
  Complexity         8    8
======================================
  Files              4    4
  Lines             38   40    +2
======================================
- Misses            38   40    +2

Impacted Files
Coverage Δ
Complexity Δ

src/ExchangeRates.php
0% <0%> (ø)
2 <0> (ø)
:arrow_down:

src/Metadata.php
0% <0%> (ø)
3 <0> (ø)
:arrow_down:

src/Traits/ApiCallable.php
0% <0%> (ø)
2 <1> (ø)
:arrow_down:

Continue to review full report at Codecov.

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


Automatically delete scratch orgs that fail to auth

Summary
Upon creating a scratch org, if the auth fails from the CLI then the scratch org shows up in the Active Scratch Org records in the Dev Hub but not in the sfdx force:org:list.
Steps To Reproduce:

Create scratch org but trigger a auth failure
The org record will not show locally in the CLI but will in the DevHub in the ActiveScratchOrg records

Expected result
The scratch org should be deleted on auth failure OR show in the CLI where it will be noticed.
Actual result
Discrepancies exist between the DevHub and CLI leading to hidden usage of orgs.
Additional information
See https://trailblazers.salesforce.com/_ui/core/chatter/groups/GroupProfilePage?g=0F93A000000HTp1&fId=0D54S000008fK3N&s1oid=00D4S0000019iJX&s1nid=0DB30000000072L&emkind=chatterCommentNotification&s1uid=0053000000BN9YZ&emtm=1602476442724&fromEmail=1&s1ext=0

yes please

the new org:scratch:create includes the ability to resume a scratch org where auth failed.  You can either continue from there, or delete the org, once it's auth'd.
We don't have a good way to delete an org that you're not auth'd to.


✨ ENH: Enable file option for code-cells

This PR enables the use of a file option for code-cell blocks such as:
```{code-cell} ipython3
:file: _static/somefile.py
```

Discussion:
This is a pretty simple way forward to solve #274 at the myst_nb level during the conversion from md to ipynb file. It essentially looks for a file option attribute and if one is found it brings the contents of the file in and replaces the body_lines from the parsed code-block token. This produces an ipynb that has the contents of the file as a code-block.
The downsides of implementing this feature here are:

myst_nb provides this feature (rather than core myst-parser) so wouldn't be considered part of myst.
It is also only implemented for md file sources.

It is my sense that this feature would rarely be used at the ipynb layer so this could be considered a nice convenience feature of myst_nb but hesitate to cause confusion with other parser features. This small addition would solve our issue of bringing executable code in from a file -- but understand if others think this might be better implemented elsewhere. I am open to thoughts and discussion.
Note: this is not complete as it would need tests, docs, and some robustness additions

Very useful and nice simple syntax.

Very useful and nice simple syntax.

I think this is a pretty straightforward solution on the myst nb side. I suspect that the main downside is that we are breaking from the “two way lossless conversion to ipynb via jupytext only” constraint that we have been following thus far. This is similar to the “code cells can’t be nested in other things” question as well, I think.
I guess to me the main question is how to gracefully support this “extra” functionality in a way that doesn’t confuse people, or create strong maintenance burden, etc.

I think this is a pretty straightforward solution on the myst nb side. I suspect that the main downside is that we are breaking from the “two way lossless conversion to ipynb via jupytext only” constraint that we have been following thus far. This is similar to the “code cells can’t be nested in other things” question as well, I think.
I guess to me the main question is how to gracefully support this “extra” functionality in a way that doesn’t confuse people, or create strong maintenance burden, etc.

I guess to me the main question is how to gracefully support this “extra” functionality in a way that doesn’t confuse people

I agree, what I propose is the following:

Use myst-nb to support this as a jupyter-book feature for myst:markdown
(possibly) document this feature in the myst-nb documentation only given it isn't a formal myst syntax feature
Open an enhancement ticket for the myst specification for future support
Deprecate once MyST supports the markup natively

I guess to me the main question is how to gracefully support this “extra” functionality in a way that doesn’t confuse people

I agree, what I propose is the following:

Use myst-nb to support this as a jupyter-book feature for myst:markdown
(possibly) document this feature in the myst-nb documentation only given it isn't a formal myst syntax feature
Open an enhancement ticket for the myst specification for future support
Deprecate once MyST supports the markup natively

two way lossless conversion to ipynb via jupytext only

this may not be overly broken but will need to dig a bit further. They way I have chosen to update block_lines only doesn't actually impact on the token object which means cell metadata is transferred to the notebook. So in this case the file and path are added to the cell metadata which jupytext should understand (I think).

two way lossless conversion to ipynb via jupytext only

this may not be overly broken but will need to dig a bit further. They way I have chosen to update block_lines only doesn't actually impact on the token object which means cell metadata is transferred to the notebook. So in this case the file and path are added to the cell metadata which jupytext should understand (I think).

@mmcky that's a good point - the resulting ipynb will be two-way lossless, it's just that the ipynb created by jupytext alone (w/o myst nb) will have an empty code cell with the "file" metadata in it. Is that right?

@mmcky that's a good point - the resulting ipynb will be two-way lossless, it's just that the ipynb created by jupytext alone (w/o myst nb) will have an empty code cell with the "file" metadata in it. Is that right?

@mmcky that's a good point - the resulting ipynb will be two-way lossless, it's just that the ipynb created by jupytext alone (w/o myst nb) will have an empty code cell with the "file" metadata in it. Is that right?

@choldgraf I think that is what would happen -- but I will confirm this in the morning :-).

@mmcky that's a good point - the resulting ipynb will be two-way lossless, it's just that the ipynb created by jupytext alone (w/o myst nb) will have an empty code cell with the "file" metadata in it. Is that right?

@choldgraf I think that is what would happen -- but I will confirm this in the morning :-).

So I had a quick look -- the answer is almost but not quite. I used the following source md file:
---
jupytext:
  text_representation:
    extension: .md
    format_name: myst
kernelspec:
  display_name: Python 3
  language: python
  name: python3
---

# Simple Example

```{code-cell} python3
:file: _static/test.py
```

which builds the ipynb as expected
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Simple Example"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "file": "_static/test.py"
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}

listing the file option as metadata.
However the return to md isn't formatted quite right using jupytext==1.8.2 where the code-cell is returned as
```python file="_static/test.py"

```

So I had a quick look -- the answer is almost but not quite. I used the following source md file:
---
jupytext:
  text_representation:
    extension: .md
    format_name: myst
kernelspec:
  display_name: Python 3
  language: python
  name: python3
---

# Simple Example

```{code-cell} python3
:file: _static/test.py
```

which builds the ipynb as expected
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Simple Example"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "file": "_static/test.py"
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}

listing the file option as metadata.
However the return to md isn't formatted quite right using jupytext==1.8.2 where the code-cell is returned as
```python file="_static/test.py"

```

@chrisjsewell within the test framework do you know how I can copy a support file to the var location that the test are executed in?

@chrisjsewell within the test framework do you know how I can copy a support file to the var location that the test are executed in?

@mmcky I reckon we can copy the support file explicitly from the source to the "temp srcdir" . Implicit copying does not sound feasible/practical to me.
Code can be something like:
from sphinx.util.fileutil import copy_asset_file

def test_codecell_file(sphinx_run, file_regression, check_nbs, get_test_path):
    asset_path = get_test_path('mystnb_codecell_file.py')
    copy_asset_file(str(asset_path), str(sphinx_run.app.srcdir))

@mmcky I reckon we can copy the support file explicitly from the source to the "temp srcdir" . Implicit copying does not sound feasible/practical to me.
Code can be something like:
from sphinx.util.fileutil import copy_asset_file

def test_codecell_file(sphinx_run, file_regression, check_nbs, get_test_path):
    asset_path = get_test_path('mystnb_codecell_file.py')
    copy_asset_file(str(asset_path), str(sphinx_run.app.srcdir))

ok thanks @AakashGfude I will try and add that in today and see if that works.

ok thanks @AakashGfude I will try and add that in today and see if that works.

@AakashGfude is 48129ad what you had in mind?

@AakashGfude is 48129ad what you had in mind?

that's right @mmcky. Now, you just need to push test_codecell_file.ipynb and test_codecell_file.xml, created during the local test run, in this PR. So, that these file_regression check lines https://github.com/executablebooks/MyST-NB/pull/286/files#diff-2f71d7670a4c11fabd3fd5891cdcd501f695c2ee50b53bdf7fbcaf6bf669a8b0R27 do not try to create them during CI run.

thanks @AakashGfude with your help in getting this test infrastructure updated.

@AakashGfude would you mind to review this PR when you have some time. It would be great to get this into the next release of myst_nb

One case in which we need to issue a warning is when we have both inline code and :file: key in a code-cell. Example:
```{code-cell} ipython
:file: ../TOCTESTBOOK/mystnb_codecell_file.py
i = 10
print(i)

The file imported by the :file: key overwrites the inline code at present. We should notify users when this happens.

thanks for this addition @AakashGfude 👍

I suspect that the main downside is that we are breaking from the “two way lossless conversion to ipynb via jupytext only” constraint that we have been following thus far.

yeh again, for the record, I think this is a bad idea that breaks our pre-agreed design decision. But I don't have time to think of an alternative right now, so I'll approve with the changes I have requested.

I suspect that the main downside is that we are breaking from the “two way lossless conversion to ipynb via jupytext only” constraint that we have been following thus far.

yeh again, for the record, I think this is a bad idea that breaks our pre-agreed design decision. But I don't have time to think of an alternative right now, so I'll approve with the changes I have requested.

thanks @chrisjsewell for your comments and review. I will go through them today.
As per discussion above I tested this with jupytext and the conversion is effectively lossless - but doesn't action the :file: import through jupytext -- instead it adds it as cell metadata by default -- so we could update jupytext to action :file: metadata tag.

@chrisjsewell it looks like tox doesn't specifically control the version used of myst_parser. We had to update this fixture when I committed the change to docs page in 32523ca. Just checking that update to the fixture makes sense with you.

@chrisjsewell I have now responded to all your review comments above and put reasons for not accepting some. Let me know if these updates make sense. It would be great to get this feature incorporated so we can finalise our migration projects.

I think that since we're flagging this feature as strictly experimental, and not part of the core myst-notebook spec, we have a little bit of leeway in changing the implementation as we learn more and see how people use it (even it this means removing the implementation entirely!). As long as we make it clear to others what to expect this is IMO ok. So I'd be +1 on merging in and seeing what kinds of feedback we get.

it looks like tox doesn't specifically control the version used of myst_parser. We had to update this fixture when I committed the change to docs page in 32523ca. Just checking that update to the fixture makes sense with you.

yep thats fine; tox uses the version pinning in setup.py, this change comes from moving from myst-parser 0.13.3 to 0.13.5

I think that since we're flagging this feature as strictly experimental, and not part of the core myst-notebook spec, we have a little bit of leeway in changing the implementation as we learn more and see how people use it (even it this means removing the implementation entirely!). As long as we make it clear to others what to expect this is IMO ok.

yes exactly, once it is in and people starting using it, it will be hard to deprecate

so we could update jupytext to action :file: metadata tags.

yes I would certainly ask if you can pursue this (or another solution) in jupytext

I think that since we're flagging this feature as strictly experimental, and not part of the core myst-notebook spec, we have a little bit of leeway in changing the implementation as we learn more and see how people use it (even it this means removing the implementation entirely!). As long as we make it clear to others what to expect this is IMO ok.

yes exactly, once it is in and people starting using it, it will be hard to deprecate

I think the main thing is that we introduce and maintain consistent syntax. I think what is proposed here is an intuitive way to add a file containing code to a code-cell. As with most software we can iterate on the best location on where this is best supported (i.e. promote it to be a more fundamental feature of myst)
```{code-cell} python
:file: some-file.py
```

my tentativeness here is that file is a pretty generic key

That's what attracts me to :file: I would find it easy and natural to remember.

I think what is proposed here is an intuitive way to add a file containing code to a code-cell.

The point is that this is not part of standard Jupyter or jupytext, so if you have one of these myst files with this syntax you can't run it as a regular notebook, it has to be converted in a bespoke way first. For example, these files will no longer work with Binder.
I'm going to have to hunt down where we first discussed this lol, because I distinctly recall initially arguing against this bi-directional mapping and you guys were for it.

I'm going to have to hunt down where we first discussed this lol, because I distinctly recall initially arguing against this bi-directional mapping and you guys were for it.

Indeed I am generally all for this and I think it is an important guiding principle. I just think it is ok if we improve support for this syntax as project needs demand over time. Binder is a good point and possibly a good reason to think about upstreaming this to jupytext. However, at this time, we can't really use the myst notebooks on binder as there is currently no jupyter rendering syntax support for myst markup in general which is why we need to use sphinx-tojupyter in the short/medium term to produce notebooks that contain base md.

FWIW, I think that @chrisjsewell 's point about :file: is a good one. The metadata in code-cell becomes generic Jupyter cell metadata, and I could definitely see this stepping on the toes of some other :file: metadata.
Two other options:
What about :include:? This is:

A bit more precise and less common than file
Already in-line with what Sphinx does

What about :load:? This is:

Similar to what Jupyter uses for its %load magic: https://ipython.readthedocs.io/en/stable/interactive/magics.html#magic-load

thanks for these thoughts @choldgraf I think aligning with jupyter could be nice using :load:? It also works in a similar way to the magic as it needs to be parsed (i.e. executed to load the cell) like %load.

thanks @chrisjsewell @choldgraf @AakashGfude for your feedback on this. I think we have arrived at a nice syntax choice and would love to see this merged so we can move forward with our quantecon migrations to jupyter-book.

I fine w merging this. Though one thought for the long term, could we add an extension point to the myst nb sphinx extension ? Eg if you could register a function that would take a notebook as input, and then hook that up to either a pre or post execute callback, then this kind of functionality could just be a sphinx extension rather than supported natively by myst nb.
We could look at papermill for some inspiration https://papermill.readthedocs.io/en/latest/extending-overview.html
(Or to be honest I wonder if there is some way we could use papermill under the hood for these use cases? That might be more complex tho)

Eg if you could register a function that would take a notebook as input, and then hook that up to either a pre or post execute callback, then this kind of functionality could just be a sphinx extension rather than supported natively by myst nb.

This is an interesting idea @choldgraf. A sphinx-extension could perform actions on any metadata associated with a notebook or cell. I will open an issue to track this suggestion.

I thin this now looks good to 🚢
I have opened this discussion to capture the outstanding ideas re: ultimate resting place for this feature
https://github.com/executablebooks/meta/discussions/262

Thanks for helping with this @choldgraf and @chrisjsewell .  Switching over the main section of our lectures has been stalled on this feature for quite a while and we're a bit stuck right now.  Once it's available we'll be able to push forward with shifting over the rest of the QE material, which is a sizable chunk of what was promised in the grant proposal.

then this kind of functionality could just be a sphinx extension rather than supported natively by myst nb.

Notebooks should be able to be executed before "entering" sphinx; this was part of the modular design we originally conceived of, i.e. you should be able to use jupyter-cache independently to execute the notebooks and cache them, then run the sphinx build after and it just pulls from this cache.
If you intrisically modify the notebook code cells with sphinx extensions, you can no longer achieve this modularity.

docname is not available when using jupyter-cache

@chrisjsewell is docname not available when using jupyter-cache becuase it is too early in the sphinx build process to fill config.temp_data['docname'] when parsing the document?

is docname not available when using jupyter-cache becuase it is too early in the sphinx build process to fill config.temp_data['docname'] when parsing the document?

yep, see https://www.sphinx-doc.org/en/master/extdev/appapi.html?highlight=config-inited#sphinx-core-events, docname is only injected in the loop after step 4, execution is handled in step 3

docname was available before in test_codecell_file_warnings though when issuing the warning which suggests the env is populated at some stage but not at the point that you want to pass env.docname

yeh but this uses the force setting not the cache setting

docname was available before in test_codecell_file_warnings though when issuing the warning which suggests the env is populated at some stage but not at the point that you want to pass env.docname

yeh but this uses the force setting not the cache setting

Oh I see. I put 43cc5cc together assuming docname wasn't populated for the case of the master_doc such as in a single file project context. But I should check this attribute is sensible in a multiple file project context so we aren't always returning the main master_doc in the warning.

ok I've basically rewritten the whole thing now lol:

I'm not sure what the thinking was behind using a regex to get the filename, given that the options are already passed to a dict. So thats been removed
The :load: file is now relative to the markdown file it is in, rather than relative to the sphinx source directory. This is consistent with all other resources (images, downloads, includes, etc)

@AakashGfude I see you are still active, if this looks ok I will merge?

@AakashGfude I see you are still active, if this looks ok I will merge?

@chrisjsewell The code looks ok from my side.👌

Thanks everybody for all the hard work in thinking this one through and in implementation!

hey @chrisjsewell thanks for the changes. They look good.

Hi all, nice changes! I'd like to understand the implications of the change to the design principles better. Previously, I thought, that the result of converting myst to ipynb with jupytext, then executing directly, and then converting back should yield the result of what myst-nb does. Is this still the case? If not, what's the design constraint then?

hi @akhmerov I have chosen the current syntax (in part) as it will currently roundtrip (myst:md -> ipynb -> myst:md) through jupytext as metadata -- so from an information perspective it is still compliant -- there is just no action taken on the :load: request.
There has been some discussion around possibly moving this downstream to jupytext to action the :load: metadata - or possibly convert a :load: to %load ipython magic -- but that requires some parsing logic which introduces some complexity you may want to avoid in jupytext. Currently this enables bringing code in from a file as a myst-nb feature (as has therefore been documented in myst-nb docs only).
Note: We need this to move the quantecon lecture migrations to jupyter-book forward as we needed to bring code in from a file. It is becoming a binding constraint and thought this was the "best" part of the stack  to implement support to start with.

@mmcky it might be helpful if you wrote up the quantecon use case in a discussion or something, so that others know the reason that you need to load one python file across multiple notebooks. Is this for import statements or something?

Sure @choldgraf it is mainly for sharing functions across lectures. You can develop some code in an earlier lecture and then re-use the function or class later (while still displaying the code) and only having a single edit point to remove any duplication.
Once myst-nb=0.12.0 is released I can certainly at some links to source and output as a demo from https://github.com/QuantEcon/lecture-python.myst

This is wonderful. I agree it is useful to be able to replicate code across parts. Does it support importing only part of the file; e.g. a start and end line number? I looked at the code quickly, but it didn't seem so.

@mmcky thanks for sharing! I think it'd also be helpful to hear why this isn't resolvable by using import statements and your own python module (I know that we've discussed before, but I think the writeup could help centralize this information!)

I would say it is resolvable in that way but with more effort.
If the code is a bunch of small examples that you don't really want to maintain a package for, and which are frequently edited, then the solution proposed here is much easier to manage.
I suppose the other option is to inject the code into the md files using a preprocessing script before compiling.  I'm not keen on that approach for our source material because our goal is to use plain vanilla JB and its extensions, rather than maintaining extra scripts.

@jstac just to clarify, I am not arguing against it, I'm just saying that it would be helpful to have a writeup somewhere that clarifies these things, so that we can point to it in discussions, design decisions, etc!

sure thing @choldgraf I will document a use case and design decisions etc. Probably for https://executablebooks.org/en/latest/ if people don't want to distribute this more widely at the moment. I will then link to it from myst-nb docs.
agree with all of @jstac comments. In addition a package is not a good way to show source code -- but is useful for routines that are commonly used. For those items we use the open source QuantEcon.py package

@mmcky you could also just make it a "discussion" in the executablebooks/meta discussions board 👍


Update to<EMAIL_ADDRESS>

Summary

This PR is a feature
It updates our c2c dependency to<EMAIL_ADDRESS>Resolves #1042
Fixes #980  (expected)
Fixes #979 (expected)

TODO

[x] Update RZ host-configs
[x] Update CZ host-configs
[ ] Update RELEASE-NOTES
[ ] Confirm that #979 is resolved
[ ] Confirm that #980 is resolved

@BradWhitlock -- I removed the ENABLE_WHEN_C2C_IS_UPDATED_ON_ALL_PLATFORMS guards in the quest_intersection_shaper tests.
What else should I look into to confirm that #979 and #980 are resolved?
Do I need to modify the heroic roses assemblies in the axom_data repo?


Add "tcp" feature to Hyper

I had the same issue as #59 and #55 where I was getting this error:
thread 'main' panicked at 'executor must be set'

Adding "tcp" feature to Hyper fixed this (base on suggestions from @staninprague in #59).

👋🏼  Hello, this project now has new maintainers and I'm trying to catchup with PRs and Issues. Looks like this solves the problem so I'll merge the PR in so that the examples are working again before we investigate the code and work on improving it.


image.pullPolicy defaults to Always

The imagePullPolicy defaults to Always, despite the comment in values.yaml:
https://github.com/companyinfo/helm-charts/blob/6bda028afdc3c4c15b225084e7104b17714e77d9/charts/helmet/values.yaml#L76-L80
Additionally, the values.yaml field for image.pullPolicy is not subject to further rendering by common.tplvalues.render, so the default value (or the end user) cannot do anything like {{ eq .Values.image.tag "latest" | ternary "Always" "IfNotPresent" }} in their values.yaml.
Another option would be to replace the template at https://github.com/companyinfo/helm-charts/blob/6bda028afdc3c4c15b225084e7104b17714e77d9/charts/helmet/templates/_deployment.yaml#L58
with
  imagePullPolicy: {{ default (eq .Values.image.tag "latest" | ternary "Always" "IfNotPresent") .Values.image.pullPolicy }}

Hi @zevisert, Thanks for your contribution.
Based on your changes, the .Values.image.pullPolicy won't be reached at all. If the image tag is set to "latest", the imagePullPolicy will be set to Always. If it's not set to latest, then the imagePullPolicy will be set to IfNotPresent. The question is, how can I set the imagePullPolicy to Always only when the image tag is not latest?
Regardless, we prefer not to change this part because Kubernetes handles the image pulling behavior in a specific way. Please review this section of the Kubernetes documentation: Default image pull policy

Perhaps you didn't scroll to the right far enough in my suggestion? I'm suggesting to change helmet's exported default value to '' or null, then when rendering, if there is a value for .Values.image.pullPolicy, then use that. Otherwise, use whichever policy makes sense for the given tag. If you want to force a given policy, this suggestion will still let you do that.
This does need changing if you prefer to leverage Kubernetes' handling of the image pulling behavior since that behaviour only applies if "if you omit the imagePullPolicy field", and helmet provides no way for the user to omit this field.


[Bug]: Regrid2 error when interpolates a spatial field without time axis

What happened?
regrid2 returns error when input field for interpolation does not have time axis. In below example, I am interpolating a 2d spatial field, a time snapshat. xesmf works fine for the case.
What did you expect to happen? Are there are possible answers you came across?
When time axis does not exist, regrid process should only regrid that field (single time step).
Minimal Complete Verifiable Example (MVCE)
import xcdat as xc

!wget https://www.ncei.noaa.gov/data/sea-surface-temperature-optimum-interpolation/v2.1/access/avhrr/198109/oisst-avhrr-v02r01.19810901.nc

input_data = "oisst-avhrr-v02r01.19810901.nc"
ds = xc.open_dataset(input_data)

# Make a target grid to interpolate to
target_grid = xc.create_uniform_grid(-90, 90, 5, 2.5, 357.5, 5)
target_grid

ds_regridded_regrid2 = ds.regridder.horizontal("sst", target_grid, tool="regrid2")

Relevant log output
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
File ~/mambaforge/envs/enso_metrics_dev_20231204/lib/python3.10/site-packages/xcdat/regridder/regrid2.py:134, in Regrid2Regridder._output_axis_sizes(self, da)
    133 try:
--> 134     axis_name = axis_name_map[standard_name]
    135 except KeyError:

KeyError: 'time'

During handling of the above exception, another exception occurred:

RuntimeError                              Traceback (most recent call last)
/Users/lee1043/Documents/Research/xcdat/test_regrid2_nan_issue/test_regrid2_coordinate.ipynb Cell 6 line 1
----> 1 ds_regridded_regrid2 = ds.regridder.horizontal("sst", target_grid, tool="regrid2") # unmapped_to_nan=True is not available for regrid2

File ~/mambaforge/envs/enso_metrics_dev_20231204/lib/python3.10/site-packages/xcdat/regridder/accessor.py:324, in RegridderAccessor.horizontal(self, data_var, output_grid, tool, **options)
    322 input_grid = _get_input_grid(self._ds, data_var, ["X", "Y"])
    323 regridder = regrid_tool(input_grid, output_grid, **options)
--> 324 output_ds = regridder.horizontal(data_var, self._ds)
    326 return output_ds

File ~/mambaforge/envs/enso_metrics_dev_20231204/lib/python3.10/site-packages/xcdat/regridder/regrid2.py:96, in Regrid2Regridder.horizontal(self, data_var, ds)
     92 input_data = input_data_var.values
     94 axis_variable_name_map = {x: y[0] for x, y in input_data_var.cf.axes.items()}
---> 96 output_axis_sizes = self._output_axis_sizes(input_data_var)
     98 ordered_axis_names = list(output_axis_sizes)
    100 output_data = self._regrid(input_data, output_axis_sizes, ordered_axis_names)

File ~/mambaforge/envs/enso_metrics_dev_20231204/lib/python3.10/site-packages/xcdat/regridder/regrid2.py:136, in Regrid2Regridder._output_axis_sizes(self, da)
    134     axis_name = axis_name_map[standard_name]
    135 except KeyError:
--> 136     raise RuntimeError(
    137         f"Could not find axis {standard_name!r}, ensure {standard_name!r} "
    138         "exists and the attributes are correct."
    139     )
    141 if standard_name in self._output_grid:
    142     output_sizes[axis_name] = self._output_grid.sizes[standard_name]

RuntimeError: Could not find axis 'time', ensure 'time' exists and the attributes are correct.

Anything else we need to know?
No response
Environment
xcdat: 0.6.1

xr.show_versions()
```
INSTALLED VERSIONS
------------------
commit: None
python: 3.10.10 | packaged by conda-forge | (main, Mar 24 2023, 20:17:34) [Clang 14.0.6 ]
python-bits: 64
OS: Darwin
OS-release: 22.6.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: None
LOCALE: (None, 'UTF-8')
libhdf5: 1.14.2
libnetcdf: 4.9.2
xarray: 2023.11.0
pandas: 2.1.3
numpy: 1.23.5
scipy: 1.11.4
netCDF4: 1.6.5
pydap: None
h5netcdf: None
h5py: None
Nio: None
zarr: None
cftime: 1.6.3
nc_time_axis: 1.4.1
iris: None
bottleneck: None
dask: 2023.12.0
distributed: 2023.12.0
matplotlib: 3.7.1
cartopy: 0.22.0
seaborn: 0.12.2
numbagg: None
fsspec: 2023.12.0
cupy: None
pint: None
sparse: 0.14.0
flox: None
numpy_groupies: None
setuptools: 67.7.2
pip: 23.1.2
conda: None
pytest: None
mypy: None
IPython: 8.18.1
sphinx: None
/Users/lee1043/mambaforge/envs/enso_metrics_dev_20231204/lib/python3.10/site-packages/_distutils_hack/init.py:33: UserWarning: Setuptools is replacing distutils.
warnings.warn("Setuptools is replacing distutils.")
</details>

I don't know if this was already considered in #533. @jasonb5 @tomvothecoder could you please remind me?

@lee1043 I will check, this may be resolved with #533.

Hey @jasonb5, did you confirm whether or not this was fixed in #533?

From my understanding, this issue is related to missing CF attributes for this specific dataset.
Is that correct? If so, we can probably close this issue.

@tomvothecoder agreed.


iMXRT10xx Linker Issues

Operating System
Linux
INFO_UF2.TXT
NA
What happened ?
The .hex file generated by the linker script has the virtual memory addresses, not the load addresses, so it is not useful for loading the flash, with the Teensy loader for example.  This is my mistake, if I had made the linker scripts correctly, it should be able to create a valid .hex file with the correct flash addresses.
How to reproduce ?
These instructions are for the Teensy 4.x board

Attempt to load the generated .hex file with Teensy Loader. This will corrupt the flash so the board gets stuck in serial download mode.
Convert the .bin to .hex with this command arm-none-eabi-objcopy -I binary -O ihex --change-addresses 0x60000000 tinyuf2-teensy41.bin tinyuf2-teensy41-fix.hex  This will generate a .hex file with the proper addresses.

Debug Log
No response
Screenshots
No response

it is totally not your mistake nor anyone mistake. We just simply have not tested the hex file just since migrated bootloader to SRAM. And the sdphost works perfectly since then. Let me pull out my rt1011 since it has on-board daplink that I can flash the hex file with pyocd to test out your suggestion of adding --change-address

fixed by #291


Type safety can be lost if an overloaded function is passed as a parameter

TypeScript Version:  2.2.1 + nightly (2.3.0-dev.20170301)
Code
declare function head(str: string): string;
declare function head<T>(arr: T[]): T;

const numberLists: number[][] = [
  [1, 2],
  [3, 4]
];

// This makes sense
const numberHeads: number[] = numberLists.map(head);

// This shouldn't compile
const stringHeads: string[] = numberLists.map(head);

// This shouldn't compile
const booleanHeads: boolean[] = numberLists.map(head);

// This shouldn't compile
const nullHeads: null[] = numberLists.map(head);

Expected behavior:
Described above in comments
Actual behavior:
All the cases compile, because the return type of all numberLists.map calls here is any[]. Reversing the order of the overloaded function declarations results in this:

cases 3, 4 fail to compile (correct)
case 1 fails to compile (incorrect)
case 2 compiles (incorrect)

There are quite a lot of open issues involving function overloading, but I couldn't find one about forced any-typed return values, which are a silent killer in a codebase because even noImplicitAny doesn't catch these. I wouldn't mind if all the use sites required extra types, but in this case I don't seem to have a way of avoiding accidental loss of type safety.

Also, if I call the function using a lambda instead ( numberLists.map(x => head(x)) ), all the cases work as expected.

Please see https://github.com/Microsoft/TypeScript/issues/8397 for more details.


Multiple github repositories for godot-rl-agents

Currently there are 3 repos for godot-rl-agents.

https://github.com/edbeeching/godot_rl_agents_plugin
https://github.com/edbeeching/godot_rl_agents
https://github.com/edbeeching/godot_rl_agents_examples/tree/main

For a newbie, it gets very confusing to access information at multiple places. Request to consider unifying all to a single repository in subsequent releases.

Fair, but each repo README.md tells you what the purpose of the repo is:

godot_rl_agents -> Python library used to communicate with the Godot Environments
godot_rl_agents_examples -> Out of the box Godot Environments that you can train your agents on
godot_rl_agents_plugin -> Godot addon used for creating your own Godot Environment

While it may be complicated at first glance, you get used to it after a few uses, just like driving a car.

For a newbie, it gets very confusing

Fair, but each repo README.md tells you what the purpose of the repo is:
godot_rl_agents -> Python library used to communicate with the Godot Environments
godot_rl_agents_examples -> Out of the box Godot Environments that you can train your agents on
godot_rl_agents_plugin -> Godot addon used for creating your own Godot Environment
While it may be complicated at first glance, you get used to it after a few uses, just like driving a car.


[Support] Looking for accessing the map object in Typescript component

Hello,
I'm using your package in a project. We are also using Typescript and managed to get a map displayed correctly.
I can interact in the map by adding the default provided controls like <ol-layerswitcher> etc, etc...
I'm opening this issue because I would like to add a custom layer switcher (https://github.com/walkermatt/ol-layerswitcher) and I'm unable to access the map object and call the addControl method.
Is there a way to access this object from the map component definition ?
The whole project can be found here: https://gitlab.com/champs-libres/egeriec/egeriec-app/-/tree/main/frontend
I'm a newcomer in the JS world, please bear with me please!
Thanks in advance.

Hello, we have already   ol-layerswitcher-control tag and ol-layerswitcherimage-control tag.
https://github.com/MelihAltintas/vue3-openlayers/blob/main/src/components/mapControls/LayerSwitcherControl.vue
https://github.com/MelihAltintas/vue3-openlayers/blob/main/src/components/mapControls/LayerSwitcherImageControl.vue
Example Usage:
https://codesandbox.io/s/demo-map-addcontrol-basic-jmpbk2?file=/src/components/Comp.vue
But you want to add this lib specifically. I showed below example:
https://codesandbox.io/s/demo-map-addcontrol-x4wwus?file=/src/components/Comp.vue

Thanks for the explanation !
Indeed I would like to use a custom control, so the example 2 might fit for me.
I tried in my project:
import { defineComponent, ref } from 'vue';
import { GeoJSON } from "ol/format";
import { colors } from '@/utils/_colors';
import LayerSwitcher from 'ol-layerswitcher';
import OpenLayersMap from 'vue3-openlayers';
import 'ol-layerswitcher/dist/ol-layerswitcher.css';

export default defineComponent({
  name: 'Map',
  setup() {
    const map = ref(null);
    const center = ref([485016.44, 6550857.95]);
    const projection = ref('EPSG:3857');
    const zoom = ref(9);
    const rotation = ref(0);
    const urlStationsLayer = ref('/api/stations');
    const urlStationsZonesLayer = ref('/api/stations-zones');
    const formatGeojson = new GeoJSON();

    const layerSwitcher = new LayerSwitcher();

    return {
      center,
      projection,
      zoom,
      rotation,
      urlStationsLayer,
      urlStationsZonesLayer,
      formatGeojson,
      map,
      layerSwitcher
    };
  },
  mounted() {
    this.map.map.addControl(this.layerSwitcher);
  },
  data() {
    return {
      colors: colors,
      currentCenter: this.center,
      currentZoom: this.zoom,
      currentResolution: this.resolution,
      currentRotation: this.rotation,
    };
  },
  methods: {
    zoomChanged(currentZoom) {
      this.currentZoom = currentZoom;
    },
    resolutionChanged(resolution) {
      this.currentResolution = resolution;
    },
    centerChanged(center) {
      this.currentCenter = center;
    },
    rotationChanged(rotation) {
      this.currentRotation = rotation;
    },
  },
})

But when I do that, I have this error:

What should I do to prevent this?
Thanks !
PS: Just added a star !

To get it working,
I have to do:
import { defineComponent, ref } from 'vue';
import { GeoJSON } from "ol/format";
import { colors } from '@/utils/_colors';
import LayerSwitcher from 'ol-layerswitcher';
import OpenLayersMap from 'vue3-openlayers';
import 'ol-layerswitcher/dist/ol-layerswitcher.css';

export default defineComponent({
  name: 'Map',
  setup() {
    const map = ref(OpenLayersMap);
    const center = ref([485016.44, 6550857.95]);
    const projection = ref('EPSG:3857');
    const zoom = ref(9);
    const rotation = ref(0);
    const urlStationsLayer = ref('/api/stations');
    const urlStationsZonesLayer = ref('/api/stations-zones');
    const formatGeojson = new GeoJSON();

    const layerSwitcher = new LayerSwitcher();

    return {
      center,
      projection,
      zoom,
      rotation,
      urlStationsLayer,
      urlStationsZonesLayer,
      formatGeojson,
      map,
      layerSwitcher
    };
  },
  mounted() {
    this.map.map.addControl(this.layerSwitcher);
  },
  data() {
    return {
      colors: colors,
      currentCenter: this.center,
      currentZoom: this.zoom,
      currentResolution: this.resolution,
      currentRotation: this.rotation,
    };
  },
  methods: {
    zoomChanged(currentZoom) {
      this.currentZoom = currentZoom;
    },
    resolutionChanged(resolution) {
      this.currentResolution = resolution;
    },
    centerChanged(center) {
      this.currentCenter = center;
    },
    rotationChanged(rotation) {
      this.currentRotation = rotation;
    },
  },
})

Is it the proper way to do this?

you are using typescript so in the mounted method of the first example, ts compiler warn you maybe the map element ref is null. You should assert that this value is not null with !
mounted() {
    this.map!.map.addControl(this.layerSwitcher);
  },

Then in that case: