Implementing image reading functions

Proposal
We must have a function that reads images and converts it to a tensor in order to implement C++ datasets. I have written the said function here with OpenCV. But using OpenCV just to read images is an overkill.
I suggest that we implement functions that read a specific format (for example a function that reads png images using libpng). We can cover the formats that are used in the datasets that will be implemented.

I think this goes in the right direction.
A few things we should also discuss:

what should be the format that we will return from the image loading?

Should it be CxHxW or HxWxC?

The images are natively stored in HxWxC, but the default format we use in PyTorch is CxHxW

Should it be uint8 in 0-255 or float in 0-1?

we had plenty of complaints about weird handling of to_tensor and to_pil_image in many cases, we should try as much as possible to be consistent.

Can we make it work on both Windows and Linux / OSX?

if yes, then it would be a candidate for potentially replacing PIL in the future

should we have a separate function for reading and decoding?

we might want to have in-memory encoded images as a bytes string, and just decode it when needed
this means we might want to have a decode_image function, similar to TF, which is also supported by PIL

What formats do we want to support? JPEG / PNG / others?
What about images encoded with other data types, like int16 or float?

Here is what I think:

Input image: I think that it's better if we use 0-1 float values in our tensors because they are eventually turned into float when training and such. This way other data types like int16 and float can be turned into float. Also I have currently implemented CxHxW.  What is the point of keeping HxWxC?
Separating reading and decoding: I haven't used tensorflow so I don't know what are the benefits of separating reading and decoding of images.
Image formats: In the link that you provided tensorflow supports BMP, GIF, JPEG, PNG. I think that for now we should support formats that are enough for reading the image of datasets that are implemented.

I gave it a second thought, and I'm leaning towards the following:
Image format
float 0-1 vs original format
There have been a lot of feature requests from users about extending support for to_tensor and to_pil_image to handle particular edge cases. Those edge cases exist because of the implicit assumption that float should be in 0-1. But this breaks some things when people want to use uint16 images, which have larger range of values.
The original reason why we convert the images to 0-1 format is because we used to feed them directly as is to the network (with sigmoid / tanh activations), so having the image be in 0-1 would help training.
But since a while, we have been performing an image normalization step which consists of dividing by the std of the values. This means that, if we use such normalization, it doesn't matter if the float tensor is in 0-1 or 0-255, all it matters is that the normalization values are compatible with how the images are loaded.
This makes me think that we might want to have the images be returned the original range, be it 0-255 or larger for larger types.
I think we should also return the data in the standard type they have been stored (uint8 for most cases), because it uses less space and many operations can be efficiently performed on uint8 types.
CHW x HWC
I'm not 100% clear on this one. Maybe stick with HWC and let a transform perform the conversion?
reading and decoding
The benefits of separating reading and decoding is that we have more flexibility.
If the API only supports passing a file path, then we can't decode a bytestream that lives (encoded) in memory. I think this is an important requirement.
Image Formats
Agree that we should support the formats that are necessary for reading the images of the datasets that we implement.

I'm far from an expert but balancing the desire

to have something that is "standard" (no dependency on file format, backend library, ...) as output by default,
to be efficient (i.e. have something that is ideally "zero copy" after returning from the reading library), not lose information in preprocessing.

The cleanest way perhaps would be having a "one size fits all" recommended image reading function that returns a fixed dtype / layout. And then maybe "raw_read_someformat". A "raw" option could be another way, but I must admit I cringe thinking about the return dtype depending on an option.
I would probably be OK with non-contiguous layouts to be returned if it reduces the copying going on - as Francisco said, we usually have a normalization step and that would typically deal with non-contiguous inputs.

So adding it all together:

Supporting the image formats of our datasets.
Having a simple function that reads files into memory.
Having a function that reads raw image from memory and keeps type and size and HWC. Also having a function that reads all the formats desired and returns a fixed type and size but actually using the raw functions to read the datasets.

@fmassa @t-vi does this make sense?
I can start working on this after all of this is 100%.

OK. So these are the results and I have started implementing. Closing this.

what should be the format that we will return from the image loading?
Should it be CxHxW or HxWxC? - match image library format by default (e.g. PIL) with option to specify the format
Should it be uint8 in 0-255 or float in 0-1?  This should be uint8.  Eventually we'll support quantized/low precision training that won't be float.  Also, type conversions are ideally abstracted away / automatically done only when needed.
What formats do we want to support? JPEG / PNG / others? - by default support as many formats as possible, but allow for specific formats to be specified as an optimization.

I'm reopening this issue until we have the PRs merged in torchvision.
And I agree with @jguerin-fb comments, thanks for the feedback!

Hi everyone,
I am the author of ticket #1595 that seems to as for a subset of what you are discussing here and therefore is redundant.
I mostly agree with @fmassa  and @jguerin-fb  comments on the issue regarding separating decode and read functions and keeping the native format.
I would also suggest that we have the layout format of the read/decode match the pytorch default . So I suggest we keep  HxWxC as the output, here is why :

It will ease the learning curve for beginners getting started with torchvision.
This will allow for any downstream operation to be written in standard torch and help us with #1375.
Not depending of the image library format might ease the path to production for models built with torchvision especially once we make progress with #1375. The data pipeline that feed's the models once they are in production might be built in another programming language ( for efficiency, cost, legacy reasons etc...). Binding the input format to a specific python library would not help data engineering teams put models to production.

What do you think ?
One last node, having a separate decode function would also help with production use-cases especially if it's torchscriptable.
Thanks

Since this is reopened I should mention the related PR. This is the PR for this discussion that implements png format. It has been a long time since I worked on TorchVision.

Hi @r-zenine
@ShahriarSS has indeed sent a PR with PNG decoding, which he pointed out in the comment (thanks again @ShahriarSS for the PR).
I didn't have enough bandwidth to properly review the PR and get it merged, also because I wanted to get some extra feedback on people working on production to decide on convention.
I agree with everything @jguerin-fb said.
Next steps
Merge PNG PR from @ShahriarSS
I think a first step would be to build on top of @ShahriarSS PR, but instead adding the decoding function as an operator exposed via torchscript, like the video reading operator and others.
We would also need to check how to package the libpng so that it's visible to users building from source, or just downloading from pip / conda. This is something we will need to figure out.
Then, we would need a full set of tests comparing the result of the decoded image with PIL, to check that we don't regress in any aspect.
Add JPEG support
I think a natural next step would be to add support for JPEG as well. It's a widely used format and without it we can't do much. We should use libjpeg (and maybe link against libjpegturbo).
uint8 interpolation on HWC
PyTorch only currently supports interpolation with CHW, float tensors. In order to properly use HWC uint8 for data augmentation / transformation, we need to add support for it (maybe via memory_format). This is something that should probably go in PyTorch at some point, but could be kept in torchvision initially.
@r-zenine @jguerin-fb thoughts?

