Section 5.2: The use of identifiers

The text says:

To overcome this limitation and allow for interoperable package identification all identifiers within Common Specification metadata MUST start with a prefix, followed by the value of the identifier.

Why does it MUST start with a prefix?  Why should I have to prefix it?! This makes no sense to me.
This is a limitation of the UUID identification scheme. Other identification schemes may not have this limitation. I suggest removing the MUST and just call it a recommendation for certain types of identifiers, e.g. the UUID.

The UUID can start with a number and thats one problem with the xml:ID which cant start with a number.

I know that. But that's a restriction of the UUID not ALL identifiers. The requirement should be... the identifiers should conform to XML:ID.

Dont miss the problem of people not understanding xml:ID even if we give the rules for it......

Clarify requirement for xml:id type, make the requirement identifiable (it's not currently) and refer to that.


Manga Review data often missing🐛

Is there an existing issue for this?

[X] I have searched the existing issues

Current Behavior
https://api.jikan.moe/v4/manga/62795/reviews returns nothing, but
https://myanimelist.net/manga/62795/Tomodachi_Game?q=Tomadachi Game&cat=manga has reviews
I noticed there were existing issues opened around the anime endpoint and 500 errors, but in this case, I'm getting nothing back (empty result), however there should be data present.
Expected Behavior
The reviews on the website should be reproduced
Steps To Reproduce

Hit https://api.jikan.moe/v4/manga/62795/reviews
See no review
Open https://myanimelist.net/manga/62795/Tomodachi_Game?q=Tomadachi Game&cat=manga
Validate there are multiple review

This can be repeated for other manga, like Killing Bites
Environment
Used public API
Firefox/Chrome or via JikanDotNet

Anything else?
No response

@irfan-dahir I did a triage on this, it seems like a parser issue, not a REST API issue.

Any update on this? I don't mind trying to raise a PR on this.

This is not a bug, the data is returned on a parser level.
The manga mentioned returns all of its reviews tagged as preliminary.
By default, preliminary reviews are set to false. In order to show them you must pass preliminary=true. This is why it's returning as empty. 😅
https://api.jikan.moe/v4/manga/62795/reviews?preliminary=true
This system is adapting MAL's new review filters so it's fairly new to us as well. And it also seems to be missing from our documentation so I can see why this could be seen as a bug. I will add it to the docs asap. Thanks for filing this issue nevertheless.


Implement $collStats aggregation stage count field

Description
Closes #1416.

This implements count field only.
The main issue should be open until all latencyStats, latencyStats.histograms, storageStats and queryExecStats field are implemented in separate PRs.
Readiness checklist

[ ] I added/updated unit tests.
[x] I added/updated integration/compatibility tests.
[ ] I added/updated comments and checked rendering.
[x] I made spot refactorings.
[ ] I updated user documentation.
[ ] I ran task all, and it passed.
[x] I ensured that PR title is good enough for the changelog.
[x] (for maintainers only) I set Reviewers (@FerretDB/core), Assignee, Labels, Project and project's Sprint fields.
[x] I marked all done items in this checklist.

See also #2338 that is based on this PR.

Closing to favor https://github.com/FerretDB/FerretDB/pull/2338


ctr/run: revive specifying custom command

e.g.
$ ctr run --id foo docker.io/library/busybox:latest ls

Signed-off-by: Akihiro Suda<EMAIL_ADDRESS>

:+1:
Can you also update the usage documentation. It is not clear that the first argument is an image reference and everything after that is the command arguments.

@dmcgowan done

LGTM

LGTM


Switch from manually configuring cron to pebble events approach when available

Bug Description
To fulfil the need for a recurring task (checking for theme changes) we're currently configuring cron in the indico container. As discussed in https://discourse.charmhub.io/t/recurring-task-in-k8s-charms/6644/4 this will be supported natively by pebble events at some point. Once that's available we should switch to it.
To Reproduce
N/A
Environment
N/A
Relevant log output
N/A

Additional context
N/A

Does the https://github.com/canonical/indico-operator/pull/126 fix this too?


Add name= parameter to query_hostapis()

How's this for a minor upgrade to query_hostapis()?  What exception should be raised if query_hostapis(name='Some Unknown Name') doesn't find a host API with the requested name?
For now, it just raises PortAudioError('Host API {0!r} not found'.format(name))

Hmmm, I'm not so sure anymore if specifying a string is the right thing to do, since the names are actually not known a priori and they may not have the exact shape you are expecting.
E.g., name='MME' would work, but why not name='WMME'. Is it 'WDM/KS' or 'WDM-KS'? Neither, it's 'Windows WDM-KS'!
Or probably it even changes between PortAudio versions? Or between OS versions?
Let's look at the docs ... it's not there!
What about searching for a substring instead? Similar to what is already possible with the device parameter?
This still doesn't solve all the problems ...
Or alternatively, what about providing our own pre-defined attributes on some "host API" object?
Something like sd.hostapi.wdmks.do_something().
This way we could give a complete list of possible choices in the documentation instead of letting users guess what the name of a certain host API could be exactly.
After all, PortAudio also uses its own fixed names like paWDMKS.
But most likely this has some problems of its own ...
Long story short, I'm not so sure if this is such a minor upgrade, probably we should discuss the new platform-specific API as a whole?

I saw too late that the more general discussion is here: #85.

Yeah, as implemented based upon matching on the ['name'] field, I have a similar set of concerns regarding this PR, but since we touched on the idea in #83, I figured I'd follow through with this quickie.
My own preference is for coming up with something that matches 1:1 with PortAudio's host api enumeration, since using the enumeration is guaranteed to give you the expected API.  I had some questions in the code comments in #85, specifically, wondering if there's a way to automatically pulling the names from that enum.  For now, I just left a dict in #85 where I hard-coded an 'apiname' string for each enum value, but to create these names, I just lowercased the name of each enum value and stripped off the "pa" prefix.  This way, we'd pass the blame onto PortAudio if someone doesn't like them, right?  ;)
Anyhow, I'll assume the rest of this discussion can happen in #85.  :)
Shall we drop this PR (#84)?  Or should I change this PR to using the 'apiname' strings from #85 if there's a potential that you'd like to keep query_hostapis()?  :)
Note that in #85, I didn't include the commit for #84, since I also see it as a question of what we'd want to support going forward.

Regarding pulling the enum names: @tgarc recently used .relements on a CFFI type: https://github.com/spatialaudio/python-sounddevice/pull/82/commits/57db7a3f9f789d804c99780562e27ee066fd5145#diff-fdd238ebc8d2e4582b25293d4394967fR2269
Is that what you are looking for?

Shall we drop this PR

Let's wait and see what happens over there ...

@mgeier @tgarc .relements!  Sweet!  :)
translation:  Yes, that is precisely what I was hoping for.


Deprecate APIResponsiveness measurement in favor of APIResponsivenessPrometheus (simple query)

/good-first-issue
I am happy to provide guidance if someone wants to work on this one.

I would like to take a stab and would love some guidance.

Awesome, @yasarhussain. I'll come back with more details hopefully by the end of the day.

Is there anyone doing this issue now? I am willing to participate if not.

I was planning on doing it but was waiting for guidance from @oxddr

I apologize, for not coming back to you earlier. Here's what needs to be done:

Rollout ENABLE_PROMETHEUS_API_RESPONSIVENESS in all tests. It's enabled in some tests (e.g. gce100)
Cleanup experiment after some time (TBD, 1 week?)
Delete APIResponsiveness measurement from test configs
Delete APIResponsiveness measurement itself

All of those changes are considered "experiment" and should follow this policy: https://github.com/kubernetes/perf-tests/blob/master/clusterloader2/docs/experiments.md
Changes needs to be done for both density and load tests

@Sakuralbj since this issue is "taken" for now, please have a look at other opened issues, e.g. https://github.com/kubernetes/perf-tests/issues/787 touches similar area and it seems, that nobody is working on.

@oxddr Ok, I'll have a look. Thank you!

/close
This has been fixed.


SSL Error with Microsoft.Data.SqlClient on Debian 10.2

On fresh Debian 10.2, Microsoft.Data.SqlClient failed to connect to SqlServer with
== Connecting on an SQL Server 11.0.3156.0 ==

A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 35 - An internal exception was caught)
Unhandled exception. Microsoft.Data.SqlClient.SqlException (0x80131904): A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 35 - An internal exception was caught)

