uPNP does not find FDR-X1000V

as reported by @toufraita.
'src/example/dump_camera_capabilities.py' script does not find camera, but capabilities do list if QX_ADDR is manual set to correct IP.
This is probably an issue with the big regular expression which attempts to pull the IPs out of the XML file that the camera 'sends'. (note: QX10 has an extra space which we needed to appreciate). Script know to work on QX10, AS15 and HX60V at present.
X1000V is in the same group as AS200, so there code base is likely the same
https://developer.sony.com/develop/cameras/
Try some extra prints to see if there's something obvious, or upload the XML file for inspection....
    def _parse_device_definition(self, doc):
        """
        Parse the XML device definition file.
        """
        dd_regex = ('<av:X_ScalarWebAPI_Service>'
            '\s*'
            '<av:X_ScalarWebAPI_ServiceType>'
            '(.+?)'
            '</av:X_ScalarWebAPI_ServiceType>'
            '\s*'
            '<av:X_ScalarWebAPI_ActionList_URL>'
            '(.+?)'
            '/sony'                               # and also strip '/sony'
            '</av:X_ScalarWebAPI_ActionList_URL>'
            '\s*'
            '<av:X_ScalarWebAPI_AccessType\s*/>'  # Note: QX10 has 'Type />', HX60 has 'Type/>'
            '\s*'
            '</av:X_ScalarWebAPI_Service>')

        services = {}
+       print doc
        for m in re.findall(dd_regex, doc):
            service_name = m[0]
            endpoint = m[1]
            services[service_name] = endpoint
        return services

Checked what happens with my HDR-AS15 with the following patch.
$ git diff
diff --git a/src/pysony.py b/src/pysony.py
index 60c3b5c..f2ab1c8 100755
--- a/src/pysony.py
+++ b/src/pysony.py
@@ -112,6 +112,7 @@ class ControlPoint(object):
             '</av:X_ScalarWebAPI_Service>')

         services = {}
+        print doc
         for m in re.findall(dd_regex, doc):
             service_name = m[0]
             endpoint = m[1]
