Faster start-up when using many nested routers

First of all: Thanks a lot for your on this project! I never thought that Python Web Development (especially for back-ends) could be this much more fun.
Now to the main part: In my FastAPI project I have a lot of nested routers. Because the amount of nested routers I soon reached a FastAPI start-up time of 30 seconds or more. This hurt my developer experience a lot and I soon began digging in to why FastAPI takes so long to load.
After some research I found out that each router calculates all relevant infos on initialization. A router, which includes another router, will re-calculate these values without re-using information from the router it includes. When having a flat project structure this is not a problem.
So the solution was simple: Defer the calculation of values until they are actually needed. By doing that the start-up time was shortened significantly.
One caveat remains: Deferring the calculation results to Exceptions not being raised at start-up and they are only raised at the first call of a route. So they might not be caught if a route is not tested at least once.
This pull request is my proposal to integrate this performance optimization into FastAPI without breaking user space and having to modify tests. I mitigated the Exception's issue by introducing an argument to the APIRouter and APIRoute which decides if values are deferred or not and never deferring values in the top-level (app-integrated) router.
I'm sure there might be a better way. So let me hear if you have suggestions for improvement!
You can find my research and testing environment for this here: https://github.com/jvllmr/fastapi-deferred-init

Thanks you, @jvllmr!
This PR and #10546 might perfectly complement each other 🚀

I refactored the pull-request according to the latest changes.
In the meantime the performance improved already (probably because of changes in Pydantic). In my benchmark the median improvement was around 8 to 10x. My benchmark is very simple and there might be more improvement in real world applications.
The tests are failing as of now. I will look into it as soon as I can.

Hi @jvllmr!

The tests are failing as of now. I will look into it as soon as I can.

There was an unrelated issue with our CI that is now fixed, so you shouldn't see so many failing tests anymore.
The only test still failing here is the one measuring "coverage" - this basically ensures that all code paths in the code base are tested in our test suite. So, to fix it, it would be good to add a test with this PR that checks the correct behaviour of the new functionality introduced here 🚀
Specifically, when I look at the detailed coverage report, it's the init_routes function that isn't getting properly tested: https://smokeshow.helpmanual.io/6t005p5s2v3j6u064g0q/z_35ba7d295f00afa4_routing_py.html#t1160

Thanks for the hint. I will see if I can come up with some good tests over the weekend.

I updated the PR with tests for all the new logic I introduced, but I don't know why 99.0% coverage are still shown here.
It was green at first but then went back to red. When looking at the detailed report it still says 100%.
I'm also sorry for the messed up commit history (squash to the rescue).
Anyway, I  added more FastAPI features to my benchmark and the improvement became even more significant:
https://jvllmr.github.io/fastapi-deferred-init/dev/bench/

I actually found the offending lines. For some reason the summary at the bottom showed 100%, but I found the lines immediately when checking "Hide covered". All green now ✅ 🏁

I dropped the unintentional commits just to be sure

Thanks! We've got a bit of a reviewing queue at the moment, but we've added this one and will get back to you once we've been able to review it in more detail 🙏


[Typo] Update cloud-shell-try-it.md

Fixed a typo in the link to the Azure Cloud Shell quickstart

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs-ref-conceptual/includes/cloud-shell-try-it.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

Links fixed in live version. Closing.


Update nlu.md

#40

@tanvikapoor29 Are you working on it?

yes, i am working on it.

@tanvikapoor29 Are you working on it?


Merge ReKey operation from feat/rekey

Add op_rekey.go for kmip14 and kmip20.

View rendered README.md

Hi BK. The reason 71 files are changed is because the files you are comparing have altered all of the end of lines. The "master" files are using 'lf' and your files have added 'crlf'. I think we should stick with the original 'lf' and we can use .gitattributes to force the issue. If you use your editor or a tool to replace all CRLF with LF and commit, we should be able to see only your changes.
https://www.aleksandrhovhannisyan.com/blog/crlf-vs-lf-normalizing-line-endings-in-git/
On branch master
~/github.com/Seagate/kmip-go$ git ls-files --eol
i/lf    w/lf    attr/                 	.dockerignore
i/lf    w/lf    attr/                 	.github/workflows/go.yml
i/lf    w/lf    attr/                 	.gitignore
i/lf    w/lf    attr/                 	.golangci.yml
i/lf    w/lf    attr/                 	Dockerfile
i/lf    w/lf    attr/                 	LICENSE
Switched to a new branch 'feat/rekey'
~/github.com/Seagate/kmip-go$ git ls-files --eol
i/crlf  w/crlf  attr/                 	.dockerignore
i/crlf  w/crlf  attr/                 	.github/workflows/go.yml
i/crlf  w/crlf  attr/                 	.gitignore
i/crlf  w/crlf  attr/                 	.golangci.yml
i/crlf  w/crlf  attr/                 	Dockerfile
i/crlf  w/crlf  attr/                 	LICENSE