Stack trace :
---> System.Security.Authentication.AuthenticationException: Authentication failed, see inner exception.
---> Interop+OpenSsl+SslException: SSL Handshake failed with OpenSSL error - SSL_ERROR_SSL.
---> Interop+Crypto+OpenSslCryptographicException: error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol
  --- End of inner exception stack trace ---
  at Interop.OpenSsl.DoSslHandshake(SafeSslHandle context, Byte[] recvBuf, Int32 recvOffset, Int32 recvCount, Byte[]& sendBuf, Int32& sendCount)
  at System.Net.Security.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, ArraySegment`1 inputBuffer, Byte[]& outputBuffer, SslAuthenticationOptions sslAuthenticationOptions)
  --- End of inner exception stack trace ---
  at System.Net.Security.SslStream.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, ExceptionDispatchInfo exception)
  at System.Net.Security.SslStream.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
  at System.Net.Security.SslStream.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
  at System.Net.Security.SslStream.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
  at System.Net.Security.SslStream.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
  at System.Net.Security.SslStream.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
  at System.Net.Security.SslStream.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
  at System.Net.Security.SslStream.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
  at System.Net.Security.SslStream.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
  at System.Net.Security.SslStream.ProcessAuthentication(LazyAsyncResult lazyResult, CancellationToken cancellationToken)
  at System.Net.Security.SslStream.AuthenticateAsClient(SslClientAuthenticationOptions sslClientAuthenticationOptions)
  at System.Net.Security.SslStream.AuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation)
  at System.Net.Security.SslStream.AuthenticateAsClient(String targetHost)
  at Microsoft.Data.SqlClient.SNI.SNITCPHandle.EnableSsl(UInt32 options)
  at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
  at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
  at Microsoft.Data.SqlClient.TdsParser.ConsumePreLoginHandshake(Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean& marsCapable, Boolean& fedAuthRequired)
  at Microsoft.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean withFailover, SqlAuthenticationMethod authType, SqlAuthenticationProviderManager sqlAuthProviderManager)
  at Microsoft.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover)
  at Microsoft.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout)
  at Microsoft.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance)
  at Microsoft.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling, String accessToken, DbConnectionPool pool, SqlAuthenticationProviderManager sqlAuthProviderManager)
  at Microsoft.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
  at Microsoft.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
  at Microsoft.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
  at Microsoft.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
  at Microsoft.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
  at Microsoft.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
  at Microsoft.Data.SqlClient.SqlConnection.Open()
  at SampleSqlClientProblem.ConnectorTest.Init() in C:\Users\jleclerc\source\repos\SampleSqlClientProblem\SampleSqlClientProblem\ConnectorTest.cs:line 50
  at SampleSqlClientProblem.ConnectorTest..ctor() in C:\Users\jleclerc\source\repos\SampleSqlClientProblem\SampleSqlClientProblem\ConnectorTest.cs:line 14
  at SampleSqlClientProblem.Program.AsyncMethod() in C:\Users\jleclerc\source\repos\SampleSqlClientProblem\SampleSqlClientProblem\Program.cs:line 26
  at SampleSqlClientProblem.Program.<>c.<<Main>b__0_0>d.MoveNext() in C:\Users\jleclerc\source\repos\SampleSqlClientProblem\SampleSqlClientProblem\Program.cs:line 15
--- End of stack trace from previous location where exception was thrown ---
  at SampleSqlClientProblem.Program.Main(String[] args) in C:\Users\jleclerc\source\repos\SampleSqlClientProblem\SampleSqlClientProblem\Program.cs:line 14

== Connecting on an SQL Server 10.50.6560.0 ==
Process just hang on OpenConnection(), using a whole cpu core

The same code work just fine on Debian 9.0
Project is published with : dotnet publish SampleSqlClientProblem.csproj --self-contained --runtime linux-x64 --output output_package
(Note that the problem is also here without a runtime dependent publish)
Sample project for problem reproduction :
SampleSqlClientProblem.zip

Duplicate of #201


GRAPH_TRAVERSAL_TREE: Why nested results?

When using the above graph operation why do the results come back nested in 3 levels of an array?
i.e.:
[
  [
    [
      { /* result object */}
    ]
  ]
]

I'm finding I do return GRAPH_TRAVERSAL_TREE(...)[0][0] sometimes...

@mchacki is this a feature or a bug?

the GRAPH_TRAVERSAL functions are removed with ArangoDB 3.0
Find out about how to migrate them to the new traverser: https://docs.arangodb.com/devel/AQL/Graphs/Traversals.html
ArangoDB RC2 is available for download via: https://www.arangodb.com/download-preview/

Hi, I am finding it hardly impossible to get the nested results in GRAPH_TRAVERSAL_TREE. Yes for me it was a feature.
My end goal is to have something similar to the Graph UI in arangoDb dashboard. There you start with a vertex, then you have a nested result where the children of the root JSON payload are the immediate vertexes. Each of them in return will have a child property with again another set of vertices.
I can not see how that can be achieved with the API in 3.x
can you help please


Upgrade go version

Codecov Report

Merging #117 (fcbb639) into main (cb9c97e) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #117   +/-   ##
=======================================
  Coverage   99.43%   99.43%
=======================================
  Files          10       10
  Lines         530      530
=======================================
  Hits          527      527
  Misses          2        2
  Partials        1        1

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 cb9c97e...fcbb639. Read the comment docs.


Remove ReceivedCharacter

Objective

Fixes #12639.
ReceivedCharacter was deprecated in #12868 for 0.14, and should be removed for 0.15.

Solution

Remove all instances of ReceivedCharacter, including the relevant #[allow(deprecated)] lint attributes.

Migration Guide
ReceivedCharacter was deprecated in 0.14 due to winit reworking their keyboard system. It has now been fully removed. Switch to using KeyboardInput instead.
// 0.14
fn listen_characters(events: EventReader<ReceivedCharacter>) {
    for event in events.read() {
        info!("{}", event.char);
    }
}

// 0.15
fn listen_characters(events: EventReader<KeyboardInput>) {
    for event in events.read() {
        // Only check for characters when the key is pressed.
        if !event.state.is_pressed() {
            continue;
        }

        // Note that some keys such as `Space` and `Tab` won't be detected as a character.
        // Instead, check for them as separate enum variants.
        match &event.logical_key {
            Key::Character(character) => {
                info!("{} pressed.", character);
            },
            Key::Space => {
                info!("Space pressed.");
            },
            _ => {},
        }
    }
}

Thanks! I'll merge this as trivial once CI is green.


Not working with threejs 0.163.0

I saw your YouTube video (great) and install this repo - worked perfectly. However, when I uninstall three 0.148 which you used and install 0.163 instead (latest version), it does not work. There is only a black cube on the screen.
Steps to reproduce

Clone this repo
Change package.json dependencies:

"dependencies": {
    "@types/three": "^0.163.0",
    "dat.gui": "^0.7.9",
    "three": "^0.163.0"
  }

Run npm install followed by npm start
Observe a black cube instead of the expected graphical output

This is resolved with my PR: https://github.com/tamani-coding/threejs-stencil-buffer-example/pull/2


Review EPCIS concepts for Location

Review EPCIS concepts relating to BusinessLocation and ReadPoint to inform thinking on the Location RFC. Intent is to make sure we're well positioned for EPCIS support if that is the path we're going down.

Below findings are excerpts from the GS1 EPCIS Guidelines.
General Summary
The Where dimension of an EPCIS event captures where the event physically took place and/or where things are following the event. EPCIS events allow for two location types, readPoint and businessLocation. The readPoint is the location where the event took place. The businessLocation is the location where the object(s) is now considered to reside until a subsequent event takes place. Locations may be identified using a:

[x] GS1 Global Location Number (GLN)
[ ] GLN plus an extension
[x] industry identifier other than GLN
[x] geo-coordinates

URI syntax is used in EPCIS for the identifiers in the Where dimension. For example, suppose a location is identified by GLN<PHONE_NUMBER>114 and extension 987. In EPCIS, the GLN+extension is represented as a Uniform Resource Identifier (URI) according to the EPC Tag Data Standard. The specific type of URI is called an SGLN, which is capable of representing either a
GLN+extension or a GLN without extension. The first part of this identifier (urn:epc:id:) indicates that this identifier follows the EPC Tag Data Standard. The next part (sgln:) says that it is either a GLN or GLN+extension (depending on whether the extension part is 0 or not).

[ ] The SGLN for GLN<PHONE_NUMBER>114 and extension 987 looks like this: urn:epc:id:sgln:0614141.11111.978.
[x]  To represent a GLN without an extension, a single 0 digit is used in place of the extension, like this: urn:epc:id:sgln:0614141.11111.0.

Notes for our Futures Selves

The Grid Location RFC and implementation does not name the GLN extension component as in scope. At this time, GS1 recommends the use of GLN, not GLN + extension, for business transactions due to common limitations in transactional systems. Our current Grid design is not able to support the scenario where a businessLocation is defined at a fine level of granularity (i.e. a specific bin in a specific spot within a warehouse) via a GLN + extension. See Transactional use of GLN extension component.


Video: AI Forum 2023 | Future of Foundation Models

AI Forum 2023 | Future of Foundation Models
Link: https://www.youtube.com/watch?v=f6m0MpbNicU&list=WL&index=15&t=9s&ab_channel=MicrosoftResearch

RetNet

Future foundation model will be 1-bit RetNet (RetNet + BitNet)


Work-in-progress: Centroid file parser

Generic Centroid parser
This patch introduces the GenericCentroidParser class to process the PCB pick-n-place / centroid file. This cripples the script
generate_interactive_bom.py, so users are advised to invoke the centroid2pcbdata.py instead.
The input centroid file follows the following pattern:
# PcbXY Version 1.0
# Date: Fri 02 Oct 2020 05:39:00 AM GMT UTC
# Author: author
# Title: (unknown) - PCB X-Y
# RefDes, Description, Value, X, Y, rotation, top/bottom
# X,Y in mm.  rotation in degrees.
# --------------------------------------------
CR1,"diode-bridge-kbp2g.fp","Bridge_Rect",121.92,85.72,90,top
C19,"0603","0.1uF/16v",100.33,66.04,0,bottom
C6,"0805","10uF/16v",24.77,78.11,180,top
pad4,"hole-155mil.fp","hole-155",133.35,82.55,0,top
C5,"0603","1uF/16v",24.13,85.09,180,top
...

The command generate_interactive_bom.py file.xy produces the HTML with a complete list of components on front and back side. However, the graphical view of the PCBs are empty because of missing image data plus size information.
A script centroid2pcbdata.py is provided to assist users to convert a centroid file to a valid json-serialized pcbdata object:
    usage: centroid2pcbdata.py [-h] [-i board.xy] [-o pcbdata.json] [-W M] [-H N]

    Parse centroid file

    optional arguments:
      -h, --help            show this help message and exit
      -i board.xy, --input board.xy
                            Input centroid file
      -o pcbdata.json, --output pcbdata.json
                            Output pcbdata file
      -W M, --width M       Width of image, in mm
      -H N, --height N      Height of image, in mm

Photorealistic PCB rendering on back side
A UX breaking change is introduced to the render.js script, where the back side canvas is rotated by 180 degree, and without any horizontal flip.

Such change is necessary because the back side rendering of the PCB is already flipped horizontally.
Here, the photorealistic rendering of the PCB is assumed to be exported by the PCB software as 'basename-front.png', 'basename-back.png' at a specific millimeter-per-pixel scale. The absolute coordinate of each component, as defined in the centroid file (basename.xy), should match the corresponding rendered element of the PCB.

Closing for inactivity. File new MR if it's still relevant.


Lofi Manage Users

Overview

Create the simple skeleton of the Manage Users Page (aka the user directory)
GSP Figma

Notes

Might need to wait on the authentication team to finish backend users table.
Start thinking about how pagination should work. If you have time, try to implement this.

Acceptance Criteria

Search bar for users must be functional.
Table showing users must be implemented.
Edit should open a modal, as shown in the figma.
Add user should open a modal, as shown in the figma.
After Add/Delete/Edit there should be a temporary notification like in the Figma.

Resources

https://ant.design/components/modal
https://ant.design/components/table
https://ant.design/components/input
https://ant.design/components/notification

As always, feel free to pm Avent, Jackie, Claude or Alan on Slack for support

/pr manageUsersPage

./pr manageUsersPage


Support the teachers search returning a 500 response

There is a scenario where when searching for teacher records the API can
return a 500 response.
We don't currently handle this and present an unhelpful error page.
I opted to treat this as a no match scenario for the user, as it is
effectively the same thing to them.
Link to Trello card
https://trello.com/c/XNwY3qMX/137-fix-missing-search-results
Checklist

[ ] Attach to Trello card
[ ] Rebased main
[ ] Cleaned commit history
[ ] Tested by running locally

I opted to treat this as a no match scenario for the user, as it is
effectively the same thing to them.

Not sure about this — if it's a transient error, maybe it would be preferable to let them know in some way that the search failed and they should try again? Also, should we send something to Sentry when this happens?
WDYT @gpeng ?


Optimal image size for preserve_aspect_ratio

I don't really understand the comments on the preserve_aspect_ratio config.
    # Whether or not to preserve aspect ratio when resizing the image.
    # If True, this will resize all images to be max_size^2 pixels in area while keeping aspect ratio.
    # If False, all images are resized to max_size x max_size
    'preserve_aspect_ratio': False,

So if all my dataset images are size 1920x1080 what would the optimal settings be preserve_aspect_ratio and max_size ?
Should it be this (sqroot of 1920x1080)?
preserve_aspect_ratio = True
max_size = 1440

Hi,
could you please share your result? I am working with 2 datasetets and have a lot of different sizes.
Thank you!


Better Syntax Highlighting

Syntax highlighting seems to be broken, or there may be something wrong with Atom's One Dark Theme. Any feedback on this @basarat? If it is something on our end, I can help with the fix. Attached you will find an example of a .ts file I am working on:

Seems to be missing styles in one dark (or us using wrong style names). Compare monokai with one dark:
One Dark

Monokai

Marked as up for grabs

After experiencing the same bug and finding this issue, I dug around a bit. The keywords that lack highlighting all have the classes .keyword.operator.ts. E.g. Monokai sets the highlighting on .keyword, you can see the highlight just fine.
Other themes, such as One Dark, Atom Dark and Base16 Tomorrow Dark specifically set the color of .keyword.operator back to the normal text color. The classes .keyword.operator are also set on normal operators, such as =.
If I want these operators highlighted is probably a matter of preference and I get that different themes have different opinions about that. On the other side, I do believe keywords such as interface, declare, etc. are intended to be highlighted all the time (if you have syntax highlighting turned on).
That would mean atom-typescript is indeed using wrong classes for these keywords. I have never dealt with Atom grammars, but I've had my fair share of fun with Vim's grammars. I'll try and figure out which classes would be more appropriate and send a PR.

Hey @Cu3PO42! I've been away all day, but after examining how both themes work I came to similar conclusions. I saw your fork and everything is starting to look great! I made one small addition so that entity.name.module is colored in a darker shade of orange following on One Dark's color scheme. Here is the code:
.editor, atom-text-editor::shadow {
  .source.ts {
    .meta.function {
      .entity {
        &.name.module {
          color: hsl(29, 54%, 61%);
        }
      }
    }
  }
}

I'll keep working on this fix over the weekend. I believe we should add a few more patterns to our grammar file in order to support member variables and functions, and, object keys. Also, given that we are  tweaking One Dark for our needs, maybe my code should be added to that project instead. I saw they have language specific files, so it seems logical. What are your thoughts on this? Hope you have a great night.

@dgarzon I don't really know what Atom's policy is on adding language specifics to themes, but to me that looks fine. Something like that should probably go in One Light as well.
I am starting to dig deeper into TextMate grammars right now to properly match nested types, etc. I only just figured out recursion was available... I must admit I wasted quite some time on thinking about how to decently match a non-regular language with just RegExes.

@basarat I think this can be closed now.

:rose:


Various fixes for Windows

I changed the multi-line exception. FYI
Exception, "message" is not compatible with Python 3 (not sure about Python 2). The compatible way to write it is Exception("message")
I also made a small change to a part, as it was only giving the gccxml_msg (which was an empty string), so I thought giving a return code may be helpful.
This resolves #57
EDIT: Not entirely sure why the pep8 checks are failing. I didn't edit all that much...
I'll read over the log later

Thanks for the patches. I merged that, I will take care of the pep8 error myself.It can sometimes be tricky to fix, but I am trying to keep the code pep8 compliant.
I will go through the error message part, I am not really happy how it is handled and what type of exceptions are raised/caught. I'll clean that up in the next patches.
At least now the usage on windows should be improved. Thanks for all.

 I appreciate that you are quick to respond a fix issues!

Thanks.


Confusing text in the Readme.md for watson_contribution_nodes

The sentence below does read clearly.
There will be times when we are working on updates that the project will contain updates that we haven't yet published to npm.
Suggest the following
There will be times when we are working on updates to this project when there will be updates that we haven't yet published to npm.

Change made and committed


An unknown error occurred

I got this error pushing a new module to the BCR:

Failed to publish entry for<EMAIL_ADDRESS>to the Bazel Central Registry.
An unknown error occurred. Please report an issue here: https://github.com/bazel-contrib/publish-to-bcr/issues.

I imagine it could be because it was the first version and not an update. I'm not sure if I can view logs anywhere else to see details?

This was related to an incorrect strip_prefix in source.template.json. There should be a better user-facing error to indicate what the problem is.

I also just saw an error like that

Failed to publish entry for<EMAIL_ADDRESS>to the Bazel Central Registry.

Is there any way to see what cause the problem?

The app failed to download the release archive. It looks like the url in .bcr/core/source.template.json is incorrect:
"https://github.com/{OWNER}/{REPO}/releases/download/{TAG}/${REPO}-${VERSION}.tar.gz"

(need to remove the $s)
I also need to do some more work around detecting errors and sending more helpful messages.


MacVim build fails on OS X 10.7.5 Lion

I have been having trouble updating MacVim via macports. The logfile is attached. I issued a macports ticket, and was told that my OS version is too old for support and that I should "take it upstream" to this site.
I've attached the logfile containing build-fail info.
main.log.txt

Could you try this? https://github.com/macvim-dev/macvim/pull/237

Compiles.

Hi @splhack and @persramd.  I'm also trying to build MacVim on Lions 10.7.5 but using Homebrew. I'm getting the following errors when I run brew install macvim:
==> make
Last 15 lines from /Users/Pedro/Library/Logs/Homebrew/macvim/02.make:
    return (__bridge void *)mmChannel;
            ^
MacVim/MMBackend.m:1697:29: error: use of undeclared identifier '__bridge'
    MMChannel *mmChannel = (__bridge MMChannel *)cookie;
                            ^
MacVim/MMBackend.m:3431:29: error: use of undeclared identifier '__bridge'
    MMChannel *mmChannel = (__bridge MMChannel *)info;
                            ^
MacVim/MMBackend.m:3444:32: error: use of undeclared identifier '__bridge'
    CFSocketContext ctx = {0, (__bridge void *)self, NULL, NULL, NULL};
                               ^
4 errors generated.
make[1]: *** [objects/MMBackend.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [first] Error 2

Any help will be greatly appreciated (if you need additional information please let me know).
One additional question: are there precompiled binaries for Lion? Thanks!!

How about adding this line in MMBackend.m?
#define __bridge

Hi @splhack  thanks for the quick reply. Adding that line to MMBackend.m indeed solved that particular issue. However now the build fails with the following output:
=== BUILD NATIVE TARGET QuickLookStephen OF PROJECT QuickLookStephen WITH THE DEFAULT CONFIGURATION (Release) ===
Check dependencies

ProcessInfoPlistFile build/Release/QLStephen.qlgenerator/Contents/Info.plist Info.plist
    cd /Users/Pedro/Desktop/macvim/src/MacVim/qlstephen
    builtin-infoPlistUtility Info.plist -expandbuildsettings -platform macosx -o /Users/Pedro/Desktop/macvim/src/MacVim/qlstephen/build/Release/QLStephen.qlgenerator/Contents/Info.plist

CopyStringsFile build/Release/QLStephen.qlgenerator/Contents/Resources/English.lproj/InfoPlist.strings English.lproj/InfoPlist.strings
    cd /Users/Pedro/Desktop/macvim/src/MacVim/qlstephen
    builtin-copyStrings --validate --inputencoding utf-16 --outputencoding UTF-16 --outdir /Users/Pedro/Desktop/macvim/src/MacVim/qlstephen/build/Release/QLStephen.qlgenerator/Contents/Resources/English.lproj -- English.lproj/InfoPlist.strings

CompileC build/QuickLookStephen.build/Release/QuickLookStephen.build/Objects-normal/i386/main.o main.c normal i386 c com.apple.compilers.llvm.clang.1_0.compiler
    cd /Users/Pedro/Desktop/macvim/src/MacVim/qlstephen
    setenv LANG en_US.US-ASCII
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c -arch i386 -fmessage-length=0 -std=c99 -Wno-trigraphs -fpascal-strings -Os -Wno-missing-field-initializers -Wno-missing-prototypes -Wreturn-type -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-enum-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -DRKL_PREPEND_TO_METHODS=rkl_ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -mmacosx-version-min=10.7 -g -Wno-sign-conversion -I/Users/Pedro/Desktop/macvim/src/MacVim/qlstephen/build/QuickLookStephen.build/Release/QuickLookStephen.build/QLStephen.hmap -I/Users/Pedro/Desktop/macvim/src/MacVim/qlstephen/build/Release/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/Pedro/Desktop/macvim/src/MacVim/qlstephen/build/QuickLookStephen.build/Release/QuickLookStephen.build/DerivedSources/i386 -I/Users/Pedro/Desktop/macvim/src/MacVim/qlstephen/build/QuickLookStephen.build/Release/QuickLookStephen.build/DerivedSources -Wextra -Wall -Wno-unused-parameter -F/Users/Pedro/Desktop/macvim/src/MacVim/qlstephen/build/Release -MMD -MT dependencies -MF /Users/Pedro/Desktop/macvim/src/MacVim/qlstephen/build/QuickLookStephen.build/Release/QuickLookStephen.build/Objects-normal/i386/main.d --serialize-diagnostics /Users/Pedro/Desktop/macvim/src/MacVim/qlstephen/build/QuickLookStephen.build/Release/QuickLookStephen.build/Objects-normal/i386/main.dia -c /Users/Pedro/Desktop/macvim/src/MacVim/qlstephen/main.c -o /Users/Pedro/Desktop/macvim/src/MacVim/qlstephen/build/QuickLookStephen.build/Release/QuickLookStephen.build/Objects-normal/i386/main.o
2016-02-25 19:31:22.960 xcodebuild[20703:3c03]  DVTAssertions: Warning in /SourceCache/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-2110/Xcode3Sources/XcodeIDE/Frameworks/DevToolsBase/pbxcore/Target.subproj/BuildCommandResultsPostprocessing/XCClangResultsPostprocessor.m:98
Details:  Unable to read diagnostics from file "/Users/Pedro/Desktop/macvim/src/MacVim/qlstephen/build/QuickLookStephen.build/Release/QuickLookStephen.build/Objects-normal/i386/GeneratePreviewForURL.dia" (Invalid File): Bad header in diagnostics file
Object:   <XCClangResultsPostprocessor: 0x4010ea5e0>
Method:   -postprocessResultsForCommandInvocation:
Thread:   <NSThread: 0x40097fae0>{name = (null), num = 4}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.

CompileC build/QuickLookStephen.build/Release/QuickLookStephen.build/Objects-normal/i386/GeneratePreviewForURL.o GeneratePreviewForURL.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    cd /Users/Pedro/Desktop/macvim/src/MacVim/qlstephen
    setenv LANG en_US.US-ASCII
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch i386 -fmessage-length=0 -std=c99 -fobjc-arc -Wno-trigraphs -fpascal-strings -Os -Wno-missing-field-initializers -Wno-missing-prototypes -Wreturn-type -Wno-implicit-atomic-properties -Wno-receiver-is-weak -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-enum-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -DRKL_PREPEND_TO_METHODS=rkl_ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -mmacosx-version-min=10.7 -g -Wno-sign-conversion -I/Users/Pedro/Desktop/macvim/src/MacVim/qlstephen/build/QuickLookStephen.build/Release/QuickLookStephen.build/QLStephen.hmap -I/Users/Pedro/Desktop/macvim/src/MacVim/qlstephen/build/Release/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/Pedro/Desktop/macvim/src/MacVim/qlstephen/build/QuickLookStephen.build/Release/QuickLookStephen.build/DerivedSources/i386 -I/Users/Pedro/Desktop/macvim/src/MacVim/qlstephen/build/QuickLookStephen.build/Release/QuickLookStephen.build/DerivedSources -Wextra -Wall -Wno-unused-parameter -F/Users/Pedro/Desktop/macvim/src/MacVim/qlstephen/build/Release -MMD -MT dependencies -MF /Users/Pedro/Desktop/macvim/src/MacVim/qlstephen/build/QuickLookStephen.build/Release/QuickLookStephen.build/Objects-normal/i386/GeneratePreviewForURL.d --serialize-diagnostics /Users/Pedro/Desktop/macvim/src/MacVim/qlstephen/build/QuickLookStephen.build/Release/QuickLookStephen.build/Objects-normal/i386/GeneratePreviewForURL.dia -c /Users/Pedro/Desktop/macvim/src/MacVim/qlstephen/GeneratePreviewForURL.m -o /Users/Pedro/Desktop/macvim/src/MacVim/qlstephen/build/QuickLookStephen.build/Release/QuickLookStephen.build/Objects-normal/i386/GeneratePreviewForURL.o
error: -fobjc-arc is not supported on platforms using the legacy runtime
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1

** BUILD FAILED **

The following build commands failed:
	CompileC build/QuickLookStephen.build/Release/QuickLookStephen.build/Objects-normal/i386/GeneratePreviewForURL.o GeneratePreviewForURL.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
make: *** [macvim] Error 65

Once again any help/hints will be greatly appreciated (I have no idea what's going on).

Are you actually using the latest Xcode? Which version?

@splhack. Is the following output useful?
pedro-macbook:~ Pedro$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!

Warning: A newer Command Line Tools release is available.
The standalone package can be obtained from
  https://developer.apple.com/downloads
or it can be installed via Xcode's preferences.

Warning: You seem to have osx-gcc-installer installed.
Homebrew doesn't support osx-gcc-installer. It causes many builds to fail and
is an unlicensed distribution of really old Xcode files.
Please install the CLT or Xcode 4.6.3.

Warning: You are using OS X 10.7.
We (and Apple) do not provide support for this old version.
You may encounter build failures or other breakages.
pedro-macbook:~ Pedro$ xcode-select -v
xcode-select version 2003.

In Xcode -> Preferences -> Locations. the "Command Line Tools" box says `Xcode 4.6.3 (4H1503).

