Enable/Disable Menu items based on plugin loaded

Per @Trinitou suggestions, a plugin specific menu item should only be enabled (available to execute by user) when the plugin is loaded, and disabled when the plugin is not loaded
Fixes
This fixes the underlying cause of the crashes reported in #40 and #42
Fix for #40
Fix for #42
Details
Upon plugin load change we update the menu items
Reverts the now obsolete change in previous merged pull request #43
Tab indentation set to 3 to be consistent with existing code
Note: Follows the QT memory ownership model, and the QAction pointers lifetime is handled by their parents
Testing
Arm64 Debug

Launch with no plugin loaded, see menu items are greyed out (disabled),
user cannot select these items (as intended) therefore code is not executed and app doesn't crash
Launch with plugin loaded, see menu items are available and executed when user clicks
confirm still no crashes

Test 1: Plugin not loaded

Test 2: Plugin loaded

I haven't tested it, but if you both tested it and it works well for you, then I trust both of you :+1:

Cheers @abique, tested my end on Mac Arm64 (no windows to hand a the mo).
Big thanks for the merge, and if I get some time later in the week I'll take a look at the plugin load menu item too, have a good week 👍


我的青龙面板无法连接网络

Qinglong version
最新版
Steps to reproduce

无法连接网络，依赖包也安装不了 不知道怎么解决
What is expected?
正常使用网络
What is actually happening?
不知道
System Info
No response
Any additional comments?
No response

依赖包安装报什么错

依赖包安装报什么错

开始安装依赖 json，开始时间 2023/4/2 下午12:18:10
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1131)'))': /simple/json/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1131)'))': /simple/json/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1131)'))': /simple/json/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1131)'))': /simple/json/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1131)'))': /simple/json/
Could not fetch URL https://pypi.org/simple/json/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/json/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1131)'))) - skipping
ERROR: Could not find a version that satisfies the requirement json (from versions: none)
ERROR: No matching distribution found for json
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1131)'))) - skipping
依赖安装失败，结束时间 2023/4/2 下午12:18:29，耗时 19.145 秒


Add rules for public clouds in builtin resource definitions

With https://github.com/seal-io/walrus/issues/2149 now we should be able to create multi-cloud resources out of the box.

Environment

Walrus version: main 61fe2d23f46237867cf199c44a3275ee71b7805d
UI version: dev-b878771

Test Result:
Add aws and alibaba clouds.
mysql: pass
postgresql: pass
redis: pass


Missing parameters

Compared to the https://replicate.com/stability-ai/sdxl some parameters like high_noise_frac are missing. Can we have those?

Any update on this?

What about the NSFW filter?

Has Hugging Face exposed this as an easy-to-use parameter yet?


What should be the REDIRECT URL when I add a custom social connection?

Hi,,,
I'm using custom-social-connections extension for adding Intercom.
I created a new connection and set it up.
When I added the new app to Intercom I needed to supply a REDIRECT URL - so I gave it:
https://<my-subdomain>.auth0.com/callback  and when i test the new connection I get:
https://<my-subdomain>.auth0.com/callback?code=<some-code>&state=zJVRzviB7eof5bIksLKSd9mm
What am I doing wrong?
What should be the link that I use in the client side to authenticate the user with the new custom connection I've created?

Hey  @idanb11, in Auth0's documentation for the custom-social-extensions, it says that you have to use https://YOUR_DOMAIN/login/callback, for more info take a look at: https://auth0.com/docs/extensions/custom-social-extensions#provide-your-callback-url-to-the-identity-provider


frozen-core in dual plane wave basis/'pseudo-potential'/valence-electrons only

I have a question regarding the dual plane wave basis.
In my understanding I can create a Fermionic hamiltonian describing the electronic structure in a periodic material, on a discretized grid, with a combination of the Hamiltonian constructors dual_basis_jellium_model()  and adding dual_basis_external_potential() for the electron-nucleic interactions. (The latter function has a look-up table to simply count the positive charge number for the given molecular geometry nuclei.)
As I am mostly interested in semiconductors/metals, I would next like to apply the valence electron or 'frozen core' method, as a parallel to the workflow in molecular chemistry where we may as an approximation freeze the lowest-energy orbitals and for example only consider valence electrons. For that, we would normally use freeze_orbitals() on the Fermionic Hamiltonianin in f.ex. a slater-type orbital basis set.
In the case of dual plane wave basis however, it does not make as much sense (I believe), because the Fermionic modes do not refer to spatial 'orbitals' but rather plane waves, right?
I think what I'm looking for is a way to incorporate ab-initio "pseudo-potentials" for the nuclei, and only consider the valence electrons in the Hamiltonian operator, with the quantization into a dual plane wave basis.
Is such functionality currently featured in OpenFermion, is there a plan to add it, or could you point me in the right direction to contribute such a thing?

Indeed, if you call freeze_orbitals() on the plane wave or dual basis Hamiltonians it will just freeze the lowest energy plane wave or dual basis functions. But what you would really want to do is something like freeze the lowest energy molecular orbitals. For that you would basically need to be working in a molecular orbital basis. However you are also correct that a viable alternative to this which would apply in the case of the plane wave or dual basis sets is to pseudopotentials. Currently, we do not have code for using pseudopotentials in OpenFermion but it is a reasonable thing to want to have. Basically, the external potential operator would need to be computed differently if working with pseudopotentials. Exactly how it would be computed depends on the pseudopotential. Note that for many classes of pseudopotentials, including e.g., non-local pseudopotentials, the external potential operator will no longer be diagonal in the dual basis, but that I don't expect that would be much of a problem. So the first step would be to derive an expression for the integrals defining the external potential. I.e.,
U = \sum_{pq} U_{pq} a^\dagger_p a_q
where U_{pq} = \int dr \phi_p(r) U(r) \phi_q(r)^*
where \phi_p(r) is the spatial function of plane wave with mode q and U(r) is the pseudopotential of interest. Specifically, if we are dealing with atom centered pseudopotentials then U(r) is a sum of the pseudopotentials centered on each atom, e.g., U(r) = \sum_{j} W_{Z_j} (r - R_j) where W_Z(r) is the atom centered pseudopotential centered at the origin for the atom with charge Z, Z_j is the charge of atom j and R_j is the position of atom j.


GCC Tenants Missing

The documentation and communications do not mention how GCC tenants are being handled. The transition portal only lists our commercial tenant, not any of our GCC tenants. Is there a separate portal or do we not get any visibility into the transition timing?

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: c6baca2c-2716-dab9-da1f-9290d5c94d5f
Version Independent ID: 081682e5-b125-22fc-04c9-1e784ea306f5
Content: FAQs: Transition to Unified Interface - PowerApps
Content Source: powerapps-docs/maker/model-driven-apps/faqs-transition-unified-interface.md
Service: powerapps
GitHub Login: @Mattp123
Microsoft Alias: haybass

@packman83 Thanks for your feedback; we have updated the FAQ to add this info:
Are environments from all data centers included within this transition service?
At present, environments from specific data centers, such as Government Community Cloud (GCC), have not been included within the portal. We'll provide suggested transition dates for these environments by June, 2020. Customers who want to make the move to Unified Interface can always switch manually at any time before October 1, 2020.


License?

I was wondering what license this project is under, if any. If there's currently none, I recommend the MIT license. I can open a PR with the license file if need be :)

Fair question. Absolutely, please do submit a PR for MIT licence.

Done #10


[Bug]: Wrong Content-Length count

Version of the software
0.2.4
Operating system
Windows 11
Browser / Native
91
What happened?
{"operationName":null,"variables":{"email":"xxxx@tele-world.nl","password":"xxxxerdam14!"},"query":"mutation loginProfileUser($email: String!, $password: String!) {
__typename
loginProfileUser(email: $email, password: $password) {
__typename
...UserProfile
}
}
fragment UserProfile on GraphqlProfile {
__typename
id
partyId
gender
firstName
lastName
email
loyaltyCustomer
birthday
type
loyaltyCard
session {
__typename
personalizationId
sessionId
userId
}
}","extensions":{"pwa":{"salesLine":"Media","country":"NL","language":"nl","contentful":true,"isNewServiceProductsActive":true,"ccr":true,"globalLoyaltyEnrollment":false}}}
OpenBullet counts: Content-Length: 685
But it should be: 711
Burpsuite: Content-Length: 711
Edit/Fixed: I had to use Raw content
Relevant LoliCode if needed
No response

Edit


Add support for "always closed" switch?

WPC machines have an "always closed" switch (not an actual switch, just a diode across the row/column) which is used for troubleshooting. If the game boots up and the always closed switch is open, the machine knows there's an issue (fuse or other problem) with the switch matrix.
I propose we add this to MPF in the form of an "always_closed" tag for switches. Maybe add the checking to the switch controller? Or to the switch? If an always closed switch is ever open, we can post an event which could then be used for a slide player to explain the problem.
I know that this is possible to manually implement with switch events and conditional events that could run at startup, but that would require a couple of entries in the event player, and I wonder if this is something we should build in since it's somewhat common? (Or not, because again it's just a few lines in the event player and I could do it in a how to guide.)
Thoughts?

I guess we should include this in the service mode. It should check on start and maybe in some kind of diagnostic menu entry.


V1.0.0.rc1

Remove the committed maven directory
Handle client downtime
Code cleanup

Maven directory committed back and included a little more code clean up.

Can you make the title a short summary of your changes since they won't be V1.0.0.rc1.

These are good change - I'll look to make them. I think these changes
should take care of a couple of the open issues in the issue backlog. Want
me to reference them to these changes?
On Fri, Aug 10, 2018 at 3:58 PM Spencer Gibb<EMAIL_ADDRESS>wrote:

@spencergibb requested changes on this pull request.
In
spring-cloud-kubernetes-discovery/src/main/java/org/springframework/cloud/kubernetes/discovery/KubernetesDiscoveryClient.java
https://github.com/spring-cloud/spring-cloud-kubernetes/pull/222#discussion_r209382985
:

@@ -64,82 +51,86 @@ public String description() {
}

public ServiceInstance getLocalServiceInstance() {
This method was removed from DiscoveryClient. It might be simpler to just
delete it.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/spring-cloud/spring-cloud-kubernetes/pull/222#pullrequestreview-145395998,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACOTKMDrzYM6RDZdPAmckEMqejOnpzeMks5uPfP7gaJpZM4V2VPQ
.

Implemented code review
Removed unused imports
General code clean up

@gfoster1 can you rebase and resolve?

Unfortunately this seems pretty far of master now :(


Master

Updated control logic to handle edge cases (e.g. play before record).

This should be already merged via 2ceb10768dd258911badac980bbd7d0d0b0929d4


Invert status for blind

Hello, any possibility to invert and show as "grey" the icon status for blind open and let with a white background if the blind is closed?

Sadly not; this is designed by Apple and can not be altered by me.


Metrics are not grouped by type

Describe the bug
When calling the metrics endpoint I would expect them to be grouped by type. However, some metrics are grouped under the incorrect type header
To Reproduce
Steps to reproduce the behavior:

Run Pulsar v2.6.0
Fire some messages to topics
Access metrics endpoint
See error

Expected behavior
All metrics are grouped appropriately.
Screenshots

Desktop (please complete the following information):

OS: Docker on MacOS, Amazon Linux on AWS

@marksilcox The broker just expose the Prometheus formatted metrics, if you want to do some aggregate calculations, it's better to achieve at the Prometheus.

@codelipenghui I am not wanting to aggregate. As you can see from the screenshot, some metrics are not being grouped under their # TYPE header. See # TYPE pulsar_msg_backlog gauge header, under that I can see 9 other metrics not related to that header. This happens in a few other places and metrics are scattered across the output.


Test/jax components/training/step

What?
Test: Unit tests for Jax train step components
Why?
Components are currently not tested. Needs to be robust for Jax Mava release
How?
Make unit test for DefaultTrainerStep and MAPGWithTrustRegionStep components from mava/components/jax/training/step.py file
Extra
Close #536

Thank you @RuanJohn for the reviewing efforts I will try to make all the necessary changes based on your suggestions!


Updated Google Chrome to version 86.0.4240.111

[x] Have you signed the Contributor License Agreement?
[x] Have you checked that there aren't other open pull requests for the same manifest update/change?

Microsoft Reviewers: Open in CodeFlow

/azp run


Add hungarian translation

Q
A

Is bugfix?
❌

New feature?
✔

Breaks BC?
❌

@mrbig00 would you like to complete the pr?


[docs] Dockerfile updates

Added the source Dockerfiles for the codelab_otsim and environment images on Docker Hub
Updated README

Ah... I got a new laptop and it wasn't linked to my GitHub account properly yet, I'll probably redo this to fix.


Fix migrate mirror 500 bug (#8526)

Backports https://github.com/go-gitea/gitea/pull/8526 -> thanks @lunny
will close https://github.com/go-gitea/gitea/issues/8514

@zeripath o the rename was you ... you can review it now :)


Google Drive Video links redirector.googlevideo.com

when i am get google drive video link it's only work with my ip , when i am change c.docs.google.com to https://redirector.googlevideo.com/  its not working and give 404 page.
i want know there is any way solve this and why  https://redirector.googlevideo.com/   work with youtube video links ?

Ask Google why. Closing since not a youtube-dl issue.

i know it's not youtube-dl issue , since there is couple website using google drive for hosting their videos and  redirector.googlevideo.com  successfully work for them , i just want know maybe there is a way to this and you could help me.

How are obtained the "https://redirector.googlevideo.com/" links?


[Multi-Actions] AgentConfiguration: delete unused genConfigId field

Description
Following PR #4712
Risks
Code is simple but means we cannot revert #4712 anymore, data deletion Mitigation: we've been running without using the field in production for a while
Deploy plan

wait for merge of #4712
deploy front
front init_db

Restarted in #4802


Export a source conversion/transformation method as part of the SDK

Motivation

Some plugins, for example the k8saudit-xxx plugins, require an additional step to ingest events. The event from the source is not in the format as expected by the field extraction. E.g. in case of the k8saudit-gke plugin, the raw source event is a Google specific logging event. To be able to use the k8saudit plugin field extraction and rules a conversion/transformation is required.
To guarantee some sort of method signature and documentation for an optional conversion/transformation method, this method should preferably be part of the SDK. This allows building on top of the plugin code and reuse the conversion/transformation logic and extraction method.
Feature

Introduce a convert/transform method as part of the SDK api, just like the Open and Extract methods. Ideally the framework takes care of wiring everything together. This convert/transform method should maybe be part of the event sourcing capability:

open stream
collect events

get raw event from source
optionally, convert/transform the raw event into the format supported by field extraction

close stream

Alternatives

Additional context

For reference, falcosecurity/plugins issue #490

@jasondellaluce and @leogr , I opened this issue as not to lose track of Jason' comment.

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Provide feedback via https://github.com/falcosecurity/community.
/lifecycle stale

/remove-lifecycle stale

/remove-lifecycle stale
/help

@leogr:
This request has been marked as needing help from a contributor.
Please ensure the request meets the requirements listed here.
If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help command.

In response to this:

/remove-lifecycle stale
/help

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.


[BACKLOG-24282] Minor changes to the handling of MDI mappings in data lineage

This is to improve the presentation of mappings within the IGC plugin

Build Completed
:white_check_mark: This pull request has passed all validations.
Build Commands
mvn -B -f 'pom.xml' -pl 'plugins/meta-inject' -P '!assemblies' -Dsurefire.runOrder=alphabetical -Daudit -amd clean install

Cleanup Commands
mvn -B -f 'pom.xml' -pl 'plugins/meta-inject' -P '!assemblies' -amd build-helper:remove-project-artifact

Changed files
  plugins/meta-inject/src/main/java/org/pentaho/di/ui/trans/steps/metainject/analyzer/MetaInjectAnalyzer.java


OnRemoveByHandler should include the item that was removed. Unless there is another way to get it?

No, that's not going to happen unfortunately ;)
a) The CacheManager events are not supposed to transport the actual cache item (that's primarily my design decision)
b) It is simply not possible because some cache vendors don't support that either.
Meaning, the item was already removed and I cannot pass it through the event chain.
I know that I could implement something like that for most the in memory caches, but not for Redis for example.
I don't think it would be a good idea to return the item in some cases and not in others. That would cause all kinds of confusion...

Agreed that it should be consistent.
With regards to these events, if we have multiple instances of a server sharing a Redis cache, and we want only one instance to handle the remove/expiry event, how could we achieve this?
Presumably they would all receive the OnRemoveByHandler event?

@riazkarim That's a tricky one but a common problem for apps which scale and do stuff in parallel.
One simple option would be to only have one instance configured to listen to those events. You have to explicitly enable the feature for the redis cache handle in CacheManager via the KeyspaceNotificationsEnabled property anyways => have that one enabled only once.
Another solution would be implementing a distributed worker queue or at least a lock,
The most simple one could be implemented with CacheManager, like:

Try to Add a new key to Redis which represents a lock to your old key plus, like _lock_{oldkey}.
If the Add operation was successful, go ahead and do the work...

All other instances which got triggered by the event and now also try to Add that key would not be able to, as Add only adds new keys if they don't exist.

At the end, the "winner" process can remove the lock key (maybe also give it a short expiration, so that in case the process fails to remove it, because of an error, the key is not locked forever...)

@MichaCo Thanks very much. I think your second solution is neat. I'm going to go with that.

@riazkarim FYI, I thought about your initial question a little bit more and I think in this case it is actually fine to be a little bit inconsistent. Actually only the Redis event fired via keyspace event will not support passing back the initial value. In all other scenarios it just works.
I've just added the implementation and did some testing, seems to work.
If you want, give it a try with the beta packages on myget v1.0.1-beta-1487 or greater.

Brilliant! Thank you. It works as expected.


Update .pullapprove.yml

Add meganshand to the comp-bio group.

Oops, I shouldn't have approved - there's some problem with the pullapprove yaml apparently?

The int test failed at submission step, which apparently is not related to this PR. Will merge the PR in now.


Allow OpenXmlPackage and OpenXmlPart to be easily customized

The last couple of years has seen some fundamental changes internally to how packages and parts are handled. I'd like to see it continue becoming more flexible so that people can develop their own packages/parts if needed (if anything, this should simplify some of the behavior of our own implementations that currently need InternalsVisibleTo)

This should be enabled at this point


Use traditional emojis

*Using Google translator
Hello, how do I use the plugin with standard (traditional) emojis instead of the stylized emoji plugin?
😀😀
I am currently in version 2.2.7.
Thank you in advance, and I congratulate the creators of the library.

You don't.
Its called EmojiOnePicker :-)

Look at the attached image!
There must be some possibility ... right?

Tks.

Not as far as I know. Don't forget the EmojiOne library has changed quite a bit over time, so maybe that image is from then
I think EmojiOne started out just being a basic set of images, to ensure all emojis looked similar to iOS ones
Is there a reason you want to use platform specific emoji's? It usually creates a lot of problems for a developer

