refactor(v2): toggle css should not be css modules since we use globals

Motivation
Since we use a lot of globals selector in toggle.css, maybe putting it as css modules is not useful at all. Might as well just make it plain css and save us some computing time.
CSS modules is more expensive than plain css.
It's also nicer to be able to override "toggle" classname without swizzling, eg: if i want to use fire icon.
Have you read the Contributing Guidelines on pull requests?
yes
Test Plan
No css change.

Extra
Maybe this file should've been moved to infima instead :|
https://github.com/facebook/docusaurus/blob/cc2201e997c660f8a334e5d5ada27994d04697f0/packages/docusaurus-theme-classic/src/theme/Tabs/styles.module.css#L8-L10
https://github.com/facebook/docusaurus/blob/master/packages/docusaurus-theme-classic/src/theme/Tabs/styles.module.css

Im ok with anything but should we have a consensus on whether css in themes should be css modules ?
If its css modules, its hard to override the css as user without swizzling.
I feel css modules is better for pages etc that doesnt want to conflict with any other css

You're right, the Toggle component should be in react-infima. I thought the reason why we use globals here is because that's CSS provided by the component? IMO CSS overrides is very fragile and is not the correct way to style using a component-based UI. It should be CSS variables or swizzling.

Maybe we can just keep it as it is for now. Should we continue with the pr ? creating two files. one styles.css and one styles.module.css
I think better just keep it as one styles.modules.css then and close this pr

Ok sure, up to you


Switching from AnyObject to Any

This PR has a few commits cleaning up some of the older logic to use some more condensed logic as well as a big change which switches from AnyObject to Anythroughout the Elevate APIs. Since JSONSerialization has now moved to using Any instead of AnyObject, our Elevate APIs should match. We also may "have" to do this to support Linux.

We still need to confirm this.

These changes have a small performance impact that needs to be called out. I've noticed the performance test increase by about 7-8% when running several iterations in the simulator. It may be possible to figure out which cast is being more costly. I'm assuming we're now having to bridge back and forth between Objective-C objects and Swift objects than we were before with AnyObject. However, this may not matter in the end if Linux can only use Any.

We're thinking Linux may be the main reason this change is necessary since it won't have bridging between Objective-C and Swift which is why AnyObject works. All values supported by JSONSerialization in the OSS version of Swift are value types.

I'm going to just close this PR. Instead we're going to move all these changes and others through in #10.


Adapt code to ol 9.0.0

This breaks compatibility with ol < 9

What that means for libraries using ol < 9 ?
Should we have two differents release for a while ? one for ol <9, and one for ol >=9 ?
I currently can't migrate to ol 9. Thats a good question for every Geoblocks.

I didn't looked into it but I don't think we can make this change backward compatible for ol < 9.
Easiest solution is to create a new major release with only ol >= 9 as peerDependencies.
Users of this lib with ol < 9 are using the previous release


Add task_id label. (#880)

Add task_id label.

Update README to explain the new label.

(cherry picked from commit 18d065a63a422f50cfa3895a476a3212ec00ef36)

Coverage decreased (-0.06%) to 81.314% when pulling ca1bc512a5d44b8319b682fdedbf0dbebc023d76 on bogdandrutu:cherry into f93721ec058644ab119f889bda13227175b6aa2e on census-instrumentation:v0.10.x.


[FEATURE REQUEST] add support for custom layers in best_model()

Overview
I built a model in Keras using the functional API. I also use the keras_contrib and keras_radam libraries to add new activations (Swish) and optimizers (RAdam) not yet implemented in keras. Talos initializes and trains all iterations of the model without issue, but if I want to recall the best model or deploy the model, it fails with an error from keras.utils.generic_utils.deserialize_keras_object().
The error in question is ValueError: Unknown layer: Swish.
Prerequisites

[x] My Python version is 3.5 or higher
[x] I have searched through the issues Issues for a duplicate
[x] I've tested that my Keras model works as a stand-alone

>>> talos.__version__
'0.6.0'

Expected behavior
scan_object.best_model(metric="acc") should result in a new instance of the best performing model.
Actual behavior
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-29-2e96fabca5ec> in <module>
      1 #ta.Deploy(t,"U-nets", metric="acc")
----> 2 scan_object.best_model(metric="acc")

~/.pyenv/versions/miniconda3-4.3.30/envs/tf_gpu/lib/python3.6/site-packages/talos/scan/scan_addon.py in func_best_model(scan_object, metric, asc)
     12     from ..utils.best_model import best_model, activate_model
     13     model_no = best_model(scan_object, metric, asc)
---> 14     out = activate_model(scan_object, model_no)
     15
     16     return out

~/.pyenv/versions/miniconda3-4.3.30/envs/tf_gpu/lib/python3.6/site-packages/talos/utils/best_model.py in activate_model(self, model_id)
     18     '''Loads the model from the json that is stored in the Scan object'''
     19
---> 20     model = model_from_json(self.saved_models[model_id])
     21     model.set_weights(self.saved_weights[model_id])
     22

~/.pyenv/versions/miniconda3-4.3.30/envs/tf_gpu/lib/python3.6/site-packages/keras/engine/saving.py in model_from_json(json_string, custom_objects)
    490     config = json.loads(json_string)
    491     from ..layers import deserialize
--> 492     return deserialize(config, custom_objects=custom_objects)
    493
    494

~/.pyenv/versions/miniconda3-4.3.30/envs/tf_gpu/lib/python3.6/site-packages/keras/layers/__init__.py in deserialize(config, custom_objects)
     53                                     module_objects=globs,
     54                                     custom_objects=custom_objects,
---> 55                                     printable_module_name='layer')

~/.pyenv/versions/miniconda3-4.3.30/envs/tf_gpu/lib/python3.6/site-packages/keras/utils/generic_utils.py in deserialize_keras_object(identifier, module_objects, custom_objects, printable_module_name)
    143                     config['config'],
    144                     custom_objects=dict(list(_GLOBAL_CUSTOM_OBJECTS.items()) +
--> 145                                         list(custom_objects.items())))
    146             with CustomObjectScope(custom_objects):
    147                 return cls.from_config(config['config'])

~/.pyenv/versions/miniconda3-4.3.30/envs/tf_gpu/lib/python3.6/site-packages/keras/engine/network.py in from_config(cls, config, custom_objects)
   1020         # First, we create all layers and enqueue nodes to be processed
   1021         for layer_data in config['layers']:
-> 1022             process_layer(layer_data)
   1023         # Then we process nodes in order of layer depth.
   1024         # Nodes that cannot yet be processed (if the inbound node

~/.pyenv/versions/miniconda3-4.3.30/envs/tf_gpu/lib/python3.6/site-packages/keras/engine/network.py in process_layer(layer_data)
   1006
   1007             layer = deserialize_layer(layer_data,
-> 1008                                       custom_objects=custom_objects)
   1009             created_layers[layer_name] = layer
   1010

~/.pyenv/versions/miniconda3-4.3.30/envs/tf_gpu/lib/python3.6/site-packages/keras/layers/__init__.py in deserialize(config, custom_objects)
     53                                     module_objects=globs,
     54                                     custom_objects=custom_objects,
---> 55                                     printable_module_name='layer')

~/.pyenv/versions/miniconda3-4.3.30/envs/tf_gpu/lib/python3.6/site-packages/keras/utils/generic_utils.py in deserialize_keras_object(identifier, module_objects, custom_objects, printable_module_name)
    136             if cls is None:
    137                 raise ValueError('Unknown ' + printable_module_name +
--> 138                                  ': ' + class_name)
    139         if hasattr(cls, 'from_config'):
    140             custom_objects = custom_objects or {}

ValueError: Unknown layer: Swish

Model details
MWE
import keras
from keras.models import Model
from keras.layers import Input, Conv2D, BatchNormalization
from keras.layers.advanced_activations import ReLU
import talos as ta

def u_net(shape, nb_filters=64, conv_size=3, init="glorot_uniform",
          activation=ReLU, output_channels=5):

    i = Input(shape, name="input_layer")
    n = Conv2D(nb_filters, conv_size, padding="same", kernel_initializer=init,
        name="block1_conv1")(i)
    n = activation(name="block1_{}1".format(activation.__name__))(n)
    n = BatchNormalization(name="block1_bn1")(n)
    n = Conv2D(nb_filters, conv_size, padding="same", kernel_initializer=init,
        name="block1_conv2")(n)
    n = activation(name="block1_{}2".format(activation.__name__))(n)
    n = BatchNormalization(name="block1_bn2")(n)
    o = Conv2D(output_channels, 1, activation="softmax", name="conv_out")(n)
    return Model(inputs=i, outputs=o)

def talos_model():
    model = u_net(SHAPE, nb_filters=p["nb_filters"], activation=p["act"])
    model.compile(optimizer=p["opt"](lr=1e-4))
    history = model.fit(x=X, y=Y)
    return model, history

scan_object = ta.Scan(x=X, y=Y, model=talos_model, params=p)

parameter dictionary
# fit params
from keras.optimizers import Adam
from keras.layers.advanced_activations import ReLU
from keras_radam import RAdam
from keras_contrib.layers.advanced_activations.swish import Swish

p = {
    "nb_filters": [12, 16, 32],
    "act": [Swish, ReLU],
    "opt": [RAdam, Adam]
}

[x] My bug report includes an input model
[x] My bug report includes a parameter dictionary
[x] My bug report includes a Scan() command
[ ] My bug report question includes a link to a sample of the data

I chose to leave out sample data because it is not relevant to the issue at hand. For the same reason, I chose to create a Minimal Working Example rather than pasting the entire model, which is quite complicated and does not help to locate the issue.

Thanks for taking the time to create a well-structured issue. I understand now what is the problem; Keras for some reason does not allow loading model from json if the name of an object (e.g. layer) is unknown to it.
It is anyhow possible to find the best models from the experiment and "recover" the models. Because this is kind of a case that can come up for several reasons, I've added a utility for doing it in a straightforward manner. You can access it by upgrade it to v0.6.4 with:
pip install git+https://github.com/autonomio/talos
It will work on experiment log from any previous Talos version as well. I've created a code-complete notebook that outlines the process you can follow to get to cross-validated results for n models, as well as the models themselves. It does involve re-training n models, which depending on your architecture and system configuration may take longer than merely evaluating best models from the scan_object would.
Related with the underlying problem you suffer from, I'm not sure why Keras is doing a string check, as the meaningful part of the model is stored in the weights and not in the json. Might be a good idea to post this issue separately to Keras in case someone there warms up to the idea of making this go away.

