chore: coverage test report

Description

Add per pull request code coverage report generation.

Required github action : https://github.com/marketplace/actions/jacoco-report
Required library : https://github.com/jacoco/jacoco
Why?

There is no way to monitor the code coverage increase of decrease, in order to maintain high quality code, we want to have a tool allowing us to monitor the changes.

Links to related issues

Fixes LD-XXX
Not covered by the PR: LD-XXX
Possible improvements: LD-XXX

Demo

Before the PR
After the PR

Documentation

Link to documentation: Add link here
Link to figma: Add link here
Add here other useful documentation links that are useful for PR reviewer

Checklist

[ ] New functionality is covered by Analytics events
[ ] Analytics events are documented
[ ] Analytics dashboard is updated
[ ] Functionality covered by unit tests
[ ] I have manually tested if the code works

Overall Project
84.17% -0.15%
:green_apple:

Files changed
0%
:x:

File
Coverage

AuthRepositoryImplTest.kt
88.06%
:green_apple:

FakeAuthRepository.kt
50% -26.92%
:x:

Overall Project
84.32%
:green_apple:

There is no coverage information present for the Files changed

Overall Project
84.32%
:green_apple:

There is no coverage information present for the Files changed

Overall Project
84.32%
:green_apple:

There is no coverage information present for the Files changed

Overall Project
44.49%
:x:

There is no coverage information present for the Files changed

Overall Project
21.04% -0.01%
:x:

Files changed
72.73%
:x:

File
Coverage

AuthDataSource.kt
100%
:green_apple:

AuthFailureHandler.kt
95.45% -4.55%
:x:

Overall Project
21.01%
:x:

There is no coverage information present for the Files changed

Overall Project
21.01%
:x:

There is no coverage information present for the Files changed

Overall Project
31.33%
:x:

There is no coverage information present for the Files changed

Overall Project
31.33%
:x:

There is no coverage information present for the Files changed

Overall Project
31.32%
:x:

There is no coverage information present for the Files changed

Overall Project
31.33%
:x:

There is no coverage information present for the Files changed

Overall Project
31.32%
:x:

There is no coverage information present for the Files changed

Overall Project
68.57%
:x:

There is no coverage information present for the Files changed

Overall Project
72.41%
:x:

There is no coverage information present for the Files changed

Overall Project
71.45% -0.34%
:x:

Files changed
64.91%
:x:

File
Coverage

ReviewersViewModel.kt
95.26%
:green_apple:

PullRequestsViewModel.kt
88.2% -3.87%
:x:

Overall Project
70.83% -1.38%
:x:

Files changed
43.54%
:x:

File
Coverage

ReviewersViewModel.kt
93.56% -1.78%
:x:

PullRequestsViewModel.kt
82% -11.04%
:x:


Allow salesChannelId to be missing

nwdxxItRechtConnector seems to create an entry without the salesChannelId, which is okay to do, but I get
[ErrorException]
Warning: Undefined array key "salesChannelId"

Hey @JoshuaBehrens
wohooo, perfect, totally fine with that, thanks for your great help :)

thanks :)


Add ability to go back one level in breadcrumb

If I am in code where the breadcrumb shows this:

I'd like to have a keybinding that when pressed will go back 1 level so I will be here:

Perhaps this is already possible? If not, please add it.

Only a sequence of shortcuts is available: Cmd+Shift+; ⏭ ArrowLeft ⏭ Space

Cmd+Shift+ on mac will increase font size. What is the command name?

Cmd+Shift+ on mac will increase font size.

Not Cmd+Shift+ but Cmd+Shift+;

Yeah just realized it. Thanks. 😻


Image not centered when zooming

I'm having an issue where zooming does not center on a point as it's supposed to.
Basically, I hold the mouse over a point in the image and although it zooms ok, it is not centered and the point I held my mouse over moves off in a diagonal direction.
My question is, what within the SVG might cause this?
I can't share the SVG unfortunately as it's a government project.
Any clues to solving this would be appreciated.
I'm using basic instantiation: mapPanZoom = svgPanZoom('svg');
It's worth mentioning that I have tried with a less feature rich jQuery plug in and that works ok as far as centering goes.

Unfortunately without an example we can't do anything as our basic examples work.
If you can't share the entire SVG maybe you can remove all the sensitive information from it and use some dummy content?


Error downloading video

$ ytdl https://www.youtube.com/watch?v=qD8hOJoOGtk
INFO[0000] Fetching video info...
FATA[0000] Unable to fetch video info: Error extracting json

No debug log produced when adding the -d option:
$ ytdl -d https://www.youtube.com/watch?v=qD8hOJoOGtk
INFO[0000] Fetching video info...
FATA[0000] Unable to fetch video info: Error extracting json

Doesn't work because of age-restricted content, not sure yet if there is a way to get around it


add challenge/response

this is based on PR #12 with the following difference:
instead of adding a --unlock option to lglaf.py I use an own executable.
The reason is that within download mode you need to authenticate
only ONCE ( - IF you need to) and afterwards you're able to exec every
other action like partitions.py etc without doing it again (until you reboot
into download mode again ofc).

The review comments from the other PR still applies, e.g. python 3 compat. Maybe consider giving @snoremaster3000 credit in the header of the new script for the discoveries?

