Issues updating existing items

Just tried the new v2 version. Love the changes! Only issue I have found so far is updating existing items (I have most of what you include as examples lol). When I try to update them the value doesn't change and the app window is listing out this error:
Error on request:
Traceback (most recent call last):
File "werkzeug\debug_init_.py", line 329, in debug_application
File "flask\app.py", line 2551, in call
File "flask\app.py", line 2531, in wsgi_app
File "flask\app.py", line 2528, in wsgi_app
File "flask\app.py", line 1825, in full_dispatch_request
File "flask\app.py", line 1823, in full_dispatch_request
File "flask\app.py", line 1799, in dispatch_request
File "app.py", line 88, in item
sqlite3.ProgrammingError: Cannot operate on a closed database.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "werkzeug\serving.py", line 333, in run_wsgi
File "werkzeug\serving.py", line 322, in execute
File "werkzeug\debug_init_.py", line 344, in debug_application
File "werkzeug\debug\tbtools.py", line 331, in render_debugger_html
File "werkzeug\debug\tbtools.py", line 291, in render_traceback_html
File "werkzeug\debug\tbtools.py", line 413, in render_html
IndexError: list index out of range
Really appreciate you opening this up as I have built two of these for myself this week! (so MANY solder points!)

oh forgot to add the value I am trying to update is the wled IP. It's reachable and the json page loads with no issue.

I'm having trouble recreating this error, are you using the precompiled .exe version or the Python script? I'm also assuming you're using the latest build 2.1?

Yep, I am using the latest build and I have tried both the exe (ran as admin as well) and also just launching the app.py
Interestingly there is no error when launched through app.py but the wled field still fails to update. Here I loaded the site. Edited the wled field and refreshed:

Serving Flask app 'app'
Debug mode: on
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
Running on all addresses (<IP_ADDRESS>)
Running on http://<IP_ADDRESS>:5000
Running on http://<IP_ADDRESS>:5000
Press CTRL+C to quit
Restarting with stat
Debugger is active!
Debugger PIN: 482-326-028
<IP_ADDRESS> - - [22/Apr/2023 10:02:45] "GET / HTTP/1.1" 200 -
<IP_ADDRESS> - - [22/Apr/2023 10:02:45] "GET /static/script.js HTTP/1.1" 304 -
<IP_ADDRESS> - - [22/Apr/2023 10:02:45] "GET /api/items HTTP/1.1" 200 -
<IP_ADDRESS> - - [22/Apr/2023 10:03:01] "PUT /api/items/1 HTTP/1.1" 200 -
<IP_ADDRESS> - - [22/Apr/2023 10:03:04] "GET / HTTP/1.1" 200 -
<IP_ADDRESS> - - [22/Apr/2023 10:03:04] "GET /static/script.js HTTP/1.1" 304 -
<IP_ADDRESS> - - [22/Apr/2023 10:03:04] "GET /api/items HTTP/1.1" 200 -

also I am able to update other fields without issue and add items as well. It only seems to be impacting editing that wled field. If I attempt to edit the wled field on a new item I've added it still sends the signal to the previous ip/position. I tested to see if I can update position and that works fine so everything seems to be pointing towards the code that updates the wled field. I barely know what I am doing with python but when looking over the database script it looks like the update portion doesn't include IP? I see it in the write item portion but not there so figured I would ask:
def update_item(id, data):
conn = get_db()
conn.execute('UPDATE items SET name = ?, link = ?, image = ?, position = ?, quantity = ? WHERE id = ?', [data['name'], data['link'], data['image'], data['position'], data['quantity'], id])
conn.commit()
conn.close()

@straysolutions no that's spot on you found it I was just about to write a comment saying I figured it out, I forgot to add IP as a field to update.

@straysolutions I pushed the fix,  let me know if that solved the issue.

AWESOME! Tested editing ip address to both bins I had built and changed positions. All working as expected. Thanks for the quick resolution!


better parsing of adb devices output

