Unlink default arguments from keyword arguments?

I would like to discuss the relative merits of having default arguments and keyword arguments joined together in the current (0.7.4) syntax.  By "joined together" I mean:

You cannot have a keyword argument without it being a positional   argument having a default.

You cannot have a positional argument with a default without it also being a keyword argument.

I think that the joining of default arguments with keyword arguments could be a source of
headaches for API maintainers.  I will try to show that the API maintainer will benefit from having default arguments not create keyword arguments, and having keyword arguments not create positional arguments.
Adding a default to a positional argument creates a keyword argument
I'll put the biggest headache first.  Let's say my library exposes this method:
def foo(a)

In a later version of the library, I add an optional argument to foo:
def foo(a, b = 0)

I am expecting that existing calls to foo will still work without change:
foo(123)

and that programmers wishing to take advantage of the new second argument will pass it in:
foo(123, 4)

However, since adding a default implicitly enables a keyword argument, the user of my library has the choice of calling foo like this:
foo(123, b: 4)

During a later refactoring, I come up with a better name for the
second argument:
def foo(a, better_name_for_b = 0)

But I cannot do this refactoring without it being a breaking API change.  That's because the name of every argument that has a default is part of the API's signature.  A user of my library may have used
the second argument as a keyword argument; renaming that argument will break their code.
The workaround is to use method overloading:
def foo(a, better_name_for_b = 0)

def foo(a, b = 0)
  foo(a, better_name_for_b)
end

I had to supply the same default argument to both method signatures, which doesn't seem ideal, but I guess that's what constants are for.
Adding a keyword argument creates a positional argument
Since positional arguments are linked to keyword arguments, I can't force the user to call the method using only keyword arguments.  That means that the order of keyword arguments cannot be changed without it being a breaking API change.  In Ruby, the API maintainer can freely reorder keyword arguments without it being a breaking API change (or any API change at all).  Is it feasible to give the Crystal programmer the same freedom?
See also: https://github.com/manastech/crystal/issues/560
Version discussed here: Crystal 0.7.4 [42efdbf] (Wed Jun 24 01:08:36 UTC 2015)

These are very good arguments. So you are suggesting we separate notations for default arguments and keyword arguments, and to always require keywords in calls when you want to refer to keyword arguments?
There would still be the problem of breaking code if you decide to change a keyword name, right?
My personal opinion is that since Crystal is a compiled language, if you update a library and they changed the API, your code stops compiling. And these fixes should be trivial: change a name, reorder parameters. In Ruby it's harder because unless you have 100% test coverage the issue might happen at runtime.
But I'd like to know your pull proposal. Note that : is already used for type restrictions, so we'll have three symbols for method arguments (default: =, type restriction: :, keword: ?)