Hi BK, the files you committed are using the Windows end of line CRLF, but the original files are using the Linux LF. I feel that we should standardize of LF, especially since this is a repo we forked. For the files you did not change, it would be best to revert them to the old value.   You can try this on one file (that you didn't change) and make sure that you don't loose your work.

Will close this and send another merge request.


Virtualbox article updated

Added information on guest additions

[x] I have read freeCodeCamp's contribution guidelines.
[x] My pull request has a descriptive title (not a vague title like Update index.md)
[x] My pull request targets the master branch of freeCodeCamp.
[x] None of my changes are plagiarized from another source without proper attribution.
[x] My article does not contain shortened URLs or affiliate links.

If your pull request closes a GitHub issue, replace the XXXXX below with the issue number.
Closes #XXXXX

Closed and Reopened this PR to attempt to resolve a specific Travis build failure.

Close this PR because currently we only working on Simplified Chinese version.
Thank you for your contribution and I'm sure we will need you help when we have the Traditional Chiense Version.


Do Hubble images actually have FITS files to download?

I've never really looked at the HST products before, and I'm a little
confused. It doesn't look like the actual FITS files are available
download. I see:
Browse Image (full-size)
Browse Image (medium)
Browse Image (small)
Browse Image (thumbnail)
HST Calibrated Data Preview
HST FITS Header Text
HST Preview of Line Spectrum
HST Raw Data Preview
HST Raw Data Preview (lossless)
Also, to be consistent, shouldn't "HST Preview of Line Spectrum" be
called "HST Line Spectrum Preview"?

Mark has fixed HST Line Spectrum Preview.

No, they don't have FITS files for now. This is expected.


ARROW-12396: [Python][Docs] Clarify serialization/filesystem docstrings about deprecated status

Currently the docstring itself says nothing about it, there is only the warning when calling the function.

is it intended that you prefixed some of the docstrings with "DEPRECATED" but not all?

Ah, for serialization.pxi I just replaced the EXPERIMENTAL with DEPRECATED, but I see that not all of them had that label.


⚠ Bofrost.at has degraded performance

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

HTTP code: 200
Response time: 2552 ms

Resolved: Bofrost.at performance has improved in 67771ae after 6 minutes.


[SE-2007][Sema] Don't subject protocol 'Self' to availability checks in lookup

What's in this pull request?

It used to be impossible to ship anything with an unavailable protocol definition because in the process of verifying and type-checking its generic signature, invariably Self would resolve to an unavailable type.  Detect this and cut off diagnostic production by not subjecting Self to availability checks.
Resolved bug number: (SR-2007)

Before merging this pull request to apple/swift repository:

[ ] Test pull request on Swift continuous integration.

Triggering Swift CI
The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:
Smoke Testing
    Platform     | Comment
    ------------ | -------------
    All supported platforms     | @swift-ci Please smoke test
    All supported platforms     | @swift-ci Please smoke test and merge
    OS X platform               | @swift-ci Please smoke test OS X platform
    Linux platform              | @swift-ci Please smoke test Linux platform

Validation Testing
    Platform     | Comment
    ------------ | -------------
    All supported platforms     | @swift-ci Please test
    All supported platforms     | @swift-ci Please test and merge
    OS X platform               | @swift-ci Please test OS X platform
    OS X platform               | @swift-ci Please benchmark
    Linux platform              | @swift-ci Please test Linux platform

Lint Testing
    Language     | Comment
    ------------ | -------------
    Python       | @swift-ci Please Python lint

Note: Only members of the Apple organization can trigger swift-ci.

@swift-ci please test and merge.

Failure is unrelated.


Communicating with a bursting device when run on Windows

Hi,
Thanks for PyHART. I am running it on Windows 10 and trying to communicate with a slave in Burst Mode. It appears the code uses a state machine and timers when run with "rt_os = True" but on Windows it then just hangs. With  "rt_os = False" there seems to be no timing and communication then fails most of the times.
Do you have any idea to make using "rt_os = True" work on Windows?
regards,
Willem-Jan de Hoog

Mmm. I should have read the readme. Sorry.
Anyway I got it (no rtos) sort of working by adding an event and waiting for a BACK/OBACK before transmitting.
Is there anyway I can help with getting burst mode working with "rt_os = True"?

One of the things I noticed is that the RT1 timer is only stopped when the checksum byte is received but with long burst messages it has already expired.

Some more remarks.
In TransmitMessage time.sleep(txTime) should probably only happen if self._serial.rtscts == True. Or is there no other way to detect the end of transmission?
To me it looks like in WriteOnSerial when self.CanAccessFlag = False is set also self.CanAccessNetwork.clear() needs to be done.


text_on_image Creator - Web design #45

https://images01.nicepagecdn.com/page/12/46/html-template-1246832.jpg Design a text_on_image like the above image
Create a file "text_on_image_NUM_by_(YourName).html" in the modules/text_on_image folder.
Use simple HTML and CSS and JAVASCRIPT to create the text_on_image animation. You can use the interface development https://kwickerhub.com/ (This project) or you can write the lines of code yourself.
Step by Step Guide.
Fork this project(Use the 'fork' button in the top right corner) and Clone your Fork.
git clone https://github.com/YOUR_USERNAME/frontend
Open your code Editor and Create a file "text_on_image_NUM_YOUR_NAME_.html" in the "modules/text_on_image" folder of this project you just cloned. No need to create head, title and body tags, Just Add a div tag with some embedded style(i.e use the style tag) and the script tag where necessary.
If you want to add an image resource, please add it in the folder ••
"modules/text_on_image/images_and_icons"
We recommend you use an svg for your image/icon.
Push your Code: You need to push your recent changes back to the cloud. Use the command below in the main directory of this Repository
git push origin dev
or use a GUI tool to avoid mistakes or complexity. LOL.
Then make you Pull Request...
Below is a example of the code structure we need:
<div>
    <!---YOUR CODE---->
</div>

<style>
    /* YOUR STYLE */
</style>

<script>
    // YOUR SCRIPT if any
</script>

The goal of this issue is to create modules that other people/dev/designers can use or easily import into their projects. Avoid the desire to style all elements in the page by using codes like:
<style>

*{

}
/* OR */

div, a, h1, pre{

}

</style>

use classes or id to style the elements to avoid a collision of styles.
Remember to make your module usable across different screens(Make your design responsive).
For more examples:
modules->buttons
modules->cards
for examples of contributions or Pull request accepted in to the project.
And please do not wait for this issue to be assigned to you as we have limited hands but have a lot to do/cover. Please send in your PR.
Good-luck and thank you.

@NtemKenyor can you please assign this to me?

I started working on it will update tomorrow.

Hey @NtemKenyor I have created a pull request. I have used HTML, CSS to work on this issue. Please look into it.


Solarpilot copilot merge

Adding Copilot API functionality.

Closing to accommodate new pull request with further updates, per discussion with @qualand.


Update API section

Mailcoach PR: https://github.com/spatie/laravel-mailcoach/pull/348

Closing this because implementation might be too heavy. Feel free to PR the changes around tagging separately,


update copyright statement?

@josegonzalez license says

Copyright (C) 2014 Jeff Lindsay

which I guess was copied from dokku , but ansible-dokku actually started much later and, to my knowledge, Jeff Lindsay has not contributed code to it.

I guess we can update that. I actually don't know what we should do, is setting it to me with whatever the starting date of the project was okay? /shrug

Keep, sounds good


Add try .. except block to _ParseJSON() method and some negative unit-tests for it

Add an error handler to _ParseJSON() and negative unit-tests.
Here you need to think about what is better to return on errors: None, empty dict {}, warning and None or {}, only warning or raise exception?
Also, check when rawData does not contains string with dict (no { .. }).

Implemented in builds v1.6.*


Add support for handling browserless session timeout

Description
browserless have default browser session timeout as 30s by default https://docs.browserless.io/Docker/docker#connection-timeout, this can be turned off by setting -1 in the browserless container env variable. However, when it enabled, the session got terminated after timeout period then scrapy-playwright unable to make any new connection. It raises following error
playwright._impl._errors.TargetClosedError: Browser.new_context: Target page, context or browser has been closed

browserless logs
  browserless.io:limiter:warn  Job has hit timeout after 599,999ms of activity. +0ms
  browserless.io:limiter:info  Calling timeout handler +10m
  browserless.io:router:error  Websocket job has timedout, sending 429 response +0ms
  browserless.io:limiter:info  (Running: 0, Pending: 0) All jobs complete.  +0ms
  browserless.io:router:trace  WebSocket Request handler has finished. +10m
  browserless.io:browser-manager:info  0 Client(s) are currently connected, Keep-until: 0 +32m
  browserless.io:browser-manager:info  Closing browser session +0ms
  browserless.io:browser-manager:info  Deleting "/tmp/browserless-data-dirs/browserless-data-dir-067abc88-1797-4bc2-9da0-090e23cc0e6a" user-data-dir and session from memory +0ms
  browserless.io:ChromiumCDPWebSocketRoute:info <IP_ADDRESS> Closing ChromiumCDP process and all listeners +10m
  browserless.io:server:trace  Websocket connection complete +10m
  browserless.io:browser-manager:info  Deleting data directory "/tmp/browserless-data-dirs/browserless-data-dir-067abc88-1797-4bc2-9da0-090e23cc0e6a" +11ms

Worst case scenario, When i setup following config, the scrapy process got hang without raising any errors.
{
         "PLAYWRIGHT_MAX_CONTEXTS": 1,
         "PLAYWRIGHT_MAX_PAGES_PER_CONTEXT": 1,
}

Expected behavior
This should be handled to create a new session, if it's already closed.

I assume you are using PLAYWRIGHT_CDP_URL, correct? Please share a a Minimal, Reproducible Example.

Also, this seems related to #167 and #189.

Here is my complete spider script. https://github.com/mhdzumair/MediaFusion/blob/ba60d58aad96a278a61249b6d708fd82b7bf5d81/mediafusion_scrapy/spiders/tgx.py#L252-L266

This sounds like an actual issue but it's only about connecting to the browser, a few simple requests and some waiting to exhaust the timeout should suffice: it should be possible to reproduce it with around 30 lines of code. Please don't point to a full spider with pipelines, a Redis connection, item processing, etc.

@mhdzumair
The browserless timeout can be turned off by setting timeout=0 in CDP connection string
PLAYWRIGHT_CDP_URL = 'ws://localhost:3000/playwright/firefox?token=12345&timeout=0'

Yes, I'm aware of that timeout setting as I mentioned in the issue description, which I'm setting as -e "TIMEOUT='-1'"
So here is the minimal code to reproduce the error.
Run the browserless in container, docker run -e "TIMEOUT=60000"  -p 3000:3000 ghcr.io/browserless/chromium I'm just setting timeout as 60s here. So after 60 second it will raise the error as above in the description. Additionally, You can set -e "TIMEOUT='-1'"   | -e "TIMEOUT=0" to disable it.
class TGXSpider(scrapy.Spider):
    name = "tgx_spider"
    start_urls = [
        "https://torrentgalaxy.to/profile/F1Carreras/torrents/0",
    ]

    custom_settings = {
        "PLAYWRIGHT_BROWSER_TYPE": "chromium",
        "PLAYWRIGHT_CDP_URL": "ws://localhost:3000?blockAds=true&stealth=true",
        "DOWNLOAD_HANDLERS": {
            "https": "scrapy_playwright.handler.ScrapyPlaywrightDownloadHandler",
            "http": "scrapy_playwright.handler.ScrapyPlaywrightDownloadHandler",
        },
        "PLAYWRIGHT_MAX_CONTEXTS": 1,
        "PLAYWRIGHT_MAX_PAGES_PER_CONTEXT": 1,
        "DEBUG": True,
    }

    def parse(self, response, **kwargs):
        # Extract torrent links from the profile page

        torrent_links = response.css("div.tgxtablecell a::attr(href)").getall()
        for link in torrent_links:
            if "/torrent/" not in link:
                continue

            tgx_unique_id = link.split("/")[-2]
            torrent_page_link = response.urljoin(link)

            yield response.follow(
                torrent_page_link,
                self.parse_torrent_details,
                meta={
                    "playwright": True,
                    "playwright_page_goto_kwargs": {
                        "wait_until": "domcontentloaded",
                        "timeout": 60000,
                    },
                    "playwright_page_methods": [
                        PageMethod(
                            "wait_for_selector", "#smallguestnav", timeout=60000
                        ),
                    ],
                },
            )

    def parse_torrent_details(self, response):
        title = response.css("title::text").get()
        file_details = response.css(
            "table.table-striped tr td.table_col1::text"
        ).getall()

        data = {
            "title": title,
            "file_details": file_details,
        }
        print(data)
        yield data

Yes, i can reproduce it.
Browserless automatically close the page after timeout. If page is accessed afterwards then Target Page closed error raised by the scrapy-playwright

I can reproduce with the following:
# separate terminal
$ docker run -e "TIMEOUT=5000" -p 3000:3000 ghcr.io/browserless/chromium

# timeout.py
import asyncio
import scrapy

class TimeoutTest(scrapy.Spider):
    name = "timeout"
    custom_settings = {
        "TWISTED_REACTOR": "twisted.internet.asyncioreactor.AsyncioSelectorReactor",
        "DOWNLOAD_HANDLERS": {
            "https": "scrapy_playwright.handler.ScrapyPlaywrightDownloadHandler",
        },
        "PLAYWRIGHT_CDP_URL": "ws://<IP_ADDRESS>:3000",
    }

    def start_requests(self):
        yield scrapy.Request("https://example.org", meta={"playwright": True})

    async def parse(self, response):
        await asyncio.sleep(6)
        print(response.url)
        yield scrapy.Request("https://example.com", meta={"playwright": True})

$ scrapy runspider timeout.py
(...)
2024-07-03 17:38:08 [scrapy.core.engine] INFO: Spider opened
2024-07-03 17:38:08 [scrapy.extensions.logstats] INFO: Crawled 0 pages (at 0 pages/min), scraped 0 items (at 0 items/min)
2024-07-03 17:38:08 [scrapy.extensions.telnet] INFO: Telnet console listening on <IP_ADDRESS>:6023
2024-07-03 17:38:08 [scrapy-playwright] INFO: Starting download handler
2024-07-03 17:38:13 [scrapy-playwright] INFO: Connecting using CDP: ws://<IP_ADDRESS>:3000
2024-07-03 17:38:14 [scrapy-playwright] INFO: Connected using CDP: ws://<IP_ADDRESS>:3000
2024-07-03 17:38:14 [scrapy-playwright] DEBUG: Browser context started: 'default' (persistent=False, remote=True)
2024-07-03 17:38:14 [scrapy-playwright] DEBUG: [Context=default] New page created, page count is 1 (1 for all contexts)
2024-07-03 17:38:14 [scrapy-playwright] DEBUG: [Context=default] Request: <GET https://example.org/> (resource type: document)
2024-07-03 17:38:14 [scrapy-playwright] DEBUG: [Context=default] Response: <200 https://example.org/>
2024-07-03 17:38:14 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://example.org> (referer: None) ['playwright']
2024-07-03 17:38:18 [scrapy-playwright] DEBUG: Browser context closed: 'default' (persistent=False, remote=True)
https://example.org/
2024-07-03 17:38:21 [scrapy.core.scraper] ERROR: Error downloading <GET https://example.com>
Traceback (most recent call last):
  File "/.../lib/python3.10/site-packages/twisted/internet/defer.py", line 1996, in _inlineCallbacks
    result = context.run(
  File "/.../lib/python3.10/site-packages/twisted/python/failure.py", line 519, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/.../lib/python3.10/site-packages/scrapy/core/downloader/middleware.py", line 54, in process_request
    return (yield download_func(request=request, spider=spider))
  File "/.../lib/python3.10/site-packages/twisted/internet/defer.py", line 1248, in adapt
    extracted: _SelfResultT | Failure = result.result()
  File "/home/eugenio/zyte/scrapy-playwright/scrapy_playwright/handler.py", line 319, in _download_request
    page = await self._create_page(request=request, spider=spider)
  File "/home/eugenio/zyte/scrapy-playwright/scrapy_playwright/handler.py", line 240, in _create_page
    ctx_wrapper = await self._create_browser_context(
  File "/home/eugenio/zyte/scrapy-playwright/scrapy_playwright/handler.py", line 195, in _create_browser_context
    context = await self.browser.new_context(**context_kwargs)
  File "/.../lib/python3.10/site-packages/playwright/async_api/_generated.py", line 13460, in new_context
    await self._impl_obj.new_context(
  File "/.../lib/python3.10/site-packages/playwright/_impl/_browser.py", line 127, in new_context
    channel = await self._channel.send("newContext", params)
  File "/.../lib/python3.10/site-packages/playwright/_impl/_connection.py", line 59, in send
    return await self._connection.wrap_api_call(
  File "/.../lib/python3.10/site-packages/playwright/_impl/_connection.py", line 514, in wrap_api_call
    raise rewrite_error(error, f"{parsed_st['apiName']}: {error}") from None
playwright._impl._errors.TargetClosedError: Browser.new_context: Target page, context or browser has been closed
2024-07-03 17:38:21 [scrapy.core.engine] INFO: Closing spider (finished)
(...)


Quoteblocks turn to > text instead of normal quoteblock

If you do
> A

in Markdown-it, it apparently outputs
> A

instead of

A

https://markdown-it.github.io/#md3={"source"%3A"> A"%2C"defaults"%3A{"html"%3Afalse%2C"xhtmlOut"%3Afalse%2C"breaks"%3Afalse%2C"langPrefix"%3A"language-"%2C"linkify"%3Atrue%2C"typographer"%3Atrue%2C"_highlight"%3Atrue%2C"_strict"%3Afalse%2C"_view"%3A"html"}}
Works as needed.

Ok, seems like other library replaced all > to >.


Prepping for version substitution

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@54e8d52). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master       #1   +/-   ##
=========================================
  Coverage          ?   92.94%
=========================================
  Files             ?        5
  Lines             ?      241
  Branches          ?        0
=========================================
  Hits              ?      224
  Misses            ?       17
  Partials          ?        0

Continue to review full report at Codecov.

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


makeWrapper: Don't duplicate values when prefixing/suffixing, add tests

Motivation for this change
Picking up and continuing the great work done by @dasJ in #127678.
When prefixing or suffixing list variables in makeWrapper, check that the value or values aren't already part of the list. If this is the case when suffixing, leave the list untouched. When prefixing, however, move the last matching instance of the value to the beginning of the list. Any remaining duplicates of the value will be left as-is.
This should provide a better way forward in fixing the the breakage introduced by #125405.
Also, add tests to make sure the wrapper behaves as intended.
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
21.11 Release Notes (or backporting 21.05 Relase notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 128503 at d3a9a5f7 run on x86_64-linux 1

168 packages marked as broken and skipped:

adobe-reader
adoptopenjdk-hotspot-bin-13
adoptopenjdk-hotspot-bin-14
adoptopenjdk-jre-hotspot-bin-13
adoptopenjdk-jre-hotspot-bin-14
adoptopenjdk-jre-openj9-bin-13
adoptopenjdk-jre-openj9-bin-14
adoptopenjdk-openj9-bin-13
adoptopenjdk-openj9-bin-14
airtame
autotrace
blastem
cassandra_2_1
cassandra_2_2
clang-sierraHack
clang-sierraHack-stdenv
clickshare-csc1
curaByDagoma
cura_stable
darwin.CF
dcraw
displaycal
dvd-slideshow
eagle7
electron_3
electron_4
electron_5
epsxe
erlang_basho_R16B02
eterm
evilvte
ffmpeg_2
ffmpeg_2_8
ffmpeg_3
ffmpeg_3_4
git-dit
gitin
globalplatform
gnash
go_1_14
gogoclient
googleearth-pro
gppcscconnectionplugin
gpshell
grass
green-pdfviewer
gtmess
hadoop
hadoop_2_7
hadoop_2_8
hadoop_2_9
hplipWithPlugin_3_16_11
hplip_3_16_11
impressive
intecture-cli
invoice2data
jboss
jfbpdf
jfbview
julia
julia-bin
julia-lts
julia-lts-bin
julia_10
julia_10-bin
k2pdfopt
keyfinder
libav
libav_0_8
libav_11
libav_12
libgit2_0_27
libgroove
libnats-c
libvirt_5_9_0
linuxPackages_hardkernel_4_14.akvcam
linuxPackages_hardkernel_4_14.amdgpu-pro
linuxPackages_hardkernel_4_14.bcc
linuxPackages_hardkernel_4_14.bpftrace
linuxPackages_hardkernel_4_14.chipsec
linuxPackages_hardkernel_4_14.evdi
linuxPackages_hardkernel_4_14.nvidia_x11
linuxPackages_hardkernel_4_14.nvidia_x11_beta
linuxPackages_hardkernel_4_14.nvidia_x11_legacy340
linuxPackages_hardkernel_4_14.nvidia_x11_legacy390
linuxPackages_hardkernel_4_14.nvidia_x11_vulkan_beta
linuxPackages_hardkernel_4_14.openrazer
linuxPackages_hardkernel_4_14.prl-tools
linuxPackages_hardkernel_4_14.sysdig
linuxPackages_hardkernel_4_14.systemtap
linuxPackages_hardkernel_4_14.virtualbox
linuxPackages_hardkernel_4_14.virtualboxGuestAdditions
linuxPackages_hardkernel_4_14.xpadneo
linuxPackages_hardkernel_4_14.zfs
linuxPackages_hardkernel_4_14.zfsStable
linuxPackages_hardkernel_4_14.zfsUnstable
linuxPackages_hardkernel_latest.akvcam
linuxPackages_hardkernel_latest.amdgpu-pro
linuxPackages_hardkernel_latest.bcc
linuxPackages_hardkernel_latest.bpftrace
linuxPackages_hardkernel_latest.chipsec
linuxPackages_hardkernel_latest.evdi
linuxPackages_hardkernel_latest.nvidia_x11
linuxPackages_hardkernel_latest.nvidia_x11_beta
linuxPackages_hardkernel_latest.nvidia_x11_legacy340
linuxPackages_hardkernel_latest.nvidia_x11_legacy390
linuxPackages_hardkernel_latest.nvidia_x11_vulkan_beta
linuxPackages_hardkernel_latest.openrazer
linuxPackages_hardkernel_latest.prl-tools
linuxPackages_hardkernel_latest.sysdig
linuxPackages_hardkernel_latest.systemtap
linuxPackages_hardkernel_latest.virtualbox
linuxPackages_hardkernel_latest.virtualboxGuestAdditions
linuxPackages_hardkernel_latest.xpadneo
linuxPackages_hardkernel_latest.zfs
linuxPackages_hardkernel_latest.zfsStable
linuxPackages_hardkernel_latest.zfsUnstable
loxodo
metamorphose2
mfcl8690cdwcupswrapper
mrxvt
mupdf_1_17
nomad_0_12
obinskit
odpdown
odroid-xu3-bootloader
openrw
openssh_gssapi
openssh_hpn
opentsdb
oven-media-engine
ovftool
pbis-open
pcsxr
pdfdiff
pdfread
pgadmin
pig
plover.stable
riak
ring-daemon
rxvt
scallion
scribus
scyther
shellinabox
sipwitch
spark
staruml
stepmania
swftools
swift
termplay
thrift-0_10
torchat
tvheadend
twinkle
unicap
vdrPlugins.markad
vdrPlugins.vaapidevice
vdrPlugins.xineliboutput
vp
winpdb
xorg.libAppleWM
xpdf
xsw
yaxg
zgv

29088 packages skipped due to time constraints:

AusweisApp2
CHOWTapeModel
DisnixWebService
EBTKS
EmptyEpsilon
Fabric (python38Packages.Fabric)
LAStools
LASzip
LASzip2
Literate
...

6 packages built successfully:

bash-supergenpass
chibi
darwin.sigtool
makeWrapper
openresolv
sbclBootstrap

Rebased on staging and squashed all the fixups.

What's the status of this ?

@GrahamcOfBorg build tests.makeWrapper

@symphorien Should be ready to merge now :)

I believe this change may be responsible for a bug I ran into, presumably because the values being prefixed contained a ? and aren't being escaped properly - other lua packages may be affected too?


added slice_edge

Resolves #260

@googlebot I signed it!

Take a look at the linter and pytype errors. Once those are fixed this should be good to pull in.


API to caculate the FLOPs

Considering your expertise, I was wondering if you have any plans to share or upload an API for FLOPs calculation on GitHub. Such an API would be incredibly valuable for the community, including researchers and practitioners working on optimizing deep learning models.
If you have already developed such an API or have plans to do so, I would greatly appreciate it if you could share the repository link or provide any details about how others can access and use your FLOPs calculation API.

Hi!
Unfortunately, I do not have such an API, so there is nothing to share. The estimates of FLOPs for tensor operations, which are provided in the text of the paper, were made approximately using O-notation and based on the total number of multiplications involved in the operation.
I would also be happy to get access to such an API and make exact quantitative estimates of the real FLOPs given by our method, so feel free to share if you find it! :)


gradle on-boarding setup improvement

Expected Behavior
Discern setup procedure described at
https://github.com/gradle/gradle/blob/master/CONTRIBUTING.md
Current Behavior
unable to discern setup procedure
Context
What are you trying to accomplish?
Contribute to development of Gradle Build
Steps to Reproduce
see attachment  "Gradle on-board setup 2020-03-03.docx"
Your Environment
Windows 10 pc workstation; IntelliJ Community Edition 2019.3.1; JDK 11
Gradle on-board setup 2020-03-03.docx

Update:
This link appears to indicate that JetBrains removed the "create separate module per source set" from the UI https://youtrack.jetbrains.com/issue/IDEA-222172, but a work-around may exist by hand-editing the .idea/gradle.xml file.   I'll try that and provide an update.

Update:
The work-around file ".idea/gradle.xml", no longer exists, therefore the work-around is defeated.
Is gradle Build maybe using an earlier version of IntelliJ, or can you recommend some other course of action.


Magically apply codestyle for all FirebaseUI developers

@samtstern I'm really excited about this one!!! 😄 I learned about this while working on another open-source project that doesn't use hungarian notation: when working on projects like those, I'm used to having to switch to a different codestyle that doesn't make Intellij automatically add m and s prefixes to fields, but in this case my code style had already been updated which blew my mind. Anyway, the trick is to have the codeStyleSettings.xml file pre-loaded with the following option:
<option name="USE_PER_PROJECT_SETTINGS" value="true" />

This makes Intellij prioritize the project codestyle vs your own style. Mind blown! 💥 🚀 😄 This also means that any updates we make to the style will be used by all contributors. Pretty awesome, right?

Cool!  Let's give this a try.  If it causes pain, we can roll this back easily.


Crash in a scheduler exhaustion example

Hi,
I was writing an example of how monopolizing the scheduler threads with tight loops could lead to standstill. Expected behavior: some output, then full CPU load, but no output. However, the program seems to crash pretty soon (in release mode). The same program does not crash in debug mode:
use "time"
use "collections"

class Tick is TimerNotify
  let _env : Env
  var _counter: U64 = 0

  new iso create(env: Env) =>
    _env = env

  fun ref _next(): String =>
    _counter = _counter + 1
    _counter.string()

  fun ref apply(timer: Timer, count: U64): Bool =>
    _env.out.print("Tick "+_next())
    true

actor Loader
  var _counter: U64 = 0
  let _env : Env

  new create(env: Env) =>
    _env = env

  be spin() =>
    _spin()

  fun ref _spin() =>
    while _counter >=  0 do
      _counter = _counter + 1
    end
    _env.out.print(_counter.string())

class Load is TimerNotify
  let _env : Env
  let _loaders: List[Loader] = List[Loader]
  var _counter: U64 = 0

  new iso create(env: Env) =>
    _env = env

  fun ref _next() =>
    _counter = _counter + 1
    _env.out.print("Started task "+_counter.string())
    let l = Loader(_env)
    _loaders.push(l)
    l.spin()

  fun ref apply(timer: Timer, count: U64): Bool =>
    _next()
    true

actor Main
  new create(env: Env) =>
    let timers = Timers
    let timer = Timer(Tick(env), 0, 1_000_000_000 /*1s*/)
    timers(consume timer)
    env.out.print("Started the ticker")
    let load_timer = Timer(Load(env), 0, 2_000_000_000 /*2s*/)
    timers(consume load_timer)

on Windows: ponyc && test.exe → crash, but ponyc --debug && test.exe → no crash
0.21.0-acd811b [release]
compiled with: llvm 3.9.1 -- msvc-15-x64

same on OSX:
0.21.0 [release]
compiled with: llvm 3.9.1 -- Apple LLVM version 9.0.0 (clang-9<IP_ADDRESS>)

For a cross-check, 0.20 crashes too:
0.20.0-0b2a2d2 [release]
compiled with: llvm 3.9.1 -- msvc-14-x64

P.S. no rush, by the way. Reporting it, as Pony's stability might be endangered

curiously, adding some calculation in the tight loop does makes the program run without a crash
      if (_counter %<PHONE_NUMBER>) == 0 then
        _env.out.print("ping")
      end

https://gist.github.com/d-led/a92c1e4aa51b87f587976995d397dbcb

with debug runtime but release build:
(lldb) run
Process 8042 launched: './issue-2441' (x86_64)
Started the ticker
Tick 1
Started task 1
Process 8042 stopped

thread #2: tid = 0x60e437, 0x0000000100000e7b issue-2441Env_Trace + 11, stop reason = EXC_BAD_ACCESS (code=1, address=0x10)   frame #0: 0x0000000100000e7b issue-2441Env_Trace + 11
issue-2441`Env_Trace:
->  0x100000e7b <+11>: movq   0x10(%rbx), %rsi
0x100000e7f <+15>: leaq   0x283ea(%rip), %rdx
0x100000e86 <+22>: movl   $0x2, %ecx
0x100000e8b <+27>: callq  0x100015c10               ; pony_traceknown at trace.c:109

The bug is triggered by _spin() method.
Not sure why though.

I don't have time to investigate further but... this happens in release but not debug. I'm pretty sure this is the result of an LLVM optimization of:
    while _counter >=  0 do
      _counter = _counter + 1
    end

given that will always be true, i'm interested to see what LLVM is producing in release mode as an optimization.
This for example, has no segfaulting issues:
  fun ref _spin() =>
    _counter = 0
    while _counter < U64.max_value() do
      _counter = _counter + 1
    end
    _env.out.print(_counter.string())

@d-led you should be able to keep working and get your desired effect with this:
  fun ref _spin() =>
    while _counter < U64.max_value() do
      if _counter == (U64.max_value() - 1) then
        _counter = 0
      end
      _counter = _counter + 1
    end
    _env.out.print(_counter.string())

@SeanTAllen thanks for your investigation! Will continue poking around + use your proposal

FYI, as of 0.37.0 this is still a problem with optimized builds.
However, the error is a little different.
~/pony-scratch/2441 ➜ lldb -- ./2441
(lldb) target create "./2441"
Current executable set to '/home/sean/pony-scratch/2441/2441' (x86_64).
(lldb) run
Process 6653 launched: '/home/sean/pony-scratch/2441/2441' (x86_64)
Started the ticker
Tick 1
Started task 1
Process 6653 stopped
* thread #3, name = '2441', stop reason = signal SIGILL: illegal instruction operand
    frame #0: 0x0000000000403191 2441`Loader_Dispatch + 81
2441`Loader_Dispatch:
->  0x403191 <+81>: ud2
    0x403193:       nopw   %cs:(%rax,%rax)
    0x40319d:       nopl   (%rax)
2441`Loader_Trace:
    0x4031a0 <+0>:  movq   0x108(%rsi), %rsi
(lldb) bt
* thread #3, name = '2441', stop reason = signal SIGILL: illegal instruction operand
  * frame #0: 0x0000000000403191 2441`Loader_Dispatch + 81
    frame #1: 0x0000000000409ad6 2441`ponyint_actor_run + 214
    frame #2: 0x000000000041255f 2441`run_thread + 2287
    frame #3: 0x00007ffff7f9b609 libpthread.so.0`start_thread + 217
    frame #4: 0x00007ffff7d46103 libc.so.6`__clone + 67

a side remark, the Go run-time has managed to implement tight loop pre-emption

I am no longer able to reproduce this as of ponyc 0.46.0.

This probably got fixed when we upgraded to LLVM 12, which allowed to have infinite loops at the IR level.

can confirm. Nice. Although, the scheduler exhaustion is not that nice - it's a trade-off :)


Make openssl optional

This removes the need for openssl in reqwest and attohttpc dependencies, currently it is not possible to compile without openssl.
Add the following to Cargo.toml in your project:
rust-s3 = {version = "0.24", default-features = false, features = ["rustls-tls"]}
aws-creds = {version = "0.24", default-features = false, features = ["rustls-tls"]}

[patch.crates-io]
aws-creds = { git = "https://github.com/koplas/rust-s3/", branch="rustls"}
rust-s3 = { git = "https://github.com/koplas/rust-s3/", branch="rustls"}

Check for openssl with:
cargo tree | grep openssl

0.24.1 published to crates.io


x/xerrors: clarify documentation around stack frames

The docs for the x/xerrors package currently state
Most of the functions and types in this package will be incorporated into the standard library's errors package in Go 1.13; the behavior of this package's Errorf function will be incorporated into the standard library's fmt.Errorf.

This is not accurate. fmt.Errorf does not provide the stack-trace functionality of xerrors.Errorf. Accordingly, I would suggest changing this docstring to
Most of the functions and types in this package have been incorporated into the standard library's errors package in Go 1.13. However, if you wish to retain the stack trace functionality of `xerrors.Errorf`, you will need to keep using this package.

/cc @jba @neild @mpvl who may be able to help improve the phrasing.

Is there an issue to follow if stack trace will be part of go1.14 ?

I wrote https://go-review.googlesource.com/c/xerrors/+/199317 to update the doc.
We have no work on errors planned for 1.14. We're going to wait a cycle.

This was fixed in Cl 199317 but the bot didn't close here (because the commit is in the xerrors repo but it references the issue without a golang/go prefix). Closing.


Update update/current.json when installing a Ren'Py DLC

The current implementation updates update/current.json while keeping the indentation of the release file. This is not Ren'Py's default behavior when adding DLCs as it minimizes the generated JSON file in the process

Codecov Report
Base: 70.35% // Head: 72.68% // Increases project coverage by +2.33% :tada:

Coverage data is based on head (d52face) compared to base (84eb9e0).
Patch coverage: 100.00% of modified lines in pull request are covered.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
Additional details and impacted files
@@            Coverage Diff             @@
##           master       #9      +/-   ##
==========================================
+ Coverage   70.35%   72.68%   +2.33%
==========================================
  Files           5        5
  Lines         226      227       +1
  Branches       28       28
==========================================
+ Hits          159      165       +6
+ Misses         43       38       -5
  Partials       24       24

Flag
Coverage Δ

ubuntu-latest
72.68% <100.00%> (+2.33%)
:arrow_up:

windows-latest
?

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

Impacted Files
Coverage Δ

src/controller/installer.ts
81.33% <100.00%> (+7.00%)
:arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


change testset to reflect new column structure

The testset_csv.csv does not have the correct column structure based on how the inference code requires complex_name, protein_sequence, ligand_description (rather than just ligand) if you use the protein_ligand_csv flag.

Fixed, thank you!


Automator: update<EMAIL_ADDRESS>in<EMAIL_ADDRESS>

Generated by Automator - 2021-04-19T04:12:43+00:00

@istio-testing: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

gencheck_istio_release-1.10
bbb4879cdb1dd7ca34278546b60d069bc3cf7f04
link
/test gencheck_istio_release-1.10

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@istio-testing: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

gencheck_istio_release-1.10
bbb4879cdb1dd7ca34278546b60d069bc3cf7f04
link
/test gencheck_istio_release-1.10

integ-pilot-multicluster-tests_istio_release-1.10
bbb4879cdb1dd7ca34278546b60d069bc3cf7f04
link
/test integ-pilot-multicluster-tests_istio_release-1.10

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/retest


How to get all strings that need translation?

I'm using the approach mentioned in this doc that says "You can leave the default language literal strings in the app and wrap them in the localizer, so that you can focus on developing the app."
I need also to use a database for localization strings, because I have to export the English text and forward this text to a translation service office, to translate it in different languages. I need to do this, because there are technical terms that must be accurate.
I tried to follow sample code from Github that uses EFStringLocalizer, but this implementation (if I understand well)  assume that the strings for translation are already in the database.
Now that I've finished my multi project application, what is the method to take all these strings (from different assemblies)  and  write them in a table?
Can I use a method in the startup of the application to do it, or is there another method?

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

ID: d1833676-ff1b-c587-cc9c-81afffa8ef68
Version Independent ID: ad989395-3f49-4d55-521e-cf6fe56281ee
Content: Globalization and localization in ASP.NET Core
Content Source: aspnetcore/fundamentals/localization.md
Product: aspnet-core
Technology: aspnetcore-fundamentals
GitHub Login: @Rick-Anderson
Microsoft Alias: riande

Related issue #15583

As I mentioned earlier GetAllStrings() will return all the localized strings and their values, so you can iterate through the collection and insert the resource names into the database

@hishamco This is the implementation from EF Localization sample. GetAllStrings returns resources that are already in the database.
public IEnumerable GetAllStrings(bool includeAncestorCultures)
    {

        return _db.Resources

            .Include(r => r.Culture)

            .Where(r => r.Culture.Name == CultureInfo.CurrentCulture.Name)

            .Select(r => new LocalizedString(r.Key, r.Value, true));

    }

I mean to use the GetAllStrings() from ResourceManagerStringLocalizer :smile:


Update reader.py

checks that the CRS is 4326 before transforming coordinates

@abarciauskas-bgse can you limit the version of FastAPI to "fastapi>=0.100.0,<0.107.0"
ref https://github.com/developmentseed/titiler/pull/746

there is also this issue that is going to be fixed in #51  https://github.com/developmentseed/titiler-xarray/pull/51/files#diff-9594314a973a963fe825ac5f6a9adbbb60f7e47980520d1f5ce01f8eb5b60dfcL541

@vincentsarago fastapi wasn't a dependency but I added it in https://github.com/developmentseed/titiler-xarray/pull/52/commits/170b5e424bbfdf5e9c3dcdef39170fa04ad30211, is that the right thing to do?


Load chart is only showing zeros for solar_pv profiles in 'whole year' view

I created a new testing ground with only Residential PV panels. In the 'whole year' view I see a flat profile load chart with only zeros. @ChaelKruip explained that this is due to the fact that the load chart displays the maximum value for every 12 hours to limit the number of datapoints. Since the PV panels introduce negative loads, this approach returns only zeros in this case.
I would suggest to replace the maximum value in 12 hours by the largest deviation from zeros in these 12 hours, which should cover the case for the PV panels.

Oh, good catch! I'll get this fixed.

:+1:


Prepare release 2.0.0 pre.8

[x] CHANGELOG.md has been updated

@justinfagnani If Analyzer is about to release new version today, we can hold off and upgrade it in here, but only want to hold off as far as tonight.  Need to get new bundler available to Polymer/polymer-build asap.

We release this via a different branch.  Closing this PR.


Add new task (and merge all of my commits)

Uhhh, so like github is telling me that if I want to do anything (like a PR to the main branch) I need to create a PR for all the commits that I did before, so like here I am.
The only actual changes

Remove version 0.0.1.png (this shouldn't be a file that's in a github repo) and other useless images (also useless for the repo) (they aren't even linked correctly to the archive smh)
Changed the read me to add a task

We should also delete the archive folder because it's also useless. If we want to look at old versions in the code just look at a earlier version of this repo (click on all commits, find a old commit, 'Browse the repository at this point in the history')

Deleted the archive and added a comment and a gitignore


Compilation Error

While trying to build DXVK, the compiler fails. I am using Fedora 33 with the latest libraries.
dxvk.log

Your MinGW is missing threading support. Please read the README.
/usr/lib/gcc/x86_64-w64-mingw32/10.2.1/../../../../x86_64-w64-mingw32/bin/ld: cannot find -lpthread

For anyone having issues with this, follow this.
https://bugzilla.redhat.com/show_bug.cgi?id=1889044


Please add layout override

Can you add the Original layout as custom layout override
Would be great
Thx

The original layout is available at https://github.com/marmelab/ng-admin/blob/aa488fe074f536f7f36c504c694a75d1f9b4a8e4/src/javascripts/ng-admin/Main/view/layout.html. This demo doesn't aim to demonstrate every possible use cases (it wouldn't be possible), jut one. It's different from the documentation, which already explains how to override the layout (see http://ng-admin-book.marmelab.com/doc/Theming.html). So this demo won't include a layout override.


Fixed pdlua compilation

it works now :) I can load the external, now I have to try and make minimum sense of this and clean it up and organize it

how long till the release do we have?

I'm aiming for Saturday. I'm pretty much done already, I still want to do some more testing in the weekend.


Lines get plotted outside the view when plotting multiple lines in multiple formPlots

Background
I have multiple lines (and annotations, too) plotted in multiple formPlots.
And some lines are plotted correctly inside the formPlot, but some lines in other formPlots are plotted incorrectly, i.e. get outside the view. Please check the attached screenshot.
Screenshot:

In this screenshot, you can see almost all formPlots have some issues.
Question: What might be the problem here?
I am placing these formPlots inside TableLayoutPanel control to make the screen resizable with the mouse.
Here the part I am plotting the lines and annotations:
I have 4 formPlots (index_DataType), 3 arrays of data (index_ID) for each of them:
for (int index_DataType = 0; index_DataType < MyDataTypes.Count; index_DataType++)
                {
                    var plt = formsPlots[index_DataType];
                    for (int index_ID = 0; index_ID < MyIDs.Count; index_ID++)
                    {
                        double[] ys = dataArr2[index_ID].Select(x => double.Parse(x)).ToArray();
                        double[] xs = timeData.Select(x => x.ToOADate()).ToArray();
                        formsPlots[index_DataType].plt.PlotSignalXYConst(xs, ys, lineStyle: LineStyle.Dot, color: colorset[index_ID]);

                        formsPlots[index_DataType].plt.Ticks(dateTimeX: true); //formsPlot1.
                        formsPlots[index_DataType].plt.Title(titleName, fontSize: 24); // formsPlot1.
                        formsPlots[index_DataType].plt.YLabel(titleName, fontSize: 20); // formsPlot1.
                        formsPlots[index_DataType].plt.XLabel("시간", fontSize: 20);
                      }

                }

I have same number of annotations equal to the number of lines I plot:
for (int index_DataType = 0; index_DataType < MyDataTypes.Count; index_DataType++)
                {
                    int annotY = 10;
                    int annotY2 = -10;
                    for (int index_ID = 0; index_ID < MyIDs.Count; index_ID++)
                    {
                        double[] ys = dataArr2[index_ID].Select(x => double.Parse(x)).ToArray();
                        Tuple<double, int> tupleMax = FindMax(ys); // returns max and time data as a tuple
                        double max = tupleMax.Item1;
                        int indexOfMax = tupleMax.Item2;

                        formsPlots[index_DataType].plt.PlotAnnotation(Btn3_SensorLocation[MyIDs[index_ID] - 1].Text, 10, annotY, fontSize: 20, fontColor: colorset[index_ID], fillAlpha: 1);
                        formsPlots[index_DataType].plt.PlotAnnotation(max.ToString() + " "+ char.ConvertFromUtf32(0x2191), -10, annotY2, fontSize: 12, fontColor: colorset[index_ID], fillAlpha: 1);
                        annotY += 35;
                        annotY2 -= 25;
                        formsPlots[index_DataType].Render();
                    }
                }

I am rendering the formPlots one by one here at the end.
For information: I am plotting 4 kinds of different data, each having different scale and so being plotted inside a different formPlot, and I have three different peaces of data for each kind, so in total I plot 3 lines in one formPlot, and I have 4 formPlots to render at the end.

Hi @jsr1611, I think I understand your questions but let me know if I got them wrong! I think this will help...
Ticks Running Off the Figure
The ticks running off the figure can probably be fixed by adding some padding

plt.Layout(y2LabelWidth: 50);

https://swharden.com/scottplot/cookbooks/4.0.40/#customize-figure-figure-padding
Adjust Axis Limits to Fit the Data
After plotting data (or modifying that data) you can call AxisAuto() to adjust the axis limits to fit the data
formsPlots[index_DataType].plt.AxisAuto()

Dear @swharden,
Thank you very much for prompt feedback!
It worked!

It worked!

That's great news! Let me now if any more questions pop up along the way 👍

It worked!

That's great news! Let me now if any more questions pop up along the way 👍

Sure!


error start msf_visualizer

Hi team!
My OS - Ubuntu 18.04.
I use apollo-6.0
I am trying to visualize msf_localization accoding this
Then I run mainboard -d /apollo/modules/localization/dag/dag_streaming_msf_visualizer.dag
I get error
WARNING: Logging before InitGoogleLogging() is written to STDERR
I1006 14:04:22.833047 11027 module_argument.cc:81] []command: mainboard -d /apollo/modules/localization/dag/dag_streaming_msf_visualizer.dag
I1006 14:04:22.833330 11027 global_data.cc:153] []host ip: <IP_ADDRESS>
I1006 14:04:22.833494 11027 module_argument.cc:57] []binary_name_ is mainboard, process_group_ is mainboard_default, has 1 dag conf
I1006 14:04:22.833501 11027 module_argument.cc:60] []dag_conf: /apollo/modules/localization/dag/dag_streaming_msf_visualizer.dag
Load lidar extrinsic succeed.
Load map config succeed.
terminate called after throwing an instance of 'cv::Exception'
what():  OpenCV(4.4.0) /tmp/installers/opencv-4.4.0/modules/highgui/src/window.cpp:634: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvNamedWindow'
Aborted (core dumped)

