Dec Statments

dec a : i32;
dec a : i32 = 10;
dec a = 10i32;
dec a = "string";
dec a = true;

// When no explicit type is provided for a number, i32 will be assumed
dec a = 10;

// When no explicit type is provided for a floating point number, f32 will be
// assumed
dec a = 10.0128;

In my opinion dec makes no sense; it literally just means declare.
What you should do is have separate declarators for mutable and immutable types; I prefer the style that Nim, Swift, and JavaScript use:
var a: i8 = 1 # Mutable variable.
let b: i8 = 2 # Immutable variable.

Because it is used in these languages it makes more sense from an ergonomic familiarity standpoint because the average user won't be baffled by having to guess what dec and const would mean-- "const is still declaring something, so why isn't it dec?!"
Additionally this leaves const open for use for constant expressions, as Nim uses it:
proc add(a, b: int): int =
  result = a + b

const i = add(1, 1) # Evaluated at compile time. No code is generated for this.
echo i # Equivalent to "echo 2"

this is equivalent to making the function C++ constexpr, but Nim has an interpreted version of itself which it can use to run the function ahead of time, meaning explicitly constexpr functions are unnecessary.

With the desire to use this language for game development, I suggest we keep the syntax relatively simple.
Many people look for good(and simple) starter languages to make games with, so using almost 20 characters to define an example integer may not be too inviting or convenient long-term. I suggest starting as simple as possible, and then adding complexity as needed.

We will review your sugestions when we get to this part, for now we want a super baisc system just  to bootsrap  then we will get down in the dirst and add facny things a design proper stuff.

Mutability isn't "fancy"-- its a huge thing to have for optimization reasons and also semantic reasons if the programmer doesn't want something to change.
Regardless I think we should have it pre-bootstrap-- using "dec" instead of "var"/"let" ahead of time makes no sense.
At the very least replace "dec" with "var" and leave "let" out if you absolutely must.

That isn't any more concise-- and it's actually the opposite of what Rust does, and encourages mutability.
In Rust let is used for both, but mut is the qualifier for mutation-- which is a purposeful thing that the Rust devs did to encourage the use of immutable variables, since typing it would be shorter. Encouraging immutability is good practice as it is far easier to optimize since the compiler doesn't have to guess if the value has changed if it is a reference, and also can save the compiler from making local copies of a variable for functions in some cases where optimization isn't the best-- which will be us early on.
However, I think var/let strikes a nice balance between the two ideas-- let sounds like you're making a mathematical declaration, and in math you don't re-assign a value to a variable-- you tack the "prime" symbol onto it and make a new one. Meanwhile "var" is obviously a shortening for "variable" and the meaning behind it is obvious.

I agree with @davidgarland var / let do simply look better and provide a more clear picture.
Probably a new issue for compile time evaluation as how much should we allow or should we even restrict languages like odin or jai also don't restrict users.

ok, i have spoken to the rest, and we will use let and var, like you guys sugested, we are implmenting it atm


Is it possible to integrate into TinyMCE without drupal?

I guess what I'm asking is does this have a standalone plugin for TinyMCE?

We currently do not have a standalone plugin for TinyMCE, sorry.
2016-10-26 22:20 GMT+02:00 Vague Rabbit<EMAIL_ADDRESS>
I guess what I'm asking is does this have a standalone plugin for TinyMCE?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/daemth/easychart/issues/62, or mute the thread
https://github.com/notifications/unsubscribe-auth/AASiZSIDPA3btOhNNk9Cvn-Z42LVZg4uks5q37YFgaJpZM4Khn3t
.

Hi @thewhiterabbit,
As @jyve said, we don't have a standalone plugin for TinyMCE.
But I do have some good news for you: @highcharts recently released a public beta version of their own editor, at last. :-) (https://github.com/highcharts/highcharts-editor).
Best of all is, they have a TinyMCE integration: http://editor.highcharts.com/tinymce.html.
All the best,
Thomas


Cloned maps preplanning contains white box in the middle

Don't know why, it just does.

Will be fixed in BeardLib by next update


Cant  return new Response.ok

Hi,
I can connect my aqueduct to close network socket (listener and get the data) Problem is I can't return new Response.ok. It shows null. I can print the print("Result: $_Result"); but return new Response.ok("$_Result"); become null.  Any help please?
import 'package:aqueduct/aqueduct.dart';
import 'package:capitalbankapi/capitalbankapi.dart';

class LoginController extends Controller {
  String _xCustomerToken;
  String _xCustomerName;
  String reply;
  String _Result;

  @override
  Future<RequestOrResponse> handle(Request request) async {
    Socket.connect('<IP_ADDRESS>', 1024).then((socket) async {
      socket.listen((data) async {
        reply = await new String.fromCharCodes(data).trim();
        var list = reply.split(":_:");
        _xCustomerToken = list[2];
        _xCustomerName = list[3];
        _Result = ("$_xCustomerToken:_:$_xCustomerName");
        **print("Result: $_Result"); // WORKING**
      });
      socket.write('Q101:_:49785:_:x\r\n');
      await new Future.delayed(new Duration(seconds: 3));
    });
    **return new Response.ok("$_Result"); // NOT WORKING**
  }
}

This is the same question as your previous issues. These are not Aqueduct related, but basic Dart async questions better served by documentation such as https://www.dartlang.org/articles/language/await-async, or Stack Overflow, or Dart Gitter.


ARROW-12515 [Dev][Wiki][Release]: Fix and update Windows RC verify script [WIP]

@ianmcook it would be nice if we could merge this for 8.0

The verification scripts already use python 3.8 but with VS2017. We can bump or rather parametrize the script to support both compilers, but it is not essential for 7.0 release.

Closing in favor of https://github.com/apache/arrow/commit/a13870e33eb8b25a1e9cee28a310c7c6cd9a4fb4


CASTOR-2443: Drop service reconnect.

Created by: Fuuzetsu
After removal of channels, the only purpose reconnect served was to
trigger STARTED event from mero. However it also turned out to be
harmful, causing a race. Instead of dealing with reconnect and the logic
there, just ask the service to send this event itself. If it's ready and
alive, it will send a message to RC and RC will be none-the-wiser that
it wasn't mero that sent the message.
Note that I've seen issues in case of dropped network connection but am
unable to determine in short-term if it's because of my testing method
or not. Rebooting a node however lets us recover without exhibiting
CASTOR-2443 which is currently a blocker. I therefore suggest merging
this ASAP and testing and fixing (if needed) network drop afterwards.

Closing as an obsolete


Backend authorization cache handlers

Extract how cache is treated based on the backend response into a module.
It allows extension by adding custom handlers like:
local cache_handler = require('backend.cache_handler')

function cache_handler.handlers.custom(cache, cached_key, response, ttl)
  cache:add(...)
  return true or false
end

strict is the original handler

it removes cached key on any non successful response

resilient is the new handler

stores response in cache only when it was not a server error

It also allows overriding proxy.shared_cache method to create custom cache instance for all proxies.
That can be useful when replacing local shared memory cache with something like redis.
TODO

[ ] integration test

Haven't tried yet, but looks good.
How can proxy.shared_cache be overriden?..

@mayorova
proxy.shared_cache = function()
end


Strongly recommend fixing the package's cabal file

Get the warning -
wreq-<IP_ADDRESS>: build
Package wreq uses a custom Cabal build, but does not use a custom-setup stanza
Not using the explicit setup deps approach based on configuration
Strongly recommend fixing the package's cabal file

I'm currently unable to build after upgrading stack:
--  While building custom Setup.hs for package wreq-<IP_ADDRESS> using:
      /home/mi/.stack/programs/x86_64-linux/ghc-gmp4-8.0.2/bin/ghc --make -odir /tmp/stack14631/wreq-<IP_ADDRESS>/.stack-work/dist/x86_64-linux-gmp4/Cabal-<IP_ADDRESS>/setup -hidir /tmp/stack14631/wreq-<IP_ADDRESS>/.stack-work/dist/x86_64-linux-gmp4/Cabal-<IP_ADDRESS>/setup -i -i. -package=Cabal-<IP_ADDRESS> -clear-package-db -global-package-db -package-db=/home/mi/.stack/snapshots/x86_64-linux-gmp4/lts-9.11/8.0.2/pkgdb /tmp/stack14631/wreq-<IP_ADDRESS>/Setup.hs /home/mi/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs -main-is StackSetupShim.mainOverride -o /tmp/stack14631/wreq-<IP_ADDRESS>/.stack-work/dist/x86_64-linux-gmp4/Cabal-<IP_ADDRESS>/setup/setup -threaded
    Process exited with code: ExitFailure 1
    Logs have been written to: /myproject/.stack-work/logs/wreq-<IP_ADDRESS>.log

    [1 of 2] Compiling Main             ( /tmp/stack14631/wreq-<IP_ADDRESS>/Setup.hs, /tmp/stack14631/wreq-<IP_ADDRESS>/.stack-work/dist/x86_64-linux-gmp4/Cabal-<IP_ADDRESS>/setup/Main.o )

    /tmp/stack14631/wreq-<IP_ADDRESS>/Setup.hs:10:4: error:
        Module
        ‘Distribution.Package’
        does not export
        ‘PackageName(PackageName)’
Progress: 3/8make: *** [genpstypes] Error 1

I think I fixed it, I will release a new version soon.


Schema dump support for multiple schemas

What do you guys think of adding support for multiple schemas in the schema dump. The way it would work is instead of exporting
create_table 'table_name'
in schema.rb, it would
create_table 'schema.table_name'
This could be figured with some configuration flag.
I would be happy to work on this PR myself if you guys think its a good idea. If not, please let me know why not.

@stenver  sounds fine to me.  Go for it!
Now that schema_plus is a collection of smaller feature gems, I'm thinking this could be done in its own gem.  I.e. rather than a configuration flag, a user would simply choose to include "schema_plus_multischema" (or whatever it'd be called) which would add that capability.
schema_plus_core provides hooks into the dumping mechanism (see the Dumper section of the README -- though that doc is awfully terse; PR's to improve it would be welcome!).  I haven't thought through whether those hooks are sufficient to add multiple schema support -- if we're lucky they are and your gem will be fairly simple (is it sufficient to have middleware that changes table.pname from "table_name" to "schema.table_name"?).  If not, maybe the thing to do would be to augment those hooks -- so that your gem would still be fairly simple.
Does that seem reasonable? Happy to explain more (especially the possibly opaque Dumper hooks).
Oh, and I'd be happy to give you appropriate access to put the gem in the SchemaPlus github organization.

Thanks Ronen, sounds great!
I took a brief look at the schema core, it seemed simple enough. If i get any questions, i will let you know.
I would be grateful for the appropriate access. I can start working on the gem in the next few days as a cool side-project :)

