Content Types and document templates : Columns available in documents are not similar as those available in CT

Hello there,
My problem :
I have a problem with Content Types provisioning and document templates. When creating a document using a Content Type, I get the right document template, but the "metadata" aka fields or columns for the document are not right. In fact, i juste have the columns inherited from the parents CT, but not from the child.
More explanations :
What  i have :
Having the following content types

CT00 (from parent document), with Site Columns A, B and C, with document template Template00.docx
Here is the xml template for this content type :

<pnp:ContentType ID="0x010100BBD2E6E36069334ABFD4717B8C2FA4D9"
                     Name="CT00"
                     Group="Society - Documents"
                     Description="General CT">
          <pnp:FieldRefs>
            <pnp:FieldRef ID="XXX" Name="A" Required="true" />
            <pnp:FieldRef ID="YYY" Name="B" />
            <pnp:FieldRef ID="ZZZ" Name="C" Required="true" />
</pnp:FieldRefs>
<pnp:DocumentTemplate TargetName="{sitecollection}/Style Library/doctemplates/Template00.docx"/>
</pnp:ContentType>

CT01 (from parent CT00), with CT00's columns PLUS columns D and E, with document template Template01.docx. Here is the xml template for this content type :
<pnp:ContentType ID="0x010100BBD2E6E36069334ABFD4717B8C2FA4D901"                    Name="CT01"                    Group="Society - Documents"                    Description="Special CT - inherit from CT00">         <pnp:FieldRefs>           <pnp:FieldRef ID="XXX" Name="A" Required="true" />           <pnp:FieldRef ID="YYY" Name="B" />           <pnp:FieldRef ID="ZZZ" Name="C" Required="true" />           <pnp:FieldRef ID="OOO" Name="D" Required="true" />           <pnp:FieldRef ID="MMM" Name="E" Required="true" /> </pnp:FieldRefs> <pnp:DocumentTemplate TargetName="{sitecollection}/Style Library/doctemplates/Template01.docx"/> </pnp:ContentType>

I create a Library called ListDocuments bound with the 2 previous CT.
In the Library, I create a Word document called Doc01 using CT01.
What should happen :
The document Doc01.docx should present the same SiteColumns as CT01, which are columns A, B, C (inherited from CT00) AND columns D and E.
What really happens :
The document Doc01.docx presents only the Columns A, B and C. No signs of the CT01's columns. If i try to edit the template with word to add some QuickPart and CT fields, i can't, because only the ones from CT00 are available.
Is that a bug ? What could i do to make it happen ?
Thanks a lot for your time !

A little adding / up, because this has been posted a month ago.
So, to sum up :
Using pnp and remote-provisioning, i'm coding several xml templates to provision my site collection and my website. Below is the way I proceed to provision :

I create site columns in the site collection. I provision some .docx templates in the Style Library
I provision several Content Types in my sitecollection, all inheriting from System CT "Document". They use different columns. And each one of them has a DocumentTemplate (which is stored in Style Library, as seen in 1. )
I create a Document Library list, bound with these CT created in 2). I define one of these CTs to be the one by default.

That is for the provisioning.
Now, when i am on Sharepoint Online, on my document library, i click on the button "+ new" and SP proposes all the CTs i've provisioned. From here, i have tested two ways :
a] My Document Library's settings is set to "Open in browser" for the document. So when I create a new Document from CT A,

Word Online opens and shows me the right document template for CT A.
I do nothing and come back to the document library.
Select the document and try to "modify properties" to change metadatas.
The result is the following : The dropdown for CTs is set to the default one (made by default in the List definition). So the metadatas are not the expected.

b] My Document Library's settings is set to "Open in Client" for the document. So when I create a new Document from CT A,

Word opens and shows me the right document template for CT A.
I have to write something and to save my document, or it won't appear online. Back to the document library.
Select the document and try to "modify properties" to change metadatas.
The result is the following : The dropdown for CTs is set to the default one (made by default in the List definition). So the metadatas are not the expected.

I also tried something else : Define absolutely no CT as the CT by default in the List provisioning. But the result is that in 4th step, the dropdown is set to a completely random CT (in fact, the last one, alphabetically), showing its metadatas, not the expected ones.
So please, could you help me with that ? I don't know if it is a provisioning problem or a more deep one, but i would love to have some tips.
(anyone ? @PaoloPia  ? @erwinvanhunen  ?)
Thanks a lot !

This issue was moved to SharePoint/PnP-Sites-Core#1034

Hi @Amysno,
Since this is really around the support of different capabilities in the PnP Core component, relocating this to PnP-Sites-Core repository.


gitlab-ci-local 4.35.0 linux.gz artifact contains wrong binary - gitte, not gitlab-ci-local

Ubuntu 20.04, gitlab-ci-local 4.35.0 - from artifact linux.gz
gitlab-ci-local 4.34.0 worked mostly fine for me and I tried updating to 4.35.0 by downloading linux.gz and renaming the unpacked binary to gitlab-ci-local.
And suddenly it doesn't work at all. Running without parameters immediately exits, running with --help gives help that seems to be the help of gitte utility, not gitlab-ci-local:
user@host /tmp % gitlab-ci-local --help
gitlab-ci-local [command]

Commands:
  gitlab-ci-local actions <actions> <groups> [projects]  Run actions on selected projects for <actions> and <groups>
  gitlab-ci-local clean [subaction]                      Run cleanup on projects
  gitlab-ci-local completion                             Prewarm cache and generate completion script.
  gitlab-ci-local gitops                                 Run git operations on all projects
  gitlab-ci-local list                                   List all projects and their actions
  gitlab-ci-local run <action> <group> [projects]        Run startup, git operations and actions on all projects
  gitlab-ci-local startup                                Run startup checks
  gitlab-ci-local switch <groups>                        Downs every group except for the specified one, ups the specified one.
  gitlab-ci-local toggle [project|reset]                 Toggle disabled projects
  gitlab-ci-local validate                               Validate the configuration

Options:
      --version     Show version number                                                                                [boolean]
  -c, --cwd         Custom current working directory                                                                                [string] [default: "/tmp"]
      --auto-merge  If on a custom branch, automatically merge default branch into current branch.                                                                                [boolean] [default: false]
      --needs       Require dependencies of projects to be run.                                                                                [boolean] [default: true]
  -h, --help        Show help                                                                                [boolean]

I didn't tried windows/mac binaries, but their size decrease is suspicious too.

Gow the fuck...

New correct binaries are out...


[$250] mWeb/Chrome - Chat - Keyboard is not opened after pasting content in compose box

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Version Number: 9.0.57-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team
Action Performed:

Open the staging.new.expensify.com website
Open any chat
Long tap on compose box and paste text content on it
Verify that after the content is pasted, the keyboard is opened

Expected Result:
Keyboard should be opened after pasting text content on compose box
Actual Result:
Keyboard is not opened after pasting text content on compose box
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[x] Android: Standalone
[x] Android: HybridApp
[x] Android: mWeb Chrome
[ ] iOS: Standalone
[ ] iOS: HybridApp
[ ] iOS: mWeb Safari
[ ] MacOS: Chrome / Safari
[ ] MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/user-attachments/assets/0ea3fffa-806f-48e3-9778-5c6e030a5e64
View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~021853861812160374739
Upwork Job ID:<PHONE_NUMBER>160374739
Last Price Increase: 2024-11-05

Issue OwnerCurrent Issue Owner: @allgandalf

Hi, we can fix this by adding a listener for the paste event and trigger showing the keyboard after that.
My upwork account: https://www.upwork.com/freelancers/abanoubm18

Contributor details
Your Expensify account email<EMAIL_ADDRESS>Upwork Profile Link: https://www.upwork.com/freelancers/abanoubm18

Let's raise it and see if that gets us any proposals.

Proposal
Please re-state the problem that we are trying to solve in this issue.
Keyboard is not opening, when user paste text in any composer in the app
What is the root cause of that problem?
We are not focusing the input here when user paste text:
https://github.com/Expensify/App/blob/6ac751356022cdc55a44b10e603112678a6a709e/src/components/Composer/implementation/index.tsx#L130-L136
What changes do you think we should make in order to solve the problem?

add this in the above function when user paste text:
textInput.current?.focus();

