Unable to update from 1.1.1 to 1.1.3

Hello, when I try and update from 1.1.1 to 1.1.3 in terminal I'm getting the following errors:
Performing update with Composer ... error: An error occurred

Output:

<warning>Package "craftcms/vue-asset" listed for update is not installed. Ignoring.</warning>
<warning>Package "danielstjules/stringy" listed for update is not installed. Ignoring.</warning>
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - nesbot/carbon 2.19.0 requires php ^7.1.8 || ^8.0 -> your PHP version (7.4.2) overridden by "config.platform.php" version (7.0) does not satisfy that requirement.
    - nesbot/carbon 2.19.1 requires php ^7.1.8 || ^8.0 -> your PHP version (7.4.2) overridden by "config.platform.php" version (7.0) does not satisfy that requirement.
    - nesbot/carbon 2.19.2 requires php ^7.1.8 || ^8.0 -> your PHP version (7.4.2) overridden by "config.platform.php" version (7.0) does not satisfy that requirement.
    - nesbot/carbon 2.20.0 requires php ^7.1.8 || ^8.0 -> your PHP version (7.4.2) overridden by "config.platform.php" version (7.0) does not satisfy that requirement.
    - nesbot/carbon 2.21.0 requires php ^7.1.8 || ^8.0 -> your PHP version (7.4.2) overridden by "config.platform.php" version (7.0) does not satisfy that requirement.
    - nesbot/carbon 2.21.2 requires php ^7.1.8 || ^8.0 -> your PHP version (7.4.2) overridden by "config.platform.php" version (7.0) does not satisfy that requirement.
    - nesbot/carbon 2.21.1 requires php ^7.1.8 || ^8.0 -> your PHP version (7.4.2) overridden by "config.platform.php" version (7.0) does not satisfy that requirement.
    - nesbot/carbon 2.21.3 requires php ^7.1.8 || ^8.0 -> your PHP version (7.4.2) overridden by "config.platform.php" version (7.0) does not satisfy that requirement.
    - nesbot/carbon 2.22.0 requires php ^7.1.8 || ^8.0 -> your PHP version (7.4.2) overridden by "config.platform.php" version (7.0) does not satisfy that requirement.
    - nesbot/carbon 2.22.1 requires php ^7.1.8 || ^8.0 -> your PHP version (7.4.2) overridden by "config.platform.php" version (7.0) does not satisfy that requirement.
    - nesbot/carbon 2.22.3 requires php ^7.1.8 || ^8.0 -> your PHP version (7.4.2) overridden by "config.platform.php" version (7.0) does not satisfy that requirement.
    - nesbot/carbon 2.22.2 requires php ^7.1.8 || ^8.0 -> your PHP version (7.4.2) overridden by "config.platform.php" version (7.0) does not satisfy that requirement.
    - nesbot/carbon 2.23.0 requires php ^7.1.8 || ^8.0 -> your PHP version (7.4.2) overridden by "config.platform.php" version (7.0) does not satisfy that requirement.
    - nesbot/carbon 2.23.1 requires php ^7.1.8 || ^8.0 -> your PHP version (7.4.2) overridden by "config.platform.php" version (7.0) does not satisfy that requirement.
    - nesbot/carbon 2.24.0 requires php ^7.1.8 || ^8.0 -> your PHP version (7.4.2) overridden by "config.platform.php" version (7.0) does not satisfy that requirement.
    - nesbot/carbon 2.25.0 requires php ^7.1.8 || ^8.0 -> your PHP version (7.4.2) overridden by "config.platform.php" version (7.0) does not satisfy that requirement.
    - nesbot/carbon 2.25.1 requires php ^7.1.8 || ^8.0 -> your PHP version (7.4.2) overridden by "config.platform.php" version (7.0) does not satisfy that requirement.
    - nesbot/carbon 2.25.2 requires php ^7.1.8 || ^8.0 -> your PHP version (7.4.2) overridden by "config.platform.php" version (7.0) does not satisfy that requirement.
    - nesbot/carbon 2.25.3 requires php ^7.1.8 || ^8.0 -> your PHP version (7.4.2) overridden by "config.platform.php" version (7.0) does not satisfy that requirement.
    - nesbot/carbon 2.26.0 requires php ^7.1.8 || ^8.0 -> your PHP version (7.4.2) overridden by "config.platform.php" version (7.0) does not satisfy that requirement.
    - nesbot/carbon 2.27.0 requires php ^7.1.8 || ^8.0 -> your PHP version (7.4.2) overridden by "config.platform.php" version (7.0) does not satisfy that requirement.
    - nesbot/carbon 2.28.0 requires php ^7.1.8 || ^8.0 -> your PHP version (7.4.2) overridden by "config.platform.php" version (7.0) does not satisfy that requirement.
    - nesbot/carbon 2.29.1 requires php ^7.1.8 || ^8.0 -> your PHP version (7.4.2) overridden by "config.platform.php" version (7.0) does not satisfy that requirement.
    - nesbot/carbon 2.29.0 requires php ^7.1.8 || ^8.0 -> your PHP version (7.4.2) overridden by "config.platform.php" version (7.0) does not satisfy that requirement.
    - nesbot/carbon 2.30.0 requires php ^7.1.8 || ^8.0 -> your PHP version (7.4.2) overridden by "config.platform.php" version (7.0) does not satisfy that requirement.
    - nesbot/carbon 2.31.0 requires php ^7.1.8 || ^8.0 -> your PHP version (7.4.2) overridden by "config.platform.php" version (7.0) does not satisfy that requirement.
    - nesbot/carbon 2.32.0 requires php ^7.1.8 || ^8.0 -> your PHP version (7.4.2) overridden by "config.platform.php" version (7.0) does not satisfy that requirement.
    - nesbot/carbon 2.32.1 requires php ^7.1.8 || ^8.0 -> your PHP version (7.4.2) overridden by "config.platform.php" version (7.0) does not satisfy that requirement.
    - nesbot/carbon 2.32.2 requires php ^7.1.8 || ^8.0 -> your PHP version (7.4.2) overridden by "config.platform.php" version (7.0) does not satisfy that requirement.
    - nesbot/carbon 2.33.0 requires php ^7.1.8 || ^8.0 -> your PHP version (7.4.2) overridden by "config.platform.php" version (7.0) does not satisfy that requirement.
    - nesbot/carbon 2.34.0 requires php ^7.1.8 || ^8.0 -> your PHP version (7.4.2) overridden by "config.platform.php" version (7.0) does not satisfy that requirement.
    - nesbot/carbon 2.34.2 requires php ^7.1.8 || ^8.0 -> your PHP version (7.4.2) overridden by "config.platform.php" version (7.0) does not satisfy that requirement.
    - nesbot/carbon 2.34.1 requires php ^7.1.8 || ^8.0 -> your PHP version (7.4.2) overridden by "config.platform.php" version (7.0) does not satisfy that requirement.
    - nesbot/carbon 2.35.0 requires php ^7.1.8 || ^8.0 -> your PHP version (7.4.2) overridden by "config.platform.php" version (7.0) does not satisfy that requirement.
    - percipioglobal/craft-notifications 1.1.3 requires nesbot/carbon ^2.19 -> satisfiable by nesbot/carbon[2.35.0, 2.34.1, 2.34.2, 2.34.0, 2.33.0, 2.32.2, 2.32.1, 2.32.0, 2.31.0, 2.30.0, 2.29.0, 2.29.1, 2.28.0, 2.27.0, 2.26.0, 2.25.3, 2.25.2, 2.25.1, 2.25.0, 2.24.0, 2.23.1, 2.23.0, 2.22.2, 2.22.3, 2.22.1, 2.22.0, 2.21.3, 2.21.1, 2.21.2, 2.21.0, 2.20.0, 2.19.2, 2.19.1, 2.19.0].
    - Installation request for percipioglobal/craft-notifications 1.1.3 -> satisfiable by percipioglobal/craft-notifications[1.1.3].

<warning>Running update with --no-dev does not mean require-dev is ignored, it just means the packages will not be installed. If dev requirements are blocking the update you have to resolve those problems.</warning>

@bradhardinge this to me looks much more a composer / dependency issue than an actual issue with the plugin. As I can see you are running PHP 7.4.2 on your system, and as said this requires PHP 7.1.8 or higher ( for the nesbot/carbon ). Your config has an override that says it should use PHP 7.0.
Please post your full composer.json or get rid of those limitations, as you have CRAFT CMS dependency issues itself as well.

@michtio I think I see the issue in composer.json that is likely causing this. Checking with my module developer if this was added for a reason. Thanks for your help.


Custom-built vendored libvips complains about missing dependencies

I'm trying to compile my own libvips so that I can add support for other image formats.
This topic has been discussed in a few /lovell/sharp issues, which I've read, but I haven't been able to get things working.
What I've tried so far is cloning this repo, then adding (to lin.sh):
mkdir ${DEPS}/heif
curl -Ls https://github.com/strukturag/libheif/releases/download/v${VERSION_HEIF}/libheif-${VERSION_HEIF}.tar.gz | tar xzC ${DEPS}/heif --strip-components=1
cd ${DEPS}/heif
./autogen.sh
./configure --host=${CHOST} --prefix=${TARGET} --enable-static --disable-shared --disable-dependency-tracking
make install-strip

And then removing the --without-heif build flag from vips.
I then run ./build.sh 8.10.0 linux-x64
The build works (using Docker on a mac host), and it produces a tarball.. In a separate ubuntu docker image, I install sharp and then manually replace the contents of node_modules/sharp/vendor with what's in the tarball above.
I also had to change the libvips version in package.json
  "config": {
    "libvips": "8.10.0",
    "runtime": "napi",
    "target": 3
  }

I wrote a simple test script:
import * as sharp from 'sharp'

(async () => {

  await sharp(`./sample.heic`).toFormat('jpg').toFile('./sample.jpg')

})()

And when I run it, it complains that it can't find libffi. I then manually compiled and installed libffi, and then it complains that it can't find libjpeg:
/workspace/node_modules/sharp/lib/constructor.js:34
  throw new Error(error);
        ^
Error:
Something went wrong installing the "sharp" module

libjpeg.so.8: cannot open shared object file: No such file or directory

- Remove the "node_modules/sharp" directory then run
  "npm install --ignore-scripts=false --verbose" and look for errors
- Consult the installation documentation at https://sharp.pixelplumbing.com/install
- Search for this error at https://github.com/lovell/sharp/issues

I could probably go on and install all libs manually, but this is probably a red flag. Isn't the custom vendor build I'm adding supposed to provide all of these?
The end goal is to be able to run this inside of google cloud functions,  which will require some more work, but with this basic test failing I wanted to reach out for some feedback.
Thanks for putting this lib together 👍

I install sharp and then manually replace the contents of node_modules/sharp/vendor with what's in the tarball above.

sharp must be recompiled after updating any shared libraries upon which it depends. Run the ldd node_modules/sharp/build/Release/sharp.node command to see which shared libraries it expects vs which shared libraries it can find.
If you need to support HEIC input, you'll also need to add dependencies of libheif that allow you to do that e.g. libde265. Also note that libheif might depend on libjpeg, so the order in which these libraries are built and linked is important.

Thank you! That helps a lot.
So if I provide sharp_libvips_binary_host pointing to my custom sharp-libvips build, and then install with npm install --build-from-source, it should work?
In a cloud function, having to compile at install time might slow down cold boots a lot. I should be able to solve that by also setting a custom sharp_binary_host, right?
I've added the dependencies of libheif to lin.sh as well.
I'll test this and report back. 👍