Thank you for the comprehensive response. The new feature is definitely a nice addition but because of the size of my network architecture, it would take a few days to re-train n models. I see that the model_from_json() accepts a parameter custom_objects which can be a list of 3rd party objects used in the model. Do you think it is possible for Talos to run a check for custom objects before calling model_from_json() and add the names of any custom objects to a list that can get passed along with the model_id?

@bjtho08 definitely, that's a great idea :) I'll change the title of the issue to correspond this scope.

Awesome! I'll be looking forward to seeing the development and maybe pitch in, if I manage to find the time between finishing my phd dissertation and getting my data out of my models ;)

@bjtho08 , how did you end up solving this problem? I have exactly the same issue with scan_object.best_model() in talos as my model has custom layer.
What I  tried:
First, I Analyze the scan_object to find the round w/ best result using rounds2high.  Say we store the best model number into model_no. Then I tried the following, but it failed:
ruh_best_model = talos.utils.best_model.activate_model({scan_object,{'myCsutomLayer': myCsutomLayer}} , model_no)

@bjtho08 , how did you end up solving this problem? I have exactly the same issue with scan_object.best_model() in talos as my model has custom layer.
What I  tried:
First, I Analyze the scan_object to find the round w/ best result using rounds2high.  Say we store the best model number into model_no. Then I tried the following, but it failed:
ruh_best_model = talos.utils.best_model.activate_model({scan_object,{'myCsutomLayer': myCsutomLayer}} , model_no)

What I tried:
First, I Analyze the scan_object to find the round w/ best result using rounds2high. Say we store the best model number into model_no. Then I tried the following, but it failed:
ruh_best_model = talos.utils.best_model.activate_model({scan_object,{'myCsutomLayer': myCsutomLayer}} , model_no)
due to sytaxterr:

You have quite a few erros in that single line of code. best_model() and activate_model() are two functions from the same module. That means you can't chain them together as you did here. That would only work if activate_model() was a method in a class instance named best_model. Second, activate_model() takes one positional argument. Now, I don't know how you get that specific syntax error, because you are supplying two arguments, where the first argument is a set containing a Scan object and a dict with a custom layer as the item and the second argument is the model number.
Now, I don't have direct access to my own code atm, but if I remember correctly, what I did as a work-around for this particular issue was to simply use the underlying code for the various methods. So for instance, to get the best model and then re-load it, I used
from keras.models import model_from_json
from myswish import Swish

my_activations = {
    'Swish': Swish,
}

best = scan_object.data.sort_values('val_acc', ascending=False).iloc[0].name
model = model_from_json(self.saved_models[best], custom_objects=my_activations)

Then you just substitute whatever your dict of custom objects is named and change the sorting column if needed.

What I tried:
First, I Analyze the scan_object to find the round w/ best result using rounds2high. Say we store the best model number into model_no. Then I tried the following, but it failed:
ruh_best_model = talos.utils.best_model.activate_model({scan_object,{'myCsutomLayer': myCsutomLayer}} , model_no)
due to sytaxterr:

You have quite a few erros in that single line of code. best_model() and activate_model() are two functions from the same module. That means you can't chain them together as you did here. That would only work if activate_model() was a method in a class instance named best_model. Second, activate_model() takes one positional argument. Now, I don't know how you get that specific syntax error, because you are supplying two arguments, where the first argument is a set containing a Scan object and a dict with a custom layer as the item and the second argument is the model number.
Now, I don't have direct access to my own code atm, but if I remember correctly, what I did as a work-around for this particular issue was to simply use the underlying code for the various methods. So for instance, to get the best model and then re-load it, I used
from keras.models import model_from_json
from myswish import Swish

my_activations = {
    'Swish': Swish,
}

best = scan_object.data.sort_values('val_acc', ascending=False).iloc[0].name
model = model_from_json(self.saved_models[best], custom_objects=my_activations)

Then you just substitute whatever your dict of custom objects is named and change the sorting column if needed.


Stop running Get-Command Under User

Get-Command winget.exe not always returns the path to winget when in user context. When running in user context I received on a Win11 machine the same error as here: https://github.com/Romanitho/Winget-AutoUpdate/issues/387#issuecomment-1710604158
Proposed Changes
Since winget is installed to a predefined path (similar to system context installation of winget as introduced in https://github.com/Romanitho/Winget-AutoUpdate/pull/389), let's just reference that one.
Note: Successfully tested on 2 Windows 11 machines only. Might require some testing before merging to production.
Related Issues
https://github.com/Romanitho/Winget-AutoUpdate/issues/387

Thanks for contribution ;)


Transfer method findModel() into the kernel. (Find or 404)

My suggestion is to add a method that would return as either a model or redirect the user to a 404 page NotFoundHttpException().
It's convenient. And often used. Such methods exist in RoR, Laravel, etc. And Yii in templates GII generates method findModel().

findOrFail will be very convinent for ajax applications...


Grakkit's JavaScript ticker (chain) can fail and does not resume