Hi team!
My OS - Ubuntu 18.04.
I use apollo-6.0
I am trying to visualize msf_localization accoding this
Then I run mainboard -d /apollo/modules/localization/dag/dag_streaming_msf_visualizer.dag
I get error
WARNING: Logging before InitGoogleLogging() is written to STDERR
I1006 14:04:22.833047 11027 module_argument.cc:81] []command: mainboard -d /apollo/modules/localization/dag/dag_streaming_msf_visualizer.dag
I1006 14:04:22.833330 11027 global_data.cc:153] []host ip: <IP_ADDRESS>
I1006 14:04:22.833494 11027 module_argument.cc:57] []binary_name_ is mainboard, process_group_ is mainboard_default, has 1 dag conf
I1006 14:04:22.833501 11027 module_argument.cc:60] []dag_conf: /apollo/modules/localization/dag/dag_streaming_msf_visualizer.dag
Load lidar extrinsic succeed.
Load map config succeed.
terminate called after throwing an instance of 'cv::Exception'
what(): OpenCV(4.4.0) /tmp/installers/opencv-4.4.0/modules/highgui/src/window.cpp:634: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvNamedWindow'
Aborted (core dumped)

It seems that OpenCV was built without GTK+ 2.x support. You can rebuild OpenCV with gtk2.0 support. The team will fix it ASAP. Thanks for reporting.

