[Merged by Bors] - make pbr shader std140 compatible

In shaders, vec3 should be avoided for std140 layout, as they take the size of a vec4 and won't support manual padding by adding an additional float.
This change is needed for 3D to work in WebGL2. With it, I get PBR to render

Without it, nothing renders... @cart Could this be considered for 0.5 release?
Also, I learned shaders 2 days ago, so don't hesitate to correct any issue or misunderstanding I may have
bevy_webgl2 PR in progress for Bevy 0.5 is here if you want to test: https://github.com/rparrett/bevy_webgl2/pull/1

I think im in agreement with the idea to just avoid vec3 in this context. Better to use the least surprising type.

(we've hit this exact issue in the past)

bors r+

Avoiding vec3 is simply not necessary. Using std140 correctly on both sides, GPU and CPU, solves this problem and allows Vec3's to just be vec3's, etc.

Hmm yeah is this a fair assessment of the situation?
It seems like we have three options:

Use vec4 in place of all vec3s without including std140 (in the interest of avoiding special annotations)
Use vec3s, but always include std140 so we don't need to care on the cpu side?
Use vec3s, don't include std140, and account for the mismatch on the cpu side with padding?

None of these seem fun :smile:

I have been working on a crevice PR in #1931 .

I agree that this needed merging, to fix the current issue. But if we're going to do manual padding anyway, it doesn't matter at all whether we avoid vec3 or not, as long as the padding is correct and the uniforms are marked std140 (which they should anyway, because otherwise the API is free to reorder fields).
Instead of arbitrarily avoiding vec3, and there's actually a few more rules, we should implement a general solution that does not require users to be aware of these details.
In my ideal world, I think we track uniform types for all compiled shaders, so that we can:

Generate buffers matching the uniform;
Signaling when uniforms with the same name in different shaders don't match;
Figure out a way of correct serialization of structs to the created buffers.

Since we really need shader includes anyway, as our shaders grow, it actually makes sense to make this part of the solution. Instead of specifying uniforms once in rust and once in glsl, we should really have a single definition that is reusable on the other side. Whether that definition is rust and glsl is generated or the other way around.

I really don't like the extra boilerplate of requiring std140 everywhere. Its one more thing to remember (and users likely won't include it). Could you elaborate a bit on (or link to) the implications of the "the api is free to reorder fields"?

This is because, technically, you have to query the API for the field offsets of the uniform. By specifying std140 you force it to adhere to a single layout. This is also likely why issues showed up for webgl2 and DX12 that didn't for vulkan. Read https://www.khronos.org/opengl/wiki/Interface_Block_(GLSL)#Memory_layout and weep.

If we really need to include std140 everywhere to ensure predictable behavior, we should look into ways to make this automatic and implicit (ex: flip a bit in the shader compiler or add a post-processing step). Alternatively, we could look into the WGSL memory layout situation and consider moving to that if it is more reasonable.

As of last June, there wasn't agreement on a single layout, see https://github.com/gfx-rs/wgpu-rs/issues/349#issuecomment-638873319. Maybe this has changed, but I can't find reference to it, so we should probably ask Groves or kvark.

I'm not a huge fan of codegen here as it complicates the build process and introduces its own complexity (in terms of importing the generated items). I would personally prefer a macro that handles proper memory layout and solid validation layers that yell when something doesn't line up.

That works, I mean, one can actually query the offsets from the API.
But what I mostly mean is we need to make this easier on users. Because there's going to be way more issues once we start having multiple shaders specifying the same uniforms. Because, as we've seen, there's 0 useful errors from them being wrong. Which is why something like filament uses includes (of generated uniforms, as well, but that's not needed) to be sure of uniformity (pun intended).


400 bad request  your browser sent an invalid request

Is there an existing issue for this?

[X] I have searched the existing issues

Kong version ($ kong version)
kong 2.3.3
Current Behavior
when I  update kong  from 2.1.0 to 2.3.3  ,  Sometime  open web site use chrome  happen error  like  “400 bad request  your browser sent an invalid request ”
but the situation  Occasional appearance
how can i  solve it？ thanks！
Expected Behavior
No response
Steps To Reproduce
No response
Anything else?
No response

@ingla9988 Hi, The 4xx error on the server-side is more related to your input, could you provide some of the Kong logs to see if it's running as expected?


Linux build errors and fix

there are some problems with building the source code for Linux:
the src/obj directory is missing
simply mkdir obj fixes this
the Linux Makefile for src/leveldb is missing, but we can get it from the official source:
( example:  https://github.com/SecKC/SecKCoin/issues/30 )
this fixes the Linux errors (qt version not tested)

I make Pull Request.
If the owner of this repo is merged, it will be solved.


Dropdown off screen

#4619 -- this seems to have been an issue with Foundation 5 as well.
If the last element in the navigation has a dropdown it cuts off text and a portion appears screen.
Here's an example: https://jsfiddle.net/a5xg4r9f/2/

This was fixed in Foundation 6.2. If I update your JSFiddle to use the 6.2.0 CDN links it works fine. See here: https://jsfiddle.net/a5xg4r9f/2/


Added Styling Sheets for the New Landing Page

Issue Number : #912
This is the new landing page's styling sheet (CSS file).
It contains all of the website's section styling.
Note: If we merge this PR first, we'll be able to commit more sections to the landing page and the CI will work properly for future PRs.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.Arnab Saha 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.

What about you opening a draft PR for the landing page, containing all the the work that you have done so far, ignoring the CI (we can later close that draft/rough PR). Because it's hard to review 3000+ lines of CSS, and we don't wish to merge redundant code (if any) in the master branch.
Instead, we can also create a separate branch for a landing page in the original wechaty repo, and can merge this there and will merge the landing page branch in the original wechaty repo once the landing page is ready and reviewed.
@lijiarui what do you think

What about you opening a draft PR for the landing page, containing all the the work that you have done so far, ignoring the CI (we can later close that draft/rough PR). Because it's hard to review 3000+ lines of CSS, and we don't wish to merge redundant code (if any) in the master branch.
Instead, we can also create a separate branch for a landing page in the original wechaty repo, and can merge this there and will merge the landing page branch in the original wechaty repo once the landing page is ready and reviewed.
@lijiarui what do you think

Thanks @Rohitesh-Kumar-Jain  I strongly agree with you, as @huan mentioned before, every PR should be atomic.

What about you opening a draft PR for the landing page, containing all the the work that you have done so far, ignoring the CI (we can later close that draft/rough PR). Because it's hard to review 3000+ lines of CSS, and we don't wish to merge redundant code (if any) in the master branch.

Okay, for the CSS file, we'll generate a drafted atomic PR. Actually, we wanted to integrate this file first because then the CI will not throw an error.

Instead, we can also create a separate branch for a landing page in the original wechaty repo, and can merge this there and will merge the landing page branch in the original wechaty repo once the landing page is ready and reviewed.

Okay that will be great.
So I am closing this PR.

What about you opening a draft PR for the landing page, containing all the the work that you have done so far, ignoring the CI (we can later close that draft/rough PR). Because it's hard to review 3000+ lines of CSS, and we don't wish to merge redundant code (if any) in the master branch.

@Rohitesh-Kumar-Jain Like do you mean to create a new PR which contains all the works that we have done till now?
we have completed the integration of the new landing page with the docusaurus and tested locally in wechaty.js.org repo and everything is working well without any issues.

@Rohitesh-Kumar-Jain Like do you mean to create a new PR which contains all the works that we have done till now?

@sajenjeshan1222  Please follow @huan suggestion in #912

@Rohitesh-Kumar-Jain ok


WFCORE-1572 Fixed parsing of argument value with a whitespace

JIRA: https://issues.jboss.org/browse/WFCORE-1572

@aloubyansky please approve

@aloubyansky yes it should - I just checked and it seems to be working. Wildfly needs to be started in domain mode for the rollout header to work, but that wouldn't suggest '--' either... maybe it was using older version of core?

This is good to merge. Thanks, Bartosz!


MCP23017

Description:
New component MCP23017: binary sensor and switch platforms.
Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#9220
Example entry for configuration.yaml (if applicable):
binary_sensor:
  - platform: mcp23017
    i2c_address: 0x20
    pins:
      0: PIR Office
      1: PIR Bedroom

switch:
  - platform: mcp23017
    i2c_address: 0x20
    ports:
      11: Fan Office
      12: Light Desk

Checklist:

[x ] The code change is tested and works locally.
[x ] Local tests pass with tox. Your PR cannot be merged unless tests pass
[x ] There is no commented out code in this PR.

If user exposed functionality or configuration variables are added/changed:

[x ] Documentation added/updated in home-assistant.io

If the code communicates with devices, web services, or third-party tools:

[x ] The manifest file has all fields filled out correctly (example).
[x ] New dependencies have been added to requirements in the manifest (example).
[x ] New dependencies are only imported inside functions that use them (example).
[x ] New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
[x ] New files were added to .coveragerc.

If the code does not interact with devices:

[ ] Tests have been added to verify that the new code works.

Hi @jardiamj,
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!

You seem to have accidentally included contents of a hidden .svn folder in your commit. You probably want to remove that.
I'll remove it right now! I used subversion to pull my component from my github repo and forgot about the .svn folder.

@matkor take a look at this PR. Could You please review the code?

pull/23127 uses internal HA polling for switch state update, also it requires I²C operations per each pin poll, and does no reprogramming of expanders.
Here we read all pins in one I²C read, we have reprogramming (if expander reset is detected), also we have external thread poll loop which can read each pin state circa 20Hz on RPi1.
I am not sure about internal HA polling vs external thread loop, but batch I²C pin reads and reprogramming are good IMHO.

@jardiamj I've asked @matkor to look at Your code.
Is there an option to add batch I²C pin reads and reprogramming in Your code? I think it will improve the performance and error detection.

Hi @missiu,
As I mentioned before I am using the Adafruit's MCP230XX library because it's already hosted in PyPI. Their library doesn't support the hardware interrupt in the chip, I tried deobfuscating it but it's a bit convoluted on its dependencies so I started writing my own library with support for that.
I have a functional library already and code that uses the hardware interrupts asynchronously, but I need to prepare it to uploading to PyPI and all this takes time.
My plan is to switch to using that in the future.

@jardiamj Adafruit's library support interrupts - https://github.com/adafruit/Adafruit_CircuitPython_MCP230xx/blob/master/examples/mcp230xx_leds_and_buttons_irq.py or maybe I missed something.

Thanks for this link, it was probably me who missed I realized I was looking at an old Adafruit's library that doesn't have that implementation.
This one: https://github.com/adafruit/Adafruit_Python_GPIO/blob/master/Adafruit_GPIO/MCP230xx.py
This will make my life much easier! I can just go ahead and work on implementing the hardware interrupt in my component. I'll work on it in the following days.
Thanks again! In between all the things I must have missed that repo. In my defense adafruit has a few repos with very similar names.

@matkor so GPIO.add_event_detect() is good to use?
I don't see that method used anywhere in https://github.com/adafruit/Adafruit_CircuitPython_MCP230xx.
Which library should be used?
https://github.com/adafruit/Adafruit_CircuitPython_MCP230xx
or
https://github.com/adafruit/Adafruit_Python_GPIO
or
a custom new one?
Adafruit replies fast to issues, so maybe instead of creating new library required functionality could be added to Adafruit library? What do You guys think?

@matkor, I somehow was looking at an older version of their library and didn't see the interrupt being implemented. Thanks guys for pointing that out.
@Misiu, There are 2 ways to go about using the interrupts:

There are 2 INT pins in the MCP23017 one for each port (A and B) that can be configured as mirrors. You can connect either of the interrupt pins of the MCP23017 to a GPIO pin on the Raspberry Pi and then use GPIO.add_event_detect() on that Raspberry Pi pin as Matkor suggested above. This can easily be done with the current functionality in the Adafruit library and using RPi.GPIO
You could create an async function that reads from INTFA (address 0x0E) for port A interrupt or INTFB (address 0x0F) for port B on the MCP23017 chip. With this approach you wouldn't need to connect either of the INT pins to the Pi, I don't see it implemented in the Adafruit library and you would still be polling that pin perhaps asynchronously.

I have been playing around with the second approach lately because, for testing, I have been driving the chip using my laptop's VGA port and so I don't have GPIO pins like when connected to the Pi. And, I can't use the Adafruit library this way because their implementation of their I2C bus helper is designed for boards like the Raspberry Pi and Beaglebone, I am instead using the smbus2 python library to communicate with the chip.
With all that said, when and If this PR gets accepted I'll work on implementing the interrupts using the current Adafruit's library.
Thanks again guys!

@ActuallyRuben can this be merged? Do this needs some approval/review?

@Misiu I don't see any issues, but I don't have any authority over this repo and whether this gets merged or not.

@ActuallyRuben thanks for a quick reply.
Who should I ask for review/merge? @balloob ?

@jardiamj @matkor how are You guys powering relays connected directly to Raspberry Pi and via MCP23017? I'm aware that Pi can handle 4/8 relays connected directly (if used with original power supply), but how should I connect an external power supply? Should I use one and how for let's say 2x8 relays shields connected to MCP23017?

is above schema correct (assuming I use raspberry pi and MCP23017) should I have a common group? If yes then how should I connect it?

is above schema correct (assuming I use raspberry pi and MCP23017) ?

I am not sure if it is safe to put 5V to MCP23017 inputs and have 3.3V as Vcc, and be sure that I²C bus operates at 3.3V nor this is within MCP23017 specs.
That's why I am using MCP23018 (which as I understand specs) is 5V tolerant, while operating I²C bus at 3.3V levels, connected as on your schema.
P.S. I am not sure if this discussion should be only used for PR review topics?

@matkor that's right, my question was a bit off topic.
I want to try that binding and I don't want to burn anything because I mess up the connection.
I'll search a bit more and ask in a different place.
@jardiamj maybe this could be added to docs? A simple schema on how to connect 2x8 relays to Raspberry Pi via MCP23017? This would really help newcomers like me.

@jardiamj Nice work! I hope this quick review/merge

@amelchio could You take a look at this PR?

Hey, I have tested the switch (will also test the binary_sensor later).
I can successfully turn on pins, but cannot turn them off again.
I have verified that turning pins on works, by using i2cset to manually turn them off first.
I have a feeling that it is caused by self._pin.value = True and not self._invert_logic in the turn_off method. If I replace this with self._pin.value = False, it works as expected. So there might be some logic error here. I ran out of time yesterday to debug this further, I will get back to this soon.

I just realized, that's a pretty dumb logic I wrote there, I had it as an if statement before but I just realized that's unnecessary, jut replacing it with: self._pin.value = self._invert_logic should work.

Switch is working fine now! :+1:

I have tried out the binary_sensor. Almost working!
This is my configuration:
binary_sensor:
  - platform: mcp23017
    i2c_address: 0x20
    pull_mode: DOWN
    interrupt_port: 12
    pins:
      8: PIR Office
      10: PIR Bedroom

8 and 10 because my buttons are connected to port B, and wired with pull-down resistors (no hardware debouncing capacitor added, maybe I should?)
When I press one of the buttons, they immediately turn on in Home Assistant :) But they very rarely turn off again. It takes about a minute for them to turn off automatically, and only once I have seen it turn off when it should.
The interrupts from the MCP23017 are receiving well on the RPI, since the state change happens instantly (I can also see the "Dispatching MCP23017: mcp23017_binary_sensor_32_8_update on port: 12" message in the logs).
After looking into this I have found that the state in home assistant turns off immediately when I read one of the INTCAP registers:
sudo i2cget -y 1 0x20 0x11
The datasheet says:

The INTCAP register captures the GPIO port value at
the time the interrupt occurred. The register is
read-only and is updated only when an interrupt
occurs. The register remains unchanged until the
interrupt is cleared via a read of INTCAP or GPIO.

What I suspect this issue to be is that the register isn't being cleared at the right time, maybe too soon, and there is still some bouncing going on? So that causes the on-state to remain stuck in the register, not allowing any new interrupts to happen in the meantime. So when I have released the button and launch this command to clear the INTCAP register, by now the button isn't pressed anymore and the off state interrupt triggers afterwards.
Well, this is my theory. I have to go now, I hope you can narrow it down!

Thanks @StephenBeirlaen for testing it! This PR is for the version that used polling for the binary sensors and it has been working well for me so far.
I am trying to implement the hardware interrupt function in my custom component repo. What I have found out is that my current code works when there are not pins configured as output pins in the MCP23017. If all you have are binary sensors it works fine but as soon as you configure a pin as a switch the Interrupt pins start acting weird, particularly when the buttons are depressed. I suspect that there is some noise being introduced by the pins configured as outputs.
Can you test if it works with only binary sensors configured?

Oh, so that's why I found this code twice, I did not see the difference.
Unfortunately I cannot reproduce that the inputs start switching off correctly when I remove all outputs from home assistant. I have reset and power cycled the MCP23017. It still gives me the same result, home assistant only reacts as soon as I read the interrupt register manually.
After some more investigation I have tried to delay the reading of the interrupt registers for 100ms:
    def update_sensors(port):
        time.sleep(0.1) # wait 100ms
        capt_A = mcp._read_u8(0x10) # this clears the interrupt, allowing new values to enter the register
        capt_B = mcp._read_u8(0x11)
        for pin_num, name in pins.items():
            _LOGGER.debug("Dispatching MCP23017: {} on port: {} with valueA: {}, valueB: {}".format(DEVICE.format(i2c_address, pin_num),port,capt_A,capt_B))
            dispatcher_send(hass, DEVICE.format(i2c_address, pin_num))

This makes it wait a while before reading the interrupt state. This makes the inputs respond very accurately :)
I hate delaying and blocking threads though, so this is only temporary. I will look for a better way.

@StephenBeirlaen, Can we move this conversation to the repo where I am experimenting with the interrupt pins?, here: https://github.com/jardiamj/homeassistant/tree/master/custom_components
I have played a little bit with the bouncetime in this line GPIO.add_event_detect(interrupt, GPIO.FALLING, callback=update_sensors, bouncetime=10) trying to find the sweet spot. With 10 miliseconds it reacts to the bouncing of my door and windows reed sensors pretty well.

Good idea, since this PR is for the polling version :)

@StephenBeirlaen does this version works for You? Can we get this merged?

I have yet to test the binary_sensor with polling (this version). I will post my findings here.
The switch is working fine.

@StephenBeirlaen any updates? Did You find any bugs?

I have tested the binary sensor, it is working fine. I have to hold the buttons for a long time though ;)
Binary sensor and switch also work simultaneously when both are configured in Home Assistant.

Maybe add scan_interval in your documentation. This makes it a little more responsive

Since this component uses polling, you can change the polling interval by passing a number of seconds to scan_interval. I don't remember what the default is, but it is a bit long for this type of sensors and that's why you need to hold it for a while for it to update its state.

@StephenBeirlaen thanks for testing. So we have a green light 🙂
@ActuallyRuben who can accept this PR (and second for the docs)?

I didn't follow all these comments but if this PR is ready for review, I can have a look soon.

@amelchio any updates - anything caught Your eye?

@amelchio, I made all the suggested changes for whenever you get a chance to take another look.

@jardiamj thank You for this PR. I'll try o add PCF8574 platform based on Your code.


CMake Generation is very slow for Xcode.

The CMake step of the CI runs take about 7 minutes for MacOS, and about 12 minutes for iOS. In contrast, it takes about 1.5 minutes on Windows and 0.25 minutes on Linux.  Just watching the builds progressing, it seems to be that the tests for headers/functions/macros is fairly slow (a couple seconds each, maybe).
Possibly we should consider caching some of the results of the header/function/macro checks, e.g. using something like https://github.com/cristianadam/cmake-checks-cache.
Additionally/alternatively, we can see if some of the checks can be grouped together CHECK_INCLUDE_FILES instead of CHECK_INCLUDE_FILE to reduce the total number of checks.

In PR #81, we cache the build folder containing all CMake files, then clean it up after the build to reduce cache size. This is helpful for the next build but only if the current build succeeds. This approach is the one currently use on other platforms and could address the mentioned issue.
We could improve this process by splitting it into two separate jobs. The first job would check if a cache exists; if not, it would run CMake and then exit (implicitly saving this small folder "build" in the cache). The second job would then retrieve this cache, quickly run the CMake task, and proceed with the build, installation, publication and clean the folder build. This way, even if one of the steps in the second job fails, we will still have a CMake cache.