Hey, I think I based my script on @joeblowma 's C version. I remember doing some reversing on it but I wasn't able to get the complete algorithm and he shared so I went ahead and just translated it (kind of poorly too, I'm not an experienced coder). So I think he should get the credit.
Thanks,

This got taken care of in #27, if there are any issues please open a new issue.


'NoneType' object is not callable

Hi Peter, I've noticed the following exception happening:
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 859, in emit
    msg = self.format(record)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 732, in format
    return fmt.format(record)
  File "/Users/geo/code/cx/lib/python2.7/site-packages/coloredlogs/__init__.py", line 891, in format
    copy = Empty()
TypeError: 'NoneType' object is not callable

I'm using a 3rd party package, happybase, and in the __del__ method, it's calling close, which is doing this:
    def close(self):
        """Close the underyling transport to the HBase instance.

        This method closes the underlying Thrift transport (TCP connection).
        """
        if not self.transport.is_open():
            return

        if logger is not None:
            # If called from __del__(), module variables may no longer
            # exist.

            logger.debug(
                "Closing Thrift transport to %s:%d",
                self.host, self.port)

        self.transport.close()

From what I've been able to tell, Empty() no longer exists, because the garbage collector already disposes it. Would adding such an if test to format, like the guys from happybase did,  be the way to go?

Hi George and thanks for the clear explanation. I haven't been able to reproduce the problem you reported and in fact I can't even find clear relevant details about how Python's garbage collection works. Nevertheless I did push a new release (7.0.1) that intends to fix this, if the following assumption of mine is correct:
So Empty is None because module variables have already been garbage collected. What I assume but can't confirm from documentation is that this will either happen to all of the module variables or it will happen to none of them. In other words, all module variables are set to None at the same time and Python code won't get to see a situation where some but not all variables have been set to None.
This is important because I added an if Empty is not None check, but after that check there are references to other module variables as well and I don't feel like 'validating' all of those. So I was hoping that if Empty is not None is also an indication that the other module variables are save to use.
An alternative approach could have been to use a try / except block, but using one of those when I don't even know exactly which error conditions I want to recognize and ignore feels very wrong :slightly_smiling_face: .

I'm going to close this now in the hope / assumption that it has been fixed, because it's been half a year.


'AzureFileCopy@4' Task doc, found 'sasTokenTimeOutInMinutes' but missing 'outputStorageUri' and 'outputStorageContainerSasToken'

What happened to the other two parameters? Are they still available in 'AzureFileCopy@4'? If not, what's the point of keeping 'sasTokenTimeOutInMinutes' in parameters?

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

ID: 622daa35-c6a1-dac3-17ee-3f9308fc60cd
Version Independent ID: 2c28a59b-8ef5-d7ab-46a6-58748ec552f5
Content: Azure File Copy task - Azure Pipelines
Content Source: docs/pipelines/tasks/deploy/azure-file-copy.md
Product: devops
Technology: devops-cicd-tasks
GitHub Login: @RoopeshNair
Microsoft Alias: ronai

It configures the timeout for the sasToken returned in the out variables for the task:
https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/azure-file-copy-v4?view=azure-pipelines
https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/azure-file-copy-v4?view=azure-pipelines#output-variables
Please check out our new task reference and let us know what you think. Thank you.


Add data models for metadata types

Metadata is currently stored as a JSON blob in Recap's catalog implementation. The JSON is strongly typed with something like a Pydantic data model or Python data class. It would be nice to allow analyzer plugins to define their metadata types and schemas. Then, The Recap HTTP/JSON server could use the schemas in its JSON schema.

Laying groundwork here:
https://github.com/recap-cloud/recap/pull/95

Typed REST APIs with plugin support:
https://github.com/recap-cloud/recap/pull/108


get suneditor instance outside closure?

Hi,
i'm using last suneditor version.
I have one script that looks for textarea and call suneditor:
const text = suneditor.create(document.querySelector('.editor'), {
    width : '100%',
    height: '18rem',
});

Then i add this piece of code for recover html:
window.addEventListener('click', () => {
    document.querySelector('.editor').value = text.getContents();
});

My question is,  can I call text from other closure?  can I do something like that?
const myEditor = suneditor.get(document.querySelector('.editor'));
Thanks

There are several events available here.
http://suneditor.com/sample/html/out/document-user.html#titleEvent


oap.log output " Received DATA frame for an unknown stream 787491" warining

Please answer these questions before submitting your issue.

Why do you submit this issue?
[x] Question or discussion
[ ] Bug
[ ] Requirement
[ ] Feature or performance improvement

Question

What do you want to know?
I found that the oap.log file frequently outputs logs. What causes this?

Network issue? This seems a grpc internal issue.


Adding es locale and useful information to the readme file.

I added information needed in the readme so users understand how to setup the lang. based on session or database information, I also added an spanish example to the locale.

There is already infos about that (setLocale, locales files, etc.).


Image Resize Quality

I am uploading three images
The Original: Original-cotton-chart gallery-figure 1.png
The  resized version using the ImageProcessor Library: cotton-chart gallery-figure 1_600px.png
The resized version using Photoshop: photoshop-cotton-chart-gallery-figure-600.png
When the image is resized using the ImageProcessor library the text is much lighter than when the same image is resized using Photoshop.
Here's the code I am using:
            using (ImageFactory imageFactory = new ImageFactory(preserveExifData: true))
            {
                Size resizeValue = new Size
                {
                    Width = maxWidth,
                    Height = maxHeight
                };

                ResizeLayer resizeLayer = new ResizeLayer(resizeValue, ResizeMode.Max);

                if (System.IO.File.Exists(newFilePath))
                {
                    System.IO.File.Delete(newFilePath);
                }

                try
                {
                    // Load, resize, set the format and quality and save an image.
                    imageFactory.Load(image)
                        .Resize(resizeLayer)
                        .BackgroundColor(Color.White)
                        .Quality(100)
                        .Save(newFilePath);
                }
                catch (SystemException ex)
                {
                    string msg = ex.Message;
                }
            }

How can I improve the image to Photoshop quality?
Thanks
Gary Prothero
<EMAIL_ADDRESS>

Hi @GaryLProthero
Does this issue happen when simply decoding/encoding the image or just during resizing?
ImageProcessor is simply a wrapper around System.Drawing and will suffer the same caveats when processing images. As such, my hands are tied for thing such as this.
If the problem happens when simply  decoding/encoding the image it will be due to poor management of the sRGB and Gamma chunks within a png which I cannot control.
If it happens during resizing then this is due to whatever resampling algorithm System.Drawing uses to resize the image. Again, not something I have any control over. My guess is that it is the algorithmic differences.
I had a quick look at the output images using a png analyser and I noticed both images contain textual chunks that are not in the original image? How are these getting added?
Cheers
James

James,
Thanks for the response. I noticed that the original image was 24 bit, the photoshop image after resizing was 24 bit. However, the image resized with ImageProcessor was 32 bit. Is there a way to maintain (or set) the image to 24 bit?
Gary
From: "James Jackson-South"<EMAIL_ADDRESS>To: "JimBobSquarePants/ImageProcessor"<EMAIL_ADDRESS>Cc: "Gary Prothero"<EMAIL_ADDRESS>"Mention"<EMAIL_ADDRESS>Sent: Monday, June 12, 2017 4:44:39 PM
Subject: Re: [JimBobSquarePants/ImageProcessor] Image Resize Quality (#603)
Hi @GaryLProthero
Does this issue happen when simply decoding/encoding the image or just during resizing?
ImageProcessor is simply a wrapper around System.Drawing and will suffer the same caveats when processing images. As such, my hands are tied for thing such as this.
If the problem happens when simply decoding/encoding the image it will be due to poor management of the sRGB and Gamma chunks within a png which I cannot control.
If it happens during resizing then this is due to whatever resampling algorithm System.Drawing uses to resize the image. Again, not something I have any control over. My guess is that it is the algorithmic differences.
I had a quick look at the output images using a png analyser and I noticed both images contain textual chunks that are not in the original image? How are these getting added?
Cheers
James
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub , or mute the thread .

Hi Gary,
No I'm afraid not. We convert to 32bit internally for perf reasons and to provide consistency across all formats (plus there's some internal code that requires 32bit)
I've no way of knowing what someone has done to an image once I have loaded it so we have to have a default that allows all scenarios.
Cheers
James


support multiple Field in Annotated for create_model()

Initial Checks

[X] I have searched Google & GitHub for similar requests and couldn't find anything
[X] I have read and followed the docs and still think this feature is missing

Description
For field definitions passed to create_model() as Annotated values, only the first FieldInfo value is used. This is fine and documented, but it's on the other hand surprising as other annotations, especially other FieldInfo values, are silently ignored:
>>> d = pydantic.create_model(
...     'DynamicModel',
...     f=Annotated[
...         int,
...         pydantic.Field(default=0, title='titled'),
...         pydantic.Field(default=1, description='described'),
...     ],
... )
...
>>> json.dumps(d.model_json_schema(), indent=2)
{
  "properties": {
    "f": {
      "default": 0,
      "title": "titled",
      "type": "integer"
    }
  },
  "title": "DynamicModel",
  "type": "object"
}

The behaviour is different from "static" definitions:
>>> class StaticModel(pydantic.BaseModel):
...     f: Annotated[
...         int,
...         pydantic.Field(default=0, title='titled'),
...         pydantic.Field(default=1, description='described'),
...     ]
...
>>> print(json.dumps(StaticModel.model_json_schema(), indent=2))
{
  "properties": {
    "f": {
      "default": 1,
      "description": "described",
      "title": "titled",
      "type": "integer"
    }
  },
  "title": "StaticModel",
  "type": "object"
}

I'm suggesting to add support for multiple Field values in Annotated for create_model() such as the first example about would work the same as the second one; I think we should also emit a warning about other annotations that are ignored.
Affected Components

[ ] Compatibility between releases
[ ] Data validation/parsing
[ ] Data serialization - .model_dump() and .model_dump_json()
[X] JSON Schema
[ ] Dataclasses
[ ] Model Config
[ ] Field Types - adding or changing a particular data type
[ ] Function validation decorator
[ ] Generic Models
[X] Other Model behaviour - model_construct(), pickling, private attributes, ORM mode
[ ] Plugins and integration with other tools - mypy, FastAPI, python-devtools, Hypothesis, VS Code, PyCharm, etc.

@sydney-runkle I find the create_model API related to to field specification quite flawed. Currently, it is not possible to:

provide more than one metadata attribute when using the Annotated form (as per this feature request).
provide something else than Field as a metadata.

Meaning we can't do:
create_model(
    'Model',
    f1=Annotated[int, BeforeValidator(some_val)],
    f2=Annotated[int, Field(...), Field(...)],
)

Instead, I think we should just allow two forms:

a two-tuple, the first element being the type annotation, the second one the default value (~ to f: <typ> = <default>)
a single element, representing the type annotation (~ to f: <typ>).

This way, we support the same features than normal class definition, and this removes a bunch of checks in the create_model implementation. Hopefully this can be done without introducing breaking changes.


Always return rejected promise when submit is rejected

Addresses #1201.
Also removed returnRejectedSubmitPromise. That was put in as a stopgap measure to avoid a breaking change, but I think the promise that is returned from submitting should always be rejected if there was an error.
@ooflorent, please review.

LGTM. I never liked returnRejectedSubmitPromise 👍

Published in v6.0.0-rc.1.


Gift Entry: Create and Edit Gift Entry Templates

This is about making custom GE templates. #468 is about saving the default template (maybe we can blend in here?)
https://help.salesforce.com/s/articleView?id=sfdo.NPSP_GE_Create_Template.htm&type=5
https://docs.google.com/document/d/1UYqs14v9xcicx0YmJ_fYEM80H5I3X0meZzj8xB-ozFg/edit?usp=sharing

@barbarachristensen Please give Raksha Sanganee and Padmini Katekar access to this google doc. Thanks!

@barbarachristensen  - Padmini Katekar and Raksha Sanganee would like to continue working on this card

We completed till page 3

RECOMMENDATION NEXT SPRINT-- Someone who knows gift entry well revisit this and do the following:

Decide how to separate or combine the 2 docs under the Gift Entry Template docs-- https://help.salesforce.com/s/articleView?id=sfdo.NPSP_Gift_Entry_Templates.htm&type=5
-- There are 2 kinds of templates to build, Single Gift and Batch Gift Entry (which is all the same as single mostly but has batch settings as well), plus notes on how to save/handle the packaged Default Template. Do we need a video for each type, how to handle the default bit which is small, etc? Aim for 2-3m vids and conceptual flow with a good opener. Maybe we can cover copying the default template as a quick setup at the front and the batch at the end in 3m?

Finish the script(s) as decided. The doc linked above has various sections in chunk, it may be largely written and just need clean up and some opener/closer text.

Any scripts not finished at sprint: be sure each script is in its own card (468 card already made) tag be in notes

Updated script: https://docs.google.com/document/d/1OlkxkuPN1Jjru9b_fLPfSM2xqXZJBRhrP9nYUt-1U8k/edit
Taken some of the original and reorganised it and simplified it. I've kept batch gift entry and single gift entry templating in the same video since it is basically the same thing and I think it can fit within 2-3mins.

@barbarachristensen I have created a brand new google doc as the doc above did not have the template:
https://docs.google.com/document/d/1vEQLOBQjDm5z-Q_6WoOS70LjFe33Oe318gnwErCE0-Y/edit#
But see Dan's notes for the rest of the updates :)

Fully written at sprint (thanks Dan!!) Just needs a review by a GE expert. I can do it when I'm back


CORE-260 - V/T UI Bugs

Closes CORE-260

:tada: This PR is included in version 4.2.14 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Request: macOS M1 (darwin_arm64) build

Trying to use this plugin on an M1 mac mini.  Getting this error:
logger=plugin.manager t=2022-02-04T14:37:01.84-0800 lvl=eror msg="Could not start plugin" pluginId=frser-sqlite-datasource err="fork/exec /opt/homebrew/var/lib/grafana/plugins/frser-sqlite-datasource/gpx_sqlite-datasource_darwin_arm64: no such file or directory"

The plugin is not built on an ARM CPU for darwin. I am planning to switch to a new provider for the SQLite access in Go and I will see if this will allow me to build for arm CPUs as well 👌🏻


Fix error on valid 'snabb config set' invocation

Fixes #677.
The set command does nothing, because there's not equivalent value of softwire-num-threshold in snabb-software-v1 AFAIK, but at least it fixes the error.

So the softwire_num_threshold is the number of softwire's (or tunnels) that the lwaftr can have configured at any given time, from the draft ietf softwire rfc:

tunnel-num-threshold: used to set the maximum number of tunnels that can be created on the lw4o6 device simultaneously.

I don't believe we have an equivalent of this in our configuration (correct me if I'm wrong). If that is the case then i actually think an error message is appropriate as setting it could lead to confusion, this change seems to just hide that. Maybe the correct thing to do here is to detect this and throw an error explaining it's not implemented?
The patch itself LGTM if we truly do wish to just silently ignore this property.

@xray7224 Right, I believe we don't have an equivalent parameter in our configuration either. Printing out an error message sounds like a better fix than silently ignore the property. I will amend the patch.

LGTM :)


UV venv doesn't work on MacOS when Rye is installed

Summary:
Out of the box, the tool doesn't work.
I have Rye installed in my system. When downloading UV to test this out, as it seems like Rye will soon be dead and I'll have to migrate to this tool. I get the following error:
uv platform: MacOS 14.4 (Intel x86)
uv version: uv 0.1.6
command:
 uv venv test
× Querying Python at /Users/justin/.rye/shims/rye failed with status exit
│ status: 2:
│ --- stdout:
--- stderr:
│ error: unexpected argument found
│ ---
It appears that with both tools installed, UV is nerfed.

Thanks for the report! Rye won't be dead soon, we'll be helping maintain it.
Regarding the error, it seems weird that we're detecting rye as a Python executable. Can you provide output with the -v flag?

This is why this error happens.
https://github.com/astral-sh/uv/blob/5d53040465a67bdfdd31512e2eaa0e195909855e/crates/uv-interpreter/src/python_query.rs#L174-L175
$ which python3
/Users/inada-n/.rye/shims/python3

$ python3 get_interpreter_info.py
{"markers": ...}

$ ~/.rye/shims/rye get_interpreter_info.py
error: unrecognized subcommand

Anyway, rye doesn't provide commands like python3.12 so we can not rye venv -p3.12 too.
More effort is needed to support rye managed python interpreters.

I haven't used rye myself but I wonder if this is the suggested workflow. I think the proposed way of using uv with rye is to use uv through rye. I think you can do that by setting rye config --set-bool behavior.use-uv=true. See https://lucumr.pocoo.org/2024/2/15/rye-grows-with-uv/

rye doesn't have rye venv command. We can not create venv without project for now.

@zanieb i ran into that issue myself. The problem here is that the python and python3 shim by rye is detected by name. When uv canonicalizes, it tries with the rye name instead. For uv usage within rye that's not an issue because i always bypass the paths where this shows up, but it is an issue if you point it directly to one of the rye shims.
I see three options:

pass a hidden env var as part of discovery that can force on the flag in uv
always let rye hardlink the shims on all platforms to prevent the symlink resolving
to not resolve symlinks in uv

