text:
Build ci

This PR adds an automated build pipeline that publishes the UF2.

We should consider adding pipelines that publish the GDS binary for each major OS.
As I mentioned in the issue, I had intended to use the composite action from the fprime-community builder but I quickly realized that I would be unable to specify the rpipico build target (unless I'm missing something?). It's OK though, replacing the composite action only adds a single step.
Satisfies #5.

Interesting Interesting! Great stuff!
Just wondering, why can't we specify rpipico or where exactly would it need to be implemented? I'm not too familiar with CI but it seems like we could create an option and append to the fprime-util and fprime-generate?

@Lex-ari
You know, you're right. I should use the opportunity to contribute to the fprime-community rather than just leaving it for someone else to do. Thanks for pushing me.
I've put up a PR to the builder fprime-community/project-builder#1. While we're waiting on a review, do you think this is good enough to merge? Using the fprime-community builder in the future is not a big change and we can always add it later.

authors: Lex-ari nateinaction

repo: proveskit/fprime-proves


text:
Submission to the Official Ports Tree?

Do you have plans to submit this to the official ports tree?  If not, would you be opposed to someone else doing that?

act-runner.diff.txt
Attached a diff against the main ports tree with a bunch of hardcode clean-ups.  Let me know if this still works in your use cases, I've tried to preserve that structure, but making portlint happy.

I don't have time to add it to ports right now. If you've got the time to do that, feel free.

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275129

source: gharchive/issue

authors: arcanumbridge psa

repo: psa/act-runner-freebsd-port

license_type: permissive

license_source: github-api


text:
i cant ignore custome hook

this is my code:
<plugins>
    <pluginClass class="PsalmWordPress\Plugin">
        <useDefaultHooks value="true" />
        <requireAllParams value="false" />
        <hooks>
            <HookNotFound errorLevel="suppress" />
        </hooks>
    </pluginClass>
    <pluginClass class="Psl\Psalm\Plugin"/>
</plugins>

i get this error:
ERROR: HookNotFound - inc/normalize.php:106:5 - Hook "wpcf7_autop_or_not" not found
add_filter('wpcf7_autop_or_not', '__return_false');

For context: I haven't worked on this plugin in a while, so my memory is hazy.
I think you might need to generate the stubs for CF7's hooks following this schema. Maybe providing the path to plugin might help.
For this filter, it would look like this (untested):
{
	"$schema": "https://raw.githubusercontent.com/wp-hooks/generator/0.9.0/schema.json",
	"hooks": [
		{
			"name": "wpcf7_autop_or_not",
			"file": "includes/functions.php",
			"type": "filter",
			"doc": {
				"description": "Returns true if wpcf7_autop() is applied.",
				"long_description": "",
				"long_description_html": "",
				"tags": [
					{
						"name": "param",
						"content": "",
						"types": [
							"bool"
						],
						"variable": "$autop"
					},
					{
						"name": "param",
						"content": "",
						"types": [
							"array",
							"string"
						],
						"variable": "$options"
					}
				]
			},
			"args": 2
		}
	]
}

authors: Mohammad-Ravand mcaskill

repo: psalm/psalm-plugin-wordpress

license: MIT


text:
Additional properties to Person, ref #961

Adds email, PSU id, and Orcid id to the Person model so we can store
these values when users want to add them.

Coverage increased (+0.3%) to 74.542% when pulling 65f2cbb42d988cfbc6760f51a2eac726c90b552b on user-object-961 into 917d4bd1f0066459cd771e39e8812a5f756a0da2 on develop.

@cam156 I took a look at the coveralls changes, and the missing coverage doesn't seem to be related to any of the changes in this PR.

Coverage increased (+0.3%) to 74.497% when pulling cc52a2b73ef48a8f43b7b8377f2c487db503f641 on user-object-961 into 081b49e0d0c915a7c5f00a77026b856fbb136652 on develop.

Coverage increased (+0.3%) to 74.497% when pulling cc52a2b73ef48a8f43b7b8377f2c487db503f641 on user-object-961 into 081b49e0d0c915a7c5f00a77026b856fbb136652 on develop.

@cam156 oohhh-kay.... now it says coverage increased. I rebased it, so maybe that was it.

source: gharchive/pull-request

authors: awead coveralls

repo: psu-stewardship/scholarsphere


text:
Can't call OpenScreen

OpenScreen can't be called in Unity's button components because of unrecognizable params.

See 04bfd393fbc5b9983ab42aa931c99f8935af8734.
Resolves method that can't be called in Unity's UI Engine.


text:
fix(VsFocusTrap): remove focuses on the first element

Type of PR (check all applicable)

[x] Fix Bug (fix)

Summary
focus trap이 감싸고 있는 영역으로 keyboard navigation focus를 가져오는 방식을 변경합니다
Description
기존에는 첫번째 focusable 요소에 focus를 줬지만 이 방식은 스크롤링 이슈가 발생할 수 있어 수정합니다

스크롤링 이슈가 발생할 수 있다는 뜻이 어떤 의미인가용..?

첫번째 focusable 요소가 하위에 있어서 스크롤해야 보이는 경우 vs-focus-trap이 열리는 순간 스크롤이 튕기게 돼요

repo: pubg/vlossom


text:
Split docs pages

Split the PMP docs into 2 sections: Users guides and Developer docs.  Attempt to preserve old link structure by maintaining most dev stuff under the "/docs" directory.

:ship: :it:

license: mit

license_source: bigquery


text:
Support for Laravel 9

Hi, wondering if L9 support is coming..

It's being pushed now.

authors: TechnicallyGio publiux

repo: publiux/laravelcdn


text:
eslint error no-undef for looping variable

With regular React JSX syntax, I write like this:
{Object.values(children).map(child => (
  <Tab
    key={child.id}
  >
    <ChildDetails child={child} />
  </Tab>
))}

With pug syntax, I write like this:
each child, i in Object.values(children)
  Tab(
    key=i
  )
    ChildDetails(child=child)

For me, pug syntax looks better in terms of legibility, but I get eslint error no-undef for iterator variable (child).
For now, I should disable eslint temporarily using /* eslint-disable no-undef */ right before return statement in render function.
Can we make it pass eslint without this extra line of disabling eslint rule?
UPDATE: This is intermittent - it happens sometimes and doesn't happen other times.

There are several other issues and even some docs about configuring eslint.

@ForbesLindesay Can you give me more specific information (e.g., link)? I already tried search but could not find - that's why I opened this issue here.

Perhaps I was not clear enough in my description. I'm getting no-undef eslint error for looping variable (not for pug indicator).

Ah, you shouldn't get that. Are you linting the code before compiling, or after? Are you using eslint-plugin-react-pug? I wonder if it could be a bug in https://github.com/ezhlobo/pug-uses-variables (If so, you could try and narrow it down to a test case and open an issue there)

Yes, I'm using eslint-plugin-react-pug. Not sure if the linting occurs before/after compilation. I don't use pug-uses-variable (and don't know how to use that).

Here are my dot files.
.babelrc
{
  "presets": [
    "react-app"
  ],
  "plugins": [
    "transform-decorators-legacy",
    "transform-react-pug"
  ]
}

.eslintrc
{
  "extends": ["airbnb-base", "plugin:react-pug/all", "prettier"],
  "plugins": ["prettier", "react-pug"],
  "env": {
    "browser": true
  },
  "rules": {
    "prettier/prettier": [
      "error",
      {
        "singleQuote": true
      }
    ],
    "class-methods-use-this": "off"
  },
  "settings": {
    "import/resolver": {
      "webpack": {
        "config": {
          "resolve": {
            "modules": ["src"]
          }
        }
      }
    }
  }
}

@ezhlobo do you have any suggestions here?

Give me few hours to reproduce that
//CC @artificis @ForbesLindesay

@artificis

This is intermittent - it happens sometimes and doesn't happen other times.

This makes my investigation almost impossible. I was not able to reproduce such behavior, and I have no idea how it can happen.
It would be great if you could set up a sample project with the same behavior, so I'll be able to debug.
PS. What do you think about creating a separate issue for this in ezhlobo/eslint-plugin-react-pug, because it's more likely related to prettier and eslint than to this babel-plugin.

Will do

authors: ForbesLindesay artificis ezhlobo

repo: pugjs/babel-plugin-transform-react-pug


text:
file missing

Seems the file mail_compose.html is missing. This is the link when in inbox.html and pressing reply.
does it exist or is it removed for some reason from the repo.
Alex

Remove it and add compose functionalities here https://github.com/puikinsh/gentelella/pull/133

authors: aplanting christianesperar

repo: puikinsh/gentelella


text:
JSON Comments/Suggestions

Congrats Harold.
I saw the updates, send/receive JSON looks straightforward.
You might want to add another key/value pair for speed as well.
Not sure how that would look, but maybe something like this.
{ "dir":"FL","speed":50}
Direction would be Forward Left
Speed would be 50% of maxSpeed
dir values FR = Forward Right, FC=Forward Center, FL=Forward Left
dir values CR = Center Right, CL=Center Left
dir values BR=Backwards Right,BC=Backwards Center,BL=Backwards Left
dir values RR=Rotate Right, RL=Rotate Left
add the key/value pair of timeMs for duration to do the command.
add the key/value pair of claw for position.
example {"claw":"open","claw":"closed"} or {"claw":0} or {"claw:",100} the 0,100 are percent opened. 100=Full Opened

We are gonna have do something more than this.  I am writing up a retro, so that we can do a lessons learned sorta thing and make plans to make both HugoBot and JimBot better.

repo: pulcher/HugoBot


text:
Test lib-sftp-staging

Test bibdata connection to lib-sftp-staging1
related to https://github.com/pulibrary/ops-catchall/issues/4

@kayiwa @mzelesky and I have tested the alma and almasftp account connection to lib-sftp-staging1.We were able to send files from the Alma sandbox to lib-sftp-staging1.
Events were created in bibdata-staging but no files were transferred.
@christinach is looking into why files were not transferred from lib-sftp-staging1 to bibdata-staging

Will revisit this next week (12/19/22) and follow up with @kayiwa

@kevinreiss thank you. I postponed looking into this issue because of the long Orangelight sprint + Holidays time.

Francis asked to work with folks on this the week of 4/3.

Updates from the meeting today in https://docs.google.com/document/d/1Tyaltv3JWkfcu-SiROfGAEEso7ynMpugUM_wzQjP3ng/edit

https://bibdata-staging.princeton.edu/dumps/1165.json the files were transferred successfully from lib-sftp-staging1 to bibdata-staging. Additionally to the previous updates in the playbook , restaring the workers and deploying the app to bibdata-staging helped to fix the last honeybadger issue and trasfer the files from lib-sftp-staging1 to bibdata-staging.

authors: christinach kevinreiss

repo: pulibrary/bibdata


text:
Contact info needed

The new site needs some sort of contact info  -- Someone to write to if the site is not operating, or you
have a question, etc.  Otherwise, one might assume that an AI robot controlls it and there’s no there, there.
The two Steves would be okay for this --  Steve Knowlton and Steve F

Put in About page


text:
Fix Geoblacklight document generation

Closes #890

Looks good, the slug spec is now a lot cleaner too.

authors: eliotjordan tampakis

repo: pulibrary/plum


text:
construct Parser from Events, or the ability to push and pop to and from the iterator

Is there a way to reconstruct Parser from Events? Like directly manipulate and add nodes to the AST. And how easy would it be to implement it?
I'm trying to write a piece of code that adds some kind of TOC to a markdown file and the only way I can think of currently is to just filter out the old list from the String and concatenate the new one.

There is not a direct way of doing that, especially because the parser is incremental and to do that the whole document should be parsed first.
One manner of doing that is collecting the things you want to change in a loop until exhausting the iterator and after that applying the modifications to the document you want using the ranges.
Another manner would be creating another MD from the events and then creating another parser for the new MD.
To manipulate the AST it is easier to use https://github.com/wooorm/markdown-rs or https://github.com/kivikakk/comrak.

I've seen both packages but went with pulldown-cmark since it's the most popular. I think I'll close this issue and watch if this ever gets into the scope of the project.
Thanks you :)

repo: pulldown-cmark/pulldown-cmark


text:
Permit x-repo triggers

When testing cross-repo dispatch where an action in pulumi-terraform-bridge is supposed to call and start an action in pulumi-aiven, I noticed that the dispatch event is quietly being lost. I think the piece edited here is the missing configuration to get this working.

Ah nvm, this is called repository_dispatch. Ignore this while I peruse the docs.
  repository_dispatch:
    types:
      - pulumi-cli

repo: pulumi/ci-mgmt


text:
Suggestion: "component" mode

My application is composed of numerous Kubernetes manifests, each of which may be understood as a component of the application.  For example, I have certmanager.yaml and webapp.yaml.  I'd like to generate a pulumi.ComponentResource for each of the components, that I can assemble into a whole application using index.ts.
Affected feature
Please enhance the generator with a component mode, which wraps the generated statements in a pulumi.ComponentResource.   Some specific suggestions:

Declare each sub-resource as a field of the component resource.
Generate an Args interface for the component resource.

For example, here's a hypothetical snippet of generated code for cert-manager.yaml.
export class CertManager extends pulumi.ComponentResource {
    private readonly certManagerNamespace: kubernetes.core.v1.Namespace;
    private readonly cainjectorServiceAccount: kubernetes.core.v1.ServiceAccount;
    private readonly managerServiceAccount: kubernetes.core.v1.ServiceAccount;
    // ...

    constructor(name: string, args: CertManagerArgs, opts?: pulumi.ComponentResourceOptions) {
        super("CertManager", name, {}, opts);

        this.certManagerNamespace = new kubernetes.core.v1.Namespace("cert_managerNamespace", {
            apiVersion: "v1",
            kind: "Namespace",
            metadata: {
                name: "cert-manager",
            },
        }, { parent: this });

        // ...
    }
}

export interface CertManagerArgs {
}

Development for converting Kubernetes manifests to Pulumi programs has moved over to: https://github.com/pulumi/pulumi-converter-kubernetes.
This enhancement has been addressed in the Kubernetes converter plugin.

authors: EronWright rquitales


text:
When importing self-managed certificate to ACM, remove the validationMethod from the code and don't show warning

From: #4046
When you import a self-managed certificate into Pulumi, the validationMethod is set to NONE (as it should be) but the provider sees this as invalid.
The code generated looks like this (typescript example):
const my_cert = new aws.acm.Certificate("my-cert", {
  domainName: "test.pierskarsenbarg.com",
  keyAlgorithm: "RSA_2048",
  options: {
      certificateTransparencyLoggingPreference: "DISABLED",
  },
  subjectAlternativeNames: ["test.pierskarsenbarg.com"],
  validationMethod: "NONE",
}, {
  protect: true,
});

and you get a warning that looks like this:
aws:acm/certificate:Certificate resource 'my-cert' has a problem: expected validation_method to be one of ["EMAIL" "DNS"], got NONE. Examine values at 'my-cert.validationMethod'.

which is only technically correct, as in the case of self-managed certificates there doesn't need to be a validationMethod input.
My suggestion: don't include validationMethod input in the import code and hide the warning.

Thanks for this issue @pierskarsenbarg
Relevant code extracts from certificate.go:
certificateValidationMethodNone = "NONE"

func certificateValidationMethod(certificate *types.CertificateDetail) string {
	if certificate.Type == types.CertificateTypeAmazonIssued {
		for _, v := range certificate.DomainValidationOptions {
			return string(v.ValidationMethod)
		}
	}

	return certificateValidationMethodNone
}

func resoruceCertificateRead() {
      ...
	d.Set("validation_method", certificateValidationMethod(certificate))
}

type ValidationMethod string

// Enum values for ValidationMethod
const (
	ValidationMethodEmail ValidationMethod = "EMAIL"
	ValidationMethodDns   ValidationMethod = "DNS"
)

"validation_method": {
        Type:             schema.TypeString,
        Optional:         true,
        Computed:         true,
        ForceNew:         true,
        ValidateDiagFunc: enum.Validate[types.ValidationMethod](),
        ConflictsWith:    []string{"certificate_authority_arn", "certificate_body", names.AttrCertificateChain, names.AttrPrivateKey},
},

It seems to be just something that upstream does.
This is a special variation of https://github.com/pulumi/pulumi-terraform-bridge/issues/1225 stemming from TF being more lax about Read results than is needed for Pulumi import to succeed.
It might be interesting to include an automatic correction pass in the bridge that would remove optional properties from the Read() result IFF they fail to pass ValidateDiagFunc.

repo: pulumi/pulumi-aws


text:
aws.amplify.DomainAssociation always wants to update despite no changes

Describe what happened
Pulumi always thinks my code has had a certificateSettings key removed from the DomainAssociation arguments.
The problem is fixed by adding certificateSettings: { type: 'AMPLIFY_MANAGED' } to the DomainAssociation arguments.
Sample program

The code:
import * as pulumi from '@pulumi/pulumi'
import * as aws from '@pulumi/aws'

const config = new pulumi.Config()

const githubRepo = 'james-tindal/game-of-life'
const githubToken = config.requireSecret('github-access-token')

const amplifyApp = new aws.amplify.App('amplify-game-of-life', {
  name: `game-of-life.jamestindal.co.uk`,
  repository: `https://github.com/${githubRepo}`,
  accessToken: githubToken,
  buildSpec: `
    version: 1
    frontend:
      artifacts:
        baseDirectory: src
        files:
          - '**/*'
  `
})

const mainBranch = new aws.amplify.Branch('amplify main branch', {
  appId: amplifyApp.id,
  branchName: 'main'
})

const domainAssociation = new aws.amplify.DomainAssociation('domain association', {
  appId: amplifyApp.id,
  domainName: 'jamestindal.co.uk',
  subDomains: [{
    branchName: mainBranch.branchName,
    prefix: 'game-of-life',
  }],
  waitForVerification: true
})

Log output
pulumi preview:

pulumi preview --diff:

Affected Resource(s)
aws.amplify.DomainAssociation
Output of pulumi about

CLI
Version      3.123.0
Go Version   go1.22.5
Go Compiler  gc

Plugins
KIND      NAME    VERSION
resource  aws     6.44.0
resource  aws     6.44.0
resource  awsx    2.13.0
resource  awsx    2.13.0
resource  docker  4.5.4
resource  docker  4.5.4
resource  docker  3.6.1
resource  docker  3.6.1
language  nodejs  unknown

Host
OS       darwin
Version  14.5
Arch     x86_64

This project is written in nodejs: executable='/usr/local/bin/node' version='v22.4.1'

Backend
Name           pulumi.com
URL            https://app.pulumi.com/uJEmLiaoJzSIsPRHtHQynpXoYqP5b4sMeLmhJywZ
User           uJEmLiaoJzSIsPRHtHQynpXoYqP5b4sMeLmhJywZ
Organizations  uJEmLiaoJzSIsPRHtHQynpXoYqP5b4sMeLmhJywZ
Token type     personal

Pulumi locates its logs in /var/folders/_8/k71zvsq96fz4rvtrdyygkhx00000gp/T/ by default
warning: Failed to get information about the Pulumi program's dependencies: could not find either /Users/user/code/james-tindal.co.uk/yarn.lock or /Users/user/code/james-tindal.co.uk/package-lock.json
warning: Failed to get information about the current stack: No current stack

Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@james-tindal thanks for bringing this to our attention. I've been able to repro this and confirm that this is only an issue with Pulumi (Terraform does not have this issue).
I also tried this with PlanResourceChange which did not fix the issue.
Note: If you want to try and reproduce this you will need a real domain (domain_name) and will have to manually add the CNAME records while the domain association is creating.
https://github.com/hashicorp/terraform-provider-aws/blob/c1277a5b4f3c4c9d6e04b83805809dcd26e7d1e5/internal/service/amplify/domain_association.go#L52-L74

Terraform code:
locals {
  github_repo  = ""
  github_token = ""
  domain_name = ""
}

resource "aws_amplify_app" "example" {
  name         = "game-of-life.${local.domain_name}"
  repository   = "https://github.com/${local.github_repo}"
  access_token = local.github_token
  build_spec   = <<-EOT
    version: 1
    frontend:
      artifacts:
        baseDirectory: src
        files:
          - '**/*'
  EOT
}

resource "aws_amplify_branch" "example" {
  app_id      = aws_amplify_app.example.id
  branch_name = "main"
}

resource "aws_amplify_domain_association" "example" {
  app_id      = aws_amplify_app.example.id
  domain_name = local.domain_name
  sub_domain {
    branch_name = aws_amplify_branch.example.branch_name
    prefix      = "game-of-life"
  }
  wait_for_verification = true
}

grpc logs:
{
  "method": "/pulumirpc.ResourceProvider/Diff",
  "request": {
    "id": "dwe82rhfivmh8/corymhall.com",
    "urn": "urn:pulumi:dev::pulumi-typescript-app::aws:amplify/domainAssociation:DomainAssociation::domain association",
    "olds": {
      "appId": "dwe82rhfivmh8",
      "arn": "arn:aws:amplify:us-east-2:616138583583:apps/dwe82rhfivmh8/domains/corymhall.com",
      "certificateSettings": {
        "certificateVerificationDnsRecord": "_38981cc15793fe1fa9d171106734e757.corymhall.com. CNAME _d7b11b54b4354db45e28cb990e01cdc2.sdgjtdhdhz.acm-validations.aws.",
        "customCertificateArn": "",
        "type": "AMPLIFY_MANAGED"
      },
      "certificateVerificationDnsRecord": "_38981cc15793fe1fa9d171106734e757.corymhall.com. CNAME _d7b11b54b4354db45e28cb990e01cdc2.sdgjtdhdhz.acm-validations.aws.",
      "domainName": "corymhall.com",
      "enableAutoSubDomain": false,
      "id": "dwe82rhfivmh8/corymhall.com",
      "subDomains": [
        {
          "branchName": "main",
          "dnsRecord": "game-of-life CNAME d1vk7opjtvrijc.cloudfront.net",
          "prefix": "game-of-life",
          "verified": true
        }
      ],
      "waitForVerification": true
    },
    "news": {
      "__defaults": [
        "enableAutoSubDomain"
      ],
      "appId": "dwe82rhfivmh8",
      "domainName": "corymhall.com",
      "enableAutoSubDomain": false,
      "subDomains": [
        {
          "__defaults": [],
          "branchName": "main",
          "prefix": "game-of-life"
        }
      ],
      "waitForVerification": true
    },
    "oldInputs": {
      "__defaults": [
        "enableAutoSubDomain"
      ],
      "appId": "dwe82rhfivmh8",
      "domainName": "corymhall.com",
      "enableAutoSubDomain": false,
      "subDomains": [
        {
          "__defaults": [],
          "branchName": "main",
          "prefix": "game-of-life"
        }
      ],
      "waitForVerification": true
    }
  },
  "response": {
    "stables": [
      "appId",
      "domainName"
    ],
    "changes": "DIFF_SOME",
    "diffs": [
      "certificateSettings"
    ],
    "detailedDiff": {
      "certificateSettings": {
        "kind": "UPDATE"
      },
      "certificateSettings.type": {
        "kind": "DELETE"
      }
    },
    "hasDetailedDiff": true
  },
  "metadata": {
    "kind": "resource",
    "mode": "client",
    "name": "aws"
  }
}

authors: corymhall james-tindal


text:
preview failed gcp:container:Cluster timeout

Problem description
I created a stack at GCP and implemented a ci/cd pipeline with Gitlab.
Every time the runner fails with a timeout. Tested the script on my mac and it works perfectly.
My gitlab-ci.yml is attached.
Errors & Logs
Diagnostics:       pulumi:pulumi:Stack (n1000-10-staging):         error: preview failed       gcp:container:Cluster (gke-cluster):         error: Preview failed: refreshing urn:pulumi:staging::XXX::gcp:container/cluster:Cluster::gke-cluster: Error reading Container Cluster "gke-cluster-XXX": Get https://container.googleapis.com/v1beta1/projects/XXX/locations/europe-west3/clusters/gke-cluster-XXX?alt=json&prettyPrint=false: Get http://XXX.XXX.XXX.XXX/computeMetadata/v1/instance/service-accounts/default/token?scopes=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcompute%2Chttps%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud-platform%2Chttps%3A%2F%2Fwww.googleapis.com%2Fauth%2Fndev.clouddns.readwrite%2Chttps%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdevstorage.full_control: dial tcpXXX.XXX.XXX.XXX:80: i/o timeout

This issue is 4 years old and contains no repro. Nobody has commented on it ever since. I don't think it's actionable for us. I'll assume it was some configuration issue, or the underlying issue has been fixed since.

authors: aexei mikhailshilkov

repo: pulumi/pulumi-gcp


text:
Warning for people who have Javascript turned off

For people who have Javascript turned off, the interface is going to work really badly. We should put a warning somewhere.

This was fixed a long time ago: https://github.com/pump-io/pump.io/blob/2b6cadd1b0c3778fb7d3fd207c9e201c1fdab8a9/public/template/javascript-disabled-client.jade

authors: evanp strugee


text:
Multi GPU and Multi Node solution

I wanted to know how to use Multi-GPUs and Multi-Node solutions with the current Punica code and how to use.
Also wanted to know about the runner and scheduler code which is mentioned in the paper, is it implemented can you guide me about that.

@abcdabcd987 Your paper states Punica implementations consist of two parts: a Python li- brary on top of PyTorch that runs large language models on a single GPU and other system components to support model serving across a GPU cluster.
Was looking for solution with a GPU cluster, Multi GPU or Multi GPU Nodes

Hey @abcdabcd987 any update on this?

+1

Sorry, I still hasn't got time to clean up the code. But here's some old code if you need it right now:

Tensor-parallel: https://github.com/punica-ai/punica/tree/stash-tensor-parallel
Cluster scheduler and streaming API server: https://github.com/abcdabcd987/punica-server-experimental

Both are not usable out-of-box.

repo: punica-ai/punica


text:
Re-enable BiDi tests on macos for Firefox

https://github.com/puppeteer/puppeteer/pull/10121 disabled macos tests for Firefox
https://bugzilla.mozilla.org/show_bug.cgi?id=1832778 was filed but we have issues to reproduce the issue on our side.
We landed an extended timeout to monitor navigations at https://bugzilla.mozilla.org/show_bug.cgi?id=1816538 which should hopefully be in Firefox Nightly relatively soon.
We should see if this helps and allows to re-enable the tests.

Sadly we had to backout the patch as it caused more intermittents on our CI. I will close the issue for now as I don't have a good way for puppeteer to change the timeout, I can reopen once we figured this out.

Yesterday we landed a patch at https://bugzilla.mozilla.org/show_bug.cgi?id=1832891, which should hopefully stick. Let's see if this helps with this issue.

It looks like Firefox BiDi tests on macos timeout frequently https://github.com/puppeteer/puppeteer/actions/runs/5321130027/jobs/9637613731?pr=10423
  14) Frame specs
       "before all" hook in "Frame specs":
     Error: Timeout of 10000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/runner/work/puppeteer/puppeteer/test/build/frame.spec.js)
      at createTimeoutError (/Users/runner/work/puppeteer/puppeteer/node_modules/mocha/lib/errors.js:498:15)
      at Hook.Runnable._timeoutError (/Users/runner/work/puppeteer/puppeteer/node_modules/mocha/lib/runnable.js:431:10)
      at Timeout.<anonymous> (/Users/runner/work/puppeteer/puppeteer/node_modules/mocha/lib/runnable.js:246:24)
      at listOnTimeout (node:internal/timers:569:17)
      at processTimers (node:internal/timers:512:7

saw a similar error for the page spec in the previous runs

Which code in Puppeteer is running at this time? What does it wait for?

It waits for the browser to launch.

If there is a specific test which is failing all the time could we test with a longer timeout and trace logs enabled? I would really like to know what's causing the slowness. With the default logs we sadly don't see anything.

authors: OrKoN juliandescottes whimboo

repo: puppeteer/puppeteer


text:
Minor bug: bad screenshot path says "Unsupported screenshot mime type: null"

Puppeteer gives a bizarre error message when the path to which you try to write a screenshot is bad: Unsupported screenshot mime type: null
The file path is not a mime type issue.
This was previously reported as #3629, but the original reporter closed the report following self diagnosis.
I believe that this is because the file's extension is being used to auto-detect the desired mime type, and I had not set the extension initially.

Your file path needs to terminate with a image mime-type
Example: /path/to/screenshot**.png**
screenshot.png will be the name of screenshot ;)