more robust parsing of the output from adb devices (fix https://github.com/flutter/flutter/issues/3712)

lgtm

LGTM!

@devoncarew Thanks for the fix, Devon. Can you please make sure that this update is merged into the flutter/flutter 'codelab' branch also?


ui: add React UI from upstream Prometheus

[X] I added CHANGELOG entry for this change.
[ ] Change is not relevant to the end user.

Changes

Add React UI accesible from the Query only for the moment as only the graph endpoint has been migrated.

I've been putting Thanos related modifications in the ui/react-app/src/thanos directory but there are some modifications in the root files. The goal is to be able to just copy paste the source from upstream and let the Thanos directory do the rest to ease upgrades.
Verification

@adrien-f  can you rebase a bit?
@d-ulyanov @geobeau can you help in review?

All unit tests passing.. Don't know how to help with review more..

Could we add typescript check in Makefile and in CI? What do you think @adrien-f ?
package.json
scripts: {"types": "tsc --pretty --noEmit"}

Right now there are several errors

@bwplotka @adrien-f friendly ping on this 🤗
Are we waiting for more reviewers? or there is other blockers to this PR?

@bwplotka @adrien-f friendly ping on this
Are we waiting for more reviewers? or there is other blockers to this PR?

I think this has been postponed for a little bit because in Prometheus this UI code is still very much in flux so we've been recommended to wait for a bit. :-) I guess once it will be moved out of the "experimental" phase we will be able to continue with this. Perhaps @adrien-f knows more information.

Looking for GSoC help here (:
cc @prmsrswt

Merged via https://github.com/thanos-io/thanos/pull/2412 :P closing this one. Thank you to everyone for your efforts!


Fixed build due to sqlite update by Anaconda which removes static lib…

…s from the package
Checklist before submitting

[x] Did you read the contributor guide?
[ ] Did you update any affected documentation?
[ ] Did you write any tests to validate this change?

Description
Fixes build failure of TF with sqlite 3.35 updated by Anaconda which removes the static libs from the sqlite package. We tried removing references of sqlite's static libs from the patch which was being applied to TF, and TF built fine. This means TF hasn't been using static libs of sqlite at all.
Review process to land

All tests and other checks must succeed.
At least one maintainer must review and approve.
If any  maintainer requests changes, they must be addressed.

I'm still working to confirm one thing to check if even shared libs are being used or not. I don't see anywhere -lsqlite3 in the tensorflow's source code.

I've confirmed that the dynamic libs references are needed. So, this PR is good to merge and needs no further changes.


SysConsole menu in UI Catalog

I was curious about what was/wasn't working with System Console (net driver). This led me to implementing an option in UI Config that lets you run ANY Scenario in the System Console.
I know NetDriver is still very broken, but this should help someone who wants to work on it be able to and have an easy test of all scenarios.

This will wait until after the 'clip' merge is done.

Looks good to me, can be merged after your other patch.
Beyond showing the two drivers on Windows, might be useful also to quickly spot-check what a less powerful driver will look like/behave like without having to switch to a Linux console without mouse support.

I'm going to put this in my mondo patch.


Minor Changes

Thanks. Could you check how to resolve the conflicts, please?

Close this. I send another PR.


Test dynamic and admin view

Hi,
First, let me say that I really love your framework and how you build your architecture!
I'm trying to use the testdynamic.js and testdynamic.html test in order to understand how it works. Unfortunately, just out of the box, it gives endless errors on the client side while trying to register new rules(but it works). The post message doesn't work as well and the HTTP request failed with no clear error. I tried to debug it without success.
Also, I was trying to get one example running the admin.html and the D3 example. Both fail on the client side with errors. I tried both Chrome and Safari. I'm opening a http://localhost:5000/first/a/admin.html. The page is found but never loads, no matter what the rule is.
Would love to get your help.
Thanks,
D.

Hi, thanks a lot for the feedback. I'm sorry you came across the old testdynamic sample. I should be done fixing it tomorrow.
Unfortunately, as the project has evolved, I haven't been able to keep the rule visualization up to date, right now I don't have a good way of visualizing a forward chaining ruleset. I'm planning to remove the admin page feature from the project altogether.
Thanks,
JR

OK, I have fixed the testdynamic sample and cleaned up the visuals. Please try http://localhost:5000/testdynamic.html. Once the page comes up, click save then click post.
Please keep in mind JSON is only an intermediate format. By no means it is not intended to be a rule definition language.
Hope this help,

Hi,
It might be that my comment is not related to the issue. But I could not run the python test successfully. I am getting the following error.
Traceback (most recent call last):
  File "testdynamic.py", line 49, in <module>
    main_app = Application(main_host)
  File "testdynamic.py", line 37, in __init__
    super(Application, self).__init__(host, [Rule('/testdynamic.html', endpoint=self._dynamic_request)])
TypeError: __init__() takes at least 4 arguments (3 given)

Thx

Thanks, it works! I very interesting implementation. I will spend a lot of time on this.

Hi, thanks much for verifying. @tuxos, I have opened a separate issue to keep track of the python problem.


SyntaxError while setting up Python dependencies

Since a couple of days (?), I'm seeing this in my runs:
Setup Python dependencies
  /home/runner/work/_actions/github/codeql-action/v1/python-setup/install_tools.sh
[...]
  +
  + curl --location --fail https://bootstrap.pypa.io/get-pip.py
  + command -v python2
  /usr/bin/python2
  + python2
    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed

    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  100 1883k  100 1883k    0     0  3327k      0 --:--:-- --:--:-- --:--:-- 3327k
  Traceback (most recent call last):
    File "<stdin>", line 24226, in <module>
    File "<stdin>", line 199, in main
    File "<stdin>", line 82, in bootstrap
    File "/tmp/tmpSl4FBD/pip.zip/pip/_internal/cli/main.py", line 60
      sys.stderr.write(f"ERROR: {exc}")
                                     ^
  SyntaxError: invalid syntax
Warning: Unable to download and extract the tools needed for installing the python dependencies. You can call this action with 'setup-python-dependencies: false' to disable this process.

This is probably due to pip dropping support for Python 2 recently.
Given that Python 2 support seems to be optional, maybe it'd be a good time to drop it, given that Python 2 has been declared end-of-life over a year ago?

Ah, looks like there is https://bootstrap.pypa.io/2.7/get-pip.py as well, pointing to the latest pip version supporting Python 2 (pip 20.3.4). If you prefer, I'd happily open a PR updating the URL (I'm the one who introduced it in #316).

Ah, looks like there is https://bootstrap.pypa.io/2.7/get-pip.py as well, pointing to the latest pip version supporting Python 2 (pip 20.3.4). If you prefer, I'd happily open a PR updating the URL (I'm the one who introduced it in #316).

Thanks for reporting this. We're aware and there will be a new version of the codeql-action out soon that will either fix the error, and at some point in the future we will indeed drop support for installing dependencies for python 2. Your link to https://bootstrap.pypa.io/2.7/get-pip.py is very poignant because that's exactly what we intend to use to fix it.
The dependency installation is only a best-effort attempt so thankfully it's a non-fatal error. For now if you can just ignore it and a fix will be out soon.

Thanks for reporting this. We're aware and there will be a new version of the codeql-action out soon that will either fix the error, and at some point in the future we will indeed drop support for installing dependencies for python 2. Your link to https://bootstrap.pypa.io/2.7/get-pip.py is very poignant because that's exactly what we intend to use to fix it.
The dependency installation is only a best-effort attempt so thankfully it's a non-fatal error. For now if you can just ignore it and a fix will be out soon.


Tablist.

I love getting an error with 0 google pages YEP
Malformed public key bytes

I think it was something to do with skins


R code for NC data cleaning.  Edits to NC excel data.

First drafts for code to clean NC routine and conditional data.
Edited NC conditional excel files to run with code.  Minimal edits were made. Primarily deleted empty sheets and renamed column headers to match code (uppercase vs lowercase, added spaces, etc).

Woooo! 🎉 Nice job, @mmc34202!


The code does not compile after generation in last version

I use your tool since some weeks. But after the last update, i got this error:
'PropertyInfo' does not contain a definition for 'Command' and no accessible extension method 'Command' accepting a first argument of type 'PropertyInfo' could be found (are you missing a using directive or an assembly reference?)
To reproduce, just try to generate "account" entity and use it.
Thanks

Resolved, please inform if there are errors


Fluid + MS Teams Recipe

The recipe outlines the general steps required to integrate Fluid into Microsoft Teams Tab application. The goal of the recipe aims to marry the creation flow of Fluid and Teams, and provide a skeleton code for the developer to work on top of. Here are the steps to achieve that goal:

Provide how to set up default Teams Tab app.
Provide instructions to run the Teams Tab app.
Walkthrough of the code needed to marry Teams and Fluid creation flow and the reason for why it's coded the way it is.
Leave developer at the entry point of Fluid app development (Passing in Fluid container to a React component).
Mention Remote mode for AzureClient.
Demonstrate how to hide credentials for connectionConfig.

some general feedback
"we" usages should be removed to match the styling of the rest of the docs, either by converting to "you" statements or some other conversion
i don't think this document should try to educate the reader on best coding practices that aren't specifically related to fluid, like it does in a few places.  it doesn't fit the purpose of the document nor are they clarifying otherwise confusing patterns

some general feedback "we" usages should be removed to match the styling of the rest of the docs, either by converting to "you" statements or some other conversion i don't think this document should try to educate the reader on best coding practices that aren't specifically related to fluid, like it does in a few places. it doesn't fit the purpose of the document nor are they clarifying otherwise confusing patterns
overall structure and instruction clarity are good

Thanks for pointing that out! I forgot we need to write to the users in docs. 😀


Relations to the same model dissapear when unlinking

When model A has two or more relations (let's call them x and y) to class B, then unlinking A.B though relation x affects existing links though y (these get unlinked too).
Here is the repo with code reproducing this bug (you can check out the only PR to see what has changed in relation to reproduction-template).
https://github.com/prk3/objection-bug-disappearing-relations

If the two relations are linked through the same join table, then yes, that's expected. Your reproduction doesn't reproduce this case by the way.

And please, avoid upsertGraph like the plague! I will be heavily discouraging it's usage in 2.0.

If the two relations are linked through the same join table or the same foreign key, then yes, that's expected.

Even when there is an "extra" and "modify" for distinguishing links?
It's pretty obvious that there is a problem with representing relations like this. Take a look at this issue:
https://github.com/Vincit/objection.js/issues/1268
And it's not only a problem with upsertGraph. I've refactored the code so that it doesn't use the it and the problem persists (it actually got worse, as relating appears to be broken too). You can see the code in reproduction repo.

This issue will actually be resolved by #1356

So the issue is that the modify and beforeInsert are for the related table, not for the pivot table. #1356 will make it possible to add modify and beforeInsert for the pivot table.
By the way, this does nothing:
 modify: qb => qb.relation === 'pet'

We cannot run javascript in the database. You need to use
 modify: qb => qb.where('relation', 'pet')

I need to set a value on the pivot table row when it's inserted (M:N relation). Will that be possible too? (not just querying)

@ericmuyser That's already possible. https://vincit.github.io/objection.js/recipes/extra-properties.html#join-table-extra-properties


[FEATURE] Add European ETFs

Is your feature request related to a problem? Please describe.
You recently added europeen stock, but we cannot use etfs from investing.com, that's not the same url. It will be nice if we could choose between stock and ETF
Describe the solution you'd like
Choose between stock and ETF
Describe alternatives you've considered
I've thought about hard-coding the urls, but I suppose that's not the only impact, and that all the APIs are different.
Additional context

Hey @Lerwox ! I'll consider adding this for the next release. Thanks for the feedback!

Hey @Lerwox ! I've released v1.2.1 version with support for ETFs. You can download it from here
LMK if it works for you.

Hey @matextrem,
I tried it, and it works perfectly, I also could add param request in the URL, so it's possible to have ETF in a certain exchange.
Examples :

https://www.investing.com/etfs/spdr-msci-world-ucits-lse-usd?cid=1165086 → spdr-msci-world-ucits-lse-usd?cid=1165086
https://www.investing.com/etfs/spdr-msci-world-ucits-lse-usd → spdr-msci-world-ucits-lse-usd

These two tickers, works like magic.
Thank you very much !


Improve V1 treatment for old GHC

On GHC < 7.8, be sure to get the "right" exception/non-termination for
V1, rather than the boring undefined.

Thanks. Out of curiosity, can give a concrete example where x `seq` error "blah" would reduce to error "blah"? I've never quite understood the difference between seq and pseq, so such an example would help reinforce my understanding. (If the V1 example in this library is wrong, then likely every V1 instance I've ever written is wrong as well.)

I don't really remember the circumstances, and I'm honestly not sure they apply to this particular void and these particular GHC versions. But generally speaking, x `seq` y can get weird if GHC can see that y = _|_. You're guaranteed _|_, and GHC is allowed to "optimize" x away altogether.

I've folded a modified version of this into a separate commit in #2, so probably best not to merge this one as is.
You say you've never understood the difference between seq and pseq, and that's fair, because it's subtle. The difference is all about strictness analysis. GHC analyzes the expression x `seq` y as being strict in both x and y. Consider
bool' :: a -> a -> Bool -> a
bool' f t False = t `seq` f
bool' f t True = f `seq` t

GHC will produce a demand signature of Str=<S,1*U><S,1*U><S,1*U>, which (among other things I don't know about) says that it's strict in all three arguments. This gives it permission to force any of those arguments before the call if that'll be helpful. I'm having trouble producing a real example right at the moment, but they're quite real, and in particular can allow GHC to unbox things it couldn't otherwise. Suppose we specialize the above to Int:
boolInt' :: Int -> Int -> Bool -> Int
boolInt' f t False = t `seq` f
boolInt' f t True = f `seq` t

GHC doesn't perform worker-wrapper on boolInt' because it's so small it decides just to inline it everywhere. But it could perform such a transformation:
wboolInt' :: Int# -> Int# -> Bool -> Int#
wboolInt' f t b = case b of
  False -> f
  True -> t

boolInt' f t b =
  case f of {I# f# ->
  case t of {I# t# ->
    I# (wboolInt' f# t# b)}}

Note that in this process, it's decided to always force f, then t, then b, whereas the original code suggested forcing b first, then depending on its value forcing either f then t or t then f.
What does pseq do differently? pseq uses the GHC magical function lazy to shield its second argument from the strictness analyzer.  GHC sees that it's strict in the Bool, but it doesn't know that it's unconditionally strict in both arguments. In the False case, it considers it strict in t but not f, and in the True case considers it strict in f but not t. This prohibits any early forcing, which sounds nice, but also prevents unboxing, which is not so great.

Thanks, that helps explain things somewhat. (Also, I'll avoid merging this in favor of #2, per your request.)
Returning the original example of the GLiftDatatype V1 instance, is the danger that GHC will optimize (⊥ :: V1) `seq` undefined to undefined rather than ⊥ :: V1 due to seq being strict in both of its arguments? If so, does using (⊥ :: V1) `pseq` undefined instead guarantee that undefined will never be reachable?

Yes, exactly. Whether the risk actually can surface in this exact place I can't say, but it does in similar circumstances. Another option in this case that I think is rather less clear is
!_ -> pure [| () |]

where the expression is totally arbitrary.


Feature: Have pretty documentation

Motivation:
Right now, to read the docs I either have to use glow or GH web ui, neither of which is especially scalable when it comes to reading many pages of documentation.
Description:
I'd love to be able to view the docs in my web browser, hosted either locally or remotely.
Note that this issue primarily requests the ability to run+view a docs webpage locally.
I believe having this would increase visibility of Claudie's components in the documentation and could make it easier for new users to understand how they interact with each other.
a couple of examples of docs webpages:

https://github.com/acorn-io/acorn/tree/main/docs (Docusaurus - React based - can be run locally, check out the instructions)
https://github.com/kubernetes/website
https://docs.dotya.ml (hosted, hugo based, can be run locally with hugo server ...)

Exit criteria:

[ ] locally available docs webpage viewing

We plan to come back to this once we'll be preparing the docs generator for claudie.io or once the UX of /docs drops significantly.

We plan to get back to this a bit later.

We've agreed that someone should try to find a solution for this.
The solution should:

the current docs folder should remain the single source of truth, there should be no duplicate documentation
everything should be automated, there should be no manual steps in order to update the documentation webpage


Document how to use plugin with regular Visual Studio

I believe Visual Studio supports TypeScript server plugins as well, but after installing the plugin and configuring my tsconfig.json, I did not see the plugin being activated
// cc @RyanCavanaugh

There's nothing special here AFAIK - the Angular2 plugin loads successfully in VS, for example. If you have a zip with your project I can try it out

Here's a zip of the project. I tried both using an NTVS template and using open folder in VS but didn't see the plugin being activated
NodejsConsoleApp1.zip

The server log indicates that your module doesn't load:
Info 10   [12:40:38.43] Failed to load module 'typescript-styled-plugin': SyntaxError: Unexpected token {
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:404:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (c:\users\ryanca\desktop\nodejsconsoleapp1\nodejsconsoleapp1\node_modules\typescript-styled-plugin\lib\index.js:8:50)
    at Module._compile (module.js:397:26)

The problem is this parameter destructuring in template-string-language-service-proxy.js:
    build(languageService) {
        const ret = languageService;
        this._wrappers.forEach(({ name, wrapper }) => {  <--------
            ret[name] = wrapper(languageService[name]);
        });
        return ret;
    }

The version of node bundled with VS is only 5.4.1 and doesn't support this syntax (there may be other problems like this present, but this is the first one I found). I'd recommend building your plugin with --target ES5.

Thanks for looking into this. I'll see about using an es5 target instead. How did you manage to collect the tsserver logs from VS? Just setting TSS_LOG in windows?

Added documentation. Requires 0.1.2+ of this plugin. I still don't see error reporting in the strings but will file a separate issue about that