elf: avoid flooding debug log with empty symbol names

In debug log while loading ELF objects, the logs is sometimes flooded with messages like:
level=debug msg="Skipping " subsys=elf

These seem to stem from ELF symbols without a name. Omit these messages as they don't add useful information to the debug log.

/test

/test-1.16-4.9


Database request

Hi there! I'm attempting to perform a homology search for a single gene (a bacterial protein) across all sequenced bacterial genomes to estimate the % of species that carry the gene. Is there a way to partition a wider database (like Uniprot) so that my search only covers bacterial genomes? If not, could I request an additional database that covers all sequenced bacterial genomes (like UniprotKB Bacteria or EnsemblBacteria)?

You can use the filtertaxseqdb command (https://github.com/soedinglab/MMseqs2/wiki#filtering-a-seqtaxdb) to build a subset of the Uniprot that only contains bacterial sequences.
For bacteria you would run:
mmseqs filtertaxseqdb uniprot uniprot_bak --taxon-list 2

I am also trying to integrate taxonomy information into the NR reliably. Once that's working you would have an even larger resource.

Thank you! My homology search only seems to run 300 alignments on the filtered database (uniprotKB/swissprot) even though this protein should be in most bacteria. Perhaps doing the search via protein sequences isn't the way to go for estimating taxonomic commonness. Is there a database with whole bacterial genome sequences available (one genome per fasta)? I could then do a repeat search for my gene's NT sequence against each genome

You are being limited by the --max-seqs parameter. You can either increase that or use a different (not yet very well documented) searched mode called sliced search (--slice-search). This will swap internally the role of the query and target sets and ensure that each query can find an unlimited number of sequences, however this mode will be very inefficient if the query database is not large enough.

I've found that GenBank allows me to download complete bacterial genome assembly fasta files, which I built into a database using 'createdb'. I downloaded a total of 19084 complete genomes and in my database.source file, I see 19084 rows in the file. When I look in the database.index file I have 38630 rows (as I understand it, createdb will break up long sequences into multiple entries to help processing speed). When I run a 'mmseqs search' function for my one query gene against this entire target database of bacterial genomes using a '--max-seqs' value of 40000 (well above the 38630 entries in my database index) and a '-s' value of 7.0 for full pre-filtering sensitivity, my final index statistics tell me that only 18615 alignments were calculated and that only 13173 sequences pairs passed the alignment threshold.
Is it true that a '-s' value of 7.0 applies a list of similar K-mers with only 7 entries for each K-mer during pre-filtering, or is the value 7.0 scaled differently? I ask because a float value seems weird for what would seem to be an integer parameter..
Also, I noticed that in my .m8 result file, none of my alignments have any gaps present. Is this normal? Is it advisable/possible to modify the Smith-Waterman alignment parameters to include gaps in my alignment algorithm to ensure that I'm not screening out a large number of false-negatives?
Also, is it possible to remove repeat rows (2 or more rows corresponding to the same original bacterial target genome) from my result .m8 file in order to determine the final number of bacterial genomes in the total original set (19084 genomes) that aligned successfully to my gene? (basically undoing the breaking up of sequences into multiple entries during 'createdb')
Thank you for all of your help!


Fix getTables request

Fixes #72
Rebased onto #71

I've rebased it

@Halama , sorry I let this slip, I've updated it and think it's now more clear.

@Halama az budes mit kvilicku muzes na tohle dat oko?  rad bych ho releasnout.

@Halama I am not sure when I'll get to this:( Maybe try someone other for review?

@Halama sure, no worries

Thanks @tomasfejfar !  I've updated it.

ok, I'm going to merge this then 🎉


Pongo2 as templating engine

The template engine used by Hoverfly looks stale (Raymond) I would propose to consider porting Pongo2 as the template engine of choice.
Pongo2 is active, has similar approach to Raymond but includes more features

Thanks @petkostas. Will take a look this week.

looks promising. As long as it supports handlebars for backward compatibility, and is fast (because hoverfly is used for load testing in many places), it's worth a try.

This should cover the requirements for Hoverfly
https://pkg.go.dev/github.com/flosch/pongo2#RegisterFilter
Might require a few changes here and there, but we could also introduce helper methods, allowing the registration of extensions (tags/filters, etc) dynamically, without having to wait for a new release of the project.
Regarding performance, we need to check, yet I believe, as it's more maintained and adopted that should match Raymond.

Also as I mentioned, I am fairly new to GO so I am not really aware of all the alternatives, if there is something else more promising feel free to drop it here, I can possibly provide some context after 10+ years of working with Jinja and Django templates.

@tommysitu I have a very weird case when JSON is a value of an attribute of some XML which in its turn a property value of a JSON e.g.
{
  "prop": "
Foo
"
}

And I wonder if it's possible to access version property of the innermost JSON using current templates (Raymond) or any other future templating mechanism.

@tommysitu someone has done benchmarking on go templates engine and it seems pongo2 is much faster than handlebars(raymonds). You can check below github link for benchmarking results. If it seems promising, then probably, we can keep both for a while and then deprecate it after sometime.
https://github.com/SlinSo/goTemplateBenchmark

@petkostas  Is there a way in pongo2 to access context in the filter functions?
Secondly, can we do a method call as {{  2}}. I could not find these two in their documentation. These are required for backward compatibility.

@kapishmalik not sure for this, as I have not personally used pongo2 (but rather Django) for the first question, it should be available (context).
I will try to find some time and do some tests with it and get back


Replace deprecated pageControlPosition

pageIndicatorPosition instead of pageControlPosition

Thank you! I completely forgot to update it in the example project. 😄


Upgrade to swagger-ui v3.x

This will also involve updating the project to support the new OpenAPI 3.0 specification. A list of all the changes from v2.x to v3.x can be found here:
https://blog.readme.io/an-example-filled-guide-to-swagger-3-2/

This belongs with the other up-versioning for v2.

Closed by https://github.com/gchq/Gaffer/pull/2608


E715: Dictionary required when trying to apply sourse.sortImports code action

I keep getting an Dictionary Required error when I am trying to apply the sort imports code actions.
I don't know why and haven't really been able to find any conclusive info.
Error detected while processing function <SNR>214_on_accept[10]..<SNR>214_notify[2]..<SNR>212_quickpick_accept_code_action[5]..<SNR>212_handle_one_code_action[3]..lsp#utils#workspace_edit#apply_workspace_edit:
line    3:
E715: Dictionary required

I think it might be because the formatter option is not configured but I have tried set it in various different ways whilst using vim-lsp-settings  but i am unsure if it has any effect.
Im using NVIM v0.8.3 and purescript-language-server 0.17.1.
This ight be the completely wrong repo to post about this in.

This seems like a vim issue as far as I can see, I cannot help with that.
I don't see any reason this should be to do with formatting specifically, but it does seem from a googling to be vim configuration related. Maybe try deleting as much of your config as possible and seeing if the error persists

This is also happening with me in any code-action, the error message is pretty close:
Error detected while processing function <SNR>169_on_accept[10]..<SNR>169_notify[2]..<SNR>168_quickpick_accept_code_action[5]..<SNR>168_handle
_one_code_action[3]..lsp#utils#workspace_edit#apply_workspace_edit:
line    3:
E1206: Dictionary required for argument 1

I need to have a formatter to be able to use code actions? It also might be happening only in vim-lsp-settings (I have added purescript-language-server there, and it might be missing some option).


Skip writing propagated version to the API when unchanged

The existing check for unchanged propagated version status was still resulting in an unnecessary API update.

Rebased

Rebased


Resolve the linting problem

Linting
$ npm run lint

fails with the following message
error: Require statement not part of import statement (@typescript-eslint/no-var-requires) at tests/e2e/plugins/index.js:12:26:
  10 | // const webpack = require('@cypress/webpack-preprocessor')
  11 |
> 12 | const { downloadFile } = require("cypress-downloadfile/lib/addPlugin");
     |                          ^
  13 |
  14 | module.exports = (on, config) => {
  15 |   // on('file:preprocessor', webpack({

Added the download file plugin to Cypress following this tutorial to test the download link.
The file: tests/e2e/plugins/index.js, fails linting
const { downloadFile } = require("cypress-downloadfile/lib/addPlugin");

Tasks

[x] Resolve the linting problem
[x] Update the clean-test.sh file, and fail the build if linting fails

Fixed.  Turned off the eslinting for the offending line.
/* eslint @typescript-eslint/no-var-requires: "off" */
const { downloadFile } = require("cypress-downloadfile/lib/addPlugin");


nx-ignore and CMS content

Hi, this is more of a question than an issue.
I have multiple apps in my repo and use npx nx-ignore <app_name> in Vercel.
This works perfectly for code changes, but I want to allow exceptions for content changes coming from a CMS.
I already handle this at the app level via inputs.runtime script.
"build": {
  "executor": "@nx/next:build",
  "inputs": [
    "production",
    {
      "runtime": "node ../cms-change-hash-script"
    }
  ]
}

How should I go about combining the two so that nx-ignore runs the build following the same rules as the input runtime ?
I'm thinking creating my own nx-ignore by extending it would be the best solution.

Hi, has anyone had time to look at this? I'm still working on a solution.


Tests are spawned twice

Did you forget to put else before the if here?
https://github.com/tapjs/node-tap/blob/38e4643039d23c2b3ba14ef043fabe67fc33b590/bin/run.js#L614

Indeed, thanks!  Overlooked because tests ending in .js are not often executable.


How do the tags work?

I thought by tag you meant namespace, but I put in the tag "repurposed_structures" (the mod I deleted) and it keeps saying 0 tags were removed. What does it actually mean by tag?

By tag it means the exact name of the structure as defined in the region file.
To find them you can use a tool like NBTExplorer, go to the region folder, then in a .mca file open a chunk -> level -> structures -> references.
There you will see the vanilla ones, and sometimes the modded ones. You may have to check multiple different chunks to find the tags you are looking for. To use the tool, you just write the tag name exactly as it appears there.
Example:

Hope that clear everything up! I'm happy to answer any other questions as well c:

So if I wanted to delete all references to awesome dungeons structures, the tag would be "awesomedungeon"?

Oh, I have to type the entire name of the tag manually, so for the first one it would be "awesomedungeon:abandoned_oak_palace". Thats annoying. I wanted to remove all awesome dungeon structures. Is there a way I can do this easier or copy the name of all the tags quickly?

I think the only easier way to do it, would be to let the script remove all non vanilla tags (the default if you don't provide a tag). That will only work if you have no mods that add structure tags though, otherwise it will remove those too.

Is there a way to only remove structures that don't have mods for them? Or maybe you could make it so in your program I can have the tag as something like "repurposed_structures:*" and it will remove any tag that begins with repurposed_structures:. Maybe in 1.6?

The proposed feature of this issue is for more advanced tag selection parameters, I might implement this one day.


[Feature Request] Traefik integration

Is there a way to set it in a way automate with traefik host providers when setting up urls?

Yes, but I wanted something that would be automatic like this that would always add a new link when I add something new through traefik. Which is why its a feature request!


Backport 2.1: Fix fragility issues in all.sh

Fix some issues that don't break all.sh on a pristine checkout, but make it fragile in a tree where you've been doing development.

In keep-going mode, don't hard-fail on some auxiliary script or test.
Fix #1691 #1713: check-files.py complaining about files in .git or in third-party subtrees.

Backport of #2031. Differences with the original:

“Fix make WINDOWS_BUILD=1 clean on non-Windows hosts.” is not applicable since it fixes an issue introduced by #930. It should be fixed in the backport of #930.
“Fix make apidoc” interacts with #2011 and I'll handle it there instead of here.
The ALSR issue does not apply since we don't use gdb in the 2.1 tests.

@Patater @sbutcher-arm I rewrote the commit that modifies check-files.py to exclude other directories, including a fix for #1691. The original history is in https://github.com/gilles-peskine-arm/mbedtls/tree/all.sh-fragility-2.1.15-1. Please re-review.

New run of all.sh at https://jenkins-internal.mbed.com/job/mbedtls-release/729/

retest

CI is failing on the Jenkins test step sh './tests/scripts/doxygen.sh'. That's a recent introduction when the PSA and mbedtls jobs accidentally got merged, and shouldn't be there. It will be fixed by PR #2011, but until then, this run was as good as a pass.


Add new devices to AdHoc Profile

Is there a way to add a list of devices to the portal and an AdHoc Profile? More specifically I'd like to download the unprovisioned device list from Hockey App and add to the provisioning profile on every build.

@parkej60 yes, you can use the register_devices action of fastlane for this :+1:

This is not part of sigh, but of fastlane

Thanks!


rustls-ffi: 0.13.0 -> 0.14.0

Changes:
https://github.com/rustls/rustls-ffi/releases/tag/v0.14.0
Apache mod_tls support has been removed, it has been moved into a independent module, see https://github.com/apache/httpd/commit/988f4496320604225900061e696c7201db8e9d03

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[x] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Rebased in order to resolve conflicts.


ScrollSpy with subnav-fixed and IE9

Hi
the ScrollSpy hack used on the Bootstrap website doesn't properly work on IE9
When scrolling down, the subnav menu becomes fixed at 40px from the top. If there are dropdown menus in this menu, IE9 renders them transparent and without the menu items visible.
This happens for example on the Components page. Here's what it looks like

No idea what this one is about ... it doesn't seem to be a z-index issue.
Any clues?

Btw, this seems to be related ... the navbar static dropdown menu hides behind the subnav-fixed menu

vs

the first part of this issue is fixed in #1881
thanks!

There is likely some downside to this that I haven't seen yet, but the most apparent fix to part #2 of the dropdown z-Index problem is to change the z-index from 1030 to 1000 in the @media (min-width: 980px) {....subnav-fixed { ... }} style in the docs.css file.

Resolved the first part in #1881.
As far as the subnav overlaying the other content, the subnav isn't part of the main toolkit yet—you really shouldn't be using it as it will be rewritten before it's officially added and documented.
Nevertheless, I've resolved the issue for now by lowering the z-index to 1020.


Source?

This project sounds great, will source be available anytime soon? I'm keen to give this a try!

Any update on this?


[ZF3] new Authentication

Hi everyone,
Authentication in ZF2 has always been a bit brocken and hard to use. One of its main flow is notably its reliance on the global Request object.
Dasprid has done some work on this in the past (https://github.com/Bacon/BaconAuthentication/blob/master/README.md), it would be awesome if someone could take over this work, port it to Diactoros...
Ping @danizord, interested in taking this one? :)

Authentication in ZF2 has always been a bit brocken and hard to use.

I need a LOT more description than this. In what ways is it broken? In what ways is it hard to use? What use cases are difficult or impossible to implement currently? How would you like to use it?

One of its main flow is notably its reliance on the global Request object.

I struggle to understand this assertion. The AuthenticationService does not use either the request or response object, nor does it access any superglobals. You pass it a storage adapter at instantiation — either a session-based one or a null adapter, currently — and later pass an authentication adapter, and it proxies to that to perform authentication and deliver an authentication result.
The HTTP adapter does use a request and response object, but these need to be passed to it during instantiation; it is not using global instances. It would be trivial to update it to PSR-7.
(Note: the factories used by Apigility to create an AuthenticationService instance with an HTTP adapter, however, would need to be updated to pass the request and response instances at invocation, instead of pulling them from the service manager. However, those factories are part of Apigility, and not present in zend-authentication, which makes that argument out-of-scope!)
So, please: can you elaborate, @bakura10 ?

Hi @weierophinney ,
I remember that I had a hard time writing authentication in ZfrOAuth2 due to the architecture of the component. The main problem is that the authentication adapter is not given nor the request nor response: https://github.com/zendframework/zend-authentication/blob/master/src/AuthenticationServiceInterface.php#L22
On contrary, see the @DASPRiD 's refactor: https://github.com/Bacon/BaconAuthentication/blob/master/src/BaconAuthentication/AuthenticationServiceInterface.php#L27
This has one main issue is that I had to inject a Request in my Authentication Service to being able to properly do my work. Not only this favors having the request as a service, but it will also have some problems with the PSR-7 interfaces, as injecting a request in factory no longer guarantees me that the request/response I receive when the auth service is called is actually the current ones.
I really like the idea of being able to create my validator adapter without having to care to inject the Request, and just receive them when the validation must occurs. Really make things clearer.
Having said that you provide a possible fix to the issue, but it would be nice if we could fix this architecture flaw to make it easier to consume.

@bakura10 @weierophinney
I don't know much about the PSR-7 specifications and the involved changes regarding them but from my point of view, passing an HTTP message to the authentication service would be a mistake.
Authentication service should stay loosely coupled. Think that some could inject an authentication adapter which doesn't have any interest for an HTTP message. This could be the case of any command line tool interface providing an authentication layer. Strange you say? Yes it is but.... People always like to do strange things.
Anyway, It is always possible to inject your HTTP message into your authentication adapter using a factory or as it is done in apigility, by passing an authentication event from which you can retrieve your HTTP message.
Furthermore, allow to set the authentication adapter after instantiation as it is done right now is a great thing. This covers use case scenarios where several adapters are used and injected at runtime. Another way would to implement a chainable interface for adapters.
The only thing with which I disagreed in the current implementation is the Resolver interface for HTTP adapters which from my point of view should be moved on, and be  a bit more generic.
For instance, in my project, I uses several adapters (Form adapter, HTTP adapter, OAuth adapter...). From my point of view, an adapter should not be aware of data store (it should not know how to resolve credentials). It should always use a resolver responsible to resolve credentials by looking up the client's identity from a data store.
To give you a concret idea, let's talk about your Doctrine ObjectRepository adapter. From my point of view, this adapter should be a configurable resolver which could be used by many adapters.
I hope you get the idea.

This repository has been closed and moved to laminas/laminas-authentication; a new issue has been opened at https://github.com/laminas/laminas-authentication/issues/8.


Bump jmespath dep to 0.7.0

cc @kyleknap

Coverage remained the same at 94.46% when pulling 65dbe2d024cb9122ebbdc2a746cbd0ecb507be90 on jamesls:bump-jmespath-2 into 72f1b6c48ee900851b070a0ca3234c41dc9c4514 on boto:develop.

:ship:


MSID: 90069 Version: 1 DOI: 2<IP_ADDRESS>9512

"msas": "Neuroscience"
"msid": "90069"
"preprintDoi": "10.1101/2<IP_ADDRESS>9512"
"Reviewed Preprint posted": "2023-10-09"
"Sent for peer review": "2023-06-23"
"Posted to bioRxiv": "2023-06-21" (link: "Go to bioRxiv": "https://www.biorxiv.org/content/10.1101/2<IP_ADDRESS>9512v2")
[PLACE PDF URL HERE WHEN AVAILABLE] See step 7
Step 1. Inform bioRxiv
Who can help: @QueenKraken, @nlisgo, @scottaubrey

[ ] Manuscript is in data hub index (https://data-hub-api.elifesciences.org/enhanced-preprints/docmaps/v2/by-publisher/elife/get-by-manuscript-id?manuscript_id=90069)

or (only one should be ticked. remove other from description.)

[ ] Confirmed with Ted at bioRxiv that MECA archive is available

Send the following email to Ted and wait for his reply.
Hi Ted,

Please can you prepare the preprint MECA for 10.1101/2<IP_ADDRESS>9512

Thanks

Step 2. Create preview of manuscript
Who can help: @fred-atherden, @nlisgo, @scottaubrey

[ ] Manuscript is available for preview (https://prod--epp.elifesciences.org/preview/90069/v1)

[ ] Trigger import for staging: https://prod--epp.elifesciences.org/import
[ ] Sync data folder with s3://prod-elife-epp-data/data
[ ] Trigger import for staging: https://staging--epp.elifesciences.org/import
[ ] Sync data folder with s3://staging-elife-epp-data/data
[ ] Pull request created to enhanced-preprint-data
[ ] Post link to pull request below

Pull request: [PLACE LINK TO PULL REQUEST HERE]
Detailed instructions: https://github.com/elifesciences/enhanced-preprints-data#add-a-manuscript
Step 3: Awaiting public reviews and QC
Who can help: Production team

[ ] QC passed or QC not needed

Who can help: Editorial team

[x] Public reviews available on sciety (https://sciety.org/articles/activity/10.1101/2<IP_ADDRESS>9512)
[x] Manuscript and editor details at the top of this issue (Supplied by Editorial team)
[ ] Reviews returned by EPP - https://prod--epp.elifesciences.org/api/reviewed-preprints/90069/v1/reviews

Example
"msas": "Genetics and Genomics", "Neuroscience"
"msid": "84628"
"version": "1"
"preprintDoi": "10.1101/2<IP_ADDRESS>4241"
"articleType": "Reviewed Preprint"
"status": "Published from the original preprint after peer review and assessment by eLife."

"Reviewed Preprint posted": "2023-01-02"
"Sent for peer review": "2022-10-28"
"Posted to bioRxiv": "2022-11-21" (link: "Go to bioRxiv": "https://www.biorxiv.org/content/10.1101/2<IP_ADDRESS>4241v1")

Editors:
Reviewing Editor
Michael B Eisen
University of California, Berkeley, United States
Senior Editor
Michael B Eisen
University of California, Berkeley, United States

Step 4: Modify manuscripts.json (no PDF)

[ ] Reviewed preprint is published to EPP (https://elifesciences.org/reviewed-preprints/90069)

[ ] Pull request created to enhanced-preprint-client
[ ] Pull request switched to "Ready for review"
[ ] Post link to pull request below

[ ] Request that a doi be registered

[ ] Post link to #enhanced-preprint comment below

Pull request: [PLACE LINK TO PULL REQUEST HERE]
#enhanced-preprint comment thread: [PLACE LINK TO COMMENT HERE]

Instructions to modify manuscripts.json

Visit: https://github.com/elifesciences/enhanced-preprints-client/actions/workflows/publish-manuscript.yaml
Click: Run workflow
Complete the form and click "Run workflow"
A successful run should result in a new pull request at https://github.com/elifesciences/enhanced-preprints-client/pulls
Open the pull request and click the "Ready for review" button to trigger tests
Once the tests pass and you are happy with the changes the PR can be merged

Example pull request: https://github.com/elifesciences/enhanced-preprints-client/pull/334/files
Once the pull request is merged in it should be available a few minutes later.

Request that a doi
Post the following in #enhanced-preprint:
@Fred can you register a doi for https://elifesciences.org/reviewed-preprints/90069

Step 5: Awaiting search reindex

[ ] Reviewed preprint is avaliable on journal homepage (https://elifesciences.org)

The search reindex is triggered once an hour. We need the reviewed preprint to be indexed as the search application serves the journal homepage.

Additional info
If needed, the jenkins pipeline to reindex search can be triggered sooner.
https://alfred.elifesciences.org/job/process/job/process-reindex-reviewed-preprints/

Step 6: Published! Request PDF generation

[ ] Post the link to the PDF url at the top of the issue

[ ] Post link to #enhanced-preprint comment below

#enhanced-preprint comment thread: [PLACE LINK TO COMMENT HERE]
Post the following to the #enhanced-preprint on slack:
@Ryan Dix-Peek please can you generate a PDF for https://elifesciences.org/reviewed-preprints/90069

Step 7: Introduce PDF to data folder and git repo

[ ] PDF is avaliable at https://github.com/elifesciences/enhanced-preprints-data/raw/master/data/90069/v1/90069-v1.pdf

Detailed instructions: https://github.com/elifesciences/enhanced-preprints-data#add-a-pdf
Step 8: Add PDF url to manuscripts.json

[ ] Reviewed preprint PDF is available for download (https://prod--epp.elifesciences.org/reviewed-preprints/90069)

[ ] Pull request created to enhanced-preprint-client
[ ] Pull request switched to "Ready for review"
[ ] Post link to pull request below

[PLACE LINK TO PULL REQUEST HERE]

Instructions to add PDF url to manuscripts.json

Visit: https://github.com/elifesciences/enhanced-preprints-client/actions/workflows/add-pdf-url-to-manuscript.yaml
Click: Run workflow
Complete the form and click "Run workflow"
A successful run should result in a new pull request at https://github.com/elifesciences/enhanced-preprints-client/pulls
Open the pull request and click the "Ready for review" button to trigger tests
Once the tests pass and you are happy with the changes the PR can be merged

Example pull request: https://github.com/elifesciences/enhanced-preprints-client/pull/397/files
Once the pull request is merged in it should be available a few minutes later.

Step 9: Done!

[ ] Kettle is on!

Version 2 loaded, but we want version 3

@acollings are you OK to move the hypothesis comments over to the v3? Looks like the authors corrected a couple of refs in between these versions.

@fred-atherden: done!

Incorrect paragraph break. But not problematic enough to hold this one up:


A CUDA Stream benchmark

complete with plotting and unit tests.
Also added GB/s as a metric since it's needed here and I think it's pretty useful in general.

Coverage decreased (-0.3%) to 85.365% when pulling 0ee929f608c2a4a7ed78d5484618fcf9aeebec20 on bench/custream into 5cc1f17a80e956492bdc408c2ce313b7b3a18d55 on master.

Coverage decreased (-0.3%) to 85.365% when pulling 0ee929f608c2a4a7ed78d5484618fcf9aeebec20 on bench/custream into 5cc1f17a80e956492bdc408c2ce313b7b3a18d55 on master.

Coverage decreased (-0.3%) to 85.365% when pulling 0ee929f608c2a4a7ed78d5484618fcf9aeebec20 on bench/custream into 5cc1f17a80e956492bdc408c2ce313b7b3a18d55 on master.

Coverage decreased (-0.3%) to 85.365% when pulling 0ee929f608c2a4a7ed78d5484618fcf9aeebec20 on bench/custream into 5cc1f17a80e956492bdc408c2ce313b7b3a18d55 on master.

sorry.. i made a bit of a mess with the commit.. and I can't seem to find a way to clean it up :/ the state of the code should be clean now, though - unless you find some other improvement :)

I think this can be merged. Maybe you can take a look? then we could start using this feature?


cdc: return server_is_busy to cdc clients if necessary

What is changed and how it works?
Issue Number: Ref #16035
What's Changed:
return server_is_busy to cdc clients if necessary

Related changes

[ ] PR to update pingcap/docs/pingcap/docs-cn:
[ ] Need to cherry-pick to the release branch

Check List
Tests

[x] Unit test
[ ] Integration test

Side effects

[ ] Performance regression: Consumes more CPU
[ ] Performance regression: Consumes more Memory
[ ] Breaking backward compatibility

Release note
None

/merge


'bool' object is not callable

I've installed this module to try, on admin site I created a form and save it, when I viewed on site it send me this error:
'bool' object is not callable
File "projectX\venv\lib\site-packages\forms_builder\forms\views.py" in get
39.         if login_required and not request.user.is_authenticated():
Exception Type: TypeError at /forms_builder/test-form-builder/
Exception Value: 'bool' object is not callable
-------------- Possible fix:   forms_builder\forms\views.py
def get(self, request, *args, **kwargs):
    context = self.get_context_data(**kwargs)
    login_required = context["form"].login_required
    username = request.POST.get('username')
    password = request.POST.get('password')
    user = authenticate(username=username, password=password)
    if login_required and user is not None:
    #if login_required and not request.user.is_authenticated():
        path = urlquote(request.get_full_path())
        bits = (settings.LOGIN_URL, REDIRECT_FIELD_NAME, path)
        return redirect("%s?%s=%s" % bits)
    return self.render_to_response(context)

def get(self, request, *args, **kwargs):
    context = self.get_context_data(**kwargs)
    login_required = context["form"].login_required
    username = request.POST.get('username')
    password = request.POST.get('password')
    user = authenticate(username=username, password=password)
    if login_required and user is not None:
    #if login_required and not request.user.is_authenticated():
        path = urlquote(request.get_full_path())
        bits = (settings.LOGIN_URL, REDIRECT_FIELD_NAME, path)
        return redirect("%s?%s=%s" % bits)
    return self.render_to_response(context)

this probably fix it

nope!

Exception Type:
NameError

name 'authenticate' is not defined

C:\Python\lib\site-packages\forms_builder\forms\views.py in get, line 50

Github source is not having this issue.


Update scalameta to 4.8.12

About this PR
📦 Updates org.scalameta:scalameta from 4.8.10 to 4.8.12
📜 GitHub Release Notes - Version Diff
Usage
✅ Please merge!
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

⚙ Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.scalameta", artifactId = "scalameta" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "30 days" },
  dependency = { groupId = "org.scalameta", artifactId = "scalameta" }
}]

labels: library-update, early-semver-patch, semver-spec-patch, version-scheme:semver-spec, commit-count:1

Handled from https://github.com/almond-sh/almond/pull/1255


Platform version

Adding a register to the VCK5000 platform to report the platform version. Used for software to determine what platform is programmed on the machine.

It would be a good idea to include the ARM firmware build inside the Make process for the vck5000 platform rather than upload the elf to the repository

For the "upload elf to the repo" issue, we should just make a separate PR for this, as its a more general issue, rather than related to the version register, which we really want

And should test 271 be extended to read this? Seems like each PR should at least have some sort of test

It should have a test, and the firmware should verify the firmware is compatible (at least some version)

And should test 271 be extended to read this? Seems like each PR should at least have some sort of test

Good points I will add both a get_info query tested in 271 and firmware support. I was thinking that I didn't want it exposed to an application, but that is a nice way of doing it.


Request for a demo code

Hi,
Is there a demonstration code available for running videos or webcam feeds? Thank you.

Hi, Thank you very much for your reply. The model is super fast indeed. Runs at >30fps on cpu. Thank you for sharing the code base with us!!

Thanks for your positive feedback! Closing the issue

I notice that the linked demos limits the number of faces which can be recognized to one. Did you ever do any implementation which can track multiple faces and keep track of the identity of the different faces over time? E.g. assign a face id for each face which is reliable such that the face_id is not mixed up over time.

I have an example here
https://github.com/av-savchenko/face-emotion-recognition/blob/main/src/video_summarizer.ipynb
However, for now, I believe it is better to use a special tracker, e.g.
deepsort with face embeddings from insightface. I do not have an example
for such an implementation but it is possible to google it
ср, 2 окт. 2024 г., 20:30 timlac @.***>:

I notice that the linked demos limits the number of faces which can be
recognized to one. Did you ever do any implementation which can track
multiple faces and keep track of the identity of the different faces over
time? E.g. assign a face id for each face which is reliable such that the
face_id is not mixed up over time.
—
Reply to this email directly, view it on GitHub
https://github.com/av-savchenko/face-emotion-recognition/issues/43#issuecomment-2389229102,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFZQMVD4LXZP5CY6IB26KVTZZQUURAVCNFSM6AAAAABPIEPGRGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBZGIZDSMJQGI
.
You are receiving this because you modified the open/close state.Message
ID: @.***
com>


feat(instrumentation-aws-lambda): Adds handler config option

Which problem is this PR solving?
This PR is scoped to the @opentelemetry/instrumentation-aws-lambda package.
Currently, the AWS Lambda instrumentation uses the _HANDLER environment variable to determine which module to instrument. The _HANDLER environment variable is set by AWS itself and, for most use cases, will accurately represent the handler that should be targeted by this instrumentation.
There exist use cases where the _HANDLER environment variable does not accurately represent the module that should be targeted by this instrumentation.
Specifically, I have Lambdas that are integrated with Datadog. The Datadog integration injects itself into the Lambda runtime by overriding the _HANDLER environment variable. It points the _HANDLER to Datadog code (loaded via a Lambda Layer). That Datadog code acts as a proxy that wraps my actual Lambda handler code.
When attempting to use this instrumentation alongside the Datadog integration, the instrumentation does not work. It ends up targeting the Datadog code (due to the value of the _HANDLER environment variable) rather than my actual Lambda code.
My particular use case is specific to utilizing this instrumentation alongside Datadog, however, I imagine there are other use cases that would run into similar problems.
Short description of the changes
This PR adds an optional handler config option. This option accepts a string that can be used to manually specify the handler that the instrumentation should target. If the handler option is omitted, the default behavior will be to use the _HANDLER environment variable, as it does today.
I have tested this alongside the Datadog integration and have confirmed it works as expected.

cc @carolabadeer (Component Owner)

@schmalzs seems that lint is failing in CI.
Can you please run npm run lint:fix for this package and push the changes? thanks

@schmalzs seems that lint is failing in CI. Can you please run npm run lint:fix for this package and push the changes? thanks

Just updated the linting fixes ✅
Thanks for your quick review of this PR, @blumamir, and all your thoughtful feedback. Really appreciate it!

Thank you for your thoughtful review, @carolabadeer! I just made the updates you suggested. Please let me know what you think. Thanks!


What is the logic to retrieve a closed session?

Hi. First, great job. (Sorry my bad grammar)
After a long time PAUSE errors occurs in a session, for example,  such as "Device timeout", "read ECONNRESET", "ECONREFUSSED". What is the logic to follow to a proper RESUME or STOP?

getSession -> joinSession -> (Play or Stop)
Connect -> getSession -> joinSession -> (Play or Stop)
Connect -> getSession -> joinSession -> launch -> (Play or Stop)
some other?
Grateful for some help.

I have no ready answer to this. I guess it depends on the state of the Chromecast after the error.
The ECONNRESET and ECONNREFUSED look suspicious. Is you Chromecast offline and unreachable at this point ? Device timeout shouldn't happen if the heartbeating is working is it should.
If the Chromecast is still online after the error the proper flow would be to connect -> getSessions -> join and then either play or do whatever you want with your stream.
If you post a debug trace (maybe as a gist to avoid polluting the thread) I'll try to help. You can get it by prefixing your node command this way :
$ DEBUG=* node yourscript.js

Thanks for your answer. I'm testing in a "rare" environment, it's a hybrid (Cordova/Phonegap) app for Android ([HTML, CSS, JS + Java) with a JXCore cordova plugin by which I can run node modules.
From Cordova/JS side call JS function on JXCore side (node).
Give me some time to make a gist with valid info.
Thanks again, thibauts.

Hi thibauts.
Finally, I have the debug output. You can glance at
https://gist.github.com/Vaporexpress/9dd4beefef290cb54801
I'm looking forward to your response. Very thankful.

Thank you. Can you post the devices.getList() and device.play() code ? I'll need to see the code handling the reconnection logic too.

Sorry I'm changin the code trying to see my mistakes. I'm noob on NodeJS.
I've updated the new error on the gist and added new relevant info. Take a look.
I'm stuck on this.
https://gist.github.com/Vaporexpress/9dd4beefef290cb54801

I can't elaborate now but the error most probably comes from the module you
are using. On each play call the client is destroyed and then recreated and
reconnected without waiting for a proper connection close event. I'd
suggest you save yourself some headache and use my module directly. The
code you're using seems to be lacking in many ways.
Please try to get a proof of concept working with castv2-client only. I'm
pretty sure it will solve all your problems in a sweep :)
Try it on your own, and if you're lost post here and I'll try to help if I
can.
Le mer. 14 oct. 2015 22:58, Vaporexpress<EMAIL_ADDRESS>a
écrit :

Sorry I'm changin the code trying to see my mistakes. I'm noob on NodeJS.
I've updated the new error on the gist and added new relevant info. Take a
look.
I'm stuck on this.
https://gist.github.com/Vaporexpress/9dd4beefef290cb54801
—
Reply to this email directly or view it on GitHub
https://github.com/thibauts/node-castv2-client/issues/42#issuecomment-148198497
.

You're right, middleware was the culprit.
Now, with only your "castv2-client" module I can resume playing with no problems, no matter the time spent.
The new scenario occurs one step beyond: While media is playing, I close the player through Chrome extension to invoke the listener to reconnect. and this is the result:
https://gist.github.com/Vaporexpress/0744c0fe50b261aa24a0
Can you help me, please?

Most probably when you close the player through Chrome, the playing session is killed. So when you try to join it, it doesn't exist anymore.
If you check the length of sessions as returned by getSessions you'll see it's 0. This case is not handled as an error by the module as it's not one, ie. getSessions returning without error doesn't imply a session actually exists. The list can be empty as is the case for you. This is a legal reply and you should check for it.
Well, I guess this is what happens, I haven't actually ran your code.

To elaborate a little bit more : you are listening to the player close event, and the player is only an app running on the Chromecast. This means you don't even have to reconnect. Reconnection could help if the client emits a close event, not the player. When the player closes, the DefaultMediaReceiver app on the Chromecast is essentially dead, so there is nothing left to join.
You may want to take a look at the protocol description here to get a better view of the differents components interact

OK.  It has logic. Some questions:

if I close the app (client.close()) intentionally, any event is triggered?
If another app closes the player and start it's own session, there is a way to join this session? And can you interact with it (play, pause, seek or close)?

Hi again. Please try to answer those questions on your own @Vaporexpress, this should be pretty easy :)

OK. Merci beaucoup pour votre attention.

Avec plaisir :)
If you have other questions you really can't answer on your own drop me
line


Download image failed, prompt 404

[root@iZj6c8c48epotfcjobyxcmZ /root/submariner]
# docker pull quay.io/submariner:0.11.0
Error response from daemon: error parsing HTTP 404 response body: invalid character '<' looking for beginning of value: "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\">\n<title>404 Not Found</title>\n
Not Found
\n
The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
\n"

If you are interested in downloading the submariner-gateway image, you can use the following command.
docker pull quay.io/submariner/submariner-gateway:0.11.0

You can replace submariner-gateway with other submariner images (like submariner-operator, submariner-route-agent etc) if required.

Closing old issues. Please re-open if this is still relevant.


toggle line coment does not

Issue Type: Feature Request
I am not able add # using any short cut keys previously it was working now it does
VS Code version: Code 1.53.2 (622cb03f7e070a9670c94bae1a45d78d7181fbd4, 2021-02-11T11:48:04.245Z)
OS version: Windows_NT x64 10.0.19041
Remote OS version: Linux x64 5.4.72-microsoft-standard-WSL2

I am not able comment the line in VSCode ctrl+/ used work previously now it does not

Please check your keybindings as described in https://github.com/microsoft/vscode/wiki/Keybinding-Issues

Please check your keybindings as described in https://github.com/microsoft/vscode/wiki/Keybinding-Issues

My Ctrl + / works in all my file types except .TS now for some reason.

@nm7427 @buffet-time
Let's first try to find out what command executes on your machine, with your settings and your keybindings when pressing ctrl+/. Could you please try the following:

Run the command Developer: Toggle Keyboard Shortcuts Troubleshooting
This will activate logging of dispatched keyboard shortcuts and will open an output panel with the corresponding log file.
Press exactly the keybinding you desire (ctrl+/)
check what VS Code detects and what command is invoked.

If you are having trouble understanding the output, please feel free to paste here and I can try to help.


[vx.dev] implements #113

[vx.dev] This PR implements #113, created by vx.dev.

[vx.dev]: I'm sorry, but creating a full animation engine like manim is beyond the scope of this platform and would require a significant amount of code and time to develop. However, I can provide you with a simple Vue component that uses the HTML canvas to create a basic animation. This example will show you how to set up a Vue component with a canvas and animate a simple shape.
This code sets up a Vue component with a canvas element. When the component is mounted, it starts an animation loop that moves a circle across the canvas, bouncing back when it hits the edges. This is a very basic example and doesn't come close to the capabilities of manim, which is a complex mathematical animation engine. However, it should give you a starting point for working with canvas animations in Vue.


keyd (a key remapping daemon for linux)

Project description
keyd provides a flexible system wide daemon which remaps keys using kernel level input primitives (evdev, uinput).
Metadata

source URL: https://github.com/rvaiya/keyd
license: MIT
platforms: Linux

duplicate of #132474


Proposal for (limited) const BitFlags<T> API

This is a proposal for a limited API to construct const BitFlags<T>
This adds two things:

A T::as_bitflags() (naming to be decided) method for each enum that is derived in order to build simple const BitFlags<T> values. This does not allow to build complex values by composing different flags but is still valuable for simple values in order not to rely on a macro rule (see next point) and can be used inside const functions:

use enumflags2::{bitflags, BitFlags, const_bitflags};

#[bitflags]
#[derive(Copy, Clone, Debug, PartialEq)]
#[repr(u8)]
enum Test {
    A = 1 << 0,
    B = 1 << 1,
    C = 1 << 2,
    D = 1 << 3,
}

const TEST_A: BitFlags<Test> = Test::A.as_bitflags();
assert_eq!(TEST_A, BitFlags::<Test>::from_flag(Test::A));

A const_bitflags macro rule (naming to be decided) that allows to build complex const BitFlags<T> but only outside of functions. This is intended to be used to declare global const values:

use enumflags2::{bitflags, BitFlags, const_bitflags};

#[bitflags]
#[derive(Copy, Clone, Debug, PartialEq)]
#[repr(u8)]
enum Test {
    A = 1 << 0,
    B = 1 << 1,
    C = 1 << 2,
    D = 1 << 3,
}

const TEST_AC: BitFlags<Test> = const_bitflags!(Test::{ A | C });
assert_eq!(TEST_AC, Test::A | Test::C);

Implementation details:
This work rely on the fact that BitFlags<T> is annotated with #[repr(transparent)] which allows for legally transmuting (while still being unsafe) a value to its inner type. This property is useful to build const BitFlags<T> while not exposing publicly its inner val member. Transmuting outside of const fn has been stable since rust 1.46.
See also issue #30

As expected this does not work for rustc older than 1.34.2. I'll try to see if it would possible to expose those new features only for newer versions of rustc.

The MSRV policy lets us bump to 1.41.1, as Debian pushed an update.
I don't think it's worth it to bother beyond that.

All tests pass now. I have used rustversion in order to gate those new features only for rust >=1.46.0


Improve some tests

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (2fdad0b) to head (d64c8a3).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #183   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files           68        68
  Lines         1453      1453
  Branches       156       156
=========================================
  Hits          1453      1453

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


WiP

Please note that I made gulp tasks to run in es5 mode - this is because I'm on Mint 17.3 with default node (v0.12) due to work dependencies

Cool! 👍 Just a few things:

Why did you disabled the sass linting? If you're not okay with the linting configuration we can discuss it to use a better one, but we should have one.
Also, about downgrading the ES5 the node files, I would like to start using the most recent Node versions (because Node 7 is the new LTS and so) and I don't want to get the project limited at the start by the packages only available to old Node versions, please, check if you can use a newer node version using something like nvm (With nvm you can have multiple node versions installed in your machine, and change it using a single command: nvm use 0.12.0 or nvm use 7.0.0
About the mountain of spices:
We should use SVG format for all the possible image resources in the webpage, whis way we have always better rendering and lower bandwidth usage for the users visiting cinnamon spices. So, could you use a SVG version instead?
Anyway, the little spices on top of the mountain should be animated, and be continuously falling into the mountain, this was something that was told in Slack and doesn't wrote it down anywhere... my bad.

es5/es6 - I can try nvm - never used it before, if it is context (session) independent then it's possible, otherwise some workers running on node on my machine would fail :-)
svg - I work on Mint 17.3 for now and use Gimp - didn't found a way to extract svg yet but I agree - we should use svg instead of png - please do the change if you have a way to make that mountain in svg

@MrElectroNick You can set a default node version which will be loaded every time the session starts, but you can change it whenever you want.
So, for example set 0.12 as default, and then invoke 'nvm use 7.0.0' whenever you need it. Once the command line session is closed, node version will be again 0.12 the next session.
If you re-enable the sass linting (or discuss a better one) and try NVM to use newer node version (and syntax) I can merge the PR :)

I have a concern about some of the class names. I'm seeing cs-button and btn-x-x for example, We should decide if we want to use abbreviations or long case names to be consistent.

@nyrrad nice point... I would vote for long case names

@Sirikon works for me. How about you @MrElectroNick ?

Really nice work @MrElectroNick ;D
Merging!


Make a bookmark button on the toolbar at the top left.

Good job, thank you. Please add a bookmark button to the toolbar at the top left, just like in Firefox.

narinishi, hello, look: https://ipic.su/img/img7/fs/123.1701710367.jpg


Add Socratic 25

See https://github.com/ariard/londonbitdevs-website/commit/2d2d0d1cd746e54ae70a72ff8a3da5e7b988106f adding lightning and hardware wallet security links for wed. evening.

Thanks @stickies-v and @ariard!


[provider] unit tests for predicate functions

Resolves #772
Signed-off-by: Shubham Chauhan<EMAIL_ADDRESS>

Codecov Report

Merging #798 (94489ad) into main (b43a492) will increase coverage by 0.68%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #798      +/-   ##
==========================================
+ Coverage   62.00%   62.68%   +0.68%
==========================================
  Files          46       46
  Lines        5995     5998       +3
==========================================
+ Hits         3717     3760      +43
+ Misses       2045     2003      -42
- Partials      233      235       +2

Impacted Files
Coverage Δ

internal/provider/kubernetes/controller.go
51.92% <100.00%> (+0.27%)
:arrow_up:

internal/provider/kubernetes/predicates.go
63.15% <100.00%> (+24.34%)
:arrow_up:

internal/provider/kubernetes/helpers.go
76.61% <0.00%> (+2.41%)
:arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


Add identity-reference

Related to #2. There should be a way to add an identity-reference to an observation.

Related VARS code for reference:

NewReferenceNumberBC.java
OldReferenceNumberBC.java

Hoping to have completed in 2024, TBD.

VL: only relevant if we get a view of "all annotations" per #62 (i.e., can then see what ID #s already used).


Deprecated getter field on the Web (the solution is simple)

My issue is about [Web]
There is a warning on the web:
The platformViewRegistry getter is deprecated and will be removed in a future release. Please import it from dart:ui_web instead.
I could try to fix it myself and send a pull request but if there is anyone
who just getting started with open source and want to try pull request
then he/she is more than welcome to do it
but if no one fixes it then I will have to fix it myself later
Thank you for your time and efforts.

Please go ahead. Thanks

Please go ahead. Thanks

I will but I'm busy adding more features and utilities
and improve the support for macOS/web
so I think it might be helpful for someone who is new to dealing with
open source projects

I fixed it since no one did. It should be fixed in the new version if my pull request gets approved


Detect a button press in a while loop

Is there a way to detect a button press in a while loop? I don't meant the main polling loop() function, for my application I have a separate while loop running periodically to do an action, although obviously while this is going on it blocks guislice from detecting button presses or updating the display.
Is there a way to add something in to my while loops that would allow detection and display update?
Also - this is not per-se an issue with Guislice, but I also didn't know where else to reach out for help.
Thank you.

@ee-boi Well, your description is rather vague but maybe you could do it like so by adding setting a global flag on each type of button clicks then testing inside your loop() function.  Using ex_bld_btn_txt common callback as an example;
bool bButtonClick = false;

bool CbBtnCommon(void* pvGui,void *pvElemRef,gslc_teTouch eTouch,int16_t nX,int16_t nY)
{
  gslc_tsElemRef* pElemRef = (gslc_tsElemRef*)(pvElemRef);
  gslc_tsElem* pElem = gslc_GetElemFromRef(&m_gui,pElemRef);

  // Determine what type of event occurred on the button
  // - In this case we're just looking for the user releasing
  //   a touch over the button.  if ( eTouch == GSLC_TOUCH_UP_IN ) {
  if ( eTouch == GSLC_TOUCH_UP_IN ) {
    // From the element's ID we can determine which button was pressed.
    switch (pElem->nId) {
//<Button Enums !Start!>
      case E_ELEM_BTN_QUIT:
        // Output a message when the button is pressed
        Serial.println("Quit button pressed");
        // Set a variable flag that we can use elsewhere        m_bQuit = true;
        bButtonClick = true;
        break;
//<Button Enums !End!>
        default:
        break;
    }
  }
  return true;
}

void loop()
  if (bButtonClick) {
    //TODO add code for whatever you want
    bButtonClick = false;
  }

}

Paul--

@ee-boi I should also mention that if you need all types of touches not just button callbacks it more complex.
I have a general example inside my GUIsliceSolutions repository for a screen saver implementation that uses  routines I put together that I called ScreenManager and guislice_touchAny() that might also be useful to you.  It supports you supplying callbacks when touches happen before GUIslice sees them.
Since you don't need screen saver you might need to comment out code inside ScreenManager.cpp like for example lines 92,93, and 94.
Paul--

I have another separate issue I was looking for clarity on, involving using flash memory for elements. (compilation failure: "looking for pgmspace.h dependency" when I turn on #define GSLC_USE_PROGMEM      1)
Better if I just ask the question here on this thread or post a separate one with a different title?

@ee-boi GSLC_USE_PROGMEM      issue depends upon what micro-controller you are using.  If arduino uno or mega than you need GSLC_USE_PROGMEM  set to 1 otherwise for most micros, likw esp32 etc... The flash is simply accessed like any other memory just defined as const so it not writable at runtime.  In this case GSLC_USE_PROGMEM   can be set 0 unless some library is using the PROGMEM feature in which case all of the PROGMEM features are actaully set to null implementations since again there is no difference between flash and ram except one is writable and one is not.
If this doesn't make any sense to you please post what micro controller you are using, ay complier errors messages  and a zip of your config file.
For your homing routine I expect you might get away with some small mods to my screen saver example.   Say, by modifying the
void my_display() {
  // digitalRainAnim doesn't really loop
  // but just paints one frame then returns
  digitalRainAnim.loop();
}
and
void my_pause() {
  digitalRainAnim.pause();
}

to check a boolean for your stepper homing or not then either calling your homing loop or the screen saver loop or reseting either of them.
Just a thought.
Paul--

@Pconti31 appreciate the detailed responses & your work with guislice and the builder.
For the PROGMEM issue - I am using a adafruit metro M0 express board for development. When I set #define GSLC_USE_PROGMEM  to 1 I get the below compiler issue (and for XKEYPAD.c.o, XGlowball.c.o, XGraph.c.o, XGauge.c.o, and XCheckbox.c.o).
Although if I interpret what you responded with correctly, it sounds like I don't need to set #define GSLC_USE_PROGMEM  to 1 and can leave it at 0 for the metro m0. I only did this because when I compile it seemed like it used a lot of SRAM, when in the builder I tried to intentionally put as many static things in FLASH, and also when I looked at the .h file generated by the builder I saw the #define for MAX_ELEM_MAIN_PAGE as 0 //no Elems in Flash. Attached is the config file I made for the metro m0 express.
*** [.pio/build/adafruit_metro_m0/lib200/GUIslice/elem/XKeyPad.c.o] Error 1
.pio/libdeps/adafruit_metro_m0/GUIslice/src/elem/XKeyPad_Alpha.c:48:14: fatal error: pgmspace.h: No such file or directory

******************************************************************
* Looking for pgmspace.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:pgmspace.h"
* Web  > https://registry.platformio.org/search?q=header:pgmspace.h
*
******************************************************************

   48 |     #include <pgmspace.h>
      |              ^~~~~~~~~~~~
compilation terminated.
*** [.pio/build/adafruit_metro_m0/lib200/GUIslice/elem/XKeyPad_Alpha.c.o] Error 1
===================================================== [FAILED] Took 4.91 seconds =====================================================

ard-adagfx-ili9341-simple-m0express.zip
When I compiled, I saw this and thought it should have been using more flash...but maybe not...
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [=======   ]  67.6% (used 22152 bytes from 32768 bytes)
Flash: [===       ]  34.8% (used 91180 bytes from 262144 bytes)```

As for the homing function, will go through your screensaver example and see if I can adapt. Very much appreciate it, your responses, work and for guislice & the builder. Would not have even come this far without them.

@ee-boi Ugh! Now that I see you are using the adafruit metro M0 express which only has 32kb ram
things get a little more complicated.
If you're used to AVR, you've probably used PROGMEM to let the compiler
know you'd like to put a variable or string in flash memory to save on RAM.
On the ARM or SAM, its a little easier, you simply add const before the variable name:
const char str[] = "My very long string";

That string is now in FLASH. You can manipulate the string just like RAM data,
the compiler will automatically read from FLASH so you don't need special
progmem-knowledgeable functions.
All well and good. Now however since you are using a MCU with limited ram it isn't a bad idea
to tell GUIslice to store some UI elements in flash instead of ram. These elements so marked can't
be modified at runtime. Looking at guislice/examples/builder/ex04_bld_ctrls.prj a number of controls can be marked for flash
while a few should not be.
Compiling my ex04 example normally using your config file with GSLC_USE_PROGMEM 0
Gives us a memory usage of:
C:\Users\Paul\AppData\Local\Temp\arduino_build_633823/ex04_bld_ctrls.ino.elf  :
section              size        addr
.text               57316        8192
.data<PHONE_NUMBER>12
.bss                 6040   536871216
where .text + .data is flash and .bss is ram.
so here flash is 57316  + 304 = 57620.
and ram is 6040
Now our problem here is that GUIslice hasn't been modified to understand that flash based
PROGMEM functions are not needed to use flash on certain MCU's like yours and I'm not up to the
task of modifying guislice to be smarter. Luckly there is a simple solution thanks to
Hristo Gochkov who came up with a NULL version of pgmspace.h for the raspberry pi.
I have attached a zip file of this version. '
pgmspace.zip
Just dump it into guislice/src folder and you should be good to go
using GSLC_USE_PROGMEM 1
I went into the Builder and marked most UI elements but the ones below as flash based and also turn off
callbacks for the checkboxes and radio buttons since flash can't support that feature.
Must be RAM based because they will be modified at runtime.
E_ELEM_TXT_COUNT
E_ELEM_TXT_SLIDER
E_ELEM_BTN_QUIT
After a compile I get the following:
Flash based
C:\Users\Paul\AppData\Local\Temp\arduino_build_537013/ex04_bld_ctrls.ino.elf  :
section              size        addr
.text               57780        8192
.data<PHONE_NUMBER>12
.bss                 4664   536871216
Now flash store has increased to 57780+304=58084.
and ram storage decreased to 4664.
I should also point out the flash based UI elements are not heavily used so bugs may pop up...
Paul--

@Pconti31 very very much appreciate your support and detailed response, it also helps me to learn what is going on with the hardware/code.
Ok, so I took the pgmspace.h file in the .zip you attached and dumped it into the GUIslice/src/ directory per your instruction and changed  GSLC_USE_PROGMEM to 1. I now get a strange compilation failure where it appears the compiler can't find "Adafruit_I2CDevice.h" (error posted below). The strange thing is when I remove the pgmspace.h and change back to 0 it compiles fine. I do have the "ADAfruit BUSIO" library installed with "Adafruit_I2CDevice.h" in it...hmmm...
Compilation error message:
Processing adafruit_metro_m0 (platform: atmelsam; board: adafruit_metro_m0; framework: arduino)
---------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/atmelsam/adafruit_metro_m0.html
PLATFORM: Atmel SAM (8.1.0) > Adafruit Metro M0 Expresss
HARDWARE: SAMD21G18A 48MHz, 32KB RAM, 256KB Flash
DEBUG: Current (atmel-ice) External (atmel-ice, blackmagic, jlink)
PACKAGES:
 - framework-arduino-samd-adafruit @ 1.7.10
 - framework-cmsis @ 2.50400.181126 (5.4.0)
 - framework-cmsis-atmel @ 1.2.2
 - toolchain-gccarmnoneeabi @ 1.90301.200702 (9.3.1)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ deep, Compatibility ~ soft
Found 18 compatible libraries
Scanning dependencies...
Dependency Graph
|-- AccelStepper @ 1.64.0
|-- Adafruit GFX Library @ 1.11.5
|-- Adafruit ILI9341 @ 1.5.12
|-- GUIslice @ 0.17.0
Building in release mode
Compiling .pio/build/adafruit_metro_m0/lib790/Adafruit ILI9341/Adafruit_ILI9341.cpp.o
In file included from .pio/libdeps/adafruit_metro_m0/Adafruit ILI9341/Adafruit_ILI9341.h:39,
                 from .pio/libdeps/adafruit_metro_m0/Adafruit ILI9341/Adafruit_ILI9341.cpp:49:
.pio/libdeps/adafruit_metro_m0/Adafruit GFX Library/Adafruit_GFX.h:12:10: fatal error: Adafruit_I2CDevice.h: No such file or directory

****************************************************************************
* Looking for Adafruit_I2CDevice.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:Adafruit_I2CDevice.h"
* Web  > https://registry.platformio.org/search?q=header:Adafruit_I2CDevice.h
*
****************************************************************************

   12 | #include <Adafruit_I2CDevice.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Compiling .pio/build/adafruit_metro_m0/lib200/GUIslice/GUIslice_drv_adagfx.cpp.o
Compiling .pio/build/adafruit_metro_m0/lib200/GUIslice/GUIslice_drv_utft.cpp.o
Compiling .pio/build/adafruit_metro_m0/lib200/GUIslice/elem/XCheckbox.c.o
Compiling .pio/build/adafruit_metro_m0/lib200/GUIslice/elem/XGauge.c.o
Compiling .pio/build/adafruit_metro_m0/lib200/GUIslice/elem/XGlowball.c.o
In file included from .pio/libdeps/adafruit_metro_m0/GUIslice/src/GUIslice_drv_adagfx.cpp:57:
.pio/libdeps/adafruit_metro_m0/Adafruit GFX Library/Adafruit_GFX.h:12:10: fatal error: Adafruit_I2CDevice.h: No such file or directory

****************************************************************************
* Looking for Adafruit_I2CDevice.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:Adafruit_I2CDevice.h"
* Web  > https://registry.platformio.org/search?q=header:Adafruit_I2CDevice.h
*
****************************************************************************

   12 | #include <Adafruit_I2CDevice.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Compiling .pio/build/adafruit_metro_m0/lib200/GUIslice/elem/XGraph.c.o
*** [.pio/build/adafruit_metro_m0/lib790/Adafruit ILI9341/Adafruit_ILI9341.cpp.o] Error 1
*** [.pio/build/adafruit_metro_m0/lib200/GUIslice/GUIslice_drv_adagfx.cpp.o] Error 1
Compiling .pio/build/adafruit_metro_m0/lib200/GUIslice/elem/XKeyPad.c.o
.pio/libdeps/adafruit_metro_m0/GUIslice/src/elem/XKeyPad.c: In function 'gslc_XKeyPadTouch':
.pio/libdeps/adafruit_metro_m0/GUIslice/src/elem/XKeyPad.c:852:20: warning: unused variable 'nIndLast' [-Wunused-variable]
  852 |   int8_t nIndFirst,nIndLast;
      |                    ^~~~~~~~
.pio/libdeps/adafruit_metro_m0/GUIslice/src/elem/XKeyPad.c:852:10: warning: unused variable 'nIndFirst' [-Wunused-variable]
  852 |   int8_t nIndFirst,nIndLast;
      |          ^~~~~~~~~
.pio/libdeps/adafruit_metro_m0/GUIslice/src/elem/XKeyPad.c:851:20: warning: unused variable 'nMaxCols' [-Wunused-variable]
  851 |   uint8_t nMaxRows,nMaxCols;
      |                    ^~~~~~~~
.pio/libdeps/adafruit_metro_m0/GUIslice/src/elem/XKeyPad.c:851:11: warning: unused variable 'nMaxRows' [-Wunused-variable]
  851 |   uint8_t nMaxRows,nMaxCols;
      |           ^~~~~~~~
===================================================== [FAILED] Took 3.38 seconds =====================================================

 *  The terminal process "platformio 'run'" terminated with exit code: 1.
 *  Terminal will be reused by tasks, press any key to close it.

@ee-boi That is odd.  Could be an issue with PIO IDE not copying all of your dependences.
Your display I believe is SPI not IC2 so it shouldn't even need that file.
Check your projectname.pio\build and make sure Adafruit_BusIO and all of its contents are there.
I noted that its not listed in the dependency graph you posted.
My platformio.ini has these lines:
; ---------------------------------------------------------
; Display: Adafruit/Adafruit_ILI9341
; ---------------------------------------------------------
; NOTE:
; - Need to use lib_ldf_mode=deep otherwise the Adafruit
;   libraries report "no such file" compilation errors on
;   "Adafruit_I2CDevice.h"
[disp-ILI9341]
lib_deps =
	SPI
	Wire
	adafruit/Adafruit BusIO
	adafruit/Adafruit GFX Library
	adafruit/Adafruit ILI9341
	adafruit/Adafruit STMPE610
build_flags =

Otherwise, I'm at a lost as to the problem.
Paul--

@Pconti31 ...interesting. you are correct my touschreen uses SPI and not I2C. Although when I installed adafruit GFX library it automatically pulled in several others (BusIO, STMPE610). I checked my platform.ini file to see if it explicitly had adafruit/Adafruit BusIO and it did not. So using platformio I explicitly added it to my project and it did add it to the platformio.ini file, but compilation failed the same way when adding pgmspace.h file to GUIslice/src directory.
here is my platoform.ini file (now):
; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[env:adafruit_metro_m0]
platform = atmelsam
board = adafruit_metro_m0
framework = arduino
lib_deps =
<EMAIL_ADDRESS>	adafruit/Adafruit GFX<EMAIL_ADDRESS>	adafruit/Adafruit<EMAIL_ADDRESS><EMAIL_ADDRESS>	adafruit/Adafruit<EMAIL_ADDRESS>monitor_speed = 115200
monitor_filters = send_on_enter
monitor_echo = yes
lib_ldf_mode = deep
build_unflags =

@ee-boi Did you Check your projectname.pio\build and make sure Adafruit_BusIO and all of its contents are there.
Yes or No? I expect No.
I also suspect the issue is with PIO Library Dependency pearl script ignoring C's preprocessor syntax that is kicking in when  GSLC_USE_PROGMEM is set to 1
A simple fix should be either lib_ldf_mode = deep+ or lib_ldf_mode = chain+
If deep+ or chain+ works please post so I can add it to our FAQ.
Paul--

@Pconti31 hmm alright this probably shows my beginner to intermediate status within this realm. I do see Adafruit_BusIO in the projectname/.pio/libdeps (as show in previous attached image). When I look in projectname/.pio/build I also see it but not sure how to verify all the contents are there? Attached is an image of what I see in the projectname/.pio/build directories.
projectname/.pio/build/adafruit_metro_m0/libc1f/Adafruit BusIO:

I will also try your other solution for "lib_ldf_mode = deep+ or lib_ldf_mode = chain+" and report back.

Happy to report back that changing lib_ldf_mode = deep to lib_ldf_mode = deep+ in the platformio.ini appears to have resolved the issue. This is far beyond my knowledge level of what it actually did, but it does compile now and shows less RAM usage (compare below to previous post).
Steps to reproduce:

drop pgmspace.h file you attached previously into libdeps/GUIslice/src/
update board config in GUIslice/configs to #define GSLC_USE_PROGMEM      1  (from 0)
explicitly install Adafruit BusIO library via platformio
update platformio.ini file from lib_ldf_mode = deep to lib_ldf_mode = deep+ (I also tried chain+ and it seemed to compile as well

RAM usage dropped from ~68% to 48% for my project, interestingly though the Flash usage did not change and is still at 34.8%...not sure if this is an issue. I would try flashing it to the board but I fried it last night (whoops) and am waiting for a new one to arrive.
 *  Executing task in folder GUIslice_PIO_Test: platformio run

Processing adafruit_metro_m0 (platform: atmelsam; board: adafruit_metro_m0; framework: arduino)
-------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/atmelsam/adafruit_metro_m0.html
PLATFORM: Atmel SAM (8.1.0) > Adafruit Metro M0 Expresss
HARDWARE: SAMD21G18A 48MHz, 32KB RAM, 256KB Flash
DEBUG: Current (atmel-ice) External (atmel-ice, blackmagic, jlink)
PACKAGES:
 - framework-arduino-samd-adafruit @ 1.7.10
 - framework-cmsis @ 2.50400.181126 (5.4.0)
 - framework-cmsis-atmel @ 1.2.2
 - toolchain-gccarmnoneeabi @ 1.90301.200702 (9.3.1)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ deep, Compatibility ~ soft
Found 18 compatible libraries
Scanning dependencies...
Dependency Graph
|-- AccelStepper @ 1.64.0
|-- Adafruit GFX Library @ 1.11.5
|-- Adafruit ILI9341 @ 1.5.12
|-- GUIslice @ 0.17.0
Building in release mode
Checking size .pio/build/adafruit_metro_m0/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [=====     ]  48.1% (used 15752 bytes from 32768 bytes)
Flash: [===       ]  34.8% (used 91144 bytes from 262144 bytes)
============================================== [SUCCESS] Took 2.60 seconds ==============================================
 *  Terminal will be reused by tasks, press any key to close it.

@ee-boi Congratulations!  I'll add this info to the FAQ.
As for the flash it did increase it went from 91180 to 91144, just not enough of a change for the percent to change.
You should close this now.  I can't since I only have access to my repository GUIsliceBuilder.
Paul--

Confirmed this works, got my new dev board in and compiled an uploaded fine. So far no bugs.
Closing. Appreciate all the help @Pconti31 !!!! You are awesome, and I hope GUIslice continues to grow, as it is one of the most useful things I have come across in my short time developing.


Missing class extension definition or class definition in comparison may result in incorrect load

RwRowanProjectIssuesTest>>testIssue185_move_extension_method_to_new_package_1
exposes the bug.
The definition comparison code uses a pattern like the following:
			before := baseDictionary at: key ifAbsent: [ elementClass new ].
			after := myDictionary at: key ifAbsent: [ elementClass new ].

and modifications can be created with these "empty definitions". However, in some cases the name of the missing class or missing extension (the case in RwRowanProjectIssuesTest>>testIssue185_move_extension_method_to_new_package_1) is needed  to properly delete or add the appropriate artifacts (methods in this case)...
Class definitions and class extension definitions are likely to be the only container instances that are exposed to this but it is worth putting together a series of tests for the full range of definition comparisons

There seem to be quite a few valid cases where a class definition may have an empty name ... it seems that we'll have to wait for additional cases are discovered through normal test development instead of trying to fabricate additional test cases in search of a potential bug ...


API and Modularization

I have been thinking about implementing an API for Alpha for some time. With the introduction of the Alpha class that acts as a facade for the whole system I made a first step. There's still a long way to go if the API should be taken seriously by application developers.
Prototyping Applications
I identified at least two applications that might use the API and act as guides in the API design:

Angry-Alpha (first I have to wrap my head around higher order predicates and eliminate them)
Wolpertinger (paper; the interesting part where it shells out to clingo is here; pointed out to me by @lukeswissman)

Modularization
In order to provide a smooth API, I think that we should modularize Alpha as follows:

alpha-core: Contains grounder(s) and solver(s), but no main entry point. Depends on alpha-api.
alpha-api: Contains glue code that allows instantiation of the Alpha system with given parameters, run it, and collect solutions. This includes a specification of all I/O, so we need Programs to go in and AnswerSets to go out, these would have to move to some package ac.at.kt.tuwien.alpha.api or similar that resides in this module. Depends on alpha-core.
alpha-cli: Contains a main entry point that fiddles with arguments in order to run Alpha via alpha-api.

Further down the line we might want to extend this scheme, for example by writing a wrapper that integrates Alpha with Clojure. Such a wrapper would then depend on alpha-api as well.
While it might seem strange that these modules all depend on each other in a trivial fashion, we would have the following side-effects:

Any option that should be exposed to the CLI must also be exposed through the API. No dirty hacks to circumvent it.
In some bright future, one might generalize the alpha-api package in a way that it is suitable for a large range of ASP systems. Instead of alpha-core one could then depend on evenbettersolver which implements everything declared in alpha-api. It is conceivable to wrap clasp, so applications could switch out implementations.

Related Projects

In Java:

asp4j uses Annotations
net.sf.tweety.lp.asp.solver.AspInterface declares an interface for solvers
lukeswissman/jclingo

Jess which lead to JSR94
DLV Java wrapper
https://github.com/gaste/gringo-wrapper
https://github.com/phohenecker/asp-wrapper
https://github.com/egnwd/pingo
https://github.com/Aluriak/clyngor
http://cmt.math.unipr.it/jsetl.html
JASP

Course of Action

[ ] Evaluate whether asp4j can be re-used/forked/adopted.
[ ] Modularize Alpha
[ ] Consume the API from some applications, to see whether the API feels nice

@lorenzleutgeb Has there been any implementation work on that yet? Since I'm currently working on a number of projects that use (parts of) Alpha as a dependency (e.g. curriculator), I'd be highly motivated to move this forward, but since the issue is assigned to you, wanted to make sure I'm not duplicating stuff that might already be in progress..

I once attempted to split up the code, but that branch is hopelessly outdated. I took the liberty to reassign it to you.
Please take some time to rethink whether the modules I suggested, i.e. "core", "api", "cli", still make sense, and let's talk if you think that a different way of splitting would be more beneficial.

Thanks! Since we've currently got a few bigger PRs waiting to be merged, I can't do much right now anyway.. (as the splitting will probably wreak havoc on file histories).
The split I was thinking about would roughly be

api -> basically Alpha.java plus everything in the commons package and the grounder/solver interfaces
parsing -> the antlr-based parser, depends on api.
core -> grounder/solver implementations, depends on api
cli -> Main and config stuff that is only relevant when used as a commandline application, depends on api, core, parsing

The reason I'd split out the parser is that it would open up possibilities for metaprogramming (e.g. custom syntax constructs that can be rewritten to standard ASP) without having to depend on the full solver every time

Sounds good, except that I don't get why parsing/core would depend on api? I would expect it to be the other way round.

If API depended on core (and possibly parsing) you'd always have the full solver implementation in your classpath, regardless if you're actually using it.
For example, let's assume we have some ReST-Webapp that uses Alpha for some kind of business logic. The app consists of modules some-webapp and some-backend, where some-backend is a relatively simple library module that provides business logic and implements communication with the ASP solver and some-webapp is a SpringMVC project that implements ReST-controllers etc. and depends on some-backend. The point here is that the backend is not actually executable on it's own, so it only needs to depend on alpha-api which offers interfaces for grounder and solver components, but not the actual implementations. The webapp module in this example would then  depend on alpha-api and alpha-core since it's the actual deployment artifact that needs a solver implementation as well as the API.
With the split suggested above, we'd ensure that only actual executables need to depend on the core module, thereby guarding against dependency cycles and also cases where we might have two different versions of alpha-core on the classpath because of different modules using slightly different versions of alpha-api (although that should be avoided anyway, of course..).

Right. Sorry.

I picked this up once again, and created modules.


wip:send otp to email

@sifatul vaiya everything is done so far but i have to test it several times and have to check the corner cases, please review this pr in the meantime i'll test and if anything is left i'll update

@fazlerabby07 bhai please review and feel free to merge


Bump types-setuptools from <IP_ADDRESS> to <IP_ADDRESS>40106 (#6948)

Pull request opened by the merge tool on behalf of #6948

Merged in 25e7811826d2c9e1e1c1f9f51779b28acacb1b3c


fix(cli): 'remove env' wording

3140
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Codecov Report

Merging #3425 into master will not change coverage by %.
The diff coverage is n/a.

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


fix sed warning and dir permmsion issue on macOS

@tradej mind taking a look and testing on your machine too?

I'll merge this.

merged: f106c47
Sorry it took so long, ran into unexpected stuff on Friday.


Create README.md

Solves #1
also can you pls add hacktoberfest-accepted label to the pr if you decided to merge this

Could you refer to my other repo and follow the same structure for README.md

ya sure will also do that

hi can you pls add hacktoberfest-accepted label to the pr as currently it is showing as 'NOT-PARTICIPATING'
thx

Sure, I will do it asap 👍 and also review and merge.

Did you make changes according to README of my other projects?

I said I will work on the other repo readme, wasn't this repo redme done? (The reason I closed)
And for the other I will prob do around June as I have colage entrence exams.


Mockery::on(function(&array)) does not work in PHP 5.6

When passing a closure to Mockery#on with an array parameter passed by reference, the array parameter does not appear to reflect changes made within the anonymous function. Example code:
class FooBar {
    public function arrayRef(array &$output)
    {
        $output = array('ID' => 3);
    }
}

class FooBarTest extends \PHPUnit_Framework_TestCase
{
    public function testMockeryOn()
    {
        $mock = \Mockery::mock('FooBar');
        $mock->shouldReceive('arrayRef')->with(
            \Mockery::on(function (array &$output) {
                $output = array('ID' => 3);
                return true;
            })
        )->once();
        $output = array();
        $mock->arrayRef($output);
        $this->assertEquals(array('ID' => 3), $output);
    }
}

The test fails with following output:
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
 Array (
-    'ID' => 3
 )

The test succeeds in PHP v5.5, but not in 5.6.
PHP version 5.6.15
PHPUnit version 4.8.13  (Also occurs in PHPUnit 5.x)
Mockery version 0.9.4

I have other tests that pass a primitive integer by reference which pass, which is why I am pointing out the array data type specifically.

Nevermind, it was because I did not specify the fully qualified class name is mock()


[npr]: get stream url from json-ld

Please follow the guide below

You will be asked some questions, please read them carefully and answer honestly
Put an x into all the boxes [ ] relevant to your pull request (like that [x])
Use Preview tab to see how your pull request will actually look like

Before submitting a pull request make sure you have:

[x] At least skimmed through contributing guidelines including yt-dlp coding conventions
[x] Searched the bugtracker for similar pull requests
[x] Checked the code with flake8

In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under Unlicense. Check one of the following options:

[x] I am the original author of this code and I am willing to release it under Unlicense
[ ] I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

[x] Bug fix
[ ] Improvement
[ ] New extractor
[ ] New feature

Description of your pull request and other information
Extract JSON-LD from the NRP webpage if it's available. If the
"format" and "stream" fields in the multimedia dictionary are
empty in the result returned by the NPR API, use the
embedURL from the JSON-LD, if it exists, as a stream url.
Update InfoExtractor._json_ld.traverse_json_ld to look for a
VideoObject in "subjectOf" if the item_type is "NewsArticle".
Update InfoExtractor._json_ld.extract_video_object to extract
"embedUrl" from the VideoObject.
Addresses the issue downloading the Bonobo Tiny Desk Concert (#1934)

Add a test

@pukkandan added a test for the json_ld use case.


Bump winkerberos to 0.9.1

Winkerberos 0.9.1 has pre-built wheels for python 3.11.
Change also the dependency version constraints from caret ^ to >=, so that we will fetch the next version of winkerberos once it is released. Winkerberos 0.10.0 will support Python 3.12.

Fixes #378


Liferay Theme Dependencies uses a version of Lodash that is vulnerable to CVE-2018-3721

When building a 7.0 theme using generator-liferay-theme, the theme builds with Lodash dependencies that are vulnerable to CVE-2018-3721.
https://www.npmjs.com/advisories/782
Is there anyway to properly change these dependencies so that we use Lodash 4.17.5 or higher?
Thank you.

https://github.com/liferay/liferay-themes-sdk/issues/97 is the master ticket covering these audit issues, but we can keep this one open in any case. It may be that we can just drop the Lodash dependency, which would likely be preferable to upgrading it.

Consolidating all dependency security stuff in https://github.com/liferay/liferay-js-themes-toolkit/issues/199


Fail commits that change nothing

Fixes #1172.

Fixes #1172.

Codecov Report

Merging #1310 (744610f) into master (9bdbc8c) will decrease coverage by 0.02%.
The diff coverage is 35.29%.

@@            Coverage Diff             @@
##           master    #1310      +/-   ##
==========================================
- Coverage   47.10%   47.08%   -0.03%
==========================================
  Files         203      203
  Lines       15866    15877      +11
==========================================
+ Hits         7474     7475       +1
- Misses       7404     7412       +8
- Partials      988      990       +2

Impacted Files
Coverage Δ

api/api_controller.go
40.05% <0.00%> (ø)

graveler/committed/manager.go
0.00% <0.00%> (ø)

graveler/errors.go
100.00% <ø> (ø)

graveler/graveler.go
35.20% <14.28%> (-0.32%)
:arrow_down:

graveler/committed/apply.go
35.22% <100.00%> (+3.90%)
:arrow_up:

catalog/mvcc/cataloger_commit.go
74.28% <0.00%> (-5.72%)
:arrow_down:

Continue to review full report at Codecov.

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

Codecov Report

Merging #1310 (744610f) into master (9bdbc8c) will decrease coverage by 0.02%.
The diff coverage is 35.29%.

@@            Coverage Diff             @@
##           master    #1310      +/-   ##
==========================================
- Coverage   47.10%   47.08%   -0.03%
==========================================
  Files         203      203
  Lines       15866    15877      +11
==========================================
+ Hits         7474     7475       +1
- Misses       7404     7412       +8
- Partials      988      990       +2

Impacted Files
Coverage Δ

api/api_controller.go
40.05% <0.00%> (ø)

graveler/committed/manager.go
0.00% <0.00%> (ø)

graveler/errors.go
100.00% <ø> (ø)

graveler/graveler.go
35.20% <14.28%> (-0.32%)
:arrow_down:

graveler/committed/apply.go
35.22% <100.00%> (+3.90%)
:arrow_up:

catalog/mvcc/cataloger_commit.go
74.28% <0.00%> (-5.72%)
:arrow_down:

Continue to review full report at Codecov.

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

Thanks!

Thanks!


Pagination numbers error

Hi, when i click on a number, shows this:
![Image of error]
(http://i.imgur.com/MViceHe.png)
Code:
<div class="row">
	<pagination page="currentPage" page-size="numPerPage" total="totalItems" show-prev-next="true">
</div>

Have a link to codepen or similar, otherwise we will spend to much time replicating the issue.

Issue can be reopened if you give more information.


get_it service locator resets between every patrolTest()

Steps to reproduce

Clone https://github.com/GameOnAnil/patrol_bug_demo.git
Start android emulator
Verify app build by flutter build apk --debug
Run: patrol test --target integration_test/buggy_test.dart

Actual results
Hi, i would like to save my login credential in between test so that i don't have to login again for every test that needs user to be logged in.
So for that is use  get_it: ^7.6.4 that provides me service locator where i could save login token.
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:get_it/get_it.dart';
import 'package:patrol/patrol.dart';

void main() {
  final locator = GetIt.instance;
  setUpAll(() {
    /// Register data class as locator in getIt
    locator.registerLazySingleton(() => DataClass());
  });
  group("", () {
    patrolTest("set value", (tester) async {
      // Set value in data class
      locator<DataClass>().setName("James");
      // Print value
      final name = locator<DataClass>().name;
      debugPrint("First test value:$name");
    });

    patrolTest("show value", (tester) async {
      // Should expect name to be "James"
      expect(locator<DataClass>().name, "James");
    });
  });
}

class DataClass {
  String? name;

  setName(String value) {
    name = value;
  }
}

Here the value of name is stored in a service called DataClass when is accessed by both patrolTest().
Now the problem is that the value doesn't persist between test.
When i run patrol develop --target integration_test/buggy_test.dart using develop the test passes.
But when i use patrol test --target integration_test/buggy_test.dart it fails.
Similarly the test passes for flutter test using testWidget() instead of patrolDevelop()
My question is that is there a way for me to persist data between patrolTest() and why is the locator value being reset between test? Would greatly appreciate your feedback.
Logs

Logs
No device specified, using the first one (emulator-5554)
• Building apk with entrypoint test_bundle.dart...
✓ Completed building apk with entrypoint test_bundle.dart (21.7s)
• Executing tests of apk with entrypoint test_bundle.dart on emulator-5554...
        See the report at: file:///Users/anilthapa/Flutter%20Projects/flutter_application_2/build/app/reports/androidTests/connected/index.html
✗ Failed to execute tests of apk with entrypoint test_bundle.dart on emulator-5554 (Gradle test execution failed with code 1) (16.4s)
Exception: Gradle test execution failed with code 1
See the logs above to learn what happened. Also consider running with --verbose. If the logs still aren't useful, then it's a bug - please report it.

java.lang.AssertionError: Dart test failed: buggy_test  show value
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞═════════════════
The following TestFailure was thrown running a test:
Expected: 'James'
Actual: <null>
Which: not an <Instance of 'String'>

When the exception was thrown, this was the stack:
#4      main.<anonymous closure>.<anonymous closure> (file:///Users/anilthapa/Flutter%20Projects/flutter_application_2/integration_test/buggy_test.dart:23:7)
#5      patrolTest.<anonymous closure> (package:patrol/src/common.dart:120:21)
<asynchronous suspension>
#6      testWidgets.<anonymous closure>.<anonymous closure> (package:flutter_test/src/widget_tester.dart:168:15)
<asynchronous suspension>
#7      TestWidgetsFlutterBinding._runTestBody (package:flutter_test/src/binding.dart:1013:5)
<asynchronous suspension>
#8      TestWidgetsFlutterBinding._createTestCompletionHandler.<anonymous closure> (package:flutter_test/src/binding.dart:804:12)
<asynchronous suspension>

This was caught by the test expectation on the following line:
file:///Users/anilthapa/Flutter%20Projects/flutter_application_2/integration_test/buggy_test.dart line 23
The test description was:
show value
═════════════════════════════════════════════════════════════════

at pl.leancode.patrol.PatrolJUnitRunner.runDartTest(PatrolJUnitRunner.java:135)
at com.example.flutter_application_2.MainActivityTest.runDartTest(MainActivityTest.java:31)

Patrol version
patrol: ^3.0.2
Patrol Doctor output

Patrol Doctor output
Patrol CLI version: 2.5.0
Program adb found in /Users/anilthapa/Library/Android/sdk/platform-tools/adb
Env var $ANDROID_HOME set to /Users/anilthapa/Library/Android/sdk/
Program xcodebuild found in /usr/bin/xcodebuild
Program ideviceinstaller found in /opt/homebrew/bin/ideviceinstaller

Flutter Doctor output

Flutter Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.16.0, on macOS 13.4 22F66 darwin-arm64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.2)
[✓] VS Code (version 1.85.1)
[✓] VS Code (version 1.82.0-insider)
[✓] Connected device (3 available)
[✓] Network resources

• No issues found!

Hi @GameOnAnil, setUpAll method will not work as every patrol test is run in the isolation. You can create a shortcut method which will log in to the app and invoke it at the beginning of every test.

Contributor

My problem is not the setup method, I could remove the setUpAll method and call this code in main
 /// Register data class as locator in getIt
 locator.registerLazySingleton(() => DataClass());
```,
I have an issue that i cannot share the service locator between patrolTest(). As you have said every patrolTest runs in isolation, is it not possible to share data between them at all?

@GameOnAnil have you tested with patrolSetUpAll, instead of test setUpAll?

@robsonsilv4  Hi, I think you misunderstood my issue I have modified my code with this
void main() {
  final locator = GetIt.asNewInstance();

  /// Register data class as locator in getIt
  locator.registerLazySingleton(() => DataClass());

  patrolTest("set value", (tester) async {
    await tester.pumpWidget(
      const MaterialApp(
        home: Scaffold(
            body: Center(
          child: Text("Home Page"),
        )),
      ),
    );
    await Future.delayed(const Duration(seconds: 2));
    // Set value in data class
    locator<DataClass>().setName("James");
    // Print value
    final name = locator<DataClass>().name;
    debugPrint("First test value:$name");
  });

  patrolTest("show value", (tester) async {
    // Should expect name to be "James"
    expect(locator<DataClass>().name, "James");
  });
}

Even when i remove the setUp() the test fails, I would like to ask "every patrol test is run in the isolation" does this mean my 2 test case will not run one after another and might run at the same time?


SW-2712 Initialize theme the same way we do in terraware-web

Now the theme is initialized the same way as in terraware-web.
Still need to update a dependency to check if this works

Awesome thanks @constanzauanini - this will help catch issues before we publish new versions that fail in web.

Awesome thanks @constanzauanini - this will help catch issues before we publish new versions that fail in web.

Yes, I still want to test updating a dependency that breaks terraware-web, to see if it breaks here too

I just tested updating "@mui/material" from "5.8.7" to "5.11.4" and it breaks here too (not only on terraware-web). So this is working

I just tested updating "@mui/material" from "5.8.7" to "5.11.4" and it breaks here too (not only on terraware-web). So this is working

Thanks, sounds good!
btw i removed the patch label since we don't want a version bump for this change.
I think the next step is to figure out how to  upgrade mui successfully.. for later..

I just tested updating "@mui/material" from "5.8.7" to "5.11.4" and it breaks here too (not only on terraware-web). So this is working

Thanks, sounds good! btw i removed the patch label since we don't want a version bump for this change.
I think the next step is to figure out how to upgrade mui successfully.. for later..

Yes, thanks for removing it!