NHWC is now the recommended format for cuDNN performance (https://docs.nvidia.com/deeplearning/sdk/pdf/Deep-Learning-Performance-Guide.pdf).  Regardless, I agree there should be a memory_format option.  For example, NCHW used to be the optimal format for cuDNN and was the default for Caffe2.
I also agree that decoding should be its own operator.  For example, it's not uncommon to be given encoded image bytes in a request.  Moreover, in addition to having specific libraries for jpeg and png, I think we should have it optional to include something like imagemagik to handle the long tail of formats.

Hi Everyone,
Sounds like a good plan.
@fmassa , @jguerin-fb I could start working on the jpeg support while taking into account your remarks regarding the png PR.
I propose the following :

Link against libjpeg-turbo. I am not an expert in any way so correct me if I am wrong. I read that it leverages SIMD Ops which might result in better performance. I could also link against libjpeg your call !
I would keep reading and decoding separate and maybe provide a helper function to do both.
I would provide unit test to compare with PIL.
For the first implementation, I should preserve the libjpeg format.

I can dedicate some time to this every morning.
@fmassa , @jguerin-fb Any thoughts ?

Hi @r-zenine ,
I think this is fine, but I would start with the PNG support, so finishing on top of the PR from @ShahriarSS would be best. We would need to make some tests to ensure that no memory leaks are present, and figure out how to get the binaries shipped with libpng.

Hi @fmassa,
I'll do that.  @ShahriarSS can I add to your PR ?

Hi @fmassa,
I'll do that.  I'll start working on PNG support tomorrow.

I don't know what adding means in this context but right now if the PR gets reviewed I won't have the time to finish it (I'm very busy right now) so feel free to build on top of it. Let me know if you have any problems or maybe I can review the PR (if @fmassa agrees).

@ShahriarSS  That's what I meant. Thanks.

Sure, we will be reviewing the PR, and if @ShahriarSS could also help reviewing it it would be great.
One thing that was missing in the original PR which is absolutely needed is python bindings and tests (correctness and memory tests).

Hi @fmassa,
I just read the PR and I think I will build on top of it. Just to summarize, here is my understanding of the main items to do ( ordered by priority ) :

Generate Python Bindings for the read_png function.
Write a test suite in python to compare with PIL and fix implementation if necessary.
Once implementation is compliant with PIL. Check code to ensure memory safety.
Figure out a way to ship libpng with the binaries.
Add helpers functions to read files etc...

Did I miss anything ?
Thanks

@r-zenine this sounds good to me.
In order to generate the python bindings, you can have a look at https://github.com/pytorch/vision/blob/2e8bcf8ba48ea94e30a362e1a57e5e3de8dbd2d0/torchvision/csrc/vision.cpp#L42-L50
you can either directly add support for it in the torchvision ops namespace, or create your own registry, like we did for video in https://github.com/pytorch/vision/blob/2e8bcf8ba48ea94e30a362e1a57e5e3de8dbd2d0/torchvision/csrc/cpu/video_reader/VideoReader.cpp#L492-L500
I'd recommend trying to add it to the torchvision ops registry, instead of creating another registry.
Also, I would change the function signature of read_png to receive a torch::Tensor as input, where the tensor contain the raw bytes, instead of passing a void*.
Let me know if you have questions.

Hi @fmassa,
Sorry for the delay. I could not manage to spare as much time as I wanted to work on this.
I made some progress here. I am struggling to register the C++ ops and access them from python.
static auto registry =
    torch::RegisterOperators()
        .op("torchvision::nms", &nms)
        .op("torchvision::roi_align(Tensor input, Tensor rois, float spatial_scale, int pooled_height, int pooled_width, int sampling_ratio) -> Tensor",
            &roi_align)
        .op("torchvision::roi_pool", &roi_pool)
        .op("torchvision::_new_empty_tensor_op", &new_empty_tensor)
        .op("torchvision::ps_roi_align", &ps_roi_align)
        .op("torchvision::ps_roi_pool", &ps_roi_pool)
        .op("torchvision::decode_png", &image::png::decode_png)
        .op("torchvision::read_png_from_file", &image::png::read_png_from_file)
        .op("torchvision::_cuda_version", &_cuda_version);

What I am currently trying to do is to compile the c++ code. Then run python setup.py build then python setup.py install in a fresh virtualenv.
Then run this snippet:
import torch
import torchvision
torch.ops.torchvision.decode_png

I get the following Exception :
RuntimeError                              Traceback (most recent call last)
<ipython-input-5-57a8e67f406e> in <module>
----> 1 torch.ops.torchvision.decode_png

~/.pyvenvs/torchvision/lib/python3.7/site-packages/torch/_ops.py in __getattr__(self, op_name)
     59         # for overloads and raise an exception if there are more than one.
     60         qualified_op_name = '{}::{}'.format(self.name, op_name)
---> 61         op = torch._C._jit_get_operation(qualified_op_name)
     62         # let the script frontend know that op is identical to the builtin op
     63         # with qualified_op_name

RuntimeError: No such operator torchvision::decode_png

I might be missing something in the build.
Any thoughts ?
here the actual code : https://github.com/r-zenine/vision/commit/6c7586d2b79bc7c7300d9bc12276f5f18921c12b

Hi @fmassa ,
On another topic, the libpng project seems to be using cmake ( see here ).
We could add it as a sub-module and use the same strategy that is used in torch the ship libpng with the package.
What do you think ?

Hi @fmassa ,
On another topic, the libpng project seems to be using cmake ( see here ).
We could add it as a sub-module and use the same strategy that is used in torch the ship libpng with the package.
What do you think ?

Hi everyone,
Just a quick update message.
I had some time to work on the issue this week-end. The code is available here.
I've build upon @ShahriarSS initial code. I changed the decode_png function to take a Tensor and I've added a read_png_from_file function.  I registered the ops and wrote python bindings in torchvision.ops.
I need to write the unit tests. Once it's done, I'll submit the code for an initial review.
I am not happy with error handling and the quality of my error messages. Right now, if anything goes wrong I return an empty tensor with no additional information that could help the user debug. Am I allowed to used exceptions on the C++ ops code, I have not seen that used in the other ops in torchvision?
Thanks

Hi @r-zenine

We could add it as a sub-module and use the same strategy that is used in torch the ship libpng with the package

Adding libpng as a submodule is one option, but I would prefer if we could avoid it if possible (or else the users will have to build our own version of libpng). My thinking was to maybe use an approach similar to what Pillow do (for example https://pillow.readthedocs.io/en/latest/installation.html#building-from-source , I haven't looked in details yet).

Right now, if anything goes wrong I return an empty tensor with no additional information that could help the user debug. Am I allowed to used exceptions on the C++ ops code, I have not seen that used in the other ops in torchvision?

Yes, you can use torch exceptions, which gets properly translated into Python, see https://github.com/pytorch/vision/blob/227027d5abc8eacb110c93b5b5c2f4ea5dd401d6/torchvision/csrc/cpu/nms_cpu.cpp#L8-L11 for example (although AT_ASSERTM is deprecated in favor of TORCH_CHECK)

I need to write the unit tests. Once it's done, I'll submit the code for an initial review

Awesome, looking forward to the PR!

Hi @fmassa,
Thanks for the reply. I'll finish the PR, ask for an initial review then look at how Pillow is integrating libpng.
Have a good day!

Thanks a lot @r-zenine !

Hi everyone,
I am struggling a bit with the CI pipeline ( for Conda and windows ) on the Pr #1632.
Could anyone help me figure out how to fix it ?
Thanks

@r-zenine I'll have a look now

@fmassa Thanks !

@fmassa can we close this too ?

Yes. We have implemented JPEG and PNG, so I believe we can be closing this. For requests for other formats we can track it in different issues.


Update: MolotovTV.Molotov version 4.4.0

Removing old versions to reduce clutter
Microsoft Reviewers: Open in CodeFlow

/azp run


Optimization of computed value is not working any more

Vue version
>=3.4.15, 3.4.13
Link to minimal reproduction
https://play.vuejs.org/#eNp9kk1PwzAMhv9KlAudKN0m4DK2STDtMA6AAHGKhKrO3TratEqcbVLV/46T7KNFaKc29uvHr53U/LGqoq0BPuJjnaisQqYBTTUVMiuqUiGrmYI0ZElZVAZhGbJdjMn68JmnKSTIGpaqsmBXBLoSUsiklBqpxEhkE1sfDHs2TuiFRFDbOA+CHptMWS0k88KIggbY9YQNhWxCNhwMBq7Iw1JJpCCKolittCsl2bmTN/flEJPT+dAklUGrRa9FVaBALkHNWlZ919Z4XautTp73YOMdUHcUwo37fre0VTogFFUeI9DpDByxuv4zR9N48o1H+zU5Xde21Y37LSoPOWoaMM1W0UaXki7XmRfcNshyUK8VZrQAwQlnMzYX53m5e3YxVAbCYzxZQ/LzT3yj9zYm+JsCTXcKgp9ySLcE6NPzjxfY0/8pWZRLk5P6QvIddJkb69HLnoxcku2WzrlduCeaydWnnu8RpD4OZY1aZeP0gtPDnF0Y/Wz3NrpzdXRvtMXvLSjLpAVSIhre8+YXrugTTQ==
Steps to reproduce
See re-render count
What is expected?
re-render count should always be 1, you can choose<EMAIL_ADDRESS>and see.
What is actually happening?
If<EMAIL_ADDRESS>the re-render count always increases even if the computed value is unchanged.
System Info
No response
Any additional comments?
@johnsoncodehk implemented this feature in PR #5912

In your case, you access rerenderCount and mutate it immediately, this makes the effect always dirty, and then once you mutate the dependencies chain, this effect will always re-calc which is expected.


Support BDD tests

You mean Gherkin?

Yes, Gherkin style. It's probably supported by us already but we need to add some tests for extra verification, or add some rules if needed.

The bdd support in Robot Framework works so you can add Given/Then/When/And words before keyword name and it will matched. Both calls are equivalent:
Given My Keyword
My Keyword

From this point Robocop dont need anything extra to support BDD. But it could be possible to add rule for checking if someone used one of BDD keywords without name of keyword:
Given
Given   More Than One Space

Initially I was opting against it (someone could define Given keyword for some purpose). But recently there was question about it on slack when someone didnt know he was supposed to prefix keyword name with BDD keyword and he separated it with two spaces. I will create new rule for such situations.


[chip-level/entropy_src] Link bazel tests in testplan

This commit links two chip-level entropy_src tests to the bazel tag in the test plan.
Closes #20142
Closes #21391
Closes #20144

I ran all three tests on the FPGA and they all pass.

Thanks @h-filali.
@vogelpi We also need to cherry-pick these changes to Eealgrey_es_sival branch.


Cat Photos Step 27 allows wrong code to pass

Describe the Issue
This step is allowing code that does not meet the requirements to pass.
Affected Page
https://www.freecodecamp.org/learn/2022/responsive-web-design/learn-html-by-building-a-cat-photo-app/step-27
Your code
This passes:

Top 3 things cats hate:

flea treatment

thunder

other cats

Expected behavior
Step should not allow multiple ordered lists to pass. Should enforce that only one ordered list is used with three list items.
Screenshots
No response
System

Device: Desktop
OS: Linux Fedora 36
Browser: Firefox
Version: 108

Additional context
No response

Can this even be fixed? I searched through the files and folders (keywords such as "learn-html-by-building-a-cat-photo-app" and "step-17") and did not find the file to the page.

@brubru6707
Here is the file for this particular challenge
https://github.com/freeCodeCamp/freeCodeCamp/blob/main/curriculum/challenges/english/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5ef9b03c81a63668521804d2.md
Right now, this issue still has the status:waiting triage label on it.
It is best to wait for the core team members to triage this issue and open it up for contribution with a first-timers-only or help-wanted label. 👍

I think we could just add one more test here. "You should only have one ol element". Make it the fourth test. What do you all think?

This is a good idea, Tom 👍.

If you would like to fix this issue, please make sure you read our guidelines for contributing, we prioritize contributors following the instructions in our guides. Join us in our chat room or the forum if you need help contributing, our moderators will guide you through this.


Redesigning the Alt_Shcool logo

Would like to redesign the logo, so it fades out when the user scrolls down.

Do you know which tool that best work for this?

Do you know which tool that best work for this?

I would redesign the logo via CSS and then add some scripts to detect when the user scrolls down.

Let's chat on slack please @ChristIsEnough.


Add SvelteKit link options to navigation components when in anchor mode

Describe the feature in detail (code, mocks, or screenshots encouraged)
Navigation components can have a href property added to them that makes them into anchors. Problem is that you cannot add SvelteKit's link options to these anchors, causing in behavior that may not be wanted.
Given this is a SvelteKit specific feature, this might be better worded as allowing arbitrary properties to be added to Navigation components, but that sounds like a taller order 🤔
What type of pull request would this be?
Enhancement
Provide relevant links or additional information.
https://svelte.dev/docs/kit/link-options

@MrVauxs so these settings cascade or waterfall. Meaning if you set the data attributes on a wrapping parent element, all children within will adhere to the setting. In fact I believe the sv CLI's default configuration applies this preloading capabilities to the <body> element. Which means full coverage for the entire app by default.
If by chance someone wants to localize these, they can, they'll just need to do it on a wrapping element. I'd recommend this approach as I'm not sure the order of operations here. If SSR is enabled for example, it may be better to apply these to a "fixed" element on the page, rather than dynamically rendered component template.

You are right, a wrapper is the most appropriate option here. That solves my problem. Given the warnings about elements not being able to have certain properties I forgot that these options cascade.


[borderStyle='dotted'] React-Native 0.8, View's borderStyle='dotted' could not be effected.

Dear all,
React-Native 0.8, View's borderStyle='dotted' could not be effected.
how to fix it?

refer: github.com/chirag04/react-native-dashed-border and https://github.com/facebook/react-native/issues/840
Now that borderStyle is support for android, I would want to deprecate my module and have first class support for borderStyle in RN itself. BorderStyle in core would help coz then custom modules won't have to worry/reimplement supporting other view-border related properties.
It would make sense to add it for ios also ;)
cc @vjeux, @nicklockwood

Absolutely. Is it something you could implement as a pull request?

I just ran over the border codebase. Seem little complex for me. I'm absolute newbie to objective-c.
I just hacked my dashed-border module from stackoverflow examples. :(

Fair enough. I'll have a go at implementing it when I get a chance, but as you say, it's quite complex, so it may take a while before we can support it.

sure. Thanks. I will deprecate my module after your implementation is up.

Hi there! This issue is being closed because it has been inactive for a while.
But don't worry, it will live on with ProductPains! Check out it's new home: https://productpains.com/post/react-native/borderstyledotted-react-native-08-views-borderstyledotted-could-not-be-effected

This has actually been implemented on iOS already - we just forgot to close the issue.

Great :) I must have missed that. Marked as fixed on ProductPains!


$api usage

Hi @xinjie-zhang , @vimeshjs
Would you please share me more detail about $api, it looks magic but complex.
Thanks
Eric Xin

Yes. $api looks magic and is core of vimesh UI. You could study the source code for better understand the underlying mechanism. vimesh-headless heavily uses $api. There are many examples about $api usage in real cases.

Thanks


Don't show all sdk info when some sdks are not selected

Feedback from @chunyu3

If I don't select JS SDK, please don't show JS repo info


Get-DbaAvailabilityGroup not displaying host name

Summary of new feature
There is a warning message when the host is not known but the only thing that it says is
WARNING: [11:36:29][Get-DbaAvailabilityGroup] Failure. | No such host is known
Would it not be possible to echo the value of the host that is attempted being connected to so that you at least get that information output?
Latest version of dbatools as of writing
current version - 1.0.115

This is the connection failing:
$server = Connect-SqlInstance -SqlInstance $instance -SqlCredential $SqlCredential -MinimumVersion 11

$instance is the $SqlInstance that you provided to the command. What is your $SqlInstance?

Good point. Meanwhile you find the info in $Error[0].TargetObject.

I understand that it is the $instance in the case below that would be causing this, but what about when I have an array of 100 instances?  The error is generic and does not specify the particular instance in question which is what I would need.
$server = Connect-SqlInstance -SqlInstance $instance -SqlCredential $SqlCredential -MinimumVersion 11

Often there is a message: "Error occurred while establishing connection to $instance"
Will open a pull request soon ...

@cmuncan please complete a bug issue and provide the requested details.
The error message you are seeing is coming from SQL Server and not our command. So we do not have the direct ability to interject values in that string.

Sorry, but the "Failure" is definitly from dbatools and can be more detailed. Only "No such host is known" is not from dbatools.


Print the EFI certs in the state command

Part of https://github.com/kairos-io/kairos/issues/2484

non-efi system:

efi system:


Class Connection odbc not found.

I have checked system folder on codeigniter4 and I can't find any odbc driver, previously it was available on codeigniter3.
how it's work in codeigniter4? thankyou to anybody can help this issue.
Error
Class 'CodeIgniter\Database\odbc\Connection' not found.

ODBC driver is not yet supported. Drivers supported at the moment are: MySQLi, PostgreSQL, SQLite3, Oracle OCI8, SQL Server

See https://codeigniter4.github.io/CodeIgniter4/intro/requirements.html

how it's work in codeigniter4?

Port the Ci3's driver to CI4 and send a PR.
See https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md
But if you send the PR, I recommend you make small but working portion of the whole driver.
Big PRs are difficult to review and will not be merged soon. See #2487


Update class-and-style.md

add end-tag </div>

Hmm, I actually left off a closing tag intentionally. My reasoning was this was only the opening tag was necessary for a demo. With the closing tag, it implies a complete code example, which seems strange to me, as these classes don't really make sense on an empty div.
Does that make sense? Obviously it was confusing to some people, so I'm open to discussion. Is there another alternative that would be less confusing for everyone?

I could understand it why there was no closing tag.
However, considering consistency with other examples, I think it should be closed with a closing tag.
If we don't close with a closing tag, I think there are the following options:
<div> ... </div>

<div> something contents ...</div>


X

What are you trying to do here?

It looks like it was pulling in @ErinCall's changes over in https://github.com/github/hubot/tree/brain-mutation-log
This user has since been marked as spammy, and thus this PR too.


Add Smithsonian integration

Fixes

Fixes #318 by @annatuma
Description

This adds a script to ingest metadata about images from the Smithsonian Institution, and an Apache Airflow DAG (Directed Acyclic Graph) to run that script weekly.
Technical details

The relevant new (non-test) files are:

src/cc_catalog_airflow/dags/smithsonian_workflow.py
src/cc_catalog_airflow/dags/provider_api_scripts/smithsonian.py

Tests

The new script is extensively tested, and the tests are run automatically by a Github Action.
You can also follow the README.md to set up the development environment, and run the tests.  Finally, you can use the Airflow UI at localhost:9090 to run the smithsonian_workflow DAG, and turn on the tsv_to_postgres_loader to load the results (after quite some time) into the local DB, where they can be inspected.
Checklist

[X] My pull request has a descriptive title (not a vague title like Update index.md).
[X] My pull request targets the master branch of the repository.
[X] My commit messages follow best practices.
[X] My code follows the established code style of the repository.
[X] I added tests for the changes I made (if applicable).
[X] I added or updated documentation (if applicable).
[X] I tried running the project locally and verified that there are no
visible errors.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

NOTE TO REVIEWERS:
Apparently, the main new file, smithsonian.py, and its test file, test_smithsonian.py are too large to be loaded by default in the Github interface.  Please load them manually.


Can't delete forum topic

I found a bug to report
Steps to reproduce
awaite _telegramBotClient.DeleteForumTopicAsync(ChatId, messageThreadId, cancellationToken);
result:
Bad Request: TOPIC_NOT_MODIFIED
NuGet Package Version: v19.0.0-preview.4
problem in DeleteForumTopicRequest
public DeleteForumTopicRequest(ChatId chatId, int messageThreadId) : base("reopenForumTopic")
    {
        ChatId = chatId;
        MessageThreadId = messageThreadId;
    }

@oleksii-mykhniak nice one


Jnipp fixes

Fixing JNI null de-reference crash.

Thanks for this! I actually had just gotten essentially this patch submitted to Monado, but based on and including a few other small fixes https://gitlab.freedesktop.org/monado/monado/-/merge_requests/1032  I'll close this PR but will reference it in the changelog fragment for the one I submitted.


Fix handling a port number in URI

Properly handle a URI with port number.
The constructor that takes the authority needs one more argument.
// With previous implementation, this constructor is called
    public URI(String scheme, String host, String path, String fragment)
        throws URISyntaxException
    {
        this(scheme, null, host, -1, path, null, fragment);
    }

// With this PR, this constructor is called
    public URI(String scheme,
               String authority,
               String path, String query, String fragment)
        throws URISyntaxException
    {
        String s = toString(scheme, null,
                            authority, null, null, -1,
                            path, query, fragment);
        checkPath(s, scheme, path);
        new Parser(s).parse(false);
    }

Thanks for this, that is a frustrating constructor issue, nice catch.
Do you have a small test that could verify the behavior? I'm happy to accept this now, since I think this is a true bug, but it would be nice to have a test to avoid a regression in the future.

@cmhulbert thanks for the review. I sent another PR for the test.
https://github.com/saalfeldlab/n5-aws-s3/pull/30


fix for https://forum.opnsense.org/index.php?topic=4309.0;topicseen

the person who reported it, confirmed that this patch works

Merged, thanks!


fix command split on Windows

This project uses single quotes, it's worth setting up linting, pre-commit before committing to avoid these issues.

Thanks so much.

Thanks for the assistance through the entire process 😃
A release containing this fix would be helpful 🙏

A release containing this fix would be helpful pray

Will do next week, if I forget, please prompt me again.

Fine, thanks

Will do next week, if I forget, please prompt me again.

ping


Filtering files in directorry based on extension

Hello,
I'd like to have directory filtering based on extensions.
Have you already looked into it ? If not, do you mind if I try to do it in a fork ?
stF

Hi, thanks for the issue.
Filtering based on file extensions is already planned, but I haven't been able to further look into it yet.
However, I already have ideas. It should be possible to add several file filters from the backend, which the user can then select in a drop down at the bottom right. (Just like in most other file dialogs)
FileDialog::default()
    .add_file_filter("PNG files", Arc::new(|path| path.extension().unwrap_or_default() == "png"))
    .add_file_filter("JPG files", Arc::new(|path| path.extension().unwrap_or_default() == "jpg"))
    ...

You are welcome to implement a first iteration in a PR :)

You can use FileDialog::set_file_icon as a reference for file filters.

Made a PoC here: https://github.com/wiz21b/egui-file-dialog
I have reused the IconFilter struct but I find it awkwards... Rename it ? Make a copy of it ? Dunno
There's no GUI for that and frankly, I'm not sure to know how to proceed :-)

