FeedGen Dialogue sidebar does not appear after initializing

I have followed the steps of the "getting started" sheet. I have noticed there is no "FeedGen" item in the top navigation menu, and there is no sidebar appearing, so I am not able to run the optimization tool. Thanks!

Thanks for reaching out! If you've already done the "Initialize" step successfully then please refresh the sheet and the menu item should appear.


Update lol_command.rs

Get participant.deaths instead of kills

Haha! Thanks!

Oh woops, I am logged into the wrong account - can't merge it from this one :p


[SMALLFIX] Fixed the output file name from running tests

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/11741/
Test PASSed.


table.column.width is broken with 0.8.5 vs 0.7.6

The following works fine with 0.7.6:
0.7.6
table.add_column()
table.autofit = False  # defaults to True, so have to explicitly turn it off
table.columns[0].width = Cm(2.5)
table.columns[1].width = Cm(13.5)
In 0.8.5. I have to add the width in the table.add_column function.
0.8.5
table.add_column(Cm(13.5))
table.autofit = False  # defaults to True, so have to explicitly turn it off
table.columns[0].width = Cm(2.5)
table.columns[1].width = Cm(13.5)
with 0.8.5 the width of the table is not at all matching the specified width.

I see it's the same issue as #78


Replace mailto links under Team Status to be copy link

Why is this issue important?
behavior for clicking mailto links is confusing and very dependent on user's mail settings
Current State
On new grant details page, under Team Status, a user's email appears as a mailto: link under the status they applied
Expected State
tbd
Implementation Plan
No response
Relevant Code Snippets
No response

https://www.figma.com/proto/0TAG7bAtKIyRBxtCcknrxz/Users-%26-Teams?type=design&node-id=402-15506&t=UGeOmqqiCgNXVkrt-0&scaling=contain&page-id=308%3A10487&starting-point-node-id=402%3A15481
See Sam's prototype for copy / toast behavior.

** Please Note **
The prototype has an alternative toast version, as seen with the last user on the page, "David Saris."
This toast is in line with that table row and appears directly next to the email link the user has clicked. I find this more evident in this context than our 'full page' toast seen with the other users, and I welcome discussion on which version to take.

Thanks Sam! a few follow up questions for @samserif23 and @caitlinwinner

I think the alternative toast version (applied to David Saris) looks really nice... wondering where this would display on the grant details page if the email is really long - would it cause the text to wrap? screenshot below for reference of what the status section looks like
similarly, if we were to apply the toast version applied to Gretchen Mango in the design, where would the toast display on the grant details page? would it be at the bottom right of the Status section?
Also in terms of technical requirements, is there a name of each design component you can provide? And is it correct that the design component includes info about how long the toast displays, colors, fonts, icons, etc that display on the toast?

Hi Claire,
Initial responses are below. Will talk through these with Caitlin and edit as necessary:

For all of these inline toasts, I imagine they cover up the tail end of the information (e.g., emails) instead of wrapping anything and re-structuring page elements. Toasts would be visible for 3-5 seconds, which wouldn't hinder any information for that long.

For the primary toast, I would display it in the exact location, no matter the page. If we decide on the bottom right, it would be anchored from the bottom of the viewport + right margin

I am uploading a design prototype for the grants detail page. The 1st email is an inline toast; the 2nd is the default toast.

Initial naming ideas: 'Toast' for the one on the page's bottom right. This naming can be amended with variants: 'Success-Toast' and 'Error-Toast.'

And 'Inline Toast' for the version next to the trigger. With variants: 'Success-Inline-Toast'...

@ClaireValdivia Link to Figma > USDR Design System > Toast Component

@TylerHendrickson acceptance criteria and designs have been added, passing to you for implementation details! let me know of any questions

@samserif23 What do you think about changing the icon to the left of the email address to the Bootstrap files icon instead of removing the icon altogether?
I see two benefits in moving to the files icon:

This icon is something of a standard symbol for "copy" functionality, and in particular is consistent with the "Copy Link" button displayed elsewhere on the same page.
As a user, I think the presence of the icon would help me better understand what will happen when I click on the email address. Without an icon, I assume it's still a mailto: link.

Here's an example of what this would look like according to our styling:

@TylerHendrickson @caitlinwinner
Ty, our initial decision to remove the icon was to avoid having something redundant on each line, for instance, if we had multiple email addresses in that section.
I agree with your two benefits in helping users understand this is a copy action. What do you think about the icon appearing only on hover and to the right of the email value so as not to shift the text?

@samserif23 To offer another example, @jeffsmohan mentioned that GitHub has a pretty solid implementation of this type of behavior in Pull Request views, and provided this example:
https://github.com/usdigitalresponse/usdr-gost/assets/1851017/56310a51-f37f-45a1-830c-193786a205ce
Thoughts?

I believe the GitHub solution works best.
I'm still thinking the icon should be on the right because on the left, it reads more like a value_type than an action.

@ClaireValdivia Implementation details added.

@ClaireValdivia totally happy to keep this out of scope for this issue, but I'm curious if we want to try to make the copy behavior more consistent between the emails here and the big "copy link" button at the top of the page.

