glib-dev pkgconfig

glib recipe doesn't work for compat toolchain correctly. glib-tools is there to provide the tools, but for compat a bindir is set. so the tools provided by glib-tools package will not selected.
/bin/bash: line 1: /home/superq/ws/fdt.v2/dev/dist/libs/glib-dev/x86_64-bob_compat-linux-gnu/2/workspace/usr/bin/glib-mkenums: No such file or directory
compat:
bindir=${prefix}/bin
glib_genmarshal=${bindir}/glib-genmarshal
gobject_query=${bindir}/gobject-query
glib_mkenums=${bindir}/glib-mkenums

for cross-toolchain, the pkgconfig file looks like this, this would work in combination with glib-tools:
cross:
glib_genmarshal=glib-genmarshal
gobject_query=gobject-query
glib_mkenums=glib-mkenums

maybe we should not make an explicit package for tools, but install the tools in dev package?!
mesonPackageDev "$1" "/usr/lib/glib-2.0/***" "/usr/bin/***"

or both? :)

I'm afraid I do not fully understand the problem. Could you provide some minimal recipe example that show the issue?

yep.
feature-branch for graphviz:
https://github.com/mahaase/basement/pull/new/feature/graphviz
add it e.g. here:
diff --git a/tests/cross-platform/recipes/cmake/greeter.yaml b/tests/cross-platform/recipes/cmake/greeter.yaml
index 2bf4086..d130d31 100644
--- a/tests/cross-platform/recipes/cmake/greeter.yaml
+++ b/tests/cross-platform/recipes/cmake/greeter.yaml
@@ -1,5 +1,8 @@
 inherit: [ "basement::rootrecipe", cmake ]

+depends:
+    - devel::graphviz
+
 checkoutSCM:
     scm: import
     url: src/greeter/

bob dev cmake::greeter-cross/ -vv
error:
+ touch .configure.stamp
+ makeParallel
+ [[ -n '' ]]
++ nproc
+ make -j 24
make  all-recursive
make[1]: Entering directory '/home/superq/ws/basement/tests/cross-platform/dev/build/libs/pango-dev/x86_64-bob_compat-linux-gnu/1/workspace/build'
Making all in pango
make[2]: Entering directory '/home/superq/ws/basement/tests/cross-platform/dev/build/libs/pango-dev/x86_64-bob_compat-linux-gnu/1/workspace/build/pango'
  GEN      s-enum-types-h
  GEN      s-enum-types-c
/bin/bash: line 1: /home/superq/ws/basement/tests/cross-platform/dev/dist/libs/glib-dev/x86_64-bob_compat-linux-gnu/1/workspace/usr/bin/glib-mkenums: No such file or directory
/bin/bash: line 1: /home/superq/ws/basement/tests/cross-platform/dev/dist/libs/glib-dev/x86_64-bob_compat-linux-gnu/1/workspace/usr/bin/glib-mkenums: No such file or directory
make[2]: *** [Makefile:1587: s-enum-types-h] Error 127
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:1595: s-enum-types-c] Error 127
make[2]: Leaving directory '/home/superq/ws/basement/tests/cross-platform/dev/build/libs/pango-dev/x86_64-bob_compat-linux-gnu/1/workspace/build/pango'
make[1]: *** [Makefile:580: all-recursive] Error 1
make[1]: Leaving directory '/home/superq/ws/basement/tests/cross-platform/dev/build/libs/pango-dev/x86_64-bob_compat-linux-gnu/1/workspace/build'
make: *** [Makefile:469: all] Error 2
++ bob_handle_error 2
++ set +x
Step failed with return status 2; Command: make -j "${MAKE_JOBS-$(nproc)}" "$@"

if you like, i could create a MR for all this recipes...

Ok, I now see the problem. I'm not sure yet who to blame here. But installing the tools in the -dev package is not the solution. If we cross compile the tools won't run...

I did not found any official interface to handle this problem e.g. by configuration.
So i would recommend to do this to fix the *.pc files in dev-package:
for i in $(find . -iname "*.pc") ; do
    sed -i 's/\${bindir}\///g' $i
done

Looks like buildroot does the same. I would also recommend to do it only for the glib-2.0.pc and gio-2.0.pc files specifically without the find call. We already know the files that need patching.


Should the document db client in python be singleton?

[Enter feedback here]
The existing Python samples appear to implement IDisposable pattern on cosmos db client. However this goes against recommendations from MSFT Docs elsewhere:
"Use a singleton DocumentDB client for the lifetime of your application.
Note that each DocumentClient instance is thread-safe and performs efficient connection management
and address caching when operating in Direct Mode. To allow efficient connection management and better performance by DocumentClient, it is recommended to use a single instance of DocumentClient per AppDomain for the lifetime of the application."
Is this recommendation valid when using cosmos DB client in Python too or does the Python SDK handle this behind the covers?

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

ID: f09cf24a-d276-8afc-f5d2-2406185cadfc
Version Independent ID: 926eeac4-2776-2d7c-b05e-250b982d0ef1
Content: Azure Cosmos DB: SQL Python API, SDK & resources
Content Source: articles/cosmos-db/sql-api-sdk-python.md
Service: cosmos-db
Sub-service: cosmosdb-sql
GitHub Login: @SnehaGunda
Microsoft Alias: sngun

Thank you for the reaching out.
We are actively investigating and will get back to you soon.

Application or consumers is expected to ensure the singleton-usage.
IDisposable is to enable graceful handling of resources (connections etc...) used by client.

Thanks @kirankumarkolli
#please-close


Impovement: add note about schema name requirement

Exec documentation does not contain a notion about the required schema name for a call to scalar function, it would be great to make a note here.
also, CREATE FUNCTION  (https://docs.microsoft.com/en-us/sql/t-sql/statements/create-function-transact-sql?view=sql-server-ver16) statement has such note - "Scalar functions must be invoked by using at least the two-part name of the function (.)."
My suggestion:

Add note that the schema is required for invoking of scalar UDF
Add note that the schema is NOT required for invoking of table value UDF

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

ID: da647854-0134-18ae-4dfd-ad0db2aac00f
Version Independent ID: 4c0b8962-de3c-012b-d3cc-5374014efb05
Content: Execute User-defined Functions - SQL Server
Content Source: docs/relational-databases/user-defined-functions/execute-user-defined-functions.md
Product: sql
Technology: ****
GitHub Login: @rwestMSFT
Microsoft Alias: randolphwest

@OleksiiKovalov -- Oleksii, thank you for your close reading and suggestions.
@rwestMSFT -- Randolph, please look into this issue.

@OleksiiKovalov Thanks for the suggestion. We will take it into account for the next article refresh cycle. I will close this issue because I'm tracking it internally.
#please-close


Charts with a single value do not display the value

It seems ok with Plotly.js:
var data = [
  {
    x: ['giraffes'],
    y: [20],
    type: 'bar'
  }
];

Plotly.newPlot('myDiv', data);

https://codepen.io/zakhenry/pen/YzGPQMm
but not so with Plotly.kt

    val plot = Plotly.plot {
        bar {
            x("giraffes")
            y(20)
        }
    }
    plot.makeFile()

Thanks, It is a known problem. Plotly updater requires values in an array-of-arrays format even if there is one value. I thought it is fixed, but I can reproduce it. I think it will be easy to fix with a serializer tweak.

It was easier to slightly change the logic in the upstream. Fixed in 0.3.1-dev. I will leave the issue here until it is merged to JCenter version.

@altavir do you have some idea of the timeline for 0.3.1 being released?

@altavir do you have some idea of the timeline for 0.3.1 being released?

@zakhenry Thanks for reminding me. I got stuck with the release of the upstream library. And I do not want to make release version depend on dev version. 0.3.1-dev is published on bintray and you can use it simply by adding maven("https://dl.bintray.com/mipt-npm/dev") to gradle configuration. Do you have any specific requirements for actual center artifact? If you do, I can try to speed-up things.

@zakhenry Thanks for reminding me. I got stuck with the release of the upstream library. And I do not want to make release version depend on dev version. 0.3.1-dev is published on bintray and you can use it simply by adding maven("https://dl.bintray.com/mipt-npm/dev") to gradle configuration. Do you have any specific requirements for actual center artifact? If you do, I can try to speed-up things.

Ah yep I should be able to use dev, no trouble. Is it up to date with the latest master?

Ah yep I should be able to use dev, no trouble. Is it up to date with the latest master?

It should contain all major fixes from the dev branch. Please ping me if something does not work. I will upload the latest version. Currently, there is some work being done with kotlin-jupyter team to allow better integration.

It should contain all major fixes from the dev branch. Please ping me if something does not work. I will upload the latest version. Currently, there is some work being done with kotlin-jupyter team to allow better integration.

Published in 0.3.1


Color does not change automatically

Hi,
when I use Color.FromArgb("#ff7b68ee") it shows correct color for the first time. However, when I change the color string, color does not change automatically. I had to close and reopen file for changes to take effect. Could this be fixed, please?

Hi @vlasto77, I'm unable to recreate the issue you describe.
The screen clip below shows the color changing as I type to change the text.

Some questions to help track down why you're seeing what you're reporting.

Has this ever worked for you? (I released an update last week and wonder if this is part of the issue. If you're only using this for the first time, then that's irrelevant.)
Which version of the extension do you have?
Which version of Visual Studio are you using?
What other extensions do you have installed?

It looks like this is a VS bug in the latest preview version.
Please upvote https://developercommunity.visualstudio.com/t/ITaggerGetTags-in-the-VSSDK-appears-t/10798945
If you find the issue in older versions of VS please share that too.

I'm using it for the first time. And I do not use preview version of Visual Studio.
I use Visual Studio 17.12.1
Extension version: 1.15.1
I use more extensions but only one that affect code editor is Viasfora and I'm not sure about CodeMaid

Reproducing this was tricky as "other things" happening in the background (including VS loading things) can make this difficult/inconsistent to recreate.
I think I have a fix though.

v1.17 (now in the marketplace) should fix this.


How to Disable new user login

I looked at the wiki, I wasn't able to find out how to do it.
I have a private instance, I would like to disable new user login, while retaining the ability to create new user using the admin screen.
is this possible?
-Thanks
Vijay

Hi @vijayrajah,
technically is it not possible to disable the login form, but if you configure the INVITATION_CODE in your .env file to be random and complex enough nobody will be able to create a new account.

I know nothing about Ruby.. But, can we not, just remove the button from the login page?

You can remove it, but I do not understand how it would make a difference. The login page already shows a message that the Huginn installation is not open to the public.

Agreed that there should be a way to disable this functionality, but at the same time, the .env trick could make up for your wish in the meantime.


devextreme-angular [feature request] [Export to pdf]

I think that the components like grid and charts should include the export to pdf option

This question is about our DevExtreme widget rather than our Angular integration. The grid supports exporting to XLSX only. But, our charts support exporting to PDF. See this help topic.


jacoco offline instrumentation incompatibility with powermock byte-code manipulation when using @SuppressStaticInitializationFor

Hi, there is a test project: https://github.com/astafev/jacoco-offline-powermock-junit
The problem:
if use @SuppressStaticInitializationFor("StaticClass") and execute mockStatic(StaticClass.class) in the test method, it's impossible to instantiate StaticClass, the exception:
java.lang.NullPointerException
	at StaticClass.<init>(StaticClass.java:1)

The problem occurs only when StaticClass is patched with jacoco offline instrumentation.

I've just understood the reasons - jacoco offline instrumentation adds static method $jacocoInit, which is invoked in the beginning of every method. So mockStatic just replaces this method.
Maybe it's worth in case of synthetic methods invoke original methods?
Now the problem can be bypassed with using spy method instead of mockStatic.

mockStatic doesn't replace the $jacocoInit. This method simple is mocked as other static methods, what's why spy is work fine.
To fit the issue the org.powermock.api.mockito.internal.mockcreation.MockCreator.createMock method should know that for the $jacocoInit method invocation either shouldn't be create or should call real method.
I sugest implement it via pluggable filter and a new component like powermock-jacoco which contains filter for jacoco method which should be skipped.

Sounds good, but, IMHO, it seems to be too much if jacoco instrumentation will be the only case of usage of this filter.
Hardly anyone would want to work with synthetic method $jacocoInit in his code). I mean it may be ok to skip this method always. But of course it's up to you.