Virtualenv can extend Python discovery and there are extensions for pyenv and rye.

https://virtualenv.pypa.io/en/latest/extend.html
https://github.com/un-def/virtualenv-pyenv
https://github.com/bluss/virtualenv-rye-discovery

Since it needs to be written in Python, difficut to support them from uv.
Another idea is creating directory like what scripts/bootstrap/install.py creates.
The directory containing python3 (default), python3.X, and python3.X.Y symlinks.
Shell script or Python script is enough for creating such directory for pyenv/rye.
uv already have UV_TEST_PYTHON_PATH for finding python from such directory.
By adding the directory to PATH temporary, tox and virtualenv can use it without extension.

Possibly related to https://github.com/astral-sh/uv/issues/1795

I find uv venv -p3.8 spam doesn't canonicalize symlink.
https://github.com/astral-sh/uv/blob/5d53040465a67bdfdd31512e2eaa0e195909855e/crates/uv-interpreter/src/python_query.rs#L50-L54
Why only find_default_python canonicalize python? Can we just stop canonicalize?


Automated Package Upgrade

:tada: This PR is included in version 25.5.28 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


[Bug]: Peninsular Malaysia exports no Geographic Area data

Steps to reproduce the bug
1.When I use https://sandworm.taxonworks.org/geographic_areas/34337 as a GeoArea for a CO
2. Then nothing exports in the country, stateProvince, or county DWC fields, even though Peninsular Malaysia corresponds to, in part, the country of Malaysia.

Screenshot
Selected in CO Digitization

DWC Result:

Expected behavior
Should export the correct DWC information. May not be limited to this GeoArea. All GeoAreas that should export a country, should export a country.
Additional Screenshots
No response
Environment
Production
Sandbox Used
Also Sandworm
Version
0.31.3, 593961c5d
Browser Used
Chrome

https://sandworm.taxonworks.org/tasks/collection_objects/browse?collection_object_id=890179 is the example I'm using.


bazel completer

Command
bazel
Description
Having bazel support in carapace would be really nice since it would help a lot when working in a large monorepo.
There is a completion script out there: https://bazel.build/install/completion but I haven't had a good experience with it.
I'm also open to invest some of my time into it if I would get some guidance.
Homepage
https://bazel.build/
Documentation
https://bazel.build/reference/command-line-reference
Repository
https://github.com/bazelbuild/bazel/
Complexity
XL
Anything else?
No response

Polar

Lots of flags for that one. We could write a scraper for the java source, but seems bit of a hassle hooking into it.
I'd say we just parse the help output: https://github.com/carapace-sh/carapace-spec-parse/blob/master/pkg/parse/parse.go.

I will take a look.
Another point would be to have automatically query targets eg.
when running bazel run it would autocomplete the target based on the output of bazel query


unencrypted warning on msg composer is ugly and wraps

If the lock/unlock icon is emphasized a bit more, the "(unencrypted) ..." part becomes redundant

It is redundant for everyone who is familiar with Riot.
It might be better to show it only once, when the user creates their account. Or alternatively, when joining a room for the first time. With a tick box to never show this warning again.


Vulnerability roundup 101: git-bug-0.7.1: 1 advisory [9.8]

search, files

[ ] CVE-2021-28955 CVSSv3=9.8 (nixos-unstable)

Scanned versions: nixos-unstable: f5e8bdd07d1.
Cc @kalbasit
Cc @royneary

This has been fixed in master and nixos-20.09 in #117978.
It has been merged into nixos-unstable already.
Am I missing something?

@royneary no, you're right. I managed to to the scan on a slightly stale nixpkgs version.


fixed digital ocean spec file

Codecov Report

Merging #6 (1739e1b) into main (3fe4411) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main       #6   +/-   ##
=======================================
  Coverage   81.56%   81.56%
=======================================
  Files           9        9
  Lines         141      141
=======================================
  Hits          115      115
  Misses         26       26

Continue to review full report at Codecov.

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


Document More Behavior

I found that if you RegisterRoute() and then call GoToAsync() it will push the page into navigation stack. If you just define it in XAML (with Route="" property) and call GoToAsync(), it wont push the page into navigation stack and when you tap hardware back button on Android platform, it will straight close the app immediately.

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

ID: b6efe82d-a8b9-82a8-7d38-98f2f8d5e682
Version Independent ID: 28d7341e-ae6e-6321-6550-d27ae6b256d2
Content: Xamarin.Forms Shell Navigation - Xamarin
Content Source: docs/xamarin-forms/app-fundamentals/shell/navigation.md
Product: xamarin
Technology: xamarin-forms
GitHub Login: @davidbritch
Microsoft Alias: dabritch

Similar behavior can also be found here

Hi @realivanjx
This is already documented: "When a route from the Shell visual hierarchy is navigated to, a navigation stack isn't created. However, when a page that's not in the Shell visual hierarchy is navigated to, a navigation stack is created."
Put more simply: when you define routes in XAML, navigation doesn't result in a navigation stack. However, when a route is registered with RegisterRoute, GotoAsync pushes the route onto the navigation stack.
With all that said, the Shell docs are due a refresh to make them clearer. When that happens I'll make sure this gets explained more clearly.


Please add stack level of method

It would be nice to have the current stack level number (deepness) of the method.
I envision a way to use this information to build a call graph tree somehow.

Do you mean in a recursive call? As this information is not static, you cannot weave it into the method. I  think the logger adapter has to take care of it somehow.

@stecydube You might want to look at https://github.com/ndrwrbgs/Tracer.OpenTracing.Fody - using the signals this library already gives paired with the standards from OpenTracing allows us to get full call graphs!


Added GLIB API support to WebKitBrowser plugin for loading WebKit 2.28.

https://jenkins.code.rdkcentral.com/job/github-triggered/679/ started

https://jenkins.code.rdkcentral.com/job/github-triggered/686/ started

https://jenkins.code.rdkcentral.com/job/github-triggered/687/ started

@neeraj-deshpande : Can we limit the scoping of the preprocessor defines to the C-functions?
If you look at:
https://github.com/rdkcentral/ThunderNanoServices/blame/wpe-2.28-glib-api/WebKitBrowser/WebKitImplementation.cpp#L724-L756
I think the retrieval of the URL can be done in the new function if you would extract the URL there and just call the already existing functions.
This will prevent the large amount of code duplication you have now.

Sure @pwielders   I will do the change.

https://jenkins.code.rdkcentral.com/job/github-triggered/688/ started

https://jenkins.code.rdkcentral.com/job/github-triggered/723/ started

https://jenkins.code.rdkcentral.com/job/github-triggered/740/ started

Blackduck scan failure details
Summary: 0 violations, 0 files pending approval, 1 file pending identification.

Protex Server Path: /home/blackduck/github/ThunderNanoServices/47/rdkcentral/ThunderNanoServices

Commit: cdaba2d4691b2d585ea9ff64a88f6c4f90de958d

Report detail: gist

WARNING: A Blackduck scan failure has been waived
A prior failure has been upvoted

Upvote reason: Metrological confirmed previously that these matches are boilerplate.

Commit: cdaba2d4691b2d585ea9ff64a88f6c4f90de958d

https://jenkins.code.rdkcentral.com/job/github-triggered/837/ started

https://jenkins.code.rdkcentral.com/job/github-triggered/903/ started

https://jenkins.code.rdkcentral.com/job/github-triggered/1004/ started

https://jenkins.code.rdkcentral.com/job/github-triggered/1027/ started

https://jenkins.code.rdkcentral.com/job/github-triggered/1075/ started

@neeraj-deshpande what is the status of this pull request ?
Did you test it with the current WebKit and the 2.28 webkit? Are both compiling and working ?
If so, can we merge it ?

@pwielders It also works with current WebKit. I will test it again today.

https://jenkins.code.rdkcentral.com/job/github-triggered/1340/ started

@pwielders Custom JS functions are not yet working and JIRA task is created for it.

https://jenkins.code.rdkcentral.com/job/github-triggered/1356/ started

@pwielders Custom JS functions are not yet working and JIRA task is created for it.

Is it not woring with the current setup (CLIB API or is it not working for th new setup (GLIB API).
If it is  the later I still suggest to continue and create a new request for that part.
It is iportant that with this pull request we do not break the current functionality (so the workings of the CLIB API)

Sorry wrong button

@pwielders I tested the pull request with WebKit 2.22 and WebKit 2017. It doesn't break.
It requires latest commit of WebKit 2.22 and WebKit 2017 (as Enrique added C API WKPreferencesSetMediaContentTypesRequiringHardwareSupport to WebkitBrowser plugin).
Custom JS functions are not working with GLIB API. WPEU228-5 JIRA task is created for it.

https://jenkins.code.rdkcentral.com/job/github-triggered/1487/ started


Reanimate example

Hello,
thanks for this library.
it would be nice to have an example for animating diagrams. I see there is a plugin: https://hackage.haskell.org/package/chart-svg-0.2.3/docs/Chart-Reanimate.html
But it's not clear for me how to animate the chart... For instance how to animate some part of the chart, such as the labels or line?
Thanks a lot

Great question!
There's a high level example here: https://github.com/tonyday567/chart-svg/blob/main/app/reanimate-example.hs of basic usage. If you can get that working locally, you're on the way!
The key is to translate your idea to a concrete function of type double -> ChartSvg, and then this feeds in to the whole reanimate way of doing things.
So say if you want the hud to fade in, from being transparent.
fadeHud :: ChartSvg -> Double -> ChartSvg
fadeHud c x = c & #hudOptions %~ colourHudOptions (setOpac x dark)

To animate something is to smoothly change it over time, going from 0 to 1.
And then, to reanimate, it would be something like:
reanimate $
    animChartSvg defaultReanimateConfig (fadeHud lineExample)

I'm in the middle of splitting the package into chart-svg and chart-reanimate: it's gotten a bit too big and I'm adding names/labels/classes/ids (haven't worked out the best way yet) to components of a chart, which is a major refactor. Once that happens, you should be able to say something like rotate (component "ticks") to be able to to easily do bulk (or individual) changes.
Happy to help with any of this.

Yes, that looks good

The recent version bump to chart-svg effected this, and the reanimate bit now live in https://github.com/tonyday567/chart-reanimate. I added in some colour testing I've been doing as an example, and am pretty happy with how it's turning out.
If you're still noodling around with this, I'd be happy to help out with anything.


Logging broken on RHEL 6/7

Logging does not appear to be functioning properly on RHEL6/7.
On RHEL6 (tomcat6):

/var/lib/tomcat6/lib/log4j.properties is created
/var/log/tomcat is created
Nothing is actually written to /var/log/tomcat.log, instead logs are being written to $CATALINA_BASE/logs.

On RHEL7 (tomcat7):

It looks like install.pp doesn't include tomcat::logging if the host is RHEL7.
/var/log/tomcat/catalina.out exists but is 0bytes
Real logs are going to $CATALINA_BASE/logs.

My lack of tomcat knowledge is making this difficult for me to fix/troubleshoot.  Any ideas?

I am facing the same issue, was there any resolution?

No - I started using aco/tomcat.


No Error When Using Wrong Platform Path For AudioTable.load_audio_files()

