Bug fix: In Model.put() / Model.save(), the returned promise is not rejected on error

For example, if doing a conditional save that fails, the returned promise object is resolved instead of being rejected.
This happens because the following code returns the wrong promise:
if(model$.options.waitForActive) { return model$.table.waitForActive().then(putItem).catch(deferred.reject); }

Great! Thanks for the fix.  (and sorry for the delay in merging).


error: Umbra Experiment Error after begin command in umbra-cli

After running the begin command in umbra-cli an error occurs:
:umbra> begin

: Beginning :

-> task: Experiment Begin
-> error: Umbra Experiment Error

nimaafraz@umbra-1:/tmp/umbra/logs$ cat umbracliapp-umbra-cli.log
.
.
.
2021-06-15 17:07:07,529 [INFO] umbra.cli.main: begin triggered
2021-06-15 17:07:07,535 [DEBUG] umbra.design.basis: Could not look for profile where nodes type None
2021-06-15 17:07:07,536 [DEBUG] umbra.cli.interfaces: Exception: Could not reach stub channel - exception ConnectionRefusedError(111, "Connect call failed ('<IP_ADDRESS>', 8956)")
2021-06-15 17:07:07,539 [INFO] umbra.cli.main: Could not reach stub channel - exception ConnectionRefusedError(111, "Connect call failed ('<IP_ADDRESS>', 8956)")

Looking at the aux the broker does not seem to be running:
nimaafraz@umbra-1:/tmp/umbra/logs$ ps aux | grep umbra
root       34135  0.0  0.0  11184  4812 pts/0    S+   17:03   0:00 sudo umbra-cli --uuid umbra-cli --address <IP_ADDRESS>:9988 --debug --source /tmp/umbra/fabric/
root       34136  0.2  0.3  77024 54432 pts/0    S+   17:03   0:01 /usr/bin/python3.8 /usr/local/bin/umbra-cli --uuid umbra-cli --address <IP_ADDRESS>:9988 --debug --source /tmp/umbra/fabric/
nimaafr+   41208  0.0  0.0   8168  2572 pts/1    S+   17:12   0:00 grep --color=auto umbra

Same error here. Seams like, despite the example is running on fabric, they are looking for iroha plugins during the load:
fabric@kuros-Virtual-Machine:/home/kuros/umbra/examples$ umbra-broker --uuid default-broker --address <IP_ADDRESS>:8956 --debug
Traceback (most recent call last):
File "/usr/local/bin/umbra-broker", line 7, in
exec(compile(f.read(), file, 'exec'))
File "/tmp/umbra/source/umbra/broker/umbra-broker", line 7, in
from umbra.broker.main import Broker
File "/tmp/umbra/source/umbra/broker/main.py", line 6, in
from umbra.broker.operator import Operator
File "/tmp/umbra/source/umbra/broker/operator.py", line 21, in
from umbra.broker.plugins.iroha import IrohaEvents
File "/tmp/umbra/source/umbra/broker/plugins/iroha.py", line 7, in
from iroha.primitive_pb2 import can_set_my_account_detail
ModuleNotFoundError: No module named 'iroha'

After comment the 2 lines in "/tmp/umbra/source/umbra/broker/operator.py" that call iroha libs, the broker runs, however the experiment keep failing.
root       11660  0.0  0.0  20708  4548 pts/1    S+   13:07   0:00 sudo umbra-cli --uuid umbra-cli --address <IP_ADDRESS>:9988 --debug --source /tmp/umbra/fabric/
root       11662  0.1  0.6  86360 55016 pts/1    S+   13:07   0:01 /usr/bin/python3.8 /usr/local/bin/umbra-cli --uuid umbra-cli --address <IP_ADDRESS>:9988 --debug --source /tmp/umbra/fabric/
root       32078 30.6  0.6<PHONE_NUMBER>0 pts/1    S+   13:31   0:00 /usr/bin/python3.8 /usr/local/bin/umbra-broker --uuid default-broker --address <IP_ADDRESS>:8956 --debug
root       32080 18.6  0.5  77932 46476 pts/1    S+   13:31   0:00 /usr/bin/python3.8 /usr/local/bin/umbra-monitor --uuid default-monitor --address <IP_ADDRESS>:8958 --debug
root       32082  0.0  0.0  20952  4740 pts/1    S+   13:31   0:00 sudo umbra-scenario --uuid default-scenario --address <IP_ADDRESS>:8957 --debug
root       32083 20.6  0.5  80200 48720 pts/1    S+   13:31   0:00 /usr/bin/python3.8 /usr/local/bin/umbra-scenario --uuid default-scenario --address <IP_ADDRESS>:8957 --debug
fabric     32209  0.0  0.0  17668   736 pts/0    S+   13:31   0:00 grep --color=auto umbra

Experiment:
2021-06-16 13:35:47,701 [INFO] umbra.cli.main: Executing commands: ['begin']
2021-06-16 13:35:47,701 [INFO] umbra.cli.main: begin triggered
2021-06-16 13:35:47,704 [DEBUG] umbra.design.basis: Could not look for profile where nodes type None
2021-06-16 13:35:47,710 [DEBUG] umbra.cli.interfaces: Exception: Could not reach stub grpcerror - exception GRPCError(<Status.UNKNOWN: 2>, 'Internal Server Error', None)
2021-06-16 13:35:47,711 [INFO] umbra.cli.main: Could not reach stub grpcerror - exception GRPCError(<Status.UNKNOWN: 2>, 'Internal Server Error', None)

We are currently working on the issue with the Fabric-Iroha dependencies. For the time being, you could just install the dependencies for both before running any experiments.
Regarding the grpcerror, I have been trying to update the dependencies grpclib and grpcio to see if the problem is resolved but the error still is there. It seems that evenafter updating grpclib to 0.4.1 python still uses a 0.3.2 version:
2021-06-16 15:39:42,910 [DEBUG] umbra.design.basis: Node switch s1 data: {'env': 'umbra-default', 'environment': 'umbra-default', 'lifecycle': None, 'links': {'org1': {'org': 'org1', 'profile': 'links', 'type': 'internal'}, 'org2': {'org': 'org2', 'profile': 'links', 'type': 'internal'}}, 'name': 's1', 'profile': None, 'resources': {}, 'tun_ids': 1, 'type': 'switch'}
2021-06-16 15:39:42,910 [ERROR] grpclib.server: Application error
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/grpclib-0.3.2-py3.8.egg/grpclib/server.py", line 440, in request_handler
    await method_func(stream)
  File "/tmp/umbra/source/umbra/broker/main.py", line 22, in Execute
    reply = await self.operator.execute(request)
  File "/tmp/umbra/source/umbra/broker/operator.py", line 281, in execute
    info, error = await self.start(uid)
  File "/tmp/umbra/source/umbra/broker/operator.py", line 240, in start
    acks, stats = await self.call_scenarios(uid, topology, "start")
  File "/tmp/umbra/source/umbra/broker/operator.py", line 190, in call_scenarios
    topo_envs = topology.build_environments()
  File "/tmp/umbra/source/umbra/design/basis.py", line 523, in build_environments
    if n not in envs[node_env]["nodes"]:
KeyError: None

Ok,
I think I have a lead. So I update grpclib to 0.4.1 in the setup.py but after running the install command in umbra-cli it again installs the older version of grpclib 0.3.2 and defauls on that one. I will try to change this.
:umbra> install

: Installing :

-> task: Installing Umbra at environment umbra-default
-> result: Install Umbra in environment umbra-default Ok

2021-06-17 07:54:42,158 [INFO] umbra.cli.envs: Implementing actions - ['install']
2021-06-17 07:54:42,159 [INFO] umbra.cli.envs: Implementing action - install
2021-06-17 07:54:42,159 [INFO] umbra.cli.envs: Calling action - install - Installing environment umbra-default
2021-06-17 07:54:42,161 [INFO] umbra.cli.envs: Workflow install
2021-06-17 07:54:42,161 [INFO] umbra.cli.envs: Workflow source files - action install
2021-06-17 07:54:42,161 [INFO] umbra.cli.envs: Source files - /tmp/umbra/source has files: ['umbra', 'deps', 'docs', 'umbra.egg-info', '.git', 'build', 'examples', 'aux']
2021-06-17 07:54:42,162 [INFO] umbra.cli.envs: Umbra source files already cloned to: /tmp/umbra/source
2021-06-17 07:54:42,162 [INFO] umbra.cli.envs: Executing command - install requirements, deps, umbra install
2021-06-17 07:54:42,162 [INFO] umbra.cli.envs: Running local process cd /tmp/umbra/source && sudo apt install -y make && sudo make requirements install-deps install
2021-06-17 07:55:20,017 [INFO] umbra.cli.envs: Process Status CompletedProcess(args='cd /tmp/umbra/source && sudo apt install -y make && sudo make requirements install-deps install', returncode=0)
2021-06-17 07:55:20,017 [INFO] umbra.cli.envs: Process stdout ok
2021-06-17 07:55:20,017 [INFO] umbra.cli.envs: Workflow model fabric - action install
2021-06-17 07:55:20,017 [INFO] umbra.cli.envs: Running local process cd /tmp/umbra/source && sudo make install-fabric
2021-06-17 07:55:36,656 [INFO] umbra.cli.envs: Process Status CompletedProcess(args='cd /tmp/umbra/source && sudo make install-fabric', returncode=0)
2021-06-17 07:55:36,656 [INFO] umbra.cli.envs: Process stdout ok
2021-06-17 07:55:36,656 [INFO] umbra.cli.envs: Stats: True - msg: ok
2021-06-17 07:55:36,659 [INFO] umbra.cli.envs: Replying messages
2021-06-17 07:55:36,659 [INFO] umbra.cli.envs: [None]


issues compiling ethcore/parity with rust 1.15.1

I can't compile ethcore/parity at e9eed5206. Several dependencies use serde for procedural macros.
git checkout e9eed5206
cargo build --release --verbose

error: custom derive attribute panicked
 --> /Users/j/.cargo/registry/src/github.com-1ecc6299db9ec823/ethabi-1.0.0/src/spec/constructor.rs:6:35
  |
6 | #[derive(Debug, Clone, PartialEq, Deserialize)]
  |                                   ^^^^^^^^^^^
  |
  = help: message: assertion failed: !p.is_null()

Build failed, waiting for other jobs to finish...
error: custom derive attribute panicked
  --> /Users/j/.cargo/git/checkouts/jsonrpc-a2142c7cad1a1d60/86d7a89/core/src/types/error.rs:76:35
   |
76 | #[derive(Debug, PartialEq, Clone, Serialize, Deserialize)]
   |                                   ^^^^^^^^^
   |
   = help: message: assertion failed: !p.is_null()