Hei @ronen. Sorry for such a late response on this.
For starters, this gem is going to be for postgres.
I have looked around the code a lot and started to write my gem. My searches have led me all the way to the schema_plus_core.
Basically, am I reading this right that the tables created by Schema Plus are not from the SQL, but from activerecord tables?
I found out that the env variable doesnt hold any information regarding schemas, so I cannot change a table name. I was hoping to modify schema_plus_core to add schema to the tables, but if the tables are read from active record strings then that solution is probably not feasible.
Am I correct that the only solution I have atm is to create a connection adapter which requests table schema by table name? If so, any ideas what to do if I have 2 tables in different schemas with the same name.

Hi @stenver

am I reading this right that the tables created by Schema Plus are not from the SQL, but from activerecord tables?

Yes, SchemaPlus's dumper intercepts ActiveRecord's dump and parses the string.  Ugly hack, but didn't want to duplicate the existing dumping code.

Am I correct that the only solution I have atm is to create a connection adapter which requests table schema by table name?

I guess it depends what you're trying to do...  ActiveRecord dumps all tables that are returned by @connection.tables.  My understanding is that it will include all tables in the current/default schema (except for any that you might have added to the ActiveRecord::SchemaDumper.ignore_tables).
If you want to support dumping tables from schemas other than the current default, I think you'd need to modify the connection adapter's tables method to query those schemas.  That method currently returns each table name as a string, so maybe you could change it to return schema_name.table_name for each?

Hei @ronen
Thanks for the help! I got the gem working and tests passing. Can you please create the repository, so i could make a PR? I dont have privileges to create a repository myself.

@stenver I've created https://github.com/SchemaPlus/schema_plus_multischema, and made you a collaborator on it.


Fix refresh token OAuth flow

This commit changed both refresh_token strings to RefreshToken in FormatRefreshTokenUrl as part of a large batch of changes to match C# naming conventions. I think this was an accidental change.
With RefreshToken I got UnsupportedGrantType exceptions when I attempted the refresh token flow, and changing it to refresh_token made it work normally. The Salesforce docs also show refresh_token.

I didn't notice it at the time, but it looks like this fixes #116.


Use vue-cli based build process

In chasing down a way to resolve using this with SSR, I tried setting it up with a vue-cli based build process. Wound up fixing the problem a different way, but figured I'd share this in case you would find it useful!

Sorry for the slow reply. That's awesome! I'll definitely merge this in when I get a sec. Many thanks :)


LSTM is always predicting constant

I want to predict sequences of number vectors based on the previous ones. I have five sequences. I considered the length of the history 100. I transformed the data to following format:
As an input X I have array of n matrices, each with 100 rows and 5 columns (technically, X is a tensor with dimensions n x 100 x 5). The target y will be matrix n x 5 - for each input X_i (matrix 100 x 5) I want one corresponding row of y (with just two elements).
So my input data (X) is a numpy array n x 100 x 5 and output (y) is n x 5 .  My model is as follows:
in_out_neurons = 5
hidden_neurons = 20
model = Sequential()
model.add(LSTM(hidden_neurons, return_sequences=True, forget_bias_init = 'one', inner_activation='hard_sigmoid', input_shape=(100,5)))
model.add(Activation("sigmoid"))
model.add(Dropout(0.2))
model.add(LSTM(hidden_neurons, return_sequences=False, forget_bias_init = 'one', inner_activation='hard_sigmoid'))
model.add(Activation("sigmoid"))
model.add(Dropout(0.2))
model.add(Dense(in_out_neurons))
model.add(Activation("linear"))
model.compile(loss="mean_squared_error", optimizer="rmsprop")
model.fit(X_train, y_train, batch_size=450, nb_epoch=20, validation_split=0.05)
predicted = model.predict(X_test)
The problem is that it always predicts a constant value for each sequence for all times. But when I use the input of the following link with two sequences, it can predict very well:
http://danielhnyk.cz/predicting-sequences-vectors-keras-using-rnn-lstm/
I have changed number of epochs, batch_size but nothing changed! Can anybody help me find the problem?

Good question, thank you
On Feb 15, 2016 03:18, "mininaNik"<EMAIL_ADDRESS>wrote:

I want to predict sequences of number vectors based on the previous ones.
I have five sequences. I considered the length of the history 100. I
transformed the data to following format:
As an input X I have array of n matrices, each with 100 rows and 5 columns
(technically, X is a tensor with dimensions n x 100 x 5). The target y will
be matrix n x 5 - for each input X_i (matrix 100 x 5) I want one
corresponding row of y (with just two elements).
So my input data (X) is a numpy array n x 100 x 5 and output (y) is n x 5
. My model is as follows:
in_out_neurons = 5
hidden_neurons = 20
model = Sequential()
model.add(LSTM(hidden_neurons, return_sequences=True, forget_bias_init =
'one', inner_activation='hard_sigmoid', input_shape=(100,5)))
model.add(Activation("sigmoid"))
model.add(Dropout(0.2))
model.add(LSTM(hidden_neurons, return_sequences=False, forget_bias_init =
'one', inner_activation='hard_sigmoid'))
model.add(Activation("sigmoid"))
model.add(Dropout(0.2))
model.add(Dense(in_out_neurons))
model.add(Activation("linear"))
model.compile(loss="mean_squared_error", optimizer="rmsprop")
model.fit(X_train, y_train, batch_size=450, nb_epoch=20,
validation_split=0.05)
predicted = model.predict(X_test)
The problem is that it always predicts a constant value for each sequence
for all times. But we I use the input of the following link with two
sequence, it can predict very well:
http://danielhnyk.cz/predicting-sequences-vectors-keras-using-rnn-lstm/
I have changed number of epochs, batch_size but nothing changed! Can
anybody help me find the problem?
—
Reply to this email directly or view it on GitHub
https://github.com/fchollet/keras/issues/1727.

I solved my problem! Just to inform others who have same problem: I scaled (centered) my input data.

@mininaNik How did you center the data? I have a data say in the dimension of 1000x2, I need to produce the training sample, e.g., every 30 data predict the 31th data. So my training data dimension will become n x (30 x 2).
Did you center the data of 1000x2 so that it has zero mean, or for every 30x2 pairs, center the data, so every 30x2 (total of n) has zero mean?

@coolzai  Yes I centered the data to have 0 mean. First I centered the whole data and then I sliced and reshaped the data for training and testing.

@mininaNik If you rescale the whole dataset before train_test_split, there is a chance of introducing look-ahead bias. I think you should split the data first, then use the scaler you trained on the training dataset to transform the test dataset.

i have similar problem after trying all suggested..


Window size/position

I really hate resizing the window everytime a run the app. Guess this will fix it.

on waiting list, @luciorubeens is working on a configService so this commit would move to this service.

It's OK to close it if you want, I just want the app to remember the window size.

yes will close it when serviceConfig is on so we keep track of your PR


Shortcuts aren't working

Hello, love this project!
I've integrated my workflow to the minimizer and in dire need of quick navigation + management with shortcuts and customized the "Add to a Minimized Group" as well as "Restore" shortcuts.
Upon using my shortcuts, I'm getting the following errors:

Restore: Cannot read properties of undefined (reading 'documents')
Add to a Minimized Group: This shortcuts prompts a list of Groups and upon selection it adds an Untitled file to the group instead of the selected in editor

I expected a drop down just like Add to a Minimized Group when running the Restore shortcut


Major issue:  can not schedule delivery or pickup outside working hours!

Expected behavior:
It's 12 noon.  My restaurant opens at 4pm.  I try to order a Pizza to deliver at 4-5 pm, but it won't let me order the pizza.
I try to schedule a delivery before opening.
It won't let me order a delivery -- the times are right in the delivery schedule, but it won't let me do it because we are still closed.
Actual behavior:
Won't let me order because I'm still closed, but the delivery is scheduled for opening times...
Reproduce steps:
Try to order / schedule a delivery off-hours.
Version:
latest

Have you enabled Accept Future Orders on the admin location edit page under the Settings tab
Use issues to report bugs, please post your questions on the forums or better still search the forums for existing solutions.


ndcurves: init at 1.4.1

Hi,
This add the ndcurves library,  for creating smooth cubic splines.
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[x] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[x] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

@ofborg eval

@ofborg build ndcurves

@ofborg build python311Packages.ndcurves python312Packages.ndcurves

@ofborg build python311Packages.ndcurves python312Packages.ndcurves


bug: tab added after copilot suggestions using blink.nvim

Did you check docs and existing issues?

[x] I have read all the LazyVim docs
[x] I have updated the plugin to the latest version before submitting this issue
[x] I have searched the existing issues of LazyVim
[x] I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)
v0.10.2
Operating system/version
Linux
Describe the bug
With the repro config, when accepting copilot suggestions a tab gets added at the end of the text.
Not sure if it's the correct solution, but if I modify the keymap like so (note the return cmp.hide()):
{
	"saghen/blink.cmp",
	opts = {
		keymap = {
			["<Tab>"] = {
				function(cmp)
					if cmp.is_in_snippet() then
						return cmp.accept()
					elseif require("copilot.suggestion").is_visible() then
						LazyVim.create_undo()
						require("copilot.suggestion").accept()
						return cmp.hide()
					else
						return cmp.select_and_accept()
					end
				end,
				"snippet_forward",
				"fallback",
			},
		},
	},
},

The tab is usually not added. I'm guessing something needs to be returned here to prevent the fallback behavior from triggering.
Steps To Reproduce

Start nvim with the repro config
Tab to accept a copilot suggestion (not a snippet)

Expected Behavior
I would expect no tabs to be added if accepting a copilot suggestion.
Repro
vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()

require("lazy.minit").repro({
	spec = {
		{ "LazyVim/LazyVim", import = "lazyvim.plugins" },

		{ import = "lazyvim.plugins.extras.coding.blink" },
		{ import = "lazyvim.plugins.extras.coding.copilot" },
	},
})

LazyVim uses preset = "enter" for blink.cmp. This preset doesn't create any mapping for <Tab>. So, it's normal that it appends a tab indeed. You would have to create the mapping in your personal configuration if you want to use <Tab> key to accept suggestions.

Oh I missed the part about copilot and only looked the blink Extra, not the copilot Extra. I was wrong.