@allgandalf, Sorry, my MacBook's charger stopped working, so I'll need a few hours to share the video.
Regarding the code, after user paste text in the input, we need to ensure the input is focused by adding this change at the start of the handlePaste function. Here's the updated snippet:
https://github.com/Expensify/App/blob/6ac751356022cdc55a44b10e603112678a6a709e/src/components/Composer/implementation/index.tsx#L132
const handlePaste = useCallback(
    (event: ClipboardEvent) => {
+        textInput.current?.focus();
         const isVisible = checkComposerVisibility();

I think the expected result is incorrect here. The keyboard should open when the composer is pressed, not when text is pasted. That's how it works if the input is not empty. Also, this applies not just to the composer, but to all text inputs.

Sorry, my MacBook's charger stopped working, so I'll need a few hours to share the video.

Any updates here ?

@allgandalf, while re-testing the solution, I noticed some inconsistencies in the behavior. I’m currently investigating the issue further and will share an update as soon as I have a reliable solution. thank you.

@allgandalf, proposal https://github.com/Expensify/App/issues/51985#issuecomment-2484352874 updated and added the video.

Why is this considered a bug? (or is it coming from a regression test?) The current behaviour seems correct and aligns with how the inputs work on other websites.
https://github.com/user-attachments/assets/6a3f6571-c02f-446c-80d9-eed0319d0762

Seems low value. losing


Shrink image after unmount

Shrinking images leads to smaller images sizes.
todo:
We should also consider rename unmount_images.sh to unmount_and_shrink_images.sh.
If we rename the file, then we need to modify README.md too.

I guess unmount_images.sh is enough considering that existing video tutorials would be "nulled" (people asking why that file name doesn't exist)


Mekanism v8 API unusable

It cannot compile as it requires the MekanismUtils and MachineType classes to be present.

Thanks for pointing that out, happily it was an almost trivial fix.


The file 'i3d_pretrained_400.pt' cannot download.

Thank you for your outstanding work.
This link https://drive.google.com/file/d/1fBNl3TS0LA5FEhZv5nMGJs2_7qQmvTmh/view to download 'i3d_pretrained_400.pt'   has been cancelled.
Can you upload it again?
Thank you.

Hi,
Thanks for pointing out this issue. I re-uploaded the checkpoint!


Update libp2p and tokio

A mostly straightforward update to more recent versions of these dependencies.
Filing it as a draft due to the block_exchange::long_get_block mysteriously failing, at least locally.

Looked into getting ipfs-http to run with the help of tokio_compat_02 in https://github.com/ljedrz/rust-ipfs/pull/1. The way I understand the state it'll end up to is:

tokio-0.3 running as configured in the http/src/main.rs
tokio-0.2 running as single threaded from tokio_compat_02
all warp work being executed on tokio-0.2
therefore all ipfs work (except for background task, swarm spawns) will happen on single threaded tokio-0.2
because single threaded tokio-0.2, some ipfs work will fail, like FsStore using spawn_blocking on tokio-0.3
spawn_blocking on tokio-0.3 will fail because of there is no tokio-0.3 runtime available on the single tokio-0.2 thread

(emphasis on spawn_blocking on tokio-0.3 because this threw me off a bit, but makes sense: nowhere in the tokio-0.2 path is the tokio-0.3 reactor made available locally to thread, so it will not find it.)
I think we can land this only when https://github.com/seanmonstar/warp/pull/741 is done along with the bytes 0.6 upgrades happening, which may or may not be linked on the warp PR.

Further tokio 0.3 work in warp: https://github.com/seanmonstar/warp/pull/753.

Status of the upgrade seems that we are still awaiting for the warp PR to go through. At the same time there are at least two major PRs ongoing in rust-libp2p 1907 and the larger 1887. Looks like this will be a big one since we need to adapt to the fixed size multihash as well, unless the two work side by side.

Status of the upgrade seems that we are still awaiting for the warp PR to go through. At the same time there are at least two major PRs ongoing in rust-libp2p 1907 and the larger 1887. Looks like this will be a big one since we need to adapt to the fixed size multihash as well, unless the two work side by side.

Rebased, superceded in #446.

Rebased, superceded in #446.


Update lock file version

Codecov Report
Patch and project coverage have no change.

Comparison is base (b17e630) 0.00% compared to head (16bd036) 0.00%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
Additional details and impacted files
@@          Coverage Diff          @@
##            main     #21   +/-   ##
=====================================
  Coverage   0.00%   0.00%
=====================================
  Files         11      11
  Lines        226     226
=====================================
  Misses       226     226

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


mod only supports 1.19.3 but claims to support up to latest

i dont know if its a mistake when uploading or just a mistake in the fabric mod json but please fix 1 or the other if u dont mind

this is the issue

this is the issue i know off but it may be more work to fix the mod if that isnt the only issue so please if not update the mod update modrinth page of it

Can confirm the mod works on older versions i have tested by manualy changing the minecraft version reqiurement


Data Compression Support for ManagedResources (Phase II)

How to categorize this PR?

/area control-plane
/area cost
/area storage
/kind enhancement
What this PR does / why we need it:
See #9868 which was split into #9955 and this PR for a smooth rollout.
Special notes for your reviewer:
/cc @ScheererJ @rfranzke
To keep the context of previous reviews, most commits from #9868 were taken over, except for the following ones:

ecb2f71e6e185780e96357bd8d9bd58ae30e0429 for ~0df3533ed2f28be7e0f1f4b9204b72b8479a5c66~: Only changes the registry utility, controller was changes in #9955
6e535a38233a3c96ccb4f926e85c644258e219be for ~a38d3b9396f7578005e618898f446a5422af4a5c~: Removes the update code for GRMs, instead of adding it.

Release note:

The data in `ManagedResource` secrets is now compressed with [Brotli](https://github.com/google/brotli) and stored under a single data key `data.yaml.br`.

The `Registry` in `pkg/utils/managedresources/registry.go` was changed to return all objects as a compressed data chunk.
As soon as you update the `github.com/gardener/gardener` dependency to this version, `ManagedResource` secrets will be rewritten in a [Brotli](https://github.com/google/brotli) compressed format (combined under data key `data.yaml.br`).

/test pull-gardener-integration

/assign

Many thanks for all the reviews @ScheererJ! 😅

/approve

/retest


polyfill Date.now to restore IE compat

spiritual continuation of #107

Just tested, this fixes IE8 for me

Thank you :octocat:

Thank you. Any idea when a release will go out?


Number of conversations on the title of the page

As a logged user
When there are unread conversations
I expect the title of the page to contain the number of conversations

--> the ticket was updated: we are displaying the total number of conversations (and not the unread count)


Deep link support when coordinators share the same root viewcontroller

Sharing the same root view controller (e.g. UINavigationController) is easy and documented in this section: https://github.com/quickbirdstudios/XCoordinator#using-multiple-coordinators-with-the-same-rootviewcontroller
I was wondering how deep linking works in this case, as the .none() transition will "break the chain" from what I experienced, because the transition does not deliver anything for the "context completion callback".
As an example say we have this deeplink (based on Example app):
AppRoute.home -> HomeRoute.userList -> UserListRoute.about -> AboutRoute.website
This is how the stack looks like
AppCoordinator -> HomeViewController -> AboutCoordinator -> AboutViewController -> ⚠ Crash
When the router for .website is being resolved no router is found in the stack because the AboutCoordinator was added using the .none() transition.
How to solve this case? Let me know what you think. Thanks.

Possible duplicate of https://github.com/quickbirdstudios/XCoordinator/issues/145.

Thanks @pauljohanneskraft 👍
I solved it by modifying the .none() transition like so:
    public static func none(presentables: [Presentable] = []) -> Transition {
        return Transition(presentables: presentables) { _, _, completion in
            completion?()
        }
    }

I guess you should still addChild(coordinator) when preparing the transition, in #145 you left it out?
Do you have plans for supporting this case in a future release?

You do not need it, since addChild is called for all presentables of a Transition already.
We are currently thinking about adding such a functionality - we will however need to investigate how to solve this properly (i.e. without relying on BaseCoordinator-specific properties). We will let you know once this feature has been added.

There appears to be an issue with this solution, in that the child coordinator is not removed from the parent's children array after the child is no longer in use (e.g. popped).
This seems to be due to the fact that the parent and child share the same viewController (e.g. the UINavigationController instance), and so the function canBeRemovedAsChild() will return false for the child because viewController.isInViewHierarchy will return true.

I think @ashikase is right.
@pauljohanneskraft should this or #145 be reopened?


Add device support for XGB tuning

Add device kwarg to XGBoost._tune and XGBoost.objective to enable GPU training.

Maybe it is better to add device in GBDT class, since all these models support GPU training.

Agree with @xnuohz . Do you want to take it over (if possible)?

Sure I can do that. I'll make it draft PR while I look into the other library training APIs as I'm not too familiar with those.

If @xnuohz has the bandwidth, could you help with it? @adobles96  Is that okay?

Sure. Should I open a new PR for this?

@xnuohz thank you. Yes you can open a new PR.


REPL support for Balleirna

Description:
Feasibility study of JREPL and look at how we can implement in jBallerina. Also look at how to support this at debugger level for expression evalution API.
Steps to reproduce:
Affected Versions:
OS, DB, other environment details and versions:
Related Issues (optional):

Suggested Labels (optional):

Suggested Assignees (optional):

covered by ballerina shell feature in #27797


Add  support

At least reset it so it isn't italics
https://getbootstrap.com/docs/4.0/content/reboot/#address

@Geczy address will be font-style: normal; in v0.4.1.


Remove version: Stackers.Stack version 3.12.11

[Automated] It returns code over 400 in all urls
Microsoft Reviewers: Open in CodeFlow

URL: https://binaries.getstack.app/builds/prod/win/x64/Stack Setup 3.12.11-x64.exe
Response status code does not indicate success: 530 ().
(Automated message - build 896)


WIP - Changing report format to use dash and jinja2

As discussed in #606 and #607, we've decided to change weasyprint for jinja2 and dash.
There's 4 main methods used in the html generation.
Those are:

run();
assets_prep();
generate_report();
export_html();

The first one runs all analysis that is placed on the report and returns a dictionary with divided plotly Figures and pandas DataFrames.
The second one prepare the assets to be put in the reports and it returns a dict contaning all plotly figures and the HTML version of them.
The third one generates a dash version of the report.
The last one exports an html file, it uses jinja2 and exported plotly Figures as HTML, the only reason we have this function is because dash does not support a "serverless" option to share dashboards.

@GabrielBachmann, can we close this PR and reopen it in ROSS_Report repository? I'm willing to remove these files.

This PR is now closed and all the contents in it will be moved to another repo.


fbjs dependency still present in lock file

When I install recompose, it keeps downloading as a dependency fbjs, which in turn brings as a dependency ua-parser-js, which has a Prototype Pollution vulnerability.

It's because the code on npmjs is different compared to the current code in the repo, which is not released.
https://github.com/acdlite/recompose/blob/master/src/packages/recompose/package.json


XReMap don't work in Manjaro (Arch Linux) with DKE 6 with Wayland (no device listed)

About
The title is quite explanatory, but I will provide more details:
default.yml
modmap:
  - name: Default ReMap
    remap:
        KEY_COMPOSE: KEY_RO
        KEY_RO: CTRL_R
    device:
        only: '/dev/input/event0'

input
xremap default.yml

output
Selecting devices from the following list:
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Selected keyboards automatically since --device options weren't specified:
------------------------------------------------------------------------------
Error: Failed to prepare input devices: No device was selected!

System Info

OS => Manjaro
Desktop Environments => DKE 6
Window System => Wayland
Package=> aur/xremap-kde-bin

Hi, I have the same problem here.  But I'm using Fedora.

OS => Fedora
Desktop Environments => KDE 6
Window System => Wayland
Package=> Fedora Copr

config.yml
`
modmap:
keymap:

name: Control Home
remap:
home e end
ALT-LEFT: home
ALT-RIGHT: end
`


ScannerTokens: require token index as param

Remove the logic which caches token indices and tries to find the index for a given token.

@tgodzik after this, i was thinking to release. are you planning to add anything else?

Why do we need to use index everywhere, in some places we already have the token, so this seems an added complication.

in order to look at the tokens before or after the given one, we need to have -- or find -- the index. however, the reality is that we always have the position that we're currently parsing or iterating over, so finding that is an unnecessary overhead.
on the other hand, we have cases when the given token is not really one of the original ones produced by the tokenizer (such as indent and outdent), so having just the index is not sufficient.

I thought the idea is to use index in some places where needed.
I think I have trouble understanding why is this PR helping us? I quite liked the @classifier approach 😅

this is an optimization, removing an unnecessary operation at the beginning of every lookahead or lookbehind sequence. if you believe that it provides a questionable gain at the expense of readability, we can skip this.


Allow start button to be a button

There are certain situations where the start button should submit a form rather than taking the user to a new location. Effectively, this should render using button_to instead of link_to.
Idea came from this comment: https://github.com/DFE-Digital/apply-for-qualified-teacher-status/pull/174#discussion_r910155776
I can't get the tests to pass at the moment, something to do with them depending on the view context helpers, but I'm not familiar with view components.

The design system says this about the Start button.

Start buttons do not submit form data, so they use a link tag rather than a button tag.

I don't agree with that statement though. If a button is semantically a button, then I think it should be a <button> and not an <a> tag —so I think this is a change worth making. Perhaps the documentation should be updated upstream too.
This change looks fine, but we might need to change some of the html_attributes when we render the button (e.g role="button").
I haven't had a chance to look at the specs yet, but I will try and take a look soon.
Thanks for your contribution!

The design system says this about the Start button.

Start buttons do not submit form data, so they use a link tag rather than a button tag.

Ah you're right, I wasn't aware of that. Our needs behind making this a form is so that we can perform an action in our backend when a user starts the service, and it should be a POST since it's not idempotent.

This change looks fine, but we might need to change some of the html_attributes when we render the button (e.g role="button").

Good point, I've amended my commit to remove that unnecessary role.

I haven't had a chance to look at the specs yet, but I will try and take a look soon.

I still can't seem to get them passing, I've tried custom controllers and view contexts. The issue seems to come from the fact that rendering a form expects there to be a CSRF token available, via form_authenticity_token which tries to access the request.session which seems to be nil (except it shouldn't be nil: https://github.com/github/view_component/blob/8dd9063d0b74125c0e20222ee76e64faac6d13a2/lib/view_component/test_helpers.rb#L93).

Thanks for your contribution!

Thanks for the PR @thomasleese. I had a quick dig and it's failing in the depths of actionview when trying to generate an form_authenticity_token
https://github.com/rails/rails/blob/147557dc16a5bd8bab96f999f359a570232e1873/actionview/lib/action_view/helpers/url_helper.rb#L729-L730
I think mocking this in RSpec should allow tests to be written. This does indicate that the start button should perhaps be a helper rather than a fully-fledged component though.

Thanks for the PR @thomasleese. I had a quick dig and it's failing in the depths of actionview when trying to generate an form_authenticity_token
I think mocking this in RSpec should allow tests to be written. This does indicate that the start button should perhaps be a helper rather than a fully-fledged component though.

Yeah, I wasn't sure about mocking as I didn't want to mock too much and find it doesn't actually work. What's the difference between a helper and a component?

@thomasleese there's not really much of a difference for the most part, just the helpers are vanilla Rails helper modules and the components require ViewComponent. However, what's available to the specs with type :component and helper does differ - we have lots of helper specs that do button_to without needing any extra setup.
I'm slightly confused because in the dummy app forgery protection is disabled. I thought that would prevent this kind of thing from happening 🤔
Either way, we can simply override it in the spec which makes most of the tests pass:
diff --git a/spec/components/govuk_component/start_button_component_spec.rb b/spec/components/govuk_component/start_button_component_spec.rb
index 55a5c3b..2fe45a6 100644
--- a/spec/components/govuk_component/start_button_component_spec.rb
+++ b/spec/components/govuk_component/start_button_component_spec.rb
@@ -1,6 +1,11 @@
 require 'spec_helper'

 RSpec.describe(GovukComponent::StartButtonComponent, type: :component) do
+  before do
+    allow_any_instance_of(GovukComponent::StartButtonComponent)
+      .to(receive(:protect_against_forgery?).and_return(false))
+  end
+
   let(:component_css_class) { 'govuk-button--start' }
   let(:text) { 'Department for Education' }
   let(:href) { 'https://www.gov.uk/government/organisations/department-for-education' }

I'm slightly confused because in the dummy app forgery protection is disabled. I thought that would prevent this kind of thing from happening 🤔

@peteryates Yeah, I noticed that too and didn't really understand why it wasn't preventing it.

Either way, we can simply override it in the spec which makes most of the tests pass:

I've amended the commit with the mocking, and the tests are all passing now! There's an issue with Semgrep, but I think that might be something to do with this PR coming from a fork, as it seems to be trying to fetch the branch from origin.

@peteryates Thanks, I've amended the examples with your suggestions! I think I'll take the PR out of draft now.

Great, thanks for this @thomasleese. I'm happy with the changes, looking good to me.

The design system says this about the Start button.

Start buttons do not submit form data, so they use a link tag rather than a button tag.

I was going to mention this, but sounds like there are valid use cases.
This is probably another area within the Design System which doesn’t account for how most services tend to work these days. That said, there’s an argument to be made that start pages – and therefore start buttons – should only appear on mainstream GOV.UK pages. That makes their inclusion in the Design System a bit questionable.
Maybe some guidance in this gems docs could reinforce this fact? Worry is that start buttons get used to submit ‘classic’ forms, which is a no-no.

Thoughts on the param name as_button

Works for me. Will just point out that the Design System uses an element param on its button component. That said, the start button component in this library is a bit of a special case already, so as long as consistent with other options/Rails equivalents, probably fine.

Yeah - I considered suggesting having the builder just output a <button> element and leaving the surrounding form as an exercise for the dev above - was never the biggest fan of button_to in Rails generally.
But, this way the button is 'protected' from being used to submit any data so I'm happy for it to go in.

Yeah - I considered suggesting having the builder just output a <button> element and leaving the surrounding form as an exercise for the dev above - was never the biggest fan of button_to in Rails generally.

Yeah, my plan initially was to make this code produce just a single button and allow the user to build the form around it, but I agree that it makes sense in this context with a start button to generate the form as well, and it means the start button component effectively behaves the same whether as_button is true or false - it takes the user to a href, one via GET and one via POST.


Migrate from electron prebuilt

Migration from electron-prebuilt peer dependency to electron. Fixes #5

Thanks! Sorry for the delay.
However, I will do a major version bump, as this breaks if anyone is still using electron-prebuilt.


Tool invocation via API

Confirm this is a feature request for the Python library and not the underlying OpenAI API.

[X] This is a feature request for the Python library

Describe the feature or improvement you're requesting
Can we have tools invoked by the API so we can have control over access:
Example
Assuming you've already uploaded your files and have their IDs
file_ids = ["file-123abc", "file-456def"]

response = openai.Tool("retriever").create(
    file_ids=file_ids,
    query="Find information about GPT-3 capabilities"
)

# For Code Interpreter
code_snippet = """
with open('my_uploaded_file.txt', 'r') as file:
    data = file.read()
    # Process data...
"""
response = openai.Tool("code-interpreter").create(
    code=code_snippet,
    file_id="file-123abc"
)

This would remove the need for local sandboxed environments to run the tools. In a work around we can instruct through inference to run a tool but its not ideal as context is misused for data parameterization.
Additional context
No response

Thanks for the suggestion! I've passed it along to the right team.
Ideas like this for the API belong at community.openai.com – I'm going to go ahead and close this because it's not an issue with the Python library specifically.


feat(tokens): update color token values

Description
Updated existing non-gray S2 palette colors, in light and dark:

blue
green
orange
red
celery
chartreuse
cyan
fuchsia
indigo
magenta
purple
seafoam
yellow

Motivation and context
This update addresses several improvements:

fuchsia, seafoam: all values shifted to make room for new colors, pink and turquoise
all other colors: certain values were updated to address accessibility contrast requirements against Spectrum 2 background layer colors

Related issue

SDS-13195
How Has This Been Tested?

Screenshots (if appropriate):
Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[x] I have signed the Adobe Open Source CLA.
[x] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[x] I have read the CONTRIBUTING document.
[ ] I have added tests to cover my changes.
[x] All new and existing tests passed.

@GarthDB @mrcjhicks This is my first PR. I created it via the diff-script based on the changes in the tokens-studio-data repo here. I also added a changeset, but not sure, if it is a patch or minor change. I did not see a pre-patch option in the changeset cli. Please let me know, if this is okay. Thanks Frank

The pre is all handled in the pre.json file. We can just keep adding more changeset files until we need to graduate to latest/main. I did edit the changeset to include the design motivation and token diff from the last beta release. If you want to do this locally you can run moon run tokens:generateDiffResult -- beta which will fetch the latest beta release from npm and compare it to the local files.

 Got it! 💡 Thank you!


gi-gdkx11: Default to 3.X version

The newer (4.X) versions require gtk4 which shouldn't be the default.

Motivation for this change
Fixes all packages that depend on gi-gdkx11 (which wasn't able to build since gtk4 isn't available in Nix)
Things done

[X] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
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 nixpkgs-review --run "nixpkgs-review wip"
[ ] 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)
[ ] Ensured that relevant documentation is up to date
[X] Fits CONTRIBUTING.md.

Notify maintainers
cc @peti

@mdorman Thanks for trying to fix this.
However, the default-package-overrides section is generated semi-automatically and shouldn't be added to by hand.
I just sent a PR adding a comment to try to clarify this.  Please feel free to comment on this PR if anything is still unclear: https://github.com/NixOS/nixpkgs/pull/76912.
As for gi-gdkx11, there isn't a good way to default to an older version of a package that is not on Stackage.  I'd urge you to try to get upstream to the package into Stackage so that we don't have to necessarily do anything here in nixpkgs.
If you wanted to explicitly generate an older version of a package, you can add it to this list: https://github.com/NixOS/nixpkgs/blob/8a4d94c5afbfa218609f62da7fc8185214336a52/pkgs/development/haskell-modules/configuration-hackage2nix.yaml#L2494

The default-package-overrides section is generated semi-automatically and shouldn't be added to by hand.

Note that you can edit default-package-overrides by hand. The code that generates part of that section from Stackage looks for the comment "# LTS Haskell" and replaces everything that follows it until the end of the section: https://github.com/NixOS/cabal2nix/blob/master/update-stackage.sh#L46-L54.
In other words, if you add manual overrides before that comment, then it should be fine.


thickPolyline is sometimes filled instead

Shared Program: https://code.world/haskell#Px4A93a9xi_uHTP9Q8wtksQ
Description
If you play around with this, there's a drawing quirk that surfaces in specific situations.  It only happens when the blue line is short enough, and when the canvas is large enough.  Reducing the number of levels seems to help, too, in reproducing.  But when these conditions are true, the thickPolyline becomes solid and filled in.

(Note that the solid area is actually rendered as a thin line in the inspect window, which is smaller.  The same thing happens if the canvas is resized smaller.  I suspect this has to do with drawing being faster?)
The blue line is the first thing in the scene graph, which makes it the last thing drawn.  I suspected there was some interference with a fill from an adjacent drawing.  But there's really no adjacent drawing that does a fill.
FYI @polux

Simpler reproduction: https://code.world/#PuhS6rQjtFvzBDJY3zVIKPA
You do have to drag the canvas so it's larger than the default 500x500 before the effect is visible.

So that eliminates weird interactions with adjacent shapes.  It looks like there's just something wrong with thickPolyline itself.

This seems to be a browser bug?  https://jsfiddle.net/8hs5jrdu/

Indeed, the jsfiddle link works as intended on firefox, but I can reproduce the bug in chrome 75. Interestingly, it disappears if one disables canvas hardware acceleration. I have an Intel HD Graphics 520, maybe you've got the same?

I've filed a bug with Chrome about this issue.  I'll follow up there, but it doesn't make sense to try to work around this in CodeWorld.  So I'll close this one.


feat: export mixed route trade

Not currently exported and could be useful to import for downstream code

no perms to run prettier from fork :/


Example cross entropy loss, wrong scaling

The current examples of using a cross entropy loss, e.g. in https://github.com/google/jax/blob/d90993f798ff00404e2d5869f78d3642d99b6a33/examples/mnist_classifier.py#L43 is
def loss(params, batch):
  inputs, targets = batch
  preds = predict(params, inputs)
  return -np.mean(preds * targets)

Due to np.mean this code introduces a scaling of (1/class_count) to the loss computation.  I believe the common/correct scaling should be
def loss(params, batch):
  inputs, targets = batch
  preds = predict(params, inputs)
  return -np.mean(np.sum(preds * targets, axis=1))

Also, this may be a silly question, but does the multiplication with 0 have the potential to introduce numerical issues upon gradient computation?

Here is an alternative that avoids multiplication with zeros:
def cross_entropy(logprobs, targets):
  target_class = np.argmax(targets, axis=1)
  nll = np.take_along_axis(logprobs, np.expand_dims(target_class, axis=1), axis=1)
  ce = -np.mean(nll)
  return ce

def loss(params, batch):
  inputs, targets = batch
  preds = predict(params, inputs)
  return cross_entropy(preds, targets)

Just noticed this as well. This should indeed be fixed.

Want to send a PR?

@jekbradbury done!
P.S. it also improves the training a lot (see PR)


where is your own model/codes (referred as DSM in your paper)

great and  generous works! guys!
but there is only deepSBD model we can evaluate . can you offer trained DSM to evaluate and compare
thanks!

Sry, the codes in the paper will not be released.


Fails to build on 32bit Gentoo

  CC       util/src/stirshaken-stir_shaken_tool_command.o
  CC       util/src/stirshaken-stir_shaken_tool.o
  CC       util/src/stirshaken-stir_shaken_ca.o
util/src/stir_shaken_ca.c: In function ‘close_http_connection_with_error’:
util/src/stir_shaken_ca.c:128:84: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=]
  128 |                                 mg_printf(nc, "HTTP/1.1 %s %s\r\nContent-Length: %lu\r\nContent-Type: application/json\r\n\r\n%s\r\n\r\n", STIR_SHAKEN_HTTP_REQ_404_NOT_FOUND, error_phrase, strlen(error_body), error_body);
      |                                                                                ~~^                                                                                ~~~~~~~~~~~~~~~~~~
      |                                                                                |                                                                                |
      |                                                                                long unsigned int                                                                                size_t {aka unsigned int}
      |                                                                                %u
util/src/stir_shaken_ca.c: In function ‘ca_handle_api_cert’:
util/src/stir_shaken_ca.c:536:134: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=]
  536 |                                         mg_printf(nc, "HTTP/1.1 201 Created\r\nReplay-Nonce: %s\r\nLocation: %s\r\nContent-Length: %lu\r\nContent-Type: application/json\r\n\r\n%s\r\n\r\n", nonce, authz_url, strlen(authz_challenge), authz_challenge);
      |                                                                                ~~^                                                                         ~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                |                                                                         |
      |                                                                                long unsigned int                                                         size_t {aka unsigned int}
      |                                                                                %u
util/src/stir_shaken_ca.c:598:93: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=]
  598 |                                         mg_printf(nc, "HTTP/1.1 200 OK\r\nContent-Length: %lu\r\nContent-Type: application/json\r\n\r\n%s\r\n\r\n", strlen((const char *)cert), cert);
      |                                                                                ~~^                                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                |                                                       |
      |                                                                                long unsigned int                                       size_t {aka unsigned int}
      |                                                                                %u
util/src/stir_shaken_ca.c: In function ‘ca_handle_api_authz’:
util/src/stir_shaken_ca.c:900:101: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=]
  900 |                                                 mg_printf(nc, "HTTP/1.1 200 OK\r\nContent-Length: %lu\r\nContent-Type: application/json\r\n\r\n%s\r\n\r\n", strlen(session->authz_polling_status), session->authz_polling_status);
      |                                                                                ~~^                                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                |                                                       |
      |                                                                                long unsigned int                                       size_t {aka unsigned int}
      |                                                                                %u
util/src/stir_shaken_ca.c:931:149: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=]
  931 |                                                 mg_printf(nc, "HTTP/1.1 200 You are more than welcome. Here is your challenge:\r\nContent-Length: %lu\r\nContent-Type: application/json\r\n\r\n%s\r\n\r\n", strlen(session->authz_challenge_details), session->authz_challenge_details);
      |                                                                                ~~^                                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                |                                                       |
      |                                                                                long unsigned int                                       size_t {aka unsigned int}
      |                                                                                %u