Build failed, waiting for other jobs to finish...
error: Could not compile `ethabi`.

Caused by:
  process didn't exit successfully: `rustc --crate-name ethabi /Users/j/.cargo/registry/src/github.com-1ecc6299db9ec823/ethabi-1.0.0/src/lib.rs --crate-type lib -C opt-level=3 -C panic=abort -C metadata=2cc91b1e3fc35b26 -C extra-filename=-2cc91b1e3fc35b26 --out-dir /Users/j/ethcore/parity/target/release/deps --emit=dep-info,link -L dependency=/Users/j/ethcore/parity/target/release/deps --extern serde_json=/Users/j/ethcore/parity/target/release/deps/libserde_json-178f5e275514a67d.rlib --extern tiny_keccak=/Users/j/ethcore/parity/target/release/deps/libtiny_keccak-a6d005939a03f5c3.rlib --extern rustc_serialize=/Users/j/ethcore/parity/target/release/deps/librustc_serialize-bdbfbfcc0fc07f27.rlib --extern serde=/Users/j/ethcore/parity/target/release/deps/libserde-81a031b46cbba5db.rlib --extern serde_derive=/Users/j/ethcore/parity/target/release/deps/libserde_derive-dd5ebf1dd35ed3f1.dylib --cap-lints allow` (exit code: 101)

I'm not proficient in the build architecture of rust, but willing to help debug this further! Let me know if any information is missing.
serde.txt

I was not able to reproduce this with rustc 1.15.1 against ethcore/parity@e9eed5206 nor ethcore/ethabi@ff7e59867a8f0ba6ffd196b96930814af96e5b2f nor ethcore/jsonrpc@86d7a89. All of those built successfully.
Does it still fail for you if you compile ethabi or jsonrpc directly?

I should have mentioned that I use rustc 1.15.1 from Homebrew.

Don't get any errors with rust 1.15.1 from rustup. Sorry for the noise!

This should no longer be a problem in Homebrew due to https://github.com/Homebrew/homebrew-core/pull/14490.


Auto Suggest component made and used in petition update page

I created a auto suggest component such that the users can select a field from the arrays in data file and also type in their own values I tried to keep the structure similar to the other components that were made. The AutoSuggest is similar to the normal input component but has some extra fields namely:
suggestions?: string[];
handleChange: (
name: 'target' | 'location' | 'title' | 'description',
value: string,
) => void;
name: 'target' | 'location' | 'title' | 'description';
I used it in the create/edit petition page

Hey, I feel like this is causing a lot of UI reflow, would it be possible to make the suggestions floating instead of adding it to main flow of the UI?

Deleted the component and brought the code to the page also added a new array named cities in data for area suggestions

This is still causing the entire page to reflow again, hence can't merge this.

Please feel fre to send us another PR when you improve the experience a bit.


Overhaul structure of schema definitions

and how they map to the schema $ids

Yep - originally I thought it was a good idea to have a totally flat structure,  but once the definitions began multiplying it was obvious they needed separating out. And once that move was made, it was, in hindsight, only a matter of time before the rest followed suit.


nan loss

Hi,
Thanks for sharing your code.
I used your code to train on FFHQ dataset. The resolution is 128X128.
All losses become NaN after few training iterations. The training losses show that they go to infinity immediately.
Do you have any suggestions?

Could you let me know your batch sizes? Total batch size is --batch * (number of gpus).

my batchsize is 4, I use single GPU to train the model.

I think batch size 4 is quite small for stable training, especially with path length regularization. You may need to adjust learning rate and disable path length regularization. (you can simply increase --g_reg_every to the number that larger than training iterations.)

I increased the --batch from 4 to 8, decreased --lr from 0.002 to 0.0002 and set --g_reg_every to be larger than the total training iterations. The loss still become NaN after few iterations.
I found that even if I disable the path length regularization and the gradient penalty, and only use generator's loss and discriminator's loss. The loss still become NaN.

I got NaN when I use other initialization of the network parameters other than the pytorch default

I am also facing this same issue. Essentially I get this problem when I try to train it in a distributed manner. I tried every adjustment of the regularization parameters, batch sizes and learning rates. But somehow it doesn't work. If I make it single GPU it works or two GPUs. The more I try to scale the training, it fails more easily

I think the nan issue might come from the softplus loss. Do not know why but the backward hook fails on softplus.

Update on my issue: there was a problem with one of my GPUs in my multi node multi GPU setup. Some gate must have been broken.


hyprland/workspaces: [error] argument not found

I use hyprland and waybar on Arch and so far I used the AUR waybar-hyprland package. I used that package for the persitent workspaces under hyprland. Since the recent version implemented native hyprland features, I switched to the package waybar but experience an error.
I get an error message on startup on my configuration of the hyprland/workspaces module:
[2023-08-12 10:14:49.958] [info] Using configuration file /home/lee/.config/waybar/config
[2023-08-12 10:14:49.958] [info] Using CSS file /home/lee/.config/waybar/style.css
[2023-08-12 10:14:49.969] [info] Hyprland IPC starting
[2023-08-12 10:14:50.023] [error] hyprland/workspaces: argument not found

This is my waybar confguration (excerpt):
    "modules-left": ["custom/power", "custom/gap", "hyprland/workspaces", "tray", "wlr/taskbar"],
    "modules-center": [],
    "modules-right": ["network", "backlight", "pulseaudio#mic", "pulseaudio", "battery", "clock"],

    // Modules configuration
    "hyprland/workspaces": {
        "format": "{name}"
    },

The error message disappears if I delete or comment out the line "format": "{name}".
My waybar package/version: waybar 0.9.20-2
My hyprland version: Tag: v0.27.2

This is the same issue reported here: https://github.com/Alexays/Waybar/issues/2271#issuecomment-1673492668
Please use the latest git version if you want persistent workspaces, as described here: https://github.com/Alexays/Waybar/issues/2271#issuecomment-1675276403 (in your case, use waybar-hyprland-git)

Thank you for the quick response, zjeffer!
I actually use the hyperland modification for wlr/workspaces already. I red about the new hyprland modules and was keen to try them out and check the functionality. I will use #2271 to stay topical on further hyprland feature development.


