Fix bug in failing to handle added live/dead feature

This is a small fix to handle a different bug in read_ensemble than the one discussed here.  Some time ago we extended Ensembles to add an error log and a feature wherein an entire ensemble can be killed (set dead).   The problem this bug fixes is ensembles read from MongoDB are always left with the state marked dead.   This probably didn't surface before because we didn't have a test workflow that properly tested that condition.
This fix is pretty simple and only consists of a handful of additional lines of code.  One thing that might be open to discussion is how I did handled the inverse - saving an ensemble.  I added code that if the ensemble is marked dead save_ensemble does nothing.

Thought of one additional point that may require some attention.   When I think about it doing nothing when an ensemble is marked dead may be incorrect.  I think the code needs to check handle errors in elog of the ensemble and members and handle history.   That makes this much more complicated.   Consider accepting this branch to fix this major bug in the reader and put doing the save right on the development agenda.  The reader is mostly broken without the fix applied here.

Hmmm - not sure why those tests are failing.   I need to punt this to one of you guys who can run pytest to work this out.
I found an unrelated error in database.py.   The section of _read_data_from_dfile below has a debug print statement that need to be removed.  Here is the offending section (lines 2838-2861):
        if not isinstance(mspass_object, (TimeSeries, Seismogram)):
            raise TypeError("only TimeSeries and Seismogram are supported")
        fname = os.path.join(dir, dfile)
        with open(fname, mode='rb') as fh:
            fh.seek(foff)
            if not format:
                float_array = array('d')
                if isinstance(mspass_object, TimeSeries):
                    if not mspass_object.is_defined('npts'):
                        raise KeyError("npts is not defined")
                    float_array.frombytes(
                        fh.read(mspass_object.get('npts') * 8))
                    mspass_object.data = DoubleVector(float_array)
                elif isinstance(mspass_object, Seismogram):
                    if not mspass_object.is_defined('npts'):
                        raise KeyError("npts is not defined")
                    float_array.frombytes(
                        fh.read(mspass_object.get('npts') * 8 * 3))
                    print(len(float_array))
                    mspass_object.data = dmatrix(3, mspass_object.get('npts'))
                    for i in range(3):
                        for j in range(mspass_object.get('npts')):
                            mspass_object.data[i, j] = float_array[i *
                                                                   mspass_object.get('npts') + j]

The print statement on line 2856 needs to be removed.

Hi Gary, I ran the pytest on my local machine, and the failure output is as follows:
============================================================================= FAILURES ==============================================================================
_______________________________________________________________ TestDatabase.test_save_ensemble_data ________________________________________________________________
self = <test_db.TestDatabase object at 0x17e26faf0>
def test_save_ensemble_data(self):
    ts1 = copy.deepcopy(self.test_ts)
    ts2 = copy.deepcopy(self.test_ts)
    ts3 = copy.deepcopy(self.test_ts)
    logging_helper.info(ts1, '1', 'deepcopy')
    logging_helper.info(ts2, '1', 'deepcopy')
    logging_helper.info(ts3, '1', 'deepcopy')
    ts_ensemble = TimeSeriesEnsemble()
    ts_ensemble.member.append(ts1)
    ts_ensemble.member.append(ts2)
    ts_ensemble.member.append(ts3)
    dfile_list = ['test_db_output', 'test_db_output']
    dir_list = ['python/tests/data/', 'python/tests/data/']
    self.db.save_ensemble_data(ts_ensemble, mode="promiscuous", storage_mode='file', dfile_list=dfile_list, dir_list=dir_list, exclude_objects=[1])
    self.db.database_schema.set_default('wf_TimeSeries', 'wf')

  res = self.db.read_data(ts_ensemble.member[0]['_id'], mode='promiscuous', normalize=['site', 'source', 'channel'])

E       mspasspy.ccore.utility.MsPASSError: Error trying to extract Metadata with key=_id
E       No value associated with this key is set in Metadata object
E       Expected an entry of type=boost::any
python/tests/db/test_db.py:1496: MsPASSError
I don't know these parts of code very well. But I guess the problem was in the 'ts_ensemble' variable in the test case above, it is not live when passed into save_ensemble_data, so nothing will be done to it. And after calling save_ensemble_data, the test is trying to access ts_ensemble.member[0]['_id'], which is not defined, that would throw an exception.

Codecov Report

Merging #263 (ca2c76f) into master (d292827) will increase coverage by 0.01%.
The diff coverage is 80.00%.

@@            Coverage Diff             @@
##           master     #263      +/-   ##
==========================================
+ Coverage   47.89%   47.90%   +0.01%
==========================================
  Files         118      118
  Lines       15359    15364       +5
==========================================
+ Hits         7356     7360       +4
- Misses       8003     8004       +1

Impacted Files
Coverage Δ

python/mspasspy/db/database.py
82.68% <80.00%> (-0.01%)
:arrow_down:

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 d292827...ca2c76f. Read the comment docs.


Make LLM generated text clickable if it references real symbols.

Idea - We already render symbols as markdown code.  It would be great if these were clickable elements that took you to the symbol reference.

@toolmantim tagging you first for any design input.  I'm also not sure the LOE associated with this.  It's low priority, but a nice paper cut we could eliminate.

Yep, I think this would be great. Design wise, even just a link to start with be good.
I'm hesitant to design it up before we know if it's feasible, but if we had information about the symbol then I think a small chip-style link (like in the context dropdown) with an icon depending on the symbol type, would be good.


Adding of new server to client

I understand that automatic syncing of clients with servers is planned, in the meantime, is there anything that prevents me from "manually" adding new servers myself once a client have been constructed? I see servers is an exposed property, the client constructor loops through servers opts and pushes them to servers here https://github.com/nats-io/node-nats/blob/master/lib/nats.js#L231
Server on the other hand is a private API https://github.com/nats-io/node-nats/blob/master/lib/nats.js#L252 but it's a simple object which I can either override or expose outside the client.
Alternatively if you expose Server then I can do something like nc.servers.push(new nats.Server(uri)).

Feel free to submit a PR to expose Server such that you can do this. I would also add an entry point to add a new Server instead of pushing directly. This could just take a URI so then you would not have to expose Server.