util/src/stir_shaken_ca.c:1088:126: warning: format ‘%zu’ expects argument of type ‘size_t’, but argument 6 has type ‘time_t’ {aka ‘long int’} [-Wformat=]
 1088 |                                                 snprintf(session->sp.cert_name, sizeof(session->sp.cert_name), "sp_%s_%llu_%zu.pem", spc, secret, time(NULL));
      |                                                                                ~~^                    ~~~~~~~~~~
      |                                                                                |                    |
      |                                                                                unsigned int         time_t {aka long int}
      |                                                                                %lu
util/src/stir_shaken_ca.c: In function ‘ca_handle_api_authority_check’:
util/src/stir_shaken_ca.c:1237:85: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=]
 1237 |                                 mg_printf(nc, "HTTP/1.1 200 OK\r\nContent-Length: %lu\r\nContent-Type: application/json\r\n\r\n%s\r\n\r\n", strlen(json_str), json_str);
      |                                                                                ~~^                                                       ~~~~~~~~~~~~~~~~
      |                                                                                |                                                       |
      |                                                                                long unsigned int                                       size_t {aka unsigned int}
      |                                                                                %u
  CC       util/src/stirshaken-mongoose.o
  CC       src/stir_shaken.lo
  CC       src/stir_shaken_service.lo
  CC       src/stir_shaken_passport.lo