I tried the above, and I got sharp-libvips to build, then I put it in the vendor/8.10.0 of a sharp checkout. I ran npm install --build-from-source there and it worked.
I then ran npm pack, and dropped the contents of the tarball it produced into node_modules/sharp/ within my test project.
When I try to run it, though, I get:
$ /workspace/node_modules/.bin/ts-node index.ts
(node:39173) UnhandledPromiseRejectionWarning: Error: A boolean was expected
    at Promise (/workspace/node_modules/sharp/lib/output.js:856:15)
    at new Promise (<anonymous>)
    at Sharp._pipeline (/workspace/node_modules/sharp/lib/output.js:855:14)
    at Sharp.toFile (/workspace/node_modules/sharp/lib/output.js:66:19)
    at /workspace/index.ts:16:6
    at step (/workspace/index.ts:33:23)
    at Object.next (/workspace/index.ts:14:53)
    at /workspace/index.ts:8:71
    at new Promise (<anonymous>)
    at __awaiter (/workspace/index.ts:4:12)
(node:39173) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:39173) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.```

Any idea where I may be going wrong here?

I've switched to using vips from the master branch to test.
First, the artifacts of my build look like this: https://gist.github.com/thatjuan/8a55a09f7399a8cef0d01df5c9c345e2
I'm then running this, expecting the build to detect a system provided libvips, but I don't think it is
LD_LIBRARY_PATH=/var/task/vendor/include:/var/task/vendor/lib:/var/task/vendor/share PKG_CONFIG_PATH=/var/task/vendor/lib/pkgconfig npm install --build-from-source https://github.com/lovell/sharp.git
The output matches what I was seeing before:
> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)

info sharp Using cached /root/.npm/_libvips/libvips-8.10.0-linux-x64.tar.br
make: Entering directory '/var/task/node_modules/sharp/build'
  CC(target) Release/obj.target/nothing/../node-addon-api/nothing.o
  AR(target) Release/obj.target/../node-addon-api/nothing.a
  COPY Release/nothing.a
  TOUCH Release/obj.target/libvips-cpp.stamp
  CXX(target) Release/obj.target/sharp/src/common.o
  CXX(target) Release/obj.target/sharp/src/metadata.o
  CXX(target) Release/obj.target/sharp/src/stats.o
  CXX(target) Release/obj.target/sharp/src/operations.o
  CXX(target) Release/obj.target/sharp/src/pipeline.o
  CXX(target) Release/obj.target/sharp/src/utilities.o
  CXX(target) Release/obj.target/sharp/src/sharp.o
  SOLINK_MODULE(target) Release/obj.target/sharp.node
  COPY Release/sharp.node
make: Leaving directory '/var/task/node_modules/sharp/build'
npm WARN saveError ENOENT: no such file or directory, open '/var/task/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/var/task/package.json'
npm WARN task No description
npm WARN task No repository field.
npm WARN task No README data
npm WARN task No license field.

+<EMAIL_ADDRESS>added 72 packages from 164 contributors and audited 72 packages in 25.321s

6 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities```

Shouldn't overriding `LD_LIBRARY_PATH` and `PKG_CONFIG_PATH` cause the build process to use a system provided lib?

Thanks again for your help so far. I hope I can contribute back to the project(s) soon 👍

If you're replacing the vendored binaries then LD_LIBRARY_PATH is not required. Are you setting sharp_libvips_binary_host as documented at https://sharp.pixelplumbing.com/install#custom-prebuilt-binaries ?

@thatjuan Were you able to make progress with this?


Changing README.rst

Closes #172

@ansys-reviewer-bot help

Hmmm it's weird that the "error" message shows up always at the end
I'll have to look into that

Hmmm it's weird that the "error" message shows up always at the end I'll have to look into that

Isn't it coming from the help call?

@ansys-reviewer-bot help

Ah yes, you called it here! My bad


[Eval] Add a more lightweight / easier-to-use SWE-Bench output visualizer

End-user friendly description of the problem this fixes or functionality that this introduces

[ ] Include this change in the Release Notes. If checked, you must provide an end-user friendly description for your change below

Give a summary of what the PR does, explaining any non-trivial design decisions
This PR adds a simple script that converts an output.jsonl into a folder of markdown files for visualization by re-using event_from_dict as well as __str__ of each action/observations.

Link of any specific issues this addresses

@xingyaoww Please take a look, I added legacy history support for history saved as pairs. Sept-24 files are still in that format.

Thanks a lot @enyst! LGTM!


Revise accumulation method and optimize speed

This WIP PR makes several significant changes, with a focus on performance optimization.

Uses pandas groupby to vastly improve (>10x) the calculation of the minimum flash area grids
Replaces all accumulation of repeated values at the same target grid cell with groupby
Final accumulation of non-centroid variables on the grids (previously, in lmatools, with histogram2d) uses direct indexing using information already calculated in earlier steps (now, new pipeline coroutines included in glmtools). Each call to histogram2d required creation of a fully dense array, which is expensive for large scenes.
Removes lots of unnecessary re-projection of the data from (x,y) to (lon,lat) and back to (x,y)
For fixed grid data, removed an unused calculation of the 2D lon, lat arrays before writing to disk. For a full disk 2 km scene, this was a 15 s penalty!
Removed calculation of the event density grid, since it is identical to the group extent density grid

After these changes, the speed for the full-disk, fixed grid 2 km scene on 1 min of data with ~100k events (OR_GLM-L2-LCFA_G16_s20191260203*.nc, which includes CONUS lightning as well as a large MCS in Argentina) dropped from 104 s to 72 s.
Note that using this branch also requires a new commit to the minvaluegrids branch of lmatools.

Between 5-15% of the total time in glmtools.grid.make_grids.GLMlutGridder.process_flashes is spent on glmtools.grid.split_events.gen_sq_mean, which is used to calculate the centroid of each sub-event polygon shard. It is worse for large scenes.
Writing the files also still takes 7% of the total run time for the full disk scene.

For the full disk test case at 2 km, the time to the first log message below (from glmtools.make_grids.proc_each_grid) is 27 s, to the second message 43 s, and final completion is at 72 s. So a good 30 s is spent writing data overall. This is odd.
    log.info("Done processing all files, preparing to write")
    preprocess_out = out_kwargs_ij.pop('preprocess_out', None)
    if preprocess_out:
        output = gridder.write_grids(**out_kwargs_ij)
        log.info("Done with output preprocessing, doing final write")
        outfilenames = preprocess_out.write_all()

As of today, all of these commits are on the ugf-newgrid branch, with the newgrid branch having gone stale as far as I know.


Wider pango markup support

I see we can use pango markup with clock and custom modules but that looks like thats it? I'm trying to use it with a label or script module tooltip with no luck
Loving the bar, adapting all my waybar stuff!

The label, script and upower modules also support markup in their formatting, but you're right that tooltips do not currently support this.
I'm happy to enable markup in more places, as I'm not aware of any drawbacks of doing so. There's probably few, if any, places where it makes sense to have it off, so it probably makes sense to do a big sweep at some point.


Fixed typo in deprecation comment of index mode

Please consider the following before submitting a pull request:
Guidelines for contributing: https://github.com/chartjs/Chart.js/blob/master/CONTRIBUTING.md
Example of changes on an interactive website such as the following:

http://jsbin.com/
http://jsfiddle.net/
http://codepen.io/pen/
Premade template: http://codepen.io/pen?template=JXVYzq

This was just a misunderstanding of the comment syntax, please ignore.


anyone using rewire with webpack 5?

I just want to start my new project with webpack 5 and rewire.
I have checked the issue for CR4, and they said it's work perfectly.
I want to make sure it's work fine with webpack 5.

react-app-rewired current no active. I recommand to use craco.  https://github.com/gsoft-inc/craco/issues/313

@TimRChen CRACO has the same issue. It does not work with CRA@5

I believe the original issue was that the version number for react-scripts at the time had the -next. 37 ending, and hence the version number wasn't being parsed from the version string. Now that react-scripts 5 has actually been released this should not continue to be an issue/react-app-rewired should work.
Please let me know if this fails when the version number does not have a -xxx suffix.

Closing this - can re-open if it does turn out to be a bug with this repo.


[Wikipedia] Searching on Wikipedia no longer works

Extension
https://www.raycast.com/vimtor/wikipedia
Description
The Wikipedia extension no longer works.
Error:
Error: Missing required property "title" for List.Item

Steps To Reproduce
Search something on Wikipedia using the Wikipedia extension
Current Behaviour
Error on screen
Expected Behaviour
No response

Hi @Mauricevb!
It appears to be working fine for me. I haven't received any complaints from other users. Can you please double-check it?
https://github.com/raycast/extensions/assets/36263538/235c732e-c8ee-46e3-bbf3-17d66bb44987

Works fine

I'm sorry! There must have been a network or an API issue when I tried it 4 days ago. I will close the issue.


test_append.test_append_mix_shuffle error

I am trying to package bloscpack for openSUSE and I am getting the following error:
======================================================================
FAIL: test_append.test_append_mix_shuffle
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/abuild/rpmbuild/BUILD/bloscpack-0.13.0/test/test_append.py", line 366, in test_append_mix_shuffle
    nt.assert_equal(blosc_header_last['flags'], 0)
AssertionError: 2 != 0

----------------------------------------------------------------------

This is with:

python 2.7
blosc 1.13.5
gcc8 8.1.1

Any idea what might be going wrong?

I am seeing this now with the recently released blosc 1.6.1. Some more testing confirmed, that the issue is indeed a pure-mem-copy issue.

Yes, it looks like a pure memory-copy to me.  If the question is why sometimes the pure memory-copy bit activates and others it doesn't, my guess is that codecs undergo changes with the different C-Blosc releases; these changes typically affect compression ratio (albeit slightly in general), so it may happen that sometimes the compression ratio is not enough and Blosc fallback to the pure memory-copy instead.

O.K. I have been debugging this issue further and it turns out, that this phenomenon appears only, because the byte_shuffe filter is deactivated. If I reactivate the byte shuffle, the data is no longer a pure-memory-copy.

So, I have managed to reproduce a standalone snippet of this behaviour, using python-blosc 1.6.1:
In [17]: import blosc

In [18]: import numpy as np

In [19]: from bloscpack.headers import decode_blosc_header, decode_blosc_flags

In [20]: a = np.linspace(0, 1, 1e6)
/home/esc/git/bloscpack/.venv3/bin/ipython:1: DeprecationWarning: object of type <class 'float'> cannot be safely interpreted as an integer.
  #!/home/esc/git/bloscpack/.venv3/bin/python3

In [21]: b = a.tobytes()

In [22]: c = blosc.compress(b, shuffle=False)

In [23]: decode_blosc_header(c[:16])
Out[23]:
OrderedDict([('version', 2),
             ('versionlz', 1),
             ('flags', 2),
             ('typesize', 8),
             ('nbytes', 8000000),
             ('blocksize', 524288),
             ('ctbytes', 8000016)])

In [24]: c = blosc.compress(b, shuffle=True)

In [25]: decode_blosc_header(c[:16])
Out[25]:
OrderedDict([('version', 2),
             ('versionlz', 1),
             ('flags', 1),
             ('typesize', 8),
             ('nbytes', 8000000),
             ('blocksize', 524288),
             ('ctbytes', 969806)])

So, maybe linspace isn't the best input for this test.