I ran into an issue with setTimeout / setImmediate not working. After a lot of investigation, I narrowed it down to chain and instance.tick.
When the bug occurs, session.task.tick will stop accumulating and will always be stuck. When that happens, the JS's ticker will not trigger again until you do a reboot of the server.
My theory is that this may be due to a race condition between the Java/JS/Graal layers. I'm thinking that if a tick takes longer than a regular Java tick, it tries to call JavaScript's tick and nothing happens. When nothing happens, well, it gets released. Since it is released, it does not get readded (as it wasn't called/executed), thus, It doesn't know to tick it again. This seems like a major flaw.
I added a temporary hook in the library for troubleshooting
let thisNext
chain(void 0, (none, next) => {
  thisNext = next
  ....
 }

export const restartTick = () => {
  Grakkit.push(thisNext)
}

and was able to trigger restartTick by a command. When that happened, the ticker immediately start ticking again. However, that isn't a valid solution.

Since Grakkit leverages runTaskLater, it makes an attempt to call the function on that task. If that task fails, then the ticker fails hard. This doesn't seem to be a fault on the JavaScript side and I don't see a bug on the Grakkit side. It seems more of an issue between the two layers. Assuming that is the case, we should document this and build around the bug to avoid it as much as possible.
However, for this scenario, we may be able to mitigate it by:

Add a new method with Instance/GrakkitApi to register a ticker function. This is permanent and gets added to the tick.
Update Stdlib to register a ticker, versus leveraging Grakkit.push.


[WIP]: Document performance best practices

Document performance best practices:

Remove unused calculated attributes
Avoid committing objects inside a loop

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.0 out of 2 committers have signed the CLA.:x: Yevgen Nerush:x: nischay-mendixYevgen Nerush seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


web.config rule for IIS

You should definitely double check me, but I got it to work on IIS by using the following rule in my web.config file
<rewrite>
    <rules>
        <rule name="rule 1m" stopProcessing="true">
	<match url="(.*)"  />
	<action type="Rewrite" url="/index.php?token={R:1}"  appendQueryString="true" />
		</rule>
    </rules>
</rewrite>

Thanks for this, @bigworm

I linked to this issue from the README — hopefully that's enough to help IIS users. Thanks again.


Unable to configure additional trusted Certificates for Keycloak

Describe the bug
I'm running keycloak at home, and it talks to an LDAP server, that uses SSL, but with my own internal Root CA. I can't figure out how to get that Root CA added to either the JDK, or to Keycloak. Keycloak has documentation on how to do this, but I can't find an /etc/keycloak that I would expect to see to do this with.
Steps To Reproduce
Steps to reproduce the behavior:

Install Keycloak
have an LDAP server that uses a private SSL certificate
Try to have keycloak talk to that LDAP server.

Expected behavior
I'd like to be able to configure the Root Trusted SSL Certs somehow.
Additional context
I found this thread but it doesn't work well in flakes, and I have tried various permutations, but I don't have enough experience with nix to know how to do this properly.
Notify maintainers
@ngerstle
@talyz
@NickCao
Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.
- system: `"x86_64-linux"`
 - host os: `Linux 6.6.41, NixOS, 24.05 (Uakari), 24.05.20240721.63d37cc`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.5`
 - nixpkgs: `/nix/store/lzhqf5y9dcgfkg5f7f96jjc814pgrsqy-source`

Nix flake configuration
Thanks so much!
Add a :+1: reaction to issues you find important.

AH, I just figured this out, and I was looking in the wrong place.
I can use the truststore-paths option and it'll pick up things correctly. Sorry for the pings!
  services.keycloak = {
    package = pkgs.unstable.keycloak; # latest upstream stable keycloak
    enable = true;
    sslCertificate = "/etc/ssl/certs/${config.networking.hostName}.${config.networking.domain}.crt";
    sslCertificateKey = "/etc/ssl/private/${config.networking.hostName}.${config.networking.domain}.key";
    settings = {
      proxy = "reencrypt";
      hostname = "keycloak.light.kow.is";
      # oh maybe this will work.
      truststore-paths = "/etc/ssl/certs/dark.kow.is.ca.pem"; # <<--
    };


Determining out/in network coverage deductible

Is there a field that I can look at to determine if a patient has a deductible for out/in network coverage. I have two plans that are returning similar deductible summaries, but have different coverages for out of network:
Anthem Blue Shield (has In-Network coverage with 0 deductible and OON coverage with $500 deductible):
  "deductible": {
      "individual": {
        "in_network": {
          "limit": {
            "amount": "0",
            "currency": "USD"
          },
          "applied": {
            "amount": "0.00",
            "currency": "USD"
          },
          "remaining": {
            "amount": "0",
            "currency": "USD"
          }
        },
        "out_of_network": {
          "limit": {
            "amount": "500",
            "currency": "USD"
          },
          "applied": {
            "amount": "0.00",
            "currency": "USD"
          },
          "remaining": {
            "amount": "500",
            "currency": "USD"
          }
        }
      }
    }

United Health (has In-Network coverage with 0 deductible and no OON coverage):
          "individual": {
            "in_network": {
              "limit": {
                "amount": "0",
                "currency": "USD"
              },
              "applied": {
                "amount": "0.00",
                "currency": "USD"
              },
              "remaining": {
                "amount": "0",
                "currency": "USD"
              }
            },
            "out_of_network": {
              "limit": {
                "amount": "0",
                "currency": "USD"
              },
              "applied": {
                "amount": "0.00",
                "currency": "USD"
              },
              "remaining": {
                "amount": "0",
                "currency": "USD"
              }
            }
          }

It seems like the 0 limit/ 0 applied/ 0 remaining could mean that the visit could be covered under their plan with purely a co-pay or is not covered at all by their plan. Could you safely say that looking at a co-pay plus the L/A/R co-pay amounts determines if there is OON coverage?

@daxiang28 Check out the table of keys in the json payload in our documentation: https://platform.pokitdok.com/documentation/v4/#eligibility
We pass on all of the information that we get from the payer.  The keys in the response payload of coverage.deductibles and summary.deductible will have that information, if the trading partner returns it.  We are working to provide documentation on the likelihood that a trading parter will return a specific key in the eligibility response.


Feature/bphh 365/jurisdiction elective fields

Description

Adds ability for review managers to a make customizations to a published template and add a elective fields for a requirement block

What type of PR is this? (check all applicable)

[ X] 🍕 Feature
[ ] 🐛 Bug Fix
[ ] 📦 Chore (Release)
[ ] ✅ Test

Related Tickets & Documents
https://hous-bssb.atlassian.net/browse/BPHH-79

Steps to QA
(Ping me if testing locally as it will require some setup as elective fields aren't seeded yet)

Login as review manager
Navigate to building permits page
Click manage on any available permit template
Click edit on any requirement block that has elective fields, and wait for the side bar to open
Click Manage fields
Check fields to enable
Click Add fields
Click done
Click publish to save the changes

404 on page:


[WIP] Stylelint bezier

Self Checklist

[ ] I wrote a PR title in English and added an appropriate label to the PR.
[ ] I wrote the commit message in English and to follow the Conventional Commits specification.
[ ] I added the changeset about the changes that needed to be released. (or didn't have to)
[ ] I wrote or updated documentation related to the changes. (or didn't have to)
[ ] I wrote or updated tests related to the changes. (or didn't have to)
[ ] I tested the changes in various browsers. (or didn't have to)

Windows: Chrome, Edge, (Optional) Firefox
macOS: Chrome, Edge, Safari, (Optional) Firefox

Related Issue

Summary

Details

Breaking change? (Yes/No)

References

우선순위 변경으로 이 PR은 우선 닫고, 이후에 다시 살펴보도록


Passing a thinned lat/lon grid as input to a MET tool results in a segfault.

Demonstrate this by choosing one of the thinned lat/lon grids:
https://www.nco.ncep.noaa.gov/pmb/docs/on388/tableb.html
For example, G037.
Run copygb (on dakota) to regrid some GFS data to this grid:
/d3/projects/CODE/UPP/UPPV4.0.1/bin/copygb.exe -xg37 /d3/projects/MET/MET_test_data/unit_test/model_data/grib1/gfs/gfs_2012040900_F012.grib gfs_G037.grb
/d3/projects/MET/MET_regression/develop/NB20200211/MET-develop/met/bin/plot_data_plane
gfs_G037.grb gfs_G037.ps 'name="TMP"; level="Z2";'
DEBUG 1: Opening data file: gfs_G037.grb
Segmentation fault
This results in a segfault when parsing the grid information.
Fix this by either supporting thinned lat/lon grids or by erroring out with a useful error message.

Check for thinned lat/lon grids and error out with a useful error message.


[Question] Playing RTMP streams

Hi there,
Can the player able to send RTMP stream to a server e.g. ANT media server? If yes - can you please point me to an example how to do that?
Thanks!

This flutter package is for playing only.
If you want stream to a rtmp server, you can use https://pub.dev/packages/flutter_rtmp_publisher


Improve support for Apollo Federation 2.0

Description
While looking at https://github.com/strawberry-graphql/strawberry/issues/2044 I found some issues with our support for apollo federation, this PR addresses that.
Changes:

[x] Fixed printing of directives on interfaces (and their fields), we weren't print them previously
[x] Added full support for the Apollo 2.0 spec
[ ] Added support for the link directive (to be defined how we do this)

Types of Changes

[ ] Core
[x] Bugfix
[ ] New feature
[ ] Enhancement/optimization
[ ] Documentation

/pre-release

Pre-release
:wave:
Releasing commit [911f520da827e43954d57e9b3bfad8ca605d5f5b] to PyPi as pre-release! :package:

/pre-release

/pre-release

/pre-release

/pre-release

/pre-release

/pre-release

/pre-release

/pre-release

/pre-release

Thanks for adding the RELEASE.md file!

Here's a preview of the changelog:

This release adds full support for Apollo Federation 2.0. To opt-in you need to
pass enable_federation_2=True to strawberry.federation.Schema, like in the
following example:
@strawberry.federation.type(keys=["id"])
class User:
    id: strawberry.ID

@strawberry.type
class Query:
    user: User

schema = strawberry.federation.Schema(query=Query, enable_federation_2=True)

This release also improves type checker support for the federation.

Here's the preview release card for twitter:

Here's the tweet text:
🆕 Release (next) is out! Thanks to @patrick91 for the PR 👏

Get it here 👉 https://github.com/strawberry-graphql/strawberry/releases/tag/(next)

/pre-release


Hotspot detail reward & witness

Add the reward and witness data for hotspot details

I've been using redux for all calls to appDataClient. We don't have to use redux, but it might be good to stay consistent.

I moved it to redux. Let me know how it looks.

I've been using redux for all calls to appDataClient. We don't have to use redux, but it might be good to stay consistent.

I moved it to redux. Let me know how it looks.

@matthewcarlreetz everything should be addressed now.

@matthewcarlreetz everything should be addressed now.


Thank You for the Fantastic Tool

This project is exactly what I've been looking for.
The work you've done is genuinely impressive, and I can tell a lot of thought and time has gone into it.
Thank you again for creating such a useful tool, I sincerely appreciate your efforts!

Glad you find it useful.


Update sql-data-warehouse-reference-collation-types.md

Modify collation public doc
Add limitation about changing the default collation

Thanks @dialmoth for taking the time to submit this PR! Good catch, good edits. There are a few other edits needed for your changes and this article as a whole, so I'll bring this commit into a PR from the internal repo.  Your commit will be merged and this article update is in flight. After the updated article is published, GitHub will list you as an article contributor.
Thanks again for this feedback, your suggestions help improve our documentation.
#please-close


#1 small QOL improvement

small text change for easier understanding

Thanks for the commit! Can you use the latest main commit for a new pull request? :)


LP-329 Refactored name page templates to reduce duplication of code

JIRA link
https://companieshouse.atlassian.net/browse/LP-329
Change description

Removed individual name pages
Moved implementation into the common name page template
Template selects correct text for output
Options included with or without Welsh depending on LP type

Work checklist

[ ] Tests added where applicable
[ ] UI changes look good on mobile
[ ] UI changes meet accessibility criteria

Merge instructions
We are committed to keeping commit history clean, consistent and linear.  A BREAKING CHANGE can be part of commits of any type,
types other than fix: and feat: are allowed, for example build:, chore:, ci:, docs:, style:, refactor:, perf:, test:, and others,
footers other than BREAKING CHANGE: <description> may be provided.

CI: No security warnings found


⚠ Bofrost.at has degraded performance

In 6af2999, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 1581 ms

Resolved: Bofrost.at performance has improved in 490fd6c.


Card style background

I'm not sure if this is an issue or a request for help.
I've got a vertical-stack containing a number of entities cards plus two custom:badge-cards with their lists of badges.
type: vertical-stack
cards:
  - type: entities
    entities:
      - entity:
    ...
 - type: custom:badge-card
     badges:
       - entity:

All the entities cards in have a typical card style background (black border, curved corners and lighter background).  The badge cards are displayed without a background as they would be if the badges where at the top of the dashboard.
Is there a way to give style the badge card so it has the typical card background as a container for the badges?
My thinking is there should be a "card style" option but there may be other ways.

Seems your only option is using card-mod:
type: vertical-stack
cards:
  - type: entities
    entities:
      - entity: sun.sun
  - type: custom:mod-card
    card:
      type: custom:badge-card
      badges:
        - entity: sun.sun
    card_mod:
      style: |
        ha-card {
          background: var(--ha-card-background,var(--card-background-color,#fff));
          box-shadow: var(--ha-card-box-shadow, none);
          border-radius: var(--ha-card-border-radius, 12px);
          border-width: var(--ha-card-border-width, 1px);
          border-style: solid;
          border-color: var(--ha-card-border-color,var(--divider-color,#e0e0e0));
        }

And also you will probably want to add top/bottom paddings.
Suggest to ask similar question in a card-mod thread: https://community.home-assistant.io/t/card-mod-add-css-styles-to-any-lovelace-card/120744

Thank you, that's really helpful. I was struggling to get card-mod to have any effect. I'm mindful of:

This is only necessary in very few instances, and likely to bring more problems than it solves.

I'm mindful of:

This is exactly the case where mod-card is needed - the badge-card does not have ha-card element.

Could be worse:

Could be worse:

Sorry, what do you mean by "could be worse"?


2 or 3 minute timed mode

2 or 3 minute timed mode (called ultra)

Ultra is not copyrighted by Tetris Holdings.


Fixing readme feedbacks

What this PR does / why we need it:
Which issue this PR fixes
(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)

fixes #

Special notes for your reviewer:
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

[x] DCO signed
[ ] Chart Version bumped
[x] Variables are documented in the README.md

@vishiy Chart version will need to be bumped too.

@davidkarlsen - Looks circle ci is failing saying 'no maintainers'. I clearly see maintainer(s) in chart.yaml. Do you know what else could be wrong ? Can you please help ? Thank you!
"incubator/azuremonitor-containers > Chart doesn't have maintainers"

@davidkarlsen - can i please get a approval ?

/assign @lachie83

/ok-to-test

/lgtm


Gemini

fix #28
currently
GEMINI_API_KEY=<HERE THE KEY> cargo test --package lsp-ai --bin lsp-ai -- transformer_
backends::gemini::test::gemini_completion_do_generate --exact --show-output

works, code needs improve though.

now
---- transformer_backends::gemini::test::gemini_completion_do_generate stdout ----
[src/transformer_backends/gemini.rs:203:9] response.generated_text = "\"```python\\ndef test_context():\\n    \\\"\\\"\\\"\\n    This function serves as a template for writing unit tests using the 'context' pattern.\\n\\n    The 'context' pattern helps organize test cases by grouping them based on the state they set up.\\n\\n    To use this template:\\n\\n    1. Replace the \\\"pass\\\" statement with your test code.\\n    2. Define the specific context you want to test within a \\\"with\\\" block.\\n    3. Use the `self.assertEqual()`, `self.assertTrue()`, etc. methods to assert the expected outcomes.\\n\\n    Example:\\n\\n    ```python\\n    def test_context(self):\\n        with self.subTest(\\\"Positive numbers\\\"):\\n            self.assertEqual(add(2, 3), 5)\\n\\n        with self.subTest(\\\"Negative numbers\\\"):\\n            self.assertEqual(add(-2, -3), -5)\\n    ```\\n    \\\"\\\"\\\"\\n    pass\\n```\\n\\n**Explanation:**\\n\\n* **`def test_context():`**: This defines a function named `test_context` which will contain your test cases.\\n* **Docstring**:  The docstring explains the purpose and usage of the function.\\n* **`with self.subTest(\\\"Positive numbers\\\"):`**: This block creates a subtest labeled \\\"Positive numbers\\\". It's useful for grouping related assertions and providing informative error messages.\\n* **`self.assertEqual(add(2, 3), 5)`**: This assertion checks if the result of calling `add(2, 3)` is equal to 5.\\n* **`with self.subTest(\\\"Negative numbers\\\"):`**: Another subtest block for testing negative numbers.\\n* **`self.assertEqual(add(-2, -3), -5)`**:  This assertion checks if the result of calling `add(-2, -3)` is equal to -5.\\n\\n**Key Points:**\\n\\n* **Context-Driven Testing:** The `with self.subTest(...)` pattern allows you to group tests based on specific contexts, making your tests more organized and readable.\\n* **Subtests:** Subtests provide informative error messages that specify the context in which the failure occurred.\\n* **Assertions:**  Use assertion methods (like `self.assertEqual()`, `self.assertTrue()`, etc.) to verify the expected outcomes of your tests.\\n\\n**Remember to replace the `pass` statement with your actual test code!** \\n\""

and
---- transformer_backends::gemini::test::gemini_chat_do_generate stdout ----
[src/transformer_backends/gemini.rs:235:9] &response = "\"Well, I mean, obviously I love winter!  It's the only time of year I get to exist!  But I hear spring is pretty nice, too, though I wouldn't know.  I tend to melt a little that time of year.  *shivers*  Just thinking about it makes me want to snuggle up next to my trusty snow-ball companion! \\n\""

TODO:
I am not sure how the whole system works, but these two tests works well now.
and currently I hard coded the model.

This is looking really good! The only major note is that I don't think you actually want to support FIM. If you look at the mistral FIM, you see we supply both a prompt and suffix. The API for Mistral FIM specifically performs FIM. I think you want to support generateText and generateContent endpoints for the Gemini API.
Instead of do_fim you will probably want do_generate. You can see the Ollama implementation for an example: https://github.com/SilasMarvin/lsp-ai/blob/cd46ecf61adc272491c25c4faf4b5f9d92c3d4a6/src/transformer_backends/ollama.rs#L63
I feel like the Ollama implementation is probably a better example to go off of than the Mistral FIM one. Let me know if this doesn't make sense and I am happy to clarify anything!

ok, find this problem: openai use this
#[derive(Debug, Clone, Deserialize, Serialize)]
#[serde(deny_unknown_fields)]
pub struct ChatMessage {
    pub role: String,
    pub content: String,
}

but gemini use
"contents": [
              {
                "role":"user",
                "parts":[{
                 "text": "Pretend you're a snowman and stay in character for each response."}]
                },
              {
                "role": "model",
                "parts":[{
                 "text": "Hello! It's so cold! Isn't that great?"}]
                },
              {
                "role": "user",
                "parts":[{
                 "text": "What's your favorite season of the year?"}]
                }
             ]

the chat functionality seems need to change the system, so support completion first.

ok, find this problem: openai use this
#[derive(Debug, Clone, Deserialize, Serialize)]
#[serde(deny_unknown_fields)]
pub struct ChatMessage {
    pub role: String,
    pub content: String,
}

but gemini use
"contents": [
              {
                "role":"user",
                "parts":[{
                 "text": "Pretend you're a snowman and stay in character for each response."}]
                },
              {
                "role": "model",
                "parts":[{
                 "text": "Hello! It's so cold! Isn't that great?"}]
                },
              {
                "role": "user",
                "parts":[{
                 "text": "What's your favorite season of the year?"}]
                }
             ]

the chat functionality seems need to change the system, so support completion first.

I would create a new struct GeminiChatMessage and implement From<ChatMessage>. It would look something like:
#[derive(Serialize)]
struct Part {
    text: String
}

#[derive(Serialize)]
struct GeminiChatMessage {
    role: String,
    parts: Vec<Part>
}

impl From<ChatMessage> for GeminiChatMessage {
    fn from(value: ChatMessage) -> Self {
        // Finish from code here
    }
}

now it works well.
[src/transformer_backends/gemini.rs:292:9] &response.generated_text = "\"Oh, definitely winter! I mean, where else would a snowman like me be happy? It's a time for snowballs and sledding, and best of all, making new friends. Like you! 😄 \\n\""
test transformer_backends::gemini::test::gemini_chat_do_generate ... ok
[src/transformer_backends/gemini.rs:259:9] response.generated_text = "\"```python\\ndef test_context():\\n    \\\"\\\"\\\"This function is a placeholder for testing the context.\\n\\n    You can add your own assertions and logic here to test specific aspects of the context.\\n    \\\"\\\"\\\"\\n    pass\\n\\ndef test_code():\\n    \\\"\\\"\\\"This function is a placeholder for testing your code.\\n\\n    You can add your own assertions and logic here to test the functionality of your code.\\n    \\\"\\\"\\\"\\n    # Example:\\n    assert 1 + 1 == 2, \\\"Basic arithmetic should work.\\\"\\n```\\n\\n**Explanation:**\\n\\n1. **`test_context()`:**\\n   - This function is designed to test the context within which your code will run.\\n   - You can use this to check:\\n     - **Environment variables:**  Are the necessary environment variables set correctly?\\n     - **Dependencies:** Are all the required libraries installed and accessible?\\n     - **Data:** Is the data (if any) loaded properly and in the expected format?\\n\\n2. **`test_code()`:**\\n   - This function is for testing the core logic of your code.\\n   - It should include:\\n     - **Assertions:** Use the `assert` keyword to verify that your code produces the expected output.\\n     - **Example:** The provided example `assert 1 + 1 == 2, \\\"Basic arithmetic should work.\\\"` demonstrates how to use an assertion.\\n\\n**Example Usage (within a test file):**\\n\\n```python\\nimport unittest\\n\\nclass MyTests(unittest.TestCase):\\n    def test_context(self):\\n        # Add your assertions about the context here\\n        # ...\\n\\n    def test_code(self):\\n        # Add your code tests here\\n        # ...\\n\\nif __name__ == '__main__':\\n    unittest.main()\\n```\\n\\n**To Run Tests:**\\n\\n1. **Save the code** in a file (e.g., `test_my_code.py`).\\n2. **Execute the tests:**\\n   - From your terminal, run: `python -m unittest test_my_code.py`\\n\\n**Remember:**\\n\\n- Replace the placeholder comments with your actual test logic.\\n- Tailor the tests to cover all the functionality of your code.\\n- Use descriptive test names that clearly indicate what is being tested. \\n\""
test transformer_backends::gemini::test::gemini_completion_do_generate ... ok

with
cargo test -- --nocapture

I actually made a pr into your branch: https://github.com/asukaminato0721/lsp-ai/pull/1
If you can merge that I should be able to merge this in.

merged

Hey sorry I tested it with my editor and had to add a few more updates to get the prompt to format correctly: https://github.com/asukaminato0721/lsp-ai/pull/2
I'm not able to get good completion responses from it. When I test it using the default chat prompts I have outlined in the Configuration section it loves to include quotes in its response. We can merge this once you merge my pr in, but before I update the wiki it would be nice to have some prompts we know work well.

cc @SilasMarvin mind take a look？


[Bug]: SweetAlert2 modal interaction issue with Radix Vue modal: Unable to interact with SweetAlert when triggered inside modal

Environment
Developement/Production OS: Windows 10 19043.1110
Node version: 16.0.0
Package manager<EMAIL_ADDRESS>Radix Vue version: 1.0.0
Vue version: 3.0.0
Nuxt version: 3.0.0
Nuxt mode: universal
Nuxt target: server
CSS framework<EMAIL_ADDRESS>Client OS: Windows 10 19043.1110
Browser: Chrome 90.0.4430.212

Link to minimal reproduction
https://codesandbox.io/p/live/0dcc2817-5888-4d10-8afa-2e70f37a0f7f
Steps to reproduce
Steps to Reproduce:
1).Open a Radix Vue modal.
2).Trigger a SweetAlert2 inside the modal.
3). Observe that while SweetAlert2 appears in front, it is not clickable, and any interactions (like the "OK" button) do not work, as they are caught by the modal.
Describe the bug
I'm experiencing an issue where SweetAlert2 cannot be interacted with when triggered from inside a Radix Vue modal. Although the SweetAlert visually appears in front of the modal, clicks and interactions are still captured by the underlying modal, making the SweetAlert non-functional.
Workaround Attempts:
I tried adjusting the z-index of SweetAlert2 to a higher value (z-[10000]), but it did not resolve the issue.
Used pointer-events: none on the modal to block clicks, but the modal still captures the events.
Attempted to close the modal programmatically before showing SweetAlert, but this is not ideal as it disrupts the workflow.
Checked focus handling and ensured allowOutsideClick is set to false on SweetAlert2.
The issue seems to stem from Radix Vue's modal locking the focus and interactions when the SweetAlert2 dialog appears. This makes SweetAlert unusable without manually closing the modal first, which is not an ideal user experience. I have also tried removing focus lock from Radix Vue's modal, but this hasn't resolved the issue either.
Any help or suggestions on how to ensure SweetAlert2 captures all interactions without closing the modal first would be greatly appreciated!
Expected behavior
SweetAlert2 should fully capture focus and interactions when triggered, preventing the underlying modal from interfering with any clicks or keyboard interactions.
Context & Screenshots (if applicable)
https://github.com/user-attachments/assets/25b54f36-703b-4127-97d1-25ddeb163c9a