src/stir_shaken_passport.c: In function ‘stir_shaken_passport_validate_iat_against_freshness’:
src/stir_shaken_passport.c:818:98: error: format ‘%zu’ expects argument of type ‘size_t’, but argument 4 has type ‘time_t’ {aka ‘long int’} [-Werror=format=]
  818 |                 snprintf(err_buf, STIR_SHAKEN_ERROR_BUF_LEN, "PASSporT's @iat (in seconds) is: %zu, freshness is: %u, BUT now is %zu (this is PASSporT to the future, too young, not valid yet)", iat, iat_freshness, now_s);
      |                                                                                ~~^                                                                                ~~~
      |                                                                                |                                                                                |
      |                                                                                unsigned int                                                                                time_t {aka long int}
      |                                                                                %lu
src/stir_shaken_passport.c:818:132: error: format ‘%zu’ expects argument of type ‘size_t’, but argument 6 has type ‘time_t’ {aka ‘long int’} [-Werror=format=]
  818 |                 snprintf(err_buf, STIR_SHAKEN_ERROR_BUF_LEN, "PASSporT's @iat (in seconds) is: %zu, freshness is: %u, BUT now is %zu (this is PASSporT to the future, too young, not valid yet)", iat, iat_freshness, now_s);
      |                                                                                ~~^                                                                                ~~~~~
      |                                                                                |                                                                                |
      |                                                                                unsigned int                                                                       time_t {aka long int}
      |                                                                                %lu
