Fix CORS preflight requests

Currently the custom CORS middleware that the server has doesn't handle OPTIONS requests which are used to check the CORS policy of the server.
Got rid of the custom cors middleware and express's official cors middleware which handles all the nitty gritty of CORS requests. I made sure I pass all current CORS header values to the cors middleware
We use this API at repl.it for people to search for packages and add them to their HTML. All our requests are preflighted making the API unusable for us. We circumvented the issue by removing the content type (json) header, and will probably proxy the API through our servers for extra safety until this is deployed.
Thank you!

I wonder if it'd also be worth adding options tests to each route, just to ensure this isn't accidentally broken down the road?

Yeah I can add exhaustive tests!

Hey @masad-frost, just wanted to check in on this. If you don't have time to add these extras, I'm happy to either push to your fork, or to merge this and then make the changes after. Let me know what works best for you! :)

Hey, sorry about this. I can do it this weekend. Feel free to merge and I'll follow up

Updated, added to tests to all routes. Disclaimer, I used macros to add those since all the tests have the same format! So hopefully my laziness didn't make me miss anything.

Hey @masad-frost,
Would you like me to handle rebasing this and adding in the missing CORS tests, so that we can get this merged?

On my list today! Thanks for the reminder
On Wed, Jun 3, 2020, 3:35 AM Matt (IPv4) Cowley<EMAIL_ADDRESS>wrote:

Hey @masad-frost https://github.com/masad-frost,
Would you like me to handle rebasing this and adding in the missing CORS
tests, so that we can get this merged?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/cdnjs/api-server/pull/17#issuecomment-638110447, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAPG2LGD6FGCXIEIAXVBI5LRUYRPZANCNFSM4NET66SA
.

Hey @masad-frost -- apologies for pinging again but I just wanted to check in on this as it sounds this was originally created due to this causing issues for you in production, so we'd love to get this shipped to help y'all out.
If you don't think you'll have the time to get this ready to be landed I'm happy to take over and add the missing tests + rebasing :)

Oh boy, my bad. On it!

Should be good to go now!

Thanks for pulling this in and maintaining cdnjs!
No rush, we're proxying requests through our domain right now. Here it is in action:

Heh, awesome! Love seeing easy to use UI for bring cdnjs libraries in.
My one suggestion would be to encourage you to default to including the integrity attribute on the asset includes (CSS & JS) — SRI data should be available in the library API responses :)

Sweet, will add it.


Update dependencies

Summary
This PR updates a few dependencies which were recommended to us by our automations.
It includes updates to:

EUI (to solve problems for for the downstream dependencies)
trim
react-scripts

Furthermore, it also adds a missing dependency (styled-jsx) to our demo-app.
⚠ Please notice that we couldn't update ansi-html because there's no fix available upstream. It shouldn't be a problem though given that ansi-html seems to only be used by webpack-dev.
Implementation details
There are two important implementation details to notice about this PR:

I've had to use npm-force-resolutions to force trim to resolve to necessary version.
I had to use the npm-force-resolutions package because trim was used by a dependency of EUI, which wasn't updated upstream.
The UI changed slightly with the update to EUI.
I did try to make it look as much like the previous version as possible, but a few changes weren't parameterised, so I assume that's because the design team wants components to look that way across all products.
⚠ Please also notice that the theme we were using is now a legacy theme. You can see this change in EUI's repo here.

How to validate this change

Run an installation and all tests locally.
Use the recorder to record a couple of scripts and ensure it still works.
Try to export code (using the fly-out too).
Navigate around and make sure you're happy with its overall look and feel.
Confirm you're happy with the visual changes due to the EUI update.
Before

After

:broken_heart: Build Failed

the below badges are clickable and redirect to their specific view in the CI or DOCS

Expand to view the summary

Build stats

Start Time: 2022-01-04T14:04:30.666+0000

Duration: 10 min 41 sec

Commit: 8ee492d801ad2edc151e7487cb9839aa1ce12452

Test stats :test_tube:

Test
Results

Failed
0

Passed
53

Skipped
0

Total
53

Steps errors
Expand to view the steps failures

Shell Script

Took 4 min 46 sec . View more details here
Description: docker build -t 67e97c44ae70fb6ab2c6bbcb4ea420981350005c --build-arg BASE_DIR="." --build-arg DOCKER_BASE_DIR="/synthetics-recorder" --build-arg DISPLAY=":99" -f "src/github.com/elastic/synthetics-recorder/./e2e/Dockerfile.jenkins" "src/github.com/elastic/synthetics-recorder"

:robot: GitHub comments
To re-run your PR in the CI, just comment with:

/test : Re-trigger the build.


Implement additional coverage metrics

[ ] Statement Coverage
[ ] Branch Coverage
[ ] Path Coverage?
[ ] Def-Use Coverage??

A small update on the matter:

JaCoCo and most other coverage tools to not offer per-test coverage report. They only report the covered lines of the entire specified test suite. This is bad, as we need the per-test information
IntelliJ IDEA supports executing an individual TC and collecting the coverage result as a report in HTML. Not ideal but perhaps a fallback approach
JCov seems to support per-test coverage information so we're going to give this a shot
OpenClover support(-s/-ed) per-test coverage info but the tool was not updated for several years

Jcov is dead (build does not work, very weird github repo, no support apparently)
OpenClover does not even support JUnit5

Therefore: create one JaCoCo report per TC
JaCoCo report: https://stackoverflow.com/questions/33868761/how-to-interpret-the-jacoco-xml-file


Adding a Java function fails to pull deps with Gradle 7

Before opening, please confirm:

[X] I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
[X] I have searched for duplicate or closed issues.
[X] I have read the guide for submitting bug reports.
[X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
12
Amplify CLI Version
5.0
What operating system are you using?
AL2
Amplify Categories
function
Amplify Commands
add, init, push
Describe the bug
For a fresh Java lambda project, I followed the CLI's suggestions for installing dependencies. When it got to gradle, the gradle website suggests using 7.1 however that version fails to compile as the gradle file syntax has changed in 7.
Expected behavior
Creating a new Java project works with the latest gradle out of the box. Worked around by downgrading to gradle v5.
Reproduction steps

Create a new project folder
amplify init
amplify add function
Select java and defaults for the rest of the questions
amplify push
Notice build failure

GraphQL schema(s)

# Put schemas below this line

Log output

# Put your logs below this line
Command failed with exit code 1: gradle build
FAILURE: Build failed with an exception.
* Where:
Build file '/local/home/srquinn/opensrc/testproject/amplify/backend/function/testproject56617327/build.gradle' line: 13
* What went wrong:
A problem occurred evaluating root project 'testproject56617327'.
> Could not find method compile() for arguments [com.amazonaws:aws-lambda-java-core:1.2.0, com.amazonaws:aws-lambda-java-events:2.2.7] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 516ms
An error occurred during the push operation: Command failed with exit code 1: gradle build

Additional information
No response

The current template that is packaged with the CLI does not support Gradle 7, but after add function you can migrate it to Gradle 7 as the CLI just invokes it for compiling, as long as the input and output has not changed for Gradle, we just validate minimum version 5.

@attilah  We should document this behavior with the latest Gradle in our official docs, in this section probably - https://docs.amplify.aws/cli/function#supported-lambda-runtimes cc @renebrandel

For all new projects (using a feature flag), we should update our template to support gradle 7


Works fine, but not unattended (batch)

I've set up and have been usuing HackBGRT manually on multiple computers, and it works fine.
However, when I do it unattended/silent/batch mode from a script I get an error message during boot just before the new background image is displayed. It still works, but the error message is confusing to users.
The command lines I have tried are:
setup.exe batch install
setup.exe batch install allow-secure-boot
setup.exe batch install allow-secure-boot enable-overwrite enable-bcdedit enable-entry
All of these lead to the error message.
When I do a manual install (Press "I" at prompt, close Microsoft Paint when opened, press the "anykey" when done) I do not get the error message.
How can I do a batch install that does exactly what the manual install does (except prompt and open Paint, obviously)?

You need to attach the error and preferably the log file (setup.exe batch show-boot-log and the attach setup.log) to get any help with this.

Thank you :)
Well, the question was "How can I do a batch install that does exactly what the manual install does", and I found the answer in the code of course. I feel a little ashamed to ask before properly checking. Sorry.
Hitting "I" obviously sets the program up to do disable, install, and enable-bcdedit.
So the equivalent command line would be setup.exe batch disable install enable-bcdedit.
This did indeed solve the problem.
My theory is that I created the problem for myself when I initially ran just setup.exe batch install, and since my subsequent commands did not include disable it never sorted itself out.


[DO NOT MERGE] - Enable new mapit for deployment to production

Enable mapit in the backend api's section for deployment to production.
Removed temporary overriding of the load balancer configuration in integration which was done in this previous commit.

This will switch the loadbalanced address of mapit to point to the new machines rather than the old ones. Merge when you're ready :+1:

Hold off for a bit, we're going to do Staging first.


Stuck on loading skeleton when opening search

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Version Number: 9.0.69-1
Reproducible in staging?: Y
Reproducible in production?:
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?:
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @youssef-lr
Slack conversation (hyperlinked to channel name): ts_external_expensify_quality
Action Performed:

Go to staging.new.expensify.com
Click search

Expected Result:
Expense page displayed
Actual Result:
Loading skeleton displayed
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[ ] Android: Standalone
[ ] Android: HybridApp
[ ] Android: mWeb Chrome
[ ] iOS: Standalone
[x] iOS: HybridApp
[ ] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[ ] MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/user-attachments/assets/97ef3698-63fe-4743-83cb-c0427e986ecf

https://github.com/user-attachments/assets/373f9e83-f9e9-48d7-ae6a-b673790f78cc
View all open jobs on GitHub

Proposal
Please re-state the problem that we are trying to solve in this issue.
Search section loads infinitely when opened after logging in
What is the root cause of that problem?
We called the search API with this jsonQuery, but the response returned an empty onyxData array.
jsonQuery: {"type":"expense","status":"all","sortBy":"date","sortOrder":"desc","filters":null,"inputQuery":"type:expense status:all sortBy:date sortOrder:desc","hash":243428839,"recentSearchHash":422547233,"offset":0}