Add free training button to top nav (#3464)

Add free training button to top nav
Description

Related issues/PRs

Todos

[ ] Tests
[ ] Documentation
[ ] Release note

Release Note

None required

Deploy preview for calico ready!
Built with commit 1c49da3f0cd54c1c8d5b7466091314500f68fda0
https://deploy-preview-3465--calico.netlify.app


[NEON] Improve any/all implementation

On neon64, any calls vmaxvq_u8/16/32 based on data width [1]. Actually, we can always use vmaxvq_u32 as we only want to know if there are non-zero bits, regardless of the position and width.
vmaxvq_u8 does more work and is often slower than vmaxvq_u32. E.g., on neoverse n1, vmaxvq_u8 latency is 6, but vmaxvq_u32 latency is 3 (search UMAXV in neoverse n1 optimization guide [2]).
Same for neon code [3], continuous folding is not necessary.
[1] https://github.com/xtensor-stack/xsimd/blob/master/include/xsimd/arch/xsimd_neon64.hpp#L65
[2] https://developer.arm.com/documentation/swog309707/latest
[3] https://github.com/xtensor-stack/xsimd/blob/master/include/xsimd/arch/xsimd_neon.hpp#L2124

Observed better performance if always use vmaxvq_u32 for ximd::any from https://github.com/apache/arrow/pull/12399.


Jamaican Address

I am trying to use this library to parse addresses in Jamaica, However it does not parse these addresses well, in fact it never detects Jamaica as a country. It detects it as subhurb, house  or joins it with a parish and label them a city. I am new to NLP but I don't mind contributing to the training for Jamaican addresses. A lot of data is already on OpenStreetMap about Jamaica but I will be adding as I see a need.
Sample addresses:
237 Old Hope Road, Kingston 6, Jamaica W.I
237 Old Hope Road, Kingston 6, Jamaica
Arthur Wint Drive, Kingston 5, Jamaica
16 1/2 Windward Road, Kingston 2, Jamaica
54 Lyssons Road, Morant Bay, St. Thomas, Jamaica, West Indies
Mt Salem, Montego Bay, St James, Jamaica
Unit 1 Spanish Town Commercial Centre, Spanish Town, St. Catherine, Jamaica
Unit 7, 1 Brumalia Rd., Mandeville, Manchester, Jamaica
Lot 213 6 East, Greater Portmore, Portmore, St. Catherine, Jamaica
Also:
West Indies (W.I or WI) is optional
Jamaica does not use zip codes
Kingston is a parish in Jamaica
Kingston is a city and the capital of Jamaica
Kingston (the city) is in the parishes of Saint Andrew and Kingston
Kingston 2, Kingston 5 and Kingston 6 above are postal codes. Currently only the city of Kingston have postal codes. There was a project to assign postal code to the rest of the island but that was suspended indefinitely in 2007. Any reference to postal codes for Jamaica such as JMAAW10, JMDCN24 and JMBMY13 were among proposed codes of that project and not in use.
Please let me know how best I can contribute.

Hi Javid,
Thanks for writing in, and for these examples.
When the original version of libpostal was trained (the version currently in master), we didn't have address formats for a number of countries, including Jamaica, so none of the Jamaican addresses in OpenStreetMap made it in to the first training set, hence why it doesn't currently even know what to do for the country name. The formats have been added in the address-formatting repo that libpostal uses, so Jamaican addresses are definitely being incorporated into the next training.
There's a massive new update coming soon from the parser-data branch, which has more comprehensive dictionaries to help with place names. Jamaican parishes in this case are mapped to "state," which is the common term libpostal uses for all first-level administrative divisions, but in any case, these should be parsed correctly when the new model is available
It looks like OSM does not have distinct parishes for Kingston and St Andrew, just the Kingston and St. Andrew Corporation. If it's important to be able to parse those names separately, the parish boundaries will have to be added to OSM, though from the addresses you posted, it doesn't seem like the parish is included anyway for Kingston.
Looking through the few addresses currently in OSM around Kingston, it looks like postal codes are inconsistently labeled. All of these variations occur in OSM:

{"addr:city": "Kingston 5"}
{"addr:city": "Kingston", "addr:postcode": "5"}
{"addr:city": "Kingston", "addr:postcode": "Kingston 5"}
{"addr:city": "Kingston", "addr:postcode": "KGN5"}

The first version seems incorrect, and we can normalize that on the libpostal side without editing everything in OSM, just need to decide on a convention for what the correct labels should be. I think I'd prefer the 2nd and 4th versions (it seems like no one would write "Kingston, Kingston 5" so the city should probably be separated). There was only one reference to the "JMAAW10"-style postcodes in OSM, so no need to worry about that unless/until that system gets implemented. Not every postcode in Kingston was listed on an OSM address (including Trench Town's "Kingston 12", which I'm now realizing might be the first and only postal code used in popular music), so I added the "postal_code" tag to most of the neighborhoods in Kingston in OSM. As I understand it, "addr:postcode" is for buildings/individual addresses and "postal_code" is for postcodes that apply to areas, neighborhoods, etc. In the new model, we're able to use all of the named places in OSM as training examples for the parser, and if they are tagged with postal codes, those are used as well. This will help the parser recognize most place names even if there's not great address coverage (i.e. outside of Kingston and Spanish Town).
Not sure how libpostal should handle something like "Jamaica, West Indies". One option is to create a new address component that's larger than country (world_region or something like that) and add that component randomly in the training data for certain countries. This form is also used in other English-speaking Caribbean countries like St. Vincent and the Grenadines. The other option is to randomly append West Indies to the country name, so "Jamaica, West Indies" would be treated as a single country tag. Thoughts?
I will revisit the addresses in this ticket when the new model is available in a few weeks. I'll be pulling down a fresh copy of OSM this weekend, so feel free to add some places/addresses or make edits to OSM Jamaica and they'll be incorporated into the next release.
./al

Hello,
I am in the process of mapping out distinct parishes for Kingston and St. Andrew. I should update OSM over the weekend.
You are correct in saying that no one writes Kingston, Kingston 5. The city and parish are usually omitted for those address.
Concerning Jamaica, West Indies, I think an entity larger than country should be created as the West Indies is indeed a region.

Right on. I'll pick up the next dump of OSM when it finishes and get the new parishes in there. For West Indies, I'm adding it randomly to 10% of the addresses in all Caribbean nations where English is the primary language. That should give the parser plenty of examples to work with. Note: these changes will only take effect once the new model is trained/deployed.

On Saturday I added the parishes of Kingston and St. Andrew.
I noticed that you updated the parish and specified that Kingston Parish is the official name. We do not use the word Parish in the name. Unfortunately I think that convention is coming from Wikipedia in order to distinguish articles.
Also I noticed that the administrative levels on OpenStreetMap tagged the Jamaican parishes as counties and the counties as states. It should be the other way around. However unlike in the USA, for example, where states contains counties, in Jamaica the counties contains the parishes. As such I have left editing those for the time being.

Ah, my mistake. The Wikipedia names should still probably be included in at least one of the OSM name fields though ("alt_name" instead of "official_name" maybe). For libpostal it's helpful to list several alternate names, so that many different names will match the gazetteer. Even if people never write "Kingston Parish", some address data sets may come from a database that automatically assigns place names, or may be results returned from a reverse geocoder, etc. The default name displayed on maps, etc. will always be whatever's in the "name" field, and that's what will be used the majority of the time in libpostal's training data as well.
I think OSM just has admin_level 1-10, and each country's OSM community chooses how to assign those levels. The labelling in their search interface comes from Nominatim, which seems to use some US conventions.
In libpostal parlance, "state" just means whatever the first-level administrative division is and it's individually mapped per country. For Jamaica, parishes are states and for the counties I was planning on using one of our new tags, "country_region", which is a tag used for geographic regions or historical divisions of a country that don't have a current political or administrative function and are seldom used.

Hey @javidalkaruzi, libpostal 1.0 has been released into master and does much better on Jamaican addresses. Performs flawlessly on most of the above. Your Windward Road example above is used in the new demo and test cases as well.
The only problem I still see above is with some of the parish names, it does better with "Saint" instead of the "St" abbreviation. This is probably because we don't have too many OSM addresses for Jamaica, and the OSM names are "Saint Catherine", "Saint James", etc. We abbreviate toponyms some proportion of the time to avoid this, but I think in the parishes outside Kingston there are so few addresses that it never happens. It might be a good idea to add "short_name=St. Catherine", etc. to every parish boundary that frequently uses abbreviations so that we're guaranteed to get those names by hook or by crook.

@thatdatabaseguy That is good news. I have tested it on some addresses here and I am happy with the results so far. I have added the short names for parishes and will start adding for other areas that uses them soon.

Sounds good sir! You might also be interested to know we've started importing a countrywide data set in OpenAddresses, another project I contribute to that gets imported by libpostal. https://github.com/openaddresses/openaddresses/pull/2301. It's not complete but has ~20k addresses around the country. Might be useful as an address point db for geocoding, etc.


STORM-1348 - refactor API to remove Insert/Update builder in Cassandra connector

I have to add some tests but I open this PR to start its review.

@fhussonnois Can you merge with latest master and address remaining review comments?

@satishd done ;)

+1

@harshach is this PR can be merge if modifications are OK for you ? Thank you.

+1

+1


[9.x] Adds inverse method

This PR introduces an inverse method that enables us to inverse the boolean column value with a given condition, for instance, If we have a system that switches the user status if was an enabled or disabled, the implementation of the previous scenario would be like so,
/**
 * Update the specified resource in storage.
 *
 * @param  \Illuminate\Http\Request  $request
 * @param  \App\Models\User  $user
 * @return \Illuminate\Http\Response
 */
public function update(Request $request, User $user)
{
    $data = $request->validate([
        'name' => ['required'],
        'email' => ['required', 'unique:users,email,' . $user->id],
    ]);

    $toUpdate = array_merge($data, ['status' => !$user->status]);

    $user->update($toUpdate);

    return redirect()->back()->with('success', 'Data was updated.');
}

AFTER this PR gets merged
We can easily use the inverse method to inverse the user's status with a given column's name that we want to inverse its value in addition, we can provide the condition to inverse the status with some extra columns to be updated with the status.
/**
 * Update the specified resource in storage.
 *
 * @param  \Illuminate\Http\Request  $request
 * @param  \App\Models\User  $user
 * @return \Illuminate\Http\Response
 */
public function update(Request $request, User $user)
{
    $data = $request->validate([
        'name' => ['required'],
        'email' => ['required', 'unique:users,email,' . $user->id],
    ]);

    $user->inverse('status', $data);

    return redirect()->back()->with('success', 'Data was updated.');
}

You could also do this, it is a bit cleaner than in the example:
$user->update($data + ['status' => !$user->status]);

I don't know how to feel about the fact that $user->inverse(...) (I think $user->toggle(...) would be a better name) saves the updated value instantly. What about toggling multiple fields? You will have to call this method multiple times resulting in multiple queries.

$user->update($data + ['status' => !$user->status]);

From my point of view, the way that I used is more practical and clear, and according to the method name, I think that @taylorotwell decides that.

Usually toggle-like methods are not a good idea and can have some side-effects. Would look at the comments of this past PR: https://github.com/laravel/framework/pull/41958

Thanks for your pull request to Laravel!
Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.
If possible, please consider releasing your code as a package so that the community can still take advantage of your contributions!
If you feel absolutely certain that this code corrects a bug in the framework, please "@" mention me in a follow-up comment with further explanation so that GitHub will send me a notification of your response.


Disallow logical propositions with only 1 logical variable

Currently, @constraint(m, y := true) throws an error, but @constraint(m, logical_not(y) := true does not. For consistency, both should error since the user should fix the value of the logical variable instead. This PR makes adds additional checks to enforce this.

It is still needed to reformulate:
@constraint(model, y[1] ∧ ¬y[2] := true)

I have updated test_intersection_reformulation() to use this constraint for the test, which should allow for testing the line you indicate.


Namespace header component

Resolves #317
Related to https://github.com/lonelyplanet/destinations-next/pull/737

:+1


Handle Button Press

I noticed as you type in tags input
the updatetags method
keeps updating as
123:{tags:"1",tagsArray:""}
123:{tags:"12",tagsArray:""}
123:{tags:"123",tagsArray:""} ----> after this consider button you defines if pressed
I want to handle the scenario between this !! any help is much appreciated :)
123:{tags:"",tagsArray:"123"}

Hi @KashyapProdigy, you got any solution?

you got a solution?


core.bitops: Add bitwise rotate functions

Adds functions for a bitwise rotate left and rotate right operation. This operation is common enough that some architectures such as x86 have it as its own instruction; while many compilers will detect the used pattern and optimise it down to one instruction, some compilers (e.g. DMD) won't do so, in which case having this as a part of druntime allows for one hand-written assembly implementation later on.
The choice of uint as the type for the number of shifts is a bit arbitrary; any unsigned integer type would do, as the number of places to shift is usually fairly small (and wraps at T.sizeof anyway).

Yep, I can train gdc to recognise and rewrite this as an lrotate or rrotate expression. :+1:

Any opinions on isArithmetic being used instead of isIntegral? I don't know whether there are valid use cases for bit rotating a floating point value (I'm not too familiar with bit twiddling hacks). Is there any downside to allowing floating point values to be bit rotated?
Also, can anybody think of more edge cases to add to the unit tests? Especially the cast(T) is making me nervous (and it was required to get types shorter than int working).

The instructions are called ror and rol by Intel, and ror by ARM, let's stick with that.

There should also be an overload that takes the shift number as template parameter, so more efficient instructions w/ immediate argument can be used.

Pushed a new commit to address the raised concerns. I'll squash them when it's ready to merge. Time for round 2 of suggestions.
Does anybody happen to know whether it's allowed to use std.exception in druntime unittests to get assertThrown? That way I could include a couple more unittests.

Does anybody happen to know whether it's allowed to use std.exception in druntime unittests to get assertThrown? That way I could include a couple more unittests.

No, it's not possible to use phobos in druntime.

I've slightly tweaked the documentation, see af2fa26b1434ae82c617ea554bcc7bb5c49a32bb.

I see, you merged it right away without squashing the commits, though I guess the commit history isn't too bad with just two commits.
Also, I forgot to add my name to the authors list on the top, though I'm not sure if there needs to be some minimum required amount of contribution to the module before that's put there.


Update failed, retrying 2: 'str' object is not callable

Describe the bug
Logger: custom_components.dreame_vacuum.dreame.device
Bron: custom_components/dreame_vacuum/dreame/device.py:694
integratie: Dreame Vacuum (documentatie, problemen)
Eerst voorgekomen: 25 juni 2024 om 23:23:53 (11 gebeurtenissen)
Laatst gelogd: 10:42:20
Update failed, retrying 2: 'str' object is not callable
Update failed, retrying 3: 'str' object is not callable
Update failed, retrying 1: Unable to discover the device over cloud
Update failed, retrying 2: Unable to discover the device over cloud
Update failed, retrying 3: Unable to discover the device over cloud
Additional Information (please complete the following information)