fix namespace_reference mapper on update handler

Fix https://github.com/rancher/rancher/issues/15481
Namespace_reference mapper trims the namespace prefix of the reference fields in /v3/project resources. When pipeline resources are moved to project level, and a pipeline in project ns may refer to a sourcecodecredential in user ns, the namespace prefix needs to be preserved in this case. Changes here check and trim the ns when reference namespace is the same.
However, on updates noupdate fields are dropped, therefore no namespaceId is available for the mapper to check. So in this pr it does the trim when namespaceId is missing and noupdate is added to credential reference to bypass the trim.

@gitlawr my concern is why did we trip the namespace from the links to begin with, what is the reason for this mapper. Are there places in the code relying on the certain format? Then split brain situation - when some links are stored one way, and other in another way - can it potentially introduce issues?

Take PVC as the example, In https://github.com/rancher/types/blob/master/apis/project.cattle.io/v3/schema/schema.go#L729 we overwrite claimName to add reference type in the schema. In Rancher API, we use ns:pvcname as the id to refer to a pvc. But in K8S it's the name without the namespace prefix. So the mapper helps for the conversion by tripping the namespace.

I'm not sure if there's other reasons for the mapper but I think you're right, there might be potential issues if we store the links in different ways.

It would be safer to revert the changes on the mapper and find other solutions to obey existing rules.
Two solutions for the pipeline-credential reference case that I can think of now,

move sourceCodeCredential/sourceCodeRepo resource out of project api group(to management group)
remove norman type tag of the credential reference so as to keep the namespace from being tripped.

@gitlawr

move sourceCodeCredential/sourceCodeRepo resource out of project api group(to management group)

does the object that references sourceCodeCredential/sourceCodeRepo exist in management or user group?

remove norman type tag of the credential reference so as to keep the namespace from being tripped.

given this path, how the correct credential would be determined? relying on the name?

@alena1108

the object that references sourceCodeCredential is in the project group
it remains to be the id of a credential,ns:name.

I think it would be more flexible and loosely coupled if we can have remove-mapper utility in norman.
I've submit a pr in norman https://github.com/rancher/norman/pull/196.
Then we can revert changes on namespace_reference mapper and move out the mapper in the pipeline case, as updated in this pr.

@gitlawr based on conversation with @ibuildthecloud, he is actually fine with the original approach - not trimming the ns if it is different from the original one - and doesn't think it would break any of the existing stuff - my main original concern.


Native back button on Android causes the reload of the banner

Hi,
everytime I press the back button on android in my app, the bottom fixed banner flashes as if it was reloaded. Could you verify this? I think that an accidental reload of the banners could damage the revenue.
Thanks!

I think you can handle the back button event with javascript, either switch page back or ask user to confirm quit.


[WIP] Refactor Nav component

After discussion we are parking this refactor for now. This component is primarily being used for the docs site. Currently half of the nested item functionality lives in the component library and the other half is in the docs site.
Rather than implement this now, we are marking the docs for Nav as draft as we're not officially supporting the component.
If/when this is picked up again, there are some items outstanding:

position of SVG arrows in items with nested nav items
Storybook story component composition is not quite right as:

react.development.js?17ac:167 Warning: Each child in a list should have a unique "key" prop.

Check the render method of `storyFn`. See https://fb.me/react-warning-keys for more information.
    in NavItem
    in storyFn
    in ErrorBoundary

more scenarios need covering in tests
use of uuid for key
replace strings with constants
fix integration with docs site
reuse shared Nav and NavItem types

Closing this as anticipating it will be redundant once we replace the docs site.


Add lyric integration

Breaking change

Proposed change

This is my attempt to resubmit a PR to add Honeywell Lyric T5-T6 support.  I've included the changes requested from the previous attempt to merge, including getting the original author @bramkragten to merge some changes to his support library and bump the pip library, and then removing my updated version from this pull to make it cleaner.
Type of change

[ ] Dependency upgrade
[ ] Bugfix (non-breaking change which fixes an issue)
[ ] New integration (thank you!)
[X] New feature (which adds functionality to an existing integration)
[ ] Breaking change (fix/feature causing existing functionality to break)
[ ] Code quality improvements to existing code or addition of tests

Example entry for configuration.yaml:

lyric:
  client_id: wqeioqweuoiewuoadslqsdfkasdiosdu
  client_secret: sadiasduasoiduqwo8erq

Additional information

This PR is based off of the original work by @bramkragten, which was prior to the climate change refactor.  This code is compliant with that refactor and includes fan support.

Checklist

[X] The code change is tested and works locally.
[X] Local tests pass. Your PR cannot be merged unless tests pass
[X] There is no commented out code in this PR.
[X] I have followed the development checklist
[X] The code has been formatted using Black (black --fast homeassistant tests)
[ ] Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

[ ] Documentation added/updated for www.home-assistant.io

If the code communicates with devices, web services, or third-party tools:

[X] The manifest file has all fields filled out correctly.
Updated and included derived files by running: python3 -m script.hassfest.
[X] New or updated dependencies have been added to requirements_all.txt.
Updated by running python3 -m script.gen_requirements_all.
[X] Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

[ ] No score or internal
[ ] 🥈 Silver
[ ] 🥇 Gold
[ ] 🏆 Platinum

@shellster I was looking into HA support for Honeywell water detectors, and research led me to your PRs here — can you confirm that this PR brings support for the latest python-lyric up-to-date with HA, but that more work would need to be added on top of this to support water detector devices in HA?
Asking because I see apparent support for these devices in the python-lyric library here:  https://github.com/bramkragten/python-lyric/blob/master/lyric/init.py#L304
Appreciate any pointers/advice you have here, as I'm considering building upon your work to add support for these myself...

@jkrall: I actually stripped the water detector code in this last round of updates because it wasn't germane to the temperature code, and I was hoping that streamlining it would help increase the chance that it actually got merged.  The water detector code is in an older commit, if you look back.  You still will need to add a component inside home-assist, and I haven't really figured out or needed to figure out how that works.  Would definitely be interested in PR's to my branch, or it may make more sense to split that into a new module, but happy to entertain the idea.  I just have no way to test it.

To any devs: I don't know how to not fail the codecov/patch check.

@balloob- it looks like @shellster needs a little help here.

@frenck I don't know how/where I'm supposed to add documentation.  Any help?

@shellster
The documentation page doesn't exist yet on home-assistant.io  It needs its own PR and supporting info to describe to users how they can use the component.
https://home-assistant.io/components/lyric/

I'll work on this this weekend.

Documentation: https://github.com/home-assistant/home-assistant.io/pull/12217

Problem found upstream.  Waiting for another python-lyric pull to land: https://github.com/bramkragten/python-lyric/pull/6

What do I need to do to get this landed?  I don't want to be stuck in a loop repeatedly tending a branch to keep it up to date with dev, if no one is going to land this for me anytime soon.

The other PR https://github.com/home-assistant/core/pull/23015 was a long way and had a config flow, might want to check that one out, or use it as a starting point.


Add way to ignore touches started in a region

Right now Interactable.View does not work very well for swipe from left in the situation where you want to use it to implement leave-behinds on a page that has a navigation drawer.
In apps like Gmail for Android that have leave behinds and a drawer a swipe starting from the left edge of the screen only pulls out the drawer, the leave-behinds do not get dragged.
However when I try implementing a leave-behind with Interactable.View the Interactable.View takes priority over the drawer. If I start the drag a few pixels away from the left edge, the drawer doesn't come out at all and I get a leave behind instead. If I start the drag on the exact edge of the screen, the drawer gets pulled out about 15px and then Interactable.View terminates the swipe leaving me with a leave-behind and a drawer that is sitting 15px out from the edge of the screen.
I need some way to declare to the Interactable.View that it should not listen to touches that start on the leftmost say 20px of the view. And it should not terminate responders already responding to drags to start a drag.
"Leave behinds"

This is a big problem for apps that have a drawer in them. Using react-native-interactable ruins the app experience.
RNI appears to do all this inside native code as well (RN's responders are not used) so my prior knowledge on how react-native handles touches is not applicable and I can't even easily create a PR to fix this.

In case you need a dirty quick-fix to start with, you can do the following:
 - (BOOL)gestureRecognizerShouldBegin:(UIPanGestureRecognizer *)pan
{
+    CGPoint location = [pan locationInView:self];
+    if (fabs(location.x) < 31) {
+        return NO;
+    }
    CGPoint translation = [pan translationInView:self];
    if (self.horizontalOnly) return fabs(translation.x) > fabs(translation.y);
    if (self.verticalOnly) return fabs(translation.y) > fabs(translation.x);
    return YES;
}

in:
https://github.com/wix/react-native-interactable/blob/master/lib/ios/Interactable/InteractableView.m

Forget the dirty quick-fix.
The proper way is for the edge pan recognizer to fail for this one to handle:
- (BOOL)gestureRecognizer:(__unused UIGestureRecognizer *)gestureRecognizer shouldRequireFailureOfGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
{
   if ([otherGestureRecognizer isKindOfClass:[UIScreenEdgePanGestureRecognizer class]]) {
         return YES;
    }
    return NO;
}

Needs to be added to https://github.com/wix/react-native-interactable/blob/master/lib/ios/Interactable/InteractableView.m


Implement repr methods for __Transform and __KeyData classes, fix segfault when href attribute missing

Some constants are missing href, see e.g. xmlSecTransformRemoveXmlTagsC14NKlass.
Access to href thus ends in a segfault in Python:
import xmlsec

print(xmlsec.constants.TransformRemoveXmlTagsC14N.href)

This PR fixes that by returning None to avoid a null pointer.

Codecov Report

Merging #125 into master will increase coverage by 1.21%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #125      +/-   ##
==========================================
+ Coverage   75.43%   76.64%   +1.21%
==========================================
  Files          11       11
  Lines        1376     1396      +20
==========================================
+ Hits         1038     1070      +32
+ Misses        338      326      -12

Impacted Files
Coverage Δ

src/constants.c
92.72% <100.00%> (+6.72%)
:arrow_up:

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 c57a323...3a6d65d. Read the comment docs.


Display read receipts next to each message as a row of Avatars for users who have seen that message

Fixes https://github.com/project-robius/robrix/issues/153

With tooltip indicating number of seen - mouse over

mouse out

Currently only supports Avatar with username. I need some advice how to put in Avatar with image.
Implemented max display of 4 avatars
Currently tooltip seems to be not able customize width and position. @jmbejar

[WIP] Will try to change sequencer to follow GenUI's way of creating a list of widgets

Modified set_avatar_and_get_username function to use &mut Avatar instead of AvatarRef
Modified set_avatar_and_get_username function to take in an option of Avatar User profile. Read_receipts do not provide user profile. So the User Profile is gotten from the Sender cache.
Added Caching for Avatar that is loaded with Image.

is this ready for another review? i noticed you made some changes but didn't change the waiting-on-* label nor request another review from me

is this ready for another review? i noticed you made some changes but didn't change the waiting-on-* label nor request another review from me

Not ready at the moment, sync_once is throwing error. 'extensions.to_device.since' is invalid (should look like an int) (type=value_error). Initially I thought by moving it after sync service.start would resolve the issue, but it didn't. The backend is expecting url parameter "Since" to be timestamp, but it is sending string. I am not finding the same issue with a separate matrix test repository.

sync_once is throwing error. 'extensions.to_device.since' is invalid (should look like an int) (type=value_error). Initially I thought by moving it after sync service.start would resolve the issue, but it didn't. The backend is expecting url parameter "Since" to be timestamp, but it is sending string.

Yea that sounds like what I would expect, since we're not supposed to use that API because we're using sliding sync instead. I was surprised that it ever worked.

I am not finding the same issue with a separate matrix test repository.

probably because you're not saving and restoring a session that was created via sliding sync, i presume?

I think you should reach out to the Matrix SDK developers on the matrix room for that, and ask them about the issue you mentioned here: https://github.com/project-robius/robrix/pull/162#discussion_r1894946412
There must be a way to get this to work correctly with sliding sync. At the very least, Element X probably has this feature working, so we could also reach out to them on the Element X matrix rooms.

@alanpoon i see you marked this as "blocked". Are you considering this blocked on Matrix SDK features? or you're waiting to hear back from the SDK dev team? (I haven't seen any conversations from you on the Matrix Rust SDK room...)
If so, kindly take a look at Element X's source code (either Android or iOS, whichever one you prefer) to see what they do to make read receipts work.

