Listening to triggers

I've the below code where I registered a trigger successfuly:
package main

import (
	"database/sql"
	"log"

	sqlite "github.com/mattn/go-sqlite3"
)

func validate(y int64) int64 {
	return y % 2
}

func main() {
	sql.Register("sqlite3_custom", &sqlite.SQLiteDriver{
		ConnectHook: func(conn *sqlite.SQLiteConn) error {
			if err := conn.RegisterFunc("validate", validate, false); err != nil {
				return err
			}
			return nil
		},
	})

	db, err := sql.Open("sqlite3_custom", ":memory:")
	if err != nil {
		log.Fatal("Failed to open database:", err)
	}
	defer db.Close()

	_, err = db.Exec("create table foo (department integer, profits integer)")
	if err != nil {
		log.Fatal("Failed to create table:", err)
	}

	// https://stackoverflow.com/q/27214529/864438 sez error-message must be constant
	mkTrigger := `
	CREATE TRIGGER insert_trigger
	BEFORE INSERT ON foo
	WHEN validate(NEW.department) != 0
	BEGIN
	  SELECT RAISE(ABORT, 'bad validate');
	END;
	`
	_, err = db.Exec(mkTrigger)
	if err != nil {
		log.Fatalf("error creating trigger %q: %s", err, mkTrigger)
		return
	}

	_, err = db.Exec("insert into foo values (5, 2)")
	if err != nil {
		log.Println("Failed to insert first:", err)
	}
}

My question is, can I define a function that listen to these triggers whenever a trigger is sent?

@hajsf I'm not sure what you mean by "a trigger is sent". What specifically are you intending to accomplish?

What specifically are you intending to accomplish

What I need is to create a func at go, that keep listening to the database triggers, once a triger is recieved I need ny code to notify me about it.
code example:
func listen(db, action){
    notification := recieve_trigger_notification_from_the_database
    println(notification)
}

In the pg for exa,mple, we can have something like this
func waitForNotification(l *pq.Listener) {
	select {
	case <-l.Notify:
		fmt.Println("received notification, new work available")
	case <-time.After(90 * time.Second):
		go l.Ping()
		// Check if there's more work available, just in case it takes
		// a while for the Listener to notice connection loss and
		// reconnect.
		fmt.Println("received no work for 90 seconds, checking for new work")
	}
}

I think there may be some confusion as to what a trigger is. The purpose of a trigger is to have SQLite (the C library) do some action (either validating the incoming data or making cascading edits to the database) in response to some incoming change. It isn't really intended to notify your client application of arbitrary changes.
Note that triggers are run as part of the same thread that is performing the database operation, and the setup you have here (invoking a user-defined function from a trigger) will not work if the modification is performed by another connection to the same database file. (That functionality is not supported by SQLite. You would have to implement some inter-process notification mechanism yourself.)
If your intent is to have some Go code asynchronously triggered whenever the database is modified by your connection, one option is to use RegisterUpdateHook. See sqlite3_update_hook for more details. Please note the caveat about WITHOUT ROWID tables.

@hajsf Can this issue be closed?


Larger workspace canvas, drag and/or scale.

One page quickly gets filled up. There needs to be a way to expand the canvas. Either by scaling or simply dragging it until you have free space available.

Current solution is to add a scroll pane around it and increase its size.


question

hello author
what is the time_horizon mean? actually, I don't know the graph means.
another question is that how to define the time? and you using the current_time to replace the actual time, how's the time moving(or increasing)?
thank you for opening source, this code is the first that I can find for resource management using DRL,thank you very mach
I am a student of BeijingJiaotong university, my email is<EMAIL_ADDRESS>we can talk with email,looking forward your reply.

Please refer to our paper https://people.csail.mit.edu/hongzi/content/publications/DeepRM-HotNets16.pdf for the description of "graph". Figure 2 shows an illustration for what the graph looks like. The time horizon corresponds to the height of each graph in that figure (height=5 in that example).
The time moves by moving up the blocks in the graphs. My talk slides have an animation. Please refer to https://people.csail.mit.edu/hongzi/content/publications/DeepRM-HotNets16.pptx page 14.


SerializableEntity with additional Data