@AtharFazle  can you please update the reproduction link? It's not working


GetUser must be called prior to AcquireTokentSilent

Hi,
I am using MSAL 0.1.2 in order to get a token from B2C using loginRedirect. That works fine.
On subsequent calls, when I try to get the token from cache using acquireTokenSilent I get this error: user_login_error:User login is required.
I looked into your code and noticed that whether the global _user variable must already be assigned (by calling getUser) or a user object should be passed as a parameter when calling the function in order for it to succeed.
According to the documentation:
@param {User} user - The user for which the scopes are requested. The default user is the logged in user.
My suggestion:
The logged in user should be figured out internally by the acquireTokenSilent function and calling getUser prior to calling that function should not be required. The current design is not intuitive and does not respect the single responsibility principle.
Thank you!

Same here since 0.1.2. It took me some time to figure out what was happening because I have referenced msal expecting semantic versioning (^0.1.1).
I'm frozing the version right now to ensure no unexpected breaking changes.
In my case, after user logs in successfully, acquireTokenSilent fails with the same error and redirects to login page on B2C. If you go back to your authenticated page, it doesn't prompts you to login because it already has the token stored.
I hope it can be fixed soon.
Thanks!

@davidmorissette The user property(this._user) gets set when we receive an idtoken response as a result to calling loginRedirect. Any call to acquireTokenSilent after you call login should have the logged in user property set already without a need to call getUser(). Can you please provide a code repro for this issue so I can look into this further?