GenericDatum: Process default values correctly

Currently:

Default values are not processed well in GenericDatum. They are not set at all.
If a number literal is used as a default value, it is converted internally to float64 due to GoLang JSON unmarshalling.

The above need to be fixed.

This is fixed by:
Pull: https://github.com/stealthly/go-avro/pull/37
Commit: https://github.com/arunmk/go-avro/commit/7eb45b451f12afb7602dbe40e462faf0d6ed52dc
The commit has tests updated.

Merged to master. Thanks


Removed deprecated method (createJSModules) of React Native 0.47.0

Hi,
Due to https://github.com/facebook/react-native/commit/ce6fb337a146e6f261f2afb564aa19363774a7a8 's breaking change, we should remove the deprecated method createJSModules.
Thank you.

Give me two hours and I will release a new version.


Progres Tutorial by tapping anywhere in the screen

At least as an option this would make the tutorial a little bit more user friendly :)

Add maskClosable property in useDefaultTheme. thx for your advise :)


API errors with 0.8.6 but not 0.8.5

In the Swagger documentation for my API, I have responses for one of my paths defined like this:
"responses": {
                    "200": {
                        "description": "Person documents",
                        "schema": {
                            "type": "array",
                            "items": {
                                "schema": {
                                    "$ref": "#/definitions/PersonOutput"
                                }
                            }
                        }
                    }
                }

This works just fine with swagger-tools 0.8.5, but if we user 0.8.6, I get the following error:
API Errors:

  #/paths/~1person/get/responses/200: Data does not match any schemas from 'oneOf'
    #/paths/~1person/get/responses/200/schema/items: Data does not match any schemas from 'anyOf'
      #/schema/items: Additional properties not allowed: schema
      #/schema/items: Expected type array but found type object
    #/paths/~1person/get/responses/200: Additional properties not allowed: schema,description

As far as I can tell, I correctly defining the schema for the items in the array by using a reference to the definition elsewhere in my schema document.  Is this a bug introduced by 0.8.6, or do I need to change my definition for my 200 response?

There were upstream changes to the Swagger 2.0 JSON Schema files and this is one of those change.  Just change your response  schema to look like this:
"items": {
  "$ref": "#/definitions/PersonOutput"
}

The nested schema is not necessary and is what is causing the issue.  Let me know how it goes.  If thus fixes this, feel free to close when you respond.

Thanks.  That fixed that problem, but now I've run into another.  One of my API paths can return two different error objects depending on which error is encountered.  I currently have responses defined like this:
"responses": {
    "200": {
        "description": "Successful response",
        "schema": {
            "$ref": "#/definitions/GroupDetailed"
        }
    },
    "400": {
        "description": "Unrecognized quote or group ID",
        "schema": {
            "oneOf": [
                {
                    "$ref": "#/definitions/UnrecognizedQuoteId"
                },
                {
                    "$ref": "#/definitions/UnrecognizedGroupId"
                }
            ]
        }
    }
}

After moving to Swagger schema 2.0, it causes this error:
API Errors:

  #/paths/~1quote~1{citvId}~1group~1{groupId}/put/responses/400: Data does not match any schemas from 'oneOf'
    #/paths/~1quote~1{citvId}~1group~1{groupId}/put/responses/400/schema: Additional properties not allowed: oneOf
    #/paths/~1quote~1{citvId}~1group~1{groupId}/put/responses/400: Additional properties not allowed: schema,description

How do I represent the multiple response objects in the new Swagger 2.0 schema?

That is not allowed.  Swagger 2.0 is deterministic and oneOf is not.  You'll need to reference the Swagger 2.0 Specification or the Swagger 2.0 JSON Schema to better understand.

I think I figured it out.  I changed my responses to include multiple 400 entries like this:
"responses": {
    "200": {
        "description": "Successful response",
        "schema": {
            "$ref": "#/definitions/GroupDetailed"
        }
    },
    "400": {
        "description": "Unrecognized quote ID",
        "schema": {
            "$ref": "#/definitions/UnrecognizedQuoteId"
        }
    },
    "400": {
        "description": "Unrecognized group ID",
        "schema": {
            "$ref": "#/definitions/UnrecognizedGroupId"
        }
    }
}

Thanks for the help with this issue.  I suggest augmenting the pet store examples to contain some more complicated examples, or compiling some examples of more complicated APIs that have been documented with Swagger.  I did quite a bit of Googling and didn't find many examples that were helpful for these particular problems.

That will work but it will not work like you want.  :)  Any JSON/YAML/JavaScript processor will collapse 400 values into one, with the last one becoming the one that wins.  So with the JSON snippet above, the actual JSON that is processed will be this:
"responses": {
    "200": {
        "description": "Successful response",
        "schema": {
            "$ref": "#/definitions/GroupDetailed"
        }
    },
    "400": {
        "description": "Unrecognized group ID",
        "schema": {
            "$ref": "#/definitions/UnrecognizedGroupId"
        }
    }
}

So while the validation now works, you're still not working around Swagger's requirement of deterministic REST APIs and this will not work at runtime with anything that uses those values.

Swagger's deterministic APIs means each API produces one success and one error for each method/status code.  So you can't have an API that returns Error1 in some cases for a 400 and Error2 in other cases for a 400.  Swagger does not support this and there is no working around it.
As I mentioned above, your workaround really just pleases the validator but the actual computed object from your JSON will not have two 400 responses but one, as described above.

So, the path that I am documenting is:
/quote/{citvId}/group/{groupId}

The path requires two identifiers, and the error results are different depending on which part of the path is wrong.  There is more information available for one of these error paths.  That seems quite deterministic to me.  Is it legal to return one Error that has a oneOf in it to handle the different error cases?

I understand what you're saying and I do not disagree.  :)  This is a Swagger nuance.  It does not support using oneOf anywhere because that is non-deterministic.  (Their words.)  I just wanted to point out your workaround will not do what you want even though it appeases the validator.

Well, unless somebody else has a better suggestion, it looks like I will have to collapse the two error cases down to one response object schema that includes all the properties from both cases and take the non-common properties out of the required list.  That makes things so much clearer (heavy sarcasm).

Feel free to bring this up in swagger-api/swagger-spec, the specification, it's JSON Schema files and the limitations imposed by it are maintained there.  You are not the only one to bring this stuff up.


Build & start separately on Heroku

This adds a Procfile for Heroku that runs the build and start steps separately.
Fixes https://github.com/electerious/Ackee/issues/205

Pull Request Test Coverage Report for Build 790

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 85.526%

Totals

Change from base Build 788:
0.0%

Covered Lines:
756

Relevant Lines:
840

💛  - Coveralls

Thanks!


Support .NET 4.5.1

Hello, I was wondering if you would consider supporting 4.5.1 - I can do the pull request myself, build it on 4.5.1, research the implications, and fix anything that breaks.
 I'll have a look at the change note between the two versions and
see what risk there is to just releasing it. Otherwise I'll see if I can
get the testing to work.
On 5 Feb 2018 21:39, "Valeriy Novytskyy"<EMAIL_ADDRESS>wrote:

Hello, I was wondering if you would consider supporting 4.5.1 - I can do
the pull request myself, build it on 4.5.1, research the implications, and
fix anything that breaks.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/trichards57/zxcvbn-cs/issues/15, or mute the thread
https://github.com/notifications/unsubscribe-auth/AG0yVAyFBIrCbjsyoOgRlDzz4uZ78TNTks5tR3UpgaJpZM4R6I-C
.

According to XUnit release notes, the min version 4.5.1 is only a constraint on Test projects, not the actual code being tested.
I downgraded zxcvbn-core.csproj to net451 leaving zxcvbn-core-test at net452 and the tests for that framework version appear to have passed.
My .NET Core tests crashed through, so I am not sure what's going on there. Probably because I don't have Visual Studio 2017 and executing through .NET Core 2.x instead.

I think I'm seeing the same issue on my machine as well, but the appveyor build seems happy.  I'm going to push a test build and see what happens.


chore: use path.Join to avoid double slashes