@guilherme-miranda Does Instagram just display native emoji's? I don't use it, but I would be surprised if they don't have their own emoji library
If I were you, I would not concentrate on having the emojis display exactly as they appear on Instagram, but instead just provide support to ensure all emoji's at least display on all client platforms.
If that's not suitable, you might like to try a native emoji picker which doesn't use EmojiOne


[idea] skinchanger preview

will be good ngl

nop, there are a ton of better features to add, add it yourself

nop, there are a ton of better features to add, add it yourself

good idea and easy to implement, hopefully daniel won't be lazy this time :-)

good idea and easy to implement, hopefully daniel won't be lazy this time :-)

I put a preview on my build, but it wasn't really worth it in compensation for the loss of performance, probably because I used filesystem instead of the paintkit URL.
https://github.com/danielkrupinski/Osiris/blob/c66d944452414cd65f0f719a68d7cbe50c9b1638/Osiris/SDK/ItemSchema.h#L132

I put a preview on my build, but it wasn't really worth it in compensation for the loss of performance, probably because I used filesystem instead of the paintkit URL.
https://github.com/danielkrupinski/Osiris/blob/c66d944452414cd65f0f719a68d7cbe50c9b1638/Osiris/SDK/ItemSchema.h#L132

I found the code that gets wepon png image in a leaked P2C, I'm not sure if it's ok to post it here
but the idea it get's the png image from "resource/flash/econ/weapons/base_weapons/" then converts it to texture using "D3DXCreateTextureFromFileInMemory"
the file isn't stored on drive but on memory and you retrieve it using VBaseFileSystem interface

I found the code that gets wepon png image in a leaked P2C, I'm not sure if it's ok to post it here
but the idea it get's the png image from "resource/flash/econ/weapons/base_weapons/" then converts it to texture using "D3DXCreateTextureFromFileInMemory"
the file isn't stored on drive but on memory and you retrieve it using VBaseFileSystem interface

I found the code that gets wepon png image in a leaked P2C, I'm not sure if it's ok to post it here
but the idea it get's the png image from "resource/flash/econ/weapons/base_weapons/" then converts it to texture using "D3DXCreateTextureFromFileInMemory"
the file isn't stored on drive but on memory and you retrieve it using VBaseFileSystem interface

Why would you need BaseFileSystem for that? It's possible without. 😎

I found the code that gets wepon png image in a leaked P2C, I'm not sure if it's ok to post it here
but the idea it get's the png image from "resource/flash/econ/weapons/base_weapons/" then converts it to texture using "D3DXCreateTextureFromFileInMemory"
the file isn't stored on drive but on memory and you retrieve it using VBaseFileSystem interface

Why would you need BaseFileSystem for that? It's possible without. 😎

Why would you need BaseFileSystem for that? It's possible without.

As I said above, just use ItemSchema values.
Less suspense, more code.

Why would you need BaseFileSystem for that? It's possible without.

As I said above, just use ItemSchema values.
Less suspense, more code.

Why would you need BaseFileSystem for that? It's possible without.

As I said above, just use ItemSchema values.
Less suspense, more code.

If you were able to code properly, you would know that it's not more code 😉

Why would you need BaseFileSystem for that? It's possible without.

As I said above, just use ItemSchema values.
Less suspense, more code.

If you were able to code properly, you would know that it's not more code 😉

That's a pretty good idea not ganna lie

That's a pretty good idea not ganna lie

LETS GO HE ADDED IT, WE DID IT BOIS

LETS GO HE ADDED IT, WE DID IT BOIS


ISOFIT installation to include extra data files

We rely on a number of in-house data files to be available when executing the core of ISOFIT (such as the earth-sun distance file). We should double check to ensure these files are being included in all available distributions of ISOFIT. Presently, we know these will work if the repo is pulled, but it needs to be confirmed for the following as well:

[x] github
[ ] pypi
[ ] anaconda

During some tests together with @unbohn at the GFZ, it turned out that at least the data and examples folders are missing. We only tested the latest conda-forge build but I guess it is the same issue for PyPI. Might be something in the MANIFEST.in.

Thanks, @jammont and @danschef! I'm aware of this issue and will work and on a solution.

@pgbrodrick @jammont: I made some comprehensive tests and can confirm that both data and examples directories are  currently missing in both conda and pip installations of ISOFIT. The problem is that those directories are sitting one level up from the actual package directory in the repository.
According to the setuptools userguide, only files inside the package directory are included in the final wheel. When included through the MANIFEST.in, directories outside of the package folder will be present in the sdist but not in the wheel. The Python Packaging Authority (PPA) actually recommends that any data files we wish to be accessible at run time be included inside the package (see the data files support by setuptools).
Question: Do we want to move the data and examples directories into the package directory? We'd need to slightly modify the MANIFEST.in and would then have both directories available at the site-packages directory when running conda install isofit or pip install isofit. Of course, we'd need to modify some path inquiries in the code, in particular for accessing files in the data directory, but that should be easy to implement.

Tracking this ticket so that I can figure out how to test in https://github.com/isofit/isofit/pull/421.
I think a bit of work will also be required in order to read data files using canonical tooling. This section in the setuptools docs describes how to do so:
https://setuptools.pypa.io/en/latest/userguide/datafiles.html#accessing-data-files-at-runtime
Using module __file__ attributes to find neighboring files is acceptable, but will not work for Egg or zipfile installs.

I would like to push back on "just" including the data/ and examples/ directories though. They are quite large – especially examples/:
$ du -sh data examples
 28M    data
101M    examples

So, some questions:

Are the entire contents of data/ required for isofit?
Are the contents of data/ required to make isofit work at all, or only specific features?
Why is sRTM Net not included in data?
What is the purpose of including examples/? What problem does this solve?

@pl-kevinwurster Thanks for pointing to the setuptools docs! We'll work on replacing module __file__ attributes by importlib.resources to access files needed at runtime.
We don't plan to include the entire examples/ directory, but just a selection of files from the 20171108_Pasadena one, as you can see in the MANIFEST.in. They should be quite smaller than 101M.
Now some answers to your questions:
1./2. The contents of data/ are not required to make isofit work. However, they include instrument specific noise files, aerosol templates, earth-sun distances, and solar irradiance models. Using those improves the accuracy of isofit retrievals, so would be nice to have for users. Other features such as the EWT retrieval (which is decoupled from isofit though) depend on files in the data/ directory. Finally, it also includes surface reflectance spectral libraries that can be used to build the surface model in cases where users don't provide their own model. If we don't include the data/ directory, we'd need to modify apply_oe a little bit since in currently tries to obtain a few files without having a backup, such as an if...else or try:...except clause.

I assume that sRTMnet is simply too large to be included in the data/ directory, but I'm not fully sure.

Including files from the examples/ directory provides some basic info on how to run isofit.

In any case, completely open to thoughts here!

@pl-kevinwurster Thanks for this comprehensive feedback! I try to respond to your points below:

I think the driving thought for including the examples directory in the package was that apply_oe.py pulls a data file from that directory here. However, I fully agree that this is a suboptimal solution and will work on setting up an alternative approach of providing files needed at runtime.
I finally agree that we shouldn't store any contents of the examples directory in the package upload. Using an extended documentation and/or a separate repository sounds great to me.
The same applies to the data directory. I'll work on getting all files needed at runtime to be stored in a more clever way, without the need to add an external directory to the package.
It certainly makes sense to think through versioning of data files, different functionalities of isofit, and sensor-specific files.
I think the users shouldn't have to deal with also configuring data files as you're right that isofit requires a relatively comprehensive configuration setting.
The inclusion of the data directory is not driven by the interest of installing isofit via PYTHONPATH.
I like your ideas of both adding data packages and moving data dependencies to a separate GitHub repository. Let's discuss this in a larger group.


New package: Stuffing v0.1.1

Registering package: Stuffing
Repository: https://github.com/guo-yong-zhi/Stuffing.jl
Created by: @guo-yong-zhi
Version: v0.1.1
Commit: 241c62d18cd9093d69cb27205fd0e61b4dca4144
Reviewed by: @guo-yong-zhi
Reference: https://github.com/guo-yong-zhi/Stuffing.jl/commit/241c62d18cd9093d69cb27205fd0e61b4dca4144#commitcomment-48495107

this pr can be dropped and closed, thx
[noblock]


Sort out the issues with the TEI pipeline and the image inferrer

This follows the hacky fix I merged in https://github.com/wellcomecollection/catalogue-pipeline/pull/1858, and the comment on the associated Terraform explains the issue.
We should find a way to fix this which doesn't involve disabling the image inferrer.

Alice solved this! ✨

Nope, still unhappy.

I think this are properly solved now. 🤞


Font-size-adjust needs update to new spec

font-size-adjust was added to Can I Use years ago. Since then, two new details have been added to what this feature should do. In 2023, to fully support how font-size-adjust is suppose to work, a browser should have support for:

basic syntax
two-value syntax
from-font value

The page at https://caniuse.com/font-size-adjust only reflects the first, the basic syntax.
There is a page coming from MDN BCD data: https://caniuse.com/mdn-css_properties_font-size-adjust_two-values which shows the support for two-value syntax.
There's nothing available about from-font (which is supported in Safari 17.0, and not yet in Firefox).
It seems like MDN BCD should have a separate data table for each of these three parts of the whole, where the details can be found about which browser added support for each when.
And that Can I Use should evolve the overall feature page to include how browsers are doing overall with font-size-adjust as a whole. Which would mean any browser that doesn't support all three parts gets "partial support" designation.
Does that make sense to you all? If so, I can create the PR. But I wanted to discuss a plan first.