Some points:

Yep, you don't want to use the struct IconFilter directly, but your own. For example:  pub struct FileFilter {
      /// The display name of the filter.
      pub name: String,
      /// Sets a filter function that checks whether a given Path matches the criteria for this fiter.
      pub filter: Filter<Path>,
  }

The files should not be filtered when loading a directory (load_directory), but rather when iterating over an already loaded directory (DirectoryContent::filtered_iter). Otherwise, every time the user selects a different filter, we have to reload the entire directory, which takes too long.

I have some time today. If you want, I can implement it with the UI part and then you can say what you are still missing or what other features you would like :)

File filters are now implemented on develop with the PR https://github.com/fluxxcode/egui-file-dialog/pull/124
Let me know if you have any other suggestions :)


Update version from 0.0.107 to 0.0.108

This is an automated update of version in pyproject.toml. This action is performed by a Github Action from publish.yml.

updated version from 0.0.107 to 0.0.108, @SuleyNL pls review


Add format_checker option at schema.py validate _wrapper

I'd like to validate with jsonschema email, ipv4 option etc... However Tornado-JSON couldn't append format_checker option at @schema.validate.
So, please add format_checker option at @schema.validate.

Hi @kay-si,
Good idea. I will do that.

Thanks a lot :)

This has been added to master. Can you please install the latest commit from master and confirm that it is working for you? Thanks!