Good afternoon.
If you attempt to call AudioTable.load_audio_files() with a Windows path, but have the server be Linux based (or vice versa), you get no feedback whatsoever.  This is because the logic is checking for forward slashes on Linux and backward slashes on Windows and if it doesn’t split on these, the function returns None.
A message that covers this situation would be very helpful.  Thank you!

I am adding a message. the current design assumes that the path is accessible by the CAS server. Adding a warning message.


Added stack overflow programming language analysis and prediction from 2008-2024 with  a web application using streamlit

fixes issue  #321
technology/model used for prediction : ARIMA
demo video :
https://github.com/Recode-Hive/Stackoverflow-Analysis/assets/137288727/5a8acb13-3cc9-440c-b6e0-a75cebde2b89

@sanjay-kv  please check and merge this pr with appropriate gssoc'24 label and level , this will resolve issue no. 321


Primary weights profiling question

Hello, I've been using the torch profiler and modified one of your examples (see script below) to profile using fp8_model_init. I do see a decrease on the memory, specially on the activations, but when looking at peak memory, it does not decrease that much, in fact enabling fp8 without setting the primary weights to fp8 is worse than not enabling fp8 at all. Would you have an explanation for this behavior? The peaks seem to come from an "unknown" source the profiler doesn't capture (kernels?).
The data captured below is for a transformer with 4096 sequence length, 32 heads, 32 layers, 128 head size, and batch size of 1.
This is with transformer_engine version 1.0.0+66d91d5 and a single h100 machine, without FSDP (see code below).
No fp8 enabled

Fp8 without primary weights

Fp8 with primary weights

# eg to run:  torchrun --standalone --nnodes=1 --nproc-per-node=1 fsdp.py --primary-weights-fp8
# Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# See LICENSE for license information.

import os
import argparse
from functools import partial

import torch
import torch.distributed as dist
from torch import nn
from torch.distributed.fsdp import FullyShardedDataParallel, MixedPrecision
from torch.distributed.fsdp.wrap import always_wrap_policy, transformer_auto_wrap_policy

import transformer_engine.pytorch as te
from transformer_engine.common.recipe import Format, DelayedScaling
# (c) Meta Platforms, Inc. and affiliates.
import logging
import socket
from datetime import datetime, timedelta

import torch

from torch.autograd.profiler import record_function
from torchvision import models

logging.basicConfig(
   format="%(levelname)s:%(asctime)s %(message)s",
   level=logging.INFO,
   datefmt="%Y-%m-%d %H:%M:%S",
)
logger: logging.Logger = logging.getLogger(__name__)
logger.setLevel(level=logging.INFO)

TIME_FORMAT_STR: str = "%b_%d_%H_%M_%S"

def trace_handler(prof: torch.profiler.profile):
   # Prefix for file names.
   host_name = socket.gethostname()
   timestamp = datetime.now().strftime(TIME_FORMAT_STR)
   file_prefix = f"{host_name}_{timestamp}"

   # Construct the trace file.
   prof.export_chrome_trace(f"{file_prefix}.json.gz")

   # Construct the memory timeline file.
   prof.export_memory_timeline(f"{file_prefix}.html", device="cuda:0")

def lowercase(s):
    return str(s).lower()

def torch_dtype(d):
    typemap = {
        'fp32' : torch.float32,
        'float32' : torch.float32,
        'fp16' : torch.float16,
        'float16' : torch.float16,
        'bf16' : torch.bfloat16,
        'bfloat16' : torch.bfloat16
    }
    if lowercase(d) not in typemap.keys():
        raise TypeError
    return typemap[lowercase(d)]

te_layer_map = {
    'linear': te.Linear,
    'layernorm': te.LayerNorm,
    'rmsnorm': te.RMSNorm,
    'layernormlinear': te.LayerNormLinear,
    'layernormmlp': te.LayerNormMLP,
    'multiheadattention': te.MultiheadAttention,
    'transformerlayer': te.TransformerLayer
}
def te_layer(l):
    if lowercase(l) not in te_layer_map.keys():
        raise TypeError
    return te_layer_map[lowercase(l)]

def get_layer_args(args):
    hidden_size = args.num_heads * args.head_dim
    layer_args = (hidden_size, )
    layer_kwargs = {
        'params_dtype': args.dtype,
        'device': 'meta' if args.defer_init else 'cuda'
    }
    if args.layer_type in [te.Linear, te.LayerNormLinear, te.LayerNormMLP]:
        ffn_hidden_size = 3 * hidden_size if args.num_layers == 1 else hidden_size
        layer_args += (ffn_hidden_size, )
        layer_kwargs['bias'] = True
        if args.layer_type == te.LayerNormMLP:
            layer_kwargs['seq_length'] = args.seq_length
    elif args.layer_type == te.MultiheadAttention:
        layer_args += (args.num_heads, )
        layer_kwargs['fuse_qkv_params'] = True
    elif args.layer_type == te.TransformerLayer:
        layer_args += (3 * hidden_size, args.num_heads)
        layer_kwargs['fuse_qkv_params'] = True
        layer_kwargs['seq_length'] = args.seq_length
    return layer_args, layer_kwargs

def parse_fsdp_args():
    parser = argparse.ArgumentParser(description="Run Transformer Engine modules with the " +
                                    "torch.distributed.fsdp.FullyShardedDataParallel strategy.")
    parser.add_argument("-t", "--layer-type", type=te_layer, default=te.TransformerLayer,
                        choices=list(te_layer_map.values()),
                        help="TE module type used to construct the test model.")

    parser.add_argument("--primary-weights-fp8", action="store_true", default=False)

    parser.add_argument("--no-fp8", action="store_true", default=False,
                        help="Disables the te.fp8_autocast() context.")
    parser.add_argument('-i', "--num-iters", type=int, default=10,
                        help="Number of dummy 'training' iterations.")
    parser.add_argument('-b', "--batch-size", type=int, default=1,
                        help="Input batch size.")
    parser.add_argument('-s', "--seq-length", type=int, default=4096,
                        help="Input sequence length.")
    parser.add_argument('-n', "--num-heads", type=int, default=32,
                        help="Number of attention heads.")
    parser.add_argument('-d', "--head-dim", type=int, default=128,
                        help="Dimension of each attention head (number of KV channels).")
    parser.add_argument('-l', "--num-layers", type=int, default=32,
                        help="Number of modules chained together with nn.Sequential.")
    parser.add_argument("--seed", type=int, default=1234,
                        help="PyTorch RNG seed.")
    parser.add_argument("--defer-init", action="store_true",
                        help="Defer module parameter initialization until after FSDP sharding.")
    parser.add_argument('-v', "--verbose", action="store_true", default=False,
                        help="Print out information from all GPUs instead of only the root GPU-0.")
    parser.add_argument("--dtype", type=torch_dtype, default=torch.bfloat16,
                        help="Data type for input tensor and Transformer Engine module parameters.")
    return parser.parse_args()

def train(args, torch_profiler):
    local_rank = int(os.environ["LOCAL_RANK"])
    world_size = int(os.environ["WORLD_SIZE"])

    # Initialize torch.distributed global process group
    dist.init_process_group(backend="nccl")
    torch.cuda.set_device(local_rank)
    if local_rank == 0:
        print(f"[GPU-0] WORLD_SIZE = {world_size}\n\n", end='')
    torch.manual_seed(args.seed)

    # Construct a simple homogeneous model (only one layer type) with NO PARALLELISM
    layer_args, layer_kwargs = get_layer_args(args)
    if args.num_layers > 1:
        te_layer_list = []
        for i in range(args.num_layers):
            if args.layer_type in [te.MultiheadAttention, te.TransformerLayer]:
                layer_kwargs['layer_number'] = i+1
                te_layer_list.append(args.layer_type(*layer_args, **layer_kwargs))
        te_model = nn.Sequential(*te_layer_list)
    else:
        # Single layer model
        te_model = args.layer_type(*layer_args, **layer_kwargs)
    if local_rank == 0:
        print(f"[GPU-0] TransformerEngine Model:\n{te_model}\n", end='')

    # Print out allocated device memory before the model parameters are sharded by FSDP
    pre_mem_use = torch.cuda.memory_allocated(device=f"cuda:{local_rank}") * 1e-6
    if local_rank == 0 or args.verbose:
        print(f"[GPU-{local_rank}] Pre-FSDP memory use = {pre_mem_use}MiB\n", end='')

    # Wrap the model with FSDP
    # NOTE: The TE model itself has no inherent parallelism. FSDP shards model parameters and
    #       controls all communication.
    all_gpus = dist.new_group(backend='nccl')
    fsdp_wrap_policy = always_wrap_policy
    if args.layer_type == te.TransformerLayer:
        # NOTE: FSDP causes illegal memory access without this special policy for Transformers
        fsdp_wrap_policy = partial(transformer_auto_wrap_policy,
                                   transformer_layer_cls={te.TransformerLayer})
    # te_model = FullyShardedDataParallel(te_model,
    #                                     process_group=all_gpus,
    #                                     use_orig_params=True,
    #                                     mixed_precision=MixedPrecision(
    #                                         param_dtype=args.dtype,
    #                                         reduce_dtype=torch.float32,
    #                                     ),
    #                                     sync_module_states=True,
    #                                     auto_wrap_policy=fsdp_wrap_policy)

    # Print out allocated device memory after the model parameters are sharded
    post_mem_use = torch.cuda.memory_allocated(device=f"cuda:{local_rank}") * 1e-6
    if local_rank == 0 or args.verbose:
        print(f"[GPU-{local_rank}] Post-FSDP memory use = {post_mem_use}MiB\n", end='')

    # Fp8 setup for TE
    fp8_format = Format.HYBRID
    fp8_recipe = DelayedScaling(fp8_format=fp8_format, amax_history_len=32, amax_compute_algo="max")

    # Optimizer must be created after the model is wrapped in FSDP and the parameters are sharded
    optim = torch.optim.Adam(te_model.parameters(), lr=0.0001)

    # Start and time dummy "training" iterations
    start = torch.cuda.Event(enable_timing=True)
    end = torch.cuda.Event(enable_timing=True)
    torch.cuda.synchronize()
    start.record()
    for i in range(args.num_iters):
        # Generate a random input batch
        x = torch.rand(args.seq_length, args.batch_size,
                       args.num_heads*args.head_dim).to(dtype=args.dtype).cuda()
        # fp8_autocast needs to be given the FSDP process group for amax reductions
        with te.fp8_autocast(enabled=not args.no_fp8, fp8_recipe=fp8_recipe, fp8_group=all_gpus):
            y = te_model(x)
            loss = y.sum()
        # calculate gradient and take training step outside the fp8_autocast context
        loss.backward()
        optim.step()
        torch_profiler.step()
        del x
        if local_rank == 0:
            print(f"[GPU-0] Iter. {i+1}\n", end='')
    end.record()
    torch.cuda.synchronize()

    # Print out "training" time and peak memory use stats
    train_time = start.elapsed_time(end)/1000.
    max_memory_alloc = int(torch.cuda.max_memory_allocated(device=f"cuda:{local_rank}") * 1e-6)
    if local_rank == 0 or args.verbose:
        print(f"[GPU-{local_rank}] Training Time: {train_time}s\n" +
              f"[GPU-{local_rank}] Avg. Iter. Time: {train_time /args.num_iters}s\n" +
              f"[GPU-{local_rank}] Peak memory use = {max_memory_alloc}MiB\n\n", end='')