I sure that not only Jacoco has same issue. And that I know - core should know nothing about any libraries, because it breaks inversion of control principal. This feature could be useful for users.

My thoughts: add new interface like MockMethodFilters and load implementations of the filter in runtime during start powermock into Repository. For now list of filters will be hardcode and contains only filter for Jacoco, but in future it will be configurable either via annotation or by adding implementation to class path.

@andreicristianpetcu I think this is a good issue to start :)

I have been digging in and I found that the $jacocoInit method is called in doMethodCall.
I'm not quite sure how to proceed. Do I need to hook the MockMethodFilters interface there or somewhere else? This is the stack trace of the call.
        at org.powermock.core.MockGateway.doMethodCall(MockGateway.java:69)
        at org.powermock.core.MockGateway.methodCall(MockGateway.java:63)
        at StaticClass.$jacocoInit(StaticClass.java)
        at StaticClass.<init>(StaticClass.java)
        at StaticClassTestngTest.test(StaticClassTestngTest.java:13)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:86)
        at org.testng.internal.Invoker.invokeMethod(Invoker.java:643)
        at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:820)
        at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1128)
        at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)
        at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
        at org.testng.TestRunner.privateRun(TestRunner.java:782)
        at org.testng.TestRunner.run(TestRunner.java:632)
        at org.testng.SuiteRunner.runTest(SuiteRunner.java:366)
        at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:361)
        at org.testng.SuiteRunner.privateRun(SuiteRunner.java:319)
        at org.testng.SuiteRunner.run(SuiteRunner.java:268)
        at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
        at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
        at org.testng.TestNG.runSuitesSequentially(TestNG.java:1244)
        at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
        at org.testng.TestNG.run(TestNG.java:1064)
        at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:77)
        at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeMulti(TestNGDirectoryTestSuite.java:159)
        at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:99)
        at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:106)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
        at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
        at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)

@thekingnothing how do you propose I get the list of all the classes? Some people recommend to use the Reflections library.
Should I add a library? Is Reflections ok or should I make my own class finder to find the list of classes implementing the interface?

I implemented my hackis method that finds all classes implementing my MockMethodFilters interface. An I also wrote some tests for it but I think the Reflections one is a lot better and think it is better to drop mine and use Reflections but it is your decision.

@andreicristianpetcu I don't think we should bring in Reflections for this. Reflections contains a lot more stuff than this and in some sense it tries to solve the same problems as powermock-reflect. I think we could take inspiration from Reflections perhaps but inmho we should avoid third-party dependencies as a much as possible.

Ok. I will try to do this. I'll keep you posted with the update.
This is not the only project I am working on in my spare time so the speed of development is not exactly stellar :D

@andreicristianpetcu Thanks for your understanding and for your help so far

there's a trick to solve the problem with current version:
PowerMockito.mockStatic(clazz, new Answer<Object>() {
        @Override
        public Object answer(InvocationOnMock invocation) throws Throwable {
            if (invocation.getMethod().getName().equals("$jacocoInit")) {
                return CALLS_REAL_METHODS.answer(invocation);
            }
            return RETURNS_DEFAULTS.answer(invocation);
        }
    }
);

Probably it can be also done also by overriding default answer in mocktio (via global config). Then existing code with mockStatic won't be changed.

Thank you @astafev I have a WIP for which I did not have time lately but I picked it up again. As I said before, I have other FLOSS projects on my mind but right now I want to fix this issue.

@thekingnothing I have a problem and maybe you can help me: I can scan the classpath of classes implementing my interface but I can only see them if they get instantiated.
If I comment this line, the test will fail. Also if I revert this commit the tests will fail.
Now either I can't see non-loaded java classes due to a Java limitation or due to my implementation's limitation. I'm trying to understand this and find a workaround. Is there a way that I can register some sort of a listener when the JVM starts, the unit tests start or powermock starts its instrumentation?
Do you have any other ideas? Thank you!

@andreicristianpetcu
You may check source code of ClassPathScanningCandidateComponentProvider. It's the Spring class which scans file system and looking for class file, so as result it can find not loaded classes.
But, I'm not sure that we really need feature. For us will be enough that we have list of filter in a properties file or hard-coded in some class constants.

Fixed by ignoring all synthetic methods/fields, as it was recommended by Jacoco team.


"Confirm the username" should be "Confirm your username"

On the modal when a user wants to delete their account.   Currently we show this message:

"Confirm the username" should be "Confirm your username"

Good First Issue: This issue is good for first time contributors. If you've already contributed to Warehouse, please work on another issue without this label instead. If there is not a corresponding pull request for this issue, it is up for grabs. For directions for getting set up, see our Getting Started Guide. If you are working on this issue and have questions, please feel free to ask them here, #pypa-dev on Freenode, or the pypa-dev mailing list.

This might be a little tricky, because in order to make the modal reusable, I made this just say "Confirm the ___ to continue" where the value is the same as the label.

Thanks for the feedback @di - given this, should we remove the good first issue tag and description?

Nah, I think it's still doable, just leaving some clues. 🙂

It looks like this should be closed or marked duplicate and closed, based on #3415

Thanks @AnneTheAgile!


Dialog width fixes for umbraco 7.5.4

Quick fixes for dialog width in umbraco 7.5.4.
#worksforme #notcrossbrowsertested

Just a thought, this wider dialog may look a bit odd if the doctype hasn't got a RTE on it, and only has narrow properties like textstrings/checkboxes etc.
Could we evaluate the contents, determine the max width and resize the dialog dynamically?