src/stir_shaken_passport.c:824:98: error: format ‘%zu’ expects argument of type ‘size_t’, but argument 4 has type ‘time_t’ {aka ‘long int’} [-Werror=format=]
  824 |                 snprintf(err_buf, STIR_SHAKEN_ERROR_BUF_LEN, "PASSporT's @iat (in seconds) is: %zu, freshness is: %u, BUT now is %zu (PASSporT too old, expired)", iat, iat_freshness, now_s);
      |                                                                                ~~^                                                                 ~~~
      |                                                                                |                                                                 |
      |                                                                                unsigned int                                                      time_t {aka long int}
      |                                                                                %lu
src/stir_shaken_passport.c:824:132: error: format ‘%zu’ expects argument of type ‘size_t’, but argument 6 has type ‘time_t’ {aka ‘long int’} [-Werror=format=]
  824 |                 snprintf(err_buf, STIR_SHAKEN_ERROR_BUF_LEN, "PASSporT's @iat (in seconds) is: %zu, freshness is: %u, BUT now is %zu (PASSporT too old, expired)", iat, iat_freshness, now_s);
      |                                                                                ~~^                                                   ~~~~~
      |                                                                                |                                                   |
      |                                                                                unsigned int                                        time_t {aka long int}
      |                                                                                %lu
src/stir_shaken_passport.c: At top level:
cc1: note: unrecognized command-line option ‘-Wno-gnu-zero-variadic-macro-arguments’ may have been intended to silence earlier diagnostics
cc1: all warnings being treated as errors
make: *** [Makefile:1336: src/stir_shaken_passport.lo] Error 1

Can we please merge this PR so I don't have to keep patching manually?

You still have some unresolved questions in that PR.

It's not my PR, but I came up with a similar patch that I'm using locally to solve this issue.


docs(readme): improve custom base_url example

[x] I understand that this repository is auto-generated and my pull request may not be merged

Changes being requested
OPENAI_BASE_URL defaults to https://api.openai.com/v1, so if you add a replacement and forget to append the /v1, it will result in 404s. Let's give an example that ends in v1
Additional context & links
https://github.com/openai/openai-python/blob/b2f58cba092cfb3083dc31de429fa19d89f739dc/src/openai/_client.py#L118C1-L121C52

Thanks!


[D2] 1.2 Update Team Class Diagram

Update Team Class Diagram
To be completed on

Reviewed

Final class diagram reviewed on 23/03/23

Reviewed final class diagram on 23/3/23

FInal Review

[ ] Aixin
[ ] Yikiat
[ ] Guanlin
[x] JiaXin


Large Jigsaws Overlap

When working with large jigsaw pieces (thanks Carpet mod), the Jigsaws placed with /spawnpieces can overlap with each other. See the image below.
(The "chunk border" looking thing on the left is not caused by your mod, that is an intentional part of my structure)

It is because I space out the pieces by 48 based on vanilla's max size.
For maximum speed, I set the structure void over the entire area first.
Then I spawn each template separately from there. So I have no access to the size of the templates initially when clearing out the areas.
Furthermore, if I do dynamically space things out based on template size, it would either make everything spaced out super far even for small pieces. Or I accept and make the grid of pieces no longer a grid.
Pros and cons for something when breaking the 48 block limit

Yeah, the cons are fair. Maybe a solution could be another argument to the command, that overrides the default 48 to whatever spacing the user wants? That way the "dynamic-ness" would only apply if the user specifically says to, in which case they would be okay with everything being spaced out.

v4.3.1 now has spacing argument at end of spawn pieces command


NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp

osx:v10.11.4 git:v2.6.4 v8:v<IP_ADDRESS> node:v4.4.1 npm:v3.8.5 nvm:v0.31.0
micro-services-tutorial-iot/ on master
λ npm install

><EMAIL_ADDRESS>install /Users/rocky.assad/code/micro-services-tutorial-iot/node_modules/zmq
> node-gyp rebuild

gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
Package libzmq was not found in the pkg-config search path.
Perhaps you should add the directory containing `libzmq.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libzmq' found
gyp: Call to 'pkg-config libzmq --libs' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/Users/rocky.assad/.nvm/versions/node/v4.4.1/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:305:16)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 15.4.0
gyp ERR! command "/Users/rocky.assad/.nvm/versions/node/v4.4.1/bin/node" "/Users/rocky.assad/.nvm/versions/node/v4.4.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/rocky.assad/code/micro-services-tutorial-iot/node_modules/zmq
gyp ERR! node -v v4.4.1
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm WARN<EMAIL_ADDRESS><EMAIL_ADDRESS>install: `node-gyp rebuild`
npm WARN<EMAIL_ADDRESS>Exit status 1
npm WARN<EMAIL_ADDRESS>No repository field.

Just need to use a newer version of node.  Updating to a modern version, such as 5.0.0, will fix this problem.

I think the latest version of 4.x will work too.

I'm running OSX El Capitan 10.11.5 and also i have installed node v4.4.2, v5.10.0 and v6.0. i have tried to install phonegap globally but keeps be displaying the warning. Above mentioned solutions don't worked out for me.

I had the same problem in ubuntu16 64bit and i fixed it by installing ubuntu build-essentials then remove $HOME/node-gyp and reinstalling my native module.

Merged with #22 It's a dependency issue.

I'm getting the same error with Node v6.3.0

I'm getting the error with Node v6.4.0

I'm getting the error with Node v6.6.0 running on Mac

Getting with 6.4, any ideas?

I'm getting the error with Node v6.2.0

Also seen with Node v6.9.1

Also seen with Node 7.0.0

Same here with 7.3.0 !

Same here with 7.4.0 ! I return to 5.0.0  is ok.

Same with 6.10.0


Trouble with generation and multi-classification

Hi, sorry to bother you, I'm having trouble with generation and multi-classification problems according to https://github.com/Eladlev/AutoPrompt/blob/main/docs/examples.md#generating-movie-reviews-generation-task. I changed to dataset:label_schema: ["1", "2", "3", "4", "5"] and got an error. I hope to get some help, or if you can provide the yml file for generating and multi-classification tasks, thank you very much!
Traceback (most recent call last):
File "/home/hezhuo/AutoPrompt/run_pipeline.py", line 44, in
best_prompt = pipeline.run_pipeline(opt.num_steps)
File "/home/hezhuo/AutoPrompt/optimization_pipeline.py", line 273, in run_pipeline
stop_criteria = self.step(i, num_steps_remaining)
File "/home/hezhuo/AutoPrompt/optimization_pipeline.py", line 252, in step
self.eval.add_history(self.cur_prompt, self.task_description)
File "/home/hezhuo/AutoPrompt/eval/evaluator.py", line 115, in add_history
conf_matrix = confusion_matrix(self.dataset['annotation'],
File "/home/hezhuo/miniconda3/envs/AutoPrompt/lib/python3.10/site-packages/sklearn/utils/_param_validation.py", line 213, in wrapper
return func(*args, **kwargs)
File "/home/hezhuo/miniconda3/envs/AutoPrompt/lib/python3.10/site-packages/sklearn/metrics/_classification.py", line 356, in confusion_matrix
raise ValueError("At least one label specified must be in y_true")
ValueError: At least one label specified must be in y_true

Can you provide all the changes that you made in the configuration files? It seems like you changed the annotator to LLM with not fitted prompt and this cause the issue.

Do both multi-classification and generation tasks need to set annotator to " "? Can the former be omitted? This is my configuration file. Thank you very much for your reply. Best wishes.
use_wandb: True
dataset:
name: 'dataset'
records_path: null
initial_dataset: ''
label_schema: ["1", "2", "3", "4", "5"]
max_samples: 50
semantic_sampling: False # Change to True in case you don't have M1. Currently there is an issue with faiss and M1
annotator:
method: ''
predictor:
method : 'llm'
config:
llm:
type: 'OpenAI'
name: 'gpt-3.5-turbo-1106'
async_params:
retry_interval: 10
max_retries: 2
        model_kwargs: {"seed": 220}
    num_workers: 5
    prompt: 'prompts/predictor_completion/prediction.prompt'
    mini_batch_size: 1  #change to >1 if you want to include multiple samples in the one prompt
    mode: 'prediction'

meta_prompts:
folder: 'prompts/meta_prompts_classification'
num_err_prompt: 1  # Number of error examples per sample in the prompt generation
num_err_samples: 2 # Number of error examples per sample in the sample generation
history_length: 4 # Number of sample in the meta-prompt history
num_generated_samples: 10 # Number of generated samples at each iteration
num_initialize_samples: 10 # Number of generated samples at iteration 0, in zero-shot case
samples_generation_batch: 10 # Number of samples generated in one call to the LLM
num_workers: 5 #Number of parallel workers
warmup: 4 # Number of warmup steps
eval:
function_name: 'accuracy'
num_large_errors: 4
num_boundary_predictions : 0
error_threshold: 0.5
llm:
name: 'gpt-4-1106-preview' # This is the meta-prompt LLM, it should be a strong model. For example, using GPT-3.5 will cause an error in many cases.
type: 'OpenAI' # Can be OpenAI, Anthropic, Google, Azure
temperature: 0.8
stop_criteria:
max_usage: 2 #In $ in case of OpenAI models, otherwise number of tokens
patience: 10 # Number of patience steps
min_delta: 0.01 # Delta for the improvement definition

The generation task consists of two phases:

Fitting the ranking prompt
Using the ranking prompt to optimize the generation task

Your failure is in the first phase, where we try to fit the ranking prompt. In this phase, we treat the ranking task as a classification task. So in order to work the annotator in the default_config should be:
annotator:
    method : 'argilla'

If you want to skip the first phase and use LLM as a ranker this can be easily modified. However, the current failure is due to the fact that the annotator for the first phase is not the appropriate annotator.

Thank you!
---Original---
From: @.>
Date: Fri, Nov 22, 2024 14:06 PM
To: @.>;
Cc<EMAIL_ADDRESS>Subject: Re: [Eladlev/AutoPrompt] Trouble with generation andmulti-classification (Issue #106)
The generation task consists of two phases:
Fitting the ranking prompt
Using the ranking prompt to optimize the generation task
Your failure is in the first phase, where we try to fit the ranking prompt. In this phase, we treat the ranking task as a classification task. So in order to work the annotator in the default_config should be:
annotator:     method : 'argilla'
If you want to skip the first phase and use LLM as a ranker this can be easily modified. However, the current failure is due to the fact that the annotator for the first phase is not the appropriate annotator.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>


I'm really confused about how to use plugins.

The help doc didn't help very much here.
I added this into my book.json:
{
   plugins: ["katex"]
}

but the build failed, so I changed into this:
{
    "plugins": ["katex"]
}

again it did not work, telling me that
info: load plugin katex ....ERROR
Error: Error loading plugins: katex. Run 'gitbook install' to install plugins from NPM.

So what exactly should I be doing to enable MathJax for my doc?
Thanks again for this great system.

This plugin is mathjax, not katex.


Separate prisma-client runtime from code generator in prisma-client-lib

I would like to ship my graphql server with a prisma-client-lib that only contains the necessary runtime dependencies and not the codegen (which has some particularly heavy dependencies like prettier).
Context:
Code generated by prisma imports prisma-client-lib and is therefor a production dependency that needs to be included. Part of prisma-client-lib is a code generator, which is only used at build time, not at runtime (as far as I can tell).

I just started building my app for production and started to realize that this will be very helpful


Litepicker 1.x unique identifier for multiple instances

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
When page has multiple litepicker instances in dom root body they all have the same class: "litepicker" so I can't set position fixed for header datepicker and other additional styles for others
Describe the solution you'd like
A clear and concise description of what you want to happen.
Either add trigger element class name with some prefix like "litepicker litepicker-USED-TRIGGER"
Or add method setId() which when used like this.picker.setId(uuidv4()) would add to the dom id like "litepicker-CUSTOM-UUID"
Or add method 'customClass()' which when used like this.picker.customClass(uuidv4()) would add to the dom class like "litepicker-CUSTOM-UUID"
Or add new param like new Litepicker({ domId: uuidv4() }) which would add to the dom id like "litepicker-CUSTOM-UUID"
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
now I'm in thinking period since I know this will be done not soon or will not be done. When I'll figure out something I'll share (or is there a solution for that already?)

If you think this is needed I can check package and add solution PR

For v2
[].forEach.call(document.querySelectorAll('.lite-picker'), function (el, i, a) {   lpicker = new Litepicker({     element: el   });   lpicker.ui.setAttribute('id',litepicker-${i}`)
});
`


[TextField]: rootRef property is not ommited if undefined

I am using the Bucklescript Material UI Bindings to use MaterialUI in my ResonReact App. By default the TextField binding creates a React Textfield and setting all properties explicitly to undefined. By doing so I get an warning
Warning: React does not recognize the `rootRef` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `rootref` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
    in div (created by FormControl)
    in FormControl (created by WithStyles(FormControl))
    in WithStyles(FormControl) (created by TextField)
    in TextField (created by Index)
    in div (created by Index)
    in Index (created by

I tried the same using React instead of and I get the same behavior when I set the rootRef property to undefined
<TextField rootRef={undefined} />

I expected undefined props to be ommitted. Am I wrong?

[x] I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

No warning because rootRef is simply omitted
Current Behavior

Warning
Steps to Reproduce (for bugs)

Simply create a TextField with the rootRef property set to undefined.
Here an example Sandbox:
https://codesandbox.io/s/6yoz6x39pk
Context

Your Environment

See sandbox.

Tech
Version

Material-UI
1.0.0.beta.35

React
16.2.0

browser
chrome

etc

@gonzochic The rootRef property was removed in #10025. I believe the bs-material-ui binding needs to be updated. cc @InsidersByte


bump 0.13.0

coverage: 95.739%. remained the same
when pulling f49761c3256b6056715f2e6e5d538fb9ab210b2f on release/0.13.0
into dd6bbb1ec591b649958fcf808f877bc641ed8408 on main.


Ignore ToC heading in ToC

I have this ToC generated in Sublime using the plugin:
...
## Table of Contents

<!-- TOC depthFrom:2 depthTo:6 withLinks:1 updateOnSave:1 orderedList:0 -->

- [Table of Contents](#table-of-contents)
...

Is there a way to not have Table of Contents referred to in the ToC?
Accidentally also here: filed https://github.com/jonschlinkert/markdown-toc/issues/90.

You maybe use another plugin.
See our README.md, the syntax is different.

Thank you.

The bug reporting in Markdown-toc in Sublime leads me here. Can I just verify again that I'm not missing something?

Yep, definitely not this one. My bad. Wow.

I think you use Atom not SublimeText3... 🦊

I think I was tired, and probably need to not post bug reports when I am sleepy. Really, my bad.


Sanitize file paths before extracting export templates

Fixes #26302
simplify_path makes sure .. won't traverse upwards the output directory.

Thanks!


Shaderv2

The other branch had too much junk so created new branch

LGTM! Nice shadows and lighting changes


ionic2 ion-slides not work with nested components with iOS < 10

Ionic version:  (check one with "x")
[ ] 1.x
[x] 2.x
I'm submitting a ...  (check one with "x")
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/
Current behavior:
With ipad/iphone devices with iOS lower than 10, show multiple ion-slide, each one wrapped in a nested component not work: all the slides are overlapped. With ipad/iphone devices with iOS 10, all work correctly. With browser all work correctly.
Expected behavior:
I would aspect slides rendered correctly (one per page, with swipe between them).
Steps to reproduce:
I have created a plunker based on your template
http://plnkr.co/edit/cXcDwUqjdj8alOuXG5Kc?p=preview
Related code:
Other information:
Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):
Your system information:

Cordova CLI: 6.5.0
Ionic Framework Version: 2.2.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.1.4
ios-deploy version: 1.9.1
ios-sim version: 5.0.13
OS: macOS Sierra
Node Version: v6.9.5
Xcode version: Xcode 8.2.1 Build version 8C1002

Hello, thanks for opening an issue with us. I am going to close this issue as a duplicate of https://github.com/driftyco/ionic/issues/10542.


hping for https and traceroute using any TCP/UDP port

Your Message: Since all of our hosted URLs are now HTTPS and reject HTTP can your tool provide a HTTPS ping and traceroute? Most times when we are troubleshooting we see ping and traceroute work fine but HTTPs has an issue or the carrier is treating HTTP traffic (its route etc) different. It would be great to be able to issue a ping and traceroute at a TCP or UDP layer that is be able to ping or tr using any selected TCP/UDP destination port. thanks so far love the program

@maddentx,
Do you really reject http or just redirect to https?

Within our service our load balancers will re-direct 80 to 443 but our non LBs such as our SSL VPN only allows 443.  In addition we run high speed file uploads using various UDP ports.  It would a nice feature to be able to use mylg to xPing or traceroute via any selected TCP/UDP port so we can see port specific pathing.


Not able to set readyOnly to true for persistent disk, wherever the config is placed.

Hi Guys,
See valid config here: http://pastebin.com/raw.php?i=8GeV4jrD (I redacted my image / drives)
With replicas set to 1 this works, greater than 1 I get the following error:
ERROR: F0311 19:31:00.973206   42192 create.go:78] ReplicationController "node-master-controller" is invalid: spec.template.spec.volumes.GCEPersistentDisk.ReadOnly: invalid value 'false': ReadOnly must be true for replicated pods > 1, as GCE PD can only be mounted on multiple machines if it is read-only.

The pastebin has several incorrectly placed readOnly flags but no matter where I place them I still get this error.
Thanks,
Ian

Assigning to myself since I started to take a look. Thanks for reporting @ifuller1!

@ifuller1 I am sad to report that the problem is a typo. It seems like you're using "readyOnly" instead of "readOnly". I can't believe it took us this long to notice :P once the typo is fixed all works as expected

Closing this issue, but feel free to open new issues if you run into any trouble.
Sorry it took so long to find a relatively simple problem. I +1'd #3338 which looks to improve the experience when this type of error occurs.

Right. Can we remove this issue from the internet...


[SPARK-34806][SQL] Add Observation helper for Dataset.observe

What changes were proposed in this pull request?
This pull request introduces a helper class that simplifies usage of Dataset.observe() for batch datasets:
val observation = Observation("name")
val observed = ds.observe(observation, max($"id").as("max_id"))
observed.count()
val metrics = observation.get

Why are the changes needed?
Currently, users are required to implement the QueryExecutionListener interface to retrieve the metrics, as well as apply some knowledge on threading and locking to pull the metrics over to the main thread. With the helper class, metrics can be retrieved from batch dataset processing with three lines of code (the action on the observed dataset does not count as a line of code here).
Does this PR introduce any user-facing change?
Yes, one new class and one `Dataset`` method.
How was this patch tested?
Adds a unit test to DataFrameSuite, similar to "get observable metrics by callback" in DataFrameCallbackSuite.