if __name__ == "__main__":

    args = parse_fsdp_args()
    with torch.profiler.profile(
        activities=[
            torch.profiler.ProfilerActivity.CPU,
            torch.profiler.ProfilerActivity.CUDA,
        ],
        schedule=torch.profiler.schedule(wait=0, warmup=2, active=args.num_iters, repeat=1),
        record_shapes=True,
        profile_memory=True,
        with_stack=True,
        with_flops=True,
        on_trace_ready=trace_handler,
    ) as prof:
        with te.fp8_model_init(enabled=args.primary_weights_fp8):
            train(args, prof)

For the non-FP8 case, the 40 GB steady-state memory usage is expected: 5B params with 8 bytes/param (2 bytes param, 2 bytes grad, 4 bytes optim state). It looks like the activations take ~20 GB.
For FP8 w/o primary weights, it seems like there is ~3 GB overhead in the activations. I suspect this is because we cache an FP8 copy of the weights and an FP8 transpose that is used in the backward pass. This increase is counteracted by the fact we can store some activations in FP8.
For FP8 w/ primary weights, we have a 5 GB reduction in param memory, but offset with the 3 GB overhead from FP8.

Thanks @timmoon10  - A follow-up question. I included torch's memory snapshot, and I see this interesting difference on fp8 with and w/o primary weights. I see a peak on the optimizer states w/o primary weights which I don't see without primary weights.  Is this spike caused due to the fp8 copy of the weights or what does it explain it?
W/o primary weights:

With primary weights

I just updated the original script with this in the bottom:

def torch_save_memory_snapshot():
    host_name = socket.gethostname()
    timestamp = datetime.now().strftime("%b_%d_%H_%M_%S")
    rank = 0
    folder = Path(".")
    # folder.mkdir(parents=True, exist_ok=True)
    file_prefix = str(folder / f"rank-{rank}_{host_name}_{timestamp}")
    try:
        torch.cuda.memory._dump_snapshot(f"{file_prefix}.pickle")
    except Exception as e:
        logger.error(f"Failed to capture memory snapshot {e}")

if __name__ == "__main__":

    args = parse_fsdp_args()
    # with torch.profiler.profile(
    #     enabled=False,
    #     activities=[
    #         torch.profiler.ProfilerActivity.CPU,
    #         torch.profiler.ProfilerActivity.CUDA,
    #     ],
    #     schedule=torch.profiler.schedule(wait=0, warmup=2, active=args.num_iters, repeat=1),
    #     # schedule=torch.profiler.schedule(wait=0, warmup=0, active=0, repeat=0),
    #     record_shapes=True,
    #     profile_memory=True,
    #     with_stack=True,
    #     with_flops=True,
    #     # on_trace_ready=trace_handler,
    #     on_trace_ready=lambda prof: None,
    # ) as prof:
    class Prof:
        def step(self, *args, **kwargs):
            pass
    prof = Prof()
    torch.cuda.memory._record_memory_history(
        max_entries=100_000
    )
    with te.fp8_model_init(enabled=args.primary_weights_fp8):
        train(args, prof)

    torch_save_memory_snapshot()

I'm not 100% confident, but I suspect this is deliberate behavior within PyTorch Adam. It seems that without FP8 primary weights, PyTorch is choosing to use a multi-tensor implementation of the Adam step: https://github.com/pytorch/pytorch/blob/a8e7c98cb95ff97bb30a728c6b2a1ce6bff946eb/torch/optim/adam.py#L565
There was probably a deliberate decision to accept greater memory usage (proportional to model size) in exchange for fewer kernel launches (although maybe torch.compile or nvFuser is smart enough to avoid materializing the intermediates?). On the other hand, the FP8 primary weights are weird enough that PyTorch falls back to the unfused Adam implementation, which only needs to handle a single param at a time but requires more kernel launches.

This is quite interesting, thanks @timmoon10!


[Question]

Question
What model do you use when making caption of pictures?
The captions generated by general models are relatively short..

are you?  able to run this repo locally could please help with steps to run it  locally I am new to this filed


Problems with cluster vector in max_pool

❓ Questions & Help
Inside the forward method of a network architecture,
I would like to use max_pool.
According to that issue, I have written my code like that:
def forward(self, data):
        mat = to_dense_adj(edge_index).squeeze()
        n_components, labels = connected_components(csgraph=mat, directed=False)

        tensorLables = torch.from_numpy(labels)
        data = max_pool(cluster=tensorLables, data=data)

        x1 = self.conv1(data.pos, data.edge_index)

        return x1

Labels maps each node, to a component (based on connectivity). It is a 1-dimensional array, that contains the exact same number of values as the graph inside data contains nodes.
Example: labels = [0 0 0 0 1 1 1 1 2 2 2 (...)]
Note, that for the connected components I have used the implementation of scipi.sparse.csgraph.connected_components.
if I pass cluster=labels, then I get the following error message:
TypeError: _unique2(): argument 'input' (position 1) must be Tensor, not numpy.ndarray
I I convert the numpy array into a pytorch tensor (tensorLables) then I receive the following error message:
RuntimeError: scatter_max() Expected a value of type 'Tensor' for argument 'src' but instead found type 'NoneType'.
Position: 0
Value: None
Declaration: scatter_max(Tensor src, Tensor index, int dim=-1, Tensor? out=None, int? dim_size=None) -> ((Tensor, Tensor))
Cast error details: Unable to cast Python instance of type <class 'NoneType'> to C++ type 'at::Tensor'

If I convert the lables array into a list by labels = list(labels) I receive the following error message (your example in the linked issue has comma-seperated items. That is the reason why I have tried out this):
TypeError: expected np.ndarray (got list)
Can you explain me, what I do wrong with the cluster vector here?
Thank you in advance!

The second approach is the correct one. Are you sure data.x is set?

data.x was None! Thank you :)


Fix docker-compose logs with Python 3

Thanks! I wonder if caused by some of my earlier encoding in this branch. I need to re-visit some of the changes before it gets merged.  I'll pull this in when I do that work.


Retrieve the validated data of multidimensional input

I noticed that when using a form request and the validated() method to retrieve no more than the validated data, only the first level was filtered.
I don't know if this was by choice or not. I work with a lot of multidimensional input data and It caused me more bad surprises than good ones. I am opening this pull request so the validated() method filters the validated data of multidimensional input.
Let me give you an example:
UserRequest@rules
public function rules()
{
    return [
        'address.city' => 'required|string',
        'address.country' => 'required|string',
        'password' => 'confirmed|required|string',
        'username' => 'required|string'
    ];
}

Input data (JSON formatted)
{
    "address": {
        "city": "Paris",
        "country": "France"
        "street_name": "Avenue des Champs-Élysées"
    },
    "email_address"<EMAIL_ADDRESS>    "foo": "bar",
    "username": "louisfisch",
    "password": "averysecretstring"
}

The result of $request->validated(), street_name is still there:
[
    'address' => [
        'city' => 'Paris',
        'country' => 'France',
        'street_name' => 'Avenue des Champs-Élysées'
    ],
    'username' => 'louisfisch',
    'password' => 'averysecretstring'
]

With this pull request:
[
    'address" => [
        'city' => 'Paris',
        'country' => 'France'
    ],
    'username' => 'louisfisch',
    'password' => 'averysecretstring'
]

I am closing this pull request because it lacks sufficient explanation, tests, or both. It is difficult for us to merge pull requests without these things because the change may introduce breaking changes to the framework.
Feel free to re-submit your change with a thorough explanation of the feature and tests - integration tests are preferred over unit tests. Please include it's benefit to end users; the reasons it does not break any existing features; how it makes building web applications easier, etc.
Thanks!

This will need a test.

I tried to better explain the problem and the benefit of this pull request (see my edited first comment). I improved the unit test of the validated() method in a commit. Maybe you could re-open this pull request.

Hello @taylorotwell !
I had this issue today as well.
The $request->validated() method does not filter array fields, it simply includes all fields in an array.
That could lead to potential vulnerabilities.
I'm using Doctrine, so Eloquent's $guarded and $fillable are not an option to me.
@louisfisch example demonstrates that. His other_addresses array expects only a city field. But when passed a baz field, that field was present in the validated() method result.
Unfortunately I'm not familiar with contributing, testing, etc. Maybe someone from the community could help us?
Best regards!


Clarify thinking about required and optional model tasks and output types

Currently, the required and optional values of output type ids can in effect also specify whether the corresponding output types as a whole are required: namely, a particular output type is required if it has at least one required type_id, and is optional otherwise. This may be confusing. Is there another way? See also the related discussion under issue #9.
Current proposed system
To explain the situation, we consider a series examples of hubs with varying modeling task specifications.
Example 1:
      "model_tasks": [
        {
          "task_ids": {
            "location": {
              "required": ["a", "b"],
              "optional": ["c", "d"]
            },
            "horizon": {
              "required": [1, 2],
              "optional": [3, 4]
            }
          },
          "output_types": {
            "median": {
              "type_id": {
                "required": ["NA"],
                "optional": null
              },
              "value" : {
                "type": "integer",
                "minimum": 0
              }
            },
            "quantile" : {
              "type_id": {
                "required": [0.25, 0.5, 0.75],
                "optional": [0.1, 0.9]
              },
              "value": {
                "type": "integer",
                "minimum": 0
              }
            }
          }
        }
      ]

For a hub with this specification, a valid submission must include at least the following rows, obtained via a kind of expand_grid action across the different combinations of required values for the task id variables and required type_ids within each output type. Note that in this process, you could imagine first concatenating the output_types with the options for type_id values within each output_type, so that they are treated as a "unit" when the expand_grid happens. Then split them back into two columns. This is necessary to track the nesting of type_id values withing the specific output types.
 location horizon output_type type_id value
        a       1     median      NA   ...
        b       1     median      NA   ...
        a       2     median      NA   ...
        b       2     median      NA   ...
        a       1    quantile    0.25   ...
        b       1    quantile    0.25   ...
        a       2    quantile    0.25   ...
        b       2    quantile    0.25   ...
        a       1    quantile     0.5   ...
        b       1    quantile     0.5   ...
        a       2    quantile     0.5   ...
        b       2    quantile     0.5   ...
        a       1    quantile    0.75   ...
        b       1    quantile    0.75   ...
        a       2    quantile    0.75   ...
        b       2    quantile    0.75   ...

Example 2
Example 2 is the same as example 1, but it has only one required quantile level:
      "model_tasks": [
        {
            "location": {
              "required": ["a", "b"],
              "optional": ["c", "d"]
            },
            "horizon": {
              "required": [1, 2],
              "optional": [3, 4]
            }
          },
          "output_types": {
            "median": {
              "type_id": {
                "required": ["NA"],
                "optional": null
              },
              "value" : {
                "type": "integer",
                "minimum": 0
              }
            },
            "quantile" : {
              "type_id": {
                "required": [0.5],
                "optional": [0.1, 0.25, 0.75, 0.9]
              },
              "value": {
                "type": "integer",
                "minimum": 0
              }
            }
          }
        }
      ]