Yes, I'd checked it and worked it :)

Great!


Move export button into notebook toolbar overflow menu

Based on discussion at notebook sync this morning. The thought here is that this is not frequently used, so making it two clicks to access instead of one will not hurt users, and will also make the toolbar less crowded.

@claudiaregio In the long run we want this command to live in the file > export menu, but right now extensions do not have the ability to contribute to the file menu.

Fixed in main.

Looks right :)


GEODE-7164: Fix issue with IntelliJ Gradle import

When delegating build/run actions to IntelliJ instead of Gradle, IntelliJ 2019 fails to build geode with an error like "output path not specified for modules...". I was able to reproduce this issue on IntelliJ IDEA CE versions 2019.1.4 and 2019.2.1 (see JIRA ticket for details). The issue seems to occur when IntelliJ imports Gradle sub-projects as modules that have "Use module compile output path" checked but don't have an Output path specified.
The best solution I've found involves 2 parts. I tested this on both versions of IntelliJ 2019.

Set the Project compiler output as shown in this SO answer: https://stackoverflow.com/a/40675201.
Add inheritOutputDirs = true to the idea plugin configuration in ide.gradle. This causes IntelliJ to import gradle sub-projects with the "Inherit project compile output path" option checked by default. You may need to reimport gradle projects after making this change if you do not have auto-import enabled.

This PR addresses part 2 above. Part 1 has to be addressed manually as far as I'm aware.

Thank you for submitting a contribution to Apache Geode.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:

[x] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?

[x] Has your PR been rebased against the latest commit within the target branch (typically develop)?

[x] Is your initial contribution a single, squashed commit?

[x] Does gradlew build run cleanly?

Note:
Please ensure that once the PR is submitted, check Concourse for build issues and
submit an update to your PR as soon as possible. If you need help, please send an
email to<EMAIL_ADDRESS>

This is awesome!!

I am surprised this actually does anything. Are you switching between the Gradle builder and the IntelliJ builder? These parameters only effect the IntelliJ builder, which is all sorts of broken. Though to be fair, so is the Gradle builder but less so.

@pivotal-jbarrett yes, this only effects the IntelliJ builder. I'm wanting to use IntelliJ's builder because it's much faster than the Gradle builder when making small changes, e.g. for TDD. So far, this is the only issue I've seen that prevents me from using the IntelliJ builder. This works because the Gradle IDEA plugin affects how the IntelliJ gradle import happens — from the IDEA plugin site:

If you simply want to load a Gradle project into IntelliJ IDEA, then use the IDE’s import facility. You do not need to apply this plugin to import your project into IDEA, although if you do, the import will take account of any extra IDEA configuration you have that doesn’t directly modify the generated files — see the Configuration section for more details.

By default IJ invokes cleanTest when running a test. I don't understand why but after it creates te run configuration you can edit it to remove the clean targets and things go much faster.

By default IJ invokes cleanTest when running a test. I don't understand why but after it creates te run configuration you can edit it to remove the clean targets and things go much faster.

I usually end up with many run configurations because I may run tests one-at-a-time or a whole class at a time. It seems cumbersome to have to edit the run configuration each time. Is there a way to change the default Gradle test run configuration?

I usually end up with many run configurations because I may run tests one-at-a-time or a whole class at a time. It seems cumbersome to have to edit the run configuration each time. Is there a way to change the default Gradle test run configuration?

I haven't found a way to set the default. :(


Federation v2 support added

Add Support to Federation v2
apollo-federation-subgraph-compatibility - Passed

@patrick91 - apollo-federation-subgraph-compatibility Passed

@erikwrede - Can you please review the PR?

@arun-strollby great job! I'll have a look in the weekend, but the final word should be on @tcleonard or @patrick91, since they are more experienced with federation.

@arun-sureshkumar shall we also add support for @key(resolvable=True/False)? :)

@arun-sureshkumar shall we also add support for @key(resolvable=True/False)? :)

We can add this!! I will add this support soon and get back to you @patrick91 !!

@erikwrede do we have any strategy around docs for this repo?

@patrick91 Sphinx/mkdocs -Style docs and doc strings are fine for now. Still working on doc server access.
I'll push an intermediate GitHub pages docs pipeline soon, so documentation work can already begin right now.
It would be great if we had some docs for the new features.

@arun-sureshkumar shall we also add support for @key(resolvable=True/False)? :)

We can add this!! I will add this support soon and get back to you @patrick91 !!

@arun-sureshkumar let me know if you need any help with this 😊

@arun-sureshkumar shall we also add support for @key(resolvable=True/False)? :)

We can add this!! I will add this support soon and get back to you @patrick91 !!

@arun-sureshkumar let me know if you need any help with this 😊

I will work on this later this week, will update you the progress.

@arun-sureshkumar shall we also add support for @key(resolvable=True/False)? :)

This was added by the last pull request.

@patrick91
As per the suggestions, have incorporated the below changes in the implementation:

Made federation V2 support opt-in (enable_federation_2 argument in build_schema)
Added resolvable argument to @key directive
Added test case for compound keys
Renamed ‘from’ argument to ‘from’
Added validation for key fields in entity and extends(single, multiple and compound keys)
Added test cases for compound keys
Corrected Docstrings
Minor edits to Readme regarding compound keys

Please review the changes

@Meemaw best case would be to have some feedback from how your integration goes based on this PR 🙂
For now, the plan is to do another round of  reviews and go on from there. The main functionality should already be working.

@erikwrede I'll add reviewing this PR to my todos for this week :)
do we have an easy way to publish pre-releases on PyPI? It might make it easier to test this :)

@patrick91 @Meemaw we can push a new 3.1 alpha1 tag to pypi

I'm also going to make a port of https://github.com/strawberry-graphql/federation-demo to Graphene and see if all works well :)

Added some more comments. @arun-sureshkumar do you think we can keep tests for v1, I think we should make sure we don't break existing code 😊

Sure, lets keep the tests for v1.

Added some more comments. @arun-sureshkumar do you think we can keep tests for v1, I think we should make sure we don't break existing code 😊

Done 👍. Added v1 tests alongside current test cases.

Currently playing around with the PR for my final review and it's working great so far!
I have some minor remarks. We should discuss the behavior of the @shareable directive on interfaces:
@shareable
class ReviewInterface(Interface):
    interfaced_body = graphene.String()

class Review(ObjectType):
    class Meta:
        interfaces = (ReviewInterface,)

    id = graphene.ID()
    body = graphene.String()
    interfaced_body = graphene.String()

    def resolve_interfaced_body(self, info):
        return "".join(self.body, "interfaced")

Currently, this ignores the directive on the interfaces. According to the Federation Docs, starting from federation v2.2 this should not be allowed instead of ignored:

The @shareable directive is about indicating when an object field can be resolved by multiple subgraphs. As interface fields are not directly resolved (their implementation is), @shareable is not meaningful on an interface field and is not allowed (at least since federation 2.2; earlier versions of federation 2 mistakenly ignored @shareable on interface fields).

Since we are just introducing Federation v2 here, maybe we should adopt this behavior from the start to avoid making breaking changes later on. What do you guys think?

Correcting my above post, it seems like Interfaces in general do not work with the directives yet.
For example: inaccessible on graphene.Interface doesn't seem to work either, using strawberry federation as a working python reference:
@strawberry.interface(directives=[Inaccessible()])
class ReviewInterface:
    interfaced_body: str

@strawberry.type
class Review(ReviewInterface):
    id: int
    body: str

Resulting SDL:
type Review implements ReviewInterface {
  interfacedBody: String!
  id: Int!
  body: String!
}

interface ReviewInterface @inaccessible {
  interfacedBody: String!
}

Versus the SDL from my example above using @inaccessible instead of @shareable:
type Review implements ReviewInterface {
  interfacedBody: String
  id: ID
  body: String
}

interface ReviewInterface {
  interfacedBody: String
}

As a consequence, ReviewInterface is included in the stitched schema.
Seems like the Apollo Subgraph Compatibility test doesn't incorporate this case, which is probably why it was missed. Maybe it makes sense to add some additional tests specifically for Interfaces here.  On the other hand, I don't want to hold the release of this back if it's too much work to add.  What do you guys think? @patrick91 @arun-sureshkumar

gentle push, let's get this over the finish line 🙂 @patrick91 @arun-sureshkumar @adarshdigievo

@arun-sureshkumar @arunsureshkumar @adarshdigievo are you planning to update this PR or shall I take over? 😊

Patrick,
I will close this by end of this week.
Thanks,
Arun
On Tue, 21 Feb 2023 at 01:45, Patrick Arminio @.***>
wrote:

@arun-sureshkumar https://github.com/arun-sureshkumar @arunsureshkumar
https://github.com/arunsureshkumar @adarshdigievo
https://github.com/adarshdigievo are you planning to update this PR or
shall I take over? 😊
—
Reply to this email directly, view it on GitHub
https://github.com/graphql-python/graphene-federation/pull/4#issuecomment-1437506243,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEIAZMGF4ITLPMLB7676PC3WYPGFRANCNFSM6AAAAAAQ4DCYVE
.
You are receiving this because you were mentioned.Message ID:
@.***>

@arun-sureshkumar any update on getting this in?

@arun-sureshkumar let me know if you want us to update the PR 😊 happy to take over it :D

@arun-sureshkumar let me know if you want us to update the PR 😊 happy to take over it :D

Please check now, let me know your comments!

Currently playing around with the PR for my final review and it's working great so far!
I have some minor remarks. We should discuss the behavior of the @shareable directive on interfaces:
@shareable
class ReviewInterface(Interface):
    interfaced_body = graphene.String()

class Review(ObjectType):
    class Meta:
        interfaces = (ReviewInterface,)

    id = graphene.ID()
    body = graphene.String()
    interfaced_body = graphene.String()

    def resolve_interfaced_body(self, info):
        return "".join([self.body, "interfaced"])

Currently, this ignores the directive on the interfaces (i.e. it is not included in the SDL). According to the Federation Docs, starting from federation v2.2 this should not be allowed instead of ignored:

The @Shareable directive is about indicating when an object field can be resolved by multiple subgraphs. As interface fields are not directly resolved (their implementation is), @Shareable is not meaningful on an interface field and is not allowed (at least since federation 2.2; earlier versions of federation 2 mistakenly ignored @Shareable on interface fields).