dreame.vacuum.r2228o door Dreametech™ Firmware: 4.3.9_3204
Home Assistant Version: 2024.6.4
Configuration Type [With or without map support]: With map support
Errors or warnings shown in the HA logs (if applicable): see above

V1.0.4 (latest I assume)


Set up as progressive web app

Make the necessary changes to ensure this app can be used as a progressive web app, enabling a user to install it onto their device from the browser.

Manifest setup


Distance, Duration, Pace now showing -1 values after 2022.6.0

After upgrading to 2022.6.0 here's what I'm seeing in the log:
`Logger: homeassistant.config_entries
Source: custom_components/ha_strava/sensor.py:410
Integration: HA Strava 2.0 (documentation, issues)
First occurred: 12:44:53 PM (1 occurrences)
Last logged: 12:44:53 PM
Error unloading entry Strava for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 478, in async_unload
result = await component.async_unload_entry(hass, self)
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 246, in async_unload_entry
return await component.async_unload_entry(entry)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 174, in async_unload_entry
await platform.async_reset()
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 633, in async_reset
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 832, in async_remove
await self.async_will_remove_from_hass()
File "/config/custom_components/ha_strava/sensor.py", line 410, in async_will_remove_from_hass
super().async_will_remove_from_hass(self)
TypeError: async_will_remove_from_hass() takes 1 positional argument but 2 were given`

@xeospeed I have pushed some minor method param changes which will resolve the log issue.
I am still not sure what triggers all the sensors to be disabled

Re-opening this issue.
I managed to replicate this by updating a configuration for the Strava integration and then restarting HA.
On restart all the YTD and All time summary data sensors are disabled.
Worker Around for now:

Re-enable the 18 sensors
Restart HA

Just to give an additional data point: I'm seeing this as well. HA 2022.6.6, ha_strava 0.3.12 (but also saw it with I think .6? I updated in the hopes the update would fix it).
All that I can find when searching the logs for "strava" is this:
This error originated from a custom integration.