Can I use this script to solve this problem?

Yep,  just append libgtk2.0-dev at the apt_get_update_and_install section.

Yep, just append libgtk2.0-dev at the apt_get_update_and_install section.

I append libgtk2.0-dev at the apt_get_update_and_install section
run in docker append sudo bash /apollo/docker/build/installers/install_opencv.sh
[ OK ] Successfully installed OpenCV 4.4.0

But the error persisted

I personally was on vocation till next Monday. You can try change -DWITH_GTK=OFF to -DWITH_GTK=ON and try again.

I personally was on vocation till next Monday. You can try change -DWITH_GTK=OFF to -DWITH_GTK=ON and
set -DWITH_GTK_2_X=ON also, and try agin.

I followed your recommendations, but the problem was not resolved.
Perhaps you can tell me how to display the local_map (obtained using this script). This will partially solve my problem. I want to see the local_map as shown in the picture below.

@guoweiwan , can you help with this? I personally can't executing
mainboard -d /apollo/modules/localization/dag/dag_streaming_msf_visualizer.dag

also.

hello，l recently meet this issue. I have fix it. i append libgtk2.0-dev , libqt4-dev ;  -DWITH_GTK=OFF to -DWITH_GTK=ON and
set -DWITH_GTK_2_X=ON set -DWITH_QT=ON. then re_run .