yes, thanks, that's what i said in my issue

I believe that this is because the file's extension is being used to auto-detect the desired mime type, and I had not set the extension initially.

that's actually not correct behavior.  mime types are not inferred from file extensions.
also, this error message is badly wrong

In my case, an attempted filename contained a special character not supported by the file system, while the entire filename did indeed end with '.png'. The issue had nothing to do with mime type.
I post here to confirm that this error message can indeed be misleading.

This issue is still good.
Stale bot is a terrible practice

This issue is still good.
Stale bot is a terrible practice.

God damn I hate keeping 3-4 tickets open a day because their authors make
the mistake of running stalebot
On Tue, Aug 30, 2022, 10:24 AM stale[bot] @.***> wrote:

We're marking this issue as unconfirmed because it has not had recent
activity and we weren't able to confirm it yet. It will be closed if no
further activity occurs within the next 30 days.
—
Reply to this email directly, view it on GitHub
https://github.com/puppeteer/puppeteer/issues/4395#issuecomment-1231953704,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAS5KRSIXG4PWZO7Q3TOJTV3Y7TTANCNFSM4HLBRZEQ
.
You are receiving this because you authored the thread.Message ID:
@.***>

I agree with @StoneCypher . Configuring a github project to auto-close issues due to neglect is a poor choice that can only lead to additional neglect. Let issues stay open until a human processes them.
However, let's not use the Good Lord's name in vain to emphasize our frustration. You can communicate the same message, just as strong, without being a fucking jackass. For example, I could have said this instead: "You can communicate the same message just as strong, without using profanity".