Since we are just introducing Federation v2 here, maybe we should adopt this behavior from the start to avoid making breaking changes later on. What do you guys think?

This will not be allowed instead of ignored, updating the code.

Correcting my above post, it seems like Interfaces in general do not work with the directives yet. For example: inaccessible on graphene.Interface doesn't seem to work either, using strawberry federation as a working python reference:
@strawberry.interface(directives=[Inaccessible()])
class ReviewInterface:
    interfaced_body: str

@strawberry.type
class Review(ReviewInterface):
    id: int
    body: str

Resulting SDL:
type Review implements ReviewInterface {
  interfacedBody: String!
  id: Int!
  body: String!
}

interface ReviewInterface @inaccessible {
  interfacedBody: String!
}

Versus the SDL from my example above using @inaccessible instead of @shareable:
type Review implements ReviewInterface {
  interfacedBody: String
  id: ID
  body: String
}

interface ReviewInterface {
  interfacedBody: String
}

As a consequence, ReviewInterface is included in the stitched schema.
Seems like the Apollo Subgraph Compatibility test doesn't incorporate this case, which is probably why it was missed. Maybe it makes sense to add some additional tests specifically for Interfaces here. On the other hand, I don't want to hold the release of this back if it's too much work to add. What do you guys think? @patrick91 @arun-sureshkumar

This issue is fixed.

Awesome, thanks for the changes! Can we add some tests for the added behavior? Apart from that LGTM!

Awesome, thanks for the changes! Can we add some tests for the added behavior? Apart from that LGTM!

Sure thing!

Awesome, thanks for the changes! Can we add some tests for the added behavior? Apart from that LGTM!

Sure thing!

Please check and let me know if anything to be added.

@arun-sureshkumar @erikwrede I'll do a review in the couple of days 😊

Just tested this locally and it seems to work well :D @erikwrede what are the next steps for getting this released?

Thanks everyone for the amazing work on this! 🎉


Change/Add duration for timers to support progress