hello，l recently meet this issue. I have fix it. i append libgtk2.0-dev , libqt4-dev ; -DWITH_GTK=OFF to -DWITH_GTK=ON and
set -DWITH_GTK_2_X=ON set -DWITH_QT=ON. then re_run .

Hello @devynliu
Thank You very much! This is the solution to given problem.
But now I must to install OpenCV after every reboot of my PC. Probably because I have no experience with docker.
Can you tell me how to save compiled libraries in Apollo docker?

**Hello colleagues!
I was able to install the library.
But now another error has appeared. Unfortunately, information about it is not logged. Maybe someone has some ideas?**
@in-dev-docker:/apollo]$ mainboard -d /apollo/modules/localization/dag/dag_streaming_msf_visualizer.dag
WARNING: Logging before InitGoogleLogging() is written to STDERR
I1113 11:05:16.417951  2781 module_argument.cc:81] []command: mainboard -d /apollo/modules/localization/dag/dag_streaming_msf_visualizer.dag
I1113 11:05:16.419196  2781 global_data.cc:153] []host ip: <IP_ADDRESS>
I1113 11:05:16.419415  2781 module_argument.cc:57] []binary_name_ is mainboard, process_group_ is mainboard_default, has 1 dag conf
I1113 11:05:16.419425  2781 module_argument.cc:60] []dag_conf: /apollo/modules/localization/dag/dag_streaming_msf_visualizer.dag
Load lidar extrinsic succeed.
Load map config succeed.