For the record, here is the same example, but with python-blosc 1.5.1:
In [1]: import blosc

In [2]: import numpy as np

In [3]: from bloscpack.headers import decode_blosc_header, decode_blosc_flags

In [4]: a = np.linspace(0, 1, 1e6)
/home/esc/git/bloscpack/.venv3/bin/ipython:1: DeprecationWarning: object of type <class 'float'> cannot be safely interpreted as an integer.
  #!/home/esc/git/bloscpack/.venv3/bin/python3

In [5]: b = a.tobytes()

In [6]: c = blosc.compress(b, shuffle=False)

In [7]: decode_blosc_header(c[:16])
Out[7]:
OrderedDict([('version', 2),
             ('versionlz', 1),
             ('flags', 0),
             ('typesize', 8),
             ('nbytes', 8000000),
             ('blocksize', 524288),
             ('ctbytes', 7988999)])

In [8]: c = blosc.compress(b, shuffle=True)

In [9]: decode_blosc_header(c[:16])
Out[9]:
OrderedDict([('version', 2),
             ('versionlz', 1),
             ('flags', 1),
             ('typesize', 8),
             ('nbytes', 8000000),
             ('blocksize', 524288),
             ('ctbytes', 585276)])

So, as you can see, using shuffle just barely compresses the input, so my gut feeling is that the threshold for detecting has been lowered.
Probably it makes most sense to use different input data in this case.

There is a proposed fix here: #82
This will also solve the current build failures on master.

This is fixed in master with #82


🐞 [BUG] - Adjustment of the spiner location to be in center to enhance the user experience.

Description
Adjustment of the spiner location to be in center to enhance the user experience.  The spiner is not in the correct position i think it should be in center of the page horizontally on the mentor page i would like to do that.
@anmode Assign this to  me under gssoc 2024 ext and hacktoberfest i would like to work on this issue.
Current behaviour
It is in one side of the page which is not right.
Expected behaviour
It should be in center so that easily it can be seen and well aligned.
Reproduction steps
...

Screenshots

Logs
No response
Browsers
No response
OS
No response
Are you contributing for a program ?
Other
Code of Conduct

[X] I have read and agree to the Contributing Guidelines of this project.

Hi @tarunkumar2005
please proceed and fix this issue, thanks

@Sanchitbajaj02 is this issue solved? if not, I'm interested.

@sameer-soni See i have open PR so means it is solved


[Feat]: Pivotal Importer, Save Story History as a Comment

The Pivotal Tracker export can optionally include a separate file that provides the history of changes made to the original PT stories.
Even though Shortcut does not provide a means by which to change history in the past for a Story in the present, it could import the history provided in the PT export as a comment on the imported Shortcut stories.
Extend the recipe to include a table of the history pertinent to each imported Story as a comment on the Story, with clear indication that it's a dump of the history and not a real person's comment.
The field's found in the PT history export are as follows:

ID
Type
Message
Performed By
Occurred At

To clarify, the main CSV export contains no history, but during the export process the Pivotal Tracker user can ask to export history into a separate file.


Company Communicator app missing from App Services

The app is deployed and working, but missing from App Services.  I am attempting to access App Services so that I may update the SenderUpn field.  Any thoughts on why I would not be able to see this in App Services?

Hello @monovex,
First thing I would like to confirm if you had done deployment and installed bot in two different tenant then please make sure that you are looking in the right tenant, the one where you done the deployment you need to look in that. You may have already but you can also try to search in Azure portal using base resource name.
You can also check in resource group which you have selected during deployment. Here are the steps for where to check.

Go to Resource groups -> Open your resource group. or directly search it by name.
Look for Deployments in the right menu -> Click on it.

Search for your deployment, select it and expand the Deployment details.

You should find your app service there too.

Please reopen and let us know if you still facing this.


lib: gui: lvgl: add support for v7.0.2

Add support for LVGL v7.0.2
Summary:

Added support for new flags on v7
Splitted Kconfig in separate files to help browsing all settings
Adjusted some Kconfig defaults to match v7 configuration template defaults

Signed-off-by: Gerard Marull-Paretas<EMAIL_ADDRESS>

@vanwinkeljan I have just tested the demo using native_posix64 (I don't have demo board yet), if you have some real devices testing would be appreciated :-)

@vanwinkeljan I have just tested the demo using native_posix64 (I don't have demo board yet), if you have some real devices testing would be appreciated :-)

I will have a look at it in the coming days

@jfischer-phytec-iot I have splitted changes into a sequence of commits, thanks for the suggestion.

@MaureenHelm Seems like log_strdup was missing on the LVGL logging backend. Current master should also crash if this is the problem. Can you test with latest commit?

@MaureenHelm Seems like log_strdup was missing on the LVGL logging backend. Current master should also crash if this is the problem. Can you test with latest commit?

Works correctly on current master (414c773c4802137185df2d9d3ef06a2ca324c6d3):
*** Booting Zephyr OS build zephyr-v2.3.0-826-g414c773c4802  ***
[00:00:00.007,000] <inf> lvgl: lv_init ready
[00:00:00.007,000] <inf> lvgl: Screen create ready
[00:00:00.007,000] <inf> lvgl: Screen create ready
[00:00:00.007,000] <inf> lvgl: Screen create ready
[00:00:00.007,000] <inf> lvgl: container created
[00:00:00.007,000] <inf> lvgl: button created
[00:00:00.007,000] <inf> lvgl: label created
[00:00:00.007,000] <inf> lvgl: label created
[00:00:00.103,000] <err> display_mcux_elcdif: Display blanking control not implemented

Fails on latest version of this PR (ef684f0893a7572e892aad4cb4d8d700536f9614):
*** Booting Zephyr OS build zephyr-v2.3.0-806-gef684f0893a7  ***
[00:00:00.008,000] <inf> lvgl: lv_init ready
[00:00:00.008,000] <inf> lvgl: Object create ready
[00:00:00.008,000] <inf> lvgl: Object create ready
[00:00:00.008,000] <inf> lvgl: Object create ready
[00:00:00.008,000] <inf> lvgl: <log_strdup alloc failed>
[00:00:00.008,000] <inf> lvgl: <log_strdup alloc failed>
[00:00:00.008,000] <inf> lvgl: <log_strdup alloc failed>
[00:00:00.008,000] <inf> lvgl: <log_strdup alloc failed>
[00:00:00.008,000] <inf> lvgl: <log_strdup alloc failed>
[00:00:00.008,000] <inf> lvgl: <log_strdup alloc failed>
[00:00:00.008,000] <inf> lvgl: <log_strdup alloc failed>
[00:00:00.027,000] <err> os: ***** USAGE FAULT *****
[00:00:00.027,000] <err> os:   Illegal use of the EPSR
[00:00:00.027,000] <err> os: r0/a1:  0x00000001  r1/a2:  0x0000000a  r2/a3:  0x00000000
[00:00:00.027,000] <err> os: r3/a4:  0x80000478 r12/ip:  0x00000000 r14/lr:  0x600110fb
[00:00:00.027,000] <err> os:  xpsr:  0x60000000
[00:00:00.027,000] <err> os: Faulting instruction address (r15/pc): 0x00000010
[00:00:00.027,000] <err> os: >>> ZEPHYR FATAL ERROR 0: CPU exception on CPU 0
[00:00:00.027,000] <err> os: Current thread: 0x80000200 (unknown)
[00:00:00.050,000] <err> os: Halting system

@MaureenHelm It looks like starting from v7 log function is a kind of printf function, so uses a local variable to format the message (256 chars max). Judging from your logs it seems that the problem is fixed but longer messages fail to be allocated (LOG_STRDUP_MAX_STRING is 32 by default). However I wonder if the crash comes for this reason or something else... Can you try setting LOG_STRDUP_MAX_STRING to 256? In POSIX it does not happen because logs are direct.
Ref.
https://github.com/lvgl/lvgl/blob/v6.1.2/src/lv_misc/lv_log.c#L59
https://github.com/lvgl/lvgl/blob/v7.0.2/src/lv_misc/lv_log.c#L66

@MaureenHelm It looks like starting from v7 log function is a kind of printf function, so uses a local variable to format the message (256 chars max). Judging from your logs it seems that the problem is fixed but longer messages fail to be allocated (LOG_STRDUP_MAX_STRING is 32 by default). However I wonder if the crash comes for this reason or something else... Can you try setting LOG_STRDUP_MAX_STRING to 256? In POSIX it does not happen because logs are direct.
Ref.
<EMAIL_ADDRESS><EMAIL_ADDRESS>
I was able to resolve <inf> lvgl: <log_strdup alloc failed> by setting CONFIG_LOG_STRDUP_BUF_COUNT=16, but there was still a usage fault. It turns out this was caused by the main stack overflowing; increasing the main stack from 1024 to 2048 allows the sample to run correctly.

@MaureenHelm I've setup a dummy display to test on a board, can confirm the fault. Some observations: it does not happen on debug builds (-Og) but it happens on, e.g. -Os.

@MaureenHelm The problem seems to come from lv_color_fill(lv_color_t *buf...) function (called down in the stack to draw). The type lv_color_t depends on LV_COLOR_DEPTH, being uint32_t for 32-bit (default). That's why the error is Unaligned memory access. adding __aligned(4) to the static buffer fixes the problem.

@gmarull It seems the last push does not fix the fault, increasing the stack size to 2048 resolves the fault

@vanwinkeljan not in my case then. I can confirm that stack size of 2048 does not fix them problem. Maybe a combination of both is needed under some conditions?

I did the test on a nrf52840dk (with a adafruit_2_8_tft_touch_v2 shield) and on that platform only the stack size is causing an issue but the alignment fix makes sense and could cause issue on other platforms.
Could you update the sample and set the stack size to 2k and also increase the number of strdup buffers to 16?

@vanwinkeljan As I'm using the dummy driver (don't have the display yet) stack consumption may be less and so stack overflow is not raised.

I get similar fault traces as reported by @MaureenHelm with the default (1k) main stack size.
Fyi I just tested with a 2k stack size on a reel board (v1) and also there lvgl is working

@vanwinkeljan Updated sample to have main stack size of 2048 and strdup buffer count to 16.

@vanwinkeljan @MaureenHelm @jfischer-phytec-iot Can you guys confirm that current PR changeset works on supported demo boards? It has alignment fix, increased main stack size and increased strdup count.

@vanwinkeljan @MaureenHelm @jfischer-phytec-iot Can you guys confirm that current PR changeset works on supported demo boards? It has alignment fix, increased main stack size and increased strdup count.

Yes, eb8f00767992fb9e800718b95fc087fd880d4b63 works on mimxrt1050_evk

@vanwinkeljan @MaureenHelm @jfischer-phytec-iot Can you guys confirm that current PR changeset works on supported demo boards? It has alignment fix, increased main stack size and increased strdup count.

It works on reel_board and nrf52840dk + adafruit_2_8_tft_touch_v2

@MaureenHelm @vanwinkeljan @jfischer-phytec-iot  any suggestion/improvement on the current change set?

@jfischer-phytec-iot Is there any demo HW platform that hasn’t been verified?

@jfischer-phytec-iot Is there any demo HW platform that hasn’t been verified?

Look at the drivers we have in the tree, and testing will take little time.

@jfischer-phytec-iot testing should not be at display level, this PR is not interacting in a direct way with displays. So if 3 work according to performed tests, it should be sufficient.

@jfischer-phytec-iot testing should not be at display level, this PR is not interacting in a direct way with displays. So if 3 work according to performed tests, it should be sufficient.

I would test display controllers not a display, and I insist on the test for all controllers we have in the tree.

@jfischer-phytec-iot if some controllers show problems it will likely mean that the issue is out of the scope of this PR anyway. I think more testing is always welcome, but should not be a blocker if changes have been proved to work in a reasonable amount of real HW.

This PR seems to be blocked because 3 main reasons. I have summarized them here together with my opinions. I'd appreciate comments on them so that integration with LVGL7 can move forward, whatever is the outcome.

Hardware testing

I think we have proof that current changes work on hardware. I think more tests are welcome, but should not be a blocker because this PR does not change any display related code.
Confirmed HW tests:

reel_board (@vanwinkeljan)
nrf52840dk + adafruit_2_8_tft_touch_v2 (@vanwinkeljan)
mimxrt1050_evk (@MaureenHelm)

Defaults

Some default constants have been adjusted to match with LVGL7. The reason for this change is to align with upstream, which is likely the part that has more expertise on the library. Note that no extra features have been enabled, excepting CONF_LVGL_ANTIALIAS which is now enabled by default (makes Material theme, the default now, look better). Samples relying on defaults have been fixed by making options explicit.

Name changes

Some Kconfig names have been adjusted so that they follow LVGL naming, e.g. BUTTON -> BTN. The reason is to make Zephyr more transparent for LVGL users. Note that LVGL7 renames multiple objects w.r.t LVGL6, too (e.g. KB is now KEYBOARD).
Overall, as LVGL7 is a major release that has multiple API changes, I think it's a good opportunity to do these sort of changes. Complex LVGL6 applications will likely need some sort of migration anyway.
cc: @vanwinkeljan @MaureenHelm @jfischer-phytec-iot

Hardware testing

@jfischer-phytec-iot are you planning to test on more HW else I dont see any reason the block this PR for HW testing reasons? We did verify on 3 different controllers and in the end it is just a library using a generic API.

Defaults

I would stick to the default upstream values where possible and as many features should be disabled as possible.
@gmarull I would not even enable CONF_LVGL_ANTIALIAS by default, but I have no problem that it is explicit enabled in the sample.

Name changes

I have no problem in renaming the configs to line-up with lvgl names as it is anyway a up step to a major version of the library.

@vanwinkeljan removed default antialias, makes sense. So now only changes are constant defaults.

@jfischer-phytec-iot I'd prefer some more welcoming reviews other than just complains. Comments such as okay, I have expertise too and say 320 works better. or But I find it strange when the author makes these but has no hardware to test it. And if one do not have any hardware, then it would be appropriate to relax and wait for the test. New default font looks very ugly are in my opinion the kind of comments that make contributing to open source unpleasant (and have no technical background at all which is what reviews are for). If you think there are real problems, the way to move forward is to help and propose alternatives, not just complain. According to @vanwinkeljan name changes and defaults are ok. If some defaults can be adjusted to improve flash usage, let's do it, but I hope in a more positive manner.
I'd suggest to read https://github.com/zephyrproject-rtos/zephyr/blob/master/CODE_OF_CONDUCT.md (Examples of behavior that contributes to creating a positive environment include: points)

I stick to it, this changes does not make sense, some option are renamed in 2e89321 again. I do not want to grep for CONFIG_LVGL_OBJ_CB if I see this in a prj.conf file, where CONFIG_LVGL_OBJ_CHECK_BOX is self explained.

@jfischer-phytec-iot  This is not true. 2e89321 aligns with LVGL7, previous commits align with LVGL6 (this is to make review easier).

@vanwinkeljan  @jfischer-phytec-iot  I've performed some flash analysis, and the overall conclusion is that V7 uses even with minimal settings more flash. It is true that some defaults may be changed if this is a concern (e.g. use empty theme with some custom style, use smallest font, disable logging...). Still I think that no one should expect to run complex examples such as the official demos (https://lvgl.io/demos) with the minimum footprint. If there's any setting combination that may reduce flash usage closer to V6 let me know, but I'm afraid that V7 minimal footprint is simply higher because of some of the major new features (https://github.com/lvgl/lvgl/releases/tag/v7.0.0).
V6 defaults (flash: 57276):
https://gist.github.com/gmarull/ec8c3fbcf5dbcc26801363a03e9566ff#file-rom_report_v6

V7 current defaults, theme material, font 16px (flash: 98388)
https://gist.github.com/gmarull/ec8c3fbcf5dbcc26801363a03e9566ff#file-rom_report_v7_material_montserrat16

V7 theme material, font unscii 8px (flash: 84084)
https://gist.github.com/gmarull/ec8c3fbcf5dbcc26801363a03e9566ff#file-rom_report_v7_material_unscii8

V7 theme empty, font unscii 8px (flash: 79764)
https://gist.github.com/gmarull/ec8c3fbcf5dbcc26801363a03e9566ff#file-rom_report_v7_empty_unscii8-txt

@vanwinkeljan @jfischer-phytec-iot I have requested to add this PR to the dev-review agenda, would be good to discuss the path forward there.

@vanwinkeljan, @jfischer-phytec-iot if you can attend the dev-review meeting on Jul 16th to discuss this that would be great.

Based on past LVGL release intervals it's likely that LVGL8 would not be until next summer, close to or after 2.6.

I just wanted to give a heads up about our new release policy after seeing this message. Things have changed somewhat with since the release of 7.0. We're trying to release minor versions of the library a lot more frequently so that we can introduce new features gradually instead of changing many different APIs all at once. Hopefully, the new policy will help to avoid this type of problem in the future. Depending on how things go, the next major release may be sooner/later than normal.
We've also started adding compatibility macros for cases where an API has been renamed but the behavior is nearly identical to help reduce maintainer workload. We did not include these for the object renames (cb -> checkbox, ta -> textarea) since most of these can be fixed with a simple find-and-replace anyways.

@embeddedt Thanks for the insight.  Assuming your release numbers follow semver as suggested by the 7.1.0 release note sections, this may affect what Zephyr adopts when.  It may be wise to update Zephyr to 7.1.0 soon (perhaps now), but as we get closer to LTS become a little more picky about whether we take on subsequent updates.
A set of sed scripts that perform the necessary rote transformations is exactly the sort of thing I'd like to see in the lvgl glue code documentation (or a reference to such scripts if they're present in LVGL).