@alanpoon i see you marked this as "blocked". Are you considering this blocked on Matrix SDK features? or you're waiting to hear back from the SDK dev team? (I haven't seen any conversations from you on the Matrix Rust SDK room...)
If so, kindly take a look at Element X's source code (either Android or iOS, whichever one you prefer) to see what they do to make read receipts work.

I asked in the matrix chat room. https://matrix.to/#/!IlysflVuQZDIcVLkcg:matrix.org/$3VJtkdI0yxVnlAMzh42q7lPl1MtrUzz6KxUmibpLUtM?via=matrix.org&via=element.io&via=envs.net
It seems like sync_once does not throw error, after deleting the Robius's local data. Hence I am requesting another review.
Element X Android's code is ```
client.getRoom(notifiableEvent.roomId)?.use { room ->
room.subscribeToSync()
        // If the app is in foreground, sync is already running, so just add the subscription.
        if (!appForegroundStateService.isInForeground.value) {
            val syncService = client.syncService()
            syncService.startSyncIfNeeded()
            if (isRingingCallEvent) {
                room.waitsUntilUserIsInTheCall(timeout = 60.seconds)
            } else {
                room.waitsUntilEventIsKnown(eventId = notifiableEvent.eventId, timeout = 10.seconds)
            }
            syncService.stopSyncIfNeeded()
        }
    }

Their android's SDK is syncService.startSync, while rust is just SyncService.start(). So it can be hard to compare.

https://docs.rs/matrix-sdk-ui/0.7.0/matrix_sdk_ui/sync_service/struct.SyncService.html

I asked in the matrix chat room. https://matrix.to/#/!IlysflVuQZDIcVLkcg:matrix.org/$3VJtkdI0yxVnlAMzh42q7lPl1MtrUzz6KxUmibpLUtM?via=matrix.org&via=element.io&via=envs.net

oh ok, great. I did not know about that room.
You should also ask the question in the room dedicated to the Matrix Rust SDK itself, since this problem seems to be related to the SDK rather than sliding sync or the spec. Specifically, be sure to mention that we're using the new SyncService and that it seems strange/wrong that we'd need to completely bypass the sliding sync protocol in order to make a full sync_once() call.

It seems like sync_once does not throw error, after deleting the Robius's local data. Hence I am requesting another review.

Ah ok, that's interesting. It's probably due to the fact that the sessions that get saved to disk (and subsequently restored), so if you try to restore a pure SlidingSync-based session but treat it as a traditional-sync session, then it's not going to work well. The inverse of that is also true.
I'd still like to avoid having to call sync_once() simply because it is massively expensive and defeats the entire purpose of using sliding sync in the first place....

Element X Android's code is
        client.getRoom(notifiableEvent.roomId)?.use { room ->
            room.subscribeToSync()

            // If the app is in foreground, sync is already running, so just add the subscription.
            if (!appForegroundStateService.isInForeground.value) {
                val syncService = client.syncService()
                syncService.startSyncIfNeeded()
                if (isRingingCallEvent) {
                    room.waitsUntilUserIsInTheCall(timeout = 60.seconds)
                } else {
                    room.waitsUntilEventIsKnown(eventId = notifiableEvent.eventId, timeout = 10.seconds)
                }
                syncService.stopSyncIfNeeded()
            }
        }

Their android's SDK is syncService.startSync, while rust is just SyncService.start(). So it can be hard to compare.

If you dig a bit deeper, you'll see that they're just directly calling SyncService.start() via Rust SDK bindings: https://github.com/element-hq/element-x-android/blob/55a5d45d4fb446a84dc96d4305b559f84bc68ee4/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/sync/RustSyncService.kt#L38
So in summary, Element X appears to not need to call the expensive bloated sync_once() function, as I suspected. Please investigate this further to see if we truly must call sync_once(), because I definitely think it shouldn't be required (at least theoretically).

A final thought below:

It seems like sync_once does not throw error, after deleting the Robius's local data. Hence I am requesting another review.

Ah ok, that's interesting. It's probably due to the fact that the sessions that get saved to disk (and subsequently restored), so if you try to restore a pure SlidingSync-based session but treat it as a traditional-sync session, then it's not going to work well. The inverse of that is also true.

Based on this, we actually cannot call sync_once() at all, as it will break Robrix's expectations of a pure-SlidingSync implementation. Thus, we need to find another way to forcibly synchronize the read receipt state of each room that gets opened (if that's the solution for this).

I also just confirmed that we do enable track_read_marker_and_receipts() when building each room's Timeline instance, so that's thankfully not the problem.


Update disk-management-control-codes.md

Fix formatting

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

Thanks for your contribution! I've merged your changes and they should be live soon.


tests: Prefer require over assert

Prefer require.Equal over assert.Equal b/c it has the added benefit of failing fast.
NOTES:

needs a linter rule so we can enforce this
needs updates to lots of code just to make it compliant
there may be situations where we don't want to use require but instead still use assert, e.g. parametrized tests, subtests, etc. These will need to have a comment telling the linter to ignore the error.
This spans across all of the repositories and is a rather big task with little benefit.

Failing fast isn't always best. The way I've been trying (ha) to use them is to require on things that will cause other tests to fail.
eg. require that the length of an array is above the minimum expected, then assert a result from an index into that array.
During development it can save quite a bit of time to see all of the failures at once instead of having to fix things one at a time.
So I don't think this should be enforced using rules, but should be something that patch reviewers should take into consideration.

I'm not sure about the value of this task. The only benefit is speed and that's questionable - unit tests are quite fast and Go also does a ton of test results caching. In the integration tests, I don't see much benefit either.


Line Broadening Tutorial

Line Broadening Tutorial

could you also name the file 103_lineshape_broadening.ipynb ?
Use git mv commands to rename while keeping the git history


CLI Tests

Description
This PR implements the framework to create pytests for our CLI. The pytest fixtures will download the small and medium cube example data in a temporary directory, prepare a surface.mat file, then executes 3 separate tests using the CLI to ensure changes won't break common use cases of isofit.
Closes #373.

Looks great, will merge when tests complete. We can always bypass the comprehensive check wait in the future for small changes that devs know are non-breaking.


Add site name for search results in structured data

https://developers.google.com/structured-data/site-name

That's a very good idea :P


Issue when installing the connector

Describe the problem you have found:
As part of the Ably Kafka Sink Connector verification process, I started working on verifying the connector resources. While building the connector, I am seeing the following issue. Tried different permutations like modifying settings.xml, pom.xml  but without any success and eventually found this URL https://dl.bintray.com/palantir/releases/ , its seems they winded up business and now running under  a different name JFrog. Could you please suggest any workarounds for the same or share the approach your team following for building the connector.

How to reproduce:
Setup:
OS : Windows 10
JDK : Both 1.8 and 11
Apache Maven 3.8.1
Run 'mvn clean package'
┆Issue is synchronized with this Jiraserver Task by Unito

Snippet of output from Maven 3.8.1 using mvn help:effective-pom per this answer:
  <repositories>
    <repository>
      <id>confluent</id>
      <url>http://packages.confluent.io/maven/</url>
    </repository>
    <repository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>central</id>
      <name>Central Repository</name>
      <url>https://repo.maven.apache.org/maven2</url>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <releases>
        <updatePolicy>never</updatePolicy>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>central</id>
      <name>Central Repository</name>
      <url>https://repo.maven.apache.org/maven2</url>
    </pluginRepository>
  </pluginRepositories>

Which makes me wonder / worry whether this is outside of our control... but need to dig deeper.

This was fixed in https://github.com/ably/kafka-connect-ably/pull/19.


AKS Cluster Upgrade showing cluster nodes in error only on Cluster Manager.  Waiting on User-Node-Remove

What kind of request is this (question/bug/enhancement/feature request): BUG
Steps to reproduce (least amount of steps as possible):
Create AKS Cluster with oldest version possible
Upgrade to 1.19.7
Result:
Cluster Manager shows cluster in error, waiting on user-node-remove for some nodes.
Cluster Explorer looks to be in the right state
Other details that may be helpful:
AKS cluster is healthy and the nodes should not remove. In another AKS cluster The node was deletes and rancher just says kubelet stopped posting status along with the waiting on user-node-remove.  We did this upgrade for two other clusters and didn't have any issues but they were executed on 2.5.2
Environment information

Rancher version (rancher/rancher/rancher/server image tag or shown bottom left in the UI): 2.5.6
Installation option (single install/HA): HA

Cluster information