For a hub with this specification, a valid submission must include at least the following rows:
 location horizon output_type type_id value
        a       1        median      NA   ...
        b       1        median      NA   ...
        a       2        median      NA   ...
        b       2        median      NA   ...
        a       1    quantile     0.5   ...
        b       1    quantile     0.5   ...
        a       2    quantile     0.5   ...
        b       2    quantile     0.5   ...

Example 3
Example 3 is similar to examples 1 and 2, but now all of the quantile levels are specified as optional.
      "model_tasks": [
        {
            "location": {
              "required": ["a", "b"],
              "optional": ["c", "d"]
            },
            "horizon": {
              "required": [1, 2],
              "optional": [3, 4]
            }
          },
          "output_types": {
            "median": {
              "type_id": {
                "required": ["NA"],
                "optional": null
              },
              "value" : {
                "type": "integer",
                "minimum": 0
              }
            },
            "quantile" : {
              "type_id": {
                "required": null,
                "optional": [0.1, 0.25, 0.5, 0.75, 0.9]
              },
              "value": {
                "type": "integer",
                "minimum": 0
              }
            }
          }
        }
      ]

For a hub with this specification, a valid submission must include at least the following rows:
 location horizon output_type type_id value
        a       1        median      NA   ...
        b       1        median      NA   ...
        a       2        median      NA   ...
        b       2        median      NA   ...

Example 4
Our final example is similar to example 1, but swaps the specification of ["NA"] and null values in the required and optional fields for the mean output type:
      "model_tasks": [
        {
            "location": {
              "required": ["a", "b"],
              "optional": ["c", "d"]
            },
            "horizon": {
              "required": [1, 2],
              "optional": [3, 4]
            }
          },
          "output_types": {
            "median": {
              "type_id": {
                "required": null,
                "optional": ["NA"]
              },
              "value" : {
                "type": "integer",
                "minimum": 0
              }
            },
            "quantile" : {
              "type_id": {
                "required": [0.25, 0.5, 0.75],
                "optional": [0.1, 0.9]
              },
              "value": {
                "type": "integer",
                "minimum": 0
              }
            }
          }
        }
      ]

For a hub with this specification, a valid submission must include at least the following rows:
 location horizon output_type type_id value
        a       1    quantile    0.25   ...
        b       1    quantile    0.25   ...
        a       2    quantile    0.25   ...
        b       2    quantile    0.25   ...
        a       1    quantile     0.5   ...
        b       1    quantile     0.5   ...
        a       2    quantile     0.5   ...
        b       2    quantile     0.5   ...
        a       1    quantile    0.75   ...
        b       1    quantile    0.75   ...
        a       2    quantile    0.75   ...
        b       2    quantile    0.75   ...

Summary and question for discussion
Summary: Under the current system, the required rows that a submission must minimally obtain are obtained by applying an expand_grid type of action to the task id variables and combinations of output types and type ids. This means that if there are no required values under the type_ids for a particular output type, a minimal submission does not need to include any rows with that output type. Effectively, this means that that output type is optional. Saying this again in different words: in this set up, a particular output type is required only if there is at least one value specified as required in the type_ids under that output type. This is illustrated in examples 3 and 4 above.
Every time this has come up, this use of required/optional values of a type_id to implicitly set the status of an output type has been non-intuitive. How can we resolve this? Three ideas:

Change the representation of the output column so that it has the required and optional properties similar to the other columns. We would then perhaps check that the names of any additional properties currently under "output_types" match the values that were specified as required or optional for the output column. We would need to think through and document how this interacts with the "implicit requirement" for output types that comes out of the current procedure as illustrated above.
Some other higher level field indicating which output types are required and optional. We would need to think through and document how this interacts with the "implicit requirement" for output types that comes out of the current procedure as illustrated above.
Somehow more directly specify the concatenated/nested values of columns output_type and type_id (and any restrictions on value) as being required or optional.
Lots of documentation.

DECISION: Option 4 🎉

I don't have very strong feelings about this -- but maybe a weak preference for the first option because it's more consistent with the other specifictions, and doesn't use the oneOf construction, which I guess maybe fewer people would be familiar with? But I would be happy to accept your recommendation for what you prefer, if you like the other one.

I have the same response as Evan.

Thanks both! So the reason I prefer the oneOf specification is that it can check during schema validation that the combined values required and optional are valid so we don't end up in an ambiguous situations where, for example, both have been set to ['NA'] or null. Having said that, if both are ['NA'], required could take precedent. It's just not very clean. Now that I think of it though, is there a situation where in a given set of task_ids or rounds, on of the output types needs to be specified because it has been included in another round but should not be submitted, in which case null & null should be set for required and optional?

Thanks -- that makes sense.
Is this situation of possibly-repeated values across the optional and required fields a more general thing that we need to address in either case? e.g., what if someone specifies "US" as both an optional location and a required location? We might want to either check for that as part of validating the tasks.json file, or document that in that case, the field will be required in practice.
For your last point -- in that case, I think that each round (and each task group within that round) only needs to include the output types that are required for that round (or task group). The output type column will still be included, we're just specifying which values of output types are required within that column.


Manual rebuild

My local test builds get stuck on the Git checkout, for reasons unbeknownst to me. What happens here?

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@conda-forge/core The Linux builds here are all failing on an inability to check out the Git repo, whereas this works fine on macOS. Any ideas about what might be happening here?

@isuruf There is a problem with Git on the Linux Docker images. Initially, /opt/conda/bin/git works fine, but the package update at the beginning of the build process yields a broken executable:
$ /opt/conda/bin/git
/opt/conda/bin/git: error while loading shared libraries: libcrypto.so.1.0.0: cannot open shared object file: No such file or directory

$ readelf -d /opt/conda/bin/git |grep -E 'NEEDED|RPATH'
 0x0000000000000001 (NEEDED)             Shared library: [libz.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libcrypto.so.1.0.0]
 0x0000000000000001 (NEEDED)             Shared library: [libpthread.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [librt.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x000000000000000f (RPATH)              Library rpath: [$ORIGIN/../lib]

$ ls -l /opt/conda/lib/libcrypto.*
-rw-rw-r--. 1 conda conda 5721646 Nov  2 12:56 /opt/conda/lib/libcrypto.a
lrwxrwxrwx. 1 conda conda      16 Nov  2 12:56 /opt/conda/lib/libcrypto.so -> libcrypto.so.1.1
-rwxrwxr-x. 1 conda conda 3459120 Nov  2 12:56 /opt/conda/lib/libcrypto.so.1.1

Here's what the update is doing right now:
+ conda install --yes --quiet conda-forge::conda-forge-ci-setup=2 conda-build
[...]
The following NEW packages will be INSTALLED:

    click:                7.0-py36_0
    conda-forge-ci-setup: 2.0.8-py36_0           conda-forge
    icu:                  58.2-h9c2bf20_1
    libxml2:              2.9.8-h26e45fe_1
    lz4-c:                <IP_ADDRESS>-h14c3975_0
    lzo:                  2.10-h49e0be7_2
    zstd:                 1.3.3-h84994c4_0

The following packages will be UPDATED:

    conda-build:          3.16.1-py36_0          conda-forge --> 3.16.2-py36_0
    cryptography:         2.3.1-py36hdffb7b8_0   conda-forge --> 2.3.1-py36h1ba5d50_2
    krb5:                 1.16.1-hbb41f41_0      conda-forge --> 1.16.1-h173b8e3_7
    libarchive:           3.3.3-h823be47_0       conda-forge --> 3.3.3-h5d8350f_2
    libgcc-ng:            7.2.0-hdf63c60_3       conda-forge --> 8.2.0-hdf63c60_1
    libssh2:              1.8.0-h5b517e9_2       conda-forge --> 1.8.0-h1ba5d50_4
    libstdcxx-ng:         7.2.0-hdf63c60_3       conda-forge --> 8.2.0-hdf63c60_1
    openssl:              1.0.2p-h470a237_1      conda-forge --> 1.1.1-h7b6447c_0
    python:               3.6.6-h5001a0f_3       conda-forge --> 3.6.7-h0371630_0

The following packages will be DOWNGRADED:

    ca-certificates:      2018.10.15-ha4d7672_0  conda-forge --> 2018.03.07-0
    certifi:              2018.10.15-py36_1000   conda-forge --> 2018.10.15-py36_0
    conda:                4.5.11-py36_1000       conda-forge --> 4.5.11-py36_0
    curl:                 7.61.1-h74213dd_2      conda-forge --> 7.61.1-hbc83047_0
    git:                  2.19.1-pl526hbb17d3c_0 conda-forge --> 2.11.1-0
    libcurl:              7.61.1-hbdb9355_2      conda-forge --> 7.61.1-h20c2e04_0

The issue here is that openssl 1.1.1 has a different SONAME than openssl 1.0.2 (libcrypto.so.1.1.0 vs libcrypto.so.1.0.0).  The majority of packages correctly pin their openssl dependency to a compatible version like openssl >=1.0.2p,<1.0.3a, but some really old packages, like git 2.11.1-0 have an un-versioned requirement.  If it cannot find a valid version conda will uses these to create a broken environment.
I'm a bit confused why such as old version of git was selected given that there are builds of git 2.19.1 which support openssl 1.1.1 available in defaults.


refactor(tests): Improve test structure and implement lowering test

Description
This PR improves the test infrastructure by reducing code duplication and implementing proper lowering test functionality in examples_test.rs.
Changes
Code Duplication Reduction

Added TestConfig struct to encapsulate test configuration parameters:

auto_add_withdraw_gas: bool
available_gas: Option<usize>
expected_cost: Option<usize>

Created unified run_test_function to handle both regular and gas-enabled test cases
Consolidated duplicate test functions into a single implementation with configurable behavior

Lowering Test Implementation

Implemented proper lowering_test functionality to verify compiler behavior
Added comprehensive testing of function lowering for all modules
Improved error reporting for lowering failures
Added documentation explaining the test's purpose and functionality

Testing

All existing tests pass with the new structure
Added verification for function lowering across all modules
Maintained backward compatibility with existing test cases

Related Issues

Fixes unused test function warning
Reduces code maintenance burden through better structure

This change is


Implement floating label on the Evaluation bar

Opening a separate bug for a comment in issue #500 by @akakarthick
"Or see if you can create a floating " M10", "-13.6" above the bar like chess.com."

Implemented. "Private" version 1.1.1 available here https://chessforge.sourceforge.io/Releases/latest/ChessForge.msi

Flicker occurs when the cursor is placed on the floating label. It's no big deal. just saying.
these are two different games. but the result in label.

Fixed flicker
Bug fix for when "+1" is shown instead of "+M1"
Changed the text in a checkmate position from "M0" to "1-0"/"0-1"

Implemented in private version 1.1.2 at: https://chessforge.sourceforge.io/Releases/latest/ChessForge.msi

I'm unable to reproduce this. I always get "0.0" in the eval bar.  Does it happen every time when you reach this position, only sometimes (randomly), or after a certain sequence of actions (e.g. when clicking, or when using arrow keys or something else)

Oh, never mind. I just reproduced immediately after writing the above :-)  It only happens in the release build but not when I run my debug build.

Fixed (in version 1.1.3 that I will "privately" publish in a few days).

Ok, removed the plus sign when eval equals 0.00.


pyperscan is slower than python-hyperscan

We currently use the python-hyperscan bindings, but are evaluating Pyperscan because of its support for ARM architecture. The problem we face however is that we find Pyperscan to be roughly 50% slower than python-hyperscan.
I attach a small script to demonstrate our problem. The script scans a tree of files for common Python keywords using both bindings. The scan is repeated 10 times and results are compared to ensure they are the same.
Here are the results I get when running it on an installed Django package, using x86-64 Linux machine:
$ scanbench $VIRTUAL_ENV/lib/python3.10/site-packages/django
python-hyperscan: 0.0464 s
pyperscan       : 0.0759 s

Is this a known issue of Pyperscan, or am I using it wrong?

My only idea is that vectorscan's x86 build is slower which is how the pypi binaries are built

I've dug a bit deeper:

embarasingly the binaries on pypi are not built with optimizations
I'll fix it in the next patch release.

you are building the database at every iteration when using pyperscan
I understand, that in your case, you want to decouple the context from the db.
With this code, the performance difference comes from a the extra indirection introduced by the callback:
class Pyperscanner:
    name = "pyperscan"

    def __init__(self):
        patterns = [
            ps.Pattern(x[0], ps.Flag.DOTALL, ps.Flag.SINGLEMATCH, tag=x[1])
            for x in PATTERNS_AND_IDS
        ]
        self.db = ps.BlockDatabase(*patterns)
        self.results: ScanResults = None
        def append(id):
            self.results.append(id)
        self.scanner = self.db.build(append, Pyperscanner._on_match)

    @staticmethod
    def _on_match(append, id, start_, stop_):
        append(id)
        return ps.Scan.Continue

    def scan(self, content) -> ScanResults:
        self.results = []
        self.scanner.scan(content)
        return self.results

python-hyperscan: 0.0558 s
pyperscan       : 0.0605 s

If "break" the code to use a global list, the difference becomes negligable:
python-hyperscan: 0.0546 s
pyperscan       : 0.0575 s

For the record: turns out the reason I wrote the code as I did was because I could not share the Scanner between threads: it would fail like that:
thread '<unnamed>' panicked at 'assertion failed: `(left == right)`
  left: `ThreadId(2)`,
  right: `ThreadId(1)`: pyperscan::python::extension::PyBlockScanner is unsendable, but sent to another thread!',
  /root/(...)/pyo3-0.17.3/src/impl_/pyclass.rs:1056:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Storing the Scanner instance in thread-local storage "fixed" that.

I think this can be improved upon, as there is a way to share databases between threads


Proxy crashes when using option http2 with transfer.sh

Using the reverse proxy with transfer.sh, http2: true and letsencrypt certificate, lets the proxy crash
"name":"redbird","hostname":"stivik-dev","pid":21800,"level":30,"msg":"Proxying CENSORED/ to <IP_ADDRESS>:80/","time":"2018-10-18T09:17:52.819Z","v":0}
internal/stream_base_commons.js:62
  var err = req.handle.writev(req, chunks, allBuffers);
                       ^