Agree with all of these! Thanks for bringing this up, happy to receive a PR on the changes.
I see from-font is now on BCD as well and found on caniuse:
https://caniuse.com/mdn-css_properties_font-size-adjust_from-font

Here's the PR: https://github.com/Fyrd/caniuse/pull/6841

Done. Thanks!


Change our product menu on main nav and create landing pages accordingly

Description
Change our current product menu to be something like:
Product:

“ecosystem” TBD

FlowFuse
Device Agent
Dashboard
Project Nodes

Epic/Story
No response
Have you provided an initial effort estimate for this issue?
I have provided an initial effort estimate

@joepavitt This description is very simple. Do you think it accurately describes what you intended to convey during our call?
Feel free to add your reasoning behind this proposal or anything else you see fit.
While creating this, a question came up: where would the "FlowFuse" option take users? The FlowFuse cloud landing page we recently created? Should we add two items instead: one for cloud and another for self-hosted?

I think the "FlowFuse" option would be the "Features" page - maybe? Or we list "Dashboard", "Agent", "Project Nodes" as a subsection of that navigation instead?

Like this?
Product:

Features

Dashboard
Device Agent
Project Nodes

Was more thinking:

Features
Customer Stories
Blueprints
FlowFuse Offerings:

FlowFuse Cloud
Dashboard
Device Agent
Project Nodes

Ok, and isn't it FlowFuse self-hosted part of our offering?
For device Agent and Project nodes we don't have landing pages, but could link to docs lik in this PR: https://github.com/FlowFuse/website/pull/2302 WDYT?

The Device Agent page is being created at the moment in https://github.com/FlowFuse/website/issues/2236
For Project Nodes - docs is fine. Even docs for Device Agent (until the marketing page is ready) is also reasonable.

FlowFuse self-hosted part of our offering?

Yes, that generally falls under the "Features" page really as it's common across all of FlowFuse (Cloud & Self-Hosted). The "Cloud" offering gets a particular call out because it's easier to sign up, etc.
I'd be open to having a "FlowFuse Self-Hosted" there too, maybe even changing it to:

FlowFuse

Features
FlowFuse Cloud

Customer Stories
Blueprints
Extras:

Dashboard
Device Agent
Project Nodes


[BUG]: Constant problem with parsing Xata xata_id custom property

What version of drizzle-orm are you using?
drizzle-orm: v0.31.2
What version of drizzle-kit are you using?
drizzle-kit: v0.22.7
Describe the Bug
parsing the schemas fails due to xata using special syntax for their schemas
inside pgTable
const example = pgTable('example', {
xata_id: text('xata_id').default(
      `('rec_'::text || (xata_private.xid())::text)`,
   ).notNull(),
})

leads to:
Reading config file '/media/martincito/freedom/repos/poesia/api/drizzle.config.ts'
Using 'pg' driver for database querying
[⣯] applying migrations...error: syntax error at or near "rec_"

It is a constant headache
Expected behavior
Should not be a suffer

same

Couldn't you generate a custom id on app level, e.g. as default function? Or did you find another solution?

Look at the default value, it's a strong rather than a SQL statement:
`('rec_'::text || (xata_private.xid())::text)`

The above will be transformed into:
DEFAULT '('rec_'::text || (xata_private.xid())::text)'

The solution is to use the sql operator:
sql`('rec_'::text || (xata_private.xid())::text)`


Updating dev-project.sh to...

align with CONTRIBUTING.md

The script test_local.sh is not great either, it should probably be refactored


Feat parallelize Git commands

Speed up a bit clone and pull commands by threading them :)
with a M1 pro ,clone now takes ~50sec and pull ~20sec.

Thanks for the contribution, highly appreciated 🙏


Add return value check for OutboundFrameSend().

Does not change logic, but to be consistent with other usages of OutboundFrameSend().

Codecov Report

Merging #1693 into master will decrease coverage by 0.23%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master    #1693      +/-   ##
==========================================
- Coverage   67.35%   67.12%   -0.24%
==========================================
  Files         171      171
  Lines       21281    21281
  Branches     2610     2610
==========================================
- Hits        14334    14284      -50
- Misses       6033     6081      +48
- Partials      914      916       +2

Impacted Files
Coverage Δ

src/ncp/ncp_base.cpp
28.05% <0%> (-1.32%)
:arrow_down:

src/core/thread/lowpan.hpp
86.84% <0%> (-13.16%)
:arrow_down:

examples/platforms/posix/random.c
84% <0%> (-12%)
:arrow_down:

src/core/thread/lowpan.cpp
92.47% <0%> (-1.44%)
:arrow_down:

src/core/net/udp6.cpp
82.85% <0%> (-0.96%)
:arrow_down:

src/core/thread/mle_router.cpp
77.99% <0%> (-0.7%)
:arrow_down:

src/core/api/thread_api.cpp
41.17% <0%> (-0.54%)
:arrow_down:

src/core/meshcop/joiner_router.cpp
83.5% <0%> (-0.5%)
:arrow_down:

src/core/thread/mesh_forwarder.cpp
77.89% <0%> (+0.12%)
:arrow_up:

... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 41b82d3...716ce3a. Read the comment docs.


update to embedded-hal 1.0.0-alpha.6

embedded-hal 1.0.0-alpha.6 represents more what to expect from v1.0.
Also esp-idf-hal is using it :)

Oh it is also updated in there: https://github.com/BlackbirdHQ/atat/pull/113


Could one use this great tool to (re)connect Wireguard automatically?

Wireguard actually works great on iOS, especially with the on-demand feature.
However, it has had the nasty bug for quite some time that a permanent 24/7 connection is not possible if the IP address of the endpoint changes (e.g. because the Wireguard sever is self-hosted via DynDNS). Thus, every morning the connection must be manually disconnected and reconnected. Otherwise, websites simply don't load without an error message, which naturally frustrates users when they have to manually put their iPhone back online.
The  issue is neither server-side nor with the client app on the iOS device solvable so far.
Therefore, if "iOS-VPN-Autoconnect" were extended to Wireguard and could contain the simple function: "rebuild the vpn tunnel daily at 6 am", this would make Wireguard really useful for many on iOS.
(or it doesn't have to be a time based automation, it would be enough if the script would support in case of Wireguard "automatically disconnect and reconnect" instead of just "automatically connect" in case of Wireguard, because otherwise the old "dead" tunnel will be reused, like it is the case when you switch on and off the flight mode, the Wireguard client then continues to use the old connection and doesn't establish a new one).

Perhaps iPhone Shortcuts could help with the recurring task of reconnecting VPN.
Apparently it's possible to call url prefs:root=General&path=VPN and you might be able to have some automation with urls setup once or twice a day. In ios-settings-urls repo there's mention of adding and removing the VPN configuration. That would be interesting to play around with.

Thank you for these ideas!
With iPhone shortcuts you can turn a lot of things on and off (Wifi, BT, flight mode...). But actually not VPN connections.
Unless the VPN app supports that, as is the case with some commercial ones, unfortunately not with Wireguard. That's what brought me to this tool here. :-)
I already tried the solution with prefs:root=General&path=VPN
But this ultimately only opens the VPN settings menu, the reconnection still has to be done manually.
Unfortunately, this is not a real relief compared to a purely manual procedure.
Then we will probably have to wait until Apple adds the VPN option to Shortcuts (or Wireguard, in its app).


Breaking changes (remove fields localizedPrice, localizedSubscriptionPeriod, etc) without notice

In version 2.6.0 some fields was removed without update version to 3.0.
This is against the rules SemVer https://semver.org/spec/v2.0.0-rc.1.html

Updated today and can confirm that the api has breaking changes without a semantic version update.
In my specific use case:
AdaptyPaywallProduct.localizedPrice no longer exists and there is no documentation that offers an alternative.
It seems that they have replaced this with AdaptyPaywallProduct.price which points to a new class called AdaptyPrice.
However the comments within that class suggest that amount and localizedString are for "discounts"? Is this correct and if so what do we need to use in favor of localizedPrice?


Issue #112: Add implementation for add command in DG

Closes #112.

@charmainehly thanks for reviewing! will be looking to add more stuff later!

@charmainehly @tiewweijian hey yboth, i've changed it according to char's format and wj's suggestion. please take a look! if all good, please proceed and merge. thank you both! 😍

@charmainehly @tiewweijian heyyo fam, we can merge this in now. all should be good. yall can maybe take a quick peek at the files changed once more before doing so, thanks!

@charmainehly hey char, thanks for sharing and looking it up! 😭 i totally understand! you are not understanding it wrongly. i'll follow your workflow in the future, probably ask you even then! 😛 i think i did git pull on the current branch i.e. 112-X. maybe that's the cause. ugh...! anyway thanks again!
btw, feel free to merge it in! 🚀


Getting stuck at 'BOOT'

I followed the instructions in the repo and generated the bit-stream, mcs file, prm file, and the bbl.bin file. When I boot up my VC707 I can see the CEP logo with some information and it continues to display the following:
INIT
CMD0
CMD8
ACMD41
CMD58
CMD16
CMD18
LOADING
BOOT
But then it just sits there. Is the VC707 supposed to have any additional hardware (like the FMC card)? All I am using is a VC707 w/ its power supply, JTAG cable, UART cable, and SD card. I am unsure why it is getting "frozen" in this state when the building of all the files was successful.

No, the CEP is built with the no-FMC option (VC707BaseShell) in ./hdl_cores/freedom/Makefile.vc707-u500devkit.  If the FMC was required and you didn't have it, you would even see what you see.
It sounds like your SD card is not properly formatted....
Did you go through the steps of "Building the CEP Diagnostics Software"???
... which ends in the following step?
sudo make DISK=/dev/<your SD card> vc707-sd-write