Ok, then, you can remove qlstephen dependency from Xcode project.

@splhack sorry for being such a noob but how do I do that?

Open MacVim.xcodeproj and just remove QuickLookStephen.xcodeproj from project.

@splhack thank you!! That indeed solved my problem. Should your two fixes be translated into a pull request or are they specific to my setup?

@petobens I merged __bridge fix, but there are no good universal solutions for removing QuickLookStephen.xcodeproj. so 10.7 users need to do it by hand.

@splhack ohh I see. Once again thanks for the help and patience!


ESP32 setup

Hi!
Thank you for your work in bringing the zig lang to the ESP.
How to flash result binary? Is it elf or binary? Is it full flash (offset 0x00) or just executable (0x1000)?
Is there a way to compile the binaries for the ESP32 chip?
If there are simple steps to do so, please point me to the documentation I should read.
Best,

We can currently only support ESP32-C3, no Xtensa based ESP32 is supported


Does it support Ollama?

Does it support Ollama?

iirc, not directly because of a missing (different) endpoint on Ollama regarding models (related to Ollama openai api compat), but you can use litellm proxy and that should make it possible to use ollama, among other supported models.
so, iirc

gptscript -> local ollama = :x:
gptscript -> litellm -> local ollama = :ok:

What's the missing endpoint in the Ollama OpenAI compact?