Assuming your release numbers follow semver as suggested by the 7.1.0 release note sections, this may affect what Zephyr adopts when.

Yes; semver was our inspiration for the release policy. Very little or no code needs to be changed to upgrade from a certain release to the next minor version.

It may be wise to update Zephyr to 7.1.0 soon (perhaps now), but as we get closer to LTS become a little more picky about whether we take on subsequent updates.

Note that we are planning to release 7.2.0 on July 21st (minor releases happen every 2 weeks). I don't know how quickly you'd like to get this PR merged.

A set of sed scripts that perform the necessary rote transformations is exactly the sort of thing I'd like to see in the lvgl glue code documentation.

I agree that having a script that would rename the necessary APIs within a project would be helpful. Unfortunately, we don't have any at the moment. Thus far we've relied mainly on find-and-replace and the fact that API renames don't happen all that often. I'll make a post on the LVGL forum and see what others' thoughts are.

Note that we are planning to release 7.2.0 on July 21st (minor releases happen every 2 weeks). I don't know how quickly you'd like to get this PR merged.

Also very good to know; I'd assumed every two or four months.  In that case I'm less interested in pushing for an update to 7.1.0 now.
@embeddedt Will patch releases for bugs present in 7.0 continue now that 7.1 is out, or should we expect to have to update to the latest minor (or patch our fork) if we encounter problems in 7.0.2 that are fixed in later upstream releases?

We typically don't patch older releases once a newer one comes out, so you would have to update to the latest minor to get bugfixes.

@embeddedt Do you have any information or ideas why LVGL ROM consumption, for the same example, has more than doubled?

I'm pretty sure it's because the new version of LVGL has a lot more features in the core drawing system than previous versions. I had mentioned this in my reply to @gmarull here.
It should be possible to get a smaller code size with some more manual optimization. When 7.0 was being optimized prior to release, efforts were largely focused on reducing the RAM usage and less attention was paid to Flash consumption, since Flash is usually the less expensive memory type in an embedded system. I'll need to look at the ROM usage table provided by @gmarull in more detail to see what functions are using the most space and whether it's possible to disable certain features or not. It sounds like Zephyr is already being compiled at the highest optimization settings so the compiler probably can't do much more for us than it already is.
I agree with you that a Hello world example with a label and the Unscii font shouldn't be taking up 80 kilobytes of flash space. Hopefully we can address some of the size issues in the near future.

@embeddedt @jfischer-phytec-iot One of the most important increases comes from the lv_draw module, delta is ~13K w.r.t V6.

Dev-Review (Jul 16):

Split PR - one of (structure and reordering) changes in Kconfig, one for import v7 and renames to align to v7
Keep default font settings that Zephyr has today
Keep discussion alive with upstream lgvl w/regards to code size increase

I started to look into adding more configuration options in order to reduce code size. As noted above, the lv_draw series of the functions are using the most space. lv_draw_line, lv_draw_label, and lv_draw_rect together account for roughly 10K of code (compiled for Cortex-M), which just about matches @gmarull's delta.
Since this is the part of the library I'm the least familiar with, I've filed https://github.com/lvgl/lvgl/issues/1669 so @kisvegabor can take a look.

I'm looking into it.
For bugs or regressions in LVGL feel free to open an issue in its repo so that we know if there is a problem.


MM-60534 -fix rate my app broken styles

Summary
Fix "rate my app" broken styles 🤦
Ticket Link
https://mattermost.atlassian.net/browse/MM-60534
Checklist

[ ] Added or updated unit tests (required for all new features)
[ x] Has UI changes
[ ] Includes text changes and localization file updates
[ ] Have tested against the 5 core themes to ensure consistency between them.
[ ] Have run E2E tests by adding label E2E iOS tests for PR.

Device Information
This PR was tested on: android and ios emulator
Screenshots
Before:

After:
Android:

ios:

Release Note

NONE

Cherry pick is scheduled.


[3.0.0-beta2] ConditionGroup not adding grouping parentheses

It appears that GroupCondition is not providing grouping parentheses, as is expected from the documentation found here:
https://github.com/Raizlabs/DBFlow/blob/master/usage/Migration3Guide.md#replacement-of-the-conditionquerybuilder
The following code (which is not logic, just used to highlight the issue)
String testQuery = new Select()
                .from(PoiCategoriesFilterPreference.class)
                .where(PoiCategoriesFilterPreference_Table.siteKey.eq("somevalue"))
                .and(
                        ConditionGroup.clause()
                                .and(PoiCategoriesFilterPreference_Table.siteKey.eq("somevalue"))
                        .or(PoiCategoriesFilterPreference_Table.siteKey.eq("thisvalue"))
                ).getQuery();

results in the following query
SELECT *
FROM   `poicategoriesfilterpreference`
WHERE  `sitekey` = 'somevalue'
       AND `sitekey` = 'somevalue'
        OR `sitekey` = 'thisvalue'

the expected query is
SELECT *
FROM   `poicategoriesfilterpreference`
WHERE  `sitekey` = 'somevalue'
       AND ( `sitekey` = 'somevalue'
              OR `sitekey` = 'thisvalue' )

fixed in develop can be controlled on or off when included in other ConditonGroup or general condition statements via setUseParenthesis(). By default they will be added when the list of conditions are greater than 0.