@rohitnarula7176 Yes the user property (this._user) stays set as long as the application does not perform any subsequent redirects. In that case, the values (tokens, etc.) are still available from the storage but this._user is null again and calling getUser() is required in order to assign this._user.
I didn't try but I think every places in your code doing this:
const userObject = user ? user : this._user;
Should be replaced with this:
const userObject = user ? user : this.getUser();
Do you still need a code repro?
Thank you!

@joanjane You need to call getUser() right before you call acquireTokentSilent() if you want your code to work until the team here finds a better solution. This is how I fixed my code.

@davidmorissette @joanjane Thank you for pointing out this issue. Can you please use the dev branch and see if it resolves your issue.

In my case YES I confirm it resolves the issue. Thank you!

@davidmorissette @rohitnarula7176 Thanks for your response, it solved my issue too.


add decoration for  AnimatedProgressBar

HI Kouki,
I wander if you can wrap the AnimatedProgressBar in Container so we can edit the height  or  width or padding or margin
if this feature is not planned I will be happy to provide PR for it
why add decoration
because when I tried to add more radius to the notification this happened

+1，need this feature.

Hello @Yassin-Askar @alianrock I will add it this week and let you know once it's published

@Yassin-Askar a new version of the package has been published check it out, feel free to close this issue
https://pub.dev/packages/elegant_notification

nice, this will do the work.


Dynamically hide/unhide fields from json

sample.json
{
  "templateOptions": {
    "label": "Group 1"
  },
  "fieldGroup": [
    {
      "key": "fn",
      "type": "input",
      "templateOptions": {
        "label": "Firstname"
      }
    },
    {
      "key": "ln",
      "type": "input",
      "templateOptions": {
        "label": "Lastname"
      }
    },
    {
      "key": "age",
      "type": "input",
      "hideExpression": "displayField",
      "templateOptions": {
        "label": "Age"
      }
    }
  ]
}

HTML
<form [formGroup]="form">
  <formly-form [model]="model" [fields]="fields" [options]="options" [form]="form"></formly-form>
</form>

<button (click)="onClick1()">Show</button>
<button (click)="onClick2()">Hide</button>

TS
private displayField:bool = false;
form = new FormGroup({});
model: any = {};
options: FormlyFormOptions = {};
fields: FormlyFieldConfig[] = [];

onClick1(){
    this.displayField = true
  }

onClick2(){
    this.displayField = false
  }

constructor(private httpClient: HttpClient) {
  }

  ngOnInit(): void {
    this.httpClient.get('./sample.json').subscribe((res: any) => {
      this.fields = res
    })
  }

The value for displayField will change based on some operations on the form like click of a button etc and I would like to dynamically hide/show fields based on the value of displayField variable. Is there any way to achieve this?

Found a solution to this
Can make use of options to achieve this
options: FormlyFormOptions = {
    formState: {
      displayField: false,
    }
  };

and modify as shown below in json
{
    "key": "age",
    "type": "input",
    "expressions": { "hide": "!formState.displayField"},
    "templateOptions": {
      "label": "Age"
    }
  }

Now set the value for options on button click as below
onClick1(){
    this.options.formState.displayField = true
  }

onClick2(){
    this.options.formState.displayField = false
  }


Is Typescript ^5.0 compatible with Azure functions?

The configure your environment section seen here indicates that you need Typescript 4.0, but when creating the project, the package.json that's generated has typescript: "^4.0.0" which includes version 5 I believe. Whereas with the Node.js requirement it says:

Node.js 18.x or above.

Typescript doesn't have that "or above" clarification, so I'm just wondering if we can use Typescript 5 with Azure Functions.

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

ID: d7adfd3e-c3ad-1fd5-0fee-d3dfca69101c
Version Independent ID: 71300005-4371-c09e-f6b6-a6b21669f1c2
Content: Create a TypeScript function using Visual Studio Code - Azure Functions
Content Source: articles/azure-functions/create-first-function-vs-code-typescript.md
Service: azure-functions
GitHub Login: @ggailey777
Microsoft Alias: glenga

@IDrumsey
Thanks for your feedback! We will investigate and update as appropriate.

@IDrumsey this is a great question. I would assume that 4+ (which would include 5.x) would be correct here for the TypeScript module, but I'm not certain. (The typescript: "^4.0.0" designation does support all minor versions of 4.x up to but not including the 5.x major version.)
+ @MadhuraBharadwaj-MSFT and/or @ejizba who would know for certain about this.

We don't officially support TypeScript 5 yet. You can try and honestly I hope it "just works" but we haven't gone through the validation ourselves yet. I created the following issue to track in our own repo: https://github.com/Azure/azure-functions-nodejs-library/issues/269

Here's to hoping it works lol 🥂


Chromatic circle improvements

Start on C at the top (this is more common than A, and aligns with wikipedia)
Display chords on chromatic circle (maj, min, dim, etc.), with fretboard map (which comes automatically I guess).

Thanks for this. I'm not quite sure what you mean by "Display chords on chromatic circle"? Chords are displayed there. Also "with fretboard map"? The chords displayed on the chromatic circle are also displayed on the fretboard.
I'm guessing this could be bug if you're not seeing the chords displayed. What device/OS/browser are you using?

Actually, I do see the chords, sorry to have mislead you. But it I need to watch the introductory video one more time :)
Also the positioning of the circles applies to both, not just to chromatic, just noticed.

OK, no  worries, thanks for the update. I think rather than just defaulting with the C at the top, which would be confusing for people who were already used to the existing default, how about having an option?

Yes, I agree.

C is now at top centre by default (can switch back to A in settings)


Only one executing per subprocess being executed

Hi there,
I'm trying to use this package but for some weird reason each subprocess is only executing once and hanging the rest of the code.
I'm using python 3.9, here is a snippet of the code:
# create page data for parallel execution
pages_data = []
for current_page in page_indices:
    pages_data.append((
        reader,
        vertical,
        title,
        teacher,
        current_page,
        pages_total
    ))

# Creates final page and append to final PDF
with Pool() as executor:
    rendered_pages = executor.starmap(generators.CreatePageWithWatermark, pages_data)

    for page in rendered_pages:
        result_pdf_final.add_page(page)

Each generators.CreatePageWithWatermark execution prints the current page and only 1 page is being processed by each subprocess. If i have less pages than the total of cores the code run just fine.
Just for fun I've set 1000 subprocess and my pc freezed but all pages were rendered.
The same behavior happens on the aws lambda.
Thks! that's a great little package.
edit: so now (out of the blue) its working on my pc but not on awslambda, only 6 executions are happening. Very weird.

I managed to get this working.
For some reason when using less than 12 subprocess it simply get stuck until the lambda execution times out.
I forced with 24 and it worked but it consumed way too much ram. Not sure if this happens because of my workload or if it's how the child processes are beeing distributed.
Something that i noticed is that running locally my CPU usage graph looks like a square function graph.
Not sure why this behaviour I will take a look this weekend.

What does generators.CreatePageWithWatermark do?
Please provide a minimal working example so that I can reproduce the behavior.
The queuing is currently a bit dumb. It assigns all tasks up front, assuming that each task takes approximately the same amount of time. Does that assumption hold for your use case?

I'm working with a lot of buffers to avoid saving the PDFs pages to disk (but this may be the solution for this scenario). The CreatePageWithWatermark() function mostly read a page from the buffer provided, generate a page and merge both in a new buffer.
It took a while, but I managed to recreate the issue with the code below:
from lambda_multiprocessing import Pool as LambdaPool
import timeit
import time
import requests

def CreatePageWithWatermark(title, author, page, buffer):
    time.sleep(5)
    print(len(buffer))
    return buffer

def PDFMergeWorker(event, context):
    start_time = timeit.default_timer()

    url='https://pdfs.semanticscholar.org/c029/baf196f33050ceea9ecbf90f054fd5654277.pdf'
    r = requests.get(url, stream=True)

    pages_total = 100

    pages_data = [(
            'test',
            'test',
            current_page,
            r.content,
        ) for current_page in range(0,100)]

    with LambdaPool() as executor:
        rendered_pages = executor.starmap(CreatePageWithWatermark, pages_data)

    # Speedometer
    stop_time = timeit.default_timer()
    delta_time = stop_time - start_time
    print('Time: ', delta_time)
    print('Time per Page: ',  delta_time / pages_total)

    return 'Done'

The behavior is the same. on my machine there is only 16 print() calls  (i have 16 threads) and on aws lambda only 6 print() call are made. (i setted 10G for this lambda)
If you remove the sleep() call the code runs fine.
If you keep the sleep() and remove the pdf stream argument, the code also runs fine.
Only with both the code crashes.

Hmm, interesting.
I have seen an issue previously where print statements within a for loop containing a sleep get buffered. So if you're printing thousands of lines, the stdout buffer will fill and get flushed. But if it's low volume stuff stays in the buffer longer than you'd expect.
I would expect that the process termination would result in the stdout buffer being flushed. But I don't know what special stuff Lambda does with stdout.
If you swap print for sys.stdout.write, do you get the same behaviour?
Also, in your MWE you're doing only one requests.get() call, and then attempting to operate on the .content response 100 times concurrently. Are you sure that whatever .requests returns is itself concurrency safe? I don't know what len() does to a buffer object. Does it consume it?
(I will play around to debug this weekend.)

What is this script supposed to do? That URL ends with .pdf, but it's not a PDF.
This is what it redirects to:

Are you trying to download a PDF, and process each page in the PDF in parallel?
Are you trying to stream the download of the PDF, and process each page while downloading the next page?

Have you looked at this again?
I'm not able to reproduce the bug because the example is not a minimal working example.
Most importantly:

You described the failure mode as "hanging" and "crashes". Those are two different things. (Opposites, really). Hanging is when the script appears to be doing nothing (it has not exited, but it is not printing anything either). Whereas I think of "crash" as an uncaught exception being thrown (in which case you should paste the exception in), or a lower level fault (like a seg fault), in which case you should also paste in the text output. So I don't know what outcome I'm trying to reproduce. In particular, for "hanging", how long did you wait, relative to how long it takes multiprocessing.Pool to run the script? It could be just that stdout is buffered until the end of the script, but the code is otherwise running as expected, so you just need to wait longer. Try calling sys.stdout.flush() immediately after the print, before the sleep, and after .map(). (You'll need import sys.)
pages_data is a list of tuples of ints, strings and a byte array. It contains nothing exotic, or specific to PDFs or the requests library, really. Can you just hard-code pages_data and reproduce the issue?
Can you confirm that you ran this code on your laptop, using the standard multiprocessing.Pool() function instead of this library, and you got a different result?

But also:

you mention "remove the pdf stream argument", but it's not clear which argument that is. Do you mean stream=True for the requests.get() call, which is not related to the PDF format or any PDF library?
your functions and variables are named after PDFs, but you're not doing anything PDF-specific. If the issue is related to streaming content with the requests library, can you download non-PDF content? (Yes I suspect whatever issue you're seeing is related to the concurrency safety of the return value of requests.get() with stream=True)
For a machine with N CPUs, this example will take 100*5/N seconds. If you drop the number of 'pages' to 10, or 2, do you still get the same issue? If you drop the sleep time to 1s, do you still get the same issue? If you can do both then we can reproduce the issue in 2 seconds instead of 80, which makes it easier to resolve.
You define pages_total, but then on the next line you use 100 as a literal. So why define pages_total? If you don't need it to reproduce the issue, then delete it, check you still get the issue, and post the script without it.
Why do you specify stream=True? The very first thing you do after calling .get(stream=True) is to access .content, which will call .read() on the stream. So why bother calling stream=True? Since you're accessing .content repeatedly you're reading from the stream for the first entry of pages_data, and then accessing a cache of it on the next.
Why did you name your argument buffer? It's a bytes array, not a file-like object. (Note that in general I would expect that buffers can't be safely passed between threads unless the relevant documentation explicitly says it can.)
Why does CreatePageWithWatermark return something? Why is the result from .map() saved to a variable? Yes for your real usage that is probably required. But for providing a minimal reproducable example you should delete everything that isn't required to reproduce the bug.
Since you are using stream=True, have you tried using with requests.get(stream=True) as r (see the docs)
You imported the timeit module, but you just use it to return the current time at two points. Why not just use time.time()?  What times are you expecting? What times are you observing?
That specific URL returns a body of length 0, and an HTTP 301 redirect status. The requests library follows the redirect (I think). Can you reproduce this issue with a URL that isn't redirected? In fact that URL redirects in my browser to this URL, which actually returns an HTTP 202 status. That's very strange. Can you reproduce this error with a normal URL? (e.g. a URL to a JPEG of a cat?)

Here's a MWE (except it doesn't reproduce the issue). (It could be reduced even further, depending on what the issue is.)
import multiprocessing
import time
import sys

from lambda_multiprocessing import Pool as LambdaPool
import requests

def CreatePageWithWatermark(body: bytes, url):
    time.sleep(1)
    ret = (len(body), url)
    print(f"Returning ({type(ret[0])}, {type(ret[1])})")
    return ret

def PDFMergeWorker(event={}, context=None):

    url='https://example.com/'
    r = requests.get(url)

    pages_data = [(
            r.content,
            url
        ) for _ in range(0,2)]

    with LambdaPool() as executor:
        rendered_pages = executor.starmap(CreatePageWithWatermark, pages_data)

    expected_length = len(requests.get(url).content)
    expected = [(expected_length, url) for _ in pages_data]
    assert(rendered_pages == expected)

if __name__ == '__main__':
    PDFMergeWorker()


nethereumUnityInstance is not defined

Uncaught (in promise) ReferenceError: nethereumUnityInstance is not defined
at _EnableEthereum

Thank you very much

Check #1 and #2

You are right - it helped. But it would be easier if you added a template to the project, then it would work out of the box


Update RBMA Radio URL

It's been rebranded as "Red Bull Radio".
Please follow the guide below

You will be asked some questions, please read them carefully and answer honestly
Put an x into all the boxes [ ] relevant to your pull request (like that [x])
Use Preview tab to see how your pull request will actually look like

Before submitting a pull request make sure you have:

[X] At least skimmed through adding new extractor tutorial and youtube-dl coding conventions sections
[X] Searched the bugtracker for similar pull requests

In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:

[X] I am the original author of this code and I am willing to release it under Unlicense
[ ] I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

[X] Bug fix
[ ] Improvement
[ ] New extractor
[ ] New feature

Description of your pull request and other information
Explanation of your pull request in arbitrary form goes here. Please make sure the description explains the purpose and effect of your pull request and is worded well enough to be understood. Provide as much context and examples as possible.
Fix downloads from Red Bull Radio (was Red Bull Music Academy).
They weren't being recognised by the extractor regex as the URL has changed.
Current master (90e3f18fc1cff2c12361cbbd85303774bf7d59f7) falls back to generic information
extractor and fails with "Unsupported URL".
With this change, downloading works again.

First time looking at source here, not sure how the info_dict for test files are generated.
The test download works though I get a different md5sum for the downloaded file (1146f77f34ee2995101d86d26d61eb1b not 6bc6f9bcb18994b4c983bc3bf4384d95).


WSA is not starting after applying

I don't know why but I could get find logcat so you can find the reason. using WSA 1.7.32815.0 and opengapps pico.

28102021142105.log

Where can I find these logs?

@xVemu
%LocalAppData%\Packages\MicrosoftCorporationII.WindowsSubsystemForAndroid...\LocalState\Logs


validateInputOnBlur option

issues
https://github.com/unitedhubs/material-ui-form/issues/19

Pull Request Test Coverage Report for Build 107

7 of 7 (100.0%) changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.4%) to 68.381%

Totals

Change from base Build 105:
0.4%

Covered Lines:
212

Relevant Lines:
295

💛  - Coveralls


Fix: Make sure Minestom services stop like Bukkit services

Motivation

Minestom is a very lightweight framework for implementing specialized Minecraft servers.
Especially when the full implementation or behavior of vanilla Minecraft is not needed, Minestom offers a way to run services with very little resources.
One issue that arised in conjunction with CloudNet is that services implemented using Minestom would not properly stop. Minestom would shut down and the service would get unregistered from CloudNet but the processes would be kept running.
Modification

This pull request mimics the behavior of vanilla implementations of the Minecraft Server which all call System.exit(0); when their process is done. This change makes sure that the JVM shuts down properly, even if other threads might block an ordinary shutdown from happening (ie. Netty and other networking related tasks).
Result

Services using the Minestom framework now properly shut down and allow CloudNet to advance to the next lifecycle steps.
Other context

Fixes #1304

Can we maybe implement this as discussed here (https://discord.com/channels/713041279277203457/777861579659411466/1182967379488161872)

Can we maybe implement this as discussed here (https://discord.com/channels/713041279277203457/777861579659411466/1182967379488161872)

I'm going to update my implementation to match what we discussed back then.

@0utplay I have updated the PR but can't initiate the build required.
Feel free to also add a review to the code, the changes are pretty minimal

Thats because there are conflicts in the Wrapper class. I can resolve them later.


Unable to connect to ElasticsearchContainer from inside Docker

My local environment:

MacOS 10.14.6
Docker Desktop <IP_ADDRESS>
Docker Engine 19.03.2
Compose Engine 1.24.1
Test containers 1.12.1

I'm trying to run a testcontainer with ElasticSearch inside a docker container for running integration tests on my project, but can't seem to get my test to connect to this container after following the steps from here. Note that outside of a docker container in my local environment, everything has been working fine.
I'm running my tests with docker run -it --rm -v $PWD:$PWD -w $PWD -v /var/run/docker.sock:/var/run/docker.sock --env testbot:68F75D8FD4C7003772C7E52B87B774F5 /bin/bash /testproject/build/wrapper.sh where testbot:68F75D8FD4C7003772C7E52B87B774F5 is an image I've built. wrapper.sh cleans, compiles my project and runs sbt test on the project.
The error I'm getting:
[warn] o.t.u.RegistryAuthLocator - Failure when attempting to lookup auth config (dockerImageName: quay.io/testcontainers/ryuk:0.2.3, configFile: /root/.docker/config.json. Falling back to docker-java default behaviour. Exception message: /root/.docker/config.json (No such file or directory)
        ?? Checking the system...
        ? Docker version should be at least 1.6.0
        ? Docker environment should have more than 2GB free disk space
[warn] o.t.u.RegistryAuthLocator - Failure when attempting to lookup auth config (dockerImageName: docker.elastic.co/elasticsearch/elasticsearch:7.1.1, configFile: /root/.docker/config.json. Falling back to docker-java default behaviour. Exception message: /root/.docker/config.json (No such file or directory)
[error] d.e.c.1.1] - Could not start container
org.testcontainers.containers.ContainerLaunchException: Timed out waiting for URL to be accessible (http://<IP_ADDRESS>:32911/ should return HTTP [200])
    at org.testcontainers.containers.wait.strategy.HttpWaitStrategy.waitUntilReady(HttpWaitStrategy.java:197)
    at org.testcontainers.containers.wait.strategy.AbstractWaitStrategy.waitUntilReady(AbstractWaitStrategy.java:35)
    at org.testcontainers.containers.GenericContainer.waitUntilContainerStarted(GenericContainer.java:675)
    at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:332)
    at org.testcontainers.containers.GenericContainer.lambda$doStart$0(GenericContainer.java:285)
    at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:81)
    at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:283)
    at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:272)
    at controllers.HomeControllerTest.setup(HomeControllerTest.java:56)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

The code running the test is inside a Play Framework app, newly created with sbt new playframework/play-java-seed.g8 as documented here.
package controllers;

import org.junit.BeforeClass;
import org.junit.Test;
import org.testcontainers.containers.GenericContainer;
import org.testcontainers.containers.wait.strategy.Wait;
import org.testcontainers.elasticsearch.ElasticsearchContainer;
import org.testcontainers.junit.jupiter.Testcontainers;
import play.Application;
import play.Logger;
import play.inject.guice.GuiceApplicationBuilder;
import play.mvc.Http;
import play.mvc.Result;
import play.test.WithApplication;

import static org.junit.Assert.assertEquals;
import static play.mvc.Http.Status.OK;
import static play.test.Helpers.GET;
import static play.test.Helpers.route;

@Testcontainers
public class HomeControllerTest extends WithApplication {

    @BeforeClass
    public static void setup() {
        GenericContainer elasticsearchContainer =
                new ElasticsearchContainer("docker.elastic.co/elasticsearch/elasticsearch:7.1.1")
                        .waitingFor(Wait.forHttp("/")
                                .forStatusCode(200));
        elasticsearchContainer.start();

    }

    @Override
    protected Application provideApplication() {
        return new GuiceApplicationBuilder().build();
    }

    @Test
    public void testIndex() {
        Logger.debug("Test start");
        Http.RequestBuilder request = new Http.RequestBuilder()
                .method(GET)
                .uri("/");

        Result result = route(app, request);
        assertEquals(OK, result.status());
        Logger.debug("Test finish");
    }

}