@@ -125,6 +126,7 @@ class ControlPoint(object):
         """
         r = urllib2.urlopen(url)
         services = self._parse_device_definition(r.read())
+        print services

         return services['camera']

As you can see the camera returns 3 services, all with the same IP and port. If this different from the X1000V?
$ python src/example/dump_camera_capabilities.py
Searching for camera
<?xml version="1.0" encoding="utf-8"?><root xmlns="urn:schemas-upnp-org:device-1-0" xmlns:dlna="urn:schemas-dlna-org:device-1-0" xmlns:av="urn:schemas-sony-com:av"><specVersion><major>1</major><minor>0</minor></specVersion><device><dlna:X_DLNADOC xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMS-1.50</dlna:X_DLNADOC><deviceType>urn:schemas-upnp-org:device:MediaServer:1</deviceType><friendlyName>HDR-AS15</friendlyName><manufacturer>Sony Corporation</manufacturer><manufacturerURL>http://www.sony.com/</manufacturerURL><modelDescription>SonyDigitalMediaServer</modelDescription><modelName>SonyImagingDevice</modelName><modelURL>http://www.sony.net/</modelURL><UDN>uuid:00000000-0005-0010-8000-40f308d5c70e</UDN><serviceList><service><serviceType>urn:schemas-upnp-org:service:ContentDirectory:1</serviceType><serviceId>urn:upnp-org:serviceId:ContentDirectory</serviceId><SCPDURL>/CdsDesc.xml</SCPDURL><controlURL>/upnp/control/ContentDirectory</controlURL><eventSubURL>/upnp/event/ContentDirectory</eventSubURL></service><service><serviceType>urn:schemas-upnp-org:service:ConnectionManager:1</serviceType><serviceId>urn:upnp-org:serviceId:ConnectionManager</serviceId><SCPDURL>/CmsDesc.xml</SCPDURL><controlURL>/upnp/control/ConnectionManager</controlURL><eventSubURL>/upnp/event/ConnectionManager</eventSubURL></service><service><serviceType>urn:schemas-sony-com:service:ScalarWebAPI:1</serviceType><serviceId>urn:schemas-sony-com:serviceId:ScalarWebAPI</serviceId><SCPDURL>/ScalarWebApiDesc.xml</SCPDURL><controlURL></controlURL><eventSubURL></eventSubURL></service></serviceList><iconList><icon><mimetype>image/jpeg</mimetype><width>48</width><height>48</height><depth>24</depth><url>/DLNA_camera_48.jpg</url></icon><icon><mimetype>image/jpeg</mimetype><width>120</width><height>120</height><depth>24</depth><url>/DLNA_camera_120.jpg</url></icon><icon><mimetype>image/png</mimetype><width>48</width><height>48</height><depth>24</depth><url>/DLNA_camera_48.png</url></icon><icon><mimetype>image/png</mimetype><width>120</width><height>120</height><depth>24</depth><url>/DLNA_camera_120.png</url></icon></iconList><av:X_ScalarWebAPI_DeviceInfo xmlns:av="urn:schemas-sony-com:av"><av:X_ScalarWebAPI_Version>1.0</av:X_ScalarWebAPI_Version><av:X_ScalarWebAPI_ServiceList><av:X_ScalarWebAPI_Service><av:X_ScalarWebAPI_ServiceType>guide</av:X_ScalarWebAPI_ServiceType><av:X_ScalarWebAPI_ActionList_URL>http://<IP_ADDRESS>:10000/sony</av:X_ScalarWebAPI_ActionList_URL><av:X_ScalarWebAPI_AccessType /></av:X_ScalarWebAPI_Service><av:X_ScalarWebAPI_Service><av:X_ScalarWebAPI_ServiceType>accessControl</av:X_ScalarWebAPI_ServiceType><av:X_ScalarWebAPI_ActionList_URL>http://<IP_ADDRESS>:10000/sony</av:X_ScalarWebAPI_ActionList_URL><av:X_ScalarWebAPI_AccessType /></av:X_ScalarWebAPI_Service><av:X_ScalarWebAPI_Service><av:X_ScalarWebAPI_ServiceType>camera</av:X_ScalarWebAPI_ServiceType><av:X_ScalarWebAPI_ActionList_URL>http://<IP_ADDRESS>:10000/sony</av:X_ScalarWebAPI_ActionList_URL><av:X_ScalarWebAPI_AccessType /></av:X_ScalarWebAPI_Service></av:X_ScalarWebAPI_ServiceList><av:X_ScalarWebAPI_ImagingDevice><av:X_ScalarWebAPI_LiveView_URL>http://<IP_ADDRESS>:60152/liveview.JPG?%211234%21http%2dget%3a%2a%3aimage%2fjpeg%3a%2a%21%21%21%21%21</av:X_ScalarWebAPI_LiveView_URL><av:X_ScalarWebAPI_DefaultFunction>RemoteShooting</av:X_ScalarWebAPI_DefaultFunction></av:X_ScalarWebAPI_ImagingDevice></av:X_ScalarWebAPI_DeviceInfo></device></root>
{'accessControl': 'http://<IP_ADDRESS>:10000', 'camera': 'http://<IP_ADDRESS>:10000', 'guide': 'http://<IP_ADDRESS>:10000'}
Available calls:
getMethodTypes
getAvailableApiList
setShootMode
getShootMode
getSupportedShootMode
getAvailableShootMode
setSteadyMode
getSteadyMode
getSupportedSteadyMode
getAvailableSteadyMode
setViewAngle
getViewAngle
getSupportedViewAngle
getAvailableViewAngle
setMovieQuality
getMovieQuality
getSupportedMovieQuality
getAvailableMovieQuality
startLiveview
stopLiveview
startMovieRec
stopMovieRec
startIntervalStillRec
stopIntervalStillRec
setCameraFunction
getCameraFunction
getSupportedCameraFunction
getAvailableCameraFunction
getStorageInformation
getApplicationInfo
getVersions
getEvent
--
getSupportedShootMode :
{'id': 1, 'result': [['movie', 'intervalstill']]}

getSupportedSteadyMode :
[ERROR] camera doesn't workHTTP Error 403: Forbidden

getSupportedViewAngle :
[ERROR] camera doesn't workHTTP Error 403: Forbidden

getSupportedMovieQuality :
[ERROR] camera doesn't workHTTP Error 403: Forbidden

getSupportedCameraFunction :
[ERROR] camera doesn't workHTTP Error 403: Forbidden

Ignore the 'forbidden' this is a problem with this specific camera and can be 'solved' by authenticating first (see 'authenication2' branch).

Hi,
Sorry, but I'm not sure how I'm supposed to use that, I'm quite new to this. What url am I supposed to give to _parse_device_definition?

Hi, if you're interested about how the uPNP works this is quite a good write-up:
http://stackoverflow.com/questions/21340286/windows-compatibility-with-the-sony-camera-remote-api
However just adding the two print statements and running the 'dump_camera_capabilities' script (as above) should give us enough information to see if there's an obvious difference in the XML that the camera returns.
Cheers,
Simon.

Hi,
I'm sorry I had not the same version of pysony as you, and I didn't understand how the prints changed the sump_camera_capabilities script.
I changed everything to fit, and unfortunately it does not return anything. In the discover function, the packets returned by the _listen_for_discover function is the empty list.
I don't know much about network configuration, am I supposed to change the msg defined in the discover function?

the packets returned by the _listen_for_discover function is the empty list.

Oh, that might mean that we're not waiting long enough for the camera to respond. There should be no need to change outgoing message in the discover function (well we think its right).
The basic sequence is:

Computer - Anyone There? (IP multicast to everyone)
Camera - Yes, me! (here's my XML location)
Computer (to camera) - Who are you? (ie. reads camera's XML)
Camera - I'm Fred... blar, blar, blar

You could try to increase the timeout to see if the FDR-X1000V just takes a little longer to reply, 10s is probably overkill, but would confirm if this is the issue.
    def discover(self, duration=None):
        # Default timeout of 1s
        if duration==None:
-            duration=1
+            duration=10

You do have the computer connected to the camera's WiFi at this point, don't you? You suggested that using a 'QX_ADDR=..' works so I guess you do... just checking :-)

Yes I'm connected to the wifi ;) .
Still nothing... I had already tried to wait a little bit longer than one second. I've juste tried again with 10s and even 20s, but it's no better...
When I do
 print self.__udp_socket.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL , 2)
I get None, and when I do
print self.__udp_socket.sendto(msg, (SSDP_ADDR, SSDP_PORT))
I get 141.
Is this of any help?


Update documentation with changes in freeze-feat

Presently --slurp requires some value to go along with it. So a simple region selection command will need an empty string to be passed along: wayshot -s ""  which seems pretty clunky to me. Is it fine if I make SLURP_ARGS optional, so that wayshot -s also works @Shinyzenith ?

I have already implemented the change @uncomfyhalomacro , should I include it in this PR?

it would be much appreciated @CheerfulPianissimo

alright, the manpages have been updated to reflect the cli changes. Please inform me if I've missed anything @Shinyzenith

@CheerfulPianissimo Hi sooraj, lets schedule a call as this pr will need to be interlaced with a few more. When are you available?

Anytime this week will be fine.

I want to merge this as part of your pr, is this updated? @CheerfulPianissimo

This PR doesn't have anything to do with the libwayshot code and no changes have been made to the wayshot CLI so yes it should be up to date.


[$250] Hybrid -Android - Search -Nothing to show seen briefly when tapping cancel to close a search in chats

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

Version Number: 9.0.76-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: No, reproducible on hybrid only
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5348007&group_by=cases:section_id&group_order=asc&group_id=296775
Email or phone of affected tester (no customers<EMAIL_ADDRESS>Issue reported by: Applause Internal Team
Device used: Motorola MotoG60 - Android 12
App Component: Search
Action Performed:

Open the Expensify app.
Tap on "Search" on the bottom of the screen.
Tap on the dropdown menu and select "Chats"
Tap on the filters icon.
Apply any filter to add to a search.
Tap on "Save Search"
Tap on "Cancel" on the top of the screen.

Expected Result:
After tapping on "Cancel" when saving a search on "Chats" the search should be automatically closed and all the section´s content should be automatically displayed.
Actual Result:
When the user taps on "Cancel" after saving a search on chats section, "Nothing to Show" is briefly displayed before all the expenses appear.
Workaround:
Unknown
Platforms:

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

Screenshots/Videos
https://github.com/user-attachments/assets/f6fb4db5-bca5-4082-a058-5429290fab27
View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~021869029305272417041
Upwork Job ID:<PHONE_NUMBER>272417041
Last Price Increase: 2024-12-17

Issue OwnerCurrent Issue Owner: @Ollyws

Can I test the Hybrid App?


CUDA optimization: unrolling optimization gather_partial functions

Optimization of CUDA encoder.  The gather_partial functions use a runtime variable for their for loop trip count.  This means the compiler cannot unroll the loops and this results in register spillage since the compiler cannot index into registers.
This optimization leads to a 1.18x speedup on the benchmark when running on GP100
zfp -d -3 384 384 256 -r 16 -x cuda -i ~/zfp/viscosity.raw

Codecov Report

Merging #61 into develop will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop      #61   +/-   ##
========================================
  Coverage    90.34%   90.34%
========================================
  Files           64       64
  Lines         3448     3448
========================================
  Hits          3115     3115
  Misses         333      333

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f763202...9cb007f. Read the comment docs.

@maddyscientist Thanks for this PR.  I am not convinced that this optimization does the right thing, however.  In gather_partial2, p is incremented by nx * sx in the inner loop without the optimization, which is then undone in the outer loop by subtracting nx * sx.  With the optimization, p is incremented by 4 * sx.  So in the outer loop, I would expect a subtraction of 4 * sx.
I am also concerned about p being made to potentially point to unallocated memory.  I'm not sure what CUDA says about this, but that's undefined behavior in C and C++, even if the pointer is not dereferenced.

Thanks for the review @lindstro.  I'm traveling in China at the moment so I might not get a chance to address your comments until I return.
One question: is there a suitable CUDA unit test that I can use that will test the gather_partial function?

@maddyscientist We do not have a unit test for gather_partial alone.  The testZfpCuda* tests should all indirectly call gather_partial, but using only a limited set of array dimensions that do a poor job of exercising this function.  We're working on adding more tests that should test virtually all possible combinations of partial block dimensions and that would expose any issues with its implementation.  This will require a fairly significant rewrite of our checksumming capability, as this will result in hundreds or even thousands of new checksums that are currently entered by hand.
Do the testZfpCuda* tests pass for you with your optimizations?  That would indicate a potential issue with the tests themselves.

@lindstro I have fixed the issues you highlighted above, and I can confirm that all the tests pass now.


Provisioning Engine - Publish file as major version

As far as I've experienced, there's no way to publish a File in Major version from the Provisioning engine. Perhaps depends on how the Lib is configured, but for instance, with the OOB Master page gallery, the files (Layouts, Master pages, Display templates) are provisioned but not published as major versions. This is the pnp:File node I'm using:
<pnp:File Src="..\Assets\DisplayTemplates\Content Web Parts\Custom_Item_News.html" Folder="~masterpagecatalog/Display Templates/Content Web Parts" Overwrite="true">
          <pnp:Properties>
            <pnp:Property Key="Title"  Value="Custom Default Item" />
            <pnp:Property Key="ContentTypeId" Value="{contenttypeid:Item Display Template}" />
            <pnp:Property Key="MasterPageDescription"  Value="Displays the Search Results default item in a custom way." />
            <pnp:Property Key="UIVersion"  Value="15" />
            <pnp:Property Key="TemplateHidden"  Value="0" />
            <pnp:Property Key="TargetControlType"  Value=";#Content Web Parts;#" />
            <pnp:Property Key="DisplayTemplateLevel"  Value="Item" />
            <pnp:Property Key="ManagedPropertyMapping"  Value="'Link URL'{Link URL}:'Path','Line 1'{Line 1}:'Title','Line 2'{Line 2}:'','FileExtension','SecondaryFileExtension'" />
          </pnp:Properties>
        </pnp:File>

I'm gonna do a Pull Request with a possible temporary solution to this, but IMHO the right way to fix it should be to allow a Level attribute in the pnp:File xml node.

I would also like the ability to provision my master laws and page layouts as Published and Approved.

*master pages

with latest PnP Schema, now is possible to set the Level of the File:
https://github.com/OfficeDev/PnP-Provisioning-Schema/blob/master/ProvisioningSchema-2016-05.md
so we can close this issue.
/cc @VesaJuvonen @PaoloPia

Hello,
The latest schema does indeed offer the attribute Level on File and Directory elements. But when i want to provision my masterpages to the MasterPage Gallery they do not get published to a 1.0 version.
Can anyone confirm if this is still an issue for them as well?

Same issue for me on SP 2013. Masterpages en page layouts remain un-published.

@bartdonninger , same here: a page layout with Level="Published" is still not published.


Passing access_tokens between client and server

Hi,
I have a client/server application (client is using angular, server is using nodejs). On the client side, I'm using the google picker to allow my users to select a spreadsheet in which I'm writing values. What I'd like to do is to send the user's credentials server-side and then keep these values in sync without further intervention of the user.
I've successfully passed the access_token retrieved on the client to the server, but now I need to find a way to get a refresh_token, so that the server can refresh the token regularly and keep the data in sync. Is there a possibility to:

either request a refresh_token directly from the client application (which I can then send to the server)
or, server-side, use the access_token passed by the client to get a refresh_token ?

Thank you for your help with this.

No, you need to use an authorization code for that step. The web server application will then combine the authorization code and either a client certificate or a client secret to prove its identity and fetch a refresh token. You will need to request the "offline" access_type and the "code" response_type. I believe this should work using auth2.grantOfflineAccess() or using gapi.auth2.authorize()

Yes, I came to the same conclusion and, after quite a bit of hair pulling, it now works :-) But thank you for your message !


[android] consistently failing test cases

The following lldb test cases started failing on the nightly build of 10/8/2024:
TestDataFormatterCaching.TestDataFormatterCaching.test_with_run_command_dwarf
TestDataFormatterCaching.TestDataFormatterCaching.test_with_run_command_dwo
TestDataFormatterSynthType.DataFormatterSynthTypeTestCase.test_with_run_command_dwarf
TestDataFormatterSynthType.DataFormatterSynthTypeTestCase.test_with_run_command_dwo
TestVectorTypesFormatting.VectorTypesFormattingTestCase.test_with_run_command_dwarf
TestVectorTypesFormatting.VectorTypesFormattingTestCase.test_with_run_command_dwo

They fail consistently.
There were no related changes merged that should have caused these to fail, so it may be due to a runner change.

Nightly run that hit these failures: https://github.com/compnerd/ds2/actions/runs/11248442326/

These tests do not fail for me locally when running from a Fedora 40 machine. Something must have changed on the test runner config that introduced the failures.


[SPARK-50051][PYTHON][FOLLOW-UP] Fix data type check for Numpy 1.x

What changes were proposed in this pull request?
Fix type check for Numpy 1.x: np.isdtype is not available in Numpy 1.x
Why are the changes needed?
In [13]: np.__version__
Out[13]: '1.26.4'

In [14]: a = np.str_("123")

In [15]: np.isdtype(a.dtype, np.str_)
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[15], line 1
----> 1 np.isdtype(a.dtype, np.str_)

File ~/.dev/venv/py_312/lib/python3.12/site-packages/numpy/__init__.py:333, in __getattr__(attr)
    330     "Removed in NumPy 1.25.0"
    331     raise RuntimeError("Tester was removed in NumPy 1.25.")
--> 333 raise AttributeError("module {!r} has no attribute "
    334                      "{!r}".format(__name__, attr))

AttributeError: module 'numpy' has no attribute 'isdtype'

In [16]: a.dtype.type == np.dtype("str")
Out[16]: True

Does this PR introduce any user-facing change?
no
How was this patch tested?
ci
Was this patch authored or co-authored using generative AI tooling?
no

Merged to master.


Context creation API selection at runtime

i just think that it will be better that moving GLFW_USE_EGL and relevant GLFW_CLIENT_LIBRARY switches
somethink like app compile macro or glfwinit()  parameter.
Do you think?
REGARDS

The compile-time client library options have been removed, as that is now handled at runtime. Selection between EGL and native APIs is up next.

Moving this to 3.3 as I will be putting out a 3.2 shortly to have a release out with Vulkan support. I'm still working towards this, as well as the larger goal of run-time window system selection.

This is being worked on in the context-api branch.


[augmentations] Write the spec

The spec may still be updated, but it is rather stable at this point: https://github.com/dart-lang/language/blob/main/working/augmentation-libraries/feature-specification.md.


Switch to Slime v0.15

Adds support for embedded engines and removes compiler warnings on Elixir 1.3.
Almost not worth a pull request as the change is absolutely tiny. Just discard it if you prefer a proper release from your side.

@tht I will be releasing a new version of Slime this evening, we can then update this PR get it merged.

@tht I'm going to make some changes and release a new version.


Merge dev/MAPL-2.0 branch into develop

In preparation for the MAPL 2.0 GCM, we need to pull into develop and then master for a tagged release.

Labeled non-zero-diff because MAPL 2.0 is non-zero-diff in general (because of ESMF regridding).


Stabilize Vf2++ matching order

This PR removes the unstable sort and the (unnecessary) use of a HashSet that would make the result of VF2++ heuristic matching order non-deterministic.

Pull Request Test Coverage Report for Build 990596717

6 of 6 (100.0%)  changed or added relevant lines in 1 file are covered.
2 unchanged lines in 1 file lost coverage.
Overall coverage decreased (-0.02%) to 97.546%

Files with Coverage Reduction
New Missed Lines
%

src/isomorphism.rs
2
97.51%

Totals

Change from base Build 972471342:
-0.02%

Covered Lines:
8388

Relevant Lines:
8599

💛  - Coveralls

In case this has performance consequence, on my side, I would be okey if this is optional.

Running this benchmark, i don't really see any significant difference:
import timeit
import random

import retworkx as rx

def permute(graph, seed=42):
    nodes = list(graph.node_indexes())

    rng = random.Random(seed)
    rng.shuffle(nodes)

    edges = [(nodes[u], nodes[v]) for (u, v) in graph.edge_list()]

    if isinstance(graph, rx.PyDiGraph):
        res = rx.PyDiGraph()
    else:
        res = rx.PyGraph()

    res.add_nodes_from(nodes)
    res.add_edges_from_no_data(edges)

    return res

def benchmark():
    n = 10000
    degrees = [10, 15, 50, 100]

    cases = []
    for deg in degrees:
        p = 2 * deg / (n - 1)

        g_a = rx.directed_gnp_random_graph(n, p, seed=42)
        g_b = permute(g_a, seed=4242)

        cases += [(g_a, g_a), (g_a, g_b)]

    return cases

def run(cases):
    for (g_a, g_b) in cases:
        res = rx.is_isomorphic(g_a, g_b,
                               id_order=False)
        assert res

cases = benchmark()
print(
    timeit.timeit("run(cases)", globals=globals(), number=5)
)

Branch
Run time (sec)

master
20.348561446

#375
20.359493619


Telegram handling

Idk how could we have missed that, but previously one could save a wrong Telegram value

Then shouldn't the same thing be done in the application dialog as well?

Oh, definitely.


add arrow-parens as-needed with requireForBlockBody

Ref: http://eslint.org/docs/rules/arrow-parens#as-needed
/*eslint arrow-parens: [2, "as-needed", { "requireForBlockBody": true }]*/
/*eslint-env es6*/

(a) => {};
(a) => {'\n'};
a => ({});
() => {};
a => a;
a.then((foo) => {});
a.then((foo) => { if (true) {}; });
a((foo) => { if (true) {}; });
(a, b, c) => a;
(a = 10) => a;
([a, b]) => a;
({a, b}) => a;

Compatible with --fix.
Adheres to what I believe we were after:

I think? the only rule we wanted here was: must have parens for multi-line lambda (that isn't to say that rule exists though)

But adds the rule that if a block body is included in the single line, it must too have parens (I'm OK with that!).
Related:
https://github.com/feross/standard/issues/414
https://github.com/feross/eslint-config-standard/pull/54
https://github.com/timoxley/standard-loader/issues/68
https://github.com/feross/standard/issues?utf8=✓&q=arrow-parens

ping @timoxley for thoughts

To be clear
`` js
(a) => console.log(a)

Does not appear to be acceptable... which means it isn't as I first thought.
Damn.

We literally just want "requireForBlockBody" and nothing else...

Again closed because of the number of conflicts I found with situations like this:
series([
  (next) => foo(next),
  (next) => {
    // ...
    next()
  },
], done)

Which suddenly become weird via:
series([
  next => foo(next),
  (next) => {
    // ...
    next()
  },
], done)

Agreed on weirdness.


Release Totals Retirement page 🌳

Description
This PR releases the totals retirement page for a beneficiary address on Production.
And links from the Single Retirement pages back to the totals page too.
Additionally, if the address does not exist => renders proper placeholder for empty states
E.g. https://klimadao-site-git-release-totals-klimadao.vercel.app/retirements/0x293ed38530005620e4b28600f196a97e1125daee
Related Ticket

Related to #402
Checklist

[x] Building the site with npm run build-site works without errors
[x] Building the app with npm run build-app works without errors
[x] I formatted JS and TS files with running npm run format-all

I only tested on mobile so far. I'll do more testing tonight.
The enumeration seems strange. I understand it's backwards because it matches the chronological order but I don't think it's visually pleasing to have it descending.

I only tested on mobile so far. I'll do more testing tonight.
The enumeration seems strange. I understand it's backwards because it matches the chronological order but I don't think it's visually pleasing to have it descending.

Noted, let's get more feedback on this-- I thought it would be useful because it maps to the URLs directly. I.e. your 3rd retirement is found under retirements/0xSh1m0n/3-- I remember Mark Cuban's 1k retirement as 2 haha.

@Atmosfearful @ladytrekker
It's beautiful. A few minor notes.

It looks a bit inconsistent from the design standpoint to see "No retirements found BCT", where the asset name is larger in font, and there is no "for", as in "no retirements found for BCT"

Edge looks terrible, but there's an issue for this already and I don't think we should hold this up for Edge.

My KNS domain is not recognized.

@Atmosfearful @ladytrekker
It's beautiful. A few minor notes.

It looks a bit inconsistent from the design standpoint to see "No retirements found BCT", where the asset name is larger in font, and there is no "for", as in "no retirements found for BCT"

Edge looks terrible, but there's an issue for this already and I don't think we should hold this up for Edge.

My KNS domain is not recognized.

Good point, can change this later in a follow up
Yes, rather collect all issues in a proper ticket with Browser Version, Screenshots and a list of all problems
If I get you right you are talking of this ticket here => https://github.com/KlimaDAO/klimadao/issues/364 which is not implemented yet for the Retirement pages


[Phcode.dev Bot] Publishing Release v1.0.1 to Extension Store

Thank you for contributing to phcode.dev extension store.
Please track extension/theme publish status by clicking this link.
You may close this issue at any time.

Extension successfully published to store. You can close this issue at any time.


Enhance Twinny with LiteLLM (and indirectly OpenRouter) Support

Feature Request: Integrate LiteLLM with the Twinny Visual Studio Code plugin to enrich AI code completion capabilities. This integration aims to leverage the wide variety of models and APIs available through LiteLLM, enhancing the plugin's functionality and user experience.
Current Issue: Attempting to use LiteLLM Proxy results in an APIConnectionError because of an unexpected 'prompt' keyword argument, indicating a misalignment between the expected input by LiteLLM and the request data sent from Twinny.
Solution: Modify Twinny to accommodate the input structure required by LiteLLM Proxy, specifically by addressing how the 'prompt' key is handled.
Objective: The primary goal is to augment Twinny’s AI code completion service by enabling efficient access to an expanded set of models.
Action: Request implementation of this compatibility feature and encourage contributions towards integrating LiteLLM (and indirectly OpenRouter) support into Twinny. This initiative could significantly amplify the plugin's utility and adoption.

Hey, thanks for the report.  I added another provider other and removed prompt from payload.  Please report back.
Many thanks,

it's closer
We appear to have another request formatting issue for follow up chat responses
12:58:53 - LiteLLM Router:INFO: router.py:472 - litellm.acompletion(model=openrouter/openai/gpt-3.5-turbo-0125) 200 OK
12:58:53 - LiteLLM Router:DEBUG: router.py:1144 - Async Response: <litellm.utils.CustomStreamWrapper object at 0x119e19150>
INFO:     <IP_ADDRESS>:51575 - "POST /chat/completions HTTP/1.1" 200 OK
12:58:53 - LiteLLM Proxy:DEBUG: proxy_server.py:2592 - inside generator
{'error': {'message': '{\n  "error": {\n    "message": "Additional properties are not allowed ('type' was unexpected) - 'messages.1'",\n    "type": "invalid_request_error",\n    "param": null,\n    "code": null\n  }\n}\n', 'code': 400}}
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/litellm/proxy/proxy_server.py", line 2595, in async_data_generator
async for chunk in response:
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/litellm/utils.py", line 9816, in anext
raise e
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/litellm/utils.py", line 9700, in anext
async for chunk in self.completion_stream:
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/openai/_streaming.py", line 117, in aiter
async for item in self._iterator:
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/openai/_streaming.py", line 138, in stream
raise APIError(
openai.APIError: An error occurred during streaming
the first chat response always works fine. This is just a problem with follow up chats.
to replicate:
litellm --port 12121 --detailed_debug --debug -c ./proxy_server_config.yaml
proxy_server_config.yaml
model_list:

model_name: gpt-3.5-turbo
litellm_params:
model: openrouter/openai/gpt-3.5-turbo-0125
api_base: https://openrouter.ai/api/v1
api_key: <your_openrouter_api_key>  # LiteLLM let's you use arbitrary api services. I just happen to use openrouter

litellm_settings:
drop_params: True
max_budget: 100
budget_duration: 30d
num_retries: 0
request_timeout: 600
telemetry: False
general_settings:
proxy_budget_rescheduler_min_time: 60
proxy_budget_rescheduler_max_time: 64
proxy_batch_write_at: 1
vscode twinny settings
"twinny.apiProvider": "other"
"twinny.chatApiPath": "/chat/completions"
"twinny.chatApiPort": 12121
"twinny.chatModelName": "gpt-3.5-turbo"
should we update Twinny: Chat Model Name "Model identifier for chat completions. Applicable only for Ollama and Oobabooga API." text?
Twinny: Fim Template Format - add "other" as an option. Actually I suggest using LiteLLM instead as that will guide users better
LiteLLM is a prompt structure translation layer for arbitrary api services using OpenAI prompting format, so in theory if Twinny can structure llm calls in Openai Format, it'll get all LiteLLM supported api's for free

Hey, thanks. Are you able to make a PR for it?

LiteLLM is now supported.


Complete Audit - Martin

Issue to track Martin's audit progress.

Here's the report: https://gist.github.com/holiman/8b107e78ef86601472b5bbacb27b1848


Update method moved to criteria controller

Hello everyone,
I moved the 'update' method to the 'criteria' controller, and added tests for it. I also changed the validations in the flexible and rubric models so that appropriate error messages are common for both types of criteria.
Regards,
Christian

@GitGeminiano I suppose you can update your other pull requests now!

@david-yz-liu Thank you. I will have a look at the last two pull requests.


Build documentation with jupyter-book version 0.15

Should fix (part of) the problem with long builds, which currently prevents from deploying on RTD due to timeouts.

📚 Documentation preview 📚: https://medkit--7.org.readthedocs.build/en/7/

Currently fails to build on RTD because of https://github.com/executablebooks/sphinx-book-theme/pull/770
Extension error (pydata_sphinx_theme):
Handler <function update_and_remove_templates at 0x7fc320f96f80> for event 'html-page-context' threw an exception (exception: toggle-primary-sidebar.html)

Merging despite the issue above. Still better than timing out on RTD.


1.36.x won't install on QNAP 4.5.2

I have a TS-453A running code <IP_ADDRESS>6 . This is quite old as when I last tried to upgrade to QNAP 5.x it bricked my NAS and I had to do a recovery boot and reload. I'm hesitant to upgrade as the NAS is rock solid right now. The latest version of tailscale fails on install with the warning QNAP code 5.x is needed. Is there any way around this. It's working just fine with 1.34.1...but keeping it up to date would be nice.

We tried, by purchasing a refurbished TS-231K which arrived with QTS 4.x. Without us ever telling it to do so, it updated itself to QTS5 overnight one night. QNAP is apparently pushing to get devices onto QTS5.
At this point I don't expect to be able to support QTS4. We do not have a way to develop for it nor test it.

I should hopefully be ok leaving it on 1.34.1 until tailscale breaks that functionality...hopefully not for a long time, otherwise I'll have to investigate alternatives. I will probably replace the NAS in the next yr so that would also solve the issue. Thx for the reply.


Eisenstein & Hu power spectrum without wiggles

Eisenstein & Hu 1997 also provide formulas for the linear transfer function without wiggles (Eqs. 30 and 31), which can be quite useful for BAO analyses. This PR adds this functionality.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

5 of 5 (100.0%)  changed or added relevant lines in 2 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.002%) to 96.811%

Totals

Change from base Build<PHONE_NUMBER>:
0.002%

Covered Lines:
4007

Relevant Lines:
4139

💛  - Coveralls


Update bower.json with "main" property

I am using main-bower-files which copies all bower's libraries main files to vendor folder. But only when there is a main property in bower.json. The value of this property should be the filename of main library file: jquery.bootpag.min.js.

"main": "lib/jquery.bootpag.min.js" to be precise.


ColorPicker out of screen

I can't seem to be able to keep it inside the screen like dropdown-menu-right would do.
See attached file

Same problem here. Sometimes I have to zoom out the sceen to 90% to be able to select the appropriate color.

hello in version 2.1 you have the new align option that solves this (though is not automatic yet) #65

Adding this in the options did the trick:
align: 'right'
Thank you!


Pulse command type hinting

Summary
Adds type hinting to the pulse commands module where missing.
Details and comments

🎉 yay for type hints

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Logic: Email

Current implementation is sends the details of the selected index person, to a fixed email address.
Still in development. #56

Coverage decreased (-2.5%) to 87.241% when pulling ce5cc5140dfcffde0075bd2cd03f28d8ae49c213 on hanselblack:Email into 5a8d4e1c7b0af493cfed5c38f6b79260a244ee8f on CS2103AUG2017-W11-B4:master.

Coverage decreased (-2.09%) to 87.917% when pulling 5190a4c1badb7fd2db6ea973d63caa3211cdc5be on hanselblack:Email into 2720e5144dc6e975226f696a3c033e201be70250 on CS2103AUG2017-W11-B4:master.


Application restarted after you grant permissions

Overview
Application restarted after you grant permissions.
Its not a crash app just restarted from main activity.
No any error in logs, just few strings about restarting:
2019-02-06 17:00:47.683 I/ActivityManager: Killing 20733:com.aaa.debug/u0a130 (adj 100): permission grant or revoke changed gids
2019-02-06 17:00:47.684 D/ActivityManager: cleanUpApplicationRecord -- 20733
2019-02-06 17:00:47.684 W/ActivityManager: Force removing ActivityRecord{d13e83b u0 com.aaa.debug/com.aaa.activity.CameraActivity t464}: app died, no saved state
Expected
app shouldn't restart
Actual
app restarted
Environment
library version = '3.1.0'
android 7.1.2
Reproducible steps
Fragment is open,
you request permissions, grant it and app restarted

@JustTrust

Can you reproduce the issue with our sample modules?
If it's happening only on your app can you provide minimum example that we can reproduce the issue?

We've never seen that so I wonder there're something weird in app code. Thx.

@JustTrust what kind of device are you using for test? Sorry I haven't been able to reproduce yet 🤔 And also can we possibly get the GIF which records how app behaves?

Device is vepoy

Oh weird..we've been testing with emulators and several physical devices but never seen that state before..🤔My next question is if you don't use the library you can deal with it?

I'll try to check it without library, but it needs more time

Any update? 👀

Yes, I copied generated code from dispatcher class in my fragment and got the same behaviour. Maybe its a device related issue, what do you think?

@JustTrust did you try plain android permissions requests with no libraries? They are pretty simple to implement especially for the test case of permission requesting and result basic handling.
https://developer.android.com/training/permissions/requesting
Feels like this issue will persist there.
What about other apps requesting runtime permissions by the way?

With location permissions everything is fine. I will try to make a test with pure android permissions request.

I suppose the cause is on devise side..let me close the issue for the time being and reopen if needed.
thank you for your contribution! appreciated.


List out features added to the original fork/project

Objective
The primary objective of this task is to compile a list documenting all features that have been added to the UIPA.org project since its original fork.
Related Items
Parent Epic: https://github.com/CodeWithAloha/uipa/issues/42

One feature that was added on top of the original fork was automatically filling out the Hawaii Request Access form: seen here.
This file is a .docx with certain template text in the file (ex: [Agency_Name]), this is replaced by what the user provides in a request and is then attached to the request.
Some questions:

Do we need to update this file?
Can this be done in a better way?

Do we need to update this file?

I don't think so. It's the official form (hasn't changed since being created) from OIP (Office of Information Practices, oip.hawaii.gov).

Can this be done in a better way?

Perhaps but it's good enough. I think the main problem is the way that providing the reason for requesting a waiver of the fees is currently implemented. See https://github.com/CodeWithAloha/uipa/issues/61. It's confusing and apparently prone to errors.


Feature request: Expose types of snippet globals for nicer development

When writing custom snippets, it would be really helpful to use type annotations for s, t, and other global snippet constructors for better editing support :)

Related #378 (but incomplete)

Oh yeah, for sure!
As far as I understand, this would basically be whatever is in DOC.md, but as emmylua-annotation, so lua-language-server can parse it?
If so, I'd say there is a choice to make:

either just copy+transform what is currently in DOC.md to the source-files (which could be done relatively quickly, but having to keep both in sync manually seems suboptimal, and mistakes could happen), or
create a proper build-step for extracting these definitions and inserting them into DOC.md (initial setup seems much harder, but this seems cleaner at least)

I'd honestly be fine with either option since I don't really anticipate many major additions to luasnip, so the additional long-time-work induced by the first option may not outweigh one-time work and complexity introduced by the second one (though the second one may be fun to figure out)
Unfortunately, I really don't use annotations at all though, so my motivation for doing either is pretty low :sweat_smile:

@L3MON4D3 that's fair. I think that if no major API changes are predicted, then option 1 is fine.
Any reason why #378 hasn't been merged? Despite being incomplete, it's still an improvement.

Only that it's marked as draft, and adding annotations for a small number of api-functions only seemed a bit weird.
But you're right, better that than nothing.
I'll look into getting it merged

Sounds good. I think that splitting the work into smaller PRs will be less overwhelming than documenting the entire API at once (I think no one has the motivation for that hehe).
I’m also happy to help with this btw!

Sounds good. I think that splitting the work into smaller PRs will be less overwhelming than documenting the entire API at once

Ah, yeah, probably also true :D

I’m also happy to help with this btw!

Yay, hoped for just that :P
Best wait until I'm done with #941 (shouldn't be long now), lots of changes to the files where api is defined in there

Hi, I am also interested in this. Since the other PR is merged. Is there anything else blocking this?


Fabric Node.js SDK application sample to demonstrate good practices

@jt-nti @denyeart - Now that V2.4 is out, would this be picked up and closed this Qtr? We had marked it for Q3.


feat: Use author-email metadata as fallback if author is None

I noticed that some packages (e.g. termcolor) do not declare an author (metadata field author) but the email address of the author (metadata field author-email). For this reason I think it is appropriate to use this value as a fallback value.
Current output:
Name       Version  License      Author
termcolor  2.2.0    MIT License  UNKNOWN

New output:
Name       Version  License      Author
termcolor  2.2.0    MIT License  Konstantin Lepa<EMAIL_ADDRESS>
Other examples for packages with defined author-email but no author

https://pypi.org/project/tomli/
https://pypi.org/project/tabulate/
https://pypi.org/project/uvicorn/

Build failure on python 3.8 seems unrelated
[2023-03-30T10:13:45.738Z] ['error'] There was an error running the uploader: Error uploading to [https://codecov.io:](https://codecov.io/) Error: There was an error fetching the storage URL during POST: 404 - {'detail': ErrorDetail(string='Unable to locate build via Github Actions API. Please upload with the Codecov repository upload token to resolve issue.', code='not_found')}

I too was concerned about the CI error, but it appears that it is now being reported in large numbers by the Codecov service.
@g3n35i5 There appears to be no problem with your fallback code. I will merge this patch and release the next version to PyPI.
Thanks!!

@g3n35i5 Thanks for your contribution.
The next release candidate version has been uploaded to PyPI.
https://pypi.org/project/pip-licenses/4.2.0rc1/
Install it in your environment and make sure it is working as expected.
pip install pip-licenses==4.2.0rc1

If you have code to fix, please send a PR to the release-4.2.0 branch.

Install it in your environment and make sure it is working as expected.

Works as expected :)


update const std::string& to const char*

This library overuses std::string type, making a temporary copy every time you pass a const char* into a const std::string& argument making unnecessary copies. It should support mainly const char*, or support both with an intermediate struct.

why would you be using char* anyway?

i would use const char* mainly because there's no need of overusing the creation of std::string each time you call raylib::Texture2D texture("space.png") for example, it will copy your const char* into a temporary std::string. Raylib sadly only accepts const char* and it would be really nice if raylib would accept std::string_view but raylib it's not a c++ library.

I kind of see the point, but if I work with normal strings, this makes it weird and misses the point of having a c++ wrapper. I rather suggest doing it the proper c++17 way and using string_view instead

That is a good point, then I would suggest this:
private:
const char* internal;
public:
s_string(const char *s) : internal(s) { }
s_string(std::string& s) : internal(s.c_str()) {}
}

yea, acceptable
class s_string {
const char* m_ptr;
public:
s_string(const char s) : m_ptr(s) { }
s_string(const std::string& s) : m_ptr(s.c_str()) {}
operator const char() { return m_ptr; }
};
We should ask @RobLoach

Making our own class wrapper seems excessive when both string and string_view already exist?

@RobLoach you can't use string_view for raylib, because you can't specify to raylib the size of the actual string, because it's not even null terminated, and string would be a waste of performance copying const char* contents every time you need to call any function with const std::string&.

Thanks for the clarification. After some thought on this, I think it may be better to overload the methods. Then if you pass in a const char*, it just calls DrawText directly without any new object at all or casting or anything.
void DrawText(const char* text, int posX = 0, int posY = 0, int fontSize = 10.0f) const {
    ::DrawText(text, posX, posY, fontSize, *this);
}

void DrawText(const std::string& text, int posX = 0, int posY = 0, int fontSize = 10.0f) const {
    ::DrawText(text.c_str(), posX, posY, fontSize, *this);
}

Added a few of the overloads, but let me know if there are any others that you think would benefit from it.


Bug in imports from benchmark

The samplers benchmark seems to have some bugs in the imports. Specifically lines 18 and 19:
from harlow.sampling.probabilistic_sampling import probabilistic_sampler
from harlow.sampling.random_sampling import latin_hypercube_sampler

should be
from harlow.sampling.probabilistic_sampling import ProbabilisticSampler
from harlow.sampling.random_sampling import LatinHypercube

I had an additional problem with the import in line 22, with error "Cannot import test.integration_tests.test_functions. No module named tests.integration_tests.test_functions".
from tests.integration_tests.test_functions import hartmann, peaks_2d, stybtang

It can be my own python paths setup, but I solved it adding before the imports
import inspect

currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(os.path.dirname(currentdir))
sys.path.insert(0, parentdir)

Also, I would delete line 26, it is redundant with line 25.
stop_thresh = 0.01  # For RMSE or 0.005 - 0.0025
stop_thresh = None

Hi Daniel,
Thank you for the detailed issue! The import bugs should be fixed by PR #13. I should also mention that it is no longer necessary to specify the full "path" to the sampling and surrogating functions in your imports. Instead all surrogates and samplers can be imported from harlow.surrogating and harlow.sampling respectively. As an example:
from harlow.sampling.probabilistic_sampling import ProbabilisticSampler

can be replaced with:
from harlow.sampling import ProbabilisticSampler

Regarding your second point (import in line 22), I could not recreate the issue.  This should be fixed by #14.

Closing the issue after merging #14. Please re-open if you continue getting the No module named tests.integration_tests.test_functions error.


Possible synchronizationQueue mis-configuration?

[x] I've read, understood, and done my best to follow the *CONTRIBUTING guidelines.

What did you do?
Called AutoPurgingImageCache.image(withIdentifier: ...) from multiple threads.
What did you expect to happen?
The result to be returned without any threading issues, as the method internally uses a thread-safe synchronisation queue.
What happened instead?
A thread race condition was detected by the Xcode thread sanitiser.
Alamofire Environment
Alamofire version: 4.7.3 / AlamofireImage version: 3.4.1
Xcode version: 10.0
Swift version: 4.2
Platform(s) running AlamofireImage: iOS
macOS version running Xcode: Mojave
I think there may be a small but important misconfiguration of the syncrhonizationQueue in the file ImageCache.swift.
That queue, in this specific instance, is initialised as a concurrent queue - which on the surface seems to make it pointless, since it won't actually synchronise anything if it is concurrent. This is the code I'm referring to:
self.synchronizationQueue = {
  let name = String(format: "org.alamofire.autopurgingimagecache-%08x%08x", arc4random(), arc4random())
  return DispatchQueue(label: name, attributes: .concurrent)
}()

In contrast the synchronizationQueue in ImageDownloader.swift seems to be correctly initialised as a serial queue, and hence will order requests to the shared resource atomically:
private let synchronizationQueue: DispatchQueue = {
  let name = String(format: "org.alamofire.imagedownloader.synchronizationqueue-%08x%08x", arc4random(), arc4random())
  return DispatchQueue(label: name) // <-- no "concurrent" attribute
}()

Please accept my apologies and feel free to close the issue in case I have misunderstood the purpose of that dispatch queue, but I thought I'd rather mention it and be wrong, than not mention it at all :)

Hi @jshier and thanks for getting back to me. Please find attached a screenshot of the sanitiser as well as the output from the console, slightly redacting our internal stack calls, but I hope the info you need should all still be there.
In order to reproduce the issue I basically have to shift the calls to image(withIdentifier: ...) for the shared cache object inside a background thread and then it's a question of time until the threads "cross paths", which implies the synchronisation isn't quite working the way its expected. Basically if you create a shared AutoPurgingImageCache and throw calls at it from different threads, this is what will happen.
As a workaround I'm firing these off from the main thread right now, and as such they seem to arrive "in order", even inside the synchronisation queue, and not trigger the problem.
Happy to provide any more info you may need!

Here is the console output:
sanitiser-output.txt

If we want to keep possibility to read images from multiple threads and do it in parallel (single writer - multiple readers pattern) we should use synchronizationQueue.sync(flags: [.barrier]) {} basically everywhere we update inner data (all cases except image(withIdentifier:) method).

This issue was correct and has been fixed in 3.6.0 and 4.0.0-beta.6.


Ordering of items in command palette is not as expected

Somewhat of a more minor UX issue, but ...

VSCode Version: 1.9.0
OS Version: macOS 12.10.3

Steps to Reproduce:

Cmd+Shift+P
Type 'Install'

Expected result: Offers to install extensions
Actual result: First hit is 'Disable all installed extensions', the exact opposite

Lets mark this as duplicate of https://github.com/Microsoft/vscode/issues/14727


Fix some warnings.

@cuigm85 Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.

@cuigm85 Thank you for signing the Contributor License Agreement!


fix(uiSrefActive): optionally match child states

This issue provides support for optionally counting a link as active if any of
its child states are active and parameters match.
Closes #818

@caitp  Please provide working example

http://plnkr.co/edit/V67mToDSN0SbzaGJTHw2?p=preview
Here is working Example


Hosting provider - what if I can only ftp ?

Hello
I'm going to test your super work!
Reading the docs looks like you must have access to the apache config, am I wrong?
Do you have some doc for situations like mine?  I can only upload/edit an .htaccess file.
Will minify work the same? I can't ask my provider to alter his server config.
Also, will minify result as the right solution for google pagespeed insight complains?
Thank you
Robert

Just run the composer install locally and upload min/ including the
vendor directory. It includes an .htaccess file so no Apache config
required.
Minify can modestly help performance, but "right solution"? That's a big
topic!
Steve
On 2/22/16 1:33 AM, Corsari wrote:

Hello
I'm going to test your super work!
Reading the ocs looks like you must have access to the apache config,
am I wrong?
Do you have some doc for situations like mine? I can only upload/edit
an .htaccess file.
Will minify work the same? I can't ask my provider to alter his server
config.
Also, will minify result as the right solution for google pagespeed
insight complains?

Sorry for this delayed reply
thank you so much for replying
I'll do my tests and hopefully update you
Though the so called above the fold content should be "inlined" which requires to insert the CSS part concerning that content in the head part without link to external css and the same for js (looks like)

The quicktest.js return this
You must set up the project dependencies, run the following commands: curl -sS https://getcomposer.org/installer | php php composer.phar install
I'm developing on a windows installation of xampp
I've installed composer for windows and run composer install in the /min directory I have in the windows /htdocs directory
It has downloaded a lot of dependencies, so I don't understand the message.
Though I have no clue of how to run this command in windows
curl -sS https://getcomposer.org/installer | php php composer.phar install
and "where" to run it
can you help?

I've installed curl for windows
running the requested command from inside the min directory it returns this
D:\xampp\htdocs\min>C:\"Program Files"\cURL\bin\curl -sS https://getcomposer.org/installer | php php composer.phar install
Could not open input file: php
curl: (23) Failed writing body (0 != 16133)

composer install creates a vendor directory. Upload that with the other code.

Sorry I'm really lost
is there a way to use this without composer with just one download and unzip?
Next obviously I'll follow the documentation

About composer install, I have done it, but the test you suggest gives the above error

I went on
I've uploaded the /min directory (which after composer has its subdirectory called vendor with so many sub dirs) to my hosting provider
I've tried to run http://www.MyURLname/initia/min/?f=min/quick-test.js
I get a different error now
Parse error: syntax error, unexpected T_FUNCTION in /web/htdocs/www.MyURLname/home/initia/min/index.php on line 33
can you hint about the problem?
thank you

I have noticed that if I run the program /min/server-info.php I get the same error in line n.65

The 2.2 version runs on PHP 5.2 but I'm not providing support for it. Please ask for help on the mailing list: https://groups.google.com/forum/#!forum/minify


Add Renovate

Description
This ports the Dependabot configuration to Renovate. In particular, it only sets Renovate to update github-actions. A preview of expected PRs is below and in https://github.com/pdelre/kdave/pull/1

Resolves #13
Closes #11
Type of Change

[ ] Bug Fix
[ ] New Feature
[ ] Breaking Change
[ ] Refactor
[ ] Documentation
[x] Other (please describe)

Project Maintenance Improvement

Checklist

[x] I have read the contributing guidelines
[x] Existing issues have been referenced (where applicable)
[x] I have verified this change is not present in other open pull requests
[x] Functionality is documented
[x] All code style checks pass
[x] New code contribution is covered by automated tests
[x] All new and existing tests pass

Definitely resolves the Dependabot -> Renovate switch of existing functionality, but doesn't actually track/help manage the dependencies of the software itself.
Happy to have that be part of this PR, or we should create a new issue to make sure we add that functionality as a fast follow.

Ditto with adding renovate config linting workflow so that we don't have a broken config, or break it in the future:
Example: https://github.com/wayfair-incubator/forker/blob/main/.github/workflows/build.yml#L21

Definitely resolves the Dependabot -> Renovate switch of existing functionality, but doesn't actually track/help manage the dependencies of the software itself.

I've reached out to the maintainers which are currently on holiday.

Ditto with adding renovate config linting workflow

Added


NTR: irregular

Term: irregular
Definition:
Source: Prevedello, J.A., Almeida‐Gomes, M. and Lindenmayer, D.B., 2018. The importance of scattered trees for biodiversity conservation: A global meta‐analysis. Journal of Applied Ecology, 55(1), pp.205-214.
Parent: AGRO:00000516
Related: AGRO:00000584, trees and crops, trees on crop land , dispersed (trees in fields/on range), irregular ,
ORCID: https://orcid.org/0000-0003-3985-4911

Parent term 'scattered tree' was created in #156, but the 'regular' and 'irregular' weren't found in research


[PRODSEC-1433] Schedule fix_loop_duplicates

Needs https://github.com/DefectDojo/django-DefectDojo/pull/4179 to be effective before merging.

Upstream merged.


Unable to setup bundle, json is ignored

1. Which version of kreait/firebase-php and kreait/firebase-bundle are you using?
"kreait/firebase-bundle": "1.0"
kreait/firebase-php ^4.0
2. Which version of PHP are you using?
7.1.9
3. What's the issue? and 4. Code that lead to the issue
I setup the bundle as show in the readme
my config.yml is
kreait_firebase:
    projects:
        first:
            public: true
            # Optional: If set to true, this project is used when
            # using Kreait\Firebase as a type hint for dependency injection
            #default: true
            credentials: '%kernel.root_dir%/config/model-firebase-adminsdk.json'
            database_uri: 'https://model.firebaseio.com/'
            alias: 'firebase'

The php I created more or less as done in the app:fcm:send-message example ( https://github.com/jeromegamez/firebase-php-examples )
            $messaging = $this->container->get('firebase')->getMessaging();

            $message = $message->setTitle($message->getTitle())->setBody($message->getBody());

            $responseData = $messaging->send($message);

But despite having indicated the path to the json in the config.yml, I'm receiving this error
Kreait\Firebase\ServiceAccount\Discovery\FromEnvironmentVariable: The environment variable "FIREBASE_CREDENTIALS" is not set.
Kreait\Firebase\ServiceAccount\Discovery\FromEnvironmentVariable: The environment variable "GOOGLE_APPLICATION_CREDENTIALS" is not set.
Kreait\Firebase\ServiceAccount\Discovery\FromGoogleWellKnownFile: The well known file is not readable or invalid

also, the doc, say that I could set default: true, but decommenting this line result in
InvalidConfigurationException

Unrecognized option "default" under "kreait_firebase.projects.first"

Unfortunately, I am not able to reproduce the issue, I tried it by performing the following steps:
$ composer create-project symfony/skeleton fb-bundle-test
$ cd fb-bundle-test
$ composer require kreait/firebase-bundle
$ cp /path/to/my/credentials.json config/service_account_credentials.json

# config/packages/firebase.yaml
kreait_firebase:
    projects:
        first:
            default: true
            credentials: '%kernel.project_dir%/config/service_account_credentials.json'
            alias: 'firebase'

# src/Command/AppTestCommand.php
<?php

namespace App\Command;

use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class AppTestCommand extends ContainerAwareCommand
{
    protected static $defaultName = 'app:test';

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $firebase = $this->getContainer()->get('firebase');

        echo json_encode($firebase->getDatabase()->getRules(), true);
    }
}

bin/console app:test then returned the database rules of my projects.

You are specifying that you're using "1.0" as a constraint for the bundle - I recommend using "^1.0" as a version constraint, this ensures that you are always on the stable release for that main version (the current release is 1.1.1). composer show | grep kreait/firebase will show you the currently installed versions of the kreait/firebase-* packages, it should look like this

If your results don't match, you could force newer versions by writing "kreait/firebase-bundle": "^1.1.1" in your composer.json

I'm writing all this because of your notice about the dysfunctional default config option - this should definitely be working.

When the Firebase PHP SDK doesn't find a credentials file at the specified location, it will try to find one by inspecting environment variables and some default locations (this is needed in Google Cloud Engine (GCE) environments. That it even tried that is an indication that it can't find or read the credentials at the location '%kernel.root_dir%/config/model-firebase-adminsdk.json'

I am sure you already have checked the release versions and the credentials location, but could you check again? When I tried to reproduce the issue, I wall in the trap of copying the credentials with dashes - but using underscores _ in the yaml file :D

well, I updated the composer json, and it looks to be working now (both, the default option and locating the json). my bad
But its not fully working yet and I would like to ask 2 more questions

your test return a error, I think it is because I have not created a database in the firebase (and other commands as $firebase->getAuth()->getApiClient()->downloadAccount() return stuff), could you confirm for me?

In JSON.php line 58:

  [Kreait\Firebase\Exception\InvalidArgumentException]
  json_decode error: Syntax error

Exception trace:
 Kreait\Firebase\Util\JSON::decode() at C:\Users\Aptor02\Documents\Projetos\Sistemas\asktospekaer\vendor\kreait\firebase-php\src\Firebase\Database\ApiClient.php:28
 Kreait\Firebase\Database\ApiClient->get() at C:\Users\Aptor02\Documents\Projetos\Sistemas\asktospekaer\vendor\kreait\firebase-php\src\Firebase\Database.php:105

2. About my code, I'm trying to do
$messaging = $this->container->get('firebase')->getMessaging();

            $msg = array(
                'condition' => "App == 'br.com.aptor.model'",
                'notification' => array(
                    'title' => 'titulo',
                    'body' => 'corpo',
                )
            );

            $responseData = $messaging->send($msg);

but receiving error
Kreait\Firebase\Exception\Messaging\InvalidMessage:
Client error: `POST https://fcm.googleapis.com/v1/projects/aptor-model/messages:send` resulted in a `400 Bad Request` response:
{
  "error": {
    "code": 400,
    "message": "Request contains an invalid argument.",
    "status": "INVALID_ARGUMENT" (truncated...)

  at vendor\kreait\firebase-php\src\Firebase\Exception\MessagingException.php:76
  at Kreait\Firebase\Exception\MessagingException->withResponse(object(Response))
     (vendor\kreait\firebase-php\src\Firebase\Exception\MessagingException.php:51)
  at Kreait\Firebase\Exception\MessagingException::fromRequestException(object(ClientException))
     (vendor\kreait\firebase-php\src\Firebase\Messaging\ApiClient.php:54)
  at Kreait\Firebase\Messaging\ApiClient->request('POST', 'messages:send', array('json' => array('message' => array('condition' => object(Condition), 'notification' => object(Notification)))))
     (vendor\kreait\firebase-php\src\Firebase\Messaging\ApiClient.php:26)

Any idea about what could be the invalid argument or how to discover it?

Your stack trace shows that the exception is thrown in Firebase\Database\ApiClient.php - so the exception is not triggered by $firebase->getAuth()->getApiClient()->downloadAccount(), but probably by the $firebase->getDatabase()->getRules() command.
I cannot confirm that the error is thrown - I tried reproducing this be deleting the database rules in the Firebase Web console, by deactivating the Database and by emptying my test database - with no success.

I will try to make the errors more descriptive in a future release. In your case, the error is that only topics are supported in the condition field (see https://firebase.google.com/docs/cloud-messaging/http-server-ref#downstream-http-messages-json), that means you can't use App as a condition.
You can check if you message is valid as described in https://firebase-php.readthedocs.io/en/latest/cloud-messaging.html#validating-messages with
try {
    $firebase->getMessaging()->validate($msg);
} catch (InvalidMessage $e) {
    print_r($e->errors());
}

In the Firebase PHP SDK, you can specify custom Guzzle Middlewares that can be used e.g. to debug HTTP Requests to the Firebase APIs - this is not yet implemented in the Bundle, but I will look to add this in one of the next releases.


Creating Conductor Deployments and Services For Kubernetes

I am currently evaluating Conductor as an orchestration framework, and am attempting to get all four containers (elasticsearch, dynomite, conductor-ui and conductor-server) to spin up successfully in Kubernetes.  Is there a set of yaml files that exist that would provide the same functionality as the docker-compose.yaml file?
I've tried creating my own yaml files to apply to kubernetes, and they all seem to be running, but I can't get them communicating with each other (for instance, the ui clearly shows that there's no underlying data source).  Any help would be greatly appreciated.  Thanks!

It sounds like it's not the yaml files you need help with then? It sounds like you don't have the correct configuration settings in your config.properties that got built into your conductor server image?

@demichej It's possible.  Maybe a better way to frame the question: is there a best practice that should be used for getting conductor, in its entirety, up and running in the cloud (whether it be AWS or Kubernetes)?  Am I going about it the wrong way, and docker-compose is really the correct way to do it?

I am not aware of a best practice @mysteva. We have decided to use Kubernetes to deploy our Conductor services + our workers.
We created our own yaml files for the Conductor services and we build it up with docker-compose and deploy manually.
I'm not sure if others would find it useful having some kind of "template" or something for their yaml files. Seems like a reasonable idea, but I dont think anything like that exists right now.

@demichej Thanks for your response.  Going forward, I do think that would be very valuable to include.  Is there a way to make that request officially?

You could take a stab at putting a PR together :)
I'm not sure of the best way to label this as an enhancement though. That's another option. I dont think i have the permissions to do that though.

Ok, thanks.  I don't suppose you'd by chance have your generic yaml files that you used, would you?

@demichej Thanks for the suggestion. I have labeled this discussion as an enhancement. Please consider sharing your yaml files and Kubernetes deployment guide to benefit the community. This would be a great addition to the project.

Hi, just wanted to check in to see if there were any sort of "stock" yaml files that we can use for testing via Kubernetes.  Thanks!

Hi @mysteva I'm still here :) I'm sorry I haven't had time to do that, but I will try and get this in a PR this week. Note though, we're using straight Redis (no dynomite), so I'm not sure if that will 100% solve your use case or not.

Hello folks, any news about this ticket, conductor and kubernetes support ?

@demichej Checking in to see if you would be able to pick this back up soon? Thanks.

@apanicker-nflx Yeah it is on our list still, but has been pushed further down :(
Also, do y'all have plans to push a Docker image (maybe to the Netflix OSS Hub)? We are able to override all configuration from environment variables, so if an image was made available in the public domain, it would be pretty nice/easy to use.
Thanks.

Hello guys, i'm doing exactly the same, it would be grate if one of you sharing your yaml files and Kubernetes deployment guide, any news about this? thank you in advance

Hello guys, i'm doing exactly the same, it would be grate if one of you sharing your yaml files and Kubernetes deployment guide, any news about this? thank you in advance

Elasticsearch
apiVersion: apps/v1
kind: Deployment
metadata:
  name: elasticsearch
  namespace: conductor
  labels:
    app: elasticsearch
spec:
  selector:
    matchLabels:
      app: elasticsearch
  replicas: 1
  template:
    metadata:
      labels:
        app: elasticsearch
    spec:
      containers:
        - name: elasticsearch
          image: elasticsearch:6.8.15
          env:
            - name: "ES_JAVA_OPTS"
              value: "-Xms512m -Xmx1024m"
            - name: transport.host
              value: "<IP_ADDRESS>"
            - name: discovery.type
              value: "single-node"
            - name: xpack.security.enabled
              value: "false"
          ports:
            - containerPort: 9200
              name: http
            - containerPort: 9300
              name: custom
      restartPolicy: Always
---
apiVersion: v1
kind: Service
metadata:
  name: elasticsearch
  namespace: conductor
spec:
  selector:
    app: elasticsearch
  type: ClusterIP
  ports:
    - name: http
      protocol: TCP
      port: 9200

Postgres
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: conductor-db
  namespace: conductor
spec:
  selector:
    matchLabels:
      app: conductor-db
  serviceName: "conductor-db"
  replicas: 1
  template:
    metadata:
      labels:
        app: conductor-db
    spec:
      containers:
        - name: conductor-db
          image: postgres:11
          ports:
            - containerPort: 5432
              name: db
          env:
            - name: POSTGRES_USER
              value: conductor
            - name: POSTGRES_PASSWORD
              value: conductor
            - name: POSTGRES_DB
              value: conductor
            - name: PGDATA
              value: /data/pgdata
          volumeMounts:
            - name: data
              mountPath: /data
  volumeClaimTemplates:
    - metadata:
        name: data
      spec:
        accessModes: ["ReadWriteOnce"]
        storageClassName: "gp2"
        resources:
          requests:
            storage: 5Gi
---
apiVersion: v1
kind: Service
metadata:
  name: conductor-db
  namespace: conductor
spec:
  selector:
    app: conductor-db
  type: ClusterIP
  ports:
    - name: conductor-db
      protocol: TCP
      port: 5432

Conductor server
apiVersion: apps/v1
kind: Deployment
metadata:
  name: conductor-server
  namespace: conductor
  labels:
    app: conductor-server
spec:
  selector:
    matchLabels:
      app: conductor-server
  replicas: 1
  template:
    metadata:
      labels:
        app: conductor-server
    spec:
      containers:
        - name: conductor-server
          image: conductor-server
          resources:
            requests:
              cpu: 2
              memory: 4Gi
            limits:
              cpu: 2
              memory: 4Gi
          command:
            - /bin/bash
          args:
            - /app/bootstrap.sh
          env:
            - name: CONFIG_PROP
              value: "config-postgres.properties"
          ports:
            - containerPort: 8080
              name: http
          volumeMounts:
            - name: db-config
              mountPath: /app/config/config-postgres.properties
              subPath: config-postgres.properties
            - name: bootstrap
              mountPath: /app/bootstrap.sh
              subPath: bootstrap.sh
      volumes:
        - name: db-config
          configMap:
            name: server-db-config
        - name: bootstrap
          configMap:
            name: server-bootstrap
      restartPolicy: Always
---
kind: ConfigMap
apiVersion: v1
metadata:
  name: server-db-config
  namespace: conductor
data:
  config-postgres.properties: |
    # Servers.
    conductor.grpc-server.enabled=false

    # Database persistence type.
    conductor.db.type=postgres

    spring.datasource.url=jdbc:postgresql://conductor-db.conductor.svc.cluster.local:5432/conductor
    spring.datasource.username=conductor
    spring.datasource.password=conductor

    # Hikari pool sizes are -1 by default and prevent startup
    spring.datasource.hikari.maximum-pool-size=10
    spring.datasource.hikari.minimum-idle=2

    # Elastic search instance indexing is enabled.
    conductor.indexing.enabled=true

    # Transport address to elasticsearch
    conductor.elasticsearch.url=http://elasticsearch.conductor.svc.cluster.local:9200

    # Name of the elasticsearch cluster
    conductor.elasticsearch.indexName=conductor

    conductor.elasticsearch.clusterHealthColor=yellow

    # Load sample kitchen sink workflow
    # loadSample=true
---
kind: ConfigMap
apiVersion: v1
metadata:
  name: server-bootstrap
  namespace: conductor
data:
  bootstrap.sh: |
    #!/bin/bash
    mkdir -p /app/logs
    touch /app/logs/server.log
    /app/startup.sh & tail -f /app/logs/server.log
---
apiVersion: v1
kind: Service
metadata:
  name: conductor-server
  namespace: conductor
spec:
  selector:
    app: conductor-server
  type: ClusterIP
  ports:
    - name: http
      protocol: TCP
      port: 8080

Conductor UI
apiVersion: apps/v1
kind: Deployment
metadata:
  name: conductor-ui
  namespace: conductor
  labels:
    app: conductor-ui
spec:
  selector:
    matchLabels:
      app: conductor-ui
  replicas: 1
  template:
    metadata:
      labels:
        app: conductor-ui
    spec:
      containers:
        - name: conductor-ui
          image: conductor-ui
          env:
            - name: WF_SERVER
              value: "http://conductor-server.conductor.svc.cluster.local:8080/api/"
          ports:
            - containerPort: 5000
              name: conductor-ui
      restartPolicy: Always
---
apiVersion: v1
kind: Service
metadata:
  name: conductor-ui
spec:
  ports:
    - port: 80
      targetPort: 5000
      protocol: TCP
  type: NodePort
  selector:
    app: conductor-ui
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  namespace: conductor
  name: conductor-web-ui-ingress
  annotations:
    kubernetes.io/ingress.class: alb
    alb.ingress.kubernetes.io/scheme: internet-facing
    alb.ingress.kubernetes.io/target-type: instance
spec:
  rules:
    - http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: conductor-ui
                port:
                  number: 80

I've deployed Conductor on AWS EKS.

@jasondavindev Awesome, thanks for sharing. Do you mind putting this somewhere with instructions and sending us a PR linking to related section: https://github.com/Netflix/conductor/blob/main/RELATED.md. I believe this would help someone in the community as a reference.

I would add a +1 to have ready to go images available

Hi folks,
I've published Conductor images to Docker Hub:

https://hub.docker.com/r/kiennt26/netflix-conductor-ui
https://hub.docker.com/r/kiennt26/netflix-conductor-server
https://hub.docker.com/r/kiennt26/netflix-conductor-aio

Build script and sample compose files are available here:
https://github.com/ntk148v/dockerfiles/tree/master/conductor

Hi , really useful on the k8s yaml thanks - however I'm having issues with the Postgres implementation (discussed in many threads here).
In a nut shell when running docker compose on compose and Postgres yaml files the server gets many bean errors including metadatadao.(this on both local docker and kuber deployment)
One fix suggested advises setting a runtimeonly property in server build gradle but no matter which version of the maven Postgres I specify I still get the errors.
Can anyone advice what is the correct way to set up with Postgres ? Or is it time to switch to dynomite as it doesn't seem to support Postgres unless I'm missing obvious docs ?
I've spent a long time on this any help appreciated it seems like the question has never been answered fully . I can't really just use images ready made for work reasons.
Thanks in advance

Great work on the k8s yaml thanks , can I ask if you encountered errors with beans (metadata dao for eg) and loading context in the server?
It's a well versed issue in here with one fix suggesting adding run time only Postgres version into server gradle but it doesn't seem to work no matter which version I specify!
I get these errors on local docker and k8s when running with compose and postgres yaml command as specified in docs.
Thanks


cleanup configmap watcher references

Removing labels referencing the configmap watcher. Is there anything else that needs to be removed? There are several references to the configmap watcher still that could be non-functional but if that's the case we may as well clean them up.

I will need to look into these test failures. The last commit removed all of the deployment references to the configmap watcher so it's likely these tests are still looking for configmap watcher to still be there.

I don't think we can modify the CRDs. Even though configmap watcher itself is removed, we can't really remove anything from the CRD


Your hashtable is worse than my hashtable

Nazdar. Tvoja hash tabulka je horsia nez moja.
https://github.com/go-li/demo/blob/master/hashtable1.go
reasons:
My hashtable is faster than yours
My hashtable is faster than go builtin map
My table can be compiled using the generics supporting gccgo I've developed
My hashtable is a double slice map supporting any combination of []keys and []values slice
Experts can also use my table in single slice mode too, that is only []key slice, containing values in their own key struct
Users can write their own hash function, doing this right results in same or better performance than builtin map
It provides a full features including insertion , deletion, fetch, and a vacuum operation
Vacuum operation is faster than creating a new map and moving all elements to it.

I can't find any benchmarks in the linked repository. How did you get the values?

On a second look at the linked code, I noticed it's actually not valid Go code. Contributions are welcome, but I'm going to close the issue for now.


Improve handling of clone DataVolumes without source PVC

What this PR does / why we need it:
For consistency with other k8s objects, we allow creating clone DataVolumes even when the source PVC doesn't exist. This means that a VirtualMachine can be successfully created with volumes that may remain unpopulated until the source PVC is created.
This PR improves the handling of this case, so we check if the source PVC exists and, if not, we trigger an event to let users know.
Which issue(s) this PR fixes:
Fixes # https://bugzilla.redhat.com/show_bug.cgi?id=2145223
Release note:

NONE

/test pull-kubevirt-e2e-k8s-1.24-sig-storage

/retest-required

/approve

/cherrypick release-0.59


Nextcloud with disk and gateway

This PR updates the Nextcloud solution to use a disk (for improved performance, especially with Docker) and also to support gateways.

Hello @scottyeager :)
Good job :), I've tried to deploy an instance of NextCloud multiple times and I got this error.

Good job :), I've tried to deploy an instance of NextCloud multiple times and I got this error.

I can see that the name starts with NaN which means something undefined is used in the name and the name contract is rejected as it contains uppercase letters

I've reverted the suggestion that creates the error. @Mahmoud-Emad you can try testing again now :)
@MohamedElmdary, it looks like we need to wait for your PR with the gateway updates to be merged before changing the project name here.


don't submit form when submitevent get defaultPrevented

Fix #400
Objective
The pull request aim to not run action when someone call preventDefault on the submitevent.
Remarks

I didn't run prettier and there is a ts error when I build the project that was already there.
I'm not sure where to abort the handleFormSubmit function I choose to abort as soon as possible but maybe there are better place performance wise

Thanks


How to do one hot encoding?

Data: Suppose I have 10 folders with 10 images (total 10*10=100) images
Question : what will be the one hot encoding of the 9th class and 7th image?
Question 2: Can there be only 10 digit one hot encoding eg (img1.jpg 0 0 0 0 0 0 0 0 0 1)?
Ps when i tried with only single input as (img1.jpg 1) it gives me the below error
[cloudera@quickstart src]$ python train.py --gpu_id 0 --dataset coco --prefix resnet50_hashnet --hash_bit 48 --net ResNet50 --lr 0.0003 --class_num .1
{'class_num': 0.1, 'l_threshold': 15.0, 'q_weight': 0, 'sigmoid_param': 0.20833333333333334, 'l_weight': 1.0}
Traceback (most recent call last):
File "train.py", line 278, in
train(config)
File "train.py", line 145, in train
transform=prep_dict["train_set1"])
File "/home/cloudera/Capstone/HashNet-master/pytorch/src/data_list.py", line 71, in init
imgs = make_dataset(image_list, labels)
File "/home/cloudera/Capstone/HashNet-master/pytorch/src/data_list.py", line 18, in make_dataset
images = [(val.split()[0], np.array([int(la) for la in val.split()[1:]])) for val in image_list]
ValueError: invalid literal for int() with base 10: 'Caves/1._maxresdefault.jpg'

img1.jpg 0 0 0 0 0 0 0 0 0 1 is OK if you have ten classes. img1.jpg 1 cannot be possible since you cannot have only one class in your dataset anyway.


Fix Ignore Patterns. Add .git to Ruby workflow.

Ok, so this is really weird. I have been using the lambic/lambda containers to run sam build inside it vs using sam build --use-container from outside. I am using the Ruby 2.5 workflow with my open source Lamby (https://github.com/customink/lamby) project.
So... I found out when doing my sam builds in a container that I ran into a recursive .aws-sam/build/RailsFunction/.aws-sam/build/RailsFunction/... issue. After a TON of digging I found that ignored_names here https://github.com/awslabs/aws-lambda-builders/blob/develop/aws_lambda_builders/utils.py#L45 was an empty set even tho I could print the source and names and see an .aws-sam directory there.
source
/var/task

names
['Dockerfile-build', 'template.yaml', '.DS_Store', 'app', '.ruby-version', 'test', 'bin', 'config', 'Dockerfile', 'config.ru', 'node_modules', '.bundle', 'app.rb', '.env.test', 'README.md', 'Rakefile', 'public', '.gitignore', 'package.json', '.env', '.github', 'lib', 'Gemfile', 'log', 'Gemfile.lock', 'docker-compose.yml', '.git', '.aws-sam', '.env.development', 'tmp', 'vendor']

ignore(source, names)
set()

I found there were two ways to work around this issue. Neither I know not why and have included both changes. My guess is the reverse splat (is that the python name too) is the core issue and was only an issue for Ruby beaus we only had one item in our set. So adding .git fixes it too... and that in itself is a good addition. But wanted to include both in this PR.
Also note that Python is not my native language and I am hacking here. Feedback appreciated.

So it appears some tests fail would you rather I keep the splat on ignore=shutil.ignore_patterns(*self.excludes)) and just add .git to the ruby bundler builder and just call it a day?

OK, I reverted the ignore_patterns back with the "splat". A friend tells me that (“Hi Ken”) is an expression where (“Hi Ken”,) is a tuple. So adding .git which should be there anyway does two things but still fixe the core issue with Ruby Bundler workflow.

Do you have an example of a failing test, even a failing integration test, that would illustrate what is broken and the fix working? This looks fine on the surface, just want to have something we can use to avoid regressions.

Good question. I suspect I can copy this test from the java maven workflow (https://github.com/awslabs/aws-lambda-builders/blob/develop/tests/unit/workflows/java_maven/test_workflow.py#L46-L53) and use it in the Ruby/Bundler one. Cause right now there is no test for the .aws-sam dir or any excluded files. Let me try real quick and see the test fail and the fix again.

Hmmm... those tests seem a bit tautological and not an integration test. Just tests that a constant is set. What do you think?

Part of that test should also be that the build action completed successfully. Then you can check for some example files that you'd know would be generated.
Ruby has a few "example apps" that turn into these types of tests - for example: https://github.com/awslabs/aws-lambda-builders/tree/develop/tests/integration/workflows/ruby_bundler/testdata/with-deps
Can we add an example app that breaks the build, and show this change fixing said build?

Can we add an example app that breaks the build, and show this change fixing said build?

I do not really have the Python skills for that. Are there any tests like that already that I can copy that you can point me too? At quick glance, I did not see any integration tests that checked for excluded files. So my questions are.

Can you point me to those integrations?
If there are none, can I copy/paste the one from another lang to Ruby?

I think I can meet you halfway if you can provide the Ruby application which breaks the build, and I can create the test. Put it in a folder like the one I linked. Test format is here but I'm happy to write it: https://github.com/awslabs/aws-lambda-builders/blob/develop/tests/integration/workflows/ruby_bundler/test_ruby.py

Test format is here but I'm happy to write it:

Thanks so much for that offer! I had some free time tonight and got this done. The latest commit adds an "excluded-files" test app which is really just a copy of "no-deps" app with two directories added, a .aws-sam and a .git. Both have a .keep file so they are committable.
From here it was easy to test since the format of the previous test was grok'able by me even tho I do not work in Python. I even verified (locally) that if the change submitted to this pull request was not done, the submitted test would fail with the following error.
E       AssertionError: Items in the second set but not the first:
E       '.git'
E       '.aws-sam'

Again, I'd like to point out why. A co-worker showed me via this site (https://repl.it/languages/python3) that the code prior was never working because it was a string, not a tuple.
> type((".aws-sam"))
<class 'str'>
> type((".aws-sam",))
<class 'tuple'>
> type((".aws-sam", ".git"))
<class 'tuple'>

Thanks for this! As a bonus, I think a couple of other builders have this same issue, so I'll apply this to those as well.


Fixed typo uopdate

Found this typo an reported it here.

It's best to consolidate multiple related changes like this and #536 into a single commit to the main branch by making a single pull request that edits multiple files. I'm going to merge this into #536 to do that.

Surelly it's better to consolidate them, and I would have done it if I knew how that should be settled. I was faced with "Propose change" which led to submitting a PR (as I remember). I will try to merge them now!

afaict (as far as I can tell) the web interface only supports conveniently creating PRs that edit a single file through the "propose changes" UI, you would have to make changes locally to make a single commit that edits multiple files without merges.

you would have to make changes locally to make a single commit that edits multiple files without merges.
You're right. My bad. I should have cloned the repo at first.


Unable to load banner at the bottom.

Godot version
4.0.3
Plugin version
v2.1.4
Phone information
android 13
Issue description
The banner loads correctly, but if you deselect 'Banner on Top' in the editor or 'Position checked TOP' in the Example.tscn, it fails to load altogether.
Steps to reproduce

Run Example.tscn on your phone.
Navigate to the Banner tab.
Uncheck 'Position checked TOP'.
Go to the AdFormats tab.
Click on "Enable Banner."

Additional context
No response

Hi, sorry about this, we will investigate it

Perhaps because of this:

But, weirdly, I'm having trouble loading banners with any settings, even after fixing that. All the other ad types are working.


pip-compile fails with pip-tools 1.5 and pip 8.0.2

similar to #304.
This time, with python==2.7.10
It works with python==3.5.1.
$ pip install -U pip pip-tools setuptools
Collecting pip
  Using cached pip-8.0.2-py2.py3-none-any.whl
Collecting pip-tools
  Using cached pip_tools-1.5-py2.py3-none-any.whl
Collecting setuptools
  Using cached setuptools-19.6-py2.py3-none-any.whl
Collecting click>=6 (from pip-tools)
  Using cached click-6.2-py2.py3-none-any.whl
Collecting six (from pip-tools)
  Using cached six-1.10.0-py2.py3-none-any.whl
Collecting first (from pip-tools)
  Using cached first-2.0.1-py2.py3-none-any.whl
Installing collected packages: pip, click, six, first, pip-tools, setuptools
  Found existing installation: pip 7.1.2
    Uninstalling pip-7.1.2:
      Successfully uninstalled pip-7.1.2
  Found existing installation: setuptools 18.2
    Uninstalling setuptools-18.2:
      Successfully uninstalled setuptools-18.2
Successfully installed click-6.2 first-2.0.1 pip-8.0.2 pip-tools-1.5 setuptools-19.6 six-1.10.0

$ pip-compile requirements.in
Traceback (most recent call last):
  File "/usr/local/bin/pip-compile", line 11, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/piptools/scripts/compile.py", line 141, in cli
    results = resolver.resolve()
  File "/usr/local/lib/python2.7/site-packages/piptools/resolver.py", line 78, in resolve
    has_changed, best_matches = self._resolve_one_round()
  File "/usr/local/lib/python2.7/site-packages/piptools/resolver.py", line 154, in _resolve_one_round
    best_matches = set(self.get_best_match(ireq) for ireq in constraints)
  File "/usr/local/lib/python2.7/site-packages/piptools/resolver.py", line 154, in <genexpr>
    best_matches = set(self.get_best_match(ireq) for ireq in constraints)
  File "/usr/local/lib/python2.7/site-packages/piptools/resolver.py", line 201, in get_best_match
    best_match = self.repository.find_best_match(ireq, prereleases=self.prereleases)
  File "/usr/local/lib/python2.7/site-packages/piptools/repositories/pypi.py", line 94, in find_best_match
    all_candidates = self.find_all_versions(ireq.name)
  File "/usr/local/lib/python2.7/site-packages/piptools/repositories/pypi.py", line 83, in find_all_versions
    self._available_versions_cache[req_name] = self.finder._find_all_versions(req_name)
AttributeError: 'PackageFinder' object has no attribute '_find_all_versions'

Likely fixed in pip-tools 1.5 and pip 8.
Feel free to reopen if needed.


instant-mocha 1.3.0 prevents reading from files on disk because memfs is used by default

Bug description
I'm reading django templates in my tests to easily mock the DOM (without having loads of html in my test files). This stopped working with existing paths.
tests/common.js
import * as sinon from "sinon";
import {readFileSync} from "fs";
import * as path from "path";

export const sandbox = sinon.createSandbox();

export var jqInit;
export function stubJqueryInit() {
  jqInit = sandbox.stub($.fn, "init");
};

export function stub_dom(html) {
  // thanks to https://stackoverflow.com/a/4292640/565224
  document.close();
  document.open();
  document.write(html);
  document.close();
};

export function stub_django_template(path) {
  return stub_dom(django_template_contents(path));
}

export const django_templates_basedir = path.normalize(
  `${__dirname}/../../templates`);

export function django_template_contents(path) {
  let fullpath = `${django_templates_basedir}/${path}`,
      contents = readFileSync(fullpath, 'utf-8');
  contents = contents.replace(
    /{%\s*csrf_token\s*%}/m,
    '<input type="hidden" value="csrf_cookie_very_secret" name="csrfmiddlewaretoken">');
  // Maybe just remove other django tags?
  // contents = contents.replace(/{%[^%{}]+}/gm, '');
  return contents;
}

var _old_html = window.document.documentElement.outerHTML;

export function unstub_dom() {
  stub_dom(_old_html);
}

Reproduction steps
Upgrade from instant-mocha 1.2.0 to 1.3.0. Afterwards I get the following backtrace from tests that try to use stub_django_template:
  2) module: cpe_jquery
       CPECreateForm
         "before all" hook in "CPECreateForm":
     Error: ENOENT: no such file or directory, open 'airshield/templates/cpes/create_cpe_modal.html'
      at createError (node_modules/memfs/lib/volume.js:121:17)
      at Volume.openFile (node_modules/memfs/lib/volume.js:836:15)
      at Volume.openBase (node_modules/memfs/lib/volume.js:840:25)
      at Volume.openSync (node_modules/memfs/lib/volume.js:851:21)
      at Volume.readFileBase (node_modules/memfs/lib/volume.js:937:23)
      at Volume.readFileSync (node_modules/memfs/lib/volume.js:952:21)
      at django_template_contents (fs-require://1/main.js:3956:66)
      at stub_django_template (fs-require://1/main.js:3964:19)
      at Context.<anonymous> (fs-require://1/main.js:5119:69)

I've tried adding path.resolve but that doesn't help, since the actual filesystem is not used.
I'd appreciate a workaround or a way to disable memfs, preferably for a single test or just the django_template_contents function.
Environment

instant-mocha version: 1.3.0
Webpack version: 5.50.0
Operating System: Linux, openSUSE Leap 15.2, Kernel 5.3.18-lp152.87-preempt
Node version: v14.17.5
Package manager (npm/yarn/pnpm) and version: yarn 1.22.10

Thanks for the report.
This behavior was implemented in fs-require as a security measure, but I've added an option to disable it, which makes sense to do in instant-mocha: https://github.com/privatenumber/fs-require/pull/1
Will update soon.

Thanks for the report.
This behavior was implemented in fs-require as a security measure, but I've added an option to disable it, which makes sense to do in instant-mocha.
Will release a fix soon.

I just verified that the fix worked for me. Thanks a lot! I could upgrade instant-mocha and mocha in my codebase now.
Before that I spent some time looking at the fix to see how I could configure this and noticed that you check for {__dirname: true} which makes sense and is of course exactly what I need.
Maybe {__filename: true} might be relevant here as well?
And I'm wondering if it could make sense to make this more explicit in the configuration.

node.__dirname is a Webpack configuration to mock it. It's not apart of the instant-mocha API/configuration.

Ok, I admit I just don't understand how this works.
You're not obliged to explain of course but thanks for the hint!

Happy to answer any questions if you have any.
Basically, since Webpack bundles files, __dirname and __filename no longer work at runtime. For example, a file called source-file.js that contains __dirname will be bundled into an aggregated file called bundle.js in a different directory, so running bundle.js will have a different __dirname if left untouched.
The Webpack configuration node.__dirname tells Webpack to replace __dirname with the source file __dirname so that when executing bundle.js, it knows the original directory name from the source file.


Not working in safari

I'm having trouble getting butterchurn for mStream to work in Safari.  The console has this error:
TypeError: null is not an object (evaluating 'this.gl.createFramebuffer')

As far as I know Safari does not support WebGL 2, which Butterchurn uses. Check out https://github.com/jberg/butterchurn/blob/master/src/isSupported.js which exports a function to detect if Buttefchurn is supported in a given browser. We use this in Webamp. You can see the usage here:  https://github.com/captbaritone/webamp/blob/master/js/index.js

@jberg: it might be worth documenting this utility. Also might be worth also doing this detection inside butterchurn itself and throwing a more informative error.

I figured it was something like that.  Does the https://butterchurnviz.com/ use an old version that's WebGL1 compatible?  It's working on safari for me

Hey @IrosTheBeggar , sorry I forgot to mention the lack of browser support.
Thanks for answering @captbaritone , gonna add a browser support section to the README. And yea, should probably have a better error hah
In terms of butterchurnviz.com , on unsupported browsers it redirects to: https://legacy.butterchurnviz.com/
The original version of butterchurn used webgl 1 and that is what is at the legacy subdomain.
I haven't created an NPM package for that one because there are a few roadblocks I would need to fixup:

old version uses a custom three.js fork
old version uses slightly different presets (and supports a lot less of them)
old version has a different API and supports fewer options (like preset transitions / pixelRatio sizing)
a few more smaller things

As of now I don't really plan on having a way to use the older version, sorry.


[vectors] vector ops codegen

Current @thi.ng/vectors package size too large and too repetitive. Many vector ops for vec2/3/4 can/should be replaced with generated versions for DRY purposes & less scope for copy&paste errors.
Preliminary benchmarks don't seem to show a noticeable negative impact.

[x] add codegen templates & helper fns
[x] add more interfaces for various types of vector op
[ ] extend codegen scope to matrix ops

Leaving matrix ops out for now. Rest released as v1.3.0