Help install or enable php-curl extension

This is first time i try laradock. My project need php-curl extension but i don't know how to install or enable it.

I am sorry that I comment on the closed Issue. I have the same issue and I want to enable have you figured it out?
I also get this error when I run composer install inside my workspace container.
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - algolia/algoliasearch-client-php[3.0.0, ..., 3.3.2] require ext-curl * -> it is missing from your system. Install or enable PHP's curl extension.
    - algolia/scout-extended[v1.18.0, ..., v1.20.2] require algolia/algoliasearch-client-php ^3.0.0 -> satisfiable by algolia/algoliasearch-client-php[3.0.0, ..., 3.3.2].
    - Root composer.json requires algolia/scout-extended ^1.18 -> satisfiable by algolia/scout-extended[v1.18.0, ..., v1.20.2].

To enable extensions, verify that they are enabled in your .ini files:
    - /etc/php/8.2/cli/php.ini
    - /etc/php/8.2/cli/conf.d/10-opcache.ini
    - /etc/php/8.2/cli/conf.d/10-pdo.ini
    - /etc/php/8.2/cli/conf.d/20-ast.ini
    - /etc/php/8.2/cli/conf.d/20-calendar.ini
    - /etc/php/8.2/cli/conf.d/20-ctype.ini
    - /etc/php/8.2/cli/conf.d/20-exif.ini
    - /etc/php/8.2/cli/conf.d/20-ffi.ini
    - /etc/php/8.2/cli/conf.d/20-fileinfo.ini
    - /etc/php/8.2/cli/conf.d/20-ftp.ini
    - /etc/php/8.2/cli/conf.d/20-gettext.ini
    - /etc/php/8.2/cli/conf.d/20-iconv.ini
    - /etc/php/8.2/cli/conf.d/20-phar.ini
    - /etc/php/8.2/cli/conf.d/20-posix.ini
    - /etc/php/8.2/cli/conf.d/20-readline.ini
    - /etc/php/8.2/cli/conf.d/20-shmop.ini
    - /etc/php/8.2/cli/conf.d/20-sockets.ini
    - /etc/php/8.2/cli/conf.d/20-sysvmsg.ini
    - /etc/php/8.2/cli/conf.d/20-sysvsem.ini
    - /etc/php/8.2/cli/conf.d/20-sysvshm.ini
    - /etc/php/8.2/cli/conf.d/20-tokenizer.ini
You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode.
Alternatively, you can run Composer with `--ignore-platform-req=ext-curl` to temporarily ignore these required extensions.


.NET Password support

Can this also support receiving the password as a SecureString rather than a regular string?


Date fix

Hi @lrossouw I noticed the date was wrong when I monitored Rt. 09-08-2020 -> 09-07-2020. Issue resolved.

Oops thanks!


How to disable/stop the collecting of smart home data?

Hi there,
I use fritzcollectd allong with influxdb and I am also gathering the smart home data in addition over the http-API of AVM by a self-written python script on serverside. So, in the end I have the double amount of data in my database.
Is it possible to switch off the collection of smart home data without rewriting (eg with comments) the existing code? The data gathered over the TR-069 protocol should remain (such as totalbytessent etc.).
Thanks in advance and kind regards,
Agrigor

That's not supported at the moment, but it's for sure a valid feature request.

@Agrigor : collectd offers filter rules. I never tried them, but they should allow you to drop the smart home data before they reach any consumer.
A bit in analogy to telegraf plugins, which have often have limited configuration options, but with suitable tagpass and tagdrop plus fielddrop and tagexclude one can control quite well what's send out.

@Agrigor: see https://collectd.org/wiki/index.php/Chains .


Could Typehead work with ?

I want to use Typehead on a div not an input!

For the benefit of anyone who lands here, it's actually quite simple to get Typeahead working with contenteditable. You need to hack jQuery to respond to #val() method for your element since it's what Typeahead uses. It can be easily achieved using $.valHooks as described here:
http://daffl.github.io/2011/11/28/valhooks.html
Remember to set the type on the element itself node since just doing an attribute is likely not going to work.

var original = $.fn.val;
$.fn.val = function() {
    if ($(this).is('*[contenteditable=true]')) {
        return $.fn.html.apply(this, arguments);
    };
    return original.apply(this, arguments);
};

use to overwrite val function and it will work with the contenteditable div.
Cheers.
Joe

@jraack Thanks for sharing trick. It works except it doesn't preserve the older text in div.

Hey there, look at this:
ourContenteditableElement.addEventListener("input", function () {
	this.value = this.innerText;
});

That's it. Now jQuery's $(ourContenteditableElement).val() returns exactly what we expect.

@jraack does this have to be added in jquery library and anything else besides this? Total noob in this aspect.
Thanks for the help .

Nice hack @jraack


Use actions-python to manage CI/CD

Might be a bit of a change in paradigm so not sure if this is the direction you want to go towards, but might be helpful?
Basically using actions-python for CI/release.
CI:

mostly the same stack (mypy, black, isort)
shifting the need to run make by using pre-commit
implementing commitlint conventional as pre-commit hook

Release:

will get rid of the need to manually update the pyproject.toml version
should take care of the package release in the same way using semantic release as opposed to "manually" labeling versions

Happy to answer any question or hear any feedback you might have ✌

@armand-sauzay I'm closing this PR. It is tooooo big. And also as I can understand, many problems were resolved since then.
Is it possible to split it to several branches?
Thank you for your contribution!


add bzAnim package

Thank you for your contribution. Your types have been deployed! 🚀

thank you!
On Tue, 29 Nov 2022 at 06:49, Justin Walsh @.***> wrote:

Thank you for your contribution. Your types have been deployed! 🚀
—
Reply to this email directly, view it on GitHub
https://github.com/ts-defold/library/pull/19#issuecomment-1330112524,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAANJRPJQVT66BKGRT3UAC3WKWKOVANCNFSM6AAAAAASJHB7KE
.
You are receiving this because you authored the thread.Message ID:
@.***>

--
Best Regards,
Alexandr
skype: oivoodoo


Can't install lenses-ppx

getting error trying to install lenses-ppx
yarn add v1.17.3
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning "workspace-aggregator-bd3fdaf5-a8bf-4d96-ad72-cdb30e081df2 > frontend ><EMAIL_ADDRESS>has incorrect peer dependency<EMAIL_ADDRESS>warning "workspace-aggregator-bd3fdaf5-a8bf-4d96-ad72-cdb30e081df2 > frontend > bs-emotion ><EMAIL_ADDRESS>has incorrect peer dependency<EMAIL_ADDRESS>[4/4] 🔨  Building fresh packages...
[-/13] ⢀ waiting...
[10/13] ⢀ node-sass
[9/13] ⢀ bsb-native
[4/13] ⢀ puppeteer
error /Users/maxli/workspace/test/node_modules/lenses-ppx: Command failed.
Exit code: 1
Command: npm run build
Arguments:
Directory: /Users/maxli/workspace/test/node_modules/lenses-ppx
Output:
npm WARN lifecycle The node binary used for scripts is /var/folders/qq/zn5p3rxx2j57f2drm9dtd3x80000gn/T/yarn--1565877954285-0.8162615801622437/node but npm is using /Users/maxli/.nvm/versions/node/v8.12.0/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.

><EMAIL_ADDRESS>build /Users/maxli/workspace/test/node_modules/lenses-ppx
> esy build

info esy build 0.5.8 (using esy.json)
error: project is not installed, run `esy install`

