text:
Add --keep to finish step

As a User I want to leave my provisioned system running so I can manually check its state and hack around.
Proposal:
tmt run --all finish --keep will run all steps but keep the provisioned system running and as a last message it will inform user about:
a) way how to connect to it (docker exec, ssh to machine + used key)
b) hint how to clean it up later (e.g. tmt run --id XX finish)

I think that current --unit execute is enough, especially with login command.
Closing this issue as not relevant any more.

repo: psss/tmt


text:
tmt export --nitrate --create malformes adjust rule

Before export:
adjust:
  when: distro ~< rhel-8.4
  enabled: False

After export when key is missing:
adjust:
    enabled: false

This makes fmf/tmt to raise fmf.utils.FormatError: No condition defined in adjust rule., including in tmt test lint
I used
tmt-1.3.1-1.20210330165247205001.master.64.g02badb3.fc33.noarch
fmf-0.15.2-1.20210326172917712489.master.3.ga401333.fc33.noarch

Easier steps to reproduce:

tmt init
create 'before.fmf` with

test: true
adjust:
  when: distro ~< rhel-8.4
  enabled: False

run reproducer.py

import tmt
test = tmt.Tree('.').tests(names=['/before'])[0]
with test.node as data:
    data["foo"] = "bar"

Interesting enough I was not able to reproduce it with pure 'fmf' e.g. in
import fmf
with fmf.Tree('.').find('/before') as data:
    data["foo"] = "bar"

This seems to be caused by the adjust() method. Pure fmf reproducer:
import fmf
tree = fmf.Tree('.')
tree.adjust(fmf.context.Context())
test = tree.find('/before')
with test as data:
    data["foo"] = "bar"

Should be fixed by psss/fmf/pull/124.

I'd say this is a blocker - Use needs to revert adjust rule changes but keep added extra-nitrate  and if user doesn't commit fmf files before tmt export (which is not yet enforced by tmt) then they loose original adjust data for good.

source: gharchive/issue

authors: lukaszachy psss

license: MIT

license_type: permissive

license_source: github-api


text:
Send OA reminder emails at 7 a.m. Eastern on Mondays

It seems like the timing of the OA reminder emails has been creeping backward. This week I see they went out around 11 p.m. Sunday.
If possible, it would be nice to set them to begin sending at a set time -- 7 a.m. Eastern on Monday. We are starting to see folks replying to us Sunday night.

This is happening more frequently lately.  We might want to look in to how large the email is that fails.  It could be that there's a user with a lot of publications listed, and there's an email that times out because it takes a while to send.

authors: ajkiessl anaelizabethenriquez

repo: psu-libraries/researcher-metadata


text:
Error when running commands or opening neovim

Hello - following the recent update i get this error when performing some operations for example  if i open yank bank and pressdd or i do ciW in normal mode.

I also get this warning when opening nvim:

Oh sorry about that, that is happening because I added some expanded API functionalities to the plugin (pinning and unpinning bank entries), and I had to add new fields to the sqlite table.
If you run :YankBankClearDB, the problem will be resolved.
Sorry for the inconvenience, I'm not planning on making any more DB schema changes in the future though, so hopefully this will be the only time you have to do this.

Wow thanks for the quick reply really appreciate it!
All solved now ❤  and thanks for the great plugin!

authors: Leonard-Pat ptdewey

repo: ptdewey/yankbank-nvim


text:
Update orangetheses gem

Update gem orangetheses when https://github.com/pulibrary/bibdata/issues/2237 is resolved

We are current pinned to this gem: https://github.com/pulibrary/orangetheses/commit/4ac8dc2bd04b10db764fc37df3261531c9937061.

authors: christinach kevinreiss

repo: pulibrary/bibdata


text:
modernize js

the examples could be better (what is example 1 doing?) but at least this is an obvious improvement
also one of those times Functional classes are faster (example 2)
example 3 has a few polyfills and is outdated but didn't change it. Also I found the source: https://github.com/xui/xui/blob/master/src/base.js
    throw RangeError(`Cannot create product ${this.name} with a negative price`);

has 4 indent and then 77 chars = 81 chars. There might've been a line length max but it's not documented and https://github.com/pulsar-edit/language-examples/blob/master/languages/git.COMMIT_EDITMSG has a longer line.
kinda resolves #1

I mean that is why I opened a issue against it. Even from my rudimentary knowledge of js.... Even I knew it was outdated 😅

source: gharchive/pull-request

repo: pulsar-edit/language-examples


text:
C# example snippets for template deployments are corrupted

File: docs/reference/pkg/azure-native/resources/deployment.md
The Parameters property assignments are missing a value, which doesn't even compile.
It would be useful to have this be an actual working example of how to pass parameters, and also add an example that shows how to use an inline template JSON string rather than a template link.

This appears to be a bug in C# CodeGen.
An example of the broken C# code:
using Pulumi;
using AzureNative = Pulumi.AzureNative;

class MyStack : Stack
{
    public MyStack()
    {
        var deployment = new AzureNative.Resources.Deployment("deployment", new AzureNative.Resources.DeploymentArgs
        {
            DeploymentName = "my-deployment",
            Properties = new AzureNative.Resources.Inputs.DeploymentPropertiesArgs
            {
                Mode = "Incremental",
                Parameters = ,
                TemplateLink = new AzureNative.Resources.Inputs.TemplateLinkArgs
                {
                    QueryString = "sv=2019-02-02&st=2019-04-29T22%3A18%3A26Z&se=2019-04-30T02%3A23%3A26Z&sr=b&sp=rw&sip=168.1.5.60-168.1.5.70&spr=https&sig=xxxxxxxx0xxxxxxxxxxxxx%2bxxxxxxxxxxxxxxxxxxxx%3d",
                    Uri = "https://example.com/exampleTemplate.json",
                },
            },
            ResourceGroupName = "my-resource-group",
        });
    }

}

The equivalent correct TypeScript:
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const deployment = new azure_native.resources.Deployment("deployment", {
    deploymentName: "my-deployment",
    properties: {
        mode: "Incremental",
        parameters: {},
        templateLink: {
            queryString: `sv=2019-02-02&st=2019-04-29T22%3A18%3A26Z&se=2019-04-30T02%3A23%3A26Z&sr=b&sp=rw&sip=168.1.5.60-168.1.5.70&spr=https&sig=xxxxxxxx0xxxxxxxxxxxxx%2bxxxxxxxxxxxxxxxxxxxx%3d`,
            uri: "https://example.com/exampleTemplate.json",
        },
    },
    resourceGroupName: "my-resource-group",
});

authors: DaRosenberg lukehoban

repo: pulumi/docs


text:
duplicate resource type

Hello!

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)

Issue details
It seems that resource Switch and Subnet refer the same thing, alicloud_vswitch in Terraform.
And documentation for Subnet resource is incomplete.
If Pulumi intentionally use Subnet as an "alias" for Switch, the documentation should be fixed, and improved by saying that both resource type do the same thing, except different urn.
Personally, I would prefer removing Subnet resource from alicloud provider, to stay in consistent with alicloud terms.

Hi @zhangyoufu - thank you for reporting this!
It does appear that the Subnet resource is either deprecated or never existed. This should get fixed with the next release of this provider in #262.
Thank you and apologies for any confusion.

Hi @guineveresaenger
#262 (closed) was superseded by #278 (merged), but this issue still exists. Please take a look. Thanks.

Hi @zhangyoufu - I added a deprecation message to the Subnet resource. Because removing this is a breaking schema change, we will remove it on the next major release of this provider.

authors: guineveresaenger zhangyoufu

repo: pulumi/pulumi-alicloud


text:
Cannot override bucket name

I'm attempting to write some pulumi code to manage an S3-based website.
For this to work, you must be able to specify a bucket name exactly. This doesn't seem to be happening, though?
    web_bucket = s3.Bucket(
        f'{name}-bucket',
        __name__=domain,
        website={
            "index_document": "index.html"
        },
        website_domain=domain,
        **opts(parent=self),
    )

Is producing bucket names like dingbots.dev-6fe3d77, and it's not clear how to override this.

I believe that passing bucket=domain instead of __name__=domain should accomplish what you want here.

What is __name__ supposed to be, anyways?

Yes, that did it.

repo: pulumi/pulumi-aws


text:
Non-idempotent SNS topic creation workaround

This addresses https://github.com/pulumi/pulumi-aws/issues/2009.
Previously the creation of an SNS topic was idempotent, so you could create multiple pulumi resources corresponding to the same SNS topic, causing confusing behaviour when one was deleted/replaced.
With this PR, trying to create a topic which exists will error.
Note that this is kind of a breaking change - pulumi programs where the same SNS topic was created through multiple pulumi resources would run fine before but will now error.
Note also the mutex around the listing and creating of SNS topics - this is needed to prevent race conditions within the same program. Race conditions with other programs are still possible and that is unavoidable because of the AWS API.

What does TF do in this case? Does TF have the same problem? If so is there an upstream ticket ref?
Does this solve updates as well or only creates?

Actually reading the original ticket, it sounds like this fix will make it fail loudly, which is slightly better than current silent corruption behavior but still not ideal? To confirm is that what we're going for?

Yeah, exactly - this change will make the creation of a second SNS topic with the same name fail, instead of the current behaviour of silently passing and creating weirdness down the line.

This is the upstream issue: https://github.com/hashicorp/terraform-provider-aws/issues/6245

I'm a little wary of cost-benefit of this PR since upstream didn't fix it we're introducing a bit of slowdown and failure mode for creating the topic, but if we do it right (without slowing down for clients with 1000 topics) I think on balance the fact that it's an upvoted request both in our repo and upstream - let's try it! Thank you!

https://github.com/pulumi/pulumi/issues/9925 looks like the exact issue this fixes - Fraser noted they are related there. Might be worth lifting the logic into the bridge since there's a few of these resources.
I'll merge this and then raise this as a workaround for idempotent creates.
Edit: thinking about this a bit more, it might be a bit difficult to lift in the bridge, since there'd be a lot of specific logic for determining the logical name of the resource - our reads prob work off the URN, which would not be the same in this case.

pulumi/pulumi#9925 looks like the exact issue this fixes - Fraser noted they are related there. Might be worth lifting the logic into the bridge since there's a few of these resources.
I'll merge this and then raise this as a workaround for idempotent creates.
Edit: thinking about this a bit more, it might be a bit difficult to lift in the bridge, since there'd be a lot of specific logic for determining the logical name of the resource - our reads prob work off the URN, which would not be the same in this case.

We would be calling TFs read in the case of the bridge, not Pulumi's. In essence, we would ask TF to "import" the resource, and if the import succeeds, we would then fail.

authors: VenelinMartinov iwahbe t0yv0


text:
experienceUpdate

is this packet changed also ?

on.experienceUpdate(level, current_exp, need_exp) experience information update (if logined with auth token)

cant seem to get it to retrieve info
here is how im using it.. but nothing is
	myClient.on('experienceUpdate', function(level, current_exp, need_exp) { //if facebook key used and server sent exp info
	if (config.logging) fs.appendFileSync('log.txt', 'Experience update: Current level is ' + level + ' and experience is ' + current_exp + '/' + need_exp + "\r\n", encoding = 'utf8');
	});

Nope, it works but the login packet changed so this is why u didn't get experienceUpdate.

already got the login change...

@SzAmmi Hey, I need to contact you on skype, please add me on skype: nicolasdelito

I planning to remove experienceUpdate event since i think its now in miniclip server (which is not supported by agario-client).
Does experienceUpdate works for anybody? Can i remove it?