Yup makes sense, àddServer(uri)` sounds good?

I think so.

Ok, then submitting a PR any point in adding a test for that?

n"m I can use nc.close() to test

Yes please always submit tests for any new functionality or bug fix, just good hygiene.

PR submitted

We need to add some more logic since we normally randomize the array. So we should test that is the case when you add, so we can push but then need to randomize unless there is a flag to suppress.

Closed in #79

Would it be possible for you to bump version and publish to npm when you got some spare time?

Yes, I may have a few more things to land first, that ok timing wise or would you prefer earlier?

No worries for my part it can wait 1 - 1.5 weeks


ble_spp_server and ble_spp_client examples do not build on master (due to component coap) (IDFGH-7173)

Environment

Development Kit:      Windows 10, ESP32-C3-MINI

Problem Description
ble_spp_server and ble_spp_client examples do not build on master.  Please disregard this issue if it is irrelevant or not expected to work on master branch.  It is not a show stopper for me, I just thought I should report it.
Expected Behavior
build without error
Actual Behavior
Fails to compile component CoAP.  Due to the CMakeList for this component listing source files (e.g. coap_asn1.c) that are not in the sources directory.  Compiles fine on V4.3 release build
Steps to reproducegit checkout

copy examples\bluetooth\bluedroid\ble\ble_spp_server to working dir
idf.py set-target esp32c3
Fails while running cmake during the above command

// If possible, attach a picture of your setup/wiring here.
Debug Logs
-- Configuring done
CMake Error at D:/espressif/esp-idf/tools/cmake/component.cmake:475 (add_library):
Cannot find source file:
D:/espressif/esp-idf/components/coap/libcoap/src/coap_asn1.c

Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .h .hh .h++
.hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .ispc
Call Stack (most recent call first):
D:/espressif/esp-idf/components/coap/CMakeLists.txt:37 (idf_component_register)
CMake Error at D:/espressif/esp-idf/tools/cmake/component.cmake:475 (add_library):
No SOURCES given to target: __idf_coap
Call Stack (most recent call first):
D:/espressif/esp-idf/components/coap/CMakeLists.txt:37 (idf_component_register)
CMake Generate step failed.  Build files cannot be regenerated correctly.
cmake failed with exit code 1
Other items if possible
From Master branch

From Release 4.3 branch

@ashesman
coap is moved to ESP-IDF component manager on master branch. Please refer to: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/migration-guides/removed-components.html#removed-or-deprecated-components
coap is now hosted at https://github.com/espressif/idf-extra-components/tree/master/coap and it will be fetched through ESP-IDF component manager for coap specific examples only. It should not ideally affect build for BLE specific examples.
Can you please check why you still see D:/espressif/esp-idf/components/coap/libcoap/src/coap_asn1.c locally?

Thanks for reporting, will close due to short of feedback, feel free to reopen with more updates.


update react versions

CI build timed out.  is this package still maintained?  Could someone merge the PR?


Add another doctrine type to reorder UUID v1 to improve MySQL performance

There's an interesting article in Percona blog that claims that due to InnoDB's internals it prefers sequential primary keys rather than completely random ones so one can simply leverage features of time-based UUID v1 to improve InnoDB performance.
Do you think it would be useful to have another doctrine type that reorders UUID in the way described in the article? There's a downside, of course: this hacky way of representing a UUID is somewhat more complicated to deal with (migrating to another column type looks more painful, for example) but still, graphs the author drew look promising and the amount of code to implement it seems to be quite small. What's your opinion on adding it?

Take a look at PR #118 on ramsey/uuid. It does exactly this. After I do some benchmarking on it (trying to show the same results as the Percona blog), I’ll merge it in, and then it’d be awesome to see a PR on this repo that creates a separate Doctrine type for it.
Thanks!

@ramsey The PR referenced was merged, any plans to add that type here?

@JCMais I'd love to add a separate type here for the InnoDB-optimized UUID. It's on my radar, which is why I'm keeping this issue open. I haven't begun any work on it, yet, so if you're asking it about because you're interested in submitting a PR, feel free to do so. :-)

I'm already using it, since I just needed to create a single class on my application and not use the UuidGenerator provider.
Isn't just a matter of using uuid1 instead of uuid4?
Configuration should be left to the user.

To use the optimized UUID for InnoDB, you'll need to store the value in MySQL as binary data, so you will need to take the concepts provided in uuid-doctrine's uuid_binary type and also make changes when converting to a database value and back to a PHP value.
Here's an example of how to use it (not with Doctrine):
$factory = new \Ramsey\Uuid\UuidFactory();
$codec = new OrderedTimeCodec($factory->getUuidBuilder());
$factory->setCodec($codec);
Uuid::setFactory($factory);

$uuid1 = Uuid::uuid1();
echo $uuid1->toString() . "\n"; // i.e. 58e0a7d7-eebc-11d8-9669-0800200c9a66
$optimized = $uuid1->getBytes();
// Store $optimized to the database in a 16-char field
echo Uuid::fromBytes($optimized)->toString() . "\n"; // i.e. 58e0a7d7-eebc-11d8-9669-0800200c9a66

Making it ready for ramsey/uuid-doctrine is a matter of creating a new DBAL type (i.e. uuid_binary_ordered_time?) and providing the appropriate convertToPHPValue() and convertToDatabaseValue() methods. In theory, one could just extend UuidBinaryType and override the NAME constant and the convertToDatabaseValue() method. I think. :-)

@ramsey I was checking some info on the COMB generator and I saw the following PR: https://github.com/ramsey/uuid/pull/102
Using TimestampFirstCombCodec basically accomplishes that, doesn't it?

TimestampFirstCombCodec is different from the OrderedTimeCodec, though their names aren't very clear. I need to write up some documentation to help explain the differences.
TimestampFirstCombCodec is intended to be used together with CombGenerator.
The CombGenerator generates random bytes and then adds a timestamp as the last 6 bytes of the returned binary data. This allows v4 UUIDs to contain the timestamp on which they were generated. "COMB" means "combined GUID and timestamp," referencing the fact that GUIDs are random, so this is a combination of a random (v4) UUID with a timestamp on the end.
TimestampFirstCombCodec may be used with the CombGenerator to move the timestamp to the beginning of the UUID (the first 6 bytes, instead of the last 6 bytes). This allows for COMB UUIDs to be ordered in the sequence in which they were created.
TimestampLastCombCodec is a dummy codec that effectively does exactly what CombGenerator does on its own, but it's there for completeness.
On the other hand, OrderedTimeCodec is intended to be used with a time-based (v1) UUID. The standard layout of a UUID is:
time_low - time_mid - time_hi_and_version - clock_seq_hi_and_reserved - clock_seq_low - node

The OrderedTimeCoded rearranges a v1 UUID so that the layout becomes:
time_hi_and_version - time_mid - time_low - clock_seq_hi_and_reserved - clock_seq_low - node

By rearranging the time parts in this order, they become sequential, allowing the database to store them in a more efficient, optimized way.
If you wish to generate v4 UUIDs and use these as PKs in your database, then your best option is to use CombGenerator with TimestampFirstCombCodec.
If you wish to generate v1 UUIDs and use these as PKs in your database, then your best option is to use OrderedTimeCodec.
There are different reasons for using v1 or v4 UUIDs. v4 UUIDs are truly random. v1 UUIDs include the timestamp they were created, as well as the node on which they were created, and you are able to decompose v1 UUIDs to read this information. v4 UUIDs include no such information.
It's up to you to choose which is most appropriate for your application. However, the ramsey/uuid-doctrine library does not include out-of-the-box support for either type. You have to roll your own, but I am open to PRs to add this support. ;-)

Merged in. Will cut a release soon. Thanks!


Update sload to remove overrides

PR description
This PR introduces changes that update AstlanGasCalculator to remove overrides of calculateStorageCost and calculateStorageRefundAmount.  Removing these overrides fixes issues that were causing this node not to sync with kotti testnet
Fixed Issue(s)

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.1 out of 13 committers have signed the CLA.:white_check_mark: edwardmack:x: shemnon:x: jframe:x: mark-terry:x: matkt:x: MadelineMurray:x: atoulme:x: RatanRSur:x: macfarla:x: joshuafernandes:x: pinges:x: lucassaldanha:x: abdelhamidbakhtaYou have signed the CLA already but the status is still pending? Let us recheck it.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.2 out of 13 committers have signed the CLA.:white_check_mark: edwardmack:white_check_mark: atoulme:x: joshuafernandes:x: shemnon:x: jframe:x: matkt:x: abdelhamidbakhta:x: macfarla:x: MadelineMurray:x: mark-terry:x: pinges:x: lucassaldanha:x: RatanRSurYou have signed the CLA already but the status is still pending? Let us recheck it.


Cannot see wave line below the member function

After installing, I have checked the insturction, but I cannot add a document for single function as there is no wave line below function name and cannot see bulb due to this either.
I am using vs2022 17.6.6

can you cross check you settings for code analysis based on this thread https://github.com/d1820/CodeDocumentor/issues/22#issuecomment-1553412776

After uncheck the item and restart vs2022, it works!
Thanks!


Silent Miner Documents?

is it possible to bind silent miner to a PDF or a document , or is binding mainly to attach to another app

You can bind anything together, if you bind a .pdf and .exe then when run it will extract them both and run both just like if you double-clicked them normally. The bound file will be an .exe of course since it needs to execute, if what you're looking for is that the final file should be a .pdf then either you can use an extension spoofer or you'll have to find a .pdf exploit online.

ohh okay great, will test it out, but can the miner be arranged to run straight away hidden in the background as soon as the user opens binded pdf or jpg, instead of being need to be set up again like the usual normal miner setup

The miner will always run straight away hidden in the background when started, or do you mean that you want the miner to run without installing?

i mean after i have binded the miner with a pdf or img, when the user clicks on it the image or pdf ,is it possible for the miners to be installed and running in the background right away after the infected binded image is clicked

Yes well that's what it should always do, when you open the bound file then it will extract all the files and execute them.

so i binded the miner with an image with the goal of only the image being opened and seen by the user and the miner just running straight away in the background, but i think i messed something up as the image did not pop up, only the miner set up screen is opened, but i guess my question is ,is it able to run the miner without having to manually set it up, especially in the case to infect the user

I mean, you should bind a built miner and not the builder itself.

ohh wow that makes sense, you are right , so i need to incl all the folders that come out from the builder right into the binder right?

No only the final .exe is needed, called "whatever name you chose".exe.

ohh wow thank you unam


Update landing pages UI

Description
This PR adds code for updating the UI for the landing page with new content and styles.

Relevant Technical Choices

Testing Instructions

Clone this branch and build the extension.
Open PSAT panel and click on Site boundaries landing page.
The page should open with 4 tiles showing new content.
Click on any tile will open new page with docs related to the topic clicked.
Try same Tracking protection and Private advertising landing pages.

Additional Information:

Screenshot/Screencast

Checklist

[x] I have thoroughly tested this code to the best of my abilities.
[x] I have reviewed the code myself before requesting a review.
~This code is covered by unit tests to verify that it works as intended.~
[x] The QA of this PR is done by a member of the QA team (to be checked by QA).

Fixes #

@mayan-000 @mohdsayed
Can we please use the UTM parameters, ?utm_source=psat&utm_medium=extension as added to other outbound links from the extension?

Ref: https://github.com/GoogleChromeLabs/ps-analysis-tool/issues/506

@mayan-000 @mohdsayed
Can we please use the UTM parameters, ?utm_source=psat&utm_medium=extension as added to other outbound links from the extension?

Done and pushed to develop

Thanks 👍


pip install fails on Mac laptop

I tried to install halotools with (conda) pip pip install halotools and the install fails with

gcc -fno-strict-aliasing -I/Users/manodeep1_Old/anaconda/include -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/manodeep1_Old/anaconda/include/python2.7 -c halotools/_compiler.c -o build/temp.macosx-10.5-x86_64-2.7/halotools/_compiler.o
In file included from /opt/local/lib/gcc5/gcc/x86_64-apple-darwin15/5.3.0/include/stdint.h:9:0,
                 from /Developer/SDKs/MacOSX10.5.sdk/usr/include/inttypes.h:255,
                 from /Users/manodeep1_Old/anaconda/include/python2.7/pyport.h:9,
                 from /Users/manodeep1_Old/anaconda/include/python2.7/Python.h:58,
                 from halotools/_compiler.c:1:
/opt/local/lib/gcc5/gcc/x86_64-apple-darwin15/5.3.0/include-fixed/stdint.h:27:32: fatal error: sys/_types/_int8_t.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1

A similar error occurs during the build step as well. I have copy-pasted the one from the install step.

Seems to be solved by using: export CC=clang; pip install halotools

Reopening this until I can address this in the documentation (at minimum).
CC @eteq

@manodeep - is it possible you're using the Mac OS X built-in Python?  It sometimes yields weird linker errors like that, especially if you mix it with gcc (it's actually built with clang but sometimes thinks that it should use gcc).
If so, that's basically the problem.  Life will be easier if you never use the OS X Python.

I use conda python + pip. I checked that both pip and python point to the anaconda directory. gcc is through macports, as is clang.
I agree that the includepath pointing to the MAC SDK is highly suspicious - I wonder if macports pulls that in during gcc install.

Huh, that's quite strange.  I have essentially the identical setup on the laptop I type this from, and it defaults to clang.  I don't suppose you've set your local CC variable in the shell to point to gcc?  Or is there a /usr/local/bin/cc that's pointing to gcc (instead of clang like it normally is on a mac)?
This strongly suggests it's an issue with your local configuration and not directly the fault of halotools, though, right?  And it's not clear that the general advice should be "use clange" because sometimes gcc is desired (i.e. on linux).  So in that case it might be ok to close this, although @aphearin can be the final judge of that.

I wanted to note that this issue still remains. Just did a fresh git clone and tried python setup.py install and encountered the exact same error. As before, is solvable by export CC=clang. Just highlights the issue that using real gcc on a Mac is trouble-some. @eteq I have the exact same issue with installing astropy

Thanks for checking @manodeep.
@eteq - do you have any better suggestions besides putting a note in the install docs to export clang in the event that this comes up? I was planning on releasing v0.3 tomorrow.

Nothing really leaps to mind.  Although if @manodeep has the same problem installing Astropy, I'm even more confused because I also have gcc from macports, and don't see this at all.
Maybe @manodeep has the path set up in a different order or something?  @manodeep, if you just do cc do you get gcc or clang? (I get clang, but I think at one point I set it up to do that on purpose...)

cc points to /usr/bin/cc. /usr/bin/cc --version gives:
Apple LLVM version 7.3.0 (clang-703.0.31)
Target: x86_64-apple-darwin15.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
PATH contains conda/bin, /opt/local/[s]bin, /usr/local/bin and then /usr/bin -- in that order. python picks up the conda version.

Huh.  Well that's weird, @manodeep .
One other thing I just noticed, though: when I start anaconda python it givesGCC 4.2.1 (Apple Inc. build 5577) as the matched compiler.  And the gccs I have installed are all 4.x's. Whereas from the lib directories you listed above it looks like you might be on gcc v5.3 - maybe that's the underlying incompatibility?  That something changed in the cstdlib from gcc 4.x to 5.x?  Still doesn't explain why you're not getting clang as the default though - I certainly am.
Which makes me think of one other thing: have you ever used xcode-select?  I have a hazy memory that that's what you're supposed to use to set up clang correctly.  Maybe that needs to be run?

I get a similar output as well from python -- [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)] on darwin. /usr/bin/gcc --version gives me Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
However, my gcc points to macports gcc (which resolves to one of 4.6, 4.8, 5.3 and 6.1) - so these Xcode directories should really not be used anyway.
The good news is that now I can install halotools. I removed all previous versions, and then pip install halotools worked just normally. Checking the install log, I can see that the compilation line has changed and does not contain the isysroot variable anymore.

gcc -fno-strict-aliasing -I/Users/manodeep1_Old/anaconda/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/manodeep1_Old/anaconda/include/python2.7 -c halotools/_compiler.c -o build/temp.macosx-10.6-x86_64-2.7/halotools/_compiler.o

gcc -bundle -undefined dynamic_lookup -L/Users/manodeep1_Old/anaconda/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.6-x86_64-2.7/halotools/_compiler.o -L/Users/manodeep1_Old/anaconda/lib -o build/lib.macosx-10.6-x86_64-2.7/halotools/_compiler.so

Something in distutils or setup.py changed I am assuming.


pysilon malware error - "numpy.f2py ModuleNotFound"

error when opening pysilon malware
Traceback (most recent call last):
File "source_prepared.py", line 22, in
File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
File "scipy\io_init_.py", line 97, in
File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
File "scipy\io\matlab_init_.py", line 45, in
File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
File "scipy\io\matlab_mio.py", line 9, in
File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
File "scipy\io\matlab_mio4.py", line 8, in
File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
File "scipy\sparse_init_.py", line 294, in
File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
File "scipy\sparse_base.py", line 5, in
File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
File "scipy_lib_util.py", line 18, in
File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
File "scipy_lib_array_api.py", line 17, in
File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
File "scipy_lib\array_api_compat\numpy_init_.py", line 1, in
File "numpy_init_.py", line 372, in getattr
ModuleNotFoundError: No module named 'numpy.f2py'
This module is installed on my computer when I run "python -m numpy.f2py" in Windows Powershell.
Please help.
Thanks.

OS: Windows 11 64-bit
Python Version: 3.12 (Microsoft Store Version)

i downloaded python 3.11.8 that fixed it for me idk if it will for u

i downloaded python 3.11.8 that fixed it for me idk if it will for u

I'll try that and let you know if that works for me, thank you.

i downloaded python 3.11.8 that fixed it for me idk if it will for u

Traceback (most recent call last):
File "C:\Users\vanbo\Downloads\PySilon-malware-3.7.4\builder.py", line 3, in
from PIL import ImageTk, Image
File "C:\Users\vanbo\Downloads\PySilon-malware-3.7.4\pysilon\Lib\site-packages\PIL\ImageTk.py", line 32, in
from . import Image
File "C:\Users\vanbo\Downloads\PySilon-malware-3.7.4\pysilon\Lib\site-packages\PIL\Image.py", line 88, in
from . import _imaging as core
ImportError: cannot import name 'imaging' from 'PIL' (C:\Users\vanbo\Downloads\PySilon-malware-3.7.4\pysilon\Lib\site-packages\PIL_init.py)
yeah it brought another issue

A new release came out, trying that out to see if the error is fixed for me. will update this if needed

did that work?


How do I build a loadable/components using webpack?

💬 Questions and Help
The typescript is compiled via webpack's babel-loader . At this time, @loadable/babel-plugin is described in plugins in .babelrc , but the following error is output at execution time.
Invariant Violation: loadable: SSR requires @loadable/babel-plugin, please install it

procedure

git clone https://github.com/konojunya/universal-react-application-sample.git
cd universal-react-application-sample
yarn
yarn dev

You can now reproduce the above error.

See #263 for more info on your error

Close as duplicate.


protodoc: Use (more) templates for api build

This shifts the rendering code from python into jinja templates.
The logic for parsing protodoc should not change much, but how we want to present it does so this separates the changeable code out, and should make it easier to update, it should also make the code easier to read/understand
This is a further step towards using templates (we use some already) and once it has landed we can look at moving further in this direction.
Signed-off-by: Ryan Northey<EMAIL_ADDRESS>Commit Message:
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

/docs

Hi Ryan - do you want to fill in the PR description, or is the title pretty much all there is to say?
/wait

description updated

/assign-from @envoyproxy/first-pass-reviewers

I think it would be useful investing in some lightweight scripts to do this in any case, to allow for confidence in these complex protodoc changes; absent unit tests we need to use that for correctness criteria.

this is more complex than some lightweight scripts as the rst/html does change, whereas the rendered output should not change
for this reason ive written a screenshotting spider which you can see here https://github.com/phlax/envoy-docshots
essentially it does the following for 2 given hashes where the hashes correspond to the rendered docs in GCP and represent a before (ie current rendered output) and after (ie rendered output from a PR):

scrapes all the API urls
takes a screenshot of each
compares the screenshots before/after for each of the scraped pages

after running this i found a few bugs, and i have fixed them here
the rendered (html) docs that the screenshots were taken from can be seen here:

https://storage.googleapis.com/envoy-pr/a4d6e1f/docs/api-v3/api.html
https://storage.googleapis.com/envoy-pr/bf3659e/docs/api-v3/api.html

the results of running against these 2 branches are:
TOTAL MATCHED: 132
TOTAL FAILED: 2

the remaining failures are due (afaict) to some API urls being put in a TOC outside of the API tree - which means its a gamble as to which TOC sphinx sees as the real one (we might want to fix this, but its outside of the scope of this PR)
The failing pages are:

https://storage.googleapis.com/envoy-pr/a4d6e1f/docs/api-v3/service/auth/v3/external_auth.proto.html
https://storage.googleapis.com/envoy-pr/bf3659e/docs/api-v3/service/auth/v3/external_auth.proto.html

and here

https://storage.googleapis.com/envoy-pr/a4d6e1f/docs/api-v3/service/auth/v3/attribute_context.proto.html
https://storage.googleapis.com/envoy-pr/bf3659e/docs/api-v3/service/auth/v3/attribute_context.proto.html

Thanks for doing the diff work, I think this materially improves confidence in the correctness. Neat approach.


Fix border buffers allocation

Hi,
I've profiled app a bit and found, that using vec::repeat(0).take(n) is not an optimal way to allocate memory slice.
It's a huge bottleneck.
The change replaces it with vec! macro.
The change may be related to https://github.com/way-cooler/way-cooler/issues/371
Attached profiling results. CPU spent on allocations dropped from 85% to less than 3%.

Hi there,
Thanks for the profiling! However, did you make sure you had optimizations enabled when you profiled this? It looks like the path is in target/debug/way-cooler?
I'll probably merge this either way, since it's clearer, but you might want to re-profile

It's much better in release with iterators, but anyway the change will help with debugging.

Ok, I'll test it when I get home.
But I found the exact same code in 5.2 here, so I'm not sure if this is the whole picture.

With release build it has the same performance, as with macro

Had a feeling, those iterators are zero cost.
I like the macro more, so I'll merge it. Do you mind updating the title though? Makes it easier for me to write release notes / see the history of the project at a more macro level than individual commits.

Also, if you want to improve the performance I think you should look at the number of times the tiling code  is called. I was a bit lazy when implementing tabbed / stacked tiling, and so it does a lot of unnecessary work when it could just update smaller parts of the layout tree.
If you want to work on that specifically I can send you to certain places in the code where I'm being inefficient and you can try to tackle it if you want

Actually, here's a link to a bottle neck I've noticed anyways, in case anyone wants to tackle this / makes it easier for me to do it later:
here's the inefficient code now
here's what it was in 0.5.2
The reason that tile is there is so that we properly update tiled/stacked containers when we move focus. E.g this entails updating the borders and making sure the correct view is focused. To see what needs to be done, you can comment out the layout_active_of code in the master version and play around with nested tabbed/stacked containers to see what breaks.
There's probably other code like that for resize that I can't find right now. Fixing this by making some helper functions that updates tabbed/stacked containers in the tree would make it easier to fix the resize issue once I find the place it's calling tiling a lot.


.goals() adds goals twice if they already exist there

This will produce a wrong pom:
                f.build()
                    .plugins()
                    .appendItself()
                    .execution("first")
                    .phase("process-classes")
                    .goals("build", "optimize");
                f.build()
                    .plugins()
                    .appendItself()
                    .execution("first")
                    .phase("process-classes")
                    .goals("build", "optimize");

There will be 4 goals instead of two.

@rultor release, tag is 0.4.0

@rultor release, tag is 0.4.0

@yegor256 OK, I will release it now. Please check the progress here.

@rultor release, tag is 0.4.0

@yegor256 Done! FYI, the full log is here (took me 6min).


Support "Accept payment (Purchase)" functionality

Hi,
I'm going to implement purchase functionality on my site. Do I understand correctly that I can't generate a payment button HTML code and show it on a page using this gem? Do you only support invoice creation and then showing the payment URL on the site?

@bguban Gem is a wrapper around WayForPay API. You probably do not need it for payment button

Hi @galulex,
Thanks for the reply. What do you think would it be useful to implement such functionality as described https://wiki.wayforpay.com/en/view/852102 in the scope of this gem? Or do you prefer to leave the gem only as a wrapper?

@bguban It is API call. So it would be nice addition to the gem if is not yet implemented. Feel free to fork and create a PR. You can get inspiration from some of the closed ones

Honestly say it's not an API call but anyway I guess it would be a good addition to this wrapper.


Implementation of the Counting Sort algorithm in Python.

Have you read the Contributing Guidelines on Pull Requests?
Yes
Description
counting sort is an algorithm for sorting a collection of objects according to keys that are small integers.
Worst complexity: n+r
Average complexity: n+r
Space complexity: n+r
Checklist

[x] I've read the contribution guidelines.
[x] I've checked the issue list before deciding what to submit.
[x] I've edited the README.md and link to my code.

Related Issues or Pull Requests
I want to keep contributing to NeoAlgo.
Thank you.

#1878

#1878


The username and password isnt working

When  i set any username and password it says "The username was used ".I am not able to proceed further.

I think there is an issue with the database configuration. I have uploaded the sql script file to create mysql database scheme for this application. You may create a new user and connection and run the script using mysql workbench (if you are not familiar with mysql and it is easier to manage). Remember to change the database info, I have mentioned it in the updated README file. BTW, thanks for raising the issue!

I think it worked , thank you . I will get back to you if I face any other problems


Escape file paths

I store all my images in a folder called # Pics (so it stays at the top of alphabetic listings). Isolate is not able to display any images within that folder as # is a special character in URLs.
This PR escapes all file paths, which fixes the issue for me.
There was no info on contributing guidelines so I'm just sending this off. Please tell me if you want any changes Seena.
Thanks btw, this is a really cool project! (had been thinking of doing something like this, but never actually did it)

Oh hmm, I haven't run into this but that seems like an issue. This looks great, let me just do some testing so I understand it and I'll merge. Thanks for sending it over!


Add missing ./meta files so gradle test run without errors

There are auxiliary files to make the .meta files compile that are missing.
Adding them

Thank you!!


Add leaf_hash function to SparseMerkleTree

What feature should we add?
The equivalent of https://github.com/OpenZeppelin/merkle-tree/blob/master/src/standard.ts#L114-L116

It looks like the data is abi encoded before keccaked: https://github.com/OpenZeppelin/merkle-tree/blob/master/src/utils/standard-leaf-hash.ts#L7


Introduce a way to override Sprangular's manifest file

Hey!
At the moment, there is no real way to override this file from the host app: https://github.com/sprangular/sprangular/blob/master/app/assets/javascripts/sprangular/app.coffee
I would love to be able to do this as it would allow the host app to pick and chose what it wants to load in the code base. The only way right now to not load specific files from Sprangular in the host is by creating empty files, which is less than ideal.
My perfect plan would be to have this very same app.coffee file in the gem like it is now, but still be able to have a app.coffee in the host that will be tailored to the app's needs.
When I try doing this now, there is no way I can reference the gem's file structure and the asset pipeline will try to look in the host app and evidently not find the required files.
Thoughts?

@joshnuss @bryanmtl @braidn any thoughts ?

Have you considered organizing the various elements of the application into submodules? Either role-specific (ie. catalog vs. account vs. checkout) or architecturally (ie. controllers vs. models vs. services). Then the host apps could define their angular models thus:
window.HostApp = angular.module('HostApp', ['Sprangular.catalog', 'Sprangular.account', 'Sprangular.checkout']);

It is hard because the way Sprangular "does a lot" and sprockets is pretty dumb compared to something like Webpack/JSPM. Is there any thought of a big olé generator of sorts. Much like Ember Rails?
https://github.com/emberjs/ember-rails/tree/master/lib/generators/templates
Although, I wonder if there is a way to do it through Angular's module "injection" like mentioned by DW?

Yeah, my solution only addresses giving host apps some flexibility in terms of substituting their own components. Reducing the number of files being delivered by the AP is whole other kettle of fish.

@DanielWright Actually had not though of doing it that way. That would be a good idea. I will backburn this for a while but it would be super interesting to do it this way. Thanks guys for the brainstorm.


[cosmetic] Batch Operations

Batch operations are great but the GUI could be improved:

Select entries
Click the Batch Operations icon (which is not too clear as it looks to me like a printer...)
Select entries to modify

Say you want to add a new, existing tag:

You enter the tag in the Tags field
then, quite naturally, you click the Add link
it WON'T WORK because the cursor has to be out of the Tags field for it to work

I understand the programmatic logic (a field is validated only when exited) but in that case it IS exited when clicking on the Add link...

1. You enter the tag in the **Tags** field

2. then, quite naturally, you click the **Add** link

3. it WON'T WORK because **the cursor has to be out of the **Tags** field for it to work**

I can not reproduce this. Can you share a screencast? In general there is no validation on the field, so I can't see what would be blocking the add button.

Closing as stale


Tuya Accessory - Odd Message Error

I've got a Tuya Light Switch that I've had working in Homebridge previously using the homebridge-tuya-lan plug.
I've just updated to Hoobs and installed the Tuya Lan2  v 1.0.0 plugin.
The plugin recognises the lights but they can't be controlled via Homekit. I've added them but show as 'No Response' in the Home app.
Config is
"platform": "TuyaLan",
"devices": [
{
"name": "Man Cave Lights",
"type": "MultiOutlet",
"manufacturer": "Tuya",
"model": "Smart Wifi Power Strip",
"id": "6002026084f3ebdb19de",
"key": "cb8e3893a2a0a1ec",
"outletCount": "2"
}
]
In the logs it shows the following entries
[Homebridge] [4/23/2020, 3:40:34 PM] [TuyaLan] Initializing TuyaLan platform...
[Homebridge] [4/23/2020, 3:40:35 PM] [TuyaLan] Marked Man Cave Lights unreachable by faulting Service.Man Cave Lights 1.On
[Homebridge] [4/23/2020, 3:40:35 PM] [TuyaLan] Marked Man Cave Lights unreachable by faulting Service.Man Cave Lights 2.On
[Homebridge] [4/23/2020, 3:40:35 PM] [TuyaLan] Starting discovery...
[Homebridge] [4/23/2020, 3:40:35 PM] Homebridge is running on port 51826.
[Homebridge] [TuyaDiscovery] Discovery started on port 6666.
[Homebridge] [TuyaDiscovery] Discovery started on port 6667.
[Homebridge] [TuyaDiscovery] UDP from <IP_ADDRESS>:6667 0x000055aa...0x0000aa55
[Homebridge] [4/23/2020, 3:40:42 PM] [TuyaLan] Discovered Man Cave Lights<PHONE_NUMBER>f3ebdb19de) identified as MultiOutlet (3.3)
[Homebridge] [TuyaAccessory] Changing ping gap for Man Cave Lights to 9s
[Homebridge] [4/23/2020, 3:40:42 PM] [TuyaLan] Connected to Man Cave Lights
[Homebridge] [TuyaAccessory] Sending first query to Man Cave Lights (3.3)
[Homebridge] [TuyaAccessory] Odd message from Man Cave Lights with command 10: V��}E(�,��״*y�%���W�{�s%��
[Homebridge] [TuyaAccessory] Raw message from Man Cave Lights (3.3) with command 10: 000055aa000000010000000a0000002c0000000156f4af7d0e4528ea2ce40ce6d7b42a79d125eed4eca20c57ec7bab731a25aaeaee7900950000aa55
Do you know if this can be fixed?

Flashed the Switch to use Tasmota :)


Revert "Use app label as app change label for long app names on 0.53.x line (#685)"

Reverts carvel-dev/kapp#691

LGTM


avoid dynamic requires to enable browserify support

Hello!
I'm building out a web tool to validate code using standard rules, and I ran into some issues with this package.
Switching the rules definition to be less dynamic enables this package to be more easily browserify-able.
Is this OK?

LGTM

let me check it out!

~/dev/eslint-plugin-standard (master) $ ~/oldnpm/bin/npm publish
+<EMAIL_ADDRESS>

thanks!


Correct description of Behavior.init

There's discrepancy in the docs as to when Behavior.init is called in relation to Behavior.attach.
https://doc.babylonjs.com/features/featuresDeepDive/behaviors says:

init(): This function will be called when a behavior needs to be initialized. This is before the attachment to a target.

The current typedoc says

Function called when the behavior needs to be initialized (after attaching it to a target)

The source says init is called before attach:
public addBehavior(behavior: Behavior<Node>, attachImmediately = false): Node {
        const index = this._behaviors.indexOf(behavior);

        if (index !== -1) {
            return this;
        }

        behavior.init();
        if (this._scene.isLoading && !attachImmediately) {
            // We defer the attach when the scene will be loaded
            this._scene.onDataLoadedObservable.addOnce(() => {
                behavior.attach(this);
            });
        } else {
            behavior.attach(this);
        }
        this._behaviors.push(behavior);

        return this;
    }

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

Snapshot stored with reference name:
refs/pull/13926/merge
Test environment:
https://babylonsnapshots.z22.web.core.windows.net/refs/pull/13926/merge/index.html
To test a playground add it to the URL, for example:
https://babylonsnapshots.z22.web.core.windows.net/refs/pull/13926/merge/index.html#WGZLGJ#4600
Links to test babylon tools with this snapshot:
https://playground.babylonjs.com/?snapshot=refs/pull/13926/merge
https://sandbox.babylonjs.com/?snapshot=refs/pull/13926/merge
https://gui.babylonjs.com/?snapshot=refs/pull/13926/merge
https://nme.babylonjs.com/?snapshot=refs/pull/13926/merge
To test the snapshot in the playground with a playground ID add it after the snapshot query string:
https://playground.babylonjs.com/?snapshot=refs/pull/13926/merge#BCU1XR#0


Game quits on startup

Godot version:
3.5-rc5 Linux Release
OS/device including version:
PSV-1000 On 3.65 Henkaku
Issue description:
Game builds successfully, VPK installs successfully, but when I try to run the executable on the PSV, it quits as if I pressed the PS button, it doesn't crash, just quits gracefully, I've tried adjusting window settings, no difference, note that I'm exporting "without debug" if that matters.
Steps to reproduce:
Build and run.
Minimal reproduction project:
https://github.com/Red1C3/antware-godot-edition/tree/psvita

You might want to include the Vita's stdio in that case

I ran PrincessLog, the logs said I must turn on GLES2 fallback option, altho I had the build on GLES2 beforehand, anyway it boots now, at least the main menu does


added reset script

npm run reset is a convenience to restore sanity :)

Thank you! Approved. :+1:


Add snippet for middlewares and Redux Toolkit users: improved the mid…

…dleware definition in the snippet

name: :memo: Documentation Fix
about: Fixing a problem in an existing docs page
Checklist

[ ] Is there an existing issue for this PR?

link issue here

[ ] Have the files been linted and formatted?

What docs page needs to be fixed?

Section: usage
Page: UsageWithTypescript.md

What is the problem?
Middleware was an array in the previous snippet and it shouldn't
What changes does this PR make to fix the problem?
Changed the snippet to use the getDefaultMiddleware notation

Thanks!


Check for nonces inside of forms (and in Ajax handlers)

Whenever a <form> appears in the source, there should be a nonce function that appears between it and the closing </form>.
Checking for proper validation if nonces, however, would be quite difficult to check programatically, except in Ajax handlers.

[ ] Look for wp_nonce_field() inside of <form> elements.
[ ] In Ajax actions, verify that check_ajax_referer() or wp_verify_nonce() are used.

See http://codex.wordpress.org/WordPress_Nonces
Per the VIP cod review guidelines:

Nonces should be used to validate all form submissions.

Closing in favour of #325.


Lazy queue creation, don't recreate on delete

As dicussed in #25, #36, #37 and on Gitter.
Need to do AzureStorageQueue too - RedisQueue already permenently deletes and doesn't have network requests in the ctor, so that should be fine.

I think it would be a good idea if QueueBase handled calling EnsureQueueCreatedAsync(). Couple of ways to do this:

Make the abstract methods virtual and update all implementations to call base (if appropriate).

Rename the abstract methods to to {MethodName}Impl, and implement the behavior in the public method... eg.

public abstract Task<string> EnqueueAsync(T data);

becomes...
public Task<string> EnqueueAsync(T data) {
    await EnsureQueueCreatedAsync().AnyContext();
    await EnqueueAsyncImpl(data).AnyContext();
}

protected abstract Task<string> EnqueueAsyncImpl(T data);

Would it be worth accounting for the scenario where a queue might be deleted by another instance of the implementation? I didn't do that for the current implementation primarily because I don't want to be making an additional network request (in the case of Azure Storage / Service Bus) for almost every API call. Consider the below, or in a scale out scenario...
var a = new AzureServiceBusQueue("myqueue");
var b = new AzureServiceBusQueue("myqueue");

a.EnqueueAsync(new Thing());
var bEntry = b.DequeueAsync();

a.DeleteQueueAsync();
b.EnqueueAsync(new Thing()); // Throws as queue is deleted
a.EnqueueAsync(new Thing()); // Works as the class knows the queue is deleted and recreates

We could handle this by adding something like:
public abstract class QueueBase<T> {
    private bool _queueCreated;

    protected abstract Task EnsureQueueCreatedImplAsync(CancellationToken cancellationToken);
    protected Task EnsureQueueCreatedAsync(CancellationToken cancellationToken = default(CancellationToken)) {
        if (!_queueCreated) {
            await EnsureQueueCreatedImplAsync(cancellationToken).AnyContext();
            _queueCreated = true;
        }
    }

    protected async Task<TResult> WrapQueueCall<TResult>(Func<Task<TResult>> action, CancellationToken cancellationToken) where TResult : Task {
        await EnsureQueueCreatedAsync(cancellationToken);
        try {
            return await action();
        }
        catch (Exception ex) when (IsQueueDeletedException(ex)) {
            _queueCreated = false;
            await EnsureQueueCreatedAsync(cancellationToken);
            return await action();
        }
    }

    protected abstract bool IsQueueDeletedException(Exception ex);

    protected abstract Task<string> EnqueueImplAsync(T data);
    public async Task<string> EnqueueAsync(T data) {
        return await WrapQueueCall(() => EnqueueImplAsync(data));
        await EnsureQueueCreatedAsync().AnyContext();
        return await .AnyContext();
    }
}

public class AzureStorageQueue<T> : QueueBase<T> {
    protected override bool IsQueueDeletedException(Exception ex) => ex is StorageException && ex.Message.Contains("404");
}

I think if you delete it you should have to create it again

Not sure I agree although not a common scenario.
If that is the case then we need a ClearQueueAsync() method (#25) and we also need to wrap the exception that is thrown (like Azure Storage SDK wraps WebExceptions with StorageExceptions).

Everyone happy to merge? :smile:

As soon as the build passes :)

I think @ejsmith was going to look into that Redis test :wink:


[Android] Getting started with Intents in Android development using Kotlin

Topic Suggestion
Getting started with Intents in Android development using Kotlin
Proposed article introduction
Android application components can communicate with one another. This connection is based on an Intent object that represents a task description. Intents are asynchronous messages that allow application components to ask other Android components for help. You may use intents to communicate with components from the same application as well as components from other apps.
In this tutorial, we will discuss more on intents and how we can implement it in Android using Kotlin.
Key takeaways

Overview of what is  Intents
Types of Intents
How to build an intent
Examples of explicit and Implicit intents
Detect suspicious  launches of intents
Intent resolution

Article quality
This will be a detailed article and a unique one. I will use simple language for anyone to understand the concepts easily. I will also add more information on the concept of Intent resolution and Detect suspicious launches of intents which are shallowly discussed in other official documentation.
References
N/A

@davidginmaina will you build an application showcasing all these types of intents?

Hello, @WanjaMIKE
Yes it will be an application that will employ all the mentioned types of intents. It will use simple concepts of Android and kotlin language to allow all the readers to understand and implement this in their applications they will be building.
Thank You.

Okay, let's ensure that it adds value to the community. Thanks


How to release a new version?

#45 bumped the userfautlfd-sys version.
@pchickey How we can release the new version to crate.io? Do you have any workflows or commands to publich? I will add a new wiki page for the workflow for other owners. Also I'd like to have the crate.io owner to publish.

All that is required is to run cargo publish from the userfaultfd-sys crate's root directory. If you are not authenticated with crates.io, cargo publish will prompt you to login.
I have invited you to be an owner of userfaultfd and userfaultfd-sys on crates.io. I had already made your colleague hikalium an owner of userfaultfd and I added them to -sys as well.

Thanks! Published userfaultfd-sys 0.4.4 and wrote a simple page on wiki https://github.com/bytecodealliance/userfaultfd-rs/wiki


S3 Bucket Protection documentation updates

This pull requests adds additional documentation for the S3 Bucket Protection solution.

Architecture diagram added to demo/README.md will display properly post-merge.


Support request body overrides in Node.js

Current coverage is 85.12% (diff: 100%)

Merging #966 into master will increase coverage by 0.01%

@@             master       #966   diff @@
==========================================
  Files           340        340
  Lines         13294      13309    +15
  Methods           0          0
  Messages          0          0
  Branches       1740       1742     +2
==========================================
+ Hits          11314      11329    +15
  Misses         1547       1547
  Partials        433        433

Powered by Codecov. Last update d8265a9...f8e0ab0


PgAction interface, fixing #6

Implemented module as proposed by me in #6.
I'm not sure about module name though.

Should have been closed long ago


Support GROUP_CONCAT function

use group by and GROUP_CONCAT function in sparql, but only the columns in the "group by"  return results

Hi! Sorry for this problem. Do you have an example of query that does not work properly to help me investigate?

This code will work on protege, but failed in oxigraph.I use RocksDbStore to prepare_query and exec, but only the columns in the "group by" return results
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX test: <http://test.com/test/#> SELECT ?host ?service ?d ?ip (GROUP_CONCAT(?host_event) as ?event ) WHERE {      ?host rdf:type test:Host  .     ?service test:live ?host .     ?host test:ip ?ip .     OPTIONAL {       ?service test:depend ?d .     }     OPTIONAL {        ?host test:has_event ?host_event     } } GROUP BY ?host ?service ?d ?ip

Thank you for the query!
The bug happened because the code was setting the return value of GROUP_CONCAT to null as soon as a concatenated value is also null. Such null values where happening in your query because of the OPTIONALs. I have changed the behavior to ignore null values and added a test.
On a completely different topic, I have also pushed a change that improves the API to handle SPARQL results, allowing to directly iterate on BindingsIterator and get nice QuerySolution objects that allows to easily get values for a given variable name. I have updated the examples in the documentation comments.


How to get the entity id for API call like CreateUser which returns the id in the Location of Header

I'm using a api which returns URL of new user in Location header like this "https://api.kumulos.com/v1/data/1_27_users/12"
how can I get the id of the new entity with something like Task<int> CreateUser or likely?

You can use Task<HttpResponse>, and read the header out of that.
On 18 Nov 2016 15:19, "jamesatgithub"<EMAIL_ADDRESS>wrote:

I'm using a api which returns URL of new user in Location header like this
"https://api.kumulos.com/v1/data/1_27_users/12"
how can I get the id of the new entity with something like Task CreateUser
or likely?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/paulcbetts/refit/issues/278, or mute the thread
https://github.com/notifications/unsubscribe-auth/ABA5cDVBkGKo7ntwu-mUGPA8CtQ3cQkkks5q_TV5gaJpZM4K2ITP
.

@jamesatgithub so building on what @bennor said, you can complement that by using an Extension Method as follows:
using System.Linq;

public interface KumulosDataApiV1
{
    [Post("/users")]
    Task<HttpResponse> CreateUserRawAsync(UserCreationDto user);
}

public static class
{
    public static Task<int> CreateUserAsync(this KumulosDataApi api, UserCreationDto user)
    {
        var response = await api.CreateUserRawAsync(user);
        response.EnsureSuccessStatusCode();

        var id = a.Headers.Location.Segments.Last();
        return int.Parse(id); // or try/catch here.
    }
}

Thanks it works!


Readonly spread array in tuple

🔎 Search Terms
readonly tuple
💻 Code
Why does TypeScript reduce readonly modifier in the next snippet?
Or it is better to ask why does TypeScript allow readonly modifier if it makes no sense?
let a:[boolean, ... readonly string[]] = [true, '1', '2', '3'];

a[0] = false;
a[1] = 'one';

⏯ Playground Link

🙁 Actual behavior
It is completely working solution
🙂 Expected behavior
let a:[boolean, ... readonly string[]] = [true, '1', '2', '3'];
a[0] = false;
a[1] = 'one'; //no error, but it should be error

if readonly are allowed then we can't assign to a[1] in the opposite readonly are not allowed.

You forgot to fill out the issue template.

Note that this came from the following Stack Overflow question.
My speculation there is that the type [T, ...U] should be equivalent to the type of [t, ...u] if t is a value of type T and u is a value of type U.  And thus [boolean, ...readonly string[]] would be equivalent to [boolean, ...string[]] because the new array literal into which things are spread will not be readonly.  Is that the proper reasoning here?  Or is something else going on?

Note that this came from the following Stack Overflow question.
My speculation there is that the type [T, ...U] should be equivalent to the type of [t, ...u] if t is a value of type T and u is a value of type U. And thus [boolean, ...readonly string[]] would be equivalent to [boolean, ...string[]] because the new array literal into which things are spread will not be readonly, even if the original array is. Is that the proper reasoning here? Or is something else going on?

Yes, it is proper reasoning here, but
If so then it is counterintuitive to allow readonly modifier in that case.

It's legal to write readonly here for the same reason that a symbolic calculator will let you write 3 + (8 * 0) even though the 8 * part of it doesn't do anything.
If you wrote
type M = readonly [number, number];
type S = [number, ...M];

then S's intended type is (I think, clearly) [number, number]. There's no need to make you erase the readonliness for a spread; the semantics of the containing array's mutability follow directly from other spreads like those in expression space.
We generally don't break substitional symmetry unless there's a really good reason to.

@RyanCavanaugh Types script doesn't define the substation symmetry as a language entity that is why so difficult to understand exceptions like this. For me 3 + (8*0) is a special case of 3 + (8*x) where x belongs to real numbers. It is easy to think in generalized way then in the way of special cases.

Types script doesn't define the substation symmetry as a language entity that is why so difficult to understand exceptions like this. For me 3 + (80) is a special case of 3 + (8x) where x belongs to real numbers. It is easy to think in generalized way then in the way of special cases.

I… have no idea what you’re trying to say here.

That is, the reasoning in https://github.com/microsoft/TypeScript/issues/49017#issuecomment-1120512130 is correct?

Yes.

If partially-readonly arrays were a thing in general (like, anywhere...), we'd maybe consider preserving the readonlyness of the slots. But I don't think even then it really makes sense, because spread can the indices (keys) of these properties, so a [T, ...U] doesn't give you back a U-like thing anyway. It's just not clear why you would copy over the readonlyness in the first place given that the same thing doesn't happen in expression space -- TC39 could have said that [0, ...Object.freeze([1, 2])] created some hybrid object that had a mutable 0 slot and frozen 1 and 2 slots, but no one wants that kind of object.


Endpoint create new user

Description
Endpoint to create a new user.
Fixes #51
How to test?
You can test out in Swagger documentation:
http://localhost:3000/api/documentation/#/Users/post_users.
Checklist

[x] I have performed a self-review of my own code
[x] I have followed the name conventions for CSS Classnames and filenames, Components names and filenames, Style filenames, if you are in doubt check the project README.MD and here https://github.com/HackYourFuture-CPH/curriculum/blob/master/review/review-checklist.md
[x] I have commented on my code, particularly in hard-to-understand areas, if your code was simple enough mark the box anyway
[x] I have made corresponding changes to the documentation, if your code was simple enough mark the box anyway
[x] This PR is ready to be merged and not breaking any other functionality

When I try to sign in, I'm getting a POST error 403, I'm also getting it on swagger, what could it be?

When I try to sign in, I'm getting a POST error 403, I'm also getting it on swagger, what could it be?

Did you add the service accaunt key yet?
https://console.firebase.google.com/u/0/project/class17-fp-simply-name-it/settings/general/web
I see its working.
in app.js on the server :
var serviceAccount = require("../../../serviceAccountKey.json");
try {
  admin.initializeApp({
    credential: admin.credential.cert(serviceAccount)
  });
}
catch (e) {
  console.log(e)
}

We need to have this as env in Heroku also.


How to train the model?

Can you please tell me how to train the model onmy own dataset ?

ok，thanks.


Detection of IP the address of the NuvlaBox is not stable when there is no swarm cluster

When the docker daemon on the NuvlaBox is not in swarm mode, the IP address sent to Nuvla seems to be take from a random interface. And it can change at every telemetry report.

Merged into #114


cmd/go: inconsistency between 'go help test' and 'go test -h'

'go help test' and 'go test -h' present different docs.
Other go commands don't seem to exhibit such difference.
Is it intentional? If so, we need to make them mention each other.

The output of 'go test -h' is what 'go help testflag' outputs btw.

I think the fix for #6576 in CL 14502065 was a mistake. The output for go test -h before that CL was incomplete in one way before the CL and now it is incomplete in a different way.
Probably the right thing to do for go test -h is to print both the help for test and for testflag.


Split deploy task into two commands to workaround maven-jar-plugin bug.

What type of PR is this?
Bug fix
What does this PR do / why is it needed ?
This PR splits our deployment action into two separate maven commands.

The first does an install on the project, solely to kick-off APT code generation.
The second generates javadoc (which would fail without APT code generation) and performs deploy

These commands were previously smushed into a single command, but this triggered a bug in maven-jar-plugin which fails when executing JAR twice in a build for a module with no source files.
Which issue(s) this PR fixes:
None
Other notes for reviewers:
None
Does this PR introduce a user-facing change?
No

I wonder if this solves the problem we had earlier with sonar plugins as well

@akphi I believe install and deploy both execute tests, so the two commands should result in one round of testing. Will verify in the logs.

Gotcha! I guess this makes our build easier to reason about, the downside is we duplicate install steps which increases build time ~20mins I guess.
By the way, @epsstan I think we might be able to re-enable sonar (disabled by https://github.com/finos/legend-engine/pull/767)

@akphi @epsstan The deploy run post this change was notably longer than previous runs. If this continues, we can minimize run time by triggering compile on three individual persistence modules rather than install across the project.
That's the minimum required for javadoc to work, but @rafaelbey understandably concerned the build file becomes less maintainable. Also, those modules will eventually be moved out.
Will take a look at what caused the increased runtime.
When duplicate install steps run in the same command, many of the heavy-hitters are skipped:

compile is skipped
test execution is skipped

Will have to see if compile is still skipped when running sequentially.

Another thing we could do is just to split the github actions:

Test CI: mvn install (run install and test): run our tests
Deploy CI: mvn install -DSkipTests && mvn deploy javadoc:javadoc -DskipTests

If we can do what @davidsunglee suggested in step 2, we technically can bring the deploy build time down significantly.


now that mtimes has been removed from watchpack, how do we get all changed/removed files?

Feature request

What is the expected behavior?
It seems like the new version of WatchPack (v2.0.0) are getting rid of the mtimes variable. However, from my research it seems like that variable was the only way to get the list of changed files that triggered a re-compilation (source).
As such, there should be an alternative way to get this list of changed files.
What is motivation or use case for adding/changing the behavior?
Seems like a pretty useful feature for the watchRun hook, as there are already a couple people (including me) that use it.
How should this be implemented in your opinion?
Watchpack actually provides the info we need, in the variable filesModified that it passes to Watching.js. However, Watching.js doesn't use it at all. Ideally I think this variable should be provided in the watchRun hook, but it should also be fine to just store it as a property just like how it's done with removedFiles, eg in Watching.js:
this.compiler.filesModified = filesModified;

Are you willing to work on this yourself?
yes

Sounds good, send a PR

@sokra i think we should implement this in webpack@5 before stable release, can we move this in yes?

The PR was merged last year, but I think more docs would be great, as it seems like the change is only mentioned vaguely once in https://webpack.js.org/blog/2020-10-10-webpack-5-release/#new-watching, no other documentation.

It also captures more information about filesystem while watching. It now captures mtimes and watches event times, as well as information about missing files. For this, the WatchFileSystem API changed a little bit. While on it we also converted Arrays to Sets and Objects to Maps.

Luckily I was able to figure it out - the tests were esp. helpful - and changed our usage of the plugin mentioned by @maxwoo-houzz

as there are already a couple people (including me) that use it.

like so:
class WatchRunPlugin {
    apply(compiler) {
        compiler.hooks.watchRun.tap('WatchRun', (comp) => {
            if (comp.modifiedFiles) {
                const changedFiles = Array.from(comp.modifiedFiles, (file) => `\n  ${file}`).join('');
                console.log('===============================');
                console.log('FILES CHANGED:', changedFiles);
                console.log('===============================');
            }
        });
    }
}

Yes, let's documented this


Fix #311

TypeInfo.BaseType will likely return the same Type if all modules derive from
ModuleBase or some common subclass of it. Making it appear as if only one module
is registered.
Changed to TypeInfo.AsType for expected behavior.

LGTM - I'm surprised something like this wasn't picked up on earlier.

Gah, I remember bringing up that property too. Thanks for the PR!


DestructionListener (box2d extension)

How comes that DestructionListener interface is empty?

In http://box2d.org/manual.pdf chapter 11.2, the manual says there is a DestructionListener interface with a callback void SayGoodbye(b2Joint* joint).
World.setDestructionListener(...) is also not implemented btw: https://github.com/libgdx/libgdx/blob/master/extensions/gdx-box2d/gdx-box2d/src/com/badlogic/gdx/physics/box2d/World.java#L257

We don't support listening on destructions as that incures a callback from native code.

Why not just remove it, then?

Good point, so it shall be.
On Feb 3, 2015 12:03 AM, "Jesse Talavera-Greenberg" <
<EMAIL_ADDRESS>wrote:

Why not just remove it, then?
—
Reply to this email directly or view it on GitHub
https://github.com/libgdx/libgdx/issues/2678#issuecomment-72529546.


astro-eslint-parser fails to parse react-toastify module: parser.parse is not a function

Before You File a Bug Report Please Confirm You Have Done The Following...

[X] I have tried restarting my IDE and the issue persists.
[X] I have updated to the latest version of the packages.

What version of ESLint are you using?
8.57.0
What version of eslint-plugin-astro are you using?
1.3.1
What did you do?

Clone the repository: loculus-project/loculus.
Checkout the commit: 654535a.
Run cd website && npm ci.
Run the linting command: npm run check-format.

What did you expect to happen?
No errors
What actually happened?
Error while parsing /Users/corneliusromer/code/loculus/website/node_modules/react-toastify/dist/react-toastify.esm.mjs
Line 4, column 0: Unknown token at 15459, expected: "}", actual: ""
`parseForESLint` from parser `/Users/corneliusromer/code/loculus/website/node_modules/astro-eslint-parser/lib/index.js` is invalid and will just be ignored

Error while parsing /Users/corneliusromer/code/loculus/website/node_modules/react-toastify/dist/react-toastify.esm.mjs
Line 4, column 0: Unknown token at 15459, expected: "}", actual: ""
`parseForESLint` from parser `/Users/corneliusromer/code/loculus/website/node_modules/astro-eslint-parser/lib/index.js` is invalid and will just be ignored

/Users/corneliusromer/code/loculus/website/src/layouts/BaseLayout.astro
  3:32  warning  Parse errors in imported module 'react-toastify': parser.parse is not a function (undefined:undefined)  import/no-deprecated

Link to Minimal Reproducible Example
https://github.com/loculus-project/loculus/pull/3231/commits/654535a3417f83997594887cd4bd2ee605c8901e
Additional comments
I do'nt quite know why this error surfaced only now. It happens when I upgrade eslint-plugin-import from 2.29.1 to 2.31.0 - many components seem to come together here creating a strange end result.
Here's the dependabot PR that first surfaced this: https://github.com/loculus-project/loculus/pull/3231
Let me know if I should file an issue elsewhere, for now there is at least some strange parsing going on here?

It turns out others have faced this issue as well:

https://github.com/GenSpectrum/dashboards/blob/4b627465912c18846b8344fa8b69743e0c88ccbd/website/src/components/auth/UserDropdown.astro#L2
https://github.com/GenSpectrum/dashboards/blob/4b627465912c18846b8344fa8b69743e0c88ccbd/website/src/pages/500.astro#L2
https://github.com/GenSpectrum/dashboards/blob/4b627465912c18846b8344fa8b69743e0c88ccbd/website/src/layouts/base/BaseLayout.astro#L2
https://github.com/SaekiTominaga/w0s.jp/blob/616ce8007c0e11d46b2b8d3695ac68d82c899d56/astro/eslint.config.js#L35-L39


Verify that "Dealu Lămășoi" is listed in the drop-down menu

Description:
When user writes "Dealu Lămășoi" the location appears in the drop-down menu next to the comune and the county witch is a part.
Precondition:
The website is up an running.

Step 1
Write in the search bar "Dealu Lămășoi"

Expected results
The location appears in search bar as "Dealu Lămășoi" and in the drop-down menu appears as "Dealu Lămășoi, Alba (Albac)"


Implemented TrayIcon mouse right button event (#17383)

What does the pull request do?
Implements TrayIcon mouse click events (MouseLeftButtonClick, MouseRightButtonClick).
What is the current behavior?
TrayIcon don't have right mouse click event.
What is the updated/expected behavior with this PR?
Now TrayIcon have MouseLeftButtonClick & MouseRightButtonClick events.
Breaking changes
The MouseEventArgs class has been created (stores information about the cursor position when the button is pressed, as well as the button pressed), and the ITrayIconImpl interface has been updated.
Fixed issues
Fixes #17383

Avalonia generally avoids the concept of a "mouse" and instead prefers "pointer" since Avalonia supports many things that are not a Mouse.

Avalonia generally avoids the concept of a "mouse" and instead prefers "pointer" since Avalonia supports many things that are not a Mouse. Even on desktop platforms touch screens are fairly popular these days.

Indeed, this should probably reuse PointerEventArgs.
That said, even with the proper arguments, I fail to really see what this PR really gives us in its current state:

You didn't add any events to the public TrayIcon, only to the implementations, so there's nothing new usable exposed to the user. (The Impl members shouldn't be used outside of Avalonia, they're marked as Unstable.)
It really only works for Win32.

The current TrayIcon tries to target the features available in most platforms. We can discuss whether to extend it or not, but APIs that only work on a single platform should probably be kept specific to that platform. Otherwise, that's just an non-fixable bug report waiting to happen.

We can discuss whether to extend it or not, but APIs that only work on a single platform should probably be kept specific to that platform

I think this functionality should be implemented, as it may be useful in some situations. I agree that it was a mistake to implement on only one platform - I'll fix it in a couple of days.

You didn't add any events to the public TrayIcon, only to the implementations, so there's nothing new usable exposed to the user. (The Impl members shouldn't be used outside of Avalonia, they're marked as Unstable.)

I accidentally didn't commit edits in the control:)


Is there a way we can get the last message send by the BOT in a property please?

We have a requirement to Repeat the last message send by the BOT when User says Repeat. It would be really great if anyone can help me with the knowledge to capture that message in a property and show that to User when he/she/they utter 'Repeat' !!

@Stevenic This looks like something we could accomplish through a middleware. Any thoughts here?

Is there a way to do this in Composer instead of in code in a middleware class? Inside the Message Received Activity?

I would create a piece of middleware that writes it to a property off conversation state. The property will be available to composer when the Repeat intent is triggered.

This would be a great add to the community packages @garypretty

@Stevenic it would be a great help if you could point me to a sample that sets a property in middle ware please. I have created a middleware n I could capture the last message but not sure how to set a property there with the entire activity object along with suggestion actions  and make it available to composer. I m new to composer. :)

@lshade your middleware just needs to take the ConversationState class as a constructor param. You can then interact with the conversation state from your middleware and the state changes will be accessible to Composer via the "conversation.XXX" memory scope.
To add middleware to a Composer project you'll need to create a nuget package that follows the sample found here. You can then modify MultiplyDialogBotComponent.cs to install your middleware using services.AddSingleton<IMiddleware, MyMiddleware>(). The MyMiddleware class just needs to take a ConversationState as a constructor param and DI will automatically wire it up.

Sounds like an ongoing feature ask, I will exempt this from daily DRI.


Add: ruff setup and instructions on autoformatting with vscode

I think i need a bit of input on this pr - essentially it introduces pre-commit but also autosave (which has different formatters than ruff by itself.
I think we might want to setup a custom hatch environment to run tools (as an alternative to pre-commit). but i'm not 100% certain what is best here.

Whoops, was that intentional?

oh no it wasn't. what did i do?


Migrate to Alpine based image

Alpine based images are significantly smaller than other images.
Migrating to an Alpine based image would decrease the footprint of this image.

So far, migrating from ubuntu:bionic to alpine:3.8 has cut

So far, migrating from ubuntu:bionic to alpine:3.8 has cut 235MB off of the total image size.

Migration to Alpine complete, closing issue.


Import/Export: Import fails if data already exists

Steps to reproduce the problem:

Create templates, devices and flows
Export the data
Restart the dojot
Import the data that was exported
Re-import the same data or import new data / empty data

1st import is successful

data-manager log:
<17:44:30 03/06/2020> -- DEBUG: Will import data.
<17:44:30 03/06/2020> -- DEBUG: Will call delete http://flowbroker:80/v1/flow
<17:44:30 03/06/2020> -- DEBUG: Flows deleted.
<17:44:30 03/06/2020> -- DEBUG: Will call delete http://flowbroker:80/v1/node
<17:44:30 03/06/2020> -- DEBUG: Nodes deleted.
<17:44:30 03/06/2020> -- DEBUG: Nodes imported.
<17:44:30 03/06/2020> -- DEBUG: Will call http://flowbroker:80/v1/flow
<17:44:30 03/06/2020> -- DEBUG: Will call http://flowbroker:80/v1/flow
<17:44:30 03/06/2020> -- DEBUG: Flows imported.
<17:44:30 03/06/2020> -- DEBUG: Will call http://device-manager:5000/import
<17:44:30 03/06/2020> -- DEBUG: Devices and templates imported.
<17:44:30 03/06/2020> -- DEBUG: Will call delete http://cron:5000/cron/v1/jobs
<17:44:30 03/06/2020> -- DEBUG: Cron jobs deleted
<17:44:30 03/06/2020> -- DEBUG: Cron jobs imported

device-manager log:
[03/06/20 - 17:44:30] |ImportHandler| INFO:  Starting importing data...
[03/06/20 - 17:44:30] |ImportHandler| INFO:  Removed sequences
[03/06/20 - 17:44:30] |ImportHandler| INFO:  Deleted overrides
[03/06/20 - 17:44:30] |ImportHandler| INFO:  Deleted devices
[03/06/20 - 17:44:30] |ImportHandler| INFO:  Deleted templates
[03/06/20 - 17:44:30] |ImportHandler| INFO:  Saved templates
[03/06/20 - 17:44:30] |ImportHandler| INFO:  Saved devices
[03/06/20 - 17:44:30] |ImportHandler| INFO:  Restored sequences
[03/06/20 - 17:44:30] |BackendHandler| INFO:  Publishing create event to Kafka
[03/06/20 - 17:44:30] |BackendHandler| INFO:  Publishing create event to Kafka
[03/06/20 - 17:44:30] |BackendHandler| INFO:  Publishing create event to Kafka
[03/06/20 - 17:44:30] |ImportHandler| INFO:  Imported data!

the 2nd import fails

data-manager log:
<17:45:06 03/06/2020> -- DEBUG: Will import data.
<17:45:06 03/06/2020> -- DEBUG: Will call delete http://flowbroker:80/v1/flow
<17:45:06 03/06/2020> -- DEBUG: Flows deleted.
<17:45:06 03/06/2020> -- DEBUG: Will call delete http://flowbroker:80/v1/node
<17:45:06 03/06/2020> -- DEBUG: Nodes deleted.
<17:45:06 03/06/2020> -- DEBUG: Nodes imported.
<17:45:06 03/06/2020> -- DEBUG: Will call http://flowbroker:80/v1/flow
<17:45:06 03/06/2020> -- DEBUG: Will call http://flowbroker:80/v1/flow
<17:45:06 03/06/2020> -- DEBUG: Flows imported.
<17:45:06 03/06/2020> -- DEBUG: Will call http://device-manager:5000/import
<17:45:06 03/06/2020> -- DEBUG: Received error on import data, Error: Request failed with status code 400. Rejecting the request

device-manager log:
[03/06/20 - 17:45:06] |ImportHandler| INFO:  Starting importing data...
[03/06/20 - 17:45:06] |ImportHandler| INFO:  Removed sequences
[03/06/20 - 17:45:06] |ImportHandler| INFO:  Deleted overrides
[03/06/20 - 17:45:06] |ImportHandler| ERROR:  notifies_deletion_to_kafka() missing 1 required positional argument: 'tenant'
[03/06/20 - 17:45:06] |ImportHandler| ERROR:  Failed to import data

Affected version: v0.5.0-alpha.1

Ticket analysis meeting (June, 5th): It has to be fixed.

Cant reproduce the bug. Maight be resolved with by issue?

The bug has not been resolved. The error only happens if data already exists.

data-manager-7b986f99d8-8wq8m data-manager <14:08:56 04/08/2020> -- DEBUG: Will import data.
data-manager-7b986f99d8-8wq8m data-manager <14:08:56 04/08/2020> -- DEBUG: Will call delete http://flowbroker:80/v1/flow
data-manager-7b986f99d8-8wq8m data-manager <14:08:56 04/08/2020> -- DEBUG: Flows deleted.
data-manager-7b986f99d8-8wq8m data-manager <14:08:56 04/08/2020> -- DEBUG: Will call delete http://flowbroker:80/v1/node
data-manager-7b986f99d8-8wq8m data-manager <14:08:56 04/08/2020> -- DEBUG: Nodes deleted.
data-manager-7b986f99d8-8wq8m data-manager <14:08:56 04/08/2020> -- DEBUG: Nodes imported.
data-manager-7b986f99d8-8wq8m data-manager <14:08:56 04/08/2020> -- DEBUG: Will call http://flowbroker:80/v1/flow
data-manager-7b986f99d8-8wq8m data-manager <14:08:56 04/08/2020> -- DEBUG: Will call http://flowbroker:80/v1/flow
data-manager-7b986f99d8-8wq8m data-manager <14:08:56 04/08/2020> -- DEBUG: Will call http://flowbroker:80/v1/flow
data-manager-7b986f99d8-8wq8m data-manager <14:08:56 04/08/2020> -- DEBUG: Will call http://flowbroker:80/v1/flow
data-manager-7b986f99d8-8wq8m data-manager <14:08:56 04/08/2020> -- DEBUG: Will call http://flowbroker:80/v1/flow
data-manager-7b986f99d8-8wq8m data-manager <14:08:56 04/08/2020> -- DEBUG: Will call http://flowbroker:80/v1/flow
data-manager-7b986f99d8-8wq8m data-manager <14:08:56 04/08/2020> -- DEBUG: Will call http://flowbroker:80/v1/flow
data-manager-7b986f99d8-8wq8m data-manager <14:08:56 04/08/2020> -- DEBUG: Will call http://flowbroker:80/v1/flow
data-manager-7b986f99d8-8wq8m data-manager <14:08:56 04/08/2020> -- DEBUG: Will call http://flowbroker:80/v1/flow
data-manager-7b986f99d8-8wq8m data-manager <14:08:56 04/08/2020> -- DEBUG: Will call http://flowbroker:80/v1/flow
data-manager-7b986f99d8-8wq8m data-manager <14:08:56 04/08/2020> -- DEBUG: Will call http://flowbroker:80/v1/flow
data-manager-7b986f99d8-8wq8m data-manager <14:08:56 04/08/2020> -- DEBUG: Will call http://flowbroker:80/v1/flow
data-manager-7b986f99d8-8wq8m data-manager <14:08:56 04/08/2020> -- DEBUG: Will call http://flowbroker:80/v1/flow
data-manager-7b986f99d8-8wq8m data-manager <14:08:56 04/08/2020> -- DEBUG: Will call http://flowbroker:80/v1/flow
data-manager-7b986f99d8-8wq8m data-manager <14:08:56 04/08/2020> -- DEBUG: Will call http://flowbroker:80/v1/flow
data-manager-7b986f99d8-8wq8m data-manager <14:08:56 04/08/2020> -- DEBUG: Will call http://flowbroker:80/v1/flow
data-manager-7b986f99d8-8wq8m data-manager <14:08:56 04/08/2020> -- DEBUG: Will call http://flowbroker:80/v1/flow
data-manager-7b986f99d8-8wq8m data-manager <14:08:56 04/08/2020> -- DEBUG: Will call http://flowbroker:80/v1/flow
data-manager-7b986f99d8-8wq8m data-manager <14:08:56 04/08/2020> -- DEBUG: Will call http://flowbroker:80/v1/flow
data-manager-7b986f99d8-8wq8m data-manager <14:08:56 04/08/2020> -- DEBUG: Will call http://flowbroker:80/v1/flow
data-manager-7b986f99d8-8wq8m data-manager <14:08:56 04/08/2020> -- DEBUG: Will call http://flowbroker:80/v1/flow
data-manager-7b986f99d8-8wq8m data-manager <14:08:56 04/08/2020> -- DEBUG: Will call http://flowbroker:80/v1/flow
data-manager-7b986f99d8-8wq8m data-manager <14:08:56 04/08/2020> -- DEBUG: Will call http://flowbroker:80/v1/flow
data-manager-7b986f99d8-8wq8m data-manager <14:08:56 04/08/2020> -- DEBUG: Will call http://flowbroker:80/v1/flow
data-manager-7b986f99d8-8wq8m data-manager <14:08:56 04/08/2020> -- DEBUG: Flows imported.
data-manager-7b986f99d8-8wq8m data-manager <14:08:56 04/08/2020> -- DEBUG: Will call http://device-manager:5000/import
data-manager-7b986f99d8-8wq8m data-manager <14:08:57 04/08/2020> -- DEBUG: Received error on import data, Error: Request failed with status code 400. Rejecting the request

Tested in v0.5.0-alpha.3

Environment with existing data

Importing data

Version tested: 0.5.0 rc1


Support loading/storing view layout/locations in settings.json

thanks a lot for: v1.84#activity-bar-top-position
feature description:

being able to save the configuration of the [custom] tabs of sidebar in the settings.json

why?

as the explorer (C-S-e) contains tooo many views
this becomes worse when all the additional "views" from extensions (linters, documentations, build runners, servers, maven, java-project, xml document) are thrown in there as well
i split the views to suit me & would like to save it in a configuration file to be able to use it across devices and share it with peers

ideally, i would also like to rename and assign shortcut to such custom tabs too, but that ain't the scope of this issue. though it would be nice if you do this too 😋
context

all the views showed to me & how i [tried to] split them logically:

Explorer (C-S-e) related

Workspace
Java Projects vscjava.vscode-java-dependency
Maven vscjava.vscode-maven
Servers redhat.vscode-community-server-connector
Sonarlint issue locations SonarSource.sonarlint-vscode
Makefile tasks carlos-algms.make-task-provider
XML document DotJoshJohnson.xml

Editor related

Open Editors
Outline (symbols)
Docs View bierner.docs-view
Timeline (history)

explanation:

in the default hodge-podge style, i rarely use the editor related views listed above
since both the workspace & outline views have long contents & totally different contexts
so, i separated those two views

any additional views still go in default explorer tab,
so, at the top it contains "files" related views like workspace & java project. this mimics the intellij idea's project views "project, project files, ..." etc

the remaining views location followed logically

screenshot of the outcome
imagine these all and even more... in single panel 😃

titles & summaries:

when dealing with java projects, explorer tab contains too much stuff

If you want to sync view layouts across devices, you can use settings sync. If you want this layout only when for example working with java projects, you could create a java profile, then the layout would only take affect when you are using that profile.
Would this solve your case?

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!

This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!

:slightly_frowning_face: In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.
Happy Coding!


Added Variable Expansion

I want to resolve issue #11 with a few of these commits as per the style guide

Hey @theycallmemac Thanks for taking this on. Could you make all changes to the shell script to be in one pull request so that we have one pull request that will close the bug?

No problem, happy to help.


Logo

Adds the logo/emblem as an asset and uses it in the readme (#2).

Can you add /logo to .gitattributes so we don't ship it via Composer, please? 😊

Thank you so much - I love it! ❤


Consolidated linting

Motivation
Consolidated PR for linting error fixes.
Changes
Manually merged the following pull requests into this one:

Doc tests (#1899)
fix cache size in warm up (#1913)
lint mesh (#1920)
added docs and fixed lint errors for metrics package. (#1929)
fixed all linting errors we've had in log package. added comments. (#1932)
fixed all lint errors and added comments to config package. (#1933)
fixed all lint errors in prque, mainly fixed comments. (#1934)
fixed all linting errors in the eligibility package. added comments. (#1935)
linted state, databases and api (#1936)
lint meshdb.go (#1937)
added go doc for several packages (#1938)
Code cleanup for rlp/ (#1944)
Code cleanup for crypto/ (#1948)
nattraversal linting (#1956)
common/util cleanup (#1957)

bors merge

bors merge

bors merge


Add grunt for linting/minifyining/test-running

This will move jQuery-twitter from jsmin to uglify.

This was closed by PR #12.


platform specific vsix files

Currently dotexentions-build binary files are download separately. For some companies, firewall restrict's downloading these files. To support them, we need to publish these binary files part of vsix.

fixed via  #139


How to efficiently compute and store each branch's own commits?

The association between git references and commits
Related to #1004
Query the commits by a reference
When a customer consider to measure how much work has been put into a release or reference, means they want to get the difference between two different references. An implicit condition is that we must select a benchmark reference and compare the feature reference with the benchmark to find the workload they putted into.
客户想度量在某个版本或Ref上投入了多少工作量的时候，客户是想知道两个不同Ref的差异。一个隐含的条件就是，我们必须选取一个基准Ref（主干Ref），用度量Ref与基准进行对比，才能找到相应的工作量。

input
implicit input
output

Release Ref
Main Ref
commit difference set

To generalize, the customer wants to know how much content is added in a release compared to the previous release, which requires our data to be able to figure out the difference of the given two references.
泛化一下，用户还想知道，一个版本相对于上一个版本新增了多少内容，这就要求我们的数据能够挖掘出两个给定的Refs之间的差集。

input 1
input 2
output

Release Ref1
Release Ref2
Commit difference set

Both of the above are to find the commit set of a reference and compare the differences of two references.
以上两种，都是根据Ref找到commits集合，以及对比集合的差异。
Query the references by a commit
Another type of requirement is that users want to know which references contain a feature or a bugfix . This situation can be abstracted as query the references by one or more commits.
另外一类需求，用户想知道某个特性或修复，都包含在哪些Refs里。这种情况我们可以抽象为一个或多个可能，查找他们所在的Ref集合。

input
output

commit(s)
Ref set

Requirements

List references
List the difference set of the commits between Ref1 and Main
List the difference set of the commits between Ref1 and Ref2
List the references which contain the given commit

Assumption

There is a main branch, or the main branch can be figured out by certain patterns.
The comparable references are the main branch or the branches that checked out from the main branch.

Solution 1
Store the difference between a reference and the main reference in database.
Table schema
refs

Field name
type
description

ref
string
The reference name

commit
string
The commit id that this reference included

is_main
string
Whether the ref is main branch

merge_base
string
The merge base commit of the main ref and the current ref

ref_commits

Field name
type
description

ref
string
The reference name

commit
string
The commit id that this reference included

commits

Field name
type
description

...
...
...

sha
string
The commit id

topo_seq
int
The sequence number in reverse topological order. (from git repo, not API)Used by listing the references which contain the given commit

How to extract data from git and import into database
Full data import

List revisions of all references in reverse topological order, and upsert into commits table. (commits.*)
Figure out the main reference. (refs.is_main)
Extract all references we needed, include the main reference, the commit they point to, and the merge base commit between them and the main reference, and upsert into refs table. (refs.ref, refs.commit, refs.is_main, refs.merge_base)
Iterate references and get the difference set of the commits between each reference and main reference, upsert into ref_commits table (ref_commits.*)

Incremental data import

The same as full data import.
Figure out the main reference. (refs.is_main)
If the main reference changed, it' better to truncate the refs and ref_commits tables, and all steps should be the same as full data import.
Else, TODO

How to Implement the requirements

List references

select ref from refs

List the difference set of the commits between Ref1 and Main

select * from ref_commits where ref = 'Ref1'

List the difference set of the commits between Ref1 and Ref2

select * from ref_commits where ref = 'Ref1' and commit not in (select commit from ref_commits where ref = 'Ref2')
select * from commits where topo_seq > 'Ref1.merge_base.topo_seq' and topo_seq <= 'Ref2.merge_base.topo_seq'
Union a and b.(Assumption.2)

List the references which contain the given commit Sha1. (Assumption.2)

select * from ref_commits where commit = 'Sha1'
If the result of a is not empty, that means the result is the references which contain the commit Sha1
If the result of a is empty, then select * from commits where sha = 'Sha1'
If the result of c is empty, that means the Sha1 doesn't belong to this git repo.
If the result of c is not empty, select * from refs join commits on refs.merge_base = commits.sha where commits.topo_seq >= sha1.topo_seq
The result of e and the Main reference are the references which contain the commit Sha1.

Notes

Extracting data from git is a mapping of the current state of git, and does not go back to the historical state (there must be a hook for each reference change, and the logic is more complicated)
The current plan only considers unmerged references. If it has been merged, no matter whether the branch is deleted or not, it will not be processed. If we want to analyze the merged references, consider finding a way through merge commit instead of referencing.
Whether to introduce the serial number of the topological order in the commits table needs to be considered again. If it needs to be introduced, do the topological sequence numbers need to be continuous?
The ref_commits table only saves the association relationship of non-main reference. If a commit is not found in the ref_commits table, it means that it is the commit of the main reference. But it is not certain whether it belongs to other references, it requires additional calculations.

Solution 2
Store the difference between every 2 references in database.
Table schema
refs

Field name
type
description

ref
string
The reference name

commit
string
The commit id that this reference included

is_main
string
Whether the ref is main branch

merge_base
string
The merge base commit of the main ref and the current ref

ref_diffs

Field name
type
description

commit
string
The commit id that the 'ref' contains

ref
string
The reference which contains the commit

base_ref
String
The base reference

How to extract data from git and import into database
Full data import

List revisions of all references in reverse topological order, and upsert into commits table. (commits.*)
Figure out the main reference. (refs.is_main)
Extract all references we needed, include the main reference, the commit they point to, and the merge base commit between them and the main reference, and upsert into refs table. (refs.ref, refs.commit, refs.is_main, refs.merge_base)
Iterate references and get the difference set of the commits between each reference and main reference, upsert into ref_commits table (ref_diffs.*)

Incremental data import

The same as full data import(commits.*).
Figure out the main reference. (refs.is_main)
TODO

How to Implement the requirements

List references

select ref from refs

List the difference set of the commits between Ref1 and Main

select * from ref_diffs where ref = 'Ref1' and base_ref = 'Main'

List the difference set of the commits between Ref1 and Ref2

select * from ref_diffs where ref = 'Ref1' and base_ref = 'Ref2'

List the references which contain the given commit Sha1.

select distinct ref from ref_diffs where commit = 'Sha1' and base_ref = 'Main'
If the result of a is not empty, that means the result is the references which contain the commit Sha1
If the result of a is empty, then select * from commits where sha = 'Sha1'
If the result of c is empty, that means the Sha1 doesn't belong to this git repo.
If the result of c is not empty, select ref from refs where ref not in (select base_ref from ref_diffs where commit = 'Sha1' and ref = 'Main')
The result of e and the Main reference are the references which contain the commit Sha1.

Solution 3
Most of Solution 3 is the same as Solution 2, except that ref_diffs is not computed at the data extraction stage, but computed after the data is written to the database.

Final Decision: Solution 3, and covered by #1068


Tech debt weaver upgrade

Coverage increased (+0.1%) to 45.25% when pulling 84c5ee515895d4712e27981c249583190dce2607 on staging into 58057807c9633206c4fa58409b2993918b96fceb on master.


Restrict EOS project spaces sharing permissions to admins and writers

@ishank011 we might need to check if the user has the privileges when setting the permissions, but for time being, from the UI this will be hidden, so is good to go for first stage.

@labkode yes, I check that at least one of these has to be set when executing this code https://github.com/cs3org/reva/blob/55515341de154311a69dc14e0780f2a382892e56/pkg/cbox/storage/eoswrapper/eoswrapper.go#L149
The issue is that EOS never really sets the 'm' permission, so the permission's never set for any directory that isn't owned by the user. As a workaround, I'm adding a check that if 'w' and 'x' are set, we allow resharing as well. Does that sound okay?