I'd like to use the Timer Bar Card (https://github.com/rianadon/timer-bar-card) to display the current light cycle. Currently the remaining time is measured in seconds and stored as state.
In order to support the timer bar, it would be beneficial to add more attributes to the timer according to this diagram (https://github.com/rianadon/timer-bar-card/blob/main/images/timerbar-config.png).
So for example:

StartTime
EndTime
Duration
Active State: On/Off

I see, so basically all information are there "somehow", in order to make the progress-bar work out of the box my suggested entity would be similar to a timer and would look like this (we just need the start and end date as new attributes)

With these attributes, the progress bar could look like that:

Would this be functionally distinct from the existing Remaining Time entity?

(I do notice that Remaining Time its missing from the README doc.  I'll add it)

Playing around with the card, I think I understand the ask.  I'll see if I can get it to work with what already exists using configuration.  If not, I can investigate what would need to be done to support something like this.

In my local dev environment, I created a new entity called next_state_change that is calculates a timestamp based on remaining_time and the current time in the timezone configured for the controller.  I was able to get it working.  Something like this what you're looking for?
type: custom:timer-bar-card
entity: binary_sensor.development_harness_light_state
end_time:
  entity: sensor.development_harness_light_next_state_change
debug: true

given no response, I'll assume this meets your needs based on my testing.   I have a few more features I want to knock out, but this will be included in the next release.

This is now available in 1.8.0

Oh wow, I somehow missed the responses here and just saw the new release! Wonderful and thank you so much for your contribution ;) 💪💪💪

@fritzrichter have you got the custom:timer-bar-card to work correctly with the new updated entitles of remaining_time and next_state_change.? If so, how did you configure the card?
I tried several card configurations to show the progress of whatever "timed" mode is selected (Schedule, Timer to On, Timer to Off, and Cycle) but keep running into issues. For example, the below configuration works with Timer to Off because the timer start time is based on the state changing to "on". However, this doesn't apply to Timer to On mode because the state remains "off" when starting.
  - type: custom:timer-bar-card
    entity: select.tent_001_port_003_state
    name: Timer
    duration:
      entity: sensor.tent_001_port_003_remaining_time
      units: seconds
    end_time:
      entity: sensor.tent_001_port_003_next_state_change
    guess_mode: false

Is there a way to have one timer card work with all "timed" modes or do I need to make separate timer cards for each one and figure out a way to establish a start time for each? I've also tried changing guess_mode to "true" as well as some of the other things suggested in the card documentation but nothing seems to work.

UPDATE: I've made some progress and think I've mostly figured this out (working on this was better than watching the Chicago Bears lose. 🤦♂🤷♂)
In short, if you only want to see the remaining time countdown "live" in the hh:mm:ss format without displaying the bar, there shouldn't be an issue. However, if you also want an accurate timer bar, there are still several issues I haven’t yet resolved. I'll do my best to explain them...

Each mode requires either a remaining time or an end time to keep the progress bar accurate, and a start time or duration time to display the length of the timer bar so that it’s proportionally correct.
By default, the card expects these times in either the 2021-09-07T20:24:13+00:00 format (used only by the new next_state_change entity) or the hh:mm:ss format. Other time formats can be specified using "units" or by setting a fixed time. However, several issues still remain, which I’ll explain later.
The easiest part to set up is the timer's progress bar. This can be done by using the next_state_change entity as the "end_time." A remaining_time entity is also listed as an option, but the timer card requires it to update every second to function properly, which it does not. If you only want the "live" countdown without a progress bar, this should be all you need.
The main issue lies in setting and displaying the correct overall length of the timer bar. This requires a start time or duration, which can be gotten in several ways.
One option is using "guess mode," but it’s incompatible with the AC integration for two reasons. First, if a mode is selected that starts with the state "off," there’s no basis for a time guess. Second, if a mode begins with the state "on," the system uses that as the start time but doesn’t adjust it if the "timed" settings change. The timer bar will remain as the initial start time guessed when the mode was selected.
Using "active_state" is another approach. This sets the start time to when the assigned entity becomes active; however, it has the same issues as guess mode. Instead, I used "active_state" in a different way. The timer card allows multiple entities to be configured in the same card so that each displays a separate timer bar. However, I only want the active one displayed. To do this I assigned a different active_mode entity to each "active_state" and used the "filter" function to hide the idle ones.
The final method is to assign a specific entity to the start time or duration. This is easy to do for the Timer to On and Timer to Off modes. Simply assign the timer_minutes_to_off or timer_minutes_to_on entity to the "duration" of the appropriate configuration. Then since it doesn't follow the default time formats, use units: minutes to specify the format.
However, this doesn’t work the same way for the Cycle and Schedule modes. Unlike the Timer modes, which have a single start and stop, these modes involve repetitive starts and stops, often with varying "on" and "off" times. This creates an issue because, as far as I know, there’s no way to differentiate between these instances and display the correct duration.
I may have made this explanation more confusing than it needs to be, so below is a working example for reference. Just swap out my entities with yours to see what I mean. The first two work fine. The second two are split into four so you could see how the different set times affect each. For Cycle mode there's no way to defernite between the duration of the time on or off.


0.4.0 Game freeze when open settings tab

only CCSE and CookieAssistant mod applied.
https://user-images.githubusercontent.com/3596447/133099340-1a6e91e6-3b76-4476-a6b5-23873196eb15.mp4

@Gillwindy
Thx reporting!
Can you give me the full save data (with mod data) when this bug happened?

May have entered the options before the Pantheon has finished loading, and the list of spirits is no longer loading.

May have entered the options before the Pantheon has finished loading, and the list of spirits is no longer loading.

How long am I supposed to wait until entering the settings panel?

I found that if go into the options with an account before unlocked Pantheon, game got frozen.
Fixed in 0.4.2, so wait a moment.


Chore/async local transcription

Summary
Makes local transcription asynchronous.

Why is this change needed?
The UI was hanging during local transcription.

What did you change?

Made a cmd-line script asyncVosk.ts that runs local transcription
Made the voskTranscribeFunction start the asyncVosk.ts script in a separate process using exec
Changed vosk so that the path to the Vosk DLL libs is passed into vosk, not retrieved from within vosk

Explain things which the reviewers are likely to need explaining. Remember that they didn’t write the code.

Used child_process.exec and not fork or spawn because I couldn't get them to work.

Testing details if applicable
Try interacting with UI during local transcription.

OS

[ ] Linux
[ ] MacOS
[x] Windows

Note this bug which exists for both cloud and local (but consequences for local are more severe).
https://github.com/MLVETDevelopers/mlvet/issues/390

Update: This is not working with the packaged app. Turns out child_process doesn't really work from inside an app packaged with asar.


Overriding the confirmation template not working

When passing the message[template] the value becomes content within the email. So everyone receives template: alsfjoewiarfwejofjhewaifjewiofcontact in their mail.
Docs
I've placed my templates within the /templates/_emails folder.
Tried direct files
{{ hiddenInput('message[template]', 'contact'|hash) }}
tried folder structures
{{ hiddenInput('message[template]', 'dist/html/contact'|hash) }}
Nothing works

I've found some strange stuff here...
I've tested the message[notificationTemplate] and that worked for the default notification
So i thought, lets try message[confirmationTemplate] and voila! that did the trick. It's now displaying the new templates.
Whats strange is that in the code i could not find this parameter.
From line 170
Line 182
So, or this code is outdated and composer is installing something more new??

Please see https://github.com/hybridinteractive/craft-contact-form-extensions/tree/v4?tab=readme-ov-file#overriding-the-confirmation-template. The main branch should be cleaned up, but the actual code comes from the branch v4 or branch v5 depending on craft version.

Ah, thanks for pointing out! i'm using v4, little confusing haha.
Another follow up question here.
These parameters are getting their way into the emails. Shouldn't this be stripped from sending?
The notification email now contains confirmationTemplate: 1643bfae7639758be6c9037252ba2f12a8e0a8da14d2ca4719fba7c03c6092f4/dist/html/contact

Yeah, that should be adjusted. Feel free to make a separate issue for that. In the meantime you could just call out each item you want to output in the template instead of looping and outputting all of them.


[tools] update tpcds test tools

Proposed changes
Issue Number: close #xxx

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall


dotenv.config is not a function

c:\StockAlertBot>npm start

><EMAIL_ADDRESS>start c:\StockAlertBot
> node main.js

file:///c:/StockAlertBot/utils/config.js:2
dotenv.config();
       ^

TypeError: dotenv.config is not a function
    at file:///c:/StockAlertBot/utils/config.js:2:8
    at ModuleJob.run (internal/modules/esm/module_job.js:110:37)
    at async Loader.import (internal/modules/esm/loader.js:179:24)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR<EMAIL_ADDRESS>start: `node main.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR!      C:\Users\James\AppData\Roaming\npm-cache\_logs\2021-01-26T23_45_16_239Z-debug.log

Any fix?

Hi. Did you run npm install? If so, what is your node version? You can check by running node -v.

Hi. Did you run npm install? If so, what is your node version? You can check by running node -v.

Hi. Did you run npm install? If so, what is your node version? You can check by running node -v.

Yes, node js v14.15.4

Hi. Did you run npm install? If so, what is your node version? You can check by running node -v.

Yes, node js v14.15.4

Can you check whether an .env file is present at the root  directory?

Can you check whether an .env file is present at the root  directory?

Can you check whether an .env file is present at the root directory?

Yes .env is present within the root

Can you check whether an .env file is present at the root directory?

Yes .env is present within the root

Not working for me as well, same error. Windows 10, same node js version same env at root

Not working for me as well, same error. Windows 10, same node js version same env at root

@PrinceS25 Fixed the issue, all you need to do is remove the semi colon from utils\config.js
import dotenv from 'dotenv'
dotenv.config()
export default {
email: {
service: process.env.EMAIL_SERVICE,
from: process.env.EMAIL_FROM,
pass: process.env.EMAIL_PASS,
to: process.env.EMAIL_TO
}
}

@PrinceS25 Fixed the issue, all you need to do is remove the semi colon from utils\config.js
import dotenv from 'dotenv'
dotenv.config()
export default {
email: {
service: process.env.EMAIL_SERVICE,
from: process.env.EMAIL_FROM,
pass: process.env.EMAIL_PASS,
to: process.env.EMAIL_TO
}
}

@CodeProjector Would you mind trying @SeanPagani solution if it works I can push a fix.

@CodeProjector Would you mind trying @SeanPagani solution if it works I can push a fix.

@CodeProjector Would you mind trying @SeanPagani solution if it works I can push a fix.

Hi I tested it... this is the result of the above fix

c:\>cd stockalertbot

c:\StockAlertBot>npm start

><EMAIL_ADDRESS>start c:\StockAlertBot
> node main.js

c:\StockAlertBot>```

@CodeProjector Would you mind trying @SeanPagani solution if it works I can push a fix.

Hi I tested it... this is the result of the above fix

c:\>cd stockalertbot

c:\StockAlertBot>npm start

><EMAIL_ADDRESS>start c:\StockAlertBot
> node main.js

c:\StockAlertBot>```

strange. here's my output. it takes about 20 seconds before the stock shows up.

<EMAIL_ADDRESS>start C:\Users\smp20\Desktop\StockAlertBot-main
node main.js

(node:4664) ExperimentalWarning: The ESM module loader is experimental.
11:43:36 AM: "MSI - NVIDIA Geforce RTX 3080 VENTUS 3X 10G OC BV - GDDR6X - PCI Express 4.0 - Graphic Card - Black/Silver" not in stock at Best Buy. Will keep retrying in background every 10 seconds
11:43:36 AM: "EVGA - GeForce RTX 3080 XC3 GAMING 10GB GDDR6 PCI Express 4.0 Graphics Card" not in stock at Best Buy. Will keep retrying in background every 10 seconds
11:43:36 AM: "EVGA - GeForce RTX 3080 XC3 BLACK GAMING 10GB GDDR6 PCI Express 4.0 Graphics Card" not in stock at Best Buy. Will keep retrying in background every 10 seconds
11:43:36 AM: "EVGA - GeForce RTX 3080 XC3 ULTRA GAMING 10GB GDDR6 PCI Express 4.0 Graphics Card" not in

strange. here's my output. it takes about 20 seconds before the stock shows up.

<EMAIL_ADDRESS>start C:\Users\smp20\Desktop\StockAlertBot-main
node main.js

(node:4664) ExperimentalWarning: The ESM module loader is experimental.
11:43:36 AM: "MSI - NVIDIA Geforce RTX 3080 VENTUS 3X 10G OC BV - GDDR6X - PCI Express 4.0 - Graphic Card - Black/Silver" not in stock at Best Buy. Will keep retrying in background every 10 seconds
11:43:36 AM: "EVGA - GeForce RTX 3080 XC3 GAMING 10GB GDDR6 PCI Express 4.0 Graphics Card" not in stock at Best Buy. Will keep retrying in background every 10 seconds
11:43:36 AM: "EVGA - GeForce RTX 3080 XC3 BLACK GAMING 10GB GDDR6 PCI Express 4.0 Graphics Card" not in stock at Best Buy. Will keep retrying in background every 10 seconds
11:43:36 AM: "EVGA - GeForce RTX 3080 XC3 ULTRA GAMING 10GB GDDR6 PCI Express 4.0 Graphics Card" not in

strange. here's my output. it takes about 20 seconds before the stock shows up.

<EMAIL_ADDRESS>start C:\Users\smp20\Desktop\StockAlertBot-main
node main.js

(node:4664) ExperimentalWarning: The ESM module loader is experimental.
11:43:36 AM: "MSI - NVIDIA Geforce RTX 3080 VENTUS 3X 10G OC BV - GDDR6X - PCI Express 4.0 - Graphic Card - Black/Silver" not in stock at Best Buy. Will keep retrying in background every 10 seconds
11:43:36 AM: "EVGA - GeForce RTX 3080 XC3 GAMING 10GB GDDR6 PCI Express 4.0 Graphics Card" not in stock at Best Buy. Will keep retrying in background every 10 seconds
11:43:36 AM: "EVGA - GeForce RTX 3080 XC3 BLACK GAMING 10GB GDDR6 PCI Express 4.0 Graphics Card" not in stock at Best Buy. Will keep retrying in background every 10 seconds
11:43:36 AM: "EVGA - GeForce RTX 3080 XC3 ULTRA GAMING 10GB GDDR6 PCI Express 4.0 Graphics Card" not in

Yeah mine doesnt even do that it cancels it right after `><EMAIL_ADDRESS>start c:\StockAlertBot

node main.js`

strange. here's my output. it takes about 20 seconds before the stock shows up.

<EMAIL_ADDRESS>start C:\Users\smp20\Desktop\StockAlertBot-main
node main.js

(node:4664) ExperimentalWarning: The ESM module loader is experimental.
11:43:36 AM: "MSI - NVIDIA Geforce RTX 3080 VENTUS 3X 10G OC BV - GDDR6X - PCI Express 4.0 - Graphic Card - Black/Silver" not in stock at Best Buy. Will keep retrying in background every 10 seconds
11:43:36 AM: "EVGA - GeForce RTX 3080 XC3 GAMING 10GB GDDR6 PCI Express 4.0 Graphics Card" not in stock at Best Buy. Will keep retrying in background every 10 seconds
11:43:36 AM: "EVGA - GeForce RTX 3080 XC3 BLACK GAMING 10GB GDDR6 PCI Express 4.0 Graphics Card" not in stock at Best Buy. Will keep retrying in background every 10 seconds
11:43:36 AM: "EVGA - GeForce RTX 3080 XC3 ULTRA GAMING 10GB GDDR6 PCI Express 4.0 Graphics Card" not in

Yeah mine doesnt even do that it cancels it right after `><EMAIL_ADDRESS>start c:\StockAlertBot

node main.js`

I had the same problem. Just update node to the latest version. It'll work :)

Thanks everyone for contributing!
@CodeProjector, is your original problem (dotenv.config is not a function) solved by adding a semicolon?

Issue was resolved. Needed to reinstall everything from start, including windows 10

i wa also getting same issue problem was that i had  written port = 8000 instead of const port = 8000

I got a error when I try to access env file.
dotenv.config();
^
TypeError: dotenv.config is not a function
at Object. (/home/savita/Desktop/TODO_API/index.js:4:8)
at Module._compile (node:internal/modules/cjs/loader:1159:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
at Module.load (node:internal/modules/cjs/loader:1037:32)
at Module._load (node:internal/modules/cjs/loader:878:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:82:12)
at node:internal/main/run_main_module:23:47
Node.js v19.0.0
[nodemon] app crashed -


Feature request: Search, filder and sort!

Feature request: Search, filder and sort!

Happy to accept a PR :)

@xavierdecoster this can be closed now.


Add feature example tests for the master branch

Similar to the already-established pull request version.

Job now green on master: https://source.cloud.google.com/results/invocations/b109013d-7572-4820-9a51-d74126080e14/targets

Excellent, thanks Jan!


Suspense with  #fallback not working

Version
4.0.4
Reproduction link
https://jsfiddle.net/4asozkj3/
Steps to reproduce
Go to the Foo route and you will see it does wait for the route to finish the promise, but it doesn't show the fallback.
Note that I tried two syntaxes, one with router-view v-slot (Component) prop and the other one with the simpler form of Suspense using router-view inside the Suspense #default slot, and neither of these works
Syntax form 1:
<Suspense>
  <template #default>
    <router-view />
  </template>
  <template #fallback>

Loading...

  </template>
</Suspense>

Syntax form 2:
<router-view v-slot="{ Component }">
  <Suspense>
    <Suspense>
      <template #default>
        <component :is="Component" />
      </template>
      <template #fallback>

Loading...

      </template>
    </Suspense>
  </Suspense>
</router-view>

What is expected?
When using Suspense with an async component (even router-view as a wrapper) you should see the #fallback while the component is getting resolved
What is actually happening?
No #fallback is showing while component loads

Suspense works well when using a normal import of a Component and using it directly in the template but not while using router-view
Maybe something changed that I'm not aware of, but couldn't find anything yet. Thanks in advance!

Duplicate of https://github.com/vuejs/vue-router-next/issues/560


KAFKA-1489: Global threshold on data retention size

Implemented a "log retention policy" based on keeping a certain
percentage of disk space free. In dynamic situations where topics
are added in unpredictable ways, the other log retention
parameters are not entirely sufficient to prevent out-of-disk
conditions from occurring. The new log.retention.disk.usage.percent
parameter provides this guarantee. It is applied after all the
other retention parameters are applied, at the end of each log
cleanup cycle. Oldest segments (across all topics) are pruned
until usage falls below this percentage of each disk's capacity.
The default value is 100, which effectively disables the feature.
This is my original work and I license the work to the project under
the project's open source license.
@junrao, @jkreps, @gwenshap

Thank you for working on this very important issue @bendrees.
This is a placeholder for me to take a look immediately after I'm done chasing down 0.10.0 blockers and docs :)
Since this adds a new configuration, I think we need a KIP (Kafka Improvement Proposal) to discuss the proposed change. You can read about KIPs here: https://cwiki.apache.org/confluence/display/KAFKA/Kafka+Improvement+Proposals
Let me know if you need help drafting a proposal.

Thanks for the response Gwen. I drafted some content for a KIP, but lack privilege to create the Wiki page (don't see a "Create" button in the page header as the instructions on the KIP root page suggest I should). My Confluence username is<EMAIL_ADDRESS>

Thats great, thank you!
I gave you "add page" privilege. Let me know if this didn't work.
On Fri, May 13, 2016 at 12:41 AM, bendrees<EMAIL_ADDRESS>wrote:

Thanks for the response Gwen. I drafted some content for a KIP, but lack
privilege to create the Wiki page (don't see a "Create" button in the page
header as the instructions on the KIP root page suggest I should). My
Confluence username is<EMAIL_ADDRESS>—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/apache/kafka/pull/1348#issuecomment-218973219

Created KIP-61:
https://cwiki.apache.org/confluence/display/KAFKA/KIP-61%3A+Add+a+log+retention+parameter+for+maximum+disk+space+usage+percentage

Thanks! You can start a discussion thread on the KIP (as mentioned in the
process wiki) whenever you are ready.
Few things I'd like to see discussed in the KIP is:

When applying this policy, replicas may stop being identical (if a
replica happened to be on a disk with a busier partition, it may have less
data than what should have been an identical copy). This can lead to weird
scenarios following leader elections and consumers who try to read entire
partitions. Reasonable limitation? Or something we should be concerned
about and try to address?

How does this interact with log compaction?

The JIRA you referred to mentions a new configuration "disk.full.policy" I
thought it was an interesting idea. We can have options like "discard
oldest" (your pr, essentially), "reject new data", and "do nothing" (which
essentially disables the feature). What do you think?

Gwen
On Fri, May 13, 2016 at 1:16 PM, bendrees<EMAIL_ADDRESS>wrote:

Created KIP-61:
https://cwiki.apache.org/confluence/display/KAFKA/KIP-61%3A+Add+a+log+retention+parameter+for+maximum+disk+space+usage+percentage
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/apache/kafka/pull/1348#issuecomment-219148230

Is this PR still being considered?

Is this PR going ahead, or is there an equivalent way to do this in kafka now?

Is this PR not going to be considered?


Feature Request: A GUI option for configuring and launching multiple instances in OSX + a "blunt" solution

I have 2 dropbox accounts (personal and a shared one) and I need to have both.
Thanks to the modifications made by Sam in latest versions (my request here https://github.com/SamSchott/maestral-dropbox/issues/87 )
it's possible to launch multiple versions of maestral by issuing in the terminal the following command [assuming you keep Maestral in default Apllications folder and Maestral (YourChoice) is the name of the sync folder]:
/Applications/Maestral.app/Contents/MacOS/main --config-name="YourChoice"
if you want to be able to close the terminal without killing the Maestral process, you can issue:
/Applications/Maestral.app/Contents/MacOS/main --config-name="YourChoice" &> /dev/null &
I attach a blunt solution made with automator,
If you want to change the folder name from Maestral (YourChoice) you should open it in Automator and manually change the string "YourChoice" to something different.
BTW:  If the profile "YourChoice" does not exist, first time configuration is launched.
Maestral YourChoice.zip

Thanks for the suggestion. Ideally, I would like a single GUI to handle multiple accounts, similar to what the official Dropbox app does for personal + professional accounts but without a limit in account numbers or types.
This would require a significant redesign of how the GUI is structured, both in visual layout and in the code. So it won't be coming soon. However, since GUI and the sync daemon are separate Python packages, anyone could pick this up if they like. There even is no need to write the GUI in Python...

Currently, the command would be:
(And I'm happy to report that works ;) )
/Applications/Maestral.app/Contents/MacOS/Maestral --config-name="YourChoice"

Open Terminal
Link a new Dropbox: maestral gui -c "personal"
Open the Maestral preferences and enable "Start Maestral on login"
Restart Terminal (this will quit the Maestral GUI)
launchctl load ~/Library/LaunchAgents/com.samschott.maestral.personal.plist

You can now quit Terminal and Maestral will continue to run.


[incubator/etcd] Migrate to statefulstate apiversion to apps/v1

StatefulSet in the apps/v1beta1 and apps/v1beta2 API versions is no longer served.
Migrate to use the apps/v1 API version, available since v1.9.
https://kubernetes.io/blog/2019/07/18/api-deprecations-in-1-16/
What this PR does / why we need it:
Statefulset is no longer served in app/v1beta2, which cause the error when helm install
  Error: Failed to render chart: exit status 1: Error: unable to build kubernetes objects from release manifest: unable to recognize
 "": no matches for kind "StatefulSet" in version "apps/v1beta2"

Thanks for the contribution. Any time a change is made to a chart the version needs to be incremented. Can you please update the version property in the _Chart.yaml` file.

is this a duplicate of https://github.com/helm/charts/pull/22955? I really don't care which gets merged, but one of them really does need to be merged. 22955 has been pending a while, not sure what is holding it up.


I want to use etcd as the backend for config server.

Hi, all:
I want to use etcd as the backend for config server. Does this spring-cloud-etcd support this function?

No, and a request like this would go in spring-cloud-config.

@spencergibb I do it by myself, but according to confidentiality agreement I could not push it to  github , may i show u in other way? by email?

If you can't provide it via a pull request and sign the contributor agreement, we're unable to accept the contribution.


Inference,how togenerate translations?

I write my code according to the tutorials,I can train it now,but when i want to generate translations,the code can not get an answer ,it just keep running for ever. Here is my code,just as the tutorilas:
SOS=99
EOS=16558
helper_infer=tf.contrib.seq2seq.GreedyEmbeddingHelper(embedding,tf.fill([batch_size],99),16558)
infer_decode=tf.contrib.seq2seq.BasicDecoder(decoder_cell,helper_infer,decoder_initial_state,output_layer=projection_layer)
outputs,_,__=tf.contrib.seq2seq.dynamic_decode(infer_decode,60)
translations=outputs.sample_id
trans=sess.run(translations,feed_dict=test_fd)
test_fd={<tf.Tensor 'q_input:0' shape=(?, 30) dtype=int32>: array([[   99,    99,    99, ...,    99,    99,    99],
[    0,    41, 13765, ...,  2046,   236,     0],
[    2,     0,  8719, ...,     5,     5,     0],
...,
[    0,     0,     0, ...,     0,     0,     0],
[    0,     0,     0, ...,     0,     0,     0],
[    0,     0,     0, ...,     0,     0,     0]]),
<tf.Tensor 'q_seq_len:0' shape=(30,) dtype=int32>: array([ 6, 15,  9, 10, 14,  6,  8,  6,  8,  9,  7, 23,  8,  8,  7,  8,  7,
9,  7,  7,  6, 10, 24, 13,  7,  8,  6,  9, 12,  7])}  #time_major
At first I think i should add the SOS and EOS to the test_fd,but It still can not get answers,it just can not stop.There must be many tf.while_loop,but i don't know how to solve the question.
Can anybody help me,thank you!

The program keeps running means that it has not finish the training.
And if you want to do inference, you can stop the training manually, and start the inference cmds:
python -m nmt.nmt \
    --infer_input_file=$INPUT_FILE \
    --infer_output_file=$OUTPUT_FILE \
    --ckpt=$CKPT_PATH \
    .. (other args)

You put your src seqs in $INPUT_FILE, and the result will be wrote to $OUTPUT_FILE.


[Feat]: Make a separate page for all blogs

Currently, we can see the blogs on the main home page, I would like to make an entirely separate page for blogs and by clicking on the main page's blog section, like "see more blogs" or something like that it will lead you to the blog page, where we can see them in a more clear format.
I would like to work on it under GSSOC'23

sure, please refer mantineUI docs- https://ui.mantine.dev/category/article-cards


Require pyOpenSSL for older Python releases

pyOpenSSL is a requirement for TLS 1.2 support in Python versions prior
to 2.7.9.

Current coverage is 96.18% (diff: 100%)

Merging #196 into master will not change coverage

@@             master       #196   diff @@
==========================================
  Files            14         14
  Lines           629        629
  Methods           0          0
  Messages          0          0
  Branches         71         71
==========================================
  Hits            605        605
  Misses           12         12
  Partials         12         12

Powered by Codecov. Last update d3fd778...acc3569


Add nsp

https://github.com/sindresorhus/awesome-nodejs/pull/523#discussion_r65940926

changed the link to the github repo and updated the description

ok second space gone :)