The reason for the empty onyxData array might be that the backend validated the query as having the wrong format or something similar.
And since onyxData is an empty array, shouldShowLoadingState always returns false, which is why the loading state is not hidden.
https://github.com/Expensify/App/blob/9933888bd1576e2723560b938945b805b8a8d3d3/src/components/Search/index.tsx#L222
https://github.com/Expensify/App/blob/9933888bd1576e2723560b938945b805b8a8d3d3/src/components/Search/index.tsx#L309
What changes do you think we should make in order to solve the problem?
To resolve this issue, we need to do two things:

Double-check the JSON query to match the backend's requirements.
Handle the case where onyxData is an empty array.

https://github.com/Expensify/App/blob/9933888bd1576e2723560b938945b805b8a8d3d3/src/components/Search/index.tsx#L308
    if (searchResults === undefined && !isOffline) {
        setShouldShowStatusBarLoading(false);

        return (
            <View style={[shouldUseNarrowLayout ? styles.searchListContentContainerStyles : styles.mt3, styles.flex1]}>
                <EmptySearchView type={type} />
            </View>
        );
    }

POC
https://github.com/user-attachments/assets/9dbc71d4-3779-4c1a-a389-83213b48f445

What alternative solutions did you explore? (Optional)

related https://github.com/Expensify/App/issues/53285

Thanks @huult, I think we can close this in favor of the other issue.


[gosrc2cpg] - Receiver node or thisParameterIn node handling while processing method declaration

Changed the signature of x2cpg NodeBuilders.newThisParameterNode method to take name and code as a parameter and set defaults to this. This is done to use the receiver name as is defined in the code instead of naming it as this. This will make sure to have ref edges built as natural processing of Identifiers.  Have updated the places where this method was getting called to adjust with the updated interface.
ThisParameterNode handling while generating AST for method declaration that can be called with struct  type receiver

type Rect struct {
  len, wid int
}

func (re Rect) Area_by_value() int {
  return re.len * re.wid
}

@DavidBakerEffendi I pushed one more fix for another ignored Unit test


RagneBar Thumb value restricted to 4 digits

I want to display the value for custom:tickEnd="50000" but it displaying  5000 only

This should fix your problem:
rangeBar.setPinTextFormatter(new RangeBar.PinTextFormatter() {
@Override
public String getText(String value) {
return valuel;
}
});

Thank you guys for your reply
On Wed, Dec 21, 2016 at 10:15 PM, Mario Dennis<EMAIL_ADDRESS>wrote:

This should fix your problem:
rangeBar.setPinTextFormatter(new RangeBar.PinTextFormatter() {
@Override https://github.com/Override
public String getText(String value) {
return valuel;
}
});
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/edmodo/range-bar/issues/46#issuecomment-268571549,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMXIaIvrpTktzhL7H0_28yQqPmYXbK-Vks5rKVedgaJpZM4KWrzC
.

--
Thanks and regards,
Rajkumar

Please close the issue if you problem as been resolved


PeerJ R2C7

Section 2
The motivation of this journal should not be the career of the research software engineers. It should be good scientific practice. As a side effect it could help the career development, but this problem relates more the reward and evaluation system in place in many academic institutions.
Having this journal may solve one aspect, but not the actual cause of lack of career perspectives of software engineers in the scientific community. This is to be addressed in the academic system, in particular the leadership of it.
That developers shun away from publishing a citable paper is not a strong argument. They should do so as part of good scientific practice since it contains an independent peer-review quality check, a time stamp and allows for referencing. The notion that a paper is also a time stamp recognizing the original contribution of the author to the scientific process could also be more clearly spelled out.
Note that there are quite a few domain specific journals that do not require new scientific results. From my own personal experience, as an editor of one of them, it is more a problem of culture. The reviewers focus a lot on the scientific results and find it hard to review papers purely based on methodologies and tools.

I'm not really sure if we should address this or not, but if so, I suggest:
There are a number of challenges related to the culture of science, including in many fields, how it recognizes digital products, provenance and reproducibility, and many sociologic issues, including recognition of individuals outside publications, diversity, etc. JOSS is not trying to directly solve this complete problem, but focuses on a small part, that of recognition of software and software contributors. If we are successful in our part, this will impact the overall culture of science.

I agree with @danielskatz's suggested response.

I did not make a change to the paper, but added this in response to the reviewer:

There are a number of challenges related to the culture of science (in many fields): how it recognizes digital products, provenance and reproducibility, and many sociological issues, including recognition of individuals outside publications, diversity, etc.  JOSS is not trying to directly solve this complete problem, but focuses on a small part: recognition of software and software contributors.  If we are successful in our part, this will impact the overall culture of science.


get tweet keyerror

