Updates for the mathable proposal.

A number of functions (atan2, erf, erfc, gamma, logGamma) have been moved
from ElementaryFunctions onto Real. The rationale for this is threefold: atan2 never
made much sense for non-real arguments. Implementations of erf, erfc, gamma and
logGamma are not available on all platforms. Finally, those four functions are not actually
"elementary", so the naming is more accurate following this change.

hypot has been added to Real. We would like to have a more general solution for
efficiently rescaling computations in the future, but hypot is a tool that people can use
today.

This seems reasonable to me, but I want to float it quickly by the rest of the Core Team.

This seems reasonable to me, but I want to float it quickly by the rest of the Core Team.

Thanks. Once (if) merged I'll post a note to the thread and push the update to the implementation.


Add remaining quick e2e tests for cloudstack, nutanix and snow

Issue #, if available:
Description of changes:
This PR creates the remaining e2e tests for Cloudstack, Nutanix and Snow that we want to include in the quick e2e suite.
Testing (if applicable):

Manually invoking code build to run tests

Documentation added/planned (if applicable):
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/test eks-anywhere-e2e-presubmit

/cherrypick release-0.19


On admin page , Users & Doctors page doesn't works

When ever you click on users or doctors link on navbar it Redirect to '/' route. I have checked code But Still unable to find where is the problem !


[ci] upgrade to R 4.1.2 in CI, change approach to macOS-latest R CI builds (fixes #4988)

Fixes #4988.
See #4988 for a description of recent CI issues with R macOS builds.
I believe it could be related to GitHub Actions upgrading its macOS-latest environment to macOS 11.x 2 days ago. See https://github.com/actions/virtual-environments/pull/4048.
Searched around GitHub a bit and found a discussion in r-lib/actions that seems relevant. https://github.com/r-lib/actions/issues/412 describes an issue where older R installers can't create the necessary symlinks to R and Rscript on macOS 11.x.
The changes in this PR are based on the changes that that project used to fix that issue: https://github.com/r-lib/actions/commit/a1c2c67891672688569dddc7c8fc31c8230fe1a8

It looks like these symlink changes fixed the issue for R 3.6.x, but not R 4.1.x: https://github.com/microsoft/LightGBM/runs/4994766651?check_suite_focus=true
I noticed at https://cran.r-project.org/bin/macosx/base/ that R 4.1.2 was published in November 2021. This project's CI currently uses R 4.1.1, published in August 2021.
I pushed https://github.com/microsoft/LightGBM/pull/4989/commits/8117a0594f81b0e0a13e3fca6a6581afc7465259 updated the R version to 4.1.2, hoping that that version's installer would work with macOS 11.x. Probably a good idea to do this anyway, per #3763.

Ok I think this is ready for review! Sorry that the research is split between comments here and on #4988, I should have tried to keep them all in one place.
Summary of changes:

pin R 4.x builds to macOS-10.15 environment (the environment they were running on until 3 days ago)

reference: https://github.com/microsoft/LightGBM/issues/4988#issuecomment-1025069374

for R 3.x builds, continue using macOS-latest environment but manually set symlinks to R and Rscript necessary to make that work

references: https://github.com/r-lib/actions/issues/412 + https://github.com/r-lib/actions/commit/a1c2c67891672688569dddc7c8fc31c8230fe1a8

Thanks for looking into this!
Why can't we use the latest versions of macOS and R together? I believe this is the most popular scenario among users.
Maybe we can use Homebrew installation for R?

Why can't we use the latest versions of macOS and R together?

I don't know, but I can see in https://github.com/microsoft/LightGBM/issues/4988#issuecomment-1025069374 that GitHub itself was also not able to build the latest version of R on the macOS-latest environment.
When I tried that with R 4.1.2 from CRAN, I saw the following error (build link)
installer: Error - the package path specified was invalid: '/Users/runner/work/LightGBM/LightGBM/R.pkg'.

Maybe we can use Homebrew installation for R?

Maybe. I've never used R from homebrew before (in this project, other projects, or personally) so I can't say how that differs from the .pkg packages provided by CRAN or what other issues we might face with it.
If you want to try that you're welcome to push commits to this branch. But I don't have much time to devote to LightGBM this week so I can't commit to trying that. I think this PR in its current state is sufficient to unblock CI in this project without losing any coverage of OS-compiler-R_version combinations, as until a few days ago we were also not testing the R package with R 4.1.2 + macOS 11.x.

Also linking related feature request: https://github.com/actions/virtual-environments/issues/4960.

When I tried that with R 4.1.2 from CRAN, I saw the following error (build link)

Could you please document this in a new our internal feature request?

could you please document this in a new feature request?

Added #4990 and added it to #2302


Last time I checked the Dock binary, I looked if it was listening for some notifications, but I found nothing. I'd love to be proven wrong though :)
If we want interact with spaces and keep the Dock happy it would probably be easier through the scripting addition, it shouldn't be too hard to find the method used for example to create a new space and just call it from there. More complex operation would probably be harder.
The only issue is that, since Sierra I think, they started to rewrite the Dock app in Swift, so with the new macOS release (probably 5 days from now for the first beta :O) they may break any development we make on this from.

Going to close this as I randomly lost interest in the topic.


Failed rendering report

Hello, I've been unable to get the main report to render on the CQLS. I'm using the up to date dev branch. It errors when trying to create the enviroment, at first I got the error:
processing file: index.qmd
1/77
2/77 [knitr_settings]
3/77
4/77 [load_libraries]
Error:
! package or namespace load failed for 'adegenet' in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
 there is no package called 'igraph'
Backtrace:
  1. global .main()
  2. execute(...)
  3. rmarkdown::render(...)
  4. knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
  5. knitr:::process_file(text, output)
     ...
 16. base::withRestarts(...)
 17. base (local) withRestartList(expr, restarts)
 18. base (local) withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
 19. base (local) docall(restart$handler, restartArgs)
 21. evaluate (local) fun(base::quote(`<smplErrr>`))

Quitting from lines 26-60 [load_libraries] (index.qmd)
Execution halted

I then changed the adegenet package to be installed with bioconda and not conda-forge, and did mamba clean -all. But I get this error:
Oct-23 13:46:26.720 [Actor Thread 48888] DEBUG nextflow.processor.TaskProcessor - Handling unexpected condition for
  task: name=PATHOGENSURVEILLANCE:MAIN_REPORT (2); work-dir=null
  error [java.lang.IllegalStateException]: java.lang.IllegalStateException: Failed to create Conda environment
  command: mamba create --mkdir --yes --quiet --prefix /nfs7/BPP/Chang_Lab/paradarc/paper1_bra/scripts/ps_pipeline_riley/pathogensurveillance/work/conda/env-5c2610f1853ead61f6c6e3e1f537b62c conda-forge::r-devtools conda-forge::r-leaflet conda-forge::r-biocmanager conda-forge::quar>
  status : 143
  message:

I'm able to render in my local computer on R just fine just not on CQLS.

I checked that the docker container is working recently, but I have not checked the conda environment recently. However, it does say that igraph should be installed. Perhaps that conda environment did not get built correctly? That happens sometimes. Can you delete that environment and try again? You can find the path to the environment in the .command.sh file and it should be in the work directory.

I tried that and it gave the same Failed to create Conda environment error as before, unfortunately.


Proxy and repository location

Hi Anthony,
sorry, me again :-)
when I ran
g:\lisp>ocicl install alexandria
Error: system alexandria not found.
http_proxy  and https_proxy were set to the proxy server but without user. I don't quite remember, but I think that was necessary for some other system.
A message "login required" or something in that vain would be very helpful here.
With user/pwd added it worked fine, I would recommend adding the format somewhere in the readme, as this is a bit fiddly for a non experienced user.
How can I set the repository to be stored in some other directory than in the user profile?
Thanx!
Marc

I mean for the global...

Right now it can only go in the user profile, but I could add an option to configure that at setup time.
As for the proxy settings, I can document something.  Did you just have to set https_proxy?  Or also http_proxy?
Thanks!

setup time would be perfect, I think.
I had set both previously, so I adapted both of them.
But I removed http_proxy and it still works, so http_proxy should suffice.

Are you missing an "s" somewhere here? "But I removed http_proxy and it still works, so http_proxy should suffice."
I've added a GLOBALDIR optional argument to setup.  Please try it out.
Thanks!

Absolutely :-)
The correct sentence sould read:
But I removed http_proxy and it still works, so https_proxy should suffice.
Sorry for the Inconvenience!


Introduce GroupVersionKind metadata to operator.yaml and params.yaml

Can't believe I'm saying we should end up doing more codegen at some point, but we should add this so that we can stabilize the core controller components, give ourselves the ability to deprecate operator.yaml/params.yaml files, and start being able to do internal versioning so that we can perform experiments behind feature gates without disrupting individual users.
I'd also suggest we do this with our repos and index.yaml, @kensipe wdyt?

@gerred  hi i would like to work on this issue

Already done


Relative links to non-page files do not include path prefix

When using the relative files feature (setting the blackfriday sourceRelativeLinksEval option to true), the generated links do not have the path prefix from baseURL included. This means the links break if the site root is not the webserver root.
As an example, say that there are three files in content:
content/pages/page2.md
content/files/image1.png

and page1.md contains the text
[link to page 2](page2.md)
![](/files/image1.png)

and the config has baseurl = "http://mysite.com/myroot/".
Then the link to page2.md will be "/myroot/pages/page2/", while the image src will be "/files/image1.png" instead of the correct "/myroot/files/image1.png".
I figure the SourceRelativeLinkFile function needs to learn about prefixes, but I don't know enough about the Hugo data structures to teach it...
This is with Hugo 0.16.

@SvenDowideit

Hi I created PR to fix this issue. Please take a look!

Tested the pull request and it does indeed seem to fix the issue :)

mmm, this is intentional to our use case.
sourceRelativeLinksEval  is intended to allow you to move the files into different file locations without them breaking.
ie - it should not prepend the path from baseUrl.

Then I'm very confused. If my blog is at http://example.com/myblog/, and my image asset is in the directory /path/to/blog/static/assets/foo.jpg, what is the correct {{
}} to use?
Using src=/assets/foo.jpg doesn't work, nor does src=assets/foo.jpg.