Is "" the name of the SD card (say sdb) or is it supposed to be the 1st partition (say sdb1). Also should the sudo make DISK=/dev/ format-boot-loader command be skipped (it is mentioned at the end of running "make -jN BOARD=vc707devkit_nopci all" in the terminal output).

Name of your SD card and yes, it should be sudo (given you are writing to a raw device
Example: sudo make DISK=/dev/sdc vc707-sd-write

Hahaha how silly, when I did that the first time it did not work. I just did it now and it is working! Thank you very much.


Throwing exception when there is no default property

The following code in NMR_ModelWriterNode100_Mesh.cpp throws an exception if there is no defaultProperty on a ModelMeshObject.  I'm trying to wrap my head around what this is and why it is required, is there any documentation on this?
// if there is a PID, but no DefaultProperty
if ( (pBaseMaterials) || (pNodeColors) || (pTexCoords) ) {
	if ( !(m_pModelMeshObject->getDefaultProperty()) ) {
		throw CNMRException(NMR_ERROR_MISSINGDEFAULTPID);
	}
}

I am upgrading some code from an old version of lib3mf to the latest version and this is the last piece of the puzzle.  If I disable this exception then everything works and I am able to write out seemingly working 3mf files.  Are they invalid?  Should I be setting the defaultProperty when I create the mesh?

The reason for this is "Chapter 4. Object Resources" in the core specification (https://3mf.io/3d-manufacturing-format/):
"If this object contains any triangles with assigned properties, the object MUST specify pid and pindex, to act as default values for any triangles with unspecified properties. If no properties are assigned at all, the choice for the properties of the object is left to the consumer."
I know that there are a lot of old files violating this part of the spec. However, all files that lib3MF produces must define this.
Yes, users need to specify a default property for meshes.

Hi Martin,
I'm dealing with something related I think.  Whenever I call lib3mf_defaultpropertyhandler_setcolorrgba or lib3mf_defaultpropertyhandler_setbasematerial it throws an exception and I don't understand why.  I saw something in the declaration, "Mixing properties needs the property extension API.", but I don't know what that is or if not having that causes the exception.  Can you please enlighten me?  Thanks.
Tim

Hi Martin,
Thanks.  That's exactly what I needed.  I missed that the argument for lib3mf_defaultpropertyhandler_setcolorrgba was a PLib3MFDefaultPropertyHandler.  Since I already had created a PLib3MFPropertyHandler for the mesh I was using that.  I have it fixed now, no exceptions and I'm getting default properties for the mesh object just fine.  Thanks again for your help.
Cheers,
Tim


[Bug]: TS 5.2+ fails if using nodenext module resolution and noEmitOnError is true

Version
29.1.1
Steps to reproduce
Set up your package as a module, and use any Typescript version greater than or equal to 5.2.2:
// package.json
{
  "type": "module",
  "dependencies": {
    "@types/jest": "^29.5.10",
    "jest": "^29.7.0",
    "ts-jest": "^29.1.1",
    "typescript": "^5.2.2"
  }
}

In your tsconfig.json, use nodenext module resolution, and set noEmitOnError to true:
// tsconfig.json
{
  "compilerOptions": {
    "module": "nodenext",
    "moduleResolution": "nodenext",
    "noEmitOnError": true,
  },
}

Set your jest config to use ts-jest:
// jest.config.js
export default {
  transform: { "^.+\\.tsx?$": ["ts-jest"] },
};

Set up a simple test with ts-jest:
// test.ts
it("should pass", () => expect(1).toBe(1));

Run it:
npx jest

Expected behavior
The test should pass (which it does on TS 5.1.6 and below).
Actual behavior
On TS >= 5.2.2, the test fails with the error:
Unable to process '/path/to/test.ts', please make sure that `outDir` in your tsconfig is neither `''` or `'.'`. You can also configure Jest config option `transformIgnorePatterns` to inform `ts-jest` to transform /path/to/test.ts

      at TsCompiler.getCompiledOutput (node_modules/ts-jest/dist/legacy/compiler/ts-compiler.js:173:27)

Downgrading to TS 5.1.6 allows the test to pass. Or setting noEmitOnError in tsconfig.json to false also allows the test to pass.
Debug log
ts-jest.log
Additional context
No response
Environment
System:
    OS: macOS 14.1.2
    CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
  Binaries:
    Node: 20.9.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.1.0 - /usr/local/bin/npm
    pnpm: 8.10.2 - /usr/local/bin/pnpm
  npmPackages:
    jest: ^29.7.0 => 29.7.0

Sounds like a duplicate of #4198

Thanks, I do get a different error than that issue, but it does seem to at least be related to #4198 and #4207, and in the comments for #4207 there's people mentioning the same error message I get (and the same solution, disabling noEmitOnError), so I'm going to close this.


Fixes for docs

Coverage remained the same at 70.887% when pulling ae67023a2ba343d1dc2ea5e870a07c36febbb2fc on eatonphil:fix-docs into baf954642ddddc7a451b85822055d3ecb8c4e1d7 on linode:master.

Coverage remained the same at 70.887% when pulling 88824313c8177c7addee62445eea858303698f4c on eatonphil:fix-docs into baf954642ddddc7a451b85822055d3ecb8c4e1d7 on linode:master.


help wanted: Facebook Messenger Chat Plugin

Hi @kirilkirkov
I am trying to add facebook customer chat features
I am a bit confused using FB's js link whether it should be in administrator's settings [Add google or other JavaScript to site] or hardcode in the home.php.
the facebook messenger chat plugin is as follows:

Tried both ways, still cant make it works(message pop-up doesn't show up).

@studuino  If you add messagner plugin in enabled template home.php must work. Check console log of browser for errors. Maybe the problem is in your plugin code.


Styles for android #1109

See example usage below:
this.map = plugin.google.maps.Map.getMap(div, {
    styles: [
        {
            "featureType": "all",
            "stylers": [
                {
                    "visibility": "off"
                }
            ]
        },
        {
            "featureType": "water",
            "stylers": [
                {
                    "visibility": "on"
                },
                {
                    "lightness": -100
                }
            ]
        }
    ]
});

When you send a pull request for new feature, please include both Android and iOS.

And also this plugin allows to user to change the map option using map.setOptions() method.
Please implement the property to the map.setOptions() also.
Thank you for your contribution 👍

I forgot to notify at here.
It's already implemented into v1.4.0-beta and v2.0-beta.
Check out here.
https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/1180#issuecomment-261125046
But thank you for sending a pull request anyway.


crash | fabric 1.20.1

im sure there is conflict with one of my mods but i don't know witch one cuz, before 1.0.0 version mod was working fine so idk
But heres log:
log.txt

Majrusz's Enchantments causes the newest update to crash. Better Nether and Goblin Traders might be incompatible too? Try deleting these mods, then if it's working fine you can try reinstalling better nether and goblin traders

Are you sure this is caused by Soulslike Weaponry? It doesn't mention it's name once in the crash log and it references onScheduledTick method which is used in fluids and chests... which this mod doesn't add.

yes you were right Majrusz's Enchantments was causeing issue. thx for help


improve dg

Codecov Report
Base: 61.87% // Head: 61.87% // No change to project coverage :thumbsup:

Coverage data is based on head (7ff3878) compared to base (d9ac71e).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #215   +/-   ##
=========================================
  Coverage     61.87%   61.87%
  Complexity      637      637
=========================================
  Files           112      112
  Lines          2371     2371
  Branches        314      314
=========================================
  Hits           1467     1467
  Misses          775      775
  Partials        129      129

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

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


PA2558_Group5_refactored code for cognitive complexity auth store

Breaking change

Proposed change

Type of change

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

Additional information

This PR fixes or closes issue: fixes #
This PR is related to issue:
Link to documentation pull request:

Checklist

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

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

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

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

[ ] The manifest file has all fields filled out correctly.
Updated and included derived files by running: python3 -m script.hassfest.
[ ] New or updated dependencies have been added to requirements_all.txt.
Updated by running python3 -m script.gen_requirements_all.
[ ] For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
[ ] Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

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

To help with the load of incoming pull requests:

[ ] I have reviewed two other open pull requests in this repository.

Code smell of the method is cognitive complexity. Same as two other methods, this method has a lot of branches which make it hard to understand. Even it has different responsibilities like set users and groups. The way this if-clauses used make it really hard to maintenance. Like the other method, I chose extracting methods rather than polymorphism due to the uncertainty and the close relations between them.

Good motivation and explanation. Specific to the refactored method. The code seems to work, however the CI tests fail. Some of the formatting and code style conventions are not followed.


build error    ERROR: An error occurred during the fetch of repository 'local_config_cuda':

System information
Linux Ubuntu 18.04

**Apollo installed from (source)
Apollo version ( 6.0):
Output of apollo.sh config if on master branch:master

Steps to reproduce the issue:

Please use bullet points and include as much details as possible:
I have installed CUDA 10.2 and can find cuda.h in the usr / local / cuda-10.2/include directory. But whether I use build or build_ GPU will report the same error.    ERROR: An error occurred during the fetch of repository 'local_config_cuda'

Supporting materials (screenshots, command lines, code/script snippets):
[@in-dev-docker:/apollo]$ ./apollo.sh build # 编译apollo源代码
[INFO] Apollo Environment Settings:
[INFO]     APOLLO_ROOT_DIR: /apollo
[INFO]     APOLLO_CACHE_DIR: /apollo/.cache
[INFO]     APOLLO_IN_DOCKER: true
[INFO]     APOLLO_VERSION: master-2021-11-19-ae651cbb0d
[INFO]     DOCKER_IMG: dev-x86_64-18.04-20210517_1712
[INFO]     APOLLO_ENV:  STAGE=dev USE_ESD_CAN=false
[INFO]     USE_GPU: USE_GPU_HOST=1 USE_GPU_TARGET=1
[ OK ] Running GPU build on x86_64 platform.
[WARNING] ESD CAN library supplied by ESD Electronics doesn't exist.
[WARNING] If you need ESD CAN, please refer to:
[WARNING]   third_party/can_card_library/esd_can/README.md
[INFO] Build Overview:
[INFO]     USE_GPU: 1  [ 0 for CPU, 1 for GPU ]
[INFO]     Bazel Options: --config=gpu
[INFO]     Build Targets: //modules/... union //cyber/...
[INFO]     Disabled:      except //modules/drivers/canbus/can_client/esd/...
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
(03:20:15) WARNING: The following configs were expanded more than once: [gpu, cuda, using_cuda, tensorrt]. For repeatable flags, repeats are counted twice and may lead to unexpected behavior.
(03:20:15) INFO: Current date is 2021-11-21
(03:20:18) INFO: Repository local_config_cuda instantiated at:
/apollo/WORKSPACE:6:20: in
/apollo/tools/workspace.bzl:83:19: in apollo_repositories
Repository rule cuda_configure defined at:
/apollo/third_party/gpus/cuda_configure.bzl:1266:33: in
(03:20:18) ERROR: An error occurred during the fetch of repository 'local_config_cuda':
Traceback (most recent call last):
File "/apollo/third_party/gpus/cuda_configure.bzl", line 1237, column 38, in _cuda_autoconf_impl
_create_local_cuda_repository(repository_ctx)
File "/apollo/third_party/gpus/cuda_configure.bzl", line 836, column 35, in _create_local_cuda_repository
cuda_config = _get_cuda_config(repository_ctx, find_cuda_config_script)
File "/apollo/third_party/gpus/cuda_configure.bzl", line 530, column 30, in _get_cuda_config
config = find_cuda_config(repository_ctx, find_cuda_config_script, ["cuda", "cudnn"])
File "/apollo/third_party/gpus/cuda_configure.bzl", line 507, column 41, in find_cuda_config
exec_result = _exec_find_cuda_config(repository_ctx, script_path, cuda_libraries)
File "/apollo/third_party/gpus/cuda_configure.bzl", line 501, column 19, in _exec_find_cuda_config
return execute(repository_ctx, [python_bin, "-c", decompress_and_execute_cmd])
File "/apollo/tools/platform/common.bzl", line 166, column 13, in execute
fail(
Error in fail: Repository command failed
Could not find any cuda.h matching version '' in any subdirectory:
''
'include'
'include/cuda'
'include/-linux-gnu'
'extras/CUPTI/include'
'include/cuda/CUPTI'
'local/cuda/extras/CUPTI/include'
of:
'/usr/local/cuda-10.2'
(03:20:18) ERROR: no such package '@local_config_cuda//cuda': Repository command failed
Could not find any cuda.h matching version '' in any subdirectory:
''
'include'
'include/cuda'
'include/-linux-gnu'
'extras/CUPTI/include'
'include/cuda/CUPTI'
'local/cuda/extras/CUPTI/include'
of:
'/usr/local/cuda-10.2'
(03:20:18) INFO: Elapsed time: 4.685s
(03:20:18) INFO: 0 processes.
(03:20:18) FAILED: Build did NOT complete successfully (18 packages loaded)
currently loading: modules/drivers/canbus/can_client/esd ... (146 packages
)

I have solved!  I running ./apollo.sh config -n in the apollo container, then build apollo successfully.

I have solved! I running ./apollo.sh config -n in the apollo container, then build apollo successfully. But I dont know why.

Thank u so so so so much !  good bro !!!!

Seems to be resolved, we will close this issue. If the problem persists, pls feel free to reopen it or create a new one and refer to it.


Quay Support

Would it be possible, to switch to quay or douplicate the build?
The clair container scanning feature is something what i really missing.

I'm not really familiar with Quay, is that similar to Docker Hub?

Yes, Prometheus and others are using them to :)

Do you want to provide some quick "how to" for that?


no issue, question about spam button

question; in the current rainloop version, what does the spam button do? does it in anyway integrate with sa or the like? or does it simply move the mail into a spam/junk folder with no further action? does it build it's own internal spam filtering database? just curious. thanks.

It only moves to the folder you set as spam folder in system settings. If you want to integrate with SA etc. you'll have to run sa-learn every once in a while or have your IMAP server trigger something when you move mail to the spam folder. There has been discussion about this before, I'm sure you can find the issue when you search a bit.
I (note I'm not a RainLoop developer) think it's not up to RainLoop to trigger some action. Especially because RainLoop and mailserver (and anti spam solution) do not have to run on the same server.

September 27, 2017 12:28 PM, "Ralf"<EMAIL_ADDRESS>wrote:

It only moves to the folder you set as spam folder in system settings. If you want to integrate
with SA etc. you'll have to run sa-learn every once in a while or have your IMAP server trigger
something when you move mail to the spam folder. There has been discussion about this before, I'm
sure you can find the issue when you search a bit.
I (note I'm not a RainLoop developer) think it's not up to RainLoop to trigger some action.
Especially because RainLoop and mailserver (and anti spam solution) do not have to run on the same
server.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

ok thanks. i was just curious. i'm not asking about any addt'l functionality. Roundcube which i've also used does have a plugin that offers direct sa integration for spam/ham learning on the fly.
--
Thanks,
Fabian S.
OpenPGP: 3C3FA072ACCB7AC5DB0F723455502B0EEB9070FC

https://github.com/RainLoop/rainloop-webmail/issues?utf8=✓&q=spam button


Add release-it configuration

By default release-it wants to publish the new release assets to the npm registry.  Since we're an app and not a lib, that doesn't make any sense for us.
In order to make releases easier to do in the future, let's add release-it configuration. e.g.
{
  "npm": {
    "publish": false
  }
}

The default release notes are still a bit overkill, but we could customize this in the future by using auto-changelog or something similar.


wagtail v4 new page issue

When trying to crate a new page in the example django app in the project the following error happens.
Seems to relate to the FormChooserBlock as when I comment out     form = FormChooserBlock() (line #45 in blocks.py) the page renders.
Can't seem to see what the issue could be. But this might be the only blocker for supporting version 4?
To reproduce, edit the setup.py to require wagtail==4.0.* docker-compose up then try to add a child page to the default page.
app_1  | Internal Server Error: /cms/pages/add/example/basicpage/2/
app_1  | Traceback (most recent call last):
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 55, in inner
app_1  |     response = get_response(request)
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py", line 220, in _get_response
app_1  |     response = response.render()
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/response.py", line 114, in render
app_1  |     self.content = self.rendered_content
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/response.py", line 92, in rendered_content
app_1  |     return template.render(context, self._request)
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/backends/django.py", line 62, in render
app_1  |     return self.template.render(context)
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 175, in render
app_1  |     return self._render(context)
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 167, in _render
app_1  |     return self.nodelist.render(context)
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 1005, in render
app_1  |     return SafeString("".join([node.render_annotated(context) for node in self]))
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 1005, in <listcomp>
app_1  |     return SafeString("".join([node.render_annotated(context) for node in self]))
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 966, in render_annotated
app_1  |     return self.render(context)
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/loader_tags.py", line 157, in render
app_1  |     return compiled_parent._render(context)
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 167, in _render
app_1  |     return self.nodelist.render(context)
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 1005, in render
app_1  |     return SafeString("".join([node.render_annotated(context) for node in self]))
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 1005, in <listcomp>
app_1  |     return SafeString("".join([node.render_annotated(context) for node in self]))
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 966, in render_annotated
app_1  |     return self.render(context)
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/loader_tags.py", line 157, in render
app_1  |     return compiled_parent._render(context)
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 167, in _render
app_1  |     return self.nodelist.render(context)
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 1005, in render
app_1  |     return SafeString("".join([node.render_annotated(context) for node in self]))
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 1005, in <listcomp>
app_1  |     return SafeString("".join([node.render_annotated(context) for node in self]))
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 966, in render_annotated
app_1  |     return self.render(context)
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/loader_tags.py", line 157, in render
app_1  |     return compiled_parent._render(context)
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 167, in _render
app_1  |     return self.nodelist.render(context)
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 1005, in render
app_1  |     return SafeString("".join([node.render_annotated(context) for node in self]))
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 1005, in <listcomp>
app_1  |     return SafeString("".join([node.render_annotated(context) for node in self]))
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 966, in render_annotated
app_1  |     return self.render(context)
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/loader_tags.py", line 63, in render
app_1  |     result = block.nodelist.render(context)
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 1005, in render
app_1  |     return SafeString("".join([node.render_annotated(context) for node in self]))
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 1005, in <listcomp>
app_1  |     return SafeString("".join([node.render_annotated(context) for node in self]))
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 966, in render_annotated
app_1  |     return self.render(context)
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/loader_tags.py", line 63, in render
app_1  |     result = block.nodelist.render(context)
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 1005, in render
app_1  |     return SafeString("".join([node.render_annotated(context) for node in self]))
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 1005, in <listcomp>
app_1  |     return SafeString("".join([node.render_annotated(context) for node in self]))
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 966, in render_annotated
app_1  |     return self.render(context)
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 1064, in render
app_1  |     output = self.filter_expression.resolve(context)
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 715, in resolve
app_1  |     obj = self.var.resolve(context)
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 847, in resolve
app_1  |     value = self._resolve_lookup(context)
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 914, in _resolve_lookup
app_1  |     current = current()
app_1  |   File "/usr/local/lib/python3.8/site-packages/wagtail/admin/panels.py", line 392, in render_form_content
app_1  |     return mark_safe(self.render_html() + self.render_missing_fields())
app_1  |   File "/usr/local/lib/python3.8/site-packages/wagtail/admin/ui/components.py", line 20, in render_html
app_1  |     return template.render(context_data)
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/backends/django.py", line 62, in render
app_1  |     return self.template.render(context)
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 175, in render
app_1  |     return self._render(context)
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 167, in _render
app_1  |     return self.nodelist.render(context)
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 1005, in render
app_1  |     return SafeString("".join([node.render_annotated(context) for node in self]))
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 1005, in <listcomp>
app_1  |     return SafeString("".join([node.render_annotated(context) for node in self]))
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 966, in render_annotated
app_1  |     return self.render(context)
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/defaulttags.py", line 238, in render
app_1  |     nodelist.append(node.render_annotated(context))
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 966, in render_annotated
app_1  |     return self.render(context)
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 1064, in render
app_1  |     output = self.filter_expression.resolve(context)
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 715, in resolve
app_1  |     obj = self.var.resolve(context)
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 847, in resolve
app_1  |     value = self._resolve_lookup(context)
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 914, in _resolve_lookup
app_1  |     current = current()
app_1  |   File "/usr/local/lib/python3.8/site-packages/wagtail/admin/ui/components.py", line 20, in render_html
app_1  |     return template.render(context_data)
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/backends/django.py", line 62, in render
app_1  |     return self.template.render(context)
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 175, in render
app_1  |     return self._render(context)
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 167, in _render
app_1  |     return self.nodelist.render(context)
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 1005, in render
app_1  |     return SafeString("".join([node.render_annotated(context) for node in self]))
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 1005, in <listcomp>
app_1  |     return SafeString("".join([node.render_annotated(context) for node in self]))
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 966, in render_annotated
app_1  |     return self.render(context)
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/defaulttags.py", line 238, in render
app_1  |     nodelist.append(node.render_annotated(context))
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 966, in render_annotated
app_1  |     return self.render(context)
app_1  |   File "/usr/local/lib/python3.8/site-packages/wagtail/admin/templatetags/wagtailadmin_tags.py", line 948, in render
app_1  |     children = self.nodelist.render(context) if self.nodelist else ""
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 1005, in render
app_1  |     return SafeString("".join([node.render_annotated(context) for node in self]))
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 1005, in <listcomp>
app_1  |     return SafeString("".join([node.render_annotated(context) for node in self]))
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 966, in render_annotated
app_1  |     return self.render(context)
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/template/library.py", line 237, in render
app_1  |     output = self.func(*resolved_args, **resolved_kwargs)
app_1  |   File "/usr/local/lib/python3.8/site-packages/wagtail/admin/templatetags/wagtailadmin_tags.py", line 876, in component
app_1  |     return obj.render_html(context)
app_1  |   File "/usr/local/lib/python3.8/site-packages/wagtail/admin/ui/components.py", line 15, in render_html
app_1  |     context_data = self.get_context_data(parent_context)
app_1  |   File "/usr/local/lib/python3.8/site-packages/wagtail/admin/panels.py", line 814, in get_context_data
app_1  |     rendered_field = self.bound_field.as_widget(attrs=widget_attrs)
app_1  |   File "/usr/local/lib/python3.8/site-packages/django/forms/boundfield.py", line 99, in as_widget
app_1  |     return widget.render(
app_1  |   File "/usr/local/lib/python3.8/site-packages/wagtail/blocks/base.py", line 552, in render
app_1  |     return self.render_with_errors(
app_1  |   File "/usr/local/lib/python3.8/site-packages/wagtail/blocks/base.py", line 546, in render_with_errors
app_1  |     block_json=self.block_json,
app_1  |   File "/usr/local/lib/python3.8/site-packages/wagtail/blocks/base.py", line 523, in block_json
app_1  |     return self._block_json
app_1  | AttributeError: 'BlockWidget' object has no attribute '_block_json'

I'm having the same problem.

The Problem here is, that wagtail reworked the BaseChooser Widget. Wagtailstreamforms created a FormChooser which inherits wagtails BaseChooser and overwrites the inner widget, which does not work anymore. I was not able to figure out how get the FormChooser to run again under the new circumstances but figured we could just a ChoiceBlock instead.
So here are the good news, at least for a hotfix inside your own Project.
In my case we use wagtail as a headless CMS and consume the API to represent the data in an external Frontend Application. In that case you can simply overwrite the FormChooser like so with a little helper function like so:
from wagtail import blocks
from wagtailstreamforms.blocks import WagtailFormBlock
from wagtailstreamforms.models.form import Form

def getFormblockChoices():
	choices = []
	forms = Form.objects.all()
	for form in forms:
		choices.append((form.id, form.title))
	return choices

class APIWagtailFormBlock(WagtailFormBlock):
	FORMBLOCK_CHOICES = getFormblockChoices()
	form = blocks.ChoiceBlock(choices=FORMBLOCK_CHOICES)

	def get_api_representation(self, value, context=None):
		if value:
			return YourFormSerializer(context=context).to_representation(value)
		else:
			return None

Keep in mind that a ChoiceBlock returns a string, which makes it neccessary to overwrite the serializer as well, since it is expecting a model instance and not a string representation of a model.
My ChoiceBlock returns the ID of the Form to grab the Instance we normally expect with the Object Manager like this:
from wagtailstreamforms.models.form import Form

form = Form.objects.get(id=obj['form'])

I bet that you could simply write a simple template tag that does exactly that if you are using wagtail the standard way to render your content.
Hope this helps at least for a quickfix and possibly with fixing the problem long term.
Greetings, Phil.

Thanks, this helps a lot, I've already forked this project locally and got it working w/ v3, but wanting to move to v4.
But we're not headless.
Haven't dived too deep, so excuse my ignorance, but that snippet is just for API, or will it also work for non-headless?

Hey @TonisPiip no worries,
It will work for your case as well, but as i already mentioned you probably need a custom template tag to deliver the form instance to your template.
I would try overwriting the formblock template (docs)
since the var "form" referenced in the original template will only hold the form id and not the form instance.
You could then define a template tag that finds your form instance and returns it to use that instance as a variable again.
I imagine the formblock template would look similar to this:
{% load custom_tags %}
{% find_form_instance form as form_instance %}

<h2>{{ value.form.title }}</h2>
<form{% if form.is_multipart %} enctype="multipart/form-data"{% endif %} action="{{ value.form_action }}" method="post" novalidate>
    {{ form_instance.media }}
    {% csrf_token %}
    {% for hidden in form_instance.hidden_fields %}{{ hidden }}{% endfor %}
    {% for field in form_instance.visible_fields %}
        {% include 'streamforms/partials/form_field.html' %}
    {% endfor %}
    <input type="submit" value="{{ value.form.submit_button_text }}">
</form>

and the provided logic inside your custom_tags.py should look similar to:
from django import template
from wagtailstreamforms.models.form import Form

register = template.Library()

@register.simple_tag
def find_form_instance(form_id):
    form_instance = None
    if form_id:
        form_instance = Form.objects.get(id=form_id)
    return form_instance

Thank you very much for your suggestions.
It's working for me on version 4 now.
Rather than redefine the template (that I had already customized), I think it's better to override the render method:
here's the original
ADD THIS to your models.py
from wagtailstreamforms.models.form import Form as StreamForm

class Version4WagtailFormBlock(WagtailFormBlock):
    form = blocks.ChoiceBlock(choices=((form.id, form.title) for form in StreamForm.objects.all()))

    def render(self, value, context=None):

        # Substitute form (containing only the id) with the actual form
        value['form'] = StreamForm.objects.filter(pk=value['form']).first()
        form = value.get("form")

        # check if we have a form, as they can be deleted, and we dont want to break the site with
        # a none template value
        if form:
            self.meta.template = form.template_name
        else:
            self.meta.template = "streamforms/non_existent_form.html"
        return super().render(value, context)

AND USE it like that in your StreamField
        ('form', Version4WagtailFormBlock(icon='tick-inverse', label="My awesome form")),

ah sweet the render method is a much better solution, thank you for the input :) also glad i could help.

from django.db import DatabaseError

from wagtail.blocks import ChoiceBlock
from wagtailstreamforms.blocks import WagtailFormBlock
from wagtailstreamforms.models.form import Form as StreamForm

class HackChoiceBlock(ChoiceBlock):
    "Dont make new migations depending on DB state..."

    def deconstruct(self):
        _constructor_kwargs = self._constructor_kwargs
        _constructor_kwargs["choices"] = []
        return ("wagtail.blocks.ChoiceBlock", [], self._constructor_kwargs)

    @staticmethod
    def get_choices():
        """
        Choices shouldn't access the db, or should be done lazily, however this is a hack in a hack
        Main issue is that this db access is causing linting and publish to crash as it can't access the db
        """
        try:
            return tuple(StreamForm.objects.values_list("id", "title"))
        except DatabaseError:
            return []

class FormBlock(WagtailFormBlock):
    """
    Wagatil v4 fix: https://github.com/labd/wagtailstreamforms/issues/200#issuecomment-1318933142"""

    form = HackChoiceBlock(choices=HackChoiceBlock.get_choices())

    def render(self, value, context=None):

        # Substitute form (containing only the id) with the actual form
        form = value["form"] = StreamForm.objects.filter(pk=value["form"]).first()

        # check if we have a form, as they can be deleted, and we dont want to break the site with
        # a none template value
        if form:
            self.meta.template = form.template_name
        else:
            self.meta.template = "streamforms/non_existent_form.html"
        return super().render(value, context)

This is my hacky solution for not having db changes make django want to make a new migration, as well as having it possible for django to start w/o having a working db connection all the time.

This might be overkill, but when ran into the same problem on a Wagtail 4.1.1 upgrade I pulled in https://github.com/wagtail/wagtail-generic-chooser and used it to create a streamforms chooser...seems to work
In wagtail_hooks.py
from generic_chooser.views import ModelChooserViewSet
from generic_chooser.widgets import AdminChooser
from wagtailstreamforms.models import Form

class WagtailStreamFormsChooserViewSet(ModelChooserViewSet):
    icon = 'form'
    model = Form
    page_title = 'Choose a form'
    per_page = 10

class WagtailStreamFormsChooser(AdminChooser):
    choose_one_text = 'Choose a form'
    choose_another_text = 'Choose another form'
    link_to_chosen_text = 'Edit this form'
    model = Form
    choose_modal_url_name = 'wagtailstreamforms_chooser:choose'
    icon = 'form'

    def get_edit_item_url(self, item):
        # There may be a better way of getting the edit url
        return f'/admin/wagtailstreamforms/form/edit/{item.pk}/'

@hooks.register('register_admin_viewset')
def register_wagtailstreamforms_chooser_viewset():
    return WagtailStreamFormsChooserViewSet('wagtailstreamforms_chooser', url_prefix='wagtailstreamforms-chooser')

Then in your blocks.py
from django.utils.functional import cached_property
from wagtail import blocks
from wagtailstreamforms.blocks import WagtailFormBlock as _WagtailFormBlock
from wagtailstreamforms.models import Form
from .wagtail_hooks import WagtailStreamFormsChooser

class WagtailStreamFormsChooserBlock(blocks.ChooserBlock):
    @cached_property
    def target_model(self):
        return Form

    @cached_property
    def widget(self):
        return WagtailStreamFormsChooser()

    def get_form_state(self, value):
        return self.widget.get_value_data(value)

class WagtailFormBlock(_WagtailFormBlock):
    form = WagtailStreamFormsChooserBlock()

@marts Thank you very much for the code.  I will be using it in my project in a while.
Have you testing it with wagtail v4.2? I would hope it would work

With the new release, 3.22, just should be fixed. Let me know if that version works for you @TonisPiip

@VdeJong Thanks for the release, just tested with 4.2 and it worked. I can't confirm if the choices issue exists or not as I suppressed new migrations on StreamField changes.
There's still some RemovedInWagtail50Warning which should be fixed though, but that's not a breaking issue


fix: allow experiences-sdk-react components/hooks to be imported in NextJS server components

Purpose
Allows importing code direclty from @contentful/experiences-sdk-react from NextJS server components.
Right now we have a workaround to import certain pieces from @contentful/experiences-core as importing them in a NextJS server component will throw an error. This fix allows those components to now be successfully imported from the main sdk.
Ticket: https://contentful.atlassian.net/browse/ALT-1010
Approach
I added use client directives to components that use anything from React that requires client side (useState, useLayoutEffect, etc..). This instructs Next that these are client components, and it will import them as such. This change should have no effect on other frameworks as the 'use client' directive should simply be ignored by them.
To get this to work, I had to change the rollup build to preserve the modules (and not bundle them), and to not exclude the directive.
Test Dev Build
You can test this out locally with a dev build by installing<EMAIL_ADDRESS>

Were you able to verify this fix with page router SSR? Does it render on the server correctly? I am a bit worried that adding use client to ExperienceRoot might make it render on client instead

Were you able to verify this fix with page router SSR? Does it render on the server correctly? I am a bit worried that adding use client to ExperienceRoot might make it render on client instead

Ya, I just ran through and looked at it again. It renders just as it did before. I think pages router simply ignores the 'use client' directive as thats a RSC construct, much like SPA frameworks do.


Generalize handling of required question errors

Description
Add required errors into the error map. Remove special logic that handles rendering required errors, and use general error rendering.
Release notes:
N/A
Checklist

[x] Added the correct label: < feature | bug | dependencies | infrastructure | ignore-for-release >
[ ] Created tests which fail without the change (if possible)
[ ] Extended the README / documentation, if necessary

Issue(s)
Fixes #3393

Codecov Report

Merging #3480 (9a0ddd0) into main (d28ca05) will decrease coverage by 0.01%.
The diff coverage is 65.21%.

@@             Coverage Diff              @@
##               main    #3480      +/-   ##
============================================
- Coverage     80.50%   80.49%   -0.02%
  Complexity     2397     2397
============================================
  Files           293      293
  Lines          9511     9520       +9
  Branches        647      649       +2
============================================
+ Hits           7657     7663       +6
- Misses         1602     1604       +2
- Partials        252      253       +1

Impacted Files
Coverage Δ

server/app/services/applicant/Block.java
91.22% <ø> (-0.30%)
:arrow_down:

...app/services/applicant/ValidationErrorMessage.java
57.14% <40.00%> (-42.86%)
:arrow_down:

...rver/app/services/applicant/question/Question.java
61.76% <70.58%> (+7.91%)
:arrow_up:

...rs/applicant/ApplicantProgramBlocksController.java
87.85% <100.00%> (+0.81%)
:arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Update functions-infrastructure-as-code.md

The WEBSITE_CONTENTAZUREFILECONNECTIONSTRING and WEBSITE_CONTENTSHARE settings are required on Linux Consumption plan.
as per: https://learn.microsoft.com/en-us/azure/azure-functions/functions-app-settings#website_contentazurefileconnectionstring

duplicate of https://github.com/MicrosoftDocs/azure-docs/pull/98802


Document StsAssumeRoleSessionCredentialsProvider usage

Resolves #647.
I've tried to stick to usual rust example code, but I had issues getting the rusoto_core library into my snippet. Please let me know if I should change anything. :)

I think https://github.com/rusoto/rusoto/blob/master/AWS-CREDENTIALS.md is the best place for the example at the moment.
This may go well into the gitbook over at https://github.com/rusoto/rusoto.github.io which is published at www.rusoto.org . 😄

I've updated my patch :)

Excellent, thank you.


Renames YoloDev.Dnx.* to FSharp.Dnx

Regarding https://github.com/fsprojects/fsharp-dnx/issues/8.
There's a reference to a YoloDev.Dnx.Json NuGet but I assume that's another project entirely.

First look looks good, though as the repository is just moved CI has not been set up yet. Give me a while to either fix that, or simply validate that everything still works :).

This currently does not build, but neither does master, and the error is the same, so I'm assuming everything is alright, and merging. Then I'll go try to make it build again.

Oh, and tanks for the contribution :).

No problem, I'd love to contribute more if needed :)
Regarding the build issues, I had trouble building because of the Microsoft.Dnx.Compilation NuGet package. It built fine when I copied https://github.com/aspnet/dnx/blob/dev/src/Microsoft.Dnx.Compilation/Caching/FileWriteTimeCacheDependency.cs into the project and removed the dependency

I'm getting a simple System.TypeLoadException: Could not load type 'Microsoft.Dnx.Compilation.IFileWatcher'. Probably something that was moved or removed in DNX.

https://github.com/aspnet/dnx/commit/1a222049e0973ae3971b57d8ea8cffbb9ca34bd0
Yeah looks like it

@jbfp if you want to stab at another simple issue, take a look at #7. Otherwise I'll probably do it this weekend.

Yeah I'll take a look


Implement Markdown support for Hover

Closes #322.
This implements rendering markdown in the Hover view, if the LSP supports sending it. Otherwise it continues rendering plaintext.

When trying to figure out how to implement it, I realized Druid provides a TextLayout (that uses the WgpuTextLayout) which provides useful features like getting the size of the text, which would have simplified my initial implementation of hover. This PR uses Druid's text layout rather than directly using Piet's.
The basic idea was primarily based around https://github.com/linebender/druid/blob/master/druid/examples/markdown_preview.rs (though, that uses a bit different code because of the differences between Lapce and mainline Druid).
I increased the default size of the hover box by 100px, because it felt cramped with headers. Like the comment says, it would be nice if this was configurable.
Current questions:

Should link coloration be put as editor.link? Something like hover.link could work, but it feels like it should be a general color for anything that renders a normal hyperlink.

Current issues (I'll open separate issues for these):

Strikethrough support. Lapce's fork of Druid was made before this commit https://github.com/linebender/druid/commit/f2e78abf6e1268b5eafdafa76eb2b8f5f3abb3b3 was put into mainline Druid, so I was unable to add strikethrough support at the moment. This is not too major, but it would be good to support it.
Links. This could have been implemented without too much issues, but probably would have required bringing in a link opener crate and so can be done in a separate PR. We might want to support links opening files in the editor, and jumping around in the markdown view (since you can make links to headers) as well.
Code highlighting. I think this shouldn't be too hard to implement with Syntax.

Responded to the various comments and applied fixes/changes.
Also,

Moved blockquote to config rather than a constant. Forgot about this. markdown.blockquote, since I felt like it didn't fit on editor, but I am honestly unsure where it should go. I gave blockquote a special color since the $greys weren't the most readable.
Forgot test it on light theme. Introduced a set text color to ensure it is the right color (I'm assuming Druid doesn't clear whatever cache it has when I change the text color to the same color).

Also, I forgot to note this

No image support currently. Possible to implement but probably not too major, since most documentation does not use images.

Think I need to rebase

Rebased