Full output logs are here
As far as I can tell, the container is starting correctly, just can't connect properly to it.
Things I've tried to resolve the issue:

Tested the same setup, but instead using a Postgres testcontainer. This worked fine, connection was successful, tests passed.
Using a GenericContainer and defining exposed ports manually, same error as above.
Running docker exec -it <container id> /bin/bash, then curling the elastic search container that testcontainers made. It was running normally, so no issues connecting to the container from inside my testbot container.

Any ideas?

Tested the same setup, but instead using a Postgres testcontainer. This worked fine, connection was successful, tests passed.

Are you sure that Elasticsearch does not crash at startup? It is memory greedy and, if other containers work, may be the case

Hi @davismariotti : did you get a solution for the problem?
I have a similar requirement to run the test maven tests within the docker container, that uses elastic-search-test-container with the following error
ping failed with configuration Environment variables, system properties and defaults. Resolved dockerHost=unix:///var/run/docker.sock due to org.rnorth.ducttape.TimeoutException: Timeout waiting for result with exception

org.rnorth.ducttape.TimeoutException: Timeout waiting for result with exception
	at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:54) ~[duct-tape-1.0.8.jar:na]
	at org.testcontainers.dockerclient.DockerClientProviderStrategy.ping(DockerClientProviderStrategy.java:183) [testcontainers-1.13.0.jar:na]

It works fine when running from outside the docker, though(same as your experience) !!

@pkrajanand that looks like a quite different problem (the stack trace is different)
By the looks of it, your Docker daemon inside your container is not responding. I’d suggest checking that - try replacing your Java build with a docker ps invocation, for example.

Hi @davismariotti, I have the same issue, if you have resolved it i'm interested 😁
Running from a docker, I have a timeout error when trying to reach the elastic container :
16:54:27.346 [main] INFO  org.testcontainers.DockerClientFactory.client() @114 - Docker host IP address is <IP_ADDRESS>
16:54:27.379 [main] INFO  org.testcontainers.DockerClientFactory.client() @122 - Connected to docker:
  Server Version: 19.03.5
  API Version: 1.40
  Operating System: Docker Desktop
  Total Memory: 10984 MB