Did I just get religiously shamed on GitHub by someone who feels confident calling strangers "fucking jackass?"
That sure is the way to get moral authority about being polite 😂

Oh my, someone who just called me "a fucking jackass" in public also wants me to not use profanity.
And they want me not to use their religion's god's name in vain.
I wish religious folks would try to keep their abusive behaviors, and their demands for strangers to follow their religious beliefs, out of professional spaces.  This is disgraceful.
You cannot achieve moral authority, Lonnie, by demanding other people not do the thing you yourself are doing.
Please keep your religion to yourself, in the future.  It's not interesting to me if you take moral tips from a bronze age book, and I have no interest in being scolded by a stranger who can't follow their own rules.
No, Lonnie, you don't agree with me.  My position does not support publicly abusing strangers, swearing at them, or making demands that they honor my personal religion.

isnt it already fixed?

Your file path needs to terminate with a image mime-type
Example: /path/to/screenshot .png
screenshot.png will be the name of screenshot ;)

Thanks! Works for Playwright too, which has a page.screenshot feature which can also throw mime type: null.

Not reproducible in the latest versions.

authors: Choco-milk-for-u Lonniebiz OrKoN StoneCypher Yokutto vhscom


text:
[Bug]: page.#timeoutSettings is not accessible anymore

Bug description
I used to rely on page._timeoutSettings but it was turned into a private field when upgrading my puppeteer version. Would it be possible to add a getter so I can still get it? I can even make a PR for it if you want.
Thanks in advance!
Puppeteer version
17.1.1
Node.js version
v14.19.3
npm version
6.14.17
What operating system are you seeing the problem on?
Linux, macOS, Windows
Relevant log output
No response