esy: exiting due to errors above
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR<EMAIL_ADDRESS>build: `esy build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

hey there, sorry about that. Can you try<EMAIL_ADDRESS>Currently we are migrating lenses-ppx to a faster builder version (esy)

Actually 2.0.0


[FEATURE] Allow users to select the camera in verify.cowin.gov.in

Is your feature request related to a problem? Please describe.
As a user, when I wanted to verify my certificate in an android phone which has multiple cameras, the default camera used is not able to scan the code. It was using wide angle lens
Describe the solution you'd like
Provide an option to the user to select the camera via a dropdown, so the user can change the cameras to pick one which is working for them
Describe alternatives you've considered
I used deviceId from the navigator.mediaDevices.enumerateDevices() which belonged to normal camera and I was able to validate the QR code successfully

@dileepbapat - I tried to make changes to the public_app folder. But when I run using npm start to validate the changes I am stuck with Loading... screen which is rendered from App.js  due to the below code
const {initialized, keycloak} = useKeycloak();

if (!initialized) {
  return
Loading...

}

Please let me know if I am making changes in the wrong folder


Revert "Modified Japanese translation for v4.31"

Reverts signalfx/observability-workshop#125

@symmr I have had to revert this PR as the encoding was invalid and I can't deploy
Start building sites …
hugo v0.106.0+extended darwin/amd64 BuildDate=unknown
Error: Error building site: "/Users/rwc/Documents/GitHub/observability-workshop/content/ja/rum/_index.md:1:1": failed to unmarshal YAML: yaml: invalid leading UTF-8 octet
Built in 261 ms


Add option to disable when empty

Please add an option to disable the overlay when there are no icons displayed. It looks distracting and redundant. Please fix that.

Yes I am working on that

Implemented it in 2.1-alpha6


Non-Static Drivers - Printers with Installable Accessories

When a printer is set up, it gets assigned a named driver. Usually, there is one driver for each printer model or a class of drivers for each printer model.
For this driver the Printer Application fills in a driver data structure of type pappl_pr_driver_data_t with information about available resolutions, trays, paper sizes, ... when creating the printer and on every start of the Printer Application. For most, especially low-end printers this works, but for high-end printers we run into a problem: These printers often support optional accessories, like extra trays, duplexer, finishers, ... The combination of accessories actually installed would lead to different driver data on the same printer model and one cannot create a "model" for each combination of accessories, as 7 accessories would lead to 2^7 = 128 "models" for one actual printer model.
High-end printers are either PostScript printers or IPP printers:

IPP Printers: They work driverless and dependent on what accessories are installed the answer to the get-printer-attributes IPP request varies. I have got a second paper tray for my HP OfficeJet Pro 8730. Before I installed it, the "media-source-supported" attribute had only one item, "main", after installing it, I got "main", "alternate", and "auto". In "media-ready" I got additional entries for "alternate", ... These printer do not need a Printer Application and all works out-of-the-box for them.
PostScript Printers: The capabilities of PostScript printers are described by static PPD files, one per model. The PPD file describes the possible accessories and their presence with options, in the "Installable Options" group and it controls which choices for print job options are available via option conflicts/constraints. On most PostScript printers it is not possible to poll the printer to find out which accessories are installed. The user/admin is supposed to set the "Installable Options" in a printer setup tool and after that print dialogs only allow to use job option settings which are supported by the accessory configuration of the printer. Some PostScript printers allow polling for the presence of accessories, in this case the needed commands are listed in the PPD file.

The PostScript Printer Application is supposed to emulate an IPP printer behaving as in (1) as good as possible, having a PostScript printer and PPD file as of (2). Automatic setup or manual setup of the printer via "Add printer" only finds the make and model of the printer and assigns a PPD file to it. The driver setup ps_setup_driver() then parses the PPD file and fills in the driver data structure, including vendor-specific options. All this depends only on the static PPD file, not on the individual default setting configuration of the state file, so also not taking into account the accessory configuration when it is saved in one or more (invisible) vendor options as proposed in issue #91 and for creating the driver data correctly, the accessory configuration needs to be known. The driver data needs to reflect the exact configuration of the printer to produce a correct answer to a get-printer-attributes IPP request from a client.
This is because papplSystemLoadState() loads the state file line by line and when a printer header comes, it calls papplPrinterCreate() and only after that it loads the following lines with the default settings. What would be needed here is that when the end of the printer entry in the state file is reached a callback would be called. This could update the driver data depending on the default settings, for example removing trays which are no actually installed, from the media sources, removing the double-sided duplex settings if there is no duplexer, ... The callback could load the driver data with papplPrinterGetDriverData() and papplPrinterGetDriverAttributes() update it and write it back with papplPrinterSetDriverData().
So my feature request here is to have an appropriate callback function call added to the end of papplSystemLoadState().
For reference, the commit in the PostScript Printer Application with the "Installable Options" work done is here.

@tillkamppeter Do this initialization the first time your status callback is called - you are allowed to call the papplPrinterSetDriverData function to update the printer attributes, as needed.

I have now done a quick test when the status callback gets called. Unfortunately it gets only called if there is an IPP request from a client. I have stopped cups-browsed on all machines in my network now and restarted the PostScript Printer Application and done nothing else after starting it. The status callback does NOT get called. CUPS itself on the remote clients seems only to browse DNS-SD to know about remote printers to create a temporary queue on-demand for, but seems not to speak IPP as long as one does not at least open a print dialog on the client.
Could PAPPL be changed to run the status callback for each printer once after the printer is completely set up (for example in papplSystemLoadState() when it reads a </Printer> line)?

@tillkamppeter I think calling the status callback from papplSystemLoadState is doable.

[master 673a574] Call status_cb after load (Issue #107)

I got the "Installable Options" support for the PostScript Printer Application completely working now. With the call of the status callback after loading a printer's entry it works perfectly. Thank you very much.


Fix querystate key not found and add tests for function state

Motivation
When a user queries the state of function for a key that doesn't exist, a status code of 500 (INTERNAL SERVER ERROR) is returned.  This is incorrect.  Should return 404
Fix this issue as well as add some tests for function state

rerun cpp tests

rerun cpp tests

rerun cpp tests

rerun cpp tests


ZeroDivisionError: float division by zero

Hi,
I get this error while trying to parse an HTML containing the following piece of code.
I'm using the latest versions of all packages needed:

html5lib-0.90
pyPdf-1.13
reportlab-2.5
xhtml2pdf-0.0.3

and Python 2.7 (2.7 (r27:82525, Jul  4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)])
Python Code:
-[
import cStringIO as StringIO
from xhtml2pdf import pisa
....
html = '''

'''
dest = file('test.pdf', "wb")
pdf = pisa.CreatePDF(
StringIO.StringIO(html),
dest,
log_warn = 1,
log_err = 1
)
]-
Note: If I put something inside the TD (example: ".... ... some stuff..... 	........") or I change the value of the attr cellpadding, it works!!!
Traceback:
-[
Traceback (most recent call last):
File "C:\tmp\test.py", line 95, in
log_err = 1
File "C:\Python27\lib\site-packages\xhtml2pdf\document.py", line 131, in pisaDocument
doc.build(context.story)
File "C:\Python27\lib\site-packages\reportlab\platypus\doctemplate.py", line 880, in build
self.handle_flowable(flowables)
File "C:\Python27\lib\site-packages\reportlab\platypus\doctemplate.py", line 763, in handle_flowable
if frame.add(f, canv, trySplit=self.allowSplitting):
File "C:\Python27\lib\site-packages\reportlab\platypus\frames.py", line 174, in _add
flowable.drawOn(canv, self._x + self._leftExtraIndent, y, _sW=aW-w)
File "C:\Python27\lib\site-packages\reportlab\platypus\flowables.py", line 108, in drawOn
self._drawOn(canvas)
File "C:\Python27\lib\site-packages\reportlab\platypus\flowables.py", line 89, in _drawOn
self.draw()#this is the bit you overload
File "C:\Python27\lib\site-packages\reportlab\platypus\tables.py", line 1302, in draw
self._drawCell(cellval, cellstyle, (colpos, rowpos), (colwidth, rowheight))
File "C:\Python27\lib\site-packages\reportlab\platypus\tables.py", line 1393, in _drawCell
w, h = self._listCellGeom(cellval,colwidth,cellstyle,W=W, H=H,aH=rowheight)
File "C:\Python27\lib\site-packages\xhtml2pdf\xhtml2pdf_reportlab.py", line 710, in _listCellGeom
return Table._listCellGeom(self, V, w, s, W=W, H=H, aH=aH)
File "C:\Python27\lib\site-packages\reportlab\platypus\tables.py", line 377, in _listCellGeom
vw, vh = v.wrapOn(canv, aW, aH)
File "C:\Python27\lib\site-packages\reportlab\platypus\flowables.py", line 119, in wrapOn
w, h = self.wrap(aW,aH)
File "C:\Python27\lib\site-packages\xhtml2pdf\xhtml2pdf_reportlab.py", line 693, in wrap
return KeepInFrame.wrap(self, availWidth, availHeight)
File "C:\Python27\lib\site-packages\reportlab\platypus\flowables.py", line 970, in wrap
W, H = func(s1)
File "C:\Python27\lib\site-packages\reportlab\platypus\flowables.py", line 951, in func
W /= x
ZeroDivisionError: float division by zero
]-
Thanks for your great job,
Shen139

Had this same error and after quite a lot of reduction found the cause in the html.
With a lot of crazy stuff in the html (

Hi. I had this problem only when trying to render a table which contained a lot of rows. I confirm that the above solution worked for me. Thanks!

I can confirm that the above error happens (in the case of a large table, combined with a "padding: 4px" css).
Removing the line "works", i.e. makes it no longer crash (but costs us dearly in the layout).
A real solution would be even better.

It seems to me the division by zero is caused by the variable H being 0 at some point.
Similarly, the value of s1 will be 0 in that case as well, and trigger and error further down even if wrapping the above lines in if statements
s = _qsolve(maxHeight*(1-f),_hmodel(s0,s1,H0,H1))
will trigger
a21 = 1./s1**2 to fail further down

Not seeing this issue anymore


Design Issue - Implement New Shadow Effect for Services  and Testimonials Section Background

Description:
This design issue is raised to introduce a visually appealing and distinctive shadow effect in the background of the services and testimonials section, deviating from the conventional default theme of the website. The objective is to enhance the aesthetic appeal of the services section, providing a unique visual element that aligns with the overall theme and brand identity.
Tasks:

Collaborate with the design team to conceptualize and propose a new shadow effect for the background of the services section.
Ensure that the proposed shadow effect complements the content and maintains readability.
Provide design mockups or visual representations for team review and feedback.
Consider responsiveness and adaptability for different screen sizes.

Added a new gradient for both the section which makes it stand out and attractive


Maximum call stack size exceeded error with '--debugger'

Working on a project, I encountered a call stack error. I boiled my code down into the simple code snippet linked to below and experimented a bit with it. I get a 'maximum call stack size exceeded' error when running the snippet in elm-reactor and with 'elm-make --debug', but not with 'elm-make' and elm-lang.org/try. Another fellow in the Elm slack channel said he wasnt getting the error in 0.17.1.
Heres the code snippet Im referring to: https://gist.github.com/Chadtech/f2f5f1d714eea51a8a0b687b93110b15
EDIT: Im running all my code in Chrome, on my mac running Sierra 10.12.1

I think this is covered by https://github.com/elm-lang/virtual-dom/issues/98
Thanks for the report!


Fix #286

Awesome :D :D Great work

Thanks :)

I actually forgot to add myself to contributors.

No problem just make a new pull request ;)


test: main() + made vmrunner callbacks take trigger line as params

Blasted the commits due to binary (thanks @AndreasAakesson).


#661: Add flag to sea-orm-cli to generate code for time crate

PR Info

Closes #661

Adds

Adds a new flag date-time-crate to sea-orm-cli, which enables users to generate entities with either chrono or time crates

Fixes

N/A

Breaking Changes

N/A

Changes

Introduces EntityWriterContext that handles expanded_format, with_serde and date_time_crate per discussion here:

pub struct EntityWriterContext {
    pub(crate) expanded_format: bool,
    pub(crate) with_serde: WithSerde,
    pub(crate) date_time_crate: DateTimeCrate,
}

@ikrivosheev Sounds good. I'll make the cli adjustment to clap derive after #706 merged.

@nahuakang, hello, can you resolve conflicts?

Sure, I'll get this done this week 👍

We have upgraded clap to 3.2. We could rebase current PR onto latest master :)

https://github.com/SeaQL/sea-orm/pull/706

@billy1624 @ikrivosheev Just rebased :) I like the new declare style for commands!

@ikrivosheev @billy1624 Tests are failing due to the fact that sea-orm-codegen is required for the arg enum wrapper we implemented yesterday. The failure, I suspect, is due to the fact that sea-orm-codegen isn't included as a dependency for some of the features? Do you have a tip on how to proceed here?

@ikrivosheev @billy1624 Tests are failing due to the fact that sea-orm-codegen is required for the arg enum wrapper we implemented yesterday. The failure, I suspect, is due to the fact that sea-orm-codegen isn't included as a dependency for some of the features? Do you have a tip on how to proceed here?

Hey @nahuakang, we could implement the conversion inside commands module, where we have codegen feature enabled, i.e. we have sea-orm-codegen in scope. Feel free to cherry-pick the useful bits

https://github.com/nahuakang/sea-orm/compare/661_time_crate_flag...billy1624:sea-orm:pr/724


Finished ln part

close #40

@cyl19910101 the example that you gave is difficult for the beginners to understand. So please change your example.

@cyl19910101 I am closing this PR. In case the above changes are done then reopen.


Memory Issue: Subscribing to most framework element events causes a memory leak

Describe the bug
When a FrameworkElement descendant subscribes to its own event, WinUI internals creates a strong handle to the delegate and the event owner. As a result, the framework element cannot be collected.

Subscription sample:
public class FakeControl : Control {
    public FakeControl() {
        this.SizeChanged += FakeControl_SizeChanged;
    }

    private void FakeControl_SizeChanged(object sender, SizeChangedEventArgs e) {
        throw new NotImplementedException();
    }
}

WinDbg & SOS output:
0:023> !dumpheap -type FakeControl
 Address       MT     Size
055e130c 15c7b958       64

Statistics:
      MT    Count    TotalSize Class Name
15c7b958        1           64 App5.FakeControl
Total 1 objects
0:023> !gcroot 055e130c
HandleTable:
    02DD116C (strong handle)
    -> 055E8EBC Microsoft.UI.Xaml.SizeChangedEventHandler
    -> 055E8E08 System.Runtime.CompilerServices.Closure
    -> 055E8E18 System.Object[]
    -> 055E791C WinRT.EventSource`1[[Microsoft.UI.Xaml.SizeChangedEventHandler, Microsoft.WinUI]]
    -> 055E646C Microsoft.UI.Xaml.SizeChangedEventHandler
    -> 055E130C App5.FakeControl

    02DD1170 (strong handle)
    -> 055E130C App5.FakeControl

Found 2 unique roots (run '!gcroot -all' to see all roots).