In the shortcode for generating type links, printf is used, generating links like these: http://localhost:1313/workers//runtime-apis/response. Using path.Join, hugo handles the link generation/url massage http://localhost:1313/workers/runtime-apis/response.
(Example links taken from https://developers.cloudflare.com/workers/runtime-apis/cache)

Thanks for the contribution, @jbergstroem!


Admin Api Docs have several problems

Problem 1:
Docs are not clear at all about what permissions the token integrations have vs the User Authentication method.
Problem 2:
The URL in the creating a session is wrong. It says POST /sessions/ but it's actually /admin/session/ (especially note the ending s)
Problem 3:
The /session/ endpoint requires an Origin or Referrer but doesn't mention it in the docs, otherwise you get the error: 'Could not determine origin of request. Please ensure an Origin or Referrer header is present.'
Problem 4:
The body of the creating a post is wrong. It uses the key post when it's actually posts
It's very frustrating when you have to constantly second guess the docs!

Hi @dshook thanks for taking the time to point out these issues. The docs are still very much WIP, and I really appreciate getting a bit of feedback.
I've pushed out changes to cover all 4 points. For 1 and 3, the trickier ones, there has been quite significant additions to the authentication section.
Really hope that this covers the immediate issues. It's still WIP tho 😬


deis 1.9.0 does not “decorate” the Fleet units

I have tried to isolated the Planes as per http://docs.deis.io/en/latest/managing_deis/isolating-planes/ but the deisctl command line tool does not “decorate” the Fleet units.
'cloud-unit' files got necessary metadata controlPlane=true and dataPlane=true,routerMesh=true
but even setting with deisctl config platform set enablePlacementOptions=true, fleet units did not get the
fleet "decoration"

@rimusz that feature was just recently merged into master to be included in the v1.10.0 release.  The documentation on deis.io is from and for the master branch.  If you'd like to get "early access" to this feature and you have go installed, you could build and install deisctl from source in the master branch.
git clone git@github.com:deis/deis.git
cd deis/deisctl
make build install

Apart from this, remember that (even in Vagrant) nodes also need to be tagged with appropriate metadata to support these decorators.

@krancour so the  http://docs.deis.io/en/latest/managing_deis/isolating-planes/#decorating-units should be updated then from To complement the cloud-config described above, Deis 1.9.0 and later  to To complement the cloud-config described above, Deis 1.10.0 and later  as it confuses :)
For now I got it working manually updating fleet units.

@rimusz nice catch.  I'll have that fixed today.

I think that's the intention of /latest/, but we know that it's caused confusion/communication issues in the past. If you want to read docs for v1.9.0, use http://docs.deis.io/en/v1.9.0/.


The Chinese URL of LeetCode has changed

Because the Chinese website of LeetCode has changed, the program does not work now.

It's working fine. The issue was the same as #20.

Due to the domain name change, the Chrome extension is not working fine for leetcode CN users. We need to change the leetcode CN domain name in the code to fix this.


Mobile adjustment for Release Notes intro/date header

I visited our release notes on my iPhone 15 Pro Max. Is it possible to move the date to the next line below when it hits a certain breakpoint?
I iterated on our release notes section here. To the left, I provide a quick iteration about how this heading could look when it scales down.
Let me know if you have questions or need anything else!

@LibbyUX fixed in PR #480


Add required variables for horizon.conf

Add required variables/values for horizon.conf which is used as a source of default values for Horizon integration tests.

/ok-to-test


Page scrolling to top on form submit

Hi,
I am just trying out swup forms, and am seeing some behaviour I would like to change if possible. I have added data-swup-form to a simple contact form. When submitted the page reloads through swup (fade-out,fade-in), and then scrolls to the top of the page. Would it be possible for the page to reload and stay at the location of the form, which now displays my success message?
This is the first bump I have hit with Swup, apart from this it is absolutely great 👍

Very nice point! This is a new feature which I actually haven't even used yet, so thank for a heads up.
I've added support for including a hash (id of the element) in the action attribute of the form, so the page will scroll to your form after sending and getting the reply.
<form action="#form" id="form" data-swup-form>

I would also suggest disabling swup's scroll on submit and enabling it after the page is reloaded, so it does not move at all when sending the form.
swup.options.scroll = false

Thanks that's awesome! Will give it a try tomorrow. Would it be possible to elaborate a bit on the code required your second point?

I would also suggest disabling swup's scroll on submit and enabling it after the page is reloaded, so it does not move at all when sending the form.

Sure! The easiest way to disable scrolling for forms would be...
document.addEventListener('swup:formSubmit', event => {
    swup.options.scroll = false;
});
document.addEventListener('swup:animationInDone', event => {
    swup.options.scroll = true;
});

Didn't test it, hope there are no typos or something... but you get the idea.

Yep that was just the ticket thank you! Slight typo, final code below in case anyone else wants to do the same:
document.addEventListener('swup:submitForm', function() {
    swup.options.scroll = false;
});
document.addEventListener('swup:animationInDone', function() {
    swup.options.scroll = true;
});


markdown-it with phantomjs: replacements only working in every second run

We are running markdown-it with phantomjs for our jasmine testsuite on TravisCI. Some replacements ((c), (p), (r), (tm)) are only working in every second run. I uploaded a script to test this to https://gist.github.com/svbergerem/3d24e87443045ee7a4e0. That script has to be in the parent directory of the markdown-it dir. The expected output would be that (r), (p) and +- are replaced everytime. For (r) and (p) that only happens every second time like you can see in the output file in the gist.
I tested this with phantomjs <IP_ADDRESS>. https://github.com/markdown-it/markdown-it/commit/9ae876b0fe57973392db7a6735d838a78326930e introduced this issue. With builds from the parent commit https://github.com/markdown-it/markdown-it/commit/00117cb2e7052e578b376144cf1bfd8143371ba3 everything works as expected.

Look at fix please. AFAIK regex.test() should not depend on index position when /g flag used. Is it phantomjs bug or my one?
PS. make browserify to rebuild browser files.

https://www.google.ru/search?q=v8+regex+%2Fg+test+bug
As far as i see, different trackers have answer, that "odd behavior" is not a bug, but real life is different. In FF / Cromium ubunty that's not reproduceable - only in phantomjs. I've checked for sure all other places - they have separate REs for .test()
Try new version, just released all today fixes.

PS. make browserify to rebuild browser files.

I know. :) This is exactly how I tested the different versions. I can confirm that 4.0.3 fixed the phantomjs problem. Thanks a lot.


Kind level promotion of polymorphic data constructors

Next item on the wishlist
data Maybe a = None | Some a

data InOrOut : Bool -> Type -> Type where
  In : forall {a : Type} . a -> InOrOut (Some ()) a;
  Out : forall {a : Type} . InOrOut None a

test : forall {m : Maybe Int} . InOrOut b Int -> InOrOut b Int
test (In x) = In (x * 2);
test Out = Out

lala : forall {m : Maybe Int} . InOrOut (Some ()) Int -> Int
lala (In x) = x

https://github.com/granule-project/granule/blob/master/work-in-progress/promote-data-poly.gr

I think I have a partial implementation for this (from some random fiddling), so you could do, e.g.,
data Bool = True | False
data Neg a = Not a

interface IsTrue a (b : a) Bool

instance {IsTrue a b True} => IsTrue (Neg a) (Not b) False


OpenAPI Docs Page Accessibility

Story
STRY0013717 - API Documentation Accessibility Issues
Context
A scan by the Digital Strategy Initiative found 3 issues to resolve on https://api.itpeople.iu.edu/

