bayesian_neural_networks failed with Mixed Precision enabled

Issue Type
Bug
Source
binary
Keras Version
2.16.0
Custom Code
No
OS Platform and Distribution
Linux Ubuntu 20.04
Python version
3.10
GPU model and memory
No response
Current Behavior?
bayesian_neural_networks example works well with the default fp32 data type when using the legacy keras.
import os
os.environ["TF_USE_LEGACY_KERAS"] = "1"

While when I enable the mixed precision for bfloat16 or float16 with the following code. bayesian_neural_networks example failed.
import tensorflow as tf
tf.keras.mixed_precision.set_global_policy("mixed_bfloat16")

Standalone code to reproduce the issue or tutorial link
Just add the following code snippet at the beginning of this code example https://github.com/keras-team/keras-io/blob/master/examples/keras_recipes/bayesian_neural_networks.py.

import os
os.environ["TF_USE_LEGACY_KERAS"] = "1"
import tensorflow as tf
tf.keras.mixed_precision.set_global_policy("mixed_bfloat16")

Relevant log output
Traceback (most recent call last):
  File "/root/lifeng/keras-io/examples/keras_recipes/bayesian_neural_networks.py", line 304, in <module>
    bnn_model_small = create_bnn_model(train_sample_size)
  File "/root/lifeng/keras-io/examples/keras_recipes/bayesian_neural_networks.py", line 274, in create_bnn_model
    features = tfp.layers.DenseVariational(
  File "/root/miniconda3/envs/oob/lib/python3.10/site-packages/tf_keras/src/utils/traceback_utils.py", line 70, in error_handler
    raise e.with_traceback(filtered_tb) from None
  File "/root/miniconda3/envs/oob/lib/python3.10/site-packages/tensorflow_probability/python/layers/dense_variational_v2.py", line 123, in call
    self.add_loss(self._kl_divergence_fn(q, r))
  File "/root/miniconda3/envs/oob/lib/python3.10/site-packages/tensorflow_probability/python/layers/dense_variational_v2.py", line 187, in _fn
    kl = kl_divergence_fn(distribution_a, distribution_b)
  File "/root/miniconda3/envs/oob/lib/python3.10/site-packages/tensorflow_probability/python/layers/dense_variational_v2.py", line 180, in kl_divergence_fn
    distribution_a.log_prob(z) - distribution_b.log_prob(z),
  File "/root/miniconda3/envs/oob/lib/python3.10/site-packages/tensorflow_probability/python/distributions/distribution.py", line 1287, in log_prob
    return self._call_log_prob(value, name, **kwargs)
  File "/root/miniconda3/envs/oob/lib/python3.10/site-packages/tensorflow_probability/python/distributions/distribution.py", line 1269, in _call_log_prob
    return self._log_prob(value, **kwargs)
  File "/root/miniconda3/envs/oob/lib/python3.10/site-packages/tensorflow_probability/python/layers/internal/distribution_tensor_coercible.py", line 114, in _log_prob
    return self.tensor_distribution._log_prob(value, **kwargs)
  File "/root/miniconda3/envs/oob/lib/python3.10/site-packages/tensorflow_probability/python/internal/distribution_util.py", line 1350, in _fn
    return fn(*args, **kwargs)
  File "/root/miniconda3/envs/oob/lib/python3.10/site-packages/tensorflow_probability/python/distributions/mvn_linear_operator.py", line 243, in _log_prob
    return super(MultivariateNormalLinearOperator, self)._log_prob(x)
  File "/root/miniconda3/envs/oob/lib/python3.10/site-packages/tensorflow_probability/python/distributions/transformed_distribution.py", line 364, in _log_prob
    log_prob, _ = self.experimental_local_measure(
  File "/root/miniconda3/envs/oob/lib/python3.10/site-packages/tensorflow_probability/python/distributions/transformed_distribution.py", line 611, in experimental_local_measure
    x = self.bijector.inverse(y, **bijector_kwargs)
  File "/root/miniconda3/envs/oob/lib/python3.10/site-packages/tensorflow_probability/python/bijectors/bijector.py", line 1389, in inverse
    return self._call_inverse(y, name, **kwargs)
  File "/root/miniconda3/envs/oob/lib/python3.10/site-packages/tensorflow_probability/python/bijectors/bijector.py", line 1362, in _call_inverse
    y = nest_util.convert_to_nested_tensor(
  File "/root/miniconda3/envs/oob/lib/python3.10/site-packages/tensorflow_probability/python/internal/nest_util.py", line 503, in convert_to_nested_tensor
    return convert_fn((), value, dtype, dtype_hint, name=name)
  File "/root/miniconda3/envs/oob/lib/python3.10/site-packages/tensorflow_probability/python/internal/nest_util.py", line 495, in convert_fn
    return tf.convert_to_tensor(value, dtype, dtype_hint, name=name)
ValueError: Exception encountered when calling layer "dense_variational" (type DenseVariational).

y: Tensor conversion requested dtype float32 for Tensor with dtype bfloat16: <tf.Tensor 'dense_variational/sequential/multivariate_normal_tri_l/tensor_coercible/value/MultivariateNormalTriL/sample/chain_of_shift_of_scale_matvec_linear_operator/forward/shift/forward/add:0' shape=(96,) dtype=bfloat16>

Call arguments received by layer "dense_variational" (type DenseVariational):
  • inputs=tf.Tensor(shape=(None, 11), dtype=bfloat16)

The standard neural network works well with mixed precision but the Bayesian neural network failed.

@LifengWang,
Thanks for reporting the issue. I have reproduced the behavior, please see gist for reference.

I'm not sure if in general we expect all examples to run under mixed precision without error. That will often depend on the custom layers/models created by the author in a given example.
But if anyone has interest in diving in here and fixing this up, contributions are welcome!


Using geolocation WatchPosition keeps adding to site storage

I'm using navigator.geolocation.watchPosition function to get up-to-date user location. However, I'm noticing that on Mobile Chrome the site usage storage data keep increasing until I assume it hit a threshold and clears the geo data and starts adding to the storage again. Is this normal expected behavior of using Geolocation? Or is this a side-effect of sw-precache?
update: This is not the normal expected behavior from watchLocation.

sw-precache and sw-toolbox (via runtimeCaching) only cache HTTPS requests. If you're using a browser-provided API that returns data, and there's no HTTPS request being made to obtain that data, then sw-precache will never even get a chance to interact with that.


Segmentation fault 11

After compiling the latest version I ran and got this output:
"[OSVR Server] Using config file 'Test.json'
[OSVR Server] Constructing server as configured...
[OSVR Server] Loading auto-loadable plugins...
Segmentation fault: 11"
EDIT: I'm on a mac

Sorry, without additional details this is hard to diagnose. What platform is this on (Mac? Linux? What distribution? What processor architecture? Etc)? Try rebuilding in RelWithDebInfo mode and getting a back trace with symbols if it crashes (run in gdb, command bt after segfault) and posting that here as well, since that will hopefully pinpoint what exactly is segfaulting - the messages shown don't narrow it down much right now.

Ah, on a Mac, this is likely to be a dupe of #321 if you aren't using homebrew to build.


Incorporate Flame's Audio functionalities

Flame's audio class allows for some neat methods for playing resource audio files. It'd be very useful to actually import that behavior to audioplayers itself, and just use it on flame, because this is really useful to all applications (not just games).
The relevant code is this:
  Future<File> _fetchToMemory(String fileName) async {
    final file = new File('${(await getTemporaryDirectory()).path}/$fileName');
    return await file
        .writeAsBytes((await _fetchAsset(fileName)).buffer.asUint8List());
  }

It's loading a resource into a tmp folder in the device file system, which is then used with the isLocal flag to play.
Basically we should have 3 kinds of sources:

local file on the user device
resource file
remote url (over network)

And it'd be good to make it more clear in the documentation what kinds are available and what they mean.
Also, maybe we could support in memory streams? Just a thought.

This was added on 0.6.0.


Bump up golang.org/x/net from 0.17.0 to 0.23.0

Change to bump up a Dependabot fix for golang.org/x/net, that could not be automatically cherry-picked into this branch (different dependency versions causing a conflict).
Original PR: https://github.com/openshift/installer-aro-wrapper/pull/109
Test Plan:

Dev image including this change was tested to be able to create a cluster in a local RP.
Check the x/net vulnerability is not present in quay in the dev image: https://quay.io/repository/mabadper/aroinstaller/manifest/sha256:00dec0c712dcf1e427543067d1212b5958620b3a74af735f81dbebe5ddfb88a4?tab=vulnerabilities

/lgtm
/approve


Map crahsing: RangeError: Maximum call stack size exceeded

Describe the bug
Map is not working
To Reproduce
Steps to reproduce the bug:
Go to map
Environment (please provide info about your environment):

Installation type: Downloaded OSX ARM binary
Headlamp Version: 0.26.0

Are you able to fix this issue?
No
Additional Context
We have a big cluster, around 500 namespaces and 1200 pods / 500 deployments
RangeError: Maximum call stack size exceeded
    at file:///Applications/Headlamp.app/Contents/Resources/frontend/assets/GraphView-C5xOIooh.js:43:226311
    at Set.forEach (<anonymous>)
    at file:///Applications/Headlamp.app/Contents/Resources/frontend/assets/GraphView-C5xOIooh.js:43:226235
    at UJn (file:///Applications/Headlamp.app/Contents/Resources/frontend/assets/GraphView-C5xOIooh.js:43:225328)
    at VJn (file:///Applications/Headlamp.app/Contents/Resources/frontend/assets/GraphView-C5xOIooh.js:43:226199)
    at pm (file:///Applications/Headlamp.app/Contents/Resources/frontend/assets/vendor-mui-DuPX71-Q.js:38:17018)
    at Vp (file:///Applications/Headlamp.app/Contents/Resources/frontend/assets/vendor-mui-DuPX71-Q.js:40:3139)
    at rx (file:///Applications/Headlamp.app/Contents/Resources/frontend/assets/vendor-mui-DuPX71-Q.js:40:44833)
    at tx (file:///Applications/Headlamp.app/Contents/Resources/frontend/assets/vendor-mui-DuPX71-Q.js:40:39790)
    at WR (file:///Applications/Headlamp.app/Contents/Resources/frontend/assets/vendor-mui-DuPX71-Q.js:40:39718)
    at Kc (file:///Applications/Headlamp.app/Contents/Resources/frontend/assets/vendor-mui-DuPX71-Q.js:40:39570)
    at tf (file:///Applications/Headlamp.app/Contents/Resources/frontend/assets/vendor-mui-DuPX71-Q.js:40:35934)
    at Zb (file:///Applications/Headlamp.app/Contents/Resources/frontend/assets/vendor-mui-DuPX71-Q.js:40:34883)
    at R (file:///Applications/Headlamp.app/Contents/Resources/frontend/assets/vendor-mui-DuPX71-Q.js:25:1574)
    at MessagePort.B (file:///Applications/Headlamp.app/Contents/Resources/frontend/assets/vendor-mui-DuPX71-Q.js:25:1942)

Thanks for filing an issue! I'll look into this


lib.readFile()

不使用log.Fatal()
只打印错误信息 让用户来处理
PR Details

Description

Related Issue

Motivation and Context

How Has This Been Tested

Types of changes

[ ] Docs change / refactoring / dependency upgrade
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist

[ ] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[ ] I have read the CONTRIBUTING document.
[ ] I have added tests to cover my changes.
[ ] All new and existing tests passed.

用户在使用中，可能遇到下面的问题，然后整个程序就退出了
2020/05/22 16:44:54 zip: not a valid zip file
Exiting.
考虑去掉log.Fatal

Codecov Report

Merging #642 into master will increase coverage by 0.06%.
The diff coverage is 33.33%.

@@            Coverage Diff             @@
##           master     #642      +/-   ##
==========================================
+ Coverage   96.97%   97.03%   +0.06%
==========================================
  Files          30       30
  Lines        8292     8474     +182
==========================================
+ Hits         8041     8223     +182
+ Misses        144      143       -1
- Partials      107      108       +1

Impacted Files
Coverage Δ

lib.go
93.33% <33.33%> (-1.70%)
:arrow_down:

cell.go
98.06% <0.00%> (+1.64%)
:arrow_up:

Continue to review full report at Codecov.

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

Thanks for your PR, this fix similar to #593, I purpose that add an error return for the readFile instead of using log.Println, could you gave a case to cause log.Fatal via call ReadZipReader ?

It's just a wrong excle file (it maybe other file format renamed to .xlsx).
I could not open it with Office too.


Support of ACCDB format

Dear SciGlass team, thanks for your effort for creating such a great database! Unfortunately due to the IT restriction at our institute, we can't install the older version of Access to open file in MDB format. Is it possible to have another release with ACCDB format? Thanks again!

@kc-frei can you send me a copy of the old database from this project?  I would very much appreciate it, as it has been removed from the code here and I've not gotten a response from them.  I would also need to update it to a newer version of Access and would happily share the updated file with you.

@kc-frei I've converted the SciGlass database to plain text; it is available in this fork: https://github.com/drcassar/SciGlass.

@drcassar this is incredible, thank you for preserving this data.

@drcassar thanks a ton for your efforts!
@derekphilipau sorry for the late reply, but I guess it's not needed anymore?


Please add new needful features

Please add posibility to enable GPU T4 x 2 in API
Please add possibility to download kernel's outpus by choosing kernel's version

Sorry for duplicating


running under gradle fails finding generated classes

Solution proposal
https://github.com/vlingo/vlingo-actors/compare/auto_class_location#diff-71e561a2af5d9976ff569d6912379978R72

instead of expecting classes to be at a certain location, ask the class loader where to put them
alternative: default or configure, where the default is the one above

Problem
gradle run
↓
vlingo/actors: Generating proxy for main: github.dled.demo.Greeter
vlingo/actors: Generating proxy for test: github.dled.demo.Greeter
playground: Actor instantiation failed because: Actor proxy github.dled.demo.Greeter not created for main or test: Actor proxy github.dled.demo.Greeter not created because: Cannot generate proxy class for github.dled.demo.Greeter because there is no corresponding:
target/test-classes/github/dled/demo/Greeter.class
java.lang.IllegalArgumentException: Actor proxy github.dled.demo.Greeter not created for main or test: Actor proxy github.dled.demo.Greeter not created because: Cannot generate proxy class for github.dled.demo.Greeter because there is no corresponding:
target/test-classes/github/dled/demo/Greeter.class
        at io.vlingo.actors.ActorProxy.tryGenerateCreate(ActorProxy.java:72)
        at io.vlingo.actors.ActorProxy.createFor(ActorProxy.java:36)
        at io.vlingo.actors.Stage.actorProxyFor(Stage.java:96)
        at io.vlingo.actors.Actor.selfAs(Actor.java:105)
        at github.dled.demo.ConsoleGreeter.<init>(ConsoleGreeter.java:15)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
        at java.lang.Class.newInstance(Class.java:442)
        at io.vlingo.actors.ActorFactory.actorFor(ActorFactory.java:39)
        at io.vlingo.actors.Stage.createRawActor(Stage.java:262)
        at io.vlingo.actors.Stage.actorFor(Stage.java:184)
        at io.vlingo.actors.Stage.actorFor(Stage.java:166)
        at io.vlingo.actors.Stage.actorFor(Stage.java:30)
        at io.vlingo.actors.World.actorFor(World.java:51)
        at github.dled.demo.App.main(App.java:14)
Caused by: java.lang.IllegalArgumentException: Actor proxy github.dled.demo.Greeter not created because: Cannot generate proxy class for github.dled.demo.Greeter because there is no corresponding:
target/test-classes/github/dled/demo/Greeter.class
        at io.vlingo.actors.ActorProxy.tryGenerateCreate(ActorProxy.java:89)
        at io.vlingo.actors.ActorProxy.tryGenerateCreate(ActorProxy.java:70)
        ... 16 more
Caused by: java.lang.IllegalArgumentException: Cannot generate proxy class for github.dled.demo.Greeter because there is no corresponding:
target/test-classes/github/dled/demo/Greeter.class
        at io.vlingo.actors.ProxyGenerator.generateFor(ProxyGenerator.java:86)
        at io.vlingo.actors.ActorProxy.tryGenerateCreate(ActorProxy.java:84)
        ... 17 more
java.lang.IllegalArgumentException: Actor instantiation failed because: Actor proxy github.dled.demo.Greeter not created for main or test: Actor proxy github.dled.demo.Greeter not created because: Cannot generate proxy class for github.dled.demo.Greeter because there is no corresponding:
playground: vlingo/actors: FAILED: Actor instantiation failed because: Actor proxy github.dled.demo.Greeter not created for main or test: Actor proxy github.dled.demo.Greeter not created because: Cannot generate proxy class for github.dled.demo.Greeter because there is no corresponding:
target/test-classes/github/dled/demo/Greeter.class
        at io.vlingo.actors.Stage.createRawActor(Stage.java:266)
        at io.vlingo.actors.Stage.actorFor(Stage.java:184)

The exception hints at a location where class files are expected: target/test-classes/github/dled/demo/Greeter.class, which seems to be a maven convention, but it can't be expected in the general case. The implementation is here: DynaFile.java
files are there in this case:
$ find . | grep Greeter\.class
./out/production/classes/github/dled/demo/ConsoleGreeter.class
./out/production/classes/github/dled/demo/Greeter.class
./build/classes/java/main/github/dled/demo/ConsoleGreeter.class
./build/classes/java/main/github/dled/demo/Greeter.class

pre-creating the directories didn't help (in case the files could not be written).
Line:
    if (targetClassesRelativePathToClass.exists()) { //sure, class doesn't exist
      try {
       //...
    } else {
      throw new IllegalArgumentException("Cannot generate proxy class for " + actorProtocol + " because there is no corresponding:\n" + relativePathToClassFile);
    }

when the classes are pre-created by a maven run, surely, hello world runs fine

fixed via vlingo-actors 0.4.2


Feature request: Add support for OAuth 2.0 authorization for Swagger UI

Use case
I want to protect and add authorization headers to requests sent using the Swagger UI, as endpoints are protected by an API Gateway REST Lambda authorizer:
https://docs.powertools.aws.dev/lambda/python/latest/core/event_handler/api_gateway/#enabling-swaggerui
Is this possible to achieve using the current Swagger UI implementation in powertools-lambda-python?
Solution/User Experience
I would like to provide configuration similar to how it's done for swagger-ui-py
Alternative solutions
No response
Acknowledgment

[X] This feature request meets Powertools for AWS Lambda (Python) Tenets
[X] Should this be considered in other Powertools for AWS Lambda languages? i.e. Java, TypeScript, and .NET

Hello @nlykkei! We currently do not support authentication and authorization in our OpenAPI utility. We already have an issue open (https://github.com/aws-powertools/powertools-lambda-python/issues/3662) for this same request and plan to work on it in the coming weeks. Do you mind if I close this issue and mention you in the one that's already open?

Thank you @leandrodamascena for your clarification.
Is it possible to implement myself using?:
swagger_base_url: str, optional
     The base url for the swagger UI. If not provided, we will serve a recent version of the Swagger UI.

I don't know much about Swagger UI, but it seems it support config for OAuth 2.0 configuration. Could that be included into the external bundles?
swagger_js = f"{swagger_base_url}/swagger-ui-bundle.min.js"
swagger_css = f"{swagger_base_url}/swagger-ui.min.css"

https://swagger.io/docs/open-source-tools/swagger-ui/usage/configuration/

Thank you @leandrodamascena for your clarification.
Is it possible to implement myself using?:
swagger_base_url: str, optional
     The base url for the swagger UI. If not provided, we will serve a recent version of the Swagger UI.

Unfortunately, no. This swagger_base is specifically for when customers wants to host in a external server the JS/CSS files required to render the Swagger UI.

I don't know much about Swagger UI, but it seems it support config for OAuth 2.0 configuration. Could that be included into the external bundles?
swagger_js = f"{swagger_base_url}/swagger-ui-bundle.min.js"
swagger_css = f"{swagger_base_url}/swagger-ui.min.css"

I'm afraid you can't do that. Swagger UI is a project designed to enable developers to import OpenAPI/Swagger files and display them interactively in the browser. To incorporate support for OAuth2.0 and other authentication methods, we must change our OpenAPI utility to inject the configuration into the OpenAPI file.
Let me talk with the team to see our timeline for implementing this. I'll return here as soon as I have updates.
Thanks

My apologies for the misunderstanding. I realize now that what you're asking for is to protect the Swagger UI with OIDC/OAuth, rather than specific routes. Got it now.
However, I remain skeptical that this will work seamlessly without additional adjustments. We define the SwaggerUI at this line, and even if you bring your own JavaScript files and define initOAuth there, I doubt that var ui = SwaggerUIBundle(swaggerUIOptions) (here) will be able to read and embed specific OAuth configuration, at least without some hack.
The best approach here would be to introduce new parameters in the enable_swagger method, allowing customers to configure OAuth for SwaggerUI.

I'm adding this issue to our backlog to work on it in the next sprints.

Thank you.

My apologies for the misunderstanding. I realize now that what you're asking for is to protect the Swagger UI with OIDC/OAuth, rather than specific routes. Got it now.

Actually, protecting the Swagger UI is not a requirement, but just a nice feature.
However, I want the Swagger UI to be able to execute the Authorization Code Grant Flow (OAuth 2.0) to acquire an access token for calling the listed API endpoints.
I hope, I'm clear now :)

Making requests from the Swagger UI using OAuth 2.0 would be really good. Right now I'm not sure what's needed, so we need to investigate more, but it doesn't seem to be too hard. I can try to work on this next week if you want.

I'm starting to work on this now.

I can help you out, if you need. I made some manually edits of the generated OpenAPI spec, then ran Swagger UI from a Docker container as follows:
docker run -p 3000:8080 -e OAUTH_CLIENT_ID=<client-id> -e OAUTH_APP_NAME="My App" -e OAUTH_SCOPES="api://<resource-id>/user_impersonation" -e OAUTH_USE_PKCE="true" -e SWAGGER_JSON=./openapi.yaml -v $(pwd):/openapi swaggerapi/swagger-ui
Swagger UI provides several ways to provide these arguments: config file, hard-coded, etc.
With securitySchemes defined, and security either specified locally for the operation or globally, the user can easily authenticate without having to enter any values itself, except names of scopes

Awesome, thanks for this hints, I actually didn't had the full picture in my head how the Swagger UI would integrate with OAuth2, so your comment led me to learn all about securitySchemes :D I'll try to write something and will get back to you to get feedback.

Nice, if I can help with anything regarding the implementation, feel free to reach out. I would like to start contributing to the project myself :)
The tricky part is supplying the Swagger UI OAuth 2.0 configuration, which was provided as Docker environment variables above:
https://swagger.io/docs/open-source-tools/swagger-ui/usage/oauth2/

Oh I would love for you to contribute! 🎉 Here are my ideas:

don't worry about the Swagger UI for now, I have an idea to make it work easily
let's focus instead on adding support for securitySchemes and security on our OpenAPI generation

Right now the models are already there, but they are not used anywhere.
The OpenAPI spec says we can add security to both the top API declaration and individual operations.
So here's an idea (napkin programming here :P):

Add support for declaring securitySchemes on the top API declaration (here and here)

Maybe a new optional parameter security_schemes: Optional[List[SecurityScheme]]?
Make sure the generated schema now includes any securitySchemes (by adding it to the Components section)

oauth2_flows = OAuthFlows(authorizationCode=OAuthFlowAuthorizationCode(authorizationUrl="https://example.com/oauth/authorize", tokenUrl="https://example.com/oauth/token", scopes={"read": "Grants read access})
app.get_openapi_schema(title="...", security_schemes=[OAuth2(flows=oauth2_flows)])

Add support for declaring a security on the same top API declaration. This would be interpreted by Swagger that it needs to apply to all operations.

Again, maybe a new optional parameter security: Optional[List[Dict[str, List[str]]]] (got the hint from here)
Bonus points: can we actually make sure that the key of each security object exists in the securitySchemes? This would avoid declaring security on a scheme that doesn't exist. Ideally we would do it at compile time (type checker) but not sure how far we can get
Make sure that the generated schema now includes the security field. Probably needs to be added here

And finally, we need to add the same security support for each operation.

Start here and add a new security parameter. Make sure it's not the last parameter as the middleware functionality will stop working. middlewares always needs to be the last.
Apply the same changes the other HTTP operations, and the function signatures of all subclasses
And then make sure we can see the security being added to an operation

@app.get("/admin", security=[{"OAuth2": ["admin"]}])

Notice that this is just about generating the OpenAPI schema, not about enforcing any of those security schemas :D
Does any of this makes sense? Would you like to try it? :D If you're on Discord we can always have a chat if you ever get stuck.

I've went ahead and started the implementation. Still some tasks to do (check the PR description), let me know if you want to take some!

Thank you @rubenfonseca. I commented on your other PR. Great job updating the docs with a clear explanation on usage.
I will get back to you tomorrow or Friday. I have been extremely busy at LEGO for the past 3 days, so I haven't had much time helping you out here


Where is the source code for mapdescriptor version 1.0.8?

Hi, I installed mapdescriptor package through pub.dev, and the current version is 1.0.8, while the version on main branch is 1.0.4. Would you update the code? Thanks

https://github.com/KBM90/mapdescriptor/pull/3


Should Specify MTR Platform

I believe this only applies to MTRoW (MTR on Windows).  We should probably clarify that.

Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: 94992f4d-eb18-400e-5979-5301f9b4a6d7
Version Independent ID: 403c8366-9324-cf9e-332a-f55a554375dd
Content: Set up coordinated meetings with Microsoft Teams Rooms and Surface Hub - Microsoft Teams
Content Source: Teams/rooms/coordinated-meetings.md
Service: msteams
GitHub Login: @dstrome
Microsoft Alias: dstrome

Thanks for your feedback, fixed in https://github.com/MicrosoftDocs/OfficeDocs-SkypeForBusiness/commit/aada4c0a94862f9f96686158bd59955a1de9fc88


AddByProjecting axis argument

The current AddByProjecting operation does not have an option for the axis of projection. This would be beneficial for LSTM/CNN type operations involving skip connections.
I suggest the following update to the __init__
    def __init__(self, search_space, stacked_nodes=None, activation=None, axis=-1):
        self.search_space = search_space
        self.node = None # current_node of the operation
        self.stacked_nodes = stacked_nodes
        self.activation = activation
        self.axis = axis

and the following update to this line
proj_size = values[0].get_shape()[self.axis]
With these, I am able to make search spaces of LSTMs as shown in the attachment

resolved in 31cb506eb99d61839316130148d1074488b112b5


How to Convert Sql Server Table Data into Volante

How to convert sql server tabel data into volante in memory database.
can you give me small example ?
i want to migrate sql server table data into volante database and do all operation with
volante in memory database.

Volante is very different than sql database so there's no generic answer to this.


Whitespace between else if

Whitespace between 'else if' is removed during javascript compress, that breaks the script from running

Roll back to latest stable version https://github.com/smilemd/yii2-htmlcompress/tree/1.0.4


no such table: transaction

After playing with flask-migrate and adding Flask-Continuum, I decided to start with Flask-Continuum, then add flask-migrate, but I can't get Flask-Continuum to work from the documentation.
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_continuum import Continuum

app = Flask(__name__)
db = SQLAlchemy(app)
continuum = Continuum(app, db)

from flask_continuum import VersioningMixin

# defining database schema
class Article(db.Model, VersioningMixin):
    __tablename__ = 'article'

    id = db.Column(db.Integer, primary_key=True, autoincrement=True)
    name = db.Column(db.Unicode(255))
    content = db.Column(db.UnicodeText)

All I did was combine the two minimal app examples, then ran the following:
$ flask shell
>>> from app import db, Article
>>> article = Article(name='Some article', content='Some content')
>>> db.session.add(article)
>>> db.session.commit()
[...]
sqlite3.OperationalError: no such table: transaction
[...]

What am I missing?
Thanks.

I was able to reproduce this issue when database tables hadn't been created before trying to commit date.  The no such table: transaction is a bit of a red herring - if you weren't using Flask-Continuum, I think you'd see an  error like "no such table: articles". Here is what you can try to resolve the issue:
$ flask shell
>>> from app import db, Article
>>> db.create_all()
>>> article = Article(name='Some article', content='Some content')
>>> db.session.add(article)
>>> db.session.commit()

In general, you'll want to make sure db.create_all() has been run before you start using a database in the application.

Also, I've added this and the previous ticket to a Troubleshooting section of the documentation. I'll keep updating that section as new problems come up. Thanks for the input!

I've had a similar problem: transaction and version tables were not created. After fiddling around I found out that in my configuration, I have to run db.create_all() twice.

db.create_all(app=create_app()) with context
db.create_all()

For reference, here's the whole code:

from flask import Flask
from flask_continuum import Continuum, VersioningMixin
from flask_sqlalchemy import SQLAlchemy

db = SQLAlchemy()
continuum = Continuum(db=db)

class Article(db.Model, VersioningMixin):
    __tablename__ = 'article'

    id = db.Column(db.Integer, primary_key=True, autoincrement=True)
    name = db.Column(db.Unicode(255))
    content = db.Column(db.UnicodeText)

def make_article():
    article = Article(name='Some article', content='Some content')
    db.session.add(article)
    db.session.commit()

def create_app():
    app = Flask(__name__)
    app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////database.db'
    app.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = False
    db.init_app(app)
    app.app_context().push()
    continuum.init_app(app)

    return app

if __name__ == '__main__':
    db.create_all(app=create_app())
    db.create_all()


Depends on deprecated Python cookbook

This still depends on the deprecated python cookbook, - not updated to poise-python - do you plan to update this repo or just abandon it?

As you can see mentioned in other issues, there is a partial rewrite on top of poise-python that I haven't had the cycles to finish for the last few years. Patches welcome.


Replace npm install with npm ci on CircleCI

Before submitting, please confirm you've

[x] read and understood our Contributing Guidelines
[x] completed Mattermost Contributor Agreement
[ ] executed npm run lint:js for proper code formatting

Please provide the following information:
Summary
Builds on CircleCI currently use npm install for dependencies, when they should be using npm ci. That way package-lock.json does not get modified during build and we can be sure of the versions we ship. This PR fixes that.
Issue link
Test Cases
Additional Notes
Not sure if this actually works or if there's some reason we actually have to use npm install, but I guess we'll see when the checks run. Also not sure how to test the PowerShell change without cutting a release.

This messes with the caching we currently have, but I don't know if there are any good alternatives. There doesn't seem to be any flag to stop npm ci from deleting node_modules/ nor to make npm i respect the lockfile. Suggestions welcome.


rspec/autorun doesn't honor expose_dsl_globally default

The ChangeLog claims expose_dsl_globally would default to true, but this simple test doesn't work:
require 'rspec/autorun'
describe 1 do
  it "is < 2" do
    expect(1).to be < 2
  end

  it "has an intentional failure" do
    expect(1).to be > 2
  end
end

% ruby foo.rb
foo.rb:3:in `<main>': undefined method `describe' for main:Object (NoMethodError)

If I add this line after require 'rspec/autorun', it's working as expected:
RSpec.configure { |c| c.expose_dsl_globally = true }

Thanks for reporting this.  I figured out the cause of this.
The DSL is defaulted to globally exposed when the config object is instantiated:
https://github.com/rspec/rspec-core/blob/978f0b7edc33ed157b052eddfdbd87e625dadccb/lib/rspec/core.rb#L86
When you run things via rspec, it access RSpec.configuration before loading your code.  When you use rspec/autorun, it doesn't hit RSpec.configuration before hitting your code, so the DSL hasn't been exposed globally.
For now, you can just add RSpec.configuration after require 'rspec/autorun' (accessing config is sufficient; not need to set expose_dsl_globally = true) but I plan to work up a fix to address this.

Addressed by #1933.


Initial connection vs. reconnections

Hi there.
gocql.NewSession() returns an error if the target cluster is unreachable for any reason. However, if it succeeds and there is a disconnection or unavailability at a later point, ReconnectInterval and ReconnectionPolicy attempts reconnections in the background gracefully.
In production, this means that if the target cluster is unavailable for any reason during an app's boot, it will fail to start outright (unless it builds its own retry/reconnect abstractions). Post successful boot, any disconnections can be handled gracefully thanks to the reconnect behaviour. Is there any way to get around the initialization being a stop-the-world bottleneck? Can it not hook into the existing reconnect behaviour?
Thank you.

Please specify gocql and scylla version, and please paste the error you are getting when the target cluster is unreachable.

github.com/scylladb/gocqlx/v3 v3.0.0
github.com/scylladb/gocql v.14.3

package main

import (
	"fmt"

	"github.com/gocql/gocql"
	"github.com/scylladb/gocqlx/v3"
)

func main() {
	cluster := gocql.NewCluster("<IP_ADDRESS>")

	session, err := gocqlx.WrapSession(cluster.CreateSession())
	if err != nil {
		panic(err)
	}

	fmt.Println(session)
}

Initialization fails with the following error if the cluster is unavailable with no recourse for re-connection. If the cluster fails after initialization, then re-connection attempts kick in and work gracefully.
gocql: unable to create session: unable to discover protocol version: dial tcp <IP_ADDRESS>:9042: connect: connection refused

I just realised, I should've opened this issue on https://github.com/scylladb/gocql - My bad. @sylwiaszunejko, I can close this and re-open on the driver's repo.


Add optional wrapper argument in Typer.command to wrap functions

First Check

[X] I added a very descriptive title to this issue.
[X] I used the GitHub search to find a similar issue and didn't find it.
[X] I searched the Typer documentation, with the integrated search.
[X] I already searched in Google "How to X in Typer" and didn't find any information.
[X] I already read and followed all the tutorial in the docs and didn't find an answer.
[X] I already checked if it is not related to Typer but to Click.

Commit to Help

[X] I commit to help with one of those options 👆

Example Code
import SimpleITK as sitk
import sitk_cli
import typer

app = typer.Typer()

# sitk_cli.make_cli inspects the function and replaces images by pathlib.Path, and if the output is an image it inserts an argument `output: pathlib.Path`. Together with typer, this makes it trivial to create command lines from library code.

@app.command(wrapper=sitk_cli.make_cli)
def threshold_image(image: sitk.Image, value: float) -> sitk.Image:
    """Example function that has images as argument"""
    return sitk.BinaryThreshold(image, value)

if __name__ == "__main__":
    app()

Description
Proposed Change
I would like to submit a PR to add an argument called wrapper (or whatever), which by default does nothing, but could do any user-specified transformation of the function registered via Typer.command.
Motivation
I would like to use this mechanism to modify the signature of the original function so it can be used as command line, without duplicating the function - once with actual type used in the library and once with CLI compatible types (e.g. pathlib.Path).
See my example code above, using the simple package sitk-cli to wrap SimpleITK images.
Wanted Solution
The change would look like:
    def command(
        self,
        name: Optional[str] = None,
        *,
        cls: Optional[Type[TyperCommand]] = None,
        context_settings: Optional[Dict[Any, Any]] = None,
        help: Optional[str] = None,
        epilog: Optional[str] = None,
        short_help: Optional[str] = None,
        options_metavar: str = "[OPTIONS]",
        add_help_option: bool = True,
        no_args_is_help: bool = False,
        hidden: bool = False,
        deprecated: bool = False,
        wrapper: Callable[[CommandFunctionType], CommandFunctionType] = lambda f: f,
        # Rich settings
        rich_help_panel: Union[str, None] = Default(None),
    ) -> Callable[[CommandFunctionType], CommandFunctionType]:
        if cls is None:
            cls = TyperCommand

        def decorator(f: CommandFunctionType) -> CommandFunctionType:
            self.registered_commands.append(
                CommandInfo(
                    name=name,
                    cls=cls,
                    context_settings=context_settings,
                    callback=wrapper(f),
                    help=help,
                    epilog=epilog,
                    short_help=short_help,
                    options_metavar=options_metavar,
                    add_help_option=add_help_option,
                    no_args_is_help=no_args_is_help,
                    hidden=hidden,
                    deprecated=deprecated,
                    # Rich settings
                    rich_help_panel=rich_help_panel,
                )
            )
            return f

        return decorator

Wanted Code
See Example Code above

Alternatives
Instead of using a decorator i could  explicitly register my function.
if __name__ == "__main__":
    app.command()(make_cli(threshold_image))
    app()

Operating System
Windows
Operating System Details
Linux, MacOS, Windows
Typer Version
0.7.0
Python Version
Python 3.7.8
Additional Context
I would like to use typer in combination with sitk-cli and SimpleITK to create nice command lines:
See https://pypi.org/project/sitk-cli/

Question here: why not just nest the decorators? Add your custom wrapper inside the call to app.command() so it get applied first. As a simple example:
def ceil_wrapper(f):
    @wraps(f)
    def wrap(x: float):
        return f(ceil(x))
    return wrap

@app.command()
@ceil_wrapper
def f(x: int) -> None:
    print(x)

It seems like the maintainers of sitk-cli (namely @dyollb themself) settled on this solution as well, so maybe this issue can be closed?

Okay with me


deposit-form: validate saved draft on form load

closes https://github.com/inveniosoftware/invenio-app-rdm/issues/737
Validates saved draft when the form initially loads to show any errors and allow publishing on page reload or edit. Result:

Mostly renaming and it's good to go.
Maybe we talked about this (I hope!), but the other avenue which might be more involved would be to have the backend do a preliminary save when a draft is edited and provide the draft with errors to frontend. The advantage being a reduction in API calls. The FormFeedback would have to be modified to only show errors in this case (and no saved successfully). Might be something for the future...

Yes, we indeed talked about it! And decided to take this approach for now and leave the backend implementation for the future as you mentioned :)


Clicking on a message and typing [end] should take you to the end of the narrow?

I feel like I often click on the message view to bring it (the browser window, etc) into focus, and then type page-down or end or down-arrow to continue reading. But the compose box captures these key strokes.
What do people think of the following change: If you've just clicked a message, and haven't started typing, {page down, end, down-arrow, etc} still goes to the message view?

yeah, I think that's reasonable; we already do something similar with the up/down arrow keys (using them closes compose and then processes the key), so we can probably follow that code path.


Fix to scroll background with contents

Fix on themes/prism-coy.css: attaches <pre> background (alternating line colors) to <code> contents when in limited-height <pre> that requires scrolling.
Example: http://prismjs.com/ with 'Coy' theme selected; most evident on smallest scroll, such as the SVG logo highlight.

Changed to https://github.com/PrismJS/prism/pull/1163


Support for Push-IMAP

Hi,
I notice RainLoop is signing in to / out of the IMAP Server a lot. It looks like it is not using Push-IMAP. Is that correct? And is it possible to support this feature? That would greatly reduce logins/logouts but also new mail will be visible instantaneously as it arrives.
 My phone is able to do it and it's kind of annoying having to refresh RainLoop when I hear my phone buzz because it knows the very moment I get a new email.
Are there any major technical hurdles to implementing this in RainLoop?


element id is readonly

I noticed that the element.id property is read only as in this example.
<html
    window-resizable="true"
    window-width="400dip"
    window-height="770dip"
>
<script>

document.ready = function() {
    // does not work
    document.body.id = "newbodyid";

    // works
    document.body.setAttribute("id", "newbodyid");
}

</script>
</head>
<body #bodyid>
</body>
</html>

I see the element.id property being read only was fixed in the latest sdk versions.


Fix aliasing issues with expand and ignore

Fixes #5481. Also, implements https://github.com/Microsoft/knack/issues/74 at the CLI level.
Change ensures that the parameter that is the target of "expand" or "ignore" is aliased to an unusable option so that subsequent calls to "argument" can use the long option names that would have otherwise been claimed. This simplifies the params.py file and avoids irritating alias name conflicts.
cc/ @praveenbarli, @rohit-joy

This checklist is used to make sure that common guidelines for a pull request are followed.
General Guidelines

[n/a] The PR has modified HISTORY.rst describing any customer-facing, functional changes. Note that this does not include changes only to help content. (see Modifying change log).

Command Guidelines

[n/a] Each command and parameter has a meaningful description.
[n/a] Each new command has a test.

(see Authoring Command Modules)

View a preview at https://prompt.ws/r/Azure/azure-cli/5765
This is an experimental preview for @microsoft users.

ping @derekbekoe

Can we make the change in knack then just consume it in the CLI since it seems like a new knack feature.

@rohit-joy because the test files and recording directory for all modules should not be found under the latest directory.

@derekbekoe is expand in Knack?  If so, I'd be okay with that.

Knack doesn't have expand but then it seems like https://github.com/Microsoft/knack/issues/74 has been resolved in this PR but not in knack itself?

@derekbekoe that's right.  Instead of calling into Knack's ignore, this PR just does what knack's ignore does but adds the mangling.

@tjprescott I have released 0.3.2 of knack.

@derekbekoe sweet. I'll update the PR accordingly. Thanks!

@derekbekoe can you take a second look?


request: Aerospace fullscreen hides other workspace windows

Hello i couldn't find anything related to this, when using the aerospace fullscreen mode how to make the other windows of the workspace hidden or outside the screen until i turn fullscreen off?

Checklist

[x] I've searched for duplicates. My search queries were (please don't forget to search in closed issues too):

Fullscreen

[x] I've read the documentation https://nikitabobko.github.io/AeroSpace/guide & https://nikitabobko.github.io/AeroSpace/commands
[x] I've searched in the documentation. My search queries were:

fullscreen
hide windows

aerospace CLI client version: 0.14.2-Beta 0cb8dbdfc5ee73b8cbc200f175f467ebead55201
AeroSpace.app server version: 0.14.2-Beta 0cb8dbdfc5ee73b8cbc200f175f467ebead55201

It's a bug. I think windows should hide by default

same here, but I never though about it because i enabled blur in alacritty. this way I even somehow am able to see if there's something happining behind the focused window.
so maybe blur is for you.
another alternative for now is the native-fullscreen
I have set it up like this:
cmd-shift-f = 'macos-native-fullscreen' cmd-f = 'fullscreen'
going back from native-fullscreen makes the workspace lose the previous position of the window though


fix(meta): set the twitter username in seo.js

In the Seo component, the Twitter username wasn't set. Instead, the Twitter card type was duplicated ({ cardType: metadata.twitterUsername }). Now, the handle property is set to the Twitter username, preventing overriding of the Twitter cardType.

Good catch, thaks!


Infinite loop during app startup

After using the library for some time on an app, there's an infinite loop in the browser until I clear cookies. I'm not sure if this is a bug with the library or amplify, or even Chorme. It's not possible to debug since the browser cannot load a page. Does anyone know what might be causing this?

See also #14.


luci-theme-openwrt-2020: quantize png image

Small size reduction.
From: 5908
To:   3896
Signed-off-by: Rosen Penev<EMAIL_ADDRESS>

33%. Not bad.


Docker : config value 'safe.directory' was not found

Describe the bug
Hi,
Since git upgrade, the docker image return an error :
ERROR git_cliff > Git error: `config value 'safe.directory' was not found; class=Config (7); code=NotFound (-3)`

My cmmand line is :
docker run -it -v $(pwd)/.git:/app/ orhunp/git-cliff
Expected behavior
Generation of my changelog.
Screenshots/Logs
Full log :
ERROR git_cliff > Git error: `config value 'safe.directory' was not found; class=Config (7); code=NotFound (-3)`

System (please complete the following information):
I use your Docker image.
My code is on a Windows FS mounted on Debian WSL (so file chmod is 777).
Additional context
I try to add this to my git config with no effect :
[safe]
        directory = *

Thanks for your help

Thanks for reporting this! It is directly related to CVE-2022-24765 and should be fixed in 4fc2217868fceea81ab5e6aeeb63ca719a07fe91 🐻
It is a regression in https://github.com/rust-lang/git2-rs/pull/839


Sound formats and codecs

The docs only mention .mp4, what codecs are supported for that format?
Are there any other formats supported?

Thanks to reaching me out.

Howler.js supports a wide array of audio codecs that have varying browser support ("mp3", "opus", "ogg", "wav", "aac", "m4a", "m4b", "mp4", "webm", ...), but if you want full browser coverage you still need to use at least two of them. If your goal is to have the best balance of small filesize and high quality, based on extensive production testing, your best bet is to default to webm and fallback to mp3. webm has nearly full browser coverage with a great combination of compression and quality. You'll need the mp3 fallback for Internet Explorer.

Since svelte-sound uses Howler.js library under-the-hood you can have a look at their recomendations here.
I'll update the same in the docs too.


update to latest logback, fix associated compat bugs

You need to rename the floatValue parameter and member variable to doubleValue. Otherwise looks good. This will require upgrading Jackson throughout.

Just to alleviate fears, I tested the new code with an old version of Jackson.  This code is backwards compatible.  Hurrah for the sloppy/lazy linking of java artifacts!


ContentPickerField enhancement: (for not admins) show only the current users content items

Hi @dpomt, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
The agreement was validated by .NET Foundation and real humans are currently evaluating your PR.
TTYL, DNFBOT;

I think instead of having a setting, let users decide what they want to see by adding a drop down in the Media library UI to filter items only owned by the current user. Like it's done in the Contents page.

In my special case the user should not be able to select Content of another user. No Chance to get this in?

Have you tried to use the Manage Own Media permission instead, and remove Manage Media for these specific users? It might be new in 1.9.x though, I am using it.

Since I am already using 1.9.x and altough the Manage Own Media Feature so I quickly commented my code out and re-tested it ==>  Still Content items of other users are displayed.
In my scenario here I am using the ContentPicker select a "standard" Content item, not a media Content item.

Ah sorry, I read the issue too fast.

You still think that this is not functionality that should be provided?

I need to think about it. We'll talk about it during our next meeting probably, feel free to join.

This suggestion was discussed in 19th january meeting (see https://www.youtube.com/watch?v=sRmF_fAktds&index=2&list=PLuskKJW0FhJfOAN3dL0Y0KBMdG1pKESVn at 01:01:25
If I understood it correctly the suggestion was accepted? If yes, how will this pull request gets merged (since it is already closed)?


Update govuk-frontend to 5.4.0

Changes in this MR:

Update version of hmlr-frontend to 1.5.0
Update govuk-frontend to version 5.4.0
Updates the import locations for JS/CSS/Assets described here: https://github.com/alphagov/govuk-frontend/releases/tag/v5.0.0

See https://github.com/alphagov/govuk-frontend/releases for the full changelogs for 5.0.0-5.4.0.
N.B.: I have updated the changelog, but left the changes in "unreleased", as I was unsure if release candidate versions would be needed

Thanks for this contribution @BenLambertNcl much appreciated! I'm going to take it into a different branch so I can add to it. We want to keep the v1.x.x releases of HMLR Frontend compatible with the v4.x.x releases of GOV.UK Frontend. Your changes will be the first of a new v2.x.x release of HMLR Frontend which is compatible with v5.x.x releases of GOV.UK Frontend. Just want to make sure people are aware when upgrading that the major version change is reflected in our own package too. Cheers 👍🏻


The requested feature 'Namespaces' is not  supported by the current index type 'Starter'.]

error [PineconeError: PineconeClient: Error calling upsert: PineconeError: The requested feature 'Namespaces' is not
supported by the current index type 'Starter'.]
I try to after settinging up my env and always show me this error

I remove the namespace in pinecone.ts and it resolved
const PINECONE_NAME_SPACE = ''

To resolve this error completely for Pinecone starter accounts.

Go to config/pinecone.ts and comment out const PINECONE_NAME_SPACE = ''
In the same file change

export { PINECONE_INDEX_NAME, PINECONE_NAME_SPACE };

to
export { PINECONE_INDEX_NAME };

Go to scripts/ingest-data.ts and change

import { PINECONE_INDEX_NAME, PINECONE_NAME_SPACE } from '@/config/pinecone';

to
import { PINECONE_INDEX_NAME } from '@/config/pinecone';

In the same file, go to line 41 and comment out

namespace: PINECONE_NAME_SPACE,

Go to pages/api/chat.ts and repeat steps 3 and 4 above. For Step 4, look to line 39 and comment out

namespace: PINECONE_NAME_SPACE, //namespace comes from your config folder


ISSUE #1595 added new project Face Expression Classifier

This pull request introduces a Real-Time Face Expression Classifier web application that utilizes TensorFlow.js and the webcam to detect facial expressions. The app provides real-time feedback on whether the user appears happy, sad, surprised, or neutral by analyzing facial landmarks.

fix #1595


ARROW-16282: [WIP][CI] [C#] Verifiy release on c-sharp has been failing since upgrading ubuntu to 22.04

This should fix the nightly fail, not sure if we should add documentation for manual use.
cc @raulcd @kszucs

@github-actions crossbow submit verify-rc-source-csharp-linux-ubuntu-*-amd64

We have a pull request for this: https://github.com/apache/arrow/pull/12870

Closing in favor of https://github.com/apache/arrow/pull/12870


Dockerfile doesn't have compatible librocksdb-dev; how to package dynamic lib into whl like on pypi

Hello,
I was able to install the x86 python whl from pypi: https://pypi.org/project/faust-streaming-rocksdb/#files
Each whl contains a few precompiled dynamic libs:
# LD_LIBRARY_PATH=/usr/local/lib/python3.8/site-packages/faust_streaming_rocksdb.libs ldd /usr/local/lib/python3.8/site-packages/faust_streaming_rocksdb.libs/librocksdb-e568f8f5.so.6.14.6
        linux-vdso.so.1 (0x00007ffc148af000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f8ae8b51000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f8ae8b4c000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f8ae8b47000)
        libsnappy-ddb1bad0.so.1.1.4 => /usr/local/lib/python3.8/site-packages/faust_streaming_rocksdb.libs/libsnappy-ddb1bad0.so.1.1.4 (0x00007f8ae8800000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f8ae8b2b000)
        libbz2-a273e504.so.1.0.6 => /usr/local/lib/python3.8/site-packages/faust_streaming_rocksdb.libs/libbz2-a273e504.so.1.0.6 (0x00007f8ae8400000)
        liblz4-af1653fb.so.1.8.3 => /usr/local/lib/python3.8/site-packages/faust_streaming_rocksdb.libs/liblz4-af1653fb.so.1.8.3 (0x00007f8ae8000000)
        libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f8ae7dd6000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f8ae8a42000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f8ae8a22000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8ae7bae000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f8ae9228000)
# ldd /usr/local/lib/python3.8/site-packages/faust_streaming_rocksdb.libs/lib
libbz2-a273e504.so.1.0.6       liblz4-af1653fb.so.1.8.3       librocksdb-e568f8f5.so.6.14.6  libsnappy-ddb1bad0.so.1.1.4

I was wondering which script compiles these libraries and how they can be packaged into the whl. The Dockerfile installs librocksdb-dev from Ubuntu 20.04 package, which is RockDB 5, rather than 6.14.

Getting a compatible version of librocksdb-dev has been an issue for me as well, hence why RocksDB libraries are packaged into the wheel.
We test with multiple versions of RocksDB as indicated in: https://github.com/faust-streaming/python-rocksdb/blob/91e60f2a54235640c50a505a82166e3dbf9831b9/.github/workflows/build.yml#L22
However, we have a specific version of RocksDB hardcoded into our release workflow: https://github.com/faust-streaming/python-rocksdb/blob/91e60f2a54235640c50a505a82166e3dbf9831b9/.github/workflows/dist.yml#L20
Before we had wheels for faust-streaming-rocksdb, I built this library inside an Ubuntu:22.04 container. As you can see on https://packages.ubuntu.com/search?suite=default&section=all&arch=any&keywords=rocksdb&searchon=names, you'll have different versions available dependent on your version of Ubuntu:
[bionic (18.04LTS)](https://packages.ubuntu.com/bionic/librocksdb-dev) (libdevel): persistent Key-Value Store for Flash and RAM Storage (development) [universe]
5.8.8-1: amd64 arm64 ppc64el
[focal (20.04LTS)](https://packages.ubuntu.com/focal/librocksdb-dev) (libdevel): persistent Key-Value Store for Flash and RAM Storage (development) [universe]
5.17.2-3: amd64 arm64 ppc64el s390x
[jammy (22.04LTS)](https://packages.ubuntu.com/jammy/librocksdb-dev) (libdevel): persistent Key-Value Store for Flash and RAM Storage (development) [universe]
6.11.4-3: amd64 arm64 ppc64el s390x
[kinetic (22.10)](https://packages.ubuntu.com/kinetic/librocksdb-dev) (libdevel): persistent Key-Value Store for Flash and RAM Storage (development) [universe]
7.3.1-2: amd64 arm64 armhf ppc64el s390x
[lunar](https://packages.ubuntu.com/lunar/librocksdb-dev) (libdevel): persistent Key-Value Store for Flash and RAM Storage (development) [universe]
7.3.1-2: amd64 arm64 armhf ppc64el s390x

Upgrade your Ubuntu Docker image and you should be fine.


Clustering - Uea dev

Reference Issues/PRs

Begun implementing basic sktime clustering algorithms. See issue #501.
Additionally contains some utils updates to allow for importing of csv to ts dataframes automatically.
What does this implement/fix? Explain your changes.

This creates a base for future clustering algorithms. NOTE: this is the very very basic idea for clustering algorithms. All of the design decisions are up for discussion. For example the base Cluster class takes a parameter called matric which is meant to be the custom time series distance measure, however, some clustering algorithms will never be able to use this so this is up for debate as how to best present the user with the option to use custom functionality while keeping consistency.
The utils functions allow you to take a csv and convert it to a .ts file.
Does your contribution introduce a new dependency? If yes, which one?

What should a reviewer concentrate their feedback on?

The reviewer should focus on the design. In terms of functionality not much is here it is just the sklearn algorithms with a basic wrapper. What I want to focus on is the design as some of the sklearn parameters as well as clustering algorithms (as they are completly different types of algorithms) make it awkward to make a generic solution to it.
Any other comments?

I've been investigating how to make a start on making it so the clustering algorithms can use the sktime custom distance measures - the main issue i've come up against is some of the sklearn implementation do not allow for custom distance measure (annoyingly). For example the kmean implementation in sklearn. Sklearn (for some reason) has taken the line that kmeans can't be solved without euclidean (or some other algorithm) and havent allowed for a custom distance measure to be passed as such. Taking a look at how ts learn overcame this they basically just recoded the whole thing which i'd ideally not want to do but it looks like I may have to. Some of the sklearn implementation do allow for custom distance measure so may start with them but if anyone has any idea of a simpler solution for the ones that dont before I recode it would be appreciated!
PR checklist

For all contributions

[ ] I've added myself to the list of contributors.
[ ] Optionally, I've updated sktime's CODEOWNERS to receive notifications about future changes to these files.
[ ] I've added unit tests and made sure they pass locally.

For new estimators

[ ] I've added the estimator to the online documentation.
[ ] I've updated the existing example notebooks or provided a new one to showcase how my estimator works.

The linting checks are failing because of the following:

This is because on my fork I already merged into uea-dev (which I didn't realise would have these checks applied) and so someone could be working on these files on this dev branch (as I have not touched these files) and so don't want to go deleting these.

The linting checks are failing because of the following:

This is because on my fork I already merged into uea-dev (which I didn't realise would have these checks applied) and so someone could be working on these files on this dev branch (as I have not touched these files) and so don't want to go deleting these.

the linting errors can be corrected post merger

the linting errors can be corrected post merger


ReSharper Support

Is there no build for ReSharper anymore?

Nope, I have removed it long time ago in order to reduce support cost. Reshaper has TestCop plug-in which is IMO better.
https://plugins.jetbrains.com/plugin/11635-testcop-for-resharper-2022-3
Use it :)

What was costing so much for ReSharper? Isn't it just packaging?

It's mostly about testing it, also maybe some small differences in data contract (I don't remember exactly).
To be fair I have forked your repo because I was missing TestCop after transition from Windows to Mac (and rider). Since I've had no access to Windows anymore I have decided just to remove resharper support vs releasing something which may be broken.
I have no objections against adding it again if somebody has access to resharper to test it.

Didn’t we already have the discussion? 🙂
https://github.com/JetBrains/resharper-rider-plugin/issues/46

@matkoch can we close this issue or are there any questions left?

I know that some people would like to use this in ReSharper, and from the linked issue it's clear what needs to be done. I would appreciate if you could upload the plugin once manually, and then remove the commented out parts from gradle.build.

@vladyslav-burylov what do you think?

@vladyslav-burylov @mu88 I'm one of the people sad about TestLinker no longer being available for ReSharper.
I've tried TestCopy, but I'd still love it if TestLinker2 were available for ReSharper because it's much simpler and does a few things better than TestCop. For example, it integrates into "Related Files" (Ctrl+Alt+F7), whereas TestCop overrides an important default shortcut (Ctrl+G).
So, it it's easy to just publish the plugin for ReSharper, too, I'd be very grateful if you could do it. If it's not easy at all, well, then I'll have to live with TestCop.

Thanks for your feedback @fschmied , I really appreciate it!
Publishing it for R# shouldn't be an issue at all. The only "problem" is that @vladyslav-burylov is the primary maintainer and only he has access to the JetBrains account where the initial upload must happen - I simply cannot do it 😅

@matkoch I know that this is a delicate question and I hope nobody misunderstands me 🤞🏻 I tried to reach out to @vladyslav-burylov (the repo and plugin owner) multiple times, but without luck. I hope that he's doing well! But do you see any chance to go on with this issue by bypassing the initial upload from Vladyslav? Is that even possible from JetBrains' side? As he made me an admin of this repo, I'm pretty confident that he'd agree - but of course, I know this is not how it should be - trading ideal process with progress

Hey @mu88 @matkoch - I'm not quite sure how it works exactly, but you both should have access to plugin admin UI inside jetbrains hub now - https://plugins.jetbrains.com/plugin/15518-test-linker-2 - can you please check?
It looks like there is no way to upload R#-only version, however if you'll be able to build artifact which contains both R# and Rider versions, you should be able to upload according to https://plugins.jetbrains.com/docs/marketplace/roles.html#plugin-author. I can also transfer ownership of this repo / upload keys if you don't have access to those (@mu88 - you can post here and I should be able to reply to your e-mail which is stored inside my mailbox).
p.s. I'm also happy to follow any specific "plugin sharing instructions" if you know how to share ownership properly (JetBrains UI is a bit silent around that)

@vladyslav-burylov thank you for granting me access! Now I can successfully access the JetBrains Marketplace and upload versions on my own 💪🏻

@matkoch I built this commit locally on my dev notebook and uploaded the resulting ZIP file to the JetBrains Marketplace, as you can see here. But now I cannot install the plugin anymore:

What went wrong resp. what shall I do? I could trigger a new release via the GitHub Action, what do you think?

Okay @matkoch , one step further: I had to remove this piece of code to fix the problem with the compatibility range - now it is looking good (see here).
However, the build still fails with:
> Task :publishPlugin
Pushing ReSharperPlugin.TestLinker2.2<IP_ADDRESS>.nupkg to 'https://plugins.jetbrains.com/'...
  PUT https://plugins.jetbrains.com/api/v2/package/
  NotFound https://plugins.jetbrains.com/api/v2/package/ 783ms
error: Response status code does not indicate success: 404 ().

Usage: dotnet nuget push [arguments] [options]

Arguments:
  [root]  Specify the path to the package and your API key to push the package to the server.

Options:
  -h|--help                      Show help information
  --force-english-output         Forces the application to run using an invariant, English-based culture.
  -s|--source <source>           Package source (URL, UNC/folder path or package source name) to use. Defaults to DefaultPushSource if specified in NuGet.Config.
  -ss|--symbol-source <source>   Symbol server URL to use.
  -t|--timeout <timeout>         Timeout for pushing to a server in seconds. Defaults to 300 seconds (5 minutes).
  -k|--api-key <apiKey>          The API key for the server.
  -sk|--symbol-api-key <apiKey>  The API key for the symbol server.
  -d|--disable-buffering         Disable buffering when pushing to an HTTP(S) server to decrease memory usage.
  -n|--no-symbols                If a symbols package exists, it will not be pushed to a symbols server.
  --no-service-endpoint          Does not append "api/v2/package" to the source URL.
  --interactive                  Allow the command to block and require manual action for operations like authentication.
  --skip-duplicate               If a package and version already exists, skip it and continue with the next package in the push, if any.

> Task :publishPlugin FAILED

FAILURE: Build failed with an exception.

* Where:
Build file 'D:\a\resharper-testlinker2\resharper-testlinker2\build.gradle' line: 218

* What went wrong:
Execution failed for task ':publishPlugin'.
> Process 'command 'dotnet'' finished with non-zero exit value 1

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.


Fix global not initialized warning

Fixes the following ruby warning on each Queue put:
irb(main):001:0> MiqQueue.put({})
...manageiq/app/models/miq_queue.rb:144: warning: global variable `$_miq_worker_current_msg' not initialized

I also fixed the vertical alignment on the equals sign.  See the first commit for the "actual" change.
Similar change to what was done in https://github.com/ManageIQ/manageiq-loggers/pull/41

@jrafanie @Fryguy do you recall why we are setting task_id via a global variable?

The very original reason we had the global variable was so that, in the logger, we could know what the "current" queue message was so we could add the Q-Task-Id piece of the logger.  Since the logger is global, the reference to the current queue message also had to be global.  Later, I think we leverage the global "current" message in other places as well, since we had it already.  Also later, I think with MiqRequest, we started using a separate thread local variable for things like the "current" request id or tracking label.  We may want to consider a thread local for this as well, or switch to the tracking label for consistency.

@Fryguy I guess what I am asking is can we review and remove the global in favor of thread local variables?

Yes, I think we can.  It shouldn't be hard to find the current usage and adjust for it.


Error after crash

Today my server has crashed with around 100 players in it, after starting up again, it looks like none of the servervariables work for some players and it shows the following error:
https://pastebin.com/tavUHu4R
This happened to me before, and the only way to fix it, is to delete all player data and restart it again.

Go to this file in the player data of servervariables 7320c856-3bf4-4e3b-b833-3c6674e2a7ab.yml, and send me the contents of it.

Go to this file in the player data of servervariables 7320c856-3bf4-4e3b-b833-3c6674e2a7ab.yml, and send me the contents of it.

Hi there, it was empty.
Also, I found a way of replicating this problem:

While having players play and their svar values updated make the server crash, either by bug or lack of memory, it will break the values forever causing the errors I reported.

What's the value of the data_save_time property in your config?

What's the value of the data_save_time property in your config?

data_save_time: 5

For now set it to 1, maybe it will help you to prevent another issue like this.

Thanks. But changing it to that was affecting performance.

Do you have a spark report to see the performance impact?


ES2015 classes cannot be used with Mithril

Basically, this line will throw in any ES2015 class implemented with correct semantics. The problem is that you can only .bind classes; you can't .apply or call them with anything. In io.js 2.4.0, which does implement correct semantics (Babel can't due to ES5 restrictions):
> class F {}; F.apply(Object.create(F.prototype))
TypeError: Class constructors cannot be invoked without 'new'
    at new F (repl:1:23)
    at repl:1:37
    at REPLServer.defaultEval (repl.js:154:27)
    at bound (domain.js:254:14)
    at REPLServer.runBound [as eval] (domain.js:267:12)
    at REPLServer.<anonymous> (repl.js:308:12)
    at emitOne (events.js:77:13)
    at REPLServer.emit (events.js:169:7)
    at REPLServer.Interface._onLine (readline.js:210:10)
    at REPLServer.Interface._line (readline.js:549:8)

Same thing with Chrome in strict mode + #enable-javascript-harmony:
> (function() { 'use strict'; class F {}; return F.apply(Object.create(F.prototype)) })()
Uncaught TypeError: Class constructors cannot be invoked without 'new'
    at new F (<anonymous>:2:29)
    at <anonymous>:2:50
    at <anonymous>:2:86
    at Object.InjectedScript._evaluateOn (<anonymous>:905:140)
    at Object.InjectedScript._evaluateAndWrap (<anonymous>:838:34)
    at Object.InjectedScript.evaluate (<anonymous>:694:21)

Duplicate of #618 ?

No. Consider this blocking that bug. This is limited to merely ES6 classes
for "component".
On Mon, Jul 27, 2015, 14:04 Richard Eames<EMAIL_ADDRESS>wrote:

Duplicate of #618 https://github.com/lhorie/mithril.js/issues/618 ?
—
Reply to this email directly or view it on GitHub
https://github.com/lhorie/mithril.js/issues/735#issuecomment-125289852.

Clarification: the "component" property.
On Mon, Jul 27, 2015, 17:16 Isiah Meadows<EMAIL_ADDRESS>wrote:

No. Consider this blocking that bug. This is limited to merely ES6 classes
for "component".
On Mon, Jul 27, 2015, 14:04 Richard Eames<EMAIL_ADDRESS>wrote:

Duplicate of #618 https://github.com/lhorie/mithril.js/issues/618 ?
—
Reply to this email directly or view it on GitHub
https://github.com/lhorie/mithril.js/issues/735#issuecomment-125289852.

s/component/controller/g...
What I mean is this is supposed to work:
var component = {
  controller: class { /* ... */ },
  view(ctrl) { /* ... */ },
}

On Mon, Jul 27, 2015, 17:31 Isiah Meadows<EMAIL_ADDRESS>wrote:

Clarification: the "component" property.
On Mon, Jul 27, 2015, 17:16 Isiah Meadows<EMAIL_ADDRESS>wrote:

No. Consider this blocking that bug. This is limited to merely ES6
classes for "component".
On Mon, Jul 27, 2015, 14:04 Richard Eames<EMAIL_ADDRESS>wrote:

Duplicate of #618 https://github.com/lhorie/mithril.js/issues/618 ?
—
Reply to this email directly or view it on GitHub
https://github.com/lhorie/mithril.js/issues/735#issuecomment-125289852
.

var component = {
  controller: class { /* ... */ },
  view(ctrl) { /* ... */ },
}

That does work.. at least in chrome 43: https://jsfiddle.net/wv5jfoyh/
And if you mean not working with m.component, that's exactly what #618 is about.

reading again, this does look like a dupe of #618 to me, so I'm closing this


feat: add suggested tag client

This PR adds suggested tags to datasource schema query templates
PR fixes following issue(s)
Fixes #26792

New feature (non-breaking change which adds functionality)

Testing

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Also list any relevant details for your test configuration.
Delete anything that is not relevant

[ ] Manual
[ ] JUnit
[ ] Jest
[ ] Cypress

Test Plan

Add Testsmith test cases links that relate to this PR

Issues raised during DP testing

Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR)

Checklist:
Dev activity

[ ] My code follows the style guidelines of this project
[ ] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
[ ] PR is being merged under a feature flag

QA activity:

[ ] Speedbreak features have been covered
[ ] Test plan covers all impacted features and areas of interest
[ ] Test plan has been peer reviewed by project stakeholders and other QA members
[ ] Manually tested functionality on DP
[ ] We had an implementation alignment call with stakeholders post QA Round 2
[ ] Cypress test cases have been added and approved by SDET/manual QA
[ ] Added Test Plan Approved label after Cypress tests were reviewed
[ ] Added Test Plan Approved label after JUnit tests were reviewed

/ok-to-test

/ok-to-test

/build-deploy-preview skip-tests=true

/ok-to-test

Completed testing this on the DP.
One issue exists in terms of firefox, for the schema add query on property pane, which is also present for the new schema on the query page right side.
Other than that seems good to go.


Remove the Orphans #2598

This removes the orphans in consensus-test.
It doesn't yet parameterize ErrorPolicy with a block type.

Can you please replace all expression signatures you added to error types (to fix the ambiguous blk type parameter) with type applications? I commented on a few of them in my initial review but not on all of them :slightly_smiling_face:

bors merge


Consider decreasing badge weight

Notice the badge in the activity bar. Previously the activiy bar icons were heavier and thus the badge fitted them quite well. The new icons look much lighter, and I argue that the badge is too strong. I would try to make it a bit lighter
fyi @bpasero

Yeah maybe goes together with the idea of reducing the size of the activity bar?

I made the badge smaller:

This also matches what GitHub does on their badge on the desktop size:

Created #75013 to track reducing the width of the activity bar since I can't do this via CSS.

Looks better now, thanks!


Generator: Update SDK /services/mongodbflex

Generated from GitHub run<PHONE_NUMBER>5

a newer PR is available https://github.com/stackitcloud/stackit-sdk-go/pull/776


Issue: The environment you requested was Unavailable

Hi,
I tried to use browser-perf, it successfully launched the hybrid app, but after some time being in idle state, it thrown the error in console as follows,
D:\SeleniumAutomation\Documents\Selenium req jar files\AppiumForWindows-<IP_ADDRESS>\Appium>browser-perf --config-file test/configfile1.json
Error: [init({"browserName":"android","chromeOptions":{"androidActivity":"com.csc.chmwardview.chndev.chmWardRound","androidPackage":"com.csc.chmwardview.chndev","perfLoggingPrefs":{"traceCategories":",blink.console,disabled-by-default-devtools.timeline"},"args":["--enable-gpu-benchmarking","--enable-thread-composting"]},"loggingPrefs":{"performance":"ALL"}})] The environment you requested was unavailable.
at D:\SeleniumAutomation\Documents\Selenium req jar files\AppiumForWindows-<IP_ADDRESS>\Appium\node_modules\browser-perf\node_modules\wd\lib\webdriver.js:129:15
at Request._callback (D:\SeleniumAutomation\Documents\Selenium req jar files\AppiumForWindows-<IP_ADDRESS>\Appium\node_modules\browser-perf\node_modules\wd\lib\http-utils.js:87:7)
at Request.self.callback (D:\SeleniumAutomation\Documents\Selenium req jar files\AppiumForWindows-<IP_ADDRESS>\Appium\node_modules\browser-perf\node_modules\wd\node_modules\request\request.js:368:22)
at Request.EventEmitter.emit (events.js:98:17)
at Request. (D:\SeleniumAutomation\Documents\Selenium req jar files\AppiumForWindows-<IP_ADDRESS>\Appium\node_modules\browser-perf\node_modules\wd\node_modules\request\request.js:1219:14)
at Request.EventEmitter.emit (events.js:117:20)
at IncomingMessage. (D:\SeleniumAutomation\Documents\Selenium req jar files\AppiumForWindows-<IP_ADDRESS>\Appium\node_modules\browser-perf\node_modules\wd\node_modules\request\request.js:1167:12)
at IncomingMessage.EventEmitter.emit (events.js:117:20)
at _stream_readable.js:920:16
at process._tickCallback (node.js:415:13)
Please help me resolve this and also my hybrid app has native part, how can I switch to native part
while automating it and I also need to know where does the performance logs gets collected so that I can create custom report.
Thanks

It would be hard to debug this issue without actually looking at the app. browser-perf simply uses appium to connect to the app. Is the webview in teh hybrid app destroyed after some time ?
A simple test would be to run the automation script using appium without browser-perf and see if you still get the same error.

I have been executing the app with appium from many days and it works fine. The problem came when I used browser-perf. The AUT is an android hybrid app. Please help. And please tell the answers to my other questions above.

Please help, I really need to implement this in my app. Please guide me how can I setup browser-perf to an hybrid app. I can mail you in private, I need this for performance evaluation in my app.
Thanks

I do not yet understand your environment. Is there a way you can tell me what the hybrid app does ? If the app code cannot be shared, a good way to see is if you can connect to the hybrid app using selenium or appium.

Closing this due to lack of response. Please re-open if needed.

As mentioned above,my app is perfectly working with appium/selendroid

@csharsha Sorry, I meant that I was closing since there was no action item.

I am getting the same issue. My app is just  a plain html, which opens up fine in firefox. I am running selenium server on my local machine.  The test runs fine in FF but not in Chrome . My Chrome version is latest - 48.x .  Please help.

@abhagupta Are you able to simply launch the selenium scripts and get the browser working ?

I'm getting this as well.  how can I help in debugging the issue?

@jsdevel Can you send in the logs ? Also, can you run any selenium tests with that config ?

Sure.  Would logcat and appium suffice?

@jsdevel Yup, it would. If you are able to connect via appium using node code, and if browser-perf seems to have a problem - that would indicate that we need to fix browser-perf.
Else, there could be something about the configuration that is the issue.


Margins on article

Hi,
The margins on <article> seem to be quite large on devices such as Laptops and Desktop. ON Mobile it looks great. Is there a reason these are as large as they are on larger devices? It really reduces the screen real estate for something like what you see on https://twtxt.net/ if you view this in a Browser on Desktop.
Or am I doing something horribly wrong? :)
Example attached.

This is a deliberate choice.
Typography, Container and Cards provide responsive sizes and margins.
You can disable all responsive spacings in the config file (line 16).

I guess my argument is that the spacings are too much for larger devices. The responsiveness is good but you end up wasting a lot of space? Maybe it's just me :)

I this case, you can fine tune the "spacing factor" in pico in the config file (line 135).  🙂
For example:
$spacing-factor: (
  xs: 1,
  sm: 1.125,
  md: 1.25,
  lg: 1.375,
  xl: 1.5
);

Here is an example scss file to compile your own pico version.

I think I ended up doing this actually and forked (even though I know nothing about sass!) Thanks :)

I felt the same margins on large screens, and since I wanted a CSS solution without build steps, the mention of SCSS almost made me look for a different micro framework. It turned out however that this can be easily achieved with CSS variables. Leaving this here in case someone stumbles on the same issue:
      @media (min-width: 1200px) {
        body > footer,
        body > header,
        body > main,
        section {
          --block-spacing-vertical: calc(var(--spacing) * 2); /* default is var(--spacing) * 4 */
        }
      }


Changed edge.py to calculate rolling spread on pandas objects

I've been using this for a while for online spread calculations from exchange data. Very useful!
I've left the functionality to return a single float based on a single input if 'window' is left as None (default). The pytest has a slightly different result because in the original code, there is a missing value from the np.logical_or(c[:-1], c[1:]) that is filled by NaN when transitioning to pd.Series.shift(), but especially on longer windows this difference would be negligible.
There's also functionality for using exponentially weighted averages instead of simple moving averages, parsing strings like 'ohl', 'oc', for different ways of calculating mid-price, or can pass a raw series to use your own definition of mid-price from orderbook data etc.
Feel free to ignore if not useful.

Thank you for your feedback and suggestions!
I see some theoretical issues in using open or closing prices in the calculation of the midprice (high-low average) because this may create a bias in the estimation. On the other hand, calculating rolling averages can be definitely useful. Also https://github.com/eguidotti/bidask/issues/9 seems to be a similar request in this direction

For the same reasons of #9 this PR will not be merged. In any case, thank you very much for your time and effort in putting this together.

I am currently going down this rabit-hole. The problem is that, the way the pseudocode is written, it appears impossible to avoid chaining rolling operations. For example, expectation e1 depends on rolling aggregation of x1, and yet, x1 depends on rolling aggregation of phi1 via po. I am currently investigating how the pseudocode can be rewritten so that the final spread estimate at time t only depends on the corresponding window (e.g. [t,t+1,... t+window]) A roll of a roll cannot occur because it makes the window larger by a constant amount every time a roll is chained onto another roll.

A vectorized rolling implementation is available in R. See https://github.com/eguidotti/bidask/blob/main/r/R/edge.R


dark light mode

estoy usando esto para cambiar color

y lo llamo de esta forma
onclick="mode()"
pero solo funciona en la misma ruta del sitio web si cambio de ruta en el sitio web vuelve al original, alguien puede ayudarme¿
INTENTO TRADUCIRLO
I am using this to change color

and I call it this way
onclick="mode()"
but it only works on the same path of the website if I change the path on the website it goes back to the original, can someone help me?

No one can help me, thanks in advance

Hello @ximosa, thanks for your message but your problem its more related to the way you are creating your app then beercss.
I dont know about your stack and the way you are dealing with BeerCss on your Project but if you look at the  you can see the we have a body and the class its just apied to the body simple.

Sorry about the time we take to answer you, but this is a open source project :D always try to put your issues in english to have a faster answer from the community 🍻

Hi @ximosa ,
I will assume that your app isn't a SPA, so you need to save the last theme/mode generated (on sessionStorage, localStorage or an api) and get it back when you change the page url (if you want to persist the theme across pages).
// to get the last theme/mode
let lastTheme = window.sessionStorage.getItem("lastTheme");
let lastMode = window.sessionStorage.getItem("lastMode");

await ui("theme", lastTheme);
await ui("mode", lastMode);

// to save the last theme/mode
window.sessionStorage.setItem("lastTheme", lastTheme);
window.sessionStorage.setItem("lastMode", lastMode);

And please english first 👍


Support other microcontrollers than ATmega328p

e.g. ATtiny85, ATmega32u4.
We already began doing some stuff in this direction: publiclab/webjack#17
I managed to get the library sending on the ATtiny with Timer0. The problem with receiving is, that Timer0 uses the same pins as the analog comparator.
A solution could be the ADC multiplexer, which allows to replace AIN1 with an arbitrary ADC input pin. The downside of this solution is, that none of the other ADC pins can be used then, as the ADC has to be disabled.
It would be perfect if Timer1 can be used insted of Timer0. But I did not have the time yet to look closely at the differences between the timers.
For the ATmega32u4 the ADC definitively has to be switched off, otherwise it can only use the internal bandgap reference as negative comparator input.

Would you like to add a transistor?
like this
http://cyberworks.cocolog-nifty.com/blog/files/modem_mono.pdf

I think I did not understand your question. Will a transistor help in supporting other µCs?

Yes. An analog comparator becomes unnecessary.
There should be an interrupt pin for reception and a general-purpose pin for transmissions.

Ah I see, thanks for the hint. This circuit also has the benefit that it does not need a pin for reference voltage. Would be great to get this working, hope I can build the circuit this week.
Unfortunately there is also a downside: this will break compatibility with existing shields/boards ( I could not find any with transistor built-in). Meaning this probably would require some documentation and a new major release.

I got SoftModem onto the Leonardo (ATmega32u4), and sending, but not receiving (as noted) using @rmeister's https://github.com/rmeister/SoftModem/tree/attiny-support.
What would it take to get receiving working? I'd like to contribute but am not sure exactly where to start. Thank you!

I think that additional circuitry is necessary to support SoftModem.
https://github.com/arms22/SoftModem/issues/5#issuecomment-240717423

ATmega32U4 has Analog Comparator.
AIN+ can be connected either to the AIN0 (PE6) pin, or to the internal
Bandgap reference. AIN- can only be connected to the ADC multiplexer.
If analogRead is unnecessary, make the following connection.
AIN+ AIN0
AIN- AIN1
If you need analogRead, make the following connection.
AIN+ AIN0
AIN- Bandgap ref
For more detail see 2.3 Analog Comparator
http://www.atmel.com/ja/jp/Images/Atmel-7766-8-bit-AVR-ATmega16U4-32U4_Datasheet.pdf

Thanks! I'm not familiar enough with electronics to help on a circuitry change at this point, but I looked up what an analog comparator is, which was a good first step for me:
http://www.instructables.com/id/Girino-Fast-Arduino-Oscilloscope/step11/How-the-Analog-Comparator-works/

Just wanted to let you know that I have implemented the circuit shown above http://cyberworks.cocolog-nifty.com/blog/files/modem_mono.pdf and it worked fine on Atmega328. The only exception is that a 100R resistor was replaced by 1K resistor. Analog comparator interrupt handler is replaced by a regular interrupt triggered on RISING.
However SoftModem currently does not work on attiny85, at least on 16Mhz using internal PLL oscillator. Sending kind of works after I replaced timer output with manual port switching and _delay_us(), but with sync errors: sending anything longer than five characters is impossible as the sequence gets corrupted. With default timers it doesn't work at all, even though it sounds like normal. And receiving doesn't work at all, even though the same softmodem works on 328P (with transistor).


Add scopes

I really like how you separate your models file thanks to the ./models/index file.
But, how can you configure the scopes on a model with this pattern?
Heres' an example of my problem:
'use strict';

module.exports = function (sequelize, DataTypes) {
  var Project = sequelize.define('project', {
    name: { type: DataTypes.STRING },
  }, {
    scopes: {
      myAwesomeScope: {
        include: [models.user]  // <-------- how can I retrieve here the models.user?
      }
    },
    classMethods: {
      associate: function (models) {
        Project.hasMany(models.user);
      }
    }
  });

  return Project;
};

Hi @SeyZ,
did you fix the issue already? Any proposal for a solution?

hi @sdepold Unfortunately nope :(

Hi @SeyZ, actually I'm using sequelize.models to access models. The problem is the sequence of  loading. IE models.users file must be loaded before project model.
'use strict';

module.exports = function (sequelize, DataTypes) {
  var Project = sequelize.define('project', {
    name: { type: DataTypes.STRING },
  }, {
    scopes: {
      myAwesomeScope: {
        include: [sequelize.models.user]  // <-------- how can I retrieve here the models.user?
      }
    },
    classMethods: {
      associate: function (models) {
        Project.hasMany(models.user);
      }
    }
  });

  return Project;
};

I've found the solution. You should define the include scope as function(), so it will be executed only after all models were loaded by Sequelize singleton.
'use strict';

module.exports = function (sequelize, DataTypes) {
  var Project = sequelize.define('project', {
    name: { type: DataTypes.STRING },
  }, {
    scopes: {
      myAwesomeScope: function() {
        return { include: [models.user] }
      }
    },
    classMethods: {
      associate: function (models) {
        Project.hasMany(models.user);
      }
    }
  });

  return Project;
};

@hadokee is right.
This issue should be closed 👍


Boomerang-Flies-While-Save-Bug

The bug is here again -.-
Don't know why but working on a fix...

Fixed in Hotfix2 of 0.5.8-alpha


Update to kryo v3

Hi!
Is there any estimate about how long it will be till kryonet is going to use Kryo v3?

I would really appreciate an update to Kyro 3.0.1.

:+1:


Adjust Severity Levels for Lint Rules

Description
Currently, linter rules have a uniform severity level set to SeverityError. However, this approch doesn't accurately reflect the priorities of different linting issues. So, we need to adjust severity levels to better guide developers and prioritize fixes.
Objective
Refine out the severity levels of our lint rules to more accurately reflect their impact on code quality, readability, and potential for causing runtime issues.
Proposed Changes
1. Severity Level Definitions
I propose using the following severity levels:

SeverityError: For issues that could lead to runtime errors, security vulnerabilities.
SeverityWarning: For style-related issues that don't affect functionality but impact readability or maintainability.
SeverityInfo: For suggestions and best practices that are good to know but not crucial. [NOT SURE]
SeverityOff: For rules that are disabled by default but can be enables as needed.

2. Reclassification Guidelines
Based on previous paragraph, we need to reclassify our existing lint rules based on the following criteria:
SeverityError

Potential runtime errors
Incorrect use of language features
Security vaulnerabilities
Use of deprecated function/packages

SeverityWarning

Code style inconsistencies (e.g., mixed identation)
Potential performance issues
Unused variables or imports (golangci-lint unused)
Violations of Go/Gno conventions

SeverityInfo

Suggestions for more idiomatic Go/Gno code.

SeverityOff

Project-specific or highly opinionated rules

Please comment on this issue with your thoughts, concerns, or suggestions regarding this severity level adjustment plan.

Related with #82, #91
cc: @0xtekgrinder

I agree with those suggested changes to the default severity.
However, note that in the current implementation setting to SeverityOff won't just remove all the issues, we will need to update the codebase to have this functionnality.


PageView scroll physics to match Android

Fixes https://github.com/flutter/flutter/issues/38357
Compared with tabs_overlay app
The main problem with the current PageScrollPhysics is that they are ScrollSpringSimulation based, while Android implementation defines the exact duration the page view must move. This makes that both small and large fling simulations settle at the end, occupying unnecessary duration, during which user can't really interact with UI.
This PR copies the Android logic and makes it default.
Further discussion is in the issue https://github.com/flutter/flutter/issues/38357

Video before PR
https://user-images.githubusercontent.com/39104740/146440807-50e10ab1-628c-4623-a9d3-3704bd5fd0d5.mp4

Video after PR
https://user-images.githubusercontent.com/39104740/146440570-ba140add-0411-454a-9456-34d6d62e9fc8.mp4

Pre-launch Checklist

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] I read the Tree Hygiene wiki page, which explains my responsibilities.
[x] I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
[x] I signed the CLA.
[x] I listed at least one issue that this PR fixes in the description above.
[x] I updated/added relevant documentation (doc comments with ///).
[x] I added new tests to check the change I am making, or this PR is test-exempt.
[x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Happy new year too!

Should this add a platform check and maintain the original behavior for platforms that are not Android?

I think not, because PageView is only a thing in Android world (if I'm not mistaken), and new behavior is better for usability, because it makes the animation more responsive to user's gestures.

PageView surely applies on any number of platforms. It's just a ListView that snaps by item.

PageView surely applies on any number of platforms. It's just a ListView that snaps by item.

Oh ok.
So I spent some time and built an iOS implementation for the tabs_overlay. I unfortunately don't have a real iOS device on my hands at the moment, but as far as I can tell from running it in debug mode - the old implementation is not accurate with native iOS either. It seems that their implementation is similar to Android's - the faster you drag, there's noticably less duration, and no settling at the end.
It seems that it would be fine to not add the platform check at the moment, and file a new issue for tuning it for iOS.

Video (with the spring implementation in Flutter)
https://user-images.githubusercontent.com/39104740/149369320-d5666bb0-31a5-45b0-9d08-bb116e5b4562.mp4

Video (with the new implementation in Flutter)
https://user-images.githubusercontent.com/39104740/149370283-aa5ecd0a-1f51-44fe-8e09-430e0c38051e.mp4

self-ping to put this at the top of my inbox for review tomorrow :)

Filed https://github.com/flutter/flutter/issues/97064 for iOS

Hey @nt4f04uNd I am going to revert this, there were some internal customers broken by this change. Can you re-open this as a new PR and we can discuss re-landing it there? Thanks!