Thanks for opening the issue! We were not aware that someone relies on it. Could you please share the use case for getting access to #timeoutSettings? Do you intend to only read existing values or mutate them too?

So adding the following getter to the Page would be sufficient?
getDefaultTimeout(): number {
    return this.#timeoutSettings.timeout();
}

Absolutely!

Sending a PR right away then. Thanks for the quick replies!

authors: GuillaumeGomez OrKoN


text:
[Bug]: Failed to launch the browser process!

Bug description
Steps to reproduce the problem:

Install puppeteer
Add it to tests and try to run
Failed to launch the browser process!

$ uname -a
Linux e704baadf6e7 5.15.0-1025-gcp #32~20.04.2-Ubuntu SMP Tue Nov 29 08:31:04 UTC 2022 x86_64 GNU/Linux

Puppeteer version
19.4.0
Node.js version
v16.7.0 (cannot modify)
npm version
7.20.3 (cannot modify)
What operating system are you seeing the problem on?
Linux
Configuration file
No configuration file. Plain puppeteer.launch().
Relevant log output
$ npx jest db-creds
-- snip --
  ● 'db.json'.creds › 3177539[1]

    Failed to launch the browser process!

    TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md

      at onClose (node_modules/puppeteer-core/src/node/BrowserRunner.ts:328:9)
      at ChildProcess.<anonymous> (node_modules/puppeteer-core/src/node/BrowserRunner.ts:317:16)

  ● 'db.json'.creds › 3177539[1]

    TypeError: Cannot read property 'close' of undefined

      72 |   }
      73 |   afterEach(async () => {
    > 74 |     await page.close()
         |                ^
      75 |     page = null
      76 |   })
      77 |   afterAll(async () => {

      at Object.close (db-creds.test.js:74:16)
-- snip --

$ uname -a
Linux e704baadf6e7 5.15.0-1025-gcp #32~20.04.2-Ubuntu SMP Tue Nov 29 08:31:04 UTC 2022 x86_64 GNU/Linux

@PoolloverNathan can you launch the browser on this system without puppeteer?

...I'm an idiot.

authors: OrKoN PoolloverNathan


text:
pre-commit hook: drop git stash in favor of git diff

there are edge cases where git stash digests working directory and
refuses to give it back. it happened to me several times, unfortunately
i wasn't able to replicate this exact behaviour later. iirc @abuxton
also mentioned it happening, and courseware troubleshooting mentions
disappearing CWD.
for those reasons i propose dropping stash and re-implementing it using
diff. hook is modeled on this blog post:
http://jakemccrary.com/blog/2015/05/31/use-git-pre-commit-hooks-to-stop-unwanted-commits/
additionally it validates 1st commit to repo, which original hook
ignored.

Yes this is a thing.  Let me test out this hook, when I tried to fix this in the past there were weird edge cases related to having some files committed and some untracked in the working tree and other things.

:+1:

Yep, I can't get it to break.

authors: asquelt binford2k joshsamuelson

repo: puppetlabs/pltraining-classroom


text:
(HACKATHON) Check for deprecated functions

Summary
Check to see if any deprecated Puppet functions are present within the code. These functions where removed as of Puppet 8 and puppetlabs-stdlib v9.0.0
Checklist

[x] 🟢 Spec tests.
[ ] 🟢 Acceptance tests.
[x] Manually verified.

Closing, will be revisited

repo: puppetlabs/puppet-lint


text:
(PUP-3332) Add a value? method for auto insync?

This patch adds the ability to use value? in your provider instead of
needing to add the insync? method to your type.
The group provider needed to be modified since it already defined a
groups? method for one of its properties.
Example:

def value?(is)
  <some logic here>
  return <logical value>
end

PR Triage Notes:

@MikaelSmith, @kylog and @joshcooper to review and comment

My preference would be for types to not contain any logic at all, and that they would instead simply define what a particular abstract resource should look like, defining its schema or as @hlindberg likes to say, it's metamodel. Ideally the type would be a pure interface, containing no implementation details.
I would prefer to see all implementation in the provider, and in cases where providers have shared behavior, then that should be in an abstract base provider, inherited by the respective concrete providers.
I think many types contain validation & munging logic because we haven't created a consistent set of base parameters/properties for boolean, integer, non-negative integer, absolute path, etc. We do have boolean, but it's syntax is a bit magical. You have to do both :boolean => true, :parent => Puppet::Parameter::Boolean, which makes no sense. We also have list and ordered list, but they only apply to properties, but not parameters...
So @peiriannydd, I like that your PR allows get, set, and test operations to all be in the provider, e.g. apply_uid, apply_uid=, apply_uid? from above. For what it's worth, this is actually the approach that Microsoft's Desired State Configuration takes, though they do that at the resource level, not per-property.
But it does go against the traditional puppet "way". I think the counter argument is that apply_uid? above could be handled by having your provider's apply_uid method return a canonicalized uid value, and have the type's munge method also do the canonicalization, so that the resource harness can compare canonicalized values. But I think that argument falls apart as soon as the canonicalization requires provider specific logic, which we see in the owner and group properties of the file type:

    def insync?(current)
      # We don't want to validate/munge groups until we actually start to
      # evaluate this property, because they might be added during the catalog
      # apply.
      @should.map! do |val|
        provider.name2gid(val) or raise "Could not find group #{val}"
      end

      @should.include?(current)
    end

Also the members property of the group resource:

      def insync?(current)
        if provider.respond_to?(:members_insync?)
          return provider.members_insync?(current, @should)
        end

In my mind the main blockers to this PR are:

Existing providers may have already defined predicate methods, like useradd, and this PR will cause those methods to be called unexpectedly.
There are other places that will have the same issue, e.g. change_to_s, is_to_s

Did we come to a decision on this?
I would very much like to have this bit of sugar but, at this time, the useradd code would need to be updated as well.
I do get that this could cause issues but, with Puppet 4 on the way, would this not be the time to cause issues?

I honestly haven't had time to engage on this one with puppet 4.0.0 festivites. Hopefully soon now.

Count me in!
On Wed, Feb 11, 2015 at 1:21 PM, Kylo Ginsberg notifications@github.com
wrote:

I honestly haven't had time to engage on this one with puppet 4.0.0
festivites. Hopefully soon now.
—
Reply to this email directly or view it on GitHub
https://github.com/puppetlabs/puppet/pull/3113#issuecomment-73933947.

--
Trevor Vaughan
Vice President, Onyx Point, Inc
(410) 541-6699
tvaughan@onyxpoint.com
-- This account not approved for unencrypted proprietary information --

Just curious as to if this is still under consideration.

@kylog ping :)

We just had a very long discussion about this in the weekly triage meeting. We've decided we're going to close this for now, for a couple of reasons:

We're concerned that this is a breaking change. The need to change the useradd provider has us worried for forge modules. The soonest we could get in a breaking change at this point is Puppet 5
We like the general idea of moving more things to the providers, but would like to better design the type/provider API instead of doing it in an ad-hoc fashion.

@kylog is going to create an epic in Jira for formalizing and cleaning up the type/provider API, and we'll move PUP-3332 as well as any other related tickets under that epic. We do want to track this need, and we think this PR is moving in the right direction. We just don't feel this is the right time to merge it in.

authors: branan joshcooper kylog peiriannydd

repo: puppetlabs/puppet


text:
(PUP-5109) Fallback to IPv6 for :serverip fact

If there is no IPv4 address, use the IPv6 address if available.

CLA signed by all contributors.

Looks good, two questions:

Should this target master for IPv6 work?
Should the serverip server fact contain either IPv4 or v6? Or should there be a separate serveripv6 server facts?

If it's the former, then constructions like this won't work:
file { '/path/to/file':
  ensure => file,
  source => "puppet://$server_fact['serverip']:8140/custom-mount/path/to/file"
}

because literal IPv6 addresses in URLs need to be wrapped in brackets:
      http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html

On the other hand, if we have 2 server facts (serverip and serveripv6) then manifests would need to have conditional logic:
$host = $server_facts['serverip']
if $host {
  $url = "https://${host}:8140/custom-mount/file"
} else {
  $hostv6 = $server_facts['serveripv6']
  # note brackets
  $url = "https://[${hostv6}]:8140/custom-mount/file"
}

file { '/path/to':
  ensure => file,
  source => $url,
}

Or we could have server_facts['serverip'] return an IPv6 address wrapped in brackets, so that   source => "puppet://$server_fact['serverip']:8140/custom-mount/path/to/file" just works?

Or we could have server_facts['serverip']
please don't do this as nearly everything else will expect the address without the surrounding []

@kris-bosland to follow up with another PR removing the warning/only warning if there are no addresses resolved.

authors: b4ldr joshcooper jtappa kris-bosland puppetcla


text:
(PUP-10715) Show action default for puppet facts

Make show action the default action for puppet facts application. Previously, the default one was the find action.

CLA signed by all contributors.

Looks good, just need to rebase and resolve conflicts from the other PR

authors: joshcooper oanatmaria puppetcla


text:
(PDB-1812) Analyze all pg tables at least once

Investigation of a performance problem revealed that analyzing the
value_types table improved a PostgreSQL backed http:/.../fact-values
query by a factor of about 4x when run against a ~10m fact benchmark DB
on a tmpfs on Linux.
It appeared that some tables had never been analyzed, and further
testing revealed that the autovacuum process ignored them.  In some
cases, it looks like this is because it ignores small tables that don't
change much, like value_types, which has 6 rows and effectively never
changes.
So make sure that all tables are analyzed at least once (after any
structure changes) by running a "vacuum (analyze, verbose)" whenever we
have to run any migration, and add a dummy migration so that all
existing databases will run the analysis too.

I was able to reproduce this with a database created via something like benchmark -F resources/puppetlabs/puppetdb/benchmark/samples/facts -n 3000 -N 1 -r 10.  On a tmpfs a time curl -o /dev/null -sX GET http://localhost:8080/pdb/query/v4/fact-paths took about 1m before the analyze, and about 15s after it.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://jenkins.puppetlabs.com/job/platform_puppetdb_intn-sys_pr/1670/

On my vm setup:
Before: 6.669s
After: 0.408s

ok, the fix looks like it works which is the important part. Basically just style notes.

OK, hopefully addressed the outstanding issues.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://jenkins.puppetlabs.com/job/platform_puppetdb_intn-sys_pr/1673/

@pljenkinsro retest this please

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://jenkins.puppetlabs.com/job/platform_puppetdb_intn-sys_pr/1683/

@rbrw @mullr Do we need to set some expectations for how long with will take on the next startup? Do we have some rough idea of how long this takes on a 5k node install?

For me, it was taking about 10s for the DB mentioned at the top of this thread (10m facts, 3k certnames, generated via benchmark -F (no -C or -R)); I'd be happy to test other arrangements.

@rbrw I think that's a good idea so that we can put it in the release notes

I'm :+1:. Suggested a comment on the autocommit thing in the channel and getting an idea of duration so that we can let the users know what to expect.

Sounds good, I'll test  the full 3k case shortly.

this works for me. with 14129 fact paths inserted with the benchmark tool, the query time went from 36 seconds to 3.5

authors: mullr pljenkinsro rbrw senior wkalt

repo: puppetlabs/puppetdb


text:
pure-table 中 LoadingConfig 配置 background 不生效问题

描述问题：
代码见图片：https://test-1318510234.cos.ap-beijing.myqcloud.com/loading中background属性不生效问题代码位置.png
此处的background好像不生效。背景我只调试出来2种情况就是rgba(0,0,0,0.45) 和 rgba(255,255,255,0.45)
如何复现该问题 (How to reproduce the problem)
官方demo即可测试出来

修复：https://github.com/pure-admin/pure-admin-table/releases/tag/v2.3.3
如果你要自定义背景色并且需要适配暗黑模式，参考下图红框代码即可

repo: pure-admin/pure-admin-table


text:
Should the properly typed stringify live here?

Brought this up the other day, but it would be good (for me, at least, when using and teaching Purescript) to have the properly typed stringify in here: https://twitter.com/paf31/status/884984889942167553
I think some concerns revolve around whether or not we should export the class at all (I don't know how this would work with newtypes), etc.

The problem is that constructing the dictionaries makes this possibly quite inefficient.

@paf31 when class definition is empty can we optimize it to not result in constructing dictionaries?
(if there is issue for it can you link please)

purescript/purescript#2768

I guess we can close this now it's in prelude :smile:

It’s the show instance for records.

Ah it's in compiler/0.12 branch

authors: garyb justinwoo paf31 safareli

repo: purescript/purescript-globals


text:
[Bug]: Unable to test module outside of GitHub

What happened?
I have a module (semantic-version) that depends on the nsv module. But it's unable to call nsv when executed outside of a GitHub Workflow, for example, in local testing:
Stdout:
invoke: Next:build(deps).Error error: input: semanticVersion.next resolve: call function "Next": process "/runtime" did not complete successfully: exit code: 2

Stdout:
invoke: input: nsv resolve: call constructor: process "/runtime" did not complete successfully: exit code: 2

Stdout:
marshal: json: error calling MarshalJSON for type *main.Nsv: json: error calling MarshalJSON for type *dagger.Container: input: container.from resolve: failed to resolve image ghcr.io/purpleclay/nsv:v0.10.0: failed to resolve source metadata for ghcr.io/purpleclay/nsv:v0.10.0: failed to authorize: failed to fetch oauth token: unexpected status from GET request to https://ghcr.io/token?scope=repository%3Apurpleclay%2Fnsv%3Apull&service=ghcr.io: 403 Forbidden

Steps to reproduce it

...
Which version?
v0.10.0
Code of Conduct

[X] I agree to follow this project's Code of Conduct

It is strange you are getting an auth error when the nsv project and its package registry are both public. I use this function within GitLab without issue. But I an invoking it directly.
Is your Dagger module public or private? And what version of the Dagger engine are you using?

It's a private Dagger module, and using v0.14.0. But I've experienced the same issue in earlier versions too.

I have created a branch and included a testing module that uses nsv as a dependency. When I call it, I do not get these auth issues, so it feels like a private module issue. I have to admit, I haven't used a private module yet. I see nothing that would prevent a pull from ghcr.io on my end.
dagger call -m github.com/purpleclay/daggerverse/testing@nsv-testing next --src .

It's a private Dagger module, and using v0.14.0. But I've experienced the same issue in earlier versions too.

So does that mean it has never worked from a private module?

Yes, that's correct. It's never worked. I used to resolve this by keeping a local copy of your module, and then having a condition that if the release look-up failed for nsv, it would provide a hardcoded value.

authors: purpleclay yibble

repo: purpleclay/daggerverse


text:
Integrate Pusher Beams into Chatkit 🚀

What?
Integrate Pusher Beams into Chatkit.

CC @hamchapman

          3 Warnings

:warning:
Any changes to library code should be reflected in the Changelog. Please consider adding a note there. \nYou can find it at CHANGELOG.md.

:warning:
PR is classed as Work in Progress

:warning:
The Cartfile or Cartfile.resolved was updated, but there were no changes in the podspec. Did you forget updating the podspec?

SwiftLint found issues
Warnings

File
Line
Reason

AppDelegate.swift
10
Line should be 120 characters or less: currently 121 characters

ViewController.swift
106
Line should be 120 characters or less: currently 143 characters

ViewController.swift
111
Line should be 120 characters or less: currently 123 characters

ViewController.swift
116
Line should be 120 characters or less: currently 123 characters

ViewController.swift
128
Line should be 120 characters or less: currently 131 characters

ViewController.swift
190
Line should be 120 characters or less: currently 131 characters

ViewController.swift
7
Delegates should be weak to avoid reference cycles.

ViewController.swift
8
Delegates should be weak to avoid reference cycles.

ChatManager.swift
109
TODOs should be avoided (This could be nicer).

ChatManager.swift
110
TODOs should be avoided (We don't need to wait for init...).

ChatManager.swift
111
TODOs should be avoided (Do we need to nil out subscrip...).

ChatManager.swift
124
TODOs should be avoided (This is madness).

ChatManager.swift
209
TODOs should be avoided (This being here at the end see...).

ChatManager.swift
213
TODOs should be avoided (Maybe we need some sort of Cha...).

ChatManager.swift
253
TODOs should be avoided (When can percent encoding fail...).

ChatManager.swift
92
Function body should span 40 lines or less excluding comments and whitespace: currently spans 72 lines

ChatManager.swift
257
MARK comment should be in valid format. e.g. '// MARK: ...' or '// MARK: - ...'

ChatManager.swift
113
Variable name should be between 3 and 40 characters long: 'cu'

ChatManager.swift
172
Line should be 120 characters or less: currently 130 characters

ChatManager.swift
191
Line should be 120 characters or less: currently 138 characters

ChatManager.swift
195
Line should be 120 characters or less: currently 129 characters

ChatManager.swift
199
Line should be 120 characters or less: currently 138 characters

PCCurrentUser.swift
24
TODOs should be avoided (This should probably be [PCUse...).

PCCurrentUser.swift
392
TODOs should be avoided (Use the soon-to-be-created new...).

PCCurrentUser.swift
482
TODOs should be avoided (Do we need to fetch users in t...).

PCCurrentUser.swift
685
TODOs should be avoided (Do we need a Last-Event-ID opt...).

PCCurrentUser.swift
792
TODOs should be avoided (What happens if you provide bo...).

PCCurrentUser.swift
814
TODOs should be avoided (This should probably be a room...).

PCCurrentUser.swift
1104
TODOs should be avoided (What to do with an error? Just...).

PCCurrentUser.swift
1054
Unused parameter "data" in a closure should be replaced with _.

PCCurrentUser.swift
712
Function body should span 40 lines or less excluding comments and whitespace: currently spans 42 lines

PCCurrentUser.swift
915
Function body should span 40 lines or less excluding comments and whitespace: currently spans 55 lines

PCCurrentUser.swift
208
MARK comment should be in valid format. e.g. '// MARK: ...' or '// MARK: - ...'

PCCurrentUser.swift
267
MARK comment should be in valid format. e.g. '// MARK: ...' or '// MARK: - ...'

PCCurrentUser.swift
1152
MARK comment should be in valid format. e.g. '// MARK: ...' or '// MARK: - ...'

PCCurrentUser.swift
632
Arguments can be omitted when matching enums with associated types if they are not used.

PCCurrentUser.swift
632
Arguments can be omitted when matching enums with associated types if they are not used.

PCCurrentUser.swift
6
Variable name should be between 3 and 40 characters long: 'id'

PCCurrentUser.swift
67
Variable name should be between 3 and 40 characters long: 'id'

PCCurrentUser.swift
178
Variable name should be between 3 and 40 characters long: 'id'

PCCurrentUser.swift
195
Variable name should be between 3 and 40 characters long: 'id'

PCCurrentUser.swift
229
Variable name should be between 3 and 40 characters long: 'id'

PCCurrentUser.swift
284
Variable name should be between 3 and 40 characters long: 'id'

PCCurrentUser.swift
344
Variable name should be between 3 and 40 characters long: 'id'

PCCurrentUser.swift
1131
Enum element name should be between 3 and 40 characters long: 'messageIDKeyMissingInMessageCreationResponse'

PCCurrentUser.swift
122
Collection literals should not have trailing commas.

PCCurrentUser.swift
656
Opening braces should be preceded by a single space and on the same line as the declaration.

PCCurrentUser.swift
199
Line should be 120 characters or less: currently 122 characters

PCCurrentUser.swift
217
Line should be 120 characters or less: currently 144 characters

PCCurrentUser.swift
229
Line should be 120 characters or less: currently 140 characters

PCCurrentUser.swift
233
Line should be 120 characters or less: currently 137 characters

PCCurrentUser.swift
513
Line should be 120 characters or less: currently 123 characters

PCCurrentUser.swift
541
Line should be 120 characters or less: currently 121 characters

PCCurrentUser.swift
566
Line should be 120 characters or less: currently 139 characters

PCCurrentUser.swift
570
Line should be 120 characters or less: currently 139 characters

PCCurrentUser.swift
592
Line should be 120 characters or less: currently 133 characters

PCCurrentUser.swift
603
Line should be 120 characters or less: currently 132 characters

PCCurrentUser.swift
697
Line should be 120 characters or less: currently 123 characters

PCCurrentUser.swift
953
Line should be 120 characters or less: currently 123 characters

PCCurrentUser.swift
1059
Line should be 120 characters or less: currently 136 characters

PCCurrentUser.swift
1161
Line should be 120 characters or less: currently 123 characters

Errors

File
Line
Reason

ViewController.swift
31
Force casts should be avoided.

ChatManager.swift
285
Line should be 120 characters or less: currently 366 characters

ChatManager.swift
294
Line should be 120 characters or less: currently 248 characters

PCCurrentUser.swift
5
Type body should span 200 lines or less excluding comments and whitespace: currently spans 685 lines

PCCurrentUser.swift
694
Variable name should be between 3 and 40 characters long: 'r'

PCCurrentUser.swift
1174
File should contain 400 lines or less: currently contains 1174

  Generated by :no_entry_sign: Danger

@hamchapman I've addressed all the comments and squashed all the commits.

authors: lukabratos pusher-ci

repo: pusher/chatkit-swift


text:
Basic native push

cc @vivangkumar @zimbatm
TODO:

[ ] tests
[ ] validations

Did you have a look at vivan's implementation in the ruby lib?

Yep. Thats my guideline. Todos yet to be done though
Sent from my iPhone

On 6 Jul 2016, at 09:29, zimbatm notifications@github.com wrote:
Did you have a look at vivan's implementation in the ruby lib?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Does it mean you'll make a separate class and the hostname configurable too?

Yeah I will
Sent from my iPhone

On 6 Jul 2016, at 09:33, zimbatm notifications@github.com wrote:
Does it mean you'll make a separate class and the hostname configurable too?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

repo: pusher/pusher-http-python


text:
Question: can component inside Variant take props?

I'm exposing rootState object as a prop to route components (Home component in this example). And I'm trying to pass it down to the component inside Variant (A160331 and B160331 in this example), but it doesn't seem to do work correctly. It only takes the first key value pair inside rootState object.
If I take the A160331 and B160331 outside the Variant, the props work correctly - is this an issue with react-ab-test module or am I doing something wrong here?
const Home = ({rootState}) => {
  return (
    <div>
      <Experiment name="test160331">
        <Variant name="A">
          <A160331 rootState={rootState} />
        </Variant>
        <Variant name="B">
          <B160331 rootState={rootState} />
        </Variant>
      </Experiment>
    </div>
  )
}

Thanks in advance for looking into this. I'm submitting it here instead of SO because I think it may be an issue with the module.

Variant doesn't do much (take a look at the source) so I'm not sure where it would be interfering.
What is the rootState object in this situation? Can you paste in the entire module so I can see the lifecycle?

Essentially rootState is like the state object in Redux, except I'm using RxJs to implement it:
state$.subscribe(change => {
  const createElement = (Component, props) => {
    const rootState = change
    return <Component {...props} rootState={rootState} />
  }
  render((
    <Router routes={routes} createElement={createElement} history={browserHistory} />
  ), global.document.getElementById('app'))
})

On every state change event, routes are updated and re-rendered.
The above mentioned code is the entirety of the Home module - A160331 is a variant component I want to test and in it I'm having trouble rendering another subcomponent AddToCartButton:
<AddToCartButton rootState={rootState} products={products} className="mx1 my2" />

This component takes the rootState which includes "cart" state. If for example I click this button, it'll send a state change event, which will re-render the shopping cart with an added product. If I take the A160331 component outside of Variant, logging rootState inside A160331 might show:
{
  countryCode: 'US',
  cart: {
    cartItems: [{a: 1}, {b: 2}]
  }

But inside Variant, it shows:
{
  countryCode: 'US'
}

Also, I noticed that debug panel still shows in production, even though I'm using Heroku to deploy it and build log shows that NODE_ENV=production.

Using a function that returns a component rather than a React component class may not work in the way you're expecting it to.
I'm having a hard time understanding your code, but take a look at the <CoreExperiment> source. My guess is that <A160331> is rendering earlier in the lifecycle when inside of the <Experiment> and that changes to the rootState object are not triggering a render.
You might consider refactoring <A160331> and <Home> into React component classes so there's less ambiguity about how state (and in this example, changes to rootState) affects renders. Keep an eye on componentWillReceiveProps.

To hide the debug panel when NODE_ENV=production you'll need to use envify for your builds.

Thanks for pointing out the fix with debug panel.
As for the prop issue, I think you're right in suspecting that the state is not updating, but I wasn't able to pinpoint why. My best guess is that how I'm handling state with RxJs doesn't play well with how react-ab-test is handling state with setState because if I simply take the component out of Variant, everything works as expected (I tried converting the components to React classes, but it didn't do anything).
I may debug the issue later, but for now, I'm using a hack - saving rootState to localStorage on state change and using that inside the components to bypass the state update issue.
Thanks for looking into this. I'm closing this issue.

authors: hlalani wehriam

repo: pushtell/react-ab-test


text:
🛑 API is down

In ecfa740, API (https://api.unmer.ac.id/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: API is back up in e248752 after 3 days, 7 hours, 39 minutes.

repo: pusimgit/upptime


text:
Updated native Pdfium build instructions, options to disable modules

I wanted to update the native PDFium libraries for myself and ended up with a few suggestions that I'd like to share. They are closer to the current build instructions and reduce the amount of customization work and don't require any actual VS IDE work (you'll still need the installation for the compilers).
While poking around the native build instructions I also found a few interesting flags (pdf_enable_xfa and pdf_enable_v8) that I might want to employ to reduce binary size/compilation time/attack surface.
To better illustrate the amount of work required, I'll use screenshots for now. But I'd be happy to create a pull request for this if and when we've hammered out the details.
Adjustments to the BUILD.gn (output DLL, include your pdfiumviewer.cpp):

Adjustments to the pdfiumviewer.cpp (conditional clean-up of V8):

Example build configuration for gn (create this in the step gn args <buildname>):

I haven't set up x64 building yet. This might provide some hints: https://groups.google.com/forum/#!topic/pdfium/aBjlQCtldyA
UPDATE 2: See notes below.
UPDATE 3: See notes below.
The build instructions of the PDFium project again for reference: https://pdfium.googlesource.com/pdfium/
UPDATE 1:
To avoid some error output (the test projects won't build because we change the library output type to shared_library), conditionally disable those projects in BUILD.gn like so:

It would be cleaner to just remove those projects from the BUILD.gn file (as they won't build even when pdf_is_standalone is true at the moment). But for illustrative purposes, I chose to keep the diff small here.
UPDATE 2:
By default, the tools will build x64 on x64 machines, it appears.
UPDATE 3:
For x86 builds on x64 machines, add a line to args.gn (see above) that says:
target_cpu = "x86"
You can also set it to x64 but that is the default on x64 machines anyway and presum. won't work on x86 machines.
To generate VS projects files (useful for checking the configuration), run:
gn gen <directory> --ide=vs
As I said above, VS IDE work is not required. Usually you'd want to just run this to produce the DLL:
ninja -C <directory>

Why would you want to disable V8? From what I understand, PDF documents may contain JavaScript. Are you proposing to maybe create an alternative version of the DLL that does not have V8?

I am not suggesting that you disable it by default. This issue is mostly about build documentation and (maybe) simplifying the process, as well as keeping the build instructions close to those of the native project.
Regarding your question:
I use your library mostly for PDF rendering. I have not encountered any PDFs yet whose basic output (incl. annotations) depends on JavaScript being executed.
Disabling the V8 module doesn't necessarily preclude JavaScript from running. From what I remember, disabling V8 doesn't disable JavaScript support altogether.
Anyway, since I do not require the JavaScript parts, I prefer to not include them as it increases the attack surface for PDF-JavaScript-based exploits. V8 is an obvious target.

Sorry for the slow response and thank you for the build instructions.
I've updated the build instructions on https://github.com/pvginkel/PdfiumViewer/wiki/Building-PDFium to use your build instructions.
I've included two versions of the Pdfium DLL's. The standard ones still include V8. However, I did another attempt at getting Windows XP compatible DLL's and it turns out that, if you use a recent dbghelp.dll version, the only thing preventing Pdfium from running on Windows XP is V8. So, now, in Libraries\Pdfium\Without V8 there are builds of the Pdfium DLL without V8 support. See https://github.com/pvginkel/PdfiumViewer/tree/master/Libraries/Pdfium for more information.

I've created a new project at PdfiumBuild to automate building the PDFium library. This project runs on a build server to create new versions daily. Have a look at that project for where to find the output.

authors: pvginkel tskarman

repo: pvginkel/PdfiumViewer


text:
Cannot clone Vue component

attempting to clone a vue component you get the following error:
Uncaught TypeError: Illegal invocation
    at _clone (clone.js?4a13:162)
    at _clone (clone.js?4a13:162)
    at _clone (clone.js?4a13:162)
    at _clone (clone.js?4a13:162)
    at _clone (clone.js?4a13:162)
    at _clone (clone.js?4a13:162)
    at _clone (clone.js?4a13:162)
    at _clone (clone.js?4a13:162)
    at _clone (clone.js?4a13:162)
    at _clone (clone.js?4a13:162)

Probably related: https://github.com/pvorb/clone/issues/99

authors: emahuni gadicc

repo: pvorb/clone


text:
Generate only text

Hi
Is it possible to generate only text?
public;private
public;private
I can pay to you, pls help me!

Hi, yes it is possible. You just need to delete unneeded stuff from the html.

authors: D-Ermis supportcoinsafer

repo: pwall-org/pwall


text:
iOS Update Popup on jailbreak state

I've installed b33 yesterday evening.
tvOS profile installed, jailbreak applied.
After 2 hours a popup saying that iOS 12.1.4 is available appeared.
If i open "Software Update" in settings an error appears.
Can i jailbreak safely or do i risk a bootloop?

Go to Settings -> General -> iDevice Storage and see if you can find iOS 12.1.4 on the list. Delete it if you do and restart your iDevice. If you don't, you can safely Jailbreak.

I checked and there isn't. But shouldn't unc0ver and tvOS profile block update requests?

Yea, it should. Strange... It should be safe for you to Jailbreak nonetheless.


text:
Open in new tab by default

Issue Description
Type: feature request
Describe what happened (or what feature you want)
Open Octo in new tab by default
Describe what you expected to happen
similar to Neogit, where you can specify the WindowKind https://github.com/NeogitOrg/neogit/blob/6691c4efcd8dad313e344c49057f05db7d91fd25/lua/neogit/config.lua#L81
I think it's very useful to keep the Neovim workspace organized.

Might be related to #472 Would be able to determine where the buffer gets open

yes, looks great indeed

Would you expect to switch to the new tab?

yeah. that should be possible with the hooks, no?

Yeah, I think that hooks are the way to go on this one. Would you want to investigate what is required to make this one happen?


text:
Questions about is_dseparated_from

I have the following GeneralGraph() object named D with the following adjacency matrix (from D.graph) and I use is_dseparated_from to check whether nodes 0 and 2 are d-separated given an empty set.  The function is_dseparated_from seems to get stuck somewhere and it never returns. Is this expected?
[[ 0  0  0  0  0  1  0  1  1  0]
 [ 0  0  0  0  0  0  0  0  0  0]
 [ 0  0  0  0  0  0  1  0  0  0]
 [ 0  0  0  0  0  0  1  0  1  0]
 [ 0  0  0  0  0 -1  0 -1  0  0]
 [ 1  0  0  0  1  0  0  2  0  1]
 [ 0  0  1  1  0  0  0  0  0  1]
 [ 1  0  0  0  1  2  0  0  0  1]
 [ 1  0  0  1  0  0  0  0  0  0]
 [ 0  0  0  0  0  1  1  1  0  0]]

I found a recursive behavior in is_dconnected_to. Suppose we have the following graph D:
X4->X1 o-o X2<->X5 ; X4->X2

If you call is_dconnected_to(X1, X5, [], D), this will make the function to loop forever.

I currently add a list prevent_recursive_ls to the function is_dconnected_to to bypass the pair of edge and node that have been previously visited as a workaround to mitigate the issue as shown below:
def is_dconnected_to(node1: Node, node2: Node, z: List[Node], graph: Graph):
    if node1 == node2:
        return True
    edgenode_deque = deque([])
    prevent_recursive_ls = [] # MODIFIED HERE
    for edge in graph.get_node_edges(node1):
        if edge.get_distal_node(node1) == node2:
            return True
        edgenode_deque.append((edge, node1))
    while len(edgenode_deque) > 0:
        edge, node_a = edgenode_deque.pop()
        node_b = edge.get_distal_node(node_a)
        for edge2 in graph.get_node_edges(node_b):

            node_c = edge2.get_distal_node(node_b)

            # node_a - node_b - node_c
            if node_c == node_a:
                continue

            if reachable(edge, edge2, node_a, z, graph):
                if node_c == node2:
                    return True
                else:
                    if (edge2, node_b) not in prevent_recursive_ls: # MODIFIED HERE
                        edgenode_deque.append((edge2, node_b))
                        prevent_recursive_ls.append((edge2, node_b)) # MODIFIED HERE

    return False

This is interesting, if I may interject. First of all, this isn't a legal PAG; the tail endpoints at X4 shouldn't be there in a PAG, so maybe this was obtained using background knowledge...? Second, the recursion error doesn't occur in Tetrad, even though it's also using a reachability method. Third, for a latent variable model, the right test is m-separation, not d-separation, but you should laugh at anyone who says that since they are the same algorithm (just differently interpreted).

authors: jdramsey kenneth-lee-ch

repo: py-why/causal-learn


text:
Add additional CI tests: Mutual Information, Chi square, Monte Carlo

LGTM.  My only issues are with some of the type hints.
@adam2392 can you comment here on why some flavors are left out?  For example:

mutual information and asymptotic chi-square test for discrete variables, perhaps with a James-Stein estimator
Monte Carlo permutation testing and sequential Monte Carlo permutation testing
Jonckheere-Terpstra test for ordinal variables

Originally posted by @robertness in https://github.com/py-why/dodiscover/pull/16#pullrequestreview-1076586407

Other tests that I'm trying to use for some projects are:

CCIT: https://arxiv.org/pdf/1709.06138.pdf
CMI: https://proceedings.mlr.press/v84/runge18a/runge18a.pdf
CCMI: https://arxiv.org/abs/1906.01824

Additional info on the Jonckheree test:
https://www.quantics.co.uk/blog/jonckheere-terpstra-test-ordered-differences/
https://www.stats.ox.ac.uk/~steffen/teaching/fsmHT07/fsm07.pdf
https://en.wikipedia.org/wiki/Jonckheere's_trend_test
C implementation in R: https://github.com/cran/bnlearn/blob/master/src/tests/discrete/jonckheere.c

repo: py-why/dodiscover


text:
Tutorial notebook on GST fails

Describe the bug
On current master (11-10-2021) executing the  leads to an exception.
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:

Open the tutorial GST-Overview.ipynb
Run code cells untill one arrives at results = gst_protocol.run(data)
An error is generated about not being above to convert an operation to type 'CPTP'

The full traceback is

Expected behavior
The tutorial should run without errors
Environment (please complete the following information):

pyGSTi version: 0.9.10.post4
python version: 3.8
OS: Windows

Additional context
None

Thanks for reporting this! Unfortunately I'm not able to reproduce this issue using tip of master (pyGSTi version 0.9.10.post4, python 3.8, Mac OS).
The notebook you are referring to is algorithms/GST-Overview.ipynb, correct? That tutorial only has 4 cells and doesn't contain an explicit set_all_parameterizations() call like your traceback - would it be possible for you to share the notebook that has this traceback on this issue?

Closing for no activity and failure to reproduce. If you encounter a bug like this again, please open another issue and share the notebook you are running.

authors: peendebak sserita

repo: pyGSTio/pyGSTi


text:
Fix KeyError in CodeSyntaxHighlight

I noticed that CodeSyntaxHighlight sometimes fails to highlight the texts. This PR fixes the KeyError just by replacing the __getitem__ with get. I encountered this bug when I tried to highlight my pre-commit-config.yaml file, so I cannot tell when this happens.
from superqt.utils import CodeSyntaxHighlight
from qtpy import QtWidgets as QtW

w = QtW.QPlainTextEdit()
highlight = CodeSyntaxHighlight(w.document(), "yaml", "default")
w.setPlainText("ci:\n  autoupdate_schedule: monthly")

Output:
KeyError                                  Traceback (most recent call last)
File ~\Desktop\code\python\superqt\src\superqt\utils\_code_syntax_highlight.py:73, in CodeSyntaxHighlight.highlightBlock(self, text)
     68 def highlightBlock(self, text):
     69     # dirty, dirty hack
     70     # The core problem is that pygemnts by default use string streams,
     71     # that will not handle QTextCharFormat, so we need use `data` property to
     72     # work around this.
---> 73     highlight(text, self.lexer, self.formatter)
     74     for i in range(len(text)):
     75         self.setFormat(i, 1, self.formatter.data[i])

File ~\mambaforge\envs\mt\Lib\site-packages\pygments\__init__.py:82, in highlight(code, lexer, formatter, outfile)
     77 def highlight(code, lexer, formatter, outfile=None):
     78     """
     79     This is the most high-level highlighting function. It combines `lex` and
     80     `format` in one function.
     81     """
---> 82     return format(lex(code, lexer), formatter, outfile)

File ~\mambaforge\envs\mt\Lib\site-packages\pygments\__init__.py:64, in format(tokens, formatter, outfile)
     62 if not outfile:
     63     realoutfile = getattr(formatter, 'encoding', None) and BytesIO() or StringIO()
---> 64     formatter.format(tokens, realoutfile)
     65     return realoutfile.getvalue()
     66 else:

File ~\Desktop\code\python\superqt\src\superqt\utils\_code_syntax_highlight.py:52, in QFormatter.format(self, tokensource, outfile)
     49 self.data = []
     51 for token, value in tokensource:
---> 52     self.data.extend([self._style[token]] * len(value))

KeyError: Token.Literal.Scalar.Plain

For me, it looks like a bug in pigments.

For me, it looks like a bug in pigments.

what do you suggest then?

I will check this in the following days. I am sorry that I forgot about this issue.

So yes, it is error reported in pygments https://github.com/pygments/pygments/issues/2149
Looking into rich code
https://github.com/Textualize/rich/blob/43d3b04725ab9731727fb1126e35980c62f32377/rich/syntax.py#L152
This PR may be a good approach. Hovewer I prefer to add Token.Literal.Scalar.Plain to self._style.
        self._style = {name: get_text_char_format(style) for name, style in self.style}

I feel like using get may mask some other problem. But rich author decided to mask (with adding to dict for performance), so maybe it is not a bad idea?
I cannot restart CI. Maybe too long time since last commit?

superqt still supports python 3.8

happy to drop it now that it's EOL.  will open new issue

Hovewer I prefer to add Token.Literal.Scalar.Plain to self._style.

thanks @Czaki. is this something you want to see done in this PR before merge?

authors: Czaki hanjinliu tlambert03

repo: pyapp-kit/superqt


text:
Install Instructions

The instructions for developer install found in the "Installation" section of https://github.com/pybamm-team/PyBaMM/blob/develop/CONTRIBUTING.md state that the user should run "tox -e pybamm-requires" in the second step (I'm on ubuntu 20.04). However, this creates an error. The step should specify that the user first clones the github repo and then change directory to the pybamm folder. Once that is done, the command "tox -e pybamm-requires" runs without issue.
This order of operations is specified in the more detailed instructions linked to a the end of that installation section https://pybamm.readthedocs.io/en/latest/install/install-from-source.html

Thanks Michael, @tlestang  is it time to update the docs now with the new instructions for sundials?

authors: DrMichaelCornish tinosulzer

repo: pybamm-team/PyBaMM


text:
Feature/foreignkey ordering

Various fixes, notably ordering on foreignkeys.
Quick q: how do feel about using field__relation in the ordering (instead of the field.relation used here) - this might be more constant with django.
Thanks!

it is needed rebase this PR and make some tests. How this PR has not activity since 2013 I will close it.
But if someone make test and rebase it, is just resend this PR that I will review it.

authors: andrewsmedina hcliff


text:
CliApp does not recognize argument with discriminated union

CliApp fails to run with if a model contains a discriminated union with a Discriminator object, i.e., something like this:
Poly = Annotated[
    Annotated[PolyA, Tag("a")]
    | Annotated[PolyB, Tag("b")],
    Discriminator(_get_type)
]

Full reproduction:
from typing import Literal, Union, Annotated
from pydantic import BaseModel, Field, Tag, Discriminator
from pydantic_settings import BaseSettings,  CliApp

class PolyA(BaseModel):
    a: int = 1
    type: Literal["a"] = "a"

class PolyB(BaseModel):
    b: str = "2"
    type: Literal["b"] = "b"

def _get_type(model: BaseModel | dict) -> str:
    if isinstance(model, dict):
        return model.get("type", "a")
    return model.type  # type: ignore

Poly = Annotated[
    Annotated[PolyA, Tag("a")]
    | Annotated[PolyB, Tag("b")],
    Discriminator(_get_type)
]

PolyStrDiscriminator = Annotated[
    PolyA | PolyB,
    Discriminator("type")
]

PolyUndiscriminated = PolyA | PolyB

class WithUnion(BaseSettings):
    poly: Poly

class WithUnionStrDiscriminator(BaseSettings):
    poly: PolyStrDiscriminator

class WithUnionUndiscriminated(BaseSettings):
    poly: PolyUndiscriminated

if __name__ == "__main__":
    # the union with `Discriminator` object works without CLI
    print(WithUnion.model_validate({"poly": {"type": "a"}}))
    # the CLI works for union without discriminator
    print(CliApp.run(WithUnionUndiscriminated, ["--poly.type=a"]))
    # the CLI works for union with str discriminator
    print(CliApp.run(WithUnionStrDiscriminator, ["--poly.type=a"]))
    # the CLI does NOT work with `Discriminator` object
    print(CliApp.run(WithUnion, ["--poly.type=a"]))

Here's the output
poly=PolyA(a=1, type='a')
poly=PolyA(a=1, type='a')
poly=PolyA(a=1, type='a')
usage: pydantic_main_discriminated_union.py [-h] [--poly JSON]
pydantic_main_discriminated_union.py: error: unrecognized arguments: --poly.type=a

Thanks @klieret for reporting this.
I is working with print(CliApp.run(WithUnion, ['--poly={"type": "a"}'])) and you can see in help that you need to pass --poly as json [--poly JSON].
@kschwab correct me if I am wrong

I is working with print(CliApp.run(WithUnion, ['--poly={"type": "a"}'])) and you can see in help that you need to pass --poly as json [--poly JSON].

Yes, I can still do --poly={"type": "a"}, but I should be able to directly do --poly.type=a like in all other cases, so I would definitely consider this to be a bug.

Thanks @klieret for the issue. I opened #490 for resolution.

authors: hramezani klieret kschwab

repo: pydantic/pydantic-settings


text:
Fix Sequence ignoring discriminator

Change Summary

This is a fix for bug #9872. The annotation Sequence ignores discriminator metadata in certain cases. The generated schema has not correct python_schema where a union is presented rather than expected tagged-union. json_schema is normal.
The bug occurs in GenerateSchema._sequence_schema. In the json-or-python schema created, the underling reference of item_type_schema is the same, therefore the metadata dict is also shared. When calling apply_discriminators on the model schema, because json_schema is walked first, it has correct conversion from union to tagged-union. But the walk will pop the discriminator from metadata. Therefore when python_schema is walked, metadata is already empty, resulting in union, not tagged-union schema.
# `metadata` object has the same memory location
metadata = s.get('metadata', {})
discriminator = metadata.pop(CORE_SCHEMA_METADATA_DISCRIMINATOR_PLACEHOLDER_KEY, None)

I suspect there are more of these kinds of reference sharing problems in other parts of schema generation process.  🤔
Note the author mentioned that the bug disappears when adding model_validator to both models. This is because the procedure for applying discriminators is different. It is GenerateSchema._apply_discriminator_to_union that generates tagged-union in this case.
Related issue number
fix #9872

Checklist

[x] The pull request title is a good summary of the changes - it will be used in the changelog
[x] Unit tests for the changes exist
[x] Tests pass on CI
[x] Documentation reflects the changes where applicable
[x] My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

@kc0506, thanks for your awesome work this past week. Btw, we have a slack channel to allow our contributors to ask questions + chat. You can join via this link, if you're interested!

repo: pydantic/pydantic


text:
TST: configure CircleCI

Use CircleCI for testing pandas-gbq. This configuration uses the
canonical Python and miniconda3 Docker images to reduce problems caused
by a unique configuration.
Also:

Re-enables conda tests.
Adds Python 3.7 tests.

Edit: Conda build still fails https://github.com/pydata/pandas-gbq/issues/189
Closes https://github.com/pydata/pandas-gbq/issues/228 https://github.com/pydata/pandas-gbq/issues/197

Tests with credentials: https://circleci.com/gh/tswast/pandas-gbq/tree/issue228-circle

This looks great!! Thanks!
It looks like CircleCI links to builds under @tswast , rather than pydata. That's excellent: it'll test under the committer's credentials (IIRC Travis wouldn't run integration tests on PRs)
It looks like it's not running properly under pydata. I can't seem to change this, I think because I'm a member but not an admin, is that right?

I think the 1.0 message will go away once this is merged. I see that there was a configuration option to turn on builds (but not share secrets for security) on pull requests. I've just enabled that option, so future PRs should build (without credentials) on CircleCI.

authors: max-sixty tswast

repo: pydata/pandas-gbq


text:
Feature Request: groupby retaining indexes

The feature I'd like to suggest/request is pretty simple, it has workarounds but it seems very odd to me that this is not a native behavior. Specially because the workarounds seem so slow.
I imagine it as a simple parameter for the groupby function.
The feature is: the ability to group a level (of a MultiIndex dataframe) but still retain that level's labels. I think it will be clear with the example below.
Note that this came from a question I asked in stack overflow
Code Sample
df = pd.DataFrame([['A', 1, 3],
                   ['A', 2, 4],
                   ['A', 3, 6],
                   ['B', 1, 9],
                   ['B', 2, 10],
                   ['B', 4, 6]],
                  columns=pd.Index(['Name', 'Date', 'Value'], name='ColumnName')
                 ).set_index(['Name', 'Date'])

df.groupby(level=('Name')).last()

Intended Output
ColumnName         Value
Name    Date
A        3           6
B        4           6

output of pandas 0.18.0
ColumnName         Value
Name
A                    6
B                    6

I also just answered on SO, but the solution is rather simple: when doing a groupby().last(), the last item for each column will be calculated. So, you can just reset the index level to make a column of it, and then do the groupby:
In [44]: df.reset_index(level='Date').groupby(level=0).last()
Out[44]:
ColumnName  Date  Value
Name
A              3      6
B              4      6

Thanks @jorisvandenbossche , yet you don't think that a native way (faster) is justifiable ?

@pedrobraz1990 this is as fast as it gets.

all right then. should I close this issue request then ?

already did

BTW, there is actually an even easier solution:
In [202]: df.groupby(level='Name').tail(1)
Out[202]:
ColumnName  Value
Name Date
A    3          6
B    4          6

.tail() acts like a 'filter' method, so keeping the index intact.
@pedrobraz1990

but then I won't get the whole dataframe, right ?

@pedrobraz1990 What do you mean exactly? Of course you don't get the whole dataframe, as you are selecting the last row of each group?

oh sorry. I had the impression that tail only returned the last 5 rows. But yes, I meant all the last of each group rows.

Ah yes, tail() on a dataframe will indeed return the last 5 rows, but when called on a groupby object, it will do that for each group (so tail(1) only the last 1 row for each group).

Awesome ! thanks a lot @jorisvandenbossche

repo: pydata/pandas


text:
WARNING: Color theme None not found by pygments, falling back to XXX

I have Sphinx v6.1.3 and pydata-sphinx-theme v0.13.1  and get these warning messages,

WARNING: Color theme None not found by pygments, falling back to tango.
WARNING: Color theme None not found by pygments, falling back to monokai.

After a make clean it works again, but it re-appears on re-builds.
On top of that, it seems to be erratic, I cannot reproduce this deterministically.
I found the same issue reported in executablebooks/sphinx-book-theme#690 and as far as I understand for them it's an upstream issue, so here I am!
Any takers?

I think I see how this is happening. Here:
https://github.com/pydata/pydata-sphinx-theme/blob/956edcf23085a884298b34fe5f3484ceb671af19/src/pydata_sphinx_theme/__init__.py#L955-L958
we added the hasattr condition to prevent errors, but this allows theme_name to continue being None sometimes, which then triggers the warning on the subsequent lines.
I think the right fix here is to just not warn if theme_name is None...  we really only need to warn if the user specifically asked for a highlighting theme that we can't actually deliver.  I'll open a PR.

I get this one sometimes for no reason and then it behaves normally again. Kudos if you find the root of the problem

authors: 12rambau HealthyPear drammock

repo: pydata/pydata-sphinx-theme


text:
Top bar no longer respects title overwrites

It used to be possible (0.9) to have a root index.rst-file which specified:
.. toctree::
   :hidden:

   API reference <_autosummary/my_module>

To header bar would then say 'API Reference' rather than 'my_module'. This no longer seems to be the case as of 0.10.

I confirm the bug from one of my documentation.
It's a feature of Sphinx so I don't see when we could have changed the parser.
Thanks for reporting !

update: we are now parsing the titles ourselves since https://github.com/pydata/pydata-sphinx-theme/pull/878, I'm going to check if we can get the titles back


text:
Move publish to new workflow

OK that last one didn't fix it. So this PR tries to move the publish step into its own workflow that depends on our tests workflow completing.

Also going to try merging this one to see if this fixes it. Sorry for all the noise folks.