@SvenDowideit  This is not about using relative or absolute URLs in the markdown - this is about the links being generated in the HTML.
In the example above, it makes no difference whether I change ![](/files/image1.png) to ![](../files/image1.png) - it is still going to result in a link being generated to /files/image1.png instead of the correct /myroot/files/image1.png. Whether the generated link is relative or absolute (according to the realtiveURLs setting), it is still going to be wrong. And the behaviour is different for HTML pages generated from markdown and for non-HTML assets.
So I would request that this issue be reopened and/or @ks888 's pull request above (which fixes the problem) be merged.

@SvenDowideit I think I can reproduce this somewhat buggy behaviour (when sourceRelativeLinksEval = true) with something like this:
hugo server -t hyde  --baseURL=http://localhost:1313/why/what/

When, say, my content/post/hello.md contains this:
Read more about the [Canadian multilingual keyboard](canadian-multilingual-keyboard.md)

The resulting generated HTML becomes:

Read more about the Canadian multilingual keybard

Since that page is on http://localhost:1313/why/what/post/hello/, the web browser would interpret that relative URL as:

http://localhost:1313/why/what/why/what/post/canadian-multilingual-keyboard/

which of course does not exist (404).
Wait, I think this a related but slightly different problem.  I see this behaviour when relativeURLs = true.  Once I comment that out, the link works.
But, indeed, as @tohojo reports, when it comes to images, it simply does not work.  I tried it with ![](image.png), and that became
 in Hugo v0.16.
Please take a second look.  Thanks!

In the way we (the docker documentation) use hugo - the baseUrl should never be used at any time when relativeUrls=true - as its supposed to be irrelevant - you're supposed to be able to move the files to a different location on the web server, and they continue to work.
sourceRelativeLinksEval=true should then only change the way that hugo treats links, by looking for files relative to the source markdown file's location (to match how Github's rendering works.
Your example worries me - as it seems to add the baseUrl in - which is definitely wrong.
on the other hand, the way i understand the original report - /files/image.png should (under the way we use hugo) break out of the relativeUrl - its kinda undefined, but whatever happens, the baseUrl would not be used.

I'm not really trying to say that what we're doing is exactly how it should be - there are not enough tests, nor enough docs to consider the functionality complete - its just what we're relying on to bring our rather complicated docs together at the moment.

Think of the process as being in two steps:
Step 1: Resolve the actual paths of the assets in the generated file tree. I.e. resolve content/posts/testpost.md to posts/testpost.html and content/files/testimage.png to files/testimage.png. This step is what is influenced by sourceRelativeLinksEval=true.
Step 2: Produce the actual links in the HTML pages. This is affected by relativeURLs=true, in that the relative links between two files are produced by computing relative paths between the paths generated in step 1.
Now, when in theory it shouldn't matter whether the baseURL is included in the paths generated in step 1, or if it is added afterwards. In the current code base it just happens to be included. For relative URLs, the relative positions of two files will stay the same regardless of prefix.
The issue here is that the behaviour of step 1 is inconsistent between HTML pages generated from markdown, and other file assets included in the source tree. So the HTML page paths do include the baseURL prefix, while the asset paths do not. This means that when the relative paths are computed in step 2, they are going to be wrong, and will break out of the baseurl prefix (or, if not using relative paths, the prefix will just be missing).
The patch by @ks888 fixes step 1 to be consistent between HTML pages and non-HTML assets which subsequently makes both relative and absolute URLs in links be correct.

no, I'm sorry, that makes no sense to me.
at step 1, the webserver's baseUrl has no relevance what so ever - that baseUrl path isn't on the source filesystem at all.
at step 2, if relativeURLs=true the by definition, all URL's that can be considered internal to the html being generated, would also not contain baseUrl, because they're made to be relative to the page being rendered into HTML.
@ks888 's PR @2238 (again, if i read it right) brings the html output baseUrl path into the source file resolution stage - which is very much not the intent of that setting.
content/pages/page.md
content/pages/page2.md
content/files/image1.png

and page1.md contains
[link to page 2](page2.md)
![](/files/image1.png)

might link, if your output HTML is at the root of your web server, but to be truely sourceRelativeLinksEval=true needs to be:
[link to page 2](page2.md)
![](../files/image1.png)

so that hugo can find the file you're talking about and output
<link to page 2
<image src="../files/image1.png" />

As I said earlier, using absolute paths in your markdown with sourceRelativeLinksEval=true means you're indicating that you don't want the file finding to work - and thus when combined with relativeUrl=true, gives you a way to reference url's that are outside hugo's setup, or are going to stay when you move the previously rendered HTML around.
to sum up with an example -
our creation and use of sourceRelativeLinksEval=true is to replicate GitHub's rendering of in repository markdown files - where the baseUrl changes whenever there is a fork, branch or tag, and thus markdown links that are /absolute are almost always outside the current repo
our desired use of relativeUrl=true is to generate the latest docs to /, and then when we release a new version, to move those html files to /v1.3/, and have everything still work.

all that said - @anthonyfok's comment above looks to me to be a bug in that code - for the reasons i mentioned above, I don't use a BaseUrl

mm, and then reading

In the example above, it makes no difference whether I change  to  - it is still going to result in a link being generated to /files/image1.png instead of the correct /myroot/files/image1.png. Whether the generated link is relative or absolute (according to the realtiveURLs setting), it is still going to be wrong. And the behaviour is different for HTML pages generated from markdown and for non-HTML assets.

I think this highlights our missunderstanding well - thank you.
there is a difference between ![](/files/image1.png) and  ![](../files/image1.png) when using sourceRelativeLinksEval=true. specifically, the absolute path tells the sourceResolution code that this file can't be found relative to the currently rendered page - and so in my usage (with relativeUrl=true, is not checkable by hugo at all. At that point in the code, we're making a list of source file locations - so mixing in the baseUrl that will be used in the next stage of the process isn't the right thing to do.
if the image file isn't found using [](../files/image1.png) then I think that's a bug (I wonder if its found using [](../../files/image1.png))

well. sorry about that - I'll make a PR that adds some more tests to cover some of the baseUrl cases  - the original report is still a corner-case that we use intentionally, but could be defined to work in 2 ways
either:

by prefixing all absolute path links with the baseUrl path in relativeUrl=false, and leaving them alone in relativeUrl=true (at the rendering phase, not the sourceRelativeLinnksEval=true` phase
leaving all absolute path links as they are in the source, allowing users to break out of the hugo managed URL scheme (the way I use it today)

IMO, baseUrl should never appear in the links when relativeUrls=true, but maybe that's where I am wrong?

@anthonyfok what we really need, is a way to turn the kind of example you've made into a programatic test - there are way too many options, and i just don't know what they're supposed to do in combinations I don't use.

@tohojo OH.

Now, when in theory it shouldn't matter whether the baseURL is included in the paths generated in step 1, or if it is added afterwards. In the current code base it just happens to be included. For relative URLs, the relative positions of two files will stay the same regardless of prefix.

and that may be why I am confused.
I'm still failing to see a good way to write tests for what are now at least 4 combinations of options - writing the tests in code isn't going to make it sufficiently obvious what the results should be.

So I think #2277 fixes this properly for most combinations of canonifyURLs, relativeURLs and sourceRelativeLinksEval and baseurl
but because the baseUrl part is added (er, i think) in a transform at the end, I have no idea how to write a test for it)

Right, so created a minimal hugo site to exercise some of these options (probably should have done that from the beginning).
The repo is here: https://github.com/tohojo/hugo-links-test
And a rendered version of the test page (without the link targets) is here: https://kau.toke.dk/hugo-links-test.html
The latter includes tables for combinations of relativeLinks and baseURL prefix that works and don't pre and post patch. It seems your patch makes things be consistent between how markdown pages and non-markdown assets are handled, which is good. It means that there is now at least one case (relativeURLs=true) that works with a prefix set. However, having things work with a prefix and relativeURLs=false might be good too? :)

excellent - thank you - we need to make that kind of test an automated part of the hugo test suite
annoying that its not working with relativeURLs=false - it worked for the tests i ran locally - but I got pretty fuzzy after poking different bits of the hugo code base for the last 6 hours.
(aka, yes, I'll look further later)

@SvenDowideit, many thanks for looking into this in depth, and sincere thanks for your solution at #2277.
@spf13, thank you for assigning me some days ago, but I was merely reporting a related bug and not ready to actually solve it.  Furthermore, I see the bug is in really good hands now, so I took the liberty of removing my assignment from this issue.

This issue has been automatically marked as stale because it has not been commented on for at least four months.
The resources of the Hugo team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still valuable, please open a proposal at https://discuss.gohugo.io/.
This issue will automatically be closed in four months if no further activity occurs. Thank you for all your contributions.

The above reproduction still applies.

Closing:

This issue was created in relation to a Blackfriday setting. We removed BlackFriday some time ago.
Current behavior of the relativeURLs setting is documented here.
Use link and image render hooks to resolve destinations.


Fixes issue caused by new Author taxonomy

Fixes issue caused by new Author taxonomy
Changes

Updates ' _lib/wordpress_post_processor.py' file to use new taxonomy.
Updates ' _tests/browser_testing/fixtures/newsroom.json' file to use new taxonomy.
Updates ' events/_vars-events.html' file to use new taxonomy.

Review

@jimmynotjim
@anselmbradford
@dpford
@Scotchester

LGTM :+1:
For reference, needed by [GHE]/flapjack/wp-flapjack/pull/40


fix: Mobile burger movement and consistency

Thank you for your contribution to the KodaDot - One Stop Shop for Polkadot NFTs.
👇 __ Let's make a quick check before the contribution.
PR Type

[x] Bugfix

Context

[x] Closes #7778

Before submitting pull request, please make sure:

[x] My contribution builds clean without any errors or warnings
[x] I've merged recent default branch -- main and I've no conflicts
[x] I've tried to respect high code quality standards
[x] I've didn't break any original functionality

Did your issue had any of the "$" label on it?
No
Screenshot 📸
https://github.com/ytoshiki/nft-gallery/assets/60994269/33e702e6-770c-457e-a7d0-f37db528bc90

[x] My fix has changed mobile burger movement on UI

Copilot Summary

🤖 Generated by Copilot at 0406dce
Reduced the height of the navbar and the shopping cart modal on mobile devices to improve the UI consistency and alignment with the mobile app bar component. Modified the values of the $navbar-mobile-min-height variable in _variables.scss and the padding-top property in ShoppingCartModal.vue.

🤖 Generated by Copilot at 0406dce

Navbar height shrinks
To match mobile app bar
Winter of less space

make the top part of the "desktop sidebars" the same height as the top parts on explore etc. - on mobile

the height is not same
there is also weird gap between the navbar and the top section, could you have a look please

@exezbcz
Thank you for your review. I'll work on it.

@exezbcz
I cannot see "Notifications" header on my local setup. But I believe the height is the same, and the weird gap between the navbar and the top section is gone now.

@roiLeo
I thought px is better in terms of consistency, and px is used throughout the app. But ok, I'll fix it.

I stoped setting height with height: 57px. Could you check it works alright?

📬 Sir, you have one message here @exezbcz

I cannot see "Notifications" header on my local setup

are you connected?

works for me! sorry for the delay sir

thanks for your contribution @ytoshiki !
please  pickup issue with $ sign to get bounty https://github.com/kodadot/nft-gallery/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%24


css changes on very wide screens for homepage cards

Fixes following issues|Adds following features:

position the CTA correctly in the card per the Figma designs
cards should maintain a max-width of 399px and center correctly on screens over 1700px
set card border-radius to 16px

Resolves: MWPW-161329
Pages to check for regression and performance:

https://cards-css-fixes--express--adobecom.hlx.page/express/?martech=off

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

Project coverage is 42.68%. Comparing base (994e05b) to head (ca7cda4).
Report is 32 commits behind head on stage.

Additional details and impacted files
@@            Coverage Diff             @@
##            stage    #1248      +/-   ##
==========================================
+ Coverage   41.97%   42.68%   +0.70%
==========================================
  Files          96       98       +2
  Lines       22665    23197     +532
==========================================
+ Hits         9514     9901     +387
- Misses      13151    13296     +145

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


Replace broken sys.error call with console.error

This would not work when reached for an invalid json file

Clearing out my 'Created' pull requests


Compatibility of go1.18

go1.18 version log.Printf needs parameters, but it is not necessary in 1.17, you can switch to version 1.18 and try @kenshaw

The source code compiles with go1.18 (run go build directly).
The error is reported by the IDE, it's an IDE issue.
More information about the error:
In vscode is, the error is:
cannot use log.Printf (value of type func(format string, v ...invalid type)) as func(string, ...interface{}) value in argument to chromedp.WithDebugf

That's because interface{} is rewritten to any in go1.18. (see https://github.com/golang/go/issues/49884). But there is not compatibility issue. It's just that the IDE is not updated to support it yet.

Thanks, I know why!

updated my goland to latest and the prompt disappeared


Not Support for CJS

Trying to use the Quill package as a rich text editor but facing errors from Jest no longer parsing our files because the node module from Quill is no longer being sent out as CJS. Can we add support for CJS as well as ESM, instead of just ESM node modules? The figures below highlight this:

Steps for Reproduction

Install quill.
Write a Quill Editor implementation – one can follow the React Quill implementation.
Run a test that loads the component with Jest.

Expected behavior:

Pass results

Actual behavior:

Platforms: Mac M1, Node Version node v20.9.0 (npm v10.1.0)
Version: 2.0.2

I'm having the same issue as well..

Same +1

@luin Hi! 👋
I see you were the last to commit changes to Quill. May I ask you have a look this issue and the potential fix presented by @ahebou-sc? 🙏


Passing "resolveInternal" option causes "RangeError" when resolving a spec

Detailed description
This might be a bug with oas-resolver but the front-door we are using to resolve the OpenApi specs is speccy.
Resolving refs works fine with the following options
const SPECCY_OPTIONS = {
  resolve: true,
  jsonSchema: true,
}

The above options cause the first external ref to be resolved, but subsequent external refs to that same file get converted to internal refs.
We have a use case where we need all the refs to be resolved and not have any internal refs, so I used the following options
const SPECCY_OPTIONS = {
  resolve: true,
  jsonSchema: true,
  resolveInternal: true,
}

This causes the following error -
RangeError: Maximum call stack size exceeded
at String.replace (<anonymous>)
at jpescape (/Users/mkothari/git/platform-specs/node_modules/reftools/lib/jptr.js:9:14)
at recurse (/Users/mkothari/git/platform-specs/node_modules/reftools/lib/recurse.js:34:60)
at recurse (/Users/mkothari/git/platform-specs/node_modules/reftools/lib/recurse.js:53:13)
at recurse (/Users/mkothari/git/platform-specs/node_modules/reftools/lib/recurse.js:53:13)
at recurse (/Users/mkothari/git/platform-specs/node_modules/reftools/lib/recurse.js:53:13)
at recurse (/Users/mkothari/git/platform-specs/node_modules/reftools/lib/recurse.js:53:13)
at recurse (/Users/mkothari/git/platform-specs/node_modules/reftools/lib/recurse.js:53:13)
at recurse (/Users/mkothari/git/platform-specs/node_modules/reftools/lib/recurse.js:53:13)
at recurse (/Users/mkothari/git/platform-specs/node_modules/reftools/lib/recurse.js:53:13)

Node Version: 12.18.0
Operating system and version (e.g. Ubuntu 16.04, Windows 7): Mac 10.15.5
Speccy Version: 0.11.0

An additional note - this the schema does have recursion and is structured as given in the example from the json-schema docs - https://json-schema.org/understanding-json-schema/structuring.html#recursion

A quick example test case -
the yaml spec, say temp.yaml -
openapi: 3.0.2
info:
  title: api
  description: |
    description!
  contact:
    name: 'team'
    url: 'https://test.com/'
    email<EMAIL_ADDRESS>  version: 0.0.1
servers:
  - url: https://test.com
paths: {}
components:
  responses:
    Request:
      description: request
      content:
        application/json:
          schema:
            $ref: temp.json#/definitions/person
tags: []

the schema in a file temp.json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "definitions": {
    "person": {
      "type": "object",
      "properties": {
        "name": { "type": "string" },
        "children": {
          "type": "array",
          "items": { "$ref": "#/definitions/person" },
          "default": []
        }
      }
    }
  },
  "type": "object",
  "properties": {
    "person": { "$ref": "#/definitions/person" }
  }
}

The command to run is - speccy resolve ./temp.yaml -j -v -i
Error -
GET ./packages/common-spec/src/specifications/components/temp.yaml
GET /Users/mkothari/git/common-specs/packages/common-spec/src/specifications/components/temp.json #/definitions/person
RangeError: Maximum call stack size exceeded
    at String.replace (<anonymous>)
    at jpescape (/Users/mkothari/git/common-specs/node_modules/reftools/lib/jptr.js:9:14)
    at recurse (/Users/mkothari/git/common-specs/node_modules/reftools/lib/recurse.js:34:60)
    at recurse (/Users/mkothari/git/common-specs/node_modules/reftools/lib/recurse.js:53:13)
    at recurse (/Users/mkothari/git/common-specs/node_modules/reftools/lib/recurse.js:53:13)
    at recurse (/Users/mkothari/git/common-specs/node_modules/reftools/lib/recurse.js:53:13)
    at recurse (/Users/mkothari/git/common-specs/node_modules/reftools/lib/recurse.js:53:13)
    at recurse (/Users/mkothari/git/common-specs/node_modules/reftools/lib/recurse.js:53:13)
    at recurse (/Users/mkothari/git/common-specs/node_modules/reftools/lib/recurse.js:53:13)
    at recurse (/Users/mkothari/git/common-specs/node_modules/reftools/lib/recurse.js:53:13)
Maximum call stack size exceeded

What is your expected (non infinite) output if all internal references are to be replaced?

That's a good question. IMO resolving it to the top level would suffice with a reference back to the object itself further down the tree.
This would be the desired output -
openapi: 3.0.2
info:
  title: api
  description: |
    description!
  contact:
    name: team
    url: https://test.com/
    email<EMAIL_ADDRESS>  version: 0.0.1
servers:
  - url: https://test.com
paths: {}
components:
  responses:
    Request:
      description: request
      content:
        application/json:
          schema:
            type: object
            properties:
              name:
                type: string
              children:
                type: array
                items:
                  $ref: "#/components/responses/Request/content/application~1json/schema"
                default: []
tags: []

That is exactly the output if you don't specifiy resolveInternal: true.

I think I simplified my test yaml too much without showcasing the actual use case I am looking to solve.
If you refer to the same schema multiple times in the spec (which is what we are doing), as shown in the example below -
openapi: 3.0.2
info:
  title: api
  description: |
    description!
  contact:
    name: 'team'
    url: 'https://test.com/'
    email<EMAIL_ADDRESS>  version: 0.0.1
servers:
  - url: https://test.com
paths: {}
components:
  responses:
    Request:
      description: request
      content:
        application/json:
          schema:
            $ref: temp.json#/definitions/person
    Request2:
      description: request
      content:
        application/json:
          schema:
            $ref: temp.json#/definitions/person
tags: []

if I don't specify resolveInternal: true then it results in this -
openapi: 3.0.2
info:
  title: api
  description: |
    description!
  contact:
    name: team
    url: https://test.com/
    email<EMAIL_ADDRESS>  version: 0.0.1
servers:
  - url: https://test.com
paths: {}
components:
  responses:
    Request:
      description: request
      content:
        application/json:
          schema:
            type: object
            properties:
              name:
                type: string
              children:
                type: array
                items:
                  type: object
                  properties:
                    name:
                      type: string
                    children:
                      type: array
                      items:
                        $ref: "#/components/responses/Request/content/application~1json/schema/properti\
                          es/children/items"
                      default: []
                default: []
    Request2:
      description: request
      content:
        application/json:
          schema:
            $ref: "#/components/responses/Request/content/application~1json/schema"
tags: []

It resolves it the first time, and then any future references point to the first place it was resolved.
Our goal was to have it resolve in all spots, which is why we added  resovleInternal: true, which then resulted in the RangeError.


Use pipenv sync instead of pipenv install

It turns out that pipenv install is an alias for lock + sync. This
causes the lockfile to be updated, meaning we may not be installing
the packages which we expect.

Related to https://github.com/AbletonAppDev/devtools/issues/1715, ping @AbletonDevTools/gotham-city

What about
https://github.com/AbletonDevTools/groovylint/blob/3d4cdd56533e009fa12f186f42c3f52f4cfb9418/Dockerfile#L37
though?

@ala-ableton So I just tried to replace install with sync there and it failed, because pipenv sync does not have a --system flag (see http://newci.office.ableton.com:8080/blue/organizations/jenkins/AbletonDevTools-groovylint/detail/AbletonDevTools-groovylint/142/pipeline). However, we are using the --deploy flag, which means that:

Abort if the Pipfile.lock is out-of-date, or Python version is wrong.

So in the case that the lockfile is touched, then pipenv would fail. This is not the ideal solution but at least it will not install something we are not expecting. I'm thinking we should file a bug report to pipenv about this, because I really hate this behavior of install.

@ala-ableton I think I found a better solution here: --ignore-pipfile. Mind taking another look?

@ala-ableton Yeah, it would seem that way. 🙄


Fix CI failures

Fixes #1066
Fixes #1064
The latest dask update defaults to using p2p shuffles which iiic isn't supported on the sync scheduler https://github.com/dask/dask/issues/9996, which is our default when calling assert_eq in our tests.
This pr updates the relevant tests to use a distributed scheduler instead for those cases.

Codecov Report

Merging #1067 (75edc39) into main (02c3446) will increase coverage by 0.11%.
The diff coverage is 100.00%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@            Coverage Diff             @@
##             main    #1067      +/-   ##
==========================================
+ Coverage   81.29%   81.40%   +0.11%
==========================================
  Files          78       78
  Lines        4373     4373
  Branches      786      786
==========================================
+ Hits         3555     3560       +5
+ Misses        645      636       -9
- Partials      173      177       +4

Impacted Files
Coverage Δ

dask_sql/physical/rel/logical/join.py
96.03% <100.00%> (ø)

dask_sql/_version.py
35.31% <0.00%> (+1.41%)
:arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

Looks like some of the cluster test failures are coming from killed worker errors on sorting when we go via the custom sort path. cc: @charlesbluca if you get a chance to take a look.

rerun tests


Add sign_out endpoint to endpoint documentation page

Description

Add sign_out endpoint to endpoint documentation page.
Motivation and Context

Unlike other endpoints, sign_out is not currently listed on https://pusher.github.io/oauth2_proxy/endpoints.
How Has This Been Tested?

Ran jekyll build.
Checklist:

[ ] My change requires a change to the documentation or CHANGELOG.
[x] I have updated the documentation/CHANGELOG accordingly.
[x] I have created a feature (non-master) branch for my PR.

I don't think this requires an entry to the changelog so I'll go ahead and merge - thanks!


Collection review config: validate at least one reviewer is listed if Review Workflow is enabled

follow on from https://github.com/sul-dlss/happy-heron/issues/348 / https://github.com/sul-dlss/happy-heron/pull/384
validate that reviewers are listed if the reviewer workflow is enabled (@mjgiarlo suggests: "there are two strategies here: pure JavaScript validation or use remote form validation (how we're dealing with keywords)" -- see https://github.com/sul-dlss/happy-heron/pull/384#discussion_r520095850)

@jmartin-sul the second subtask is already in progress here: https://github.com/sul-dlss/happy-heron/pull/400

@jmartin-sul the second subtask is already in progress here: #400

ah, thanks, striking...

i turned this ticket into one that's just about what was originally its third task (as the first one had been ticketed, and the second had been ticketed and picked up).

for reference, an example PR demonstrating/explaining remote form validation: https://github.com/sul-dlss/happy-heron/pull/356

I just noticed this ticket and haven't attempted to follow all of this, but wanted to be sure it was clear that all collection managers should automatically be reviewers, so we do not want to require the addition of other reviewer SUNets in the reviewer field. However, automatically entering the collection manager names there would suit me fine if that is easier to manage. Please ping me if you have questions about this requirement. Thanks.


Add non-interactive mode. Support basic parametrization through CLI.

I was pretty annoyed with the lack of non-interactive mode, since it limits interoperability and configurability. This PR adds a way to run the program the way god intended. It also adds simple switches (override view on completion, config path) which are useful for varied projects and batch jobs. The interactive behaviour is preserved; running the program without any arguments or with --interactive will enter the interactive mode.
In the future I want to add an option to support passing directories, which would process all projects within the directory (recursively).

Sure, looks great to me! Thanks for the PR.


Filter out "indoor" PurpleAir stations

They can be misleading when they are lower than the outdoor readings, and also bring down averages.

Hi Dean, we actually already do this on the build side. I should put something about this in the README, but basically, we run a cron job once per week (Sunday nights) on an EC2 box which builds a sqlite3 database of sensors, zipcodes, and the distances between them, and uploads it to this repository. That code is here. We then use that database to do geolocation (using geohashing and the haversine formula).
During the build process, we filter out bad sensors: https://github.com/airq-dev/airq-data/blob/master/src/build.py#L247-L271
But you're right that we should bring this logic into the application too, as new Purpleair sensors can come online and existing sensors can suffer fluctuations during the course of a week (between builds).
The current application-side filtering we do lives here, if you want to take a look.

Ah, I see that now. Nice. I mainly mentioned it because I was mistakenly using a nearby indoor station for a personal project. It was significantly higher than my indoor levels (although I filter my air), so I was none the wiser. 🤦🏻♂

Yeah, you definitely have to do a good amount of data cleaning when using Purpleair. But it's cool that they provide (seemingly) unfiltered (ha) access to the sensor data, and let us shoot ourselves in our own feet with it.


Terraform startup script fails if end of line characters aren't Unix

The startup script requires unix end of line characters, so Terraform files that contain startup scripts require unix end of line characters. This is an attempt to fix #28.
This could be changed to just set the attributes of docs\bosh\main.tf.

Thanks, @Fydon!


W-12105364 changing daemon set to sidecar

Writer's Quality Checklist
Before merging your PR, did you:

[ ] Run spell checker
[ ] Run link checker to check for broken xrefs
[ ] Check for orphan files
[ ] Perform a local build and do a final visual check of your content, including checking for:

Broken images
Dead links
Correct rendering of partials if they are used in your content
Formatting issues, such as:

Misnumbered ordered lists (steps) or incorrectly nested unordered lists
Messed up tables
Proper indentation
Correct header levels

[ ] Receive final review and signoff from:

Technical SME
Product Manager
Editor or peer reviewer
Reporter, if this content is in response to a reported issue (internal or external feedback)

[ ] If applicable, verify that the software actually got released

closing this PR--docs not needed


SSL Error. Opentopo

The two reports steps for opentopography fail with something to do with reading the sitemap
Couple url's to look at:
https://arista.my.site.com/AristaCommunity/s/article/Python-3-10-and-SSLV3-ALERT-HANDSHAKE-FAILURE-error
https://github.com/pandas-dev/pandas/issues/47189
dagster._core.errors.DagsterExecutionStepExecutionError: Error occurred while executing op "harvest_opentopography.opentopography_missingreport_s3":

  File "/usr/local/lib/python3.10/site-packages/dagster/_core/execution/plan/execute_plan.py", line 273, in dagster_event_sequence_for_step
    for step_event in check.generator(step_events):
  File "/usr/local/lib/python3.10/site-packages/dagster/_core/execution/plan/execute_step.py", line 369, in core_dagster_event_sequence_for_step
    for user_event in check.generator(
  File "/usr/local/lib/python3.10/site-packages/dagster/_core/execution/plan/execute_step.py", line 90, in _step_output_error_checked_user_event_sequence
    for user_event in user_event_sequence:
  File "/usr/local/lib/python3.10/site-packages/dagster/_core/execution/plan/compute.py", line 192, in execute_core_compute
    for step_output in _yield_compute_results(step_context, inputs, compute_fn):
  File "/usr/local/lib/python3.10/site-packages/dagster/_core/execution/plan/compute.py", line 161, in _yield_compute_results
    for event in iterate_with_context(
  File "/usr/local/lib/python3.10/site-packages/dagster/_utils/__init__.py", line 443, in iterate_with_context
    with context_fn():
  File "/usr/local/lib/python3.10/contextlib.py", line 153, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/usr/local/lib/python3.10/site-packages/dagster/_core/execution/plan/utils.py", line 84, in op_execution_error_boundary
    raise error_cls(

The above exception was caused by the following exception:
urllib.error.URLError: <urlopen error [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1007)>

  File "/usr/local/lib/python3.10/site-packages/dagster/_core/execution/plan/utils.py", line 54, in op_execution_error_boundary
    yield
  File "/usr/local/lib/python3.10/site-packages/dagster/_utils/__init__.py", line 445, in iterate_with_context
    next_output = next(iterator)
  File "/usr/local/lib/python3.10/site-packages/dagster/_core/execution/plan/compute_generator.py", line 124, in _coerce_op_compute_fn_to_iterator
    result = invoke_compute_fn(
  File "/usr/local/lib/python3.10/site-packages/dagster/_core/execution/plan/compute_generator.py", line 118, in invoke_compute_fn
    return fn(context, **args_to_pass) if context_arg_provided else fn(**args_to_pass)
  File "/usr/src/app/./ops/implnet_ops_opentopography.py", line 505, in opentopography_missingreport_s3
    returned_value = missingReport(source_url, bucket, source_name, s3Minio, graphendpoint, milled=milled, summon=summon)
  File "/usr/local/lib/python3.10/site-packages/ec/reporting/report.py", line 78, in missingReport
    sitemap = ec.sitemap.Sitemap(valid_sitemap_url)
  File "/usr/local/lib/python3.10/site-packages/ec/sitemap/sitemap.py", line 53, in __init__
    self.sitemap_df = adv.sitemap_to_df(sitemapurl)
  File "/usr/local/lib/python3.10/site-packages/advertools/sitemaps.py", line 491, in sitemap_to_df
    xml_text = urlopen(Request(sitemap_url, headers=headers))
  File "/usr/local/lib/python3.10/urllib/request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/local/lib/python3.10/urllib/request.py", line 519, in open
    response = self._open(req, data)
  File "/usr/local/lib/python3.10/urllib/request.py", line 536, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "/usr/local/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/usr/local/lib/python3.10/urllib/request.py", line 1391, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
  File "/usr/local/lib/python3.10/urllib/request.py", line 1351, in do_open
    raise URLError(err)

The above exception occurred during handling of the following exception:
ssl.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1007)

  File "/usr/local/lib/python3.10/urllib/request.py", line 1348, in do_open
    h.request(req.get_method(), req.selector, req.data, headers,
  File "/usr/local/lib/python3.10/http/client.py", line 1283, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/local/lib/python3.10/http/client.py", line 1329, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.10/http/client.py", line 1278, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.10/http/client.py", line 1038, in _send_output
    self.send(msg)
  File "/usr/local/lib/python3.10/http/client.py", line 976, in send
    self.connect()
  File "/usr/local/lib/python3.10/http/client.py", line 1455, in connect
    self.sock = self._context.wrap_socket(self.sock,
  File "/usr/local/lib/python3.10/ssl.py", line 513, in wrap_socket
    return self.sslsocket_class._create(
  File "/usr/local/lib/python3.10/ssl.py", line 1071, in _create
    self.do_handshake()
  File "/usr/local/lib/python3.10/ssl.py", line 1342, in do_handshake
    self._sslobj.do_handshake()

Can confirm it is a 3.10 issue.
Does not happen with 3.09
ec_reports.py missing-report --cfgfile ./resources/testing/gleaner --output testfile --source opentopography --graphendpoint https://graph.geocodes-aws-dev.earthcube.org/blazegraph/namespace/test/sparql
2023-07-31 14:18:33,162 | INFO | ec_reports.py:86 | missing_report | s3server: oss.geocodes-aws-dev.earthcube.org bucket:test graph:https://graph.geocodes-aws-dev.earthcube.org/blazegraph/namespace/test/sparql
--- Logging error ---
Traceback (most recent call last):
  File<EMAIL_ADDRESS>line 1348, in do_open
    h.request(req.get_method(), req.selector, req.data, headers,
  File<EMAIL_ADDRESS>line 1283, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File<EMAIL_ADDRESS>line 1329, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File<EMAIL_ADDRESS>line 1278, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File<EMAIL_ADDRESS>line 1038, in _send_output
    self.send(msg)
  File<EMAIL_ADDRESS>line 976, in send
    self.connect()
  File<EMAIL_ADDRESS>line 1455, in connect
    self.sock = self._context.wrap_socket(self.sock,
  File<EMAIL_ADDRESS>line 513, in wrap_socket
    return self.sslsocket_class._create(
  File<EMAIL_ADDRESS>line 1071, in _create
    self.do_handshake()
  File<EMAIL_ADDRESS>line 1342, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1007)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/valentin/development/dev_earthcube/earthcube_utilities/earthcube_utilities/src/ec/ec_reports.py", line 99, in missing_report
    report = missingReport(source_url, bucket, source_name, s3Minio, graphendpoint, milled=milled, summon=summononly)
  File "/Users/valentin/development/dev_earthcube/earthcube_utilities/earthcube_utilities/src/ec/reporting/report.py", line 78, in missingReport
    sitemap = ec.sitemap.Sitemap(valid_sitemap_url)
  File "/Users/valentin/development/dev_earthcube/earthcube_utilities/earthcube_utilities/src/ec/sitemap/sitemap.py", line 52, in __init__
    self.sitemap_df = adv.sitemap_to_df(sitemapurl)
  File "/Users/valentin/development/dev_earthcube/earthcube_utilities/venv2/lib/python3.10/site-packages/advertools/sitemaps.py", line 491, in sitemap_to_df
    xml_text = urlopen(Request(sitemap_url, headers=headers))
  File<EMAIL_ADDRESS>line 216, in urlopen
    return opener.open(url, data, timeout)
  File<EMAIL_ADDRESS>line 519, in open
    response = self._open(req, data)
  File<EMAIL_ADDRESS>line 536, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File<EMAIL_ADDRESS>line 496, in _call_chain
    result = func(*args)
  File<EMAIL_ADDRESS>line 1391, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
  File<EMAIL_ADDRESS>line 1351, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1007)>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File<EMAIL_ADDRESS>line 1100, in emit
    msg = self.format(record)
  File<EMAIL_ADDRESS>line 943, in format
    return fmt.format(record)
  File<EMAIL_ADDRESS>line 678, in format
    record.message = record.getMessage()
  File<EMAIL_ADDRESS>line 368, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
  File "/Users/valentin/development/dev_earthcube/earthcube_utilities/earthcube_utilities/src/ec/ec_reports.py", line 252, in <module>
    cli()
  File "/Users/valentin/development/dev_earthcube/earthcube_utilities/venv2/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/Users/valentin/development/dev_earthcube/earthcube_utilities/venv2/lib/python3.10/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/Users/valentin/development/dev_earthcube/earthcube_utilities/venv2/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/valentin/development/dev_earthcube/earthcube_utilities/venv2/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/valentin/development/dev_earthcube/earthcube_utilities/venv2/lib/python3.10/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/Users/valentin/development/dev_earthcube/earthcube_utilities/earthcube_utilities/src/ec/ec_reports.py", line 61, in wrapper
    return func(*args, **kwargs)
  File "/Users/valentin/development/dev_earthcube/earthcube_utilities/earthcube_utilities/src/ec/ec_reports.py", line 107, in missing_report
    log.error(f"could not write missing report for {source_name} to s3server:{s3server}:{bucket} error:{e}",
Message: 'could not write missing report for opentopography to s3server:oss.geocodes-aws-dev.earthcube.org:test error:<urlopen error [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1007)>'
Arguments: ('opentopography', 'oss.geocodes-aws-dev.earthcube.org', 'test', URLError(SSLError(1, '[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1007)')))

If we use:  https://portal.opentopography.org/sitemap.xml it should work
https://github.com/eliasdabbas/advertools/issues/294

or maybe not
dagster._core.errors.DagsterExecutionStepExecutionError: Error occurred while executing op "harvest_opentopography.opentopography_missingreport_s3":
File "/usr/local/lib/python3.11/site-packages/dagster/_core/execution/plan/execute_plan.py", line 273, in dagster_event_sequence_for_step
for step_event in check.generator(step_events):
File "/usr/local/lib/python3.11/site-packages/dagster/_core/execution/plan/execute_step.py", line 369, in core_dagster_event_sequence_for_step
for user_event in check.generator(
File "/usr/local/lib/python3.11/site-packages/dagster/_core/execution/plan/execute_step.py", line 90, in _step_output_error_checked_user_event_sequence
for user_event in user_event_sequence:
File "/usr/local/lib/python3.11/site-packages/dagster/_core/execution/plan/compute.py", line 192, in execute_core_compute
for step_output in _yield_compute_results(step_context, inputs, compute_fn):
File "/usr/local/lib/python3.11/site-packages/dagster/_core/execution/plan/compute.py", line 161, in _yield_compute_results
for event in iterate_with_context(
File "/usr/local/lib/python3.11/site-packages/dagster/_utils/init.py", line 443, in iterate_with_context
with context_fn():
File "/usr/local/lib/python3.11/contextlib.py", line 155, in exit
self.gen.throw(typ, value, traceback)
File "/usr/local/lib/python3.11/site-packages/dagster/_core/execution/plan/utils.py", line 84, in op_execution_error_boundary
raise error_cls(
The above exception was caused by the following exception:
urllib.error.URLError: <urlopen error [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1002)>
File "/usr/local/lib/python3.11/site-packages/dagster/_core/execution/plan/utils.py", line 54, in op_execution_error_boundary
yield
File "/usr/local/lib/python3.11/site-packages/dagster/_utils/init.py", line 445, in iterate_with_context
next_output = next(iterator)
^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/dagster/_core/execution/plan/compute_generator.py", line 124, in _coerce_op_compute_fn_to_iterator
result = invoke_compute_fn(
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/dagster/_core/execution/plan/compute_generator.py", line 118, in invoke_compute_fn
return fn(context, **args_to_pass) if context_arg_provided else fn(**args_to_pass)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/app/./ops/implnet_ops_opentopography.py", line 564, in opentopography_missingreport_s3
returned_value = missingReport(source_url, bucket, source_name, s3Minio, graphendpoint, milled=milled, summon=summon)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/ec/reporting/report.py", line 78, in missingReport
sitemap = ec.sitemap.Sitemap(valid_sitemap_url)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/ec/sitemap/sitemap.py", line 52, in init
self.sitemap_df = adv.sitemap_to_df(sitemapurl)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/advertools/sitemaps.py", line 491, in sitemap_to_df
xml_text = urlopen(Request(sitemap_url, headers=headers))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/urllib/request.py", line 216, in urlopen
return opener.open(url, data, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/urllib/request.py", line 519, in open
response = self._open(req, data)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/urllib/request.py", line 536, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/urllib/request.py", line 496, in _call_chain
result = func(*args)
^^^^^^^^^^^
File "/usr/local/lib/python3.11/urllib/request.py", line 1391, in https_open
return self.do_open(http.client.HTTPSConnection, req,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/urllib/request.py", line 1351, in do_open
raise URLError(err)
The above exception occurred during handling of the following exception:
ssl.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1002)
File "/usr/local/lib/python3.11/urllib/request.py", line 1348, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "/usr/local/lib/python3.11/http/client.py", line 1286, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/lib/python3.11/http/client.py", line 1332, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.11/http/client.py", line 1281, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.11/http/client.py", line 1041, in _send_output
self.send(msg)
File "/usr/local/lib/python3.11/http/client.py", line 979, in send
self.connect()
File "/usr/local/lib/python3.11/http/client.py", line 1458, in connect
self.sock = self._context.wrap_socket(self.sock,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/ssl.py", line 517, in wrap_socket
return self.sslsocket_class._create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/ssl.py", line 1075, in _create
self.do_handshake()
File "/usr/local/lib/python3.11/ssl.py", line 1346, in do_handshake
self._sslobj.do_handshake()

Think this works now


Inifiniband Verbs error message

Describe the bug
libibverbs displays error message on some architectures, need to investigate infiniband drivers on Singularity container

Updated the Singularity container, now builds on  Centos 7 using:
 yum groupinstall -y "Infiniband"   yum install	   -y libibverbs-devel
Testing on multiple HPC architectures was successful so merged these changes with the master Singularity branch (available: https://github.com/jameslehoux/openimpala-singularity/blob/master/Singularity)


Unexpected redirect happened after useRole

What is your Test Scenario?
Verify that user is able to see validation message from login form. And it is not only one test scenario, based on this validation message I go to admin panel, register new account/user/etc. So it is kind of important for our application because this check happens before every test scenario.
I can not share the URL to my production application, so I created a small app to show you the problem.
What is the Current behavior?
When the form is submitted, XHR request is executed, server returned JSON with 422 status code, and that is the indicator that authorization is not successful. NOTE: no redirects happened in our application.
What is the Expected behavior?
Redirect should not happened, because I need to check that selector exists on page
What is your web application and your TestCafe test code?
Your website URL (or attach your complete example): https://testcafe-testing.herokuapp.com/

Your complete test code (or attach your test files):

import { Selector, t, Role } from 'testcafe'

fixture('Testing redirect')

const expectedErrorMessage = Selector("div#validation-error").withText('Invalid email or password')

const userRole = Role('https://testcafe-testing.herokuapp.com', async t => {
  const usernameInput = Selector("input[type='email']")
  const passwordInput = Selector("input[type='password']")
  const signInButton = Selector("input[type='submit']")

  await t.typeText(usernameInput<EMAIL_ADDRESS>{ paste: true })
  await t.typeText(passwordInput, 'password')
  await t.click(signInButton)
}, { preserveUrl: true })

test('Verify user is able to see validation message', async t => {
  await t.useRole(userRole)
  await t.expect(expectedErrorMessage.exists).ok()
})

Your complete configuration file (if any):

{
  "browsers": "chrome",
  "concurrency": 1,
  "skipJsErrors": true,
  "videoPath": "videos",
  "videoOptions" : {
    "failedOnly": false,
    "pathPattern": "${DATE}_${TIME}/${BROWSER}/${FIXTURE}/${TEST}.mp4"
  }
}

Your complete test report:

➜ yarn run testcafe --speed 0.5 fixtures/orders/order_management/order_details/testing.js
yarn run v1.9.2
warning package.json: No license field
$ testcafe chrome --speed 0.5 fixtures/orders/order_management/order_details/testing.js
The "browsers" option from the configuration file will be ignored.
 Running tests in:
 - Chrome 75.0.3770 / Linux 0.0.0

 Testing redirect
 ✖ Verify user is able to see validation message

   1) AssertionError: expected false to be truthy

      Browser: Chrome 75.0.3770 / Linux 0.0.0

         15 |}, { preserveUrl: true })
         16 |
         17 |
         18 |test('Verify user is able to see validation message', async t => {
         19 |  await t.useRole(userRole)
       > 20 |  await t.expect(expectedErrorMessage.exists).ok()
         21 |})
         22 |

         at ok (/home/peter/projects/testcafe/fixtures/orders/order_management/order_details/testing.js:20:47)

 1/1 failed (14s)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Screenshots:

![Peek 2019-07-08 21-54](https://user-images.githubusercontent.com/213735/60835205-36b86d00-a1cb-11e9-968a-890c481c33d8.gif)

Steps to Reproduce:

Go to test website - https://testcafe-testing.herokuapp.com/
Enter any email and password
you should see validation message 'Invalid email or password'
redirect is not happened, server returned JSON with 422 status code
Enter email<EMAIL_ADDRESS>and password 'password'
app redirected to '/dashboard' path

Your Environment details:

testcafe version: 1.3.1
node.js version: v8.16.0
command-line arguments: testcafe chrome fixtures/orders/order_management/order_details/testing.js
browser name and version: Chrome 75
platform and version: Linux Mint 19 Cinnamon

@pbalaban
Hello,
Your test scenario role works correctly. In your scenario, you don't need to use the User Role functionality (e. g. saving cookies).
I suggest you write a separate test to login with wrong credentials:
import { Selector } from 'testcafe';

fixture `Testing redirect`;

test
    .page`https://testcafe-testing.herokuapp.com`
('Login with wrong credentials', async t => {
    const usernameInput        = Selector("input[type='email']");
    const passwordInput        = Selector("input[type='password']");
    const signInButton         = Selector("input[type='submit']");
    const expectedErrorMessage = Selector("div#validation-error").withText('Invalid email or password');

    await t.typeText(usernameInput<EMAIL_ADDRESS>{paste: true})
        .typeText(passwordInput, 'password')
        .click(signInButton)
        .expect(expectedErrorMessage.exists).ok();
});

It makes sense. Thank you!


Add, Request, and Remove Email Copy

Summary of Changes
Added new copy for adding, removing, and requesting metadata notifications
Tests
What tests did you add or modify and why? If no tests were added or modified, explain why. Remove this line
Documentation
What documentation did you add or modify and why? Add any relevant links then remove this line
CheckList
Make sure you have checked all steps below to ensure a timely review.

[ ] PR title addresses the issue accurately and concisely. Example: "Updates the version of Flask to v1.0.2"

In case you are adding a dependency, check if the license complies with the ASF 3rd Party License Policy.

[ ] PR includes a summary of changes, including screenshots of any UI changes.
[ ] PR adds unit tests, updates existing unit tests, OR documents why no test additions or modifications are needed.
[ ] In case of new functionality, my PR adds documentation that describes how to use it.

All the public python functions and the classes in the PR contain docstrings that explain what it does

[ ] PR passes all tests documented in the developer guide
[ ] I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message"

Codecov Report

Merging #257 into amundsen-notifications will not change coverage.
The diff coverage is 100%.

@@                   Coverage Diff                   @@
##           amundsen-notifications     #257   +/-   ##
=======================================================
  Coverage                   68.12%   68.12%
=======================================================
  Files                         108      108
  Lines                        2265     2265
  Branches                      277      277
=======================================================
  Hits                         1543     1543
  Misses                        716      716
  Partials                        6        6

Impacted Files
Coverage Δ

...mponents/TableDetail/RequestMetadataForm/index.tsx
97.29% <100%> (ø)
:arrow_up:

...tion/static/js/ducks/tableMetadata/owners/sagas.ts
100% <100%> (ø)
:arrow_up:

...pplication/static/js/ducks/tableMetadata/api/v0.ts
28.57% <100%> (ø)
:arrow_up:

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 94cbca7...c70a16d. Read the comment docs.

@ttannis good to look over again with tests


Trezor v1.9.3 fails (submodules no longer valid)

Submodule repos are no longer valid in the clone command
Noted in settings.sh:166

Closing due to unfixable bit rot


[Feature Request] provide API for accessing original images of artwork with artwork ID

As in a link that goes directly to an image? For example www.phixiv.net/en/artworks/<whatever>/raw redirects you to the proxy? I think that is doable. It would not be any cheaper than the full embed really, which is a shame, but it could be done. Is that what you mean?

For example www.phixiv.net/en/artworks//raw redirects you to the proxy?
Yep.
If you mean an actual API, to be used from code, it would be easier to copy what is being done in Artwork::app_request of artwork.rs.
I just want to make a button under your embed that downloads the full image.

Okay, direct image links are in the form /d/:id and /d/:id/:image_index for albums. Let me know if you have any issues with it.

is it like phixiv.net/d/103234224 ? it's not working for me.

nvm, working now, thank you for adding this feature.


Upgrade deckgl package to 8.1.7

Looks good to me. Let me add a small change here on 'template.html' I was working on, for better airship use

@manmorjim almost ready to go. Please, just make a quick check that the references on examples fit the ones from the 'template'. We have some wrong & mixed ones, like mapbox 1.0 instead of mapbox 1.10.0.

done!


[Question] hyprland equivalence of "bspc subscribe desktop node_transfer"

i am new to wayland.
i am ricing  hyprland with eww. what is the equivalence of
bspc subscribe desktop node_transfer | while read -r _; do
    workspaces # function for workspace
done

there is code snippet mentioned in hyprland doc.


Push and comment even if previous steps fail

The resolve_issue frequently crashes for me due to a variety of issues, but i have no visibility into what the openhands-resolver did because it never pushed anything even though it ran for 40 steps and made hundreds of lines of change

The send_pull_request already only pushes the branch as opposed to making a PR when it fails


Condvar::wait_while and Condvar::wait_timeout_while convenience methods

The standard library has  Convar::wait_while and Convar::wait_timeout_while methods that take a condition: impl Fn(&mut T) -> bool. These convenience methods are great since the following pattern is relatively common:
while condition(&mut *lock_guard) {
  cv.wait(lock_guard);
}

// condition is now false

I think it'd be great to have these convenience methods built-in, but I can also see an argument being made for not wanting to clutter the public API. Thoughts?
I'm more than happy to submit the PR if this functionality is desired.

Sure! I'd be happy to accept a PR for this.


[CONTROLLER/SERVER] fix create id bug in mysql ha

This PR is for:

Server

Fixes id bug in mysql ha #21037
Steps to reproduce the bug

set MySQL global auto_increment_increment=2
learn batch vinterfaces and ips, ips' vifid will not be correct

Changes to fix the bug

get ids manually after batch create when use gorm

Affected branches

main
v6.2

Checklist

[ ] Added unit test to verify the fix.
[ ] Verified eBPF program runs successfully on linux 4.14.x.
[ ] Verified eBPF program runs successfully on linux 4.19.x.
[ ] Verified eBPF program runs successfully on linux 5.2.x.

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


Moe Sync

This code has been reviewed and submitted internally. Feel free to discuss on the PR and we can submit follow-up changes as necessary.
Commits:
 Add FieldCanBeFinal - an optional check to identify fields that are only
assigned within a constructor.
RELNOTES: New optional (disabled by default) check: FieldCanBeFinal - to
identify fields that could be made final as they are only assigned once in
constructors or field initializers.
GOOGLE: moving it from the refaster directory and leaving it as a refaster
cleanup.
bf52036d2d3f5c311d930f6d39f520095c785cd8

 Flag toString() on Objects without toString() overrides and final type
RELNOTES: Flag toString() on Objects without toString() overrides and final type
b9ea0177d57a88ac8abe898a3985c32f9751e2cb

 Fix bug in comment parser when there is a comment on a nested method call.
RELNOTES: Fix bug in comment parser when there is a comment on a nested method call.
22e8298e3c82f250bb7d2fe0db581a8ddd839b39

 Change cast in SuggestedFixes.compilesWithFix.
BasicJavacTask is a superclass of JavacTaskImpl, and provides the necessary getContext() method.
RELNOTES: n/a
736928cc0358e3031c4045d2cff3648b18b20696

 Add a check to discourage assertThrows with block lambdas with >1 statement
RELNOTES: [AssertThrowsMultipleStatements] The lambda passed to assertThows should contain exactly one statement
b3442865df98d2252e0e35607652f89985f329a1

 Make OrphanedFormatString detect instances where format string literals are
passed to @FormatMethod methods in the right position.
RELNOTES: OrphanedFormatString detects string literals correctly passed to
@FormatMethod methods
df39c21f6637cc4b985d17690ec074ef6ca04d14

 Update examples for 2.3.0 release.
1ca0d1c0f33b8f453ac29b0a69d05abed1fe7783

All of the authors are googlers


[BEAM-9500] [WIP] Refactor load tests

Changed the input to be initialized in the base class instead of the subclasses.
Minor:

Replaced creating new TimeMonitors with the one from the superclass
Added type to List at LoadTest:104
Moved initializing ByteMonitor object to constructor instead of creating it ad hoc

related: #10949

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[x] Choose reviewer(s) and mention them in a comment (R: @username).
[ ] Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
[ ] Update CHANGES.md with noteworthy changes.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.
Post-Commit Tests Status (on master branch)

Lang
SDK
Apex
Dataflow
Flink
Gearpump
Samza
Spark

Go

---
---

---
---

Java

Python

---

---
---

XLang
---
---
---

---
---

Pre-Commit Tests Status (on master branch)

---
Java
Python
Go
Website

Non-portable

Portable
---

---
---

See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.

@mwalenia

I think there is a lot more to do with the part "make LoadTest parameterized instead of a base class."

@piotr-szuberski - what is the next step for this PR? Is it still active? Should we close it?

@piotr-szuberski - what is the next step for this PR? Is it still active? Should we close it?


Rename raise() to move_to_top()

Closes #28948

Updated. I used a little trick, because the method needs access to Node's internals and I didn't want to modify them too much.

Thanks!


[SUGGESTION] Array, xValues Generalizations

[SUGGESTION] Array, xValues Generalizations
Description
I believe we should decide how we want methods that take a array or collection of values to be implemented
When going through the snippets I realized that methods like arrayMax() or arrayMin() or any other general method meant for a collection of values only work for 1 specific type.
For example:
const arrayMax = arr => Math.max(...arr);
arrayMax([10, 1, 5, 23, 2, 12445, 25])// -> 12445
arrayMax(10, 1, 5, 23, 2, 12445, 25)// -> Breaks & Throws an Err

I think rather than creating a seprate method to handle the said exception/problem I think we could just easily handle and update all snippets with a oneliner that could easily fix the stated problem
I think its important for the following reasons: consistency, readability, performance, and modernity

Early on in the project we decided to stray from implementing
pull() for pullAll() simply because 1 takes arr and the other take x amount of values and it didn't makes sense to implement 2 different functions that do the same thing when can easily be turned to 1 function.
It also helps reduce clutter
we ended up decided merging it into 1 function.
Now there's quite a few of snippets initializing like so.  Only implementing one or the other
Just wanted to make sure I knew which is preferred in the future when implementing/updating other array/collection type methods/snippets & the reasoning behind which we do so choose

I believe it is not always a viable option to have variadic functions. For example Math.max() is a native method, so arrayMax has to be implemented separately. Certain other methods might not fit this case. It's also reasonably easier to understand sometimes, so I am uncertain which is the right decision. Opinions needed on this one!

@kingdavidmartins shouldn't arrayMax break for a variadic input since it isn't an array? arrayMax is more an adapter function for collections to use Math.max if they comply to the spread operator(Set, Array, Map, weakMap)[ wait do Map and weakMap work with spread? I may be wrong there ]. Math.max is designed to work only with variadic input by design, and Function.prototype.apply used to be the spec for using Arrays with variadic functions versus today's spread operator way back when.
Maybe instead we should make a generic utility function and link to it form the description of adapters and put it in Utility called arrayAdapter:
const arrayAdapter = fn => arr => fn( ...arr )
// const maxIn = arrayAdapter(Math.max)
// maxIn([1,2,3]) // -> 3

and possibly one called variadicAdapter:
const variadicAdapter = fn => (...arr) => fn(arr)
// can't think of a use case for this that isn't another library example or specifically composition
// but DANG this would be so useful with flip

After all this adapter family is extremely useful with things like Promisification, flip, context, bind, etc. but that starts getting into the advanced world of composition and types which I'm also not certain our collection would want to touch without possibly splitting off into a full library, and Ramda has us extremely beet there.

@skatcat31 I agree that arrayMax shouldn't work for variadic input, after all Math.max() works for variadic input, so that would beat the point of having the snippet to begin with. Snippets like that one are not so much great examples, but more of a way to introduce people to the way you can use array decomposition and the powers of ES6 and variadic functions. Based on that, I am voting to keep at least arrayMax and arrayMin as they expose useful features to new developers.
Abstracting to create an array and variadic adapter seems like a very useful and powerful idea for a snippet, especially knowing that this can help a lot of people understand the very features I mentioned above.  I'd love to see a PR for that, as it is a really nice snippet, especially due to its simplicity.
As for the rest, I am not sure how to proceed with snippets that calculate the gcd or lcm or other things in an array. But I do like the sum and average ones, as they are quite nice and simple, exposing developers to useful features. So, for me, it boils down to the question: do we keep the gcd and lcm ones?, as they are the only ones that seem a tiny bit off compared to the others.

I think if that were the case the adapters could be good examples. Make me want to do a whole library for small simple adapter functions

@skatcat31 You could actually start a new category with adapter functions, that would expose a lot of people to them and we can help you maintin it. I love this idea to be honest and I would love to help you out!

I'll start submitting PRs after work then. Need to get ready to do merges and deploys for work

Hey @skatcat31 :wave:
Great Idea, exposing people to adapters will def bring a lot of value to the project. I'm soooo excited and def think a lot people will be able to gain insight from alot of different concepts as the project develops. Especially as they start working with different API/Projects applying said concepts/principles, everything will fall in place and things will start to be/feel more intuitive

So, now that we are starting to get adapters implemented, where do we stand on the original question that was asked in this issue?

Hey @Chalarangelo :wave:
Yea, I understand Math.max() by design is meant to work with variadic arguments. and understand why implementing it for just arrays seems like the thing to do. However when thinking about using said snippets I also realized a conundrum.
Let's say I had a project and wanted to be able to find the max value of a collection's. Let's say I then pull a snippet from 30 seconds of code -> arrayMax.md just so I can deal with finding the max value in said array. Now let's say I want to find the max value in a JS object. I also pull that code from Stackoverflow or w.e.
The following now happens
Everytime I come across a array I use -> arrayMax()
Everytime I come across variadic input I use -> Math.max()
Everytime I come across a JS Object -> objectMax()
What we now have is 3 different methods/snippets used/implemented just to do essentially 1 things and that is finding the max value from a collection of sorts. Although this might seem non trival it can get messy and annoying when the same happens with mulitpe different function like lcm, gcd, min, sum, average etc.
I believe if people should copy/paste/use our snippet. We should abstract it all into 1 function which still would be easy to understand seeing that all that would be added the said functions would be a line or 2.
It begs the question. What's the point of having/pasting 3 different variations of a method that does the samething if it can be one. Especially if the functionality doesn't change.
All I have to do just get max whenever I come across any sort of collection of values if I want to find the greatest value.
It's really more about a design decision that would make things much easier and simplier for said users

First of all, we need to agree that there are 3 distinct categories of snippets that this question applies to:

arrayMax and arrayMin which rely on native functions and just show off array destructuring.
arraySum and arrayAverage which do something specific and do not rely on anything, except clever use of array methods (not really super clever, but a good example to introduce people to the ideas).
arrayGcd and arrayLcm which rely on some of our own functions and are extended the functionality.

As far as 3 goes, I think we have already sort of agreed it would be beneficial to extend our snippets to work with both types of input, so I vote we do that.
As far as 2 goes, my opinion was and still is that these are useful to expose new concepts to beginners and should be kept as there are no native methods or other snippets. Extending them to variadic input doesn't seem feasible to me, but if it is doable without messing up the code and still keeping it easy to understand for beginners, be my guest.
As far as 1 goes, there is little to no reason to keep those or add methods that generalize native functions, as the native ES6 code is definitely better than the one we can create here. Extending Math.max() for an array is just a simple destructure and extending for a collection is a significantly more complex process that should be very carefully crafted. If we are to do anything, I would suggest removing arrayMax and arrayMin and actually creating similar functions for objects and collections of objects that would be beneficial to more people.

Is it fair to assume that median also  falls into category 3?

@kingdavidmartins yes (and probably there are more like it), I just don't remember every snippet, these weere example.

@Chalarangelo Gotcha, just making sure. Yea a few

As far as 3 goes, I think we have already sort of agreed it would be beneficial to extend our snippets to work with both types of input, so I vote we do that.

As far as 2 goes, my opinion was and still is that these are useful to expose new concepts to beginners and should be kept as there are no native methods or other snippets. Extending them to variadic input doesn't seem feasible to me, but if it is doable without messing up the code and still keeping it easy to understand for beginners, be my guest.

Honestly after reviewing your response I concur, I believe we are mostly of the same mind/opinion.
I also beleive updating the snippets that fall in category 2 are doable and could also be beginner friendly. Shouldn't take more than 1 line of code.
As far as 3 is concerned it is possible however it's also improbable that it will be beginner friendly and as such concide

@kingdavidmartins Alright, let's see what the others have to say then and act accordingly afterwards.

https://stackoverflow.com/a/47942018/8979804
How about this?
After reading your conversation I decided to ask it on SO and got this answer.

@kriadmin That is quite an elegant solution that should help improve a few snippets, without making them hard to read. I am not against it, if everybody else agrees on this!

Hey @kriadmin 👋
Thanks for proactively reaching out on SO, sincerely appreciated.
This is exactly what I meant by the following lol

I also believe updating the snippets that fall in category 2 are doable and could also be beginner friendly. Shouldn't take more than 1 line of code.

const fn = (...arr) => [].concat(...arr)

I'm for it 😄

Alright, @skatcat31 you are the only person we need an opinion from before we implement these changes.
@kriadmin If you want to make a PR after we decide on this, reference the issue and state that these changes are already approved, so that anyone who reviews merges them asap. 😉

That's the flatten snippet by another implementation isn't it? I'm all for composition, but if this isn't meant to be a library then the self contained call is the way to go since it will also not need them to bring in another snippet. One snippet, one use. If we want to make it a "improved version" that can also handle multiple arrays(a very common adaption of the function) then this is fine. The other solutions are(in theory, did not test because the spread version is much cleaner, and would be the version we want to use)
const arrayMax = ( ...arr ) => arr.reduce( ( acc, val ) => Math.max( acc, ...val ), 0 )
const arrayMax = ( ...arr ) => Math.max( arr.reduce( ( acc, val ) => acc.concat(val), [] ) )

however it really is six of one, half dozen of another since the spread operator would achieve the same thing: Looping over the input to concatenate them into a single result set by using flatten.
I'm all for this since it makes an interior array the focus and thus makes arrayMax the true meaning. It just will need an updated description to note that it is flattening the inputs. This way they might also be curious to see if they could just use
pipe( flatten, spreadOver( Math.max ) )

but that's a library creation and implementation through FP ideologies, and not within the scope of this project.

As an aside (because I didn't want to create a new issue)
Since you are mentioning arrayLcm() and lcm() I'd like to note there is already 'drift' between the implementations.
lcm() is correctly defined (from my casual research) in using Math.abs() e.g.
const lcm = (x,y) => {
  const gcd = (x, y) => !y ? x : gcd(y, x % y);
  return Math.abs(x*y)/(gcd(x,y));
};

arrayLcm() is  perhaps less correctly defined, as it skips the Math.abs() e.g.
const arrayLcm = arr =>{
  const gcd = (x, y) => !y ? x : gcd(y, x % y);
  const lcm = (x, y) => (x*y)/gcd(x, y)
  return arr.reduce((a,b) => lcm(a,b));
}

When implementing whatever change you do for these two routines, please check that the Math.abs() is used?

@tshinnic that should be a new issue, and is a great jumping point for a PR

Ah, but in one of the PRs implementing lcm() / arrayLcm() it specifically mentioned not polluting the name space - having a single version of lcm() - and so put a separate implementation inline.  Yet, having a single implementation of lcm() would have prevented this problem (lack of Math.abs()).  So until the naming is straightened out there would have to be at least two PRs, one fixing the wrong inline definition, and the other one substituting the other already defined lcm().
Unless, of course, it is somewhere stated a guideline that each snippet must be completely self-sufficient, not using other definitions, and including all dependencies inline?
Anyway, just seems intimately tied to naming issues here...?

It's because each snippet is supposed to be self contained. We aren't a library, but it does raise a different point that should be in a different issue

side note: we should update flatten to match this code from SO
@skatcat31 Agreed. Was thinking the same

I missed a couple of days of this discussion, I think we are drifting away from the original question. We mostly agree on the fact that we should try to make snippets work with either arrays or variadic arguments when possible, remove the ones that just extend native functions by a tiny bit (like arrayMax) and keep others that are examples that only specifically apply to arrays.
Seeing as we also now have adapters, I think we can get away with keeping some functions only variadic or only array-based, as adapters can deal with those relatively complex cases in order for us to focus on the implementations. Oh, and adapters show up first before arrays and other categories, so they should be the first thing anyone sees visiting the project and I sincerely hope people will figure out that they are the way to go when trying to apply a variadic function of ours to an array and vice versa.
If we are agreed on these points, let's list the snippets that we want to mark for deletion, improvement and alteration/merge and start working on PRs. Otherwise, comment below and keep the discussion on point.

@Chalarangelo I totally agree with you.

I think our original intention can't be changed，so I agree with @Chalarangelo‘s point of view.

@kriadmin @lvzhenbang reactions keep chains shorted while showing support or descent

I think we should just have a single variadic snippet.
const lcm = (...arr) => {
  const gcd = (x, y) => (!y ? x : gcd(y, x % y));
  const lcm = (x, y) => x * y / gcd(x, y);
  return arr.reduce((a, b) => lcm(a, b));
};

The examples can show how to use it with an array (just spread it -- lots of other snippets use spreading):
lcm(1, 2, 3, 4, 5);
lcm(...[1, 2, 3, 4, 5]);

This makes it like Math.X functions.

I agree with @atomiks in that we can showcase lcm and gcd working with arrays and remove the arrayLcm and arrayGcd snippets. That should be PRed asap to get these snippets cleaned up and updated. Anyone against this?

@Chalarangelo @atomiks
const lcm = (...arr) =>{
 arr = [].concat(...arr)
const gcd = (x, y) => (!y ? x : gcd(y, x % y));
const lcm = (x, y) => x * y / gcd(x, y);
return arr.reduce((a, b) => lcm(a, b))
}

Would be better for lcm([1,2,3],[5,6,7])

@kriadmin I have no problem with doing something like that, but we should never mutate arguments. Use something like let data = [].concat(...arr) instead and this should be fine (also update the return statement accordingly). I wouldn't mind merging this, as it can work with more types of input, even if a developer is not familiar with spreading and it's just one line longer (and a pretty easy line to read).

@Chalarangelo it's not being mutated there. Also it's scoped to the function, it's not changing the input

@atomiks ah you are right, my bad!

I'm confused why we want a multi adapted input as it can be prone to errors. Sure it's nifty to accept both Arrays and lone inputs, but now it's actually more error prone if the types aren't right.
const lcm = (...arr) =>{
 arr = [].concat(...arr)
const gcd = (x, y) => (!y ? x : gcd(y, x % y));
const lcm = (x, y) => x * y / gcd(x, y);
return arr.reduce(lcm)
}
lcm('yo') //"yo" <<< SHOULD BE NAN

@skatcat31 It can and it does, we might want to revert to simple variadic with better examples then.
As far as lcm's test cases are concerned, we usually aren't handling errors or bad input, but maybe this could be added into some methods to preserve the logic of them and the sanity of people using them.


fixes #634

@kenfinnigan @cescoffier @cmoulliard @lholmquist @Ladicek
Let me know what you think.

Probably a good idea to remove the "or greater" after Maven for WF Swarm, as I doubt it will work with Maven 3.4 or greater.

thanks @kenfinnigan I amended the PR per your feedback.

looks good for the node stuff

FTR, there's no Maven 3.4 and I've never seen an issue with Swarm and Maven 3.5. But I'm fine with the change, too.

merging for now, will update if @cescoffier or @cmoulliard have any additional feedback


Can't read version on latest CLI and firmware

Pretty sure this is an up-to-date T2
➜  ~  t2 update
INFO Looking for your Tessel...
INFO Connected to Tessel-02A3589D746E over LAN
Unhandled rejection TypeError: Cannot read property 'version' of undefined
    at /usr/local/lib/node_modules/t2-cli/lib/controller.js:722:52
    at tryCatcher (/usr/local/lib/node_modules/t2-cli/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/t2-cli/node_modules/bluebird/js/main/promise.js:507:31)
    at Promise._settlePromiseAt (/usr/local/lib/node_modules/t2-cli/node_modules/bluebird/js/main/promise.js:581:18)
    at Promise._settlePromises (/usr/local/lib/node_modules/t2-cli/node_modules/bluebird/js/main/promise.js:697:14)
    at Async._drainQueue (/usr/local/lib/node_modules/t2-cli/node_modules/bluebird/js/main/async.js:123:16)
    at Async._drainQueues (/usr/local/lib/node_modules/t2-cli/node_modules/bluebird/js/main/async.js:133:10)
    at Immediate.Async.drainQueues [as _onImmediate] (/usr/local/lib/node_modules/t2-cli/node_modules/bluebird/js/main/async.js:15:14)
    at processImmediate [as _immediateCallback] (timers.js:368:17)
^C^C
➜  ~  t2 version
INFO Looking for your Tessel...
INFO Connected to Tessel-02A3589D746E over LAN
INFO Tessel [Tessel-02A3589D746E] version: unknown
➜  ~

@Frijol can you get a root shell and check if a /etc/tessel-version file exists?

fix: go into dterm or ssh, etc/tessel-version, replace what's there with 1293f03d42ae00b11267e5af2d6739c8cac77165

I'll fix this on the build server. In my jet-lagged delerium last night, I forgot to make a new build of openwrt after I merged my version bump into master - so the commit sha that was saved (and how we fetch the version) was of my branch, not master.

I fixed this on AWS.


feat: 3565 - badge on bottom bar about background tasks and access to list

Impacted files:

app_en.arb: added 9 labels related to background tasks
background_task_manager.dart: added an error/status for each task; removed the concept of "blocked" task manager
offline_tasks_page.dart: localized and added error labels
page_manager.dart: added a badge on bottom bar about pending background tasks
pubspec.lock: wtf
pubspec.yaml: added a dependency to badges
user_preferences_dev_mode.dart: removed the access to the pending background task page
user_preferences_page.dart: added a direct access to the pending background task page

What

It was getting too tough to guess what was going wrong with background tasks, especially when you cannot reproduce the errors locally
With this PR we have a badge on the bottom bar with the number of pending background tasks.
With this PR we also have a direct access to the pending background task page directly from the Profile tab (down under)
Hopefully we'll have a clearer view about what's going on.
The PR also fulfills the user's need to understand if the changes were indeed taken into account - or not.

Screenshot
For the test, I switched off the wifi and edited 3 details.
The first "no internet" error blocks everything (there's no point trying the other 2 without internet).

Then I switched on the wifi: the first task started.

One by one the tasks are executed.

The pending background task page can be accessed from the main profile tab.

Fixes bug(s)

Closes: #3565

Can we possibly rename it "Pending edits on your device" ?

Can we possibly rename it "Pending edits on your device" ?

I don't mind changing labels. Yours is indeed better. I would even suggest "Pending edits to the server", with a subtitle about the crowdsourcing and the need to update the server.
I can change the labels tomorrow morning.

Just a quick observation: it could be confusing to se a badge, click on it and then see nothing about what is creating the badge. If we could add even a little blue point right next to the label it could mean a lot for the user IMO.

We could demote it in the settings sections about Background tasks

@teolemon @VaiTon I've tried to take into account your remarks for the profile part:

changing the title
adding a subtitle
adding the badge
but as there's no Background Task section in the profile AFAIK I couldn't move it there

Looks good

Looks good

Thank you @teolemon!
Remember that this PR won't solve the errors, it will just show each next background task error.
The sooner this PR gets merged, the closer we are to a better understanding of what goes wrong with some background tasks.


Add the hardware ID reported by cpuinfo on RPi4.

Fix "This gem can only be run on a Raspberry Pi message"

We keeping track of our patches on this branch.


Improved installations instructions to include Protobuf installation

Protobuf is an important dependency of the sim-ln project  as it powers GRPC communication which the lighning nework uses for client communications .
During installation of Sim-ln , one is likely to run into error due to protobuf not being installed on their device . This PR spells out how to install protobuf. This PR is as result of this issues 198

Closing due to inactivity, please re-open if you'd like to pick this back up!


fix(hmr): fix hmr when using h2 and use merge config

Description
Sets vite hmr server to use fastify. This fixes #109 and will allow users to use https and h2 with @fastify/vite. Also uses mergeConfig and defineConfig for hassle free recursive config merging and type safe config declarations.
Checklist

[x] run npm run test and npm run benchmark
[x] tests and/or benchmarks are included
[x] documentation is changed or added
[x] commit message and code follows the Developer's Certification of Origin
and the Code of conduct

@galvez there is a task to run the benchmark, but I don't see benchmark listed as a script in the package.json.

Thank you! Let me run the test suite and I'll merge and release this.

@galvez there is a task to run the benchmark, but I don't see benchmark listed as a script in the package.json.

Yeah, that needs some maintenance work.

@galvez any feedback for this pull request? Please let me know if anything needs to be adjusted

Hey there — I should push out a new release with this by Monday. Thank you!