Page language has not been identified
Page missing headings (They are objectively mistaken on this, maybe their scraper doesn't do javascript)
Skip to main content link is missing

All these items were able to be addressed by enriching the HTML string served by the Documentation.RenderApiUI() method.
How Was This Tested?
This is the test.  Once it is deployed to the test environment I'll have them scrape it and see if the errors are remedied.

Requesting a re-review since I've made substantial changes.

I've updated to use SiteImprove's fork of Swagger-UI.  So there are substantial visual changes at the test API Documentation.
Even using SiteImprove's version of Swagger-UI was not enough to pass a scan by SiteImprove's browser plugin.  So I had to add some javascript to massage the generated DOM into compliance.  I had to do a pretty bad hack using a setTimeout()to wait for more DOM to render. Much of the DOM is generated only when certain buttons are clicked, but I couldn't find any event handlers in Swagger-UI's docs to more correctly use.
If someone has a more elegant approach please recommend it.


Upgrade JupyterHub

https://github.com/welfare-state-analytics/westac_hub/blob/bfef6aab199f3653781ab52249c1ad1dda50c2e7/Dockerfile#L35-L35

Upgraded to JupyterHub 1.4


Update Composer dependencies (2022-04-13-00-03)

Visual regression test passed!
View the visual regression test report


chalice deploy does not give link

I'm trying out the chalice tutorial with python3.6 and ... it seems to fail. The deploy command does not give me a link with a function that I could test.
$ pwd
/Users/code/Development/chalicetut/helloworld
$ chalice deploy
Initial creation of lambda function.
Updating IAM policy.
Creating deployment package.
copying /anaconda/bin/python => /Users/code/Development/chalicetut/helloworld/.chalice/venv/bin/python
copying /anaconda/bin/../lib/libpython3.6m.dylib => /Users/code/Development/chalicetut/helloworld/.chalice/venv/lib/libpython3.6m.dylib

And thats it. Bummer! The tutorial suggests that I should have gotten a printed url. I think something went wrong even though I get no error. Chalice seems unaware of any url.
$ chalice url
Error: Could not find a record of deployed values to chalice stage: 'dev'
$ chalice --version
chalice 0.8.1

I don't know what is causing it. But here's my python info.
$ which python
/Users/code/Development/chalicetut/chalice/bin/python
$ python
Python 3.6.1 |Continuum Analytics, Inc.| (default, May 11 2017, 13:04:09)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>

My guess is that anaconda is messing it up. Can you try this in a the most recent version of chalice (1.0.0b1) and if that doesn't work try it again with that same version but inside a virtualenv that was created from anything that isn't anaconda.

Closing out issue.  If you're still seeing this in any of the 1.x versions of chalice, let us know and we'll reopen and take another look.


Handle no known crates-io owners specifically

New output:
D:\repos\cad97\this-is-not-published>cargo crev crate verify
status reviews     downloads    owner  issues lines  geiger flgs crate                version         latest_t
local   0  0        ?         ?  ?/?    0/0       3       0      this-is-not-published 0.1.0*

This also incidentally fixes the println! causing the broken line seen in #273.

And here's what it looks like when a dependency is present:
D:\repos\cad97\this-is-not-published>cargo crev crate verify
status reviews     downloads    owner  issues lines  geiger flgs crate                version         latest_t
none    1  5  1266905   6736578  2/2    0/0     530       0      either               1.5.3           ↓1.5.2
local   0  0        ?         ?  ?/?    0/0       3       0      this-is-not-published 0.1.0*


Upgrade guide from v3 to v4

Correct me if I am wrong, but is there an upgrade guide from v3 to v4? I read the code in the codito/rector-money package, but I am not sure this is all that has to be done between these two versions.
Any chance we could get a comment from the maintainers or an markdown file outlining the changes required?

I am blind, apparently, there is a CHANGELOG.md.


UI : Total (amount + Fee)  is being hidden under CTA

UI : Total (amount + Fee)  is being hidden under CTA XR iOS device @Raheel1258

Verified this issue on keeper app v 1.2.11(380)


Use cast instead of dyn_cast where possible

For type inference, if the infer/verify logic were a method on the op itself, we could remove the cast altogether, but with the current setup we can at least change dyn_cast into cast to remove any ambiguity and clean up redundant checks.
In some cases it's not possible to remove the dyn_casts, for various reasons:

CHLO ops still allow RankedTensorType
Some dyn_casts are used on things that may not be tensors

https://github.com/openxla/stablehlo/issues/2065

Converting to draft, I just realized a lot of casts can be removed altogether because they occur in methods on the op, and various getType methods will return RankedTensorType directly.

On closer look, it seems there's only one case where the cast can be removed completely.

I re-reviewed everything and made some extra internal verifications and everything looks good.


[UPDATE] Update to v0.0.9

Update to in-dev version 0.0.9.
Todo:

[x] Test with pytest
[x] Lint with pylint
[x] Lint with ruff
[x] Lint with bandit
[x] Build
[x] Upload to pip
[ ] Finish todos

Closes:

Closes #5
Closes #8
Closes #9
Closes #10
Closes #11
Closes #12
Closes #14
Closes #15
Closes #16
Closes #19
Closes #20

Skipping review.


SEI option is not recognized in the example script calendar_ageing.py

Describe the bug
I'm trying to run the calendar_ageing.py example in PyBaMM/examples/scripts/ but I get an error that the SEI option is not recognized.
To Reproduce
Steps to reproduce the behaviour:

Go to PyBaMM/examples/scripts/
Run calendar_ageing.py from the terminal
See error shown below

File "/Users/gavinw/miniconda3/envs/bamm/lib/python3.9/site-packages/pybamm/models/full_battery_models/lithium_ion/spm.py", line 33, in __init__
    super().__init__(options, name)
  File "/Users/gavinw/miniconda3/envs/bamm/lib/python3.9/site-packages/pybamm/models/full_battery_models/lithium_ion/base_lithium_ion_model.py", line 17, in __init__
    super().__init__(options, name)
  File "/Users/gavinw/miniconda3/envs/bamm/lib/python3.9/site-packages/pybamm/models/full_battery_models/base_battery_model.py", line 99, in __init__
    self.options = options
  File "/Users/gavinw/miniconda3/envs/bamm/lib/python3.9/site-packages/pybamm/models/full_battery_models/base_battery_model.py", line 222, in options
    raise pybamm.OptionError(
pybamm.expression_tree.exceptions.OptionError: Option 'SEI' not recognised. Best matches are ['sei', 'side reactions', 'convection']

Expected behaviour
The expected option is SEI so I don't know why lower case letters sei are given as the best match. Other examples as well as the documentation use SEI in capital letters.

This is probably related to #1608 - in older versions the option was "sei" and we changed it to "SEI". Can you try installing via pip or from source instead of using conda?

Yes, due to the conda issue #1608, I was using an older version of PyBaMM. I installed the latest version using pip then ran the calendar_ageing example and now the error is gone. However, another error is now occurring but I will submit a different issue for the new error.


Update azurerm provider

Update the azurerm provider so we can maintain compatibility and include latest bug fixes.
Context
Changes proposed in this pull request
Guidance to review
Important business

[ ] Does this PR introduce any PII fields that need to be overwritten or deleted in db/scripts/sanitise.sql?
[ ] Does this PR change the database schema? If so, have you updated the config/analytics.yml file and considered whether you need to send 'import_entity' events?

NB: Please notify the #twd_data_insights team and ask for a review if new fields are being added to analytics.yml

 Update azurerm terraform provider


Apply codec-based data augmentation

This PR addresses the issue #1183

Hi @mthrok, this the baseline code I have made.
I apologize beforehand for accidentally closing the previous PR.

Hi @mthrok, this the baseline code I have made.
I apologize beforehand for accidentally closing the previous PR.

Hi @mthrok, thanks a lot for you detailed feed-back.

If you have time, adding tests for TorchScript consistency (like this one) would be nice.

Can you incorporate the changes from the latest master? I think the test failures will be fixed by #1181.

Hi @mthrok.
The unit-test for apply_codec are green now.
I have added also a test for TorchScript consistency.
The PR is red due to an RuntimeError of the TorchScript consistency tests.
The error message looks something like this
RuntimeError:
E           save(str filepath, Tensor src, int sample_rate, bool channels_first=True, float? compression=None, str? format=None, str? dtype=None) -> (None):
E           Expected a value of type 'str' for argument 'filepath' but instead found type 'Tensor'.

Hi @AzizCode92
I have added encoding and bits_per_sample options to save function. Can you also add the same parameters and pass them to apply_codec function?

Hi @mthrok,
Sure, I am just having issues with building torchaudio from source for the moment.
By the way, I opened an issue for that.
Once solved, I can continue working on my PR again

Hi @mthrok, I need some help here regarding the torchscript_consistency_impl.py.
There are some RuntimeError caused by the torchaudio.backend.sox_io_backend.save.
Here is a copy of the Error message:
E           RuntimeError:
E
E           save(str filepath, Tensor src, int sample_rate, bool channels_first=True, float? compression=None, str? format=None, str? encoding=None, int? bits_per_sample=None) -> (None):
E           Expected a value of type 'str' for argument 'filepath' but instead found type 'Tensor'.
E           :
E             File "/root/project/env/lib/python3.7/site-packages/torchaudio-0.8.0a0+ec8326e-py3.7-linux-x86_64.egg/torchaudio/functional/functional.py", line 1035
E               """
E               bytes = io.BytesIO()
E               torchaudio.backend.sox_io_backend.save(bytes,
E               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
E                                                      waveform,
E                                                      sample_rate,
E           'apply_codec' is being compiled since it was called from 'func'
E             File "/root/project/test/torchaudio_unittest/functional/torchscript_consistency_impl.py", line 559
E                       compression = None
E                       channels_first = True
E                       return F.apply_codec(tensor,
E                              ~~~~~~~~~~~~~~~~~~~~~
E                                            sample_rate,
E                                            ~~~~~~~~~~~~
E                                            format,
E                                            ~~~~~~~
E                                            compression,
E                                            ~~~~~~~~~~~~
E                                            channels_first)
E                                            ~~~~~~~~~~~~~~ <--- HERE

../env/lib/python3.7/site-packages/torch/jit/_script.py:995: RuntimeError

Hi @mthrok, I need some help here please regarding the torchscript_consistency_impl.py.
There is a RuntimeError caused by the torchaudio.backend.sox_io_backend.save.
Here is a copy of the Error message:
E           RuntimeError:
E
E           save(str filepath, Tensor src, int sample_rate, bool channels_first=True, float? compression=None, str? format=None, str? encoding=None, int? bits_per_sample=None) -> (None):
E           Expected a value of type 'str' for argument 'filepath' but instead found type 'Tensor'.
E           :
E             File "/root/project/env/lib/python3.7/site-packages/torchaudio-0.8.0a0+ec8326e-py3.7-linux-x86_64.egg/torchaudio/functional/functional.py", line 1035
E               """
E               bytes = io.BytesIO()
E               torchaudio.backend.sox_io_backend.save(bytes,
E               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
E                                                      waveform,
E                                                      sample_rate,
E           'apply_codec' is being compiled since it was called from 'func'
E             File "/root/project/test/torchaudio_unittest/functional/torchscript_consistency_impl.py", line 559
E                       compression = None
E                       channels_first = True
E                       return F.apply_codec(tensor,
E                              ~~~~~~~~~~~~~~~~~~~~~
E                                            sample_rate,
E                                            ~~~~~~~~~~~~
E                                            format,
E                                            ~~~~~~~
E                                            compression,
E                                            ~~~~~~~~~~~~
E                                            channels_first)
E                                            ~~~~~~~~~~~~~~ <--- HERE

../env/lib/python3.7/site-packages/torch/jit/_script.py:995: RuntimeError

Any hints please?

Hi @AzizCode92
I am sorry, what I asked you was totally wrong. The said function is not compatible with TorchScript. (TorchScript compiler does not support Python-specific thing like file-like object). So adding TorchScript compatibility test is an impossible task. So sorry about that.

@mthrok, no worries :)
Thanks a lot for your feedback.
I guess my PR is ready to be merged now.

Thanks!

Hi @AzizCode92
Checkout the new tutorial which demonstrates how to use apply_codec function. Try it out with Colab.
https://pytorch.org/tutorials/beginner/audio_preprocessing_tutorial.html#data-augmentation

Hi @mthrok, Sure I will do it asap.
Thanks and I am very happy that this feature is out there.


add convert webhook for gateway

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:
/kind enhancement
/kind feature
/sig network

What this PR does / why we need it:
add convert webhook for gateway
Which issue(s) this PR fixes:

Fixes #
Special notes for your reviewer:

Does this PR introduce a user-facing change?

other Note

/lgtm


MySQL 8 performance is far worse in CI

Looking at the build time for MySQL 8 builds it's remarkably slower than MySQL 5.7 which is very unexpected - seems to be between about 30-45% slower.
https://github.com/silverstripe/silverstripe-installer/actions/runs/6087548269/job/16516360503
mysql 5.7 php 7.4 - run tests - 3m 20s
https://github.com/silverstripe/silverstripe-installer/actions/runs/6087548269/job/16516360973
mysql 8.0 php 8.1 - run tests - 6m 27s
You can find loads of examples on CI for both 4.13 and 5.0 where mysql 8.0 is just a lot slower.  I'm pretty confident it's not the version of PHP causing the major loss of performance
Need to work out if it's just mysql 8.0 on CI specifically, or if it's just like this in general for some reason
Update
Some testing on local using docker running tests vendor/silverstripe/framework/tests/php/Control
I'm using docker-compose so I simply switched out the image used for the database, rebuilt the container and re-ran the tests
(less time is better)
mariadb:10.5.16
20.505, 20.085, 20.323 = avg 20.30
mardiadb:10.11.5
20.561, 20.330, 20.337 = avg 20.41
mysql:5.7.43
14.606, 16.133, 14.981 = avg 15.24
mysql:8.0.34
29.341, 29.347, 28.853 = avg 29.18
mysql:8.1.0
28.989, 29.063, 29.009 = avg 29.02

show table status where Name = 'File';
mariadb 10.5
-+------------------+-----------+
| Name | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time         | Update_time | Check_time | Collation          | Checksum | Create_options | Comment | Max_index_length | Temporary |
+------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+--------------------+----------+----------------+---------+------------------+-----------+
| File | InnoDB |      10 | Dynamic    |    0 |              0 |       16384 |               0 |        81920 |         0 |              1 | 2023-09-07 14:51:15 | NULL        | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
+------+--------+---------+------------+------+----------------
mysql 5.7
-----------+------------+-------------------+----------+----------------+---------+
| Name | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time         | Update_time | Check_time | Collation         | Checksum | Create_options | Comment |
+------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-------------------+----------+----------------+---------+
| File | InnoDB |      10 | Dynamic    |    0 |              0 |       16384 |               0 |        81920 |         0 |              1 | 2023-09-07 15:11:44 | NULL        | NULL       | latin1_swedish_ci |     NULL |                |         |
+------+--------+---------+------------+------+----------------
mysql 8.0
-+
| Name | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time         | Update_time | Check_time | Collation          | Checksum | Create_options | Comment |
+------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+--------------------+----------+----------------+---------+
| File | InnoDB |      10 | Dynamic    |    0 |              0 |       16384 |               0 |        81920 |         0 |              1 | 2023-09-07 15:13:42 | NULL        | NULL       | utf8mb4_0900_ai_ci |     NULL |                |         |
+------+--------+---------+------------+------+----------------+-------------+----

Running the following script to convert mysql 5.7 to utf8mb4
            foreach (DB::query('show tables') as $row) {
                $table = $row['Tables_in_SS_mysite'];
                DB::query("ALTER TABLE `$table` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci");
            }

17.170, 16.664, 15.204 = avg 16.346
I also tried using utf8mb4_0900_ai_ci, though mysql 5.7 said 'unknown collation'

Do we know for a fact that the MySQL 5 docker image is a good mirror of the MySQL 8 docker image?
Might be worth asking some of our projects that have already upgraded if they noticed substantial performance regression.

I don't know anything about the inner workings on the docker images, I just pull them down and use them

We don't obviously know what to do with this.
We'll work with our hosting team to see if we are seeing performance degradation on sites upgraded to MySQL 8.
We'll research a little bit more to see if other LAMP application are seeing performance degradation with MySQL 8.
Maybe this leads to follow up optimisation in CMS 5.2.

I think we need to redo benchmarking, focusing on read/write operations which are what will be more commonly done during execution of a given request.
I've seen a lot of information saying that CREATE/ALTER and other table manipulations are slower in mysql 8 (which is what the above benchmark seems to be based off) - but that regular read/write operations are generally faster.
This could also explain the speed problems in CI since each test run in CI will clear data in the db, most likely with a DROP and then CREATE table operation.

I think mysql8 is just slow - I redid benchmark using 50,000 SELECT * FROM SiteTree
// mysql 5.7 (default latin1)
2.168, 2.202, 2.157, 2.162, 2.163 = 2.170

// mysql 5.7 - utf8mb4
2.242, 2.332, 2.318, 2.273, 2.172 = 2.267

// mysql 8.0.34 (default utf8mb4)
2.488, 2.763, 2.577, 2.573, 2.794 = 2.639

// mysql 8.0.34 - latin1
2.477, 2.343, 2.568, 2.215, 2.379 = 2.397

script:
if (false) {
    $charset = 'utf8mb4';
    $collation = 'utf8mb4_general_ci';
    // $charset = 'latin1';
    // $collation = 'latin1_swedish_ci';
    foreach (SilverStripe\ORM\DB::query('show tables') as $row) {
        $table = $row['Tables_in_SS_mysite'];
        SilverStripe\ORM\DB::query("ALTER TABLE `$table` CONVERT TO CHARACTER SET $charset COLLATE $collation");
    }
}
if (true) {
    $res = SilverStripe\ORM\DB::query("show variables where Variable_name = 'version'");
    echo "DB version is " . $res->record()['Value'] . "
";
    $sql = "SELECT COLUMN_NAME, COLLATION_NAME FROM information_schema.columns WHERE TABLE_SCHEMA = 'SS_mysite' AND TABLE_NAME = 'SiteTree' AND COLUMN_NAME = 'Title'";
    foreach (SilverStripe\ORM\DB::query($sql) as $row) {
        echo "COLLATION_NAME is " . $row['COLLATION_NAME'] . "
";
    }
    $start = microtime(true);
    for ($i = 0; $i < 50000; $i++) {
        SilverStripe\ORM\DB::query("SELECT * FROM SiteTree");
    }
    $end = microtime(true);
    $time = $end - $start;
    $time = number_format((float)$time, 3, '.', '');
    echo "Time taken: $time seconds";
    die;
}

MySQL 8 removed the query cache, might be worth checking if that’s enabled when testing: https://dev.mysql.com/blog-archive/mysql-8-0-retiring-support-for-the-query-cache/

Probably not? The query cache has been disabled-by-default since MySQL 5.6 (2013)

Ah sorry I missed that part, I thought it was still enabled by default as I’ve found it enabled on servers before, but those must’ve been non-standard installs


Is this being supported

is this library still being supported we are about to start work on our website having build our react-native app first, and would like to be able to share logic. But as the site is very enterprise I'm not overly comfortable to use a library that is Alpha and the last significant enough release to put in releases was 10 months ago.

Do you have a release date yet?
On Wed, 28 Aug 2019 at 3:32 am Matt<EMAIL_ADDRESS>wrote:

It's supported, and it being actively developed. That said, there is a
bolded message when you fire up the dev server saying not to use it in
production. So YMMV.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/react-navigation/web/issues/38?email_source=notifications&email_token=AEKKMOBDOV476AHBTMUI2QTQGVQKBA5CNFSM4IL2K6XKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5IQS3A#issuecomment-525404524,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEKKMOH5PLM37ZNCHFWK4QLQGVQKBANCNFSM4IL2K6XA
.


fixed by PR's README.md

Updated the screenshot link in the readme, it was not working earlier. Fix now.
PR Description 📜
Please include summary related to the issue you have fixed and describe your PR in brief over here by specifying the issue number on which you were working below
Fixes # <your_issue_number>

Mark the task you have completed ✅

[x] I follow CONTRIBUTING GUIDELINE & CODE OF CONDUCT of this project.
[x] I have performed a self-review of my own code or work.
[x] I have commented my code, particularly in hard-to-understand areas.
[x] My changes generates no new warnings.
[x] I have followed proper naming convention showed in CONTRIBUTING GUIDELINE
[x] I have added screenshot for website preview in assets/images
[x] I have added entries for my game in main README.md
[x] I have added README.md in my folder
[x] I have added working video of the game in README.md (optional)
[x] I have specified the respective issue number for which I have requested the new game.

Add your screenshots(Optional) 📸

Thank you soo much for contributing to our repository 💗

Thank you @vansh-codes ,for creating the PR and contributing to our GameZone 💗
Review team will review the PR and will reach out to you soon! 😇
Make sure that you have marked all the tasks that you are done with ✅.
Thank you for your patience! 😀

Thank you  @vansh-codes , for your valuable time and contribution in our GameZone 💗.
It’s our GameZone, so Let’s build this GameZone altogether !!🤝
Hoping to see you soon with another PR again 😇
Wishing you all the best for your journey into Open Source🚀


Remove long name test from the file system

Fixes #9

Thanks for the fix! However, there is one more long path in canadensis_dsdl_frontend/tests/simple_dsdl/canadensis/TwoHundredAndFiftyFiveCharactersLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLong.1.0.uavcan. Cloning repository works fine after removing it.

I removed that other file. Please try it now.

Merged and released as v0.3.1


type="number" not working since 2.10.0

Describe the bug
Since v2.10.0, the type="number" attribute is not working as designed.
To Reproduce

Copy the example Number input from Auro Docs:

<auro-input required type="number" id="demo40" maxlength="12">
  <slot slot="label">Account number</slot>
  <slot slot="helptext">Please enter your 12 digit account number.</slot>
</auro-input>

Expected behavior
User should not be able to enter alpha
Screenshots

Desktop (please complete the following information):
Repro-ed on Desktop
Additional context

@jordanchang I am unable to repro this issue on the auro docsite and this is using the latest 2.10.1.
Can you verify?

This is weird. I deleted node_modules and package-lock and its working now. Uggs. Apologies and closing.


problem with "Enable shortcuts on page"

if "Enable shortcuts on page" is enabled, you are unable to type "space" or use the left and right arrow keys to navigate while typing in a comment, as if all keystrokes are catched by the video player and not in the comment box

Duplicate of #1546, please close.


FEATURE: Support scalars

Adds helper class for easily support scalar types.

I'll try to add some doc comments (and possibly some basic documentation) in a separate change..


#54643 (Resource > Bill Accounts: Add Charge filter function)

Uploading ProjectManagement - Google Chrome 2024-01-23 10-37-43 (1) (1).mp4…

https://github.com/ncc-erp/ncc-erp-project/assets/153600705/bef0e000-6704-4eb0-a8d6-76e7329395e4

https://github.com/ncc-erp/ncc-erp-project/assets/153600705/f7a64ed6-c2da-41fb-95b2-7f9f6372277f

https://github.com/ncc-erp/ncc-erp-project/assets/153600705/8ff8d60d-f9d7-49d8-a036-3c28be0a6805

https://github.com/ncc-erp/ncc-erp-project/assets/153600705/09e2cc02-a68b-4ff4-8e0c-d8aa8e376795
bỏ biến ẩn biểu tượng X khi load trang
defauult = Charge


Not Supported Error Displaying

I am using asbplayer on chromium running on a mac. I set up asbplayer with ankiconnect and even mined 1 card. The problem is now it displays not supported when I try to to export to anki. I checked all my settings and I didn't change anything so I don't know what the problem could be. My other programs running ankiconnect, such as yomichan, still work.

If you go to the URL http://<IP_ADDRESS>:8765/ in your browser what do you see?
You'll want to be on at least version 6. Make sure AnkiConnect is up to date.

I fixed it. It was some issue with the specific subtitle file. I don't know what exactly but when I switched it out everything worked.

Awesome


[feature]: [Table widget] clicking on a Interact-able cell (button, icon button) should not select the corresponding row.

Currently, we're propagating the click event on a button in a table cell to the parent row, which results in the row getting selected. As part of this issue, we need to stop propagating the click event.
https://community.appsmith.com/t/multi-row-table-with-button-column/668

+1 for this

@sbalaji1192 will table v2 have the same issue?

@pranavkanade This has been fixed in Table v2. Clicking on button, icon button, and menu button will not select/unselect the corresponding row anymore.

Is it possible to intentionally select the parent row of the button clicked?

@benthielker You can use the Table.triggeredRow property to access the parent row when a button is clicked. you need to bind some action to the button in order for the triggeredRow to get populated.


Loading the configuration file in the client from the server instead

Resubmit of https://github.com/MichMich/MagicMirror/pull/1940 since I had some merge problems with git. Now with working tests too.
I took a first stab at making it possible to use environment variables in the configuration file ( https://github.com/MichMich/MagicMirror/issues/1756 ).
The biggest problem with this seemed to be that both the client and the server both loads the config file each, where the server has access to the environment variables and the client doesn't. But since the server already exposes the possiblity to get the config file like this:  https://github.com/MichMich/MagicMirror/blob/5bf90ae31d600e3f595ffd242b99515fa7905b1a/js/server.js#L56-L58
I figured fetching that as config instead of just including it would cause it to actually have the servers evaluated config instead (instead of this line):
https://github.com/MichMich/MagicMirror/blob/5bf90ae31d600e3f595ffd242b99515fa7905b1a/index.html#L43
I've tested it by setting configuration values to
{
	module: "helloworld",
	position: "lower_third",
	config: {
		"text": process.env.HELLO_WORLD
	}
}

And it seems to work and even apply to the client. Maybe this shouldn't be the recommended way to use environment variables in the configuration file, but this pull request would probably be needed whatever is decided.
Hope its ok to use fetch() since it works with npm start and all modern browsers seems to have supported it for a few years ( https://caniuse.com/#feat=fetch )

This changes the runtime the config.js is evaluated in and will properly break some configurations, that depend on being evaluated in the client.

I agree with Legion2. This has some implications. It might be simpler to add a helper function which you can use in your config:
{
	module: "helloworld",
	position: "lower_third",
	config: {
		"text": env('HELLO_WORLD', 'Fackback String')
	}
}

In the above example the env will communicate with the server to retrieve the env variable.

It is also possible to use a preprocessing step for config.js, that replaces all environment variables with their values at start time. This step must always be executed before starting MagicMirror.
@buxxi  If you are using the docker image of MagicMirror you can use https://github.com/jwilder/dockerize to do this. It supports a template syntax and can "inject" not only environment variables into any text file.

Check https://docs.magicmirror.builders/getting-started/manifesto.html#manifesto regarding preprocessors. Let's try to keep it simple as possible. :)

That dockerize just seems way too complicated for my preferences and I'm not sure if I want my setup for MM to depend on running it in a container.
That helper-function looks good, but how would it work since as far as I know you can't make the ajax-call to server be blocking? Tried to do something like that first without much success.
Understand the concern for breaking configurations but it feels kinda strange to have a file evaluated both in the client and the server where the same property could get two different values. Stuff like that would be really annoying to debug. Not that it helps in this case, but you mean it should really be the other way around where the client sends the evaluated config to the server instead (don't want to do that, just want to understand)?

Made an alternative attempt which actually gets almost the syntax @MichMich requested, but have yet to push it to github (first some refactoring, running tests etc). Not really liking this better than this pull request, but doing xmlhttprequest synchronous is deprecated so that doesn't seem to be a safe way to do it. The only other way I could possibly think of doing this is with some async+await+eval shenanigans.
It's working like this:

Made a new module env that exposes 2 methods; get(name, defaultValue) and getAllPrevious() (gets an object with all previous calls to the get populated as key-value)
server.js uses the getAllPrevious() to get all the environment-variables that was used when loading the server side config (So all unrelated environment variables isn't sent to the client) and injects that into the index.html like #VERSION# and #CONFIG_FILE#. For now I populated process.env with that object on the client side to make the env-module simpler.
then the module is included in index.html too.

@buxxi If your only concern is to use environment variables in the config/config.js you can use envsubst which is installed on most systems by default. Rename the config.js to config.template and use the shell variable syntax:
{
	module: "helloworld",
	position: "lower_third",
	config: {
		"text": "${HELLO_WORLD}"
	}
}

Create following script and make it executable.
run-start-with-env.sh:
#!/bin/bash
envsubst < config/config.template > config/config.js
./run-start.sh "$@"

Run run-start-with-env.sh instead of run-start.sh, it will read the environment variables on the server and create the config/config.js with the values of the variables.
envsubst does not support default values, but there are similar tools, that support more features.
Hint: all strings starting with $ are considered variables and are replaced even if they are empty or unset.

Well sure, if we can't get to a solution where it is built in I'll probably have to make some templating/scripting, but I would like to avoid that if possible. I don't really want to have to maintain a custom startup script, dockerfile etc just to avoid having api-keys in the configfile.
I don't think I'm the only one (got 2 likes for this PR :smile:) who wants the possiblity to set configuration values to environment variables.

Would also be happy to get a solution for this. The solution from @Legion2 could be implemented in a docker setup and/or in the script-repo from sam, but I think a "core-solution" is better.
Another point (want not to mix in another thing in this PR but it is similar): The config.js is public, so you can't run a mm under a public url without sharing all your api keys in the config.js.

Created a new branch with my other alternative way of doing this, see this commit:
https://github.com/buxxi/MagicMirror/commit/c8d393f1f5951a9fb8f6f3296243d576b5fde096
Can be used in the config as this:
{
	module: "helloworld",
	position: "lower_third",
	config: {
		"text": env.get('HELLO_WORLD', 'Fackback String')
	}
}

Not totally happy with how the environment-object is loaded in index.js, but I figured it was better than using another global variable or having to escape it to put in an attribute.
And it doesn't seem to be possible to change the source branch for the pull request so please tell me if this is the way to go before I close this and open a new pull request again.

Care to take a look at it @MichMich?

The problem with this, is that I have the feeling that we are overcomplicating things for just some edge-cases. Maybe it's better to write a separate module that fetches ENV variables does some magic with it? This way, the login stays outside of the core.

Well, I'm not really convinced it being an edge case. But will try to make a module instead (if I can make some magic :smile:).

I created bastilimbach/docker-MagicMirror#42 which add support for template variables in the configuration file to the docker image. The template variables are evaluated on the server side before the server is started.


Custom sorting/position is not honored for V2

Using an annotation such as:
@ApiOperation(
         value = "Operation",
         notes = "Notes",
         position = 2
 )

and a custom ordering such as:
docket.apiDescriptionOrdering(new Ordering<ApiDescription>() {

        @Override
        public int compare(ApiDescription left, ApiDescription right) {
            int leftPos = left.getOperations().size() == 1 ? left.getOperations().get(0).getPosition() : 0;
            int rightPos = right.getOperations().size() == 1 ? right.getOperations().get(0).getPosition() : 0;

            int position = Integer.compare(leftPos, rightPos);

            if(position == 0) {
                position = left.getPath().compareTo(right.getPath());
            }

            return position;
        }
    });

The scanner framework seems to read the documentation and sort it properly. When the data is extracted to the Swagger object at Swagger2Controller.java:74, the ordering seems to be lost.

Unfortunately that is because of the data structure that swagger-core uses. There is now way for us to fix that.

A LinkedHashMap preserves insertion order when iterated. If you insert things in sorted order, they should stay that way.
It looks like the offending code is here. It's certainly something that could be fixed by subclassing the Swagger object and getting rid of the extra sort.

Thanks for digging deeper! :) Im closing this issue for now

This means you will not address it?

There is nothing for us to address here :confused:

If Docket#apiDescriptionOrdering and Docket#apiListingReferenceOrdering are non-functional, you may want to indicate that by either adding a javadoc comment (if you expect the issue to eventually be corrected) or deprecating them (if this is not a feature you will support).

Just to be clear, we have an internal model that totally works as expected and functional. The api descriptions and api operations will be sorted as expected from springfox's standpoint. We're only using the swagger models as DTOs to handle the serialization of our internal service models. Once the DTO's are fixed to preserve the ordering this problem will go away.
We can certainly add a note to describe the problem and the cause to the Readme. Other than waiting for swagger core to fix this, there is nothing to do here other than that I'm afraid.

bro,why it does not work in version 2.7.0--the newest version？

@Bean
public Docket createRestApi() {
    return new Docket(DocumentationType.SWAGGER_2)
            .apiInfo(apiInfo())
            .select()
            .apis(RequestHandlerSelectors.basePackage(basePackage))
            .paths(PathSelectors.any())
            .build().apiListingReferenceOrdering(new Ordering<ApiListingReference>() {
                @Override
                public int compare(ApiListingReference left, ApiListingReference right) {
                    //System.err.println(left.getPath()+"********************"+right.getDescription());//it works
                    //System.out.println(left.getPosition()+" ----------------------- "+right.getPosition());//it works
                    return left.getPosition()>=right.getPosition()?-1:1;
                }
            }).operationOrdering(new Ordering<Operation>() {
                @Override
                public int compare(Operation left, Operation right) {
                    System.err.println(left.getNotes()+"********************"+right.getTags());//it works not
                    System.out.println(left.getPosition()+" ----------------------- "+right.getPosition());//it works not
                    return left.getPosition()>=right.getPosition()?-1:1;
                }
            });
}

anybody can check it  for me?

The swagger-models do not display sorted versions. thats the problem.

@yiranlihao not working, getPosition() just returns 0.

The swagger-models do not display sorted versions. thats the problem.

Does this affect apiListingReferenceOrdering. Because I just implemented a custom method inside apiListingReferenceOrdering and it gets invoked, but the results of the comparator seem to be ignored.

@abelsromero it does IIRC

I try new version 2.9.2，operationOrdering and apiListingReferenceOrdering not working！It’s a bug！

I try new version 2.9.2，operationOrdering and apiListingReferenceOrdering not working！It’s a bug！

Sounds like some BS, removed important feature with no care to fix.

it make me just can do this for sorting
@Api(value = "xxx", tags = "2", description = "hello")

Back to original post. The position field is deprecated in latest release and is not supported.
This very important feature is required for a simple way to order endpoints in a controller with default tags.
@ApiOperation(
         value = "Operation",
         notes = "Notes",
         position = 2
 )

.apiListingReferenceOrdering(new Ordering() {
@Override
public int compare(@NullableDecl ApiListingReference left, @NullableDecl ApiListingReference right) {
System.out.println(left.getDescription() + left.getPosition() + "--" + right.getDescription() + right.getPosition());
System.out.println(Integer.compare(left.getPosition(), right.getPosition()));
return Integer.compare(left.getPosition(), right.getPosition());
}
})

Are there any plans to fix this? My colleagues are faced with use cases where this will benefit us but we're unable to order the endpoints without performing a makeshift makeshift - and not very pleasant to view - ordering using tags.

I also encountered the same problem.
And found an extended solution, I hope to help you, and may submit a PR later.
There are five steps here.
The first step is to add position where needed.
For example:
/*
 *  Copyright 2019 the original author or authors.
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Yahuan Jin
 * @since 2019.08.24
 */
@Api(tags = "test", description = "test")
@RequestMapping("test/apiOperation")
@RestController
public class ApiOperationTestController {
    @ApiOperation(value = "Test position 2", tags = {"position-test"}, position = 2)
    @PostMapping(value = "aaa")
    public String testPositionAaa() {
        return "aaa";
    }

    @ApiOperation(value = "Test position 1", tags = {"position-test"}, position = 1)
    @RequestMapping(value = "bbb")
    public String testPositionBbb() {
        return "bbb";
    }
}

The second step is to support the position field, rewriting springfox.documentation.spring.web.readers.operation.ApiOperationReader.
For example:
/*
 *  Copyright 2015-2019 the original author or authors.
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

import com.google.common.base.Optional;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMethod;
import springfox.documentation.OperationNameGenerator;
import springfox.documentation.builders.OperationBuilder;
import springfox.documentation.service.Operation;
import springfox.documentation.spi.service.contexts.OperationContext;
import springfox.documentation.spi.service.contexts.RequestMappingContext;
import springfox.documentation.spring.web.plugins.DocumentationPluginsManager;
import springfox.documentation.spring.web.readers.operation.OperationReader;

import java.util.Collections;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;

import static com.google.common.collect.Lists.newArrayList;
import static java.util.Arrays.asList;

/**
 * @author {@link springfox.documentation.spring.web.readers.operation.ApiOperationReader
 * the original author}
 * @author Yahuan Jin
 * @see springfox.documentation.spring.web.readers.operation.ApiOperationReader
 * @since 2019.08.24
 */
@Component
public class SwaggerSupportPositionApiOperationReader implements OperationReader {

    private static final Set<RequestMethod> allRequestMethods
            = new LinkedHashSet<>(asList(RequestMethod.values()));
    private final DocumentationPluginsManager pluginsManager;
    private final OperationNameGenerator nameGenerator;

    @Autowired
    public SwaggerSupportPositionApiOperationReader(DocumentationPluginsManager pluginsManager,
                                                    OperationNameGenerator nameGenerator) {
        this.pluginsManager = pluginsManager;
        this.nameGenerator = nameGenerator;
    }

    @Override
    public List<Operation> read(RequestMappingContext outerContext) {
        List<Operation> operations = newArrayList();

        Set<RequestMethod> requestMethods = outerContext.getMethodsCondition();
        Set<RequestMethod> supportedMethods = supportedMethods(requestMethods);

        //Setup response message list
        Integer currentCount = 0;
        // Get position, then support position. NOTE: not support sorted by RequestMethod.
        int position = getApiOperationPosition(outerContext, 0);

        for (RequestMethod httpRequestMethod : supportedMethods) {
            OperationContext operationContext = new OperationContext(
                    new OperationBuilder(nameGenerator),
                    httpRequestMethod,
                    outerContext,
                    (position + currentCount));

            Operation operation = pluginsManager.operation(operationContext);
            if (!operation.isHidden()) {
                operations.add(operation);
                currentCount++;
            }
        }
        Collections.sort(operations, outerContext.operationOrdering());

        return operations;
    }

    private Set<RequestMethod> supportedMethods(final Set<RequestMethod> requestMethods) {
        return requestMethods == null || requestMethods.isEmpty()
                ? allRequestMethods
                : requestMethods;
    }

    private int getApiOperationPosition(final RequestMappingContext outerContext, final int defaultValue) {
        final Optional<ApiOperation> annotation = outerContext.findAnnotation(ApiOperation.class);
        return annotation.isPresent() ? annotation.get().position() : defaultValue;
    }
}

The third step is to not reset the sort of api list,  rewriting springfox.documentation.swagger2.mappers.ServiceModelToSwagger2MapperImpl.
For example:
/*
 *  Copyright 2015-2019 the original author or authors.
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

import com.google.common.base.Optional;
import com.google.common.collect.Multimap;
import io.swagger.models.Operation;
import io.swagger.models.Path;
import io.swagger.models.Swagger;
import org.springframework.stereotype.Component;
import springfox.documentation.service.ApiDescription;
import springfox.documentation.service.ApiListing;
import springfox.documentation.service.Documentation;
import springfox.documentation.swagger2.mappers.ServiceModelToSwagger2MapperImpl;

import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Objects;

import static springfox.documentation.builders.BuilderDefaults.nullToEmptyList;

/**
 * @author {@link springfox.documentation.swagger2.mappers.ServiceModelToSwagger2MapperImpl
 * the original author}
 * @author Yahuan Jin
 * @see springfox.documentation.swagger2.mappers.ServiceModelToSwagger2MapperImpl
 * @since 2019.08.24
 */
@Component
public class SwaggerOriginalSortedServiceModelToSwagger2MapperImpl extends ServiceModelToSwagger2MapperImpl {

    @Override
    public Swagger mapDocumentation(Documentation from) {
        final Swagger swagger = super.mapDocumentation(from);

        if (Objects.isNull(swagger)) {
            return null;
        }

        Map<String, Path> map__ = mapOriginalSortedApiListings(from.getApiListings());
        if (map__ != null) {
            swagger.setPaths(map__);
        }

        return swagger;
    }

    private Map<String, Path> mapOriginalSortedApiListings(Multimap<String, ApiListing> apiListings) {
        Map<String, Path> paths = new LinkedHashMap<>();
        for (ApiListing each : apiListings.values()) {
            for (ApiDescription api : each.getApis()) {
                paths.put(api.getPath(), mapOperations(api, Optional.fromNullable(paths.get(api.getPath()))));
            }
        }
        return paths;
    }

    private Path mapOperations(ApiDescription api, Optional<Path> existingPath) {
        Path path = existingPath.or(new Path());
        for (springfox.documentation.service.Operation each : nullToEmptyList(api.getOperations())) {
            Operation operation = mapOperation(each);
            path.set(each.getMethod().toString().toLowerCase(), operation);
        }
        return path;
    }
}

The fourth step is to override the default two beans.
The last step, specify the collation.
For example:
/*
 *  Copyright 2019 the original author or authors.
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

import com.google.common.collect.Ordering;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import springfox.documentation.OperationNameGenerator;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.ApiDescription;
import springfox.documentation.service.Operation;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.spring.web.plugins.DocumentationPluginsManager;
import springfox.documentation.spring.web.readers.operation.OperationReader;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
import springfox.documentation.swagger2.mappers.ServiceModelToSwagger2Mapper;

import java.util.List;

@EnableSwagger2
@Configuration
public class Swagger2Config {

    @Bean
    public Docket v1ApiDocket() {
        Docket docket = new Docket(DocumentationType.SWAGGER_2)
                .select()
                .apis(RequestHandlerSelectors.basePackage("com"))
                .paths(PathSelectors.any())
                .build();

        // Support position
        docket.apiDescriptionOrdering(new Ordering<ApiDescription>() {
            @Override
            public int compare(ApiDescription a, ApiDescription b) {
                final List<Operation> leftList = a.getOperations();
                final List<Operation> rightList = b.getOperations();
                return Integer.compare(leftList.get(0).getPosition(), rightList.get(0).getPosition());
            }
        });

        return docket;
    }

    @Primary
    @Bean(name = "default")
    public OperationReader operationReader(
            DocumentationPluginsManager pluginsManager, OperationNameGenerator nameGenerator) {
        return new SwaggerSupportPositionApiOperationReader(pluginsManager, nameGenerator);
    }

    @Primary
    @Bean(name = "serviceModelToSwagger2Mapper")
    public ServiceModelToSwagger2Mapper SwaggerOriginalSortedServiceModelToSwagger2MapperImpl() {
        return new SwaggerOriginalSortedServiceModelToSwagger2MapperImpl();
    }
}

Then see api page!

Pure and utter NONSENSE! FIX THIS!

If you want an open source project fixed contribute to the code yourself. Don't be so rude to those who maintain it.

Any new here? :D I would like to order my api too ... api-doc and swagger-ui ... more hints?


installation windows

Hello.
I did try to install coq platform for windows, and got this error:
CYGWIN INSTALL DIR (WIN)    = C:\cygwin64_coq
CYGWIN INSTALL DIR (MINGW)  = C:/cygwin64_coq
CYGWIN INSTALL DIR (CYGWIN) = /cygdrive/c/cygwin64_coq
"========== DOWNLOAD CYGWIN SETUP =========="
A subdirectory or file C:\Users\andre\AppData\Local\Temp\coq_platform_cygwin_cache already exists.
"========== INSTALL CYGWIN =========="
========== CONFIGURE CYGWIN USER ACCOUNT ==========
1 file(s) copied.
/cygdrive/c/cygwin64_coq/var/tmp/configure_profile.sh: line 2: $'\r': command not found
/cygdrive/c/cygwin64_coq/var/tmp/configure_profile.sh: line 4: $'\r': command not found
/cygdrive/c/cygwin64_coq/var/tmp/configure_profile.sh: line 6: $'\r': command not found
/cygdrive/c/cygwin64_coq/var/tmp/configure_profile.sh: line 10: $'\r': command not found
/cygdrive/c/cygwin64_coq/var/tmp/configure_profile.sh: line 12: $'\r': command not found
/cygdrive/c/cygwin64_coq/var/tmp/configure_profile.sh: line 15: $'\r': command not found
/cygdrive/c/cygwin64_coq/var/tmp/configure_profile.sh: line 50: syntax error: unexpected end of file
ERROR coq_platform_make_windows.bat failed

what can i do about it?

Sorry for the very late response - the issue is that you used a git client which adds a \r at each line of text files - which does not work for cygwin. Please setup your git client such, that it does not change files on checkout. I don't know any Windows editor which requires \r at the end of file, so changing files during checkout is really a bad idea. I am not sure why many Windows git clients do this by default.