Logger: homeassistant
Source: custom_components/ha_strava/__init__.py:419
Integration: HA Strava 2.0 (documentation, issues)
First occurred: 8:11:04 PM (2 occurrences)
Last logged: 8:11:19 PM

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 986, in _wrap_create_connection
    return await self._loop.create_connection(*args, **kwargs)  # type: ignore[return-value]  # noqa
  File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1090, in create_connection
    transport, protocol = await self._create_connection_transport(
  File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1120, in _create_connection_transport
    await waiter
ConnectionResetError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/config/custom_components/ha_strava/__init__.py", line 562, in strava_startup_functions
    await renew_webhook_subscription(
  File "/config/custom_components/ha_strava/__init__.py", line 419, in renew_webhook_subscription
    callback_response = await websession.get(url=config_data[CONF_CALLBACK_URL])
  File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 535, in _request
    conn = await self._connector.connect(
  File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 542, in connect
    proto = await self._create_connection(req, traces, timeout)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 907, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 1206, in _create_direct_connection
    raise last_exc
  File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 1175, in _create_direct_connection
    transp, proto = await self._wrap_create_connection(
  File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 992, in _wrap_create_connection
    raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host REDACTED.ui.nabu.casa:443 ssl:default [None]

This seems to be related to an initial callback failing though while the platform is still booting and the nabu casa connection not already responding. I could be mistaken though.
My sensors were all still enabled, I disabled and re-enabled, restarted, but no change, still everything sitting at -1. This worked before I restarted HA this afternoon after adding some new template sensors, so the integration was set up correctly.

And now it fixed itself O_O

This works for me for the -1 issue
https://community.home-assistant.io/t/strava-home-assistant-integration/213867/78?u=bertrumuk

I'm having the -1 issue as well. When I try the method mentioned in that comment I get this error in my logs:
EntityRegistry can't be used in 'await' expression

So I was able to get things working by enabling all of the disabled entities like @craibo mentioned above. However, changing the configuration is still broken and when I try to submit it I get the following error in my logs:
Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 79, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 136, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 238, in post
    return await super().post(request, flow_id)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 62, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 109, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 277, in async_configure
    result = await self._async_handle_step(
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 359, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
  File "/config/custom_components/ha_strava/config_flow.py", line 199, in async_step_init
    _entity_registry = await async_get(hass=self.hass)
TypeError: object EntityRegistry can't be used in 'await' expression

And if I try to reload the integration I now get this:
Error doing job: Future exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/ha_strava/sensor.py", line 399, in strava_data_update_event_handler
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 532, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 570, in _async_write_ha_state
    state = self._stringify_state(available)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 538, in _stringify_state
    if (state := self.state) is None:
  File "/config/custom_components/ha_strava/sensor.py", line 334, in state
    pace = (self._data[CONF_SENSOR_MOVING_TIME]) / (
ZeroDivisionError: float division by zero

Thanks @ScottG489
I will try look into these issues over the weekend and get a fix out

I think this is fixed with https://github.com/craibo/ha_strava/commit/35896f058d820fd721e033af16692099b5f579a8


Make pip installable?

Dear n2v developers,
I've only disovered this repo recently and already use it quite a bit. Especially the torch implementation of the n2v is a huuuuge plus for me. Is there a chance to make this repo pip -installable? At a glance, all it lacks is a setup.py/setup.cfg file, does it?
Best, Johannes

Done in https://github.com/juglab/pn2v/pull/13
Thanks for the suggestion!


License change?

I just ran into this project, but immediately got turned off by custom license. Any license requires some lawyer involvement, but custom licenses are the most difficult to adopt.
Could you consider changing it to something that's widely used?
https://opensource.org/licenses/category
This is up to you, but if I may suggest permissive licesnse like MIT, BSD, or Apache. :)
https://en.wikipedia.org/wiki/Permissive_software_licence
Thanks!

At this time I cannot afford offering another license. If your project is strictly non-commercial, and no party in your project's usage chain may have a profit, you can use AVIR right away. Otherwise we may discuss a custom commercial license.


Fix malformed JSON in osd/custom_domain_misconfiguration.json

When trying to send a service log, I ran into this error. The error appeared to be a misplaced escape.
❯ osdctl servicelog post $CLUSTER_ID --dry-run --template 'https://raw.githubusercontent.com/openshift/managed-notifications/master/osd/custom_domain_misconfiguration.json' --param CUSTOM_DOMAIN='example.com'
FATA[0000] Cannot not parse the JSON template.
Error: "invalid character '.' in string escape code"

I moved the quote but I see the period in there should just be dropped. I'll fix that shortly, but I'm not sure why the test failed.

/lgtm

/approve

/lgtm


add basic movie info to show and avg rating method

Grabbing this review!

Made a commit with the change and pushed it up.  Merging.


Can't start konga with postgres 12-alpine

Hi, I'm trying to start konga with postgres 12 (docker-based) as database.
However, it cannot started.
The docker logs show this error
Postgres 11 works fine
 debug: Preparing database...
konga-prepare     | Using postgres DB Adapter.
konga-prepare     | Database exists. Continue...
konga-prepare     | error: A hook (`orm`) failed to load!
konga-prepare     | error: Failed to prepare database: error: column r.consrc does not exist
konga-prepare     |     at Connection.parseE (/app/node_modules/sails-postgresql/node_modules/pg/lib/connection.js:539:11)
konga-prepare     |     at Connection.parseMessage (/app/node_modules/sails-postgresql/node_modules/pg/lib/connection.js:366:17)
konga-prepare     |     at Socket.<anonymous> (/app/node_modules/sails-postgresql/node_modules/pg/lib/connection.js:105:22)
konga-prepare     |     at Socket.emit (events.js:198:13)
konga-prepare     |     at Socket.EventEmitter.emit (domain.js:448:20)
konga-prepare     |     at addChunk (_stream_readable.js:288:12)
konga-prepare     |     at readableAddChunk (_stream_readable.js:269:11)
konga-prepare     |     at Socket.Readable.push (_stream_readable.js:224:10)
konga-prepare     |     at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)

I can confirm this happens on PostgreSQL 12+ on macOS systems.

Postgres 12+ is not supported by the underling pg driver.

@pantsel Is this still the case or is it supported in the meanwhile?
Getting the same error as @timpamungkas, so I assume, that it is probably the case.
Are there plans to support postgres 12 at some point?

@pantsel Hi there! It's me again. Can we support higher Postgres versions as well?

I used  node ./bin/konga.js  prepare --adapter postgres --uri postgresql://<IP_ADDRESS>:5432/konga,it always error: role "root" not exist! Then I crate the root in psql,the error: A hook (orm) failed to load! I just installed the  PostgreSQL 12 ! Any news to support it?

Waiting for PostgreSQL 12 support 👍

Any updates on that?

Hi, any status about the issue?

Hi, any status about the issue?

Hi there, any update on this?

Hi there, hope some update here

Hi there, any update on this?

Hi,
The following is my resolution to make Konga v14.9 work with Postgres v14.6 after migrating from Postgres v11.
Konga has not been maintained for more than two years, and the last supported version of Postgres is version v11. Currently, we are on version 15, but I haven't tested it on this version. What follows only addresses my need on version 14.
When using the latest version of the Konga image on version 14, an authentication error is received because of change in encryption as described by @diegonc in https://github.com/pantsel/konga/issues/747

Error: Unknown authenticationOk message typeMessage { name: 'authenticationOk', length: 23 }
at Connection.parseR (/root/konga/node_modules/pg/lib/connection.js:426:9)
at Connection.parseMessage (/root/konga/node_modules/pg/lib/connection.js:345:17)
at Socket. (/root/konga/node_modules/pg/lib/connection.js:105:22)
....
....

This is because of SCRAM-SHA-256 passwords in Postgres 14, so you need to downgrade the password encryption to md5 as explained.
Please note that this change requires a restart of the database and the resetting of existing user passwords to encrypt them in md5.
Luckily for me, there were only two users, Konga and Postgres.
After modifying the database, when starting Konga, another error related to the Postgres catalog is received as described https://github.com/pantsel/konga/issues/487  and https://github.com/pantsel/konga/issues/462 :

konga-prepare     | error: Failed to prepare database: error: column r.consrc does not exist
konga-prepare     |     at Connection.parseE (/app/node_modules/sails-postgresql/node_modules/pg/lib/connection.js:539:11)
..
..

So, I started the image locally with:

docker run -it --entrypoint /bin/bash pantsel/konga

I modified the two files :
/app/config/connections.js
/app/node_modules/sails-postgresql/lib/adapter.js as described here by @RodrigoRodriguesX10 in https://github.com/balderdashy/sails/issues/6957
In my case, I also need to reduce the size of the pool (poolSize: process.env.DB_POOLSIZE by default at 10, I set it to 5) to workaround a limited configuration in db side.
Then I commited the container to image and pushed it to the Docker registry:
docker commit to modified_image > docker build with dockerfile below + docker tag > docker push.

FROM modified/konga
WORKDIR /app
EXPOSE 1337
VOLUME /app/kongadata
ENTRYPOINT ["/app/start.sh"]

The image runs perfectly and it is on Docker Hub, here

docker pull moago/konga_pg14:0.15

hope this help.
Regards

Hi,
The following is my resolution to make Konga v14.9 work with Postgres v14.6 after migrating from Postgres v11.
Konga has not been maintained for more than two years, and the last supported version of Postgres is version v11. Currently, we are on version 15, but I haven't tested it on this version. What follows only addresses my need on version 14.
When using the latest version of the Konga image on version 14, an authentication error is received because of change in encryption as described by @diegonc in #747

Error: Unknown authenticationOk message typeMessage { name: 'authenticationOk', length: 23 }
at Connection.parseR (/root/konga/node_modules/pg/lib/connection.js:426:9)
at Connection.parseMessage (/root/konga/node_modules/pg/lib/connection.js:345:17)
at Socket. (/root/konga/node_modules/pg/lib/connection.js:105:22)
....
....

This is because of SCRAM-SHA-256 passwords in Postgres 14, so you need to downgrade the password encryption to md5 as explained Postgres Docs.
Please note that this change requires a restart of the database and the resetting of existing user passwords to encrypt them in md5.
Luckily for me, there were only two users, Konga and Postgres.
After modifying the database, when starting Konga, another error related to the Postgres catalog is received as described #487 and #462 :

konga-prepare     | error: Failed to prepare database: error: column r.consrc does not exist
konga-prepare     |     at Connection.parseE (/app/node_modules/sails-postgresql/node_modules/pg/lib/connection.js:539:11)
..
..

So, I started the image locally with:

docker run -it --entrypoint /bin/bash pantsel/konga

I modified the two files : /app/config/connections.js /app/node_modules/sails-postgresql/lib/adapter.js as described here by @RodrigoRodriguesX10 in balderdashy/sails#6957
In my case, I also need to reduce the size of the pool (poolSize: process.env.DB_POOLSIZE by default at 10, I set it to 5) to workaround a limited configuration in db side.
Then I commited the container to image and pushed it to the Docker registry:
docker commit to modified_image > docker build with dockerfile below + docker tag > docker push.

FROM modified/konga
WORKDIR /app
EXPOSE 1337
VOLUME /app/kongadata
ENTRYPOINT ["/app/start.sh"]

The image runs perfectly and it is on Docker Hub, here

docker pull moago/konga_pg14:0.15

hope this help. Regards

This helped me massively. Thank you very much @mhagou .

This worked @MArK1done , thank you!

 It was super helpful

Hi,
The following is my resolution to make Konga v14.9 work with Postgres v14.6 after migrating from Postgres v11.
Konga has not been maintained for more than two years, and the last supported version of Postgres is version v11. Currently, we are on version 15, but I haven't tested it on this version. What follows only addresses my need on version 14.
When using the latest version of the Konga image on version 14, an authentication error is received because of change in encryption as described by @diegonc in #747

Error: Unknown authenticationOk message typeMessage { name: 'authenticationOk', length: 23 }
at Connection.parseR (/root/konga/node_modules/pg/lib/connection.js:426:9)
at Connection.parseMessage (/root/konga/node_modules/pg/lib/connection.js:345:17)
at Socket. (/root/konga/node_modules/pg/lib/connection.js:105:22)
....
....

This is because of SCRAM-SHA-256 passwords in Postgres 14, so you need to downgrade the password encryption to md5 as explained Postgres Docs.
Please note that this change requires a restart of the database and the resetting of existing user passwords to encrypt them in md5.
Luckily for me, there were only two users, Konga and Postgres.
After modifying the database, when starting Konga, another error related to the Postgres catalog is received as described #487 and #462 :

konga-prepare     | error: Failed to prepare database: error: column r.consrc does not exist
konga-prepare     |     at Connection.parseE (/app/node_modules/sails-postgresql/node_modules/pg/lib/connection.js:539:11)
..
..

So, I started the image locally with:

docker run -it --entrypoint /bin/bash pantsel/konga

I modified the two files : /app/config/connections.js /app/node_modules/sails-postgresql/lib/adapter.js as described here by @RodrigoRodriguesX10 in balderdashy/sails#6957
In my case, I also need to reduce the size of the pool (poolSize: process.env.DB_POOLSIZE by default at 10, I set it to 5) to workaround a limited configuration in db side.
Then I commited the container to image and pushed it to the Docker registry:
docker commit to modified_image > docker build with dockerfile below + docker tag > docker push.

FROM modified/konga
WORKDIR /app
EXPOSE 1337
VOLUME /app/kongadata
ENTRYPOINT ["/app/start.sh"]

The image runs perfectly and it is on Docker Hub, here

docker pull moago/konga_pg14:0.15

hope this help. Regards

This helped me massively. Thank you very much @mhagou .

Glad to see help @

Hi,
The following is my resolution to make Konga v14.9 work with Postgres v14.6 after migrating from Postgres v11.
Konga has not been maintained for more than two years, and the last supported version of Postgres is version v11. Currently, we are on version 15, but I haven't tested it on this version. What follows only addresses my need on version 14.
When using the latest version of the Konga image on version 14, an authentication error is received because of change in encryption as described by @diegonc in #747

Error: Unknown authenticationOk message typeMessage { name: 'authenticationOk', length: 23 }
at Connection.parseR (/root/konga/node_modules/pg/lib/connection.js:426:9)
at Connection.parseMessage (/root/konga/node_modules/pg/lib/connection.js:345:17)
at Socket. (/root/konga/node_modules/pg/lib/connection.js:105:22)
....
....

This is because of SCRAM-SHA-256 passwords in Postgres 14, so you need to downgrade the password encryption to md5 as explained Postgres Docs.
Please note that this change requires a restart of the database and the resetting of existing user passwords to encrypt them in md5.
Luckily for me, there were only two users, Konga and Postgres.
After modifying the database, when starting Konga, another error related to the Postgres catalog is received as described #487 and #462 :

konga-prepare     | error: Failed to prepare database: error: column r.consrc does not exist
konga-prepare     |     at Connection.parseE (/app/node_modules/sails-postgresql/node_modules/pg/lib/connection.js:539:11)
..
..

So, I started the image locally with:

docker run -it --entrypoint /bin/bash pantsel/konga

I modified the two files : /app/config/connections.js /app/node_modules/sails-postgresql/lib/adapter.js as described here by @RodrigoRodriguesX10 in balderdashy/sails#6957
In my case, I also need to reduce the size of the pool (poolSize: process.env.DB_POOLSIZE by default at 10, I set it to 5) to workaround a limited configuration in db side.
Then I commited the container to image and pushed it to the Docker registry:
docker commit to modified_image > docker build with dockerfile below + docker tag > docker push.

FROM modified/konga
WORKDIR /app
EXPOSE 1337
VOLUME /app/kongadata
ENTRYPOINT ["/app/start.sh"]

The image runs perfectly and it is on Docker Hub, here

docker pull moago/konga_pg14:0.15

hope this help. Regards

This helped me massively. Thank you very much @mhagou .

Glad to see it helped you @MArK1done :)

@mhagou do you have the link for your repo?


Discussion: how to guarantee unique plugin ids

How should we guarantee plugin names are unique?  There may be lots of folks who create a 'Flat' theme.  How do we separate these so we know which is which?

If development is based around github, then package names could be prefixed with github username/org

What is the "plugin name" and why does it need to be unique?

Let's pivot this, you're right...
Plugin ID should be unique... and names could be repeated

Unless you are planning to create a package repository - like nuget - we can't guarantee any uniqueness at a global level.
However, when you (the admin) import the plugin the Site should assign it an ID that is guaranteed unique for "this site"

Unless you are planning to create a package repository - like nuget - we can't guarantee any uniqueness at a global level.
However, when you (the admin) import the plugin the Site should assign it an ID that is guaranteed unique for "this site"

Local uniquness is quite unusual cause it allows have change of "conflict" for local sites which no one will capable of fixing.
I assume we need to create a Guid for each type, and best Id for the plugin is the Type.GUID for the plugin Type inside the plugin.
We can add more fields into manifest.json including PluginID wich will match the Type.GUID we create as a plugin implementation.
If we do not want to add any of the .dll, then PluginID will be a generated GUID from our future Plugin Package generator, so the general rule of thumb will be:

We will compare ONLY manifest.json PluginID, despite of any other fields

Reasoning.
Use case:
We prevosly published plugin with good bunch of controls and themes with .dll, and we changed our mind and published in centralized repo the next version of the exactly the same plugin ID but without any of the .dll s which we found cumversome and confusing or we split plugin functionality to 2 plugins - the theme-only and control-only, etc.

If Manifest PluginID are the same - we warn user about possible conflict and we inform user about possible errors.

Main Site do not generate PluginID by itself, and relay solely on a separate Packaging Manager (local or centralized) for the application (web or CLI)

In case we have a .dll we should have created a static PluginInfo class with public static (optional) Method Register for registering Plugin with the argument of interface IPluginManagerOptions for registering plugin within Plugin Manager Builder with some options we want to specify for Plugin Manager to pick and set as PluginID for our generated PluginID field in a manifest.json.

we could use a hashtag of the “DLL” which would then be mentioned on the Sharpsite homepage and create a kind of disclaimer for “private” distributions of the respective developers.
For example, a plugin that was not created for SharpSite for “original”, the whole thing is displayed in a security query with a dialog to the user / hoster of Sharpsite. I am thinking of a simpler way like CodeSigning as it is already used in Windows.
What do you think about it?

@deepx
Yeah, sounds interesting.
Oh, I remember that I used ClickOnce a lot in a past for distributing applications over the internet. As I remember, it has packaging system and command-line tools for preparing packages offline (CD-distribution, for example) and signing tools.
As I know standard classical .NET assembly signing tools were shipped with SDK and could be used for verifying and authoring by signing assemblies with original signatures.
For example .dll used in project might be licensed and signed using strong name keys (.snk) files with passwords and licensing system might be enchanted to use for distribution.
IMHO, it was quite hard to protect assemblies without obfuscation and special native unpackagers embedded right into assembly which were simply an empty containers for native x86 UPX-based unpackers with some extra in-memory manipulations and COM+ licensing were super complex in implementation and hard to debug and support.
So classical plugins licensing and verifying always be a mess for a developer to maintain. But for some quick and dirty solutions might be Okay (as for open-source / non-commercial product)


[BUG] Can't set dataTransfer in drag and drop directives

Hello!
Can't understand how to set dataTransfer
I think setData must set in tuiDragStart, is it true?
But I can't get data in tuiDroppableDragOverChange
source code
https://stackblitz.com/edit/taigacdk?file=src%2Fapp%2Fapp.component.html

Drag directives are just wrappers around native events for mousedown -> mousemove -> mouseup. I suppose the name is confusing, because you might expect it to be wrapped around drag events. Typically we use it for resizing containers, dragging carousel and things like that. Drop directive is used for file input drag and drop (the input will be released in upcoming package). @MarsiBarsi what do you think, maybe we should rename it?

Hey everyone 👋
Fine, I don't mind renaming, but I don't see a better name for this thing right now. Do you have ideas?

Since we already released 2.0 we cannot rename as it will be breaking change. @AnteaterKit wrote in the other issue that examples in code have cleared our drag-drop directives behavior for him so I believe we can close this issue now. If any questions will arise, a new issue can be opened, or perhaps a topic in Discussions section.

Since we already released 2.0 we cannot rename as it will be breaking change. @AnteaterKit wrote in the other issue that examples in code have cleared our drag-drop directives behavior for him so I believe we can close this issue now. If any questions will arise, a new issue can be opened, or perhaps a topic in Discussions section.


make refactor and insert thread

make it multi-thread to enable to token swap feature. And to refactor some of the parts to make it easier to be maintained

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


Add NER  training data guide.

Summary
Describe your changes here.
Fixes #Issue_Number (if available)

Internal previews

📄 File
🔗 Preview link

docs/machine-learning/how-to-guides/ner-dataset-guide.md
How to format data for Named Entity Recognition (NER)

Related to #39353


Allow a default class

It would be great if the default could be an class instead of an object or null.  The use case around this is sometimes the schema evolves so that it adds a type, and it would be helpful to read old messages into a class.

Ditto I frequently do something like this as a default.
class Unknown(val jsonValue: String): Foo()

Idea being the data is retained so as types get added even an unknown has enough context to see what came in at a breakpoint or log statement later on.

this only works with Moshi's API, which doesn't support these cases. Am I missing something?

Closing for now as moshi's polymorphic adapter doesn't support this. We can revisit if that changes


test

Codecov Report

Merging #895 (1627e8a) into main (23f39cf) will decrease coverage by 3.78%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #895      +/-   ##
==========================================
- Coverage   38.92%   35.13%   -3.79%
==========================================
  Files          31       31
  Lines        9703     9707       +4
==========================================
- Hits         3777     3411     -366
- Misses       5420     5822     +402
+ Partials      506      474      -32

Impacted Files
Coverage Δ

KubeArmor/core/crioHandler.go
0.00% <0.00%> (-63.87%)
:arrow_down:

KubeArmor/core/dockerHandler.go
0.00% <0.00%> (-47.53%)
:arrow_down:

KubeArmor/monitor/processTree.go
86.02% <0.00%> (-9.68%)
:arrow_down:

KubeArmor/core/kubeArmor.go
45.79% <0.00%> (-4.87%)
:arrow_down:

KubeArmor/common/common.go
39.38% <0.00%> (-3.87%)
:arrow_down:

KubeArmor/enforcer/runtimeEnforcer.go
32.65% <0.00%> (-1.37%)
:arrow_down:

KubeArmor/core/kubeUpdate.go
35.84% <0.00%> (-0.78%)
:arrow_down:

KubeArmor/enforcer/appArmorEnforcer.go
47.71% <0.00%> (-0.49%)
:arrow_down:

KubeArmor/feeder/policyMatcher.go
41.26% <0.00%> (-0.35%)
:arrow_down:

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


Unmap Space level named groups

Hi,
The present cf-mgmt plugin is unmapping only default security groups. Can you add a similiar logic for space level named security groups.
Thanks for your help in advance.

Released with 1.0.26


Initial stab at fetching bookmarks within content.

This selectively adds a _browser object to tofino pages. We need to hook this up to actually fetch bookmarks, and then make the page look good.
Oh, and <a> inside these pages doesn't work with target='_new'…

Coverage decreased (-0.08%) to 41.502% when pulling fd5aede7c03e9576f8f34d9787da53163974d279 on rnewman/about-history into c09c00c0edf3e8749ff3e6e96f92c93fe5b22d53 on master.

This now does history, too.
@bgrins, take a look?
Note that Electron seems to remove _browser from window when navigating to a different page, so nothing leaks here.

Redirecting to @jsantell

r+ with comments addressed; does target work if you did anchorEl.setAttribute('target', '_new')?

Landed.


fix tests

Summary of the Pull Request
fix tests

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@f6473c6). Click here to learn what that means.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #3107   +/-   ##
=======================================
  Coverage        ?   29.97%
=======================================
  Files           ?      127
  Lines           ?    13896
  Branches        ?        0
=======================================
  Hits            ?     4165
  Misses          ?     9731
  Partials        ?        0


This plugin causes JavaScript heap error

Issue

I have quite a few plugins and I went through the process of disabling them in order to find which one was causing a memory leak leading to Homebridge crashing every day. After disabling this plugin, Homebridge has not crashed at all in a few weeks.
Not sure why the plugin is causing errors, but I have a hue bridge v1 that works fine with home assistant, not this Homebridge plugin though
Log Messages

Debug Files

https://www.icloud.com/iclouddrive/053O45wBPkJU7f3kUuPZh8blA#homebridge-hue

Do you also see a crash when running Homebridge Hue in a separate child bridge?  Please attach a debug log file of Homebridge starting and of the error / crash.  What makes you think there's a memory leak?   How do you monitor memory usage?  Please provide logs.


Postgres 9.6 compatibility

Change in Postgres codebase:
https://github.com/postgres/postgres/commit/2c6af4f44228d76d3351fe26f68b00b55cdd239a
breaks the londiste build, as keywords.h has been moved from parser directory to common directory. We can use CATALOG_VERSION_NO>=201603211 to detect the correct location of keywords.h and include it.
CATALOG_VERSION_NO value related to this commit is defined here:
https://github.com/postgres/postgres/blob/2c6af4f44228d76d3351fe26f68b00b55cdd239a/src/include/catalog/catversion.h

For additional reference, this is the commit that moves the keywords.h file:
https://github.com/postgres/postgres/commit/2c6af4f44228d76d3351fe26f68b00b55cdd239a#diff-769b10b3d7369cbe759f1148f347c237


Handle (somehow) prescription execution inside of the pipeline/multi

There are two cases that should be solved:
1. script was not preloaded but attempted to be executed:
script = Redis::Prescription.new("return redis.call('GET', 'answer') or 42")

$redis.multi do |redis|
  redis.set("answer", "why so serious?")
  script.eval(redis)
end

2. scripts were flushed since they were loaded
script = Redis::Prescription.new("return redis.call('GET', 'answer') or 42")

script.bootstrap!(redis)

$redis.multi do |redis|
  redis.set("answer", "why so serious?")
  redis.script("flush")
  script.eval(redis)
end

Most safe solution I see is to run eval instead of evalsha when client is inside pipeline mode.


PHP Indexer

Just a heads up that I created a PHP implementation of the indexer: https://github.com/CivicActions/lunr.php
This could be useful for anyone that wants to use Lunr.js but doesn't have node on the server (ie Drupal, Wordpress etc).
It doesn't have boosts and some of the features. Feel free to close this once you've read it.

Closing this as it was created for visibility. Thanks @olivernn for the amazing library. Excited to use it in some high-profile sites and to make it easier for folks using PHP to implement.

@acouch sorry for not responding earlier, this is awesome work, thank you for sharing! I think I'll put together a page in the documentation about this and the python implementation.


Support latest aiida-shell 0.8.0

Here is the release log

[ ] Change the signature of custom parser functions. I think we only need to update the docs, in the section which use parser. When you do this, please also fix #314.
[ ] A new prepare_shell_job_inputs function, which will solve #315

I think we need two PRs to implement theses. @agoscinski , @GeigerJ2 , do you want to work on this? If I am missing something else, please add a comment.

Hi @superstar54, I discussed with @agoscinski and I will take care of both issues. Cheers!

For the second issue, the idea is to use the prepare_shell_job_inputs inside the prepare_for_shell_task function to prepare inputs for the ShellJob task.

closed by #326


Refactor canvas context to allow presenting as image

Background
This is a first step in the "update propagation" work. One of the goals of that work is to clearly separate rendering from events. And thus webgpu API from canvas API. A thought that played through my mind was to implement the wgpu.gui in a separate package. I don't think I want to go that far (for now), but I definitely want to avoid leaking any wgpu-specifics into the gui subpackage.
Problem
The CanvasContext is the thing that ties  webgpu and the gui layer together. It enables webgpu to draw into a GUI window. This works ok as it is, but e.g. the offscreen canvas implements its own version of a CanvasContext, which is an abstraction leak.
Proposal
This PR refactors the CanvasContext as well as the WgpuCanvasInterface so that the canvas can indicate how it wants the canvas to draw into it. It can either let it draw to the screen, or provide the canvas with the resulting image.
This makes offscreen canvases less special, so they won't have to hack their own fake context. It also allows other canvases to use images where it makes sense, e.g. a Tk backend, or Qt on Wayland, etc.
Details
The WgpuCanvasInterface.get_surface_info() returns a dict. That dict has at least a "method" field, which is either "screen" or "image". When it is "screen", it also provides "window" (and "display" too on Linux), like it did before. The dict can also provide capabilities like "formats" to indicate supported texture formats.
The WgpuCanvasInterface.present_image() method must be implemented if a canvas wants to support the image method.
Benchmarks
FPS measurements (with max_fps=999). Shown are fps for screen / image. Using a light scene (cube) and a heavy one (sponza).

640x480 cube
fullscreen cube
640x480 sponza
fullscreen sponza

MacOS M1
120 / 130
110 / 33
28 / 22
23 / 14

Windows with Geforce RTX 2070
144 /  105
67 / 47
9 / 9
8 / 8

Linux with Intel UHD 730
60 / 190
60 / 38
17 / 9
4 / 3

Windows with Intel UHD 730 on Vulkan
60 / 150
56 / 37
23 / 14
10 / 7

Windows with Intel UHD 730 on D3D12
60 / 120
56 / 35
na
na

Observations:

There's certainly a performance penalty for rendering via an image.
The penalty scales with the size of the window, as expected.
When drawing to screen, we can observe an fps limit that's not present when drawing via an image.
My Windows laptop's GPU is rubbish?

Remarks:

This was tested with Qt. I would expect that Qt renders the image to screen really fast, but other solutions might do it faster.

Tasks

[x] Basics working with Qt
[x] Do performance benchmarks to have a better idea of the penalty for using the image method.
[x] Remove flicker on Windows (introduced in (earlier version of) this pr).
[x] Fix panic when process ends.
[x] ~Can we get rid of CanvasContext.present(), since its not official webgpu api?~ later
[x] Adjust other backends.
[x] Use this as a workaround to fix Qt support on Wayland.
[x] Clean up / check todos.
[x] Update status in #92

Changelog

The WgpuOffscreenCanvasBase class is removed. Offscreen canvases can be implemented by returning the appropriate dict in canvas.get_surface_info() and implementing canvas.present_image().
The canvas.get_surface_info() method is renamed canvas.get_present_info() and must the returned dict has new specifications.
The canvas.present_image() method can be implemented to support presenting via an image.
The Qt and wx backends now also work on Wayland (though with a performance penalty).

I have more plans with the GUI subpackage, but I'll apply/propose these in separate pr's.

@Korijn this is ready for review.


Add yet another TS0043 variant

This one reports four on/off switches , just like the TuyaSmartRemote0042TOPlusA does, and also in general the profile looks just like that (except with one more physical button). Thus I named this quirk TuyaSmartRemote0043TOPlusA.
However, I did deviate in the modelling of the replacement endpoints, and instead of copying them from the TS0042 variant, I decided to model them more closely on the other TS0043 variants. (I have no clue if that's a good or bad idea, advice is highly welcome, I am new to this).
I got it from AliExpress.

The profile looks like what was reported on issue #1699 so perhaps this PR fixes that, too, although there we have "manufacturer": "_TZ3000_uyjmm0et",  while for mine the id is _TZ3000_w3c7ouru.
Likewise, issue #1683 with _TZ3000_kkahwiyu probably is resolved by this.
Finally, I think issue #1557 is related, and a similar quirk ought to be added for TS0041, but I don't have such a device to test.

Oh and also #1990 (or at least the second part of it, it seems to talk about two devices?))

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

4 of 4 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.008%) to 83.492%

Totals

Change from base Build<PHONE_NUMBER>:
0.008%

Covered Lines:
6737

Relevant Lines:
8069

💛  - Coveralls

Codecov Report
Base: 83.48% // Head: 83.49% // Increases project coverage by +0.00% :tada:

Coverage data is based on head (9615674) compared to base (2296895).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #2074   +/-   ##
=======================================
  Coverage   83.48%   83.49%
=======================================
  Files         249      249
  Lines        8065     8069    +4
=======================================
+ Hits         6733     6737    +4
  Misses       1332     1332

Impacted Files
Coverage Δ

zhaquirks/tuya/ts0043.py
100.00% <100.00%> (ø)

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

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

Missing the SimpleDescriptor for all endpoints that making it easier for devs and user finding the right quirk then testing new devices.

Missing the SimpleDescriptor for all endpoints that making it easier for devs and user finding the right quirk then testing new devices.

I've never used that comment tbh. It's also not there for many other Tuya remotes or quirks in general.
But you're correct that it is present for all other remotes in that file.
There's an experimental quirk generator/matcher here: https://github.com/zigpy/zha-device-handlers/tree/dm/quirk-stub-generator/quirk_generator (that doesn't need comments)
@fingolfin Maybe add the comment with the SimpleDescriptor. It should be the following if I'm correct (add that before model – see other quirks in that same class for reference):
        # SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=0, device_version=1, input_clusters=[0, 1, 6, 57344], output_clusters=[10, 25]))
        # SizePrefixedSimpleDescriptor(endpoint=2, profile=260, device_type=0, device_version=1, input_clusters=[1, 6], output_clusters=[])
        # SizePrefixedSimpleDescriptor(endpoint=3, profile=260, device_type=0, device_version=1, input_clusters=[1, 6], output_clusters=[])
        # SizePrefixedSimpleDescriptor(endpoint=4, profile=260, device_type=0, device_version=1, input_clusters=[1, 6], output_clusters=[])

Its good then its in place and is right but some have only copy the last device class and making changes on the endpoints and not updating the simple discretion and that is very bad then trying !fast patching" testing new devices for users (still must recalculating Dec / Hex).

I'll look into it later today

Added the SizePrefixedSimpleDescriptor now.


Future of @schematics/package-update

As far as I know, @schematics/package-update is no longer a dependency of Angular CLI. (Latest version of CLI that uses this package is 6.0.0-beta.7) But why there is still new releases of this package?
For reference: https://github.com/angular/angular-cli/commit/33a6823df121ea024afd5c0571eaee0d7eb34052

No future. That schematics was only updating the package.json and not doing anything else. The new update schematics also run migrations and validate peer dependencies properly.
It's still released because it's part of our monorepo and we publish all packages. I'll disable it at some point, so letting this issue open for tracking this.


Add benches

Resolve #830

cargo bench

Output:
     Running target/release/deps/parser-9219a509bec6327a

running 2 tests
test bench_parse_to_ast ... bench:  60,803,145 ns/iter (+/- 4,723,694) = 1 MB/s
test bench_tokenization ... bench:  49,881,125 ns/iter (+/- 2,945,707) = 1 MB/s

test result: ok. 0 passed; 0 failed; 0 ignored; 2 measured; 0 filtered out

Codecov Report

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

@@           Coverage Diff           @@
##           master     #846   +/-   ##
=======================================
  Coverage   63.19%   63.19%
=======================================
  Files          87       87
  Lines       14467    14467
  Branches     3272     3272
=======================================
  Hits         9143     9143
  Misses       3178     3178
  Partials     2146     2146

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 319bb80...c77b38d. Read the comment docs.

Did you see this folder? https://github.com/RustPython/RustPython/tree/master/benchmarks

@windelbouwman
Yeah, i know that folder. if you decided to use Python to write benchmark, So how do we write some internal benchmarks? e.g lexer, parser.

Okay, that is good. Could you move the benchmarks into the benchmarking folder so that we do not duplicate the nbody.py and mandelbrot.py files? Also, we would have a single benchmarking directory with multiple types of benchmarks.

@windelbouwman
I turned off the stdout of nbody.py and mandelbrot.py files.
because they were not necessary for a benchmark.


Added dont throw error flag field

User can indicate a dontThrowErrorFlag on the fields to send the error message on to the next step

Not sure how to approve from the mobile app but approved


Add schema validation: Input Objects must not contain non-nullable circular references

Input Objects are allowed to reference other Input Objects. A circular reference occurs
when an Input Object references itself either directly or through subordinated Input Objects.
Circular references are generally allowed, however they may not be defined as an
unbroken chain of Non-Null fields. Such Input Objects are invalid, because there
is no way to provide a legal value for them.
The following examples are allowed:
input Example {
  self: Example
  value: String
}

This is fine because a value for self may simply be omitted from the arguments.
input Example {
  self: [Example!]!
  value: String
}

This also works as self can just contain an empty list.
The following examples are invalid:
input Example {
  value: String
  self: Example!
}

input First {
  second: Second!
  value: String
}

input Second {
  first: First!
  value: String
}

Spec change: https://github.com/graphql/graphql-spec/pull/445
Reference implementation: https://github.com/graphql/graphql-js/pull/1359
I think this might be added to a 0.13 release, since the relevant spec change is just a clarification.

That's great, thanks!


docker-browser-server to open container ports (?)

is it possible to map any specified ports inside the container to the host (analog of the -P flag in the docker CLI)?
sudo docker run -t -i -P ubuntu bash

E.g.
docker-browser-server -P ubuntu

whats your use-cause for this? it already maps 80 to an external port so you can just bind to that

for example I am running a server in the container, and I want to be able to connect to this server from a client application installed on another machine. now a container spawned by docker-browser-server does not expose any ports and is identical to:
sudo docker run -i -t ubuntu

It exposes 80 already, https://github.com/mafintosh/docker-browser-server#expose-a-http-server - Do you need to expose something else besides that port?

imagine I am running a mysql database on port 3306 in the container

ah ok. you cannot currently do that but I could add an option what allow you configure this (like a opts.configure function that would work like this)
server('mafintosh/dev', {
  configure: function (opts) {
    opts.ports[someRandomPort] = 3306
  }
}

would that solve your problem?

Here I guess you are manually setting the host port (someRandomPort), which is equivalent to:
sudo docker run -i -t -p someRandomPort:3306 ubuntu /bin/bash

This means that you cannot spawn more than 1 container.
Is it possible to support this (it will take the port from the EXPOSE statement in the Dockerfile and assign a random port on the docker host):
sudo docker run -i -t -P ubuntu /bin/bash

@mafintosh, I suppose that should be implemented in docker-run.

by someRandomPort i mean you would use a random port for every container (similar to what we do here, https://github.com/mafintosh/docker-browser-server/blob/master/index.js#L47)

someRandomPort should be random for every container, that's right. So that you can run more than one container on the host system (otherwise docker will fail to launch those).

@mafintosh yeah, I looked at the code, so you're exposing two container ports by default (80 and 8441). However, how will the container user know which ports on the host have been mapped to container ports 80 and 8441? (I can see it with docker ps on the host, but the user doesn't have access to it). Is it possible to set env variables for him?
It would be nice if you could specify other ports while starting docker-browser-server, e.g.:
docker-browser-server -P ubuntu
# this would map all ports specified in the container (Dockerfile) to random ports on the host

or
docker-browser-server -P 3306 3307 3308 ubuntu
 # this will map a set of container ports to random ports on the host

env vars seems like a great idea. like PORT_3306 = the_real_port ? I like the -P option as well.

Regarding env variables, I think we have $HOSTNAME and $CONTAINER_ID mixed up. Correct me if I'm wrong.
root@0529e78a3563:/home/dcdb$ env
HOSTNAME=0529e78a3563
HOST=http://**lrpk1bhrtmg3nmi**.c.nds-devel.cosylab.com:8081
TERM=xterm
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PWD=/home/dcdb
PS1=\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]$
SHLVL=3
HOME=/root
LESS=RS
CONTAINER_ID=lrpk1bhrtmg3nmi
PORT=80
_=/usr/bin/env

nds@ubuntu14-pmaslov:~$ sudo docker ps -sl
CONTAINER ID        IMAGE                 COMMAND                CREATED             STATUS              PORTS                                                      NAMES               SIZE
0529e78a3563        pmaslov/dcdb:latest   "/bin/sh -c /run-con   7 minutes ago       Up 7 minutes        5000/tcp, <IP_ADDRESS>:37855->8441/tcp, <IP_ADDRESS>:38545->80/tcp   sharp_hypatia

@mafintosh, PORT_3306=the_real_port will be fine


CMR-Graphic sparse/dense bug

When testing I found this weird case:
temptestfile.sparse.txt
CMR-graphic concludes it is graphic, but the output is clearly wrong as it places all columns parallel in a cycle:
cmr-graphic -o dot temptestfile.sparse

Read 4x5 matrix with 20 nonzeros in 0.000023 seconds.
Matrix IS graphic.
graph G {
 v_1 -- v_2 [label="r1",style=bold,color=red];
 v_10 -- v_1 [label="r2",style=bold,color=red];
 v_9 -- v_10 [label="r3",style=bold,color=red];
 v_13 -- v_9 [label="r4",style=bold,color=red];
 v_2 -- v_13 [label="c1"];
 v_2 -- v_13 [label="c2"];
 v_2 -- v_13 [label="c3"];
 v_2 -- v_13 [label="c4"];
 v_2 -- v_13 [label="c5"];
}

Ofcourse, I realized later that I forgot to add -i sparse to my command. However, the sparse matrix  being interpreted as a dense matrix is clearly quite not desirable; shouldn't it just crash?

First, it should not report that it is graphic, because the (beginning of the) file, interpreted as a dense matrix, is
4 5
12 1 1 1 1
4 1 1 5 1
2 1 1 2 3
1 2 5 1 3

which is not even binary, so certainly not graphic. I can think of the following:

Stop for non-binary matrices (makes sense).
Stop after reading although the file was not read completely (makes sense).
Stop reading a dense (resp. sparse) matrix if the line with the first tokens does not contain just two (resp. three). This is clearly more effort since scanf() will not be able to tell this. What do you think, @rolfvdhulst

I think All three suggestions would make sense. I would probably go with 1., provided that there are no users which rely on this behavior.


fix: update main.yml to get hidden coverage file

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 97.24%. Comparing base (1b2d2ad) to head (0ed23cf).
Report is 10 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #19   +/-   ##
=======================================
  Coverage   97.24%   97.24%
=======================================
  Files           3        3
  Lines         145      145
=======================================
  Hits          141      141
  Misses          4        4

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Significance marks in raincloud plot

We should add the typical brackets to indicate significant results between groups.
This also means we should check that the stats table we are displaying is in fact related to the group data we are plotting.

I transferred this to stats because the plot-raincloud method is in q2-stats now

We have bigger fish to fry. So let's consider this unplanned for now.


taracotta-parent inaccessible

dependency on terracotta-parent 5.0.0.alpha1 dependency is inaccessible.  A new version of taracotta-parent needs to be published and the dependency should be updated here.
Once this dependency is fixed.  This repository should be built on cloudbees and published publicly

https://github.com/Terracotta-OSS/terracotta-parent/issues/5

Nothing to do here, the terracotta repository information is already present in the root pom.


LCN: LCN-GT6 every now and then makes thrice the sound of button touch

Hello. I am using HA 0.106.2 together with LCN Integration in my apartment. The coupling occurs using PKE.
This works without any problems, all of the lights and motors work exactly as expected - I had to use steps200 config though.
What confuses me, is that every now and then, one of the GT6s - there are multiple, unpredictable which one is affected - makes a zzz noise like when you use the buttons on it. Exactly thrice, without anything being turned on or off. This always happens at a time of day that ends with a 7. like 12:27 or 13:47 or 09:17 etc... Maybe coincidence.
I tried to use the logbook, activated --debug and --verbose; however HA seems to either not notice this, or is causing this without logging.
I tried to turn off time synch on PKE, however this problem still persists.
Apart from LCN, there are Hue lights, and Tado thermostats and some other stuff like netatmo, TV.
Can you maybe point me to a direction how to resolve this?

Hi please do not delete the issue template, all requested information is important in order to help you out.

Hi @isk0001y ,
three beeps means that the module attached to the GT6 has received a faulty telegram. This may occur when many telegrams are received and sent by a module in a short time frame. Each 10 minutes all modules are polled for status changes which potentially can lead to such a situation.
I would suggest to disable the beeping on faulty telegram option for all modules using LCN-Pro.
As this is a known problem with the LCN system (and occurs with all visualizations) I think this is no HA LCN integration specific problem. So this issue can be closed from my point of view.

Hi @alengwenus,
Thanks for explaining. I myself do not own the pro software. An electrician technician person has used his version to retrieve module setup so that I could configure HA. I can reorder this person to "disable beep on faulty telegrams", but each visit costs somewhat, and I hoped I could solve this problem with HA only.
From your description I deduce, this is basically some "electrical" issue in the wire of the data-connection in the LCN bus, creating a faulty telegram and annoying a module. The regularity of timeslots match also to your description, meaning, in worstcase this could occur every 10 minutes.
So if there is no setting otherwise or a command I could send to PKE for this, I can close this ticket.

Looks like no other info is available. Thanks


👩🌾 3 ➡ 4

➡ Forward port
Port ign-sensors3 to ign-sensors4.
Branch comparison: https://github.com/ignitionrobotics/ign-sensors/compare/ign-sensors4...ign-sensors3
Note to maintainers: Remember to Merge with commit (not squash-merge or rebase)
🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸
https://github.com/osrf/buildfarmer/issues/181

This is good to go, mind taking a quick look @iche033 ? I'd also like to port it forward to 5 and 6. Thanks!


Telemetry can't be disabled because of typo in docker-compose.yaml

While testing self-hosted docker installation I saw interesting warning so I decided to investigate further.
[Warning] One or more build-args [CALCOM_TELEMETRY_DISABLE] were not consumed

In docker-compose.yaml there is argument declaration for this variable and it has a typo:
services:
  # ...
  calcom:
    build:
      # ...
      args:
        # ...
        CALCOM_TELEMETRY_DISABLE: ${CALCOM_TELEMETRY_DISABLED}

argument assigned here is CALCOM_TELEMETRY_DISABLE but argument used in Dockerfile is CALCOM_TELEMETRY_DISABLED.
ARG CALCOM_TELEMETRY_DISABLED

I plan to create PR that addresses this issue shortly. (Edit: PR #166 created)

PR merged

thank you @bdeak4 !


Streamed images have edge bands

I believe this has something to do with the PIL library's paste function trying to preserve or work with the alpha channel.  Need to ignore alpha or convert it out... something.

Removed alpha channels from work image buffers on the server.


How to change the edit icon in status line ?

How am i supposed to change the edit icon (pencil icon) in the status line ?
I have searched for it on the web but was unable to get any solution.

Any help would be appreciated :)

You could try writing your own provider for filenames. Here, take a look at this:
require('galaxyline').section.left[1] = {
  CustomBufferFilename = {
    provider = function ()
      filename = vim.fn.expand('%:t')

      -- Not saved yet
      if vim.fn.empty(filename) == 1 then
        filename = '…'
      end
      -- Readonly
      if vim.bo.readonly == true then
        if vim.bo.filetype == 'help' then
          filename = filename..' ⓘ'
        else
          filename = filename..' '
        end
      end
      -- Modified
      if vim.bo.modifiable and vim.bo.modified then
        filename = filename..' [your new icon]'
      end

      return filename
    end,
  }
}

This way beyond what i know in lua. Where should i add this ?

Nvm found a solution
Here it is for those who may need it in the future :)
Edit lua/plugins/statusline.lua
gls.left[4] = {
  FileName = {
    provider = function()
      local fileinfo = require'galaxyline.provider_fileinfo'
      return fileinfo.get_current_file_name("MODIFIED icon ", "READONLY icon ")
    end,
    condition = condition.buffer_not_empty,
    highlight = {colors.white, colors.lightbg},
    separator = " ",
    separator_highlight = {colors.lightbg, colors.lightbg2}
  }
}