I tried to subscribe to an event with the weak event handler as follows:
public class FakeControl2 : Control {
    public FakeControl2() {
        var handler = new WeakSizeChangedHandler<FakeControl2>(this, (x, sender, e) => x.FakeControl2_SizeChanged(sender, e));
        this.SizeChanged += handler.OnEvent;
    }
    private void FakeControl2_SizeChanged(object sender, SizeChangedEventArgs e) {
        throw new NotImplementedException();
    }
}
class WeakSizeChangedHandler<TTarget> where TTarget : class
{
    WeakReference<TTarget> reference;
    Action<TTarget, object, SizeChangedEventArgs> onEvent;
    public WeakSizeChangedHandler(TTarget target, Action<TTarget, object, SizeChangedEventArgs> onEvent) {
        this.reference = new WeakReference<TTarget>(target);
        this.onEvent = onEvent;
    }
    public void OnEvent(object sender, SizeChangedEventArgs e) {
        if(reference.TryGetTarget(out var target))
            onEvent(target, sender, e);
    }
}

But still, there's a remaining strong handle:
0:023> !dumpheap -type FakeControl
 Address       MT     Size
051e130c 158cb958       64
051e6474 158ce6c0       12
051e6480 158cea34       32
051e64a0 158ce624       16
051e64b0 0cc40318       12

Statistics:
      MT    Count    TotalSize Class Name
158ce6c0        1           12 App5.FakeControl2+<>c
0cc40318        1           12 System.WeakReference`1[[App5.FakeControl2, App5]]
158ce624        1           16 App5.WeakSizeChangedHandler`1[[App5.FakeControl2, App5]]
158cea34        1           32 System.Action`3[[App5.FakeControl2, App5],[System.Object, System.Private.CoreLib],[Microsoft.UI.Xaml.SizeChangedEventArgs, Microsoft.WinUI]]
158cb958        1           64 App5.FakeControl2
Total 5 objects
0:023> !DumpHeap /d -mt 158cb958
 Address       MT     Size
051e130c 158cb958       64

Statistics:
      MT    Count    TotalSize Class Name
158cb958        1           64 App5.FakeControl2
Total 1 objects
0:023> !gcroot 051e130c
HandleTable:
    04C0116C (strong handle)
    -> 051E130C App5.FakeControl2

Found 1 unique roots (run '!gcroot -all' to see all roots).

In my real application, I cannot create any controls that track their properties by using event handlers.

Steps to reproduce the bug

Steps to reproduce the behavior:

Download the App5 project (you can find a link to the attachment in the Additional context section below)
Build and run the project
Click on the Click Me button
Create a memory snapshot and analyze it (I use the WinDbg since it is more informative for me)

Expected behavior
All of the FakeControl instances should be collectible.

Screenshots

Version Info

NuGet package version: [Microsoft.WinUI 3.0.0-preview3.201113.0]

Windows app type:

UWP
Win32

Yes

Windows 10 version
Saw the problem?

Insider Build (xxxxx)

May 2020 Update (19041)
Yes

November 2019 Update (18363)

May 2019 Update (18362)

October 2018 Update (17763)

April 2018 Update (17134)

Fall Creators Update (16299)

Creators Update (15063)

Device form factor
Saw the problem?

Desktop
Yes

Xbox

Surface Hub

IoT

Additional context

App5.zip

looks like a dupe of:
https://github.com/microsoft/CsWinRT/issues/413

This has been resolved with CsWinRT 1.2, which will be included in Project Reunion 0.5.1


OpenAI API failed to generate response

I am using the exact code provided in an example and I have an existing openAI API key that I have tested in another script calling openAI directly.
Please help me understand why it's providing a generic exception response "Exception: OpenAI API failed to generate a response"
<EMAIL_ADDRESS>def score_sentiment(input: str) -> Annotated[int, Field(gt=0, lt=10)]:
"""Scores the input between 0-10"""
@monkey.align
def align_score_sentiment():
"""Register several examples to align your function"""
assert score_sentiment("I love you") == 10
assert score_sentiment("I hate you") == 0
assert score_sentiment("You're okay I guess") == 5
def test_score_sentiment():
"""We can test the function as normal using Pytest or Unittest"""
score = score_sentiment("I like you")
assert score >= 7
if name == "main":
align_score_sentiment()
print(score_sentiment("I like you")) # 7
print(score_sentiment("Apples might be red")) # `
Traceback (most recent call last):   File "/Users/jacoblaws/Development/python/eleva/gpt_experiments/monkey_patch_descriptions.py", line 46, in <module>     print(score_sentiment("I like you")) # 7   File "/Users/jacoblaws/opt/anaconda3/lib/python3.9/site-packages/monkey_patch/monkey.py", line 206, in wrapper     output = Monkey.language_modeler.generate(args, kwargs, Monkey.function_modeler, function_description)   File "/Users/jacoblaws/opt/anaconda3/lib/python3.9/site-packages/monkey_patch/language_models/language_modeler.py", line 31, in generate     choice = self.synthesise_answer(prompt, model, model_type, llm_parameters)   File "/Users/jacoblaws/opt/anaconda3/lib/python3.9/site-packages/monkey_patch/language_models/language_modeler.py", line 41, in synthesise_answer     return self.api_models[model_type].generate(model, self.system_message, prompt, **llm_parameters)   File "/Users/jacoblaws/opt/anaconda3/lib/python3.9/site-packages/monkey_patch/language_models/openai_api.py", line 70, in generate     raise Exception("OpenAI API failed to generate a response") Exception: OpenAI API failed to generate a response

Hey Jake! Thanks for bringing this up, I'll look into it. The above error message usually happens when OpenAI API has a longer outage or there might be issues with the key. We also have updated the package-release, which might help solve the issue, could you confirm please what version of Monkey-Patch are you running?

Thank you so much! I was on 0.0.9 and just upgraded to 0.0.10, using python 3.9.7 and I am still facing the same issue.
I tested a separate script with the same key hitting the OpenAI API directly and it was working as well, which made me think the key wasn't the issue. Let me know if there's anything else I can test or information to provide!
openai.api_key = api_key

def generate_workouts():
    prompt = {
        "role": "user",
        "content": "Generate a list of 100 unique exercises with the following attributes in a json response - attributes are "\
            "workout name as string, description as string, equipment needed as a string list, and muscle group as a list string"

    }

    response = openai.ChatCompletion.create(
  model="gpt-3.5-turbo",
        messages = [prompt],
        max_tokens=4000,
        temperature=0.7
    )
    return response.choices

Hey @jakelaws1, could you please paste your full code? Below is what I am (successfully running). There are a few syntax errors in the code you posted at the top, here is what the full code should look like:
import os
import openai
from dotenv import load_dotenv
from pydantic import Field
from typing import Annotated
from monkey_patch.monkey import Monkey as monkey

load_dotenv()
openai.api_key = os.getenv("OPENAI_API_KEY")

@monkey.patch
def score_sentiment(input: str) -> Annotated[int, Field(gt=0, lt=10)]:
    """
    Scores the input between 0-10
    """

@monkey.align
def align_score_sentiment():
    """Register several examples to align your function"""

    assert score_sentiment("I love you") == 10
    assert score_sentiment("I hate you") == 0
    assert score_sentiment("You're okay I guess") == 5

# This is a normal test that can be invoked
def test_score_sentiment():
    """We can test the function as normal using Pytest or Unittest"""
    assert score_sentiment("I like you") == 7

if __name__ == '__main__':
    align_score_sentiment()
    print(score_sentiment("I like you"))  # 7
    print(score_sentiment("Apples might be red"))  # `

(Note, I'm using python-dotenv to load the OPENAI_API_KEY from the .env file. This is optional, you can hardcode the openai if you like)

I copy and pasted that exact code and ran it and I am still getting the same error. I created a separate virtual environment as well to ensure incorrect packages weren't causing issues. Right after running this script I ran a separate OpenAI API script directly in that same virtual environment with success (to ensure no key issues).
Let me know if there's any additional information I can provide or things to test out.
python = "^3.11"
monkey-patch-py = "^0.0.10"
openai = "0.28.1"
Please see the errors below.
Traceback (most recent call last):
  File "/Users/jacoblaws/Development/python/eleva/gpt_experiments/monkey_patch_descriptions.py", line 34, in <module>
    print(score_sentiment("I like you"))  # 7
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jacoblaws/Library/Caches/pypoetry/virtualenvs/llmenv-ITipcQKY-py3.11/lib/python3.11/site-packages/monkey_patch/monkey.py", line 217, in wrapper
    output = Monkey.language_modeler.generate(args, kwargs, Monkey.function_modeler, function_description)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jacoblaws/Library/Caches/pypoetry/virtualenvs/llmenv-ITipcQKY-py3.11/lib/python3.11/site-packages/monkey_patch/language_models/language_modeler.py", line 38, in generate
    choice = self.synthesise_answer(prompt, model, model_type, llm_parameters)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jacoblaws/Library/Caches/pypoetry/virtualenvs/llmenv-ITipcQKY-py3.11/lib/python3.11/site-packages/monkey_patch/language_models/language_modeler.py", line 48, in synthesise_answer
    return self.api_models[model_type].generate(model, self.system_message, prompt, **llm_parameters)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jacoblaws/Library/Caches/pypoetry/virtualenvs/llmenv-ITipcQKY-py3.11/lib/python3.11/site-packages/monkey_patch/language_models/openai_api.py", line 80, in generate
    raise Exception("OpenAI API failed to generate a response")
Exception: OpenAI API failed to generate a response

Okay brilliant, I think I have the information necessary to replicate this. I will try when I’m back at my machine!Sent from my iPhoneOn 20 Nov 2023, at 10:52, Jake Laws @.***> wrote:
I copy and pasted that exact code and ran it and I am still getting the same error. I created a separate virtual environment as well to ensure incorrect packages weren't causing issues. Right after running this script I ran a separate OpenAI API script directly in that same virtual environment with success (to ensure no key issues).
Let me know if there's any additional information I can provide or things to test out.
python = "^3.11"
monkey-patch-py = "^0.0.10"
openai = "0.28.1"
Please see the errors below.
Traceback (most recent call last):
File "/Users/jacoblaws/Development/python/eleva/gpt_experiments/monkey_patch_descriptions.py", line 34, in
print(score_sentiment("I like you"))  # 7
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jacoblaws/Library/Caches/pypoetry/virtualenvs/llmenv-ITipcQKY-py3.11/lib/python3.11/site-packages/monkey_patch/monkey.py", line 217, in wrapper
output = Monkey.language_modeler.generate(args, kwargs, Monkey.function_modeler, function_description)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jacoblaws/Library/Caches/pypoetry/virtualenvs/llmenv-ITipcQKY-py3.11/lib/python3.11/site-packages/monkey_patch/language_models/language_modeler.py", line 38, in generate
choice = self.synthesise_answer(prompt, model, model_type, llm_parameters)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jacoblaws/Library/Caches/pypoetry/virtualenvs/llmenv-ITipcQKY-py3.11/lib/python3.11/site-packages/monkey_patch/language_models/language_modeler.py", line 48, in synthesise_answer
return self.api_models[model_type].generate(model, self.system_message, prompt, **llm_parameters)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jacoblaws/Library/Caches/pypoetry/virtualenvs/llmenv-ITipcQKY-py3.11/lib/python3.11/site-packages/monkey_patch/language_models/openai_api.py", line 80, in generate
raise Exception("OpenAI API failed to generate a response")
Exception: OpenAI API failed to generate a response
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

Hi Jake, this is quite baffling to us as we can't reproduce the error at all. Just to double-check, the openai key in the .env file is under "OPENAI_API_KEY" key?
We also pushed up an addition where you should now get informative openai error messages apart from the generic one, which should help in debugging issues. It's not in the pip release yet (as we're including a couple of additional enhancements) but its in the master branch, if you want to fork the branch and run it then let me know what the error is! I'll keep you posted as well once we've updated the pip package.


