Persistent removal of trailing whitespace for clean diffs

As per my review comment in https://github.com/cf-convention/cf-conventions/pull/401#pullrequestreview-1841016870, it has been agreed to re-remove trailing whitespace (and any other non-visible characters and features) from the document (AsciiDoc format) files. I will do this later today.
That said, I've raised this before in https://github.com/cf-convention/cf-conventions/issues/393 where the blitzing  of all whitespce was previously completed, but it can easily get added to the document pages as PRs go in. For that reason, I propose we have a means to automate or at least regulate the removal of any trailing whitespace that gets added. This could be part of further linting automation, or standalone, though removal of trailing whitespace on all files is quite trivial in terms of applying operations to do it, so would be particularly easy to set up, maybe as a first step.
I would suggest the following, on these lines. Either we:

ensure no trailing whitespace is added for any PR that gets merged after I do the next removal, either by reviewer insistence or by means of a tool such as pre-commit hooks to ensure all commits obey the linting standards we configure;
or (my preferred option since it will PR submitters won't need to concern themselves at all about any trailing whitespace) we have some automated process to do the removal at regular periods. This could be configured as a CI job by GitHub Actions which we already use, to check for it and if it exists, submit a PR to remove it.

I am happy to set something above towards the above.
If folk, esp. on the Info. Management Committee, could let me know if they agree with the proposal, that would be appreciated. In the meantime, I'll do a PR to remove the whitespace introduced after more recent PRs including #401.

Hi Sadie,
Thanks for taking the lead here - if we were all devs I'd say let's use a pre-commit hook, but considering the diversity of technical setups that our contributors have, my recommendation would be to setup an automation that remotes trailing whitespace on top of PRs. Thinking out loud here, not sure about feasibility, what if at every PR there's a check that looks for trailing whitespace and if it's found adds a commit on top of that that kills the trailing whitespace?
In fact with such an action, a manual blitz would no longer be necessary...
What could possibly go wrong?

Thanks @erget, I agree that pre-commit hooks are probably too much of a barrier to employ and that some automation solution is best.

what if at every PR there's a check that looks for trailing whitespace and if it's found adds a commit on top of that that kills the trailing whitespace

Sounds good to me. I will look into options and see if I can get a  job running that implements this, once I've waited a few working days to see if anyone has any issue with the idea in general.

I"m no expert in git -- but I'm pretty sure that tehre is a way to set up a pre-commit hook that does this beofre the commit gets pushed.

what if at every PR there's a check that looks for trailing whitespace and if it's found adds a commit on top of that that kills the trailing whitespace

This is less than ideal, because you get an extra "wasted" commit -- a somewhat ugly history -- as an example "git blame" would show that every line that had whitespace removed has been last edited by the system, rather than whoever actually made a change.
Some quick googling did not reveal an answer, but this is a VERY common issue, there has got to be a standard solution out there!

I agree that pre-commit probably will be a barrier. Is the auto-blitz intended to happen when opening a PR, and every time time the PR is updated? Then I agree agree with @ChrisBarker-NOAA that this will complicate the history, and that there ought to be a smart solution already out there. Could the auto-bliz happen when the PR is merged?

I expect most PRs contain more than one commit.
There are lots of style guide checkers for code (PEP8, Spotless, etc.) but I haven't found any for Asciidoc. I've work on other projects where the workflow involves a test on PRs that fail if the style isn't followed. A committer must then push another commit with the fix so the test passes before the PR can be merged. Not sure if that is better or easier than an automated process but it is a bit more visible (which might help with awareness among contributors of the style guide).

Thanks all for your thoughts and ideas. And it is good to hear some background to this issue e.g. from @ethanrd. It's probably wise as Ethan suggests to consider style linting as a whole whilst we think about this, because if we implement a solution here we would want it to be extensible to any further style fixes we might want to use too, eventually at least. And I think trailing whitespace removal is a good thing to start with, since it's non-controversial, easy to run operations to remove, and clear to review for manually to check our solution is doing what we want.
As everyone's indicated, there's no perfect solution, but plenty of (fairly-)standard approaches to choose from. It seems we have collectively thought of the following possibilities, which I've numbered to help us discuss, and moreover are agreed (please do correct me if anyone feels this is wrong or mis-representative) that we don't want the first so I've crossed it out:

pre-commit hooks: would work but are too much of a barrier to those who contribute, not all of who are (very) familiar with the command-line or git etc., so avoid;
a regular PR/commit dedicated to style fixes, ideally by a CI workflow and/or cron or similar running a regular job;
linting checks on (all) PRs which warn of style issues such as trailing whitespace could be a solution where either:

the PR author needs to add extra commits to fix any issues before it is allowed to be merged;
a CI job runs after every PR or set of PRs merge to check for any style issues and automate the fixing of any that have been introduced by the PR.

Maybe if everyone could outline their favourite (or unfavoured) option(s), or ask any questions about them, then we can determine the best way forward? If it helps, based on past experience I have I think it would be simple enough for me to set up any of these solutions, so ease of implementation isn't a concern (to me, at least).

Thanks @sadielbartholomew , excellently summarised :)
I'm happy with both 2 and 3, but I could see a certain charm in traceability of implementing 2 and agreeing to do this before minting a new release. That means that it would take place en bloc before the release goes out. Of course, I don't mint the releases so that's easy for me to say; @davidhassell and others may have a different perspective.