HttpConfigurationExtensions methods missing?

Hi,
I have Microsoft.AspNet.WebApi.Versioning.dll version 2.2.6579 downloaded from nuget a couple of weeks ago.
I'm trying to use HttpConfiguration AddVersionedApiExplorer method (as described here), but the compiler can't find it.
When I browse into the dll, I see that the HttpConfigurationExtensions class has only AddApiVersioning and GetApiVersioningOptions methods, and no sign of AddVersionedApiExplorer...
I also can't find ApiDescriptionExtensions so ApiDescription.GetGroupName is also missing...
What am I missing here?
Thanks!

Ah ... the API Explorer support is in a separate, but complementary NuGet package. I tried to make that easy to follow on the landing page, but I see how it can be easily missed from looking at just the wiki or code samples.
For Web API, you need this package as well: Microsoft.AspNet.WebApi.Versioning.ApiExplorer.
There are similar packages for OData and ASP.NET Core should you need those as well.

Thanks for the quick response!


Redesign ideas

https://mademistakes.com/work/minimal-mistakes-jekyll-theme/

https://linuxwit.ch/blog/2018/12/everything-that-lives-is-designed-to-end/

http://tonsky.me/

https://www.joelonsoftware.com/


Setup linting and formatting checks

I did something sneaky here. Code coverage was failing because it decreased. However, I didn't add/remove any actual code, but formatted existing one and fixed some linting errors. Therefore, once CI passed, before CodeCov got updated, I got a window of opportunity to press a green button and merge PR.
When uploading CodeCov finished, it fails. If I didn't use this delay to merge, I would force merge anyway, but this message is just an info on what I did.