E1113 11:05:18.540704  2796 online_visualizer_component.cc:144] [mainboard]start
E1113 11:05:18.540843  2796 online_visualizer_component.cc:146] [mainboard]stop
E1113 11:05:18.543491  2811 visualization_manager.cc:241] [localization_visualizer]The queried buffer is empty.
E1113 11:05:18.543517  2811 visualization_manager.cc:95] [localization_visualizer]The buffer is empty.
Segmentation fault (core dumped)

localization_visualizer

@AlexandrZabolotny Hi Alex, I'm facing the same issue when I first start the visualizer which is black screen interface (not sure if that's the correct behavior?) and then followed by starting the LGSVL simulator simulation, the command prompt then pops a lot of "The queried buffer is empty." errors.
Have you found a solution towards this issue?

hello，l recently meet this issue. I have fix it. i append libgtk2.0-dev , libqt4-dev ; -DWITH_GTK=OFF to -DWITH_GTK=ON and
set -DWITH_GTK_2_X=ON set -DWITH_QT=ON. then re_run .

Hello @devynliu
Thank You very much! This is the solution to given problem.
But now I must to install OpenCV after every reboot of my PC. Probably because I have no experience with docker.
Can you tell me how to save compiled libraries in Apollo docker?

Hi @AlexandrZabolotny, the build issue was resolved in PR #13730 and I am going to release a new Docker image for the properly built OpenCV.


CODEOWNERS: remove myself

I have not been contributing to libkrun or reviewing patches, and I don't expect that to change anytime soon

@crobinso ack, thank you and I hope you'll come back in the future :-)


Disable FlaskLogin flash messages

Ticket: https://trello.com/c/sxhsW20p/88-replace-flash-messages-with-alert-component-in-briefs-frontend
We don't want to use the default flash message for when a user needs an account to access a page, so this PR disables the message flashing in FlaskLogin.

I think this will only be an issue once we update the flash message logic in the base template for this app? But it shouldn't hurt to do now, while we remember 😸

I think this will only be an issue once we update the flash message logic in the base template for this app? But it shouldn't hurt to do now, while we remember 😸

Now I'm really confused... the login page is in the user frontend right, along with the logic for showing the flash message. So I would have thought because the flash message is shown in the user frontend it will show up unstyled.
But testing on preview at /suppliers/opportunities/frameworks/digital-outcomes-and-specialists-4 doesn't show a flash message.
So is this app disabling the flash messages already in some other way? Or is the login page rendered in this app?

Now I'm really confused