Cluster type (Hosted/Infrastructure Provider/Custom/Imported): Azure AKS
Machine type (cloud/VM/metal) and specifications (CPU/memory): 8 Core CPU / 32 GB Ram
Kubernetes version (use kubectl version): 1.19.7

kubectl version
Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.7", GitCommit:"1dd5338295409edcfff11505e7bb246f0d325d15", GitTreeState:"clean", BuildDate:"2021-01-13T13:23:52Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.7", GitCommit:"14f897abdc7b57f0850da68bd5959c9ee14ce2fe", GitTreeState:"clean", BuildDate:"2021-01-22T17:29:38Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"}

Cluster Explorer showing the cluster in a good status

Cluster Manager showing the cluster in error and waiting to remove nodes.

I tested the following:

on HA rancher v2.5.5 deploy an AKS cluster with 1.17.13
Deploy another cluster with 1.18.10
upgrade rancher to v2.5.6
upgrade k8s version on both to 1.19.7

I did the update of k8s simultaneously.  AKS does not allow for upgrading more than 1 minor version at a time. When attempting through rancher, the error was reported in the UI and remains in an error state.

The other (v1.18.10) cluster remained in upgrading stage for longer than expected (at least 10 minutes) but eventually was able to upgrade to v1.19.7 with all services up in both ember and dashboard UIs.
Currently, there is an issue with Azure. Once that resolves, I will continue testing old version upgrades.

We have the same problem:

The underlying VMs are deleted but the nodes in rancher won't be deleted
Cloud: Hetzner with Hetzner Cloud Controller
Rancher v2.5.7
We have mutliple Nodes in Error state after manually deleting them or scaling them down.

I was able to continue testing today, and was able to successfully upgrade AKS clusters.

on HA rancher v2.5.5 deploy an AKS cluster with 1.17.13
Deploy another cluster with 1.18.10
upgrade rancher to v2.5.6
upgrade minor version of each cluster 1 at a time

You started with a later version of Rancher. These clusters we created were created with a 2.4.x version of rancher.  I'm wondering if something about the "older version" might have more to do with it.  Can you shed more light on what "Waiting for user-node-remove" means, especially for a cloud provider k8s?
What's confusing me is that the cluster manager shows one state, while the explorer shows another state.

On version:
Rancher | v2.5.7
User Interface | v2.5.6
Performed the following tests. Haven't seen the issue mentioned above
Scenario 1:
Bring up a cluster with amazon node template with 1 etcd, 1 cp and 4 control planes and kubernetes version 1.20
Once the cluster is active, delete 1 worker node
Node is cordoned and removed
Scenario 2
Bring up a cluster with linode node template with 1 etcd, 1 cp and 4 control planes and kubernetes version 1.19
Once the cluster is active, scale down 1 worker node
Node is cordoned and removed
Scenario 3
Bring up a cluster with DO node template with 1 etcd, 1 cp and 4 control planes and kubernetes version 1.20
Once the cluster is active, create a workload with ephemeral volume.
Delete the node with the ephemeral volume attached
Node is cordoned and removed
Sample screenshot for all the three scenarios:

My issue was able to be resolved.  It appears that due to my upgrade path that some finalizers for the node CRDs that rancher uses to keep the node state were added in what appears to be a bug or possible upgrade path.  The finalizer as I understand it from rancher support is removed in the latest version(s?) of rancher.
I don't want to pass on mis-information so I don't want to paste any resolution steps until Rancher has time to vet their process and distribute it to those affected.

Similar issue - https://github.com/rancher/rancher/issues/31427

Upgraded from 2.4.12 to 2.5.5 to 2.5.7 (HA setup). Had an AKS cluster and an RKE custom cluster. Deleting nodes from custom cluster and k8s upgrade of the AKS cluster went through on 2.5.7. No issues seen.

Upgraded from 2.4.12 to 2.5.5 to 2.5.7 (HA setup). Had an AKS cluster and an RKE custom cluster. Deleting nodes from custom cluster and k8s upgrade of the AKS cluster went through on 2.5.7. No issues seen.

Can you do the test where you start at 2.4.3.  Create the cluster. Upgrade to 2.5.2 then to 2.5.6 using helm deployment for upgrade.  Then at 2.5.6 upgrade the AKS cluster.

For my case the nodes are deleted at my Cloud provider just hang around in rancher.
If you go into the cluster explorer for the local cluster and then into the nodes, edit yaml and set the user-remove annotation to false it will delete the node from rancher.
I don't know about the side effects but it will delete the node finally fro rancher.


Getting error  ImportError: No module named flask_reddit.users.views

When I try to run init.py for testing and dev purposes. I get the following error.
(reddit-env) naruto@naruto-VirtualBox ~/projects/flask_reddit/flask_reddit $ python __init__.py
Traceback (most recent call last):
  File "__init__.py", line 35, in <module>
    from flask_reddit.users.views import mod as users_module
ImportError: No module named flask_reddit.users.views

Solved by adding the root folder to path.
Will post code that I added and close the issue.


Split path using the platform specific path delimiter

Should hopefully resolve issue #1

Thanks @moddular :) I'll take a look on Monday on a Windows VM (I don't have one set up at home) unless you can verify that it's fixed?

Hmm, it fixes the issue of being able to search the path on windows, it doesn't fix the issue that windows binaries might have file extensions :( e.g. node.exe not node. The supported extensions seem to be available in process.env.PATHEXT - I'll see if I can update the patch tomorrow to take this into account.

So with a PATH
C:\Program Files\nodejs;C:\Users\IEUser\App Data\Roaming\npm
and a PATHEXT
.CMD;.EXE
then:
hasbin.all(['node', 'npm'], function() { });
would check:

C:\Program Files\nodejs\node.EXE
C:\Program Files\nodejs\node.CMD
C:\Users\IEUser\App Data\Roaming\npm\node.EXE
C:\Users\IEUser\App Data\Roaming\npm\node.CMD
C:\Program Files\nodejs\npm.EXE
C:\Program Files\nodejs\npm.CMD
C:\Users\IEUser\App Data\Roaming\npm\npm.EXE
C:\Users\IEUser\App Data\Roaming\npm\npm.CMD

if PATHEXT is not set it would just check the name of the binary in each location in the PATH.

Looks great! Thanks, Andrew :)


JavaScript enabled tab interfaces - is the ability to use dropdowns useful?

Currently the dynamic javascript enabled tab navs http://v4-alpha.getbootstrap.com/components/navs/#javascript-behavior allow for the use of a dropdown.
This particular use is fairly non-standard, and from an accessibility point of view this impedes adopting a "proper" tabbed interface pattern with correct role="..." etc https://www.w3.org/TR/wai-aria-practices-1.1/#tabpanel as that pattern does not foresee anything other than straight "tab" triggers.
As such, I'd like to get opinion from implementers about whether or not they find the current tab with dropdowns useful, or if dropdowns can be removed (which would then allow a proper ARIA tab implementation).

Indeed a feature that is definitely not so common and I'd live without it. I'm not sure I ever saw it implemented. However, I see one use-case for a "dropdown tab". It is for better (?) mobile support. E.g. if you have many tabs that do not fit the small screen size (width) we could create a "dropdown tab" to give access to those that are out of screen. I don't like tabs in multiple rows and I didn't see Bootstrap's addressing this issue. Please, correct me if I'm wrong.

Yeah, was thinking about that earlier. I'd argue it's bad UX/UI when you have to resort to that sort of thing on a small screen. Particularly since if you switched to a "tab" that hidden behind a dropdown, you as a user don't even get a visual indication of what the current active tab is (as it's hidden inside the dropdown). Just feels clumsy and bad as a "real" tabbed interface (for actual navigation that isn't an in-page tab panel, it's possibly less problematic I'd say, as you'd likely have some additional thing in your page like a breadcrumb to show the user where they are...)

For a real tab interface with many tabs on small screen you'd probably want something like a horizontally scrollable tablist bar...something outside of what BS currently provides.

"Dropdown-Tabs" might sometimes be useful to save some space, but to me ARIA conformance is more important.
That being said and with mobile support already mentioned here I'd also like to say that having a responsive and ARIA-conformant tab bar solution would be even more important to me.
Maybe the current JavaScript tab interface solution could be replaced by adopting this: https://codepen.io/pankajparashar/pen/oJEAF (the link to which I found here: http://www.cssmojo.com/tab-panel-the-right-way/)?


Where is "How to ignore ssl certificates" documented?

Hi @niftylettuce , the following issue How to ignore ssl certificates was closed with comment: v5.1.1 released that resolves this issue.
Please inform users how to use this feature.

It's documented in https://github.com/visionmedia/superagent/blob/master/docs/index.md#tls-options
A quick check of the commits that went into 5.1.1 revealed it.


Implement conversions to GEOS objects

TODO:

Implement conversions back to geoarrow from arrays of geos objects
Add tests
Document minimum GEOS version of 3.10

@chrispahm this may interest you! It won't work in webassembly but opens the door to more interactions between the geoarrow format and GEOS

That sounds great! Is the idea then to use GeoRust methods if available, and otherwise fall back to GEOS?
And could you explain a little further why this wouldn't work in webassembly?

The idea is to let users choose whether to use native georust or GEOS for operations. The GEOS support is behind an optional feature flag so that environments that don't want to/can't include GEOS can work with all the non-GEOS functionality.

And could you explain a little further why this wouldn't work in webassembly?

WebAssembly is a pretty minimal environment, and doesn't include e.g. libc by default. So in the C/C++ world, that's where emscripten comes in, to bridge between C programs and wasm. But Rust doesn't have the baggage of C and can compile to webassembly without needing emscripten. So in Rust there are two different targets for Wasm: wasm32-unknown-unknown and wasm32-unknown-emscripten, where only the latter uses emscripten.
Most of the Rust-wasm world is built on the former, and so the tooling for using rust + emscripten is very underdeveloped. More info in https://github.com/rustwasm/team/issues/291.
So it'll be possible to build to the wasm32-unknown-emscripten target including the optional GEOS support, but it's not a path well-trodden.

Notes to self:

Getting geos_linestring_objects does not live long enough on trying to convert to a MutableLineStringArray.

I didn't get the reverse conversion finished but going to merge so that I can prototype/test functions using GEOS that don't return geometries, e.g. area

Thanks for the explanation @kylebarron! So essentially, if it would be possible to build to wasm32-unknown-emscripten, it would also include GEOS? So we wouldn't need to import geos-wasm at another point, right?