not working for me, remove it

authors: Salvationdk SrNicolas SzAmmi pulviscriptor

repo: pulviscriptor/agario-client

license: mit

license_source: bigquery


text:
Link card arrow should be clickable.

The ::after arrow should be brought into the __inner link so it's clickable. Right now most of the card is clickable except the arrow.

Wrong project. :(

repo: punkave/apostrophe


text:
Updates and cleanup

Deleted obsolete files
Updated gradle and gradlew files
Added an .editorconfig for codestyle consistency
Adapted all the code to the .editorconfig automatically using Ctrl+Alt+L
Fixed several spelling mistakes in the code and cleaned up a few things
Updated badge and grammar in fastlane and README

@TacoTheDank This is great. Will need some time to review it. Nice work!

Special thanks for spelling mistakes fixes. English is second language for me and usually I am too lazy to verify it.

quick question: can we have gradle task or a script for verifying code style using editor config?

quick question: can we have gradle task or a script for verifying code style using editor config?

I don't think there's a gradle task for it. I think it sets the codestyle automatically while editing.

authors: TacoTheDank punksta


text:
(Issue #58) Do not hard code java path in backup class.

Since the javahome parameter is required. It makes sense to use the
path ${javahome}/bin/java.

Good idea.
Concerning tests, I'd prefer two see this covered more distinctly:

the existing specs should just make sure the default values are applied (from params)
a new test should be added that only concerns itself with the java path that ends up being used, given the parameter value

:+1:

The javahome is actually a required parameter. It used to be set
$javahome,

But I think because that effects the puppet module scoring, I made it
$javahome = undef,

I think I should perhaps make it
$javahome = 'UNSET'

and fail if it is it equals 'UNSET'.
Alternatively add support for the puppetlabs-java module and enable that by default, with an option to turn it off.
I generally find Java pretty hard to manage, Each of my developers have there own opinions what Java version to install and whether it should be from the OS package management tools or directly from oracle. With regards to stash, I kind of feel I want them to explicitly set this and not automatically decide for them.
Atlassians tools generally tend to prefer Oracle JDK/JRE over Open JDK/JRE. To enable this for RHEL, you need to get into managing subscriptions to RHEL channels and so on. I am also not sure how good the supprot is for Oracle java using the https://forge.puppetlabs.com/puppetlabs/java#limitations
To make things even worse as per Atlassian

Support for Java 7 is deprecated, and will be removed in Stash 4.0. Which should released soon.

To me Java is such huge animal it should be managed by the user with a stash role/profile and they should explicitly set what they want to use when calling the module.
Let me know your thoughts.

On 03/25/2015 11:49 AM, Merritt Krakowitzer wrote:

I think I should perhaps make it
$javahome = 'UNSET'
and fail if it is it equals 'UNSET'.

If you feel compelled to perform such antics to please the arcane
mechanisms that power the Forge, it might be those that need fixing or
adjusting. /cc @ryancoleman

Alternatively add support for the puppetlabs-java module and enable
that by default, with an option to turn it off.

That would make the module more self-contained, yes. Good UX.
On the other hand, if we pull this specific Java module in as a
dependency, some users might feel patronized, or will outright have to
forego this module if they cannot have puppetlabs-java in their
environment. I myself am rather sensitive about such things, bordering
on the irrational.

Almost certainly you did not mean to cc @ryancoleman on this. No worries, but you may want to figure out who to cc.

Right. Sorry! I was thinking of @ryanycoleman.

Funny. @ryancoleman is my cousin. /me waves.

@ffrank I feel like I'm missing a piece of context. How's the Forge forcing that behavior?
I agree with you regarding keeping the module discrete and expecting someone to provide their own java. To me, it's a trade-off between simplicity for someone who just wants to puppet module install and puppet agent -t vs flexibility for those who want to choose which content satisfies the dependencies.
For something as big as Atlasssian Stash, I think it's safe to expect someone to do the extra work to satisfy the dependency on java. Bonus points for including in the README docs on how to satisfy the dependency with puppetlabs-java.

Oops, right - the context seems to be gone from this thread.
Here is what @mkrakowitzer had originally written (sorry Merritt if you wanted this gone ;-)

The javahome is actually a required parameter. It used to be set
$javahome,
But I think because that effects the puppet module scoring, I made it
$javahome = undef,
I think I should perhaps make it

I see how a module would score lower for having loads of required parameters. But if this becomes an incentive to build horrors around artificial defaults and calls to the fail function, then overall quality may suffer.

@ffrank no problem, after rereading your initial comment I felt I missed the mark with my response re this PR.
I have tried to address your concerns with an updated PR.
I removed a lot of duplication in the tests and moved them to its own file, all with default params. I left the tests as is that test for the download.
I added a new test that only concerns itself with the java path that ends up being used, given the parameter value.

i think puppetlabs-java's main problem, and the reason we don't use it in complex environments is: https://github.com/puppetlabs/puppetlabs-java/pull/110

@igalic I don’t want to be merging my own commits? Would you be happy to merge this assuming you feel I have addressed everyones comments? and there are no other points that need to be addressed?

absolutely!

authors: ffrank igalic mkrakowitzer nibalizer ryancoleman ryanycoleman

repo: puppet-community/puppet-stash


text:
feat(chromium): roll Chromium to r768783

This corresponds to Chromium 84.0.4147.0.
This roll include:

Revert "Enable SameSiteByDefaultCookies and CookiesWithoutSameSiteMustBeSecure"

This seems good to go % the devtools-protocol revision change. Thanks!

authors: hanselfmu mathiasbynens

repo: puppeteer/puppeteer


text:
(QENG-1735) set up local windows vm without cygwin and get it working

ensure that you can install PE
deal with setting PATH/RUBY env vars
update DSL methods to work on windows without bash

@liamjbennett My first pass at getting cygwin-less windows support in Beaker.

@anodelman awesome. I'll review + test tomorrow. I've been raising more windows PRs so we'll need to work it out.

@liamjbennett i did redesign your powershell wrapper to create an array instead of a string - to bring it into line with the rest of the wrappers.  Otherwise, the rest should 'just work'(tm).

Refer to this link for build results (access rights to CI server needed):
http://jenkins-beaker.delivery.puppetlabs.net//job/Beaker Combined Smoketest/513/
:red_circle: Test failed.

Also need to fix enable_root_login here: beaker/host_prebuilt_steps.rb

Refer to this link for build results (access rights to CI server needed):
http://jenkins-beaker.delivery.puppetlabs.net//job/Beaker Combined Smoketest/521/
:red_circle: Test failed.

Yeah, I do have to reconnect after puppet installation to make the pathing work - which I don't understand.  Wish that there was a better way to refresh, but haven't found anything in my digging.

Refer to this link for build results (access rights to CI server needed):
http://jenkins-beaker.delivery.puppetlabs.net//job/Beaker Combined Smoketest/525/
:red_circle: Test failed.

Refer to this link for build results (access rights to CI server needed):
http://jenkins-beaker.delivery.puppetlabs.net//job/Beaker Combined Smoketest/560/
:red_circle: Test failed.

Only known puppet foss debian 7 error.

repo: puppetlabs/beaker


text:
Support plugins under 'private-key.key-data' and 'interpreters' in transport config

This allows the key-data suboption for the private-key config option
to be a plugin reference.
!bug

Allow plugins under key-data in private-key config
The key-data suboption for the private-key config option once
again supports plugins.

This allows plugins to be set under individual interpreters in transport
config.
!bug

Allow plugins under individual interpreters in transport config
Individual interpreters under the interpreters transport config
option once again support plugins.

Lol https://github.com/puppetlabs/bolt/pull/2482 - I also explicitly set it to false for some properties -not sure which solution we'd prefer?

authors: beechtom lucywyman

repo: puppetlabs/bolt


text:
Blog post / office hours announcement for DevX Team Near Future work

[x] Create a draft announcement for PM to announce on the IAC Blog about the DevX Team's near future
[ ] Make office hours announcement in addition to the above

https://docs.google.com/document/d/16IY1pKLc3Wms6WWcyHeUBlX0gJaZDImFUgMCjx7SEIo/edit?usp=sharing

Great job @da-ar - happy enough with the current state. I'll let @michaeltlombardi give final sign off, then we can probably call this done and publish it.

authors: da-ar sanfrancrisko

repo: puppetlabs/devx


text:
(FACT-1246) Return the first value found in ID_LIKE

The ID_LIKE field may contain a space-separated list of related OS
families. Some Cisco platforms exercise this feature, and when they
do so, we only want to return the first value found.

:+1:

Cherry-picking to stable?

AppVeyor failure is due to using 64-bit Git in AppVeyor. I should have fixes for that in a sec.

Rebased and green now. This should be good to go.

authors: MikaelSmith kylog peterhuene

repo: puppetlabs/facter


text:
(maint) Fix a typo in Puppet::Network::HTTP::API::Master::V3::Environ…

…ment
Thanks to Ryan Coleman for complaining and to Brian Cain for actually
finding where it was hiding.

:+1: Hurray!

I'm excellent at complaining.

authors: briancain lutter ryanycoleman

repo: puppetlabs/puppet


text:
(PUP-7519) Enable security top YAMLLoad rule in rubocop scans

Enabling 'Security/YAMLLoad' rubocop rule for now per PUP-7834 work. There still are some eval and MarshalLoad usages that need to be addressed.

CLA signed by all contributors.

Looks good, though we'll need to get PR #https://github.com/puppetlabs/puppet/pull/6118 merged first, so adding the blocked label.

Superseded by https://github.com/puppetlabs/puppet/pull/6972

authors: joshcooper jsane puppetcla


text:
(PDB-4277) Add logback logstash encoder

This commit adds a dependency on net.logstash.logback/logstash-logback-encoder
which is described in the PuppetDB documentation as a tool for transforming
log messages into JSON format:
https://puppet.com/docs/puppetdb/6.2/logging.html#json-text
Prior to this commit, the required library was missing from the uberjar. The
library is managed by clj-parent as Puppet Server includes it.

CLA signed by all contributors.

Test PASSed

Thanks! We'll get this merged in https://github.com/puppetlabs/puppetdb/pull/2840 into the 5.2.x branch

authors: Sharpie austb puppetcla puppetlabs-jenkins

repo: puppetlabs/puppetdb


text:
Fix postgresql::sql task when password is not set

When password is not set, { 'PGPASSWORD' => password } unless password.nil? evaluates to nil, setting env_hash to nil.
nil is then passed as the first argument of Open3.capture3 which
result in an exception:
/opt/puppetlabs/puppet/lib/ruby/2.7.0/open3.rb:213:in `spawn': no implicit conversion of nil into String (TypeError)
	from /opt/puppetlabs/puppet/lib/ruby/2.7.0/open3.rb:213:in `popen_run'
	from /opt/puppetlabs/puppet/lib/ruby/2.7.0/open3.rb:101:in `popen3'
	from /opt/puppetlabs/puppet/lib/ruby/2.7.0/open3.rb:281:in `capture3'
	from /opt/puppetlabs/mcollective/tasks-spool/899e9e0635bb53f1a09b4716548ff69f/files/sql.rb:13:in `get'
	from /opt/puppetlabs/mcollective/tasks-spool/899e9e0635bb53f1a09b4716548ff69f/files/sql.rb:27:in `<main>'

Make sure env_hash is always a hash to fix this issue.

Thank you @smortex for your contribution.

Thank you @smortex for your contribution.

Codecov Report

Merging #1226 (e748a87) into main (08e3a51) will increase coverage by 0.37%.
The diff coverage is 54.54%.

@@            Coverage Diff             @@
##             main    #1226      +/-   ##
==========================================
+ Coverage   65.81%   66.18%   +0.37%
==========================================
  Files          14       14
  Lines         351      349       -2
==========================================
  Hits          231      231
+ Misses        120      118       -2

Impacted Files
Coverage Δ

...ns/postgresql/postgresql_acls_to_resources_hash.rb
0.00% <0.00%> (ø)

...b/puppet/functions/postgresql/postgresql_escape.rb
0.00% <0.00%> (ø)

...puppet/functions/postgresql/postgresql_password.rb
0.00% <ø> (ø)

lib/puppet/functions/postgresql_escape.rb
0.00% <ø> (ø)

lib/puppet/functions/postgresql_password.rb
0.00% <ø> (ø)

lib/puppet/provider/postgresql_conf/parsed.rb
100.00% <ø> (ø)

.../puppet/provider/postgresql_conn_validator/ruby.rb
80.00% <ø> (ø)

lib/puppet/type/postgresql_conf.rb
93.33% <ø> (ø)

lib/puppet/type/postgresql_conn_validator.rb
100.00% <ø> (ø)

lib/puppet/type/postgresql_replication_slot.rb
100.00% <ø> (ø)

... and 4 more

Continue to review full report at Codecov.

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

Codecov Report

Merging #1226 (e748a87) into main (08e3a51) will increase coverage by 0.37%.
The diff coverage is 54.54%.

@@            Coverage Diff             @@
##             main    #1226      +/-   ##
==========================================
+ Coverage   65.81%   66.18%   +0.37%
==========================================
  Files          14       14
  Lines         351      349       -2
==========================================
  Hits          231      231
+ Misses        120      118       -2

Impacted Files
Coverage Δ

...ns/postgresql/postgresql_acls_to_resources_hash.rb
0.00% <0.00%> (ø)

...b/puppet/functions/postgresql/postgresql_escape.rb
0.00% <0.00%> (ø)

...puppet/functions/postgresql/postgresql_password.rb
0.00% <ø> (ø)

lib/puppet/functions/postgresql_escape.rb
0.00% <ø> (ø)

lib/puppet/functions/postgresql_password.rb
0.00% <ø> (ø)

lib/puppet/provider/postgresql_conf/parsed.rb
100.00% <ø> (ø)

.../puppet/provider/postgresql_conn_validator/ruby.rb
80.00% <ø> (ø)

lib/puppet/type/postgresql_conf.rb
93.33% <ø> (ø)

lib/puppet/type/postgresql_conn_validator.rb
100.00% <ø> (ø)

lib/puppet/type/postgresql_replication_slot.rb
100.00% <ø> (ø)

... and 4 more

Continue to review full report at Codecov.

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

Thanks @smortex . We have timeout issues on centos 8 for travis. We have opened a ticket for the issue. Will be disabling them till the issue is sorted. So that it wont hold any PRS. Thanks for your contribution.

authors: codecov-io sheenaajay smortex

repo: puppetlabs/puppetlabs-postgresql


text:
(QENG-2616) Telly - Cannot Find Test Files Using Beaker...

... 2.8+ Logs/JUnit Reports

beaker added a directory level that telly couldn't handle
addeds support for --dry-run, which just process the junit file
without creating a TestRail api connection or attempting to submit
results

Refer to this link for build results (access rights to CI server needed):
http://jenkins-qe.delivery.puppetlabs.net/job/qe_telly_btc-intn/3/
Test PASSed.

authors: anodelman puppetlabs-jenkins

repo: puppetlabs/telly


text:
reDialog的循环引用导致Cannot access 'reDialog' before initialization

描述问题 (Describe the problem)
在app.vue 引用reDialog组件时，报错：Cannot access 'reDialog' before initialization，我看是reDialog/index.ts里import了index.vue，然后在index.vue里又引用了index.ts的方法导致的，但是直接用这个工程下载下来执行没有报错，这是少了什么东西吗？
如何复现该问题 (How to reproduce the problem)
我是之前版本的想升级一下，加了这个reDialog组件报错了
操作系统和浏览器信息 (Operating system and browser information)
No response
验证 (Verify)

[x] 是否仔细阅读过 文档 (Have you read documentation carefully)
[x] 检查是否存在相同或类似的问题 issues (Check for the same or similar issues)

额 平台不都是引入好了吗 无需你多引入

repo: pure-admin/vue-pure-admin


text:
[NLU-4008] [Part-I] Numeral words resolved incorrectly

This PR contains fix for

Some numeral words are recognized as number but resolved incorrectly to 0. Some exx from our entity benchmark (may not be exhaustive), excluding "الحادية عشرة", which resolves to 10 currently instead of 11.

أحد عشر ‘eleven’ (lit. “ten one”, I think)
مئة ‘one hundred’
مئتان ‘two hundred’

Several numeral words are not recognized as numbers; here is a list of such from our entity benchmark (so may not be exhaustive)
مليونًا ‘million’

ثلاثمائة ‘three hundred’
ثمانمائة ‘eight hundred’
ألفان ‘two thousand’
Also, added some mappings and regexs which are missing for other numbers. To increase the coverage, added some extra tests in this PR.
PS: I will create another PR for the rest of the two issues mentioned in the bug.

Pipeline run: https://jenkins.ininica.com/job/NLU/job/Recognizers-Text/365/console

repo: purecloudlabs/Recognizers-Text


text:
Update to PureScript v0.15.0

Description of the change
Backlinking to purescript/purescript#4244
Updates project to compile on v0.15.0 PureScript.

Checklist:

[x] Added the change to the changelog's "Unreleased" section with a reference to this PR (e.g. "- Made a change (#0000)")
[x] Linked any existing issues or proposals that this pull request should close
[ ] Updated or added relevant documentation
[ ] Added a test for the contribution (if applicable)

:ping_pong: @thomashoneyman

repo: purescript-contrib/purescript-these


text:
Incompatibility between Deadpool and Cornucopia

I'm getting the same errors as described in #53, even though deadpool is pinned to 10.5.
Downgrading cornucopia from the latest 0.6.0 to 0.4.0 makes it work as described.

Fixed

repo: purton-tech/rust-on-nails


text:
services/chatkit/user_already_exists now called services/chatkit/bad_request/user_already_exists

it's leaves me wondering why my app wasn't working right when I didn't change anything, only to figure out the error code was changed and no announcement or even list of errors in documentation is available.
Please consider notifying your users and document this as well. It's pretty annoying.
It's not related to this library as it is a server thing, but I can't find a right place to report this or even how to contact Pusher about this.

@xxRockOnxx sorry about this. This was an internal refactoring on the error-handling code with unintended consequences.
We will be reverting this change ASAP.

authors: luismfonseca xxRockOnxx

repo: pusher/chatkit-client-js


text:
Notifications not working for new ios devices

I am using Pushy for an Ionic-Cordova app. Notifications are working for Android devices and for Old iPhones (ex iphone 7) but for iphone 12 it is not working and we can't even see the device id in the pushy dashboard and when I search for the device in the dashboard I get this message (as in the attached img).

Hi @Omar611,
We'd be glad to assist.
As a reminder, you can only send notifications to Pushy device tokens returned from the "Pushy.register()" SDK method, and not directly to APNs device tokens.
Please let us know the device token you are trying to send a notification to which results in the "No devices matched the specified condition" error.

This is the token for the device 43fd6f71a3dc0c20aeb2b9

Hi @Omar611,
We'd be glad to assist.
Pushy registered devices and their tokens are tied to a single specific Pushy dashboard app.
The device token you mentioned is registered to a Pushy app with ID 5d9226bb0d5e92160d1d0610. Please make sure you visit the right Pushy app in your account dashboard to send a notification to this device. Here's the link, for your convenience:
https://dashboard.pushy.me/apps/5d9226bb0d5e92160d1d0610/send
When pasting this device token into the above page, it will send the notification successfully.

Ok so I tried that and I got this message "We could not find an app with that ID in your account."
So does that mean that my IOS app isn't registering that phone for any reason ?
If that is the case so why is it registering the other older iPhones ?

Hi @Omar611,
What that means is that your iOS app is registered to a Pushy dashboard app in another Pushy account, not the one you are currently logged in to in the dashboard.
When you register an iOS device for notifications with Pushy, it will automatically associate itself with the Pushy dashboard app that bears the same iOS Bundle ID, unless you call Pushy.setAppId() to override this behavior.

Please ensure you have an app in your Pushy dashboard account with the same iOS Bundle ID as your Cordova iOS Xcode project.
Is your app calling Pushy.setAppId() and passing in a Pushy app ID to override this behavior?

Most likely, the device is being associated with an app in one of your colleague's Pushy accounts, instead of your own.

For no#1 I have only one dashboard that uses the same iOS Bundle ID as my Cordova iOS Xcode project.
As for no#2 should I add call this Pushy.setAppId() inside the callback of Pushy.register(function (err, deviceToken) { //code} or in the same place I call the Pushy.setNotificationListener

Hi @Omar611,
Thanks for clarifying
There is actually no need to call Pushy.setAppId() unless you have a specific reason to do so.
Please reach out to us via support@pushy.me and we'll be glad to provide more info on the account your device is getting registered to.

Hi @Omar611,
Thanks for clarifying.
There is actually no need to call Pushy.setAppId() unless you have a specific reason to do so.
Please reach out to us via support@pushy.me and we'll be glad to provide more info on the issue.

repo: pushy-me/pushy-cordova


text:
🛑 SDM is down

In 0999d4d, SDM (https://sdm.unmer.ac.id/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: SDM is back up in fec4ba1 after 12 minutes.

repo: pusimgit/upptime


text:
🛑 Jurnal is down

In e2bc81d, Jurnal (https://jurnal.unmer.ac.id) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Jurnal is back up in 295c914 after 4 minutes.


text:
feature: Connect Login to Swipe and Finished Sign up (including updating database)

goodnight :)

goodmorning 💯

authors: ClaireLapatrada puyepuye


text:
Update top ranking issue test failure

Describe the bug
Top ranking issue test fails on a PR
To Reproduce
Steps to reproduce the behavior:

Go to #2234
See test log

Error: "Resource not accessible by integration"
Expected behavior
Pass?
Versions:

python: 3.12

Additional context
I think this new top ranking issue feature is pretty cool 👍🏾
Not sure what's happening here with the test failure, I do not quite understand the error message.

Yes, it's not supposed to run on PRs really.  We enabled it on PRs for testing purposes but now it should be removed.  #2269

authors: RDaxini kandersolar

repo: pvlib/pvlib-python


text:
Windows rebuild

Addresses a few issues with the current Windows implementation and hopefully makes future dev less time-intensive.
Major Changes:

Removed asynchronous Rust challenge-proxy for synchronous challenge-proxy written in C to address challenge IO bugs.
Added windows build steps that allow for using cached windows installation.
Added post_install.sh and post_install.ps1 which leverage cached windows installation and should be primary location for future changes to Windows VM.

I deny the red checkmark of "operation cancelled"!

repo: pwncollege/dojo


text:
Has this repo become unmaintained?

Currently running pwndoc@3.0 and looking into upgrade options.
Love the tiptap update and the table support, but seen no activity since May 6.

It has a commit 19 hours ago, so I think it is maintained.

authors: Klego adicpnn

repo: pwndoc-ng/pwndoc-ng


text:
Upload binary releases

Can you upload some binary releases and preferably targeting .NET 2.X ?

There are no plans for supporting 2.x.
@irsdl got it working at least for 1 gadget but Im not sure how can we get it working for all versions

Created CI integration and released binaries

There are no plans for supporting 2.x.
@irsdl got it working at least for 1 gadget but Im not sure how can we get it working for all versions

I am going to release what I have soon in another PoC Repo as my solution is hacky and still probably requires .NET3.5 DLLs on the box (I need to investigate this further). Watch this space :)

authors: CaledoniaProject irsdl pwntester


text:
ChannelValue not taking :host styles

Describe the bug
In channel-value/channel-value.component.scss there is this field
:host {
    display: inline-flex;
    align-items: center;
}

but this style applied neither on storybook nor on showcase.
What is the expected behavior?
Styles should go through so that the component pxb-channel-value can be properly vertically aligned in an info list item. This is also what React Component Library did in ChannelValue's React Counter Part.
What are the steps to reproduce?

Go to showcase
See the list of info list items

Screenshots or links to minimum reproduction example
In showcase,

What is your environment?
Browser

[ ] Internet Explorer
[ ] Edge
[ ] Safari
[x] Chrome
[ ] Firefox

Operating System

[x] MacOS
[ ] Windows
[ ] Other

This happened when we switched to view encapsulation of none. We need to go through the components and see which ones were using :host styles before and do a little refactoring to remove the need for these rules (try to move the styles elsewhere).

authors: huayunh joebochill

repo: pxblue/angular-component-library


text:
[ENH] Add ability to draw graphs with a title

Closes #23
Changes proposed in this pull request:

Adds a keyword argument for graph labels to viz.draw

Before submitting

[ ] I've read and followed all steps in the Making a pull request
section of the CONTRIBUTING docs.
[ ] I've updated or added any relevant docstrings following the syntax described in the
Writing docstrings section of the CONTRIBUTING docs.
[ ] If this PR fixes a bug, I've added a test that will fail without my fix.
[ ] If this PR adds a new feature, I've added tests that sufficiently cover my new functionality.

After submitting

[ ] All GitHub Actions jobs for my pull request have passed.

Sure! Just getting used to the procedure for this repo.

Codecov Report

Merging #71 (557d7a7) into main (c387f8a) will increase coverage by 0.38%.
The diff coverage is 71.49%.

@@            Coverage Diff             @@
##             main      #71      +/-   ##
==========================================
+ Coverage   84.03%   84.42%   +0.38%
==========================================
  Files          29       34       +5
  Lines        2255     2555     +300
  Branches      578      687     +109
==========================================
+ Hits         1895     2157     +262
+ Misses        254      251       -3
- Partials      106      147      +41

Impacted Files
Coverage Δ

pywhy_graphs/classes/admg.py
95.12% <ø> (ø)

pywhy_graphs/classes/cpdag.py
83.67% <ø> (ø)

pywhy_graphs/classes/pag.py
82.25% <ø> (ø)

pywhy_graphs/export/tigramite.py
0.00% <0.00%> (ø)

pywhy_graphs/testing.py
50.00% <50.00%> (ø)

pywhy_graphs/export/pcalg.py
55.04% <55.04%> (ø)

pywhy_graphs/export/tetrad.py
68.75% <68.75%> (ø)

pywhy_graphs/classes/intervention.py
88.17% <71.42%> (-3.72%)
:arrow_down:

pywhy_graphs/export/numpy.py
72.85% <72.85%> (ø)

pywhy_graphs/export/causallearn.py
79.22% <80.95%> (ø)

... and 3 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

Hey @adam2392 I think I implemented all the changes you requested. Sorry for the delay though.

Thanks @aryan26roy !

repo: py-why/pywhy-graphs


text:
Valorant success predictor

This program computes the success rate of taking/retaking sites in valorant and includes support for all maps. The underlying formula is based on fixed constants, and it is these constants that are changeable by the user depending on the nature and progress of the game. Written in python.

Hey @Mainakdey1 . Not able to understand your project. It sounds quite interesting and something unique.
If you can explain more to help me to understand this. It would be helpful for me.
Are you using any ML algo. , DL or something else??
Need your answer on above quarries @Mainakdey1 .

Yeah, so I'm basically looking at how many different strats a certain team has for taking a site, which are used sequentially. So if you apply the same strat to take a site multiple times in a row, your chances of taking the site reduces, right? So it accounts for all the strats and the round no to calculate strat effectiveness. Then it uses that number to calculate success in a percentage. It's a really simple program that should do things in the future that it doesn't do rn:

Strat effectiveness based on past success
Strat effectiveness based on the number of players remaining

The player loss count that my program gives out is based on ideal takes/retakes.
No I don't use any ml stuff.

Ok @Mainakdey1 .Now I got it.
Your Idea is Cool.
PR accepted @Mainakdey1
Successfully merged to HacktoberFest_22 repo.
🚀🚀👍


text:
Verification sal

The Structure-Amplitude-Location (SAL) method has been added. Note that the original approach suggested by (Wernli et al., 2009) is based on a simple minimum threshold (f), but here we used tstorm function to detect objects (Feldmann et al., 2021). Using this function allows to have a more realistic way to detect precipitation as objects.

Thanks for the PR @EsmailGhaemi !
I took the freedom to advance with the more obvious changes, including the suggestions from @aperezhortal.
If possible, I'd like to ask @feldmann-m for a review, since this implementation now heavily relies on her feature detection method.
Next, I'll work on some more refactoring, including the use of the _init, _accum, and _compute methods.

To maintain consistency across verification metric interfaces, perhaps the auxiliary functions used for the SAL computation can be moved to a separate module (like sal_utils.py or sal.py). And implement sal, sal_init, sal_accum, sal_merge, and sal_compute in the spatialscores.py module. By doing so the SAL internals using pandas dataframes and the pysteps.verification function using arrays and dictionaries are kept separated.

I also thought about it, and at the moment I'm more of the idea that SAL can be considered a separate case as init, accum, merge, and compute do not really apply here... thus commit 71033e4 extract all the SAL methods into a separate module. What do you think?

I also thought about it, and at the moment I'm more of the idea that SAL can be considered a separate case as init, accum, merge, and compute do not really apply here... thus commit 71033e4 extract all the SAL methods into a separate module. What do you think?

:+1:
Also, maybe we can import the sal.sal() function the verification metrics to make it accessible from the spatialscores.
from pysteps.verification import spatialscores

spatialscores.sal(array1, array2)

In this way, all the spatial metrics can be found in the same place.

Tests for python=3.6 are still failing...
I have troubles reproducing the error locally (still working on it).
Also, #253 might solve the problem by setting the minimum python version to 3.7 ...

Setting the minimum python version to 3.7 (d92904a) fixed the remaining failing tests.
I'm merging this PR, thanks again to @EsmailGhaemi for the original contribution and to @aperezhortal and @feldmann-m for the valuable inputs during the review!

For plotting: I think using a scatter plot with the L component as the color arg would work. The input can be sal or accum_sal. I'll add it ASAP.

@EsmailGhaemi it's an excellent idea to provide such a plotting functionality! I suggest to introduce it with a separate PR, perhaps together with an example script for the gallery?

authors: EsmailGhaemi aperezhortal dnerini

repo: pySTEPS/pysteps


text:
Updated README documentation

Update README.md
Update README_CN.md

@cutelolly sorry we didn't forget about your PR. The problem we are facing is that we actually use the Readme.rst in the documentation. Moving to md could be an issue. with @MaxJPRey we are looking for solutions

repo: pyansys/pyaedt


text:
Issue 291 doc params

Description
Tutorial and notebook for parameter values. To be merged after #299 as there may be a clash
Fixes #291
Type of change
Please delete options that are not relevant.

[x] New feature (non-breaking change which adds functionality)

Key checklist:

[x] No style issues: $ flake8
[x] All tests pass: $ python run-tests.py --unit
[x] The documentation builds: $ cd docs and then $ make clean; make html

You can run all three at once, using $ python run-tests.py --quick.
Further checks:

[x] Code is commented, particularly in hard-to-understand areas
[x] Tests added that prove fix is effective or that feature works
[x] Any dependent changes have been merged and published in downstream modules

Codecov Report

Merging #303 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #303   +/-   ##
=======================================
  Coverage   97.63%   97.63%
=======================================
  Files          53       53
  Lines        3093     3093
=======================================
  Hits         3020     3020
  Misses         73       73

Continue to review full report at Codecov.

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

Thanks, updated

authors: codecov-io tinosulzer

repo: pybamm-team/PyBaMM


text:
#307 remove duplicate code in integrals

Description
Refactor IndefiniteIntegral to remove duplicate code
Fixes #307
Type of change

[x] New feature (non-breaking change which adds functionality)

Key checklist:

[x] No style issues: $ flake8
[x] All tests pass: $ python run-tests.py --unit
[x] The documentation builds: $ cd docs and then $ make clean; make html

You can run all three at once, using $ python run-tests.py --quick.
Further checks:

[x] Code is commented, particularly in hard-to-understand areas
[x] Tests added that prove fix is effective or that feature works
[x] Any dependent changes have been merged and published in downstream modules

Codecov Report

Merging #308 into master will increase coverage by 0.14%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #308      +/-   ##
==========================================
+ Coverage   96.86%   97.01%   +0.14%
==========================================
  Files          53       53
  Lines        3257     3250       -7
==========================================
- Hits         3155     3153       -2
+ Misses        102       97       -5

Impacted Files
Coverage Δ

pybamm/expression_tree/unary_operators.py
92.35% <100%> (+2.35%)
:arrow_up:

pybamm/discretisations/discretisation.py
100% <100%> (ø)
:arrow_up:

pybamm/expression_tree/symbol.py
97.64% <100%> (+0.03%)
:arrow_up:

Continue to review full report at Codecov.

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


text:
Catch ValueError when choosing iOS version target

When the user reaches the following point, if they enter (for example) 8.1, rather than 1, python throws a ValueError, because it's trying to convert to an int. This moves the version selection code inside the "Invalid selection" try: except: block, which gives the user another chance to enter the correct value, rather than crashing.
Available iOS versions:
  [1] iOS 8.1
  [2] iOS 7.1
  [3] iOS 10.2
  [4] iOS 8.2
Which iOS version do you want to target: 8.1

You're welcome!

repo: pybee/briefcase


text:
DO NOT MERGE

Test for Big Sur Homebrew Python

Pull Request Test Coverage Report for Build 1228406688

0 of 0   changed or added relevant lines in 0 files are covered.
324 unchanged lines in 23 files lost coverage.
Overall coverage decreased (-3.7%) to 76.672%

Files with Coverage Reduction
New Missed Lines
%

src/main/python/pybuilder/pip_utils.py
1
94.22%

src/main/python/pybuilder/pluginloader.py
1
87.1%

src/main/python/pybuilder/terminal.py
1
75.47%

src/main/python/pybuilder/plugins/python/core_plugin.py
2
89.9%

src/main/python/pybuilder/plugins/python/integrationtest_plugin.py
2
45.45%

src/main/python/pybuilder/plugins/python/unittest_plugin.py
2
81.48%

src/main/python/pybuilder/plugins/core_plugin.py
3
89.74%

src/main/python/pybuilder/plugins/python/coverage_plugin.py
4
51.3%

src/main/python/pybuilder/execution.py
5
91.56%

src/main/python/pybuilder/install_utils.py
5
86.32%

Totals

Change from base Build 1227498790:
-3.7%

Covered Lines:
4798

Relevant Lines:
6075

💛  - Coveralls

authors: arcivanov coveralls

repo: pybuilder/pybuilder


text:
add sticky table header on grid page

I think sticky table header is more convenient, especially on big scrollable grids

This is AWESOME!
I apologize for how long it's taken to merge this in.

authors: idealatom pydanny

repo: pydanny/djangopackages


text:
[PYD-140] use_enum_values config does not work for collections of enums in subclasses

Initial Checks

[X] I have searched GitHub for a duplicate issue and I'm sure this is something new
[X] I have searched Google & StackOverflow for a solution and couldn't find anything
[X] I have read and followed the docs and still think this is a bug
[X] I am confident that the issue is with pydantic (not my code, or another library in the ecosystem like FastAPI or mypy)

Description
When a subclass of a model accesses a superclass's collection of enums, the enums are returned instead of their values.
Example Code
from pydantic import BaseModel
from typing import List
from enum import Enum

class Foo(Enum):
    FOO = 'foo'
    BAR = 'bar'

class FooModel(BaseModel):
    foo: Foo
    foo_list: List[Foo]

class FooExt(FooModel):
    class Config:
        use_enum_values = True

f = FooExt(foo='foo', foo_list=['foo', 'bar'])
{'foo': f.foo, 'foo_list': f.foo_list, 'f_dict': f.dict()}

In the code example above, I'd expect the output to be
{'foo': 'foo',
 'foo_list': ['foo', 'bar'],  # <--
 'f_dict': {'foo': 'foo', 'foo_list': ['foo', 'bar']}}

instead of
{'foo': 'foo',
 'foo_list': [<Foo.FOO: 'foo'>, <Foo.BAR: 'bar'>],  # <--
 'f_dict': {'foo': 'foo', 'foo_list': ['foo', 'bar']}}

Python, Pydantic & OS Version
pydantic version: 1.10.4
            pydantic compiled: True
                 install path: /Users/jsamoocha/.local/share/virtualenvs/stravalib_fork-PV0q2u3e/lib/python3.10/site-packages/pydantic
               python version: 3.10.8 (main, Dec  4 2022, 13:57:44) [Clang 14.0.0 (clang-1400.0.29.202)]
                     platform: macOS-13.1-arm64-arm-64bit
     optional deps. installed: ['email-validator', 'typing-extensions']

Affected Components

[X] Model Config

PYD-140

As of v2.0b3, this config setting doesn't seem to do anything during serialization. In particular, the snippet above now behaves even worse.

The only place this is tested is here: https://github.com/pydantic/pydantic/blob/78f0ce65295bba764784da15eca83173f9ccf9b6/tests/test_main.py#L601-L611
And this test seems completely wrong to me! it should be:
def test_enum_values():
    FooEnum = Enum('FooEnum', {'foo': 'foo', 'bar': 'bar'})

    class Model(BaseModel):
        model_config = ConfigDict(use_enum_values=True)
        foo: FooEnum

    m = Model(foo='foo')
    # this is the actual value, so has not "values" field
    assert type(m.foo) is str, type(m.foo)
    assert m.foo == 'foo'

authors: adriangb dmontagu jsamoocha

repo: pydantic/pydantic


text:
Fix tagged unions multiple processing in submodels

Change Summary
In some cases like that:
import enum
from typing import Annotated, Literal

from pydantic import BaseModel, Field

class ComponentType(enum.IntEnum):
        SomeComponent1 = 1
        SomeComponent2 = 2

class SomeComponent1(BaseModel):
    type: Literal[ComponentType.SomeComponent1] = ComponentType.SomeComponent1

class SomeComponent2(BaseModel):
    type: Literal[ComponentType.SomeComponent2] = ComponentType.SomeComponent2

Component = Annotated[SomeComponent1|SomeComponent2, Field(discriminator='type')]

class TestModel1(BaseModel):
    components: list[Component]

class TestModel2(BaseModel):
    components: list[Component]

class TestModel3(BaseModel):
    submodels: TestModel1|TestModel2

apply_discriminators function could process tagged-unions because the tagged-union contains discriminator, but doesn't take that the schema was processed in another model. I excluded tagged-unions from the recursive processing.
I'm not sure about the place of the fix. Possibly a better place for this is _ApplyInferredDiscriminator.apply
https://github.com/pydantic/pydantic/blob/15d5e0b0abdd79fd63d34954e8dacaa9f1a255f8/pydantic/_internal/_discriminated_union.py#L154-L160
Related issue number
Fix #6339

Checklist

[x] Unit tests for the changes exist
[x] Tests pass on CI and coverage remains at 100%
[ ] Documentation reflects the changes where applicable
[x] changes/<pull request or issue id>-<github username>.md file added describing change
(see changes/README.md for details)
[x] My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

Selected Reviewer: @lig

please review

We need to start requiring change files.

I missed all the fun :sweat_smile:

@samuelcolvin / @dmontagu  Is there going to be a minor release sometime soon with this fix? I use nested discriminated unions pretty extensively in my API so this is currently blocking my upgrade to v2

authors: a10y samuelcolvin suharnikov


text:
Support SecretDate type

Change Summary

Related issue number
Closes https://github.com/pydantic/pydantic/issues/8441
Checklist

[x] The pull request title is a good summary of the changes - it will be used in the changelog
[ ] 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

Selected Reviewer: @sydney-runkle

@conradogarciaberrotaran,
Thanks for your work on this! Looking great thus far. Just curious - are there any other types that you'd like to see SecretX versions of?
The tests look great 🚀.
Now that we have more than just 2 SecretX types (used to just be SecretStr and SecretBytes), I think it makes sense to change the _SecretField class to more cleanly support a variety of secret types. I need to think a bit more about what the best pattern for this is.
Would it be ok if I pull your branch down and try a few variations on the code that you've added thus far?

Sure! This was a quick implementation I've tried. I'm not yet fully familiar with V2 way of defining new types.
I was thinking that we could make it a kwarg of Field, as in
foo: str = Field(secret=True)
SecretStr = Annotate[str, Field(secret=True]
what do you think?

@conradogarciaberrotaran,
Great, I'll pull it down soon :).
I can see the argument for that, though I think it spirals in that we'd have to support secret behavior for all types in that case. I think for now we'll probably want to stick with explicitly defined secret types.

Makes sense, let me know how can I assist, I'd really like to contribute with Pydantic :)

@conradogarciaberrotaran,
Sure thing! Alright, I've pushed some changes in regards to how we inherit from _SecretField.
Currently, we don't support the validation of SecretX types on their own. For example:
from pydantic import SecretStr, TypeAdapter, ValidationError

s_invalid = SecretStr(123)
print(f"type: {type(s_invalid.get_secret_value())}, value: {s_invalid.get_secret_value()}")
#> type: <class 'int'>, value: 123

try:
    ta = TypeAdapter(SecretStr)
    s_validated = ta.validate_python(123)
except ValidationError as e:
    print(f"ValidationError: {e}")
    """
    ValidationError: 1 validation error for json-or-python[json=function-after[SecretStr(), str],python=union[is-instance[SecretStr],function-after[SecretStr(), str]]]
    Input should be a valid string [type=string_type, input_value=123, input_type=int]
        For further information visit https://errors.pydantic.dev/2.6/v/string_type
    """

I've removed the support for this for SecretDate. I've also modified a few of the tests that are failing as a consequence of this removed support.
I think for now, we should stick to not supporting that behavior, as implementation would require some complex changes (I don't think we'd want to import the SchemaValidator directly).
As a side note, this issue is related to the above discussion: This issue is related: https://github.com/pydantic/pydantic/issues/7353.

@conradogarciaberrotaran,

Makes sense, let me know how can I assist, I'd really like to contribute with Pydantic :)

Could you please update this example with SecretDate functionality? https://docs.pydantic.dev/latest/examples/secrets/#serialize-secretstr-and-secretbytes-as-plain-text
Other than that, I think this PR is ready for review, so I'll mark it as such. I've labeled many of our other issues as help wanted if you're interested in tackling another task!
Thanks a bunch for your help with this - we'er super excited to adopt this feature :).

Please review

Thanks! I'll take a look at the docs and will probably try to make a secret Enum!

Thanks! I'll take a look at the docs and will probably try to make a secret Enum!

Sounds great! Ping me for a review when you're done :).

idea looks good, I wonder if we're be better to implement this via

SecretDate = Annotated[date, Secret(repr=lambda value: '****/**/**')]

So we can easily add more types, even if we can't use the Secret type for SecretStr and SecretBytes until V3 for compatibility reasons.

Agreed. @conradogarciaberrotaran, are you interested in adding this type, or would you like me to? I can also help you get a start if you need 👍.
Also, thanks for making the changes that @samuelcolvin requested. Your changes look good.

A help getting started would be great, I'm not sure if this should be a PydanticMetadata or a Representation.
How can we tackle the issue with strict on json_or_python_schema?

@conradogarciaberrotaran,
Sure thing. Working on the 2.6 release today, but I can help write some starter code re Samuel's new pattern suggestion early next week.
Here's an issue that might help with the strict problem: https://github.com/pydantic/pydantic/issues/7838
Or this one: https://github.com/pydantic/pydantic/issues/7759

@sydney-runkle Thanks!
Changes to add strict are already pushed, good luck on the release!

please review

Fork sync'd and rebased with main.

@conradogarciaberrotaran,
Great, thanks. I'm working on some starter code for the Strict metadata annotation that I'll push later today, then let you take things from there 👍.

Sounds good :)

@conradogarciaberrotaran,
We ran into some issues with the attempted implementation via a Secret annotation. Using a different workaround, and will have that logic up tomorrow. Sorry for the delay!

No worries!

@conradogarciaberrotaran,
If you want, I can also write the tests + docs. Just let me know what you'd prefer :).

Sorry for the delay Sydney, I discovered this issue and I'm trying to debug it:
from datetime import date
from pydantic import PlainSerializer, Secret, BaseModel
from typing_extensions import Annotated

class _SecretDate(Secret[date]):
    def _display(self) -> str:
        return '****/**/**'

SecretDate = Annotated[
    _SecretDate,
    PlainSerializer(lambda v: v.get_secret_value()
                    if v else None, when_used='json'),
]

class User(BaseModel):
    date_of_birth: SecretDate

user = User(date_of_birth='2017-01-01')

print(user.model_dump())

>> / home/cono/dev/pydantic/pydantic/main.py: 316: UserWarning: Pydantic serializer warnings:
>> Expected `Union[date, date]` but got `_SecretDate` - serialized value may not be as expected
>> return self.__pydantic_serializer__.to_python(
    ....

print(user.model_dump_json())

>> ---------------------------------------------------------------------------
>> PydanticSerializationError                Traceback(most recent call last)
>> Cell In[5], line 1
>> --- -> 1 user.model_dump_json()
>>
>> File ~/dev/pydantic/pydantic/main.py: 360, in BaseModel.model_dump_json(self, indent, include, exclude, by_alias, exclude_unset, exclude_defaults, exclude_none, round_trip, warnings)
>> 329 def model_dump_json(
>> 330     self,
>>     331     * ,
>> (...)
>> 340     warnings: bool=True,
>> 341) -> str:
>> 342     """Usage docs: https://docs.pydantic.dev/2.6/concepts/serialization/#modelmodel_dump_json
>>     343
>>     344     Generates a JSON representation of the model using Pydantic's `to_json` method.
>>    (...)
>>     358         A JSON string representation of the model.
>>     359     """
>> - -> 360 return self.__pydantic_serializer__.to_json(
>> 361         self,
>> 362         indent=indent,
>> 363         include=include,
>> 364         exclude=exclude,
>> 365         by_alias=by_alias,
>> 366         exclude_unset=exclude_unset,
>> 367         exclude_defaults=exclude_defaults,
>> 368         exclude_none=exclude_none,
>> 369         round_trip=round_trip,
>> 370         warnings=warnings,
>> 371).decode()
>>
>> PydanticSerializationError: Error serializing to JSON: PydanticSerializationError: Error calling function `< lambda >`: TypeError: object of type '_SecretDate' has no len()

@chbndrhnns,
No worries at all. Hmm, that's odd. We can chat with @davidhewitt on Monday about these if we haven't found a solution before then. I'll take a closer look!

@conradogarciaberrotaran,
I've pushed some changes with a bandaid fix, so the following now works:
from datetime import date
from pydantic import PlainSerializer, Secret, BaseModel
from typing_extensions import Annotated

class _SecretDate(Secret[date]):
    def _display(self) -> str:
        return '****/**/**'

SecretDate = Annotated[
    _SecretDate,
    PlainSerializer(lambda v: v.get_secret_value().strftime("%Y-%m-%d") if v else None, return_type=str, when_used='json'),
]

class User(BaseModel):
    date_of_birth: SecretDate

user = User(date_of_birth='2017-01-01')

print(user.model_dump())
#> {'date_of_birth': _SecretDate('****/**/**')}

print(user.model_dump_json())
#> {"date_of_birth":"2017-01-01"}

I made a note to remove the branch that I changed within the __len__ function once we figure out what's going on in pydantic_core re that check. I'm wondering if it's happening here: https://github.com/pydantic/pydantic-core/blob/8be45e67aa0de48727331057366e2abc21cfc2c5/src/serializers/mod.rs#L181. This is a question for @davidhewitt, though.

Sounds good, I'll finish this during weekend!
Thanks!

Just pushed some changes that greatly simplify the schema of Secret[X].
You can apply a strict constraint directly on X, but not on the Secret[X] type, like follows:
from datetime import date
from pydantic import PlainSerializer, Secret, BaseModel, Strict
from typing_extensions import Annotated

StrictDate = Annotated[date, Strict()]

class SecretDate(Secret[StrictDate]):
    def _display(self) -> str:
        return '****/**/**'

class User(BaseModel):
    date_of_birth: SecretDate

user = User(date_of_birth=date(2017, 1, 1))

print(user.model_dump())
#> {'date_of_birth': SecretDate('****/**/**')}

print(user.model_dump_json())
#> {"date_of_birth":"****/**/**"}

We probably want to support it at the Secret[X] level as well (see failing tests), but I'm not sure how we want to go about this yet, given the simplified schema.

So, just a summary of where we're at:

[ ] Need docs updates (both api + concepts) for Secret type, though this probably should wait until we've entirely ironed out our design for the Secret[X] API
[ ] Figure out how to support Strict() specification on Secret types directly, now that we're not using the clunky Union schema
[ ] Fix failing docs tests once we finalize the new Secret API
[ ] Figure out why a len check is run using a custom PlainSerializer so that we can disable len checks on Secret[X] types

Just pushed missing tests and doc updates!
let me know if we're missing something else

please review

Update, I don't think this is required for this PR:
 Figure out how to support Strict() specification on Secret types directly, now that we're not using the clunky Union schema

It'd be a nice feature down the line, but you can currently apply Strict on the inner type, which is a good enough start!

I believe all relevant concerns have been addressed here and this is ready for review :).

@conradogarciaberrotaran,
Nice work on helping implement this new feature! It'll be one of the highlights of our 2.7 release :).

Thanks for your help! I hope I can contribute more in the future.

authors: conradogarciaberrotaran sydney-runkle


text:
DOC: Complete R interface section

Currently, "rpy2  R interface" documentation has blank section. Added descriptions to cover required basic topics.

let's redirect to rpy2 for conversions, see #9602

authors: jreback sinhrks

repo: pydata/pandas


text:
TST: tests for GH5873

closes https://github.com/pydata/pandas/issues/5873
code changes were done in https://github.com/pydata/pandas/pull/9101 and https://github.com/pydata/pandas/pull/9061. just adding tests to confirm bugs reported there are handled.

merged via https://github.com/pydata/pandas/commit/28fc02a9eb285177143fb1b80e249fd75b6829b9

authors: behzadnouri jreback


text:
plt.pcolormesh will infer interval breaks per default

Looking at some warnings in #3266 I saw that matplotlib will deprecate the old behaviour of pcolormesh when the shape of the data and the coordinates are equal (they silently cut a row and a column of the data). With the new behaviour they will interpolate the coordinates.
import numpy as np
import matplotlib.pyplot as plt

x = np.array([1, 2, 3])
y = np.array([1, 2, 3, 4, 5])

data = np.random.randn(*y.shape + x.shape)

f, axes = plt.subplots(1, 2)

for ax, shading, behavior in zip(axes, ["flat", "nearest"], ["old", "new"]):
  ax.pcolormesh(x, y, data, shading=shading, vmin=-0.75, vmax=0.75)
  ax.set_title(f"{behavior}: shading='{shading}'")

This is a good thing in general - we already do this for a long time with the infer_intervals keyword. Unfortunately they don't check if the data is monotonic (matplotlib/matplotlib#18317) which can lead to problems for maps (scitools/cartopy#1638). I don't think there is a need to do something right now - let's see what they think upstream.
This change was introduced in mpl 3.3.0

I have a similar issue with nonmonotonic coordinates (mapping a 2D image to a zenith-azimuth space). Solving this is easy when using Matplotlib's API directly, since I can compute mesh coordinates by myself and supply these as pcolormesh()'s x and y arguments; but I can't inject these into xarray's pcolormesh() function. Wouldn't allowing infer_interval=False and passing ordinary arrays as x and y be a good solution?

I have a similar issue with nonmonotonic coordinates (mapping a 2D image to a zenith-azimuth space). Solving this is easy when using Matplotlib's API directly, since I can compute mesh coordinates by myself and supply these as pcolormesh()'s x and y arguments; but I can't inject these into xarray's pcolormesh() function. Wouldn't allowing infer_interval=False and passing ordinary arrays as x and y be a good solution?

Another consequence is that this example in the docs is now meaningless / misleading. I've just come across the series of discussions in cartopy about this issue - it looks quite complex and I'm also not sure yet what to do in xarray in the mean time.

Wouldn't allowing infer_interval=False and passing ordinary arrays as x and y be a good solution?

I'm not sure what you mean by that? You can always set infer_interval=False at the xarray level?

I'm not sure what you mean by that? You can always set infer_interval=False at the xarray level?

Yes indeed, but you cannot pass Numpy arrays as the x and y parameters to set.

authors: fmaussion leroyvn mathause

repo: pydata/xarray


text:
Using Dataset.where() with drop=True causes Boolean variables (dtype bool) to revert to Float (dtype float64)

What happened?
If one uses the .where() method to drop elements from a Dataset, any variable of dtype bool becomes dtype float64
What did you expect to happen?
Any boolean variables should remain boolean in the resulting Dataset
Minimal Complete Verifiable Example
import numpy as np
import pandas as pd
import xarray as xr

mydata = xr.Dataset(
    data_vars=dict(
        myvar=xr.DataArray(
            np.array([
                [False, False, True, False],
                [True, False, False, True],
            ]),
            coords={
                "category": ["A", "B"],
                "time": pd.to_datetime([
                    "2024-08-02T11:00:00+00:00",
                    "2024-08-02T12:00:00+00:00",
                    "2024-08-02T13:00:00+00:00",
                    "2024-08-02T14:00:00+00:00"
                ])
            },
        )
    )
)
print(mydata)
print("---------------------------")
print(f"myvar dtype before calling `.where()`: {mydata.myvar.dtype}")
print("---------------------------")
# The following will use remove some elements using `.where()`
subset = mydata.where(mydata.category.isin(["A",]), drop=True)
print("---------------------------")
print(subset)
print("---------------------------")
print(f"myvar dtype after calling `.where()`: {subset.myvar.dtype}")

MVCE confirmation

[X] Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue in xarray.
[X] Complete example — the example is self-contained, including all data and the text of any traceback.
[X] Verifiable example — the example copy & pastes into an IPython prompt or Binder notebook, returning the result.
[X] New issue — a search of GitHub Issues suggests this is not a duplicate.
[X] Recent environment — the issue occurs with the latest version of xarray and its dependencies.

Relevant log output
<xarray.Dataset> Size: 48B
Dimensions:   (category: 2, time: 4)
Coordinates:
  * category  (category) <U1 8B 'A' 'B'
  * time      (time) object 32B 1722596400000000000 ... 1722607200000000000
Data variables:
    myvar     (category, time) bool 8B False False True ... False False True
---------------------------
myvar dtype before calling `.where()`: bool
---------------------------
---------------------------
<xarray.Dataset> Size: 68B
Dimensions:   (category: 1, time: 4)
Coordinates:
  * category  (category) <U1 4B 'A'
  * time      (time) object 32B 1722596400000000000 ... 1722607200000000000
Data variables:
    myvar     (category, time) float64 32B 0.0 0.0 1.0 0.0
---------------------------
myvar dtype after calling `.where()`: float64

Anything else we need to know?
Possibly linked to #3570 ?
Environment

INSTALLED VERSIONS
commit: None
python: 3.11.0 (main, Mar  1 2023, 18:26:19) [GCC 11.2.0]
python-bits: 64
OS: Linux
OS-release: 5.15.0-1064-azure
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: C.UTF-8
LOCALE: ('en_US', 'UTF-8')
libhdf5: 1.14.2
libnetcdf: 4.9.3-development
xarray: 2024.3.0
pandas: 2.2.2
numpy: 1.26.4
scipy: 1.14.1
netCDF4: 1.7.1.post2
pydap: None
h5netcdf: 1.3.0
h5py: 3.11.0
Nio: None
zarr: None
cftime: 1.6.4
nc_time_axis: None
iris: None
bottleneck: 1.4.0
dask: 2024.8.0
distributed: None
matplotlib: 3.9.2
cartopy: None
seaborn: 0.13.2
numbagg: None
fsspec: 2023.10.0
cupy: None
pint: None
sparse: None
flox: None
numpy_groupies: None
setuptools: 72.1.0
pip: 24.2
conda: None
pytest: None
mypy: None
IPython: 8.26.0
sphinx: None

This is (unfortunately) intended behavior.
The where() method (even with drop=True) does not assume that it can remove all NA values, because it supports conditions with any number of dimensions, which could result in ragged arrays.
Instead, you could achieve the result in your example using array indexing, e.g., subset = mydata.isel(category=mydata.category.isin(["A",]))

authors: JamieTaylor-TUOS shoyer


text:
adjust repr tests to account for different platforms (#9127)

Adjust the expectations in repr tests to account for different object sizes and numpy type representations across platforms, particularly fixing the tests on 32-bit platforms.
Firstly, this involves getting the object type size from NumPy and using it to adjust the expectations in DataArray and Dataset tests.  The tests were already using int64 type consistently, so only the sizes used for Python objects needed to be adjusted.
Secondly, this involves fixing test_array_repr_dtypes_unix.  The test specifically focuses on testing a 32-bit, 64-bit and "native" data type, which affect both size and actual representation (NumPy skips the dtype attribute for the native data type).  Get the expected size from NumPy for the native int type, and reuse repr() from NumPy for all array types.

[x] Closes #9127

Thanks!


text:
added array() method to make MVarray use easier, removed numpy array …

…import from init.py. @hugohadfield  do you think re-using array() like this is bad?  i figured it would only cause problems if you do from clifford import *  and it overwrites numpy.array
this now works, which is a little easier
from clifford import g3,array
import numpy as np
theta = np.linspace(0,2*np.pi,10)
np.e**(theta*array(g3.e12))

Yeah I like it, I wonder if we could also hijack the array wrap stuff in here:
https://github.com/pygae/clifford/blob/19bfa2d42d81df89b57c0b4bbd307b2bcb70c27b/clifford/__init__.py#L981
To try and do it even without the array method...

Lets merge this in the meantime and have a think, from conversing with the Czech guys I think more array methods are definitely wanted by users

authors: arsenovic hugohadfield

repo: pygae/clifford


text:
Incomplete support for push_constant

I'm not sure if this bug belongs to wgpu-py or in some other project.  There appears to be a field that gets lost in going from Rust to Python, and I'm not sure where this gets fixed.
Quick summary: PipelineLayoutDescriptor has a push_constant_ranges field. This field is missing in our structs.py
Longer version: I wrote some code to see if push_constant worked.  At the end is a simple piece of test code.  When I try running run_test(use_auto=False) I get an error:
E           Caused by:
E               In wgpuDeviceCreateRenderPipeline
E               Internal error in ShaderStages(FRAGMENT) shader: mapping for push constants is missing

Even if I run run_test(use_auto=True), where I use "auto" instead of specifying a layout, I get the same error.  Yet there is no way for us to create the mapping that is needed.
I do not see any change in the 22.1 fork for this structure.
import wgpu.utils

SHADER_SOURCE = """
    var<push_constant> color: vec4f;

    @vertex
    fn vertexMain( ) -> @builtin(position) vec4f {
        return vec4f(0, 0, 0, 1);
    }

    @fragment
    fn fragmentMain() -> @location(0) vec4f {
        return color;
    }
"""

def run_test(use_auto=True):
    adapter = wgpu.gpu.request_adapter(power_preference="high-performance")
    device = adapter.request_device(required_features=["push-constants"])

    output_texture = device.create_texture(
        # Actual size is immaterial.  Could just be 1x1
        size=[1024, 1024],
        format="rgba8unorm",
        usage="RENDER_ATTACHMENT",
    )
    shader = device.create_shader_module(code=SHADER_SOURCE)
    if use_auto:
        render_pipeline_layout = "auto"
    else:
        bind_group_layout = device.create_bind_group_layout(entries=[])
        render_pipeline_layout = device.create_pipeline_layout(
            bind_group_layouts=[bind_group_layout]
        )
    pipeline = device.create_render_pipeline(
        layout=render_pipeline_layout,
        vertex={
            "module": shader,
            "entry_point": "vertexMain",
        },
        fragment={
            "module": shader,
            "entry_point": "fragmentMain",
            "targets": [{"format": output_texture.format}],
        },
    )

it looks to be implemented in wgpu-native as an Extra to PipelineLayoutDescriptor. So I believe you have to implement the range in via the nextInChain struct here
https://github.com/pygfx/wgpu-py/blob/c62e65bcbe7375415807c53aca1df0f705a66891/wgpu/backends/wgpu_native/_api.py#L1298
as well as implement the set_push_constants method for renderpass encoder.
I don't see any relevant changes with 22.1 so there shouldn't be conflicts. It does sound like a useful feature to use instead of uniforms.

@Vipitis
I'm not quite sure I understand enough how to get the structure PushConstantRange into the IDL file and why it isn't already in there.  It's also still unclear to me how to use nextInChain since it's almost never used in _api.py.
And why doesn't "auto" work? That seems like a bug.
Writing set_push_constants is relatively easy.  I was hoping I could submit a fully formed push_constant pull request, but it seems I lack the knowledge for the hard part.

I'm not quite sure I understand enough how to get the structure PushConstantRange into the IDL file and why it isn't already in there.

the IDL only specifies the webgpu api, there are some wgpu features beyond those.

It's also still unclear to me how to use nextInChain since it's almost never used in _api.py.

The only real occurance is with DeviceExtras (which wgpu-native uses to set backends)

And why doesn't "auto" work? That seems like a bug.

I don't know where auto modes are implemented or how they work. But how would you expect them to work in this case?

I was hoping I could submit a fully formed push_constant pull request, but it seems I lack the knowledge for the hard part.

I can recommend just going for it. it doesn't need to be perfect on the first commit and you will learn a lot by digging deep through 4 different repositories and come out smarter at the end. Open a draft PR and ask more questions if you feel lost. I spend a lot of time trying to understand some of the inner workings recently and it really changed my view. To the point where I want to implement missing features upstream.

@Vipitis
So if I can ask for one hint.  The Python code calls a C function.  Somewhere that C function call gets turned into a Rust Call.  Where is the code that performs that transformation or describes how to perform the transformation.  If I know the transformation, I can code to it.

@fyellin that would be lib.rs and conv.rs in wgpu-native here https://github.com/gfx-rs/wgpu-native/tree/trunk/src
It also helps to look at the examples there, or (if you have a working build chain setup) try to implement an example there first.
There is also the webgpu-headers repository https://github.com/webgpu-native/webgpu-headers
I found some relevant information here while looking at the blame and the relevant PRs. They often link to more resources or discussions about how certain decisions were made. But that's not relevant for wgpu native features.

Okay.  I think I can close this bug.  After reading the source code, I can see that I'm supposed to use WGPUPipelineLayoutExtras stuffed into the chained field.  Everything I need is in wgpu.h, just not in the way I was expecting to see it.
Expect push_constants() in a week or so.

authors: Vipitis fyellin

repo: pygfx/wgpu-py


text:
Confirmation of ffmpeg 5.* support

According to the documentation, pyglet only supports ffmpeg 4.X.  However, looking at issue #603 or #541, it appears that some versions of pyglet should support ffmpeg 5.X.  If so, please update the documentation with the correct information.

Decoding of compressed audio and video is provided by FFmpeg v4 or v5, an optional component available for Linux, Windows and Mac OS X. FFmpeg needs to be installed separately.

Is specified at the top of the media page.
We will update the installation area as well. Thanks for your issue.

What is the minimum version of pyglet that supports ffmpeg 5.X?

1.5.24

Docs have been updating, so closing this. Thanks for opening the ticket @DManowitz.

authors: DManowitz benmoran56 caffeinepills

repo: pyglet/pyglet


text:
Add functionality for Frequentist IV regression classes

Adding the Frequentist class for implementing IV regression experiments as discussed here: https://github.com/pymc-labs/CausalPy/pull/213

I think linearmodels is a fantastic package for that use case. WDYT?

There is already an issue for statsmodels backend so we can use that. Or a new issue for a linearmodels backend.
Hugo is 7 days old today, so forgive any slowness in responding on my side. We're still near 100% baby logistics.

Wasn't actually expecting a quick reply @drbenvincent !!  Just putting a note here for discussion.
I don't really know the linearmodels package well but happy to consider it. Will pick this up in the existing statsmodels issue.

Coming back to this one. I've had a look at linearmodels as a package. It's great. Has various different ways that you can implement frequentist IV regressions. It has neater and clearer than the documentation than that available for statsmodels. I think i would like to implement the frequentist IV class with linearmodels.
https://bashtage.github.io/linearmodels/iv/examples/advanced-examples.html
How does/should this impact the discussion of the desired backend for frequentist classes?

authors: NathanielF drbenvincent juanitorduz

repo: pymc-labs/CausalPy


text:
[WIP] Paper

We can preview the paper using this link.
A pdf format is available here

@pariterre, minor question.
In the paper I always use the library format to talk about a python library.
In case the library name starts a sentence, I don't capitalize the first letter (because it's not a python class).
Do you think this is correct?
If necessary, you can preview the document here.

repo: pyomeca/pyomeca


text:
Failed to load paths using 2020.6.2

I can see this issue has previously been raised and resolved before here: https://github.com/pypa/pipenv/issues/4220, however, I'm still experiencing errors with the latest version of Pipenv which should include the fix.
Issue description
COPY ./docker_image/Pipfile ./docker_image/Pipfile.lock /workdir/
RUN python -m pip install --upgrade pip pipenv \
  && cd /workdir \
  && python -m pipenv install --system --ignore-pipfile --dev

Expected result
Dependencies are installed without error.
Actual result
Installing collected packages: virtualenv-clone, distlib, filelock, appdirs, six, virtualenv, certifi, pipenv
Successfully installed appdirs-1.4.4 certifi-2020.4.5.2 distlib-0.3.0 filelock-3.0.12 pipenv-2020.6.2 six-1.15.0 virtualenv-20.0.21 virtualenv-clone-0.5.4
Installing dependencies from Pipfile.lock (a7add2)…
Failed to load paths: /bin/sh: 1: /root/.local/share/virtualenvs/python_env-rMBEbzCL/bin/python: not found

Output:
Failed to load paths: /bin/sh: 1: /root/.local/share/virtualenvs/python_env-rMBEbzCL/bin/python: not found

Output:
Failed to load paths: /bin/sh: 1: /root/.local/share/virtualenvs/python_env-rMBEbzCL/bin/python: not found

I got exactly the same error when I wanted to build a Docker image.
When I tested this with the pipenv version from master, this issue was fixed.
I changed the line to install pipenv from
RUN pip install --upgrade pip pipenv

to
RUN pip install --upgrade pip git+https://github.com/pypa/pipenv

I couldn't find the original issue to comment there, I hope this workaround is useful for someone, until the next version is released.

found the commit that seems to have fixed this issue. https://github.com/pypa/pipenv/pull/4319
Think we can close this one.

This issue is still a problem for me when I installed pipenv using pip. Is it really fixed? Not sure if the PR mentioned by @jiashucheniress addresses this issue.

This issue is still a problem for me when I installed pipenv using pip. Is it really fixed? Not sure if the PR mentioned by @jiashucheniress addresses this issue.

hi @jshin49 , the issue is fixed on master, however, the fix hasn't been release yet. atm the way I'm by passing it is by doing the following
python -m pip install git+https://github.com/pypa/pipenv@97324a6932b3fda0ccbabcc349474d74a913e0bc

Did the issue being fixed in the 'Release v2020.8.13'?
I got an error today:
Installing pandas…
⠋ Installing...Failed to load paths: /bin/sh: /Users/johnchan/.local/share/virtualenvs/src-_ygy3i93/bin/python: No such file or directory

Output:
⠙ Installing pandas...Failed to load paths: /bin/sh: /Users/johnchan/.local/share/virtualenvs/src-_ygy3i93/bin/python: No such file or directory

Output:
Failed to load paths: /bin/sh: /Users/johnchan/.local/share/virtualenvs/src-_ygy3i93/bin/python: No such file or directory

Output:
Error:  An error occurred while installing pandas!
Error text:
/bin/sh: /Users/johnchan/.local/share/virtualenvs/src-_ygy3i93/bin/pip: /Users/johnchan/.local/share/virtualenvs/src-_ygy3i93/bin/python: bad interpreter: No such file or directory

✘ Installation Failed

authors: hwmrocker jiashucheniress jshin49 kychanbp

repo: pypa/pipenv


text:
Accelerate build times by using uv instead of pip?

There is a lot of discussion about the Rust-based pip-replacement named uv.

https://astral.sh/blog/uv
https://github.com/astral-sh/uv/blob/main/README.md

Would it be of interest to accelerate pipenv build times by using uv instead of pip?
Is your feature request related to a problem? Please describe.
I'm always frustrated when pipenv builds take several minutes.
Describe the solution you'd like
pipenv builds take seconds instead of minutes.
Describe alternatives you've considered
Switch to non-pipenv solutions for our builds.

I am stuck on the philosophical questions of: would we need to rebrand to uvenv?   maybe it should be a whole new project -- but is it realistically much faster when most things are network activity of getting the wheels, and then they still need to be installed?   In all seriousness though, it might be worth me  taking a deeper look, but we have to admit that pipenv is a big bear hug around pip and so there is a lot to detangle there if there were a motivation to wrap a different package library.

The caching in uv is super impressive.  The first build is lightning fast but the second is astonishing.

+1 for supporting uv

It's been a good ride, but uv has far surpassed pipenv. Unfortunately this is what historically happens to open source projects, something evolutionary comes along and kills old solutions.

UV is still pre v1.0, but since August 20 has fully replaced my Pipenv workflow with the implementation of their lock file.
https://astral.sh/blog/uv-unified-python-packaging

Languages like Go and Rust have quite a different approach to reaching v1.0 than Python does.  Once a package has reached v1.0 in these languages it is kind of a commitment to Never break backward compatibility.  There is no such commitment w/ Python packages.

authors: anoother cclauss connorhsm matteius thernstig


text:
pillow 7.x does not support python 3.9

Automated install fails because it can't build Pillow 7.x with Python 3.9.
Workaround is possibly to install Pillow 8 which does support 3.9.
[cuID:PYPE-1184]

and I just saw there's a poetry.lock file so should I install the packages with that instead?

Poetry is used for pype 3 and that is no ready for release yet. Please use release tags or checkout 2.0/main branch. But ofc we are glad for testing 3.0 :)
About Python version - we are discussing it right now. But we are still trying to adhere to vfx platform so we are now supporting Python 3.7

My bad - I can't remember why I went with 3.9 - I'm going to stick with 2.0 for now. I'll make the shift a bit later and maybe contract it if I'm too busy.

It's actually quite large discussion right now about the python version. We are for instance trying to make a consistent build on Mac OS, but with 3.7 it really is a challenge. While upgrading to 3.9 fully, has a potential to break a number of things, especially in the hosts that are a bit...ehm..behind. (Looking at you Maya and Nuke)

OT thankfully homebrew finally supports M1 and pyenv is building 2.7 and
3.7 on my macbook air - but it was frustrating in december to not have it
On Tue, Feb 23, 2021 at 5:05 AM Milan Kolar notifications@github.com
wrote:

It's actually quite large discussion right now about the python version.
We are for instance trying to make a consistent build on Mac OS, but with
3.7 it really is a challenge. While upgrading to 3.9 fully, has a potential
to break a number of things, especially in the hosts that are a
bit...ehm..behind. (Looking at you Maya and Nuke)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/pypeclub/pype/issues/1043#issuecomment-784054678, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AABNDN47TIBAMYPN5T44TN3TAN4VNANCNFSM4YBJFJAA
.

related to #2523. Plan is to upgrade.

authors: antirotor mkolar rjmoggach robmoggach

repo: pypeclub/OpenPype


text:
{ responseType: "document" } not supported correctly

Test case:
// expected behavior using XHR:
var myPartial = null
var xhr = new XMLHttpRequest()
xhr.open('GET', '/my/partial.html')
xhr.responseType = 'document'
xhr.onreadystatechange = function () { if (xhr.readyState == 4) myPartial = xhr.responseXML }
xhr.send()

// after a second...
myPartial.body instanceof HTMLElement // => true
// all is well.

// -----------------------------------

// behavior using qwest:
qwest.get('/my/partial.html', null, { responseType: 'document' })
  .then(function (xhr, myPartial) {
    xhr.responseXML // => null?!?!
    myPartial.body.querySelectorAll('div') // Yes, this works...
    myPartial.body instanceof HTMLElement // => false?!?!
    // That's not good. When I try to use this later, exceptions get thrown.
  })
  .catch(function (xhr, error) {
    console.error(error)
  })

I looked at the source code for qwest, and so far as I can tell this makes absolutely no sense. It looks like qwest should just let the responseType pass through into the XMLHttpRequest and everything should just be honky-dory. But instead, the responseXML field is null and the response data, while definitely parsed into DOM, is clearly not quite right since the prototypes don't match.

It is weird, indeed. What's the type of body in your case?

The response body is "text/html". No special metadata it just has a '.html' extension. It's a partial, so no DOCTYPE no  and no top level .

The two blanks up there were supposed to be <head> and <body>. They didn't render because I didn't use back ticks!

Hum. So, is it working now? ^^

No, sorry - I was just explaining why my github comment had blanks in it. :/

Ahah ok, I wasn't sure.
Can you debug this by yourself by logging where the code is going in handleResponse()? Or can you publish a working example of your app so I can test this from home?

authors: pyrsmk skorlir

repo: pyrsmk/qwest


text:
[WIP] initial commit of NumPy-based CoC and reporting manual

This is an initial Code of Conduct document which is based on the Numpy CoC. I volunteer to be on the CoC committee.
To Do:

[ ] Create new pysal-conduct@googlegroups.com for reporting?

[ ] Find two other pysalers to volunteers.

[ ] Need a non-pysaler for reports involving committee.

Addresses #1053

Looks good to me! Thank you for preparing this, @jGaboardi! It will probably be reasonable to move this to pysal.org similar to scipy.

@weikang9009 that's a good idea.
@dfolch you had mentioned a few ideas last week at NARSC. Would you be able to put them in here?

(my ideas) for potential external participants:

Joris Van den Bossche
Ralf Gommers
other suggestions?

@weikang9009 Should this issue/PR be migrated to the pysal/pysal.site repo?

@slumnitz Following @weikang9009 's suggestion do you agree that we should close the PR here and open in back up in pysal.site?
Does anyone else have comments/thoughts/suggestions?

Migrating to pysal/pysal.github.io#76

repo: pysal/pysal


text:
Compare gradient rho by FFT vs. gradient rho in real space

I would like to implement a function which calculates gradient rho using fast Fourier transform (FFT) (the so-called "spectral derivative"), and compare it with the gradient rho calculated in real space by eval_rho2(). I see that the first output of eval_rho2() is the 1D array representation of rho. How can I perform FFT (and inverse FFT) on this array in the pyscf framework? I would greatly appreciate your help if a minimal example could be provided.

I don't quite understand what you are going to compare. But the Fourier transform of rho can be obtained as follows:
from pyscf.pbc import tools
rhoG = tools.fft(rhoR, cell.mesh)

Thanks @fishjojo ! Perhaps I should explain my request more clearly. To calculate the gradient rho using FFT, we need to have something like this:
grad_rhoG = 1j * G * rhoG
grad_rhoR = tools.ifft(rhoG, cell.mesh)

I'm wondering how can we obtain G?

Gv = cell.get_Gv()

authors: exenGT fishjojo

repo: pyscf/pyscf


text:
Implementation of HNHN

Dong, Yihe, Will Sawin, and Yoshua Bengio. "HNHN: Hypergraph Networks with Hyperedge Neurons." arXiv preprint arXiv:2006.12278 (2020).

Hello @AS-L-C  ! Thank you for your submission. As we near the end of the challenge, I am collecting participant info for the purpose of selecting and announcing winners. Please email me (or have one member of your team email me) at papillon@ucsb.edu so I can share access to the voting form. In your email, please include:

your first and last name (as well as any other team members)
the title of the model you implemented
the domain of the model you implemented
your pull request number (#127)

Before July 13, make sure that your submission respects all Submission Requirements laid out on the challenge page. Any submission that fails to meet this criteria will be automatically disqualified.

authors: AS-L-C mathildepapillon

repo: pyt-team/TopoModelX


text:
Accounts Merge

Leetcode Question no. - 0721
Problem name - Accounts Merge
Instructions

Create a new folder for your script and file/folder name should be appropriate.
Create a README.md in your folder for program Instructions
add requirements.txt if needed

Programming Language

[x] Python

Happy Coding

@pawangeek please check above PR

repo: python-geeks/Leetcode-scripts


text:
Add support for multiple dialects

This PR addresess adding support for multiple dialects in the lexer.

Hi @Julian , I have framed this initial PR for adding support for multiple dialects to our lexer. I wanted to get your insights before I proceed further.
Some of the pending things:
1. Figuring out how to fetch keywords for each dialect:
The function jsonschema.Draft7Validator.VALIDATORS.keys() doesnt seem to contain all the keywords for the dialect. Eg. keywords such as $anchor, $vocabulary are present here: https://www.learnjsonschema.com/2020-12/ but not present in the function output. So we might need to make a list of these keywords manually.
2. Optimizing and simplifying the code further

Cases handled-

[x] Set of properties that are considered keywords depends on the dialect.

Sample:

[x] Embedded schemas can have a different dialect.

Sample:

[x] The presence of an identifier ($id or id depending on dialect) determines that the subschema is schema resource.

Sample:

[x] Treat an unknown dialect as an embedded schema even though I don't know if it declares an identifier and treat all properties as non-keywords.

Sample:

Need to find a way to figure out this -

[ ] Properties are only keywords inside schemas.

The function jsonschema.Draft7Validator.VALIDATORS.keys() doesnt seem to contain all the keywords for the dialect. Eg. keywords such as $anchor, $vocabulary are present here: https://www.learnjsonschema.com/2020-12/ but not present in the function output. So we might need to make a list of these keywords manually.

Yeah I forgot -- I was going to say the only ones you'll be missing are the annotation keywords, but you're right, $anchor and $dynamicAnchor also won't be there, nor even will then as it's handled by if.
As I mentioned elsewhere, someday this will live in jsonschema-specifications, so I guess do whatever is easiest for you to make sure you've got them, whether that's hardcoding the list from scratch or else using jsonschema.SomeValidator.keys() | {"missing", "keywords"}.
The second thing you need is what I mentioned in the Bowtie pull request. You need a way to explicitly indicate what dialect a schema with no $schema is.
So you want a classmethod, JSONSchemaLexer.with_implicit_dialect(dialect: URI) -> JSONSchemaLexer that takes a dialect to assume and then selects that dialect's keywords, unless of course the schema ends up containing a $schema keyword, in which case you use that URI.
But I'd add that ASAP, once you have it, we can think about merging this on the Bowtie side because Bowtie has that info (which dialect to assume) to provide.

Oh, and since I didn't say it, nice progress already!

@Julian, Added support for specifying dialect while instantiating the JSONSchemaLexer. JSONSchemaLexer()creates the default lexer without any dialect specified while JSONSchemaLexer(dialect_uri) creates the lexer with the specified dialect.
Samples:
1. When nothing is specified:

2. When no schema keyword is specified but specified dialect is 2020-12:

3. When schema specifies 2019-09 but dialect explicitly specified is 2020-12, the $schema keyword takes precedence:

Very nice. Will have a look at the code but screenshots look good.
Another issue to be aware of is that not all dialects support boolean schemas, so that's another thing we could highlight correctly as an edge case.
Specifically, drafts 3 and 4 do not, so if you encounter a boolean in a place where a schema belongs we could highlight that in an error color. But let's do that kind of thing later, it will require knowledge about which keywords contain schemas I think. (Open an issue though maybe if you don't mind).

Nice! Let's merge this and see how it goes. Well done.

authors: Julian sudo-jarvis

repo: python-jsonschema/jsonschema-lexer