16:54:27.414 [main] WARN  org.testcontainers.utility.RegistryAuthLocator.lookupAuthConfig() @135 - Failure when attempting to lookup auth config (dockerImageName: quay.io/testcontainers/ryuk:0.2.3, configFile: /root/.docker/config.json. Falling back to docker-java default behaviour. Exception message: /root/.docker/config.json (No such file or directory)
16:54:28.523 [main] INFO  org.testcontainers.DockerClientFactory.client() @132 - Ryuk started - will monitor and terminate Testcontainers containers on JVM exit
        ℹ Checking the system...
        ✔ Docker version should be at least 1.6.0
        ✔ Docker environment should have more than 2GB free disk space
16:54:28.723 [main] INFO  🐳 [container-remote.artifactory.aqme.ca/elasticsearch/elasticsearch-oss:6.7.2].<init>() @49 - Starting an elasticsearch container using [container-remote.artifactory.aqme.ca/elasticsearch/elasticsearch-oss:6.7.2]
16:54:28.731 [main] INFO  🐳 [container-remote.artifactory.aqme.ca/elasticsearch/elasticsearch-oss:6.7.2].tryStart() @334 - Creating container for image: container-remote.artifactory.aqme.ca/elasticsearch/elasticsearch-oss:6.7.2
16:54:28.731 [main] WARN  org.testcontainers.utility.RegistryAuthLocator.lookupAuthConfig() @135 - Failure when attempting to lookup auth config (dockerImageName: container-remote.artifactory.aqme.ca/elasticsearch/elasticsearch-oss:6.7.2, configFile: /root/.docker/config.json. Falling back to docker-java default behaviour. Exception message: /root/.docker/config.json (No such file or directory)
16:54:28.890 [main] INFO  🐳 [container-remote.artifactory.aqme.ca/elasticsearch/elasticsearch-oss:6.7.2].tryStart() @378 - Starting container with ID: de971392a1a4a5905b385bf38f35319504701582c39caf74483d348f57081df5
16:54:29.430 [main] INFO  🐳 [container-remote.artifactory.aqme.ca/elasticsearch/elasticsearch-oss:6.7.2].tryStart() @382 - Container container-remote.artifactory.aqme.ca/elasticsearch/elasticsearch-oss:6.7.2 is starting: de971392a1a4a5905b385bf38f35319504701582c39caf74483d348f57081df5
16:54:29.447 [main] INFO  org.testcontainers.containers.wait.strategy.HttpWaitStrategy.waitUntilReady() @138 - /kind_dubinsky: Waiting for 120 seconds for URL: http://<IP_ADDRESS>:33311/
16:56:29.314 [main] ERROR 🐳 [container-remote.artifactory.aqme.ca/elasticsearch/elasticsearch-oss:6.7.2].tryStart() @405 - Could not start container
org.testcontainers.containers.ContainerLaunchException: Timed out waiting for URL to be accessible (http://<IP_ADDRESS>:33311/ should return HTTP 200)
        at org.testcontainers.containers.wait.strategy.HttpWaitStrategy.waitUntilReady(HttpWaitStrategy.java:197) ~[testcontainers-1.12.3.jar:?]

But when I run a docker ps in the meantime, I can see that the container is running
docker ps
CONTAINER ID        IMAGE                                                                              COMMAND                  CREATED              STATUS              PORTS                                              NAMES
de971392a1a4        container-remote.artifactory.aqme.ca/elasticsearch/elasticsearch-oss:6.7.2   "/usr/local/bin/dock…"   46 seconds ago       Up 45 seconds       <IP_ADDRESS>:33311->9200/tcp, <IP_ADDRESS>:33310->9300/tcp   kind_dubinsky
eb20e275b66d        quay.io/testcontainers/ryuk:0.2.3                                                  "/app"                   47 seconds ago       Up 46 seconds       <IP_ADDRESS>:33309->8080/tcp                            testcontainers-ryuk-50f54862-832b-4fd0-a65d-b7d702883a64
131ba768677c        d90d3cb6a6f9                                                                       "/usr/local/bin/mvn-…"   About a minute ago   Up 59 seconds                                                          agitated_bell

And I can curl the container without problem
docker run -v $PWD:$PWD -w $PWD -v /var/run/docker.sock:/var/run/docker.sock container.artifactory.aqme.ca/ms/base/maven-builder-362/branch_master:latest curl http://<IP_ADDRESS>:33311/
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   493  100   493    0     0  35376      0 --:--:-- --:--:-- --:--:-- 37923
{
  "name" : "BjZatWV",
  "cluster_name" : "docker-cluster",
  "cluster_uuid" : "8rUvSgfmTsaX4ZcHyZJ8YQ",
  "version" : {
    "number" : "6.7.2",
    "build_flavor" : "oss",
    "build_type" : "docker",
    "build_hash" : "56c6e48",
    "build_date" : "2019-04-29T09:05:50.290371Z",
    "build_snapshot" : false,
    "lucene_version" : "7.7.0",
    "minimum_wire_compatibility_version" : "5.6.0",
    "minimum_index_compatibility_version" : "5.0.0"
  },
  "tagline" : "You Know, for Search"
}

I don't understand why the waitStrategy cannot reach the container, as it seems to have the right address :/

I also have the same problem. Any solution?


Convert urls to paths in urls.py

Implements #95

I cherry-picked the commits after resolving the conflicts.
Thanks :)


CUDA: Deprecate eager compilation of device functions

In future versions of Numba, the device kwarg to the @cuda.jit decorator will be obviated, and whether a device function or global kernel is compiled will be inferred from the context. With respect to kernel / device functions and lazy / eager compilation, four cases are presently handled:

device=True, eager compilation with a signature provided
device=False, eager compilation with a signature provided
device=True, lazy compilation with no signature
device=False, lazy compilation with no signature

The latter two cases can be differentiated without the device kwarg, because it can be inferred from the calling context - if the call is from the host, then a global kernel should be compiled, and if the call is from a kernel or another device function, then a device function should be compiled.
The first two cases cannot be differentiated in the absence of the device kwarg - without it, it will not be clear from a signature alone whether a device function or global kernel should be compiled. In order to resolve, this, support for eager compilation of device functions will be removed. Eager compilation with the @cuda.jit decorator will in future always imply the immediate
compilation of a global kernel.
This PR is made for Numba 0.54, in order to prepare for the changes in #7107 for 0.55.

Buildfarm ID: numba_smoketest_cuda_yaml_72.

Buildfarm ID: numba_smoketest_cuda_yaml_73.

Passed.


Validation: ignore "cannot read file" when response_schema.json is empty

Also hide valid messages and options.data can't be empty messages


🎆Updates maintenance/license year to 2024

Proposed change

Happy New Year 🍾
Additional information

This PR fixes or closes issue: fixes #

Checklist

[ ] I have updated the documentation if needed.
[ ] I have updated the tests if needed.

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

Comparison is base (c6f96c2) 100.00% compared to head (797097d) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #409   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files            4         4
  Lines           90        90
  Branches        12        12
=========================================
  Hits            90        90

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


Add support for fileupload

Is your feature request related to a problem? Please describe.
In our project we have a need to create a new entity using an API and as part of the creation process allow the user to optionall attach a file to the create request. We would prefer is this can be treated as on atomic API operation from the client side.
Describe the solution you'd like
We have prototyped a little by manually modifying the classes generated in the Demo.Api.Full project. What we would expect is if we define a swagger spec with multipart/form-data as the contenttype in requestBody.
"/api/v1/items": {
      "post": {
        "tags": [
          "Items"
        ],
        "summary": "Description: Create a new item.\r\nOperation: CreateItem.\r\nArea: Items.",
        "parameters": [
          {
            "name": "api-version",
            "in": "query",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.0"
              ],
              "type": "string",
              "default": "1.0"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "required": [
                  "Request.Item.Name",
                  "Request.MyItems"
                ],
                "type": "object",
                "properties": {
                  "Request.Item.Name": {
                    "type": "string"
                  },
                  "Request.File": {
                    "type": "string",
                    "format": "binary",
                    "nullable": true
                  },
                  "Request.MyItems": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/Item"
                    }
                  }
                }
              },
              "encoding": {
                "Request.Item.Name": {
                  "style": "form"
                },
                "Request.File": {
                  "style": "form"
                },
                "Request.MyItems": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json; v=1.0": {
                "schema": {
                  "type": "string"
                }
              },
              "text/json; v=1.0": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json; v=1.0": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              },
              "text/json; v=1.0": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "default": {
            "description": "Problem response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    }

The we would get classes that looks like
public class CreateItemParameters
    {
        [FromForm]
        [Required]
        public CreateItemRequest Request { get; set; }

        /// <summary>
        /// Converts to string.
        /// </summary>
        public override string ToString()
        {
            return $"{nameof(Request)}: ({Request})";
        }
    }

public class CreateItemRequest
    {
        /// <summary>
        /// Item.
        /// </summary>
        [Required]
        public Item Item { get; set; }

        public IFormFile File { get; set; }

        [Required]
        public List<Item> MyItems { get; set; }

        /// <summary>
        /// Converts to string.
        /// </summary>
        public override string ToString()
        {
            return $"{nameof(Item)}: ({Item}), {nameof(MyItems)}.Count: {MyItems?.Count ?? 0}";
        }
    }

Describe alternatives you've considered
If there is a way to do this with without multipart that would also be acceptable, but from what I gather from https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#special-considerations-for-multipart-content this is the only way to achieve the ability to upload files and data in the same request, in a standardized way that openapi spec supports.

@sjkp have you testet the new fileupload feature, and if it works, then we can close this issue ?

It works great 👍


update?

Hello,
did You plan update script? currently dont work with chatgpt/openai api. Use macOS on private computer and have www.elephas.app but on working machine use windows, looking for  alternative but only see script for autohotkey and all dont work with currently chatgpt/openai api.
Will be greatful for information 😃

I just tested the app and everything works correctly. I don't know what issues you are experiencing, maybe your API key is not working correctly?


feat: unit test

https://github.com/OtterClam/otto-subgraph/pull/26/commits/792579539442e5f31c3428902f6a4eab27c859b7


register AuthorizationHandler with EF and use it in AddPolicy

Can you provide any example of registering the AuthorizationHandler and using it in AddPolicy() method?
You also mention, that "Handlers that use Entity Framework shouldn't be registered as singletons.". I have the exact case, how to work with it?
Here is my handler, where I want to inject HttpContextAccessor:
public class CustomRequirement : AuthorizationHandler<CustomRequirement>, IAuthorizationRequirement
    {
        private readonly IHttpContextAccessor httpContextAccessor;
        public CustomRequirement(IHttpContextAccessor httpContextAccessor)
        {
            this.httpContextAccessor = httpContextAccessor;
        }
        protected override Task HandleRequirementAsync(AuthorizationHandlerContext context, CustomRequirement requirement)
        {
            //my code using Entity Framework here
        }
    }

Here is my ConfigureServices. So how to add there Authorization with Policy, using my AuthorizationHandler?
public void ConfigureServices(IServiceCollection services)
        {
            services.AddHttpContextAccessor();
            services.AddAuthorization(options =>
            {
                options.AddPolicy("Custom",
                    policy => policy.Requirements.Add([ How to add here the instance of my handler??? ]));
            });
            services.AddControllers();
        }

Hello @alexey-formalmethods ... You'll get a faster response (a little bit faster), if you close this and re-open it using the This page feedback button+form at the bottom of the topic. It will open an issue with metadata that automatically pings the author.

Can you create an issue from the doc page? That will connect the doc to the issue. Go to the bottom of the page and select This page .


Translated two more WMStats views to Erlang

Making this PR on behalf of @BrunoCoimbra , thanks vagabundo!
Bruno has performed a validation/diff of the output between these new views and the old in javascript and everything is Ok. However, @ticoann would you mind to do another x-check please? :-D
If everything is Ok, then we could push it to testbed this week.
@ticoann besides the frontend map rules, is there anything else we need to update?

test this please


serkan-ozal's final submission

start worker threads in advance
increase region count

NOTE: This challenge closes for submissions on Jan 31 23:59:59 UTC. No new pull requests for adding submissions will be accepted after that time.
Any pending pull requests will be reviewed over the next few days, as described here.
The final leader board will be published by Feb 5.
Check List:

[x] You have run ./mvnw verify and the project builds successfully
[x] Tests pass (./test.sh <username> shows no differences between expected and actual outputs)
[x] All formatting changes by the build are committed
[x] Your launch script is named calculate_average_<username>.sh (make sure to match casing of your GH user name) and is executable
[x] Output matches that of calculate_average_baseline.sh
[ ] For new entries, or after substantial changes: When implementing custom hash structures, please point to where you deal with hash collisions (line number)

Execution time: 2.6s/2.7s (It was 2.7s in the 7th submission in my testing env)
Execution time of reference implementation: 5m 54.1s

Let's see how much it will cut on the eval machine, finger crossed 🤞

It comes in slower than what's currently on main:
Benchmark 1: timeout -v 300 ./calculate_average_serkan-ozal.sh 2>&1
  Time (mean ± σ):      1.972 s ±  0.042 s    [User: 0.003 s, System: 0.005 s]
  Range (min … max):    1.919 s …  2.045 s    10 runs

Summary
  serkan-ozal: trimmed mean 1.9699492302850001, raw times 2.02893148966,1.93684216266,1.9580390516600001,1.9425117786600001,2.00418494666,1.95651161966,1.98900753166,1.91903356566,2.04456289566,1.9435652616599999

Leaderboard
grep: ./src/main/java*/dev/morling/onebrc/CalculateAverage_serkan-ozal.java: No such file or directory

| # | Result (m:s.ms) | Implementation     | JDK | Submitter     | Notes     |
|---|-----------------|--------------------|-----|---------------|-----------|
|   | 00:01.969 | [link](https://github.com/gunnarmorling/1brc/blob/main/src/main/java/dev/morling/onebrc/CalculateAverage_serkan-ozal.java)| 21.0.1-open | [Serkan ÖZAL](https://github.com/serkan-ozal) |  |

In that light, and as we're after the cut-off time, I am going to close this one without merging. Thanks a lot for participating, @serkan-ozal! Your implementation is one of the top ones and it is the fastest JVM-based one. Congrats!

Hey @serkan-ozal!
Congrats again on being in the Top 20 of the One Billion Row Challenge!
To celebrate this amazing achievement, I would like to send you a 1BRC t-shirt and coffee mug. To claim your prize, fill out this form by Feb 18. After submitting the form, please provide a comment with the random value you've specified in the form, so that I know it is you who submitted it.
All data entered will solely be used in relation to processing this shipment. Shipments can be sent to any country listed here or here (I'll use whichever one is cheaper for me to ship to your location). A big thank you to Decodable for sponsoring these prizes!
Thanks a lot for participating in 1BRC,
--Gunnar

Hey @gunnarmorling,
Thanks for organizing such a great challenge. Looking forward to next one :)
Here is my random value: 23369 15521


Error when using on mini test file

Getting this error when running this on a test file, the test runs in the output console when attaching and successfully completes but then this error displayed below...
neotest-minitest: ...are/nvim/site/pack/packer/start/neotest/lua/nio/init.lua:105: The coroutine failed with this message:
...ker/start/neotest-minitest/lua/neotest-minitest/init.lua:142: table index is nil
stack traceback:
        ...ker/start/neotest-minitest/lua/neotest-minitest/init.lua: in function '_parse_test_output'
        ...ker/start/neotest-minitest/lua/neotest-minitest/init.lua:177: in function 'results'
        .../pack/packer/start/neotest/lua/neotest/client/runner.lua:131: in function '_run_spec'
        .../pack/packer/start/neotest/lua/neotest/client/runner.lua:89: in function <.../pack/packer/start/neotest/lua/neotest/client/runner.lua:88>

It looks like the plugin isn't parsing the test output correctly. Can you share the output/results of the test run?

I recognize this error and just started looking for a fix. The mailer tests were crashing. And so were channel tests. And connection tests.
This is what I've discovered: neotest-minitest/init.lua#line 61 is missing superclasses
(superclass (scope_resolution) @superclass (#match? @superclass "(ActionDispatch::IntegrationTest|ActiveSupport::TestCase|ActionMailer::TestCase|ActionCable::Channel::TestCase|ActionCable::Connection::TestCase)$"))
This fixes the tests mentioned above.
I'm trying to solve the problems with the system tests. Adding ActionDispatch::SystemTestCase and/or ApplicationSystemTestCase to the above line doesn't help.
I'm thinking it has something to do with how the tests are launched at the command line.

Howdy, I'm new to using Neotest and am running into this issue now when testing ActiveJob. What can I provide to help with debugging?

Hey @johnpitchko, thanks for reporting.
To help with debugging it would be helpful if you could share the output of your tests and any specific error messages you've encountered.
It would also help to know how you'd usually launch your tests?


ArgoCD lab will not authenticate

Following the lab will end up with an authentication error when at the _argocd login step

fix in #1104
Thank you seb :)


Allow Linker script files to be committed

This is a source file type needed for https://github.com/apache/tvm/pull/8744
Co-authored-by: Grant Watson<EMAIL_ADDRESS>

i'm generally okay with committing linker scripts that are targeted specifically to devices in CI. I don't want to commit microTVM linker scripts for specific devices outside of apps/microtvm otherwise. I do kind of wish there is a way to target this inclusion at only apps/microtvm. given this, is it worth an override rule instead? cc @jroesch

i'm generally okay with committing linker scripts that are targeted specifically to devices in CI. I don't want to commit microTVM linker scripts for specific devices outside of apps/microtvm otherwise. I do kind of wish there is a way to target this inclusion at only apps/microtvm. given this, is it worth an override rule instead? cc @jroesch

I think there are ways to put other checks in place, we could just go with convention here? and I assume the uTVM folks are the only people who would ever use linker scripts in TVM.


Fix for issue #27 "Could not enter raw REPL"

Two fixes, each in its own commit.

First off, all serial connections were made in the exception handler for socket.gaierror because the port was first tried as an ip-address/DNS name. I made that pass and then continue, which leads to far less confusing stack traces.

Second, I introduce the command-line option -s, --suppress-reset to both pyboard and rshell to fix issue #27 "Could not enter raw REPL". The rationale for doing it this way is in the issue, so I won't duplicate here.

I added the necessary changes to README.rst and redid with push -f so it's still just the two commits...

Thanks!
rshell can't connect to my Maix board when a program is starts on reset. This option and a single reset button push button fixes this.


Implement demo-bottle

I made demo-bottle, which uses bottle, based on demo-flask.
Most parts are same with demo-flask, however, I changed acs to be new url(/acs) because bottle doesn't support to get url query params from POST request.
Also, I added ready-to-go localhost SSL example.
Please review the code.
Thank you.

Coverage remained the same at 97.88% when pulling b7c3d90d8ae8a6bf6fe92836cbbe0d824813eb92 on changjej:master into fa67f9ec8c5a7197cc7191c706c37b1492afea61 on onelogin:master.

@changjej, Sorry for the delay, I hope to have some spare time to install the bottle framework and add its demo in the toolkit. Thanks for contributing it.