Correct, if we figured out the build tooling for wasm32-unknown-emscripten, then ideally we could have performant FFI between JS and wasm but still use GEOS for the algorithms under the hood.


Long string in default value causes infinite loop within usage printer

In using picocli version 0.9.7 as part of a Groovy script I am writing, I have uncovered an infinite loop in the usage() printer. Specifically, I have a command line so:
@Command(showDefaultValues = true)
class MainCommand {
    @Option(names = "--config-dir", description = "The path to the directory holding the configs")
    File configDir = Paths.get(getClass().getProtectionDomain().getCodeSource().getLocation().toURI()).getParent().getParent().resolve("configs").toFile()
}

This results in a long path like so: C:\Users\USERNAME\Development\MY_SOFTWARE\my-software-config\configs
This value, after running through break iterator, results in the value of variable text within method CommandLine.Help.TextTable.copy(BreakIterator line, Text text, Text destination, int offset) being \Users\USERNAME\Development\MY_SOFTWARE\my-software-config\configs, which is unable to be wrapped when used by CommandLine.Help.TextTable.putValue(int row, int col, Text value) line 3013. This inability to wrap causes the wrap iterator inside that function to go into an infinite loop.
Now, my workaround is to stop outputting the default value, but I imagine this could bite others as well, but that makes my script less clear.

Thanks for reporting this! I haven't looked in detail yet but this is obviously not good.
Do you feel like creating a pull request for this?

Apologies for the delay, I will see what I can do. What I'm thinking should happen in this case (where a single "word" is larger than the column's maximum width) is that the output should fall back to naive splitting and breaking in the middle of the word. What do you think?

Yes, instead of using only BreakIterator.getLineInstance() it should probably fall back to  getWordInstance() if the value doesn't fit.


minor: adding end-slashes when needed

What kind of changes does this PR include?

[x] Minor content fixes (broken links, typos, etc.)

Description

What does this PR change? change "small" parts of the /en/ docs links to include backslashes when needed to avoid unnessessary redirections.

Fabulous work, @Chrissdroid :star_struck:
I only found one of our links (showing up in these file diffs) that I think was missing a slash, and there were a couple of external links where I wasn't sure whether they maybe needed a slash too, just by looking at them, so I asked you.  :)

Saw all your responses, so once that one link of ours is fixed, LGTM! Thank you! :rocket:

wait before merging so i can undo the discord link change

Oh, that Discord link is fine to change! Let's make all the links in the public docs website just https://astro.build/chat/
I only meant that there's one that goes right to docs for contributors (somewhere in README, I think) and I would like to keep THAT one the direct link to docs, maybe. But everything that will show up on the website should just be the regular /chat/ link, I think!
Go, go! Change it back! :smile:

I was wandering if it's not better to redirect user to the docs chat than the global chat but for consistency for now we could just let everything in the docs be the https://astro.build/chat/ yeah

You can merge then! 👍

Yes, a user reading the site doesn't necessarily want to jump into the docs channel and talk about docs. :)  It's only a convenience for helping new CONTRIBUTORS find us, so that's why I think we're good having the general /chat/ address all over the website itself.
This is Great! Let's do it!


[flatwhite] green string highlighting for web-mode

Please upload some before and after screenshots!

Sorry, of course! I did not pay any attention while I was doing this!
Before:

Here's an after:

You can see that the strings are really lost in the before screenshot. Furthermore, from a very quick google, it seems like the green background is how it's implemented for flatwhite on other platforms:

Looking at the final screenshot of the sublime text implementation I guess the web-mode-variable-name-face should also have a blue background.

Ah, wrong colour, should have been blue, not teal, but you get the picture

Huh, I could have sworn I checked web mode when porting this theme :) anyway, good catch

I could take a look at the variable-name thing and check if it matches my understanding of how the original theme is supposed to work.

So, I think the blue highlight on variables might be unique to the Sublime Text implementation. The original Atom implementation does not seem to highlight variables in this way (https://github.com/biletskyy/flatwhite-syntax).
However, the blue highlight does look pretty cool in some ways... so... I wonder if we could add this as a configurable option for the theme?

@ShaneKilkelly that is an option, but I'm fine with adding that blue as-is. Flatwhite syntax is very subtle, so even with that color it is not overwhelming.

Personally I think the more background highlights, the better. Flatwhite's whole style is based around those backgrounds and I think they look really awesome.

Alternatively, could we add the blue highlight by default, with an option to turn it off?
The flatwhite concept seems to have been built around a minimalist aesthetic, which can certainly be divisive. I think I'm leaning toward agreement with the consensus that more highlights are good in the general case, but I would also like the option to stick closer to the original concept.
I can open a separate PR to add the blue highlight for vars, if we're all in agreement? :)

@ShaneKilkelly that's fine! You can add it with a defcustom like some configurations in other themes.

@ema2159 done :) https://github.com/hlissner/emacs-doom-themes/pull/518


Operator to support AJAX persistence and multicasting

Currently, there's a PR to remove cache #2012. The original intention of cache was to support use-cases, mostly coming from the Angular 2 community, revolving around wanting to persist successful AJAX requests, but still enable retry and retryWhen on failed AJAX requests.
This operator should

Multicast the source observable
Keep all values and "replay" them after a successful completion
Enable "retrying" on error

Stuff to consider, and unanswered questions:

What are the behaviors when applied to a never-ending observable (Observable.interval(100), for example)
How will this operator behave when applied to another hot observable?

Possible Solutions

Re-add the cache operator but rename it to something more descriptive of it's purpose.
Add a simplified operator that takes no arguments called shareResults proposed here

For sake of discussion, we'll call this operator persist.

I love the cache operator. The name doesn't matter to me, but I hope it exists somewhere. I'm aware that I can manually do this with publishReplay and connect, but cache was simpler and cleaner.
I often use it to share data across components/routes when making HTTP requests that don't need to be refreshed often:
https://github.com/sjtrimble/fluin.io/blob/master/src/app/shared/post.service.ts
Or I used it to eliminate re-processing of incoming data from data streams.
https://github.com/StephenFluin/ames/blob/e5502d1d0aadb44d44ec1fde659ed94ebf74057f/src/app/shared/auth.service.ts#L33

@StephenFluin it should be noted that publishReplay()/connect() can't be "retried", really. On failure, it's just done.

What if we simplified it to always persist all values and multicast and we called it shareResults? I think that implies that even after all value have arrived, all of them are kept as "results" and shared amongst all subscribers. There would be no arguments.
Observable.ajax.getJSON('http://something.com/whatever').shareResults();

Thoughts?

I also think shareResults keeps some similarity to the share operator, which has a similar behavior, retry-wise, but adds that little extra to imply result persistence.

Use-case to consider (shared auto-updating value, which should not be updated in periods without subscribers):
if (cache) { return cache; }

let serviceCall = Observable.ajax.getJSON('http://something.com/whatever')
    .retryWhen(errors => errors.concatMap(() => Observable.timer(period)));

cache = serviceCall
    .expand(() => Observable.timer(period).concatMap(() => serviceCall))
    .cache(1, period);

return cache;

@newsash I think we'll introduce a cache with more robust cache insertion and eviction logic for scenarios like that. It's probably out of scope for this common use case.

@blesh shareResults sounds great, any chance it will land in RC2? I'm trying to avoid building my own.

+1 for shareResults or even shareResult - we currently don't have usecases where we would want to replay more than the most recent result/value.

Any update on when this might land? It's a highly desirable operator.

Would it be possible to include a parameter that will control how many previous emissions are replayed?
That would also satisfy @IgorMinar request.


Use unique_ptr when we know we have to manage its lifetime

Don't need custom destructors
Won't ever forget to delete them
Someone reading the code get's the contract -- they know who will delete the object

as I was looking at hittesting, I realized I was confused about commandpath lifetimes... hence this PR


I/O button on all mashines turns screen blue. No crush. Just can't adjust I/O

Like title said...
What happens:
What you expected to happen:
Steps to reproduce:

...

Affected Versions (Do not use "latest"):

EnderIO:EnderIO-1.10.2-<IP_ADDRESS>_beta
EnderCore:EnderCore-1.10.2-<IP_ADDRESS>-beta
Minecraft: 1.10.2
Forge:Forge <IP_ADDRESS>3

Your most recent log file where the issue was present: No Crash. Just bug.
[pastebin/gist/etc link here]

known issue due to work in progress


[Design] Layouts and Widgets

I have given some thoughts about how to improve content placement, which include widgets and layout, as they are known in O1.
TL;DR;
Nothing much to change in Widgets, reuse Widgets as the fragments for Layouts, build a new Layout editor like CraftCms.
Current state
Here is my current understanding of these two modules in O1.
Widgets
Be able to place some content in specific locations across pages. This relies on the notion of layers that represent a predicate. When a layer is active, the widgets associated to it are displayed in their configured zones.
A Widget is a stereotype (a category of content types). It has a title (a section header) and a position. It's instances are content items, which can be drafted, versioned and localized.
Layout
It's a part that lets an editor define organized content in a grid. Its content is part of the content item, so it can be versioned, drafted and localized as a whole. Each fragment of the grid is called an Element. They are a specific concept (different than field, part or widget).
Pros

Widgets are great to place content across different pages. The notion of layer is easy to understand and powerful.
Layout are very simple to use and understand and fulfill a very important requirement from users.
The layout storage is optimal as it contains all elements in a single json document.
The layout part and widgets per page have simplified the widget feature as before we would have had created a layer for each page.

Cons

Widgets and Elements seem to have something in common but they are yet different. They should be interchangeable, meaning the same component should be reused for Layout or Widgets.
There is a special part that allows a user to add widgets to a content item, though each widget is still a distinct content item and it not optimal for performance.
The Layout editor is not adapted for smaller devices and touch screens.

Proposal
Widgets/Layers

Use Widget content types as the common concept for Layouts and Layer items. A Widget now represent any content fragment that can be placed on a page. We can reuse fields parts and blocks even for a Layout. And we can reuse more complex widgets in layouts too (Tags, projections, ...).
Rename the Widget module to Layers as widgets is now just a stereotype.
The Layers module would behave the same way as Widgets in O1, with independent (versionable, draftable, localizable) content items. The layer would store the content item ids to be able to retrieve them in a single request. The script evaluation would still be done in a scripting language and extensible.
The Widget Container part would storage would contain the content of each widget content item it's made of.
The list of available zones would be defined in the settings of the content type part definition (per content type).

Layout