@rinor  ok thanks for the solution. closing now.

What's the missing endpoint in the Ollama OpenAI compact?

@prologic iirc it was the /models endpoint


When going to / the user gets redirected to /dashboard instead of /login

Fixed by allowing the user to logout, the reason as to why we were redirected back to dashboard all the time was because we were authenticated and needed to logout. So I added a logout form, controller and redirect to "un-auth" the user


Use (char *) version of URL, if available

There was/is the famous problem where the hadoop adaptor can't link to xrootd libraries compiled with a different C++ API.
Newer versions of the xrootd libraries have a form of Open() that accepts a char * instead of an std::string - https://github.com/xrootd/xrootd/issues/1010 .. If this is added with some sort of runtime checking (e.g. use char* if it exists, fall back to std::string otherwise), it'll be possible to have a library usable anywhere

ok, I see Michal indeed added the support in https://github.com/xrootd/xrootd/commit/55e52cec4efb4dc05437f05140597f2728d31c90 so it should be in v4.10.0 and up.

Hi Piotr,
I actually found an easier solution that works on all versions. Construct
an XrdPosixFile on the heap via new()
https://github.com/xrootd/xrootd/blob/7476545ae9f1301409b8c3503cb28b672bb34589/src/XrdPosix/XrdPosixFile.cc#L91
Which accepts a char* and then pull the clFile member from XrdPosixFile
(which is helpfully public)
https://github.com/xrootd/xrootd/blob/7476545ae9f1301409b8c3503cb28b672bb34589/src/XrdPosix/XrdPosixFile.hh#L65
Then just make sure to delete the XrdPosixFile when java calls close so the
destructor happens
https://github.com/xrootd/xrootd/blob/7476545ae9f1301409b8c3503cb28b672bb34589/src/XrdPosix/XrdPosixFile.cc#L123
No function calls from Hadoop-xrootd have STL objects as arguments, so the
link problem goes away!
It's dark in this basement.


Update compat info

Codecov Report

Merging #8 (7421639) into main (f115caa) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main       #8   +/-   ##
=======================================
  Coverage   66.39%   66.39%
=======================================
  Files           4        4
  Lines         244      244
=======================================
  Hits          162      162
  Misses         82       82

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 f115caa...7421639. Read the comment docs.


Problem Redmine 3.3.0-dev

Good Morning.
I inform you that Pixel Cookers is not compatible with the new version 3.3 of Redmine.
When selecting a project in the project list opcioens bar on the left is not loaded in vertical, horizontal loads and opcions not seen.
I attach a caputra screen.

A greeting.

it seems to be related to that new feature: http://www.redmine.org/issues/20632

This in an ugly fix, but it works. I don't know the good practices rules for ror apps, or redmine theming, or anything else, so anyone who would improve my solution is welcome.
I have edited the file public/themes/pixel-cookers/stylesheets/application.css (line 410) with this :
#main-menu ul li {
  float: none;
  list-style-type: none;
  margin: 0;
  padding-bottom: 2px;
  text-align: left;
  display: block;
}
#main-menu .tabs-buttons .tab-left,
#main-menu .tabs-buttons .tab-right {
  display: none;
}

In addition to the CSS above, I also added this:
#main-menu .menu-children {
left: 0;
}
That fixes the menu displaying too far off the left of the window.

I something almost like it.
#main-menu .menu-children {
margin-left: 10px;
width: 100%;
}
https://github.com/vsc55/redmine-theme/blob/master/stylesheets/application.css

@pixel-cookers, any updates about this issue?

In my fork is solved.
https://github.com/vsc55/redmine-theme


[Extensibility Enhancement] Page 113 Budget SetGLAccCategoryFilter

Business Central stores only the latest filter value in this page. If you use multiple budgets, with different filters you have to change the filters every time you change the budget.
It would be great if we could set filters programmatically.
Please add SetGLAccCategoryFilter to set the G/L Account Category Filter from outside.

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.


Problems with Orthofinder module

Can't seem to make orthofinder work. I think it's related to the "prior run" folder.
Changing one line solves the issue.

Solved here #13.


Festat standalone is now added

Thanks for this @swapanmallicksmhi. I will try to take a look ASAP.