multi master replication

is it possible use couchdb replicator over the postgres database  on couch-to-postgres?

sorry im not clear on your question if you mean can it sync postgres as the source db then no
you can use the postgres http extension to populate a couchdb and then use couch as your datasource with master-master replication and using couch-to-postgres populate separate postgres databases.
This is currently how i am using it eg
Postgres at location 1
|
couch-to-postgres
|
couch at loaction 1
|
|
Internet
|
|
Couch at location 2
|
couch-to-postgres
|
Postgres at location 2

ok, perfect, i have another question
i need to know if you know other forms of doing master master replication with postgres and the advantages of using coudchb

Im not sure there is a simple method to do multi-master replication with postgres - this is the reason we chose couchdb as our datasource - we were using solr then elasticsearch for searching/querying the data when couch map/reduce was not enough.
however elasticsearch uses a LOT of memory (and needs more as the index grows) but with postgres we have gone down from 4gb vm for elasticsearch to a 2gb vm for postgres and no problems with memory issues.
Take a peek at: http://blog.2ndquadrant.com/jsonb-type-performance-postgresql-9-4/
for jsonb indexing stuff and postgres

Thanks for you reply, i have another question for that im open a new issue about instalation

sure ask away - btw i have released an npm: https://www.npmjs.com/package/couch-to-postgres
so should make life simpler to install with:
npm i couch-to-postgres