@tompipe Crazy that it's been a year since you made this PR! 🙄
I'm finally giving DTGE a bit of love and reviewing this.
I'm trying it out against Umbraco 7.6.11 and it appears that if I set the modalClass as "umb-modal wide", then it will open at 640px wide.  I'm not sure how long the "wide" class has been in Umbraco, but I think it would cover this request, (without the extra CSS).
Personally I think the wider dialog/modal looks fine with non-RTE, just textbox, checkbox, dropdown fields.  But I'm not sure whether this should be an optional config setting? // @mattbrailsford - would be good to have your input on this one.
We could either hard-code, modalClass: "umb-modal wide dtge-modal" in doctypegrideditor.services.js, or have an option in the config to enable it to be wider (or maybe override the modalClass value?

I vote "wide" config option


[ckpt-rewr] Save state dict API

What does this PR do?
Implements an API for saving a state dict to disk given a sharded or full state dict:

save_state_dict_to_disk
_save_sharded_state_dict_to_disk
_save_full_state_dict_to_disk

Tests for both CPU and GPU
Also modifies testing infra for comparing DTensors and ShardedTensors, generating sharded test models

Please wait for the code freeze

Holding for freeze

please release


How to report FLOPS, Runtime and Model Size(model paramters) of the Model

Is there any method in the test or evaluation phase to measure the FLOPS, Runtime, and Model size or No of Parameters for the Model?

The doc for benchmark and log analysis may be helpful references for you.

Thanks @Tai-Wang for sharing the information


Updating the information on CLion integration in README

Hello,
Please consider updating the 'Vcpkg with CLion' section in README.
Starting from the version 2023.2, CLion integrates with vcpkg and there is no need for additional CMake option as before. I also added a link to the web help where users can find out more.
Thank you!

We stil need CMAKE_TOOLCHAIN_FILE.
https://www.jetbrains.com/help/clion/package-management.html#install-vcpkg:~:text=Add vcpkg integration,the CMAKE_TOOLCHAIN_FILE variable.

cc @JavierMatosD

@FrankXie05 Correct, the variable is still in use, but now it's being added automatically


No highlighting on Termion

First: is this a bug report? A suggestion? Or asking for help?
Bug report
Problem description
There's no highlighting, at least for SelectView under the Termion backend. I checked with Ticki, and he says the feature exists in Termion, so it just needs to be implemented on this end. I notice the Ncurses backend has set_colors while the Termion has apply_colors. Is this name difference possibly part of the problem?
Here is a screenshot comparing my program discourse-tui in ncurses and termion:

If possible code, or pseudo-code to reproduce the problem / present an idea.
Set up a Selectview and run the Termion backend.
Environment

Operating system: Linux
Backend used: Termion

If using ncurses on linux, ncurses version? 6.1

Current locale en_CA.utf8
Cursive version 0.8.1

Herp de Derp, it seems to be because I was using a hex code color rather than a named one.


Add update_date specifically for location information

Background
There is an update_date property several places in the specification: the FeedInfo, FeedDataSource, RoadEventCoreDetails, and FieldDeviceCoreDetails.
In each object, the property is defined as: "The UTC date and time when the  was last updated."
There are two issues with this:

It is not clear when the value should be updated (see #184).
It is not possible to know what changed.

Item 1. should be addressed by #184—this issue seeks to partially address 2. by proposing an update date specifically for location information.
This issue was spawned from subgroup member discussion specifically in regard to desire to know when the location (e.g. geometry, road_names) was updated. We do not want to add too much granularity to update_date—a specific update_date for each property is not necessary, but one for location may be desirable as this is arguably the most important features of a road event.
Potential solutions
This could be accomplished by simply adding a new location_update_date property to the RoadEventCoreDetails, and FieldDeviceCoreDetails. It could be more complex, such as being added to a location-specific object similar to what is proposed in #233.
Drawbacks
While we want WZDx to meet the desires of producers and consumers and be powerful with optional properties to enable advances consumers to provide higher specificity, we also want to keep it simple and easy for new users to understand. Adding a new optional property to describe when location information was updated doesn't break backwards compatibility, but it does add complexity so it should be important to many consumers for clear reasons before it is implemented. This issue was created to ensure discussion was documented, as the concept of a "location update date" was brought up several separate times, but there it will not be prioritized until there is substantial demand.
Next Steps

Determine if knowing when the location information of a road event or field device is still desired by consumers.
Discuss and expand on possible implementations.

Closed due to lack of interest and not obvious benefit to users.

We actually use this in our internal systems on a regular basis.  Location is one of those things that change when nothing else has changed.  Aside from updating the location with additional accuracy due to more constellations passing by there are real changes for moving work zones.  Such as, an arrow board that was used in a moving lane closure changes its location by the minute when nothing else has.


Add docker metric "docker.cpu.shares"

What does this PR do?
Adds docker.cpu.shares metric to the datadog agent.
It is the value of /sys/fs/cgroup/cpu/cpu.shares.

Motivation
from https://help.datadoghq.com/hc/en-us/requests/138307 .
I want normalized CPU usage for container CPU monitoring.
docker.cpu.usage: 100% has a different meaning depending on the value of cpu.shares (=ECS task definition "cpu" parameter).
If cps.shares is 1024, it reaches the limit.
If the agent can get cpu.shares, I can make a monitor like this:
avg:docker.cpu.usage{*} by {container_name} * 1024 / avg:docker.cpu.shares{*} by {container_name}

Versioning

[x] Bumped the check version in manifest.json
[x] Bumped the check version in datadog_checks/{integration}/__init__.py
[x] Updated CHANGELOG.md. Please use Unreleased as the date in the title
for the new section.
[x] If PR impacts documentation, docs team has been notified or an issue has been opened on the documentation repo

Additional Notes
Pull request for version 6: https://github.com/DataDog/datadog-agent/pull/1562

@xvello @hkaj Thank you for your comment!
I fixed the pull request.

Thank you for merging PR!!

@winebarrel thanks for the PR! docker.cpu.usage should be a percentage of a single core (it's not capped at 100), not a fraction, though the metadata for this metric was incorrect at one point. Thus, I believe the query should be:
avg:docker.cpu.usage{*} by {container_name} * 1024 / 100 / avg:docker.cpu.shares{*} by {container_name}


LazyStencil incorrectly handles backend options

Trying to pass e.g. oir_pipeline in the gtscript.stencil call causes failure. For example:
from gt4py import gtscript
from gt4py import storage as gt_storage

from gtc.passes.oir_pipeline import DefaultPipeline

backend = "gtc:numpy"
oir_pipeline = DefaultPipeline(skip=DefaultPipeline.all_steps())

@gtscript.lazy_stencil(backend=backend, oir_pipeline=oir_pipeline)
def test_stencil(out_storage: gtscript.Field[int]):
    with computation(PARALLEL), interval(...):
        out_storage = 0

The exception is
Exception has occurred: TypeError
__init__() got an unexpected keyword argument 'oir_pipeline'
  File "/Users/johannd/gt4py/src/gt4py/gtscript.py", line 348, in _decorator
    options = gt_definitions.BuildOptions(

Relatedly, gtscript.stencil should be updated to use the same helper methods from StencilBuilder that gtscript.lazy_stencil uses.

The error has changed in master (likely due to #825 ) but the issue persists.

Never mind, it's actually fixed with #825 I previously ran this with the old "gtc:numpy" backend name. I opened #992 to track that in turn.


ATTN SEED USERS: Good news! Custom decorators removed - some reorganization

No more custom decorators
Can just use standard @Component from @angular/core
Template switching for NativeScript done using clever concurrent gulp task and leveraging npm scripts for {N} app
AoT builds available for {N} app via Webpack with: npm run build.ios and npm run build.android
Livesync improved for {N} development

Best way to move forward:
Instead of merging in these changes (btw you can! - you may have some merge conflicts), you could just download a new copy of master and follow this. Then can just drop your customized app code back in place.
This setup is vastly better than previously using custom component decorators since they could not be used with AoT builds for the web. Additionally the ability to create AoT builds of {N} app is made possible with the most recent merged PR.

@NathanWalker @mgechev This project is so awesome!  I'm finding myself spending quite a bit of time reading and I would love to contribute by helping the docs. I think having a beefed up wiki (on github) or even a simple static site to point people to (gh pages) would go a long way. One other thing that I wish existed (maybe it does?!) is a gitter or slack team that people could go to with questions or guidance. I know I would certainly use it.
Let me know if I could help, I would love to be apart of the team!

Hi @richarddavenport, it's always nice to hear when someone has gotten a lot out of it. Thank you.
It's certainly been a long standing passion project somewhat constantly in the works and improving (most of it through experimentation - at least the feature integrations here specifically). As always much credit to @mgechev for the underlying foundation which is infinitely scalable and extensible.
I agree. There should be more clean/concise documentation around several things here. Some of the reasons a lot of docs have not been outlined as of yet is because some ideals were continually being worked on so documenting at that point would have just created more work and more confusion later. We are at a point now that is starting to make sense to conclude some docs.
Some of which I have provided here just now:
https://github.com/NathanWalker/angular-seed-advanced#code-organization-overview
Always welcome to more docs on various other things. Many areas could be elaborated on like extending and providing mobile specific services to override shared web services where needed.
There actually is a Slack channel for this seed (angular-seed-advanced) once in this group:
http://developer.telerik.com/wp-login.php?action=slack-invitation
I never setup a gitter channel because I am too busy and wouldn't want to let people down with blank answers. However the Slack channel above provides a place for other users to share experiences and answers etc.
As always, love to hear any suggestions to improvements. Thanks again.

I just realized you're the Nathan Walker that did the NativeScript course on Egghead.io. Just watched it a week or so ago. Great job!

We also have a forum category for this awesome seed! http://forum.nativescript.org and check out the Web and Mobile Shared Code category if you want to pose questions. More info here: http://forum.nativescript.org/t/about-the-web-and-mobile-code-sharing-category/228

Thanks @jlooper ! Yes that forum is the best place for discussion and questions! 👍

Quick ping on this change...I downloaded it and tried to run, but I think there's an issue wtih nativescript-dev-webpack, which isn't installing properly (perhaps because of pathing issues?)
><EMAIL_ADDRESS>postinstall /Users/Looper/Desktop/angular-seed-advanced-master/nativescript/node_modules/nativescript-dev-webpack
> node postinstall.js

fs.js:584
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: ENOENT: no such file or directory, open '/Users/Looper/Desktop/angular-seed-advanced-master/nativescript/app/vendor-platform.android.ts'

It's looking in the /app folder, but I think it should be /src?

@jlooper was this a fresh download of master and just running npm i in root?

@jlooper @NathanWalker I have spent best part of my day tracking this down and believe it is due to the fact that nativescript-dev-webpack is looking for the app dir which has now been renamed src in angular-seed-advanced, but I could be wrong ;)

Fresh download and following the setup steps in the readme works for me @jlooper @NathanWalker.
However, at step 5 npm run git.merge I got some git errors saying that some files would be overwritten by the merge. I deleted the files in question from disk and everything worked from there. The files were:
nativescript/tools/webpack/tns-loader.js
nativescript/webpack.android.js
nativescript/webpack.common.js
nativescript/webpack.ios.js

I also had an error saying  the package was invalid when deploying to my Android device the first time, but after adjusting the package id/name it went away. That may have been related to previous settings or installations on my particular device. Web and iOS worked out of the box.
And just to add to the general comments: this project is fantastic and I have been looking forward to this particular update like it was Christmas :) Having livesync back for {N} makes all the difference!
Thanks so much for all the great work and special shout-out to @m-abs as I think he contributed a lot here.

@nathanwalker it's a fresh new install and @swiftwork that was my impression too

@jlooper @Swiftwork @krisloekkegaard 'How best to use for project section` has been greatly simplified now and verified to work with latest changes:
https://github.com/NathanWalker/angular-seed-advanced#how-best-to-use-for-your-project
(refresh the page to ensure you're looking at new instructions - removed all the npm scripts for git, wasn't needed anymore - much simpler :thumbsup:)

@Swiftwork Here's a rundown of how Nathan and I got this puppy working today!

Update node and npm. My versions weren't up to par; you need node 6.9.1 and npm 3.10.9.
It's preferable to upgrade node by using nvm. Instructions are here, and this is smart going forward as you can pick and choose the version of node you need.
Once you upgrade, redo the npm install. Note, you may need to upgrade node-sass if that part errors, but this is a quick fix, just follow the instructions in the error message.

@jlooper I have everything but possibly npm up to date, but I will download a fresh master this evening and see what differs from my own and if I can get that working. Maybe I will migrate my changes to the fresh copy as well.
@NathanWalker I've previously been working on a Mac but I have since swapped over to my Windows desktop. I'm not sure Windows is supported, but some of the scripts in the nativescript folders package.json won't work. rm -rf and mkdir -p are not DOS commands. I could run a bash terminal instead, but thought I would let you know.

@Swiftwork Sorry that rm -rf and mkdir -p is my fault.
All the windows devs I work with have a working bash shell, so I didn't consider non-bash shells.
Do you know of a platform independent way to do the same?
mkdir -p creates the path including parents paths and doesn't fail if the dir already exists. It's used to avoid errors installing nativescript-modules that expect the app-dir to exist.
rm -rf just removes a directory and all its content. Maybe it could be replaced with rimraf from npmjs.

@m-abs yeah, I usually have that as well, but just swapped pc, therefore it wasn't setup yet. I don't know if it is a good idea to use npm packages for that but rimraf and mkdirp are solutions that could be used. I guess it depends on if you want out of the box functionality or if you want to require a bash alternative.

I was getting some errors and unexpected behavior related with change detection when dropping our components from the old structure into the new. I believe the reason is that without the BaseComponent decorator, OnPush is no longer used by default.
It's a quick fix by setting the change detection strategy on each component as you are anyway going through and removing the BaseComponent decorators, but just thinking it might make sense to update the sample components and perhaps the docs to highlight this. Especially for people coming from the old structure.

@krisloekkegaard good point - thanks for bringing that up - yes, OnPush is not enabled by default any longer as that has proven too difficult for the large majority of cases and it is no advisable to have it enabled everywhere. Only enabled for components that you want to dial.

Hi @NathanWalker, amazing work!! Thank you very much.
I am having problems with custom Nativescript components. The view is rendering ok but my app crashes when I tap a button. Is it possible that the view is looking for the *.ts file that contains the handler in a wrong path?
I am placing the component files (*.html and *.ts) in 'nativescript/src/mobile/components'.

@codeback can you elaborate a bit more on what you are trying to do and perhaps share some code and/or specific error messages?
If this is not related to the latest changes in structure, perhaps it would be worth asking the question in a separate thread - either by opening a new issue here on GitHub or creating a topic in the forum @jlooper mentioned:
http://forum.nativescript.org/c/web-and-mobile-sharing

Hi @krisloekkegaard,
I thought the problem was related to the new structure but I was wrong.
I've just found out that the problem was entirely related with ngrx-store-freeze and deep cloning.
The confusion was due to the unspecified error message we were receiving.
Sorry about that!

This change looks great, the livesync in the {N} app is lovely! One problem I encountered on Windows just in case it ends up being useful to someone else: when building the {N} app, the build.js.tns task complained about missing modules in ./app. Turns out the symlink nativescript/src/app pointing to src/client/app wasn't there. Maybe you have to run git clone as admin on Windows? (symlinks can only be created with an elevated prompt).
Anyways, I recreated the symlink manually with:
mklink /j nativescript\src\app src\client\app

I just installed lates nodejs 7.4.0 and pulled this repo, made user gulp, nativescript are installed. when I did npm install, I get the same exact error message as described by @jlooper
https://github.com/NathanWalker/angular-seed-advanced/issues/337#issuecomment-274307979
Windows 10 Home edition, Node js 7.4.0

@sparachi it is due to the fact that there is no longer a folder at nativescript/app. This used to be where the now nativescript/src/* files used to lie. Im not sure why the templates, aren't copied but I believe that it has to do with permissions similar to what @ghys experienced. What you actually want is the following:
|-nativescript/app/
|     |-vendor-platform.ts                # I think that's the name
|     |-vendor-platform.android.ts
|     |-vendor-platform.ios.ts
|
|-nativescript/src/*                      # The rest of the src files

When I did a merge instead of a fresh master, I found these three files in my src folder instead.

nativescript/app should be created by the preinstall* script, this is for nativescript-dev-webpack that creates some files inside nativescript/app duing install.
The three files have been added to git inside nativescript/src, so we don't loose them.
*) I've only tested the script on a *NIX system with a bash shell, Windows might not support "mkdir -p" without cygwin.

I pulled in the code on my Ubuntu 16.04, and npm install went through fine. yarn install had hiccups
[22:57:06] Error in plugin 'run-sequence(build.html_css)'
Message:
ENOENT: no such file or directory, scandir '/home/saikarthik/Documents/xxx/node_modules/node-sass/vendor'
and installed node-sass globally, and yarn install went through.
When I did npm start I had the same issue. Followed steps and did npm rebuild node-sass finally it worked.
As @m-abs  suggested I will try to work on my ubuntu. @Swiftwork Thanks for you reply.

I'm going to close this now - Note the seed was also just updated to NativeScript 2.5, released today - which does away with npm livesync scripts for iOS/Android - those are now automatically handles via npm run start.ios and npm run start.android (livesync mode is the default dev workflow out of the box starting with {N} 2.5) 👍


[UI] TOTP element alignment issue

Purpose

TOTP option element position looks broken and misaligned.

Steps to reproduce

Follow the guide on https://docs.wso2.com/display/IS580/Multi-factor+Authentication+for+WSO2+IS
Under local & outbound authentication give "totp" as an option
As on the "Try out" step, navigate to https://localhost:9443

Closing as it's no longer applicable.


New package: CoordinateConventions v1.0.2

Registering package: CoordinateConventions
Repository: https://github.com/ProjectTorreyPines/CoordinateConventions.jl
Created by: @bclyons12
Version: v1.0.2
Commit: cddb58ec909e70463afa7cedc12571505d9cf4bc
Reviewed by: @bclyons12
Reference: https://github.com/ProjectTorreyPines/CoordinateConventions.jl/commit/cddb58ec909e70463afa7cedc12571505d9cf4bc#commitcomment-144831760
Description: COCOS transformations

[noblock]
@aplavin It's an implementation of COCOS - Coordinate Conventions commonly used in fusion research. We will add this to the documentation.
Paper: O. Sauter and S. Y Medvedev, "Tokamak Coordinate Conventions: COCOS", Comput. Phys. Commun. 184 (2013) 293
cc: @orso82

Good point. I have updated the README.md and online documentation accordingly


follow reference with reference facing added

Basic Info

Info
Please fill out this column

Issue(s) this addresses
#272

ROS2 version tested on
Humble

Aerial platform tested on
Ignition

Description of contribution in a few bullet points

Follow reference now admits reference facing mode.

Description of documentation updates required from your changes

New yaw mode: REFERENCE_FACING

Codecov Report

Merging #273 (52a76e6) into main (57386a1) will decrease coverage by 0.08%.
The diff coverage is 0.00%.

:exclamation: Current head 52a76e6 differs from pull request most recent head 7e02cf5. Consider uploading reports for the commit 7e02cf5 to get more accurate results

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
@@           Coverage Diff            @@
##            main    #273      +/-   ##
========================================
- Coverage   3.06%   2.99%   -0.08%
========================================
  Files        100      97       -3
  Lines       5251    5242       -9
  Branches     455     470      +15
========================================
- Hits         161     157       -4
+ Misses      4952    4931      -21
- Partials     138     154      +16

Flag
Coverage Δ

unittests
2.99% <0.00%> (-0.08%)
:arrow_down:

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

Impacted Files
Coverage Δ

...w_reference_behavior/follow_reference_behavior.hpp
0.00% <0.00%> (ø)

... and 50 files with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

I believe that what we are doing is path facing.  The drone will move towards the reference ("path) looking at the reference ("facing"). In other behaviors such as Go To, it works the same, the drone looks at the reference. The importance of path facing, especially in the follow reference behavior, is that the drone looks at the reference so as not to lose it in the image.

@RPS98 when doing a 'Go_to' in earth frame with path facing the drone is not looking at the reference (which would be 0,0 of earth frame), instead it is looking at the motion/velocity vector which is the same as looking as the position set in 'Go_to' argument in respect of earth frame. In this case it is true that we are not interested in the drone looking at the motion vector as we always want to look at the 0,0 of our reference, but issue #194 suggest that in the future we might want to, for example, orbit a reference with the drone x axis aligned with the motion vector (path_facing) or looking at the 0,0 of the reference (reference_facing).

I think the best way is to follow these steps:
Create a Pull Request to add the new Yaw Mode:

Add Yaw Mode: YAW_TO_REFERENCE

Now, behaviors as Go To use Path Facing, but they really use Yaw To Reference. So, we have to change the behavior to use the new mode.
2.1 Change behaviors
2.2 Change python interface
2.3 Check Keyboard Teleop
2.4 Check missions. I think that missions are not affected by this change

Then, use this Pull Request to add the new Yaw Mode to the Follow Reference behavior.
What do you think @javilinos ?

Seems good to me, I'm on it @RPS98


Code, Documentation and Integration

Code

Code improvements for promises and middleware.

Documentation

Improvement of documentation.

:tada: This PR is included in version 1.0.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


creation of nodes with snakemake functionality

Summary
Provide a new node type that allows execution of snakemake rules. pyiron/ironflow would provide a thin interface to make snakemake rules appearing as native pyiron objects.
Detailed Description
@liamhuber, this is a brief summary of the discussion we had at our last Zoom-meeting.
Looking at several workflow solutions in the Plattform MaterialDigital (PMD) a recurring request is that workflows with codes running in various conda environments have to be supported. A simple approach, which should be rather easy to implement would be to use snakemake. The idea would be to have a special run command that provides all the parameters that are needed to setup the Snakemake input file to run snakemake and to run it within pyiron. The corresponding jobs would be regular pyiron jobs, but could use the functionality of snakemake to run install, load and run codes living in different conda environments. Rather than using a full snakemake workflow the idea would be to run each snakemake rule as a separate job. This should be straightforward to implement since the rule defines input and output parameters (similarly to pyiron) plus some extra information regarding the conda version etc.
The (pseudo-) code could look like this:
@snakemake(conda=‘my_repository’,
                             resources=‘100MB’,
                             output=‘out_file1’)
# job object is created by decorator, similar to the value argument in a setter decorator
def my_node(input= [‘my_file1',  ‘my_file2’], job):
       return job.output

Further Information, Files, and Links
Example workflows (snakemake example):

PMD snakemake example
PMD further examples

I also made notes from this meeting. I only got to the pseudocode parts this morning, but was actually not super happy and wrote some more pseudocode right after.
Notes:
On 6 April, Joerg and I just had a zoom call to discuss recent thoughts on the next iteration of pyiron_base/all this graph stuff.
I often make post-processing notes after such meetings for my own benefit, and reproduce them here.
First on the docket was to quickly run through my (barely)pseudo-code example for a cyclic while loop over here.
I'm relieved that he also finds it pretty readable.
We can add extensions like a limit on the number of iterations quite easily, e.g. by including max_steps as input to the while-loop kill switch, then having steps as both input and output and linking these (to strictly maintain functional behaviour).
I also floated the idea of adding "meta node" constructors -- i.e. a node class call returns a node instance, a meta node call returns a node class.
I think things like while and for loops will often require some customization, but this would hopefully make the whole thing less verbose.
One of the things Joerg was keen on with this example was the way that all the information existed right in the graph, even the Lammps intepreter instance (the engine node).
Next up was Joerg's node/task sketch here.
I was initially very concerned about the fact that a single node might have multiple associated tasks -- I thought only a macro node should behave in such a way.
Joerg walked me through the task/node distinction a little bit more and I've really come around to this point of view.
First, some nomenclature: we broke the idea of a "node" down into "atomic node" (in the greek sense of the word, not the kind of science we're doing) and a "macro node".
"Atomic nodes" should, as far as possible, be functional -- meaning they do not hold internal state, and the same input always produces the same output.
Now, there are a few bends to that rule:

First, we might consider something like a vasp job. On the initial call, the node might start such a job on remote resources and return some manner of "wait" signal. On the next call it may see that such a job is already running and return the "wait" signal again. Next, it may see that the job has finished, parse the output and return the "real" output. Finally, it may have discovered that the job crashed and return a signal accordingly. In a strict sense, this is not functional because we get different outcomes through time for the same input.
Second, there may be unavoidable internal randomness, e.g. some executed code may use RNG without exposing a seed value to us, or there may be hardware dependent impact (up to and including external forces crashing a calculation, e.g. if there is memory shortage on shared resources!) We simply live with this.
Finally, some data is too big to return in-memory, so we will want to return a pointer to some sort of serialized data. E.g. a vasp wavecar. This introduces "state" to the graph that can be tampered with from outside the graph execution. Again, we just live with it. As a bonus, if we accept that we live with this, we can also allow file pointers as other IO to nodes, e.g. to quickly write nodes for running different softwares without writing parsers. This abandons "purity" but is super practical.
In contrast to this is "macro nodes", which is any node can be broken down into a graph of atomic and/or sub-macro nodes.
For maintainability and readability, it would be nice to keep "atomic" nodes as simple as possible, and for "macro" nodes to only run a sub-graph and node mix in extra non-nodal functionality.

Now we come back to Joerg's sketch and the idea of tasks.
In the simplest case: a node may issue a "task" to interpret a python snippet, and the "executor" is just the current python interpreter, and the "management" is just a first-come-first-served queue of python commands.
Under more complex circumstances, the "executor" might be a lammps interpreter, and the node is submitting to it a lammps-library-readable command for interpretation.
We could go a step further in complexity and think about a Vasp interpreter, then the executor may want to receive extra input to itself letting it know whether subsequent tasks are going to be quantitatively similar or not -- i.e., can and should we mix together the charge density from the last task with the initial density from the new task's configuration, or should we start from scratch entirely with the initial density?
Then there is the entire concept of the executor intelligently allocating resources to these tasks and adjusting their order for optimal computational efficiency -- of course this is a brilliant idea, but I have no insights on how to implement it at the moment.
Pseudocode modifications to the node class run routine to accommodate executors might look something like this:
class Node:
    ...

    def run(self):
        if self.executor is None:
            function_output = self.node_function(**self.inputs.to_value_dict())
        else:
            if self.executor.is_queued(self):
              function_output = Executing()
              # Executing is some custom class the node will know how to process
              # s.t. outputs don't get updated when we process the function_output
            elif self.executor.is_finished(self):
              function_output = self.executor.collect(self)  # Executor has state! :(
              # This might return the expected tuple of output, or might return some
              # Failed() class instance or otherwise similar to Executing()
            else:
              self.executor.push(self)
              # The executor is then responsible for executing
              # node.node_function(**node.inputs.to_value_dict)
              function_output = Executing()

        self.process_output(function_output)
        # Catch failure errors, update output channels with successful data, etc.

Where the if/else-with and process_errors method extend existing functionality.
Under the hood, the executor methods don't just store the node (which may get updated as part of some for-loop), but are checking to see if a hash of some combination of the node+input is already in its system.
This way the node (an object on our graph) and the task (the function call with specific input) is truly decoupled, at the cost of hashing the input.
Thus, there is overhead to using an executor, but this is in-line with what Joerg and I discussed and not dissimilar from how dask delayed introduces cost (although we'll have to think/work to make sure the cost is comparable in magnitude to dask...)
For something like Lammps, we can probably also manage to send batches of tasks to the executor?
In this way, the node processes its input, produces one or more tasks, talks directly with an executor to submit them, wait for them to be executed, and retrieve the result, then processes this into node output, which then propagates through the node graph to trigger new node work cycles.
So tasks and nodes are extremely closely related, but not the same thing.
Thus, a single node really may submit multiple tasks -- perhaps even to different executors!! -- although most of the time such a scenario is probably best handled by breaking such a node into smaller "atomic" nodes and re-assembling them into a "macro" node.
Previously, we had talked about such executors/task queues belonging to the workflow itself, and all nodes submitting their directly to their workflow, or tasks of their workflow.
Today we brainstormed a little bit how the executors may themselves be nodes placed on the graph, which serve only as input to nodes, talking directly with them to get work done.
In such a paradigm this would, again, bend the rules on a node (the executor node) having "state", but would be very practical, and I'm ok with it insofar as the state is intended only to exist while the workflow is live and work is being done.
Pseudocode using executors might look something like this:
from pyiron_contrib import Workflow
from time import sleep

wf = Workflow("murn_pseudocode")

# First, let's define nodes that will exist outside all loops

wf.lattice_constants = wf.create.node.linspace(
  start=3.8,
  end=4.2,
  n=10
)

wf.lammps_executor = wf.create.node.lammps_executor(
  n_cores=10,
  n_instances=5
)
# This node, unfortunately, has state!
# On first run(on instantiation?), it creates an executor and returns
# it as output. Subsequent runs do nothing (unless cores or instances change?)
# The executor object in turn holds n_instances copies of the Lammps interpreter
# and distributes tasks to them under the assumption n_cores are available.

wf.potential = wf.create.node.atomic_potential(
  type="EAM",
  species=("Al",),
  choice=0,
)

wf.lammps_engine = wf.create.node.lammps_engine(
  potential=wf.potential.outputs.potential,
  executor=wf.lammps_executor.outputs.executor,
  # If the executor is None, the engine should create
  # its own single-use instance of the lammps interpreter
  # on each run that just uses the main python process
  # for computation -- i.e. it behaves the same as a pure-
  # python node that hogs the python process when executed
)

# Next, we want an outer while loop that runs until
# all the jobs in our for-loop produce real data

# Decorator is class method for single import
@Workflow.node(
  "required_or_none", "data",
  input_that_must_update=("step",)  # Won't re-execute until this has been updated
)
def while_executing(required, step, data, sleep_time=0):
    """
    `step` is not used, but the node won't execute the function unless this channel
    has received an update since the last execution.
    """
    if any(isinstance(out, Workflow.Executing) for out in data):
        # Executing is class attribute for single import
        # Loop again
        sleep(sleep_time)
        return required, None
    else:
        # Stop and return the completed data
        return None, data

wf.while_executing = while_executing(sleep_time=5)

# And an inner loop that will iterate over our lattice constants
wf.for_loop = wf.create.node.for_loop()
# inputs: iterable, i, step (must update), reset
# outputs: item, i (gets incremented and connects to input), done
# A connection is made between the input i and output i
# so that we have topologically-defined pseudo-state!
# The step channel must have received an update before
# a new execution will trigger

# Next, let's define the nodes needed inside the inner loop
wf.structure = wf.create.node.bulk_structure(element="Al")
wf.calc_static = wf.create.node.calc_static(
  engine=wf.lammps_engine.outputs.engine,
)
wf.energies = wf.create.node.accumulator()
# inputs: item, items, reset
# outputs: items
# Starts as an empty list, gets pseudo-state
# by looping the output items back to the input items
# Appends item to items at each call, resetting to an
# empty list if reset==True

# Now let's wire up our loops!

# The flow of data inside the for-loop is very easy
wf.calc_static.inputs.structure = wf.structure.outputs.structure
wf.energies.inputs.item = wf.calc_static.outputs.energy_pot

# The for-loop should pass in lattice constants and iterate
# each time we append to the accumulator
wf.structure.inputs.a = wf.for_controller.outputs.item
wf.for_loop.inputs.step = wf.energies.outputs.items

# The while loop will kill the for-loop by destroying its
# iterable input
wf.while_executing.inputs.required = wf.lattice_constants.outputs.array
wf.for_loop.inputs.iterable = wf.while_executing.outputs.required
# Or reset the loop
wf.for_loop.inputs.reset = wf.while_executing.outputs.required

# The while loop should step with each completion of the for-loop,
wf.while_executing.inputs.step = wf.for_loop.outputs.done
# and once when we start the graph
wf.while_executing.inputs.step = wf.lattice_constants.outputs.array

# And the while loop needs to see the accumulated energies,
# to check whether they're all finished data or not
wf.while_executing.inputs.data = wf.energies.outputs.items

# Finally, we'll use the collected energies and lattice constants
# to calculate something
@Workflow.node("bulk_modulus")
def murnaghan(lattice_constants, energies: list | np.ndarray):
  # Do the math
  return 42

wf.bulk_modulus = murnaghan(
  lattice_constants=wf.lattice_constants.outputs.array,
  energies=wf.for_loop.outputs.data,
)

wf.run()
print(wf.bulk_modulus.outputs.bulk_modulus)
>>> 42

The idea is that we have an inner for-loop which generates Lammps static calculations and ships them off to the Lammps executor queue.
These calc_static nodes get different output depending on wheth
Outside this we have a while-loop that keeps running the for-loop until all the accumulated energies are actually energies and not unfinished-calculation signals.
In the process of writing this up, I really see the benefit of having control channels ala Unreal blueprints, but I wanted to keep this example as close as possible to the existing code -- I'll go play around with this idea afterwards.
Nope, wait, this whole example gets broken because there is only one node calc_static -- somewhere the calc status needs to be preserved, and while that could be on the executor it is better on the node, but then we really need multiple node instances...
In this way the node should really submit itself to the executor, and I really need multiple node instances, and probably a special node class that handles the async execution....
And then some way of handling for loops and while loops that somehow doesn't involve spamming a million nodes?
I need to think on it a bit again.
Finally, Joerg shared an idea he had from listening to some of the engineers' presentations about providing a pyiron wrapper for snakemake.
Snakemake is brilliant in that it readily allows for work to use different conda environments, distributes resources, etc., which are wheels we really don't want to re-invent.
But, it is also really ugly to write (basically old-school make files), and strictly acyclic.
Since we are already on-board with having node IO be pointers to files, Joerg's insight was to have nodes that allow us to write snakemake rules in python, and then convert these to snakemake for execution.
There would be overhead for this, so you would only want to do it for more expensive calls or for situations where you really needed a different env, but it immediately gives us a lot of flexibility for incorporating new codes.

There is no concrete plan, but we figured some sort of @snakemake_node decorator should be fairly straightforward.
Technical note: English notes were completed immediately following the meeting on 6 April, but I didn't have time to sit down and write the Murnaghan pseudo-code and accompanying paraphraphs (i.e. the header stating what the pseudocode is for and the paragraph immediately after the code) until 11 April.

Better (but still imperfect) pseudocode for loops, relying on nodes having flow control events:
from pyiron_contrib import Workflow

wf = Workflow("murn_pseudocode")

wf.lattice_constants = wf.create.node.linspace(
  start=3.8,
  end=4.2,
  n=10
)

wf.lammps_executor = wf.create.node.lammps_executor(
  n_cores=10,
  n_instances=5
)
# This node, unfortunately, has state!
# On first run(on instantiation?), it creates an executor and returns
# it as output. Subsequent runs do nothing (unless cores or instances change?)
# The executor object in turn holds n_instances copies of the Lammps interpreter
# and distributes tasks to them under the assumption n_cores are available.

wf.potential = wf.create.node.atomic_potential(
  type="EAM",
  species=("Al",),
  choice=0,
)

wf.lammps_engine = wf.create.node.lammps_engine(
  potential=wf.potential.outputs.potential,
  executor=wf.lammps_executor.outputs.executor,
  # If the executor is None, the engine should create
  # its own single-use instance of the lammps interpreter
  # on each run that just uses the main python process
  # for computation -- i.e. it behaves the same as a pure-
  # python node that hogs the python process when executed
)

inner = Workflow("inner_loop")
inner.structure = inner.create.node.bulk_structure(
  element="Al"
)
inner.calc_static = inner.create.node.calc_static(
  structure=inner.structure.outputs.structure
)

lattice_energy = Workflow.meta.for_loop(
  body=inner,
  step=inner.calc_static.outputs.control.ran,
  iterable_inputs={
    "lattice_constant": inner.structure.inputs.lattice_constant
  },
  iterable_outputs={
    "energy_pot": inner.calc_static.outputs.energy_pot,
  }
)
# a meta node takes a workflow instance and returns a node class

wf.for_loop = lattice_energy()
# This is a macro node. When called it will make sure that its children
# match with its input, creating or destroying nodes as needed
# In this case, it loops over its iterable input to create a body node for each
# element in the iterable inputs (can there be more than one??) and updates the
# corresponding input channel in each to trigger a run of the subgraph
# then collects all the subgraph outputs into iterable_outputs
# What happens if the number of iterables changes??
#  Death? Error? Maybe it's OK on the first call and the first call only, since it's a macro
# Can we loop over multiple iterable inputs as long as they're the same length?
#  Yes, zip and execute
# What about when they're different lengths?
#  No, nest multiple meta nodes together
# Can we collect an arbitrary number of iterable outputs?
#  Yes
# How to change/access non-iterable IO?
#  Some sort of broadcasting magic? Then do we even need iterable_outputs?
wf.for_loop.iterable_inputs.lattice_constants = wf.lattice_constants.outputs.array

wf.all_finished = wf.create.node.none_running(
  data=wf.for_loop.iterable_outputs.energy_pot
)

wf.while_loop = wf.create.node.while_loop(
  condition=wf.all_finished.outputs.truth,
  step=wf.for_loop.outputs.control.done,
)
wf.for_loop.inputs.control.reset = wf.while_loop.outputs.control.if_false

@Workflow.node("bulk_modulus")
def murnaghan(lattice_constants, energies: list | np.ndarray):
  # Do the math
  return 42

wf.bulk_modulus = murnaghan(
  lattice_constants=wf.lattice_constants.outputs.array,
  energies=wf.for_loop.iterable_outputs.energy_pot,
  update_automatically=False
)
wf.bulk_modulus.inputs.control.run = wf.while_loop.outputs.control.if_true

@liamhuber, thanks for the great summary and all the suggestions and pseudocode. I like most of your pseudocode. I am however afraid that the loop part (with the inner workflow) will be hard to understand - it is rather far away from any standard python notation. For acceptance, this is however a super important criterion. Below are some (very preliminary) thoughts to combine a python-like syntax with a workflow notation:
  @node()
  def energy_convergence(job_old, job_new, eps):
      while not job_new.is_finished:   # wait until job is finished (or aborted)
          wait(1)
      return np.abs(np.mean(job_new.output.energy) - np.mean(job_old.output.energy)) < eps

  job = wf.create.jobs.lammps('my_name')
  job.run()
  for it in wf.arange(10):  # it is the inner workflow object (not just an integer index)
      # the next line calls job.next(i_structure=-1, iter_step=it), which is job/node specific
      # for an atomistic job n_iter determines the structure that should be taken (-1 is the last step)
      # 'it' also appends the inner workflow to the job object
      job_new = it.next(job, i_structure=-1)
      job_new.run() # append command (here run) to inner workflow
      it.break_if(wf.energy_convergence(job, job_new, 1e-5) # call and append to inner workflow
      job = job_new.copy()

The main idea is to create an iterator object that replaces the normal integer index and provides all the functionality to run and store the inner workflow in the loop. This object not only allows to call break or continue but can be appended also to node objects to log and store all commands performed for this node. This logging ability is also needed e.g. for the structure object, e.g., to store when vacancies, substitutions etc. are done.
Again, very preliminary ideas but it would be good to discuss them.

@JNmpi so the good news is that the sort of thing you propose is actually already completely doable, the bad news is that I have concerns with the paradigm (but concerns, not objections! And I strongly agree that similarity with python is critical for adoption).
So, first, the good news: if you're just doing things live in the notebook, we can actually really easily dynamically create new nodes, and even dynamically create node connections! This comes very naturally from our syntactic sugar that wf.some_node is equivalent to wf["some_node"]. The example below is a little bit simpler than yours, but the extension to something like energy convergence is quite trivial, and this example works out-of-the-box with the current HEAD of pyiron_contrib:
from pyiron_contrib.workflow.workflow import Workflow
from pyiron_contrib.workflow.node import node

@node("y")
def add_one(x):
    return x + 1

wf = Workflow("my_loop")

wf.n0 = add_one(x=0)

i = 0
while wf[f"n{i}"].outputs.y.value < 5:
    wf.add(add_one(x=wf[f"n{i}"].outputs.y, label=f"n{i+1}"))
    i += 1

print(wf.nodes.keys())
>>> dict_keys(['n0', 'n1', 'n2', 'n3', 'n4'])
print(wf.n4.outputs.y.value)
>>> 5

Now, what worries me about these examples is that mine (exclusively) and yours (naively) work only when live in a notebook, i.e. they once again promote the jupyter notebook rather than the Workflow to the position of supremacy; they are not serializable because they are adapting themselves on the fly (i.e. they are internally calling run -- mine implicitly when updating input connections, yours explicitly) and the rule for how they adapt themselves lives in the notebook cell (the for and while commands, respectively) and is not defined inside the graph scope. Further, mine (exclusively) and yours (naively) don't even have a graphical representation!
I keep saying "naively" for yours, because I really like your idea of allowing the workflow to construct a custom iterator. In this paradigm, I can envision that your entire example is strictly syntactic sugar on top of building something like my node-based loop example a couple comments above -- I suspect this may just be what you're driving at already!! In this way, we could satisfy code-based users at the same time that we maintain a consistent, node-based paradigm -- Which in turn keeps a consistent universe for graphical and text users, and makes sure we are working with serializable (and thus shareable) objects.
How do we achieve this technically? Honestly, I'm not sure. I took a peek at some of the generator/iterator docs today to refresh my memory, and they are relatively powerful and flexible objects, but this is asking an awful lot of them. We'll need to either delay run commands or provide some other alternative/wrap them in-context somehow so that actual computation is not required at definition time. I'm cautiously optimistic that this is a direction worth pursuing.
For me, falling back to live notebook objects is a show stopper and must be avoided. But, if we agree that this sort of loop syntax is actually just sugar on top of constructing some sort of computation-free, serializable graph objects under the hood, then I would propose to simply continue development using the more verbose but rigorous paradigm of explicit flow-control nodes, and then figure out how we can get an iterator object to map onto those.
More discussions in real-time also sounds good. This coming Monday (the 17th) I need to leave the pyiron meeting a little early, and won't be free again until ~10:00, and on Friday I am unavailable starting ~11:00. Otherwise I should be more or less free to schedule something 06:00-16:00 PST, so it depends on the workshop schedule for you and @jan-janssen. I guess @pmrv and @samwaseda might also be interested, in which case a morning time slot is important.


Turn screen on shortcut doesn't work on Realme Pad

[x] I have read the FAQ.
[x] I have searched in existing issues.

Environment

OS: Windows 11
scrcpy version: 1.12.4
installation method: Windows release
device model: Realme Pad
Android version: 11

Describe the bug
I start scrcpy with the screen turned off.
And usually the shortcut Mod+Shift+o works.
But it doesn't work for the Realme Pad.
Maybe it doesn't work because it's a tablet?

This is a device rom issue, scrcpy just requests to change the power mode, how the device reacts to this request is device-dependant.
As a workaround, you can turn the screen on using the physical power button.


docs: Proofread README.md

Hey! I'm Croftcheck, I am a professional technical writer, and I am contributing for Hacktoberfest by proofreading some documentation. I've submitted a commit with a few suggestions, I hope it helps! Happy coding!

@Croftcheck Welcome to the amazing world of open-source! 🎉
1 down, 3 to go.. https://hacktoberfestchecker.herokuapp.com/?username=Croftcheck


Absolute paths in webpack metadata for ignored modules.

I'm submitting a bug report
Webpack version:
2.x
Please tell us about your environment:
OSX 10.x
Current behavior:
Webpack metadata (recordsPath config option) contains absolute paths for ignored modules.
Expected/desired behavior:
No absolute paths in the metadata.
In our project we use Intl polyfill. When we import it into the project, the absolute paths appear in the webpack metadata:
In vendor.ts:
import 'intl';
import 'intl/locale-data/jsonp/en.js';
import 'intl/locale-data/jsonp/es.js';

Webpack records:
"node_modules/source-map-loader/index.js!node_modules/ts-helpers/index.js": 1054,
"ignored /Users/adubovsky/Projects/glympse/enroute-hybrid-client/ionic-app/node_modules/intl ./locale-data/complete.js": 1055,
"node_modules/awesome-typescript-loader/dist/entry.js!app/app.module.ts": 1056,

Could you please help?

I think this is identical to #2991 which I've fixed in pull request #3147.

@jamestautges , thanks! it's the same issue, looking forward for your PR merge )


SEARCH DER: DATA LINK?


[FEATURE REQUEST] Allowing YouTube Music Search Results

What is the purpose of your issue?

[x] Feature Request
[ ] Bug
[ ] Question
[ ] Other

Description

So I noticed that the YT query structure by default uses '{artist-name} - {track-name} lyrics'.
This proves to be very effective at getting the music from YT but I have noticed that some songs do not have a lyric video or even a music video.
I was wondering if it would be possible to add some functionality that would allow spotdl to query YT Music as an optional feature for those who have a subscription(or access to a friend's subscription) and want to download the original songs from there.

Discussion in #778.

Implemented in v3.
I know it's late, just clearing out old issues.


Holding direction keys won't repeat movement

In regular VIM, holding h,j,k,l will move cursor until key is released. In the current port it only fires once.

It's something with your configuration

Nvm, found this in the other VIM extension (the popular one) docs and it worked:

Mac
To enable key-repeating execute the following in your Terminal and restart VS Code:

$ defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false         # For VS Code
$ defaults write com.microsoft.VSCodeInsiders ApplePressAndHoldEnabled -bool false # For VS Code Insider
$ defaults delete -g ApplePressAndHoldEnabled                                      # If necessary, reset global default

I think all macOS users will experience the same issue. It could be a nice addition to the Readme.


Mocha test cases fail after upgrade to 1.47

My mocha nodejs test cases fail after upgrading to 1.47.  They fail when launched from the debugger in VSCode, but pass when run at the command line using nodejs.
Here is the launch entry
{
"type": "node",
"request": "launch",
"name": "Debug Mocha Node Test",
"cwd": "${workspaceFolder}/designer/v3/components/",
"program": "${workspaceFolder}/designer/v3/components/node_modules/mocha/bin/_mocha",
"args": [
"--no-timeouts",
"--exit",
<EMAIL_ADDRESS>],
"stopOnEntry": false
},

Can you share the output of your tests? What specifically is failing?
/needsMoreInfo

The problem is that this code:
const mocha_1 = require("mocha");
mocha_1.describe(...)
throws an exception be cause describe is not defined on mocha_1.
However this works fine in older versions of VSCode.
I'm guessing that something has changed in the execution environment that is interfering with mocha.

@paulgingrich mocha does not export a subscribe function, it's a global function that gets added by the runner. E.g. you can verify this using the node repl, without involving VS Code:
PS C:\Users\Connor\Documents\Github\open-ynab> node
Welcome to Node.js v12.14.1.
Type ".help" for more information.
> require('mocha').describe
undefined

Based on that import I'm guessing you're using TypeScript and doing something like import { describe } from  'mocha'. What you want to do instead is install @types/mocha, and then add "mocha" to the "types" array in your tsconfig.json (example). Then TS will recognize that it's available globally.

So what does your launch.json look like for mocha tests?  The typeScript stuff is just type safety, it shouldn't effect the test that run.  I'm using the mocha runner to launch the test, same as on the command line outside of VSCode, and I only see the problem in VSCode Version 1.47.
I'm not running this directly form node, it's using the mocha to run node.  Here is my entry in the launch.json
{
"type": "node",
"request": "launch",
"name": "Debug Mocha Node Test",
"cwd": "${workspaceFolder}/designer/v3/components/",
"program": "${workspaceFolder}/designer/v3/components/node_modules/mocha/bin/_mocha",
"args": [
"--no-timeouts",
"--exit",
<EMAIL_ADDRESS>],
"stopOnEntry": false
},
"program": "${workspaceFolder}/designer/v3/components/node_modules/mocha/bin/_mocha",

The typeScript stuff is just type safety, it shouldn't effect the test that run.

It sounds like the problem is that you should not be importing describe from mocha. It's already a global and is not exported from Mocha.
The launch config you have looks fine. You can take a look at the repo I linked in the example if you want to see my full setup.

Ok, I got it working thanks.  Just had to delete all my imports for mocha.
I do have another issue though that only shows up on 1.47, didn't have a problem on 1.46.
If I add a runtimeExecutable and point to an older version of node (in this case 8.11.4 32-bit), then it looks like the debugger doesn't attach.   It actually gets stuck and there is no "Debugger attached" console message.


Example pipeline for GFS Archive

Source Dataset

Link to the website: https://rda.ucar.edu/datasets/ds084.1/
The file format: opendap / grib
How are the source files organized? one file per forecast hour
How are the source files accessed? pydap or download the grib files
provide an example link if possible:

import xarray as xr

url = "https://rda.ucar.edu/thredds/dodsC/files/g/ds084.1/2020/20200201/gfs.0p25.2020020100.f000.grib2"
ds = xr.open_dataset(url)

or
import requests
import cfgrib

login_url = "https://rda.ucar.edu/cgi-bin/login"
ret = requests.post(
    login_url,
    data={"email": EMAIL, "passwd": PASSWD, "action": "login"},
)
file = "https://rda.ucar.edu/data/ds084.1/2020/20200201/gfs.0p25.2020020100.f000.grib2"
req = requests.get(file, cookies=ret.cookies, allow_redirects=True)
open("gfs.0p25.2020020100.f000.grib2", "wb").write(req.content)
dss = cfgrib.open_datasets("gfs.0p25.2020020100.f000.grib2")

Any special steps required to access the data (e.g. password required) - Yes have to sign up at https://rda.ucar.edu/. authentification can be done as shown here https://stackoverflow.com/a/66179413/6046019

Transformation / Alignment / Merging

Concat along reftime (init time) and time
Output Dataset

zarr store.
I imagine one giant zarr store would be crazy so could be stored for one init time and all forecast times. Ideally with init time an expanded dim so it can be concatenated later.

@raybellwaves thanks for opening this issue, and apologies for the delay in responding. Just tagging a few others who may be more familiar with grib-specific considerations.
Does anyone of @rabernat, @TomAugspurger, or @martindurant know if we can handle .grib2 inputs at this time?

I don't see why not - xarray can load them, so long as they are cached on a local filesystem.
On June 24, 2021 7:57:29 PM EDT, Charles Stern @.> wrote:
@. thanks for opening this issue, and apologies for the

delay in responding. Just tagging a few others who may be more familiar
with grib-specific considerations.
Does anyone of @rabernat, @TomAugspurger, or @martindurant know if we
can handle .grib2 inputs at this time?
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
https://github.com/pangeo-forge/staged-recipes/issues/50#issuecomment-868076915

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Noting the similarity to #17 and #18.
We should have no problem with grib, as long as xarray can open the files (which the example code above already illustrates). For this to work, you will need to set copy_input_to_local_file=File in XarryZarrRecipe.

@raybellwaves, looks like we're good to go. :smile:
Are you interested in learning how to develop recipes yourself? If so, I'd be delighted and happy to guide you through the process. Like conda-forge, the strength of this initiative will ultimately grow from the community of recipe developers who've learned to use these tools, and it would be great to have you onboard.
The first step would be for you to make a PR to this repo, which contains a new draft recipe under recipes/NCEP_GFS/ncep_gfs_recipe.py. This module will instantiate a pangeo_forge_recipes.recipes.XarrayZarrRecipe object, and can be your best guess of how to approach that based on the docs here. Once you've pushed a first commit, I can jump in and start making suggestions and/or commits to your PR.

Is writing a separate zarr store for every init time a good idea? I've been struggling a lot with how to build timeseries from the hrrrzarr data which was written that way. Opening thousands of hours in a loop can take hours and isn't nearly as simple or efficient to parallelize as if time were just a dimension in the dataset from the getgo.
That said, that dataset isn't optimized for xarray––e.g. because of the way it's written as a zarr hierarchy, the .zmetadata isn't visible to xarray so I can't use the consolidated option. But I noticed that both #17 and #18 are making init time a dimension rather than creating separate stores (IIUC). How would you decide between the two approaches?

Is writing a separate zarr store for every init time a good idea?

I don't think so. I think we want init_time and lead_time both as dimension. In order for this to work, we need to resolve https://github.com/pangeo-forge/pangeo-forge-recipes/issues/140.

@rabernat Is there any concern with xarray's handling of the time dimension for continuously-updating data sets? I assume the GFS (like the HRRR and GEFS) produces new model runs frequently. Some of my colleagues have been avoiding creating a time dimension in these situations because of cases where it's been painful but it's not clear to me if any of those apply to situations like this. Does the .zmetadata get updated efficiently when you just append data?
Also do we actually need 140 for this one? Shouldn't you be able to just do it in stages, look at a single init_time and concat over lead_time, then concat the result over init_time? Or do recipes have to be 1 stage?

Good question. I imagine there are open questions regarding one giant zarr store versus smaller zarr stores which can be concatenated. It may be use case driven. There are probably lessons learnt from what people do with tabular (parquet) which can also be stored as separate files or appended (row wise or as a new row group partition e.g. partition on reftime). I imagine a step beyond which people do with tabular data would be streaming data. I imagine once you get it out of grib into a zarr store of some kind you can iterate through these questions quicker.

Quick note that the "reference" views I have been working with could provide both, without having to copy or reorganise the data. It can be used to produce a single logical zarr over many zarr datasets.

@martindurant Where would I get started if I wanted to try that out?


Help with export function from C# Wasm

I am attempting to run WASM modules from C# in a Go application.
I am using the Dotnet Wasi.Sdk --prerelease package to build C# program as wasm.
I can use Wasmer to run my csharp wasm from command line calling my sum() function no problem. This seems due to the fact that I have defined a main function calling my sum()  function in my C#.
However when I use the same attempting to call the sum() function directly with wasmer-go I get an error.
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x1000ad01c]

goroutine 1 [running]:
main.main()
	~/Code/Analog/Learn/dotnetcore/first-dotnetcore/golang-with-dotnet-wasm-poc/src/go/main.go:29 +0x13c
exit status 2
make: *** [run-go] Error 1

I am assuming it has to do with a need to "export" the function I am referencing form my C# wasm, but unsure how to do this.
I put my code up on a public Github repo for refernce.
https://github.com/kevbaker/golang-with-dotnet-wasm-poc
Any ideas of references that might send me in the right direction would be great!

You should be able to use __attribute__(export_name("my_symbol")) in the source code, or you can pass -Wl,--export=my_symbol at link time.
If you choose to use the export_name attribute, remember that if the object file in question is not loaded by the linker (i.e.  if its in .a archive an is not otherwise referenced) then it will be ignored.

Thanks, is this response applicable to Csharp? I am not familiar with that pattern for dotnet build or in-code decorator of __attribute__()
If so, could you provide a high-level example?

I think the "how to export" question is answered here. I'm not sure wasi-sdk is the best place for a C# example--this repository supports C and C++. I'll close but let me know if I misunderstood something.


Cronjob failing due to missing PATH

Sorry, me again. Just checked today if my cronjob was running last night and found ou it did not.
Little debugging later the cronjob throws a ERROR: BORG is not installed on this system!
Any idea how that could be? borg is installed as binary in /usr/local/bin and executed fine manually.
The if ! command -v borg statement looks fine for me, must have to do something with the context in which crontab jobs are started!?
Edit: Looks like my crontab env is different and is missing the PATH. I just added the PATH variable to the crontab file maybe as a feature request to minimize this issue for other, specify a location for borg in the details file?

It seems pretty common for many programs to expect the user to alter their cron path manually as needed. Also, the borg documentation specifically suggests installing/symlinking to /usr/bin/borg so that it can be found by all systems.
However, it is not a difficult change to make to the script directly to detect the path and use it. I think that's easier and better than assuming the user can find the right path and add it to the details file. Plus, you're probably right, it should be using full paths wherever possible since it's designed to run in a cron environment. I'll add it to my weekend-workflow and hopefully have the change pushed before Monday.
Cheers. Glad you got the path thing figured out, btw. I forgot about it in the documentation since I'm used to just updating my crontab paths -- nice catch :-)

thanks for considering. I must have missed that in the borg documenation and never stunbled over that crontab issue. But I'll guess you learn something new every day :)

I decided to go with a command-line parameter instead of auto-detecting in the script or a variable in the details file. Here's my reasoning:

borg should be installed with a symlink to /usr/bin/borg (and really /usr/bin/borgfs for compatibility) as per the program documentation. If it is installed in that location, it should be in the path for most systems' cronjobs.
putting it in the details file I feel would be confusing to some users. The packaged installation and those following the direct-install instructions in the documentation would be installing to the default location anyways, so having this in the details file might make people think they need to install a separate version or something. I'm not sure about this confusion, but it was suggested to me as a possible problem by a few other people I talked to.
I considered having the script just 'find' borg. But then I thought about people with very large file systems and the fact that even on NVMe/SSD drives a full disk search can eat time. That could be annoying if you (like me) run a backup every few hours instead of just once a day or something.

I'm closing this for now, but if you disagree with this choice, please let me know and I'll take it under consideration. Obviously, I value your opinion since this was on your suggestion anyways so I feel free to speak up if you want :-) Just re-open the issue if you like.
For reference, this change is implemented in Version 3.5


Provide a mobile version

Currently the dashboard needs scrolling in both directions on mobile, we should have a versions that's useful in the mobile form factor

Transferring some personal notes I have:

For the mobile sidebar, do what we do in ChromeStatus and have it hover over instead of shifting the page.


Fix bcdedit commands for PowerShell in prepare-for-upload-vhd-image.md

The bcdedit commands in prepare-for-upload-vhd-image.md don't work in PowerShell due to the special characters ('{', '}').
The docs said to run in a PowerShell window, then open cmd, then run the commands. Instead, simply quote the commands (per the documentation https://docs.microsoft.com/en-us/windows-hardware/drivers/devtest/bcdedit--set) and run directly in PowerShell.

@MattKotsenas : Thanks for your contribution! The author(s) have been notified to review your proposed change. @glimoli

Changes look fine. #sign-off


Add cert-manager annotation to Grafana ingress

In the default kube-prometheus-stack helm chart, the user is informed about the need to get a certificate for the Grafana ingress themselves. As in other Theia helm charts, it's way more comfortable to have cert-manager retrieve a valid certificate automatically.
This PR adds the respective annotation to the values making it easy for new users to recognize the solution and use it.
Tested using letsencrypt-prod on a TUM K8s cluster.

@lucas-koehler Done, thanks for the information :)


Passing props to material UI style

Hello, thank you for you efforts.
I have a questions.
Given card code as in here for a card component : https://material-ui-next.com/demos/cards/
how can I update the card style or any material UI style as from
   const styles = theme => ({     card: {     minWidth: 275,   },
to such follows:
  const styles = theme => ({     card: {     minWidth: 275, backgroundColor: props.color  },
when I tried the latest one, I got
Line 15:  'props' is not defined  no-undef
when I updated code to be :
const styles = theme =>  (props) => ({     card: {     minWidth: 275, backgroundColor: props.color  },
also
 const styles  = (theme ,props) => ({         card: {         minWidth: 275, backgroundColor: props.color  },
instead of
const styles = theme => ({     card: {     minWidth: 275, backgroundColor: props.color  },
I got the component card style at the web page messy.
By the way, I pass props as follows:
<SimpleCard backgroundColor="#f5f2ff" />
I asked on  StackOverflow
please help!

I asked on SO https://stackoverflow.com/questions/48879517/passing-props-to-material-ui-style

see https://stackoverflow.com/questions/48879517/passing-props-to-material-ui-style?noredirect=1#comment84778830_48879517.
SO community do not get me what I want!


Update Composer dependencies (2022-11-12-00-07)

Visual regression test passed!
View the visual regression test report


Tools to be marked as hidden/deprecated

The following tools / tool versions should be marked as hidden and deprecated:

[x] All revisions of 2d_split_binaryimage_by_watershed,
see https://github.com/usegalaxy-eu/usegalaxy-eu-tools/pull/647
[x] Revision 7989264b5780 of segmetrics, corresponding to the tool version 1.4.0-1,
see https://github.com/BMCV/galaxy-image-analysis/pull/88
[x] Revisions 4b6c2135e547 and b32f5368e279 of bioformats2raw due to the bug described in https://github.com/BMCV/galaxy-image-analysis/pull/102
[ ] Revision 7db4fc31dbee of ip_threshold, corresponding to the tool version 0.18.1+galaxy0, see https://github.com/BMCV/galaxy-image-analysis/pull/112
[x] The tool 2d_local_threshold is already marked as deprecated, but not hidden.
[x] The curl_post tool should be marked deprecated.
[x] The points2binaryimage tool should be marked as deprecated and hidden.

The one that is not ticked off I could not find, it should not be installed anymore.

The one that is not ticked off I could not find, it should not be installed anymore.

Thanks!
With ip_threshold I was referring to the tool ID in the XML: https://github.com/BMCV/galaxy-image-analysis/blob/2266053985e3ce39b28d3601d585c3669833a807/tools/2d_auto_threshold/auto_threshold.xml#L1
So this is this tool: https://toolshed.g2.bx.psu.edu/repository?repository_id=a74ca2106a7a2073

Yes, but I could not find the revision 7db4fc31dbee is this tool still in Galaxy?

You are right, it is not on usegalaxy.eu anymore. Thanks again!
Just one more question. I assume that deprecation happens in the toolshed and hiding is done on Galaxy EU, right? If so, there is the tool 3d_tensor_feature_dimension_reduction in the toolshed but it is not installed on Galaxy EU (or maybe it's hidden, at least I couldn't find it). Can you please mark it as deprecated?


Circular dependencies breaks rollup and vite builds

Initial checklist

[X] I read the support docs
[X] I read the contributing guide
[X] I agree to follow the code of conduct
[X] I searched issues and couldn’t find anything (or linked relevant results below)

Affected packages and versions
7.1.3
Link to runnable example
No response
Steps to reproduce

Use rollup for bundle project with this library as a dependency (or a peer dependency)
Build project and run it in a browser

Expected behavior
It runs
Actual behavior
Rollup (and by extension vite) doesn't bundle circular dependencies properly which results in the app failing during production builds.
Related issue: https://github.com/syntax-tree/mdast-util-to-hast/issues/55
Runtime
Other (please specify in steps to reproduce)
Package manager
yarn v1
OS
Windows
Build and bundle tools
Rollup, Vite

I would suggest raising this as an issue with Rollup.
Alternatively, a PR to change this here would be accepted!

@gargakshit @ZirionNeft Either of you interested in helping with this issue?

@gargakshit @ZirionNeft Either of you interested in helping with this issue?

How may I help you?

Hh whoops, the PR already landed, never mind!


Placement Review

Opening this PR to handle the review and cleanup of the placement code in this repo. Feel free to leave comments directly for others to look into.
Particular emphasis on https://github.com/Open-Catalyst-Project/Open-Catalyst-Dataset/blob/refactor/ocdata/combined.py.

Could you summarize the changes you've made please. Let's not have a separate _refactor subfolder, that's what git branches are for. Committing code to a subfolder makes this PR hard to review — there's a lot of new code and not easy to tell how much is duplicated vs. updated compared to the existing code.


Like button does not work after changing categories

Found an issue where the following bug occurs:

Go to overview screen
Like the first itinerary (Hike)
Change category to Shopping (was Adventure)
The itinerary displayed (Shopping and Adventure) is liked when it shouldn't be

Resolved in PR https://github.com/WanderWise-Inc/app/pull/224


Add context menu and close button for the file tree items

Is it possible to trigger the default context menu of the file explorer?
Treeview.selection gives an array of the currently selected items. Needed for the command.

Context menus are one the way:
https://github.com/microsoft/vscode/issues/54285

The ticket mentioned didn't really fit after all. There is currently no way to take the context menu from the existing tabs. Therefore I have integrated my own context menu.


fix: update getting-started.md

Fixed docs, this page: https://roman-right.github.io/bunnet/getting-started
Changed AsyncIOMotorClient from motor to MongoClient from pymongo.

Hey @rabarbra ,
Good catch! Thank you!


[Feature Request] Add keyboard shortcuts to switch environments

Is your feature request related to a problem? Please describe.
I switch environments a lot and manually having to click (or arrow through) to select environments is something I spend a lot of time doing.
Describe the solution you'd like
I'd love to be able to switch environments with hotkeys. It is possible to have many environments and you're able to re-order the environments, so the order of the environments would have to match up with some kind of ordering of hotkeys.
Here is the current view of the environments:

This kind of reminds me of slack orgs:

Slack orgs can be selected by cmd+n where n is the organization in that position. A very similar system could be used in insomnia, where the first environment on your list is cmd+1, the second environment is cmd+2, and so on.
A little cmd+n icon could be added to each 'shuffle' symbol to indicate that the hotkey is available.
Describe alternatives you've considered
So far I've just been using my mouse to select environments. The cmd+n hotkey is currently unused.
cmd+shift+e and using the arrow keys / typing to filter works fine as well but still not as convenient as cmd+n would be.
Additional context
Add any other context or screenshots about the feature request here.

Was just looking for this. cmd+n is used though for New Request modal.


Add reset command

The issue with such a huge memory is that, over time, PaLM can stray from its original prompt and produces some very weird outputs. For example, it has a tendency to output entire hallucinated conversations, instead of a singular reply to the latest message.

Update: This should still be added, but #6 should hopefully resolve most of these issues.