Rename the Layouts module to [TBD] to prevent the confusion with theme layouts.
Create a Layout part that can be configured with a selection of Widget types. These types are available in the Layout editor. c.f. CraftCMS video: https://craftcms.com/features/matrix.
The layout part would contain the content of each widget content item it's made of.
The allowed positions of a widget in a layout would be defined in the settings of the Layout part, common to all the widgets it can contain.

@DanielStolt @bleroy @sfmskywalker

Layouts -> Flow ?

Flow, as in the name for the Layouts module?

We have had a couple of discussions about this offline, so I would like to paraphrase how I interpret this proposal, expressed a little differently. And at the same time add my personal dreams and desires into the mix. :)
Widget is the new block
Widgets simply become the new "universal block" for every type of reusable/embeddable content. Elements (which are part of layouts today) would no longer exist at all. The distinction between these two is erased.
Just as before, there can be different types of widgets, some very simple (like HTML widget), some more advanced like projections, and you can also build your own. Just as before, they are content items, draftable, versionable, localizable and so on.
These widgets can be used in three ways:

Placed on layers into global zones defined by the theme
Placed on flows locally within a content item
Rendered imperatively/programmatically from a Razor view

Widgets can be either global or local. A global widget can be created once and then reused in all the above places. Local widgets are created and managed completely within a specific layer or flow, and are not visible in any global content list or list of global widgets.
Layers
As Sebastien wrote, layers would be pretty much what the widgets module is today. They become a place to express that a given widget (global or local) should appear in a specific place under a specific set of circumstances.
The editor for layers would be made more interactive with drag-and-drop support, but it would not concern itself with trying to graphically represent the layout. Just like today, the theme manifest declares a number of zones, and the layer editor shows them top-to-bottom, and allows you to place widgets on the intersections of these layers and the zones.
Flows
Flows would play the same role that layouts play today in O1 (i.e. building the local content of a content item) but with a different philosophy. Instead of trying to be a "layout" editor and concern itself with WYSIWYG graphical representation of the content and its layout, the flow editor is about building your content, structure and flow.
Instead we utilize live preview to provide the WYSIWYG part.
Here you can also place widgets into your flow, both global and local. The toolbox lets you access the global widgets, and also lets you create and embed local widgets of all the available widget types.
The flow editor is still very slick and interactive, just like the layout editor today, but it focuses on structuring and organizing your content, rather than laying it out in two-dimensional space. The graphical depiction provided by the layout editor today is never very close to reality anyway, and it's not even theoretically feasible because what the theme will do at runtime is not known at design time.
The live preview can also provide explicit support for selecting which theme to preview with, in cases where your site has multiple active themes and maybe custom theme selector logic.
Widgets from Razor views
Finally, it would be cool if you could also render a global widget directly from within a Razor view. Have no idea how hard or easy that might be to accomplish, but it would enable some very appealing scenarios IMO.

Just one idea on the fly because i don't remember the details and maybe too late.
Ok about the Preview and unification. So, maybe we could always use the main concept of content items in which, with the flow editor, we define zones in which we add items ... The idea being to also use the flow editor for theme zones.

So, Maybe a theme could be tied to a content item where, with the flow editor, we could define e.g zones placement properties. Maybe we couldn't create them if still provided by the theme manifest.

Then, in each zone we could add items with placement properties, layer rules ... Then we could do the same in an individual item.

I say this because somewhere it's quite the same to add a widget in a theme zone as defining an area in a page content item where we place e.g another widget.

And somewhere it's also quite the same to have a widget in a theme zone and with a layer rule as having a page content item in the content zone with the implicit rule related to the current request.

E.g in O1 with layout we can define in items what is normally done through theme zones. But the need of layout templates which is not so simple e.g when updating a template and then all its related items.

The problem was because we are doing in an item what is normally done through theme zones, and this because we couldn't use the power of the layout editor for zones of a given theme (not tied to an item).

Best.

If you mean being able to add a widget to a zone, from a content item editor, we have that in mind too. Sipke made a module for that in O1.

Yes i know so we can do things as normally done with theme zones in the widgets page. But when we want to do the exact same things for multiples items, there is the need of having layout templates.
But layout templates are not simple to implement because e.g when you update a template you need to update all its related items. So the idea to apply the flow editor directly to the theme zones, a theme being tied to a kind of content item.

skype me, I don't understand

But Sebastien explained to me that also using the flows editor for the placement of theme zones themselves would be too limited comparing to e.g what we can do with razor files.


WebMercatorProjection has a background color

I have a problem, ask for help
When I add the image of WebMercatorProjection to the map, when I set the background color to other colors during reprojection (ComputeEngine.js), sometimes the background color appears in the reprojected image.As shown in the picture below, I can’t find out where my code is wrong, is there any possible situation?

Now I find that the reprojected picture has a background color. But I still can’t find the reason, this is the projected pictur

e

@mylove10086 For general questions like these, please post in our community forum - we have many active users there that are likelier to see your post and have suggestions. It might be helpful if you include some sample code as well!


Remove intermediate method from the filters.

The filters have the following methods:
_validate
_sanitise
validate
sanitise
However the methods without an underscore do not do anything except call the methods with an underscore. So these methods are unneeded.

This issue is already fixed.


nav-bar menu item dropdown

Is it possible to add dropdown menu item in nav-bar not as button but link?

@addicted2sounds bh currently does not provide that but stay tuned…
Meanwhile, you can use "normal" bootstrap to achieve the same effect

:+1:

+1 Would love support for this! I'm wondering if I can stub out an implementation in my app until this gets completed. I'm assuming the signature would not change, it would detect if you're in a nav in the stack, and then be buttonless? That seems how other features in bh are done such as adding a nav-brand class to a link in the navbar.


Entering STM DFU mode is not stable.

The Kameleon-Core should go to STM DFU mode when BOOT0 is 3.3V at power up. But it fails from time to time.

Commits for this issue
3bcafe79c4c4e95979090a2f41a0e8945652a190


Introduce logging framework

Currently errors are thrown as follows: throw Error("rocksdb open failed: " + err);
Like this they end up on standard error (logs to standard out).
This is very difficult to parse and to used e.g. for alertings.
Let's introduce a log framework, e.g.
https://github.com/pinojs/pino
see also #239

One advantage of the introduction of a logging framework would be:
We could get rid of the email notifications, instead it would be up the hoster of a node to configure alerts with the configured logging / alerting backend ( e.g. AWS cloudwatch / SNS)

Agreed that some more advanced logging that would allow to specify and filter by log level would make sense.
I took a quick look at pino and not sure having logs in json is a good idea, that would make their manual inspection without additional tools more difficult.
Not sure I get your idea of getting rid of email notifications, what for? Are you suggesting something hoster-specific?

There are some other cloud solutions for logging too, but these get very costly with the amount of logs that Obyte nodes generate https://www.papertrail.com/
As I understand, @frank-bee suggestion is to replace those email notifications with some other logging system, so there would be no need to have sendmail or SMTP.

Other things being equal, I would always prefer standard, well-known, and widely available email over third-party services with their proprietary APIs.

advanced logging that would allow to specify and filter by log level would make sense.

That one of the advantages. Furthermore it allows you to react differently on different types of logs, e.g. for error or fatal errors one could inform some admin via alert.
In general it makes sense to introduce some kind of logging architecture. It is a way of doing "seperation of concerns" which are here: collection, transport, storage,  analysis, alerting.
The only thing to be done in the app code  is the collection. All the other concerns would be done in another process and by standard tools. you may ask why?
Some advantages of such a setup are