TypeError: req.handle.writev is not a function
    at writevGeneric (internal/stream_base_commons.js:62:24)
    at Socket._writeGeneric (net.js:711:5)
    at Socket._writev (net.js:720:8)
    at doWrite (_stream_writable.js:408:12)
    at clearBuffer (_stream_writable.js:517:5)
    at Socket.Writable.uncork (_stream_writable.js:314:7)
    at connectionCorkNT (_http_outgoing.js:641:8)
    at process._tickCallback (internal/process/next_tick.js:63:19)

When i disable the option http2 it works fine.
I am not quite sure if this an issue of transfer.sh, if it so tell me please then i'll report them the issue.
My configuration:
const proxy = redbird({
        port: 80,
        letsencrypt: {
                path: __dirname + '/certs',
                port: 9999
        },
        ssl: {
                http2: true,
                port: 443
        }
});

docker(proxy).register('CENSORED', 'dutchcoders/transfer.sh', {
        ssl: {
                letsencrypt: {
                        email: CENSORED,
                        production: true
                }
        }
});

Updating spdy to v4.0.0 fixes the issue: https://github.com/spdy-http2/node-spdy/issues/343

Someone should close issues in this project. So many open issues which have actually been promptly resolved as this one should would send a better picture to new adopters like me.


how to pass elm flags

I love the fact that I can just globally install elm and elm-live, do an "elm init", create a src/Main.elm file and invoke elm-live. Short and simple. But to make my app responsive, I need to 1) respond to "window resized" events and 2) initially, get the window size. From research, I see that to get the initial window size, I need to pass in elm flags in the index.html file:
<script>
let app = Elm.Main.init({
flags: {
windowHeight: window.innerHeight,
windowWidth: window.innerWidth
}
})
</script>

Well, darn... I didn't want to have to mess with index.html - elm-live creates that automatically for me.
I tried to edit the index.html file created, but unfortunately, elm-live rebuilds it each time it's run. Is there some way to handle this without having to change my development process?

Try running elm-live src/Main.elm --open -- --output=app.js. This way, elm-live will compile app.js and use index.html as-is. A few gotchyas if you're on Windows:

If you launch elm-live from PowerShell, you'll need to include -- in quotes: elm-live src/Main.elm --open "--" --output=app.js
Slightly unrelated, but if you're using VSCode then compiling your app to "elm.js" causes weird errors! Use "app.js" or "main.js" instead.


Errors during generation are non-existent

Describe the bug
I've recently updated to v2 of the CLI and the associated plugins. Since then the errors that are reported are not helpful in that only a partial of the error is displayed. This makes tracking down errors extremely more challenging. Please see the below screenshots and information. I have used the debug and errorsOnly flags and they do not provide any additional information toward identifying the reason and therefore cause of the failure.
Your Example Website or App
None provided
Steps to Reproduce the Bug or Issue
To reproduce I have the following CLI version and plugins installed which at the time are the most current versions. Create a query/mutation that is incorrect or doesn't exist to cause any error in generation. Review the reported errors.
Expected behavior
As a user, I am expecting to see detailed enough errors to allow me to track down my errors to resolve. Version 1 of the CLI provided adequate information around errors.
Screenshots or Videos

Platform

OS: Windows
NodeJS: 14.18.0
<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>
To reproduce I have the following CLI version and plugins installed which at the time are the most current versions.
Codegen Config File
schema:
  - https://graphql-federated-gateway...../graphql
  - 'schema.graphql'
documents: './src/**/*.graphql'
generates:
  ./src/generated/graphql.tsx:
    config:
      enumsAsConst: true
    plugins:
      - typescript
      - typescript-operations
      - typed-document-node

Additional context
No response

I am seeing the same issue, errors are no longer being displayed. The only thing I get is the following statement Unable to validate GraphQL document!, but where it is, is not being shown. It did do this before.

@chriswetterman, I tested a similar setup locally.
GraphQL Code Generator relies on Listr for console output, which truncates the content of logs depending on your terminal width (at print time, not dynamically).
To avoid this, I recommend that you run codegen in verbose mode, as follows:
yarn graphql-codegen -r dotenv/config -v

Hi @charlypoly, I added the verbose flag and didn’t see any change in the output as it’s still truncated. Again this is in VS Code and I tried in both powershell and bash terminals.

@chriswetterman, okay, we will investigate further.
@wesselvdv, do you also face this issue on Windows or on another OS?

two thumbs way up