Hi @swapanmallicksmhi,
Just a suggestion feel free to ignore if you don't have time. It could be good to split the script in two step. One script to prepare the working directory with the symlinks and a second scripts that submits the job to the HPC.
For the first step I would use a language that is a bit better at handling dates (and arrays) than bash. Either python or even better julia (it's available on Atos with module load julia).
E.g. something like (untested)
using Dates

SCRATCH=ENV["SCRATCH"]
EXP="myexp"
HM_DATA="$SCRATCH/hm_home/$EXP/"

dtgbeg=DateTime(2022,01,03,00)
dtgend=DateTime(2023,01,30,00)
dtgstep=Day(6)
dtgrange = dtgbeg:dtgstep:dtgend

filename = "ICMSHHARM+0006"

subdirs = Dates.format.(dtgrange,"yyyy/mm/dd/HH")
mbrs = lpad.(1:9,3,"0")  # ["001", "002"  ... "009"]

targets = [joinpath(HM_DATA,sd,"mbr",mbr,filename) for sd in subdirs for mbr in mbrs]

for (index,target) in enumerate(targets)
    i3 = lpad(index,3,"0")
    symlink(target,"ICMSHHARM+0$i3")
end

Hi @roelstappers, Sure, I will try to convert the script in python or Julia. And will to the test first.

No strong opinions both work. Maybe now continue with using develop and after the merge fix this. A colleague had the issue and he could  fix his develop branch by clicking "sync fork" after his PR was merged, i.e. that sync removed the commits.

No strong opinions both work. Maybe now continue with using develop and after the merge fix this. A colleague had the issue and he could fix his develop branch by clicking "sync fork" after his PR was merged, i.e. that sync removed the commits.

Thanks @roelstappers. I did not realize this was possible. Let's stick with this PR so ...

Hi @ewhelan and @roelstappers,
Thank you for all the comments.
Is it ok if I follow the first option?
Also I need your comments on this python and bash script.
Now the script is divided with two parts as suggested by @roelstappers .
First python script (festat_S1.py) is to arrange input FA file and is work fine in Atos.
The second part is to submit the job in Atos.
Unfortunately the python script for the second one do not work at Atos.
So I keep the second part in bash only.
Please suggest on this.
Below are the two script I attached.
festat_S1.py----->

import os
from datetime import datetime, timedelta
#---------INPUT NEEDED-----------
EXP    = "SURF_CARRA2_CY46"              # Change the experiment name here
dtgbeg =  datetime(2022, 1, 15, 00)       # Change Start date
dtgend =  datetime(2022, 2, 12, 18)       # Change End date
#--------------------------------

cycl =  timedelta(hours=6)                # Assimilation cycle at 00 06 12 and 18 UTC
SCRATCH = os.environ['SCRATCH']
HM_DATA = os.path.join(SCRATCH,'hm_home',EXP,'archive')
TMPOUT  = os.path.join(SCRATCH,'tmp_festat') # Working directory 'tmp_festat'
os.makedirs(TMPOUT, mode=0o755, exist_ok=True)
os.chdir(TMPOUT)
ens_mem=range(1,10)                       # Ensemble member (ens1,ens2.....,ens9)
filename = "ICMSHHARM+0006"               # 6 hour forecast FA file
fnumber=1

while dtgbeg <= dtgend:
YY=dtgbeg.isoformat()[0:4]
MM=dtgbeg.isoformat()[5:7]
DD=dtgbeg.isoformat()[8:10]
HH=dtgbeg.isoformat()[11:13]
for mm in ens_mem:
mem='mbr00'.ljust(6,str(mm))
target = os.path.join(HM_DATA, YY, MM, DD, HH, mem, filename)
print(target)
#
if   ( fnumber <= 9 ):
filelink = filename[:-1]+str(fnumber)
elif ( fnumber >= 10 and fnumber <= 99 ):
filelink = filename[:-2]+str(fnumber)
elif ( fnumber >= 100 and fnumber <= 999 ):
filelink = filename[:-3]+str(fnumber)
else:
break
#
if os.path.isfile(filelink):
os.remove(filelink)
os.symlink(target ,filelink)
fnumber += 1
dtgbeg += cycl

print(TMPOUT)
quit()
festst_S2.job------>
#!/bin/bash
#SBATCH --cpus-per-task=8
#SBATCH --error=festat.log
#SBATCH --job-name=FESTAT
#SBATCH --nodes=37
#SBATCH --output=festat.log
#SBATCH --qos=np
#SBATCH --ntasks-per-node=27
#SBATCH --time=02:00:00

export MPPEXEC="srun"
export NPROC=999
export NPROCX=1
export NPROCY=1
export OMP_MAX_ACTIVE_LEVELS=1
export OMP_NUM_THREADS=8
export OMP_STACKSIZE=256M
eojcmd=""
ulimit -S -s unlimited || ulimit -s
ulimit -S -m unlimited || ulimit -m
ulimit -S -d unlimited || ulimit -d
set -e

EXP=SURF_CARRA2_CY46
ENV=${HOME}/hm_home/$EXP
Build the namelist
cat > fort.4 << EOF
&NAMFESTAT
NCASES=$NPROC,
LSTABAL=.true.,
LANAFBAL=.true.,
LELAM=.TRUE.,
CNAME='ICMSHHARM+0',
NFRGRP=9,
NPRINTLEV=0,
LOZONE=.FALSE.,
LOZBAL=.FALSE.,
LUVBAL=.FALSE.,
OUTBAL='stab.bal'
OUTCVT='stab.cvt',
OUTCVU='stab.cv',
/
EOF
source ${ENV}/Env_system
srun FESTAT  || exit

trap - 0
exit

@swapanmallicksmhi To make the code more readable can you edit your message and put your code between triple backticks  like this:
```python
example code
```

Then it will look like this
example code

Thanks @roelstappers
Python (festat_S1.py)
#
import os
from datetime import datetime, timedelta

#---------INPUT NEEDED-----------
EXP    = "SURF_CARRA2_CY46"              # Change the experiment name here
dtgbeg =  datetime(2022, 1, 15, 00)       # Change Start date
dtgend =  datetime(2022, 2, 12, 18)       # Change End date
#--------------------------------
#
cycl =  timedelta(hours=6)                # Assimilation cycle at 00 06 12 and 18 UTC
SCRATCH = os.environ['SCRATCH']
HM_DATA = os.path.join(SCRATCH,'hm_home',EXP,'archive')
TMPOUT  = os.path.join(SCRATCH,'tmp_festat') # Working directory 'tmp_festat'
os.makedirs(TMPOUT, mode=0o755, exist_ok=True)
os.chdir(TMPOUT)
ens_mem=range(1,10)                       # Ensemble member (ens1,ens2.....,ens9)
filename = "ICMSHHARM+0006"               # 6 hour forecast FA file
fnumber=1
#
while dtgbeg <= dtgend:
    YY=dtgbeg.isoformat()[0:4]
    MM=dtgbeg.isoformat()[5:7]
    DD=dtgbeg.isoformat()[8:10]
    HH=dtgbeg.isoformat()[11:13]
    for mm in ens_mem:
        mem='mbr00'.ljust(6,str(mm))
        target = os.path.join(HM_DATA, YY, MM, DD, HH, mem, filename)
        print(target)
        #
        if   ( fnumber <= 9 ):
            filelink = filename[:-1]+str(fnumber)
        elif ( fnumber >= 10 and fnumber <= 99 ):
            filelink = filename[:-2]+str(fnumber)
        elif ( fnumber >= 100 and fnumber <= 999 ):
            filelink = filename[:-3]+str(fnumber)
        else:
            break
        #
        if os.path.isfile(filelink):
           os.remove(filelink)
        os.symlink(target ,filelink)
        fnumber += 1

    dtgbeg += cycl
#
print(TMPOUT)
quit()

#!/bin/bash
#SBATCH --cpus-per-task=8
#SBATCH --error=festat.log
#SBATCH --job-name=FESTAT
#SBATCH --nodes=37
#SBATCH --output=festat.log
#SBATCH --qos=np
#SBATCH --ntasks-per-node=27
#SBATCH --time=02:00:00
#
#
export MPPEXEC="srun"
export NPROC=999
export NPROCX=1
export NPROCY=1
export OMP_MAX_ACTIVE_LEVELS=1
export OMP_NUM_THREADS=8
export OMP_STACKSIZE=256M
eojcmd=""
ulimit -S -s unlimited || ulimit -s
ulimit -S -m unlimited || ulimit -m
ulimit -S -d unlimited || ulimit -d
set -e
##
EXP=SURF_CARRA2_CY46
ENV=${HOME}/hm_home/$EXP
# Build the namelist
cat > fort.4 << EOF
&NAMFESTAT
  NCASES=$NPROC,
  LSTABAL=.true.,
  LANAFBAL=.true.,
  LELAM=.TRUE.,
  CNAME='ICMSHHARM+0',
  NFRGRP=9,
  NPRINTLEV=0,
  LOZONE=.FALSE.,
  LOZBAL=.FALSE.,
  LUVBAL=.FALSE.,
  OUTBAL='stab.bal'
  OUTCVT='stab.cvt',
  OUTCVU='stab.cv',
/
EOF
source ${ENV}/Env_system
srun FESTAT  || exit
#
trap - 0
exit

Both of them work well one after another in Atos.

Thanks Swapan!  Using Python for festat_S1  has made it much more readable I think. For the second step you can just keep that in bash. It won't  benefit from using a more powerful language and is readable as is.
Some minor remarks, not a python user myself (preferring Julia) but I expect that in Python there must be better construction for
  if   ( fnumber <= 9 ):
            filelink = filename[:-1]+str(fnumber)
        elif ( fnumber >= 10 and fnumber <= 99 ):
            filelink = filename[:-2]+str(fnumber)
        elif ( fnumber >= 100 and fnumber <= 999 ):
            filelink = filename[:-3]+str(fnumber)
        else:
            break

e.g. make it a oneline using something like lpad(fnumber,3,"0") to pad numbers with zero on the left like in the Julia example.
And for this:
    YY=dtgbeg.isoformat()[0:4]
    MM=dtgbeg.isoformat()[5:7]
    DD=dtgbeg.isoformat()[8:10]
    HH=dtgbeg.isoformat()[11:13]

There must be some proper date time functions to extract year month date. Also I would call the loop index dtg instead of dtgbeg

Okay, here is my Python script, crafted to optimize functionality while taking into account all minor suggestions and comments by @roelstappers
'''
python festat_S1.py

import os
from datetime import datetime, timedelta
#---------INPUT STAFF-----------
EXP    = "SURF_CARRA2_CY46"                            # Change the experiment name here
dtg    = datetime.strptime('2022011500', '%Y%m%d%H')   # Change Start date
dtgend = datetime.strptime('2022021218', '%Y%m%d%H')   # Change End date
#--------------------------------
cycl =  timedelta(hours=6)                             # Assimilation cycle at 00 06 12 and 18 UTC
SCRATCH = os.environ['SCRATCH']
HM_DATA = os.path.join(SCRATCH,'hm_home',EXP,'archive')
HM_DATA = os.path.join(SCRATCH,'hm_home',EXP,'archive')
TMPOUT  = os.path.join(SCRATCH,'tmp_festat11')         # Working directory 'tmp_festat'
os.makedirs(TMPOUT, mode=0o755, exist_ok=True)
os.chdir(TMPOUT)
ens_mem=range(1,10)                                    # Ensemble member (ens1,ens2.....,ens9)
filename = "ICMSHHARM+0006"                            # 6 hour forecast FA file
fnumber=1

while dtg <= dtgend:
#
YY = str(dtg.year).ljust(4, '0')
MM = str(dtg.month).zfill(2)
DD = str(dtg.day).zfill(2)
HH = str(dtg.hour).zfill(2)
#
for mm in ens_mem:
mem='mbr00'.ljust(6,str(mm))
target = os.path.join(HM_DATA, YY, MM, DD, HH, mem, filename)
#print(target)
#
filecond =  {fnumber <= 9: filename[:-1]+str(fnumber),
10  <=  fnumber <= 99: filename[:-2]+str(fnumber),
100  <= fnumber <= 999: filename[:-3]+str(fnumber)}
filelink = filecond.get(True,None)
if os.path.isfile(str(filelink)):
os.remove(str(filelink))
os.symlink(str(target),str(filelink))
print(str(filelink),str(target))
fnumber += 1
dtg += cycl

print(TMPOUT)
quit()
'''

Okay, here is my Python script, crafted to optimize functionality while taking into account all minor suggestions and comments by @roelstappers
python festat_S1.py
import os
from datetime import datetime, timedelta

#---------INPUT STAFF-----------
EXP    = "SURF_CARRA2_CY46"                            # Change the experiment name here
dtg    = datetime.strptime('2022011500', '%Y%m%d%H')   # Change Start date
dtgend = datetime.strptime('2022021218', '%Y%m%d%H')   # Change End date
#--------------------------------
#
cycl =  timedelta(hours=6)                             # Assimilation cycle at 00 06 12 and 18 UTC
SCRATCH = os.environ['SCRATCH']
HM_DATA = os.path.join(SCRATCH,'hm_home',EXP,'archive')
HM_DATA = os.path.join(SCRATCH,'hm_home',EXP,'archive')
TMPOUT  = os.path.join(SCRATCH,'tmp_festat11')         # Working directory 'tmp_festat'
os.makedirs(TMPOUT, mode=0o755, exist_ok=True)
os.chdir(TMPOUT)
ens_mem=range(1,10)                                    # Ensemble member (ens1,ens2.....,ens9)
filename = "ICMSHHARM+0006"                            # 6 hour forecast FA file
fnumber=1
#
while dtg <= dtgend:
    #
    YY = str(dtg.year).ljust(4, '0')
    MM = str(dtg.month).zfill(2)
    DD = str(dtg.day).zfill(2)
    HH = str(dtg.hour).zfill(2)
    #
    for mm in ens_mem:
        mem='mbr00'.ljust(6,str(mm))
        target = os.path.join(HM_DATA, YY, MM, DD, HH, mem, filename)
        #print(target)
        #
        filecond =  {fnumber <= 9: filename[:-1]+str(fnumber),
            10  <=  fnumber <= 99: filename[:-2]+str(fnumber),
           100  <= fnumber <= 999: filename[:-3]+str(fnumber)}
        filelink = filecond.get(True,None)
        if os.path.isfile(str(filelink)):
              os.remove(str(filelink))
        os.symlink(str(target),str(filelink))
        print(str(filelink),str(target))
        fnumber += 1
    dtg += cycl
#
print(TMPOUT)
quit()


Update Readme.md

This is spam, I will close it

Hello @UlisesGascon

This is spam, I will close it

I have been reading your comments in many other spam pr's and you are handling so calmly.
GREAT Sir


Upload Zip Error

Hello,
I'm trying to deploy my application but I'm having this error.
An error occurred (InvalidRequest) when calling the CreateMultipartUpload operation: The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256.

This is for eu-central-1, which supports lambda.

Haven't seen that one before! Thanks for reporting.

@Miserlou I'm didn't try yet on other regions, but this can be related https://github.com/boto/boto3/issues/181.
Commenting out the Callback on upload works though.
s3.meta.client.upload_file(
    source_path, bucket_name, dest_path,
    # Callback=progress.update
)

The exception block doesn't seem to work as well.

Seems this is fix in django-zappa, tried the master branch and there's no more error.


route helper method with prefix

Laravel Version: 5.4.25
PHP Version:7.1
Database Driver & Version:MYSQL 5.6

Description:
$url = route('routeName', $params);

this function can be used to get the url of route
problem is what if i wanna get a route name under a group prefix?
for example :
Route::group(['namespace' => 'Admin', 'prefix' => 'admin'], function () {
    Route::get('/', 'HomeController@index')->middleware("admin");
    //Route::get('/home', 'HomeController@index');
    Route::get('login', 'Auth\LoginController@showLoginForm');
    Route::post('login', 'Auth\LoginController@login');

how can I  get url of login? and how  can i get url of /?
Steps To Reproduce:

I don't know If I got you right, but you can name the login route, and call it using the route helper function.
Route::get('login', 'Auth\LoginController@showLoginForm')->name('login');

And then
$url = route('login');

so what if i use group route with prefix？
发自我的 iPhone

在 2017年6月8日，21:20，Ahmad Aljazzar<EMAIL_ADDRESS>写道：
I don't know If I got you right, but you can name the login route, and call it using the route helper function.
Route::get('login', 'Auth\LoginController@showLoginForm')->name('login');
And then
$url = route('login');
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Prefix doesn't matter on the group. You can name a group and if I am correct it'll prefix your routes with that name.
Route::group(['name' => 'api'], function() {
  Route::get('/', 'MyController@method')->name('home');
});

Would be accessible via route('api.home');

Thanks @ahmadaljazzar and @joshmanders, hope this is sorted out now

@joshforbes
it still not working in 5.4.25
Route::group(['name' => 'admin', 'prefix' => 'admin'], function () {
    Route::get('/', 'HomeController@index')->middleware("admin")->name('home');
    Route::post('calculate',  'HomeController@calculate')->name('calculate');     //计算器api

    //Route::get('/home', 'HomeController@index');
    Route::get('login', 'Admin\Auth\LoginController@showLoginForm')->name('login');
    Route::post('login', 'Auth\LoginController@login')->name('login');
});

it  generates the route name without admin. prefix

obviously, it make no sense

@joshmanders, @shyandsy, in Laravel 5.4 instead of name for a Group, we shall use as property. Then named routes will be prefixed:
Route::group([
  'as' => 'api.' // Notice trailing dot, it's on purpose.

], function() {
  Route::get('/', 'MyController@method')->name('home');
});

Child route now shall be accessible via route('api.home') helper.
Route names are also visible in php artisan route:list after clearing its cache (via php artisan route:clear).


Updated Chinese translation of agreement modal and status bar settings.

Thank you & sorry for the delay merging! Appreciate the translations. Will include in next update.


fix: special characters getting encoded when saving

Codecov Report

Merging #3 (d1f6878) into main (7ed1b6f) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main        #3   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files            4         4
  Lines           59        59
  Branches         7         7
=========================================
  Hits            59        59

Impacted Files
Coverage Δ

src/components/Field/Field.tsx
100.00% <100.00%> (ø)

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 7ed1b6f...d1f6878. Read the comment docs.


on-register-change block should request streaming from client

VM needs to set
rw internal streaming_samples: u8 # @ streaming_samples
on client service to an appropriate value in order to get updates for the on-register-change block

Once you register the REPORT_UPDATE, the bus will refresh the register for you

Done and tested: https://github.com/microsoft/jacdac-ts/pull/234


Support for JSONB where clauses in PostgreSQL

Is there any opportunity to find out if JSONB field contains one value or array of values using Cycle ORM ?
Example for Eloquent ORM:
$users = DB::table('users')                 ->whereJsonContains('options->languages', 'en')                 ->get();
$users = DB::table('users')                 ->whereJsonContains('options->languages', ['en', 'de'])                 ->get();
(https://laravel.com/docs/8.x/queries#json-where-clauses)

Need some help or a bit of time to implement it.

Yes, that would be great...

Yes, that would be great...

Have you tried new Expression or Fragment syntax? It now supports optional parameters that make SQL composing for some dialects easier.

Have you tried new Expression or Fragment syntax? It now supports optional parameters that make SQL composing for some dialects easier.

Not yet, I've only been playing with this orm for the first few days. I will look in the near future when I will do some aggregations for jsonb columns en postgres... Thanx.

Not yet, I've only been playing with this orm for the first few days. I will look in the near future when I will do some aggregations for jsonb columns en postgres... Thanx.

Have you tried new Expression or Fragment syntax? It now supports optional parameters that make SQL composing for some dialects easier.

@wolfy-j maybe you could help me build query with  "WHERE json_column_name ? 'some string'"?
I tried to use expression, but with no success (
->where(new Expression("json_column_name ? 'some_value'"))
or
->where('json_column_name', '?', 'some_value')

get me
SQLSTATE[42601]: Syntax error: 7 ERROR:  syntax error at or near "$1"
LINE 3: WHERE "output_urls" $1 '"some_value"'

When i switched driver to sqlite to take a look on the result sql in this case, i got expected error
SQLSTATE[HY000]: General error: 1 near "?": syntax error

When driver set to sqlite ? sign doesn't replace with $1.
But with postgres driver the result sql query contains $1.
Escaping ? with one or few \  doesn't halps: result sql query contains \$1 in this case.
Any ideas?
? sign is very helpful to work with json array of strings...

Can you give us the full example and query you are trying to build?

So I assume this issue is not an issue anymore?

I well check how the question mark doubling works with ORM  query builder.

@wolfy-j
I checked escaping with doubling it - it work great with ORM too.
My example is
$this->dbal->database('default')
            ->table('table')
            ->select('name')
            ->where(new Fragment(sprintf("field_name ?? '%s'", $textToFind)))
            ->fetchAll();

Thanks for your work.


[Bug] Worker does not retry if connection fails and kills the whole process

What are you really trying to do?
Trying to set up Temporal in our application.
Describe the bug
When there's a problem when connecting to Temporal service, the WorkerService goes down without retrying.
Also, since .NET 6 where background service behavior was changed (see here), it takes down the whole app with it. This is unacceptable for us as we need it to run as part the app next to other background services.
Attaching an example of erroneous output. Even though I have permission problem in this case, the whole app goes down. It could be any connection-related problem because of the way how exceptions are handled from the bridge client.

Minimal Reproduction
Basically any sample app works when the connection is wrong. Tested it with .NET 8.
Environment/Versions
Irrelevant.
Additional context
Not yet.

We intentionally fail if the worker cannot start. We do retry if there is a connectivity issue during operation. But users have requested that if the worker cannot start it should fail.


Fix target frameworks for MemberNotNullAttribute and MemberNotNullWhenAttribute

The current version doesn't include MemberNotNullAttribute and MemberNotNullWhenAttribute for .NET Standard 2.1 or .NET Core 3.1 projects, but if you try to use them from such projects, you get compiler error CS0122: inaccessible due to its protection level.
According to the documentation, these attributes weren't added (or more accurately, made public) until .NET 5:

https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.codeanalysis.membernotnullattribute?view=net-8.0#applies-to
https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.codeanalysis.membernotnullwhenattribute?view=net-8.0#applies-to

This pull request moves these two files to the Net50 folder and fixes their #if directives.

Thanks a lot! Nice catch

I'm going to release it as part of a new version on thursday


Compiling with hmatrix (>= 0.17) to fix #7

Thanks @guaraqe for quick reply and testing.
Having a second look at Data/NetCDF/HMatrix.hs, it seems to me that the only reason we need Element and Container Vector classes is to be able to apply cmap to Numeric.LinearAlgebra.Vector and Numeric.LinearAlgebra.Matrix. I found a way around using Numeric.LinearAlgebra.Devel.mapVectorWithIndex. Once the mapping is enabled, we can convert CFloat/CDouble to Float/Double right away. This is not smart, but works...

The previous patch did not fix travis and tests under test/. This version, however, fails in test/test-hmatrix.hs. The reason is hmatrix does not support to flatten a CDouble matrix -- CDouble is not in Element class. Now I totally agree with  @guaraqe there is not much we can do but to request hmatrix to support CFloat/CDouble, to drop support for hmatrix, or to rewrite hmatrix interface. Maybe this pull-request is not worth merging.

Is the problem only in the tests module? If the problem is only CDoubleI can take a look tomorrow.

No. Any toForeignPtr action to HMatrix invokes hmatrix-<IP_ADDRESS>/src/Internal/flatten which requires Element class. I am now wondering if HMatrix support be dropped as one can always use hmatrix-repa and Repa support seems sufficient.

I think it's going to be impossible to support hmatrix properly without changes to hmatrix itself.  I think it might be better just to remove support for it from hnetcdf for now.

I'm going to close this since I've removed hmatrix support for the moment.  The solution with hmatrix-repa sounds like a good one.


added parallel I/O bench-marking program that mimics NOAA UFS data writing from the FV3

Fixes #1771
Fixes #1770
Part of #1543
Part of #1710
This PR adds a benchmark/test program tst_gfs_data_1.c in the nc_perf directory. The test builds a file just like one output by NOAAs GFS code. It then writes some data to the file, just as NOAA does.
This is similar to the test recently merged to netcdf-fortran (https://github.com/Unidata/netcdf-fortran/pull/265). However, the C test does timing of various choices (for example, compression level and use of shuffle).
See the netcdf-fortran issue for detailed description of the file contents.
The intent is to have a test that uses netCDF just like the NOAA FV3 code, but also allows us to time various choices to see what performs best.
The extra test is only build when --enable-benchmarks is used, for parallel I/O builds.

I have just found an issue with this test, I'm going to take down this PR and keep working on it...

For future reference, you can always mark a PR as a draft and continue pushing/force pushing to the branch to update the PR.


Allow filtering projects of a given forge

Hey @lbarcziova
I just wanted to point out that the changes in packit_dashboard/api/routes.py are unnecessary. We were using flask to make the actual API queries and then send them over to the frontend when

API requests were failing and we thought it required caching.
we needed a temporary way to fix CORS issues till we added the appropriate headers everywhere in Packit Service.

Since those have been fixed, this is no longer required or used.

Your code here is directly calling packit service API, not dashboardurl/api/projectswhatever

I haven't tested it myself, but looks good to me.

Thanks. I just changed the warning since I realised while testing that it doesn't make sense to output Forge field should not be empty when e.g.only forge and repo name are filled.

Is this available on stg already?

@TomasTomecek yes: https://dashboard.stg.packit.dev/projects/github.com

Sadly, we have the wrong icon for gitlab.com:
https://dashboard.stg.packit.dev/projects/gitlab.com

@lachmanfrantisek  Yeah, I noticed, will fix it soon; also looking into the stage icon ;)

We don't differentiate the icons for forges and use everywhere the github one currently, https://dashboard.packit.dev/projects/gitlab.com/lachmanfrantisek, https://dashboard.packit.dev/projects/gitlab.com/packit-service/hello-world, so it should be then changed there as well.


You cannot print vertically and horizontally in the same file.

Attach (recommended) or Link to PDF file here:
Configuration:
Web browser and its version: chrome
Operating system and its version: ;win10
PDF.js version: 2.1.266
Is a browser extension:no
Steps to reproduce the problem:
You cannot print vertically and horizontally in the same file.
What is the expected behavior? (add screenshot)
横向 纵向 .pdf
What went wrong? (add screenshot)
Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension):

Duplicate of #9297.


Need to change the meaning

https://github.com/Deenipedia/dhikr/blob/dd08674f8c570cb1553124e4afb37f5b2c71a43c/data.json#L276
It is supposed to mean something around - "The one who occupies wide space"

https://www.hadithbd.com/99namesofallah/detail/?nid=46
Check this link


No longer working on Chrome 50

New tab page is no longer being replaced on Chrome Version 50.0.2661.102 m on Windows 8.1.

Chrome now loading new tab page from chrome-search://local-ntp/local-ntp.html and not from a web address.

This is very likely a Chrome bug that can not be controlled by this extension. Usually it's caused by intermittent connection to google when opening the new tab page. If you see "NTP Request Interceptor" in the network tab of "inspect elements" when you refresh the new tab page, then it's a bug.
https://code.google.com/p/chromium/codesearch#chromium/src/chrome/browser/ui/search/new_tab_page_interceptor_service.cc&sq=package:chromium&type=cs&l=81

Ok, It has started working again.  Weird that I could get to google just fine when it wasn't working, but it kept loading the local NTP.


Requesting SEC7134 documentation

Hello,
This document has really helped me multiple times. I now currently am debugging an issue, which says
SEC7134 Resource "https://..../" not allowed to load.
This happens on a window.open() call, but the URL otherwise opens when pasted directly on the address bar of Edge browser.
Please guide me to the correct documentation for the issue.
Thanks and Regards,
Unni Sankarankutty

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

ID: 80e413c6-445b-30c6-b2f8-7959c9c4a759
Version Independent ID: 57c3967d-f4b1-7ede-11fc-56772cf616ae
Content: DevTools - Console error and status codes - Microsoft Edge Development
Content Source: microsoft-edge/devtools-guide/console/error-and-status-codes.md
Product: microsoft-edge
GitHub Login: @MSEdgeTeam
Microsoft Alias: msedgedevrel

I also encountered this SEC7134 error message and it prevented window.location.href = url operation. This does not happen if we remove the Content-Security-Policy -header from the document headers.

SEC7134: Edge blocked the document from setting window.location.href due to the page's Content-Security-Policy having sandbox directive without allow-top-documentation in the value. This CSP violation is not reported to CSP's report-uri like other violations.
The behavior appears to have changed on 2019-09-25 with Microsoft's security updates.

Hi @unnisankarankutty, @tronza, and @okko! Thank you for using Microsoft Edge and for sending us your feedback. As we announced our shift in the underlying web platform of Microsoft Edge to Chromium, the legacy Microsoft Edge, built on the EdgeHTML platform, is no longer receiving updates. We strongly recommend installing the new Microsoft Edge which is now available on Windows 10, 8.1, 8, 7, and macOS!
You can use the new Security tool in the new Chromium-based DevTools to further diagnose security issues. Definitely send us feedback using the feedback icon in the new Microsoft Edge DevTools:

Please include your email address and someone from the DevTools team will get back to you!


Rebuild Home Page Cards

Comment if you are interested in working on this issue!

Requirements
Requirements are open for discussion.
References

Hii @yosevu
Assign it to me, I'll work on this.

Hey can you assign me this issue?

Hello @shivam1317, assigned to you. This issue is a subcomponent of #386, so we won't be able to integrate it until that is done. You may go ahead rebuild it, however, and import it into App.tsx for now and we will move it later. Does that make sense?
As as side note, I may add Storybook, so components like this can be built independently in a separate environment in situations like this.


Release dotnet-sdk-extensions-testing 1.0.16-alpha NuGet package

What NuGet package do you want to release?
dotnet-sdk-extensions-testing
What is the new version for the NuGet package?
1.0.16-alpha
Auto-generate release notes?
Yes
Custom release notes?
No response

/retry-nuget-release

/retry-nuget-release

/retry-nuget-release

/retry-nuget-release

/retry-nuget-release

/retry-nuget-release

/retry-nuget-release

/retry-nuget-release


Add tests for ExportFullViewingKeyRequest

We shouldn't support this in the extension at all, the viewing key should never leave the extension.

I think we originally implemented this assuming the view service would call the custody service for it. But in the end, you can't initialize the view service without a fvk, so it can just be passed in in the beginning. Will open a PR to remove.

Yeah, the bigger risk IMO is that if we add it, we might later expose it. I think until we have a reason to feel otherwise, we should really strongly avoid creating any workflows that rely on users managing viewing keys, and should treat them as tantamount to seed phrases. We want to make it difficult for third parties to build tools that demand viewing keys (= irrevocable access forever) and steer them to using selective disclosure (chains of TransactionPerspectives)


transparent window has black background

let win = new BrowserWindow({
  frame: false,
  transparent: true
})
win.show()

yields

(weird note: this preview appears white background, but clicking on it should show black background)

oh... interesting - it appears white because it's actually transparent? If you change the background color of the github page, the background of the window changes. This suggests the transparent is working, but for some reason it's got black underneath it

yes if your html have some background color, it will show it. If the background of the html is transparent, it will indeed show a black background for some reason.

the html background thing is slightly strange - even if you set your html to be 100px x 100px (with a bigger window), the html background will apply to the whole window


Add value level lists

If the kind for each Cons'd is Type, can we have a matching data declaration?
I should be able to do:
foo :: Int :> String :> Boolean :> Nil'
foo = 5 :> "baz" :> true :> Nil'

We can create purescript-heterogeneous instances for this data type to allow for generic mapping and folding.
One argument against adding this though is that this sort of exists already by way of Tuple:
import Data.Tuple.Nested ((/\), type (/\))

foo :: Int /\ String /\ Boolean /\ Unit
foo = 5 /\ "baz" /\ true /\ unit

Assuming it'd work like:
data Nil' = Nil'

data Cons' :: forall a b. a -> b -> Type
data Cons' m n = Cons'

infixr 1 type Cons' as :>

foo :: Int :> String :> Boolean :> Nil'
foo = 5 :> "baz" :> true :> Nil'

would Nil' be still have to be present to construct the list? It'll feel redundant given Tuple otherwise.

I was thinking more along the lines of:
data Cons' a b = Cons' a b
data Nil' = Nil'

So mapping, folding etc still makes sense.
Then again, this is just be nested Tuple with a Nil terminator. So perhaps it's redundant. Closing this for now until I have something more concrete.


ERROR:  The documentation [1] recommends API version 2018-02-14 but the API returns 'The api-version '2018-02-14' is invalid.'

🛑 IMPORTANT: You can get your feedback addressed faster if you use the comment section for the article in which you encountered a problem (if available).
Link to article:
https://docs.microsoft.com/en-us/rest/api/keyvault/vaults/list
Problem:
What's wrong with the article?
The customer was using the following link to create the "List operation gets information about the vaults associated with the subscription".
https://docs.microsoft.com/en-us/rest/api/keyvault/vaults/list

Vaults - List
Service:
Key Vault
API Version:
2018-02-14
The List operation gets information about the vaults associated with the subscription.
https://docs.microsoft.com/en-us/rest/api/keyvault/vaults/list

GET https://management.azure.com/subscriptions/{subscriptionId}/resources?$filter=resourceType eq 'Microsoft.KeyVault/vaults'&api-version=2018-02-14

He replaced subscription value and ran the following rest api
GET https://management.azure.com/subscriptions/{65a04671-4180-4c63-b369-b436bf19bafe}/resources?$filter=resourceType eq 'Microsoft.KeyVault/vaults'&api-version=2018-02-14

ERROR:  The documentation [1] recommends API version 2018-02-14 but the API returns 'The api-version '2018-02-14' is invalid.'

The customer said that the error then gave some newer valid version of the api.  He changed the command to use the newer version of the api and it worked successfully.

ACTION PLAN
----------------

The customer would like me to file a doc bug.
RELATED ISSUES
Documented REST API versions don't match REST API versions the service reports as available #1205
Open
amclin opened this issue on Feb 25, 2019
https://github.com/MicrosoftDocs/feedback/issues/1205
Make API documentation more version aware #226
https://github.com/MicrosoftDocs/feedback/issues/226

Please try the following:
https://docs.microsoft.com/en-us/rest/api/keyvault/vaults/

This issue appears to have been fixed.
a.)  I looked at https://docs.microsoft.com/en-us/rest/api/keyvault/vaults/get and https://docs.microsoft.com/en-us/rest/api/keyvault/vaults/list .   The page and the command reflect the current api-version=2019-09-01

#please-close


[BUG]

How to use regex parsing?
The regex is works in regexmatch function, but it's not working in regex parsing, Idk how to use output box..
regex: anyexample
output: 1
results: [1, 1, 1, 1, ...]

You have to write [0] in the output field, which means print the group at index 0 (a.k.a. the full match). There are guides about this on the internet.


Expose lock::BiLock API

Currently this is crate-private API but it would be useful to have for implementing something like split() on UdpSocket. See e.g. https://github.com/rustasync/runtime/issues/45

i'm not sure how stable that API surface is yet-- IIRC there were some open questions around refactoring it (such as https://github.com/rust-lang-nursery/futures-rs/pull/606 by @Diggsey). I don't personally have any open concerns, though, and obviously as part of futures-util there's more churn allowable than in the lower-level crates, so i'd be happy to accept a PR making it public unless there're other objections.

Ok, thanks! Waiting a day or two in case there are any objections and then I'll send a PR :)

Any progress on this? It feels like a good synchronization primitive, I seem to have a use-case for it :) Too bad someone made it private, it used to be public...


Create async backend for playwright

Hi, I'm using dataframe_image for a project. It was working fine, but since the last week it stopped working with the default backend (I'm pretty sure that is due to an update of Chromium, because the same version of our project was working fine with an older version of Chromium, but it stops working after the update).
To fix that, we have been testing the playwright backend, but since we use async functions, the playwright backend does not work as it is. Playwright has an async API which is required for executing it in async code.
I'm not sure if having other class for async backends would be useful to other users of dataframe_image or if it's possible to just have a parameter in the Playwright backend to allow the execution of dataframe_image (and playwright) in async functions. But since I've written the code to allow this, I want to share it with you.
This would be the code for the base class:
class AsyncBrowserConverter(ABC):
    MAX_IMAGE_SIZE = 65535

    def __init__(
        self,
        center_df: bool = True,
        max_rows: int | None = None,
        max_cols: int | None = None,
        chrome_path: str | None = None,
        fontsize: int = 18,
        encode_base64: bool = True,
        limit_crop: bool = True,
        device_scale_factor: int = 1,
        use_mathjax: bool = False,
    ):
        """
        Initialize the Html2ImageConverter class.

        Args:
            center_df (bool): Whether to center the dataframe. Default is True.
            max_rows (int): Maximum number of rows. Default is None.
            max_cols (int): Maximum number of columns. Default is None.
            chrome_path (str): Path to the Chrome executable. Default is None.
            fontsize (int): Font size. Default is 18.
            encode_base64 (bool): Whether to encode the image in base64.Default is True.
            limit_crop (bool): Whether to limit the crop. Default is True.
            device_scale_factor (int): Device scale factor. Default is 1.
            use_mathjax (bool): Whether to use MathJax for rendering. Default is False.
        """
        self.center_df = center_df
        self.max_rows = max_rows
        self.max_cols = max_cols
        self.chrome_path = chrome_path
        self.fontsize = fontsize
        self.encode_base64 = encode_base64
        self.limit_crop = limit_crop
        self.device_scale_factor = device_scale_factor
        self.use_mathjax = use_mathjax

    def get_css(self) -> str:
        """
        Get the CSS for the HTML.

        Returns:
            str: The CSS string.
        """
        from importlib.resources import files
        import dataframe_image.converter.browser.static as browser_static

        with open(files(browser_static).joinpath("style.css"), "r") as f:
            css = "<style>" + f.read() + "</style>"
        justify = "center" if self.center_df else "left"
        css = css.format(fontsize=self.fontsize, justify=justify)
        if self.use_mathjax:
            script = """<script>
            MathJax = {
            tex: {
                inlineMath: [['$', '$'], ['\\(', '\\)']]
            },
            svg: {
                fontCache: 'global'
            }
            };
            </script>
            <script type="text/javascript" id="MathJax-script" async
<EMAIL_ADDRESS>            </script>
            <script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
            <script id="MathJax-script" async<EMAIL_ADDRESS>            css += script
        return css

    def should_enlarge(self, img: Image, ss_width: int, ss_height: int) -> tuple:
        """
        Check if the image should be enlarged.

        Args:
            img (Image): The image to check.
            ss_width (int): The screenshot width.
            ss_height (int): The screenshot height.

        Returns:
            tuple: A tuple containing a boolean indicating whether to enlarge the image,
            and the new width and height.
        """
        enlarge = False
        im_ndarray = np.array(img)
        img2d = im_ndarray.mean(axis=2) == 255

        all_white_vert = img2d.all(axis=0)
        # must be all white for 30 pixels in a row to trigger stop
        if all_white_vert[-30:].sum() != 30:
            ss_width = int(ss_width * 1.5)
            enlarge = True

        all_white_horiz = img2d.all(axis=1)
        if all_white_horiz[-30:].sum() != 30:
            ss_height = int(ss_height * 1.5)
            enlarge = True

        return enlarge, ss_width, ss_height

    @abstractmethod
    async def screenshot(
        self, html: str, ss_width: int = 1920, ss_height: int = 1080
    ) -> Image:
        """
        Take a screenshot of the HTML.

        Args:
            html (str): The HTML to screenshot.
            ss_width (int): The screenshot width. Default is 1920.
            ss_height (int): The screenshot height. Default is 1080.

        Returns:
            Image: The screenshot image.
        """
        raise NotImplementedError

    def crop(self, im: Image) -> Image:
        """
        Crop the image.

        Args:
            im (Image): The image to crop.

        Returns:
            Image: The cropped image.
        """
        # remove black
        imrgb = im.convert("RGB")
        imageBox = imrgb.getbbox()
        im = im.crop(imageBox)

        # remove alpha channel
        imrgb = im.convert("RGB")
        # invert image (so that white is 0)
        invert_im = ImageOps.invert(imrgb)
        imageBox = invert_im.getbbox()
        cropped = im.crop(imageBox)
        return cropped

    async def run(self, html: str) -> bytes:
        """
        Run the converter on the HTML.

        Args:
            html (str): The HTML to convert.

        Returns:
            bytes: The converted image bytes.
        """
        im = await self.screenshot(html)
        temp_img = self.crop(im)
        image_bytes = self.finalize_image(temp_img)
        return image_bytes

    def finalize_image(self, img: Image) -> bytes:
        """
        Finalize the image.

        Args:
            img (Image): The image to finalize.

        Returns:
            bytes: The finalized image bytes.
        """
        buffer = io.BytesIO()
        img.save(buffer, format="png")
        img_str = buffer.getvalue()
        if self.encode_base64:
            img_str = base64.b64encode(img_str).decode()
        return img_str

    def repr_png_wrapper(self):
        from pandas.io.formats.style import Styler

        ss = self

        def _repr_png_(self):
            if isinstance(self, Styler):
                html = styler2html(self)
            else:
                html = self.to_html(
                    max_rows=ss.max_rows, max_cols=ss.max_cols, notebook=True
                )
            return ss.run(html)

        return _repr_png_

This is the code for the Playwright async backend:
class AsyncPlayWrightConverter(AsyncBrowserConverter):
    async def screenshot(self, html):
        try:
            from playwright.async_api import Error, async_playwright
        except ImportError as ex:
            raise ImportError(
                "Playwright is not installed. Install it with 'pip install playwright' "
                "and make sure you have a chromium browser installed."
            ) from ex
        async with async_playwright() as p:
            channels = ["chromium", "chrome", "msedge", None]
            for c in channels:
                try:
                    browser = await p.chromium.launch(
                        channel=c, args=["--disable-web-security"]
                    )
                    break
                except Error:
                    pass
            else:
                raise Error(
                    "Could not find any chromium based browser. Make sure you have a "
                    "chromium browser installed. Or install it by "
                    "`playwright install chromium`."
                )

            context = await browser.new_context(
                device_scale_factor=self.device_scale_factor, bypass_csp=True
            )
            page = await context.new_page()
            await page.set_content(self.get_css() + html)
            if self.use_mathjax:
                mj = page.locator("mjx-container math")
                try:
                    mj.wait_for(timeout=10000)
                except Error:
                    logger.warning(
                        "MathJax did not render in time. Formula in dataframe may not "
                        "be rendered correctly."
                    )
                    pass
                page.wait_for_timeout(200)
            screenshot_bytes = await page.screenshot(full_page=True)
        im = Image.open(io.BytesIO(screenshot_bytes))
        return im

There are some minor changes (format and other things) to make it work in our project, but it could be used as a reference to implement this. Right now I cannot implement this and create a PR due to lack of time, but maybe in a few weeks I can do it if you think it's interesting to have it.

Thanks for sharing your idea. Can you provide a small example of using dataframe_image with AsyncPlayWrightConverter?
And the use case of why use async interface, maybe use it in a async web server or it can significantly increase the performance?

To use it I have created a function (its basically a copy of the dfi.export function):
async def dfi_export_async_playright(
    obj: pd.DataFrame,
    filename,
    fontsize=14,
    max_rows=None,
    max_cols=None,
    chrome_path=None,
    dpi=None,
    use_mathjax=False,
):
    is_styler = isinstance(obj, Styler)
    df = obj.data if is_styler else obj
    converter = AsyncPlayWrightConverter(
        max_rows=max_rows,
        max_cols=max_cols,
        chrome_path=chrome_path,
        fontsize=fontsize,
        encode_base64=False,
        limit_crop=False,
        device_scale_factor=(1 if dpi is None else dpi / 100.0),
        use_mathjax=use_mathjax,
    ).run

    if df.shape[0] > MAX_ROWS and max_rows is None:
        error_msg = (
            f"Your DataFrame has more than {MAX_ROWS} rows and will produce a huge "
            "image file, possibly causing your computer to crash. Override this error "
            "by explicitly setting `max_rows`. Use -1 for all rows."
        )
        if is_styler:
            error_msg = (
                f"Your Styled DataFrame has more than {MAX_ROWS} rows and will produce "
                "a huge image file, possibly causing your computer to crash. Override "
                "this error by explicitly setting `max_rows` to -1 for all columns. "
                "Styled DataFrames are unable to select a subset of rows or columns "
                "and therefore do not work with the `max_rows` and `max_cols` params"
            )
        raise ValueError(error_msg)

    if df.shape[1] > MAX_COLS and max_cols is None:
        error_msg = (
            f"Your DataFrame has more than {MAX_COLS} columns and will produce a huge "
            "image file, possibly causing your computer to crash. Override this error "
            "by explicitly setting `max_cols`. Use -1 for all columns."
        )
        if is_styler:
            error_msg = (
                f"Your Styled DataFrame has more than {MAX_COLS} columns and will "
                "produce a huge image file, possibly causing your computer to crash. "
                "Override this error by explicitly setting `max_cols` to -1 for "
                "all columns. Styled DataFrames are unable to select a subset of "
                "rows or columns and therefore do not work with the `max_rows` "
                "and `max_cols` parameters"
            )
        raise ValueError(error_msg)

    if max_rows == -1:
        max_rows = None

    if max_cols == -1:
        max_cols = None

    if is_styler:
        html = styler2html(obj)
    else:
        html = obj.to_html(max_rows=max_rows, max_cols=max_cols, notebook=True)

    pre_limit = Image.MAX_IMAGE_PIXELS
    Image.MAX_IMAGE_PIXELS = None
    img_str = await converter(html)
    # swap back to original value
    Image.MAX_IMAGE_PIXELS = pre_limit

    try:
        with open(filename, "wb") as f:
            f.write(img_str)
    except TypeError as ex:
        if hasattr(filename, "write"):
            filename.write(img_str)
        else:
            raise ex

Then you could do something like this to run the tasks in parallel:
tasks = [dfi_export_async_playright(styled_df, filename) for styled_df, filename in my_config]
await asyncio.gather(*tasks)

In my case I didn't really need parallelism in the generation of images (it's already fast enough), but we had other processes (database queries, LLM calls, etc...) that we were executing in async functions, and playwright raised an error because you cannot call the playwright sync api from async functions (for other backends it worked well without having to do these things).

playwright raised an error because you cannot call the playwright sync api from async functions

I forget that limitation. I'll implement this asap.

Released in https://github.com/dexplo/dataframe_image/releases/tag/v0.2.5