Building gems outside rails.... ?

Hello,
I use Ruby quite a lot, but exclusively for scripting and without Rails (I use it for scripting scientific computing and calling other programs)... so I basically know nothing about Rails and all its conventions.
Is it possible to build a gem using Helix without all the rails part? I started a new rust project, added the Helix crate, and when running 'cargo build' it obviously tells me that 'helix-runtime-0.6.0' must exist.
I understand this file is generated when 'bundle install' is executed on a gem... how can I generate it in my case?
THANKS IN ADVANCE!

Helix doesn't have any requirement on Rails, so it should work fine for you. you should start by creating a Gemfile with helix in it. Then run bundle install and bundle exec helix bootstrap .. That will create the setup you need. After that, you should be able to build with bundle exec rake build.

Wow, that was quick! Thanks very much!
I managed to move a bit forward, thanks. I did what you said: defined Helix as a dependency, ran bundle install (after a long while of fixing the Ruby DevKit), bundle exec helix bootstrap ., and when running bundle exec rake build I got the following error:
Unable to find helix-runtime-0-6-0.dll in $PATH
run rake helix:copy_dll to copy....

which I did, and I got:
Unable to find native bundle at C:/Ruby23-x64/lib/ruby/gems/helix_runtime-0.6.0/lib/native.so

and I noticed it was located on C:/Ruby23-x64/lib/ruby/gems/helix_runtime-0.6.0/lib/ helix_runtime/ native.so
I copied and pasted and everything seemed to be fine! until I
bundle exec rake build