Note that the syntax to call keyword arguments is foo(123, b: 4)/foo(1, better_name_for_b: 4, foo(123, b = 4) just creates a local variable and passes the result of that expression as a positional argument. Perhaps we should disallow assignments inside calls, this seems to be a common gotcha.
I can see the argument about changing names changing the API, but you can also flip that argument and say it forces the maintainer to think of a good name for all their arguments, which gives better generated documentation for free as well as increasing the readability of the library itself.

Thanks for considering what I wrote, and pointing out its flaws.
@asterite You're right, I hadn't considered that the type checking would come to the rescue in the case of renamed keyword arguments.  It won't help for reordered keyword arguments that are being called positionally... well, it will sometimes help, when the types don't match up correctly, and sometimes not help when the reordered arguments happen to be the same type.
As to a pull proposal... You mean I don't ask for a feature and it magically springs into existence? ;)  Well, I might as well crack open the code and see what I can see.
@jhass I'm bouncing back and forth between Python and Ruby, so it was almost inevitable that I'd get the syntax wrong.  Thanks for pointing that out.  I'll edit the post.
My main reason for renaming keyword arguments is that an argument that was once fine is no longer fine: Perhaps it is called cache, but there are now two different kinds of cache that the library deals with.  That said, I agree that the best name I can think of should be used from the start.

@wconrad Oh, by "proposal" I don't mean "pull proposal", that would be overkill. I think I was asking for the character to use for keyword arguments (on the declaration side), because I'm always hesitant to add new syntax.
@jhass Yes, maybe assignment inside a call should be disallowed, so we get less cryptic code and we can also suggest "use arg: ... for keyword arguments)

@asterite What I'd really like is to get explicit keyword arguments, and get both optional and required keyword arguments at the same time (that's why I referenced #560).
I don't have any truly good ideas, so here comes some bad ones:
Staying close to how Ruby does it
What about stealing the := assignment operator from Pascal/Agol, and using it for explicit keyword arguments?  I'm hoping that adding a := token to the lexxer wouldn't cause trouble (can a type restriction ever start with an =?
def foo(required, optional=2, required_keyword:=, optional_keyword:=4)

= would no longer define a keyword argument, but solely an optional positional argument.
Using a prefix instead
Another idea would be to use a prefix, a character that means "this is a keyword argument".
def foo(required, optional=2, !required_keyword, !optional_keyword=4)

I picked bang for the prefix for no good reason.  I don't see any prefix character that would have an obvious meaning... no matter which one is picked, it's going to be a bit of syntactical magic that the reader will just have to learn the meaning of.  That's too bad.
What I do like about the prefix is that it divides the two axes (positional vs. keyword, required vs. default) cleanly in half syntactically.  The prefix decides positional/keyword, the suffix decides required/default.

I'm still voting for Python style keyword arguments, like mentioned in https://github.com/manastech/crystal/issues/560#issuecomment-94793013
That is make arguments and keyword arguments a single concept, no changes at the definee side, instead do what we do now but also allow required arguments to be used as keyword arguments on the caller side.
That reduces the amount of concepts you need to learn, the amount of syntax to learn and add (no new syntax from what's there already in fact) and seem to have proved itself in the Python world.
I don't think that it makes all the argument names part of the API is that much of a big deal as you make it, as I wrote before in fact I like that it makes you think twice about which name you choose. And we get it for free with all existing Crystal code already.

+1 for being able to flag a keyword argument as not eligible for positional use.
Perhaps use quotes in the declaration? def fn(arg1, arg2, "keyword_arg", "other_keyword_arg" = 4)
Or perhaps the rocket syntax: def fn(arg1, arg2, keyword_arg => 7)

Python has this * syntax:
def f(a, b=6, *, c=7, d):
      pass

a and b can be positional or keyword (b is optional).
c and d are keyword only (d is required!).
I quite like this, but this is not a big deal.
I insist only on allowing any argument to be passed through keyword.

I didn't know about that feature. I would prefer a different syntax, personally.

+1 also on separation of defaults and keywording.
I find both := and => to be acceptable syntax choices.
As for the call, I feel key: val still seems better than forbidding assignments in calls (not because it's a practise I use or think is good, it just looks more confusing in code imo). The colon as key-val connector feels very natural based on common uses today.

Throw up variation on the "prefix"-road (considering that : begins type annotation after param names):
def foo(required, optional = 2, :required_keyword, :optional_keyword = 4)
def typed_foo(required: Bool, optional = 2 : Int32, :required_keyword : Foo, :optional_keyword = 4 : Int64)

I don't like Ozra's suggestion. Too verbose. It needs a terse symbolic notation.

I am working on some code right now that relates to these pain points:
class Frame
    def initialize(@window = null, @height = 3)
      self.window = window
      window.render
    end
end

This compiles but I don't actually want to have a default value for window. null is not an acceptable option (I'm a little confused about why it doesn't cause a compiler error) and listing it here seems like misleading method documentation. I just want it be a required keyword argument. In addition I initially wanted the second argument to be options = {} of Symbol => Int32 and to have options work like a remaining keywords splat, like **options in Ruby, but that didn't work. Anyway, just some feedback. Combining positional and keyword arguments does seem like an elegant solution, but required/non-defaulted keyword arguments are really important IMO.

Agreed.
+1 for non-defaulted keyword arguments.
+1 for **options.
I suggest copying the Ruby 2.0 syntax (which I literally only discovered last night!!) for mandatory keyword arguments (arg:) and the **options hash.

Let's close this one due to #2537. Please open more focused issues in case you see something here that you still miss.


Pure CSS version contains & selectors?

I want to use pure CSS version with CSS variables, but /lib/sanitize.css contains & selectors (for example, here), and /sanitize.css doesn't use CSS variables.
Is this mistake, or does it require to be compiled?
If I should compile them, how to?
(Compiling with scss after renaming lib/sanitize.css -> sanitize.scss seems to produce expected pure CSS, but I don't think it is the correct way...)

@l1048576 Possibly a build mistake? The project root has a pure CSS version.

@l1048576, @Fequois, the lib/sanitize.css file uses modern CSS that may not be available to all browsers. It is transpiled down to the more-compatible sanitize.css file. You can learn more about it at http://cssnext.io/.


[Add] T3 link within the NextJS subcategory

Site URL
https://create.t3.gg/
Description of the above provided site
The best way to start a full-stack, typesafe Next.js app. The core pieces are Next.js and TypeScript. Tailwind CSS is almost always included. If you’re doing anything resembling backend, tRPC, Prisma, and NextAuth.js are great additions too.
Category
Frontend
Sub Category
Next Js
Checklist

[X] I have checked the existing issues
[X] I have read the Contributing Guidelines
[X] I am willing to work on this issue (optional)

Let me know if it's all good now


Broken link to Android SDK Sample in read me

Describe the bug
Android SDK Sample link in README.md is broken
Expected Behaviour
Point to the correct sample repo
Steps to Reproduce the Problem

Go to https://github.com/voxeet/voxeet-uxkit-reactnative
Click on Android SDK Sample link in README.md
The link redirects to a 404 page

Thank you, this link has been removed in the coming version of the UXKit for React Native.


Fix TODOs relating to argument names in flutter_tools

There's a bunch of TODO(ianh)s that were waiting for https://github.com/dart-lang/args/pull/182. I should fix them now.

This is mostly done, waiting for the args package to be published.


Publish on crates.io

So I can cargo install ddbug ;)

I need to switch this to using a crates.io release of gimli before I can do that, which requires a new gimli release, but I want to fix the Reader offsets in gimli before doing that.

Done (but without the --calls option).


getChannels() doesn't list Forum Channels

General Troubleshooting

[X] I have checked for similar issues on the Issue-tracker.
[X] I have updated to the latest JDA version
[X] I have checked the branches or the maintainers' PRs for upcoming bug fixes.

Expected Behaviour
I should have test and test-prodforum channels listed, but I can't find them.

Code Example for Reproduction Steps
event.getGuild().getChannels()
// or what I want to use:
thread.getParentChannel(); // return null

Code for JDABuilder or DefaultShardManagerBuilder used
var botAdapter = new BotAdapter(discordService, requestService);
        var builder = JDABuilder.createDefault(token);
        builder.enableIntents(GatewayIntent.GUILD_MESSAGES, GatewayIntent.DIRECT_MESSAGES, GatewayIntent.GUILD_MEMBERS);
        builder.disableCache(CacheFlag.MEMBER_OVERRIDES, CacheFlag.VOICE_STATE);
        builder.setBulkDeleteSplittingEnabled(false);
        builder.addEventListeners(botAdapter);
        DiscordService.setInstance(builder.build());

        DiscordService.botInstance.updateCommands().addCommands( ... ).queue();

Exception or Error
No response

Those toString() outputs indicate that you are not using the latest version. We are currently on 5.0.0-beta.10. I would recommend updating to that version. Note that forum channels are only supported on JDA v5, if you are using v4 you cannot interact with threads in general which includes forums.

I do use the latest version:
<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>5.0.0-alpha.10</version>
</dependency>

5.0.0-alpha.10 is not latest. 5.0.0-beta.10 is.

🤦
My bad, I really need glasses ^^
Thanks for the help 👍


Use of undeclared...

This is a strange behaviour: Shortly after opening and first successful compilation tons of errors are indicated, even though the code still compiles and runs well.
I can easily "go to declaration" from each of the errors indicated, so it might be a Swift to C problem, maybe a missing header or so.
Any ideas? XCode 10.1 on macOS Mojave

Found it. WebRTC bridging header wasn't configured in build settings.


A tool to generate .ptr files by libpcap files (.pcap) ?

Hi,
Thanks for offering a convenient way to analyze QUIC protocol !
Could you please tell me whether there is a tool to generate .ptr files by libpcap files (.pcap) and NSS key kog?

i wonder how to generate ptr file as well.


Addressing the CORR colors MIA

https://internal.cida.usgs.gov/jira/browse/AQCU-715

Coverage increased (+0.05%) to 87.703% when pulling ea25ff5ee138540451fe3e413ba566d1cb59af51 on mhines-usgs:master into a08842ad038f3cfbe3cdfbb813e33125e11b1178 on USGS-R:master.

So to you both @ee-usgs & @lindsaycarr , I am not sure the 9999 years are the primary problem. Changing some json datasets seems to make them work properly but not all the datasets. The two on the JIRA task work now with this change, but the originals don't. Lindsay, are you willing to take a look at this? Anything else jump out at you?

Hmmm I think this bug is due to the apprDates sometimes replacing real dates with NA from our labeling tweak changing some dates to NA (see formatDateRange dateSeq) . I think all I need to do is make sure that we don't re-use that dateSeq list for anything else in order to avoid the problem..

@mhines-usgs nice find!

...by nice, I mean good thing you found that :)

So I fixed that, but.. still plotting wrong. Continuing to poke...

Coverage decreased (-0.5%) to 87.176% when pulling d79c6fd1de8ca3c86802f3a6181b4c96200ebfd6 on mhines-usgs:master into a08842ad038f3cfbe3cdfbb813e33125e11b1178 on USGS-R:master.

Coverage increased (+0.06%) to 87.176% when pulling 401a4524cd9713837ebcc7bfba83b1d660cce20f on mhines-usgs:master into c1df2734a85c43968aa9a0ed40978c4aa5d8e470 on USGS-R:master.

documentation in R makes it sound like those years are fine:

For input, only years 0:9999 are accepted

https://stat.ethz.ch/R-manual/R-devel/library/base/html/strptime.html

@mhines-usgs try removing dev='svg' from the chunk options and then change your 2050 thing to 9999. It should work...so now I'm looking into why that matters

Sooo, whaaatttt!!! That's insane!

I was able to recreate using base R plotting:
dev='svg' + xlim specified inside points
s <- c(as.POSIXct("1922-01-01 00:00:00"), as.POSIXct("2015-08-01 01:00:00"))
e <- c(as.POSIXct("2015-08-01 01:00:00"), as.POSIXct("9999-08-01 00:00:00"))

plot(x = as.POSIXct(NA), y = NA, ylim = c(0,10),
     xlim = c(as.POSIXct("2015-01-01"), as.POSIXct("2016-01-01")))
rect(xleft = s, ybottom = 8, xright = e, ytop = 9, col = c("green", "red"), border = NA)

no dev='svg' + xlim specified inside points
s <- c(as.POSIXct("1922-01-01 00:00:00"), as.POSIXct("2015-08-01 01:00:00"))
e <- c(as.POSIXct("2015-08-01 01:00:00"), as.POSIXct("9999-08-01 00:00:00"))

plot(x = as.POSIXct(NA), y = NA, ylim = c(0,10),
     xlim = c(as.POSIXct("2015-01-01"), as.POSIXct("2016-01-01")))
rect(xleft = s, ybottom = 8, xright = e, ytop = 9, col = c("green", "red"), border = NA)


Fix incorrect URL for sqls

The URL for installing sqls contains an https:// prefix which is incorrect for go get. This PR fixes the URL.

You are right of course, thank you very much for your contribution! Have a great day!


(maint) Stop using .lan addresses

We've been asked to stop using puppetlabs.lan addresses, so I've swapped
them for the preferred names/URIS.

:+1: Travis fail looks like a network issue, unrelated to these changes:

Could not transfer artifact org.jruby:jruby-stdlib:jar:<IP_ADDRESS> from/to central (https://repo1.maven.org/maven2/): Read timed out

Not sure if someone in RE should review / merge this - @shrug, @haus?


passing a filename to onyo new results in suboptimal error message

If I pass a filename to onyo new (see #35), it provides a suboptimal error message:
❱ onyo tree
/tmp/tst
└── groups
    └── dp
        └── aqw
            └── laptop_lenovo_T490.abc123

3 directories, 1 file

❱ onyo new groups/dp/aqw/laptop_lenovo_T490.abc123
ERROR:onyo:mkdir: cannot create directory ‘/tmp/tst/groups/dp/aqw/laptop_lenovo_T490.abc123’: File exists

This error message does state what is wrong (the file exists), but it doesn't tell the user what's /really/ wrong: that onyo new only accepts a directory as an argument and not a file.

The error above was caused in part by the (now discarded) function of automatically creating a folder with onyo new when a folder does not exist. Since we now have onyo mkdir to do that and do not automatically created folders, the situation changed, and the error output is modified:
ERROR:onyo:/Users/tkadelka/new-onyo/second_tests/onyo_tests/test_1/no user/laptop_apple_macbookpro.8 is not a directory.


Ags dots

Finally someone who made end4 dots work on nixos. You are really awesome. How do I get only ags from your dots and are the patches a must for it to work.Am new to nixos

take AGS from my flakes, and then pass it into your home.nix as an import. You will then be able to do pretty much whatever you want. My flakes pull .config from my repo and place into .configstaging, you can easily modify it to pull end-4's .config folder and then it will copy it to .config for you, leaving them available for editing.


Update readme.md

Theme with Ukraine is not actual now/

[Insert URL to the list here]
[Explain what this list is about and why it should be included here]
By submitting this pull request I confirm I've read and complied with the below requirements 🖖
Please read it multiple times. I spent a lot of time on these guidelines and most people miss a lot.
Requirements for your pull request

Don't waste my time. Do a good job, adhere to all the guidelines, and be responsive.
You have to review at least 2 other open pull requests.
Try to prioritize unreviewed PRs, but you can also add more comments to reviewed PRs. Go through the below list when reviewing. This requirement is meant to help make the Awesome project self-sustaining. Comment here which PRs you reviewed. You're expected to put a good effort into this and to be thorough. Look at previous PR reviews for inspiration. Just commenting “looks good” or simply marking the pull request as approved does not count! You have to actually point out mistakes or improvement suggestions.
You have read and understood the instructions for creating a list.
This pull request has a title in the format Add Name of List.

✅ Add Swift
✅ Add Software Architecture
❌ Update readme.md
❌ Add Awesome Swift
❌ Add swift
❌ add Swift
❌ Adding Swift
❌ Added Swift

Your entry here should include a short description about the project/theme of the list. It should not describe the list itself. The first character should be uppercase and the description should end in a dot. It should be an objective description and not a tagline or marketing blurb.

✅ - [iOS](…) - Mobile operating system for Apple phones and tablets.
✅ - [Framer](…) - Prototyping interactive UI designs.
❌ - [iOS](…) - Resources and tools for iOS development.
❌ - [Framer](…)
❌ - [Framer](…) - prototyping interactive UI designs

Your entry should be added at the bottom of the appropriate category.
The title of your entry should be title-cased and the URL to your list should end in #readme.

Example: - [Software Architecture](https://github.com/simskij/awesome-software-architecture#readme) - The discipline of designing and building software.

The suggested Awesome list complies with the below requirements.

Requirements for your Awesome list

Has been around for at least 30 days.That means 30 days from either the first real commit or when it was open-sourced. Whatever is most recent.
Don't open a Draft / WIP pull request while you work on the guidelines. A pull request should be 100% ready and should adhere to all the guidelines when you open it. Instead use #2242 for incubation visibility.
Run awesome-lint on your list and fix the reported issues. If there are false-positives or things that cannot/shouldn't be fixed, please report it.
The default branch should be named main, not master.
Includes a succinct description of the project/theme at the top of the readme. (Example)

✅ Mobile operating system for Apple phones and tablets.
✅ Prototyping interactive UI designs.
❌ Resources and tools for iOS development.
❌ Awesome Framer packages and tools.

It's the result of hard work and the best I could possibly produce.
If you have not put in considerable effort into your list, your pull request will be immediately closed.
The repo name of your list should be in lowercase slug format: awesome-name-of-list.

✅ awesome-swift
✅ awesome-web-typography
❌ awesome-Swift
❌ AwesomeWebTypography

The heading title of your list should be in title case format: # Awesome Name of List.

✅ # Awesome Swift
✅ # Awesome Web Typography
❌ # awesome-swift
❌ # AwesomeSwift

Non-generated Markdown file in a GitHub repo.
The repo should have awesome-list & awesome as GitHub topics. I encourage you to add more relevant topics.
Not a duplicate. Please search for existing submissions.
Only has awesome items. Awesome lists are curations of the best, not everything.
Does not contain items that are unmaintained, has archived repo, deprecated, or missing docs. If you really need to include such items, they should be in a separate Markdown file.
Includes a project logo/illustration whenever possible.

Either centered, fullwidth, or placed at the top-right of the readme. (Example)
The image should link to the project website or any relevant website.
The image should be high-DPI. Set it to maximum half the width of the original image.

Entries have a description, unless the title is descriptive enough by itself. It rarely is though.
Includes the Awesome badge.

Should be placed on the right side of the readme heading.

Can be placed centered if the list has a centered graphics header.

Should link back to this list.

Has a Table of Contents section.

Should be named Contents, not Table of Contents.
Should be the first section in the list.
Should only have one level of nested lists, preferably none.
Must not feature Contributing or Footnotes sections.

Has an appropriate license.

We strongly recommend the CC0 license, but any Creative Commons license will work.

Tip: You can quickly add it to your repo by going to this URL: https://github.com/<user>/<repo>/community/license/new?branch=main&template=cc0-1.0 (replace <user> and <repo> accordingly).

A code license like MIT, BSD, Apache, GPL, etc, is not acceptable. Neither are WTFPL and Unlicense.
Place a file named license or LICENSE in the repo root with the license text.
Do not add the license name, text, or a Licence section to the readme. GitHub already shows the license name and link to the full text at the top of the repo.
To verify that you've read all the guidelines, please comment on your pull request with just the word unicorn.

Has contribution guidelines.

The file should be named contributing.md. Casing is up to you.
It can optionally be linked from the readme in a dedicated section titled Contributing, positioned at the top or bottom of the main content.
The section should not appear in the Table of Contents.

All non-important but necessary content (like extra copyright notices, hyperlinks to sources, pointers to expansive content, etc) should be grouped in a Footnotes section at the bottom of the readme. The section should not be present in the Table of Contents.
Has consistent formatting and proper spelling/grammar.

The link and description are separated by a dash. Example: - [AVA](…) - JavaScript test runner.
The description starts with an uppercase character and ends with a period.
Consistent and correct naming. For example, Node.js, not NodeJS or node.js.

Doesn't use hard-wrapping.
Doesn't include a Travis badge.You can still use Travis for list linting, but the badge has no value in the readme.
Doesn't include an Inspired by awesome-foo or Inspired by the Awesome project kinda link at the top of the readme. The Awesome badge is enough.

Go to the top and read it again.

Ur agod dam weirdo musk
On Tue, Dec 13, 2022, 1:38 AM kodxl @.***> wrote:

Theme with Ukraine is not actual now/
[Insert URL to the list here]
[Explain what this list is about and why it should be included here]
By submitting this pull request I confirm I've read and complied with the
below requirements 🖖
Please read it multiple times. I spent a lot of time on these guidelines
and most people miss a lot.
Requirements for your pull request

Don't waste my time. Do a good job, adhere to all the guidelines,
and be responsive.
You have to review at least 2 other open pull requests
https://github.com/sindresorhus/awesome/pulls?q=is%3Apr+is%3Aopen.
Try to prioritize unreviewed PRs, but you can also add more comments
to reviewed PRs. Go through the below list when reviewing. This requirement
is meant to help make the Awesome project self-sustaining. Comment here
which PRs you reviewed. You're expected to put a good effort into this and
to be thorough. Look at previous PR reviews for inspiration. Just
commenting “looks good” or simply marking the pull request as approved does
not count! You have to actually point out mistakes or improvement
suggestions.
You have read and understood the instructions for creating a list
https://github.com/sindresorhus/awesome/blob/main/create-list.md.
This pull request has a title in the format Add Name of List.

✅ Add Swift
✅ Add Software Architecture
❌ Update readme.md
❌ Add Awesome Swift
❌ Add swift
❌ add Swift
❌ Adding Swift
❌ Added Swift

Your entry here should include a short description about the
project/theme of the list. It should not describe the list itself.
The first character should be uppercase and the description should end in a
dot. It should be an objective description and not a tagline or marketing
blurb.

✅ - iOS - Mobile operating system for Apple phones and
tablets.
✅ - Framer - Prototyping interactive UI designs.
❌ - iOS - Resources and tools for iOS development.
❌ - Framer
❌ - Framer - prototyping interactive UI designs

Your entry should be added at the bottom of the appropriate category.
The title of your entry should be title-cased and the URL to your
list should end in #readme.

Example: - Software Architecture -
The discipline of designing and building software.

The suggested Awesome list complies with the below requirements.

Requirements for your Awesome list

Has been around for at least 30 days.
That means 30 days from either the first real commit or when it was
open-sourced. Whatever is most recent.

Don't open a Draft / WIP pull request while you work on the
guidelines. A pull request should be 100% ready and should adhere to all
the guidelines when you open it. Instead use #2242
https://github.com/sindresorhus/awesome/issues/2242 for incubation
visibility.

Run awesome-lint https://github.com/sindresorhus/awesome-lint on
your list and fix the reported issues. If there are false-positives or
things that cannot/shouldn't be fixed, please report it
https://github.com/sindresorhus/awesome-lint/issues/new.

The default branch should be named main, not master
https://www.zdnet.com/article/github-to-replace-master-with-alternative-term-to-avoid-slavery-references/
.

Includes a succinct description of the project/theme at the top of
the readme. (Example)
https://github.com/willempienaar/awesome-quantified-self

✅ Mobile operating system for Apple phones and tablets.
✅ Prototyping interactive UI designs.
❌ Resources and tools for iOS development.
❌ Awesome Framer packages and tools.

It's the result of hard work and the best I could possibly produce.
If you have not put in considerable effort into your list, your pull
request will be immediately closed.

The repo name of your list should be in lowercase slug format:
awesome-name-of-list.

✅ awesome-swift
✅ awesome-web-typography
❌ awesome-Swift
❌ AwesomeWebTypography

The heading title of your list should be in title case
https://capitalizemytitle.com/ format: # Awesome Name of List.

✅ # Awesome Swift
✅ # Awesome Web Typography
❌ # awesome-swift
❌ # AwesomeSwift

Non-generated Markdown file in a GitHub repo.

The repo should have awesome-list & awesome as GitHub topics
https://help.github.com/articles/about-topics. I encourage you to
add more relevant topics.

Not a duplicate. Please search for existing submissions.

Only has awesome items. Awesome lists are curations of the best, not
everything.

Does not contain items that are unmaintained, has archived repo,
deprecated, or missing docs. If you really need to include such items, they
should be in a separate Markdown file.

Includes a project logo/illustration whenever possible.

Either centered, fullwidth, or placed at the top-right of the
readme. (Example) https://github.com/sindresorhus/awesome-electron
The image should link to the project website or any relevant
website.
The image should be high-DPI. Set it to maximum half the width
of the original image.

Entries have a description, unless the title is descriptive enough
by itself. It rarely is though.

Includes the Awesome badge
https://github.com/sindresorhus/awesome/blob/main/awesome.md#awesome-badge.

Should be placed on the right side of the readme heading.

Can be placed centered if the list has a centered graphics
header.

Should link back to this list.

Has a Table of Contents section.

Should be named Contents, not Table of Contents.
Should be the first section in the list.
Should only have one level of nested lists
https://commonmark.org/help/tutorial/10-nestedLists.html,
preferably none.
Must not feature Contributing or Footnotes sections.

Has an appropriate license.

We strongly recommend the CC0 license
https://creativecommons.org/publicdomain/zero/1.0/, but any Creative
Commons license https://creativecommons.org/choose/ will work.

Tip: You can quickly add it to your repo by going to this URL:
https://github.com/
//community/license/new?branch=main&template=cc0-1.0
(replace  and  accordingly).

A code license like MIT, BSD, Apache, GPL, etc, is not
acceptable. Neither are WTFPL and Unlicense https://unlicense.org.
Place a file named license or LICENSE in the repo root with the
license text.
Do not add the license name, text, or a Licence section to the
readme. GitHub already shows the license name and link to the full text at
the top of the repo.
To verify that you've read all the guidelines, please comment on
your pull request with just the word unicorn.

Has contribution guidelines
https://github.com/sindresorhus/awesome/blob/main/awesome.md#include-contribution-guidelines.

The file should be named contributing.md. Casing is up to you.
It can optionally be linked from the readme in a dedicated
section titled Contributing, positioned at the top or bottom of the
main content.
The section should not appear in the Table of Contents.

All non-important but necessary content (like extra copyright
notices, hyperlinks to sources, pointers to expansive content, etc) should
be grouped in a Footnotes section at the bottom of the readme. The
section should not be present in the Table of Contents.

Has consistent formatting and proper spelling/grammar.

The link and description are separated by a dash.
Example: - AVA - JavaScript test runner.
The description starts with an uppercase character and ends with
a period.
Consistent and correct naming. For example, Node.js, not NodeJS
or node.js.

Doesn't use hard-wrapping
https://stackoverflow.com/questions/319925/difference-between-hard-wrap-and-soft-wrap
.

Doesn't include a Travis badge.
You can still use Travis for list linting, but the badge has no value
in the readme.

Doesn't include an Inspired by awesome-foo or Inspired by the
Awesome project kinda link at the top of the readme. The Awesome badge
is enough.

Go to the top and read it again.
You can view, comment on, or merge this pull request online at:
https://github.com/sindresorhus/awesome/pull/2451
Commit Summary

6ec022a
https://github.com/sindresorhus/awesome/pull/2451/commits/6ec022acdb9369ce686e797663dd5b6c71c4d058
Update readme.md

File Changes
(1 file https://github.com/sindresorhus/awesome/pull/2451/files)

M readme.md
https://github.com/sindresorhus/awesome/pull/2451/files#diff-5a831ea67cf5cf8703b0de46901ab25bd191f56b320053be9332d9a3b0d01d15
(14)

Patch Links:

https://github.com/sindresorhus/awesome/pull/2451.patch
https://github.com/sindresorhus/awesome/pull/2451.diff

—
Reply to this email directly, view it on GitHub
https://github.com/sindresorhus/awesome/pull/2451, or unsubscribe
https://github.com/notifications/unsubscribe-auth/A33VANJJCD36B2UZOGVTRN3WNA727ANCNFSM6AAAAAAS47AFOI
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>


Add RegEx pattern to color map

Branched off of my css-style-colors branch.
I changed the runtimeMap property so that it's no longer a dictionary. I did this to avoid constructing a new RegExp from the dictionary key every time we need to check if a feature name matches the expression.
Instead I created a list in setRuntime where for each item in the map, I push an object that contains the pattern and the color, so we only have to construct the regExp once. During evaluate, I iterate through the list and test the pattern against the name, and return the color.
This returns the color of the first pattern that matches. What do we do about features that match more than one regex pattern in the map? Should we have the patterns listed first be higher priority than those below?
I also updated the sandcastle example to show using regex patterns.

@ggetz merge 3d-tiles-style into this.

@ggetz the goal here was to allow propertyName to contain a regex, not keys in the map.  I'll explain in person tomorrow.
@mramato I would not bother reviewing these PRs until 3d-tiles-style goes into 3d-tiles.

@ggetz probably just close this and we'll start over.


docs: move inappropriate content out of /docs/Concepts and into new sections; expand /docs/Concepts

PR Checklist
Please review the guidelines for contributing to this repository.

[X] I am requesting to pull a topic/feature/bugfix branch (right side). In other words, not master.
[X] I have run npm test against my changes and tests pass.
[X] I have added or edited necessary documentation, or no docs changes are needed.

Description
As discussed, move some docs that were in Concepts to more appropriate categories. Some new Concepts pages fill in missing concepts. Update links as needed.
This PR does fill out all known missing docs/feature pages. I did some additional editing for selected Concepts docs, but there is more to do to turn them into better feature pages.

Wording was confusing, apologies—meant that this (should) adds all the features from that docs that are before "Maker".

I think ideally, the concepts page for Tray should be the introduction to the concept, and the page under each platform goes into particulars about using/configuring the tray on that platform, so it's a more in-the-weeds thing rather than an invitation to the github repo as a way to integrate Spokestack.

Agreed, this is just v1 for the platform tray pages. should be revised next as per your suggestion.


History is not shown

The editing history of a word is not shown (don't know if it is saved).

This is how it looks like on production (I do a s/.././ here):

@phylor Do you have an idea what happens here?


Fix invalid yum repo in ci/Dockerfile [skip ci]

Signed-off-by: Peixin Li<EMAIL_ADDRESS>we require git 2.18+ for CI submodule operations,
The previous yum repo in dockerfile become invalid, updated it to latest one.
Verified working locally.

build

build

build


064_builtins: clarify @addWithOverflow explanation

There were misunderstandings concerning overflowing operations and overflowed variables, see #94 for the discussion.
This PR is a draft for an explanation that is hopefully clearer.
I tried to keep the explanation relatively short, because I'm hoping that the direct relation to the code and variables is sufficient. That could be a mistake and probably needs feedback from users.
Also the user has one additional question to correct to make sure they understood the builtin (with the drawback of frustrating them if the explanation is still not clear enough -> meh). The main reason I added the question, was that reading a big chunk of text about overflow and not being asked a verifying question felt like a small let down.

@DerTee Thank you so much for this. Sorry it took so long for me to get back to this. It's a great addition.


[Feature] Add country to badge

Badge

The badge currently looks like this, is there a way to add the country next to it?

For Example

commiters.top rank Egypt

Do you mean something like committers.top rank|egypt #9? I'd welcome a PR which does that, you just need to modify this line.

@ashkulz Exactly yes, I'll give it a go and try my best with it.
Thank you ❤


Give access to subsystem handle from toplevel

This allows accessing a more permissive start function, as well as starting nested subsystems without introducing one additional level of indirection that requires Send + 'static

I think there are a couple of misconceptions in your example:

ss.request_global_shutdown() is probably the wrong function in "Tasks", ss.request_shutdown() is probably what you want
tasks_ss.request_shutdown(); does not shut down tasks_ss; it shuts down the Toplevel it is contained in. The only way of shutting down a nested subsystem is from its parent.
Don't delay returning res until the end of the function in "Tasks". Returning an error triggers a shutdown automatically.

Out of curiousity/feedback:

Why do you use a nested subsystem in the first place? Because you want to shutdown as soon as all the nested tasks are finished? I ask because I try understand what API I should improve in a potential rework. The current implementation is quite robust, but is almost impossible to extend any further in functionality. I ask about this specifically because one functionality I already found that is desperately needed is wait_for_all_children() inside of a subsystem. This would prevent the necessity to use a nested toplevel, correct?

I'm not sure if I like exposing the subsystemhandle in the toplevel object. It's more of an implementation detail and it's not supposed to be used the way you intend to use it here. I feel like a refactoring in your code could achieve a better result. Maybe I'm wrong though, I might have to think about it more. I currently have very little time though, sadly, so it might have to wait a little :/ I apologize.

Apart from the poor syntax when spawning tasks in a loop, which I'd like to avoid, the impossibility to create from the main thread objects that contain a Subsystem so that they are able to spawn new tasks autonomously, yes the way this example is built showcases a need to shut down in a particular order, where the monitoring stops after all the other tasks are finished shutting down.

For example, it might allow spawning new tasks while the system is already shutting down

IIUC all that is already possible once the subsystem is leaked through any task.
I guess if I wanted to circumvent this imitation, I could spawn a task that sends its subsystem through a oneshot channel, and await the receiver right after. That just seems like a terribly wrong way to do it compared to opening this PR.

ss.request_global_shutdown() is probably the wrong function in "Tasks", ss.request_shutdown() is probably what you want.

IIUC these achieve the same effect in this case because ss at that point is the top-level Toplevel. (naming ^^) I just wanted to make it very clear that at that point I really wanted to shutdown everything and not just tasks.

tasks_ss.request_shutdown(); does not shut down tasks_ss; it shuts down the Toplevel it is contained in. The only way of shutting down a nested subsystem is from its parent.

Yes, and that top-level being tasks, it means I'm only requesting shutdown of down tasks, and in particular not that of monitoring.

For example, it might allow spawning new tasks while the system is already shutting down

I think this might be covered, because there is already a mechanism in place that prevents new tasks from getting spawned once the system is shutting down. There is an option somewhere that gets collected on shutdown. So this might be safe after all.

I feel like my crate is too opinionated for your usecase...
I really don't feel comfortable with leaking the subsystem token. I kind of regret the decision to make it owned/clonable in the first place. The argument that subsystems is originally meant to stay within the subsystem, to interact with the shutdown system. The thing returned from "start" is the thing that should be used as an external handle.
But I think the API got too convoluted and the naming is all wrong. And now people use the internal handle as external handles and store them in structs and stuff.
I'd like to perform a rework where the internal token is a scoped mut reference and can't be leaked out of the subsystem, and then also an external handle that is more powerful than it is currently.

That being said as far as I could tell from looking for a lib that would do that on lib.rs, this is the most adapted to my use-case ;)

I think I'll reject this for now as it doesn't really fit into existing design decisions.

I'd like to perform a rework where the internal token is a scoped mut reference and can't be leaked out of the subsystem, and then also an external handle that is more powerful than it is currently.

FYI (in case that would match the rework you had in mind), I ran into issues using this crate where it would sometimes freeze when tasks were supposed to timeout and that was very hard to investigate because there is a lot of code and I couldn't extract a minimal repro, so I figured the easiest way to fix it would be to just rewrite a simpler version of this crate from scratch.
I've published it as tokio_tasks_shutdown  (there's 3x less code than in tokio-graceful-shutdown).

Is the freeze related to #50?
If so, I don't think you will get rid of it in a rewrite, it's deeply rooted in tokio...
But sure, that's why I like the open source community, if something isn't good enough people can always fork/rewrite/improve. Kudos for the effort :) might try it out some day

But I would indeed be happy about a reproducible hang, a lot of effort was put into making this entire thing as reliable as possible, so if I missed some weird corner case, I'd love to hear about it.

I would indeed be happy about a reproducible hang, a lot of effort was put into making this entire thing as reliable as possible, so if I missed some weird corner case, I'd love to hear about it.

I really tried: I did spend 2 hours trying to extract the repro and didn't manage (that was made even harder by the fact this would only happen in production). It seemed that either TaskHandle::abort() was never called, or it had no effect, and then we were hanging on https://github.com/Finomnis/tokio-graceful-shutdown/blob/d7a6183f6a0413a16688d14e0e9e47e278e2a70f/src/toplevel.rs#L264
I had a look at #50 back then, and it seemed that wasn't it, since:

We didn't get a successful shutdown (it hangs before)
Before adding tokio-graceful-shutdown to the program, it wouldn't hang, which led me to think that a hanging task wasn't what was causing the issue

However, that is for this scenario that I added an extra timeout to stop waiting on aborted hanging tasks, so user can make sure this wouldn't hang even in that case.
Design-wise I'm using a single control task selecting on channels instead of mutexes, I think that might make it easier to reason about (and of course even simpler since I didn't put subsystems concept), so hopefully if there is a such corner case I didn't hit it 🤷, and if #50 was indeed the issue the new timeout should solve it.
I'll let you know if that doesn't work. 😊


Check sequential tests with identical conditions

Detect code like the following:
if x == 0 {
	println(x)
}
if x == 0 {
	println(x + 1)
}

and suggest merging the two ifs into one, or fixing the conditionals.
Do not flag instances where the first if reassigns the values of any variables involved in the condition. For simplicity restrict to conditionals that use variables, constants and built-ins only.

Test cases:
func fn1(x int) {
	if x == 0 {
		println(x)
	}
	if x == 0 { // MATCH
		println(x + 1)
	}
}

func fn2(x int) {
	if x == 0 {
		println(x)
	}
	println("divider")
	if x == 0 {
		println(x + 1)
	}
}

func fn3(x int) {
	if x == 0 {
		x = gen()
	}
	if x == 0 {
		println(x + 1)
	}
}

func gen() int { return 0 }

func fn4(x int) {
	if x > gen() {
		println(x)
	}
	if x > gen() {
		println(x)
	}
}


new api to be close to jotai api

fully re-implemented.

Looks like the jotai basic example is working fine.
jotai version: https://githubbox.com/pmndrs/jotai/tree/main/examples/text_length
use-atom version: https://codesandbox.io/s/jovial-beaver-klnrm?file=/src/App.tsx


Minify And Unminify

Could you provide a Build in feature to Minify and Unminiy the code like JavaScript, CSS, etc.
It might be very helpful because it is usually hard to copy paste code here to there.

On 2020-03-15, Bapi Dey wrote:

Could you provide a Build in feature to Minify and Unminiy the code like
JavaScript, CSS, etc.
It might be very helpful because it is usually hard to copy paste code here to
there.

Would you please explain what Minify and Unminiy mean?  There may
already be a way in Vim to do what you want.
Regards,
Gary

I don't think Vim needs to have such builtin feature. Plugins would be sufficient.

@vim-ml Minification is the process of removing all unnecessary characters from the source codes of interpreted programming languages or markup languages without changing their functionality. These unnecessary characters usually include white space characters, new line characters, comments, and sometimes block delimiters, which are used to add readability to the code but are not required for it to execute. Minification reduces the size of the source code, making its transmission over a network more efficient.
For unminify here is a ans from stackoverflow. Now, maybe you understood what I am looking for.

On 2020-03-15, Bapi Dey wrote:

@vim-ml Minification is the process of removing all unnecessary characters from
the source codes of interpreted programming languages or markup languages
without changing their functionality. These unnecessary characters usually
include white space characters, new line characters, comments, and sometimes
block delimiters, which are used to add readability to the code but are not
required for it to execute. Minification reduces the size of the source code,
making its transmission over a network more efficient.
For unminify here is a ans from stackoverflow. Now, maybe you understood what I
am looking for.

Thank you.  Now I understand.
Given the speed of today's networks and the overhead of everything
else involved in transferring data over a network, it seems hardly
worth the effort.
In any case, I agree with K.Takata that this is something that could
be done in a plugin and definitely not something to be included
internally in Vim.
Regards,
Gary

I am closing this, as I don't see why this needs to be in the core. A plugin should work and might possibly already exists.


customizing ContextMenu

We should be slowly decoupling the editor from UI layer ( https://github.com/excalidraw/excalidraw/issues/6075), so we can't be adding contextMenu related components or icons and other things into the Actions objects themselves.
As such, we have two options for custom contextMenu:

have the editor take care of rendering the items from the Action objects configuration. This will prevent UI customization such as custom icons (if we introduce them to contextMenu items), and we'd also need to come up with DSL for grouping, nesting and similar.
build ContextMenu similar to <MainMenu/>.

Laying it out, I think it's actually clear we should go with (2). But we'll also need to modify Actions so that we can render all action items and they filter themselves out based on type: "canvas" | "element" and other predicates we use to conditionally render contextMenu items in App._getContextMenuItems().
We may also consider adding support for opening contextMenu anywhere. Let's say a host app (or the editor itself) adds onContextMenu on an arbitrary DOM node, it should then be able to open the contextMenu with arbitrary items.

option 2 👍


Add YML support.

https://github.com/ajwhite/gulp-ng-config/issues/19
@ajwhite Mind taking a look at this?

Nice work here! All around looks pretty good.
One thing I wanted to achieve in this implementation is inferring the parser by the file extension as well as what you've provided with the additional configuration option. I think the following would be an ideal solution:

If parser is passed in by the configuration, use the requested parser (yml vs json)
If no configuration is provided, but file ends in .yml, use yml parser, otherwise default to JSON
Otherwise, always fallback to JSON

And lastly my nitpick would be to change the configuration key from configType to parser, so we would be using:
gulpNgConfig('module', {
  parser: 'yml'
});

Thanks for taking a look, will make the required changes.

@ajwhite Pushed the requested changes.

@ajwhite Made the requested changes.

Nice work :) I'll notify you via this thread when the release goes out.
LGTM :+1:


Visual Studio Code is broken after an update

Issue description

Steps to reproduce
nixos-rebuild switch --upgrade
Technical details

system: "x86_64-linux"
host os: Linux 4.14.102, NixOS, 19.03pre169108.36f31600749 (Koi)
multi-user?: yes
sandbox: yes
version: nix-env (Nix) 2.2
channels(root): "nixos-19.03pre170194.2a81eceeba6, home-manager"
nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

On my local nixpkgs and on rev 2a81eceeba6, the output produced by nix build nixpkgs.vscode works fine.
What's the output of code --verbose --log trace?

https://gist.github.com/suhr/2e4754539e5fa1dcca80f6ac2ccfd5c5

A yet another system update fixed the issue.

The same problem occurs with the latest NixOS 23.05.1501 on kernel 6.1.36 and VS Code 1.78.2 on amd64 x86_64.


Fitur & bug

There was an error while swapping, please fix it as soon as possible

create really interesting dapps to get people interested in this project

0x4D2bA6B91842Be0E766EFe3a354F7B4dDD31c437

@efendi-boy The Swapping error is fixed now, thank you for testing!


merge Busola's defaultConfig with ConfigMap

Description
Merge Busola's default configuration stored in a file with changes coming from Busola's ConfigMap
Related issue(s)

/test pre-busola-smoke-test-docker

/test pre-busola-web

/retest

/retest


Need to depend on the log crate to manually compare LevelFilter

To make the sample code I wrote in #53 work, we need to depend on the log crate.
Fixed sample code:
use log; // Need this and adding the dependency in Cargo.toml

fn foo() {
    if opt.verbose.log_level_filter() <= LevelFilter::Warn {
        eprintln!("Hide command's stdout");
    }

    if opt.verbose.log_level_filter() <= LevelFilter::Error {
        eprintln!("Hide command's stderr");
    }
}

I’m not sure if I want to use the log crate or tracing yet… Since this crate can support both logging frameworks, it feels strange to be forced to depends on the log crate to manually manage the log level.
I think the LevelFilter could be re-exported (and maybe Level too).

Hey, thanks for your report!
So if we'd re-export LevelFilter, you would still depend on log, just not directly but transitively!
What I would rather imagine is that we define our own LevelFilter and provide From<LevelFilter> for log::LevelFilter and From<LevelFilter> for tracing::level_filters::LevelFilter behind feature gates.
What do you think?

Sure, I proposed a "simple" re-export but having an internal representation sounds better. "Worst" cases scenario the raw verbosity value like proposed in #53. "Worst" in the sense that it take the familiar C approach instead of using a higher level data type.

+1 to the feature gates idea

Thanks Ed.
I would have done it myself but I am currently on vacation! 😂 Greetings from Crete!


Enable retry and recover for tarfs

Enhance tarfs implementation by:

retry downloading from registry if the background downloading task fails
recover snapshot information related to tarfs on startup
remount EROFS associated with tarfs when restart
avoid redundant merge operation if the image has only one layer
auto detach loop devices when they are not used anymore

Can we add some e2e test cases in https://github.com/containerd/nydus-snapshotter/blob/main/integration/entrypoint.sh?


Use triage and maintain roles

This changes:

Readers (currently emeriti, but in the future also contributors) to
become triagers, allowing them to perform the following actions:

Apply labels
Close, reopen, and assign all issues and pull requests

Releasers to become maintainers, preventing them from performing the
following actions (abbreviated):

Manage outside collaborator access to a repository
Manage team and collaborator access to the repository
Delete or transfer repositories out of the organization

See: https://github.blog/changelog/2019-05-23-triage-and-maintain-roles-beta/
Closes unifiedjs/governance#18.
Closes GH-3.

Note that this should work, but GitHub’s docs are out of date for the endpoint, and I can’t test without actually affecting roles:
https://github.com/unifiedjs/github-tools/blob/80071f3150f744d11b60baa5ca52bf046d2004de/lib/team/repo.js#L81
https://developer.github.com/v3/teams/#add-or-update-team-repository

omg it worked! https://travis-ci.org/unifiedjs/github-tools/builds/569407744. It’s beautiful!


Fix different timezone issue.

Problem

Wrong encoding issue occured by differences between DB and finagle-mysql client timezone.
Mysql Date typecan't be decoded to java.util.Date in finagle-mysql.

Value 'RawValue(10,63,true,[B@69c21295)' can't be decoded to 'class java.util.Date'
java.lang.IllegalStateException: Value 'RawValue(10,63,true,[B@69c21295)' can't be decoded to 'class java.util.Date'

Solution

Apply encoder using timestampValue

Current

implicit val dateEncoder: Encoder[Date] = encoder[Date]

Fixed

implicit val dateEncoder: Encoder[Date] = encoder[Date] { (value: Date) =>
 timestampValue(new java.sql.Timestamp(value.getTime)): Parameter
}

Add DateValue in dateDecoder

implicit val dateDecoder: Decoder[Date] =
decoder[Date] {
case DateValue(v)        => v  // Add for Mysql Date
case timestampValue(v) => new Date(v.getTime)
}

### Notes

Additional notes.

### Checklist

- [x] Unit test all changes
- [ ] Update `README.md` if applicable
- [ ] Add `[WIP]` to the pull request title if it's work in progress
- [x] [Squash commits](https://ariejan.net/2011/07/05/git-squash-your-latests-commits-into-one) that aren't meaningful changes
- [x] Run `sbt scalariformFormat test:scalariformFormat` to make sure that the source files are formatted

@getquill/maintainers

…lient timezone.

- Add assert code related with Date in MysqlAsyncEncodingSpec.
- Add decoder for Date type of Mysql.

@karellen-kim thanks for the pull request! I'm about to merge https://github.com/getquill/quill/pull/417, so I'll have conflicts to merge rebase this PR, sorry for the extra work.

@fwbrasil Thanks for your fast feedback! :laughing:

@karellen-kim thanks for rebasing it! :) The build is failing because the source files aren't formatted (run sbt scalariformFormat test:scalariformFormat).

👍

👍


[BUG] Flaky test - udf_test.py::test_window_aggregate_udf

Describe the bug
This is failing on the spark 3.0.1 integration test and it also failed on a documentation change in the premerge build.  though it looks like there are slightly different parameters in these 2 failures:
https://ci.ngcc.nvidia.com/job/spark/job/rapids_premerge-github/609/
04:54:30  FAILED ../../src/main/python/udf_test.py::test_group_aggregate_udf[Long][IGNORE_ORDER, ALLOW_NON_GPU(AggregateInPandasExec,PythonUDF,Alias)]
https://ci.ngcc.nvidia.com/job/spark/job/rapids_it-3.0.1-SNAPSHOT-0.2-github/55/
09:08:02  FAILED src/main/python/udf_test.py::test_window_aggregate_udf[Long][IGNORE_ORDER, ALLOW_NON_GPU(WindowInPandasExec,PythonUDF,WindowExpression,Alias,WindowSpecDefinition,SpecifiedWindowFrame,UnboundedPreceding$,UnboundedFollowing$)]
Steps/Code to reproduce bug
Please provide a list of steps or a code sample to reproduce the issue.
Avoid posting private or sensitive data.
Expected behavior
A clear and concise description of what you expected to happen.
Environment details (please complete the following information)

Environment location: [Standalone, YARN, Kubernetes, Cloud(specify cloud provider)]
Spark configuration settings related to the issue

Additional context
Add any other context about the problem here.

Marking as P2, @GaryShen2008 please confirm whether this test is required for the pandas cudf functionality.

lots of UDF tests failing across the builds, not sure if they are all the same. The main error I see is:
05:12:27  E                   OSError: Invalid IPC stream: negative continuation token
This needs to be fixed or tests removed.

The original error seems to be related to long overflow, which is different from the IPC error recently.
File the PR https://github.com/NVIDIA/spark-rapids/pull/1343, suppose it could fix the IPC error.

Move it to next sprint since it requires more discussion about how to fix it.

A corner case, it is low priority.  Keep it for tracking.

A corner case, it is low priority.  Keep it for tracking.

@firestarman this is marked as a P1, can you explain the corner case and why it is low priority?

@firestarman this is marked as a P1, can you explain the corner case and why it is low priority?

It is not 100% reproduceable, and only happened for the long sum case randomly.
It was marked as P2 first due to maybe long overflow for some cases.
Later it was changed to P1 because of the IPC error, but the IPC error has been fixed. So it could be OK to change back to P2 for tracking.

It is not 100% reproduceable, and only happened for the long sum case randomly.
It was marked as P2 first due to maybe long overflow for some cases.
Later it was changed to P1 because of the IPC error, but the IPC error has been fixed. So it could be OK to change back to P2 for tracking.

Since the underlying functionality is disabled by default, lowering the priority to P2 and removing it from the current release.

Since the underlying functionality is disabled by default, lowering the priority to P2 and removing it from the current release.

Please xfail the test for now with a comment linking to this issue.

Please xfail the test for now with a comment linking to this issue.

Eventually it turns out to be a float precision issue in Python computation.  The test has the UDF defined as below.
    @f.pandas_udf('long')
    def pandas_sum(to_process: pd.Series) -> int:
        return to_process.sum()

The Series instance to_process  (column original type int64) passed in has already been casted to float64  since it contains null values, and the numbers inside to_process  are the same but with different orders between CPU and GPU tests. Then the function sum produces different values when all the numbers are big enough. Here is an example to reproduce the precision issue.
>>> gs_f = pd.Series([
...<PHONE_NUMBER>720175927,
...<PHONE_NUMBER>133345268,
...     1,
...     -7730374341177287187,
...     -4737283057172104304,
...<PHONE_NUMBER>926600716,
...     -3263989102713806634,
...<PHONE_NUMBER>696760926,
...<PHONE_NUMBER>255848196,
...     -1207164858762133741,
...     -219832261138823073,
...     -7766870047782081191,
...<PHONE_NUMBER>501788898,
...          None,
...<PHONE_NUMBER>501788898,
...     -7766870047782081191])
>>> cs_f.dtype
dtype('float64')
>>> cs_f.sum().astype(int)
7318538362488282112

gs_f  and cs_f  have the same numbers but with different order, you can see the values of sum are different from each other.
Similarly in the Pandas UDF above, to_process  contains the same numbers for CPU and GPU, but with different order, so getting different sum values for this input before retuning from the UDF, and then the tests failed.
The precision issue is likely to lead to the failures in issue #757 .
@revans2 Could you share some suggestions to handle this case ?


pydantic.v1.error_wrappers.ValidationError: 1 validation error for DataSource[Bug]:

Bug Description
Had a simple chatbot up and running with no issues yesterday. Noticed this morning that I would get the same validation error that's stemming from the imports. Not sure if this is an issue on my end or a potential bug.
Just running some import statements such as from llama_index.core import VectorStoreIndex, SimpleDirectoryReader, StorageContext, load_index_from_storage, Settings  or from llama_index.embeddings.openai import OpenAIEmbedding  will return the following error:
Version
0.10.28
Steps to Reproduce
from llama_index.core import VectorStoreIndex, SimpleDirectoryReader, StorageContext, load_index_from_storage, Settings
from llama_index.embeddings.openai import OpenAIEmbedding
Relevant Logs/Tracbacks
Traceback (most recent call last):
  File "c:\Users\sw\Downloads\testbot\myproject\agents3.py", line 6, in <module>
    from llama_index.core import VectorStoreIndex, SimpleDirectoryReader, StorageContext, load_index_from_storage, Settings
  File "c:\Users\sw\Downloads\testbot\.venv\Lib\site-packages\llama_index\core\__init__.py", line 19, in <module>
    from llama_index.core.indices import (
  File "c:\Users\sw\Downloads\testbot\.venv\Lib\site-packages\llama_index\core\indices\__init__.py", line 4, in <module>
    from llama_index.core.indices.composability.graph import ComposableGraph
  File "c:\Users\sw\Downloads\testbot\.venv\Lib\site-packages\llama_index\core\indices\composability\__init__.py", line 4, in <module>
    from llama_index.core.indices.composability.graph import ComposableGraph
  File "c:\Users\sw\Downloads\testbot\.venv\Lib\site-packages\llama_index\core\indices\composability\graph.py", line 7, in <module>
    from llama_index.core.indices.base import BaseIndex
  File "c:\Users\sw\Downloads\testbot\.venv\Lib\site-packages\llama_index\core\indices\base.py", line 12, in <module>
    from llama_index.core.ingestion import run_transformations
  File "c:\Users\sw\Downloads\testbot\.venv\Lib\site-packages\llama_index\core\ingestion\__init__.py", line 2, in <module>
    from llama_index.core.ingestion.pipeline import (
  File "c:\Users\sw\Downloads\testbot\.venv\Lib\site-packages\llama_index\core\ingestion\pipeline.py", line 31, in <module>
    from llama_index.core.ingestion.api_utils import get_client
  File "c:\Users\sw\Downloads\testbot\.venv\Lib\site-packages\llama_index\core\ingestion\api_utils.py", line 20, in <module>
    from llama_index.core.ingestion.data_sources import (
  File "c:\Users\sw\Downloads\testbot\.venv\Lib\site-packages\llama_index\core\ingestion\data_sources.py", line 436, in <module>
    ConfigurableDataSources = build_configurable_data_source_enum()
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\Users\sw\Downloads\testbot\.venv\Lib\site-packages\llama_index\core\ingestion\data_sources.py", line 350, in build_configurable_data_source_enum
    DataSource(
  File "c:\Users\sw\Downloads\testbot\.venv\Lib\site-packages\pydantic\v1\main.py", line 341, in __init__
    raise validation_error
pydantic.v1.error_wrappers.ValidationError: 1 validation error for DataSource
component_type
  subclass of BaseComponent expected (type=type_error.subclass; expected_class=BaseComponent)

@samuelw1w start with a fresh venv, seems your env is corrupted
In a new terminal
pip uninstall llama-index  # remove any global install
python -m venv venv
source venv/bin/activate
pip install llama-index ...

@samuelw1w I have the same problem since tuesday, so i think it's not the env that is corrupted, it's some lib that has been updated, but I can be wrong. I see you closed this issue, did you fix it? Any clue?

@YagoJanos I'm 99.9% sure its the end, especially since it works on a fresh google colab instance

@YagoJanos Yes, removing and recreating the env was able to fix the issue for me.

One really nuclear way to do this is
In a fresh terminal
pip freeze | grep llama-index | xargs pip uninstall -y
python -m venv venv
source venv/bin/activate
pip install llama-index

Following those steps exactly, I would be very surprised if any issue remained

Hey man, it doesn't work, I will open another issue, I think my problem is kind different from this.

Sorry, it's the same problem and destroying the env and creating another one doesn't seem to work.
I used
pip freeze | grep llama-index | xargs pip uninstall -y
python -m venv venv
source venv/bin/activate
pip install llama-index

And still Console Log:
[2024-04-11 19:42:02 +0000] [1] [INFO] Starting gunicorn 21.2.0
[2024-04-11 19:42:02 +0000] [1] [INFO] Listening at: http://<IP_ADDRESS>:8000 (1)
[2024-04-11 19:42:02 +0000] [1] [INFO] Using worker: sync
[2024-04-11 19:42:02 +0000] [7] [INFO] Booting worker with pid: 7
[2024-04-11 19:42:11 +0000] [7] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/app/.venv/lib/python3.11/site-packages/gunicorn/arbiter.py", line 609, in spawn_worker
    worker.init_process()
  File "/app/.venv/lib/python3.11/site-packages/gunicorn/workers/base.py", line 134, in init_process
    self.load_wsgi()
  File "/app/.venv/lib/python3.11/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
    self.wsgi = self.app.wsgi()
                ^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.11/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
                    ^^^^^^^^^^^
  File "/app/.venv/lib/python3.11/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
    return self.load_wsgiapp()
           ^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.11/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
    return util.import_app(self.app_uri)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.11/site-packages/gunicorn/util.py", line 371, in import_app
    mod = importlib.import_module(module)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/app/hub_ia/api/app.py", line 3, in <module>
    from hub_ia.rag import rag
  File "/app/hub_ia/rag/rag.py", line 1, in <module>
    from hub_ia.config.config import get_loader, get_pipeline, get_folder_id
  File "/app/hub_ia/config/config.py", line 2, in <module>
    from llama_index.llms.openai import OpenAI
  File "/app/.venv/lib/python3.11/site-packages/llama_index/llms/openai/__init__.py", line 1, in <module>
    from llama_index.llms.openai.base import AsyncOpenAI, OpenAI, SyncOpenAI, Tokenizer
  File "/app/.venv/lib/python3.11/site-packages/llama_index/llms/openai/base.py", line 17, in <module>
    from llama_index.core.llms.llm import ToolSelection
  File "/app/.venv/lib/python3.11/site-packages/llama_index/core/__init__.py", line 19, in <module>
    from llama_index.core.indices import (
  File "/app/.venv/lib/python3.11/site-packages/llama_index/core/indices/__init__.py", line 4, in <module>
    from llama_index.core.indices.composability.graph import ComposableGraph
  File "/app/.venv/lib/python3.11/site-packages/llama_index/core/indices/composability/__init__.py", line 4, in <module>
    from llama_index.core.indices.composability.graph import ComposableGraph
  File "/app/.venv/lib/python3.11/site-packages/llama_index/core/indices/composability/graph.py", line 7, in <module>
    from llama_index.core.indices.base import BaseIndex
  File "/app/.venv/lib/python3.11/site-packages/llama_index/core/indices/base.py", line 12, in <module>
    from llama_index.core.ingestion import run_transformations
  File "/app/.venv/lib/python3.11/site-packages/llama_index/core/ingestion/__init__.py", line 2, in <module>
    from llama_index.core.ingestion.pipeline import (
  File "/app/.venv/lib/python3.11/site-packages/llama_index/core/ingestion/pipeline.py", line 31, in <module>
    from llama_index.core.ingestion.api_utils import get_client
  File "/app/.venv/lib/python3.11/site-packages/llama_index/core/ingestion/api_utils.py", line 20, in <module>
    from llama_index.core.ingestion.data_sources import (
  File "/app/.venv/lib/python3.11/site-packages/llama_index/core/ingestion/data_sources.py", line 436, in <module>
    ConfigurableDataSources = build_configurable_data_source_enum()
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.11/site-packages/llama_index/core/ingestion/data_sources.py", line 350, in build_configurable_data_source_enum
    DataSource(
  File "/app/.venv/lib/python3.11/site-packages/pydantic/v1/main.py", line 341, in __init__
    raise validation_error
pydantic.v1.error_wrappers.ValidationError: 1 validation error for DataSource
component_type
  subclass of BaseComponent expected (type=type_error.subclass; expected_class=BaseComponent)
[2024-04-11 19:42:11 +0000] [7] [INFO] Worker exiting (pid: 7)
[2024-04-11 19:42:11 +0000] [1] [ERROR] Worker (pid:7) exited with code 3
[2024-04-11 19:42:11 +0000] [1] [ERROR] Shutting down: Master
[2024-04-11 19:42:11 +0000] [1] [ERROR] Reason: Worker failed to boot.

My pyproject.toml:
[tool.poetry]
name = "hub-ia"
version = "0.1.0-alpha"
description = ""
authors = ["hub"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.10"
flask = "^3.0.2"
llama-index = "^0.10.20"
python-dotenv = "^1.0.1"
llama-index-storage-docstore-redis = "^0.1.2"
llama-index-vector-stores-redis = "^0.1.2"
llama-index-readers-google = "^0.1.7"
docx2txt = "^0.8"
schedule = "^1.2.1"
llama-index-storage-chat-store-redis = "^0.1.2"
gunicorn = "^21.2.0"
flask-cors = "^4.0.0"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

@YagoJanos your google driver reader is too low for this version of llama-index-core it seems
try llama-index-readers-google = "^0.2" instead

@YagoJanos I had the same error and was able to resolve it by repeatedly changing the version of llama_index being installed.
Maybe my comment here will be helpful for you.

@nataliachodelski it didn't work to me, but thanks anyway.
@logan-markewich Changing llama-index-readers-google to ^0.2 solved the last issue, but now another problem happened:
[2024-04-12 10:19:34 -0300] [628170] [INFO] Starting gunicorn 21.2.0
[2024-04-12 10:19:34 -0300] [628170] [INFO] Listening at: http://<IP_ADDRESS>:8000 (628170)
[2024-04-12 10:19:34 -0300] [628170] [INFO] Using worker: sync
[2024-04-12 10:19:34 -0300] [628173] [INFO] Booting worker with pid: 628173
Execute ingestion...
[2024-04-12 10:19:36 -0300] [628173] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/home/yago-janos/.cache/pypoetry/virtualenvs/hub-ia-tauPM_lo-py3.11/lib/python3.11/site-packages/gunicorn/arbiter.py", line 609, in spawn_worker
    worker.init_process()
  File "/home/yago-janos/.cache/pypoetry/virtualenvs/hub-ia-tauPM_lo-py3.11/lib/python3.11/site-packages/gunicorn/workers/base.py", line 134, in init_process
    self.load_wsgi()
  File "/home/yago-janos/.cache/pypoetry/virtualenvs/hub-ia-tauPM_lo-py3.11/lib/python3.11/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
    self.wsgi = self.app.wsgi()
                ^^^^^^^^^^^^^^^
  File "/home/yago-janos/.cache/pypoetry/virtualenvs/hub-ia-tauPM_lo-py3.11/lib/python3.11/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
                    ^^^^^^^^^^^
  File "/home/yago-janos/.cache/pypoetry/virtualenvs/hub-ia-tauPM_lo-py3.11/lib/python3.11/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
    return self.load_wsgiapp()
           ^^^^^^^^^^^^^^^^^^^
  File "/home/yago-janos/.cache/pypoetry/virtualenvs/hub-ia-tauPM_lo-py3.11/lib/python3.11/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
    return util.import_app(self.app_uri)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yago-janos/.cache/pypoetry/virtualenvs/hub-ia-tauPM_lo-py3.11/lib/python3.11/site-packages/gunicorn/util.py", line 371, in import_app
    mod = importlib.import_module(module)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yago-janos/anaconda3/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/yago-janos/Desktop/AgoraVai/projeto-ia-hub/hub_ia/api/app.py", line 36, in <module>
    init_app()
  File "/home/yago-janos/Desktop/AgoraVai/projeto-ia-hub/hub_ia/api/app.py", line 19, in init_app
    execute_ingestion()
  File "/home/yago-janos/Desktop/AgoraVai/projeto-ia-hub/hub_ia/rag/rag.py", line 17, in execute_ingestion
    docs = loader.load_data(folder_id=folder_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yago-janos/.cache/pypoetry/virtualenvs/hub-ia-tauPM_lo-py3.11/lib/python3.11/site-packages/llama_index/readers/google/drive/base.py", line 511, in load_data
    self._creds = self._get_credentials()
                  ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yago-janos/.cache/pypoetry/virtualenvs/hub-ia-tauPM_lo-py3.11/lib/python3.11/site-packages/llama_index/readers/google/drive/base.py", line 170, in _get_credentials
    flow = InstalledAppFlow.from_client_config(self.client_config, SCOPES)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yago-janos/.cache/pypoetry/virtualenvs/hub-ia-tauPM_lo-py3.11/lib/python3.11/site-packages/google_auth_oauthlib/flow.py", line 159, in from_client_config
    raise ValueError("Client secrets must be for a web or installed app.")
ValueError: Client secrets must be for a web or installed app.

def setup_ingestion_pipeline():

        vector_store = RedisVectorStore(
            index_name="redis_vector_store",
            index_prefix="vector_store",
            redis_url="redis://localhost:6379",
        )

        cache = IngestionCache(
            cache=RedisCache.from_host_and_port("localhost", 6379),
            collection="redis_cache",
        )

        pipeline = IngestionPipeline(
            transformations=[
                SentenceSplitter(),
                Settings.embed_model,
            ],
            docstore=RedisDocumentStore.from_host_and_port(
                "localhost", 6379, namespace="document_store"
            ),
            vector_store=vector_store,
            cache=cache,
            docstore_strategy=DocstoreStrategy.UPSERTS,
        )

        index = VectorStoreIndex.from_vector_store(
            pipeline.vector_store, embed_model=Settings.embed_model
        )

        loader = GoogleDriveReader("./credentials.json")

I am using account service credentials.json in llama-index-readers-google ^0.1 and it was working. Should I open another issue?

Solved, it's not a bug, now we have to use 'service_aacount_key_path' on
loader = GoogleDriveReader(service_account_key_path="./credentials.json")

I have the same bug when you upgrade llama-index using poetry update.
Modifying llama-index-readers-google to ^0.2 fixes it


Specify custom transformation parameters/wkt string from CoordinateSystem A til CoordinateSystem B.

Does Apache Sedona use pyproj for coordinate transformations or does it use other tools?
I don't know if this is possible in Apache Sedona, but I did not see ST_Transform handle custom transformations between coordinate systems. I do not mean custom coordinate systems, i mean custom transformations.
When running function St_transform(geometry, EPSG:From, EPSG:To, Transformation EPSG) I should be able to control which transformation to use between the two datums using a parameter EPSG Code/WKT.
For example:
St_Transform(geometry, (From) 4258, (To)4326, (Using) 1612 )
Why is this important? There are many ways to transform between to geodetic datums and this can have a huge impact on the accuracy of the end coordinates. In this case, if I do not control how the coordinate system transformation happens the accuracy can be tens of meters because there are roughly 36 ways to go from EPSG:4258 to EPSG 4326. This is not exposed to the end user at all. Whilst controlling which transformation to use, in this case 1612, the accuracy will be around 1 meter.
Any way this can be exposed to the end user?

I'm not a Sedona developer, but can provide a few hints. Sedona currently uses GeoTools for coordinate transformations. There is a discussion about replacing GeoTools by Apache SIS at least for licensing reasons (there is also other advantages), but I do not know what would be the timeline.
The problem that you describe is very true, and is one of the spatial referencing complexities that not many developers are aware of. The PROJ and Apache SIS libraries can mitigate this problem by allowing users to specify an area of interest. Those libraries then select the coordinate transformation with a domain of validity having the largest intersection with the specified area. I do not remember if GeoTools has this capability too. But if Sedona used a library having this capability, then ideally Sedona should automatically provide the bounding box of the data (if this information is available cheaply) to the referencing library for allowing it to choose a better transformation. This approach would improve the results without additional effort from user's side.
Alternatively, for more advanced users, Apache SIS (and I think also PROJ) allows them to specify explicitly the EPSG code of the coordinate operation that they want to use. I guess that making such existing capabilities accessible to users may be suggestions for future Sedona evolution.
In the near future, with the evolution of standards such as ISO 19111:2019, providing the CRS will not be sufficient anymore for users who want a centimetric precision. It will also be necessary to specify the temporal epoch. So some evolution of Sedona API will be needed anyway.

Thank you for your input. I agree with what you say, although bounding box would solve some of the issues, we also have a historical/time dimension to it, where maybe currently we have a transformation which is better, but we would like to choose one which was used earlier in time, so we transform using the same definition.

Thank you for the insightful discussion. The Sedona community has realized the importance of a comprehensive CRS lib. We have started to migration to Apache SIS in 1.6.0 release. Hopefully this can be done in 1.6.1 or 1.7.0, which is 3 - 6 month.


Extracting wallet_id from the JWT without validating it is insecure

Currently the cloud api extracts the wallet id from the JWT to determine for which wallet it needs to return the webhook  events. This is insecure as I could forge an invalid JWT (not created by ACA-Py) with any wallet_id.
We should do a call to the ACA-Py API (any call, not sure which is best) to verify the request will succeed, which means the token can be trusted

Should also check for non-tenant calls, as otherwise you can get access to the  admin wallet webhooks by providing any of the non-tenant roles and a random api key

I've picked this up as part of the endorsement work @morrieinmaas

AH alright. Thanks for letting me know. Let me know if I can help and/or review the PR.


Serialize escaped Rust identifiers unescaped.

I believe this is the correct behaviour for this case.

Thanks for the change @teymour-aldridge. I wasn't aware fields names could be escaped with r#, it makes sense to use that for reserved keywords. The build is failing due to clippy errors, looking into it now.

@teymour-aldridge If you add this commit to your branch/PR, then that should address the clippy issue: https://github.com/DataEngineeringLabs/arrow2-convert/commit/5cb1aee0576b4df4db232e82d6cd8596b2363bbc.
Looks like there's one more failure due to the upgrade of rust to 1.63, I'll fix that directly in the main. Thanks again for the change!

Codecov Report

Merging #59 (ccfaacb) into main (88c91be) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #59      +/-   ##
==========================================
+ Coverage   95.35%   95.37%   +0.02%
==========================================
  Files           8        8
  Lines        1463     1471       +8
==========================================
+ Hits         1395     1403       +8
  Misses         68       68

Impacted Files
Coverage Δ

arrow2_convert_derive/src/derive_struct.rs
99.17% <100.00%> (+0.01%)
:arrow_up:

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


Add loss_func parameter to NeuralNet

In NeuralNet class, if task is regression the loss is set as MSELoss(), otherwise as CrossEntropyLoss().

The user should be able to set whatever loss function. Thus, loss_func parameter should be added as input to NeuralNet. We could list the main losses for the two tasks and allow the user to either:

select one loss among them (considering also task parameter)
implement his/her own loss function.

The defaults can be  MSELoss() for regression and CrossEntropyLoss() for classification.

Blocked by #172


Modify the url from the request's query params to backend path params

Hello, I would like to modify the url from the request's query params to backend path params.
For example:
from
/settings?id=test
to
/settings/{id}
May I know how I should write the config?
"extra_config": {
    "github.com/devopsfaith/krakend-martian":
       {
          "url.Modifier": {
             "scope": ["request"],
             "path": [WHAT SHOUlD I WRITE HERE?]
          }
       }
 }

this is not possible with the official martian modifiers. you'll need to register a custom one or use a request modifier plugin (https://www.krakend.io/docs/extending/plugin-modifiers/)


feat(select modal): emphasize a product if it matches page tag

Description [STORY LINK]

A problem that we have with the tagged paywall feature is the user will have no idea which product to subscribe to if they are paywalled on an article, which product will unlock this article?
This PR adds an approach to emphasize the products/plans which will unlock the article:
"Subscribe to one of the following options to get access to this page"
Product A
Product B
—————————————————
"Or take a look at some of our other options below:"
Product C
In case there is no matching product, we render the normal product list.
Types of changes

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

Checklist

[x] Tested changes locally.
[ ] Updated documentation.

Screenshots

Waiting on FR wording


Gh 893

Codecov Report

Merging #894 into develop will increase coverage by 0.78%.
The diff coverage is 62.5%.

@@              Coverage Diff              @@
##             develop     #894      +/-   ##
=============================================
+ Coverage      62.14%   62.93%   +0.78%
- Complexity       859      873      +14
=============================================
  Files            445      448       +3
  Lines          12888    13569     +681
  Branches        1475     1612     +137
=============================================
+ Hits            8009     8539     +530
- Misses          4300     4424     +124
- Partials         579      606      +27

Impacted Files
Coverage Δ
Complexity Δ

...java/uk/gov/gchq/gaffer/store/StoreProperties.java
25.51% <100%> (+0.76%)
0 <0> (ø)
:arrow_down:

.../src/main/java/uk/gov/gchq/gaffer/store/Store.java
79.59% <60%> (-0.73%)
0 <0> (ø)

.../uk/gov/gchq/gaffer/commonutil/stream/Streams.java
55.55% <0%> (-27.78%)
8% <0%> (ø)

...gov/gchq/gaffer/rest/service/OperationService.java
54.41% <0%> (-14.11%)
0% <0%> (ø)

...store/operation/handler/GetAdjacentIdsHandler.java
85.18% <0%> (-6.82%)
0% <0%> (ø)

...hq/gaffer/mapstore/impl/GetAdjacentIdsHandler.java
88.7% <0%> (-1.13%)
0% <0%> (ø)

...lostore/operation/impl/GetElementsBetweenSets.java
89.47% <0%> (-0.53%)
0% <0%> (ø)

.../gchq/gaffer/graph/hook/OperationChainLimiter.java
68.26% <0%> (-0.49%)
0% <0%> (ø)

...n/java/uk/gov/gchq/gaffer/operation/Operation.java
100% <0%> (ø)
0% <0%> (-1%)
:arrow_down:

...ava/uk/gov/gchq/gaffer/data/IsEntityValidator.java
100% <0%> (ø)
0% <0%> (ø)
:arrow_down:

... and 24 more

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 3e8e4a9...01d329b. Read the comment docs.


Error: "No EdmType found for type..."

Not sure if this is a bug or user error, but I have been unable to find any other examples than the one shown on this GitHub site. If it's not a bug, could someone expand the existing documentation to cover a scenario like this and its resolution?
In my SQL Server database, I have a Table Valued Function that I need to query in my MVC app (.NET Framework 4.6.1).
Using the code sample, I wrote this in my DbContext.
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
    modelBuilder.Conventions.Add(new FunctionsConvention<MiaFy19Context>("dbo"));
}

public ObjectResult<Mia1PartASummaryBar> GetMia1PartASummaryBars()
{
    return ((IObjectContextAdapter)this).ObjectContext.
        ExecuteFunction<Mia1PartASummaryBar>("Mia1A_SummaryBar");

}

However, I received this error viewing in the browser. (Line 61 was highlighted in red.)
Exception Details: System.InvalidOperationException:
       No EdmType found for type 'MiaFy19.Core.Models.Mia1PartASummaryBar'.

Line 59:         {
Line 60:
Line 61:             return ((IObjectContextAdapter)this).ObjectContext.
Line 62:                 ExecuteFunction<Mia1PartASummaryBar>("Mia1A_SummaryBar");
Line 63:

In my SQL Server database, this is what the function signature looks like.
ALTER FUNCTION [dbo].[Mia1A_SummaryBar] ()
RETURNS TABLE
AS
RETURN (
// code...

Any help is appreciated. Thank you.

The error indicates that the Mia1PartASummaryBar is not part of your model. Can you show your model/context?

Here is my model.
namespace MiaFy19.Core.Models
{
    public class Mia1PartASummaryBar
    {
        public int Id { get; set; }

        [StringLength(4)]
        public string Campus { get; set; }

        [StringLength(3)]
        public string MetGoal { get; set; }
        public int Points { get; set; }

        public double ShrCreditRate { get; set; }

        public double NonShrCreditRate { get; set; }
    }
}

And here is my context.
namespace MiaFy19.Persistence
{
    public class MiaFy19Context : DbContext, IMiaFy19Context
    {
        public MiaFy19Context()
            : base("name=MiaFy19Context")
        {
        }

        #region OtherDbSets
        /* .. lots of dbsets ...*/
        #endregion

        public virtual DbSet<Mia1PartASummaryBar> Mia1PartASummaryBars { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Conventions.Add(new FunctionsConvention<MiaFy19Context>("dbo"));
        }

        [DbFunction("MiaFy19Context", "GetMia1PartASummaryBars")]
        public IQueryable<Mia1PartASummaryBar> GetMia1PartASummaryBars()
        {
            return ((IObjectContextAdapter) this).ObjectContext
                .CreateQuery<Mia1PartASummaryBar>("[Mia1A_SummaryBar]()");
        }
    }
}

Since I posted my question, I've added a dbset (shown below) and tried the .CreateQuery example. Still not working.
This time, I get

'Mia1A_SummaryBar' cannot be resolved into a valid type or function. Near escaped identifier, line 1, column 1.

Line 24:         public IEnumerable<Mia1PartASummaryBar> GetMia1ASummaryBar(string campus)
Line 25:         {
Line 26:             return _context.GetMia1PartASummaryBars().Where(m => m.Campus == campus).ToList();
Line 27:         }
Line 28:     }

I seem to be making progress in the fact I'm getting a different error now, but still no resolution.

The problem is that my function has no parameters. Maybe I'm misunderstanding, but I thought that extra code was for inserting a parameter into the function call.
ALTER FUNCTION [dbo].[Mia1A_SummaryBar] ()
RETURNS TABLE
AS
RETURN (

So I tried this.
[DbFunction("MiaFy19Context", "GetMia1PartASummaryBars")]
        public IQueryable<Mia1PartASummaryBar> GetMia1PartASummaryBars()
        {
            return ((IObjectContextAdapter) this).ObjectContext
                .CreateQuery<Mia1PartASummaryBar>(string.Format("[{0}].{1}".GetType().Name, "[Mia1A_SummaryBar]()"));
        }

Slightly different error this time.
'String' could not be resolved in the current scope or context. Make sure that
all referenced variables are in scope, that required schemas are loaded, and that
namespaces are referenced correctly. Near simple identifier, line 1, column 1.
Description: An unhandled exception occurred during the execution of the current
web request. Please review the stack trace for more information about the error
and where it originated in the code.

Exception Details: System.Data.Entity.Core.EntitySqlException: 'String' could
not be resolved in the current scope or context. Make sure that all referenced
variables are in scope, that required schemas are loaded, and that namespaces are
referenced correctly. Near simple identifier, line 1, column 1.

Source Error:

Line 24:         public IEnumerable<Mia1PartASummaryBar> GetMia1ASummaryBar(string campus)
Line 25:         {
Line 26:             return _context.GetMia1PartASummaryBars().Where(m => m.Campus == campus).ToList();
Line 27:         }
Line 28:     }

I think there is a typo in your code. Inside string.Format you put
.GetType... (notice the dot) instead of, GetType... The result is that you
are passing 'String' as the name of the function instead of the expected
fully qualified name of the function. Once you change '.' to ',' string.
Format should pick the context type name as the parameter and create a
fully qualified man that you need (you could actually use string
interpolation to make it more readable).
It is OK to not have parameters. This part looks good to me.
On Fri, Jun 22, 2018, 8:55 AM RubixRevenge<EMAIL_ADDRESS>wrote:

So I tried this.
[DbFunction("MiaFy19Context", "GetMia1PartASummaryBars")]
public IQueryable GetMia1PartASummaryBars()
{
return ((IObjectContextAdapter) this).ObjectContext
.CreateQuery(string.Format("[{0}].{1}".GetType().Name, "Mia1A_SummaryBar"));
}
Slightly different error this time.
'String' could not be resolved in the current scope or context. Make sure that
all referenced variables are in scope, that required schemas are loaded, and that
namespaces are referenced correctly. Near simple identifier, line 1, column 1.
Description: An unhandled exception occurred during the execution of the current
web request. Please review the stack trace for more information about the error
and where it originated in the code.
Exception Details: System.Data.Entity.Core.EntitySqlException: 'String' could
not be resolved in the current scope or context. Make sure that all referenced
variables are in scope, that required schemas are loaded, and that namespaces are
referenced correctly. Near simple identifier, line 1, column 1.
Source Error:
Line 24:         public IEnumerable GetMia1ASummaryBar(string campus)
Line 25:         {
Line 26:             return _context.GetMia1PartASummaryBars().Where(m => m.Campus == campus).ToList();
Line 27:         }
Line 28:     }
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/moozzyk/CodeFirstFunctions/issues/23#issuecomment-399490323,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABX0pAsW8lxcVqwwX8FUNA_JK3ihBeYrks5t_RNogaJpZM4Uy4fL
.

Even changing the dot to a comma, I'm still getting the error.
MiaFy19Context.Mia1A_SummaryBar' cannot be resolved into a valid type or function. Near member access expression, line 1, column 17.

[DbFunction("MiaFy19Context", "GetMia1PartASummaryBars")]
        public IQueryable<Mia1PartASummaryBar> GetMia1PartASummaryBars()
        {
            return ((IObjectContextAdapter) this).ObjectContext
                .CreateQuery<Mia1PartASummaryBar>(string.Format("[{0}].{1}", GetType().Name, "[Mia1A_SummaryBar]()"));
        }

Got it worked out. :)
Although an Id field is meaningless on the data-side, it turns out that EF needs it, so I made the following transformations. It think it's not just one step, but the steps in combination that did the trick.

Added an Id column in my SQL TVF and gave it unique value.
In my entity class, I added the [Key] attribute -- just in case it helped.
I changed the argument of CreateQuery().

[DbFunction("MiaFy19Context", "Mia1A_SummaryBar")]
public virtual IQueryable<Mia1ASummaryBar> Mia1A_SummaryBar()
{
	return ((IObjectContextAdapter)this).ObjectContext
		.CreateQuery<Mia1ASummaryBar>("MiaFy19Context.[Mia1A_SummaryBar]()");
}

I'm going to mark this issue as closed as my issue is resolved. For the sake of any other first-time users, it might be helpful to add some "pitfalls, gotchas, assumptions, and resolutions" items to the documentation.

I am glad you were able to make it work. The rows returned from the TVF have to match the result type  - the Mia1PartASummaryBar entity has the Id property so the result returned from TVF should also have it. Store functions in EF (be it stored procs or TVFs) need to return types that EF knows about (i.e. are part of the model). This can be achieved either by creating a DbSet or just by adding the type in OnModelCreating. The sample from README shows how to bind a TVFs (in retrospect - the sample should use string interpolation but I think at the time I wrote the code string interpolation was not supported). The README also contains links to post I wrote:

https://blog.3d-logic.com/2014/08/11/the-beta-version-of-store-functions-for-entityframework-6-1-1-code-first-available/
https://blog.3d-logic.com/2014/10/18/the-final-version-of-the-store-functions-for-entityframework-6-1-1-code-first-convention-released/


Some documentation

I'm trying to learn how to use jaxns. Is there any documentation about it ?
Thanks a lot !!
Roberto

Hi @rruizdeaustri nice to hear it!
Firstly, if you're up for it go to discussions and make a post introducing yourself and what kinds of problems you'd to like solve with Bayesian computation using JAXNS. I'm trying to get people to post their problems there so that we set up a nice discussion forum for community building.
Secondly, there are a growing number of examples that I post in the examples section.
Finally, down the line I'll be rolling out a read the docs.


[EN] Feedback for: /web/updates/2016/06/devtools-digest?hl=en

4K is not actually 2560px. 4K is 3840x2160.
Actual result:
The desktop story has improved, too. Thanks to Device Mode’s zoom feature, you can emulate desktop screens larger than the screen that you’re actually working on, such as a 4K (2560px) screen.
Expected result:
The desktop story has improved, too. Thanks to Device Mode’s zoom feature, you can emulate desktop screens larger than the screen that you’re actually working on, such as a 4K (3840px x 2160px) screen.

Thanks @jchorl. I've fixed it in one of my branches.