Unhandled exception in internal background task 'get_latest_tweet'.
Traceback (most recent call last):
File "C:\Users\super\Anaconda3\envs\discord\lib\site-packages\discord\ext\tasks_init_.py", line 169, in _loop
await self.coro(*args, **kwargs)
File "C:\Users\super\OneDrive\GitHub\FinTwit_Bot\src\cogs\loops\timeline.py", line 127, in get_latest_tweet
tweets = await get_tweet()
File "C:\Users\super\OneDrive\GitHub\FinTwit_Bot\src\util\get_tweet.py", line 55, in get_tweet
tweet = result["data"]["home"]["home_timeline_urt"]["instructions"][0][
KeyError: 'entries'

catching error now, still unclear why it happens

Does not seem to happen anymore??


Pass effective kubelet version to controlplane ensurer

How to categorize this PR?

/area usability
/kind enhancement
/merge squash
What this PR does / why we need it:
After https://github.com/gardener/gardener/pull/4971 it is possible to have different Kubernetes versions for worker pools of Shoots. The provider extensions need to be able to properly deal with this situation. This PR tackles this part by

adapting the generic controlplane mutator to pass the effective kubelet version to the ensurer
documenting that provider extensions with CSI migration should implement validation to prevent different worker pool Kubernetes versions (compared to control plane version) when CSI migration version is not reached.

Which issue(s) this PR fixes:
Part of https://github.com/gardener/gardener/issues/3501#issuecomment-1009061189
Release note:

The `genericmutator.Ensurer` interface methods concerning kubelets were extended with an additional parameter for the effective kubelet versions. Implementors of this interface should make use of this parameter instead of parsing the version from the `Cluster` object.

In order to prepare provider extensions with CSI migration for supporting different Kubernetes versions per worker pools, the validation for `Shoot` resources should be extended according to [this document](https://github.com/gardener/gardener/tree/master/extensions/pkg/controller/csimigration/README.md#how-does-csi-migration-work-in-general).

/assign

/assign

I cannot say I am very familiar with https://github.com/gardener/gardener/issues/3501#issuecomment-1009061189 or with the changes from this PR. I left 1 comment from an overall look.
/unassign


Publish With Yarn

@fearthecowboy,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

win32-x64 restart

publish job


Ac 178

numpy requires Python >= 3.7.
https://pypi.org/project/numpy/
Need to think through how to resolve this.


Update catalog task to take stac input file

Addressed in https://github.com/unity-sds/unity-data-services/pull/152


Timeline bar incorrectly shows madcap application in the foreground

See https://github.com/FraunhoferCESE/madcap-analysis/issues/140

Possibly related to #175


django-paypal ipn server-side only, is it possible ?

Hello in my project I wanted to implement only server-side PayPal and I made this code
def checkout_paypal(request, pk):

    order = get_object_or_404(Order, pk=pk)

    # What you want the button to do.
    paypal_dict = {
        "business": settings.PAYPAL_MERCHANT_EMAIL,
        "amount": order.get_total_price_usd(),
        "item_name": order.get_order_items_name(),
        "invoice": "#" + order.reference,
        "notify_url": request.build_absolute_uri(reverse('paypal-ipn')),
        "return": request.build_absolute_uri(reverse('payment:checkout_success', kwargs={'pk': pk, })),
        "cancel_return": request.build_absolute_uri(reverse('payment:checkout_cancel', kwargs={'pk': pk, })),
        "custom": "premium_plan",  # Custom command to correlate to some function later (optional)
        "cmd":"_xclick",
        "charset": "utf-8",
        "currency_code": "USD",
        "no_shipping": "1",
    }
    # Create the instance.
    # form = PayPalPaymentsForm(initial=paypal_dict) # I don't need this
    # context = {"form": form} # I don't need this

    paypal_url = "https://www.sandbox.paypal.com/cgi-bin/webscr"

    data = urllib.parse.urlencode(paypal_dict)
    data = data.encode('ascii')
    user_agent = 'Mozilla/5.0 (Windows NT 6.1; Win64; x64)'
    headers = {'User-Agent': user_agent}
    req = urllib.request.Request(paypal_url, data,headers)
    with urllib.request.urlopen(req) as response:
        try:
            return redirect(response.url)
        except:
            return render(request, "payment/checkout/checkout_error.html", context)

I submit PayPal form directly on the view using urllib to post data. And I redirect the user to the PayPal website payment directly, skipping that PayPal button because of my specific need on my project.
Do you think it is ok to use this approach or there will be some issues that I didn't notice ? Thanks

If you are using a redirect to send the user to PayPal, you are putting the data in GET parameters instead of putting in POST parameters, which is not standard and potentially has issues. I'd recommend an auto-submitting button - it can be invisible, but it should do a POST to PayPal, not GET.
I didn't understand the bit about submitting data to the view using urllib, I don't know why that would be necessary or which view your are talking about.

I am not redirecting (using GET) to the URL in <form action="..." method="post" ...
which is
https://www.sandbox.paypal.com/cgi-bin/webscr.
I am posting to it using POST in this line :
req = urllib.request.Request(paypal_url, data,headers)
and then I get response from PayPal :
return redirect(response.url)
and the response contains  this URL :
https://www.sandbox.paypal.com/webapps/hermes?token=2F100927MF229134D&useraction=commit&mfid=1590850374211_b61a8b188ab61
PayPal redirects us to this new url for payment, which contain get parameters with a unique token, and this url can be accessed using GET.
This latter url is  the true payment url that can be accessed with GET ( can be redirected to ) and can lead us to this payment page
I even copied this url in another browser and still give me the payment page, so I noticed that it can be used programatically.

What  do you think ?

What can you do with that URL? You can't log in, because you don't have the user's credentials (and it would be a very idea or impossible or illegal to get them). The only thing you can do is to send the user to this URL, which is exactly the same as what happened before. Except the normal way is the way PayPal supports.

Yes I send them to that URL and its for them to enter their credential, but the only positive thing I see here is that they can't change the button hidden inputs.
It works perfectly on development but I don't know if it will work on production. If not I will use an auto-submitting button, thanks for mentioning that.

You really shouldn't do it any other way than how the PayPal docs say, there is no guarantee that other methods will work or carry on working. There is no real advantage to stopping people from changing hidden button inputs because you must checking values when they come in anyway.


Specify directory path for native dlls

When I used the library from an asp.net site that I developed, SQLitePlatformWin32 threw an exception because it couldn't load the native dll. this is happening because when you debug your asp.net site, windows uses a temp path to hold your site's assemblies. if I could just specify it where it can find the native dll's the problem will be solved.

Hi, take a look at the following method:
static SQLiteApiWin32Internal()
This is where I do the LoadLibrary magic to preload the sqlite dll, it's a bit tricky to make this configurable since it is a static ctor right now, but I suppose I could change it to be instanced and initialized through the platform.
It does seem a bit like a hack though, why is content not copied when running tests?

Hi, as I already said, when I debugged my asp.net application I realized that microsoft did a strange thing and put every dll of the project in a different temp folder and the sqlite dll was alone in a folder with no x86 or x64 folders around it. Of course I tried forcing it to copy those folders local with no success. I did build a dll of my own that does set some static property so I could specify where the dlls are and it seems like a legit feature to me. Of course the static property is not a good practice solution. Look, I think that for some people it can be useful. It was critical for me. An optional parameter can be nice... But it's not a must-have change. Best of luck!

I'm closing this since I think it is fairly low priority.
If someone wants to work on this feel free to send a PR:)

I just made a PR for this one #189


Add version: CodeF0x.violin version 3.1.1

Pull request has been created with WinGet Automation 🪟📦🤖
Microsoft Reviewers: Open in CodeFlow

InstallerUrl contains Manifest version instead of PR version:
PackageVersion: 3.1.1   InstallerUrl: https://github.com/CodeF0x/violin/releases/download/v3.1.1/violin-setup-windows.msi
(Automated message - build 601)


license management

Missing what you have to do   if you will allow only Project for web  (the new approach) and not Project Online (the old way using PWA instances)

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

ID: 0995559d-622b-c2d1-3133-9cf267de4a65
Version Independent ID: b21ea8a9-c3fa-9cf5-ae66-58ac96cf1f6d
Content: Turn off Project for the web for users in your organization
Content Source: ProjectWeb/turn-project-for-the-web-off.md
GitHub Login: @efrene
Microsoft Alias: efrene

If you want only Project for the web, but not Project Online or Roadmap, you can get the Project Plan 1 license.  If you want Project for the web and Roadmap, you would need either the Project Plan 3 or Plan 5 license, but you would have to disable the Project Online service for the user.   I updated the article with information on how to do this.  Thanks!

@funzel1 Thank you for submitting feedback. We understand that this issue has been resolved.
Please feel free to re-open this issue if there is a specific area of the docs that we can improve or make better. Thank you.


win: let UV_PROCESS_WINDOWS_HIDE hide consoles

For a while now, Node users on Windows have reported that console windows sometimes pop up when spawning child processes. libuv has the UV_PROCESS_WINDOWS_HIDE flag, that is supposed to solve this problem. I tried exposing the flag to Node in https://github.com/nodejs/node/pull/15380, but it didn't seem to fix the problem.
UV_PROCESS_WINDOWS_HIDE was added in https://github.com/joyent/libuv/pull/627. That PR states:

UV_PROCESS_WINDOWS_HIDE enables suppression of process windows when launching subprocesses on Windows platforms from a executable linked to the WINDOWS subsystem (as opposed to the CONSOLE subsystem).

In #965 @saghul mentioned that Electron is setting the CREATE_NO_WINDOW flag on child processes to suppress console windows.
In this PR, I'm proposing that UV_PROCESS_WINDOWS_HIDE should hide console windows too. I believe this behavior would better align with user expectations.
cc: @bzoz
CI: https://ci.nodejs.org/view/libuv/job/libuv-test-commit/485/

I think it still does not work with (https://github.com/nodejs/node/issues/15217#issuecomment-331860528). There is quite a handful of moving parts here, I'll try to test this with some smaller C program.

@bzoz is there any chance that your custom build of Node is spawning the system version of Node, which actually spawns the process? Or, did I make a mistake in my PR, and the flag is not being properly propagated to the uv_spawn() call? Between our existing implementation, and the changes pulled in from Electron, it seems like this shouldn't still be happening. I'm interested to see what you find outside of the context of pm2, which is a lot of moving parts, as you point out.

I've wrote that small C app. This PR works, console window does not appear with UV_PROCESS_WINDOWS_HIDE set (and appears with flags set to 0). On a side note, the console window will also not appear when the UV_PROCESS_DETACHED flag is used.
I don't know how PM2 turns Node into a daemon, nor what happens inside it when you ask it to spawn new Node instance. But with this PM2 devs will be able to work this out.


Spike for adding dynamic, live alerts example to docs

Spiking out an option for #31330 to add some live examples of alerts (toasts are already there). Ideally we could include more JS folks could copy-pasta to use in their own environments, so hoping to get some help cleaning up the additions in application.js because right now it's not the best and doesn't scale beyond this one demo.
/cc @patrickhlauke as issue author
/cc @planetoftheweb since he mentioned better snippets in our docs

Sorry to sound like a newbie, but I'm not too sure how to help. I don't know what a spike is and where to add examples other than here. The alerts look real good, my main problem was with the toasts, which require some addtiional Javascript Activation.
Basic Toast

Basic Toast

<button type="button" class="btn btn-danger" id="basicToastBtn">Join us</button>

Join Our Company

      Mind Numbing Products is a force in the manufacturing and production market. Our motto is If it’s not Mind Numbing, it’s not worth it.

And the JavaScript to activate it
document.querySelector("#basicToastBtn").onclick = function() {
 new bootstrap.Toast(document.querySelector('#basicToast')).show();
}

Here's a sample of a Multiple Toast Element with different options.

Toast Options

Basic Toast

<button type="button" class="btn btn-primary" id="basicToastBtn">Join us</button>
<button type="button" class="btn btn-info text-white" id="infoToastBtn">Info</button>

Join Our Company

      <button type="button" class="btn-close btn-close-white" data-bs-dismiss="toast" aria-label="Close"></button>

      Mind Numbing Products is a force in the manufacturing and production market. Our motto is If it’s not Mind Numbing, it’s not worth it.

As experts in lifting, moving, and nuts-and-bolting, the robotic population is an ideal match for industry and repetitive tasks.

      <button type="button" class="btn-close btn-close-white ms-3" data-bs-dismiss="toast" aria-label="Close"></button>

and the corresponding JavaScript
document.querySelector("#basicToastBtn").onclick = function() {
 new bootstrap.Toast(document.querySelector('#basicToast')).show();
}

document.querySelector("#infoToastBtn").onclick = function() {
 new bootstrap.Toast(document.querySelector('#infoToast')).show();
}

sorry, very late to the party here, but I checked those examples, and they look good to me - work as expected with screen readers etc

@GeoSot should we close the previous alert if it's still open? Just wondering.

@XhmikosR I don't find any reason to complicated more :confounded:

Yeah, sounds good to me. I was just wondering :)


Version in API

Create  versioning for APIs.
Ex:
api/v1/service
api/v2/service

I wanna take this on. Is there a specific idea you have in mind? As in, how is versioning defined? In the config.py file, YAML files or somewhere else?

I think this would be a good solution.
https://cbron.github.io/blog/2014/07/03/versioning-a-flask-restful-api/
Replay the service.py and create a behave.


Include Darwin arm64 builds in the NPM package

Right now both the VSCode extension for ReScript and the NPM reanalyze package don't have any executables for arm64 devices

This should be doable following what the compiler does.
CC @cknitt

It seem the rescript-vscode CI already builds the ARM64 binary?
https://github.com/rescript-lang/rescript-vscode/blob/dab2a95ae760d2a0f942348125664fc855b6b340/.github/workflows/ci.yml#L23
For this repo (reanalyze), the problem is that the ARM64 runner on our Mac Mini M1 is only added to the rescript-lang organization, not the rescript-association organization. (To make it availabe for the rescript-association organization, we would need to start a second runner instance on that machine which I would like to avoid.)

Sorry I did not pay attention this is the reanalyze project.
Should update the readme.
Development has moved inside the vscode extension.
This repo is for use with opam.

It seem the rescript-vscode CI already builds the ARM64 binary? https://github.com/rescript-lang/rescript-vscode/blob/dab2a95ae760d2a0f942348125664fc855b6b340/.github/workflows/ci.yml#L23
For this repo (reanalyze), the problem is that the ARM64 runner on our Mac Mini M1 is only added to the rescript-lang organization, not the rescript-association organization. (To make it availabe for the rescript-association organization, we would need to start a second runner instance on that machine which I would like to avoid.)

My apologies for opening an issue in the wrong repo. I looked at the extension and it looks like it does build and ship an arm64 binary, but the extension code uses the wrong binary. I'll open an issue on the extension repo


Added CQUniversity to domain list.

Link to University https://www.cqu.edu.au/
Email Domain cqumail.com or cqumail.com.au

@TNChalise Please provide us with an URL of a page or another proof (.pdf or a screenshot are OK) showing that the university recognizes the domain which you are submitting as an official email domain for the students.

Email Domain Url: http://mail.cqumail.com,
Email Address Working Screenshot: https://snag.gy/56qgkE.jpg
Hope this helps.

@TNChalise Thank you for the clarification. Pull request merged.


Fix tests

Not sure if anyone noticed but travis is complaining now 😉  This should fix it.

trivial #767 related fixes
not sure why blockchain.py was broken though, could be smth in latest merge/force-push but I don't see anything suspicious... hopefully nothing bad - (mainnet) reindex worked fine for me.

Awesome, thanks!


ATTDEF Value Always Equal to Default

Apologies if this has been asked before. I looked through the issues and the only other issue that seems maybe related is #221, so perhaps this type of block object just isn't compatible with the dxf format. If that's the case, please just let me know and close the issue. However, I'm really just looking for the text values on the autocad block object. Maybe it's not stored on the individual ATTDEF entities?
Describe the bug
When reading a DWG file, the Value property of an ATTDEF object always returns the default value for the autocad block attribute.
To Reproduce
It doesn't look like I can upload a sample DWG, but in short, I have an autocad block with attributes. This, for example:

and I want to get the values that have been set. But when reading the file, I only see the default values. I'd be happy to send over an example file if need be.
Expected behavior
A method to read the user-set values on the attributes of the block.
Screenshots
Additional context

Hi @prestsauce,
The issues are not related and you don't have to worry about asking, if there is an existing issue that may help you I'll show you the link to it so feel free to ask anything.
About your issue, I think that you are looking in the Blocks table instead of the Insert entities, it would help to have a sample of the code that you are using to confirm that but this is how you can find the values in the attributes:

CadDocument.Blocks > this is the table of blocks where you have your "blueprints" to create the Insert entities, so all the attributes in the blocks are AttributeDefinitions which are used as a template to instantiate the attribute in the model.
CadDocument.Entities > here is where your drawing is, all the objects that you can see in the drawing are here, to find the attributes with the value set you need to look for the entities Insert, which are the block references that are drawn in you file, there you only need to navigate throw the Attributes list in the Insert and get the values that are stored in the property Value.

Here is a quick code example:
	foreach (var item in doc.Entities.OfType<Insert>())
	{
		foreach (var att in item.Attributes)
		{
			Console.WriteLine(att.Value);
		}
	}

Hope this helps, let me know if you need anything else.

Thanks for the quick response. I was viewing the entities, which is why it was so confusing.
Turns out it's an issue with how AutoCAD saves the file when a single block is saved using the WBLOCK command. The newly created file is the raw block definition (not sure if the terminology here is correct or not). When reading that file, I'm getting the raw values, which I would say is expected behavior in that case.
I'm going to close this. Thank you for your help!


Compatability with VACmap

Operating system

Operating System: CentOS Stream 8
CPE OS Name: cpe:/o:centos:centos:8
Kernel: Linux 4.18.0-553.6.1.el8.x86_64
Architecture: x86-64

Package name
version of pbsv: 2.9.0 (commit v2.9.0-2-gce1559a). I installed and run pbsv via conda env.
Which package / tool is causing the problem? Which version are you using, use tool --version. Have you updated to the latest version conda update package? Have you updated the complete env by running conda update --all? Have you ensured that your channel priorities are set up according to the bioconda recommendations at https://bioconda.github.io/#set-up-channels?

Yes I have tried all of above.

Conda environment
conda list
# packages in environment at /stornext/snfs4/next-gen/scratch/ryan/tools/miniconda3/envs/pbsv:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
ca-certificates           2024.7.4             hbcca054_0    conda-forge
certifi                   2020.6.20          pyhd3eb1b0_3
ld_impl_linux-64          2.40                 hf3520f5_7    conda-forge
libffi                    3.4.4                h6a678d5_1
libgcc-ng                 14.1.0               h77fa898_0    conda-forge
libgomp                   14.1.0               h77fa898_0    conda-forge
libsqlite                 3.46.0               hde9e2c9_0    conda-forge
libstdcxx-ng              14.1.0               hc0a3c3a_0    conda-forge
libzlib                   1.2.13               h4ab18f5_6    conda-forge
ncurses                   6.5                  h59595ed_0    conda-forge
openssl                   3.3.1                h4bc722e_2    conda-forge
pbsv                      2.9.0                h9ee0642_0    bioconda
pip                       20.1.1             pyh9f0ad1d_0    conda-forge
python                    2.7.18               h42bf7aa_3
python_abi                2.7                    1_cp27mu    conda-forge
readline                  8.2                  h5eee18b_0
setuptools                44.0.0                   py27_0
sqlite                    3.46.0               h6d4b2fc_0    conda-forge
tk                        8.6.14               h39e8969_0
wheel                     0.37.1             pyhd3eb1b0_0
zlib                      1.2.13               h4ab18f5_6    conda-forge

Describe the bug
I was trying to run pbsv on BAM files aligned by VACmap (https://github.com/micahvista/VACmap). I added the option when run VACmap to generate the RG tag (ID and SM) required by pbsv. However, after mapping, I found it failed to generate the rg tag so I
manually added the tag by samtools addreplacerg -@8 -r "ID:${rg_id}" -r "SM:${rg_id}" -o rg_added_${bam_basename} ${bamfile}. the results of samtools view -H are attached.

I tried to run pbsv on bam files aligned by pbmm2, minimap2, and VACmap. Only the VACmap bams failed at pbsv discover step
Error message

fail to run pbsv discover

cat archieved_after_adding_rg/pbsv_527127_4294967294.err
/var/spool/slurm/d/job527127/slurm_script: line 34: 846115 Killed                  pbsv discover --max-skip-split 100 ${input_bam} ${output_name}.svsig.gz
>|> 20240810 05:40:33.937 -|- FATAL -|- Run -|- 0x7fcda849fbc0|| -|- pbsv call ERROR: Input file does not exist: 'hg002_pacbio_vacmap.svsig.gz'

I also encountered the 'out of memory' error. Does pbsv require much memory? (I do remember it doesn't)

To Reproduce
Steps to reproduce the behavior. Providing a minimal test dataset on which we can reproduce the behavior will generally lead to quicker turnaround time!

Test data as attached
test_data_hg002_pacbio_vacmap.zip

Script:

#!/bin/bash
#SBATCH --job-name=pbsv
#SBATCH --output=%x_%A_%a.out
#SBATCH --error=%x_%A_%a.err
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=6
#SBATCH --mem=36gb
#SBATCH --time=72:00:00
#SBATCH --partition=medium
#SBATCH -A proj-fs0002

source /users/u250191/.bashrc
conda activate pbsv

# Set reference and work directory
ref38="/users/u250191/ryan_scratch_ln/reference/human-grch38.fasta"
WORK_DIR=$(pwd)

# Set input parameters
input_bam=$1
DATA_TYPE=$2
output_name=$3

# Ensure all parameters are provided
if [ -z "$input_bam" ] || [ -z "$DATA_TYPE" ] || [ -z "$output_name" ]; then
    echo "Usage: sbatch script.sh <input_bam> <DATA_TYPE> <output_name>"
    exit 1
fi

# Step 1: pbsv discover
pbsv discover --max-skip-split 100 ${input_bam} ${output_name}.svsig.gz

# Step 2: pbsv call based on data type
if [ "$DATA_TYPE" == "pacbio" ]; then
    pbsv call --num-threads 8 --ccs ${ref38} ${output_name}.svsig.gz ${output_name}.vcf
elif [ "$DATA_TYPE" == "ont" ]; then
    pbsv call --num-threads 8 ${ref38} ${output_name}.svsig.gz ${output_name}.vcf
else
    echo "Invalid data type specified. Please use 'pacbio' or 'ont'."
    exit 1
fi

Expected [behavior]
I hope pbsv can be compatible with VACmap (or resolve this issue)
Thank you!
Ryan

We are no longer adding features to pbsv. Please try your luck with its successor https://github.com/PacificBiosciences/sawfish


feat(docs/3.3.x): Set docs version numbers dynamically from file

Load documentation version from local version.mk file.

Getting this python-black error, which I can’t reproduce locally. Should I merge it anyway or do you have any tips?

Thx, @jaydoane 😉 🙄


Test

Background

Results
Technical details

https://trello.com/c/xigaq7iY/143-make-a-pr-template

How to review this PR

Quality :heavy_check_mark:

Pre-requisites

[ ] I have referenced this pre-release build of sumo-azure-function in a CloudPortal branch for E2E tests (All 3 Azure Function Package URLs)
[ ] I understand the process for rolling out new Sumo Azure Functions for NSG Glow Logs
[ ] Are you adding a new dependency?

[ ] Ensure the dependency will be detected by Renovate or document it as an exception in Dependency Management

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.1 out of 3 committers have signed the CLA.:white_check_mark: bradleyjford:x: JKashyap96:x: himanshu219You have signed the CLA already but the status is still pending? Let us recheck it.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.1 out of 3 committers have signed the CLA.:white_check_mark: bradleyjford:x: JKashyap96:x: himanshu219You have signed the CLA already but the status is still pending? Let us recheck it.


Add middleware from the outside

Hey everyone!
Currently iam working on a custom Railtie which wants to add a middleware to all mounted Grape::APIs in a Rails project in the Railties after_initialize block.
My first naive try was MyAPI.send(:insert_after, Rack::Head, MyMiddleware). It doesnt fail and MyAPI.middleware lists MyMiddleware but its not being called when requests come in. It just doesnt work.
So my understanding is that the mounted API is being instantiated before my addition runs and the change is not being picked up by the API.
Ive also experimented with MyAPI.compile! to kind of force a reload of the Grape API. This didnt succeed either. I have also realized that the instantiation process is not that easy to understand! Its quite complex.
What am i missing here?

Interesting. Mounting as a route is something like mount Twitter::API => '/'. As a middleware try mounting MyAPI::Instance instead of MyAPI?
If this doesn't work, put up a simple project that we can reproduce this in? Let's figure this out and document how to mount Grape APIs in a Railtie/as a middleware.

Thank you for the reply!
Ive tested it in my project but it just raises:
MyAPI.compile.insert_after Rack::Head, MyMiddleware
undefined method `insert_after' for #<#<Class:0x0000555ca092f430>:0x0000555ca0adcd00> (NoMethodError)

The same with .send.
Ill put up a project in the next days as you suggest. Lets work on it!


SpNavbar and Keplr connection

Navbar component which allows a user to connect to Keplr account.
https://github.com/tendermint/vue/issues/136

Detect if Keplr is available
Add new chain to Keplr
Set is as active
Handle connection cancellations and errors
Retrieve account name and address
Save to vuex store

@marinhoarthur what error are you getting when connecting to Keplr? What does it say in the console?

@marinhoarthur please check commit e89c2f4 for fixes related to your points.

@marinhoarthur not sure why this is happening but all indenting is using tabs... Would it not be better to use double spaces? It looks better in GitHub preview.

Pushed:

Took account stuff out of SpNavbar and put in SpAcc instead
Moved the icons files around because rollup had a problem while loading those (we can tackle this later!)
The useKeplr composable was updating component specific reactive stuff. Don't think this is desired. Why don't we use callbacks passed to the connectToKeplr (e.g.: onConnect, onError)?

@marinhoarthur not sure why this is happening but all indenting is using tabs... Would it not be better to use double spaces? It looks better in GitHub preview.

probably some code formatting tuning...

Just pushed changes tackling most of my comments above.

solves #151

SpAcc is a good candidate to have an enum as ui state as in here. Having multiple booleanz getting together to express current ui state is hard to maintain.


updateComment readComment APIs added

@krgauraw please check and merge the code for the below story
https://project-sunbird.atlassian.net/browse/IQ-125
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Type of change
Please choose appropriate options.

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

How Has This Been Tested?
Please describe the tests that you ran to verify your changes in the below checkboxes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

[ ] Ran Test A
[ ] Ran Test B

Test Configuration:

Software versions: Java 11, scala-2.11, play-2.7.2
Hardware versions: 2 CPU/ 4GB RAM

Checklist:

[ ] My code follows the style guidelines of this project
[ ] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
[ ] Any dependent changes have been merged and published in downstream modules

Design doc approved by DC - https://project-sunbird.atlassian.net/l/cp/HDuR6Nmz
Story - https://project-sunbird.atlassian.net/browse/IQ-125

@aks30 As we discussed over call, Please make all required changes based on in call discussion.


publishing to npm fails after publishing to GPR

I have a workflow like this that's supposed to publish to npm once I publish to GPR:
name: Publish to npm
on: registry_package
jobs:
  publish-npm:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-node@v1
        with:
          node-version: 12
          registry-url: https://registry.npmjs.org/
      - run: npm install && npm publish
        env:
          NODE_AUTH_TOKEN: ${{secrets.npm_token}}

I have the npm_token secret added to this repository.
When I just published to GPR, it kicked off this workflow job, but it failed at the last step of publishing to npm. The error was from npm saying:
npm ERR! code E401
npm ERR! Unable to authenticate, need: Basic realm="GitHub Package Registry"

What does this error mean, and how do I fix it? I don't see anything about setting "basic realm" in the recipes for this setup-node action.

One thing I notice off the bat is that your registry url is for npm (https://registry.npmjs.org/) not GitHub (https://npm.pkg.github.com) which means your auth will be set for npm as well. Could you try changing that and see if it fixes it?

I am trying to publish from GPR to npm, that's why the URL and token are for npm.

I also had the same issue, and fixed by creating ~/.npmrc like:
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc
- run: npm publish

According to the examples provided for this repo for publishing to npm, presumably the with: registry_url: .. is supposed to be taking the place of a local npmrc, and I would also assume the NODE_AUTH_TOKEN environment variable is either something that this action uses or that the npm client itself uses.
The approach of echoing out an npmrc is not only hacky but also seems a bit dangerous given that we already have to have an npmrc in the repo to publish to GPR in the first place, which means effectively this echo is overwriting the file just before publish.

Sorry, misunderstood - any chance you can share your package.json file? Also, are you able to publish to npm locally with that package.json file?

Yes I have been publishing to npm directly (by just commenting out the line in my npmrc that directs the publish to GPR) each time that the github action has failed.
Here's the repo (with the package.json): https://github.com/getify/revocable-queue

I think because this is a scoped package, adding the scope parameter should do the trick. So:
name: Publish to npm
on: registry_package
jobs:
  publish-npm:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-node@v1
        with:
          node-version: 12
          registry-url: https://registry.npmjs.org/
          scope: getify
      - run: npm install && npm publish
        env:
          NODE_AUTH_TOKEN: ${{secrets.npm_token}}

I'm not 100% sure how this will interact with a repo that has a .npmrc file already, but I think it should be fine

I just made the change and bumped the version to 3.0.4 to retry... failed with the same error:
npm notice 4.7kB  test.js
npm notice 853B   package.json
npm notice 16.7kB README.md
npm notice 109B   copyright-header.txt
npm notice 1.1kB  LICENSE.txt
npm notice === Tarball Details ===
npm notice name:          @getify/revocable-queue
npm notice version:       3.0.4
npm notice package size:  11.3 kB
npm notice unpacked size: 33.9 kB
npm notice shasum:        ea43f55fddddb1605129124fdba8b89bf4e1da15
npm notice integrity:     sha512-Jvgdlz8eA02eN[...]ThmfISW3BAXYA==
npm notice total files:   11
npm notice
npm ERR! code E401
npm ERR! Unable to authenticate, need: Basic realm="GitHub Package Registry"

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/2019-09-04T19_56_58_223Z-debug.log

I don't think I have access to that npm debug log, so I can't see anything about why the authentication is failing. :/

@damccorn ping

I have the same problem trying to publish a package to private gemfury - the secrets/NODE_AUTH_TOKEN environment variable is not working correctly. I suspect its being overwritten with XXXXX-XXXXX-XXXXX-XXXXX but its hard to debug
https://github.com/actions/setup-node/blob/master/src/authutil.ts
adding these run commands to publish-npm helps a little

run: printenv
run: cat /home/runner/work/_temp/.npmrc

@mpwis nice find!
BTW, specifically I think it's this line that could be the problem: https://github.com/actions/setup-node/blob/master/src/authutil.ts#L57

This is a blocker for me to using Github Actions. I would really appreciate some more info on it.

Not that it adds much to the conversation but through the grapevine of (limit) google results and community searching, this has turned into a show-stopper for using Actions and GPR.
I'm getting the exact same errors as described above.
npm ERR! code E401
npm ERR! Unable to authenticate, need: Basic realm="GitHub Package Registry"

Repo in question is https://github.com/paquette/react-components
Using the CLI I can publish to GPR no problem, but the authentication fails with Actions -- even though the process is nearly identical and as far as I can tell it's hooked up as documentation suggests.
The failing PR (and their associated checks) can be found in this PR https://github.com/paquette/react-components/pull/7

@pqt Just to be clear: You’re talking about publishing to GitHub Package Registry only (not the npmjs.org registry)? Because I’ve got that working from within GitHub Actions, with this .npmrc
registry=https://registry.npmjs.org/
@tjanson:registry=https://npm.pkg.github.com/
//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}

In the workflow config, I don’t use any with: arguments for the Node setup (except node-version: '10.x'), and I set a personal access token (as secret) for the NODE_AUTH_TOKEN env var (I think the GITHUB_TOKEN would also work).
Is that what you’re trying to accomplish or am I totally misunderstanding you?

Nope you've got it correct @tjanson, the GITHUB_TOKEN doesn't seem to work, so I've cleared all reference to GPR publishing, and now going to be taking another stab at it with an NPM PAT.
Going to test what you've got though because it's already considerably more elegant than my 3 different locations of configurations.
Gotta sweet case of the GIT mondays going on. (Note the check failure 😂)

Publishing to GPR from Actions (what @pqt seems to be doing) and publishing to NPM from Actions (which, in my case, is triggered after first publishing to GPR) are separate topics.
However, they both seem to have the same symptom, which is that the Action doesn't seem to apply the correct credentials for the publishing (from npm secrets), and/or Actions is not properly using the "registry" setting from the Action. In some cases you can "hack" around this problem by just forcing your own .npmrc, but that's both a hack and runs contrary to the published documentation for this Action, so it shouldn't be "the solution".
In my case, since my project already has a npmrc in it, to redirect the initial publish to GPR in the first place, I do not think it's a suitable solution to somehow hack or override that npmrc during the Action to then redirect to npm.

Yeah, I see the difference now that you mention that @getify.
To clarify, my current situation is just trying to publish to GPR at all, which has proven to be unsuccessful out of the gates. I'll stay subscribed to the thread but our approaches seem to be different enough that it might warrant a separate issue entirely.

@getify even in you're running setup-node pointing to the npm registry you still have a .npmrc file in you repo, which point to GPR. This might explain why it's failing with an error about GPR auth, even though you're trying to publish to NPM.
 I am expecting that setup-node figure out how to override my local .npmrc with the .npmrc they're generating, or otherwise redirect the npm publish command to force it to use the generated .npmrc, perhaps in the form of some parameter passed to the npm commands or something like that.
GPR requires you to have a .npmrc so that you can publish to GPR using the npm CLI tool. That's the only reason I have a .npmrc in the first place. Since I'm supposed to be able to publish from my command line to GPR, and then have that trigger Actions to publish to npm for me -- the main and indeed only use-case I have for Actions right now -- there needs to be a proper fix for how this setup-node handles the .npmrc files. I shouldn't have to "work around it"; this is supposed to be a first-class supported use-case.

Perhaps setup-node should not be relying on an npmrc for this config, and should instead inject the --registry=.. parameter (along with a shell reference to the NODE_AUTH_TOKEN env variable) into my npm install command?

I have a similar issue.
My action looks something like this:
name: Release

on:
  release:
    types: [published]

jobs:
  release:
    runs-on: ubuntu-latest

    name: Release

    steps:
      - uses: actions/checkout@master
        with:
          fetch-depth: 1

      - name: Install Node dependencies
        run: yarn --frozen-lockfile

      - name: Build
        run: yarn build

      - name: Publish to NPM registry
        run: npm publish
        env:
          NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

I am getting this error
npm ERR! code E401
npm ERR! 401 Unauthorized - PUT https://registry.npmjs.org/vega-lite - You must be logged in to publish packages.

This npm parameter can force the CLI tool to use a specific .npmrc file, so I think that's the best fix here:
https://docs.npmjs.com/misc/config#userconfig
The sticky part is, I could do that manually in my npm publish command, but then I'm hard-coding a specific path that I don't control (decided by this setup-node script), which means if this script sometime later decides to put the .npmrc in a different location, my builds start breaking.
So perhaps setup-node could create a .npmrc file in a location, and export whatever path that is as another environment variable, like NPMRC_PATH, and then my script could say:
npm --userconfig=$NPMRC_PATH publish

I think that would fix the issue here in the most reasonable way.

Just an update, I have tried manually adding the --userconfig="/home/runner/work/_temp/.npmrc" flag onto my npm publish command, but it still failed. In some local testing, I'm believe I've concluded that the npm client doesn't actually respect this flag like it should. :/
I will probably report this is as a bug to npm.

OK, I think I have finally cracked this problem.
I updated my workflow action YAML to have this npm-publish:
npm publish --@getify:registry=https://registry.npmjs.org/

That flag has the effect of overriding what's in the local .npmrc that redirected the original publish to GPR, so that actions can now publish to regular npm.

@getify - following up here.  I'm glad you found a solution to your problem.  Do you believe there's any action item for the setup-node action?  Either a change or docs?  Thanks!

It would be great if publishing worked in a minimal example such as https://github.com/actions/setup-node/issues/52#issuecomment-535784556.

Registry url seems to be ignored here https://github.com/phillmac/orbit-db-managers/blob/a50a35fca7b0d1b79871428b39deb8ecb1293edf/.github/workflows/npmpublish.yml#L40
even without a .npmrc present in the repo.
It results in a n error in the GPR publish:
npm ERR! 401 Unauthorized - PUT https://registry.npmjs.org/orbit-db-managers - You must be logged in to publish packages.
Any solution to this?

@phillmac - can create a separate issue for your failure.  I think I may know it is and looks to be different than the issue from @getify - I'll follow up on that issue

Hi all - here is a workflow that publishes to both NPMJS and GPR, without needing .npmrc workarounds:
Just replace <@OWNER> with appropriate scope (eg for me it would be @affrae), and use your version of npm_token
name: Publish to NPMJS and GPR

on:
  push:
    branches:
      - master

jobs:
  publish-to-npm-and-gpr:
    runs-on: ubuntu-latest
    steps:

      # Checkout the repo
      - uses: actions/checkout@master

      # Update package version and set up git
      - uses: actions/setup-node@master
      - name: Update package version and setup git
        run: |
          git config user.name "Actions User"
          git config user.email<EMAIL_ADDRESS>          npm version 1.0.$(date +%s)

      # Publish to NPMJS
      - uses: actions/setup-node@master
        with:
          node-version: 12
          registry-url: 'https://registry.npmjs.org/'
      - name: Publish to NPMJS
        run: |
          npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN
          npm config set scope "<@OWNER>"
          npm config list
          npm publish --access public
        env:
          CI: true
          NODE_AUTH_TOKEN: ${{secrets.npm_token}}

      # Publish to GitHub Package Registry
      - uses: actions/setup-node@master
        with:
          node-version: 12
          registry-url: https://npm.pkg.github.com/
          scope: '<@OWNER>'
      - name: Publish to GitHub Package Registry
        run: npm publish
        env:
          NODE_AUTH_TOKEN: ${{github.token}}

FWIW, this issue is not about "publishing to both npm and GPR". It's about publishing to npm after publishing to GPR, which in the case of having a .nmprc file, AND the npm package being scoped the same as the GPR package, presents this specific problem I was having.
Unclear if others will ever be in exactly that specific scenario.

I understand - but what if you try using the npm config commands I used? I had problems publishing to npm as well until I used those. I would hope that the config commands would override those in the .nmprc file and I had not seen anyone mention npm config until now.

I didn't try npm config commands -- interesting idea -- but I did essentially configure npm via command-line flags, as mentioned in this comment: https://github.com/actions/setup-node/issues/52#issuecomment-536544414

If this helps.
package.json
  "name": "@org-name/package-name",
  "version": "1.0.0",
  "publishConfig": {
    "registry": "https://npm.pkg.github.com/"
  },
  "repository": {
    "type": "git",
    "url": "git://github.com/org-name/repository-name.git"
  }
}```

`@org-name/` in the `name` and `publishConfig` being the important parts. This is alternative to adding the `.npmrc` which I understand you *don't* want to do.

https://help.github.com/en/github/managing-packages-with-github-package-registry/configuring-npm-for-use-with-github-package-registry#configuring-a-package-scope-using-a-local-npmrc

I guess add `repository` if I want to have the package name to be different from repo. Otherwise it'll just look for github.com/org-name/package-name for the repository which I'm sure you're aware of.

Hope that helps.

Hi All,
I have another solution. Only the package.json registry would work, and the bash registry setting doesn't work on GPR publishing! So I copied the registry on package.json right before publishing!
May you look at this gist please! 🙃

I doubt others will be in such a specific situation as I was, especially given now that github owns npm and will probably more closely integrate the two. I expect eventually this is a non-issue. Closing for now.

I found the solution for this @getify You basically need to publish your package as private

FWIW, this issue is not about "publishing to both npm and GPR". It's about publishing to npm after publishing to GPR, which in the case of having a .nmprc file, AND the npm package being scoped the same as the GPR package, presents this specific problem I was having.
Unclear if others will ever be in exactly that specific scenario.

I am in a very similar scenario. I have been publishing my private package to GPR and now I am taking it public to npm. I have .npmrc in my repo. All attempts to publish to npm after GPR have failed, although I specify my scope, the correct registry, etc... Puzzling.

@lsandini Im going crazy, I have the simplest .npmrc and workflow file and Im getting this all the time
npm ERR! code ENEEDAUTH
npm ERR! need auth This command requires you to be logged in to https://registry.npmjs.org/
npm ERR! need auth You need to authorize this machine using `npm adduser`

registry=https://registry.npmjs.org/
@alexandrosk:registry=https://npm.pkg.github.com/
//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}

`name: Node.js Package
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm ci
- run: npm test
publish-gpr:
needs: build
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@master
with:
node-version: 18
registry-url: https://npm.pkg.github.com/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{github.token}}`
MY repo is private maybe thats why?
Any help welcomed

I am really not a pro, but it seems you are trying to publish to github packages, and in your .npmrc you have :
registry=https://registry.npmjs.org/
...

Could this be the problem ?


Section headers are not visible

I've tried to implement sticky section headers using the first use case provided in the documentation at https://github.com/davideas/FlexibleAdapter/wiki/5.x-|-Headers-and-Sections.
I'm adding only AppointmentItems to the list and calling updateDataSet(list). In the fragment I'm calling  adapter.setDisplayHeadersAtStartUp(true).
As far sa I can tell, I think everything seems ok. However, headers are not showing up, only the items. Am I missing something?
class MyAdapter: FlexibleAdapter<AbstractFlexibleItem<FlexibleViewHolder>>(ArrayList())
{
    inner class AppointmentItem(
        private var sectionItem: SectionItem?,
        var appointment: AppointmentViewModel) : AbstractFlexibleItem<AppointmentViewHolder>(),
                                                 ISectionable<AppointmentViewHolder, SectionItem>
{
override fun getHeader(): SectionItem?
        {
            return sectionItem
        }

        override fun setHeader(header: SectionItem?)
        {
            this.sectionItem = header
        }

override fun equals(other: Any?): Boolean
        {
            return other is AppointmentItem && other === this
        }

        override fun hashCode(): Int
        {
            var result = sectionItem?.hashCode() ?: 0
            result = 31 * result + appointment.hashCode()
            return result
        }
}
  inner class SectionItem(
        var startDate: Date?,
        var endDate: Date?) :
        AbstractExpandableHeaderItem<SectionViewHolder, AppointmentItem>()
{
 override fun equals(other: Any?): Boolean
        {
            return other is SectionItem && other === this
        }

        override fun hashCode(): Int
        {
            var result = startDate?.hashCode() ?: 0
            result = 31 * result + (endDate?.hashCode() ?: 0)
            return result
        }
}
}

@bogdanzurac This is an example that supports displaying sticky titles, you can take a look.
https://github.com/tcqq/FlexibleAdapterStickyHeaderExample

But that example from that link shows adding the list of headers as items of the adapter, each header containing a list of children. I wanted to add the list of children to the adapter, each child containing the associated header. It's the 1st use case from the documentation, not the 2nd one. I can confirm that inside another app we used the use case from your example and it worked. However, we need to implement the other solution.

@bogdanzurac have u tried using AbstractHeaderItem instead of AbstractExpandableHeaderItem?

But I need the headers to be expandable. However, I've got the 2nd use case working, like the demo @tcqq mentioned. Now that it works even with this approach, I'm wondering, why have 2 use cases? What's the advantage of adding the children to the adapter instead of the headers?

@bogdanzurac
As far as I understood, 1st use case is where u want section header only without the feature of expanding these to show their children. That's why in 1st approach, u just have to add the children to the adapter with rather dumb headers used as separators for each section.
I've tried both approaches and I can confirm both work as intended.

Then I suppose we should use the 2nd solution in our use case, which indeed works perfectly. Thanks for clearing things up!


chore: lint markdown

Context and purpose of the change
This PR lints the markdown found in stride
Brief Changelog
markdownlint . --fix
Author's Checklist
I have...

[ ] Run and PASSED locally all GAIA integration tests
[ ] If the change is contentful, I either:

[ ] Added a new unit test OR
[ ] Added test cases to existing unit tests

[x] OR this change is a trivial rework / code cleanup without any test coverage

If skipped any of the tests above, explain.

Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...

[ ] reviewed state machine logic
[ ] reviewed API design and naming
[ ] manually tested (if applicable)
[ ] confirmed the author wrote unit tests for new logic
[ ] reviewed documentation exists and is accurate

Documentation and Release Note

[ ] Does this pull request introduce a new feature or user-facing behavior changes?
[ ] Is a relevant changelog entry added to the Unreleased section in CHANGELOG.md?
[ ] This pull request updates existing proto field values (and require a backend and frontend migration)?
[ ] Does this pull request change existing proto field names (and require a frontend migration)?
How is the feature or change documented?

[ ] not applicable
[ ] jira ticket XXX
[ ] specification (x/<module>/spec/)
[ ] README.md
[ ] not documented

Thanks for opening this. Our markdown files have changed dramatically since you opened this. My fault for not merging this in sooner. In any case, I ran markdownlint on a new branch off main here. Closing this.


The enhancement effect is only "half done".

describe the bug
The enhancement effect is only "half done". (See the screenshot)
expected behaviour
The Windows 10 stock title bar should disappear (as the screenshot in README).
screenshots

platform
Windows 10
Thanks ❤

duplicate of #43 and #38 - known bug due to a recent notion update, already fixed in the wip beta, i'm doing what i can do get it done, just be patient a few more days.

Sorry I forgot to read the previous issues, thank you for your reply!


Add related projects to Wiki

I'm using Neo4jClient in several applications along with some complementing projects that deserve some more recognition, so I propose adding some shamless plugs to the wiki. It appears I can edit the wiki directly but consider it to be poor etiquette in this case, hence the issue first.
I propose adding the following to https://github.com/Readify/Neo4jClient/wiki/home.md after the Commercial Support section
/* BEGIN INSERT */
Related Projects
Other projects of interest, but not maintained nor supported by this project are
Neo4jClient.Extension
Merge, match and create nodes or relationships using domain objects directly.
Trinity
Provides repository pattern classes for Neo4jClient including an AppSettings repository
/* END INSERT */

PS: I cloned the wiki with the intention of PR'ing it but there is a file that is causing git to spew on Windows: how-to-translate--following-cypher-to-c#?.md
It's an illegal filename so it is stuck in staging as a deleted item

Hey - thank you for this, sorry I didn't merge it earlier...!

cool I'm happy to do it - just didn't want to do it without permission so to speak

Brilliant, thank you buddy!


Unkillable/NaN Mobs

I've encountered several mobs that, when moused over, show "NaN/X" hearts as their health.  This included just one zombie for most of my game, but recently also the Wither and the Ender Dragon.  The mobs seem to behave normally and show the usual animations when they should take damage, but don't die when their health bar is exhausted.  I've tried the /kill and /attribute commands (to set health to 0), but these only produced the "No entity found" message.  I've also tried adding the Potato's NaN Health Fix and NaNny Mods with no effect.  Any suggestions or a fix would be much appreciated--thank you!

This is in singleplayer? Unfortunately I've never heard of this happening
before, so I don't have any experience with fixing it. What numerical
version of the modpack are you using? I did just release 1.4.3 so if it's
been approved on CF you might want to update to see if one of the mod
updates fixes it.
Beyond that, let me know if it occurs in a new creative world when you go
to the End or summon the Wither. I'll try to see if I can replicate it on
my end!
On Wed, Dec 6, 2023, 3:45 PM Elrohir525 @.***> wrote:

I've encountered several mobs that, when moused over, show "NaN/X" hearts
as their health. This included just one zombie for most of my game, but
recently also the Wither and the Ender Dragon. The mobs seem to behave
normally and show the usual animations when they should take damage, but
don't die when their health bar is exhausted. I've tried the /kill and
/attribute commands (to set health to 0), but these only produced the "No
entity found" message. I've also tried adding the Potato's NaN Health Fix
and NaNny Mods with no effect. Any suggestions or a fix would be much
appreciated--thank you!
—
Reply to this email directly, view it on GitHub
https://github.com/katubug/CottageWitchRecast/issues/7, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AE7XE5R7DTIGCEBD4LWHX73YIDRQLAVCNFSM6AAAAABAKBZRM6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGAZDSNBTGY4DENI
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

It's singleplayer, yes.  The dragon was bugged in the 1.4.2 version, I think the wither was in the version before that, and the old zombie at least one before that.  I'll try 1.4.3 when it's out!

I'm sorry, I was never able to replicate this. Hopefully it's fixed now!


Default scheduler handling for storIOContentResolver

The second part of #511

[Current coverage][cc-pull] is 96.46%

Merging [#661][cc-pull] into [master][cc-base-branch] will decrease coverage by 0.04%

@@             master       #661   diff @@
==========================================
  Files            84         85     +1
  Lines          2548       2572    +24
  Methods           0          0
  Messages          0          0
  Branches        325        329     +4
==========================================
+ Hits           2459       2481    +22
- Misses           89         91     +2
  Partials          0          0

Powered by Codecov. Last updated by [d5430ab...c9f1460][cc-compare]
[cc-base-branch]: https://codecov.io/gh/pushtorefresh/storio/branch/master?src=pr
[cc-compare]: https://codecov.io/gh/pushtorefresh/storio/compare/d5430abb97c23eac385074ad2e43c7df2fd14055...c9f1460e3e3acac4a8cb15d3c05640e66d5c4586
[cc-pull]: https://codecov.io/gh/pushtorefresh/storio/pull/661?src=pr

👍 (few nits)
Dude this is crazy!

@artem-zinnatullin hehe, but 0.1% decrease :crying_cat_face:


Implement a handler for file header

This allows clients to learn the file version, compression, writer version, etc. Before, this information was impossible to extract from the library.
This is really useful to inform end users ahead of time whether given file is supported or not, and if not - why (for example because lack of support for ASCII mode or version 1 files in librdata).
The change is backwards compatible because the newly added handler header_handler is optional and in older code it will simply not be called.

Looks like the AppVeyor build is broken but it seems unrelated to my changes. I would appreciate if a maintainer could take a look.

Looks good, thanks!


Despecialized xt::to_json and xt::from_json

This is a response to #1690. The original implementation of xt::to_json and xt::from_json only allowed as the json type nlohmann::basic_json<> (specialized with the all default types), which did not work if the client code used custom specialized version (e.g. with a custom map).
The reason why I eventually chose the longer variant (as mentioned in #1690) was that the fully "despecialized" patch using following semantics:
template<class J, class E>
enable_xexpression<E> to_json(J&, const E&);

template<class J, class E>
enable_xcontainer_semantics<E> from_json(const J&, E&);

did not compile with the test code, because the compiler did not know how to instantiate the constructor for nlohmann::basic_json type in assignments, e.g.:
        xt::xarray<double> t =
          {{{1, 2},
            {3, 4}},
           {{1, 2},
            {3, 4}}};

        nlohmann::json jl = t;

The consequence is that the other template parameters in nlohmann::basic_json<> are still forced to their defaults, but at least the custom map is accepted (which is probably also what most would use).

Thanks for this PR, I think your solution is the best compromise we can get.


Dynamic custom ContractResolver

Hi, as far as I understand for Custom IContractResolver its advised to cache a single instance and use the same resolver every time we serialize, however this limits the use for dynamic ContractResolver's, where we wanna have the ability to provide at runtime each time we serialize which properties to be serialized or not, (like a Web API, where the client can specify in url query which fields to include in response).
However I thought, how about to actually do have insatiate a custom dynamic contract resolver for each serialization and supplying the info which fields to serialize, but for implementing CreateProperties we can have a dictionary globally where we can cache full list of all Property-Information available per type, and implement the dynamic custom ContractResolver.CreateProperties method to choose from that list, such that it won't have to actually create and gather that property information every time, (which I assume that's the main issue of creating new instances)!
Is that good practice and efficient, otherwise then CreateProperties, is there any thing else which is inefficient by creating a new ContractResolver for every serialization?

Related: https://github.com/JamesNK/Newtonsoft.Json/issues/2155

@zspitz your issue at #2155 is so by design, because DefaultContractResolver was implemented to cache Property information for each type, it won't call the CreateProperties method only once.
Your workaround there to create a new instance per serialization, - if its being called lot of times -  then its not recommended because of performance since all instances will have to get type information for each property on each type, which is performance wise costly.
However you may consider something like what I demonstrated above.


Get UI components working for the admin form

This is a work in progress from the Imagine Hackathon. With these changes the UI component is showing the form and the collection is being loaded.
This that still need to be completed:

Make the form change based on results from the database,
Update the form to show all the correct elements and options,
Update the grid to also use UI components,
Update the code so that it matches the standards of the repo,

Please feel free to add code to my repo or create a branch on the MageMojo repo to continue wit the work. I will try to get some more work into this topic over time but I am not 100% sure when I will be able to.

Thanks @dmanners , will try and integrate this as soon as I get a few hours to rub together.

What's the reason for having this separate config form, UI components or not? Why not just configure using Magento's standard configuration interface?


GPU code on single det trial with chunked Cholesky vectors over cards/nodes; and CPU share memory

in this PR:

bugs were fixed for GPU calculations with chunked Cholesky vectors and single determinant trial.
example were added for chunked GPU calculation with SD trial, and CPU share memory
a util function was added to split the cholesky vector into subfiles before running ipie job
upon using the black formatter locally, lots of files were modified, which is not necessary though :)


[FEATURE] wrapper for train API for creating knn index models

Is your feature request related to a problem?
I'm not able to use the python client to train knn indexing models.
What solution would you like?
Indexing methods pq and ivf that are added to opensearch require training before indexing the entire set of documents. This is done through the train API on opensearch. Opensearch-py client does not seem to provide a wrapper for this method. Adding a feature supporting it would be very useful.
What alternatives have you considered?
calling the API directly (without the python client). Although it will work, it's not ideal.
Do you have any additional context?
Add any other context or screenshots about the feature request here.

You are right, the plugins don't generally have methods in the clients. Feel free to raise a PR to add them if you're up for it.

###Support for PQ and IVF indexing methods via trainAPI in OpenSearch-py

The OpenSearch-py client currently does not have a feature to support model training using IVF and PQ indexing methods via the trainAPI. This feature is available in OpenSearch and can be used via direct API calls or other clients such as Elasticsearch-py or Requests-OpenSearch. However, for users who prefer to use OpenSearch-py, it would be helpful to have this feature built into the client.
Alternative Solutions:
1 Developing and adding a feature that supports model training using IVF and PQ indexing methods to the OpenSearch-py client.
2 Using another client for OpenSearch API which already supports model training using IVF and PQ indexing methods, such as Elasticsearch-py or Requests-OpenSearch.

3 Adding a function to the OpenSearch-py client that supports PQ and IVF indexing methods via the trainAPI.

Expected Outcome:
Having this feature in the OpenSearch-py client will make it more convenient for users who want to use the PQ and IVF indexing methods for model training, and will provide a more complete experience for users of the OpenSearch-py client.
Opensearch-py, which supports pq and ivf indexing methods via trainAPI
from opensearchpy import OpenSearch
from opensearchpy.helpers import _make_path, _bulk_body

class KNNClient(OpenSearch):
    def train_knn_model(self, model_id, training_index, training_field, dimension, max_training_vector_count, search_size, description, method):
        path = _make_path("_plugins", "_knn", "models", model_id, "_train")
        params = {"preference": "_local"}

        body = {
            "training_index": training_index,
            "training_field": training_field,
            "dimension": dimension,
            "max_training_vector_count": max_training_vector_count,
            "search_size": search_size,
            "description": description,
            "method": method
        }

        response = self.transport.perform_request("POST", path, params=params, body=body)
        return response

    def train_knn_model_auto_id(self, training_index, training_field, dimension, max_training_vector_count, search_size, description, method):
        path = _make_path("_plugins", "_knn", "models", "_train")
        params = {"preference": "_local"}

        body = {
            "training_index": training_index,
            "training_field": training_field,
            "dimension": dimension,
            "max_training_vector_count": max_training_vector_count,
            "search_size": search_size,
            "description": description,
            "method": method
        }

        response = self.transport.perform_request("POST", path, params=params, body=body)
        return response

I think it's a matter of time before a contributor adds this feature to the client, and you could be the first. Feel free to PR this feature.

Have you looked at the opensearch-py-ml  client?

Closing as a dup of https://github.com/opensearch-project/opensearch-py/issues/300.


python3Packages.identify: 2.2.15 -> 2.3.0

Motivation for this change
Update to latest upstream release 2.3.0
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
21.11 Release Notes (or backporting 21.05 Release notes)

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

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 140245 run on x86_64-linux 1

5 packages built:

pre-commit (python39Packages.pre-commit)
python38Packages.identify
python38Packages.pre-commit
python39Packages.identify
wlc


Output File Is Very Huge and is Unusable / Corrupted / Undesired

I ran the basic command to remove background from a video : backgroundremover -i "No Security.mp4" -tv -o "No_Security_BR.mov"
It finished the conversion process as such :

FRAME RATE DETECTED: 30000/1001 (if this looks wrong, override the frame rate)
FRAME RATE: 30 TOTAL FRAMES: 369
WORKER FRAMERIPPER ONLINE
WORKER 0 ONLINE
ffmpeg version 6.0 Copyright (c) 2000-2023 the FFmpeg developers
built with Apple clang version 14.0.3 (clang-14<IP_ADDRESS>.1)
configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/6.0 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon
libavutil      58.  2.100 / 58.  2.100
libavcodec     60.  3.100 / 60.  3.100
libavformat    60.  3.100 / 60.  3.100
libavdevice    60.  1.100 / 60.  1.100
libavfilter     9.  3.100 /  9.  3.100
libswscale      7.  1.100 /  7.  1.100
libswresample   4. 10.100 /  4. 10.100
libpostproc    57.  1.100 / 57.  1.100
Input #0, rawvideo, from 'fd:':
Duration: N/A, start: 0.000000, bitrate: 19660 kb/s
Stream #0:0: Video: rawvideo (Y800 / 0x30303859), gray, 256x320, 19660 kb/s, 30 tbr, 30 tbn
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> mpeg4 (native))
Output #0, mp4, to '/var/folders/1h/pwf_119j13bb2kvm2pq905y00000gn/T/tmpzk3e7rgn/matte.mp4':
Metadata:
encoder         : Lavf60.3.100
Stream #0:0: Video: mpeg4 (mp4v / 0x7634706D), yuv420p(tv, progressive), 256x320, q=2-31, 2000 kb/s, 30 fps, 15360 tbn
Metadata:
encoder         : Lavc60.3.100 mpeg4
Side data:
cpb: bitrate max/min/avg: 0/0/2000000 buffer size: 0 vbv_delay: N/A
frame=    5 fps=0.0 q=2.0 size=     256kB time=00:00:00.16 bitrate=12585.0kbits/s speed=0.2
frame=    9 fps=7.2 q=8.4 size=     256kB time=00:00:00.30 bitrate=6991.7kbits/s speed=0.23
frame=   13 fps=6.9 q=11.2 size=     512kB time=00:00:00.43 bitrate=9680.0kbits/s speed=0.2
frame=   17 fps=6.8 q=23.0 size=
.
.
.
.
.
frame=  353 fps=6.4 q=24.4 size=    2816kB time=00:00:11.76 bitrate=1960.5kbits/s speed=0.2
frame=  357 fps=6.4 q=24.3 size=    2816kB time=00:00:11.90 bitrate=1938.6kbits/s speed=0.2
frame=  361 fps=6.4 q=28.3 size=    2816kB time=00:00:12.03 bitrate=1917.1kbits/s speed=0.2
frame=  365 fps=6.4 q=28.2 size=    3072kB time=00:00:12.16 bitrate=2068.5kbits/s speed=0.2
frame=  369 fps=6.1 q=20.9 size=    3072kB time=00:00:12.26 bitrate=2051.6kbits/s speed=0.2
frame=  369 fps=6.0 q=20.9 Lsize=    3133kB time=00:00:12.26 bitrate=2092.0kbits/s speed=0.201x
video:3130kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.089082%
FINISHED ALL FRAMES (369)!
Starting alphamerge
after call
Process finished

The input file is 428KB while the output file is 136MB
That, in itself, is not much of an issue as I can compress the file using ffmpeg as mentioned in some previous Issue
The problem is that I have used QuickTime Player, IINA, MPV player mentioned here and Even imported the video and compressed versions to DaVinci Resolve but the same corrupted/Incomplete/Unusable is shown.
Here is a Screenshot of the output file :

P.S. I tried using the Web App with the same file. There, Although the file is still huge, works as desired.
Here Is the Screenshot Output from the web app :

So it seems perhaps running into a limiting cpu or so on your machine?  I havent checked about updating the format to vp9, I think its suggested


New flow for login hangs when web flow is ran on different machine

Steps to reproduce:

Running near login on the server or inside the VM
Copy the URL and run it on your machine.
Approve the adding key in your NEAR Wallet web page.
Switch back to the server / VM.
Observe that near login still hands without making any progress and giving any alternative option to finalize the step.

Alternative solution
If we add lookup of accounts by public key into explorer backend, we can actually use that to lookup which account authorized this key without needing to open port.
CC @kcole16 @frol

@ilblackdragon making sure I understand the steps to reproduce. Is this specific to running "on the server"?
Here's what I tried:
near login --networkId betanet --nodeUrl "https://rpc.betanet.nearprotocol.com" --walletUrl "https://wallet.betanet.nearprotocol.com" --helperUrl "https://helper.beatnet.nearprotocol.com"
Using options: {
  networkId: 'betanet',
  nodeUrl: 'https://rpc.betanet.nearprotocol.com',
  walletUrl: 'https://wallet.betanet.nearprotocol.com',
  helperUrl: 'https://helper.beatnet.nearprotocol.com',
  contractName: undefined
}

Please authorize NEAR Shell on at least one of your accounts.

If your browser doesn't automatically open, please visit this URL
https://wallet.betanet.nearprotocol.com/login/?title=NEAR+Shell&public_key=ed25519%3AAo6E9ZN62ETjk6o3ikqZa9eLo16ALkzz7q9mH7QYa6Bn
Logged in as [ mikedotexe ] with public key [ ed25519:Ao6E9Z... ] successfully

It created the key as expected

Ok, steps to reproduce:  open link on a different machine you running this.
Talked to Peter about possible solution @potatodepaulo

@ilblackdragon and I discussed how this can work:

[ ] Dev account for dev-user created by test.
[ ] 	Dev-user account creates contract. (This account stays logged in as per https://github.com/near/devx/issues/116. Don’t ever overwrite keys)
[ ] 	Ask in command line for confirmation of env before launching auto-login

@potatodepaulo First two items are not related to this issue. Also want to note that we have an (approved?) NEP for improving shell. Added comments there about first two items - https://github.com/nearprotocol/NEPs/pull/31#issuecomment-606615736
Last item is indeed the thing for this issue - figure out a way to confirm with user that they are planning to open NEAR Wallet on the same machine and near login command is been ran.
Options when it's not true:

VM
SSH to server

Also, I want to note that some computers have ports not openable without special permissions, including MS Windows has firewalls that prevent opening ports by non authorized software. Was this case tested?

Maybe we can bring back the option to manually type in your account id in shell at the end of login as a fallback? That was the original reason why the manual step was implemented in the first place.

@janedegtiareva I like the fallback idea. We should do both. Basically a yes/no questions from the user before nice UX flow runs. Then if the user wasn't paying attention and answered randomly, the fallback runs (maybe after a timeout).

@ilblackdragon Tracking the access key via some lookup with a "third-party" centralized service does not feel right to me. So I like the proposed fallback solution after some timeout asking to enter an account ID

I won't steer us too far off topic but want to say this is the perfect example of a project-based setting that I envision will live in something like /project/directory/.near/shell-info.js (or shell-info.env) that stores the most recent version of near-shell used in this project as well as the answer to the question.
{
  lastShellVersionUsed: "0.19.0",
  promptAfterLogin: true
}

These project-specific settings will allow us to upgrade a project as near-shell matures and changes fundamental features like key storage and location.
This is different than configuration like nodeUrl and whatnot. We need both config and settings longterm.
Look forward to jumping on this soon.

@mikedotexe @janedegtiareva @frol fallback is already there, I assume just is not triggered properly:
https://github.com/nearprotocol/near-shell/blob/dbb808479c98bd072b63e1f405548a552a77a0a6/index.js#L101


Fix call to GetService()

Using EF Core 2.2 the code sample to get an IMigrator interface DbContext.GetService<IMigrator>() doesnt work.

Thanks @jannikbuschke!


Project abandoned?

Hi guys, has this project been abandoned, or hasn't it been publicly released after the first release?
@thomastaylor312 @rji @mootpt @bwynsm

Insofar as I know, this isn't being used, but I don't think many of the people tagged here work for Nike anymore

According to GitHub history Ben Wynsma (@bwynsm) is still working for Nike. 😛

Still working for Nike - have to admit that I have not even seen this repository before :) I was made contributor across open source projects to help oversee the gimme-aws-creds project.

@bwynsm do you have any way to let me know if this project is still supported?
I was hoping it was still supported internally but the public repo was not updated.
It would be interesting to use but it has been frozen for 4 years and it scares me a bit. 😛

Ok, it is abandoned.


Snake VS Block

Coding Train Challenge?
Snake VS Block by Voodoo
https://appsto.re/us/N2vIjb.i

Maybe with NN

I already proposed that here: https://github.com/CodingTrain/Rainbow-Code/issues/181

@Elfocrash ... my bad. I didn't see it your proposal.


readme: fix procedural example

Description
Fixes one syntax error and suggests db close in procedural example

Codecov Report

Merging #30 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #30   +/-   ##
=======================================
  Coverage   80.63%   80.63%
=======================================
  Files           2        2
  Lines         222      222
  Branches       14       14
=======================================
  Hits          179      179
  Misses         39       39
  Partials        4        4

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 7d8bfd9...aeda90e. Read the comment docs.


Rename GGD Helper test group

Description

Rename test group for Greengrass connect helper from Full_GGD_Helper to GGD_Helper_System to be consistent with other GGD test groups
Checklist:

[ ] I have tested my changes. No regression in existing tests.
[ ] My code is Linted.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/bot run checks