WIP: MicroPython REPL running in a dedicated tool window

This is a rough draft of how it will look in the end, so any feedback or suggestions will be appreciated.
A single point of control for communication with the device allows us to decouple long-running processes like REPL from specific UI interface elements. Also will lend us an ability to seamlessly interrupt and restart REPL during file upload, at least that is the idea.
Documentation on IDEA's Terminal and related APIs is very scarce, so I hacked up the current implementation based on the existing sources. 🤷
Closes #83 and #101.
TODO:

[x] Separate classes for tool window and tool window factory
[x] Automatically stop and restart REPL during file uploads/flash erase
[x] Configuration option to clear REPL window on each start
[ ] Cleaner and more robust implementation

@lensvol Looks good to me so far. Please unmark is as Draft when it's ready for review.

Looking forward to updating this feature

@lensvol Looks good to me so far. Please unmark is as Draft when it's ready for review.

We would appreciate it if you could update this very useful feature

@QQWE1345 I didn't have time to work on it recently, but now my life is slowly getting back on track. Hopefully I will be able to finish it soon :)

Any updates on this? Would be SUPER useful!

I think there is a chance to install it from @lensvol repository and it will be working
Will be appreciated for any clue
I'll try to install it the one day

Oh, well, I completely forgot about that one 😅 Yes, it should be working okay-ish. The main issue preventing it from moving beyond WIP status was its reliance on projects instead of modules which @vlasovskikh prefers.
If there is enough interest, I can try to complete it and poke Andrey to review it?

I'm always trying to find a substantial tool for micropython development. At the moment, the plugin does not work. It kind of works, but the UX is at the concept level. I've tried probably all the micropython development tools, but so far UPIOT  seems to be the most convenient. It's just a text editor plugin though. And as soon as you start developing something complex, you run into the fact that it is a text editor, not an IDE.
If it possible to complete it to something working, I definitely want to try. If it's hard, you can provide instruction how to install it from your repo.

If there is enough interest, I can try to complete it and poke Andrey to review it?

That would be amazing!
I've been reading a lot of 'reviews' and issues online, and the one thing I keep seeing is people 'complaining' (or just giving feedback) about having to close and re-open the REPL everytime.

Oh, well, I completely forgot about that one sweat_smile Yes, it should be working okay-ish. The main issue preventing it from moving beyond WIP status was its reliance on projects instead of modules which @vlasovskikh prefers.
If there is enough interest, I can try to complete it and poke Andrey to review it?

Please do, the way it currently works is very stone age!

Okay, I'll look into this after the vacation. At the moment I do not have any devices to test this with, sadly.

I have the D1 Mini v3.0 from Wemos ~$5 from ebay D1 mini V3.0.0 WiFi IoT Development Board
I would be happy to test if/when needed.

Thanks guys for working on it. That would (-> will!) change many things for me!

Okay, I've returned to work on this since I need it for one of my own projects. Stay tuned.

Hi @lensvol! Thank you very much for your contribution! I do hope we'll manage to merge this feature soon! Here're several UX improvements which I would like to suggest:

The bahaviour of the option "Clear REPL window each time it starts" is a bit unclear to me. It cleans screen, but the whole history stays there and after several hours of work it becomes really huge. Maybe it would be better to fully re-create the terminal widget? So it'll be absolutely empty terminal session without many lines of history. I would also suggest to make this option true by default.
Also it would be great to start REPL automatically on a tool window opening. This additional action with pressing "Start" button looks unnecessary. And (maybe) even replace "Start" button with "Restart"? So start always happens on a tool window opening, then you can either Stop session or Restart it (Stop & start with one click). What do you think about it?
It also would be great to make this tab closable. So after clicking a cross icon, current tab and the whole tool window is closed (exactly like Terminal or Python Console work now).

And also there are two rather major bugs:
4. When inserting a multiline command with Ctrl + V, the indent inside it becomes broken, so it's impossible to do it. The only option is to insert it line by line which is rather inconvenient. Actually, you need to clear indent for every line, because REPL adds them on its own.
5. When running it for 223 version, I'm getting the following error:
2022-10-30 20:44:41,660 [  16018] SEVERE - #c.i.i.p.PluginManager - Could not initialize class com.sun.jna.Native
java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native
        at com.sun.jna.NativeLong.<clinit>(NativeLong.java:35)
        at jtermios.linux.JTermiosImpl.<clinit>(JTermiosImpl.java:61)
        at jtermios.JTermios.<clinit>(JTermios.java:288)
        at com.pty4j.unix.PtyHelpers.<clinit>(PtyHelpers.java:190)
        at com.pty4j.unix.Pty.ptyMasterOpen(Pty.java:137)
        at com.pty4j.unix.Pty.openMaster(Pty.java:173)
        at com.pty4j.unix.Pty.<init>(Pty.java:64)
        at com.pty4j.unix.UnixPtyProcess.<init>(UnixPtyProcess.java:59)
        at com.pty4j.PtyProcessBuilder.start(PtyProcessBuilder.java:147)
        at org.jetbrains.plugins.terminal.LocalTerminalDirectRunner.createProcess(LocalTerminalDirectRunner.java:211)
        at com.jetbrains.micropython.repl.MicroPythonReplManager.startREPL(MicroPythonReplManager.kt:64)
        at com.jetbrains.micropython.repl.ToolWindowReplTab$replStartAction$1.actionPerformed(ToolWindowReplTab.kt:93)
        at com.intellij.openapi.actionSystem.impl.ActionButton.actionPerformed(ActionButton.java:195)
        at com.intellij.openapi.actionSystem.impl.ActionButton.lambda$performAction$0(ActionButton.java:174)
        at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.java:346)
        at com.intellij.openapi.actionSystem.impl.ActionButton.performAction(ActionButton.java:174)
        at com.intellij.openapi.actionSystem.impl.ActionButton.processMouseEvent(ActionButton.java:462)
        at java.desktop/java.awt.Component.processEvent(Component.java:6413)
        at java.desktop/java.awt.Container.processEvent(Container.java:2266)
        at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5022)
        at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
        at java.desktop/java.awt.Component.dispatchEvent(Component.java:4854)
        at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
        at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575)
        at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
        at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
        at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2802)
        at java.desktop/java.awt.Component.dispatchEvent(Component.java:4854)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:781)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:730)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:724)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
        at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:754)
        at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:752)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
        at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:751)
        at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:909)
        at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.java:831)
        at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:753)
        at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$5(IdeEventQueue.java:437)
        at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:774)
        at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:436)
        at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:113)
        at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:615)
        at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:434)
        at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:813)
        at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:480)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
        at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)

I can make all these improvements on my own while merging (I have time for that right now), and we'll be able to finally merge this feature into the release. Or if you prefer, you can make the fixes on your own (or at least some of them, let me know which exactly).
Again thank you very much for your work and I'm looking forward for your answer!

Thank you for your kind words!
Sure, make any changes that you feel are warranted here! I've already sunk too much time into this side quest. :)

An issue about pasting multi-line commands turned out to be more complicated that expected, so moved into a separate issue: #211

How to solve the issue that cursor keys cannot be used? #216
This is critical for REPL.


PEX 1.1.1, Django 1.8.6, and Python 2.7.10's email -- Error

I put this as a thread on the Pants Developers list but figure it might be more focused here.  We've converted 12 sites to using PEX and this is the first major hiccup we've run into.
Using the items above with this small test script:
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings")

from django.conf import settings
from django.core.mail import send_mail