The copy link button confirmation shows for 1s, whereas the tooltip here is spec'd to show for 2.5s.
The big button vs small copy icon present very different UIs for the ~same action. Do we want to try to unify the UIs more? (Personally, I'm not sure we want/need to, but wanted to raise it for consideration.)

@jeffsmohan Regarding the confirmation time, the 1s confirmation should work fine for the tooltip since we are moving away from our in-line toast.

just confirming also that we're good with the separate UIs for now. thanks for raising, Jeff!


[Feature] Add expiry property & Multi-threading

First of all thanks for making this, it is a great step towards the right direction.
The sad news is that the verification process on the client is terribly slow. About 40 seconds on my 3 year old i7-10870H laptop, which is beefier than most people's computers.
This leads to people leaving the form page (switching tabs) while it is verifying. That's not a terrible thing by itself but if you pair that with an expiry mechanism on the challenges, as rightfully suggested in the documentation, (I use redis on the server-side for this) then you get a user who waited a long time to submit a form and once he submits it he gets an error that his captcha has expired...
A temp solution is to apply auto="onload" but doesn't help much on small forms.
I tried decreasing the maxnumber iterations but all it did was fail the verification after pretty much the same time it took to verify before.  I suppose this is a bug but it's also a compromise on security.
Proposal 1
Incorporate an expiry property (in seconds) that gets sent along with the challenge by the server. Once it expires trigger a State.ERROR with the appropriate message.
Proposal 2
Apply multithreading. Spawn multiple workers and split the iterations between them.
What do you think?

Proposal 3
Move the verification code to WASM (Rust ?). I know it won't do miracles but I'd say it would be 30% faster.

Hi there, thank you for your suggestions.
Firstly, it appears that the server is generating a random number that may be too large, causing complexity issues. Adjusting the maximum number generated by the server to around 100,000 should suffice for most cases. It's important to note that the maxnumber parameter on the widget only limits iterations on the client side and doesn't affect the server mechanism.
Proposal 1
Incorporating the expire flag into the challenge would require changing the signature algorithm, as the current process is designed to be stateless. The expire flag would need to be signed as well. At present, it's recommended to include the timestamp in the salt (which is signed) and process it server-side upon verification.
Thus, I'm not in favor of incorporating this into the challenge. However, similar functionality can be achieved by adding this property to the widget. The error state would trigger after the specified time passes. Additionally, expiry can be auto-detected from the HTTP header (Expires). When expired, the widget can also automatically re-fetch the challenge.
Proposal 2
This is indeed a good idea and should be implemented.
Proposal 3
As I'm not an expert on WASM, I'm unsure about the extent to which this would benefit, considering the PoW involves hashing SHA, which I assume both JS and WASM utilize the same underlying crypto layer. Nevertheless, it's worth experimenting with.
Help wanted: This feature request is open to anyone who wants to contribute.

Thus, I'm not in favor of incorporating this into the challenge. However, similar functionality can be achieved by adding this property to the widget. The error state would trigger after the specified time passes. Additionally, expiry can be auto-detected from the HTTP header (Expires). When expired, the widget can also automatically re-fetch the challenge.

 This is a much better approach.

I assume both JS and WASM utilize the same underlying crypto layer.

Actually no, WASM is actually bytecode and doesn't use any Javascript APIs. The language someone picks to code in makes a small difference, but not much. Rust is the go-to these days for such things, but you can compile WASM from pretty much every language.
AFAIK WASM doesn't support multithreading natively yet, you still have to use multiple workers. Thus, although good to experiment with, I think a WASM module for altcha can wait. Multithreading in plain JS (Proposal 2) will give a good enough boost.
P.S. I'll try to make time for this next week.

The multithreading support and the expire attribute are now implemented in the version 0.2.0.
Closing this issues, the WASM support is not a priority for now. Thank you for your help and contributions @rallisf1


project

Expected behavior
Actual behavior
Information about the Issue
Steps to reproduce the behavior

...
...

The most informative issue I've ever seen, I applaud you.


Youtube Terms of service violation

Is this method completely legal or does it violate any of youtube's policies and terms of service? Especially  considering the webview url contains a proxy link to youtube and not the actual link itself.

So is that a yay or nay on the violation?


Non valid startup probe example

In Chapter 13 of the book, section Startup Probes, is an example for a Startup Probe definition:
...
        startupProbe:
          httpGet:
            path: /
            port: 80
          periodSeconds:
          initialDelaySeconds: 30
          periodSeconds: 10
          failureThreshold: 60

The key periodSeconds is given twice, once with an empty value, and then with 10, instead of being unique as required by the specification.

Thanks! Appreciate you noticing this and writing it up for me. I've passed this on to the publisher so we can add it to the errata and fix it if there's a future print run.


FPS fix

Sometimes when you are running gw on high fps / refresh rate, enemies start teleporting around. The only way to fix this for sure is to lock fps on 60 and play like a console player

duplicate of #943


Teams: The requested URL returned error: 401

Hi,
after following the steps to get the token for Teams/Zero Trust and running
$ ./warp.sh -T eyJhbGciOiJSUzI1NiIsImtp[...]xVJuy6NQ7mA
the folowing error is consistently output:
curl: (22) The requested URL returned error: 401
Is there something missing?

I'm assuming you're using Zero Trust/Teams. You just have to be quicker. The token expires after a few minutes.
Note the changed button in the screenshot:

Hey mikaeldui,
being too slow was indeed the issue.
It seems the token is only valid for around a minute or so.
Not sure if others also sometimes counter this, but might be worth mentioning in the readme, just in case.
Thank you 🙏


Update EmissaryClient to exclusively use HTTP digest authentication

A server could negotiate with an emissary client to use HTTP basic authentication and thus coax it to send credentials with a reversible encoding. This change updates emissary's client code to use digest authentication exclusively and fail otherwise.

Related to: https://github.com/NationalSecurityAgency/emissary/security/advisories/GHSA-2p8j-2rf3-h4xr

http authentication before change:
2021-07-07 19:59:23,120 localhost-9001 DEBUG org.apache.http.impl.client.TargetAuthenticationStrategy -   - Authentication schemes in the order of preference: [Negotiate, Kerberos, NTLM, CredSSP, Digest, Basic]`
after change:
2021-07-07 20:05:37,436 localhost-9001 DEBUG org.apache.http.impl.client.TargetAuthenticationStrategy -   - Authentication schemes in the order of preference: [Digest]


Where is the training data？

I can't find the training data or demo data.
I don't know how you guys run this model .

the models links are on the readme
if you are on linux just use miniconda with python 3.9 and follow instructions on the readme
you only need 2 extra commands before
sudo apt install build-essential
and
pip install cython
that's it
for windows is a bit more complex
you can also try the project without any installation using space from huggingface https://huggingface.co/spaces/descript/vampnet
is not the latest version btw

Could you tell me where is the training data？


framed/: Add send_high_water_mark and set_send_high_water_mark

Otherwise, it's not possible to change default send_high_water_mark.

Tagged and published.
//CC @melekes


Build failed

I run ember tests with Percy , before it was working, recently the build always fail with no error showing,

on the platform i get this message

it is working when using percy snapshot snapshots.json but in my case i need to use percySnapshot  during Ember tests,
i am using :

ember: 3.24
node: 14
@percy/cli": 1.24.0
@percy/ember: 4.2.0

thank you.

hey @amiarSlimane we'll require more details here, please reach out to us via http://browserstack.com/support


Form input helper

Hi,
I would like to suggest this feature request:
For my project i must have form input helper (to help user to fill the form) like described in the following google page : http://www.google.com/design/spec/patterns/errors.html
Is there already a way to implement this on my project ?
Thanks,

This is included in the next release.


[Do not merge] Test vendored grpc-1.60.1

Vendor grpc 1.60.1

Stage artifact for testing

Use grpc 1.60.1

Please add a meaningful description for your change here

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
[ ] Update CHANGES.md with noteworthy changes.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

Checked that failed tests are mostly unrelated flaky. Trigger them again


Double Backslash in site with ending Backslash!

This is happening for any site with permalink structure with ending backslash.
So for a page link
http://domain.tld/date/post-title/
The rel link looks like
<link rel="amphtml" href="http://domain.tld/date/post-title//?amp" />
Look at this line.
I know in upcoming version the apm link url is changing to /amp/, just keep this error in mind, and maybe its best not to put another backslash without checking, even if you dont append a backslash at all it should still be fine, as most site with SEO plugin will most likely have an ending backslash already.

Later I found its been already reported #21


Add an additional input variable, with the URL of the destination repo

I'm using a dual deploy mode for my GitHub Pages sites; pushes to the master branch are published in the <organization>.github.io repo, as usual, but pushes to the develop branch are published into an alternate web-preview repo, in an attempt to spot possible errors before the final publish.
With this deploy-pages action, if I got it right, it is only possible to publish into the same repo.
Would it be possible to add an additional input variable, with the URL of the destination repo, to allow publishing to alternate sites?
Thank you!

@ilg-ul Unfortunately, I feel that working across multiple repos isn't a practical extension to this Action (for that matter, most Actions are intended to only work within a single repo).
It sounds like the feature you're describing is effectively trying to achieve preview deployments. The good news is that is a feature on our radar (available for GitHub internal alpha right now) 🎉 , but the bad news is that I cannot commit to an expected release date at this time as our team has some higher priorities to attend to right now. ⏳
In the meanwhile, as a short term workaround, you could use a Personal Access Token to push your develop branch related changes to the separate web-preview, and then have a separate Actions workflow in that repo to do the deployment.


Remove symlink comment in appsettings.ini

Description and Motivation
The device simulation service no longer faces an issue with the /data folder since it is running a single process.
Removing comment about symlink to /app/data.
Change type

[ ] Bug fix
[ ] New feature
[x] Enhancement
[ ] Breaking change (breaks backward compatibility)

Checklist:

[x] All tests passed
[x] The code follows the code style and conventions of this project
[ ] The change requires a change to the documentation
[ ] I have updated the documentation accordingly

Addressed by https://github.com/Azure/device-simulation-dotnet/pull/230


Support of "react-native-windows"

I've started writing the windows module. It depends on new things in "react-native-windows" that are not released yet, I will submit a PR as soon as it's done

https://github.com/mkdotcom/react-native-google-signin
It works but it's not yet ready for a PR, it's just good enough for my needs for now

In an effort to clean the issues up, this is being closed. Please open a new issue if you're still experiencing a problem.


basic transfer fail on web server request, a bug under fc post request

and basic_transfer test fails too.

there is a bug in fc http request, the call point is in wallet_api.cpp, the post request is not working and throw exception, not catched

@clar I've identified the cause, it should be a exception located at https://github.com/bitsuperlab/bitshares_play/blob/develop/libraries/client/wallet_api.cpp#L197
upstream bitshares also have this issue.

Cannot reprocude on clar's env.


Toy sword now specifies BaseItem as parent

About the PR

Made the toy sword inherit from BaseItem
Why / Balance

Fixes a few issues with the toy sword, like it not being throwable and not having a selectable highlight to click on.
Fixes #22736
Technical details

Just one line of YAML to specify a parent
Media

[x] I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Breaking changes

Changelog

Not sure exactly why this failed the integration check. Looks like an unrelated error from Atmos.


TypeError: Cannot read properties of undefined (reading 'length')

Saw this in dev tools after restart with an editor opened that had sticky scroll:
TypeError: Cannot read properties of undefined (reading 'length')
    at Function.filter (lineDecorations.ts:64:23)
    at i.getDomNode (stickyScroll.ts:235:45)
    at S.updateRootNode (stickyScroll.ts:330:38)
    at r._renderStickyScroll (stickyScroll.ts:212:27)
    at r._update (stickyScroll.ts:78:8)

The code block creating this issue is now in a Try Catch statement, this is the output of the console log in the catch statement. Later I'll look more closely at the file lineDecorations.ts, from which the error is originating.

Fixed with 95fd5bf198bc9f0083421ce5a53c05ca0294a7fd


Size of checkbox and radiobutton vectors

checkbox vector vd_checkable_checkbox_checked, vd_checkable_checkbox_unchecked as well as
radiobutton vector vd_checkable_radiobutton_checked, vd_checkable_radiobutton_unchecked have size of 32dp even though visible part fits 24dp square
Would it be possible to trim inside padding and make them consistent with all android icons size - 24dp?
Thanks in advance for your reply.

I think these actually are consistent with how they are implemented in the framework. IIRC I copied them from the framework source code: https://github.com/aosp-mirror/platform_frameworks_base/blob/master/core/res/res/drawable/btn_checkbox_checked_mtrl.xml

That's a bummer. I know checkbox in the framework in 32dp, but actually, that makes it harder to align with other icons. Anyway, I thought you made it with shapeshifter and have access to the source, so it would be easy to make the adjustments. Well, thanks again, I guess the issue can be closed now.

You could pretty easily change it using a <group> I think... i.e. instead of this:
<vector android:viewportWidth="32" android:viewportHeight="32">
  ...
</vector>

you could change it to this:
<vector android:viewportWidth="24" android:viewportHeight="24">
  <group android:translateX="-4" android:translateY="-4">
    ...
  </group>
</vector>

Then you could use avocado to simplify the result: https://github.com/alexjlockwood/avocado


DrumKit Final not building on latest iPadOS

macOS Version(s) Used to Build
macOS 13 Ventura
Xcode Version(s)
Xcode 14
Description
Note: the bug report template assumes macOS only while there’s the Playgrounds also :)
When trying to build the repo downloaded from the github I get the following error:
Referencing instance method 'makelterator ()' on 'Collection' requires the types 'IndexingIterator<AVAudioSequencer>' and 'Indexing|terator<MIDIPlayer>' be equivalent track.isLoopingEnabled = on MIDIPlayer.
Sadly from iPadOS (maybe I’ve missed something), it’s also impossible to update packages once imported?
Feel free to close this if I’ve missed something.
Thank you.
iPad M1 11” (8GB/128GB)
iPadOS 16.1.1
Swift Playgrounds 4.2.1
Crash Logs, Screenshots or Other Attachments (if applicable)
No response

Hello, thank you for your work.
I have the same issue on imac ventura m1


Image is uplodaing to magento media as well

Hi Thai,
I have setup S3 properly and image are auto syncing in to S3 bucket but images are also uploading in magento media folder which must not be .
kindly help for the same.

Hey @kushhot,
This extension hooks into the Magento 2 database media storage functionality, which will download the images to the media folder by default. You should be able to safely delete the images (although maybe take a backup beforehand).
Regards,
Thai


added greet bot for new pull_request and issue

Closes #35

What changes are you asking for? Please specify

Sry, i dont understand what changes are you asking for? Please specify
I am new to open-source :(

I meant to see if you can change the word ASAP used in the below snippet as It finds an urgency which I felt was not necessary. Otherwise, I am fine with adding the greet.
pr-message: 'Thank you for your contribution! Someone will review it ASAP.'

Changed word "ASAP" with "soon"
i hope its okay now :)

@siranjujugi Sry to disturb if you are busy to review changes right now but do let me know if I should add same github action to other code-for-racial-justice repos which require greet bot.


Option to disable texture filtering in 3D Preview

Feature/enhancement description:
Pretty sure I'm not the only one who wants to procedurally generate pixel art textures. For that we need to disable texture filtering in the 3D preview.
Thanks!

This used to be the case since https://github.com/RodZill4/material-maker/pull/40 was merged, but this code is no longer present as of https://github.com/RodZill4/material-maker/commit/c380e305d0b03d0113451e17ca533d2de85d7816.


Terminal variable/environment variable containing path of currently open file

It would be very useful to easily reference the currently open and focused file path within the terminal. Perhaps storing it in a variable would be cool, otherwise a keyboard shortcut which pastes the current file path into the terminal window would work too.

@Neaox you can copy the current file path using ctrl/cmd+k, p and then paste it into the terminal as normal.


Refactor pygsti.baseobjs

Since we're dropping Python 2.7 support with #90, it's easier to avoid circular imports, meaning we can refactor the names under the baseobjs package to other existing packages that make more sense.

Refactored under objects:

baseobjs.smartcache
baseobjs.verbosityprinter
baseobjs.profiler
baseobjs.basis
baseobjs.protectedarray
baseobjs.label
baseobjs.objectivefns

Refactored under tools:

baseobjs.opttools
baseobjs.basisconstructors

Refactored under io:

baseobjs.circuitparser
baseobjs.fastcircuitparser

Removed:

baseobjs.parameterized
baseobjs.deprecated_dim
baseobjs.exceptions

Since names under baseobjs were deliberately exposed in other modules, this should not constitute a major API change. One possible exception is that basistools no longer exposes the basisconstructors namespace via wildcard import. If this actually is a non-trivial API change, I'd want to either re-expose those names with a deprecation warning, or simply merge basisconstructors into basistools entirely (I'm a little confused on the semantics of separating them in the first place)

Let's restore the exceptions module into the tools or objects sub-package.  The exceptions are objects, but they're not primary ingredients in pyGSTi and are used more like utility functions, so I think I lean toward putting them in tools.  Unless Rob strongly disagrees, let's do that.


Why can not open the web portal

''We created a web portal allowing users to query, visualize and download missense VEPs for all human protein isoforms (accessible at https://huggingface.co/spaces/ntranoslab/esm_variants).''
I can't open the web
ERRORS
This site can’t be reachedhuggingface.co took too long to respond.
Try:

Checking the connection
[Checking the proxy and the firewall](chrome-error://chromewebdata/#buttons)
[Running Windows Network Diagnostics](javascript:diagnoseErrors())
ERR_CONNECTION_TIMED_OUT

How to solve it?
thank you!

I'm able to access our portal.
Might it be an issue with your network?
Can you try to connect from another network?


stdlib: link against legacy_stdio_definitions on Windows

Because Microsoft inlines the definitions of the printf family of
functions, we end up with undefined references to them.  Add an explicit
request to link against the legacy_stdio_definitions library when
ucrt.C.stdio is used which provides out-of-line definitions for them.
This fixes the building of the `stdlib/VarArgs' test.

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

@swift-ci please test and merge

@swift-ci please test Linux platform


fix(Able to use special characters when searching).

@mannyrivera2010
@blynch11p
@seenusuvarna
Please Review.

Unit Tests are missing for the function

This works.
Remove the commented out print statements.
Another way this can be handled is to wrap the entire search string in quotes.
http://stackoverflow.com/questions/39229566/special-characters-on-query-string-in-elasticsearch

:+1:


"to" for contract deployment is present and equal to "0x0"

I asked about this on gitter: [x]
Link to my question on gitter: https://gitter.im/ConsenSys/truffle?at=5bbc4af7c08b8b3067f1c674

Expected Behavior
Regarding web3.eth.getTransaction. Web3js doc.
to - String: Address of the receiver. null when its a contract creation transaction.

null should be returned when it is a transaction for a contract creation.
Current Behavior
0x0 is being returned:
"to": "0x0",

Possible Solution
return null as per web3js doc.
Steps to Reproduce (for bugs)

Deploy a contract.
Save the transaction hash
Run {"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["<transaction hash>"],"id":1}
Look at the to value.

E.g.
Request:
{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["0x09bd46e048485d4e70ef00b181b033a015314b52e3fc50a8762d9af69620e87c"],"id":1}

Response:
{
    "id": 8,
    "jsonrpc": "2.0",
    "result": {
        "hash": "0x09bd46e048485d4e70ef00b181b033a015314b52e3fc50a8762d9af69620e87c",
        "nonce": "0x0",
        "blockHash": "0x42ca22da634f523cfdf8e4bdbd298bb6a796077a746a53dc7e92f09ec494ccc7",
        "blockNumber": "0x01",
        "transactionIndex": "0x00",
        "from": "0x147ba99ef89c152f8004e91999fee87bda6cbc3e",
        "to": "0x0",
        "value": "0x8ac7230489e80000",
        "gas": "0x0170c0",
        "gasPrice": "0x77359400",
        "input": "0x4...9"
    }
}

Context
When using rust-web3 library, the unexpected value of 0x0 leads to deserialization issue, stopping the consumer (my application) to do anything with this transaction.
Your Environment

Version used:
Version of Truffle/Remix/Other tools used: ganache-docker v6.1.3
Operating System and version (include distro if Linux): Mac OS X
I intend to submit a pull request to fix this issue: [ ] I am happy to look into it if the issue is accepted.

Please note that the to is referred as empty account in solidity documentation too https://solidity.readthedocs.io/en/v0.4.25/introduction-to-smart-contracts.html

Thanks for reporting, @D4nte! I've confirmed that this is still an issue in our develop branch version of ganache-core, though interestingly the response is now 0x instead of 0x0.

Related to https://github.com/trufflesuite/ganache-cli/issues/579

Related to https://github.com/trufflesuite/ganache-core/issues/59


Fix pager flow messed up Loading screen

Fix #1438

can't even reproduce the original issue

can't even reproduce the original issue

Huh, it happens every time, on Preview version.

I think the reason also is clear. Switching from Browse/Latest to Search doesn't reset the pager. And the new flow only emits new pager when the search is returning results. Hence there is no empty state in between for the Loading screen to show


Fix Imports and Add Import Tests

Fixes a couple of different import ops, including agent, idm, and circle of trust imports. Adds a bunch of tests for most of the import ops as well, with corresponding test mocks contained in the pull request titled "Add Mocks for Test Imports" in the frodo-lib repo. Note that one of the journey import tests written did not pass and is currently being skipped for the meantime (I could not figure out why it wasn't passing).

Hi @phalestrivir :) Thanks for this one! The import tests are failing in my env due to parallel execution and the import -A/--all-separate tests are colliding as all the e2e tests execute in parallel.
I almost see not better/other way out than finally enabling all the commands to support -D and support changing the working directory at runtime so we can import from different directories at the same time vs copying to current directory which is shared by hundreds of tests running in parallel.
It might take me a while to do this unless you have cycles to take it on?

@phalestrivir I also think it's time to move the cli e2e mocks into the cli project.

Hi @phalestrivir :) Thanks for this one! The import tests are failing in my env due to parallel execution and the import -A/--all-separate tests are colliding as all the e2e tests execute in parallel.
I almost see not better/other way out than finally enabling all the commands to support -D and support changing the working directory at runtime so we can import from different directories at the same time vs copying to current directory which is shared by hundreds of tests running in parallel.
It might take me a while to do this unless you have cycles to take it on?

@vscheuber Yes, sorry about that, I didn't consider the all-separate tests colliding with each other, I only considered how they might collide with the export tests (and this is something I have been unable to successfully simulate myself since the tests only run sequentially for me despite utilizing multiple CPUs), but I could definitely do some work on adding in the -D option to all the commands to help fix the problem. Another option would be to name all the files differently when they get copied between the tests so they don't collide, and I believe that would be a simpler fix since we could just change the one method that does it, but I could see the -D option being useful even outside of tests when doing exports or imports, so that may be a better option. If you haven't already started on it I could work on getting that done today and tomorrow.

Hey!
I have not started on the -D option, yet, other than what I did months ago and added a "directory" property to the State module with getter and setter functions. It appears it's only being used in two locations as of now:
% grep -R "setDirectory(" src/*
src/cli/journey/journey-export.ts:      if (options.directory) state.setDirectory(options.directory);
src/cli/service/service-import.ts:      state.setDirectory(options.directory || '.');
I'd like to come up with a consistent way for all our commands to support th -D option so we can replicate it going forward. I was hoping to add the option to all the commands that need it and then have the ops layer in the cli be aware of the state.getDirectory() value and use it or default to current directory.
I leave it up to you to determine if you want to do a quick fix for the -A tests or add value to the tool while fixing the tests. I believe the -D could be substantial effort but maybe I'm wrong and it comes easy.
Volker Scheuber
801.473.5451

On Oct 12, 2023, at 10:15 AM, phalestrivir @.***> wrote:
Hi @phalestrivir https://github.com/phalestrivir :) Thanks for this one! The import tests are failing in my env due to parallel execution and the import -A/--all-separate tests are colliding as all the e2e tests execute in parallel.
I almost see not better/other way out than finally enabling all the commands to support -D and support changing the working directory at runtime so we can import from different directories at the same time vs copying to current directory which is shared by hundreds of tests running in parallel.
It might take me a while to do this unless you have cycles to take it on?
@vscheuber https://github.com/vscheuber Yes, sorry about that, I didn't consider the all-separate tests colliding with each other, I only considered how they might collide with the export tests (and this is something I have been unable to successfully simulate myself since the tests only run sequentially for me despite utilizing multiple CPUs), but I could definitely do some work on adding in the -D option to all the commands to help fix the problem. Another option would be to name all the files differently when they get copied between the tests so they don't collide, and I believe that would be a simpler fix since we could just change the one method that does it, but I could see the -D option being useful even outside of tests when doing exports or imports, so that may be a better option. If you haven't already started on it I could work on getting that done today and tomorrow.
—
Reply to this email directly, view it on GitHub https://github.com/rockcarver/frodo-cli/pull/299#issuecomment-1759809548, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG3VEUTKREF42CRMEYVDCC3X7ACRBANCNFSM6AAAAAA523NVCQ.
You are receiving this because you were mentioned.

@vscheuber  Sounds good! I don't think it will be too much substantial effort to add the -D option to all commands. I have already started on it, and decided it would be best to add -D as a global option in FrodoCommand.ts, that way we can call state.setDirectory() in one place, and then anywhere that requires the directory can just call state.getDirectory(). I also created a helper method in ExportImportUtils that, given a file name, will return the file path to the file in the working directory, and will create the directories as necessary based on a boolean flag passed into the method. Most of the work now will be going through all the export/import methods in the Ops layer and calling this helper method where necessary, as well as updating the export/import tests to utilize the -D option where needed. If all goes well, I will be finished with it later today, so expect a PR for it sometime soon.


Attempt to fix Python Flink Example PostCommit

Gradle switch was added in wrong place

Please add a meaningful description for your change here

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Choose reviewer(s) and mention them in a comment (R: @username).
[ ] Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
[ ] Update CHANGES.md with noteworthy changes.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)

See CI.md for more information about GitHub Actions CI.

Run Python Examples_Flink

It is not working because this option does not get exposed to java:
WARNING  apache_beam.options.pipeline_options:pipeline_options.py:351 Discarding unparseable args: ['--flink-conf-dir=/home/jenkins/jenkins-slave/workspace/beam_SeedJob_Standalone/src/runners/flink/src/test/resources']


Can we use UUID as _id?

Can we use the UUID as the Elasticsearch _id? I believe that when accessing documents, we want to do it with the UUID. To use the UUID right now, the underlying query is
GET /_search
{
    "query": {
        "match" : {
            "uuid" : {
                "query" : "87ba429bd4e38248a40467395478f512"
            }
        }
    }
}

... and that particular UUID has four matches. :(
I would prefer to just do:
GET entities/_doc/uaIAX3ABUvkh_9SdDx8S

which returns a single document.
For the time being, I will use the concise _id query rather than the long uuid query... I hope that in the future the _id will be the uuid

Use the Entity UUID for the Elastic search _id field instead of the autogenerated value.

@mccalluc @yuanzhou _id is a meta field of elasticsearch which is not easy to put custom data in it. We may design the search-api that allow entitties/.
Chuck, when I search by the uuid 87ba429bd4e38248a40467395478f512 in Kibana, it only returns one document. Can you send me the id or uuid of the documents you see?

_id is a meta field of elasticsearch which is not easy to put custom data in

I may be missing something, but from the docs I've looked at, specifying the _id does not seem at all esoteric.

Can you send me the id or uuid of the documents you see?

That was on the AWS instance, so it's possible there are no duplicates now, but my concern remains.

Thank you, Chuck! I kept looking to put the _id in the document. I neglected the POST /_doct/ API.


fixed tests for link to external paes challenge

Checklist:

[x] I have read freeCodeCamp's contribution guidelines.
[x] My pull request has a descriptive title (not a vague title like Update index.md)
[x] My pull request targets the main branch of freeCodeCamp.
[x] All the files I changed are in the same world language, for example: only English changes, or only Chinese changes, etc.

Closes #41173

I've made the discussed changes:

added anchors to the regex to make sure nothing around the required url is allowed
removed the g because useless
allowed both http and https as per in the discussion in the issue

should I remove the www from the regex? I asked it in the comment discussion but as I committed , it was dismissed

@ieahleen I think not allowing the www is what we want.

Can we have another mod review this PR?


N replicates for whitelist

I want to make a whitelist to remove novel entries that may not be that well supproted. My experimental design is several conditions of age, gender, and housing for mouse brain samples (~34 samples in total and roughly 3-5 per condition each). However, I was thinking in terms of replicates for whitelist what would be termed a biological replicate. I could supply all 34 samples but that seems excessively stringent. But if I use fewer should I use mice samples from across the conditions or and then how many replicates per condition. Or should I make a separate whitelist for each condition (using each replicate mouse for that condition) and compare what drops out.
I guess my question is how should we restrict for finding something novel. It would seem obvious when maybe comparing species or cell types but in my case I am little confused how to proceed.

This is really subjective based on your experimental design. What I might do on a dataset such as this is indeed make a pass list for each condition and then take the union of those pass lists.
With regards to how many replicates you require each transcript to be reproducible in, again, this is pretty subjective. If you have spike ins you can try a parameter space exploration varying the fraction A, n datasets, and n reads options to talon_filter_transcripts to maximize the sensitivity and specificity of your filtering settings. If not, my default is usually to just go for at least 5 reads in at least 2 replicates, with the default internal priming filter.

TY very much for your reply. It's very useful. May I ask how to interpret the whitelist.csv file. Do the numbers refer to the order in which an isoform appears in the TALON.db? So after running for each condition I can combine the different whitelists using uniq to make sure not to duplicate when a whitelist isoform appears in more than one condition?

Ah related to the internal priming. Should we be more lenient if using direct RNA sequencing as biochemically I think it is harder for the RT to be primer internally as the RT priming is linked with the 3'-end OH ligation event of the split adapter?

TY very much for your reply. It's very useful. May I ask how to interpret the whitelist.csv file. Do the numbers refer to the order in which an isoform appears in the TALON.db? So after running for each condition I can combine the different whitelists using uniq to make sure not to duplicate when a whitelist isoform appears in more than one condition?

The pass list file includes the gene ID and the transcript ID that TALON uses internally to track genes and transcripts. You can get the union by cating all the output pass lists together and then calling uniq on that, yes.

Ah related to the internal priming. Should we be more lenient if using direct RNA sequencing as biochemically I think it is harder for the RT to be primer internally as the RT priming is linked with the 3'-end OH ligation event of the split adapter?

I think this would make sense, though you know your assay best!

TY for your help. Much appreciated.


Users can't delete roommates.

Window.location problem.

Changed and "appears" to work in update.


Reland "Dispose render objects when owning element is unmounted. (#82883)" (#83790)

This reverts commit 63c49c3d83d587890f5304ef480776e99c901dee.
No changes from last time, but internal CL will avoid breakages. I will try to do a full frob run to verify.
See cl/377329167

Longer term, the plan is to patch up flare_flutter after https://github.com/2d-inc/Flare-Flutter/pull/307 lands so that it will work with these new method/lints, and undo some changes to the internal fork that have accumulated over time/migrate internal customers to Rive.

Kicked off a FROB run for this that should run more tests than Google testing does/did.

After cl/377398477 this passes internally.


Improve error handling in the browser example

This PR is to #623 to add error handling when creating the OrbitDB instance.
This now catches the following error (related to #623):
TypeError: this.preCreate is not a function
    at file:///Users/haad/code/orbit-db/dist/orbitdb.js:46:327543
    at new Promise ()
    at i.createStore (file:///Users/haad/code/orbit-db/dist/orbitdb.js:46:327500)
    at Function.createInstance (file:///Users/haad/code/orbit-db/dist/orbitdb.js:34:420382)
    at async IPFS. (file:///Users/haad/code/orbit-db/examples/browser/example.js:78:17)

@haadcode closing this for now, let me know if you want to re-open and/or cherry pick some of the commits out to a new PR


Fixed Bloodseeker's spells ignoring linkens and AM reflect.

When uploading a PR, make sure to not upload another commit. I'll be merging this manually. Thanks.


[Shapes] - Implementing property method alternatives in Flutter

I'm implementing the a Rectangle widget (#26).
Here is what a Rectangle view in SwiftUI can do:

The swift code for that looks like so:
import SwiftUI

struct RectanglePage: View {
    var body: some View {
        ScrollView {
            VStack(spacing: 20) {
                // Basic rectangle
                Rectangle()
                    .fill(Color.blue)
                    .frame(width: 200, height: 100)

                // Rectangle with stroke
                Rectangle()
                    .stroke(Color.red, lineWidth: 4)
                    .frame(width: 200, height: 100)

                // Rectangle with rounded corners
                Rectangle()
                    .fill(Color.green)
                    .cornerRadius(20)
                    .frame(width: 200, height: 100)

                // Rectangle with gradient fill
                Rectangle()
                    .fill(LinearGradient(gradient: Gradient(colors: [.yellow, .orange]), startPoint: .leading, endPoint: .trailing))
                    .frame(width: 200, height: 100)

                // Rectangle with shadow
                Rectangle()
                    .fill(Color.purple)
                    .shadow(color: .gray, radius: 10, x: 0, y: 10)
                    .frame(width: 200, height: 100)
            }
        }
    }
}

struct RectanglePage_Previews: PreviewProvider {
    static var previews: some View {
        RectanglePage()
    }
}

In that code you can see a number of different modifier methods:

fill
frame
stroke
cornerRadius
shadow

One of the guiding principles is that swift_ui doesn't use modifier methods.
How to avoid modifier methods gives a hypothetical alternative for Flutter:
Frame(
  width: 200,
  height: 100,
  child: Fill(
    Colors.purple,
    child: Ellipse(),
  ),
);

Is this how we want to define the API, by creating widgets for all of the following?

Fill
Frame
Stroke
CornerRadius
Shadow

Not widget properties?
@matthew-carroll

@suragch to help us answer that question, can you investigate a little more deeply on modifiers like fill(), stroke(), and shadow()?
Probably the most important detail that differentiates a property from a widget is how generally applicable a modifier is meant to be. For example, I don't know that it's even possible for us to implement a generic Stroke widget - a stroke will require knowledge of a given shape to stroke. So that, perhaps, should be a widget property. But we should do that analysis for each item, both how its used in Swift UI, and what kind of limitations we might run into with widget composition.

I started out by taking a list of Swift property methods and going through them one by one to see if they should be a widget property or a composable widget. After while I discovered that some of these were extensions on Shape while others were extensions on View. My conclusion is that the Shape extensions should be widget properties while the View extensions have the potential to be composable widgets themselves.
Rather than completely rewrite my original answer, I'll keep the examples, and then move on to what belongs to Shape and View.
fill()
This fills the shape with a color or gradient.

HStack {
    Rectangle()
        .fill(Color.blue)
        .frame(width: 100, height: 100)
    Circle()
        .fill(Color.blue)
        .frame(width: 100, height: 100)
}

fill makes sense for a shape, but it is ambiguous in the generic context. For example, filling Text would imply setting the text color, but filling a VStack might imply setting the background color. I recommend fill() should be a property of the shape.
stroke()
This modifier applies a stroke to the shape with a specified color and line width.

HStack {
    Rectangle()
        .stroke(Color.red, lineWidth: 4)
        .frame(width: 100, height: 100)

    Circle()
        .stroke(Color.green, lineWidth: 2)
        .frame(width: 100, height: 100)
}

stroke() doesn't have a clear meaning when applied to other types of views like Text, Image, or VStack. The concept of stroking is closely tied to the geometry of a shape. I recommend implementing stroke() as a widget property.
strokeBorder()
This property is similar to stroke, but the stroke is drawn inside the shape's border, preserving the shape's size.

HStack {
    Rectangle()
        .stroke(Color.blue, lineWidth: 10)
        .frame(width: 100, height: 100)

    Rectangle()
        .strokeBorder(Color.blue, lineWidth: 10)
        .frame(width: 100, height: 100)
}

For the same reason as stroke this should be a widget property.
trim(from:to:)
This modifier trims a shape by specifying a start and end point, effectively creating a partial shape. The from and to parameters are values between 0 and 1, representing the percentage of the shape to be trimmed.

This modifier is not applicable to other types of views like Text, Image, or VStack because they don't have the concept of a path or a shape that can be trimmed. So trim should be a widget property.
inset(by:)
This modifier insets the content of a shape by a specified amount on all sides.

HStack {
    Rectangle()
        .inset(by: 10)
        .fill(Color.blue)
        .frame(width: 100, height: 100)

    Circle()
        .inset(by: 20)
        .fill(Color.red)
        .frame(width: 100, height: 100)
}

inset only applies to insetable shapes, not views like Text. For that reason, it should be a property on the shape.
Question: Are we going to follow in some way Swift protocols like Shape and InsetableShape? Would we use mixins?
scale(x:y:anchor:)
This modifier scales a shape by the specified scale factors along the x-axis and y-axis. The anchor parameter determines the point around which the scaling occurs.

HStack {
    Rectangle()
        .scale(x: 1.5, y: 0.5, anchor: .center)
        .fill(Color.blue)
        .frame(width: 100, height: 100)

    Circle()
        .scale(x: 0.8, y: 0.8, anchor: .topLeading)
        .fill(Color.red)
        .frame(width: 100, height: 100)
}

Only shapes have a scale method. If you want to scale other views, you need to use scaleEffect. So, scale should be a property of a shape.
rotation(_:anchor:) and rotationEffect(_:anchor:)
rotation rotates a shape around and anchor while rotationEffect rotates any view around an anchor. I'm not sure why shape needs its own method.

HStack {
    Rectangle()
        .rotation(Angle(degrees: 32))
        .fill(Color.blue)
        .frame(width: 100, height: 100)

    Text("Hello")
        .rotationEffect(Angle(degrees: 73))
}

rotation could be a shape widget property while rotationEffect could be a composable widget.
Generalizations
Anything that belongs to Shape should be a property, not a widget itself.

Shape docs: https://developer.apple.com/documentation/swiftui/shape

Property methods that are defines as extensions to View could be their own composable widgets:

View docs: https://developer.apple.com/documentation/SwiftUI/View/

Here are a few methods that belong to view and thus also apply to shapes:

padding(_:)
frame(width:height:alignment:)
transformEffect()
shadow(color:radius:x:y:)
blendMode(_:)
compositingGroup()
mask(_:)
clipShape(_:)
opacity(_:)
border(_:)
aspectRatio(_:contentMode:)
background(_:)
alignmentGuide(_:computeValue:)
gesture(_:)
overlay(_:)
animation(_:)

Both Shape and View?
There is an offset(x:y:) in both Shape and View. I'm not sure why that is. I suppose it could be a widget and a property, though this seems like it is duplicating the logic. More study needed on this one.

Thanks for looking into it. That rationale makes sense to me. Feel free to start with whatever piece you'd like.


No way to define a 'url' and then just provide the 'pk'/'id'?

I'd like to be able to keep the code markup cleaner and DRYier and in some cases where I have a collection of editable stuff, it seems from 'bootstrap-editable-rails.js' that I cannot define the endpoint to then just set the id of the record and have it appended to the endpoint to create the url, I've also tried it in code... am I missing something or is it in fact the way it works now?
e.g.:
$('.editable').editable(function(){
  url:'<% posts_path %>',
  resource:'post'
})

Title
# PUT /posts/1

Did you find a solution for this?


Suggestion: secure way of loading colorscheme

If by any change packer fails on installing the colorscheme the starting process will not fail or bother the user more than needed:
-- in my config I use ayu colorscheme
local colorscheme = "ayu-dark"
local status_ok, _ = pcall(vim.cmd, "colorscheme " .. colorscheme)
if not status_ok then
    vim.notify("colorscheme " .. colorscheme .. " not found!")
    return
end

I don't think we will add this -- thanks for the suggestion though. It should be that upon install the colorscheme exists so there shouldn't be any reason for this to happen. Thanks :)


Support for TorchScript exporting of aframe model

Makes export platform configurable on the law side
Updates the export project to be compatible with TorchScript
Removes hermes as submodule

@wbenoit26 this is ready to take a look at - before it's merged, I want to do a little test run directly comparing TensorRT and TorchScript export

And you can also remove hermes from the known_third_party list

@wbenoit26 Added sample_rate and kernel_length as arguments to all models since the S4 requires this before runtime.


Adding funcions

closes #11
I have completed some of functions

Hey, @MAG-BOSS Is there any issue in this PR , why its not merged yet?

@sumit-158 give some time for review

@sumit-158 are you still working on it?


Prepare the release

(all green now, but I am trying to remove the architecture constraints to see how it goes)


Integrate nonce test

Fixes #147 .
Changes proposed in this PR:

fix nonce test
fix typesense db URL

neither the node starts, neither the tests run anymore with the change of the DB url :-(


from_entries returns null for empty array

When the array is empty, from_entries returns null instead of an empty object:
$ jaq "from_entries" <<(echo "[]")
null

This means it is not a true inverse of to_entries which can be problematic if you're not sure whether the object will have any keys, but you need to ensure the output remains an object
$ jaq "to_entries | from_entries" <<(echo "{}")
null

For reference, jq and gojq get it right.

Thanks, this is corrected in d6276cd.


Gestures

This is nice and clean, and easy to understand. 👍 Thanks for putting this together.
But the use of most gestures really makes a mess. Anyway to use something else like React based gestures, etc?

@z3dev I started with a copy of what I found in the jscad repo here:
https://github.com/jscad/OpenJSCAD.org/blob/V2/packages/web/src/ui/views/viewer.js
Is there a better implementation somewhere? I didn't rewrite anything, just re-organized the code into bite-sized modules. Happy to use whatever works best.


plugin don't find *.scss source

Error
/Users/febobo/Documents/web/react-native-ui/example/src/components/Button/styles.scss Could not find the file

my file is true

but *.css no problem

i'm sorry. I find problem on me, Because my atom cache cause, I close atom and new open atom fix problem, i now close this issue


10.0.19045.3693

ver = N/A. You need repair your OS...
Try upgrade to same version via original ISO. See also https://github.com/stascorp/rdpwrap/issues/1883


add proptests for invalid forms of input

part of #335
This implements the set of tests proposed by @teor2345 in https://github.com/ZcashFoundation/zebra/pull/549#pullrequestreview-437981450

OK what I think these are testing, is that for any possible representative EquihashSolution except for the 415000 block one, they will not validate for that block info, which is ok.
I think based on @teor2345's comment on the other PR, what we'd like to do for proptesting this is for every valid EquihashSolution, we check is_valid, then we corrupt the nonce/header/solution, and then check that is_valid fails.

I think based on @teor2345's comment on the other PR, what we'd like to do for proptesting this is for every valid EquihashSolution, we check is_valid, then we corrupt the nonce/header/solution, and then check that is_valid fails.

Would this require implementing the logic to generate valid equihash solutions and accompanying headers or do we already have that ability somewhere?

I think based on @teor2345's comment on the other PR, what we'd like to do for proptesting this is for every valid EquihashSolution, we check is_valid, then we corrupt the nonce/header/solution, and then check that is_valid fails.

Would this require implementing the logic to generate valid equihash solutions and accompanying headers or do we already have that ability somewhere?

We have strategies to generate randomized BlockHeaders but the EquihashSolutions are just random bytes right now:
https://github.com/ZcashFoundation/zebra/blob/main/zebra-chain/src/block/tests.rs

I think based on @teor2345's comment on the other PR, what we'd like to do for proptesting this is for every valid EquihashSolution, we check is_valid, then we corrupt the nonce/header/solution, and then check that is_valid fails.

The part of this I had trouble with was how to do the corruption step. I figured doing some arbitrary bit manipulation was going to be insufficient so I wanted to use proptest to handle generating the piece of the struct I was "corrupting" by generating a random one that isn't equal to the original. I will look into making the valid block an input rather than hardcoded to 415000, then at least we can pass in each of the blocks we have hard coded in zebra-test.

then at least we can pass in each of the blocks we have hard coded in zebra-test.

It would be nice to have an array of "all the blocks in zebra-test", so new blocks automatically get added to all the tests.
For example, I'd like to add block 2, so we can test checkpoint chaining from 0 to 2.

Having the bytes of the first few blocks would be very useful also because the coinbase height is badly encoded and the first (I think) 16-20 blocks are all special cased. So testing that part of the encoding would be useful.

I think it might be better to get a BlockHeader-based Equihash API first, since the testing we'll want to do is downstream of the invariants provided by the API, and the API we'll eventually want is differently shaped than the one we have.

@hdevalence should I do that as a separate PR or is it okay if I roll that change up with this PR?

Either way is fine, but I think it would be a waste of effort to keep getting all the tests to compile while changing the API (rather than getting the API right and then doing the tests).  That's the only reason that I can think of for doing two PRs.  If you want to roll it up with this one I think it's fine for the build to be broken in the meantime.

@hdevalence okay I started out by just not exporting the EquihashSolution based is_valid API and added a pub version of that API for BlockHeader that serializes itself internally.

blocked by https://github.com/ZcashFoundation/librustzcash/pull/1

Please also revert the cargo changes :-)


some comments on xarray integration

Hi Parcels Folks,
Congratulations on this amazing package! It is awesome to see how far it has evolved since Erik's Lagrangian meeting at Imperial a few years ago. Both the code itself and the documentation / example sets are just beautiful.
I have been reading through the code and documentation, and I have a few comments that I want to share. Please take these comments with a giant grain of salt...they are meant purely for discussion, not as a criticism of your package, which, as I said above, is awesome and amazing.
Parcels frequently seems to make the assumption that the velocity data resides in netCDF files. This may lead to some problems down the line. There are many cases when the velocities might be in other formats. For example:

in MITgcm, we have data files in a weird MDS format
in Pangeo, we are putting our data in the cloud in zarr format

However, all of these formats can be read into xarray. As a specific example, in the Pangeo Sea Surface Height example, I can load the entire AVISO dataset from zarr format from google cloud storage in one line. I would love to be able to just call ocean parcels on this data and compute Lagrangian trajectories. That is not trivial right now.
So here are some ideas, in increasing order of difficulty / complexity

I believe it might make sense for you to accept xarray objects when creating velocity FieldSet objects, i.e. fieldset.from_xarray(ds). Looking at this code, I don't think this would be too hard. In fact, it might even already work with fieldset.from_data, since it xarray datasets provide a dictionary-like interface. This would solve some of the problems I described above (but not all). You also use xarray internally to read netcdf data, so maybe that path could be followed instead.

It would might not work with the Pangeo AVISO zarr dataset, because you also frequently coerce inputs to numpy arrays. This would trigger dask arrays to compute. It would be great to operate lazily until data is actually required for computation. This might be easy with duck typing, simply by avoiding explicit coercion to numpy arrays. Maybe the netcdf code path is lazier, but, as noted above, it only accepts netcdf files, not generic objects.

 For example FieldSet is conceptually similar to xarray.Dataset and Field is conceptually similar to xarray.DataArray. Labelled multi-dimensional arrays are an extremely common pattern in geoscience code. Many packages that once had their own implementations of these data structures have refactored to just use xarray (satpy is a great example). Your various Field.search_indices methods are very similar to xarray's indexing operations. Xarray now has multidimensional interpolation based on scipy, which you also implement in parcels. This would of course imply a major refactor of your internal structure, so this is a very presumptuous suggestion on my part. However, there could be major advantages, including

way less code to maintain
use xarray's indexers and interpolaters where possible
dask integration for free

Of course, xarray does not provide all the functionality you need for working with GCM data. Operations related to grid cells are not part of xarray. I am trying (mostly without success) to rally folks to use and contribute to xgcm for this purpose. (So that is part of my ulterior motive here.)
Anyway, of course I don't expect any of these things (other than perhaps 1) to make it onto your todo list any time soon. Clearly this package is amazing and very successful in what it does. But as an xarray developer, oceanographer, and concerned citizen of the scientific python ecosystem, I just can't resist pointing out this opportunity where using xarray more could significantly reduce your development burden and lead to enhanced interoperability.
-Ryan

Dear Ryan,
Thank you very much for these kind words about parcels, and for your thoughtful comments. Philippe and I have discussed these, and have the following responses and questions on your three ideas

You are absolutely right that we could do a FieldSet.from_xarray(). This would be relatively simple to implement, and we would do it in the coming weeks. Note that we would likely still require a dictionary mapping the ds dimensions to our 'special' lon, lat, time and depth dimensions, as we don’t want to guess which dimension is which. Or do you see a way to automatically detect this?

For the simple FieldSet.from_xarray(), we would indeed coerce into numpy arrays. We do that mostly because of our JIT mode, where the particle interpolation is done in C. So we need to be able to pass arrays between python and C, and I’m not sure how easy that would be in lazy-loaded xarray. However, in the medium term, we’d be happy to explore

You are right that the overhead of needing to maintain the Field and FieldSet objects is a burden. We would love to be able to use xarray.Datasets and xarray.DataArrays. Again, we’re not entirely sure of the status of xarray development, but the reason we implemented our own Field and FieldSets initially was because scipy interpolation was too inefficient for us. In particular, we want local, rather than global interpolation, because we can make the assumption that a particle doesn’t move very far within a timestep. So our Field.search_indices takes the old location as input, and starts searching in the vicinity of that old location. A few years ago, scipy interpolation didn’t have this option, which is why we went down the route of C-interpolation (and hence implementing Just-In-Time compilation and our own codeconverter/compiler, which are a huge effort to maintain too!) Do you know if this is now possible?
Furthermore, as you said, we need special interpolators, especially for C grids. So we would need to think about how to implement these into xarray (or xgcm?)

We would very much welcome the opportunity to work with you and the rest of the xarray and xgcm teams to streamline Parcels and integrate it more. As you say, we citizens of the scientific python ecosystem should aim to reduce unnecessary repetition.
We’ll open a separate Issue for 1), and leave this one open for discussion on the other two points
-Erik and Philippe

You are absolutely right that we could do a FieldSet.from_xarray(). This would be relatively simple to implement, and we would do it in the coming weeks. Note that we would likely still require a dictionary mapping the ds dimensions to our 'special' lon, lat, time and depth dimensions, as we don’t want to guess which dimension is which. Or do you see a way to automatically detect this?

One way to auto-detect would be to use CF conventions and examine the standard_name attribute. There is a standard vocabulary for latitude and longitude. In CF conventions, the variable names themselves should not matter. But of course not everyone follows this. In contrast, xesmf just requires the variables to be named lon and lat and leaves this up to the user: https://xesmf.readthedocs.io/en/latest/Rectilinear_grid.html.
Anything you choose will work, as long as it is documented clearly.

2. We do that mostly because of our JIT mode, where the particle interpolation is done in C. So we need to be able to pass arrays between python and C, and I’m not sure how easy that would be in lazy-loaded xarray.

It makes total sense that that, when it comes time to actually integrate the trajectories, you need numpy arrays. But rather than just calling .load() or .values immediately on xarray objects, you could instead wait until just before you need the data, use indexing to select just what is needed at that integration step, and then call .values. In particular, you probably only need a few timesteps at a time for each integration step. (This would bring performance benefits with regular netcdf4 as well.)

3. Furthermore, as you said, we need special interpolators, especially for C grids

I totally agree that 3 is hard and probably impractical. The ideal path, given lots of developer time and excellent coordination between packages, would involve the following:

Factor out fast, "local," spherical-geometry-aware interpolators into a standalone package
Use these interpolators to implement a custom index object for xarray. This sort of thing is explicitly called out in the xarray roadmap.
Call those indexing functions from parcels

This would be awesome, because now any xarray dataset could use the cool, fast interpolators you have developed, which are currently accessible only from deep inside parcels. Not claiming this would be easy, but I think it is, in some sense, the "right" way.
In the meantime, it might be worth reviewing some of the recent changes in xarray, including

vectorized indexing
interpolation
vectorized interpolation

This image in particular seems to capture what one wants to do with particles

cc @shoyer and @jhamman, who might be able to weigh in on the timeframe for the needed changes to xarray indexing.

This shows how to use dask for distributing potentially many similar parcels experiments:
https://nbviewer.jupyter.org/gist/willirath/6b5c4654ca6be3774fa76acf4a266b96
The basic idea is to wrap the parcels experiment in a function and map it to a dask bag with the parameters.
It would be very interesting to use the xarray / zarr backend and run this on distributed resources on pangeo.
My feeling (somewhat informed by a few tests though) is that there's only very few obstacles to overcome before splitting parcels particle sets and distributing them more in a more transparent way than with this relatively crude approach.


Extend product library type

~Currently blocked by https://github.com/vapor/postgres-kit/issues/207~
~There might be ways to work around the issue by using a different custom encoding format but let's see if there's perhaps an upstream fix available. That would allows us to get rid of the custom encoding in Swift 5.5.~
Simple workaround in place that's easy to remove should the upstream issue be fixed.
I'll leave this in draft while I deploy from the branch to let staging run an ingestion cycle with the schema update and product type update.
Actually using the new format for package collections will be a separate PR.

Right, because Products are attached to Versions, we need to force a version update in order to re-populate products.type.
I'll trigger this now on staging.

Starting to populate but it's going to take a while to process all versions.

We have almost 60k versions and the biggest batch size I dare submit are 1k, because this goes up to around half the memory available on d1:

I think I need to change how we're re-analysing versions so the batch size can be 10k or more but we break this down into smaller batches and flush within the command.

For reference, batch size 1k takes 70m to process on d1 (with the full batch in memory).

This is almost done processing on staging now, it's taken quite a while and needs monitoring due to memory (despite small batches). I'll tag and deploy this to prod tomorrow morning first thing and then re-process versions there.

Not exactly sure what is going on but running re-analyze-versions seems to be leaking memory like crazy. Even if you run it as a one-off command execd into a container does it increase the container memory without releasing it on termination.
And this isn't just a display artefact of ctop: staging just ground to a halt because the system was swapping. Even on reboot it just happily reinstantiated the container with 6.3G of memory allocated.
I've run re-analyze-versions in the past and while I didn't monitor memory with ctop a the time, I didn't notice and slow-downs, either. Weird. And I don't want to let this loose on prod if it behaves like this.

Processing on staging is complete. I've added resource limits for prod deployment so it'll be ok to run the re-analysis in the container (even though it's not clear where the memory bloat is originating from).

There is no memory issue when running the version update on prod. There are a few minor differences in setup and I'm having to inspect memory consumption with a different tool for uninteresting reasons. It's all quite puzzling but not to the point where I'm going to worry about this further :)


Remote Play Cannot Detect PS4 Macros Emulated Controller

Hi, so I'm trying to get PS4 Macros working on Remote Play on my laptop, and I've been having issues with it getting to properly work with my Remote Play. I've already went over a couple of the issue threads posted here, and I've tried various things to fix this, but in the end I just can't get this working at all. Here's EXACTLY what I did, over and over again:

I first installed PS4 Macros and extracted it onto my laptop.

I then created a new text file inside the PS4 Macros file, naming it "settings.txt", and then copy and pasted these settings:

false
true
false

Then I made the txt file into xml file.

I FIRST ran Remote Play and after that, instead of hitting the "Start" button on it, I then ran the PS4 Macros application (ran it as administrator).

Based on my research from Youtube tutorials and from issue threads here, it should say on the Remote Play "Press option to start" because that's when the Remote Play recognizes the emulator controller, but it doesn't happen for me at all.

Also note that I've installed the latest updated version of PS4 Macros.
So I'm not sure what's causing the problem. Did I do something wrong during the entire process? Did I forget to configure something or download something else before doing any of the steps that I mentioned above? I'm not able to use this on my Remote Play at all and I can only use the base controls (enter for X, esc for O, arrows for up, down, right, left). I've also tried configuring the Remapper and such but I just have absolutely no idea how to fix this. I also tried to load xml files in the Macros column of the Remapper (2nd column to the very left at the bottom) but I honestly don't know if that did anything as well. I'm not sure if I've missed something specific here. I've been trying to get this to work for hours but have absolutely no clue how to fix this. I'd appreciate it if anyone can help and advise me to get this to work.

Hi, I added a Status Checker window to the unreleased debug build. Please download it from the link below and go to Help->Status Checker to see what is not working.
PS4Macro_cf7ce2c.zip -[commit cf7ce2c]
Closing this issue because it is directly related to: https://github.com/komefai/PS4Macro/issues/8

My status checker says "interceptor not working". How do I fix that?

You don't need DS4 Windows at all. Can you take a screenshot of the Status Checker while PS4 Remote Play is in focus (click Remote Play once to focus it before taking a screenshot).

Okay, here


Feature Request: Basic Shape Classes

Pyglet supports gl vertices which means it is very powerful, and very flexible.
However, dealing with them feels very 'low level' when compared with the rest of pyglet.
Like machine code or something.
Could convenience classes similar (at least in spirit) to the one below be added for the gl impaired coders among us?
class VertexRectangle:
    def __init__(self, x, y, width, height, color):
        self.x = x
        self.y = y
        self.width = width
        self.height = height
        self.color = color
        r = color[0]
        g = color[1]
        b = color[2]
        self.vertex_list = pyglet.graphics.vertex_list(4, 'v2f', 'c3B')
        self.vertex_list.vertices = [x, y,
                                   x + width, y,
                                   x + width, y + height,
                                   x, y + height]
        self.vertex_list.colors = [r, g, b,
                                   r, g, b,
                                   r, g, b,
                                   r, g, b]
        self.draw_mode = pyglet.gl.GL_QUADS

    def draw(self):
        self.vertex_list.draw(self.draw_mode)

    def move_relative(self, dx, dy):
        self.__init__(self.x+dx, self.y+dy, self.width, self.height, self.color)

    def move_absolute(self, x, y):
        self.__init__(x, y, self.width, self.height, self.color)

    def width_absolute(self, w):
        self.__init__(self.x, self.y , w, self.height,
                      self.color)

    def width_relative(self, dw):
        self.__init__(self.x, self.y, self.width + dw, self.height,
                      self.color)

Cocos has a set of 2d primitives already implemented https://github.com/los-cocos/cocos/blob/master/tools/primitives.py

Fair, but don't you think it's something that should be available in vanilla pyglet?
Many of the pyglet "competitors" have this feature by default.

I apologize if the the link to cocos appeared as an attempt for deflection, it was meant as a suggestion. I should have been more verbose in my reply, sorry.
I do agree this feels at odds with the high-level interface implemented  for other aspects, e.g. audio or input devices, but i also understand that  2D primitives are a rare use-case for what seems to be the goal of pyglet, i.e. games and other visually rich applications. Considering this, i could understand if there is no priority to get it into vanilla pyglet. But when i started using pyglet, i was also missing it. I would therefore very much welcome a (variable nodes) polygon and a circle (the rest could probably be easily wrapped from that), although i am personally not in need anymore.

My first thought is that these would have to be compatible with batches somehow so you can build large lists of them and draw in a single batch. I just foresee people looping over 1000 triangles drawing them individually tanking performance 😄

agricolab, No worries. :)
How rare are they really, though? Loading bars, health point bars, drawing lines between objects to show they are hierarchically connected, I'm sure we could come up with a huge list of visually rich software that uses basic geometric shapes.
einarf, I believe they already are compatible with batches if I'm reading the docs correctly.
see
vertex_list = batch.add()
on
https://pyglet.readthedocs.io/en/latest/programming_guide/graphics.html

In the past there has been some resistance to adding something like this to core. The principle behind adding features to pyglet is to avoid becoming bloated, which I think is a good goal.
That said, I do think something like this could be useful. We would probably want to have an API that is similar to the Sprite class, with rotation and anchor points, etc.  I'm not positive if we want to add it to the main project, but at the least it could be a useful addition to /contrib or even /examples in the repository. If we get more feedback, and people want it in master, then we can of course consider adding it.

I've got a thing that's pretty similar to all this. It's a little inefficient at the moment, but it's got some of the core ideas there. It could be useful for what you're looking for @nbroderick-code. It's still a WIP so there's a few bugs I'm sure.
Anyway, it's uploaded to my github at: https://github.com/kcmw3e/flippant-piano
(Also, I'm new to github so if I've done something wrong on my repository or here in the comments, sorry about it.)

It's always good to see other users solution to this issue!

What shapes would be considered most important? Rectangle, Circle, and Line? Anything else?

Recarding the circle it world be great to be able to have an angle parameter to define a circle sector. this would allow to plot half-circles or similar shapes, and the full circle would be a special case.

So maybe a big suite of shapes like circle, rectangle, line, arc, and perhaps a simple/convex polygon (as described here. Maybe each shape could even take an optional angle argument to define some rotation of the specific shape. My comment above has good examples of what I mean by this, though it's not perfect/fully implemented at the moment.
Also, batches don't presently don't agree with polygons very well as they are now. If a batch's vertex lists are drawn with GL_POLYGON mode, they are all connected, so the workaround I have now is to add vertex lists of triangles and draw them as GL_TRIANGLES instead.

@kcmw3e I edited your earlier post to fix your link. Nice work! It seems pretty featured already.
As for your comment about GL_POLYGON, that also applies to things like GL_TRIANGLE_FAN as well, for the same reason. Doing as you said and using GL_TRIANGLES is the only solution at the moment, since it would take a bit of internal work to make them work with Batching. (That might be revisited for pyglet 2.0). Maybe we should throw a warning if you try adding them to a Batch in pyglet 1.5.x...
I have a module mocked up already with Circles and Rectangles, which mimics the Sprite API to an extent. There is support for modifying position, color, opacity, and anchor positions. The Rectangle also supports rotation. You can find that here if you want to have a look, or contribute:
https://github.com/pyglet/pyglet/blob/pyglet-1.5-maintenance/experimental/shapes.py
@agricolab Would what you're describing be something like an Arc? As in, you specify a radius, start & end angles? Sorry I'm not very good with geometry, but I think I know what you mean.

yes.

I've added a Line class, which are really just thin quads (making any thickness possible). This brings a total of three shapes so far: Circles, Rectangles, and Lines.
I still need to figure out the math for making an Arc class. If anyone can have a look and comment on the API, that would be great.

Cocos2D is apparently using gluPartialDisk directly for arc plotting. This seems to be not an option if i understand your earlier comment correctly.
The segments argument for circle implementation are due to the breaking down the circle into triangles, right? A circle spans from 0° to 360°, and similarly, an arc spans between to angular end points, e.g. arc_limits_in_deg = (0, 90) or arc_limits_in_deg = (330, 210). With these endpoints, order is important, i.e. (0, 90) != (90, 0), as the first spans a quarter, while the second spans three quarters of the circle. Then, this implementation might work:
import math
# class arguments
arc_limits_in_deg = (0, 90)
segments = 25
x = 0
y = 0
r = 1
# calculations
arc_lim = []
for a in arc_lim_in_deg:
   # we perform modulus conditional on >360, because otherwise,
   # 0 and 360 would span a distance of 0° and not 360°
    if a > 360:
        a %= 360
    arc_lim.append(math.radians(a))
# we calculate the angular distance, taking the order of endpoints into account
arc_dist = arc_lim[1] - arc_lim[0]
#  but if the arc passes over 0°, e.g. from 330° to 60°,
# we have to take this jump into account and calculate the distance piece-wise.
if arc_dist < 0:
    arc_dist = math.pi * 2 - arc_lim[0] + arc_lim[1]
# subsequently, we divide the full  angular distance into segments for triangular approximation
tau_segs = arc_dist / segments
# and add endpoints
points = []
for i in range(0, segments + 1):
    arc_p = arc_lim[0] + tau_segs * i
    while arc_p > math.pi*2:
        arc_p -= math.pi*2
    p = (x + (r * math.cos(arc_p)), y + (r * math.sin(arc_p)))
    points.append(p)

There are arc shapes in arcade.
https://github.com/pvcraven/arcade/blob/07a2498c56bd50703dea4e79a4ecc5de2bfdfd1c/arcade/draw_commands.py#L43
I'm making geometry shader version this weekend at least. It's basically just a circle. The number of segments decides the resolution of the angles. As long as the rounding is done right (odd/even rounding trap) it should be cake.

Here's some thoughts. . .
For Circles:
Add an optional parameter to circle called angle --> def __init__(self, x, y, radius, segments=25, color=(255, 255, 255), batch=None, group=None, angle = math.pi * 2):
and then change line 339 (tau_segs = math.pi * 2 / self._segments) to tau_segs = self._angle / (self._segments-1). This will allow for specifying a portion of the circle to be drawn (from angle 0 to specified angle). Then a method called rotate (or another parameter) could be used to rotate the slice of the circle to a desired angle.
For arcs:
Keep the same code as for circle but change this -- lines 346 to 349 should make points that can be drawn as GL_LINES, so instead of triangular points, just change line 348 (triangle = x, y, *points[i-1], *point) to *points[i-1], *point. This essentially doubles-up each point with the previous one, and lets GL_LINES draw the arc similarly to the way GL_TRIANGLES draws the circle. There is a caveat: I just ran through that briefly, so the assigning of same-size sequences to the vertex_list is messed up (so some constants need to be adjusted on lines 328 and 354 from a 3 to a 2). Also, this modification is resulting in a closed arc at the moment, so a further modification should be made (or a parameter to be specified) to decide whether to close the arc or leave it open.
Here's the arc code: (the lines that I changed are closed up by ####'s -- hopefully I got them all)
#########################
    def __init__(self, x, y, radius, segments=25, color=(255, 255, 255), batch=None, group=None, angle = math.pi * 2):
#########################
        self._x = x
        self._y = y
        self._radius = radius
        self._segments = segments
        self._rgb = color
#########################
        self._angle = angle
#########################

        self._batch = batch or Batch()
        self._group = ShapeGroup(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, group)

#########################
        self._vertex_list = self._batch.add(self._segments*2, GL_LINES, self._group, 'v2f', 'c4B')
#########################
        self._update_position()
        self._update_color()

    def _update_position(self):
        if not self._visible:
            vertices = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
        else:
            x = self._x + self._anchor_x
            y = self._y + self._anchor_y
            r = self._radius
#########################
            tau_segs = self._angle / (self._segments-1)
#########################
            # Calcuate the outer points of the circle:
            points = [(x + (r * math.cos(i * tau_segs)),
                       y + (r * math.sin(i * tau_segs))) for i in range(self._segments)]

            # Create a list of doubled-up points from the points:
            vertices = []
            for i, point in enumerate(points):
#########################
                line_points = *points[i-1], *point
                vertices.extend(line_points)
#########################
        self._vertex_list.vertices[:] = vertices

    def _update_color(self):
#########################
        self._vertex_list.colors[:] = [*self._rgb, int(self._opacity)] * self._segments * 2
#########################

window = pyglet.window.Window()
a = Arc(100, 100, 30, angle = math.pi/2)
b = Arc(100, 200, 30, angle = math.pi)
c = Arc(100, 300, 30, angle = 3*math.pi/2)

@window.event
def on_draw():
    a._vertex_list.draw(GL_LINES)
    b._vertex_list.draw(GL_LINES)
    c._vertex_list.draw(GL_LINES)

pyglet.app.run()

Oooh, boy! Getting excited to get me some standardized shapes!

Thanks for your feedback, and thanks @agricolab and @kcmw3e for your example code. @einarf I'll have a look at that closer for 2.0 once we can move the math into shaders. Thanks!
I've pushed this to the 1.5-maintenance branch, and it will be in the upcoming 1.5.4 release. The Arc and Circle classes still aren't "finalized". The Circle is just a simple Circle, and the Arc is a Line based, closed arc.  If anyone wants to try the code, you can checkout the 1.5-maintenance branch, or update directly via pip if you have git installed:
pip install --upgrade --user<EMAIL_ADDRESS>

The shapes module is available in the latest release (v1.5.4). It's fairly limited, but I don't have the time at the moment to work on it further. If anyone has a specific shape they are interested to see happen, I'm happy to work with you on it.

Alright! Looking nice! This module is awesome! Basic stuff made basic. I love it.
One note:
The example program from the module says
from pyglet.graphics import shapes

but that didn't work for me. Instead, I had to do
from pyglet import shapes

Thanks again for all your work and taking my feedback!

As a user, the only thing I saw was missing was the a setter for the radius of the circle. In general, I think it's important to make the shape's parameters changeable after creation. In a game, imagine a circle that gets smaller as you run out of time.
But perhaps that's already possible and I just need docs to better understand how to use this tool.

Additionally, opacity does not work if you use the draw() function instead of a batch.
I know batch is more efficient, but both should function. See below test program to reproduce behavior

import pyglet
# from pyglet.graphics import shapes
from pyglet import shapes, clock

window = pyglet.window.Window(960, 540)
# batch = pyglet.graphics.Batch()
batch = None

circle = shapes.Circle(700, 150, 100, color=(50, 225, 30), batch=batch)
square = shapes.Rectangle(200, 200, 200, 200, color=(55, 55, 255), batch=batch)
rectangle = shapes.Rectangle(250, 300, 400, 200, color=(255, 22, 20),
                             batch=batch)
rectangle.opacity = 128
rectangle.rotation = 33
line = shapes.Line(100, 100, 100, 200, width=19, batch=batch)
line2 = shapes.Line(150, 150, 444, 111, width=4, color=(200, 20, 20),
                    batch=batch)

def grow_circle(dt):
    circle._radius += 1
    circle._update_position()

def grow_rectangle(dt):
    rectangle.width += 1

clock.schedule_interval(grow_circle, 1/30)
clock.schedule_interval(grow_rectangle, 1/30)

@window.event
def on_draw():
    window.clear()
    # batch.draw()
    circle.draw()
    square.draw()
    rectangle.draw()
    line.draw()
    line2.draw()

pyglet.app.run()

Opacity is the result of blending being enabled, when used in batches this is automatically enabled through groups. When you don't use batching, there are no groups.
You will have to add:
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)

This is consistent with sprites and images.

Ah, interesting. Okay, so that one is not a bug!

Thanks for the feedback @nbroderick-code I fixed that docstring typo. I also added the radius property so that it can be changed. I intended to have this but just forgot.
About the blending, Caffeinpills is correct. However, it turns out that all of the Shapes do have an internal group/batch even if you don't explicitly use one. Because of that I was able to update the draw method to enable blending.
That said, you really don't want to use Shape.draw() methods unless you're only doing a handful of draws. If you want a way to programatically draw specific things each frame, you can put everything in a Batch and just use the Shape.visible boolean to "turn off" shapes that you might not want to draw each frame.

I'm going to close this now that the few bugs that popped up have gotten addressed. If anyone wants to propose another Shape, or feel free to reopen this or make a new ticket. Thanks for the feedback everyone!


improve _Static_assert

Compile error if the condition is not constant
Nicer error message if the message is not included (this is a C++17 extension)

Nicer error message if the message is not included (this is a C++17 extension)

It does seem quite likely that one-argument _Static_assert will be included in C2x so I think another good option here would be to implement it and put it before a -Wc2x-extension warning especially considering that clang and gcc both accept it.


staging-next-23.11 iteration 5 - 2024-02-25

workflow docs: https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#staging
important job: https://hydra.nixos.org/job/nixpkgs/staging-next-23.11/unstable#tabs-constituents
jobsets:
https://hydra.nixos.org/jobset/nixpkgs/staging-next-23.11
https://hydra.nixos.org/jobset/nixos/staging-next-23.11-small
nix-review reports: https://malob.github.io/nix-review-tools-reports/
previous staging-next-23.11 PR: https://github.com/NixOS/nixpkgs/pull/287448

Significant breakages
(will be edited based on progress)

[ ] diffoscope regressed some tests: https://hydra.nixos.org/build/251218114
I'd /cc @trofi and @RaitoBezarius for that, based on recent history and .maintainers.

I think the failure was fixed upstreamin 256 version. Proposed diffoscope fix as https://github.com/NixOS/nixpkgs/pull/292428 by pulling all the fixes from master.


question: saving entire layout to a single png

When opting to save a layout to png via the toolbar, each hv element of the layout will be converted to a png individually. Is there an option to export the entire layout to a single png?

Yes, you can render directly to png, using bokeh's export capabilities. This is a bit slow because it relies on Selenium, but it does what you want, e.g. in a notebook cell you can do this:
%%output fig='png' filename='test'
layout = hv.Curve(range(10)) + hv.Area(range(10))
layout

or in a script:
layout = hv.Curve(range(10)) + hv.Area(range(10))
hv.renderer('bokeh').save(layout, 'test', fmt='png')

Can this issue be closed now? Last I remember you get separate pieces from a bokeh layout, but only when exporting SVG...

Yes, exporting to png is possible using my answer above. Let's keep this open to document this though.

How can you save a plot, via script, to obtain the save output as when you use the save button, .i.e without the bokeh toolbar on the side?

The png export capability will always capture the toolbar if it is there, if you don't want it in the export just disable the toolbar entirely by setting the toolbar plot option to None.

I've always wondered why we shouldn't do this automatically. Is there any good reason you would want to see the bokeh toolbar in the export?

Actually, I'll link to #2370 which should be fixed before we would consider that suggestion...

There may be cases where you would want the toolbar in the exported image, e.g. if you are capturing screenshots automatically for a tutorial, but I agree that it would be vastly preferable not to have the toolbar in an exported plot, by default.

I agree that the default should be to not have the toolbar..

I think all we need here is a short example or a link to a short example showing how to export using the magic and the renderer.

Is there a possibility to add toolbar for layout? I would prefer to have one single toolbar for all layout.

Is there a possibility to add toolbar for layout? I would prefer to have one single toolbar for all layout.

Not at the moment no. Multiple plots are on separate canvases and can't easily be composed on the frontend. Bokeh is working on putting multiple plots on a single canvas at which point this will become possible. Discussion on this should be on the Bokeh repo though.


Provide an instance of TranslateService to MissingTranslationHandler

I'm submitting a ...  (check one with "x")
[ ] bug report => check the FAQ and search github for a similar issue or PR before submitting
[ ] support request => check the FAQ and search github for a similar issue before submitting
[x] feature request

Current behavior
If I implement the MissingTranslationHandler like this:
@Injectable()
export class MyHandler implements MissingTranslationHandler {
  constructor(private translateService: TranslateService) {
  }

  public handle(key: string) {
    return this.translateService.get('MISSING', { original: key });
  }
}

then this results in a cyclic dependency: TranslateService depends on MissingTranslationHandler, which in turn depends on TranslateService.
Expected/desired behavior
The desired behavior would be if the handle method provided an instance of TranslateService, e.g.
public handle(key: string, translateService: TranslateService) {
  return translateService.get('MISSING', { original: key });
}

or, given the #214 proposal, something like
interface TranslateHandleArgs {
  key: string;
  translation: TranslateService;
  interpolateParams?: any;
}

public handle(params: TranslateHandleArgs) {
  return params.translation.get('MISSING', { original: key });
}

Such a thing, in turn, would potentially trigger an infinite loop if the 'MISSING' key is missing, too. This should be taken into account somehow.
What is the motivation / use case for changing the behavior?
Suppose you need to convert API error codes into localized messages. APIs change frequently, and if you haven't yet covered a specific error code, then you need to output something generic along the lines of "An error occurred, code: {{code}}". That is the case this feature request would cover.
Please tell us about your environment:

ng2-translate version: 2.4.3

Angular version: 2.0.0-rc.6

Browser: all

Language: TypeScript 1.8.10

Here's a workaround if someone needs it:
import { Injectable, Injector } from '@angular/core';
import { MissingTranslationHandler, TranslateService } from 'ng2-translate';

@Injectable()
export class CustomMissingTranslationHandler extends MissingTranslationHandler {
  private missingKey: string;
  private translation: TranslateService;
  constructor(private injector: Injector) {
    super();
  }
  public handle(key: string) {
    if (this.translation == null) {
      this.translation = this.injector.get(TranslateService);
    }

    if (this.missingKey != null) {
      // already handling the missing translation, and the '__TRANSLATION_MISSING' part is missing, too.
      // Return the key itself
      let previouslyMissingKey = this.missingKey;
      this.missingKey = null;
      return previouslyMissingKey;
    }

    this.missingKey = key;
    // do your thing using this.translation:
    let result = this.translation.instant('__TRANSLATION_MISSING', { key });
    this.missingKey = null;
    return result;
  }
}

The missing translations handler needs more love, I would love a pull request improving it because I don't have much time to work on this