transport should be done by a different process for performance and security reasons (e.g. if app crashes , it cannot sent the last and most important error messages
storage could be done on a suitable medium (e.g. soemthing like cloudwatch in AWS or an ELK cluster). on the actual node storage might be limited.
Analysis might be optional, no need in each setup
Alerting could be done in different ways, again depending on the usecase (e.g. some people might  have a slack channel for the operations teams which should be alerted, others want to use email

There are some other cloud solutions for logging too, but these get very costly with the amount of logs that Obyte nodes generate https://www.papertrail.com/
As I understand, @frank-bee suggestion is to replace those email notifications with some other logging system, so there would be no need to have sendmail or SMTP.

I would not replace it but rather get rid of it. If you have the logs in a proper format, it is up the node hoster to "do someting with the logs".  As I described about, typically your store the logs somewhere for later analysis ( e.g. papertrail, cloudwatch,...) plus you confiugre some alarm on e.g. errors (e.g cloudwatch + SNS in AWS or something similar in ELK or papertrail)

I took a quick look at pino and not sure having logs in json is a good idea, that would make their manual inspection without additional tools more difficult.

https://getpino.io/#/docs/pretty

Not sure I get it.
Everything, which has the headless-obyte as dependency is already writing to log file, so if you mount ~/.config/headless-obyte/ do different drive then you can have the node drive separated from the data drive. And even without mounting to separate, you could make something to tail the log file from main drive.
Everything without headless-obyte, you can still output the stdout and stderr to logfile and tail that log while with some other process. It's all doable already today, just matter of how you want to set it up.

Currently the main issues I see regarding logging:

no standard log format with timestamp (see my orignial post above)
email feature ( I cannot use an smtp server in my setup but still want to configure alerts)

I don't think there is much to implement but basically agree on a way to do logging ( to some extend)

What is missing in the log.txt that gets generated with headless-obyte or from the screen of other nodes that you can direct to any file? I see that each line starts with:
Thu Mar 12 2020 19:13:27 GMT+0000 (Coordinated Universal Time): SOMETHING


[Snyk] Upgrade react-router-dom from 5.3.0 to 5.3.1

This PR was automatically created by Snyk using the credentials of a real user.Snyk has created this PR to upgrade react-router-dom from 5.3.0 to 5.3.1.

:information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.

The recommended version is 1 version ahead of your current version.
The recommended version was released 24 days ago, on 2022-04-17.

Release notes

Package name: react-router-dom

5.3.1 - 2022-04-17This release adds missing LICENSE files to the published build.

5.3.0 - 2021-09-03

    from react-router-dom GitHub release notes

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs

https://github.com/equinor/EchoCore/pull/142/ upgraded here thus closing


Adds 'purview retentionlabel add' command. Closes #4147

Adds `purview retentionlabel add' command. Closes #4147

Well done @nanddeepn
We'll try to review it ASAP!

Thanks @nanddeepn for your quick fixes. I will try to review it ASAP 👍.
you rock 🤩

ready to merge 🚀

merged manually. Thank you for your awesome work 🤩


Unexpected result when applying transformation to .mha image

Dear all,
I have two CT images of the knee which are segmented using a neural network. I have converted these segmentations into two .stl meshfiles and registered these using a coherent point drift algorithm in matlab. Applying the rotation translation to the moving pointcloud shows good results (see fig below). When I superimpose the meshfile onto the targetimage, this also gives the expected result.

Now I would like to apply the same transformation to the .mha imagefile using SimpleITK. I've tried this by writing a transform file and using the script below to execute the transform.
transformfile.txt
This however does not give me the results I was looking for, as there is no overlap in the image structures (or in the image at all for that matter). Unfortunately I'm unable to figure why it isn't working as I expect.
I'm hoping someone can point me in the right direction.
Thanks in advance for any responses.
Hans
p.s. As the new image direction I use an identity matrix. The moving image has a (1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 1.0) as a direction, could this be (part of) the issue? However if I take the new direction = img.GetDirection(), the resulting resample space is completely blank.
import numpy as np
import SimpleITK as sitk
import math

inpath = 'imagetoberotated.mha'
outpath= 'output.mha'
transform = 'transformfile.txt'

img = sitk.ReadImage(inpath)

extreme_points = [img.TransformIndexToPhysicalPoint((0,0,0)),
                  img.TransformIndexToPhysicalPoint((img.GetWidth(),0,0)),
                  img.TransformIndexToPhysicalPoint((img.GetWidth(),img.GetHeight(),0)),
                  img.TransformIndexToPhysicalPoint((0,img.GetHeight(),0)),
                  img.TransformIndexToPhysicalPoint((0,0,img.GetDepth())),
                  img.TransformIndexToPhysicalPoint((img.GetWidth(),0,img.GetDepth())),
                  img.TransformIndexToPhysicalPoint((img.GetWidth(),img.GetHeight(),img.GetDepth())),
                  img.TransformIndexToPhysicalPoint((0,img.GetHeight(),img.GetDepth()))]

affine = sitk.ReadTransform(transform)
inv_aff = affine.GetInverse()
extreme_points_transformed = [inv_aff.TransformPoint(pnt) for pnt in extreme_points]

min_x = min(extreme_points_transformed)[0]
min_y = min(extreme_points_transformed, key=lambda p: p[1])[1]
min_z = min(extreme_points_transformed, key=lambda p: p[2])[2]
max_x = max(extreme_points_transformed)[0]
max_y = max(extreme_points_transformed, key=lambda p: p[1])[1]
max_z = max(extreme_points_transformed, key=lambda p: p[2])[2]

nw_spacing = img.GetSpacing()
nw_direction = np.eye(3).flatten()

nw_ori = [min_x, min_y, min_z]
nw_Defaultpixelvalue = float(-2048)
sz_out1 = [math.ceil((max_x-min_x)/nw_spacing[0]),math.ceil((max_y-min_y)/nw_spacing[1]),math.ceil((max_z-min_z)/nw_spacing[2])]

resamp1img = sitk.Resample(img,sz_out1,affine,sitk.sitkLinear,nw_ori,nw_spacing,nw_direction,nw_Defaultpixelvalue)
sitk.WriteImage(resamp1img,outpath)

Hello @1989HD,
Not clear exactly what it is you want to do. Below is my understanding:

Blue points - extracted in fixed image coordinate system.
Red points - extracted in moving image coordinate system.
Registration using coherent point drift yields an affine transformation, not rotation-translation. This transformation maps points from the fixed image coordinate system to the moving image coordinate system. You applied the transformation to the blue points and they were mapped close to the red ones.

Here is what's not clear:
4. You want to: (a) define a grid in the fixed coordinate system and resample the moving image using that, or (b)  define a grid in the moving coordinate system and resample the fixed image?
In both cases I'd recommend starting with the grid defined by the images, don't define your own unless you know how to position it relative to the image.
If option (a) then use the transformation as is and the fixed image defines your grid. If option (b) then use the inverse transformation tx.GetInverse() and the moving image defines your grid.

Hi @zivy
Thanks for your response and sorry for the confusion.
I have two CT images, both in their own coordinate system. I have segmented both images and made them into pointclouds (these pointclouds overlap their corresponding images) I then used a rigid registration (so only translation and rotation)on these pointclouds, with the picture above as the result (red = fixed, blue = moving).
From this registration I have a rotationmatrix and translationvector that I would like to apply to the .mha image to superimpose the images. For this I use the script above.
As I apply the same rotation and translation to the image, I would expect the same results as with the pointclouds, i.e. superimposed tibiae. I do get an outputimage, but when I overlay the target and moving image, the tibiae are not superimposed. I do not understand why this is the case and what I'm doing wrong.
I hope this clarifies my question!
Regards
Hans

Hello @1989HD ,
Based on the transformation file you provided, you are not doing rigid registration (rotation, translation), you are doing affine (rotation, translation, scaling, shearing and reflection). The resulting matrix does not represent a rotation (RR^T=1 and det(R) =1).
Are you using this matlab function? If yes, did you specify the optional transformation type? Default transformation type isn't rigid. Two possible issues: (1) The matlab result isn't a rotation matrix and the writing operation is fine. (2) The matlab result is a rotation and the writing operation modifies the data somehow.
Finally, ignoring the transformation type, I would suggest simply to resample the moving image onto the fixed image grid using the transformation you obtained. This will work for all transformation types.
import SimpleITK as sitk

fixed_image = sitk.ReadImage('fixed_image.mha')
moving_image = sitk.ReadImage('moving_image.mha')
tx = sitk.ReadTransform('transformfile.txt')
moving_resampled = sitk.Resample(moving_image, fixed_image, tx, sitk.sitkLinear, 0.0, moving_image.GetPixelID())

@zivy Thanks again for your reply!
Actually I'm using a different CPD algorithm that does result in a rigid transformation. There is no shearing, scaling or reflection. I write this to a transform file (.txt) from Matlab. When I calculate the dot(T,T') I do get 1 actually. The reason why you do not find the matrix to be orthogonal could be probably a precision error? http://itk-users.7.n7.nabble.com/Problems-with-the-orthogonal-rotation-matrix-in-versorRigid3DTransform-td26941.html
The reason why I use Affine instead of any other transform is that it is (to my knowledge at least) is the only transformfile which directly contains a 3x3 rotation matrix (although flattened), and thus not requires for me to convert the rotations to another format. Am I right to assume that when other parameters like transform.Scale & transform.Skew are all zero, this is equivalent to a rigid transformation?  I will write it into a .tfm that is suitable for a VersorRigid3DTransform.
With respect to the resampling grid, your method will indeed give me the correct resampling grid if the transformation is done right, thanks! I will try this to get the transform right. However, I believe this might cause part of the moving image to fall out of the resampling grid, and I'm also interested in that part.
Regards,
Hans

Hello @1989HD,
Easiest approach is to use the Euler3DTransform (clear understanding of the rotation parameterization, three angles as opposed to unit quaternion).  Use its SetMatrix and SetTranslation methods.
The problem with the transformation file you provided is that it doesn't represent a rigid transformation, this isn't a precision issue, the matrix has a determinant of -1, so it isn't a rotation it's a reflection. I suspect the implementation of the CPD algorithm you are using admits reflections, similar to the issue solved by Umeyama vs. Arun's algorithm for absolute orientation - nothin new under the sun), code below shows this:
import SimpleITK as sitk
import numpy as np

tx = sitk.AffineTransform(sitk.ReadTransform('transformfile.txt'))
np_mat = np.array(tx.GetMatrix()).reshape(3,3)
np.linalg.det(np_mat)

With respect to resampling grid size, you can take the grid defined by the fixed image (spacing, direction cosine matrix) and simply enlarge it (bigger size, and move the origin based on the new size you use - how it pads the original grid).


Unexpected allele changes

Hi @kimrutherford.
@ValWood has flagged some alleles that have been changed recently, and I am not sure why they have undergone certain changes.

isu1-D37
isu1-D37A

This was a duplication, and the descrption of both alleles was D37A. The coordinates are incorrect, as they refer to the coordinates in a different organism, the correct is D90A. This seems to have been manually fixed by me here for isu1-D37A:
https://github.com/pombase/allele_qc/blob/8cc48d73fd06193037ba50151f59a668bde8f1d7/change_log/allele_manual_changes_formatted_19042023.tsv?plain=1#L33
However, isu1-D37 has also been fixed, even though it's not in the list of manual fixes. Perhaps I changed it in Canto by hand and forgot to rename the allele, but I was wondering if it could be the pipeline to ingest the changes into Canto instead. Does it only check for pairs of systematic id + description? In other words, if two alleles of the same gene have different names (isu1-D37A and isu1-D37), but same description (D37A), do both get changed in Canto, even if only one is mentioned in the fixing file (isu1-D37A)?

I think this is OK actually.  This is another case of an error which was hidden before but came to light because of the expression merges.
SPAC227.13c	isu1-D37	32806b589efc50fd	D90A	isu1-D37A	413f9c27bbcf0d46
I will fix, but to avoid confusion should I rename as
isu1-D90A and isu1-D37A as a synonym ?
Maybe I should also add an allele comment to this file:
pombe-embl/supporting_files/allele_comments.txt
In Canto the fixes to alleles need to be made independently (this is why we would like an "App" for global fixes)


java-mathematics-programmes

What the program do ?
I have done programming in mathematics concepts like number theory and Sequences.
In what programming language it is written?
Java

As per rules i have given programmes on java successfully.


Topic/readme

I think it's time this was updated.

Nice work @HuwCampbell Like the inclusion of some documentation around streaming variance

:+1: Nice.


Task: Add command to retrieve task status rstuf task info

What is the task about?
This feature is about adding a command to retrieve the task status.
Note: The -t/--token is ignored if the user uses rstuf --auth
rstuf task info <task-id> [-t/--token <token>]
Print the JSON using the print json formatted from the click.
Parent feature

#334

References
No response
Code of Conduct

[X] I agree to follow this project's Code of Conduct

@KAUTH
For this task, we can hold it. We need some other issues done before:

[ ] https://github.com/repository-service-tuf/repository-service-tuf-worker/issues/315
[ ] https://github.com/repository-service-tuf/repository-service-tuf-cli/issues/339

We should use the https://github.com/repository-service-tuf/repository-service-tuf-cli/blob/01511b781d11cda24fcac3a231a1cc14d02ef698/repository_service_tuf/helpers/api_client.py#L148 on the implementation as well.
I suggest removing it from Sprint 4, maybe doing the #332