send_mail('subject', 'body'<EMAIL_ADDRESS><EMAIL_ADDRESS>
We get an exception from inside Python's email/header code
Traceback (most recent call last):
  File ".bootstrap/_pex/pex.py", line 317, in execute
  File ".bootstrap/_pex/pex.py", line 250, in _wrap_coverage
  File ".bootstrap/_pex/pex.py", line 282, in _wrap_profiling
  File ".bootstrap/_pex/pex.py", line 363, in _execute
  File ".bootstrap/_pex/pex.py", line 373, in execute_interpreter
  File ".bootstrap/_pex/pex.py", line 403, in execute_content
  File "<exec_function>", line 4, in exec_function
  File "test.py", line 7, in <module>
    send_mail('subject', 'body'<EMAIL_ADDRESS><EMAIL_ADDRESS>  File "/Users/christian/tmp/.pex/install/Django-1.8.6-py2.py3-none-any.whl.f9d35ff7278f3bd886094cf8f073aaf21c75ebc9/Django-1.8.6-py2.py3-none-any.whl/django/core/mail/__init__.py", line 62, in send_mail
    return mail.send()
  File "/Users/christian/tmp/.pex/install/Django-1.8.6-py2.py3-none-any.whl.f9d35ff7278f3bd886094cf8f073aaf21c75ebc9/Django-1.8.6-py2.py3-none-any.whl/django/core/mail/message.py", line 303, in send
    return self.get_connection(fail_silently).send_messages([self])
  File "/Users/christian/tmp/.pex/install/Django-1.8.6-py2.py3-none-any.whl.f9d35ff7278f3bd886094cf8f073aaf21c75ebc9/Django-1.8.6-py2.py3-none-any.whl/django/core/mail/backends/smtp.py", line 107, in send_messages
    sent = self._send(message)
  File "/Users/christian/tmp/.pex/install/Django-1.8.6-py2.py3-none-any.whl.f9d35ff7278f3bd886094cf8f073aaf21c75ebc9/Django-1.8.6-py2.py3-none-any.whl/django/core/mail/backends/smtp.py", line 123, in _send
    self.connection.sendmail(from_email, recipients, message.as_bytes(linesep='\r\n'))
  File "/Users/christian/tmp/.pex/install/Django-1.8.6-py2.py3-none-any.whl.f9d35ff7278f3bd886094cf8f073aaf21c75ebc9/Django-1.8.6-py2.py3-none-any.whl/django/core/mail/message.py", line 138, in as_string
    g.flatten(self, unixfrom=unixfrom)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/email/generator.py", line 83, in flatten
    self._write(msg)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/email/generator.py", line 115, in _write
    self._write_headers(msg)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/email/generator.py", line 164, in _write_headers
    v, maxlinelen=self._maxheaderlen, header_name=h).encode()
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/email/header.py", line 179, in __init__
    if not isinstance(charset, Charset):
TypeError: isinstance() arg 2 must be a class, type, or tuple of classes and types

We do not get this error from either straight python setup or using virtual environments, only PEX.
If I edit email/header.py so it gives a stack trace at the point it sets Charset I get the following with a venv:
  File "test.py", line 5, in <module>
    from django.core.mail import send_mail
  File "/Users/christian/.virtualenvs/ffe/lib/python2.7/site-packages/django/core/mail/__init__.py", line 14, in <module>
    from django.core.mail.message import (
  File "/Users/christian/.virtualenvs/ffe/lib/python2.7/site-packages/django/core/mail/message.py", line 8, in <module>
    from email import (
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/email/generator.py", line 15, in <module>
    from email.header import Header
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/email/header.py", line 23, in <module>
    traceback.print_stack()

While this via PEX:
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "__main__.py", line 25, in <module>
    bootstrap_pex(__entry_point__)
  File ".bootstrap/_pex/pex_bootstrapper.py", line 98, in bootstrap_pex
    pex.PEX(entry_point).execute()
  File ".bootstrap/_pex/pex.py", line 310, in execute
    with self.patch_sys():
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/contextlib.py", line 17, in __enter__
    return self.gen.next()
  File ".bootstrap/_pex/pex.py", line 243, in patch_sys
    new_sys_path, new_sys_path_importer_cache, new_sys_modules = cls.minimum_sys()
  File ".bootstrap/_pex/pex.py", line 202, in minimum_sys
    sys_modules = cls.minimum_sys_modules(site_libs)
  File ".bootstrap/_pex/pex.py", line 133, in minimum_sys_modules
    if not hasattr(module, '__path__'):
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/email/__init__.py", line 79, in __getattr__
    __import__(self.__name__)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/email/generator.py", line 15, in <module>
    from email.header import Header
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/email/header.py", line 23, in <module>
    traceback.print_stack()

  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "__main__.py", line 25, in <module>
    bootstrap_pex(__entry_point__)
  File ".bootstrap/_pex/pex_bootstrapper.py", line 98, in bootstrap_pex
    pex.PEX(entry_point).execute()
  File ".bootstrap/_pex/pex.py", line 317, in execute
    self._wrap_coverage(self._wrap_profiling, self._execute)
  File ".bootstrap/_pex/pex.py", line 250, in _wrap_coverage
    runner(*args)
  File ".bootstrap/_pex/pex.py", line 282, in _wrap_profiling
    runner(*args)
  File ".bootstrap/_pex/pex.py", line 363, in _execute
    return self.execute_interpreter()
  File ".bootstrap/_pex/pex.py", line 373, in execute_interpreter
    self.execute_content(name, content)
  File ".bootstrap/_pex/pex.py", line 403, in execute_content
    exec_function(ast, globals())
  File "<exec_function>", line 4, in exec_function
  File "test.py", line 5, in <module>
    from django.core.mail import send_mail
  File "/Users/christian/tmp/.pex/install/Django-1.8.6-py2.py3-none-any.whl.f9d35ff7278f3bd886094cf8f073aaf21c75ebc9/Django-1.8.6-py2.py3-none-any.whl/django/core/mail/__init__.py", line 14, in <module>
    from django.core.mail.message import (
  File "/Users/christian/tmp/.pex/install/Django-1.8.6-py2.py3-none-any.whl.f9d35ff7278f3bd886094cf8f073aaf21c75ebc9/Django-1.8.6-py2.py3-none-any.whl/django/core/mail/message.py", line 11, in <module>
    from email.header import Header
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/email/header.py", line 23, in <module>
    traceback.print_stack()

Perhaps something gets missed during the minimum_sys/minimum_sys_modules clean up?

Any thoughts on this issue?  Turns out it also breaks when django tries to email about a 500 to the admins.

Thanks to the pants-devel list, we got something that works: building the PEX file with "--not-zip-safe --always-write-cache" as flags.

Came across this exact same issue and thought I'd share our solution. Setting zip_safe=False in your BUILD file or passing PEX_FORCE_LOCAL=true at runtime does fix this. However, that solution didn't solve the problem (for us) with pants run (since we want our dev to match our pex deployed prod environment).
So I dug into this and it turns out that django overrides the default email.message.Message:as_string method. Now here's where it gets weird, looking at the default method vs the django one (in django.core.mail.message.MIMEMixin:as_string), aside from the django one doing some six.PY2/PY3 stuff and adding an as_bytes method (for py2/py3 cross functionality) the ONLY other difference* is how the Generator class is imported/used.
In the broken django version:
from email import generator
generator.Generator(...)

In the working default version:
from email.generator import Generator
Generator(...)

I tested monkeypatching the django as_string with the same logic except for different import and call and it works both for pants run and with a unexploded pex file.
Here's the monkeypatch
$ cat monkeypatches.py
def patched_as_string(self, unixfrom=False, linesep='\n'):
    """Return the entire formatted message as a string.
    Optional `unixfrom' when True, means include the Unix From_ envelope
    header.

    This overrides the default as_string() implementation to not mangle
    lines that begin with 'From '. See bug #13433 for details.
    """
    from email.generator import Generator # This is the patch!
    fp = six.StringIO()
    #g = generator.Generator(fp, mangle_from_=False) <- THIS FAILS
    g = Generator(fp, mangle_from_=False) # This is the patch!
    if six.PY2:
        g.flatten(self, unixfrom=unixfrom)
    else:
        g.flatten(self, unixfrom=unixfrom, linesep=linesep)
    return fp.getvalue()

def patch_django_core_mail_message_MIMEMixin():
    import django.core.mail.message
    django.core.mail.message.MIMEMixin.as_string = patched_as_string
    if six.PY2:
        django.core.mail.message.MIMEMixin.as_bytes = patched_as_string

And then in your settings.py
import monkeypatches
monkeypatches.patch_django_core_mail_message_MIMEMixin()

Clearly this is not a good long term solution, ymmv.
*I lied there's one other difference which is Generator() is called with mangle_from_=False but that doesn't seem to cause the problem.


Update bot-service-quickstart-registration.md

This topic is for v3 SDK which does not support .net core.


SDG path as an input to Eval mmlu_branch e2e

currently the sdg path is just a path that lives in ilab: https://github.com/instructlab/instructlab/pull/1676/files#diff-371efab14255b4753e32f13f159c38b02be3db7fe06f4a0d29fa7e3292f17d7bR270
Confirm with SDG what the path will actually be, and open a pr to adjust the path

cc: @aakankshaduggal

@alinaryan @alimaredia Is this separate from https://github.com/instructlab/instructlab/issues/1642?

No it's not, I'm going to go ahead and close this.


This makes no sense whatsoever

CSharpier turns this:
var image = await db.Images
    .Where(i => i.Id == imageId)
    .Select(i => new
    {
        i.Type,
        i.VideoId,
        i.OriginalFileName,
        i.CreatedAt,
        i.Metadata,
    })
    .SingleOrDefaultAsync();

Into this:
var image = await db.Images
    .Where(i => i.Id == imageId)
    .Select(
        i =>
            new
            {
                i.Type,
                i.VideoId,
                i.OriginalFileName,
                i.CreatedAt,
                i.Metadata,
            }
    )
    .SingleOrDefaultAsync();

How any sane human being can look at this and go "yep, that's an improvement" is beyond me.

Prettier doesn't do this either, this sort of formatting might only make sense when multiple arguments are being passed to the method in question; it is absolutely nonsensical in cases like the one showcased above. Please reconsider.

There are issues already open related to improving this formatting. Feel free to contribute by working on one and consider being a bit more respectful with your requests in the future.

@belav Sorry about the tone, I got really frustrated because I was almost falling in love with CSharpier and thought it was virtually perfect until I stumbled into this, which just doesn't make any sense.

No worries, I've also had a rough day and know how that goes.

<3

The current version was "good enough" when first working on lambdas and I haven't had a chance to get back to it yet. There are a ton of things I'd love to improve but I haven't had as much time to work on things as I used to.

Perfectly understandable.

I also find the more you see formatting that is consistent, even if ugly you start to get used to it and stop noticing the ugly.

True, but as you said, we can get used to anything as long as it's consistent, but that doesn't mean it's not ugly and really worth improving. I would argue CSharpier definitely needs improvement in this regard, even if one can get used to its current behavior.
Also, just noticed #672 describes more or less the same issue, so feel free to close this issue as a duplicate if you think that makes sense.

True, but as you said, we can get used to anything as long as it's consistent, but that doesn't mean it's not ugly and therefore worth improving. I would argue CSharpier definitely needs improvement in this regard, even if it's possible to get used to its current behavior here, it's still very unideal.

Yeah I agree, I think I was just trying to say "I kinda forget that some of this is ugly because I get used to it", and then other issues pop up and compete for attention. I'm gonna add #672 to the next milestone and hopefully get to it sooner rather than later. This or the way method calls break when they chain in some instances are probably the biggest areas for improvement right now.

I think I was just trying to say "I kinda forget that some of this is ugly because I get used to it", and then other issues pop up and compete for attention.

Ah okay, got it!

I'm gonna add https://github.com/belav/csharpier/issues/672 to the next milestone and hopefully get to it sooner rather than later. This or the way method calls break when they chain in some instances are probably the biggest areas for improvement right now.

Great! Thank you so much.


Build failed with an exception.

        "react": "16.8.6",     "react-native": "0.60.5",     "react-native-google-fit": "^0.10.0",
The build on Android fails:
FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':react-native-google-fit:compileReleaseJavaWithJavac'.

when i run build with --warning-mode all , i can see many errors, all of them look like that:
node_modules/react-native-google-fit/android/src/main/java/com/reactnative/googlefit/RecordingApi.java:116: error: cannot find symbol
        String eventName, @Nullable WritableMap params) {
                           ^
  symbol:   class Nullable
  location: class RecordingApi

I have tried upgrading react-native-google-fit version to 0.11.0, but did not help.
i also tried with different gradle versions, but still no luck.
My current gradle version:
in android/gradle/wrapper/gradle-wrapper.properties i have distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
in android/build.gradle i have classpath("com.android.tools.build:gradle:3.5.0")
Anyone that had the same or similar problem and fixed it?

@agnieszkabugla Did you figure this one out?

currently I have the same problem, still searching for solutions

it appeared it was not a problem with react-native-google-fit.
We use app center for app building in production and it updates minor versions of different packages from package.json.
It updated react-native-keychain that we use in the project and this update caused build fails. The only thing that i had to change was remove caret from package.json:  "react-native-keychain": "6.0.0",


Spatial Average Pooling has same implementation for pooling and unpooling?

Is this intended?
class S_AvgPool(nn.Module):
    def __init__(self):
        super(S_AvgPool, self).__init__()

    def forward(self, x, M):
        x = torch.einsum('nctv,vw->nctw', x, M)
        return x.contiguous()

class S_AvgUnpool(nn.Module):
    def __init__(self):
        super(S_AvgUnpool, self).__init__()

    def forward(self, x, M):
        x = torch.einsum('nctv,vw->nctw', x, M)
        return x.contiguous()

It is implemented in this manner just for maintaining consistency with the temporal pooling/unpooling methods, even if both methods require the same operation.

I see, otherwise you would have to name it AvgPoolOrUnpool, which would be confusing to read. This way you can see the intension while reading the code.


SCIM2 UniqueIDJDBC Primary Userstore SCIM2 User GET request with pagination fails giving 500

Environment
IS 5.10.0 alpha3 snapshot
DB Mysql 5.7
Steps to Reproduce

In deployment.toml change the primary userstore to uniqueidjdbc userstore

[user_store]
type = "database_unique_id"
[user_store.properties]
SCIMEnabled= true
Add a new user for the primary user store with scim2
curl -v -k --user admin:admin --data '{"schemas":[],"name":{"familyName":"jackson","givenName":"kim"},"userName":"kim","password":"kimwso2","emails":[{"primary":true,"value":"kim.jackson@gmail.com","type":"home"},{"value":"kim_j@wso2.com","type":"work"}]}' --header "Content-Type:application/json" https://localhost:9443/scim2/Users

Try to GET users with below request with pagination
curl -v -k --user admin:admin 'https://localhost:9443/scim2/Users?startIndex=1&count=10&domain=PRIMARY'

Response
*   Trying <IP_ADDRESS>...
* Connected to localhost (<IP_ADDRESS>) port 9443 (#0)
* found 148 certificates in /etc/ssl/certs/ca-certificates.crt
* found 597 certificates in /etc/ssl/certs
* ALPN, offering http/1.1
* SSL connection using TLS1.2 / ECDHE_RSA_AES_128_GCM_SHA256
* 	 server certificate verification SKIPPED
* 	 server certificate status verification SKIPPED
* 	 common name: localhost (matched)
* 	 server certificate expiration date OK
* 	 server certificate activation date OK
* 	 certificate public key: RSA
* 	 certificate version: #3
* 	 subject: C=US,ST=CA,L=Mountain View,O=WSO2,OU=WSO2,CN=localhost
* 	 start date: Wed, 23 Oct 2019 07:30:43 GMT
* 	 expire date: Tue, 25 Jan 2022 07:30:43 GMT
* 	 issuer: C=US,ST=CA,L=Mountain View,O=WSO2,OU=WSO2,CN=localhost
* 	 compression: NULL
* ALPN, server did not agree to a protocol
* Server auth using Basic with user 'admin'
> GET /scim2/Users?startIndex=1&count=10&domain=PRIMARY HTTP/1.1
> Host: localhost:9443
> Authorization: Basic YWRtaW46YWRtaW4=
> User-Agent: curl/7.47.0
> Accept: */*
>
< HTTP/1.1 500
< Cache-Control: private
< Expires: Thu, 01 Jan 1970 00:00:00 GMT
< X-Frame-Options: DENY
< X-Content-Type-Options: nosniff
< X-XSS-Protection: 1; mode=block
< Date: Mon, 27 Jan 2020 05:42:15 GMT
< Content-Type: application/scim+json
< Content-Length: 168
< Connection: close
< Server: WSO2 Carbon Server
<
* Closing connection 0
{"schemas":["urn:ietf:params:scim:api:messages:2.0:Error"],"detail":"Error while retrieving users for the domain: PRIMARY with limit: 10 and offset: 1.","status":"500"}

Related Issue #7280

Observed the same Issue againt the Tenant mode as well
Request
curl -v -k --user admin@wso2.com:admin 'https://localhost:9443/t/wso2.com/scim2/Users?startIndex=1&count=10&domain=PRIMARY' -i
Response
{"schemas":["urn:ietf:params:scim:api:messages:2.0:Error"],"detail":"Error while retrieving users for the domain: PRIMARY with limit: 10 and offset: 1.","status":"500"}

Tested all the following in IS 5.11.0 beta2 pack and all these issues have been already fixed.
curl -v -k --user admin:admin 'https://localhost:9443/scim2/Users?startIndex=1&count=10&domain=PRIMARY'
curl -v -k --user admin:admin 'https://localhost:9443/scim2/Users?startIndex=-1&count=1&domain=PRIMARY'
curl -v -k --user admin@wso2.com:admin 'https://localhost:9443/t/wso2.com/scim2/Users?startIndex=1&count=10&domain=PRIMARY' -i


Skip parquet getitem optimization tests if no parquet engine found

The minimum dependencies CI builds that run on master turned up a couple of tests that should be skipped if neither fastparquet nor pyarrow are installed (ref https://travis-ci.org/dask/dask/jobs/622860718#L872-L873)

Thanks!


Error Scaffold a controller

Was able to get down to "Add API Controller with actions, using Framework" and when I add it, got an error. Was not able to select and copy it, estimate text was over 400 characters. Did get a window capture in jpg.
Part was "could not load file or assembly 'Microsoft.VisualStudio.Web.CodeGeneration.Utils, ........."

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

ID: 583ae3e7-5915-f22b-e54c-6c100cf2a7da
Version Independent ID: 95f2549e-29f9-e31a-b4d0-432b971643ff
Content: Tutorial: Create a web API with ASP.NET Core
Content Source: aspnetcore/tutorials/first-web-api.md
Product: aspnet-core
Technology: aspnetcore-tutorials
GitHub Login: @Rick-Anderson
Microsoft Alias: riande

The tutorial works. I'm not sure what step you missed. You might try asking on StackOverflow,. Try again.

Very cavalier assumption.
Assuming that my VS installation has all the tool and feature your system has that the tutorial works on.
Please send a copy of your VS installation information on the computer that the tutorial works on.
Just click help in VS and on the About Microsoft Visual Studio window click “Copy Info” button and paste into response.
On your tutorial, I did not find where you directed to install “Microsoft.VisualStudio.Web.CodeGeneration.Utils” with NuGet Package Manager as you did for Microsoft.EntityFrameworkCore.SqlServer and Microsoft.EntityFrameworkCore.InMemory
Installing Microsoft.VisualStudio.Web.CodeGeneration.Utils fixed the problem!
If you do not have a solution for a problem, do not close the ticket, someone else may be able to help.
I have copied my VS installation information below.
Microsoft Visual Studio Community 2019
Version 16.3.10
VisualStudio.16.Release/16.3.10+29519.87
Microsoft .NET Framework
Version 4.8.03752
Installed Version: Community
Visual C++ 2019   00435-60000-00000-AA450
Microsoft Visual C++ 2019
Application Insights Tools for Visual Studio Package   9.1.00913.1
Application Insights Tools for Visual Studio
ASP.NET and Web Tools 2019   16.3.286.43615
ASP.NET and Web Tools 2019
ASP.NET Web Frameworks and Tools 2019   16.3.286.43615
For additional information, visit https://www.asp.net/
Azure App Service Tools v3.0.0   16.3.286.43615
Azure App Service Tools v3.0.0
Azure Functions and Web Jobs Tools   16.3.286.43615
Azure Functions and Web Jobs Tools
C# Tools   3.3.1-beta3-19461-02+2fd12c210e22f7d6245805c60340f6a34af6875b
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Common Azure Tools   1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
Cookiecutter   16.3.19252.1
Provides tools for finding, instantiating and customizing templates in cookiecutter format.
GitHub.VisualStudio   <IP_ADDRESS>32
A Visual Studio Extension that brings the GitHub Flow into Visual Studio.
IntelliCode Extension   1.0
IntelliCode Visual Studio Extension Detailed Info
Microsoft Azure Tools   2.9
Microsoft Azure Tools for Microsoft Visual Studio 0x10 - v2.9.20816.1
Microsoft Continuous Delivery Tools for Visual Studio   0.4
Simplifying the configuration of Azure DevOps pipelines from within the Visual Studio IDE.
Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines
Microsoft Library Manager   2.0.83+gbc8a4b23ec
Install client-side libraries easily to any web project
Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers
Microsoft Visual C++ Wizards   1.0
Microsoft Visual C++ Wizards
Microsoft Visual Studio Tools for Containers   1.1
Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.
Microsoft Visual Studio VC Package   1.0
Microsoft Visual Studio VC Package
NuGet Package Manager   5.3.1
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/
ProjectServicesPackage Extension   1.0
ProjectServicesPackage Visual Studio Extension Detailed Info
Python   16.3.19252.1
Provides IntelliSense, projects, templates, debugging, interactive windows, and other support for Python developers.
Python - IronPython support   16.3.19252.1
Provides templates and integration for IronPython-based projects.
Python - Profiling support   16.3.19252.1
Profiling support for Python projects.
SQL Server Data Tools   16.0.61908.27190
Microsoft SQL Server Data Tools
Test Adapter for Boost.Test   1.0
Enables Visual Studio's testing tools with unit tests written for Boost.Test.  The use terms and Third Party Notices are available in the extension installation directory.
Test Adapter for Google Test   1.0
Enables Visual Studio's testing tools with unit tests written for Google Test.  The use terms and Third Party Notices are available in the extension installation directory.
TypeScript Tools   16.0.10821.2002
TypeScript Tools for Microsoft Visual Studio
Visual Basic Tools   3.3.1-beta3-19461-02+2fd12c210e22f7d6245805c60340f6a34af6875b
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Visual F# Tools 10.4 for F# 4.6   16.3.0-beta.19455.1+0422ff293bb2cc722fe5021b85ef50378a9af823
Microsoft Visual F# Tools 10.4 for F# 4.6
Visual Studio Code Debug Adapter Host Package   1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio
Visual Studio Tools for CMake   1.0
Visual Studio Tools for CMake
Visual Studio Tools for CMake   1.0
Visual Studio Tools for CMake
Visual Studio Tools for Containers   1.0
Visual Studio Tools for Containers
Visual Studio Tools for Unity   <IP_ADDRESS>
Visual Studio Tools for Unity


Change INCLUDES to AM_CPPFLAGS

This fixes the following warning from automake:
vpp/Makefile.am:1: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')

What about deleting the whole line?  On current line 66 the cppflags 	-I$(top_srcdir)/interface \ are including it.

Hi @sebastinas
Thanks for patch, is any comment on Daniel's suggestion?
thanks

Updated the PR to remove the whole line.

Thanks sebastinas

merged as cc7d2f733b5773fa2b70ae796256b0617fd1370d, thanks sebastinas and daniel


Guidance needed on which S3 SDK to use?

Hello,
I want to use a rust-s3 SDK to enhance unFTP (to add support for MinIO as a storage backend) - https://github.com/bolcom/libunftp/issues/341
I am evaluating which S3 library to use (this one - which does not seem to be actively maintained) or the one in Crates.io - https://crates.io/crates/rust-s3
Any guidance on this matter will be super helpful.
Thank you very much !

Hi @ramkumarkb we are in the process of rewriting this lib, you can see all the new PRs in the last couple of weeks. I'd recommend you try the new rewritten SDK. Hopefully we'll add examples soon too.

@dvaldivia  - Thank you very much for the guidance. I will monitor this repo then.
Obviously very happy to note the development of this SDK. Since it will be a tall order to make this as good as the Go-SDK , am hoping that the releases will be incremental, with some very basic operations in the early releases (as that is what most use-cases will be around).

I'm sure the Rust SDK is going to rock, @balamurugana is a rockstar dev and will make the Go SDK look like child's play. hahaha no pressure Bala ;)

@ramkumarkb If you are looking for object CRUD, current master has full support. Feel free to try it out. Only pending things are more features of buckets/objects very specific to S3.

I'm sure the Rust SDK is going to rock, @balamurugana is a rockstar dev and will make the Go SDK look like child's play. hahaha no pressure Bala ;)

We will definitely bring as stable as MinIO Go SDK. I believe current object CRUD APIs are stable enough.


Add UniTask.OpenMod support

Add support for UniTask.OpenMod with intialization in RocketMod subloading.

Yes, it can be helpful because not everyone knows that to use UniTask, you just need to do some Initializations, on the other hand, we will be dependent on UniTask.OpenMod and the devs can add anything there, so we will gonna need to make our own fork and support it
If someone really wants to use UniTask they can just use the OpenMod module or use RocketPluginHelper NuGet/lib to initialize the UniTask, or just copy the initialize method into their plugin and check whether OpenMod is not loaded then just initialize it

Agreed,  support for UniTask.OpenMod should not be implemented.


data-cooltipz-dir="top" not readable and negates element

have this in html

it makes div disappear
when I remove data-cooltipz-dir="top"  the html displays but foesn't show tooltip
i succesfully  used in another app with no problems
Can;t figure out

Hi, thanks for raising an issue. Unfortunately, you have not given me much to go off. It's likely the CSS clashing, but I have no idea what CSS you're using. If you could create a reproduction environment (GitHub project, CodePen, etc) that clearly demonstrates the bug, that would be great.

Closing this bug due to inactivity


[C++] duration add missing kernels

Describe the enhancement requested
There are lots of kernels missing on the duration type for feature-parity with e.g. numpy.timedelta64. Since duration types are basically just wrapped integers, most of the integer kernels should be transferrable, with some exceptions (e.g. prod does not make sense since it would change the physical units)
 I ran a script to figure out what is currently supported.
import pyarrow as pa
from pyarrow.lib import ArrowNotImplementedError

i8 = pa.int8()
i64 = pa.int64()
i32 = pa.int32()
f64 = pa.float64()
td64 = pa.duration("s")
b = pa.bool_()

duration_arr = pa.array([-3, 2, -1, 1], type=td64)
int_arr = pa.array([-3, 2, -1, 1], type=i64)
float_arr = pa.array([-3, 2, -1, 1], type=f64)

# td64 = pa.int64()
# duration_arr = pa.array([-3, 2, -1, 1], type=i64)

unary_ops = [
    (pa.compute.negate, duration_arr, td64),
    (pa.compute.negate_checked, duration_arr, td64),
    (pa.compute.abs, duration_arr, td64),
    (pa.compute.abs_checked, duration_arr, td64),
    (pa.compute.sign, duration_arr, i8),
    # tests
    (pa.compute.is_null, duration_arr, b),
    (pa.compute.is_valid, duration_arr, b),
    (pa.compute.is_finite, duration_arr, b),
    (pa.compute.is_inf, duration_arr, b),
    (pa.compute.is_nan, duration_arr, b),
    (pa.compute.true_unless_null, duration_arr, b),
    # aggregations
    (pa.compute.max, duration_arr, td64),
    (pa.compute.min, duration_arr, td64),
    (pa.compute.sum, duration_arr, td64),
    # (pa.compute.min_max, duration_arr, td64),  # returns tuple
    # (pa.compute.quantile, duration_arr, td64),  # float for int
    # (pa.compute.approximate_median, duration_arr, td64),  # float for int
    # cumulative aggregations
    (pa.compute.cumulative_sum, duration_arr, td64),
    (pa.compute.cumulative_sum_checked, duration_arr, td64),
    (pa.compute.cumulative_min, duration_arr, td64),
    (pa.compute.cumulative_max, duration_arr, td64),
]

for op, operand, dtype in unary_ops:
    try:
        result = op(operand)
    except ArrowNotImplementedError as e:
        print(f" [ ] {op.__name__:<24}({operand.type!s:<11}) -> {dtype}")
    else:
        assert result.type == dtype, f"{op}: got {result.type} expected {dtype}"
        print(f" [x] {op.__name__:<24}({operand.type!s:<11}) -> {dtype}")

binary_ops = [
    # arithmetic
    (pa.compute.add, duration_arr, duration_arr, td64),
    (pa.compute.add_checked, duration_arr, duration_arr, td64),
    (pa.compute.subtract, duration_arr, duration_arr, td64),
    (pa.compute.subtract_checked, duration_arr, duration_arr, td64),
    (pa.compute.multiply, duration_arr, int_arr, td64),
    (pa.compute.multiply_checked, duration_arr, int_arr, td64),
    (pa.compute.divide, duration_arr, duration_arr, f64),
    (pa.compute.divide, duration_arr, int_arr, td64),
    (pa.compute.divide_checked, duration_arr, duration_arr, f64),
    (pa.compute.divide_checked, duration_arr, int_arr, td64),
    # comparisons
    (pa.compute.less, duration_arr, duration_arr, b),
    (pa.compute.less_equal, duration_arr, duration_arr, b),
    (pa.compute.greater, duration_arr, duration_arr, b),
    (pa.compute.greater_equal, duration_arr, duration_arr, b),
    (pa.compute.equal, duration_arr, duration_arr, b),
    (pa.compute.not_equal, duration_arr, duration_arr, b),
    # min/max
    (pa.compute.max_element_wise, duration_arr, duration_arr, td64),
    (pa.compute.min_element_wise, duration_arr, duration_arr, td64),
    # containment
    (pa.compute.is_in, duration_arr, duration_arr, b),
    (pa.compute.index_in, duration_arr, duration_arr, i32),
]

for op, lhs, rhs, dtype in binary_ops:
    try:
        result = op(lhs, rhs)
    except ArrowNotImplementedError as e:
        print(f" [ ] {op.__name__:<20}({lhs.type!s:<11}, {rhs.type!s:<11}) -> {dtype}")
    else:
        assert result.type == dtype, f"{op}: got {result.type} expected {dtype}"
        print(f" [x] {op.__name__:<20}({lhs.type!s:<11}, {rhs.type!s:<11}) -> {dtype}")

[ ] negate                  (duration[s]) -> duration[s]
[ ] negate_checked          (duration[s]) -> duration[s]
[ ] abs                     (duration[s]) -> duration[s]
[ ] abs_checked             (duration[s]) -> duration[s]
[ ] sign                    (duration[s]) -> int8
[x] is_null                 (duration[s]) -> bool
[x] is_valid                (duration[s]) -> bool
[ ] is_finite               (duration[s]) -> bool
[ ] is_inf                  (duration[s]) -> bool
[ ] is_nan                  (duration[s]) -> bool
[x] true_unless_null        (duration[s]) -> bool
[ ] max                     (duration[s]) -> duration[s]
[ ] min                     (duration[s]) -> duration[s]
[ ] sum                     (duration[s]) -> duration[s]
[ ] cumulative_sum          (duration[s]) -> duration[s]
[ ] cumulative_sum_checked  (duration[s]) -> duration[s]
[ ] cumulative_min          (duration[s]) -> duration[s]
[ ] cumulative_max          (duration[s]) -> duration[s]
[x] add                 (duration[s], duration[s]) -> duration[s]
[x] add_checked         (duration[s], duration[s]) -> duration[s]
[x] subtract            (duration[s], duration[s]) -> duration[s]
[x] subtract_checked    (duration[s], duration[s]) -> duration[s]
[x] multiply            (duration[s], int64      ) -> duration[s]
[x] multiply_checked    (duration[s], int64      ) -> duration[s]
[x] divide              (duration[s], duration[s]) -> double
[x] divide              (duration[s], int64      ) -> duration[s]
[x] divide_checked      (duration[s], duration[s]) -> double
[x] divide_checked      (duration[s], int64      ) -> duration[s]
[x] less                (duration[s], duration[s]) -> bool
[x] less_equal          (duration[s], duration[s]) -> bool
[x] greater             (duration[s], duration[s]) -> bool
[x] greater_equal       (duration[s], duration[s]) -> bool
[x] equal               (duration[s], duration[s]) -> bool
[x] not_equal           (duration[s], duration[s]) -> bool
[ ] max_element_wise    (duration[s], duration[s]) -> duration[s]
[ ] min_element_wise    (duration[s], duration[s]) -> duration[s]
[x] is_in               (duration[s], duration[s]) -> bool
[x] index_in            (duration[s], duration[s]) -> int32

Kernels that are questionable:

quantile (yields float for integer data; one could reasonably expect rounded result)
approximate_median (yields float for integer data; one could reasonably expect rounded result)

Component(s)
C++

Thanks for checking! Most of the missing ones should be trivial to implement. I'll take a look soon.

take

There are 2 more operations supported by numpy that are missing in the list above:

multiply(duration, double/float) -> duration
divide(duration, double/float) -> duration

In both cases, numpy performs automatic rounding towards the specified time resolution:
import numpy as np
td = np.timedelta64(5, "D")
print(td * 1.5)  # 7 days
print(td / 1.5)  # 3 days

Especially the multiply kernel would be very useful, because it is the inverse operation to the divide(duration, duration) -> double kernel, which is needed if one wants to reverse pre-processing transformations.

@js8544 I updated the list with the kernel available in the 16.0 release


API Review copies of IDL and references

API Review team: Please leave any public comments in this PR.

Uploading ser.zip…


Support queries at the table level

Per the issue described in issue #588, it was determined queries are not supported at the table level.  Per my last comment in the issue, I'd like to request support for this as it would help eliminate errors in the event certain tables are not present in the database.

Could you flesh this out a little and help me understand what this might look like? If you define a query against a specific table in metadata.json where would you expect that query to be displayed in the Datasette UI?

Sure.  I imagine it being pretty straight forward.  Today when you click on the database, the UI displays:

Queries:

  ..
  ...
My proposal would be to display as follows:

  Queries:

  ..
  ...

  Queries:

  ..
  ...
This way, if a given table is not present in the database, the associated queries are also not present.  Today, I have a list of queries, some work, some result in errors depending on whether the dependent tables exist in the database.
Let me know if that makes sense.  Thanks again!


"Măneciu" is listed in the drop-down menu.

Description:
"Măneciu" is listed in the drop-down menu alongside its corresponding county according to the law
Precondition:
The website is up an running.

Step 1
Type "Măneciu" in the search bar.

Expected results
The location is listed in the drop-down menu as "Comuna Măneciu, PRAHOVA".


support for ctrl + arrow

In scala repl it works fine. It is very helpful and I miss that.

what does it do?

It moves cursor to left/right by exactly one word.

Yup, that's definitely a must-have. Not only Scala REPL supports it. Standard Bash shell handles that shortcut too.

I think the reason I missed it is that on OSX it's captured by the OS and doesn't make it to the shell. One of you will have to implement it, check out the terminal/ subproject to see where the rest of the keyboard commands are =)


Refactor : merge the ComponentMaterial into ComponentMeshRenderer

idk if we need the apply button if we change it automatically
Professors told us that having those buttons was necessary to avoid mistakes with the material


documentation

Hello RiteshKH,
I am very impressed by your work and I wonder if you have publish any paper related to that code? I would like to read more details about the techniques you have applied for the character segmentation.
Thank you!

Thank you for your interest. We are in the process of publishing the paper. Till then you can have a look at the Cursive_Handwriting_Recognition report attached in the code for details, although it's almost same as described in the readme. Sorry I couldn't include any further details.
Thanks.


Video Trimming: Add duration to trim component

Feature Description
originally asked for by @aaskedall
Feature request: time indicator of how long the trimmed segment is

Todo:
Add time to the trim bar (12px, primary color):

Alternatives Considered

Additional Context

Verified in QA


Fix/k0s runtime

Describe what this PR does / why we need it
fix k0s cluster install bug, which because k0s service not loaded, and define external CRI const mistake.
Does this pull request fix one issue?
NONE

Describe how you did it
Describe how to verify it
Special notes for reviews

Codecov Report
Base: 18.39% // Head: 18.39% // Decreases project coverage by -0.00% :warning:

Coverage data is based on head (a3c0d54) compared to base (4d88a6f).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1741      +/-   ##
==========================================
- Coverage   18.39%   18.39%   -0.01%
==========================================
  Files          66       66
  Lines        5359     5366       +7
==========================================
+ Hits          986      987       +1
- Misses       4247     4252       +5
- Partials      126      127       +1

Impacted Files
Coverage Δ

pkg/clusterfile/clusterfile.go
64.00% <0.00%> (-7.43%)
:arrow_down:

pkg/image/save/save.go
0.00% <0.00%> (ø)

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

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


unable send partial results in iOS

Describe the bug
Even though i'm passing partialResults = true in the start() call, the plugin is not sending the partial results. Instead, it just sends one result to the angular code.
To Reproduce
Steps to reproduce the behavior:

Add the plugin to the capacitor project
make an api call to the plugin
SpeechRecognition.start({
language: "en-US",
maxResults: 2,
prompt: "Say something",
partialResults: true,
popup: false,
}).then((matches) => {
this.micStatus = 'astro-listening';
console.log(matches);
})

Expected behavior
When the partialResults param is set to true, the plugin should send the intermediate results until it gets isFinal = true
Smartphone (please complete the following information):

Device: iPhone Simulator XS
OS: 13.3

I have the same problem on iPhone 13 Pro iOS 15.1
Is there any solution already?

I did fix it in this PR https://github.com/capacitor-community/speech-recognition/pull/27
And published a version in case that not merged soon :)

closing since the linked PR was merged


Add support for more layouts when parsing times

whois.dns.pl
created:               2002.09.19 13:00:00

Suggested layout: 2006.01.02 15:04:05

whois.dns.be
Registered:	Tue Dec 6 2000

Suggested layout: Mon Jan _2 2006

whois.jprs.jp
[Registered Date]               2001/03/22

Suggested layout: 2006/01/02

Hello @romaincointepas
It is now supported, please try the latest version.

If you think this repository is helpful, please share it with friends, thanks.


930120: Added ECDSA type SSH identity files

This is a report from the BugBounty event.
Report id: 4863ZMLJ
Payload:
POST / HTTP/1.1
Host: sandbox.coreruleset.org
User-Agent: curl/7.68.0
Accept: */*
x-crs-paranoia-level: 3
x-format-output: txt-matched-rules
x-backend: apache
x-crs-version: nightly
Content-Length: 23
Content-Type: application/x-www-form-urlencoded

cat /root/.ssh/id_ecdsa

CRS Bug Bounty PR assessment

Rules affected (list rules): FIXME
Paranoia Level addressed (1, 2, 3, 4, full or explain): FIXME
FTW passes (yes or no) : FIXME
Rule(s) picked for solution (correct or not-correct or explain) : FIXME
Risk for false positives (irrelevant, adequate, substantial or explain) : FIXME
Regular expression quality (inspirational, decent base, needs work, adequate or explain) : FIXME
Documentation (needs work, adequate or explain) : FIXME
Tests (none or some or adequate) : FIXME

Verdict (Unusable, inspirational, usable, almost perfect or perfect) : FIXME

This is not meant to be final. As a CRS dev, feel free to comment below and edit this form directly. As committer or observer, feel free to comment below with feedback and we will think about updating the assessment accordingly.


Auto-deploy main to both dev and staging envs

This involves having the main branch GHA deploy to staging (in addition to dev, which requires no change). Practically, this mean that upon merge to main, merge main to staging branch.
This applies to both

[ ] ~https://github.com/chanzuckerberg/single-cell-explorer~
[ ] https://github.com/chanzuckerberg/single-cell-data-portal

Please add your planning poker estimate with Zenhub @tihuan

Please add your planning poker estimate with Zenhub @ebezzi

@atolopko-czi @tihuan (cc: @Bento007 ) - In our meeting on 09/28/2023 we agreed that to enable a staging deploy when a commit is pushed to main, we can leverage our current workflow by merging the main branch into staging branch which would create a deployment on a merge to staging branch and then kick off the creation of staging stack
This is all well and good. But I have a couple of questions:
What happens if there is a burst of commits to main? Per above, we would:
git checkout staging
git merge --no-ff main -m "Merge main into staging"
git push

Each of these merges to staging would trigger a creation of a staging deployment and creation of a stack.

Would these workloads just get queued up? This would mean stack creation could take a long time. I think this problem is no worse than it is currently for dev deployment when there is a burst of commits to main branch but just want to check with y'all.

Is it possible for stacks to be created out of order due to a race condition?

Could the git merge main into staging run into a merge conflict scenario if there is a chance of out-of-order processing as stated in (2) above? If so, is it better to recreate the staging branch with the main branch? If we do that what would happen to queue of deployment workloads in (1) above?

I think (2) and (3) are also not problems but I am less sure here. I imagine, that merging to staging is always in-order (guaranteed?), and so our problems is reduced to the same situation as a dev deployment dealing with a burst of commits to main in that if race conditions on executing a build and deploy workflow is not an observed issue in dev, it won't be an issue in staging. But again I want to check with y'all here

While we had talked about reinstating merge queues to handle the ordering/race condition issue, what about using this solution?

If we had a queue that will guarantee all commit A workflows will run

While we had talked about reinstating merge queues to handle the ordering/race condition issue, what about using this solution?

That sounds good. I will add this.
However, it is worth noting that the potential for this problem currently exists in dev deployments - that is, several commits come to the main branch kicking off several GHA deployment workflows and theoretically, there is the possibility of a race condition such that an older commit deployment wins over the deployment of the latest commit.

I think this task has proven more complex that anticipated. The issues:

Branch protection of required staging branch requiring passing GHA prevented auto-merging from main to staging
After addressing (1) by removing GHA passing requirement in staging and successfully auto-merging main to staging, the expected behavior was that it would trigger subsequent workflow to trigger build and deploy workflows. That did not happen. Seems there github has protection against workflows triggering other workflows even if an "on-trigger" criteria is met.

(1) and (2) make implementation and testing (particularly using test branches) quite difficult. One obvious (and painful) way to test this would be to make commits to main until we reach a state where a stage deploy is created. The other is to setup 2 test branches with all the protections and features of main and staging but that seems impractical.
That is just the essential complexity. The accidental complexity is introduced when we have other variables like flakey E2E tests, and needing to freeze environment for pen-testing, etc which is what transpired on the week of 10/09/2023.
Assuming we are able to address the above and get the pieces hooked up such that a merge from main to staging does happen on every commit to main and subsequently triggers a stage env deploy, we should also consider a couple of more things about what the state of staging branch is going to be:
A) The ideal setup (I believe) is that staging branch is protected by the requirement that only all unit tests in the incoming branch (ex: main) passes. But that makes implementation even more complex in that a merge from main to staging should only be triggered when the unit tests passes and if that doesn't happen must fail the merge and send a slack notification.
B) We might take the more expedient route and state that the MVP setup is to remove all branch protection on staging and simply allow all commits to main to be merged into staging. This relies on merges from rdev (or PRs) into main such that all tests pass on rdev. Particularly we are relying on 2 separate rdev (PRs) whose tests are passing independently don't break main when both are merged.

Maybe we should reconsider deploying to staging env directly from main branch? This would eliminate having to make the main->staging merge work. (Now that we know about the concurrency feature of GHA, I think our earlier concerns about deployment race conditions are addressed.) Moving to an all-in-one workflow for merges to main might simplify things. E.g. a workflow that looks like:
Run unit tests on main +---+
                           |-- Deploy to staging --- Run E2E/Func tests
Build images --------------+

This would replace all of:

push-tests.yml (would keep for use with branches)
build-image-and-create-deployment.yml
deploy-happy-stack.yml

Some related benefits to this approach:

It would address https://github.com/chanzuckerberg/single-cell-data-portal/issues/5939 (i.e. fail fast if unit tests fail)
Images would be built optimistically, but if unit tests fail, it aborts deployment
We could view the entire CI/CD GHA task graph in one workflow

I may be missing good reasons why a single workflow is problematic, but at first blush it seems overall simpler to me.

The proposal Andrew has above sounds good! The only thing is probably tracking the latest commit on staging, so oncall engineer knows which commit to use for prod deployment? The concurrency feature definitely solves lots of issues!

@atolopko-czi @tihuan @danieljhegeman (cc: @ebezzi @Bento007)
We should discuss in-person about several things and I am writing the following down to serve our discussion:

In principle an all-in-one workflow seems desirable. We are effectively copying the bulk of push-tests.yml, build-images-and-create-deployment.yml, and deploy-happy-stack.yml into a single workflow file with above job dependency graph. This basically amounts to a pretty big refactoring job and we don't have good testing support.

Doesn't this sounds like quite a bit of work? If so, I think it is important to critically assess how much work it is given that we expected to be wrapped up with CI/CD by now. This is not to say that we shouldn't do it but I think we should acknowledge the complexity and work required. The following points might help determine how much work this new approach is

How to test this new unified workflow? I don't think we want to disrupt the current execution of GHAs in main while this work is in progress because it will block engineers. So we should have a mechanism to either fully test this and verify it is working before merging to main or have this workflow running in parallel to existing GHAs in main.

Would running in parallel this work-in-progress workflow cause resource starvation problems on GHA servers that make existing GHAs on main slower (or worse, fail) and slow down development on main?
If running the work-in-progress workflow in parallel is not an option for the above reason, what is a scheme to fully test this unified workflow end-to-end before merging to main? Would we have a feature branch run this entire single workflow including deploying to stage env there by clobbering stage env while work is in progress?

What was the original reason to have separate workflow files? For readability?  For parallelism?

If it is readability, moving to a single workflow file certainly affects readability albeit that is a minor concern compared to everything else.
If it is parallelism, what if this single workflow architecture takes an unacceptable amount of time? We might then have to think hard about parallelizing again.

Is going with monolithic workflow rearchitecture a currently better investment (given our current resource and time constraints) than getting our current scheme to work by figuring out how to trigger a workflow from a workflow? That is, now that we can auto-merge to staging branch, figure out how to let this trigger the stage deploy.

Given the complexities stated above, should we consider lowering the priority on #5482 and #5479 since our current manual schemes are sufficient? Getting continuous deployment to stage env alone would yield significant value and it seems there is still quite a bit of work to do to get it working.

Really great points too, Prathap! I think if we could figure out workflow triggering workflow, it's probably the lowest hanging fruit. It sounds like GitHub just wants to make sure people don't accidentally create a recursive loop of GitHub actions and incurring crazy amount of costs, but the foot gun is available for us, we just need to be v careful. Even better if there's a way to do cycle detection 😆

@atolopko-czi @tihuan @Bento007 - I don't think using concurrency feature of GHA is a good thing here. The main reason being that ordering is not guaranteed for jobs or runs using concurrency groups, they are handled in the order that they are processed.
Here is the pertinent parts of our workflow DAG:

You could have all kinds of scenarios where workflows get cancelled in undesirable ways depending on which workflows have the concurrency groups. Moreover, if we change the structure of the DAG, say push to prod should trigger push-tests.yml, then that could cause further confusion.
I think what we need is ordering.
concurrency group makes sense when the collection of steps being executed are idempotent (ex: set x = 5). In this case, you don't need multiple tasks running set x = 5. But this is not the case for us. Each commit that triggers the workflow is an input to the workflow and that might change the success/failure status of the workflow. We need to capture all those workflow outputs to reason about things.


Problems with Node v10.3.0

I'm trying to install your package with node v10.3.0 installed and all I get is:
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/binding/src/binding.o
../src/binding.cc:360:23: warning: 'Utf8Value' is deprecated [-Wdeprecated-declarations]
    String::Utf8Value str(in);
                      ^
/Users/nyc/.node-gyp/10.3.0/include/node/v8.h:2821:5: note: 'Utf8Value' has been explicitly marked deprecated here
    V8_DEPRECATED("Use Isolate version",
    ^
/Users/nyc/.node-gyp/10.3.0/include/node/v8config.h:321:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/binding.cc:435:23: warning: 'Utf8Value' is deprecated [-Wdeprecated-declarations]
    String::Utf8Value str(in);
                      ^
/Users/nyc/.node-gyp/10.3.0/include/node/v8.h:2821:5: note: 'Utf8Value' has been explicitly marked deprecated here
    V8_DEPRECATED("Use Isolate version",
    ^
/Users/nyc/.node-gyp/10.3.0/include/node/v8config.h:321:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/binding.cc:619:11: error: no member named 'ForceSet' in 'v8::Object'
  target->ForceSet(Nan::New<v8::String>("endianness").ToLocalChecked(), Nan::New<v8::String>(CheckEndianness()).ToLocalChecked(), static_cast<PropertyAttribute>(ReadOnly|DontDelete));
  ~~~~~~  ^
../src/binding.cc:620:11: error: no member named 'ForceSet' in 'v8::Object'
  target->ForceSet(Nan::New<v8::String>("NULL").ToLocalChecked(), WrapNullPointer(), static_cast<PropertyAttribute>(ReadOnly|DontDelete));
  ~~~~~~  ^
2 warnings and 2 errors generated.
make: *** [Release/obj.target/binding/src/binding.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/Cellar/node/10.3.0/libexec/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Darwin 18.0.0
gyp ERR! command "/usr/local/Cellar/node/10.3.0/bin/node" "/usr/local/Cellar/node/10.3.0/libexec/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"

Any idea why this might be happening? Not a real expert in node here :(

What version of macOS are you using?
I believe you will need the latest xcode command line tools installed. Have you done that?

Thanks for the quick response.
I'm on Mojave Public Beta 5 and Xcode 10 is downloading in this moment. Do you think installing it along with xcode-select --install will do the trick?

Definitely a good step to try!

Same findings as previously. Node updated to 10.8.0 and Xcode to its latest Beta release. I've searched the net and it seems to be a problem with node version and a package that still uses old code or something. Not really sure 😞

I managed to recreate the bug. Looks like nodobjc has some incompatibility with the latest node version. I think until they release a fix you should stick with the LTS version of node (which is always going to be more stable anyway).
In case you don't know about it, the easiest way is to use n. You can simply do:
sudo n 8.11.3

Thanks a lot! :)


Occasional crash if you click deploy "too soon"

Roomba page triggered sometimes if repos are still loading. DT analysis suggests it the error is in

Added some ugly hacks to try to prevent this race condition. In theory, this is prevented for now. Long term fix is to move a pre-compiled dashboard pack from S3.


spnego: add missing check

@freerdp-bot test

@fifthdegree code quality checker is unhappy

@mfleisz I ran it through clang-format now, apparently my editor did something weird to the spacing

@freerdp-bot test


Allow @objc(Name) on enums

This implements support for
@objc(ObjCEnum) enum SwiftEnum : Int {
    case One = 1, Two, Three
}

A new macro for the generated header is defined called SWIFT_ENUM_NAMED and the above declaration looks like
typedef SWIFT_ENUM_NAMED(NSInteger, ObjCEnum, "SwiftEnum") {
    ObjCEnumOne = 1,
    ObjCEnumTwo = 2,
    ObjCEnumThree = 3,
};

Since swift_name doesn't actually work properly yet when importing Obj-C enums, there's an XFAILed test that tests the clang importer here.
This does NOT cover support for @objc(Name) on the individual case declarations.

Thanks for working on this!

I've updated the PR as per feedback. Tests are now part of the relevant commits, the enum constant prefix bit was pulled out into #743, and I've added relevant code to the resolve-cross-language test.
A couple of the tests have // FIXME comments for #743, because they use __attribute__((swift_name(...))) on enum constants in order to sidestep the enum constant prefix stripping. The tests will be unaffected by #743 but should ideally have the attributes removed once #743 lands.

Looks great. Thanks, Kevin!
I merged #743 just now. Do you want to fix these tests first or just do a follow-up?

I'll fix the tests now.

@jrose-apple Rebased and updated to remove the FIXMEs.

Aren't these commits in the wrong order? Ideally every commit should be build-and-testable on its own, although I suppose that matters less in a merge.

@jrose-apple GitHub bug, it's showing the commits in the wrong order. If you look at the branch they're ordered Sema, PrintObjC, ClangImporter.

Weird, okay. Doing one more check on my machine, then I'll merge.
("It's not that I don't trust you…")

Yeah, it's annoying. I filed a support ticket over a year ago about this, and they still haven't fixed it :/


compilation problem for libint2 interface to Quax

Hi,
I followed exactly what's told in the github page of Quax for installation, with the only exception of support for a larger angular momentum (=4), i.e., while exporting libint2, I used
 ../configure --prefix=/home/bing/src/libint/build/quax --with-max-am=4 --with-opt-am=0 --enable-1body=4 --enable-eri=4 --with-multipole-max-order=0 --enable-eri3=no --enable-eri2=no --enable-g12=no --enable-g12dkh=no --with-pic --enable-static --enable-single-evaltype --enable-generic-code --disable-unrolling

Whie compiling the libint2 interface to Quax, I encounter the following error:
(quax) bing@li:~/src/Quax/quax/external_integrals$ make
g++ libint_interface.o -o libint_interface.cpython-37m-x86_64-linux-gnu.so -O3 -fPIC -mcmodel=large -shared -std=c++11 -I /home/bing/miniconda3/envs/quax/opt/libint/2.7.0-beta.6-ninja-lmax4-deriv4/include -I /home/bing/miniconda3/envs/quax/opt/libint/2.7.0-beta.6-ninja-lmax4-deriv4/include/libint2 -I /home/bing/miniconda3/envs/quax/include/eigen3 -I /home/bing/miniconda3/envs/quax/include/python3.7m -I /home/bing/miniconda3/envs/quax/lib/python3.7/site-packages/pybind11/include -I /home/bing/miniconda3/envs/quax/include -L /home/bing/miniconda3/envs/quax/opt/libint/2.7.0-beta.6-ninja-lmax4-deriv4/lib -lint2 -L /home/bing/miniconda3/envs/quax/lib -lhdf5_cpp -lhdf5 -lpthread -Wl,-rpath,"/home/bing/miniconda3/envs/quax/lib"
/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o: in function `_init':
(.init+0xb): relocation truncated to fit: R_X86_64_REX_GOTPCRELX against undefined symbol `__gmon_start__'
libint_interface.o: in function `finalize()':
libint_interface.cc:(.text+0x3): relocation truncated to fit: R_X86_64_REX_GOTPCRELX against symbol `libint2::detail::managed_singleton<libint2::detail::__initializer>::instance_' defined in .bss._ZN7libint26detail17managed_singletonINS0_13__initializerEE9instance_E[_ZN7libint26detail17managed_singletonINS0_13__initializerEE9instance_E] section in libint_interface.o
libint_interface.cc:(.text+0x27): relocation truncated to fit: R_X86_64_REX_GOTPCRELX against symbol `libint2::detail::verbose_accessor()::value' defined in .bss._ZZN7libint26detail16verbose_accessorEvE5value[_ZZN7libint26detail16verbose_accessorEvE5value] section in libint_interface.o
libint_interface.cc:(.text+0x34): relocation truncated to fit: R_X86_64_REX_GOTPCRELX against symbol `std::clog@@GLIBCXX_3.4' defined in .bss section in /home/bing/miniconda3/envs/quax/lib/libstdc++.so
libint_interface.cc:(.text+0x3b): relocation truncated to fit: R_X86_64_REX_GOTPCRELX against symbol `libint2::detail::verbose_stream_accessor()::value' defined in .data.rel._ZZN7libint26detail23verbose_stream_accessorEvE5value[_ZZN7libint26detail23verbose_stream_accessorEvE5value] section in libint_interface.o
libint_interface.o: in function `libint2::os_core_ints::delta_gm_eval<double>::operator()(double*, double, double, int) const [clone .isra.249]':
libint_interface.cc:(.text+0x60): relocation truncated to fit: R_X86_64_PC32 against `.LC6'
libint_interface.cc:(.text+0x8c): relocation truncated to fit: R_X86_64_PC32 against `.LC7'
libint_interface.o: in function `void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag) [clone .isra.693]':
libint_interface.cc:(.text+0x23b): relocation truncated to fit: R_X86_64_PC32 against `.LC10'
libint_interface.o: in function `void libint2::GaussianGmEval<double, 0>::eval<double>(double*, double, double, unsigned long, std::vector<std::pair<double, double>, std::allocator<std::pair<double, double> > > const&, void*) [clone .constprop.1404]':
libint_interface.cc:(.text+0x32d): relocation truncated to fit: R_X86_64_PC32 against `.LC15'
libint_interface.cc:(.text+0x35e): relocation truncated to fit: R_X86_64_PC32 against `.LC15'
libint_interface.cc:(.text+0x3c1): additional relocation overflows omitted from the output
libint_interface.cpython-37m-x86_64-linux-gnu.so: PC-relative offset overflow in GOT PLT entry for `libint2_need_memory_3emultipole1'
collect2: error: ld returned 1 exit status
make: *** [makefile:47: libint_interface.cpython-37m-x86_64-linux-gnu.so] Error 1

The central error message is PC-relative offset overflow in GOT PLT entry, which seems to be caused by the lack of support of large library file produced by installing libint2 (the resulting libint2.a file is of size >3GB). And by setting -mcmodel=large as option of g++ while compiling the interface does not solve the problem. Any idea to fix this issue?
Best,
Bing

Hi @binghaung2018, unfortunately it seems that the Libint interface under these conditions (4th order derivatives up to g-basis functions) is simply too large to compile using g++. This is not an issue exclusive to Quax; I believe even a simple C++ code which imports such a large library will fail to compile.  There may be some workaround with compiler tricks/ alternative compilers, but I do not have expertise in that area. I have successfully used Libint and Quax with 4th derivatives and f-functions (max angular momentum 3)... I think the g-functions just makes the library too large. Some possible solutions:

Use the much slower Quax integrals for cases in which you need g-functions
Consult the Libint devs to see if it is possible to reduce the Libint library size without decreasing angular momentum, deriv order
Rewrite a new Quax interface to some alternative integrals library which does not have these issues (difficult)

What do you think?

Hi, @adabbott, thanks for your reply! For speed, there seems to be only one viable solution: compile Libint & Libint-Quax-interface all together! Yet another approach is to compile different contributions (i.e., deriv4(s~f,s~f|1/r12|s~f, s~f), deriv4(s~f,s~f|1/r12|s~f, g), ...) into different library files. Of course, the latter is not trivial.
What do you think?

"simply too large to compile using g++"

I love quantum chemistry.


Supports custom loggger

There is no options to config logger. Hope we can use our custom logger in apify.
Besides, maybe we can add more event hooks in crawler, such as start、end、paging、retry
crawler.on('start', () => {
// ...
})

Custom loggers are definitely in our pipeline for the coming months. Hooks, also, but not a priority because we're still debating their usefulness. What's your usecase?

For example, I can log custom message on every page or request, I can send alert on every error.

Well, you can log a message on each page in the handlePageFunction itself, as well as an error. You cannot easily send an alert for an error that's produced outside of handlePageFunction, that's true.

Yes, it works. But my code for logging will mix in the code for crawling.  It doesn't look good.


Unspecified "prune_graph" package?

\od_mstar3\od_mstar.py,
Line 1235: import prune_graph
May I ask what is this "prune_graph" package that is imported here? Can't find it either in this repository or PyPi resources.
BTW Impressive paper, kudos~

Hi Serene,
Thanks a lot for your comment and compliment, I appreciate it a lot!
If you get this issue, it means you are not importing the right od_mstar package. That is, you should never import od_mstar.py. You should follow the repo's README that explains how to compile the C++ version of od_mstar, and then import mstar_cpp from the od_mstar3 folder.
Now, if you really want to use od_mstar.py (and in particular that one function in it that triggers this import of prune_graph), I will be quickly adding the prune_graph.py file to the od_mstar3, and you can then git pull and everything should work. But I would not recommend doing so, and rather use the C++ implementation of the code (way faster), as explained in the repo's README.
Let me know if this solves the issue (in which case feel free to close the issue), and if you need any further help.
Best,
Guillaume


Implement an initial simple raster search and display.

This also fixes some coordinate transform issues.  This requires upgrading to django 3.1 (which is currently in rc1, and is not
official).  Unfortunately, there is definitely code in djangorestframework with will fail in django 3.1 until drf has a new release.
Specifically, there is ambiguity in how django 3.0 handles GDAL 3 transforms.  Compounding the problem, rasterio is bundled with a GDAL 2.x library.  Django should be using our more complete GDAL 3 library, but depending on the import order of rasterio and osgeo, rasterio may not emit wkt coordinates in a consistent manner.

I'm marking this as a draft until I've added tests.  The tests I intend to add first are for the ETL to ensure that the coordinates that are retrieved for the data sets are the expected values.


Add support for PYG

I am introducing Lightning with Phoenix in Paraguay, but we have a problem that Phoenix does not support Paraguayan Guaraní (PYG) as a currency. Could you please add it?
Tried on iOS, I don't know if you support it on Android, but that would be very welcome too.
Thank you.

Will do :) we are reworking the Android app to use the phoenix-kmm stack shared with iOS so it will be a good opportunity to support additional currencies.

It would be equally great if they increased the Cuban peso with its real rate, as explained in yadio.io

@Ventura94 Thank you! I had no idea the rate for CUP was inaccurate. In the iOS app we currently support the Argentine Peso via "ARS (official)" & "ARS (blue market)". Is this a similar situation with Cuban Peso, with an "official" exchange rate, and a different free-market rate? Or is the current exchange rate for CUP simply inaccurate?
Dev notes:
Could use this API to fetch a more accurate USD/CUP rate (more currencies available too).
For context, the currently stated rates are:

CoinDesk API: 1 USD = 25.75 CUP
Yadio API: 1 USD = 185 CUP

@ Cuba is in the same situation as Argentina, it has an "official" exchange rate and a different free market rate.

This repository is obsolete and is replaced by https://github.com/ACINQ/phoenix. Please continue the discussion about this issue there.


Cannot change config in setup block

Unable to change any filed in setup block, none of my changes works.
I'm using LunarVim if it matters.

Hey,
Could you try disabling the theme setting?
theme = {
  enabled = false
}

This feature doesn't work well with some themes.
What version of nvim are you running?

Already did, actually I tried to change the background color of the pop window since it is same with the terminal, so I tried the theme or border, then I found none of the configs works.

UPDATE:
Sorry about that, it seems it is Packer issue, I have to run PackerCompile after I edit my config file.
Changing border or list config is working now.
But it
theme = {
  enabled = false
}

still doesn't work
BTW: I'm using onedark theme.

Yeah, it should be enable = false without the d at the end, sorry my bad

Yeah, it should be enable = false without the d at the end, sorry my bad

it's ok, I'm using enable in my config, you can see that in the screenshot.

Are you sure the theme is not disabled? Try executing :hi GlanceListNormal command, it should say the highlight is cleared.

yes：

It is disabled then. Since your colorscheme lacks the required highlights for glance to borrow you'll have to highlight it yourself. You can check the defined highlight groups here

Thanks.


[Feature] Adding constexpr functionality to the library

[X] Has this change been discussed on the forum or in an issue before? Discussed in Discord.
[X] Does the code follow the SFML Code Style Guide?
[ ] Have you provided some example/test code for your changes?
[ ] If you have additional steps which need to be performed list them as tasks!

Description
Added constexpr support for a few classes (more will be added later).
It's important to note that constexpr functionality cannot be buil separately and then linked with the rest of the library. This is because the compiler must be able to see the definition of constexpr functionality in order to perform compile-time computations.
For that reason, definitions of constexpr functionality must be done inside the header file (just like templates), so many definitions that used to be in the corresponding .cpp file are now inside a .inl file (to be consistent with the rest of the library).
Another discussion is about turning some variables that are currently const into constexpr. This should be easy in general, but static class variables which type is the same as the class they're in (e.g.: sf::Color::Blue, sf::Color::Red, sf::Time::Zero, ...) cannot be made constexpr (at least I'm not aware of how to do it).
For the moment I'm leaving all the variable definitions inside the .cpp file.
Tasks

[X] Tested on Linux
[ ] Tested on Windows
[ ] Tested on macOS
[ ] Tested on iOS
[ ] Tested on Android

How to test this PR?
This is the template example, but using a constexpr sf::Vector2u to intialize sf::VideoMode instead of using the values directly. The constexpr functionality should work out of the box, as long as the initialization is performed at compile time.
#include <SFML/Graphics.hpp>
#include <SFML/System.hpp>

int main()
{
    // Just showing sf::Vector2, but should work for every constexpr functionality
    constexpr sf::Vector2u windowSize(1280, 720);
    sf::RenderWindow window(sf::VideoMode(windowSize.x, windowSize.y), "Minimal, complete and verifiable example");
    window.setFramerateLimit(60);

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();
        }

        window.clear();
        window.display();
    }
}

Moving function definitions from .cpp to header files bears similar problems as with templates:

May require dependencies to be exposed
Increases compile times
Changes require recompilation of all clients (probably OK since it's a library).

Also, the constexpr attribute is somewhat never-ending, it can be added to loads of functions without having a real impact.
So I would be for a more selective strategy regarding if and how we add this attribute. In the cases where no one benefits from constexpr, we should probably not add it, for the sake of decreased compile times (would need measurements).
Eventually, constexpr is an expression of intent -- it signals to the user "you can use this symbol in a constant expression". That implies that removing constexpr is a breaking API change; thus it's not suited for more complex cases which might undergo change of implementation.

Moving function definitions from .cpp to header files bears similar problems as with templates:

May require dependencies to be exposed
Increases compile times
Changes require recompilation of all clients (probably OK since it's a library).

Also, the constexpr attribute is somewhat never-ending, it can be added to loads of functions without having a real impact.
So I would be for a more selective strategy regarding if and how we add this attribute. In the cases where no one benefits from constexpr, we should probably not add it, for the sake of decreased compile times (would need measurements).
Eventually, constexpr is an expression of intent -- it signals to the user "you can use this symbol in a constant expression". That implies that removing constexpr is a breaking API change; thus it's not suited for more complex cases which might undergo change of implementation.

I'm okay with not doing almost everything constexpr (even though we could make 90% of SFML constexpr). I did some that I felt would benefit from constexpr (except sf::BlendMode, maybe).
Some classes are obviously not really great to add constexpr to them, like classes that draw stuff or classes that manage windows. We should compile a list of functions, classes and member functions that can benefit from being constexpr.
Exposing internal stuff is something we risk by adding constexpr, but we have no other option if we want this functionality.

I'm okay with not doing almost everything constexpr (even though we could make 90% of SFML constexpr). I did some that I felt would benefit from constexpr (except sf::BlendMode, maybe).
Some classes are obviously not really great to add constexpr to them, like classes that draw stuff or classes that manage windows. We should compile a list of functions, classes and member functions that can benefit from being constexpr.
Exposing internal stuff is something we risk by adding constexpr, but we have no other option if we want this functionality.

Exposing internal stuff is something we risk by adding constexpr, but we have no other option if we want this functionality.

Yep, and this is what we should analyze.
What do we need constexpr for?

Performance?
Usage of expressions in more contexts?
Metaprogramming?
Keep up with latest trends?

If it boils down to point 4, we might need to reconsider it 🙂
Also, the feature is more complex than might seem at first (see e.g. Chapter 3 here), and with C++20 and constinit/consteval, a whole new can of worms is opened.
TLDR: I'm not sure SFML is a typical library that can benefit from the added complexity (more verbose signatures, moving things to headers, possibly increased compile times), so we should carefully check the benefits.

Exposing internal stuff is something we risk by adding constexpr, but we have no other option if we want this functionality.

Yep, and this is what we should analyze.
What do we need constexpr for?

Performance?
Usage of expressions in more contexts?
Metaprogramming?
Keep up with latest trends?

If it boils down to point 4, we might need to reconsider it 🙂
Also, the feature is more complex than might seem at first (see e.g. Chapter 3 here), and with C++20 and constinit/consteval, a whole new can of worms is opened.
TLDR: I'm not sure SFML is a typical library that can benefit from the added complexity (more verbose signatures, moving things to headers, possibly increased compile times), so we should carefully check the benefits.

I agree that we shouldn't go crazy, but there's really no drawback in adding it to a few classes. I can speak for myself, and I've needed it a few times. Not that it was a must, but having a const variable when a constexpr is possible is not the best.

I agree that we shouldn't go crazy, but there's really no drawback in adding it to a few classes. I can speak for myself, and I've needed it a few times. Not that it was a must, but having a const variable when a constexpr is possible is not the best.

In my opinion SFML should handle more important things related to modern C++ first.
Removing redundant classes (sf::Thread), using std::unique_ptr or std::unordered_map in some places, etc. etc. (more was discussed on SFML forums in development section)
constexpr doesn't really add much here, I think (it's more useful for places where you really needed constexpr expressions, e.g. std::tuple manipulation, std::array initialization, etc.). Just because we can doesn't mean we should.

sf::Vector<T> is now constexpr thanks to #1903.

Closing as discussed in #1909 🙂


Fixed Pigeon2Swerve only using X acceleration

Fixed Pigion2 to use all available accelerations instead of just X.
Edit: Apologies about editing this I clicked comment and erased what was originally wrote here.

Can you change this to the dev branch?