@charlypoly We have another project that's on<EMAIL_ADDRESS>and it reports a plethora of errors as expected and I've rolled back to that for now. I just tested on<EMAIL_ADDRESS>and the issue still persists (our Nexus repo doesn't have 2.13.5 yet to test). Currently don't have the bandwidth to narrow down exactly which release the issue began with but hopefully this gives you some more info. I'll circle back when things free up on my end. Thanks.

It appears<EMAIL_ADDRESS>introduced the issue

Hi @hannahborel, @wesselvdv,
Could you confirm that you also face this bug only on Windows?
I could not reproduce it on MacOS.

@charlypoly I can confirm downgrading the version to 2.9.0 is working well on Mac. If I install version 2.10.0 or above it doesn't work.

Hi all,
The culprit is most likely the following commit: https://github.com/dotansimha/graphql-code-generator/commit/e2cfc5c360d09a4ba98d8855769b8711c96f13b2
However, reverting this commit will bring back another bug that printed all error messages twice.
The root cause of the error truncating issue seems to be linked to our migration to Listr2, which I experienced, which seems to truncate all logging containing multiple lines.
There is no easy fix regarding this issue, and we prioritize it as one of the first things to tackle as part of the v3 roadmap.

Much appreciated, @charlypoly. Thank you and looking forward to v3.

Hi @chriswetterman, hi all,
Could you give a try to the following canary release of @graphql-codegen/cli?

Package
Version
Info

@graphql-codegen/cli
2.13.8-alpha-20221025134913-ec8a36be2
npm ↗ [unpkg ↗]

It should fix the issue of error truncating on Windows and also most issue of error details on all platforms.

@charlypoly I just encountered this problem, and tried out the changes you made in #8525, and they do appear to resolve the issues.

A fix has been released in<EMAIL_ADDRESS>📦
Please make sure to also update all your @graphql-codegen/* packages.

@pleunv any feedback with the canary version suggested above?

Apologies, completely missed this. Just want to confirm that this does in fact also fix the issue for us. Thank you!

still have codegen log messages truncated on    "@graphql-codegen/cli": "^5.0.3"
have anyone solved this?


Convert OPLS FF to new format

If you guys end up with time, I'd love to have a call to find out more about what you're up to and tell you about what we're up to with the SMIRFF format and SMIRKS-based chemical perception, as there may be some overlap in our efforts.

That would be great! I've been loosely following the OpenFF group repos and from what I can tell we're tackling a slightly different problem but nonetheless may have significant overlap in tooling.
We're hoping to have a more robust demo out in a week or two so maybe that would be a good ballpark timeframe to set up a chat?

Looks like we've got a call on the books now! I think there may be some overlap in the problem space, plus I think we may have some suggestions to help you avoid some pitfalls. But I agree that things are not completely overlapping. :)

Done in #56 and #57


Posibility to change date format in WeekPicker plugin

Someone just need to change the dateFormat

Hi,
How can I get the first day (in date format) of the week selected?


Update Dockerfile to specify python version

Specifies python version for the alpine image, as current versions of python do not correctly build needed modules in requirements.txt

superseded by #38


Add a plain vanilla Markdown version of index.html

Two things:

Licenses – this uses and includes a copy of @aaronsw 's html2text.py [1] which is GPL3 which probably means ... hilarity. I haven't actually gotten to the licenses section of this article (there is a section about licenses, right?) because of (2)

I tried reading the essay online. I got to the part about LinkedIn followers and then something about the videowrapper stuff [1] and ad blockers causes the following half a dozen paragraphs to not be rendered.

So I made this.
--
[1] http://www.aaronsw.com/2002/html2text/
[2] https://github.com/BloombergMedia/whatiscode/blob/master/index.html#L208
[3] https://github.com/BloombergMedia/whatiscode/blob/master/index.html#L217-L227

@straup there is no section about licenses in the article because I wanted people to not hate everything forever and also I didn't want to poke the bear and get THE EMAIL again, you know the email and the bear I'm talking about.

What adblocker/browser combo are you using? Can't reproduce with AdBlock on chrome.


Items

Can you make an items JSON? :)
For example: berries, balls, consumables, etc.

I've created an issue for this on the old, deprecated repo. Forgot to move the issue. See #12.


Define where the results of the scan can be found

I'm using Azure Devops.
While the scan results are available in the pipeline run results, it's not available in the Microsoft Defender portal (in the Azure Portal).
Can this be clarified? Is this expected behaviour and is this on the roadmap>
Thanks

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

ID: 25631402-15dd-bc45-2b06-10ce3d50af03
Version Independent ID: 484f19b2-c19a-4a3d-65d0-0b72cbaae482
Content: Discover misconfigurations in Infrastructure as Code - Defender for Cloud
Content Source: articles/defender-for-cloud/iac-vulnerabilities.md
Service: defender-for-cloud
GitHub Login: @ElazarK
Microsoft Alias: elkrieger

@w0ut0
Thanks for your feedback! We will investigate and update as appropriate.

@w0ut0
I'm going to assign this to the document author so they can take a look at it accordingly.
@ElazarK
Can you please check and add your comments on this doc update request as applicable.

@w0ut0 Thank you for taking the time to reach out. We are in the process of addressing this issue and will have a release note out soon that addresses this.

#please-close


Rework pandas flavour

Enables new way of using pandas dataframes: just import janitor, and all of janitor's functions are automatically attached and registered onto a pandas DataFrame object! No more wrapping :smile:

With special thanks to @Zsailer!


fix(patched): re-enable --config cli arg

Moved --config parsing for toml to App.parse_preliminary_options so flakehaven can extract it before flake8 uses it.
fixes #48

no, there are no additional tests... yet

tests added @mcarans @jarojasm95


Auto generate keys

Add support auto generate private and public keys;
Fix permissions of wireguard config;
Update structure variables.

Hi, thank you for you contribution. I briefly glanced over the code and it looks good to me, hopefully I'll have time to properly test it tomorrow. In the meantime, the tests failures seem to be related


Code breaks in Phantom but not Chrome/FF

Hi guys, I'm trying to get my code running in Phantom to run some tests, but it's breaking and I'm not exactly sure why.
It's an Aurelia/SystemJS based app and both my application and an Aurelia example using SystemJS break with Phantom. Here are the outputs from both:
app-contacts:
CONSOLE: INFO [aurelia] Aurelia Starting (from line #undefined in "undefined")
CONSOLE: DEBUG [aurelia] Loading plugin<EMAIL_ADDRESS>(from line #undefined in "undefined")
TypeError: Attempting to define property on object that is not extensible.

  http://localhost:9001/:48 in defineProperty
  http://localhost:9001/:36
  http://localhost:9001/:29 in fastKey
  http://localhost:9001/:115
  http://localhost:9001/:10 in set
  http://localhost:9001/:51 in set
  http://localhost:9001/:14 in ensureOriginOnExports
  http://localhost:9001/:131
  http://localhost:9001/jspm_packages/es6-module-loader.js:7 in O
  http://localhost:9001/jspm_packages/es6-module-loader.js:7 in K
  http://localhost:9001/jspm_packages/es6-module-loader.js:7
  http://localhost:9001/jspm_packages/es6-module-loader.js:7
  http://localhost:9001/jspm_packages/es6-module-loader.js:7
  http://localhost:9001/jspm_packages/es6-module-loader.js:7

my application:
CONSOLE: Potentially unhandled rejection [2] ReferenceError: Can't find variable: Map
    at http://<IP_ADDRESS>:8380/web-admin/:22
    at p (http://<IP_ADDRESS>:8380/web-admin/jspm_packages/system.js:1)
    at p (http://<IP_ADDRESS>:8380/web-admin/jspm_packages/system.js:1)
    at p (http://<IP_ADDRESS>:8380/web-admin/jspm_packages/system.js:1)
    at p (http://<IP_ADDRESS>:8380/web-admin/jspm_packages/system.js:1)
    at p (http://<IP_ADDRESS>:8380/web-admin/jspm_packages/system.js:1)
    at p (http://<IP_ADDRESS>:8380/web-admin/jspm_packages/system.js:1)
    at p (http://<IP_ADDRESS>:8380/web-admin/jspm_packages/system.js:1)
    at http://<IP_ADDRESS>:8380/web-admin/jspm_packages/system.js:1
    at o (http://<IP_ADDRESS>:8380/web-admin/jspm_packages/es6-module-loader.js:7)
    at p (http://<IP_ADDRESS>:8380/web-admin/jspm_packages/es6-module-loader.js:7)
    at j (http://<IP_ADDRESS>:8380/web-admin/jspm_packages/es6-module-loader.js:7)
    at k (http://<IP_ADDRESS>:8380/web-admin/jspm_packages/es6-module-loader.js:7)
    at http://<IP_ADDRESS>:8380/web-admin/jspm_packages/es6-module-loader.js:7
    at O (http://<IP_ADDRESS>:8380/web-admin/jspm_packages/es6-module-loader.js:7)
    at K (http://<IP_ADDRESS>:8380/web-admin/jspm_packages/es6-module-loader.js:7)
    at http://<IP_ADDRESS>:8380/web-admin/jspm_packages/es6-module-loader.js:7
    at http://<IP_ADDRESS>:8380/web-admin/jspm_packages/es6-module-loader.js:7
    at http://<IP_ADDRESS>:8380/web-admin/jspm_packages/es6-module-loader.js:7
    at http://<IP_ADDRESS>:8380/web-admin/jspm_packages/es6-module-loader.js:7 (from line #undefined in "undefined")

FWIW these both work fine in Chrome/FF and I'm running PhantomJS 1.9.8 on OS X 10.10
Also here's the phantom script I am using to test these and output from the console:
var webPage = require('webpage');
var page = webPage.create();

page.open('http://localhost:9001/', function() {
  page.onConsoleMessage = function(msg, lineNum, sourceId) {
    console.log('CONSOLE: ' + msg + ' (from line #' + lineNum + ' in "' + sourceId + '")');
  };
});

I've made some instructions to replicate the first set of errors:
git clone git@github.com:aurelia/app-contacts.git
cd app-contacts
npm install && jspm install
gulp watch

This assumes you have node, jspm and gulp installed. Then you can run the above phantomjs script.

Aurelia written with ES6 and ES7. PhantomJS 1.x doesn't support neither ES6 nor ES7. I think you should give a try to 2.x version.

Thanks for the response @Vitallium, my code is transpiled to ES5 with 6to5/traceur before hitting the browser (and so is the example above I believe).
Is there a way to install 2.0.0 with npm? I've been trying all morning but it's not listed on npm (only up to 1.9.16) and when I try listing<EMAIL_ADDRESS>or github:ariya/phantomjs.git#v2.0.0 I get a similar error. I also tried using https://github.com/ariya/phantomjs/archive/2.0.0.tar.gz but npm complains that there isn't a valid `package.json'.

nvm @Vitallium, I got PhantomJS 2 running (phantomjs2 npm package, who would of thought...) and am now getting an even more cryptic error.
Potentially unhandled rejection [2]     at execute (http://<IP_ADDRESS>:8380/web-admin/:22:30)
    at p (http://<IP_ADDRESS>:8380/web-admin/jspm_packages/system.js:1:9364)
    at p (http://<IP_ADDRESS>:8380/web-admin/jspm_packages/system.js:1:9296)
    at p (http://<IP_ADDRESS>:8380/web-admin/jspm_packages/system.js:1:9296)
    at p (http://<IP_ADDRESS>:8380/web-admin/jspm_packages/system.js:1:9296)
    at p (http://<IP_ADDRESS>:8380/web-admin/jspm_packages/system.js:1:9296)
    at p (http://<IP_ADDRESS>:8380/web-admin/jspm_packages/system.js:1:9296)
    at p (http://<IP_ADDRESS>:8380/web-admin/jspm_packages/system.js:1:9296)
    at execute (http://<IP_ADDRESS>:8380/web-admin/jspm_packages/system.js:1:18339)
    at o (http://<IP_ADDRESS>:8380/web-admin/jspm_packages/es6-module-loader.js:7:44413)
    at p (http://<IP_ADDRESS>:8380/web-admin/jspm_packages/es6-module-loader.js:7:44779)
    at j (http://<IP_ADDRESS>:8380/web-admin/jspm_packages/es6-module-loader.js:7:42325)
    at k (http://<IP_ADDRESS>:8380/web-admin/jspm_packages/es6-module-loader.js:7:42710)
    at http://<IP_ADDRESS>:8380/web-admin/jspm_packages/es6-module-loader.js:7:55365
    at O (http://<IP_ADDRESS>:8380/web-admin/jspm_packages/es6-module-loader.js:7:12117)
    at K (http://<IP_ADDRESS>:8380/web-admin/jspm_packages/es6-module-loader.js:7:11746)
    at when (http://<IP_ADDRESS>:8380/web-admin/jspm_packages/es6-module-loader.js:7:15420)
    at run (http://<IP_ADDRESS>:8380/web-admin/jspm_packages/es6-module-loader.js:7:14459)
    at _drain (http://<IP_ADDRESS>:8380/web-admin/jspm_packages/es6-module-loader.js:7:3232)
    at drain (http://<IP_ADDRESS>:8380/web-admin/jspm_packages/es6-module-loader.js:7:1653)

  http://<IP_ADDRESS>:8380/web-admin/jspm_packages/es6-module-loader.js:7

Havin a similar issue using a module (stampit) written in ES6. Works fine with Chrome, but not Phantomjs 1.9.8.

@mdix You should also upgrade from 1.9.8 to 2.0, which has better but not perfect ES6 support.
Having an issue myself with WeakMap not working in phantomjs but working fine in Chrome/Firefox

@binarydev Thanks for the hint. I switched to 2.0 four days ago. Works gr8 locally, but breaks on Travis. Reported it here, let's see.

It sounds like everything that's left to do here involves NPM and/or Travis, so I'm going to close this issue.  Please file a new bug if there are remaining problems.


enhance documentation on writing policy

What would you like to be added:
Please add information, tips and recommendations about writing policy.
Why is this needed:
Worked with a magtape user today who had an issue with their new policy. The problem they had was pretty easy to make, easy to overlook and difficult to understand based on the errors shown in the logs. Enhanced documentation on writing policy would probably help with this.

Where does the doc belong? Some ideas in no particular order:

docs/policies.md - add a new section on writing rego/policy. Likely would want to nest the existing descriptions of existing polices under a level 2 heading called "included policies" or something similar.
CONTRIBUTING.md - doesn't necessarily fit with this content however it would be a place new users might look for it.
policies/README.md - create a new file in the policies directory to house this information.

2 more options come to mind for me:

Add new policy contribution docs to a new file at docs/policy-contrib.md
Rename existing docs/policies.md to docs/core-policy-description.md and add new contrib docs at docs/policies.md

Contributing is actually maybe a word to avoid here. Some folks may just want to write some policy for their own use and not contribute it. It's possible they wouldn't consider to look in a file called contributing.
Your idea to rename the existing doc to ocs/core-policy-description.md and use docs/policies.md for this is pretty good on. I like that. I also think the README.md under policies might be a good place for it and fits with the existing pattern of the README.md under testing.

Yeah, good point...contributing probably isn't what we want.
It's more policy development/framework/requirements.
I think you're on the right path, feel free to move forward. I think I'm ok with either of the last 2 suggestions.