added some extensions to SerializableEntity and to List of SerializableEntity
  Future<ExampleClass?> getById(Session session, int id) async {
    final data = await ExampleClass.findById(session, id);
    data?.resStatusCode = 200;
    data?.resContent = 'This is sample Content The will Sent Additionally';
    data?.resAdditionalValue = true;
return data;

on receiver side
      final data = await client.exampleFunc.getById(id);
      print('Testing With Response');
      print('statusCode: ${data.resStatusCode}');
      print('Content: ${data.resContent}');
      print('AddedVal: ${data.resAdditionalValue}');

I'm not sure that this is such a good idea, at least it shouldn't be in the SerializableEntity class as having these additional properties wouldn't make sense on the server side for instance.
Generally, optional values are better represented as null, rather than say -1. Having a value there could have users assume that it is valid.
For most use cases, this is covered already as the result code is always 200 if you have received a valid object. If you do not get a valid object, the result code is bundled with the Exception that is being thrown. Do you have a use case for when this would be solution would be helpful?

I'm not sure that this is such a good idea, at least it shouldn't be in the SerializableEntity class as having these additional properties wouldn't make sense on the server side for instance.
Generally, optional values are better represented as null, rather than say -1. Having a value there could have users assume that it is valid.
For most use cases, this is covered already as the result code is always 200 if you have received a valid object. If you do not get a valid object, the result code is bundled with the Exception that is being thrown. Do you have a use case for when this would be solution would be helpful?

I know that it is not a good idea.
but sometimes i think we need
 Either<ServerException, Model>

or some time with additional data from the server.
user can use a map to achieve that but it will be cool if it has some predefined class model like monad
if this need to implement it will take a lot of work I think.
so, just trying to simplify thinks


Add Ruler object

Relates to #739
Introduction
This PR adds a new world object that shows a ruler. The primary purpose is to function as a base component for axii, but it can also be used to measure stuff interactively in a scene.
The idea
Use a gfx.Line to draw the line, a gfx.Points to draw the tickmarks, and a set of gfx.Texts to draw the tick texts (I want to eventually use a single text object for this). These objects are wrapped in a new gfx.Ruler world object. That object is like a group object, and provides the API.
What makes the API hard
We can establish a few steps that the ruler must perform, in order.

User must provide start_pos, end_pos, start_value.
The user must provide ticks, or None for automatic ticks.
The camera must be used to determine the size on screen.
From this the distance between ticks must be calculated.
The sub-objects (line, points, text objects) must be updated to show line, ticks, and tick labels.

On top of that we want to let the user know the calculated tick-distance, and the values for the visible ticks, so that gridlines can be rendered in the right place.
In a previous version, I more or less implemented each step as a method, and let the user call things in correct order. But this was rather cumbersome. Instead, there's now a single  update() method, and it returns a dict with information that the user might want to use.
API
The API is up for discussion. Ideas welcome. Right now I used relatively simple methods. One needs to at least two calls to "apply" the ruler. This leads to somewhat more verbose code, but makes it more modular too. For example, the result of calculate_tick_step() can be used to set the step size in the grid!
Quick example:
ruler = gfx.Ruler(**any_props)
ruler.start_pos = ...
ruler.end_pos = ...
ruler.other_props = ...

def animate():
    rulery.update(camera, canvas.get_logical_size())
    # Or, when you want the tick values:
    #ruler_stats = rulery.update(camera, canvas.get_logical_size())

Notes on the "visible range"
The ruler has logic to determine a good distance between ticks so that ticks are not too far apart or too close. In other words, the tick density on screen remains more or less constant. But this means that the density of ticks in world space increases as one zooms in. So when zooming in with a factor 10, when there would normally be 20 ticks visible, there would be 200 on the total line. And possibly much more with a perspective camera.
Therefore, the rulers detects the part of the line that is visible on screen, and only renders ticks that are in that range. Implementing this took some time to get right.
Tasks

[x] Add anchor_offset to TextGeometry, so the text does not hug the line.
[x] Basic implementation.
[x] Re-apply ticks as you zoom in and out.
[ ] Discuss and flesh out the API.
[x] Example use as a measuring tape.
[x] Example use in a plot.
[x] Hide tickmarks at beginning and end of the line.
[x] Optimize tick step selection.
[x] Implement exponential notation and umKM units.
[x] Automatically determine text anchor from the line orientation.
[x] Better tick spacing for perspective cameras.

Tasks for later

(try to) implement a TextGeometry that can show multiple single-line string at different positions in the scene. Apart from a performance benefit (less world objects), this also has an API advantage, as users can then change the material to change the appearance of the ticks.
Implement a points material to draw tickmarks (using simple points for now).

Some screenshots

This is amazing! :smile: :partying_face: I played with it a bit, I wonder if we could use resize and controller or camera callbacks instead of the animation function to set any change in ticks etc. I'll try this out in a few days, currently travelling/conferencing.

I wonder if we could use resize and controller or camera callbacks instead of the animation function to set any change in ticks etc.

Our camera's and controllers don't have callbacks. This discussion regarding updates/animations relates to #495 too

Taking a look at this again, I can say that it's now very performant! :smile: . I'd like to take a few days to try out some things to see if there are any minor additional things that I may need.
It's easily possible to make the ruler follow the camera by modifying the animation function, probably makes sense to have this as an option in fastplotlib rather than here I guess :thinking: . This type of functionality is common in matplotlib, matlab etc.
https://github.com/pygfx/pygfx/assets/9403332/0f53ef9a-ee73-4d48-a121-6692cae53590
"""
Line plot
=========

Show a line plot, with axii and a grid.
"""

# sphinx_gallery_pygfx_docs = 'screenshot'
# sphinx_gallery_pygfx_test = 'run'

import numpy as np
from wgpu.gui.auto import WgpuCanvas, run
import pygfx as gfx
from pylinalg import vec_transform, vec_unproject

canvas = WgpuCanvas()
renderer = gfx.WgpuRenderer(canvas)

scene = gfx.Scene()

background = gfx.Background.from_color("#000")

grid = gfx.Grid(
    None,
    gfx.GridMaterial(
        major_step=1,
        minor_step=0,
        thickness_space="screen",
        major_thickness=2,
        minor_thickness=0.5,
        infinite=True,
    ),
    orientation="xy",
)
grid.local.z = -1001

rulerx = gfx.Ruler(tick_side="right")
rulery = gfx.Ruler(tick_side="left", min_tick_distance=40)

x = np.linspace(20, 980, 200, dtype=np.float32)
y = np.sin(x / 30) * 4
positions = np.column_stack([x, y, np.zeros_like(x)])

line = gfx.Line(
    gfx.Geometry(positions=positions),
    gfx.LineMaterial(thickness=4.0, color="#aaf"),
)
scene.add(background, grid, rulerx, rulery, line)

camera = gfx.OrthographicCamera(maintain_aspect=False)
camera.show_rect(0, 1000, -5, 5)

controller = gfx.PanZoomController(camera, register_events=renderer)

def animate():
    vs = renderer.logical_size
    # place the ruler close to the left and bottom edges of the viewport
    xscreen, yscreen = 0.1 * vs[0], 0.9 * vs[1]

    pos_ndc = (xscreen / vs[0] * 2 - 1, -(yscreen / vs[1] * 2 - 1), 0)

    pos_ndc += vec_transform(camera.world.position, camera.camera_matrix)
    xworld, yworld, _ = vec_unproject(pos_ndc[:2], camera.camera_matrix)

    rulerx.start_pos = camera.world.x - camera.width / 2, yworld, -1000
    rulerx.end_pos = camera.world.x + camera.width / 2, yworld, -1000
    rulerx.start_value = rulerx.start_pos[0]
    statsx = rulerx.update(camera, canvas.get_logical_size())

    rulery.start_pos = xworld, camera.world.y - camera.height / 2, -1000
    rulery.end_pos = xworld, camera.world.y + camera.height / 2, -1000
    rulery.start_value = rulery.start_pos[1]
    statsy = rulery.update(camera, canvas.get_logical_size())

    major_step_x, major_step_y = statsx["tick_step"], statsy["tick_step"]
    grid.material.major_step = major_step_x, major_step_y
    grid.material.minor_step = 0.2 * major_step_x, 0.2 * major_step_y

    # print(statsx)

    renderer.render(scene, camera)

if __name__ == "__main__":
    canvas.request_draw(animate)
    run()

Oh idea! Mapping the world space to the underlying dataunits. For example, the x-axis is often time and integer steps on the x-axis may be video frames, but the user actually wants to display timepoints. What's the best way to do this? One idea is allowing a user function to be passed that maps from world space to the data space. This space mapping function could be used in Ruler._get_ticks_uniform()?

@kushalkolar Yeah the performance is much better than the first iteration. Nice suggestions! I added them to #739. For now I just want to get this merged. The mapping for the ticks should be an easy addition though!


NPM Error while installing

Installing from scratch and I'm getting the following error.

<EMAIL_ADDRESS>install /data/moloch/wiseService/node_modules/hashtable
node-gyp configure build

gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: connect ETIMEDOUT
gyp ERR! stack     at errnoException (net.js:905:11)
gyp ERR! stack     at Object.afterConnect [as oncomplete] (net.js:896:19)
gyp ERR! System Linux 2.6.32-642.3.1.el6.x86_64
gyp ERR! command "node" "/data/moloch/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build"
gyp ERR! cwd /data/moloch/wiseService/node_modules/hashtable
gyp ERR! node -v v0.10.45
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm ERR! Linux 2.6.32-642.3.1.el6.x86_64
npm ERR! argv "/data/moloch/bin/node" "/data/moloch/bin/npm" "update"
npm ERR! node v0.10.45
npm ERR! npm  v2.15.1
npm ERR! code ELIFECYCLE
npm ERR<EMAIL_ADDRESS>install: node-gyp configure build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>install script 'node-gyp configure build'.
npm ERR! This is most likely a problem with the hashtable package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp configure build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs hashtable
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR!     npm owner ls hashtable
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR!     /data/moloch/wiseService/npm-debug.log
make[2]: *** [install] Error 1
make[2]: Leaving directory /home/drifter/moloch/capture/plugins' make[1]: *** [installdirs] Error 2 make[1]: Leaving directory /home/drifter/moloch/capture'
make: *** [install-recursive] Error 1
ERROR - 'make install' in moloch directory failed

Maybe you don't have a c++ compiler installed?
You've tried multiple times? (sometimes npm is flakey)
Is the machine on the internet?
What OS?

I have the following; the machine is on the internet but its limited access due to company policy. However; 443 and 80 access has been granted to registry.npmjs.org and I have attempted this multiple times.
gcc-c++.x86_64  4.4.7-17.el6 @rhel-x86_64-server-6
Red Hat Enterprise Linux Server release 6.8 (Santiago)

Sorry I don't really know.  I just tried on a 6.8 machine and it worked fine.  There might be a debug log there.

not sure why npm wouldn't install hashtable but I downloaded the package and placed the directory in /data/moloch/wiseService/node_modules/ and that seemed to work.


Wrong Description

I try this url (https://www.bnext.com.tw/article/51537/gamania-teamup)
And I get description with javascript code

SwiftLinkPreview: 2.3.1
xCode 10.1 with last swift version

What do you consider the right description? Maybe you should think twice before writing an issue title.


Large deltas.

hello for some reason I am getting deltas over 1 and trying to limit them with a accumulator makes them just add continuously
public class GameManager : Scene
{
    Game   Game   { get; set; }
    Canvas Canvas { get; set; }

    int GameW     { get; set; } = 256;
    int GameH     { get; set; } = 240;
    int GameFps   { get; set; } = 30;
    int GameScale { get; set; } = 3;

    float UpdateAccumulator = 0.0f;
    float RenderAccumulator = 0.0f;

    public GameManager(Game game, int gameW, int gameH, int gameFps, int gameScale)
    {
        Game      = game;
        GameW     = gameW;
        GameH     = gameH;
        GameFps   = gameFps;
        GameScale = gameScale;
    }

    public override void Load()
    {
        Canvas = Graphics.NewCanvas(GameW, GameH);
        Canvas.SetFilter(FilterMode.Nearest, FilterMode.Nearest, 0);
        base.Load();
        Game.Create();
    }
    public override void Update(float dt)
    {
        UpdateAccumulator += dt;
        var limit = (1 / GameFps);
        if (UpdateAccumulator >= limit)
        {
            base.Update(dt);
            Game.Update();
            UpdateAccumulator -= limit;
        }
    }
    public override void Draw()
    {
        RenderAccumulator += Timer.GetDelta();
        var limit = (1 / GameFps);
        if (RenderAccumulator >= limit)
        {
            base.Draw();
            Graphics.SetCanvas(Canvas);
            Graphics.Clear(0, 0, 0);
            Game.Render();
            Graphics.SetCanvas();
            Graphics.Draw(Canvas, 0, 0, 0, GameScale, GameScale);
            RenderAccumulator -= limit;
        }
    }
}

I test the function Timer.GetDelta(), and it work fine.
I can't figure out where something went wrong.
I need more information to locate the problem.
In addition, base.Draw(), base.Update()  and base.Load() is superfluous. 🙂

here is my whole class ```
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Love;
namespace BattleStars.Engine
{
public class GameManager : Scene
{
Game   Game   { get; set; }
Canvas Canvas { get; set; }
    int GameW     { get; set; } = 256;
    int GameH     { get; set; } = 240;
    int GameFps   { get; set; } = 30;
    int GameScale { get; set; } = 3;

    float UpdateAccumulator = 0.0f;
    float RenderAccumulator = 0.0f;

    public GameManager(Game game, int gameW, int gameH, int gameFps, int gameScale)
    {
        Game      = game;
        GameW     = gameW;
        GameH     = gameH;
        GameFps   = gameFps;
        GameScale = gameScale;
    }

    public override void Load()
    {
        Canvas = Graphics.NewCanvas(GameW, GameH);
        Canvas.SetFilter(FilterMode.Nearest, FilterMode.Nearest, 0);
        base.Load();
        Game.Create();
    }
    public override void Update(float dt)
    {
        UpdateAccumulator += dt;
        var limit = (1.0f / GameFps);
        //Console.WriteLine(UpdateAccumulator);
        if (UpdateAccumulator >= limit)
        {
            base.Update(dt);
            Game.Update();
            UpdateAccumulator -= limit;
        }
    }
    public override void Draw()
    {
        //RenderAccumulator += Timer.GetDelta();
        //var limit = (1 / GameFps);
        //if (RenderAccumulator >= limit)
        //{
            base.Draw();
            Graphics.SetCanvas(Canvas);
            Graphics.Clear(0, 0, 0);
            Game.Render();
            Graphics.SetCanvas();
            Graphics.Draw(Canvas, 0, 0, 0, GameScale, GameScale);
        //    RenderAccumulator -= limit;
        //}
    }
}

public class Game
{
    public static void Run(Game game, int gameW, int gameH, int gameFps, int gameScale)
    {
        BootConfig bootConfig   = new BootConfig();
        bootConfig.WindowWidth  = gameW * gameScale;
        bootConfig.WindowHeight = gameH * gameScale;
        Boot.Run(new GameManager(game, gameW, gameH, gameFps, gameScale), bootConfig);
    }

    public virtual void Create() { }
    public virtual void Update() { }
    public virtual void Render() { }
}

}

@endlesstravel you can mess with the gameFps to get buggy results.
it might be that visual studio was slowing it down or something but I do not actually have a precaution for large deltas so things like dragging the window makes the game speed up for a while

if you want limit fps, you had wrong way to do that.
and Love limit the fps on 60.
All i can do is increase the max fps limit or provide api to set max fps.

it would be nice to have a way to set the game fps so that it doesn't go below or above

okey, i will provide a method to set fps in next version.

can't you could use a accumulator to make sure that the delta time was the same every frame?
and then sleep the remainder of the time?

Yes, I can do this, but the delta time for each frame may not be "fully  identical".
It may have some large frame time that make low FPS. 🔢
And when you use 'Vertical Sync' option (default is opened),  the max fps is 60.

now can use Timer.EnableLimitMaxFPS Timer.DisableLimitMaxFPS in version 11.0.24

ok cool thankyou


What does '$host' refer to?

It's populated from the commandline:
	-h*|--host)
		HOST="$1"

so you usually set it via "--host myhost" when invoking the script.


Erasure can be unsound on some type parameters

I'm still trying to fully make sense of this problem, but the following type:
let id x = x
type pack = (t:Type0 & id t)

extracts to:
open Prims
let id : 'uuuuu . 'uuuuu -> 'uuuuu = fun x -> x
type pack = (unit, unit) Prims.dtuple2

i.e. just a pair of units, which is not sound. Extraction is then allowed to slap () in places where legit informative values must appear. I am seeing this happening on a rather big example, but having a hard time producing an isolated repro (most of the times the "units" are passed around, so it ends up working fine).

This one too, no fancy dependency:
type pack t = unit & id t


Upgrade deps.

Codecov Report

Merging #865 into master will increase coverage by 0.87%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #865      +/-   ##
==========================================
+ Coverage   89.08%   89.96%   +0.87%
==========================================
  Files          16       16
  Lines        1365     1365
  Branches      111      111
==========================================
+ Hits         1216     1228      +12
+ Misses         75       67       -8
+ Partials       74       70       -4

Impacted Files
Coverage Δ

lib/googleapis.ts
77.14% <0%> (+5.71%)
:arrow_up:

lib/discovery.ts
71.84% <0%> (+5.82%)
:arrow_up:

test/test.discover.ts
91.17% <0%> (+8.82%)
:arrow_up:

scripts/generator_utils.ts
85.71% <0%> (+14.28%)
: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 a4011ad...9eaa7ea. Read the comment docs.


animation flip

i see FlipOutY but wheres FlipInY ?
and thx for this awesome lib!)

I second this question, there appears to be a FlipYAnimator class (which I believe should be the FlipInYAnimator class) but this class is never used.


fix(STONEINTG-401): remove check for integration bundle

Bundles are deprecated and are replaced by resolvers

Description
Remove the check for bundle to unlock migration to Tekton resolvers.
Issue ticket number and link
STONEINTG-401
Type of change

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist:

[x] I have performed a self-review of my code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] I have added meaningful description with JIRA/GitHub issue key(if applicable), for example HASSuiteDescribe("STONE-123456789 devfile source")
[ ] I have updated labels (if needed)

/lgtm

/test redhat-appstudio-e2e


Add [QUBIC Liquidity Wallet qubic.finance] #wallet GA2PE6…4YYJ5H

Address: GA2PE6LWANMOAKNTAK6QA7SOP4VJRBPLZDBSZ2I7TXKYNPGFQD4YYJ5H
Tags: wallet
Title: QUBIC Liquidity Wallet  Domain: qubic.finance
Requested by @esiumtec

@Esiumtec
This issue has been combined with similar issues about the same project.
https://github.com/stellar-expert/public-directory/issues/535


Bake reactjs_jsx_ppx into reason

No more external facing ppx

What if we don't want the list to array conversion?

To be clear, I'm saying reactjs_jsx_ppx should be an implicit post-processing step of refmt. Like how we vendored ppx_deriving. How we change reactjs_jsx_ppx doesn't change

Does this make it more difficult for anything that doesn't need some of those features? Does any of the special jsx preprocessing change the semantics for people who are using jsx outside of ReactJS?

You'd probably expose it as a refmt flag? --use-jsx? Otherwise it's not post-processed.

Or what if they use a different jsx ppx that goes to something other than react?

@OvermindDL1 it does not matter, since you can turn it off

I think this has landed, @chenglou is this okay to close?

Yep, thanks


Replace generateSummaries with disableSummaries

In ContainerRuntime summary options, replace the generateSummaries flag with disableSummaries. Also add a
disableSummaries flag to ISummaryConfiguration to allow servers to specify it when creating a
ContainerRuntime. If either flag is set on creation, the client will not participate in summarization or
summarizer client election.

Replaces https://github.com/microsoft/FluidFramework/pull/8170

Might be worth adding breaking.md change.
Also I assume consumers will be forced to remove their usage of generateSummaries as TSC will bark at them, right? Trying to see how we ensure code outside of our repo stays clean(er)

Might be worth adding breaking.md change. Also I assume consumers will be forced to remove their usage of generateSummaries as TSC will bark at them, right? Trying to see how we ensure code outside of our repo stays clean(er)

Would it be worth keeping generateSummaries around for the time being and deprecating it instead? The logic in container-runtime could easily map generateSummaries===false to disableSummaries===true.

Would it be worth keeping generateSummaries around for the time being and deprecating it instead? The logic in container-runtime could easily map generateSummaries===false to disableSummaries===true.

Probably yes. Note that host could provide that, and that means different layers (layer that updates slower than container runtime). So you will definitely have old host code and new container runtime code.
I think the more interesting thing - what happens if host today does not pass generateSummaries (which has default value of false), and now we are forcing summaries on them. I hope such cases do not exist really, but that's the only reason IMHO to thing and deal with back compat in some way

"I think the more interesting thing - what happens if host today does not pass generateSummaries (which has default value of false), and now we are forcing summaries on them."
The current state of the ContainerRuntime ctor actually treats generateSummaries===true as the default:
    // Only create a SummaryManager if summaries are enabled and we are not the summarizer client
    if (this.runtimeOptions.summaryOptions.generateSummaries === false) {
        this._logger.sendTelemetryEvent({ eventName: "SummariesDisabled" });
    } else {
        [Set up for summarization.]

That's why I felt it was okay to replace generateSummaries with a flag that just disables summaries.


add tests for different configurations

currently there is one test checking if the template is valid
it would be an improvement to have a test for each configuration option

This was just fixed with #33.


Performance issue using Observation in v0.10.1

After upgrading from v0.9.0 to v0.10.1, I am experiencing severe performance issues. The withPerceptionTracking closure is being called much more frequently than expected, causing the app to become unresponsive and laggy.
To ensure that the issue wasn't due to a mistake on my part, I checked the behavior of the example project and found that it is also affected. To test the issue, I compared the v0.9.0 and v0.10.1 example projects. Specifically, I used the FormAppCoordinator tab and placed Self._printChanges() inside every view (Step1View, Step2View, Step3View, and FinalScreen).
This is the result for v0.9.0:
https://github.com/johnpatrickmorgan/TCACoordinators/assets/22961673/c82f309d-dab3-4637-8722-22c960e31682
And this is the result for v0.10.1
https://github.com/johnpatrickmorgan/TCACoordinators/assets/22961673/31a27041-18f7-4e1c-9cea-dbcd1ae85546
We can see that with the latest version of the library, views are being recomputed much more frequently than before.
Note: I added Self._printChanges() inside of WithViewStore and withPerceptionTracking.
I have also profiled both cases to obtain a more detailed performance review. Here is the compressed folder containing the result: profiling.zip.
I attempted to determine the cause of this issue but was unable to find a solution. Any assistance would be greatly appreciated.

I suspect the issue is related to how the new Observation is handled. In this Pointfree episode, Brandon explains how easy it is to observe too much state. Since this library uses @ObservableState screens, which are wrapped in a Route enum and stored in an array of routes, my guess is that any change to the routes array will cause all the views that use any property from that array to be recomputed.

I took the example from this repository and just added Self._printChanges() to the views in the Form tab.
Thank you for the provided info! I'll make sure to go over them and try to figure out what exactly is going wrong. I tried manually adding ObservableState conformance to the Route enum, but it didn't fix the issue.

Here are demo apps, showcasing the issues.
TCACoordinators v0.9.0, using WithViewStore
We can see that no redundant computations occur when pushing or popping views. When incrementing a value, the whole view is re-computed since we observe the whole state.
https://github.com/johnpatrickmorgan/TCACoordinators/assets/22961673/d9b02859-91a2-4184-9230-f6bf3768f7d4
TCACoordinators v0.9.0, using WithPerceptionTracking
There are several issues in this case:

When pushing or popping a view, all views in the stack are re-computed.
When incrementing a value, the entire view is re-computed instead of just IntView.

https://github.com/johnpatrickmorgan/TCACoordinators/assets/22961673/3df4c761-356b-4461-a121-3499eaa67be5
Coordinators090Test.zip
Coordinators0101Test.zip

I am in the same situation. So I'm still keep the previous version.
Even if just one change, all views are re-computed.

I have created a more general sample based on @mirkobraic zip samples. It is package based project with two targets Observable and Unobservable.
https://github.com/sdkdimon/TCACoordinatorsPerformance.git
Also i discovered that TCACoordinators v0.10.1 can work with Observable & Unobservable state here part of implementation of that feature:
 public var body: some View {
    if Screen.self is ObservableState.Type {
      WithPerceptionTracking {
        Router(
          $store[],
          buildView: { screen, index in
            WithPerceptionTracking {
              screenContent(scopedStore(index: index, screen: screen))
            }
          }
        )
      }
    } else {
      UnobservedTCARouter(store: store, identifier: identifier, screenContent: screenContent)
    }
  }

So we can use latest version of TCACoordinators but without ObservableState in app implementation to avoid performance issues for now.

Great resource, thank you @sdkdimon!
Yes, the library should work correctly without Observation. The cool thing is we can still use @ObservableState within our features; we just need to exclude it from the coordinator's state. I checked out your code and added @ObservableState to the feature reducers in the UnobservableState package. Everything seems to be working correctly, but I'm not entirely sure if I've missed anything or if this approach is suitable for production apps.
Here is a patch that you can apply to your code if you have time, I'd be happy to hear your feedback.
unobservableCoordWithObservableFeatures.diff.zip

It seems to me that the root cause of the issue lies in the FlowStacks library. The problem is that the objects within FlowStacks are not Observable. For instance, here is a snippet from Router struct:
public struct Router<Screen, ScreenView: View, Modifier: ViewModifier>: View {
  @Binding var routes: [Route<Screen>]
  @ViewBuilder var buildView: (Binding<Screen>, Int) -> ScreenView
  let navigationViewModifier: Modifier
// ...
}

The Router holds an array of our screens, which in our case are @ObservableState objects. Since the Router itself is not observable, it breaks the "observation chain", making the array sensitive for any change in any of the objects it holds.
I think we should update FlowStacks lib with the new observation framework. Here is a link to a slack conversation that I had with @rhysm94. Since it doesn't make sense for FlowStacks to depend on the ComposableArchitecture, it might be better to manually add all of the FlowStacks code directly to the TCACoordinators and adjust it to fit our needs. I've created a patch (TCACoordinatorsFlowStackInPlace.diff.zip) that does this, so you don't have to go through the hassle of copy-pasting a bunch of code. However, I haven't been able to make FlowStacks observable yet. I'll revisit this when I have more time, but any assistance would be much appreciated.

FWIW, FlowStacks wouldn’t need to import TCA, but instead Perception.
Still, that might not be ideal for FlowStacks users, and it might be better to inline an Observable/Perceptible version of FlowStacks into TCACoordinators going forward?

That sounds good to me. Given that we don't support the latest version of FlowStacks and probably never will, I don't see a significant downside to this approach. @johnpatrickmorgan, do you have any thoughts on this?

Sounds good, i mean to embed Perception modified FlowStacks into the TCACoordinators. Now i am trying to integrate Perception into the FlowStacks.  @Binding var routes: [Route<Screen>] var should be replaced with something with that?
class ScreenState<Screen> {
  var routes: [Route<Screen>]
  init(routes: [Route<Screen>]) {
    self.routes = routes
  }
}

public struct Router<Screen, ScreenView: View, Modifier: ViewModifier>: View {
  var routes: ScreenState

Sounds good, i mean to embed Perception modified FlowStacks into the TCACoordinators. Now i am trying to integrate Perception into the FlowStacks. @Binding var routes: [Route<Screen>] var should be replaced with something with that?
@Perceptible
class ScreenState<Screen> {
  var routes: [Route<Screen>]
  init(routes: [Route<Screen>]) {
    self.routes = routes
  }
}

public struct Router<Screen, ScreenView: View, Modifier: ViewModifier>: View {
 @Perception.Bindable var routes: ScreenState<Screen>

// ..
}

No, I’m almost certain that doesn’t need pushing out into a separate class. It should work just fine as a Binding like this.
It’s the Route type which is (likely) the issue here.

@ObservableState macro can easily be added to the Route enum which ensures that it is observed correctly. My guess is that we have to make whole Router struct to be observable.

Ah i see the @ObservableState is already presented in @mirkobraic diff (added to the Route), also i've played with WithPerceptionTracking but with no result. So the [Route<Screen>] var in Router is observable/perceptible out of the box if the Route marked  as @ObservableState ?

Ah i see the @ObservableState is already presented in @mirkobraic diff (added to the Route), also i've played with WithPerceptionTracking but with no result. So the [Route<Screen>] var in Router is observable/perceptible out of the box if the Route marked as @ObservableState ?

I think so. But the more I'm looking into this the more questions I have. Since TCARouter and FlowStacks Router are Views, we can exclude them from @ObservableState topic. This suggests that we might be missing an observation mechanism elsewhere.

To ignore things in @ObservableState you use @ObservationStateIgnored.

To ignore things in @ObservableState you use @ObservationStateIgnored.

Yes. But, currently I think the is not related to the Router struct and its @Binding var routes: [Route<Screen>]. I feel the issue is somewhere else, maybe in the way we are storing our array of routes in the coordinators? Or maybe this array is getting modified in a way that is triggering the re-rendering of al screens.

It’s still really difficult to tell what’s causing the redraws when the underlying state is not changing.
Might be worth adding a bunch of logs/prints/breakpoints inside the TCARouter type and its helpers to get an idea of where the problem is occurring at the source.
The only thing I can think might be an issue is that Route isn’t ObservableState, but I can’t be remotely sure on that one.

Thanks everyone for your efforts and insights so far. I agree it would make sense to remove this library's dependency on FlowStacks now. I've played with that approach but haven't yet managed to avoid unnecessarily reinvoking the withPerceptionTracking closure.

Okay, I think I got something. If we expand @ObservableState macro that has been applied to the Route enum, we can see the following code:
extension Route: ComposableArchitecture.ObservableState, Observation.Observable {
  public var _$id: ComposableArchitecture.ObservableStateID {
    switch self {
    case let .push(state):
      return ._$id(for: state)._$tag(0)
    case .sheet:
      return ObservableStateID()._$tag(1)
    case .cover:
      return ObservableStateID()._$tag(2)
    }
  }

  public mutating func _$willModify() {
    switch self {
    case var .push(state):
      ComposableArchitecture._$willModify(&state)
      self = .push(state)
    case .sheet:
      break
    case .cover:
      break
    }
  }
}

This is incorrect and requires manual implementation of the extension. Fortunately, we can achieve this without modifying the FlowStacks code, which means we might not need to inline the entire library.
Here is the correct implementation:
extension Route: ComposableArchitecture.ObservableState, Observation.Observable {
    public var _$id: ComposableArchitecture.ObservableStateID {
        switch self {
        case let .push(state):
            return ._$id(for: state)._$tag(0)
        case let .sheet(state, _, _):
            return ._$id(for: state)._$tag(1)
        case let .cover(state, _, _):
            return ._$id(for: state)._$tag(2)
        }
    }

    public mutating func _$willModify() {
        switch self {
        case var .push(state):
            ComposableArchitecture._$willModify(&state)
            self = .push(state)
        case .sheet(var state, let embedInNavigationView, let onDismiss):
            ComposableArchitecture._$willModify(&state)
            self = .sheet(state, embedInNavigationView: embedInNavigationView, onDismiss: onDismiss)
        case .cover(var state, let embedInNavigationView, let onDismiss):
            ComposableArchitecture._$willModify(&state)
            self = .sheet(state, embedInNavigationView: embedInNavigationView, onDismiss: onDismiss)
        }
    }
}

For a test, let's take a look at the example project provided by @sdkdimon. By adding this extension to the ObservableState module, we can see that when incrementing the value on the last screen, only that screen gets re-rendered. Previously, the entire stack would be recomputed. Thanks @rhysm94 for keeping the focus on that enum.
Our next step is to figure out why the whole stack is recomputed on push/pop actions. I'll investigate whether we can fix this by providing custom _$isIdentityEqual functions.

Very nice stuff! Just wondering - does that break the non-ObservableState version of TCARouter? If so, what if you do conditional conformance, when Route.Screen is ObservableState?

I wonder if the recomputing the whole stack issue is related to this? https://github.com/swiftlang/swift/pull/71122
There’s a Swift forum post about it here, as well, detailing more of the problem. https://forums.swift.org/t/observable-pessimizes-arrays/69508/28
It seems like the initial version of the Observation framework didn’t add a _modify access modifier, which made collection types more heavyweight to work with than necessary, always routing changes via set instead. I suspect this might be part of the issue.

If we try access to the route element inside TCARouter.swift store as following
let route = self.store[1]

the compiler gives an error - Referencing subscript 'subscript(dynamicMember:)' on 'Store' requires that '[Route<Screen>]' conform to 'ObservableState' so our array of routes is not Observable out of the box, so that causing unwanted re render when the navigation stack is changed.
We have an Observable state but when we do store scoping to the routes store here we lose observation of our routes array
@ObservableState
public struct State: Equatable {
  var routes: [Route<Screen.State>]
}

//Here we constructing router with Store that holds non Observable array ('[Route<Screen>]')
 TCARouter(store.scope(state: \.routes, action: \.router)) { screen in
//....
}

It's just my guess i could be completely wrong here

Guess i got some result. In my playground I've used Router view from FlowStacks directly without TCARouter, and pass an Observable binding of [Route], also inside Router view I wrapped stuff with WithPerceptionTracking view.
As result the whole stack now not recomputed anymore on array changes, but there is an issue with store scoping. So later I will provide more details.

I’ve been quite busy lately and haven't had time to work on this, apologies. We've successfully incorporated v0.10.1 and observation into our project using the extension I shared earlier. However, we’ve noticed an odd issue. When fully replacing the state in the coordinator, the navigation would completely stop working. For some reason the observation got "disconnected". I’ll investigate this tomorrow and share more details with you then.

So here what i got. Let have focus on our previously created sample example project, here is modified AppCoordinatorView:
public struct AppCoordinatorView: View {
  @Perception.Bindable public var store: StoreOf<AppCoordinator>

  public init(store: StoreOf<AppCoordinator>) {
    self.store = store
  }

  public var body: some View {
//    var storeBindable: _StoreBindable_Perception<AppCoordinator.State, AppCoordinator.Action, [Route<Screen.State>]> = $store.routes
//    var routesBinding: Binding<[Route<Screen.State>]> = arrBinding.sending(\.router.updateRoutes)
    WithPerceptionTracking {
// Here i passing an observable binding of [Route<Screen.State>]
      Router($store.routes.sending(\.router.updateRoutes)) { screenState, index in
        WithPerceptionTracking {
          let store = self.store.scopedStore(state: screenState, index: index)
          switch store.case {
          case let .landing(store):
            LandingFeatureView(store: store)
          case let .step1(store):
            Step1FeatureView(store: store)
          case let .step2(store):
            Step2FeatureView(store: store)
          }
        }
      }
    }
  }
}
// Also we need to do store scoping for router result
// Here is an extension to our store
extension Store where State: ObservableState, State == AppCoordinator.State, Action == AppCoordinator.Action {

  func scopedStore(state: Screen.State, index: Int) -> StoreOf<Screen> {
    let stateKeyPath: KeyPath<AppCoordinator.State, Route<Screen.State>?> = \.routes[safe: index]
    let actionCaseKeyPath: CaseKeyPath<AppCoordinator.Action, IndexedRouterActionOf<Screen>> = \.router
    let storeId:ScopeID<AppCoordinator.State, AppCoordinator.Action> = self.id(state: stateKeyPath, action: actionCaseKeyPath)
    let toState: ToState<AppCoordinator.State, Screen.State> =
    ToState { rootState in
// If we uncomment this the whole stack will start recomputing again
//      return rootState[keyPath: stateKeyPath]?.screen ?? state
//If just return a state then stack will NOT be recomputed BUT the actions from views STOP's modifying own state
// only AppCoordinator.State modified
      return state
    }
    return self.scope(id: storeId, state: toState) { ch in
        .router(.routeAction(id: index, action: ch))
    } isInvalid: {
      $0[keyPath: stateKeyPath] == nil
    }
  }
}

All changes available in example project, also i've embedded TCACoordinators + FlowStacks as package to the sample so you can easely modify all sources to play around it.

Another thing that i am figured out that even  such keypath call  let childState = rootState[keyPath: stateKeyPath]?.screen were added to the ToState closure will cause screen recomputation.
ToState { rootState in
  let childState = rootState[keyPath: stateKeyPath]?.screen // --> this call will cause redrawing whole stack on it changes
//State from func arg
  return state
}

Hi @sdkdimon, here are my thoughts.

let route = self.store[1] gives a compiler error in TCARouter.swift

It's a bit unclear to me what this line should do and what does it prove. For example, if we write let route = self.currentState.store[1] the compiler does raise any errors.
Additionally, if we create a test ObsevableState struct like this:
@ObservableState
struct ObservableStruct { }

We can then set up a similar store in TCARouter.swift, and the compiler will throw the same error:
let test: Store<[ObservableStruct], RouterAction<ID, Screen, ScreenAction>>
let _ = test[1] // error: Referencing subscript 'subscript(dynamicMember:)' on 'Store' requires that '[ObservableStruct]' conform to 'ObservableState'

Despite this, I don't believe it will lead to any issues with observing the array incorrectly, as I have used arrays of ObservableState within the reducer and everything behaves as expected.

"so our array of routes is not Observable out of the box, so that causing unwanted re render when the navigation stack is changed."

That's correct. But to be more precise, Route enum is not Observable out of the box. Once we fix this issue, array will get the conformance for free thanks to _$isIdentityEqual functions.

Regarding the example project, have you tried the Route extension I provided earlier? How does the app behave then?

why does rootState[keyPath: stateKeyPath]?.screen cause screen recomputation.

I'm not entirely sure, but my guess is that without this, the screen won't be added to the observationRegistrar and thus won't be observed at all. However, once the screen is added to the registrar, it starts over-observing, meaning we still did not fix our "observation chain". That's why I'm curious how would this behave if we added ObservableState to the Router via extension. I'm taking a wild guess here, but it's a direction that makes sense to me.

The sample that i provided above is has your Observable Router extension implementation, and it has same behaviour. More of all i am even tried to split FlowStacks into composable features with own state and issue still there, so seems to be we are missing something.
Also i am noticed that from ComposableArchitecture perspective if we have a collection of features in the State it representation is handled by ForEach on the View side.

Seems the whole stack recalculation issue on it change is not related to the TCACoordinators and FlowStacks libraries.
Whole stack recalculation issue appears even with simple ForEach, here the sample.
@Reducer
public struct ForEachScreenCoordinator {
  @ObservableState
  public struct State: Equatable {
    public static let initialState = State(routes: [.landing(.init())])
    var routes: IdentifiedArrayOf<Screen.State>
  }

  public enum Action {
    case router(IdentifiedActionOf<Screen>)
  }

  public init() {}

  public  var body: some ReducerOf<Self> {
    Reduce { state, action in
      switch action {
      case .router(.element(id: _, action: .landing(.nextStepTapped))):
        state.routes.append(.step1(Step1Feature.State()))
        return .none
      case .router(.element(id: _, action: .step1(.nextStepTapped))):
        state.routes.append(.step2(Step2Feature.State()))
        return .none
      default:
        return .none
      }
    }
    .forEach(\.routes, action: \.router, element: {
      Screen.State.StateReducer.body
    })
  }
}

public struct ForEachCoordinatorView: View {
  public  let store: StoreOf<ForEachScreenCoordinator>

  public init(store: StoreOf<ForEachScreenCoordinator>) {
    self.store = store
  }

  public var body: some View {
    WithPerceptionTracking {
      VStack {
        ForEach(store.scope(state: \.routes, action: \.router)) { childStore in
          WithPerceptionTracking {
            switch childStore.case {
            case let .landing(store):
              LandingFeatureView(store: store)
            case let .step1(store):
              Step1FeatureView(store: store)
            case let .step2(store):
              Step2FeatureView(store: store)
            }
          }
        }
      }
    }
  }
}

Also i am noticed that TCA library used special types for Navigation to hold screen feature it StackState and StackAction for actions handling. I'll try to check whether our issue is reproduced with the native TCA navigation. Maybe we need to look at the implementation of StackState and look how the Observation is implemented there.

I am checked the whole stack recalculation issue with TCA "native" navigation and seems it is there, maybe it is not an issue at all. Here the sample code, it also available here https://github.com/sdkdimon/TCACoordinatorsPerformance.git.
@Reducer
struct RootFeature {
  @Reducer(state: .equatable)
  enum Path {
    case landing(LandingFeature)
    case step1(Step1Feature)
    case step2(Step2Feature)
  }

  @ObservableState
  struct State: Equatable {
    var path = StackState<Path.State>()
  }
  enum Action {
    case path(StackActionOf<Path>)
    case pushLanding
  }

  var body: some ReducerOf<Self> {
    Reduce { state, action in
      switch action {
      case .pushLanding:
        state.path.append(.landing(.init()))
        return .none
      case let .path(action):
        switch action {
        case .element(id: _, action: .landing(.nextStepTapped)):
          state.path.append(.step1(.init()))
        case .element(id: _, action: .step1(.nextStepTapped)):
          state.path.append(.step2(.init()))
          return .none
        default:
          return .none
        }
      }
      return .none
    }
    .forEach(\.path, action: \.path)
  }
}

struct RootView: View {
  @Perception.Bindable var store: StoreOf<RootFeature>

  var body: some View {
    WithPerceptionTracking {
      NavigationStack(
        path: $store.scope(state: \.path, action: \.path)
      ) {
        WithPerceptionTracking {
          Button {
            store.send(.pushLanding)
          } label: {
            Text("Push Landing Page")
          }
        }

      } destination: { store in
        WithPerceptionTracking {
          switch store.case {
          case .landing(let store):
            LandingFeatureView(store: store)
          case .step1(let store):
            Step1FeatureView(store: store)
          case .step2(let store):
            Step2FeatureView(store: store)
          }
        }
      }
    }
  }
}


Discrepancy in the representation of integers in F# vs OCaml builds of F*

The implementations of ensure_decimal in src/basic/util.fs and src/basic/ml/FStar.Util.ml do not match.
In F#:
> ensure_decimal "0xb8";;
val it : string = "-72"

In OCaml:
# Z.to_string (Z.of_string "0xb8");;
- : string = "184"

cf. 385e9e809eaf35f316491ddd02f532acf03d9aab

http://stackoverflow.com/questions/2983706/biginteger-parse-on-hexadecimal-number-gives-negative-numbers
"
To make sure that a hexadecimal string is correctly interpreted as a positive number, the first digit in value must have a value of zero. For example, the method interprets 0x80 as a negative value, but it interprets either 0x080 or 0x0080 as a positive value.
"
Seems that we should precede it with a zero. ensure_decimal "0x0b8" returns 184

Thanks for the investigation, fix pushed.


sasjs create SASONLY template

We need a template for adding just the SAS component to a frontend project.
the command will be sasjs create [name] -t sasonly

if [name] is missing, it should be created in the current directory (this should be true for the other templates also)
the folowing sasjs subfolders will be created:  [macros,build,db,services]
the sasjs/services/common/appinit.sas will be created
npm install @sasjs/core will execute
the .gitignore will be created or updated
a minimal sasjsconfig.json will be created, with an empty targets array

:tada: This issue has been resolved in version 1.3.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Preserve blank lines

Fixes #5.

Codecov Report

Merging #7 (77636d0) into main (376cb47) will decrease coverage by 0.6%.
The diff coverage is 75.0%.

@@           Coverage Diff           @@
##            main      #7     +/-   ##
=======================================
- Coverage   90.6%   90.0%   -0.7%
=======================================
  Files          6       6
  Lines        258     260      +2
=======================================
  Hits         234     234
- Misses        24      26      +2

Impacted Files
Coverage Δ

reprexlite/code.py
73.9% <75.0%> (+0.7%)
:arrow_up:

reprexlite/version.py
80.0% <0.0%> (-20.0%)
:arrow_down:

reprexlite/session_info.py
94.7% <0.0%> (-2.7%)
:arrow_down:


Update PyPI Information

I noticed that the MANIFEST.in file was referencing a Markdown README instead of a reStructuredText README.
Also, the PyPI website for this library has practically no information. I think it would be beneficial to copy the README.rst file over to the PyPI page as well.

@markpeek  These are some housekeeping edits. Feel free to close if you think they aren't necessary.

Thanks!


add provision for pwa support

Fixes #74. Please review this and let me know

Uh, I don't know. Is this according to the requirements? I agree that the dependencies should be installed after the serve option. Also pwa support will be asked after Universal/SPA selection

@aquibbaig Resolve the conflicts

@jamesgeorge007 Is the logic alright though?


[Tray] Icons don't disappear on exit

Describe the bug
This tray is endless misery.
Closing a program with a tray icon no longer removes the tray icon from the bar. Re-opening it causes a duplicate icon.
To Reproduce
Steps to reproduce the behavior:

Open a program with a tray icon
Start Ironbar
Close the program (method doesn't matter)
Observe icon remains

Expected behavior
Icons should be removed as soon as programs are closed.
System information:

Ironbar version: 42e25f5

Resolved by #782


Support exponents with decimal parts

Fixes RazrFalcon/libsvgparser#4
I have added new tests with the _exponent ending so that I don't create a large, but mostly useless diff.

Since it depend only on Stream::parse_number, you should write tests only in tests/stream.rs. All other tests are useless, because they tests the same behavior.
You can remove them now or I can merge and fix them myself.


[PE-D][Tester C] Find Function Does Not Properly Match Prefixes in Names, Allowing Partial Matches Anywhere in the Name

As stated in the user guide, the find feature should match the prefixes of the input. But when a single letter is typed in as an input, it listed every person that has the letter anywhere in their name, e.g. find /n a will result in the result below.

Labels: severity.Medium type.FunctionalityBug
original: menatahari/ped#1

Documentation bug, fixed


vq-wav2vec ➡ RoBERTa pipeline

❓ Questions and Help
What is your question?
I am trying to take the outputs from the vqwav2vec model and pass them to the pre-trained RoBERTa model. After looking at the docs and source code I believe what I have supplied is the correct vqwav2vec / RoBERTa pipeline to extract RoBERTa features, could this please be confirmed?
Also, is wrapping the sequence with <s> tokens necessary in the audio use-case?
Many thanks
Code
def indices_to_string(idxs):
    # based on fairseq/examples/wav2vec/vq-wav2vec_featurize.py
    return " ".join("-".join(map(str, a.tolist())) for a in idxs.squeeze(0))

z = vqwav2vec.feature_extractor(x.unsqueeze(0))
_, idxs = vqwav2vec.vector_quantizer.forward_idx(z)

idx_str = indices_to_string(idxs)
tokens = roberta.task.source_dictionary.encode_line(idx_str, append_eos=False, add_if_not_exist=False)
last_layer_features = roberta.extract_features(tokens)

I am also following your pipeline. I have used first wav2vec k means pipeline to extract tokens and send the tokens though the given roberta checkpoint. Just to clarify,  did you also use the dictionary given inside Roberta-wav2vec checkpoint folder?  Also what are the architectural information in the given roberta checkpoint.

you extract the codes to a text file, then you run preprocess.py as if it was a regular text file. specify --source-dict and point to the dict file in the tar (otherwise it will construct a new dict which wont match to what it was trained with). e.g. if you extracted codes to train.src and your corresponding labels file is train.ltr. if you dont have labels then use --only-source
python ~/fairseq-py/preprocess.py --dataset-impl mmap --trainpref train --destdir . --workers 40  --srcdict dict.txt --validpref valid -s src -t ltr

Thanks a lot.

I have run the following command
python ~/fairseq/preprocess.py --dataset-impl mmap --trainpref train --destdir . --workers 40  --srcdict dict.txt -s src --only-source

and it creates two files train.src-None.src.bin and train.src-None.src.idx.  What do I do with these files, in order to extract roberta features?

@david-macleod First run the following script to quantized the video using vq-wav2vec - K means.
PYTHONPATH /path/to/fairseq python examples/wav2vec/vq-wav2vec_featurize.py --data-dir /manifest/path --output-dir /path/to/output \ --checkpoint /model/path/checkpoint_best.pt --split train valid test --extension tsv
Then run the  command mentioned by @alexeib. In the source directory, u should have train.src and dict.txt.

@david-macleod  I tried to train the Roberta base by feeding tokens that are generated by following the @alexeib's pipeline. In those tokens, I saw  Beginning Of Sentence (BOS) and End Of Sentence (EOS) tokens similar to Roberta.  Other tokens are perfectly matched with your pipeline. So this is the same as the Roberta. In your pine line, just add 0 to begging and 2 to the end.

thanks@shamanez, so I could just update my function like so:
def indices_to_string(idxs):
    # based on fairseq/examples/wav2vec/vq-wav2vec_featurize.py
    return "<s>" + " ".join("-".join(map(str, a.tolist())) for a in idxs.squeeze(0)) + "</s>"

Just out of interest, how did you go from the outputs of preprocess.py (the .bin and .idx files) to training Roberta?

Sorry, i thought the question was how to train using the vq-wav2vec codes.
if you use --only-source, then omit the --s and --t and specify the full file name in trainpref. e.g.
python ~/fairseq-py/preprocess.py --dataset-impl mmap --trainpref train.src --destdir . --workers 40 --only-source --validpref valid.src

you then will get a train.bin and train.idx (and valid/test if you specify validpref and testpref). you can then train a roberta model by following the roberta examples and providing path with your train.bin/idx as data path.
for extracting representations from roberta, you can load the roberta model, then iterate over the lines in your text file and do something like
for words in lines:
            vec = [0] + [self.dict.index(w) for w in words] + [2]
            x = torch.LongTensor(vec).unsqueeze(0).cuda()
            z = self.roberta_model.extract_features(x)

@david-macleod

Just out of interest, how did you go from the outputs of preprocess.py (the .bin and .idx files) to training Roberta?

First, you need to run the following script to convert wav files in to K-means tokenized representations.
 $ PYTHONPATH /path/to/fairseq python examples/wav2vec/vq-wav2vec_featurize.py --data-dir /manifest/path --output-dir /path/to/output \
--checkpoint /model/path/checkpoint_best.pt --split train valid test --extension tsv

Then follow the first part of the above @alexeib 's answer.

@alexeib  what is the self.dict. in your answer?  Can I load the dict.txt given in checkpoint directly?

yes it is the loaded dict.txt using Dictionary class

What if I use the following method to extract tokens?
tokens = roberta.task.source_dictionary.encode_line(idx_str, append_eos=False, add_if_not_exist=False)
This way the dictionary is modified with special tokens and indexes are shifted by three values. Because in a usual Roberta task you have to add <s>, </s>,<pad>  and , <unk>.

@alexeib @shamanez I am also interested to know if using roberta.task.source_dictionary for the token mapping is as valid approach, compared to loading dict.txt. It also has a <mask> token in position 23672.

both approaches should work (that mask will be at last position so it shouldn't matter)


feat(graph): Added course schedule.

Coverage remained the same at 100.0% when pulling 7d743aed017cb78811504583dede80394c4adbfe on course-schedule into 903a7df239496a28824e1588706af79c8b566cb1 on master.


Component Sense HAT won't install

Home Assistant release (hass --version):
0.35.3
Python release (python3 --version):
Python 3.4.2
Component/platform:
Raspberry PI 3
RASPBIAN JESSIE LITE Version: November 2016 Release date: 2016-11-25
Description of problem:
When activating the sensor platform sensehat HASS reports:
Invalid Config
The following components and platforms could not be set up:
• sensor.sensehat
Please check you config
Expected:
a working sensehat without error
Problem-relevant configuration.yaml entries and steps to reproduce:
sensor:
[…]
  - platform: sensehat
    display_options:
      - temperature
      - humidity
      - pressure

Traceback (if applicable):
sudo systemctl status home-assistant@pi
gives
/srv/homeassistant/homeassistant_venv/bin/python3 -m pip install --quiet sense-hat==2.2.0 --upgrade --target /home/homeassistant/.homeassistant/deps
[…]
INFO:homeassistant.loader:Loaded sensor.sensehat from homeassistant.components.sensor.sense
INFO:homeassistant.util.package:Attempting install of sense-hat==2.2.0

When I try to install sense-hat by hand (without the above --quiet)
/srv/homeassistant/homeassistant_venv/bin/python3 -m pip install sense-hat==2.2.0 --upgrade --target /home/homeassistant/.homeassistant/deps
it fails with
running build_ext
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-cddrw_15/pillow/setup.py", line 753, in <module>
        zip_safe=not debug_build(), )
      File "/usr/lib/python3.4/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib/python3.4/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/usr/lib/python3.4/distutils/command/install.py", line 583, in run
        self.run_command('build')
      File "/usr/lib/python3.4/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/usr/lib/python3.4/distutils/command/build.py", line 126, in run
        self.run_command(cmd_name)
      File "/usr/lib/python3.4/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/usr/lib/python3.4/distutils/command/build_ext.py", line 339, in run
        self.build_extensions()
      File "/tmp/pip-build-cddrw_15/pillow/setup.py", line 521, in build_extensions
        ' using --disable-%s, aborting' % (f, f))
    ValueError: jpeg is required unless explicitly disabled using --disable-jpeg, aborting

    ----------------------------------------
Command "/srv/homeassistant/homeassistant_venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-cddrw_15/pillow/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-gpk26luz-record/install-record.txt --single-version-externally-managed --compile --install-headers /srv/homeassistant/homeassistant_venv/include/site/python3.4/pillow --home=/tmp/tmp2gwi7ogu" failed with error code 1 in /tmp/pip-build-cddrw_15/pillow/

Additional info:

@farminf perhaps you can help here.
I'm guessing...as pillow is a dep of sense-hat. You could try to install pillow with --disable-jpeg and then install sense-hat manually.

I guess you can run "sudo apt-get install libjpeg-dev" first and then what @fabaff just said.

Thanks. And that is what I did and it works.
sudo apt-get install libjpeg-dev
sudo /srv/homeassistant/homeassistant_venv/bin/python3 -m pip install --upgrade pillow
sudo /srv/homeassistant/homeassistant_venv/bin/python3 -m pip install sense-hat==2.2.0 --upgrade --target /home/homeassistant/.homeassistant/deps

But now the RTIMUlib is missing. HASS reports:
ImportError: No module named 'RTIMU'

Seems that python-rtimulib is required too.

Yes, but how do I do that? A sudo pip3 install rtimulib works, but cannot be reached by HASS.
Anything like sudo /srv/homeassistant/homeassistant_venv/bin/python3 -m pip install rtimulib --upgrade --target /home/homeassistant/.homeassistant/deps or similar cannot be found and installed.

To be more specific: How do I install RTIMULib in a virtualenv like homeassistant_env?
PyPI (used by pip) does not know rtimulib or similar. And manually downloading from git and installing it:
[…]
cd RTIMULib2/Linux/python/
source /srv/homeassistant/homeassistant_venv/bin/activate
python3 setup.py build
sudo python3 setup.py install

Always installs in /usr/local/lib/python3.4/dist-packages instead of /home/homeassistant/.homeassistant/deps
I searched, read and tried a lot but found no solution.

Following a hint on gitter I created a symlink ln -s /usr/local/lib/python3.4/dist-packages/RTIMU.cpython-34m.so /home/homeassistant/.homeassistant/deps/ and RTIMULib can now be reached by HASS but now HASS reports PermissionError: [Errno 13] Permission denied: '/dev/input/event0'. I think this is because of sense-hat has a joystick on it.
Still no solution.

I have the same setup (Rpi3, Sensehat, etc.) and I can reproduce this error.

@farminf - Have you managed to make any progress with getting this working for the rest of the community?
At lease could you write down a step-by-step on how you got the Raspberry Pi + Sense HAT and Home-Assistant to work together.
Otherwise I would suggest that the https://home-assistant.io/components/sensor.sensehat/ page be completely disabled - or a Not Working! not be added as users are trying to use this sensor and it is causing frustration

Mine is still working on my old setup.... let me fresh install everything and see what is the problem.

I just flashed my SD card on my pi (which has sensehat module) and installed latest Raspian, then only installed homeassistant (sudo pip3 install homeassistant) and added:

sensor:
platform: sensehat
display_options:
- temperature
- humidity
- pressure

to configarion file, it just worked actually for me without any problem...

@farminf seem particularly strange as many others have also reported issues - However I am using the All-in-one installer and saw issues where I had to start to install RTIMULib2 and saw the same issues as @enurist and then I had to install some other libs all of which need linking and in the end I simply gave up.

mmm, strange... ok so I'll test it also with your setup to see the problem.

@farminf I should add that the default install of the All-in-One install creates a Virtual environment explained here

Hi guys, i've been having the same issue, and i think i found a (somewhat) more proper way to go around it than doing a symbolic link, altough i'm not sure of its repercussions.
Problem numero 1 is that (at least it seems), if you install a library with an OS package after the virtualenv has been created, it doesn't get updated and doesn't see it, because the OS-wide system site packages are excluded.
I modified that by editing the pyenv.cfg file in the root of the home-assistant installation to have:
include-system-site-packages = true

And the library is properly included, but it might cause issues (i haven't fiddled enough with home-assistant to know what could go wrong).
Problem 2 is the permissions on /dev/input/event0.
I added the following to /etc/udev/rules.d/99-com.rules:
KERNEL=="event0" , SUBSYSTEM=="input", MODE="0777"

Which will set the permissions of /dev/input/event0 to 777(kinda unsafe, it might be a better idea to do 770 and add the homeassisttant user to the proper group) upon boot.
Aaand it works!
PS: version 0.37.1 on the hassbian image(i think, the one that has everthing in /srv/homeassistant).

I too have been following this thread, I do not feel that @sofixa 's approach is the right one, however, I am also relatively new to Python & Virtual Environments.
I have read through the above and it seems @MikeMannox is right regarding the Virtual Environment.
A Google search showed something along the same lines:
https://www.raspberrypi.org/forums/viewtopic.php?f=32&t=173380
So, the steps I took we're:

Login to Raspberry Pi ssh pi@your_raspberry_pi_ip
Add homeassistant to our input group → sudo addgroup homeassistant input
Restart the Raspberry Pi sudo reboot

then once rebooted as @MikeMannox wrote:

Enter Python3: python3
Import the SenseHat: from sense_hat import SenseHat
Assign a variable sense = SenseHat()
continue with commands →sense.show_message("Hello world!")
LED's start printing 👍

I should point out that earlier in my detective work I did enter, but do not think it affected this test:
sudo apt-get install virtualenv python-dev python-pip libjpeg-dev sense-hat
sudo pip install pillow

However, Home-Assistant is still showing errors, but they are no longer a → PermissionError
17-02-08 22:51:15 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform sensehat
Traceback (most recent call last):
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 151, in _async_setup_platform
    entity_platform.add_entities, discovery_info
  File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/sensor/sensehat.py", line 64, in setup_platform
    dev.append(SenseHatSensor(data, variable))
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/sensor/sensehat.py", line 79, in __init__
    self.update()
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/sensor/sensehat.py", line 98, in update
    self.data.update()
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/util/__init__.py", line 296, in wrapper
    result = method(*args, **kwargs)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/sensor/sensehat.py", line 125, in update
    temp_from_h = sense.get_temperature_from_humidity()
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/sense_hat/sense_hat.py", line 582, in get_temperature_from_humidity
    self._init_humidity()  # Ensure humidity sensor is initialised
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/sense_hat/sense_hat.py", line 549, in _init_humidity
    raise OSError('Humidity Init Failed')
OSError: Humidity Init Failed

@nodinosaur Yeah, as i said, adding the home asistant user to the group is a better idea than my 777, but personally i don't care if every user on the dedicated RPi can read the input from the joystick :)
As for your issue, have you tried running the get_temperature_from_humidity() function manually in an interactive python (running python3 and then doing stuff)?

@sofixa you mean like this?
pi@raspberrypi:/home/homeassistant/.homeassistant $ python3
Python 3.4.2 (default, Oct 19 2014, 13:31:11)
[GCC 4.9.1] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from sense_hat import SenseHat
>>> sense = SenseHat()
>>> sense.show_message("Hello world!")
>>> print("Temperature: %s C" % sense.get_temperature_from_humidity())
Temperature: 35.25962829589844 C
>>>

and then what should I try?

Try it in the homeassistant virtualenv (by soing source /srv/homeassistant/bin/activate (or wherever the root of your installation is)), it might be another library problem.

OK, yes, typically, I didn't test for that sensor earlier.
So,

Change to homeassistant user sudo su -s /bin/bash homeassistant
Change to virtual enviroment source /srv/homeassistant/homeassistant_venv/bin/activate
Start Python3: python3
entering the following program

>>> from sense_hat import SenseHat
>>> sense = SenseHat()
>>> sense.set_rotation(270)
>>> sense.show_message("Hi!", text_colour=(255, 0, 0))
>>> temp_frm_hmdty = sense.get_temperature_from_humidity()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/sense_hat/sense_hat.py", line 582, in get_temperature_from_humidity
    self._init_humidity()  # Ensure humidity sensor is initialised
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/sense_hat/sense_hat.py", line 549, in _init_humidity
    raise OSError('Humidity Init Failed')
OSError: Humidity Init Failed
>>>

So it's a venv problem, a lib or something doesn't get imported into the venv.

Have it working in a relatively clean way - will test in a fresh install & document

@sofixa For me, your suggestion of using a flag that allows access to the whole of Home-Assistant defeats the purpose of having a virtual environment where the idea is for the environment to be stand-alone.
Ben of BRUH Automation explains.
Allowing complete access to all groups (777) is probably more than you actually need to grant - but you did say yourself. Let's see how we can solve this in a clean way 👍

Here are the steps I took to make the SenseHAT sensor work successfully with the All-In-One version of Home-Assistant. This solution retains the virtual enviroment and does not require us to grant any additional permissions.
The steps I took are listed below. (Sources and attributions afterwards).
This was tested on a clean install of:

Raspbian Jessie - version January 2017

and

Home-Assistant 0.37.1

Install SenseHAT package to homeassistant_venv
sudo su -s /bin/bash homeassistant
source /srv/homeassistant/homeassistant_venv/bin/activate
pip3 install sense-hat
(takes ages, time to go and grab a nice drink)
Install RTIMU lib
Install RTIMU to your Home user environment.
We will add a link to this for homeassistant_venv in the next step.
pip3 install rtimulib
Add symlink to RTIMU in homeassistant_venv
Unfortunately attempting to install RTIMU lib to the homeassistant_venv fails with the following error:
Could not find a version that satisfies the requirement rtimulib (from versions: )
No matching distribution found for rtimulib

The only other option is to create a symlink using the following command:
ln -s /usr/lib/python3/dist-packages/RTIMU.cpython-34m-arm-linux-gnueabihf.so /srv/homeassistant/homeassistant_venv/lib/python3.4/
This allows homeassistant_venv to access RTIMU.
(The /srv/homeassistant/homeassistant_venv/lib/python3.4/ directory is full of symlinks)
Add homeassistant to the required groups
Access to input
sudo addgroup homeassistant input
Access to i2c
sudo addgroup homeassistant i2c
Reboot Raspberry Pi to apply changes
sudo reboot
Sources and attributions:

I'd like to say thanks to my mate @JanKn to helping figure some of this out

RTIMU issue:

@enurist for his tip on the symlink

input issue:

https://www.raspberrypi.org/forums/viewtopic.php?f=32&t=173380

i2c issue:

https://www.raspberrypi.org/forums/viewtopic.php?p=238003

I will update the components/sensor.sensehat page with the additional information (until there is a better method).
Thanks

Great, it works. Thanks a lot!


thumbnail image size?

Can you add a feature that can set thumbnail image size?
for me, this plugin is perfect except for its size
Thanks

Hi !
If you want, you can do it manually by changing the styles.css file.
Here is the code for the thumbnail image:
Line 49 of styles.css:
.block-language-vid .thumbnail-img {
	width: 150px; /* CHANGE HERE */
	border-radius: 8px;
	position: relative;
	z-index: 2;
}

To access the plugin folder, go to Community Plugins, then click on the folder icon to the right of "Installed Plugins."
It would be better if this feature were directly available in the settings, but for now, you can use this method.


Add ICA testing to e2e test

Background
I came across this PR from stargaze https://github.com/public-awesome/stargaze/pull/655, which tests ICA by shooting an intertx across chain.
With our repo adding ICA starting from V12, I suggest adding ICA testing to our current e2e tests.
Suggested Design
Run the example ICA chain https://github.com/cosmos/interchain-accounts-demo, have our current e2e shoot a sample intertx to the ICA chain.
Acceptance Criteria

Have ICA testing included in the current e2e test

@mattverse, is this something you are still working on? I think we need to re-write this issue if so, as it looks outdated.


⚠ GitLab Server has degraded performance

In 3ca2f77, GitLab Server (https://gitlab01.its-telekom.eu) experienced degraded performance:

HTTP code: 200
Response time: 11466 ms

Resolved: GitLab Server performance has improved in 33a5689.


Loop if 'proxies' is not None in requests/sessions.py line 679

function merge_environment_settings

Closing with this response in the associated PR. We need more info to do anything actionable with this and the proposed solution will mask problems.


Missing error message if ssh key is not correct

If you configure your ssh access to the repo wrong in some way, accompli 'just won't work'. It just says 'installation failed', the missing ✓ in front of the checkout task is the only indication that something is probably wrong there. There's no actual error message or anything specifying what is wrong, even when running with -vvv (debug). Example output:
./vendor/bin/accompli install-release master test
[accompli.prepare_workspace        ][CreateWorkspaceTask      ] [...] Creating Workspace.
                                                                [ ✓ ] Created Workspace.
                                    [SSHAgentTask             ] [...] Initializing SSH agent...
                                                                [ ✓ ] Initialized SSH agent. Agent pid 6437
[accompli.prepare_release          ][RepositoryCheckoutTask   ] [...] Creating checkout of repository "git@github.com:XXX/XXX.git" for version "master".
[accompli.install_release_failed   ][SSHAgentTask             ] [...] Terminating SSH agent...
                                                                [ ✓ ] Terminated SSH agent.
[accompli.prepare_workspace        ][CreateWorkspaceTask      ] [...] Creating Workspace.
                                                                [ ✓ ] Created Workspace.
                                    [SSHAgentTask             ] [...] Initializing SSH agent...
                                                                [ ✓ ] Initialized SSH agent. Agent pid 24921
[accompli.prepare_release          ][RepositoryCheckoutTask   ] [...] Creating checkout of repository<EMAIL_ADDRESS>for version "master".
[accompli.install_release_failed   ][SSHAgentTask             ] [...] Terminating SSH agent...
                                                                [ ✓ ] Terminated SSH agent.
[accompli.prepare_workspace        ][CreateWorkspaceTask      ] [...] Creating Workspace.
                                                                [ ✓ ] Created Workspace.
                                    [SSHAgentTask             ] [...] Initializing SSH agent...
                                                                [ ✓ ] Initialized SSH agent. Agent pid 22440
[accompli.prepare_release          ][RepositoryCheckoutTask   ] [...] Creating checkout of repository "git@github.com:XXX/XXX.git" for version "master".
[accompli.install_release_failed   ][SSHAgentTask             ] [...] Terminating SSH agent...
                                                                [ ✓ ] Terminated SSH agent.

Which version of Accompli are you using?

The latest release, 0.2.1.

PR #140 (currently merged into master) contains an overhaul of the generated output as well as failure reporting. Could you check if using the master branch fixes your problem?

I tried (another) error with dev-master and error reporting has greatly improved 🎉  I'm sure it would also report the particular problem of this issue.

Great! :smiley:

When will these improvements be available in a release? I'd rather not move a project towards production deploying with a dev-master or 0.2.1.

The 0.3.0 release is planned for next week.


update search functionality

Codecov Report
Attention: 65 lines in your changes are missing coverage. Please review.

Comparison is base (59da186) 1.18% compared to head (c8dd9b8) 1.18%.

Files
Patch %
Lines

...kotlin/com/alibabacloud/api/service/ProcessMeta.kt
0.00%
60 Missing :warning:

...kotlin/com/alibabacloud/api/service/ApiExplorer.kt
0.00%
3 Missing :warning:

.../main/kotlin/com/alibabacloud/ui/BaseToolWindow.kt
0.00%
2 Missing :warning:

Additional details and impacted files
@@          Coverage Diff           @@
##           master     #17   +/-   ##
======================================
  Coverage    1.18%   1.18%
======================================
  Files          12      12
  Lines         675     675
  Branches      113     113
======================================
  Hits            8       8
  Misses        666     666
  Partials        1       1

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


add instructions for running mvp app

Updates to readme, adding license, python requirements, screenshots.

Looking good!


Visualize multiple latitudes and longitudes together

Is it possible to visualize an array of lat lon on mapviz?
Basically, I have multiple lat lon data of vehicles in the scene. The lat lon represents the vehicle location. For every frame I get lat lon data array which is of varying size. Say, the first frame has 4 cars, second has 3 and third has 1. So I need to visualize 3, 2 and 1 dots (lat, lon) respectively in three consecutive frames.
If anybody can help or suggest any way it can be done...

The most flexible message types to visualize are the Marker or MarkerArray.  You can provide a set of points to visualize with those.


trac_ik: 1.4.7-0 in 'jade/distribution.yaml' [bloom]

Increasing version of package(s) in repository trac_ik to 1.4.7-0:

upstream repository: https://bitbucket.org/traclabs/trac_ik.git
release repository: https://github.com/traclabs/trac_ik-release.git
distro file: jade/distribution.yaml
bloom version: 0.6.1
previous version for package: 1.4.5-0

trac_ik
* Fixed bug introduced in 1.4.6 where threaded function call should be returning a bool but was not returning anything

Jade is EOL and we don't run any infrastructure for it anymore. Currently active ROS Distributions are Indigo, Kinetic and Lunar


How to remember the pages data that I have navigated from?

I need to retain a Page instance in memory, when I navigate by using the Back, Forward ,How can i keep page with full state in navigation ?

Try  setting the keep alive property of the page.
<Page x:Class="..." KeepAlive="True">

Thanks for your help

Something like this
KeepAlive="{Binding DataContext.MyKeepAliveProp, ElementName=TheMainViewName}"

thanks again, but it doe`nt work :(
Data lost from ViewModel when navigating pages.

If you want just one instance of your view model, mark it as a singleton. use SingletonConvention for this scenario.
Using ViewModels with the SingletonConvention is not a good idea. More info.

Thanks it worked like a charm.
What would be good if the pages were opened in tabs.


removes depencies of dom-library for all examples

removed import script statement in html form all examples.
I hope this closes the issue

issue closed, thanks so much @satyasaibhushan !

Thank you for guiding me through my first PR !!


Make request headers accessible from SQL scripts templates

Is your feature request related to a problem? Please describe.
I have successfully deployed prest to production for some time to run SQL scripts from query parameters. However, for some reason, I now need to access query headers to configure the SQL script, which is unfortunatly not currently possible.
Describe the solution you'd like
I'd like to have the query headers available in the data object when executing SQL script templates.
Additional context
Implementation of the feature is pretty straightforward and I can do a PR if desired.

@ccamel It will be important to count on your support doing this implementation, I am waiting for your PR


NCEPU

the University about electric in China, Beijing

@liyi9307 I am sorry, I have to close this request without merging, because you requested to add a non-existent domain to this repository:
$ host ncepu.edu
Host ncepu.edu not found: 3(NXDOMAIN)

Please ensure you are familiar with this repository rules located at the bottom of this page and submit a new request with correct information.
Thank you for the understanding!


Consolidate output directories

This change improves the PowerShell build script to bring all build directories into a centralized (yet configurable) structure, organized by platform target and configuration.
It also simplifies the PowerShell and UNIX shell scripts for readability and maintainability.

Hi, thank you, I will comment on this in detail in the next days. Generally, this will be a breaking change, since people expect ffmpeg dll output files in a specific directory. We need to be sure that this is really a big improvement before we merge this into the master branch.
Also, it would be cool if you could do PRs from branches inside this repo, not from your fork. You do have write access, so you can create your own branches here. That would make it easier for us to checkout and test PRs.

Hi, thank you, I will comment on this in detail in the next days. Generally, this will be a breaking change, since people expect ffmpeg dll output files in a specific directory. We need to be sure that this is really a big improvement before we merge this into the master branch.

This definitely makes the development workflow easier from the FFmpegInterop perspective.
Tracking and cleaning dirty submodules can get distracting.

Also, it would be cool if you could do PRs from branches inside this repo, not from your fork. You do have write access, so you can create your own branches here. That would make it easier for us to checkout and test PRs.

Sure thing. In my experience, branches in forks is the most common practice, but I'm fine with adding the feature branches here.

Oh, and sorry for creating merge conflicts with my other PRs ;)

Superseded by #200.
Don't close yet.

Can we close this PR?

Can we close this PR?

Yeah


Lazy-loading doesn't allow translating in different locale

Environment

Operating System: Linux
Node Version:     v18.15.0
Nuxt Version:     3.4.3
Nitro Version:    2.3.3
Package Manager<EMAIL_ADDRESS>Builder:          vite
User Config:      srcDir, ssr, telemetry, typescript, build, imports, router, sourcemap, modules, i18n, vite, nitro, runtimeConfig
Runtime Modules<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>()
Build Modules:    -

Reproduction
https://stackblitz.com/edit/github-brvbfm?file=app.vue
Describe the bug
With the option lazy: true, you can't translate anything in a locale other than the current.
$i18n.t('welcome', 1, { locale: 'nl' }) doesn't work.
Additional context
I get that the locale might have to be imported manually first, but there should at least be an option to do so.
Logs
[intlify] Not found 'welcome' key in 'nl' locale messages.

Thank you for your reporting!
Unfortunately, When the locale options of t ($t) cannot handle lazy-loading.
We need to extend these function (e.g. proxy or wrap?)

Duplicate of the v7 issue #740 but it applies the same to Nuxt 3 also.


[Iteration 1] v4.0-beta

@ruudboon it's in next iteration, as combined with Niden.
https://github.com/phalcon/phalcon-api/issues/23

Rename namespaces from Niden to Phalcon\Api

Thnx @Jeckerson


temporal ordering and clinical data

Hi,
Is there any way to know, given a particular patient, when the chest x-rays were taken relative to one another? And is there any way to link the images to clinical data for a given patient?
Thank you

You can use the StudyDate in the DICOM header for this information. Eventually I plan on adding in a derived meta-data spreadsheet which gives the info in a form that's easier to query.

Thank you! There is no associated clinical data for any of the subject ids currently, correct?

Not currently but stay tuned!


Fixes #13905: Set relaunch command for window

Sets relaunch command to open a new window.
Requires electron/electron#7952.
Fixes #13905.

@the-ress can you elaborate a bit what SetAppDetailsForWindow does in the end?

SetAppDetailsForWindow sets these properties for the window (if they're not empty):

AppUserModel.ID - This needs to be set. Otherwise the other properties are ignored.
RelaunchIconResource - Icon for the taskbar button and the 'launch new instance' taskbar menu item.
RelaunchCommand - Command started by the 'launch new instance' menu item.
RelaunchDisplayNameResource - Label for the 'launch new instance' menu item.

Relaunch command and display name must always be set together. Otherwise neither is used.

@the-ress is there an example of an application that leverages this? if I right click on Chrome for example, I am not seeing a relaunch command.

This is what I see when I right click Chrome:

Regular Chrome window doesn't override the relaunch command so it just launches chrome.exe without any arguments.
However if I run a chrome app, it opens a in new window that is owned by the same chrome.exe, but it changes its taskbar icon, name and relaunch command (using SetAppDetailsForWindow).

The relaunch commands is set to something like chrome.exe --profile-directory=Default --app-id=ibhkjcfebdanponjgchgcgilkoahbpfh. So when I middle-click the button (or shift+click, pin it or click the relaunch menu item), it opens the app and not a regular browser window.

@the-ress that is pretty cool. So what your PR actually fixes is that middle click on the task bar icon opens a new window (something many people have asked for and which I was never sure how to do actually).

Yes. (I referenced the issue in the title of this PR.)

The electron part of this was released in electron 1.4.11.

Thanks for letting me know 👍

Please make sure this PR plays nicely with hot exit, see https://github.com/Microsoft/vscode/issues/48#issuecomment-270183828
This needs to be addressed on Linux as well.

@Tyriar not sure it is fair to ask for this in the same PR, maybe we should have a separate PR for the Linux problem.

I added a new CLI arg --new-window-if-not-first which should work for windows if that's the arg the shortcut uses. https://github.com/Microsoft/vscode/issues/48#issuecomment-270714743

I think the new argument will not help in this case, see https://github.com/Microsoft/vscode/issues/48#issuecomment-270726810

Optimistically merging this for April since we plan to land Electron 1.6.x.


Why not supply functions to pipe/compose in an array?

Sorry to inconvenience you with this question that has probably been answered before:
How come Ramda doesn't use an array for the functions supplied to compose and pipe so that data might be supplied as the last argument?
My impression was that the developers of Ramda generally frown upon variadic functions.
I guess I'm just trying to understand some of the design decisions of Ramda. (I'm still struggling with understanding why the resulting function from compose/pipe isn't curried.)

This has been discussed, most recently in #1213.  While there wasn't serious opposition, it's also a seriously breaking change.  I would guess that the vast majority of codebases using Ramda would have to be rewritten to handle it.
And I'm not so sure about the idea of taking the argument(s) as the final parameter.  That would be a much bigger change, since we allow the first-to-be-called function (first in pipe, last in compose) to be variadic.  Would pipe/compose then be variadic again in order to account for this (with shades of the #1260 / #1380 problems), or would the user have to pass a list of arguments every time?  Neither strikes me as very ergonomic.

S.compose and S.pipe have fixed arity. I'd like R.compose and R.pipe to have fixed arity too.

@CrossEye: I agree with you about the variadic signature.
I think it's alright to simply refer to Sanctuary for people who prefer the other style.


Dependency graph is not properly generated if there is no empty line above '\begin{theorem}'

I ran into an issue where the dependency graph is not generated properly if the line preceding '\begin{theorem}' or '\begin{definition}' is not empty.
Setup:

leanblueprint: latest commit (a377de0)
plastex: 3.0

Steps to reproduce: use the following tex file:

\usepackage{amsmath, amsthm}
\usepackage[showmore, dep_graph, coverage, project=../../]{blueprint}

\newtheorem{theorem}{Theorem}

\begin{document}

tt
\begin{theorem}
  \label{tt:test}
  Test
\end{theorem}

\begin{proof}
test
\end{proof}

tt
\begin{theorem}
  \label{tt:test2}
  Test
\end{theorem}

\begin{proof}
\uses{tt:test}
test uses \ref{tt:test}
\end{proof}

\end{document}

The dependency graph does not show the dependency between test and test2. It works fine if the lines before the theorems are blank.

My codebase is horribly mangled so I cannot submit a PR for this right now, but one fix is to change
https://github.com/PatrickMassot/leanblueprint/blob/7ce2f47fc5ed955b4d473e8c14d93ea702ad4c48/leanblueprint/Packages/blueprint.py#L321-L322
to
        if childNodes:
            for grandchildNode in childNodes:
                if grandchildNode.nodeName == 'thmenv':
                    return grandchildNode

Could you please test again with plastex's master branch? I pushed a fix there which should be relevant.

Correction: I realized my "fix" was incorrect so I reverted it. Sorry about the noise. I will continue to investigate.

It should be good now.


[Feature][k8s] k8s tasks support allowing users to directly fill in yaml in text format

Search before asking

[X] I had searched in the issues and found no similar feature requirement.

Description
No response
Use case
No response
Related issues
No response
Are you willing to submit a PR?

[X] Yes I am willing to submit a PR!

Code of Conduct

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

Hello everyone,
I am currently working on this feature to support user-customized Kubernetes YAML tasks.
This feature is due by September 30, 2024 (the "deadline").
Thank you.


solr_update crashes when a resource has been deleted from Django and is still in SOLR

If a resource has been deleted from Django and is still in SOLR, the solr_update process crashes rather than simply deleting it from SOLR.

@sblack-usu @hyi @alvacouch Is this still an issue I think to remember that there was some work done looking at the deletion process?

I fixed this in a previous PR but then it popped up again and I am fixing it again in the next PR. I think it's safe to close this. I won't forget.


Command Line Script

Epic
Create a command line script in Python that creates a playlist when manually passed parameters
User Stories
As a user, I want to be able to create a customized playlist using a CLI interface
Tasks

[x] Create skeleton Python Script, accept arguments and authenticate user
[ ] Test functionality to create playlist, passing various combinations of parameters
[x] Write playlist information to database when script runs

We have successfully enabled the functionality of playlists being created, but are yet to roll out a production version that accepts custom parameters. We have experimented with methods to achieve this and it should be very doable early within the next sprint.