and I got, again,
glare 1.0.0 built to pkg/glare-1.0.0.gem.
{}
cargo rustc --release
   Compiling libcruby-sys v0.6.0
error: failed to run custom build command for `libcruby-sys v0.6.0`
process didn't exit successfully: `C:\Users\German\Documents\glare\target\release\build\libcruby-sys-d19516c8797e1d79\build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'helix-runtime-0-6-0.x86_64.lib must exist when running. Set HELIX_LIB_DIR to ruby/windows_build for development.', C:\Users\German\.cargo\registry\src\github.co
m-1ecc6299db9ec823\libcruby-sys-0.6.0\build.rs:29
note: Run with `RUST_BACKTRACE=1` for a backtrace.

rake aborted!
native source doesn't exist, run `cargo_build` first; source=C:/Users/German/Documents/glare/target/release/glare.dll

Tasks: TOP => build
(See full trace by running task with --trace)

@germolinal dang, sorry about this! Didn't realize you were on Windows. Looks like probably another case of #84. The good news is that it is possible to get it to work (we run CI on Windows), I just have to figure out why it isn't working out of the box.

Thanks a lot! I will wait.... anxiously, haha.
Best,

Closing as a dup of #84, but this is definitely something we're actively investigating.


chore: remove namespace

Codecov Report
Attention: Patch coverage is 25.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 55.16%. Comparing base (6ff7df3) to head (b23d3b3).

Files with missing lines
Patch %
Lines

internal/scms/github/pullrequest.go
0.00%
5 Missing :warning:

internal/scms/github/commit_status.go
0.00%
1 Missing :warning:

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #70   +/-   ##
=======================================
  Coverage   55.16%   55.16%
=======================================
  Files          10       10
  Lines        1133     1133
=======================================
  Hits          625      625
  Misses        430      430
  Partials       78       78

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


Added github-action workflow for Spelling Checks in Docs.

Signed-off-by: Jonsy13<EMAIL_ADDRESS>
What this PR does / why we need it:
This PR will add Github-Action Workflow for Spelling-checks in the latest Docs.
Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes  : https://github.com/litmuschaos/litmus/issues/1943
Special notes for your reviewer:
Checklist:

[X] Fixes  litmuschaos/litmus#1943
[X] Signed the commit for DCO to be passed
[X] Labelled this PR & related issue with documentation tag

Merging this one. cc: @ksatchit


some concerns about our use of AMQP

Hello guys,
I'm 100% clueless about AMQP, rabbitmq and ruote-amqp, but I'm trying to help.
I saw some critics with respect to the way we use AMQP in ruote-amqp. I hope @lvader will voice his concerns in a more consistent way, but here's the gist of it:
https://twitter.com/lvader/status/113988973910691840
https://twitter.com/jmettraux/status/114064093777903616
https://twitter.com/lvader/status/115738021403426816
We certainly have something to learn.
Now, regarding

lvader: @jmettraux first idea is that relaying on default empty exchange might be not the best thing. Have you tried to use it with rabbitmq 2.x ?

What's wrong with this technique ? Is that totally un-khosher in AMQP ? Why would rabbitmq 2.x vs rabbitmq 2.x vs another-amqp-implementation matter ?
Cheers,
John

I am able to reproduce the error kad was talking about. Here is traceback:
Traceback (most recent call last):
File "/usr/bin/boss-participant-gerrit", line 190, in
sys.exit(main())
File "/usr/bin/boss-participant-gerrit", line 185, in main
run_participant(config)
File "/usr/bin/boss-participant-gerrit", line 140, in run_participant
config.get('obs_webui'))
File "/usr/bin/boss-participant-gerrit", line 35, in init
amqp_routing_key=amqp_settings['amqp_routing_key'])
File "/usr/lib/python2.7/site-packages/RuoteAMQP/participant.py", line 53, in init
auto_delete=False)
File "/usr/lib/python2.7/site-packages/amqplib/client_0_8/channel.py", line 843, in exchange_declare
(40, 11),    # Channel.exchange_declare_ok
File "/usr/lib/python2.7/site-packages/amqplib/client_0_8/abstract_channel.py", line 105, in wait
return amqp_method(self, args)
File "/usr/lib/python2.7/site-packages/amqplib/client_0_8/channel.py", line 273, in _close
(class_id, method_id))
amqplib.client_0_8.exceptions.AMQPChannelException: (403, u'ACCESS_REFUSED - operation not permitted on the default exchange', (40, 10), 'Channel.exchange_declare')
The code it's crashing on is this:
self._chan = self._conn.channel()
      # Declare a shareable queue for the participant
      self._chan.queue_declare(queue=ruote_queue, durable=True,
                               exclusive=False, auto_delete=False)

      # Currently ruote-amqp uses the anonymous direct exchange
      self._chan.exchange_declare(exchange="", type="direct", durable=True,
                                  auto_delete=False)

Any ideas how to fix it?

rabbitmq-server version is 2.6.1 and the exact line of code caused the crash is:
self._chan.exchange_declare(exchange="", type="direct", durable=True, auto_delete=False)

I will try to find some time next week to update ruote-amqp to the latest ruby amqp and then I'll try to work with something else than the default exchange.
Thanks for the details,
John

@bartosh ... that's the python ruote amqp client. This issue tracker is for the ruby side :)
For various reasons we don't have a sane bug-track location yet :(
Could you raise this on the mailing list and we'll look at it there.
@kad I've been discussing this with bartosh on the mailing list. The current model in ruote-amqp uses the 1:1 routing-key:queue relationship of a direct exchange and hence the terminology may be a tad fuzzy in places. This is sane and sensible. Permitting fanout at the AMQP level would result in multiple replies to the ruote engine and that would be bad. AMQP does permit multiple subscribers to a queue and we do use that.

@lbt, question is not about python or ruby code. In theory, those two codebases should work together without problems. The actual issue is that all current code in both implementations relays on assumption that you can create queue, and bind it to default exchange. This was possible in AMQP 0-8 standard, but in case of 0-9-1 server (like in rabbitmq 2.x+) it would refuse any tries to re-declare nameless exchange or explicitly bind any queue to nameless exchange. And it's also not the question of using type=fanout or not. Relying on default binding on the server side is really bad thing, as we can se from AMQP specs changes. The overall idea of this discussion is to have possibility to have queue name and routing key different. E.g. for debugging or logging purposes you can have participant that would be receiving copies of work items but do not send replies. As soon as you start having these cases, all other pieces of code fall as house made of playing cards.

my 2 cents:
Exchange would be also good to specify. This would increase flexibility and scalability a lot.

@kad They did - and do - work together without problems on AMQP 0.8 which is what they were written for and tested on. At the time it was a part of the spec and was supported. 0.8 had the concept of a virtual host which meant that using the default exchange on a specific virtual host made sense and was the recommended solution iirc.
Now the spec has changed and virtual hosts are deprecated, I quite agree about the exchange thing ... you may notice that the comments in the python code were a little suspicious of the default exchange thing at the time. Now I know the codebase better I'm happy to agree it's not the best choice and ruote-amqp should use a well known exchange ("ruote" ?) which could be overridden.
On the other matter , you said "consumers should have their own, exclusive queues bound to the same routing key/exchange." - that sounded like a one to many == fanout-like arrangement so I apologise if that's not what was meant. I discussed your problem with Ed on private mail and it won't work with ruote as each participant would attempt to reply_to_engine against the same workitem.
I would advise against hijacking the ruote-amqp transport as a hackish way to send workitems elsewhere for logging. Ruote has a trace capability already and we're looking to use that.
So "to have queue name and routing key different" doesn't make sense for the ruote-amqp workitem distribution protocol IMHO. Of course that doesn't mean that it is wrong for other uses.

@lbt David, forget everything that you discussed with Ed on private matter. I'm speaking about generic good programming practice which says that program should not relay on uninitialized defaults if those defaults can be changed in underlying layers without warning. Correctly working AMQP client should have following parameters: hostname, tcp port, username, password, vhost, exchange, queue, routing_key. Relying on any of those parameters on defaults (or default bindings) would lead to problems. If not now, then later.

Moving on:  http://groups.google.com/group/openwferu-users/browse_thread/thread/d4a23a3fa841a11e


Dereferencing nested arrays

I have an array of references, and in ^0.15.9 I am unable to qroq an array of references.
Given the following configuration...
const singleton = q(/* groq */ `*[_type == "event"][0]`, {
   isArray: false,
}).grab({
   title: q.string(),
   hosts: q('hosts', { isArray: true })
      .deref()
      .grab({
         _id: q.string(),
         name: q.string(),
      }),
});

It outputs this query:
*[_type == "event"]{
   title,
   "hosts": hosts->{ _id,  name }
}

Which treats hosts as an object despite passing { isArray: true }.
I have tried manually setting q('hosts', { isArray: true }) to q('hosts[]', { isArray: true }), however this is ignored with and without the isArray option.
I believe the correct output for this should be:
*[_type == "event"]{
   title,
   "hosts": hosts[]->{ _id,  name }
}

Note the [] before dereferencing with ->.

Not sure about this isArray flag but a tip:
I would write this in a more "groqd" way like this:
const singleton = q("*").filter("_type == 'event'").slice(0).grab({
   title: q.string(),
   hosts: q('hosts')
      .filter()
      .deref()
      .grab({
         _id: q.string(),
         name: q.string(),
      }),
});

In my head I break down the words so filter() = [] and deref() = ->

@heggemsnes I understand that mental model, but my point is that it's at odds with another part of the api that encourages you to communicate that this data being fetched is an array of values... but making use of that in this case causes issues.
https://formidable.com/open-source/groqd/query-building#starting-with-an-array
To clarify - I just think there should be consistency in how queries should be made.

@carbonrobot thabk you for the thorough explanation!


Class instance methods should get highlighted as methods

class Person {
    walk = () => {}
    run() {}
}

walk should be green like run.

Seems to be working for me with latest version of https://marketplace.visualstudio.com/items?itemName=ms-vscode.typescript-javascript-grammar.

@sheetalkamat do we need to make changes to the theme file for sublime?

I guess it's an issue with the Monokai theme in VSCode. Light+ works as you shown.
Shouldn't walk and run have the same color?

We currently do not check if declaration of variable/fields is arrow or function expression to give them 'function' scope. They are treated as 'variables'.

@mhegazy: Sublime theme does not color variables. and walk is field while run is method.