Fix #1738: JibBuildConfiguration ignores BuildImageConfiguration.registry

Fix #1738

@erikgb : Could you please try it out and see if it's working for you use case ?

@rohanKanojia : This PR does not seem to fix my use case, but it is very hard to verify it 100%. To "integration test" it, I need to push/deploy it to our corporate Maven repository.... But I know how to (Java) debug, and it seems like the registry handling is improved - compared to HEAD of master. But still not bug free. The problem is that there are so many ways to configure registry handling in f-m-p, and when transforming to Jib "dialect" you need to care for all of them. 😄
What I am trying to do at the moment is quite simple. I set the Maven property fabric8.generator.registry to our corporate Docker registry proxy. The expectation is that the base image, fabric8/java-centos-openjdk11-jdk:1.6.3 in my case, is pulled from this proxy Docker registry and not registry-1.docker.io (which is blocked). This does not currently seem to happen:
baseImageConfiguration = {ImageConfiguration@9222}
 image = {ImageReference@9229} "fabric8/java-centos-openjdk11-jdk:1.6.3"
  registry = "registry-1.docker.io"
  repository = "fabric8/java-centos-openjdk11-jdk"
  tag = "1.6.3"
 credentialRetrievers = {RegularImmutableList@9224}  size = 0

I think we need tests to do changes to this functionality. It seems like very basic functionality might work, but if you try to use more advanced functionality in f-m-p it just doesn't work. I will try to find some temporary workaround for my issues for now. Probably by avoiding use of the registry handling in f-m-p and only use absolute Docker image references....
So my suggestion is to postpone doing any more related to this, and release f-m-p 4.3.1. I will have more time next week, and can try to do some work on the it - at least add some tests. I am not comfortable at all doing changes without tests....

@erikgb : Could you please give it a try again? I've added code to handle generator parameters as well.

@erikgb : I'm merging this and releasing 4.3.1 .

@rohanKanojia : Sorry for the late response. I was off for the weekend. I will check if version 4.3.1 works in my use case and let you know....


Remove index_number from property

The index_number column of the property table is meant to store the order of attributes sharing the same name. For example, assume a feature has four gml:name attributes. Then the attributes would be assigned the index numbers 1, 2, 3, and 4. Based on these index numbers, the original order of the gml:name attributes can be restored when exporting the feature. Or queries involving the position of the attribute can be supported (e.g., "give me all buildings whose second gml:name has the value ABC").
However, managing the index number introduces a huge overhead. For instance, assume we want to add another gml:name attribute to the same feature in the above example. We first must calculate the next index number, which requires querying the highest index. Or assume, we want to delete the gml:name at index 2. This would require decrementing all index numbers higher than 2. Or assume, we want to insert another gml:name between 1 and 2. This requires to first increment all index numbers higher than 2.
If we just use the PK as "index number", we are also able to export the gml:name attributes in their original order. And we can also support queries involving the position of an attribute. And we can easily add more gml:name  attributes at the end of the sequence. The only thing we couldn't easily support is to add a new gml:name between two already existing ones.
We never had the requirement to insert a new attribute between two already exisiting ones for the 3DCityDB v4. Imho, the overhead for managing the index number is too high just to be able to support this (non) use case. I also think the index number makes it more difficult to access and change the property table with external tools such as FME or QGIS.
I therefore propose to remove the index_number column from the property table.

Shouldn't this issue be related to #163?
Lots of array functions already exist in DBs that - if really needed - can take care of this. So, IMO, I agree with removing the index_number. Claus' reasoning makes sense, as well as the lack of support for the potetial "non use case".

In my situation, i am using following functions to aggregate and split multiple values (mostly in gml:name, gml:function, gml:usage): STRING_TO_ARRAY, UNNEST, ARRAY_POSITION and STRING_AGG. Most important thing is that i need to recombine these rows by considering their first orders. To do that, i am using ORDER BY clause with "index_number"s. I think same clause with primary keys would be more inefficient.
For Exp:

Converting strings to array
Splitting converted array to multiple rows(Unnest)
Obtaining original order number as index number
Combining them again just as in original order(used in Views)

@muratkendir, thanks for your input. Why should your query be more unefficient using the PK? Also, I guess your use case is to mimic the 3DCityDB v4 based on v5, right? I wouldn't regard this as default use case for v5. I think it's OK if this would be a bit slower when using the PK (but still I'm not sure whether it really is slower). A user could also materialize the view to make it faster.

@clausnagel  I checked again with my view & materialized view creation scripts. (I tested it by querying 50.000 buildings from the view using only "id" or "index_number"+"feature_id") My findings/opinions are below:

If the order of multiple name values not changed, then there is no any significant performance change. (Also same for materialized views.)
On the other hand, adding a new gml:name value and changing the order of multiple values scenario has been never tested with considering primary keys. (also acceptable for others, such as function, usage, veg:species etc. ) Since property>id column always used with sequence, i think it would be harder to manipulate the order of name/function/usage values.
One more thing, which is not less important, the uniqueness of properties on the upgrade scripts is checked by "feature_id + index_number + namespace + name" bundle. Without using index_number i can't proceed the uniqueness of property data.

@clausnagel Primary Key of property table is already standalone unique. In the meantime, primary key of property table is created after import process, just after checking uniqueness of property sets. Otherwise, many duplicated values will be stored in property table.

Not sure that I get the problem with the upgrade scripts. But when you need some index number to ensure uniqueness in this process, then maybe better use a temporary table just for this process.

"Every feature should have only one property with the same namespace:name type." This expression summarizes the situation regarding to property uniqueness. So, the combination of "feature_id", "namespace" and "name" should be unique. The only exception to apply this rule is multiple values which may stored in "name", "function", "usage", "veg:species".  These values can be split into multiple rows with different index_number values. So, with the additional "index_number" column we can provide uniqueness for the property table.

"Every feature should have only one property with the same namespace:name type."

Why?

So, with the additional "index_number" column we can provide uniqueness for the property table.

I still don't see why we need index_number for this.
I suggest to discuss and clarify this offline first.

According to the offline discussion, drop the column index_number.


Add more precise matching to the metric end-to-end tests.

The metric tests scrape metrics in the Prometheus text format and have
been mainly asserting based on the presence or absence of substrings
within the entire response body.
Metrics are now parsed into a slice of structs, and there is a new
Gomega matcher that can reference metric family, labels, and
value (for untyped metrics, gauges, and counters).

/retest

nice!
lgtm (wait for a second review)


v5 - tabs required classes

https://v5.getbootstrap.com/docs/5.0/components/list-group/
https://v5.getbootstrap.com/docs/5.0/components/navs/
https://github.com/twbs/bootstrap/blob/main/js/src/tab.js#L45
Why must the parent of the HTML element of the tab contain'.nav, .list-group'? If the parent of the HTML format does not contain one of these two classes, an error will be reported.
Moreover, in the document description, there is no key description, and one of these two categories must be included.

It's the same in v4 too: https://github.com/twbs/bootstrap/blob/v4.5.0/js/src/tab.js#L37
But yes our docs lack of explanation about required classes

@Johann-S
I was before 5.0. When using tab, the parent that did not trigger the button must have these two classes.

Before 5.0, these two categories are not required.

in that case @zhangchenglin please provide two reduce test cases, one in v4.5.0 and one with v5 please

<EMAIL_ADDRESS><EMAIL_ADDRESS>For the v5 version, the console will report an error. Green is primitive and red is an example of other structures.

Thanks @zhangchenglin and good catch 👍

It is not the js issue in my opinion and .nav, .list-group are required even in v4 :) @Johann-S
If you see in your codepen (for v4) @zhangchenglin, the next tab is getting active that you want to do but the previously selected tab is still active. That's because the parent of the element is not .nav, .list-group. It is throwing error in v5 because the listElement is null. In v4 you are not getting the error because the code is written with jQuery and jQuery does not return null directly instead it returns a jQuery object. So you are not getting the error in the console but the purpose is not being fully achieved and the previously selected tab is not getting inactive :)

It is not the js issue in my opinion and .nav, .list-group are required even in v4 :) @Johann-S
If you see in your codepen (for v4) @zhangchenglin, the next tab is getting active that you want to do but the previously selected tab is still active. That's because the parent of the element is not .nav, .list-group. It is throwing error in v5 because the listElement is null. In v4 you are not getting the error because the code is written with jQuery and jQuery does not return null directly instead it returns a jQuery object. So you are not getting the error in the console but the purpose is not being fully achieved and the previously selected tab is not getting inactive :)

So if you want tabs to support structures in other formats, is it the only way to do this? They should have a common and must have class name to put in the parent element.
Have you considered making the tab function independent?

So if you want tabs to support structures in other formats, is it the only way to do this?

Yes @zhangchenglin, you must use .nav or .list-group class on the parent of the element. See in #31166, they are using different structure but parent element contains .nav class.

So if you want tabs to support structures in other formats, is it the only way to do this?

Yes @zhangchenglin, you must use .nav or .list-group class on the parent of the element. See in #31166, they are using different structure but parent element contains .nav class.

Well, his needs are the same as mine. I didn't dare to put forward this requirement, that is, the trigger button is not in the same element (the relationship of the trigger button is the relationship of sibling elements).


Error retrieve lua table

current test on luajit
 sol::state lua;
    lua.open_libraries(sol::lib::table,sol::lib::base,sol::lib::jit,sol::lib::io);

    auto setattr = []( sol::object tab){
        if(tab.valid()){
            cout << "tab was valid\n";
        }
        auto table = static_cast<sol::table>(tab);
        cout << "tab has num : " << std::distance(table.begin(),table.end()) << std::endl; // ERROR HERE, but can get the right count is 100

    };

    // function
    lua["setattr"] = setattr;

    auto script = R"(
                  myt = {}
                  for i=1,100,1 do
                     table.insert(myt,{1,2,3})
                     ---myt[i] = {1,2,3}
                  end
                  print (myt)
                  setattr(myt);
                  )";

    lua.safe_script(script);

Q:
how can i get the lua table and travel it in right way  . thanks

sorry .  I went through your document again,  the problem was solved
https://sol2.readthedocs.io/en/latest/api/table.html
    sol::state lua;
    lua.open_libraries(sol::lib::table,sol::lib::base,sol::lib::jit,sol::lib::io);

    auto setattr = []( sol::object tab){
        if(tab.valid()){
            cout << "tab is vaild\n";
        }
        auto table = static_cast<sol::table>(tab);

        for(auto i=1; i<=table.size();i++){
            sol::table vec = table[i];
            cout << vec.get<float>(1) << " " << vec.get<float>(2) << " " << vec.get<float>(3) << std::endl;
        }
    };

    lua["setattrib"] = setattr;
    auto t_prev = std::chrono::high_resolution_clock::now();
    auto script = R"(
                  myt = {}
                  for i=1,2,1 do
                     table.insert(myt,{i,i,i})
                  end
                  print (myt)
                  setattrib(myt);
                  )";

    lua.safe_script(script);

You can use the same writeup as the top, but instead of sol::table which accepts userdata types (since they validly behave like tables), you can instead use sol::lua_table instead. This will STRICTLY type-check for JUST tables, and your code would work fine and not require you to hand-edit things.

(Oops, last comment was posted on the wrong issue.) That looks fine, but you could also do auto table = tab.as<sol::object>(); rather than a static_cast, I think.