(2) has the disadvantage of creating gaps in the history -- any lines that were fixed by the job will show as hvng been edited by the CI, not whoever actually made the change (and the data will be wring, too, though if it's run regularly, not by much). On the other hand, maybe history isn't important for this kind of project. If there's something of concern with a part of the doc, does it matter exactly who last touched it or when they did?
I think (3 i. ) is not great -- similar to commit hooks, it puts a burden on the author of the PR -- and depending on their skill set could be a barrier to entry.
I'm not sure I fully understand (3 ii.) -- where / when would the fixing occur? Depending on the answer to that, it could introduce similar history issue.
So I suggest (4) (which might be 3 ii, if I've misunderstood:
(4) Summary: all changed, including auto-linting, are squashed as a single commit when merged into main
Some of this is (hopefully) policy already, but I'm putting it here, as it's important to the process.

main is never updated directly -- the only way to update main is via a merge from another branch.
In all non-main branches, a CI job is run that fixes style issue on every push: those branches will always be "clean".
When a branch is merged, commits are "squashed", so appear as a single commit -- so the history shows the whole thing as a single, correct, change, including style fixing.

This could be a bit complicated by PRs from a third-party repo -- I'd have to think about that more, as asking folks to first merge into a temporary branch,and then we merge into main could be a bit challenging.

I am nothing like an expert in git or github, more the opposite. Maybe that is why I do not fully see the same disadvantage  alternative 2 as @ChrisBarker-NOAA does:
Wouldn't it possible to have an action that kicks in immediately after the files from the PR has been merged into the main? That is, it will be clear who authored the changes and when they where merged from a separate branch. Immediately after the merge the action kicks in and does any cleaning of those specific files in the main branch. I.e. the action is the only one that do changes directly in the main branch, and they happens seconds/minutes after the merge.
--- Or am I envisioning the impossible here? There seems to to be some disussion on this subject over at Stack Overflow, but now I am definitively out of my depth.

Wouldn't it possible to have an action that kicks in immediately after the files from the PR has been merged into the main?
yes, I'm pretty sure that's possible.

That is, it will be clear who authored the changes and when they where merged from a separate branch.

That's the problem -- for example:

Person A makes some changes, with some extra whitespace, etc.
They make a PR, and it gets merged in to main with commits "squashed"
The git log shows something like: (taken from today)

$ git log
commit 44e7c0784007ebf0f21f67e3e891a746f30edda5 (HEAD -> main, origin/main, origin/HEAD)
Author: Daniel Lee<EMAIL_ADDRESS>Date:   Wed Jan 24 17:04:11 2024 +0100

    Update line breaks (and minor corrections) (#401)

    * Update line breaks (and minor corrections)

    * Homogenise monotype and bolding

And git blame shows:
(small excerpt)
44e7c078 (Daniel Lee         2024-01-24 17:04:11 +0100  93) The format for the `formula_terms` attribute is
940afbc0 (Steve Jones        2022-09-14 16:26:49 +0200  94)
44e7c078 (Daniel Lee         2024-01-24 17:04:11 +0100  95) ----
44e7c078 (Daniel Lee         2024-01-24 17:04:11 +0100  96) formula_terms = "a: var1 b: var2 ps: var3 p0: var4"
^eca16f4 (Richard Hattersley 2015-06-04 11:42:26 +0100  97) ----
^eca16f4 (Richard Hattersley 2015-06-04 11:42:26 +0100  98)

All good. We know that lines 95 and 96 were touched by Daniel on 2024-01-24.

Now the bot runs, and corrects whitespace, etc.

Now git log will look like:
$ git log
commit bf0f21f67e3e891a74644e7c0784007ef30edda5 (HEAD -> main, origin/main, origin/HEAD)
Author: cf-autoformat-bot
Date:   Wed Jan 24 17:06:00 2024 +0100

    Auto-formatting run

not too bad, you can always look at previous commits.

But now git blame looks like this:

44e7c078 (cf-autoformat-bot    2024-01-24 17:06:00 +0100  93) The format for the formula_terms attribute is
940afbc0 (Steve Jones        2022-09-14 16:26:49 +0200  94)
44e7c078 (cf-autoformat-bot    2024-01-24 17:06:00 +0100  95) ----
44e7c078 (cf-autoformat-bot    2024-01-24 17:06:00 +0100  96) formula_terms = "a: var1 b: var2 ps: var3 p0: var4"
^eca16f4 (Richard Hattersley 2015-06-04 11:42:26 +0100  97) ----
^eca16f4 (Richard Hattersley 2015-06-04 11:42:26 +0100  98)
So we know when those lines were changed, but not by who.

Anyway, not fatal -- in some cases with real code, you really want to know who made the changes, but for this kind of thing, maybe we don't care (and it is there in the history if you really want to dig for it) -- but that's my point.

If we can find a way to get the autoformat changes to be squashed with the other changes as one merge, then it'll be a clearer history. maybe that's not important, though.

TL;DR: I'd keep it simple for the merging procedures because that takes place a lot more often than forensics do, and I don't think we incur huge debts by having a bit of a dirty history. Note that we have a lot of commits that have very undescriptive messages as they are.
I can unpack that a bit:
Yes, in essence you can still find out who really authored each line by going back to the commit previous to the one made by the autoformatter and then you'd still get the line-by-line allocated to (probably) humans.
In the end though I think the squashing or rebasing or whatever is probably down to the release procedures, because there you have similar concerns. One could e.g. rebase such that the autoformatter changes are always squashed into the previous commit. That'd be how I'd do it, personally. It really depends on how we do the branching and merging - currently after agreement essentially the work branch is merged into master which will eventually be the next tag. If we wanted great traceability and great formatting, options I see are to

have a community that abides by the formatting rules (I have shown that I'm not personally trustworthy here because in the absence of an IDE I used the GitHub editor, which introduces trailing white space - mea culpa!) or
have a pre-commit hook that forces people to abide - not in favour because it could be confusing to many contributors or
run a job before merging to main that would squash the commit. That's a bit more cumbersome for the merger, and given that the Conventions Committee are not all git experts, that could hamper their efforts, or
involve the IM team to finalise merges - then they squash and merge after e.g. the committee has merged to a next branch or something, which means that we have an overall higher complexity in our branching approach but it doesn't really hurt the Committee's work

In my view all of those are feasible but come at costs that outweigh the benefits. In the end, in the event that one really wants line-by-line forensics, it's gonna involve a bit of digging anyway, but that digging doesn't take place often and people who are expert in git can be asked for advise at that point.

Hi all - I favor option 3.1 (test and fix by hand-ish [1]) because it increases the visibility of the style guide rather than hiding it behind an automatic process. I think awareness of the style guide/rules is worth a bit of extra effort. Also, that effort doesn't need to be provided by the original committer. The committer can allow CF repo maintainers to push to the PR branch.
[1] By hand or by a CI job that runs after the failed test and adds a commit to the PR.

After reading @ChrisBarker-NOAA's "squash" comment, I took a closer look and notice that we have a combination of PRs being merged and PRs being squashed onto the 'main' branch. While I think a clean commit history is important to work towards, I think we might want to develop some process around how to decide on what makes a clean commit for a given PR. Encouraging PR committer(s) to decide on and rebase to get a clean (minimal but informative) commit history would be my go to preference. But that adds yet another barrier. Though, again, I think it could be handled by CF repo maintainers.
This should probably be a separate discussion. I'll try and start an issue on PR merge process and clean commit history later today.


Concepts for labeling in 3d

If you think of software like Blender it becomes clear, that editing a 3d volume is a very difficult task,
which requires versatile tools. But which functional, that we can provide, would be most useful for labeling tasks in biology?

FWIW, I've been finding that it is more important to view user's actions/effects in 3D than it is to actually label/place objects via a 3D interface. In other words, I'm shipping tools where the user's actions are performed in 2D but displayed in 3D, and that works much better than the actions being performed in 3D. An important exception to this is VR. Ask Ulrik for the story about why the most useful VR tool is still a keyboard.


Full-screen QR code view

Feature description
Touching the event or location QR code on the screen that displays the QR code should enter a full-screen mode that displays nothing but the QR code and event metadata (description / title and place). Touching the screen again would close this new view.
Additionally, the brightness should be increased to avoid scanning problems.
Such a pretty, distraction-free view could look like this:

Problem and motivation
Users might want to have a desire to present their guests with a more cleaned-up version of the QR code screen. One specific use case might be a phone that is being used solely to display the code at an entrance. This ties in with #399, as a website that offers such a mode could also be used similarly.
See also https://github.com/corona-warn-app/cwa-app-android/issues/2854#issuecomment-821398421.

Is this something you're interested in working on

Yes, for Android.

Internal Tracking ID: EXPOSUREAPP-6542

@fynngodau Many thanks for the suggestion. Internal Tracking ID: EXPOSUREAPP-6542

Corona-Warn-App Open Source Team

This has been done for Android in https://github.com/corona-warn-app/cwa-app-android/pull/3110 and will be shipped with 2.3.
@Ein-Tim Is this feature also going to be included in iOS?

@fynngodau I did not see a PR regarding this and just tried on an Emulator under iOS, and no this feature seems to be (at the moment) only included under Android, sadly.

I am happy to learn that this feature was also added to all other screens that show QR codes (RAT profiles, vaccination QR codes) on Android.


Potential read obsolete state contextValue

Hi, according to my understanding, useEffect should have all the variables listed in its dependency list, but it seems this line of code https://github.com/Swizec/useAuth/blob/master/src/AuthProvider.js#L53 does not include contextValue in the dependency list.
The current code:
useEffect(() => {
        setContextValue({ ...contextValue, state });
    }, [state]);

Maybe it's better this way?
useEffect(() => {
        setContextValue((contextValue) => {
            return { ...contextValue, state };
        });
    }, [state]);

This allows us not to include contextValue into the dependency list. So we can follow the React Hooks rules.

You are right. Thanks for pointing that out, have made that mistake in many projects :)

@all-contributors add @sophister for bugs


Integration with Pivotal Tracker broken

Toggl button when using with Pivotal breaks. You can "Start timer", it opens toggl pop-up. Nothing more can be done with this pop-up, however, it has hanged. Cannot be dismissed. You cannot select project. At the same time, time tracking was started properly on toggl.com site, so that integrration works, just the UI that hangs.
This is happening to me and my colleagues. Our set up is Chrome 41 on Linux. Error in JavaScript console:
Error in event handler for (unknown): TypeError: Cannot read property 'parentNode' of undefined
at Object.togglbutton.generateProjectLabel (chrome-extension://oejgccbfbmkkpaidnkphaiaecficdnfn/scripts/common.js:137:26)
    at togglbutton.addEditForm (chrome-extension://oejgccbfbmkkpaidnkphaiaecficdnfn/scripts/common.js:247:133)

This issue appears when the popup doesn't have all the latest projects that are present in the application. I will add a failsafe for this. Until then a simple refresh should make this go away.

I tried clicking toggl button -> sync but that does not help. Or there is something else I should do?

Also, it's not a new project...

I would suggest refreshing the page or disabling and enabling the extension.

That solves the issue partially. Widget does not crash (loaded extension from gh master). But I do not see the project on the list in the drop-down. So, I think, it might be in fact problem with the api or something. This project is on client's workspace, I do not see the whole workspace in the drop-down, but I do see it when I log into toggl web app

If you want us to look into it more, please write to<EMAIL_ADDRESS>with all the details. The project name and workspace that is causing the issue.

Also please mention that you have discussed this with Indrek so I the case gets assigned to me.


Colors for bullet charts

Hi,
I'm having issues with the colors definition for the bullet charts. I'm pretty sure there's an simple solution, but it seems that after scratching my head for a few hours, i can't think clearly anymore...
The bullet charts are directly derived from the example provided, with a few tweaks here and there.
Symptoms: when some values from different measure axes are equal, the color of the first axis is used to display all the other measures with the same value.
In case i'm not making sense, I've set up a jsfiddle to demonstrate this : http://jsfiddle.net/e7f6t3oc/1/
I'd like to have a color per measure axis, even though the values on the axes are the same.
Thanks !

I think you can do this by adding unique dummy category for each series being added...so something like this:
var lm = bullet.addSeries(["Overall","DummyCat1"], dimple.plot.bar, [bY, lX]);
// Add the main series
var b = bullet.addSeries(["Participant","DummyCat2"], dimple.plot.bar, [bY, bX]);
// Add the comparison series
var m = bullet.addSeries(["Customer","DummyCat3"], dimple.plot.bar, [bY, cX]);
var g = bullet.addSeries(["Supplier","DummyCat4"], dimple.plot.bubble, [bY, gX]);

Hi,
that's exactly it ! It works like a charm :+1:
I've updated the fiddle, in case it can help someone in the future : http://jsfiddle.net/e7f6t3oc/5/
I'll have to read the docs and source more meticulously to understand the mechanism behind that though.
Thanks a lot !


fix(homepage): typo corrections and updated twitter handles

Pre-flight checklist

[x] I have read the Contributing Guidelines on pull requests.
[ ] If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
[ ] If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

Motivation
I was browsing the Docusaurus homepage and spotted a few typos. so, I cloned the repo to fix those, and while I was at it, I noticed a few other things to update like switching links to https and refreshing twitter handles.

Test Plan
-

Test links
-

Related issues/PRs
-

Thanks
the github usernames looks wrong now
We need you to sign the CLA, can't merge without it

CLA signed & reflected thx.


[API Integration] Example WordPress REST API Photo Directory

Provider API Endpoint / Documentation

This is a sample endpoint for a photo directory using custom endpoints with the WordPress REST API. Building an integration like this will help us work with future WordPress REST APIs and learn their concepts of pagination, query params, response shapes, and more.
Our example endpoint has a homepage at: https://photodir.zack.cat/ with documentation on the available endpoints.
Licenses Provided

For our purposes here, assume all images are CC0.
License URL: https://creativecommons.org/share-your-work/public-domain/cc0
Provider API Technical info

WordPress REST API Docs
Pay special attention to pagination and how to order descending by date, and to make sure there 100 results per page:
?orderby=date&order=desc&after=2016-10-13T17:00:00&per_page=100
Please note the example API does not implement these query params.
Also, they are not implemented in this example API either, but single result landing pages are at /photos/photo/{slug}.
Checklist to complete before beginning development

No development should be done on a Provider API Script until the following info is gathered:

[ ] Verify there is a way to retrieve the entire relevant portion of the provider's collection in a systematic way via their API.
[x] Verify the API provides license info (license type and version; license URL provides both, and is preferred)
[x] Verify the API provides stable direct links to individual works.
[x] Verify the API provides a stable landing page URL to individual works.
[ ] Note other info the API provides, such as thumbnails, dimensions, attribution info (required if non-CC0 licenses will be kept), title, description, other meta data, tags, etc.
[ ] Attach example responses to API queries that have the relevant info.

General Recommendations for implementation

The script should be in the openverse_catalog/dags/provider_api_scripts/ directory.
The script should have a test suite in the same directory.
The script must use the ImageStore class (Import this from
openverse_catalog/dags/provider_api_scripts/common/storage/image.py).
The script should use the DelayedRequester class (Import this from
openverse_catalog/dags/provider_api_scripts/common/requester.py).
The script must not use anything from
openverse_catalog/dags/provider_api_scripts/modules/etlMods.py, since
that module is deprecated.
If the provider API has can be queried by 'upload date' or something similar,
the script should take a --date parameter when run as a script, giving the
date for which we should collect images. The form should be YYYY-MM-DD (so,
the script can be run via python my_favorite_provider.py --date 2018-01-01).
The script must provide a main function that takes the same parameters as from
the CLI. In our example from above, we'd then have a main function
my_favorite_provider.main(date). The main should do the same thing calling
from the CLI would do.
The script must conform to PEP8. Please use pycodestyle (available via
pip install pycodestyle) to check for compliance.
The script should use small, testable functions.
The test suite for the script may break PEP8 rules regarding long lines where
appropriate (e.g., long strings for testing).

Examples of other Provider API Scripts

For example Provider API Scripts and accompanying test suites, please see

openverse_catalog/dags/provider_api_scripts/flickr.py and
openverse_catalog/dags/provider_api_scripts/test_flickr.py, or
openverse_catalog/dags/provider_api_scripts/wikimedia_commons.py and
openverse_catalog/dags/provider_api_scripts/test_wikimedia_commons.py.

Implementation

[ ] 🙋 I would be interested in implementing this feature.

After exploring the responses of the Example API I have some questions I would like to clarify.
First, this is an example response of the /wp-json/wp/v2/photos endpoint:

List of photos
[
  {
    "id": 43,
    "date": "2021-06-08T07:37:45",
    "date_gmt": "2021-06-08T07:37:45",
    "guid": {
      "rendered": "https://photodir.zack.cat/?post_type=photo&p=43"
    },
    "modified": "2021-06-08T07:37:45",
    "modified_gmt": "2021-06-08T07:37:45",
    "slug": "56560bf1d6",
    "status": "publish",
    "type": "photo",
    "link": "https://photodir.zack.cat/photo/56560bf1d6/",
    "title": {
      "rendered": "56560bf1d6"
    },
    "content": {
      "rendered": "
Lupinus polyphyllus (aka Washington lupine)
\n",
      "protected": false
    },
    "author": 3606,
    "featured_media": 44,
    "template": "",
    "meta": {
      "spay_email": ""
    },
    "photo-categories": [
      8
    ],
    "photo-colors": [
      15,
      36
    ],
    "photo-orientations": [
      24
    ],
    "photo-tags": [
      35,
      28
    ],
    "_links": {
      "self": [
        {
          "href": "https://photodir.zack.cat/api/wp-json/wp/v2/photos/43"
        }
      ],
      "collection": [
        {
          "href": "https://photodir.zack.cat/api/wp-json/wp/v2/photos"
        }
      ],
      "about": [
        {
          "href": "https://photodir.zack.cat/api/wp-json/wp/v2/types/photo"
        }
      ],
      "author": [
        {
          "embeddable": true,
          "href": "https://photodir.zack.cat/api/wp-json/wp/v2/users/3606"
        }
      ],
      "version-history": [
        {
          "count": 1,
          "href": "https://photodir.zack.cat/api/wp-json/wp/v2/photos/43/revisions"
        }
      ],
      "predecessor-version": [
        {
          "id": 45,
          "href": "https://photodir.zack.cat/api/wp-json/wp/v2/photos/43/revisions/45"
        }
      ],
      "wp:featuredmedia": [
        {
          "embeddable": true,
          "href": "https://photodir.zack.cat/api/wp-json/wp/v2/media/44"
        }
      ],
      "wp:attachment": [
        {
          "href": "https://photodir.zack.cat/api/wp-json/wp/v2/media?parent=43"
        }
      ],
      "wp:term": [
        {
          "taxonomy": "photo_category",
          "embeddable": true,
          "href": "https://photodir.zack.cat/api/wp-json/wp/v2/photo-categories?post=43"
        },
        {
          "taxonomy": "photo_color",
          "embeddable": true,
          "href": "https://photodir.zack.cat/api/wp-json/wp/v2/photo-colors?post=43"
        },
        {
          "taxonomy": "photo_orientation",
          "embeddable": true,
          "href": "https://photodir.zack.cat/api/wp-json/wp/v2/photo-orientations?post=43"
        },
        {
          "taxonomy": "photo_tag",
          "embeddable": true,
          "href": "https://photodir.zack.cat/api/wp-json/wp/v2/photo-tags?post=43"
        }
      ],
      "curies": [
        {
          "name": "wp",
          "href": "https://api.fake.com/{rel}",
          "templated": true
        }
      ]
    }
  },
...
]

and this is an example response of the /wp-json/wp/v2/media endpoint:

Image details
[
  {
    "id": 44,
    "date": "2021-06-08T07:34:17",
    "date_gmt": "2021-06-08T07:34:17",
    "guid": {
      "rendered": "https://storage.googleapis.com/fake.zack.cat/2021/05/56560bf1d69971f38.94814132.jpg"
    },
    "modified": "2021-09-23T21:56:53",
    "modified_gmt": "2021-09-23T21:56:53",
    "slug": "washington-lupine",
    "status": "inherit",
    "type": "attachment",
    "link": "https://photodir.zack.cat/cdn/2021/05/56560bf1d69971f38.94814132.jpg",
    "title": {
      "rendered": "washington-lupine"
    },
    "author": 3606,
    "comment_status": "open",
    "ping_status": "closed",
    "template": "",
    "meta": {
      "spay_email": ""
    },
    "description": {
      "rendered": "
<img width=\"225\" height=\"300\" src=\"https://photodir.zack.cat/cdn/2021/05/56560bf1d69971f38.94814132-225x300.jpg\" class=\"attachment-medium size-medium\" alt=\"\" loading=\"lazy\" srcset=\"https://storage.googleapis.com/fake.zack.cat/2021/05/56560bf1d69971f38.94814132-225x300.jpg 225w, https://storage.googleapis.com/fake.zack.cat/2021/05/56560bf1d69971f38.94814132-768x1024.jpg 768w, https://storage.googleapis.com/fake.zack.cat/2021/05/56560bf1d69971f38.94814132-1152x1536.jpg 1152w, https://storage.googleapis.com/fake.zack.cat/2021/05/56560bf1d69971f38.94814132-1536x2048.jpg 1536w\" sizes=\"(max-width: 225px) 100vw, 225px\" />
\n
Lupinus polyphyllus (aka Washington lupine)
\n"
    },
    "caption": {
      "rendered": "
Lupinus polyphyllus (aka Washington lupine)
\n"
    },
    "alt_text": "",
    "media_type": "image",
    "mime_type": "image/jpeg",
    "media_details": {
      "width": 3024,
      "height": 4032,
      "file": "2021/05/56560bf1d69971f38.94814132.jpg",
      "sizes": {
        "medium": {
          "file": "56560bf1d69971f38.94814132-225x300.jpg",
          "width": 225,
          "height": 300,
          "mime_type": "image/jpeg",
          "source_url": "https://photodir.zack.cat/cdn/2021/05/56560bf1d69971f38.94814132-225x300.jpg"
        },
        "large": {
          "file": "56560bf1d69971f38.94814132-768x1024.jpg",
          "width": 768,
          "height": 1024,
          "mime_type": "image/jpeg",
          "source_url": "https://photodir.zack.cat/cdn/2021/05/56560bf1d69971f38.94814132-768x1024.jpg"
        },
        "thumbnail": {
          "file": "56560bf1d69971f38.94814132-150x150.jpg",
          "width": 150,
          "height": 150,
          "mime_type": "image/jpeg",
          "source_url": "https://photodir.zack.cat/cdn/2021/05/56560bf1d69971f38.94814132-150x150.jpg"
        },
        "medium_large": {
          "file": "56560bf1d69971f38.94814132-768x1024.jpg",
          "width": 768,
          "height": 1024,
          "mime_type": "image/jpeg",
          "source_url": "https://photodir.zack.cat/cdn/2021/05/56560bf1d69971f38.94814132-768x1024.jpg"
        },
        "1536x1536": {
          "file": "56560bf1d69971f38.94814132-1152x1536.jpg",
          "width": 1152,
          "height": 1536,
          "mime_type": "image/jpeg",
          "source_url": "https://photodir.zack.cat/cdn/2021/05/56560bf1d69971f38.94814132-1152x1536.jpg"
        },
        "2048x2048": {
          "file": "56560bf1d69971f38.94814132-1536x2048.jpg",
          "width": 1536,
          "height": 2048,
          "mime_type": "image/jpeg",
          "source_url": "https://photodir.zack.cat/cdn/2021/05/56560bf1d69971f38.94814132-1536x2048.jpg"
        },
        "full": {
          "file": "56560bf1d69971f38.94814132.jpg",
          "width": 3024,
          "height": 4032,
          "mime_type": "image/jpeg",
          "source_url": "https://photodir.zack.cat/cdn/2021/05/56560bf1d69971f38.94814132.jpg"
        }
      },
      "image_meta": {
        "aperture": "1.8",
        "credit": "Zack Krida",
        "camera": "Pixel 2 XL",
        "caption": "",
        "created_timestamp": "1591460495",
        "copyright": "",
        "focal_length": "4.459",
        "iso": "45",
        "shutter_speed": "0.00171",
        "title": "",
        "orientation": "1",
        "keywords": []
      },
      "gcs_url": "https://photodir.zack.cat/cdn/2021/05/56560bf1d69971f38.94814132.jpg",
      "gcs_name": "2021/05/56560bf1d69971f38.94814132.jpg",
      "gcs_bucket": "fake.zack.cat"
    },
    "post": 43,
    "source_url": "https://photodir.zack.cat/cdn/2021/05/56560bf1d69971f38.94814132.jpg",
    "_links": {
      "self": [
        {
          "href": "https://photodir.zack.cat/api/wp-json/wp/v2/media/44"
        }
      ],
      "collection": [
        {
          "href": "https://photodir.zack.cat/api/wp-json/wp/v2/media"
        }
      ],
      "about": [
        {
          "href": "https://photodir.zack.cat/api/wp-json/wp/v2/types/attachment"
        }
      ],
      "author": [
        {
          "embeddable": true,
          "href": "https://photodir.zack.cat/api/wp-json/wp/v2/users/3606"
        }
      ],
      "replies": [
        {
          "embeddable": true,
          "href": "https://photodir.zack.cat/api/wp-json/wp/v2/comments?post=44"
        }
      ]
    }
  },
  ...
]

We can't grab all the images data only from the first endpoint so we would need to make several requests per image:

One request for most of the image details: title, url, height, width, filetype, thumbnail, meta_data...

The first endpoint returns a title but is the same text that the slug, nothing descriptive, so the field from the details endpoint seems to be the correct one to use

One request for author information as previous endpoints seems to return just links or references, so I guess it should be an extra endpoint for this. Perhaps /wp-json/wp/v2/users/<user_id> ?
N request for tags and categories, as the first endpoint return lists with ids, not the descriptive text.

So some questions are:

What do we use for the foreign_identifier field? There is id and slug, and slug is used for the foreign_landing_url but seems like it could be a shorter link with id also, returned in the _links.self.url field in both endpoints, and that leads to the second question
There seem to be two more links that can lead to the same place:

From the 1rs endpoint: /api/wp-json/wp/v2/photos/<photo_id>
From the 2nd endpoint: /api/wp-json/wp/v2/media/<photo_id>
Just to confirm but do we still want to use the /photos/photo/{slug} form for the foreign_landing_url?

Do we want to include colors as tags or meta_data?

Great questions!

The foreign_identifier should be the slug from the photos endpoint

The foreign_landing_url should be the link from the photos endpoint

colors should be meta_data I think, we won't show these to the user quite yet

The title should actually be the content.rendered on the photos endpoint, with the HTML tags stripped. FYI this is the same as caption.rendered on the media endpoint.

For authors, there's a /wp-json/wp/v2/users endpoint that lists all users, with the same pagination as the other endpoints, so we could either hit that endpoint and build a list of all authors, or make multiple queries per-photo. The first seems better to me performance-wise.

tags and categories would work the same way.

I'm going to try to get you access to the real API today @krysal, so that might make finishing this a bit easier 😄


Implement a command for add tag

add-tag  set tag to all components to heads of manifest
add-tag  -f  set tag to all components to heads of feature branch only


path set incorrectly in Repo classes

Description
If I give a name to a realisation (eg. toto) checking out the main branch of the CABLE repository, the path for the repo should be src/toto instead it is set to src/toto/main.  That is using branch 234-clean-parsing-optional.
Then this crashes in add_revision which is about the only place that is using the repo.path variable.
Solution
If we don't want to change too many things, the simpler is in GitRepo.__init__() and SVNRepo.__init(), replace:
        self.path = path / branch if path.is_dir() else path

with
        self.path = path / branch if path == internal.SRC_DIR else path

But considering create_repo is called with:
                repo = create_repo(
                    spec=sub_config.pop("repo"),
                    path=internal.SRC_DIR / name if name else internal.SRC_DIR,
                )

this seems heavy...
Should we instead pass name to repo.init_() and then have:
        self.path = internal.SRC_DIR / name if name else internal.SRC_DIR / branch

How to reproduce
In integration.sh use:
cat > config.yaml << EOL
project: $PROJECT

realisations:
  - repo:
      git:
        branch: main
    name: toto

modules: [
  intel-compiler/2021.1.1,
  netcdf/4.7.4,
  openmpi/4.1.0
]

fluxsite:
  experiment: AU-Tum
  pbs:
    storage:
      - scratch/$PROJECT
EOL

Output
In the PBS log file:
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
  File "/scratch/tm70/ccc561/conda/envs/benchcab-dev/lib/python3.9/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/scratch/tm70/ccc561/conda/envs/benchcab-dev/lib/python3.9/multiprocessing/pool.py", line 48, in mapstar
    return list(map(*args))
  File "/home/561/ccc561/benchcab/benchcab/fluxsite.py", line 275, in run
    self.add_provenance_info(verbose=verbose)
  File "/home/561/ccc561/benchcab/benchcab/fluxsite.py", line 327, in add_provenance_info
    "svn_revision_number": self.model.repo.get_revision(),
  File "/home/561/ccc561/benchcab/benchcab/utils/repo.py", line 117, in get_revision
    repo = git.Repo(self.path)
  File "/scratch/tm70/ccc561/conda/envs/benchcab-dev/lib/python3.9/site-packages/git/repo/base.py", line 224, in __init__
    raise NoSuchPathError(epath)
git.exc.NoSuchPathError: /scratch/tm70/ccc561/benchcab/integration/src/toto/main
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/561/ccc561/.local/bin/benchcab", line 33, in <module>
    sys.exit(load_entry_point('benchcab', 'console_scripts', 'benchcab')())
  File "/home/561/ccc561/benchcab/benchcab/main.py", line 30, in main
    parse_and_dispatch(parser)
  File "/home/561/ccc561/benchcab/benchcab/main.py", line 20, in parse_and_dispatch
    func(**args)
  File "/home/561/ccc561/benchcab/benchcab/benchcab.py", line 251, in fluxsite_run_tasks
    run_tasks_in_parallel(tasks, n_processes=ncpus, verbose=verbose)
  File "/home/561/ccc561/benchcab/benchcab/fluxsite.py", line 366, in run_tasks_in_parallel
    pool.map(run_task, tasks, chunksize=1)
  File "/scratch/tm70/ccc561/conda/envs/benchcab-dev/lib/python3.9/multiprocessing/pool.py", line 364, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "/scratch/tm70/ccc561/conda/envs/benchcab-dev/lib/python3.9/multiprocessing/pool.py", line 771, in get
    raise self._value
git.exc.NoSuchPathError: /scratch/tm70/ccc561/benchcab/integration/src/toto/main

@SeanBryan51 any views on this? I found it using the branch for #234 but it is possible it is also occurring with the main branch (not tested). So we need to add a case to our integration test...

If I give a name to a realisation (eg. toto) checking out the main branch of the CABLE repository, the path for the repo should be src/toto instead it is set to src/toto/main.

That is strange, is the toto directory is being created before the git clone? That would cause it to clone it in the subdirectory src/toto/main. See here:
https://github.com/CABLE-LSM/benchcab/blob/af43dad820811bc0b5e56161957ca374aeeb704e/benchcab/utils/repo.py#L74-L77
I've tested your integration test case for the main branch and it seems to be working as expected:
$ ls $SCRATCH/benchcab/integration/src/toto
documentation  License.md  README.md  requirements.txt  src  src_pop

The checkout and compilation work absolutely fine and are using src/toto, but that's because they don't use repo.path I believe.
The only problem I had appear was in the PBS log file, when it is trying to get the revision/version "number" to write in the netcdf files. It's when calling add_provenance_info from fluxsite.py and get_revision from repo.py. That's the only place where I see a failure. It's because at this point we call _get_models again and the GitRepo() gets recreated. But now, the src/toto directory exists, so it adds the branch name to it when defining path.

Yep, I've reproduced the error in the PBS logs. The logic in the constructor is definitely broken for the case you described. I guess one way we could solve this is to check if the path points to an existing git repository, and set the path correctly in that case?

So if path is git repo -> path = path, else path = path / branch ?

How do you propose to check if it's a git repo? Is there anything in gitpython? Or just checking for a .git/ subfolder?

This does also bring up an issue I have with the design of the Repo object which is that the state of the object does not necessarily reflect the state of the cloned repository on the file system (this issue is an example of this). Perhaps a better approach is to do what gitpython does in the sense that a git.Repo object can only be instantiated if you give it a path to an existing git repository on the file system, or you create one via git.Repo.clone_from() which clones the repository, that way the state of the object always reflects the state of the git repository on the file system.

So if path is git repo -> path = path, else path = path / branch ?

Something like that yep.

Maybe relevant: https://github.com/gitpython-developers/GitPython/issues/715


infinity scroll has some bugs

https://user-images.githubusercontent.com/90852205/232527543-f1efd3e4-8b9e-44f7-b096-9bee4c4a622e.mov

not scrolling on the recording
try scrolling on explore

might be similar issue as

#5692

👋🏻


rsync not working anymore

Which addon?
rsync
Describe the bug
cannot be added to HA anymore, it sais addon not found
To Reproduce

click on the "install to my HA"-Button here https://github.com/Poeschl/Hassio-Addons/tree/master/rsync
receive message "addon was not found"

Expected behavior
installation of the addon in HA
Screenshots

System

Supervisor version: supervisor-2021.10.0
Host system version: Home Assistant OS 6.5
Core version: core-2021.10.4

thank you for clarifying that and for your work on the Add-ons 👍


Acknowledge not logged in user trying to star a Project/Circuit

Describe the bug
A clear and concise description of what the bug is.
If the user is not logged in currently the user's tap on star project button is not acknowledged.
To Reproduce
Steps to reproduce the behavior:

Go to circuitverse.org
Scroll down to examples
Click on Explore More.
Click on any project.
Try to 🌟 the project
See error

Expected behavior
A clear and concise description of what you expected to happen.
User must be redirected to login page or can be shown a flash message that shows Unauthorized status.
Are you working on this issue? (Yes/No)
Yes

@Nitish145 working on this ?

Will work but depends on the login popup modal hence waiting for the same as we'll be required to redirect to login modal.. @aayush-05

@Nitish145 I guess this can be closed. Star icon isn't visible for non-logged users with the new UI

Yeah, Closing this issue..


Add imgur api integration

https://apidocs.imgur.com/#c85c9dfc-7487-4de2-9ecd-66f727cf3139
Currently, there is the only integration that is https://imgbb.com/
Add support for imgur as well, let the developer choose the hosting.

Hi, can I please take a stab at this?

@Opyskoty Hey sure!!

I would like to work on this card please let me know if no one is working on it.
Thanks

@vvkpd Hi, sure!
@Opyskoty most likely not working on it.

Can I take this issue?

@code-star-1 sure!

I'd like to take a crack at it!

@carmonaalex12 sure!

Hasn't been an update in awhile, can I give it  try?

@badcaptcha hi! Sure, go ahead

Hey, can you please tell me what has to be done briefly ? May be I can work on this.

Hi, may be you can look into existing integration https://github.com/muke1908/chat-e2ee/blob/master/backend/external/imagebb.js
Similarly, you can implement Imgur API integration https://apidocs.imgur.com/#c85c9dfc-7487-4de2-9ecd-66f727cf3139

Hey sure, I'm on it.

@muke1908 Mate, I have some doubts.
1. I replaced the existing imgbb with imgur. But you state

Add support for imgur as well, let the developer choose the hosting.

How to do that?
2. I have integrated just the anonymous part as per this link you provided

Similarly, you can implement Imgur API integration https://apidocs.imgur.com/#c85c9dfc-7487-4de2-9ecd-66f727cf3139

Is this fine or do I need to do Authorization as well?

@GJ-16 authorization is not required.


Introduce Versioning for compatibility between agents and contracts

Problem description:
We are currently working on the contract interfaces. Short term this will be done a couple of times more. At the same time we are fixing functionality or improving performance on the agent.
Just updating the production agent to the latest main will break compatibility with the deployed contracts. At the same time we want to have the fixes being updated.
Outcome of the discussion:
General:

Make sure that agents and contracts interface is always compatible for each version
Create a forbid requests switch
Upon each new deployment let the old agent run until all its requests/claims are resolved and deploy a new agent in parallel.
Define a versioning scheme to align with the above

For Testnet:

have rapid development cycles
Deploy any sprint (if necessary ) new contracts and agents

For Mainnet deployment:

Define a more "long term" interface between contracts and agents

@palango @istankovic please add to this comment in case I'm missing something

Outcome of today's discussion:
As a simple way to mitigate versioning problems between agents and contracts we can do the following:

introduce version numbers for contracts
Provide abstract interfaces on the agent's side for each contract version
In the agent's core use abstract functions (withdraw, claim, etc)
Having another module which handles the interaction with the contract specified by the version

This is applicable to events as well as contract calls
It would be nice to have a way to automatically check whether the interface between the agent and the contract has changed and that we need to upgrade the version.
If I have forgotten anything important, please add @weilbith

I think it is very cheap to introduce now compared to introducing in the future.

One potential issue that I see here is that if the request/claim state machine changes, it's going to be non-trivial to adjust for that, unless the state machine is cloned and modified, which not nice. In other words, how do we accommodate changes to the state machine(s) between versions?
Additionally, this issue seems more like an epic and it would be good to have much smaller, concrete and actionable issues written down as children of this one.

@weilbith I am not sure that I understand what you are trying to say. To expand on my question:

In other words, how do we accommodate changes to the state machine(s) between versions?

Contract changes have so far required changes to the state machine and the state machine determine determines the agent's behaviour.
So let us imagine we built an abstraction within the agent that covers the state machine. Once we change the contracts and we need to update the state machine, what are we to do? We could copy the complete state machine, but that is quite far from ideal, in my opinion. Not to mention that we would need such copies anytime we update the state machine.
Also, it is far from obvious to me how we would prevent abstraction leaks.

@istankovic could you maybe give a concrete example of a scenario to expand your worries a bit? Maybe this will clear things up between you and @weilbith

@istankovic could you maybe give a concrete example of a scenario to expand your worries a bit? Maybe this will clear things up between you and @weilbith

Sure. A perfect example would be the upcoming non-fill proof changes. Both the contracts and agents behaviour will change.
But one needs not look at such a dramatic example. Just adding a new contract event would suffice.
A handler for that event needs to be written, and the state machine needs to consider that event, perhaps there may be a new state or several introduced. Obviously, that would result in a new version of the state machine, so my question is, how are we going to handle such changes?
Note that this is more of a technical question, rather than a conceptual. IOW, I'm trying to see how we might address this on a technical level, preferably without cloning the entire state machine.

@istankovic let us have a discussion in person in the office tomorrow. I think this will be much more productive. We will leave a comment with the outcome here in the thread.


[ruff] Stabilize unsafe fix for zip-instead-of-pairwise (RUF007)

This PR stabilizes the unsafe fix for [zip-instead-of-pairwise (RUF007)](https://docs.astral.sh/ruff/rules/zip-instead-of-pairwise/#zip-instead-of-pairwise-ruf007), which replaces the use of zip with that of itertools.pairwise and has been available under preview since version 0.5.7.
There are no open issues regarding RUF007 at the time of this writing.

I have commited some kind of high git crime from which there is no recovery within my limited skillset... nuking this and starting over (i.e. by branching off of ruff-0.8 instead of main)


Update docs badge

Pull Request Test Coverage Report for Build 89

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 58.747%

Totals

Change from base Build 88:
0.0%

Covered Lines:
225

Relevant Lines:
383

💛  - Coveralls

Didn't know godoc was deprecated. Thank you!


[Perf] Add performance tests for selecting, dragging, and remounting

This PR adds additional performance scenarios to the stress test:

and introduces a system for recording and visualizing them:

More details
This PR adds four new buttons into the stress test, designed to test the most critical interactions:

“select node”
“drag within viewport”
“drag outside of viewport”
”re-mount”

First three buttons
Unlike the existing buttons (“change pos” and etc.) which just change the React Flow state, “Select node”, ”Drag within the viewport” and “Drag outside of the viewport” actually emulate user interactions – by creating and dispatching fake mouse events:
const node = document.querySelector(...);

node.dispatchEvent(new MouseEvent("mousedown", ...));
node.dispatchEvent(new MouseEvent("mousemove", ...));
node.dispatchEvent(new MouseEvent("mousemove", ...));
node.dispatchEvent(new MouseEvent("mousemove", ...));
node.dispatchEvent(new MouseEvent("mouseup", ...));

This achieves two goals:

The tests are kept as close to real-world interactions as possible. Selecting a node with a mouse might (and actually does) use a different code path compared to just setting selected: true. Dispatching actual mouse events ensures we use the same code path a real user uses
The tests are stable and reproducible. You can click “Drag within the viewport” in two different branches, and the node will be dragged absolutely identically in each of them – making the test results easier to compare

Fourth button
The “Re-mount” button doesn’t dispatch any user interactions – but, instead, re-mounts the <ReactFlow> element. This re-initializes React Flow from scratch and follows the same code path that happens when React Flow mounts for the first time.
This achieves two goals:

convenience: you don’t need to reload the page every time to measure React Flow remounting
noise reduction: because you don’t need to reload the page every time, perf measurements don’t get the noise from network events anymore

Output
Each of the new four tests tracks the duration of frames that happen during the test – and outputs them to the console:

You can inspect these durations manually – or copy-paste them into https://observablehq.com/@iamakulov/long-frame-visualizer, which will do some basic visualizations for that data and allow you to compare across branches.

This is super helpful 🙏


start,stop,restart

need start, stop, restart buttons on station/id/profile
sometime need stop or start liquidsoap or icecast.

Why would you want to start/stop? And for start, the "Restart" works fine.

maybe people need manual edit liquidsoap conf or recompile or etc. stop.start not bad function stop start for icecats and same for liquidsoap.

I'm not so sure that these functions need to be separated out, as "restart" is already available for both the liquidsoap backend and icecast frontend individually, and "restart" implies taking the radio from any state it's currently in (stopped or running) to running with reloaded configuration, which is usually the desired outcome.

ok  and if i do ./update.sh i dont need stop icecast , liquidsoap servers?No error logs etc ?


VPN Client settings, do not fit with Server Side Settings

[Enter feedback here]
The current documentation for VPN Client from this link
https://learn.microsoft.com/en-us/Windows-server/remote/remote-access/tutorial-aovpn-deploy-configure-client
does not WORK with the Server side documentation founded here:
https://learn.microsoft.com/en-us/windows-server/remote/remote-access/ras/cluster/configure/configure-a-remote-access-cluster
Even the server side documentation have missing lines .. but the point is that the VPN Client is NOT connecting with VPN Server using the description you are presenting.
In case you FIX the problems please update me<EMAIL_ADDRESS>
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: f745bac9-dd21-7265-6544-3cb74a0d4e37
Version Independent ID: f745bac9-dd21-7265-6544-3cb74a0d4e37
Content: Tutorial - Deploy Always On VPN profile for Windows clients
Content Source: WindowsServerDocs/remote/remote-access/tutorial-aovpn-deploy-configure-client.md
Product: windows-server
Technology: remote
GitHub Login: @anaharris-ms
Microsoft Alias: anaharris

We hugely appreciate your contribution, feedback, and support to our technical documentation.
We’ve phased out GitHub Issues on this repository as the feedback mechanism for content and have replaced it with a new feedback system. For more information see, Content User Feedback. As part of this rollout, we are migrating your issue where our team will use your comments to improve the documentation experience. Unfortunately, this does mean you won't be able to access this issue after the migration is complete.
All issues will be migrated by Thursday 29th August 2024.
Once again, thank you for your valuable feedback, we hope you’ll continue to contribute using our new feedback system.


Make _filename and save non-enumerable

_filename and save mess up the length property of data since they are enumerable. This makes 'em non-enumerable.

Fixed indentation and squashed commits.

Thanks! This was merged in 3b6bb2e.

No problem
Sent from my iPhone

On 12-Apr-2015, at 18:35, Brendan Ashworth<EMAIL_ADDRESS>wrote:
Thanks! This was merged in 3b6bb2e.
—
Reply to this email directly or view it on GitHub.


question about gninavis generated file

I run the gninavis with command like below
gninavis --receptor rec.pdb --ligand lig.pdb --cnn_model default2018.model --cnn_weights gen_uff_default2018.0_iter_80000.caffemodel
as a result it produces *.pdbqt, *.pdbqt.ext.
with this file as a result, how can I get the each atomic score and produce the pymol visualization as
in paper
Visualizing convolutional neural network protein-ligand scoring
Thanks

Are there not values in the b factor fields?

what you mean is the value in a column Elec?

Sorry, I forgot it was a pdbqt output instead of pdb.  The per-atom visualization score is output starting at column 61 which I assume is the elec column.

Yes I understand gninavis output format
but when I run gninavis with gnina in buit model such as crossdock_default2018.... or general_default2018...,
I got segmentation fault error like below
CNN SCORE: 0.988952
Doing masking...
Segmentation fault (core dumped)
when I try with my own model it works well.
Is there anything that I should consider?

Can you provide a complete test case so I can see if I can reproduce the issue?

Thanks for your reply
Attached files are the example
In the readme file
run without error
gninavis --receptor rec.pdb --ligand lig.pdb --gpu 0 --cnn_model default2018.model --cnn_weights gen_uff_default2018.0_iter_80000.caffemodel
run with error
gninavis --receptor rec.pdb --ligand lig.pdb --gpu 0 --cnn crossdock_default2018
but I found that after I dumpmodel crossdock_default2018 using dumpmodel command
dumpmodel crossdock_default2018
and run with
gninavis --receptor rec.pdb --ligand lig.pdb --gpu 0 --cnn_model default2018.model --cnn_weights crossdock_default2018.caffemodel
It runs without error
example.zip
I think there's something wrong with my setting when I run with 'gninavis --receptor rec.pdb --ligand lig.pdb --gpu 0 --cnn crossdock_default2018'

When running gninavis with gradient method, I know that the resulting gradient
can be visualized as vectors in 3D space
but when I run gninavis in my server, I got pdbqt file with scalar magnitue on each atom at column61
same as masking method.
How can I draw vectors with pdbqt file generated with gradient method?

The gradient vectors should be in an gradient_*.xyz file generated by gninavis.

Thanks for your reply
I found that *.xyz file is generated when I run gninavis with gradient visualization
*.xyz file looks like this
N 16.379 33.292 37.803 1.7166e-05 7.6294e-06 -7.6294e-06
C 15.029 33.262 37.502 7.8201e-05 -1.1444e-05 -4.1962e-05
C 14.581 32.773 36.265 0.00011635 3.8147e-06 3.0518e-05
C 13.197 32.764 36.009 8.5831e-05 -2.2888e-05 4.1962e-05
.
.
it seems first 4 columns are atom name and its X, Y, Z coordinate.
The other columns should be vector information as you wrote.
but I don't know how to extract gradient vector information as the paper
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6343664/
Can you please describe how to interpret the xyz file generated by gninavis?

https://github.com/gnina/scripts/blob/master/show_xyz_arrows.py

Please close issues when they are resolved.


[v1.13] ipcache: aggregate labels from all IPs with local host identity

[ ] #28332 -- ipcache: aggregate labels from all IPs with local host identity

Once this PR is merged, you can update the PR labels via:
$ for pr in 28332; do contrib/backporting/set-labels.py $pr done 1.13; done

/test-backport-1.13


Always increment timer on record

Rationale for this change
#2261 added a test that elapsed_compute was recorded in metrics, unfortunately in the case of LocalLimitExec and GlobalLimitExec the operator body is too small to reliable take time, and as such this test is flaky

https://github.com/apache/arrow-datafusion/runs/6100177086?check_suite_focus=true
https://github.com/apache/arrow-datafusion/runs/6100277301?check_suite_focus=true
https://github.com/apache/arrow-datafusion/runs/6100969854?check_suite_focus=true

Additionally when rendering plan metrics, a value if 0 is translated to "NOT RECORDED" - https://github.com/apache/arrow-datafusion/blob/master/datafusion/core/src/physical_plan/metrics/value.rs#L540
What changes are included in this PR?
This changes Time::add_duration and Time::add to always record at least one nanosecond.
Are there any user-facing changes?
Yes, calling Timer::add_duration will now always record at least 1 nanosecond

ITS TOO FAST!

Thanks for the fixing!
I found this test flaky and added the assertion failure message in #2261 but failed to reproduce it in later trials.
Previous failure before the assertion log:
https://github.com/apache/arrow-datafusion/runs/6091653680?check_suite_focus=true

I manually rerun all failure checks for the latest PRs because of this flaky test.


mesh build fails - Cannot find module '../../.mesh'

Describe the bug

Each time the mesh build is run, it deletes the .mesh folder that the resolvers are depending on.
At that time, I guess, it validates the code, and since the code is trying to access the types from the, now non-existent folder, it fails, and it does not generate it.
This is kind of a chicken and egg situation.
To make this work, I have to comment out all the references to the code which depends on the .mesh to be able to generate it. This is not helpful on the CI/CD.
To Reproduce

Have some resolvers which reference, for example, types from the generated folder
run the mesh build again
observe it failing

Expected behavior

The code should be generated without a problem.
Environment:

OS: Windows 10
"@graphql-mesh/cli": "0.38.0",
"@graphql-mesh/graphql": "0.18.10",
"@graphql-mesh/transform-mock": "0.10.11",
NodeJS: v14.16.0

Isn't this related to my most recent TypeScript issues? Maybe I can contribute something here...
I haven't had the time to test the most recent versions thoroughly, but we have an example where using the typing in the resolvers is working: https://github.com/Urigo/graphql-mesh/blob/master/examples/openapi-javascript-wiki/additional-resolvers.ts - it does not reproduce your issue (yet?) @nemonemi

https://github.com/nemonemi/nx_mesh_build_error_example

@ardatan,
any luck with this issue?

Guys? @ardatan @Urigo ?

It seems enum types cause the problem here. We'd love to accept a PR if someone wants to work on it. Thanks for the reproduction.

Are you referring to enums from the Graphql schema?

Hey guys, I have stopped using mesh for mocking data, so I won't be able to verify the progress on this ticket. I will close it, but should anyone else decide to address it in the future, feel free to re-open it.


inconsistent results with Intl.DateTimeFormat

The problem
for the particular Gregorian date of 2256-03-20, the results are not consistent with the JavaScript's built-in Intl.DateTimeFormat API. I'm not sure which result is true: 1634/12/30 or 1635/01/01 with one day offset.
the problem might stem from jalali leap year (or even midnight) calculation differences which I don't know about.
💻 Code demonstrating the problem

import { format } from 'date-fns-jalali';

const intlDate = new Date('2256-03-20').toLocaleDateString('fa-IR');    // -> 1634/12/30
const fnsDate = format(new Date('2256-03-20'), 'yyyy/MM/dd');           // -> 1635/01/01

console.log({ IntlDate, fnsDate }); // -> {intlDate: "۱۶۳۴/۱۲/۳۰", fnsDate: "1635/01/01"}

online playground
codesandbox: https://codesandbox.io/s/date-fns-jalali-vs-intl-datetimeformat-zd0q9p?file=/src/index.ts
runkit: https://runkit.com/sinakhx/626790d31a0e790008447d10
🙁 Actual behavior
I was hoping both the date-fns & Intl results to be the same. (either 1634/12/30 or 1635/01/01)
🙂 Expected behavior
I'm not sure which result is correct (the date-fns result or the built-in result). I've also checked it against the time.ir website which approves the date-fns results but how on Earth can built-in results be falsy?
If the built-in method is going wrong, then how can I report that bug?
Debug information

date-fns-jalali version: 2.28.0
Browser/Node.js version: node v16.14.1 & Chrome v100.0.4896.75 (Official Build) (64-bit)
Your timezone: Asia/Tehran
Your current time: 01:25

Thank you for reporting the issue.
I will investigate the issue soon.

Nodejs
node.js uses the simple rule (33-year rule) for leap years, which is correct between 1210 and 1635:
UBool PersianCalendar::isLeapYear(int32_t year)
{
    int32_t remainder;
    ClockMath::floorDivide(25 * year + 11, 33, remainder);
    return (remainder < 8);
}

source
date-fns-jalali
date-fns-jalali use the 33-year rule and pre-calculated break years, which 33-year not working.
Other methods
I found another method for leap year «گاهشماری حسابی رایانه‌ای» which has better performance. Maybe in future date-fns-jalali use that method

Thanks for your investigation & response. It sounds like there is no universal standard convention for calculating jalali leap years, so that even the Intl API goes for a simplistic approach; However, the other method that you've noticed seems to be more accurate. I hope the Intl work-group switch to the same approach in the near future.

I found another method for leap year «گاهشماری حسابی رایانه‌ای» which has better performance. Maybe in future date-fns-jalali use that method

I've found out that the Intl.DateTimeFormat API is not going the wrong way. The bug is actually here.
Maybe it's a better idea to not jump into implementation based on Wikipedia's content.
Here you can see why: https://github.com/unicode-org/icu/pull/2077#issuecomment-1127190385

date-fns-jalali@v3 uses the same algorithm as Intl.
v2 and v3 algorithm are the same between 1178 and 1633.


[Site Request] pstream.net

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

[X] I understand that I will be blocked if I remove or skip any mandatory* field

Checklist

[X] I'm reporting a new site support request
[X] I've verified that I'm running yt-dlp version 2022.08.19 (update instructions) or later (specify commit)
[X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
[X] I've checked that none of provided URLs violate any copyrights or contain any DRM to the best of my knowledge
[X] I've searched the bugtracker for similar issues including closed ones. DO NOT post duplicates
[X] I've read the guidelines for opening an issue
[ ] I've read about sharing account credentials and am willing to share it if required

Region
No response
Example URLs

Single video: https://www.pstream.net/e/mQN5YQKD6jLXvRa

Provide a description that is worded well enough to be understood

m3u8 and content not encrypted
regex to get the m3u8 link : https:\/\/www\.pstream\.net\/m\/([a-zA-Z0-9]*)\.m3u8\?expires=([0-9]*)&signature=(\b[A-Fa-f0-9]{64}\b)
m3u8 link example: https://www.pstream.net/m/eyJpdiI6IlA1cjdmWjlHWmoxNWJOaG9CMzFmM3c9PSIsInZhbHVlIjoiQWRpZkEyRmJQck9UTFdNa0pSV2V3dz09IiwibWFjIjoiNTAzYTM1ZTUwZGEzNGU3ZTNiZTgzNzIxYjAwMDg4MmU3M2MzYjNjYzU5MjcyZDkxZDRkYTFjMzY0YTlhYzA0YyJ9.m3u8?expires=1661943140&signature=af55d305a56c48191188d3ff7406e41ab6fc37e78b4a71d97083e7b0c98b4cd6

Provide verbose output that clearly demonstrates the problem

[X] Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
[X] Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output
[debug] Command-line config: ['-vU', 'https://www.pstream.net/e/mQN5YQKD6jLXvRa']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2<IP_ADDRESS> [48c88e088] (source)
[debug] Lazy loading extractors is disabled
[debug] Plugins: ['SamplePluginIE', 'SamplePluginPP']
[debug] Git HEAD: bfbecd117
[debug] Python 3.10.4 (CPython 64bit) - Windows-10-10.0.19044-SP0
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg N-107944-g4fce3bab64-20220830 (setts), ffprobe N-107944-g4fce3bab64-20220830
[debug] Optional libraries: Cryptodome-3.15.0, brotli-1.0.9, certifi-2022.06.15, mutagen-1.45.1, sqlite3-2.6.0, websockets-10.3
[debug] Proxy map: {}
[debug] Loaded 1665 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2022.08.19, Current version: 2<IP_ADDRESS>
yt-dlp is up to date (2<IP_ADDRESS>)
[debug] [generic] Extracting URL: https://www.pstream.net/e/mQN5YQKD6jLXvRa
[generic] mQN5YQKD6jLXvRa: Downloading webpage
WARNING: [generic] Falling back on generic information extractor
[generic] mQN5YQKD6jLXvRa: Extracting information
[debug] Looking for Brightcove embeds
[debug] Looking for embeds
ERROR: Unsupported URL: https://www.pstream.net/e/mQN5YQKD6jLXvRa
Traceback (most recent call last):
  File "C:\Users\Romain\Documents\yt-dlp\yt_dlp\YoutubeDL.py", line 1459, in wrapper
    return func(self, *args, **kwargs)
  File "C:\Users\Romain\Documents\yt-dlp\yt_dlp\YoutubeDL.py", line 1535, in __extract_info
    ie_result = ie.extract(url)
  File "C:\Users\Romain\Documents\yt-dlp\yt_dlp\extractor\common.py", line 670, in extract
    ie_result = self._real_extract(url)
  File "C:\Users\Romain\Documents\yt-dlp\yt_dlp\extractor\generic.py", line 3078, in _real_extract
    raise UnsupportedError(url)
yt_dlp.utils.UnsupportedError: Unsupported URL: https://www.pstream.net/e/mQN5YQKD6jLXvRa

[x] I've checked that none of provided URLs violate any copyrights or contain any DRM to the best of my knowledge

Looks like a piracy site. Explain your reason to believe otherwise


The 'Display name' text box is not filled after pasting one queue SAS that created by one access policy to 'Attach with SAS URI' dialog

Storage Explorer Version: 1.17.0
Build Number: 20201216.1
Branch: main
Platform/OS: Windows 10/ Linux Ubuntu 16.04/ MacOS Catalina
Architecture: ia32/x64
Regression From: Previous releases (1.16.0)
Steps to Reproduce

Expand one storage account ->Queues.
Create one queue -> Right click the queue -> Click 'Manage Stored Access Policies...'.
Add one access policy and save it.
Right click the queue -> Click 'Get Shared Access Signature...' -> Select the access policy from the Access policy drop down list -> Create and copy the SAS URI.
Open connect dialog -> Select 'Use a shared access signature (SAS) URI' -> Click 'Next'.
Paste the copied SAS URI to the URI text box.
Check whether the 'Display name' text box is filled or not.

Expected Experience
The 'Display name' text box is filled.
Actual Experience
The 'Display name' text box is not filled.

Additional Context

The generated SAS URI is the same as in the previous release.
The 'Queue endpoint' textbox is not filled.

Verified on build 20201219.2. This issue has been fixed. So close it.


SPTrustedIdentityTokenIssuer: Impossible to use "MetadataEndPoint" parameter

Details of the scenario you tried and the problem that is occurring
I am trying to use MetadataEndPoint because I want SharePoint to extract certificate so I don't have to obtain it manually and specify in "SigningCertificateFilePath" in the DSC resource.
Verbose logs showing the problem
N/A
Suggested solution to the issue
Implement parameter set with "MetadataEndPoint"
The DSC configuration that is used to reproduce the issue (as detailed as possible)
# insert configuration here

The operating system the target node is running
OsName               : Microsoft Windows Server 2019 Datacenter
OsOperatingSystemSKU : DatacenterServerEdition
OsArchitecture       : 64-bit
WindowsVersion       : 1809
WindowsBuildLabEx    : 17763.1.amd64fre.rs5_release.180914-1434
OsLanguage           : en-US
OsMuiLanguages       : {en-US}

Version of SharePoint that is used (e.g. SharePoint 2016)
SharePoint 2019
Version and build of PowerShell the target node is running
Name                           Value
----                           -----
PSVersion                      5.1.17763.316
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.17763.316
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>

Version of the DSC module that was used ('dev' if using current dev branch)
3.1

@shurick81 can you please explain how you use this?
I tried to use it with this ADFS metadata endpoint:
https://ADFS.contoso.local/FederationMetadata/2007-06/FederationMetadata.xml
But it failed with error "Invalid JSON primitive: ."
So I understand that SharePoint expects a JSON reply, while ADFS sends a XML document.

It did not work with ADFS that I tried either, so I came up with something like this:
                $metadataurl = "https://login.contoso.se/FederationMetadata/2007-06/FederationMetadata.xml"
                $fedmd = Invoke-WebRequest -Uri $metadataurl -UseBasicParsing
                $fedmdXml = New-Object Xml
                $fedmdXml.LoadXml($fedmd.Content)
                $base64 = ( $fedmdXml.EntityDescriptor.RoleDescriptor | ? { $_.KeyDescriptor.use -eq "signing" } ).KeyDescriptor.KeyInfo.X509Data.X509Certificate
                $tempFileName = [guid]::NewGuid().Guid + ".cer";
                $tempFilePath = "$env:TEMP\$tempFileName";
                $base64 | Out-File -FilePath $tempFilePath -Append:$false
                $contosoSigningCertificate = Get-PfxCertificate -FilePath $tempFilePath
                $contosoSigningCertificateThumbprint = $contosoSigningCertificate.Thumbprint

                ReplaceText contosoSigningCertFileASCII
                {
                    Path        = "c:\certs\adfs-signing-login.contoso.se.cer"
                    Search      = ' '
                    Type        = 'Text'
                    Text        = ' '
                    Encoding    = "ASCII"
                    DependsOn   = "[File]contosoSigningCertFile"
                }

                CertificateImport contosoSigningCertificate
                {
                    Thumbprint  = $contosoSigningCertificateThumbprint
                    Location    = 'LocalMachine'
                    Store       = 'Root'
                    Path        = "c:\certs\adfs-signing-login.contoso.se.cer"
                    DependsOn   = "[ReplaceText]contosoSigningCertFileASCII"
                }

                SPTrustedIdentityTokenIssuer contosoLoginTrust
                {
                    Ensure                      = "Present"
                    Name                        = "contoso-login-00"
                    Description                 = "contoso Trusted Login Provider"
                    Realm                       = "https://$siteCollectionUserHostNameCommon"
                    SignInUrl                   = "https://login.contoso.se/adfs/ls/"
                    ProviderSignOutUri          = "https://adfs.contoso.com/adfs/ls/"
                    IdentifierClaim             = "urn:contoso-claims/personid"
                    ClaimsMappings              = @(
                        MSFT_SPClaimTypeMapping{
                            Name                = "Role"
                            IncomingClaimType   = "http://schemas.microsoft.com/ws/2008/06/identity/claims/role"
                        }
                        MSFT_SPClaimTypeMapping{
                            Name                = "Personnummer"
                            IncomingClaimType   = "urn:contoso-claims/personid"
                        }
                    )
                    SigningCertificateFilePath  = "c:\certs\adfs-signing-login.contoso.se.cer"
                    PsDscRunAsCredential        = $SPInstallAccountCredential
                    DependsOn   = "[File]contosoSigningCertFile"
                }

@shurick81 this is a nice solution, thanks for sharing!
Then, do you agree that implementing support for parameter MetadataEndPoint is useless, or do you see some benefit to implement it?

well the only benefit might be that if you implement it in resources, then the same compiled mof files can be reused even though the certificate is updated on the ADFS side. But I would not say it is a big one.

Wouldn't this throw the same JSON error?

after usage of the workaround above for some time, I encountered an issue, exception when endpoint contains more than one signing certificate. The only way to fix it was using Script resource:
$metadataurl = "https://login.contoso.com/FederationMetadata/2007-06/FederationMetadata.xml"
$fedmd = $null
Do {
    Try {
        $fedmd = Invoke-WebRequest -Uri $metadataurl -UseBasicParsing
    } Catch {
        $_.Exception.Message
    }
    if ( $fedmd ) {
        Write-Host "$( Get-Date ) Successfully read metadata from $metadataurl";
    } else {
        Write-Host "$( Get-Date ) Could not read metadata from $metadataurl";
        Start-Sleep 5;
    }
} until ( $fedmd )
$fedmdXml = New-Object Xml
$fedmdXml.LoadXml($fedmd.Content)
$certCounter = 0;
$fedmdXml.EntityDescriptor.RoleDescriptor.KeyDescriptor | ? { $_.use -eq "signing" } | % {
    $base64 = $_.KeyInfo.X509Data.X509Certificate
    $tempFileName = [guid]::NewGuid().Guid + ".cer";
    $tempFilePath = "$env:TEMP\$tempFileName";
    $base64 | Out-File -FilePath $tempFilePath -Append:$false
    $contosoSigningCertificate = Get-PfxCertificate -FilePath $tempFilePath
    $contosoSigningCertificateThumbprint = $contosoSigningCertificate.Thumbprint
    Write-Host "contosoSigningCertificateThumbprint: $contosoSigningCertificateThumbprint"

    File "contosoSigningCertFile$certCounter"
    {
        Ensure          = "Present"
        Contents        = $base64
        DestinationPath = "c:\certs\adfs-signing-login.contoso.com$certCounter.cer"
    }

    ReplaceText "contosoSigningCertFileASCII$certCounter"
    {
        Path        = "c:\certs\adfs-signing-login.contoso.com$certCounter.cer"
        Search      = ' '
        Type        = 'Text'
        Text        = ' '
        Encoding    = "ASCII"
        DependsOn   = "[File]contosoSigningCertFile$certCounter"
    }

    CertificateImport "contosoSigningCertificate$certCounter"
    {
        Thumbprint  = $contosoSigningCertificateThumbprint
        Location    = 'LocalMachine'
        Store       = 'Root'
        Path        = "c:\certs\adfs-signing-login.contoso.com$certCounter.cer"
        DependsOn   = "[ReplaceText]contosoSigningCertFileASCII$certCounter"
    }

    $certCounter++;
}

Script contosoLoginTrust
{
    SetScript               = ( {
        Invoke-SPDSCCommand -ScriptBlock {{
            Write-Host "Checking issuer contoso-login-00"
            $issuer = Get-SPTrustedIdentityTokenIssuer "contoso-login-00" -ErrorAction Ignore
            if ( !$issuer )
            {{
                Write-Host "Issuer is not found, creating";
                $map1 = New-SPClaimTypeMapping -IncomingClaimType "urn:contoso-claims/lus-group" -IncomingClaimTypeDisplayName "LUS-Group" -SameAsIncoming;
                $map2 = New-SPClaimTypeMapping -IncomingClaimType "urn:contoso-claims/userid" -IncomingClaimTypeDisplayName "UserId" -SameAsIncoming;
                New-SPTrustedIdentityTokenIssuer -Name contoso-login-00 -Description "contoso Trusted Login Provider" -Realm https://{0} -ImportTrustCertificate C:\certs\adfs-signing-login.contoso.com0.cer -ClaimsMappings $map1,$map2 -SignInUrl https://login.contoso.com/adfs/ls/ -SignOutUrl https://login.contoso.com/adfs/ls/ -IdentifierClaim urn:contoso-claims/userid | Out-Null;
                Set-SPTrustedIdentityTokenIssuer -Identity contoso-login-00 -MetadataEndPoint https://login.contoso.com/FederationMetadata/2007-06/FederationMetadata.xml;
            }}
        }}
    } -f @( $siteCollectionHostNameCommon ) )
    TestScript              = ( {
        Invoke-SPDSCCommand -ScriptBlock {{
            Write-Host "Checking issuer contoso-login-00"
            $issuer = Get-SPTrustedIdentityTokenIssuer "contoso-login-00" -ErrorAction Ignore
            Write-Host "Returning result"
            return ( $issuer -ne $null )
        }}
    } -f @( $siteCollectionHostNameCommon ) )
    GetScript               = ( {
        Invoke-SPDSCCommand -ScriptBlock {{
            Add-PSSnapin Microsoft.SharePoint.PowerShell
            $issuer = Get-SPTrustedIdentityTokenIssuer "contoso-login-00" -ErrorAction Ignore
            return $issuer.ToString();
        }}
    } -f @( $siteCollectionHostNameCommon ) )
    PsDscRunAsCredential    = $SPInstallAccountCredential
    DependsOn               = "File[contosoSigningCertFile0]"
}


Add a X-Kolibri-Channel category to desktop files

https://phabricator.endlessm.com/T31631

This will allow us to organize Kolibri channel launchers into a dynamically-generated folder without catching all of the other Education apps.


Update admin feedback feature spec to system spec

Summary:
Rails 5.1 introduced "System Tests", the brave new world of automated testing in Rails. It seems like this has been refined quite a bit and will become more prevalent in Rails 6.0. We'd like to get ahead of the curve on this.
Task:
We need to convert /spec/features/admin/feedback_spec.rb from a feature spec to a system spec. There are 4 steps to this:

[ ] Create a similarly named file in the spec/system directory. For example if the file was called happy_spec.rb it would be called happy_system_spec.rb in the new directory.
[ ] Set each spec’s type as type: :System
[ ] Use RSpec.describe to define system specs, instead of RSpec.feature
[ ] Replace the scenario alias in previous feature specs with the standard it syntax

Two files have already been converted that you can use as examples -- the account_system_spec.rb spec and the adjustment_system_spec.rb spec. You can also see the original feature files at account_spec.rb spec and adjustment_spec.rb spec.
More information on system specs can be found below.
Reference

https://edgeguides.rubyonrails.org/testing.html#system-testing
https://relishapp.com/rspec/rspec-rails/docs/system-specs/system-spec
https://medium.com/table-xi/a-quick-guide-to-rails-system-tests-in-rspec-b6e9e8a8b5f6
https://dev.to/aergonaut/running-rails-5-system-tests-on-travis-ci-with-chromedriver-4nm7
http://blog.mechanicles.com/2018/03/04/gotchas-rails-system-testing.html
https://everydayrails.com/2018/01/08/rspec-3.7-system-tests.html

I'll grab this one. Tried #829 first but had some failing specs (left details in a comment), hopefully this one will be easier as there are fewer specs!

@pcrglennon I commented on #831 if you want to take another crack at it -- if it's what I think it is, the fix should be straightforward


Stray use of "compiler" in the guide

The guide uses the word "compiler" just once, when discussing tuples. If you don't want to define "compiler" somewhere, I suggest changing it to "When the computer talks about points".

Thanks!


colorls: init at 1.2.0

Motivation for this change
colorls is a tool which beautifies the terminal's ls command, with color and icons.
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Assured whether relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

I'm probably missing something, but why is  pkgs/tools/system/colorls/colorls needed? It appears to be pretty similar to pkgs/tools/system/colors, right?

Please correct me if I am wrong, but the only package named "colors" is related to haskell development found in pkgs/development/haskell-modules/hackage-packages. I can't see a pkgs/tools/system/colors at all.

Please correct me if I am wrong, but the only package named "colors" is related to haskell development found in pkgs/development/haskell-modules/hackage-packages. I can't see a pkgs/tools/system/colors at all.

That's been a typo of mine - sorry! I actually meant colorls. What I'm trying to understand is why there's another colorls directory in pkgs/tools/system/colorls.

Ah, you have missed nothing; well spotted. This was my mistake and I have now removed it, thanks!

Built and tested locally :+1:

@lukebfox thanks!


Upgrade to Angular 16

Fixed in https://github.com/scholarsportal/Dataverse-Data-Curation-Tool/pull/72


When Spring Context is refreshed/recreated some Cron Tasks configurations are duplicated in the strongbox-cron-tasks.yaml file

Task Description
Some cron tasks are created during the server startup (for example DownloadRemoteFeedCronJob) (see also NugetRepositoryManagementStrategy) and then saved in the strongbox-cron-tasks.yaml file. We should check and validate the existence of the same configuration, because on server restart, these entries are duplicated in the  strongbox-cron-tasks.yaml file.
Currently we have following cron jobs created during server startup:

[ ] DownloadRemoteFeedCronJob
[ ] FetchRemoteNpmChangesFeedCronJob
[ ] RebuildMavenIndexesCronJob
[ ] DownloadRemoteMavenIndexCronJob

We need to stop duplicating the same jobs in the strongbox-cron-tasks.yaml file.
Help

Our chat
Points of contact:

@carlspring
@sbespalov
@fuss86

@ptirador ,
Would this be something you'd like to look into?

@fuss86 @carlspring Let's assume that a new cron task is created, and it has a different UUID but the same job class as a task in the yaml file. Should we assume that this new cron task is in fact a duplicate, and we should skip it and don't add it to the file?

Hi @ptirador ,
Yes, you should, because you can have cron tasks for different repositories. For example, you can have a cron task that removes all the snapshots from a snapshot repository for all artifacts tha have been released. So, this could be set up per repository. OBviously, these different configurations will be using the same class, but will have different names.

Great, thanks!

@carlspring @fuss86 : Hi! I still have doubts with the cron tasks duplicates in the yaml file.
So, just to be clear, let's suppose we have this yaml file:
  - uuid: "4485a5ab-d785-4043-9ca7-e584a98a8faa"
    name: "Config 1"
    jobClass: "org.carlspring.strongbox.cron.jobs.FetchRemoteNpmChangesFeedCronJob"
    cronExpression: "0 0 * ? * * *"
    oneTimeExecution: false
    immediateExecution: true
    properties:
      repositoryId: "npmjs"
      storageId: "storage-npm"
- uuid: "5485a5ab-d785-4043-9ca7-e584a98a8faa"
    name: "Config 1"
    jobClass: "org.carlspring.strongbox.cron.jobs.FetchRemoteNpmChangesFeedCronJob"
    cronExpression: "0 0 * ? * * *"
    oneTimeExecution: false
    immediateExecution: true
    properties:
      repositoryId: "npmjs"
      storageId: "storage-npm"
  - uuid: "6485a5ab-d785-4043-9ca7-e584a98a8faa"
    name: "Config 2"
    jobClass: "org.carlspring.strongbox.cron.jobs.FetchRemoteNpmChangesFeedCronJob"
    cronExpression: "0 0 * ? * * *"
    oneTimeExecution: false
    immediateExecution: true
    properties:
      repositoryId: "npmjs"
      storageId: "storage-npm"

Are the 2nd and the 3rd element duplicates of the first one?
The second is exactly the same except for the UUID.
The third element is the same except for the UUID and name.

I see what you mean.
In this case, we have two options:

Let it be
Warn the user in the UI

I think we should probably warn in the UI, but, on the other hand, if you decide to call it like that, then you should live with your silly naming.
What do you think?

Hi  @ptirador , what's the status of this task ?

HI @fuss86, I haven't had time to look at it... I release it so that anyone can take it up.


null is not an object (evaluating 't.scroll.scrollTo')

This crash can be reproduced by rapidly clicking a dropdown menu. Using RN: 0.45.1, react-native-material-dropdown 0.5.0.
The issue can be fixed by adding an additional condition to the if statement on line: 241 of src/components/dropdown/index.js so the setTimeout so it looks like this:
if (this.mounted && this.scroll !== null) {

Thanks for reporting! Fixed and released in 0.5.2.


Run compiled code with RUST_BACKTRACE=1

Getting output like
thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0', ../src/libcollections/vec.rs:1371
note: Run with `RUST_BACKTRACE=1` for a backtrace.

from the playground is frustrating, because there's no way to make the backtrace show up and many panics can occur in non-playground code.

That is already possible today, in the settings (:gear: on the right) you can enable backtraces.

I feel like we should change the default, in that case.

Could set it to 'auto' as default, which would only show the backtrace if 'Debug' not when 'Stable'


Recursively update schemas when a referenced type's schema is updated

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
When making a discriminated union which may have additional entries created at runtime, the schema of the union must be updated, and the update propagated into any schemas that reference it. In turn, those schemas may be referenced from other schemas, which are now outdated.
I propose that the functions rebuild_dataclass and BaseModel.model_rebuild take a parameter recursive, and that dataclass and BaseModel keep a record of all models where they are used as fields. When rebuild is called with recursive=True, a directed acyclic graph is created and iterated through, calling rebuild again recursively for all related models.
Affected Components

[ ] Compatibility between releases
[X] Data validation/parsing
[X] Data serialization - .model_dump() and .model_dump_json()
[X] JSON Schema
[X] Dataclasses
[ ] Model Config
[ ] Field Types - adding or changing a particular data type
[ ] Function validation decorator
[X] 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.

For my use case (in the PR mentioned above), having a tagged union that has members added at run time, super_cls.__init_subclass__ adds sub_cls to _members then calls rebuild_schema(super_cls, recursive=True, force=True) and __get_pydantic_core_schema__ for super_cls is:
        return tagged_union_schema(
            make_schema(tuple(self._members), handler),
            discriminator=self._discriminator,
            ref=self._base_class.__name__,
        )

Hi @DiamondJoseph,
Thanks for the detailed feature request. I think this would introduce a lot of overhead + performance challenges. I think something like this could belong in user code by customizing the __new__ method or something similar, but I don't see us implementing support for this in the pydantic codebase in the short term.
I'll try to come up with a MRE for you regarding how you could implement this in your own code.

This doesn't exactly work, but here's the idea:
from pydantic import BaseModel as BM, ConfigDict
from pydantic._internal._core_utils import pretty_print_core_schema

global_rebuild_cache = []

class BaseModel(BM):
    def __init_subclass__(cls, **kwargs):
        super().__init_subclass__(**kwargs)

        print(cls.__annotations__)
        for annotation in cls.__annotations__.values():
            if annotation.__name__ == 'InnerModel':
                global_rebuild_cache.append(cls)

class InnerModel(BaseModel):
    foo: str

class Model1(BaseModel):
    inner: InnerModel

class Model2(BaseModel):
    inner: InnerModel

print(global_rebuild_cache)
pretty_print_core_schema(Model1.__pydantic_core_schema__)

# redefine InnerModel to simulate some sort of dynamic update
# with defer_build set to true to similate a manual update for the schema
class InnerModel(BaseModel):
    model_config = ConfigDict(defer_build=True)

    foo: str
    bar: str

InnerModel.model_rebuild()

for dependent_model in global_rebuild_cache:
    dependent_model.model_rebuild(force=True)

pretty_print_core_schema(Model1.__pydantic_core_schema__)

You'll probably need to figure out how to avoid caching the namespace.


Add frozen_string_literal magic comment to several files

I noticed these files all had strings such as "", "  ", "_" that were
allocated each time some common methods were called, over 1000x on a
page in my app. This comment freezes all of these strings such that
they're only allocated once, saving many KB of memory allocation.

Failure on CI doesn't look related to my change??
5.26s$ rvm use jruby --install --binary --fuzzy
Unknown ruby string (do not know how to handle): jruby-<IP_ADDRESS>0.
Unknown ruby string (do not know how to handle): jruby-<IP_ADDRESS>0.
Unknown ruby string (do not know how to handle): jruby-<IP_ADDRESS>0.
Unknown ruby string (do not know how to handle): jruby-<IP_ADDRESS>0.
jruby-<IP_ADDRESS>0 is not installed - installing.
Unknown ruby string (do not know how to handle): jruby-<IP_ADDRESS>0.
Unknown ruby string (do not know how to handle): jruby-<IP_ADDRESS>0.
Unknown ruby string (do not know how to handle): jruby-<IP_ADDRESS>0.
Unknown ruby string (do not know how to handle): jruby-<IP_ADDRESS>0.
Searching for binary rubies, this might take some time.
Unknown ruby string (do not know how to handle): jruby-<IP_ADDRESS>0.
Unknown ruby string (do not know how to handle): jruby-<IP_ADDRESS>0.
Unknown ruby string (do not know how to handle): jruby-<IP_ADDRESS>0.
Unknown ruby string (do not know how to handle): jruby-<IP_ADDRESS>0.
Unknown ruby string (do not know how to handle): jruby-<IP_ADDRESS>0.
Unknown ruby string (do not know how to handle): jruby-<IP_ADDRESS>0.
Unknown ruby string (do not know how to handle): jruby-<IP_ADDRESS>0.
Unknown ruby string (do not know how to handle): jruby-<IP_ADDRESS>0.
Requested binary installation but no rubies are available to download, consider skipping --binary flag.
Gemset '' does not exist, 'rvm jruby-<IP_ADDRESS>0 do rvm gemset create ' first, or append '--create'.
The command "rvm use jruby --install --binary --fuzzy" failed and exited with 2 during .

Hi @oniofchaos, thanks for you PR.
I think that worth you add the frozen_string_literal in all .rb files. You can do that using the gem https://github.com/Invoca/magic_frozen_string_literal.
What do you think?

Are there any additional files that are missing the frozen_string_literal? I thought I grabbed them all in this repo.

Almost all of them are missing it 😄

Whoops! Was thinking of another PR. I used that neat gem to add the magic comment to all the files.

How do you guys normally handle version bumps? This is something I'd like to get into my app ASAP - I can switch directly to a github link if needed but would prefer a bundle update

We only release when we see that there are sufficient improvements to justify a new version.


Improve PEP-257 compliance.

Add some line breaks and make complete sentences.
Fixes #130.

Is this ready to go?

Is this ready to go?

Yes. Sorry. I think that second commit is an improvement, but I think this is it unless changes are requested.

None needed, looks good to me


M07 - Unit5 - Task 7: Create a file share in the storage account has changed and breaks deployment

Module: 07
Lab/Demo: 05
Task: 07
Step: 02
Description of issue
Create a file share in the storage account has changed. Default behavior creates a backup vault and breaks deployment due to Disallowed by Policy.
Repro steps:

Create File Share with default settings

Relevant screenshots

[heart]         Elias Estevao reacted to your message:

From: Jill Leary @.>
Sent: Tuesday, October 24, 2023 9:29:11 PM
To: MicrosoftLearning/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions @.>
Cc: Subscribed @.***>
Subject: Re: [MicrosoftLearning/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions] M07 - Unit5 - Task 7: Create a file share in the storage account has changed and breaks deployment (Issue #227)
Closed #227https://github.com/MicrosoftLearning/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/issues/227 as completed.
—
Reply to this email directly, view it on GitHubhttps://github.com/MicrosoftLearning/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/issues/227#event-10759509372, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A6Y5CWADVPO3WOOCPJ7SDILYBAXKPAVCNFSM6AAAAAA55JGKXGVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJQG42TSNJQHEZTOMQ.
You are receiving this because you are subscribed to this thread.Message ID: @.***>


macOS support

Hiya,
I'm noticing the latest pre-release does not have a macOS binary inside. What's your status with macOS support?
I just added a macOS target to https://github.com/maiself/godot-python-extension, and while I don't want to uphold dual development for the long term (see my comments in this discussion about that), I could see myself contributing a quick macOS build here too just to have it done and compare the projects for myself.
Cheers

Hey,
I don’t have the hardware to test on macOS, so there’s currently no support for it. It would be fantastic if you could add macOS support to the project, but please don’t feel obligated if it’s too much work. Honestly, I’m not too proud of the build system 😅. If you need any help, feel free to reach out.
Sorry, for getting back so late. I'll try catch up with everything over the next days


How to skip one of multiple optimizers at training_step()?

❓ Questions and Help
What is your question?
I have two models G and D. I want to implement.
I would like to skip updating G after several epochs while keeping updating D.
Code
This is what I want to do
if epoch < 10:
    update G
update D

What have you tried?
I guess the frequency of the optimizer for G can be reduced from 1 to 0. But I cannot find how to do it dynamically.
What's your environment?

OS: Ubuntu 16.04
Packaging: Anaconda

Sorry. I had to override optimizer_step() like:
def optimizer_step(self, current_epoch, batch_nb, optimizer, optimizer_i, second_order_closure=None):
    if optimizer_i == 0 and current_epoch >= 10:
        return
    optimizer.step()
    optimizer.zero_grad()


fix: use https to clone instead

Using ssh to clone breaks in CI due to the lack of an ssh key. Simply using https instead should resolve this.

Ah, wait, this will break all existing pipelines because CircleCI uses SSH keys. Isn't there a way to use SSH keys in github actions too? This would also mean that we can create verified releases using GPG
https://github.com/webfactory/ssh-agent

ping @icyphox

This can be closed as it’s no longer relevant.