Argh no I got confused - apologies, we do need this (though I am also puzzled why the default login message doesn't show! Weird).

Now I'm really confused

Argh no I got confused - apologies, we do need this (though I am also puzzled why the default login message doesn't show! Weird).

Trying to figure it out, because I'm worried that it might be an indication that something is broken...

Okay, I've figured it out.
The difference between this app and the briefs frontend is that the briefs frontend sets login_manager.login_view = 'external.render_login', so when the user is not authenticated Flask-Login redirects them to the login page directly after flashing a message.
However, when login_view is not set, Flask-Login aborts with a HTTP 401, without flashing a message. Then our error handlers in Flask intercepts this 401 and redirects to the login page, blah blah blah.
The point is everything is working as intended, it's just that our apps aren't consistent in how they use Flask-Login 😁. So this PR isn't strictly required. But we might as well merge it anyway?

@lfdebrux Good detective work!
What happens if we set login_manager.login_view = 'external.render_login' in this app? I see the Admin FE is hardcoding it to /user/login rather than using external.render_login...

What happens if we set login_manager.login_view = 'external.render_login' in this app? I see the Admin FE is hardcoding it to /user/login rather than using external.render_login...

If I make the change against the main branch then I get the login page with an unstyled flash message when accessing /suppliers/opportunities/frameworks/digital-outcomes-and-specialists-4 without being logged in.
If I make the change against this branch then I get the login page without a flash message.

Do we want to set login_manager.login_view in all our apps do you think?

Do we want to set login_manager.login_view in all our apps do you think?

My opinion is the same as usual - I don't mind as long as we're consistent in what we do. We don't have to do it in this PR.


Cats Effect 3 migration roadmap/plans ?

I'm curious if anyone knows what's the plan for supporting cats-effect 3?
Seems the migration from 2 to 3 might be a bit involved, but I could perhaps give it a try if I get some spare time, unless you have other plans and would rather wait... Please let me know.

Hi @spavikevik, an upgrade to Cats Effect 3 was merged with https://github.com/scanamo/scanamo/pull/1166, a few days after this issue was opened! This has now been released with Scanamo v1.0.0-M16.

Hi!
Given that CE2 and CE3 are source and binary incompatible, this would mean that all the users of M15 will not be able to upgrade to M16 without a very costly CE2 -> CE3 upgrade (i.e. all the Monix users are cut off by the M16, as Monix is not built for CE3).
The actual CE layer in scanamo is very small, so it should theoretically be possible to publish -ce2 and -ce3 modules from the same codebase - would you accept such a PR @rtyley @regiskuckaertz ?


specify edge for s3 media

https://www.twilio.com/docs/usage/webhooks/webhooks-connection-overrides
eg https://example.com/foo?query=123#e=umatilla,ashburn
#e= is the webhook override, does it work for media?

twilio edge location/region:
Ashburn (us1)
We recommend hosting your media in AWS S3 in us-east-1, eu-west-1, or ap-southeast-2 depending on which Twilio Region you are using.


reorder prefixed properties - unprefixed last

:+1: I agree, this ordering gives the standard attribute highest precedence should a user agent differ in its prefixed vs. standard implementation.


[WIP] SAMS implementation

This is a scratch workspace PR for preparing data for a talk.
The goal is to utilize the MCL1 example to run SAMS calculations to estimate thermodynamic length for both relative (HybridTopologyFactory) and absolute (AbsoluteAlchemicalFactory) for the same ligand pair.

Can we have a (potentially virtual) chat about what this PR is going to entail?

@pgrinaway Should we close this PR if it's been supplanted by another PR?

Yeah, that's probably good.


Idempotency is broken with activerecord v7.0.2

With activerecord v7.0.2 (CHANGELOG), the ridgepole --apply command always outputs CREATE TABLE statements for every table instead of differences from the current state.
Steps to reproduce
Gemfile
source "https://rubygems.org"

gem "activerecord", "7.0.2"
gem "pg", "1.3.1"
gem "ridgepole", "1.0.2"

Schemafile
create_table :articles do |t|
  t.string :title
end

$ bundle install
$ bundle exec ridgepole -c '{"adapter":"postgresql","database":"blog"}' -a
Apply `Schemafile`
-- create_table("articles")
   -> 0.0083s
$ bundle exec ridgepole -c '{"adapter":"postgresql","database":"blog"}' -a
Apply `Schemafile`
-- create_table("articles")
[ERROR] PG::DuplicateTable: ERROR:  relation "articles" already exists

* 1: create_table("articles", **{}) do |t|
  2:   t.column("title", :"string", **{})
  3: end
        /Users/takahiro-miyoshi/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/activerecord-7.0.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:48:in `exec'

This can be reproduced with MySQL.
System configuration

PostgreSQL version: 14.1
Ruby version: 3.1.0

I confirmed the current edge https://github.com/rails/rails/commit/b50095f06cfa91a02fc605770d1454a6619fca3f reproduces this problem.
-gem "activerecord", "7.0.2"
+gem "rails", git: "https://github.com/rails/rails", ref: "b50095f"


[Question] How to have a good dev setup for ecaml based plugins?

Hello ecaml team,
First off, thanks for this wonderful way of combining emacs and ocaml!
I was wondering whether it's possible to live reloadan ecaml dynamic module once I've recompiled a dynamic module?
So far, it seems that to have an quick feedback loop, the only way is to rely on the batch mode i.e. starting up another instance of emacs and testing there. But that raises the problem of how to  do something more sophisticated such as manipulating buffers etc without the workflow being tedious.
Here's a reference
https://github.com/jkitchin/emacs-modules#testing-modules
Please let me know what's your workflow for building bigger plugins using ecaml.

We internally have these functions for reloading ecaml in the current
emacs process:
jane-unsafe-reload-ecaml
jane-really-unsafe-auto-reload-ecaml
The second one uses inotify to detect when the plugin changes and
reload automatically.
We're happy to expose these with the following caveat:
These are called unsafe because they make no effort to reconcile the
old and new ecaml states. In the common case where your state is split
between elisp and ecaml, you are nearly guaranteed to see
inconsistency. The new ecaml will allocate new values for the ecaml
state but the elisp will retain the values set by the old ecaml.
That said, our experience over the last couple of years has been that
they actually don't break everything every time. ¯_(ツ)_/¯
Want them?
Wang
On Mon, Apr 20, 2020 at 2:14 PM Abhinav Sharma<EMAIL_ADDRESS>wrote:

Hello ecaml team,
First off, thanks for this wonderful way of combining emacs and ocaml!
I was wondering whether it's possible to live reloadan ecaml dynamic module once I've recompiled a dynamic module?
So far, it seems that to have an quick feedback loop, the only way is to rely on the batch mode i.e. starting up another instance of emacs and testing there. But that raises the problem of how to do something more sophisticated such as manipulating buffers etc without the workflow being tedious.
Please let me know what's your workflow for building bigger plugins using ecaml.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

The functions Wang describes work well enough for manual testing,
but they're not usually what we use.
We prefer to write automated tests of new modes that we define.
There are examples testing ecaml's functionality in this repo
(for example: https://github.com/janestreet/ecaml/blob/master/test/test_current_buffer.ml)
We've got a few functions (that are not published on github but
definitely should be) that make this sort of automated testing
easier. A lot of our tests of some new functionality with a
keybinding "C-x M-whatever foo" will look like:
let%bind () = press "key sequence to open some test buffer" in
[%expect {| test buffer contents |}];
let%bind () = press "C-x M-whatever foo" in
[%expect {| buffer contents after foo runs |}];
...

We've run into a few issues with this setup -- these tests run in
a batch-mode emacs, which sets up a fake emacs window at a weird
size, so some functions fail if they particularly care about
window geometry, or whether the point is visible on screen.
But for the most part, we've found this works very well for
automated testing.

We try to automate testing as much as possible, using expect tests:
https://github.com/janestreet/ppx_expect
Our build system knows how to run [emacs -batch] and load an emacs
plugin for testing.  Our Emacs-plugin expect tests look like any other
expect test, with interleaved code and output:
https://github.com/janestreet/ecaml/tree/master/test
On Mon, Apr 20, 2020 at 2:38 PM Wang<EMAIL_ADDRESS>wrote:

We internally have these functions for reloading ecaml in the current
emacs process:
jane-unsafe-reload-ecaml
jane-really-unsafe-auto-reload-ecaml
The second one uses inotify to detect when the plugin changes and
reload automatically.
We're happy to expose these with the following caveat:
These are called unsafe because they make no effort to reconcile the
old and new ecaml states. In the common case where your state is split
between elisp and ecaml, you are nearly guaranteed to see
inconsistency. The new ecaml will allocate new values for the ecaml
state but the elisp will retain the values set by the old ecaml.
That said, our experience over the last couple of years has been that
they actually don't break everything every time. ¯_(ツ)_/¯
Want them?
Wang
On Mon, Apr 20, 2020 at 2:14 PM Abhinav Sharma<EMAIL_ADDRESS>wrote:

Hello ecaml team,
First off, thanks for this wonderful way of combining emacs and ocaml!
I was wondering whether it's possible to live reloadan ecaml dynamic module once I've recompiled a dynamic module?
So far, it seems that to have an quick feedback loop, the only way is to rely on the batch mode i.e. starting up another instance of emacs and testing there. But that raises the problem of how to do something more sophisticated such as manipulating buffers etc without the workflow being tedious.
Please let me know what's your workflow for building bigger plugins using ecaml.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

@dwang20151005 and @m-plamann , first off thanks for the quick response!
I'm really grokking the ecaml and I would love to be able to have a good feedback loop. I feel that you are using the library extensively and have built certain utilities around it, possible for you to share that or include those in the repo itself?

I understand that at scale, perhaps the emacs batch mode is the best option but a little bit of user-friendliness is really welcome.

Hi guys, just checking in if it's possible for you share the reload oriented utilities in the codebase please :)

Here are the functions:
(defun jane-reload-module (module)
  "load a new copy of the given module, even if it was previously
loaded in the same emacs instance"
  (let ((tmpfile (make-temp-file "/tmp/" nil ".so")))
    ;; Emacs will not reload a module if it has the same filename as an
    ;; alread-loaded module, so copy the module to a temp file first.
    (copy-file module tmpfile t)
    (unwind-protect
        (module-load tmpfile)
      (delete-file tmpfile))))

(defvar ecaml-reload-hook nil
  "Hook called after ecaml is reloaded")

(defun jane-unsafe-reload-ecaml ()
  "reload the module defining the library ecaml_plugin. If the
old ecaml plugin stored state in emacs, that state may be
inconsistent with the newly-loaded version of the plugin. This
function makes no effort to avoid this."
  (interactive)
  (let ((module (find-library-name "ecaml_plugin")))
    (ecaml-async-shutdown)
    (jane-reload-module module)
    (run-hooks 'ecaml-reload-hook)))

(setq jane-unsafe-auto-reload-ecaml-watch nil)

(defun jane-unsafe-auto-reload-ecaml ()
  "call jane-unsafe-reload-ecaml each time the file the ecaml_plugin changes"
  (interactive)
  (if (null jane-unsafe-auto-reload-ecaml-watch)
      (setq jane-unsafe-auto-reload-ecaml-watch
            (file-notify-add-watch (find-library-name "ecaml_plugin")
                                   '(change)
                                   (lambda (event)
                                     (jane-unsafe-reload-ecaml))))))

(defun jane-unsafe-auto-reload-ecaml-stop ()
  (interactive)
  (unless (null jane-unsafe-auto-reload-ecaml-watch)
    (file-notify-rm-watch jane-unsafe-auto-reload-ecaml-watch)
    (setq jane-unsafe-auto-reload-ecaml-watch nil)))

I'll also make these available in the actual repo here on github, but that change might take some time to make it from our internal repo onto github.

Thanks @m-plamann - I appreciate it 👍 💯
Please feel free to close this issue now or later when the API is included in the open codebase.

Hi @m-plamann ,
It's been a while, hope you are doing great :)
I was wondering whether these goodies are planned for the 0.15 release?


Remove ability to get service by Reference

Q
A

Is bugfix?
❌

New feature?
❌

Breaks BC?
✔

Why?

Why?

https://github.com/php-fig/container/pull/27


cannot import script file from asset directory.

Problem
Cannot import custom js file from asset directory

This is causing MIME type issue due to timestampe numbers
(https://cdn.shopify..... js?234234234242)
also tried to import from static directory

This caused 404 error.
And tried to add double quote in the url like  this

Did you declare it in theme.js first?
src/assets/scripts

This folder constains all your JS modules. A theme.js must be present, as it will act as the entry point for your JS application.

Duplicate of https://github.com/Shopify/slate/issues/409


Upgrade dependencies, manual test fixing

Add additional test logging
Upgrade dependencies by hand, see if we can fix the test breakage

Fixes #372
Proposed Changes

Ran ./hack/upgrade-deps.sh
Manual fixes as apparently dep upgrades have been broken since December.  :sad:

/assign @astelmashenko

/lgtm
/approve


fix: 🐛 syn-combobox is not completely accessible

Checklist (for the issue creator)

[x] I have verified the bug exists in the latest version of @synergy-design-system/components (e.g. via pnpm install @synergy-design-system/components).
[x] I can provide a simple, reproducible example of the issue (e.g. via code-sandbox or sample code, ...).
[x] I would be willing to provide a PR for this issue.

Version
The bug occurred with the following version of the component library: > 2.10.0
Component
The issue arises when using the following component(s): syn-combobox
Environment
The issue occurred with the following operating system(s): All
The issue occurred in the following browser(s): NVDA, Jaws, Talkback
Description
After an accessibility review, the syn-combobox was found to not be accessible via screen readers.  See attached screenshot for more information.
Acceptance criteria

[ ] All DoD items successfully completed
[ ] Demos are altered to make them accessible according the review
[ ] Check if it is possible to change the markup to the recommended way as described in the review.

Accessibility review


fix for importing new release error

Basically according to go documentation if we want to to release module version v2 + then we need to change the module path.

https://go.dev/blog/v2-go-modules


Add option to 1q euler decomposer for disabling unitary check

Summary
Previously when running the OneQubitEulerDecomposer the first step
it would perform is a check that the input matrix is a 1 qubit unitary.
However, in situations when we're explicitly generating a unitary matrix
and know the input we're passing is unitary there is no need to run this
check and it adds unnecessary overhead to the process. This commit adds a
new kwarg, check_unitary, to the __call__ method on the
OneQubitEulerDecomposer which when set to False will skip the unitary
check to avoid this overhead. The flag is then set
when the decomposer is called from the Optimize1qGatesDecomposition,
UnitarySynthesis passes, and TwoQubitBasisDecomposer to avoid the
overhead when we know the input is unitary.
Details and comments
This depends on #5926

The idea of having a way to bypass consistency checks internally makes sense to me, but I prefer a different API for this kind of thing:
1. Instead of a user-visible flag, can we have an internal `_decompose()` method that skips the checks, and have the user-visible `__call__` do the checks and then go to `_decompose` for the (dangerous) implementation

2. For the internal API can we have the implementation work only with ndarray, and push the `to_operator`, `to_matrix`, `np.asarray` stuff for the user-facing friendly API (this should give a small additional perf boost)

Yeah, that's a good idea and a pattern more consistent with the rest of qiskit too. I've pivoted to use the private method instead of the kwarg in: https://github.com/Qiskit/qiskit-terra/pull/5928/commits/9a2711b13f7fe23577f8f1b0952397a9aab3238a

Running the same script as I did in: https://github.com/Qiskit/qiskit-terra/pull/5926#issuecomment-791005813 the results for me locally were:

version
time (in sec)

master
22.62060546875

#5928 (this PR)
15.05669116973877


docs(guide/Scopes): added ng-app to the examples

ng-app was left off of all the examples, so if you type them out and try to run them they don't work.

Hi, thanks for the PR. This is a little problematic, because when you open the examples in the plnkr, there will be two ng-app directives. It doesn't hurt, but it's also not very pretty. This is because the example generator will add ng-app automatically to the example. Since you have to add html boilerplate to the examples anyway when you copy / paste them, I think we should not add ng-app explicitly to these examples. But thanks for your effort!


Refactor nav object

The current list object should be transformed into the nav object, with the single purpose of stripping the list-style and aligning the items either vertically in display: block; or horizontally, likely utilising flexbox at its core structure to allow evenly spaced nav items as a viable option.

Deleting the nav object. Nav will become 2 components (List and Menu) which can be combined together and expanded on at the pattern level.


Update README.md

Close #104

Let's get back to this once we've finalized all the normative issues?

@ben-allen has a new PR in https://github.com/tc39/proposal-intl-duration-format/pull/168 which makes most of these changes; after that PR is merged, Ben will take one final look at this PR and close it if all of its loose ends have been resolved.

#168 has been merged.


BUG - Move script. Leave parent once in view not working.

Fixed. Was not working if move enabled false. @wadek2 Please use Move Delay if object leaves parent too soon (may be cut off if move delay is 0).


WIP Load meta for themes

I try to display more beautiful theme names for Global KDE Themes in the settings.
Fixes #23
Fixes #30

I'm now at a point where I have the real names and the ones used earlier. I guess I have to delete a specific file that is generated for the UI?

Looks good so far and a smart move to take the original theme names! But we are facing some problems here, a quick overview how it currently works:

Settings UI is loaded
get_kde_themes() is called and updates the options(light and dark) for the combofields (Theme Dropdowns) and adds in the new values. Please note that at this point the Dropdown will not default to a theme since no theme is selected at this point, only the dropdown options are added.
In this line we set the default for the selected option in the combofield. So we go through the options added in the step before and see if one matches with the one set inside the config. We save the index of the found option
Now we set the index of the found theme as the currently selected option.

This is currently how this is handled. One more problem will occur when we are going to save. When we are saving it will use the currently selected theme and update this inside the config file.
So if we are using the short theme names it will update this inside the config and later on break any functionality that needs the full length name like lookandfeeltool
What could be a possible solution?
Basically we need to map the full length theme names with the short names and use the short names inside the dropdown but save the long names. Before the default option is selected we simply map it to the short name and set this instead.
I did some research on my own system and found something that could break it, so error handling is needed. Basically check the screenshot -> so if no theme name is found it should use the full length name instead.

I created now 3 functions:

get_kde_theme_names() returns a map with short names as key and long names as value. If no short name was found, the key is the long name.
get_kde_theme_short() translates a long theme name to a short theme name,
get_kde_theme_long() does the opposite.

It seems to work, but I still can't figure out why I have both theme names now in the dropdown:

There was a small error inside the if condition, since we are dealing with a map we cannot use in without providing a key/value pair.
I added a simple exception to catch 2 errors. One error was that it will crash if no file is found, I also used this exception to say if no file is found just use the long name. Check the Code below. It works fine with that.
        # get the actual name
        for long in long_names:
            # trying to get the Desktop file
            try:
                # load the name from the metadata.desktop file
                with open('/usr/share/plasma/look-and-feel/{long}/metadata.desktop'.format(**locals()), 'r') as file:
                    # search for the name
                    for line in file:
                        if 'Name=' in line:
                            name: str = ''
                            write: bool = False
                            for letter in line:
                                if letter == '\n':
                                    write = False
                                if write:
                                    name += letter
                                if letter == '=':
                                    write = True
                            print(name)
                            themes[name] = long
                            break
            # if no file exist lets just use the long name
            except:
                themes[long] = long
        return themes

Oh, ok, thanks :)
Works flawlessly now.

I ran git pull and install again, but I don't see this change in my Yin-Yang. Did I do something wrong?

No you did everything correct, the problem here lies that every theme creator installs the theme differently. You can read the thread to see how it is currently implemented.
If you know where on your system the themes with the long names are installed please let me know

The location is ~/.local/share/plasma/look-and-feel/ and the drop down seems to be using the directory names and not what is given with the name tag in the .desktop file for a theme:

Yes this is already used. However there are some themes that are installed differently. There would also need to be a function in places that takes the long name and breaks it down to the last part.

I think you use the X-KDE-PluginInfo-Name value in the metadata.desktop file instead of the Name field.
For instance for the Inverse theme:
Name=Inverse X-KDE-PluginInfo-Name=com.github.yeyushengfan258.Inverse

@tneo @l0drex this is fixed and on master now. Theme names are working fine now see
#49

Nice! :-)
Can you sort the list alphabetically in the drop-down, so that is easier to read?


Requirement of PHP version?

Hello,
I want to know requirements of PHP version to run this app appropriately.
Best,
Seongho

hi,
Assuming you want to run it on windows, any recent PHP should do it. In my 64bit Windows, i am having:
C:\Users\dev10>php --version
PHP 7.1.3 (cli) (built: Mar 14 2017 23:33:39) ( ZTS MSVC14 (Visual C++ 2015) x64 )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
which was downloaded with php-7.1.3-Win32-VC14-x64.zip

I'm running on Ubuntu Linux, PHP 7.2

it will work fine on Linux and your PHP version. i am writing it and testing in on Linux too.


Update tests to pass MOOSE recipe

, refs #39
still one test that has some breakage from there
https://github.com/idaholab/moose/pull/26201

Job VTB Documentation on ef5bf7c wanted to post the following:
View the site here
This comment will be updated on new commits.

Remaining failures to be addressed from MOOSE side


Feature Request: Don't mark "originals" as "unused" if there is a transformed copy if it

The plugin Plugin Resizer has a "non-destructive" option that creates a folder in each volume called "originals".
Desired Behavior:
User has the ability to ignore "originals" (or even whole folders when checking for unused assets.)
Current Behavior:
This plugin currently counts original files as "Unused" even if there is a generated "child" image. It would be ideal if "originals" files were only marked as Unused if they do not have a child copy currently in use.

@mizziness this feels like misuse of the assets system, but i'm not familiar with that plugin.
Do the assets keep any relation with the smaller images? If there is any relationship, i could use that to show usage numbers.

@roelvanhintum I'm only a user of the other plugin, not a maintainer, so I don't know if a relationship is maintained. I would hope so, but I would hope a lot of things that aren't so.

@mizziness Looking at their code, they don't keep any relation. This would mean an extra query for every asset to see if there is a file with the same name in originals.

@roelvanhintum  Let me know if I can be of any help!


Add documentation for default metrics exported by Istio  (#1485)

Cherrypicking metrics.md file to Istio Release 0.8

Create metrics.md

Update .spelling

Update metrics.md

Update metrics.md

Update metrics.md

Update metrics.md

/retest

@geeknoid : Looks like circleci failed with timeout connecting to external sites...
This was a cherrypick.. should I make a small change to the file to kick off the tests again?

That URL seems to timeout on a regular basis.
I restarted the CircleCi job, hopefully it'll work this time around.


[BUG]: Error Creating New Thread with userId in Workspace API

How are you running AnythingLLM?
Docker (local)
What happened?
(Sorry - no pull request from me this time - it's too in depth 😄 )
When attempting to create a new thread in a workspace using the API and providing a userId, an error occurs. This issue can be reproduced using the provided code or directly in the Swagger UI.
Environment:

Running AnythingLLM in Docker
Version: 1.2.2 (also tested in 1.2.1)
Tested on Windows WSL2 Docker and Ubuntu in GitHub Codespaces

Are there known steps to reproduce?

Generate a new API key (e.g., <MY_API_KEY>).

HTTP REST Example:
POST http://localhost:3001/api/v1/workspace/my-workspace-slug/thread/new
Authorization: Bearer <MY_API_KEY>
Content-Type: application/json

{
  "userId": 1
}

CURL Example:
curl -X 'POST' \
  'http://<IP_ADDRESS>:3001/api/v1/workspace/my-workspace-slug/thread/new' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer <MY_API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
  "userId": 1
}'

Result:
The API responds with:
HTTP/1.1 200 OK
X-Powered-By: Express
Vary: Origin
Content-Type: application/json; charset=utf-8
Content-Length: 148
ETag: W/"94-Y14XDftRy07iOWO+P2NlTX+rhlw"
Date: Thu, 12 Sep 2024 16:06:54 GMT
Connection: keep-alive
keep-alive: timeout=5

{
  "thread": null,
  "message": "\nInvalid `prisma.workspace_threads.create()` invocation:\n\n\nForeign key constraint failed on the field: `foreign key`"
}

Expected Behavior:
The thread should be created successfully when a valid userId is provided.

same here, I just don't have a clue why only creating new threads have this problem

Are you in multi-user mode?

This seems to be the issue.
I am not sure if this is the intention, but if this endpoint is more for "UI automation" or management of the threads also visible in the API. We recently introduced the sessionId key on workspace/(chat or stream-chat) endpoint that you can now use some external identifier per request and keep chat history per call without making threads or polluting the UI with threads/chats for any specific user.
https://github.com/Mintplex-Labs/anything-llm/blob/906eb70ca15b7cea2470e9571ad7113416ddccfe/server/endpoints/api/workspace/index.js#L549

Thanks @timothycarambat it was a bit of both - but ultimately the sessionId (which I've tested - and works great) will be the winner for my + other's use cases. Great!


Add search descriptors to identity schema

In identity schema, I am adding search descriptors as they are required for search integration. This is required in collaboration scenarios where a user Alice may wish to search for assets created by user Bob with user id as uidOfBob.
Please link to the issue #…

Closed back on feedback from Oliver. I would wait for PAPI discussion to conclude.

Removing any changes to principal schema since PAPI WG is taking care of that.

i know nothing about use cases of this schema . Can another reviewer from this side of the business review and let us know if this makes sense

Closing this PR, in favor of https://git.corp.adobe.com/AdobeCloudPlatform/api-spec/pull/220


Add gen-apidocs config for 1.31

This takes 1.30 as the base and then adjusts the TOC as needed. Noteworthy:

resource.k8s.io/v1alpha2 is not served anymore, so ResourceClaimParameters and ResourceClassParameters are gone.
DeviceClass and LeaseCandidate make their debut.

/approve

/lgtm

@xrstf @tengqm Could you please add some information here on how you determined what APIs needed to be added and removed? It would be helpful for those generating reference docs in the future so we can get the process documented.
For example, there is no mention at all of the DeviceClass API in the v1.31.0 release notes.

You'll laugh, but I have no idea how it was done in the past. But by coincidence, I can use my own website (kube-api dot ninja) to check for the differences (expand all table rows, then visually scan the table for things that have changed in 1.31, i.e. bars that have ended or begun).

And DeviceClass was one of the bars that started in 1.31, and searching through the page does not show any other APIs / API versions that DeviceClass was ever a part of. That's how I determined the changes between 1.30 and 1.31.

You'll laugh, but I have no idea how it was done in the past. But by coincidence, I can use my own website (kube-api dot ninja) to check for the differences (expand all table rows, then visually scan the table for things that have changed in 1.31, i.e. bars that have ended or begun).

And DeviceClass was one of the bars that started in 1.31, and searching through the page does not show any other APIs / API versions that DeviceClass was ever a part of. That's how I determined the changes between 1.30 and 1.31.

No laughing here, that sounds like it'll be a good resource going forward!

There are some logics in the generator for detecting whether a resource (or merely a definition) has been included. There could be more than one group/version for any given resource or definition. The generator checks if for a given definition/resource there is a more mature version. When nothing is found, the generator prints a warning message saying that some resource is not included.


Added M1 support, v0.3.1 is now an Universal Binary

Added Support for M1 powered Macs (Only tested on M1 MacBook Pro)
Changed NSAlert deprecated syntax
Deployment target is set to macOS 12
Thanks @mac-can  for providing the Universal Version of the dylib!

Maybe the System requirements section of the Readme needs to be updated, namely architecture and required library section.

I have also tested on a MacBook Pro 16' 2019 and it also works.


Increase test coverage

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

Project coverage is 99.66%. Comparing base (36b478d) to head (e26e351).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #455      +/-   ##
==========================================
+ Coverage   99.33%   99.66%   +0.33%
==========================================
  Files          30       30
  Lines         300      300
  Branches       72       70       -2
==========================================
+ Hits          298      299       +1
+ Misses          2        1       -1

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