Can one of the admins verify this patch?

@cloud-fan @HyukjinKwon

ok to test

cc @hvanhovell too

Test build #141285 has started for PR 33422 at commit 2a21bb3.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/45799/

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/45799/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/45799/

Test build #141285 has finished for PR 33422 at commit 2a21bb3.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/141285/

Test build #141319 has started for PR 33422 at commit 2307dfd.

Test build #141319 has finished for PR 33422 at commit 2307dfd.

This patch fails to build.
This patch merges cleanly.
This patch adds no public classes.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/141319/

I have no more comments on that otherwise.

Test build #141322 has started for PR 33422 at commit 5644aba.

Kubernetes integration test unable to build dist.
exiting with code: 1
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/45833/

Test build #141322 has finished for PR 33422 at commit 5644aba.

This patch fails Java style tests.
This patch merges cleanly.
This patch adds no public classes.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/141322/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/45833/

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/45837/

Test build #141330 has started for PR 33422 at commit 4f620a9.

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/45837/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/45837/

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/45845/

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/45845/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/45845/

Test build #141330 has finished for PR 33422 at commit 4f620a9.

This patch fails PySpark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/141330/

Can one of the admins verify this patch?

Test build #141389 has started for PR 33422 at commit 4d78f0c.

Test build #141389 has finished for PR 33422 at commit 4d78f0c.

This patch fails Java style tests.
This patch merges cleanly.
This patch adds no public classes.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/141389/

Kubernetes integration test unable to build dist.
exiting with code: 1
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/45907/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/45907/

Test build #141399 has started for PR 33422 at commit 3b2d9ae.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/45917/

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/45917/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/45917/

Test build #141399 has finished for PR 33422 at commit 3b2d9ae.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/141399/

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

I hope this now really means we are good to go.

Can one of the admins verify this patch?

Test build #141478 has started for PR 33422 at commit 3b2d9ae.

Yeah, looks like Javadoc build passed too at https://github.com/G-Research/spark/runs/3122095226?check_suite_focus=true

thanks, merging to master!

Test build #141478 has finished for PR 33422 at commit 3b2d9ae.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/141478/

@cloud-fan @HyukjinKwon thanks for your time and valuable input!


remove right-click enabled menu in editor

Fix mozilla/thimble.mozilla.org#2558
removed Javascript responsible for the right-click menu:
/src/command/DefaultMenus.js

@jsl15c which issue does this fix? Please edit your PR description to include something like Fix mozilla/thimble.mozilla.org#XXX XXX being the issue number.

Yes, I think this looks right.  @jsl15c thanks for the patch.

@humphd @gideonthomas Thank you, so I can improve my open source contributions! 😃


Latest git causes content issues

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: InvalidBoolEncoding(2)', src/checker/nlprules.rs:22:70

static TOKENIZER_BYTES: &[u8] = include_bytes!(concat!(env!("OUT_DIR"), "/tokenizer.bin"));
static RULES_BYTES: &[u8] = include_bytes!(concat!(env!("OUT_DIR"), "/rules.bin"));

lazy_static::lazy_static! {
    static ref TOKENIZER: Tokenizer = Tokenizer::from_reader(&mut &*TOKENIZER_BYTES).unwrap();
    static ref RULES: Rules = Rules::from_reader(&mut &*RULES_BYTES).unwrap(); /// <<< this one errors, and it's always this one
}

CI failure https://ci.spearow.io/teams/main/pipelines/cargo-spellcheck/jobs/pr-validate/builds/546

Which binaries are you using? This looks like an issue with an outdated binary.
At the moment I don't want to make any stability guarantees of the same binaries being usable across versions because things in the core are still prone to change quickly. So the binary for version 0.3.0 does not work with the latest commit to master.
I think the right course of action here is a better error message that informs which version of the binary you are using and which version of nlprule; that requires some sort of compatibility to read the version but that's doable.
In the meantime you can download the unreleased binaries for the latest commit to master at the corresponding GH action output: https://github.com/bminixhofer/nlprule/actions/runs/531964158

If that's the case, then the helper API would really make sense, so issues like these won't pop up again, but compatibility is guaranteed by API.

I agree 100%. Still it should also have a better error message and i. e. read the version as the first x bytes of the binary and if it does not match stop right away.
At the moment I'm working on #15 but a build.rs and from_lang_code (or equivalent) API will be part of the next release.

I'll implement this soon. I think using the first 64 (or 128, 256, but I think 64 is enough) bytes of each binary to store the version encoded as UTF8 is the best way. I'm not too sure if there isn't maybe a more standard way so I'd appreciate a second opinion @drahnr :)

I think kiss is the best approach here. Reserving 8 bytes and using them as big endian u64 for a running number and using a static var to reference this. As alternative, one could make the files part of an archive instead of just compressing them and adding two more entries/files, VERSION and GITSHA. The first one is leaner, but I'd prefer the latter, since the resulting format is inspectable with common tooling available.

one could make the files part of an archive instead of just compressing them and adding two more entries/files, VERSION and GITSHA

Oh that's a good idea! I have to check how much overhead there is from tarring / untarring (also w.r.t dependencies) but if it's reasonably small then that's definitely a better approach.

The rust cookbook contains a few examples https://rust-lang-nursery.github.io/rust-cookbook/compression/tar.html


U-Net shape

Hello, I trained U-Net with one-class batches with the size of (128,128), and get prediction results of the size of (128,128).  I would like to use Smoothly-Blend-Image-Patches function to remove border artifacts in the prediction results of my trained U-Net model. My input images are 8-bit grayscale with a size of (799,799).  When I use your function I have the following error:

WARNING:tensorflow:Model` was constructed with shape (None, 128, 128, 1) for input KerasTensor(type_spec=TensorSpec(shape=(None, 128, 128, 1), dtype=tf.float32, name='input_1'), name='input_1', description="created by layer 'input_1'"), but it was called on an input with incompatible shape (None, 128, 128, 3).

I applied #4 and #3 but still I have error.  Which function should be changed to make this pipeline compatible with my U-Net model?
Thank you so much.

Update: I reshape my input image as follows:
input_img =  io.imread('RatNeuron_5_666_Bw_2_5X.tif')
input_img = input_img.reshape((799,799,1))
And then could run the  Smoothly-Blend-Image-Patches function
But the prediction result is extremely changed.

First image is my input image.
Second image is the prediction result without using Smoothly-Blend-Image-Patches function.
Third image is the prediction result with Smoothly-Blend-Image-Patches function.

Hello @zyazdani-92,
Were you able to find any solution using the code from this repository or any other code for smooth blending?
My scenario is similar to yours - grayscale image and output have only 1 class (if we do not consider background). I am also having an issue while using this code. So, without using smooth blending, I am getting good enough output but edge artifacts, and if I use this smooth blending code, I am getting just blank output (all black or 0 pixels).
Any solution??

Hi @Mirzyaaliii
I used the method mentioned here instead of using smooth blending:
Adding geodesic information and stochastic patch-wise image prediction for small dataset learning

I will check it out. Thanks for your reply!!


Int64 and Float64

Side note, there's a LOT of repetitive code in this codebase. A proc macro would do this wonders.

A proc macro is probably too much, but I'm definitely interested in expanding the use of traits and regular macros!
I've been trying to be pretty cautious since I don't want to introduce fragile abstractions that we'll have to knock down as our understanding of the formats progress!

Looks good! I might go through and update the macro to use something like paste instead of a module, or maybe I'll refactor all of the types to be contained in modules and stop importing them.

I wasn't entirely sure how to make the macro, just that it needed one, that's why the syntax for it is so weird.


No code found

Module: 00
Lab/Demo: 13-bot-framework
Task: 00
Step: 00
It's me again, this time I noticed the below folder is empty. Empty as in, there is no code. I'm looking for Python code in particular.
https://github.com/MicrosoftLearning/AI-102-AIEngineer/tree/master/13-bot-framework

This is by-design - the lab instructions have you create the bot from the Bot Framework SDK template


why languages.toml and menus.toml are not merge ?

Hi;
I'm wondering why menus.toml and languages.toml are simply not just one file.
I means I think it would be easier to manage menus in one file only ?, no ?

This is not directly related to Academic. It's an update made by Hugo team.

@gcushen after few experimentation and thinking ;)
What you/we define in [menus, params and config].toml are related to the default language and become the fallback if you don't define it in languages.toml
an easy example is if title = "" is not define specificly for a language then it will use the title define by the default/fallback.


Change FT_SETSIZE on Windows

https://support.microsoft.com/en-us/kb/111855
From microsoft document, default FD_SETSIZE is 64.
64 is not good for fluentd like middleware, so setting larger value is better.
Above article also says "If an application is designed to be capable of working with more than 64 sockets, define the manifest FD_SETSIZE in every source file before including WINSOCK.H."
Setting FD_SETSIZE 1024 should work on windows.

Closed via https://github.com/tarcieri/cool.io/pull/59


Documentation

Update the documentation (=><EMAIL_ADDRESS>

@neocarto I think it is better to update the documentation in the main readme file first before expanding the observable examples. Thoughts?

Agree with that. My goal is to fix some bugs bugs, update the doc and release a 1.0 version. Then, add new features.

@neocarto Perhaps adding Changelog file might be a good idea to track these changes ?

@neocarto Am working on improving the usability and readability of documentation. Do you have a timeline for 1.0 release?

I have some tests to do. But I think my answer will be: asap 🤷♂

Great @neocarto
Am rewriting the docs using the same language and design of all plot docs. So it reads natural and feel familiar to anyone who are familiar with plot docs.


Entity Manager Installation Issues

Several new problems with the Entity Manager.

When installing v8 I got an error that a particular class could not be found. This was a migration tool class. I have the migration_tool package sitting in my packages/ directory – but it wasn't installed. Nothing was installed, because I was installing concrete5 for the first time. I believe the problem is that the entire src/ directory is being parsed – perhaps all the time, perhaps just on installation? But the package wasn't installed, so the autoloader wasn't working. I believe this is it, but maybe the issue is something else. Regardless you can reproduce by putting the migration tool package in the packages directory and installing concrete5.

There are errors when application/src does not exist. This shouldn't error out. We should just not load up the application entity manager if that's the case.

When deleting an install and reinstalling, I get an error:

File mapping drivers must have a valid directory path, however the given path [/Users/andrewembler/git/sjc/web/packages/migration_tool/src] seems to be incorrect!.
This is confusing, because I have removed migration tool from my packages directory – but the presence of the old package configuration for the entity manager in generated_overrides is killing my new installation.
Do we have to have this configuration? Can we perhaps use this configuration if the user needs to do something exotic and specify alternate annotations? Can we use sensible defaults and NOT have this kind of generated override configuration?
return array(     'metadatadriver' => array(         'packages' => array(             'annotation' => array(                 'legacy' => array(                     'migration_tool' => array(                         array(                             'namespace' => 'Concrete\\Package\\MigrationTool',                             'paths' => array(                                 '/packages/migration_tool/src',                                 '/packages/migration_tool/src/Concrete',                             ),                         ),                         array(                             'namespace' => 'PortlandLabs\\Concrete5\\MigrationTool',                             'paths' => array(                                 '/packages/migration_tool/src/PortlandLabs/Concrete5/MigrationTool',                             ),                         ),                     ),                 ),             ),         ),     ), );

@Kaapiii I'd appreciate it, if you had time, perhaps you could look into this?

I'll look into it.

Thanks!
On Fri, Jun 24, 2016 at 8:48 AM, Kaapiii<EMAIL_ADDRESS>wrote:

I'll look into it.
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
https://github.com/concrete5/concrete5/issues/3982#issuecomment-228382201,
or mute the thread
https://github.com/notifications/unsubscribe/AAgNwbmfIEWf8U5C5XHe1Nej_L3pEoIUks5qO_w8gaJpZM4I9vil
.

Issue 1.
I couldn't reproduce the described behaviour. I've done the following steps.

Download the installation *.zip from github.
Download the migration_tool from github and place it in the packages folder
Run the installation -> The installation was successful
Install the migration_tool, (Takes quite a long time on my machine, but the c5 installation does too.)

Did I miss something?
Issue 2.
The application/src folder will be created during the update from v7 to v8 and is already present in a new installation.But I can add an additional check. If the application/src folder doesn't exist, it wouldn't be loaded.
Issue 3.
Removing and reinstalling of migration_tool worked fine.
Only deleting the package_xy directory from the packages directory won't remove the config. If this is a requirement, I'll have to add the checks for the packages folders and the package controller classes to the EntityManagerConfigFactory. However, this check will  eliminate the justification of the metadata being stored in a config file.
The alternative way to handle the setup of the DriverChain would be to loop through all installed packages with Doctrine DBAL Query and add the correct MetadataDriver to the DriverChain. With this solution, we might run into similar caching issues like the discussion about caching the routes #3336.
The only purpose of the metadata beeing stored in the config file was caching.

@aembler  Asside from the DIRECTORY_SEPARATOR my config file is identical to yours.
/* application/config/generated_overrides/database.php*/
return array(
    'metadatadriver' => array(
        'packages' => array(
            'annotation' => array(
                'legacy' => array(
                    'migration_tool' => array(
                        array(
                            'namespace' => 'Concrete\\Package\\MigrationTool',
                            'paths' => array(
                                '\\packages\\migration_tool\\src',
                                '\\packages\\migration_tool\\src\\Concrete',
                            ),
                        ),
                        array(
                            'namespace' => 'PortlandLabs\\Concrete5\\MigrationTool',
                            'paths' => array(
                                '\\packages\\migration_tool\\src\\PortlandLabs\\Concrete5\\MigrationTool',
                            ),
                        ),
                    ),
                ),
            ),
        ),
    ),
);

Regarding issue number 1: You are correct; this isn't the case. It's actually just an extension of the third issue. To reproduce:

Install concrete5
Install migration tool
Delete application/config/database.php
Reinstall concrete5

That'll get you the error. It's basically because we're trying to use that config file which has paths in it that are no longer relevant to the new installation.

I see. But if application/config/database.php is deleted, then generated_overrides/database.php should be to, shoudn't it.

Not necessarily – granted...this is likely a pretty edge case in general,
but when I reinstalled sites I typically just delete
application/config/database.php
Of course, the concrete5 command line reset utility deletes the entire
directory, which is good.
On Fri, Jun 24, 2016 at 2:02 PM, Kaapiii<EMAIL_ADDRESS>wrote:

I see. But if application/config/database.php is deleted, then
generated_overrides/database.php should be to, shoudn't it.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/concrete5/concrete5/issues/3982#issuecomment-228461220,
or mute the thread
https://github.com/notifications/unsubscribe/AAgNwYK2K5Syk6QfBs2NGRoVCtlWnQ1hks5qPEXngaJpZM4I9vil
.

#3987 I've updated the EntityManagerConfigFactory and the related UnitTests.
@aembler The mapping information for packages and the application folder which contain invalid folder paths is now ignored. If you delete application/config/database.php and remove all packages with entities there won't be an exception. So the reinstallation concrete5 should work.
If you however only delete the database.php file, without removing the packages containing entities the installation still will error out (That's how it works).
If some developer has trouble with some packages and needs to remove them from the packages folder in order to get the website up and running again, the EntityManagerConfigFactory will ignore the stored mapping information in the config file and skip the addition to the DriverChain.
However, the clean way would still be to delete the generated_overrides folder or at least the generated_overrides/database.php file. With this solution, no such error will cure.
Let me know if the solution satisfies your intital request.

@Kaapiii Thanks. I have merged this. I still didn't like the behavior of it erroring out if you left the package in place, but it occurred to me that that was probably more a fault of the installation routine not ensuring a clean environment than it was the fault of the entity manager configuration. So I modified installation to remove the doctrine proxy directory and the generated_overrides/ directory during installation, and this has done the trick.

That's quite a smart solution. I haven't thought of adding the cleanup to the installation routine. Thanks for merging this.


Improve Rating History/Scrimmaging Record Performance

Take a look at this pull request's code to find a more efficient way to compute rating history via querysets / subqueries
https://github.com/battlecode/galaxy/pull/558

For a bit of context on how bad my first pass implementation was, here's the current hook for getting the top 10 teams' rating histories:

We absolutely need a separate endpoint that does this all in a django query and returns the rating history for the top 10... then probably revert the API to only take a single team id for the regular case? We can discuss further


Fix server "Bad file descriptor" error under gevent 1.1, #170

In gevent 1.1, underlying socket is closed when WSGI handler returns, so we need to keep WSGI handler runing until websocket handler returns.
https://github.com/gevent/gevent/issues/633

#170

Thank you!
Patch does what it says :)

I am seeing the event error at the moment - is there a timeframe for this getting merged?

Yeah ... I'm getting the same error using gevent 1.1.1. This patch seems to work, too.  @Lawouach, is there a chance this can get merged or a similar solution implemented?

@Lawouach  Can we have this merged and maybe have a new release? I could produce cross py2/3 version of my channelstream server.

Hello,
Sorry for being so silent. I'm not available to work on this before early June. I will do then (ping me if I don't).
Until then, I've merged the change.
Thanks all.

@Lawouach Thanks, the fact that its merged helps a lot already, can't you just release the 0.3.5 in its current state, or there are some blockers?

No blockers IIRC. But I'm in the middle of nowhere for one more week :)

@Lawouach Have fun then!

Bumping for release :-)

Done ;)


Page Directory is incorrect

Describe the bug
From Explore more page when clicking back on testimonials or any other button on navbar except home ...it is redirecting it to home page only and not the respective page when clicked!
It must be corrected
To Reproduce
Steps to reproduce the behavior:

Go to 'home page'
Click on 'explore more'
click on testimonials
The error is is that it will bring back to home page and not the testimonial section directly

Expected behavior
Instead upon clicking testimonials or about or any other item in the navbar except home page must redirect to that particulate section of home page only and not the home page!
Screenshots

Desktop (please complete the following information):

OS: Windows
Browser chrome
Version i5

can you please assign me under GSSOC.'24 .


Social share images not working

Love this repo, thanks for putting it together!
I'm using the social share generator code for my own site, pretty much as-is from yours with paths to my dist directory changed. All runs fine locally. But on Netlify I get this when it tries to spawn a browser:
12:43:04 PM: (node:1381) UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process!
12:43:04 PM: [1392:1392:1008/114304.556246:ERROR:browser_main_loop.cc(1426)] Unable to open X display.

Is yours definitely working as-is? I have locked to exactly the same versions in package.json.

Hi @nickdunn - yes, I actually use this on two other properties and I just re-ran the deploy of this site since it publishes itself to Netlify as well and here is a successfully generated image.
A search turned up that you may have to explicitly set headless: true (line 11 in the original script) - let me know if that resolves it!

A search turned up that you may have to explicitly set headless: true (line 11 in the original script) - let me know if that resolves it!

That fixed it! I changed headless: chromium.headless to headless: true and we're rockin' and rollin'. Thanks for the heads up :-)