Make index lookup robust to _ vs -, but don't let the user get it wrong.

This does a brute force search thru combinations of hyphen and underscores to allow queries of crates to pass the wrong one.
This is a small first step of fixing #2775
Where is best to add test?

r? @matklad
(rust_highfive has picked a reviewer for you, use r? to override)

Responding to every point but out of order:

let’s start the sequence of -/_ as specified in Cargo.toml. That is, change the meaning of bit to flipped/non-flipped, rather then minus/underscore.

I really like this!

Exponential search is a bit troubling ...

let’s make he search bounded just in case, by checking if there are fewer than, say, 5 bits.

This is currently a panic attempted to shift with overflow, so a hard cap is better. This works well with your previous suggestion we brute force only the first N items after that it is up to you to get it right.

It might be prudent to add support for canonicalization when reading the index, that is, try to search for all underscores version first.

Sadly, I don't think this is compatible with your other suggestions.

I also worry that this might make project accidentally unbildable by older cargos.

So far this has not added the ability for Cargo.toml to be wrong, so I don't think we have to worry yet. A warning on build and an error on publish is probably a good strategy. When we get there.

:umbrella: The latest upstream changes (presumably #5694) made this pull request unmergeable. Please resolve the merge conflicts.

I'm a little worried about a patch like this in the sense that it can affect Cargo's startup performance (as I'm sure you're well aware by this point!). This needs to be executed every time Cargo starts up to re-resolve the lock file, and if Cargo's always trying tons of permutations of underscores and whatnot then Cargo may run the risk of spending a large amount of time reading files that don't exist before it finds the right one.
Now this is solved if the index itself is canonicalized, but that breaks older versions of Cargo (boo!). I'm not sure of a great way to solve this for now...
Perhaps though in the meantime we could strike a balance? Cargo could provide a better error message along the lines of "Failed to find crate foo-bar, but did you mean foo_bar?" That way we may be able to get most of the benefit without many of the perf consequences?

I agree to the core of all your points, but let me respond to sum details.
Thanks to @matklad this now starts with the name passed in before continuing the search. So as long as we are not searching for mis-hyphenated names there will be no performance change. Currently, eavan with this pr, we do not allow mis-hyphenated names in ether Cargo.toml nor Cargo.lock. So I don't think this change on its own is a problem.
As to the design space for extensions to this pr.
For backcompat reasons we should not allow mis-hyphenated names in the index nor in Cargo.toml of published crates. Nor is there any reason to use them in Cargo.lock. So most of the dependency tree should be searching from the correct hyphenation. The exception is in Cargo.tomls of local projects and path dependencies. Where we should ether build with a warning or error with a grate error message.

btw, an alternative implementation would be to use glob::Glob as it is already in our dependencies.

@Eh2406 oh hm I may be misreading then! It looks like here you're allowed to check in (and publish) a crate with mis-hyphenated names, but if that's not the case then it sounds good to me!
And yeah I do think that we basically want to guide people towards correct-hyphenation in the sense that it'll make for the fastest lookups in the future as well

You know the code a lot better than I, so let us make sure we have tests. Where should they go?

Hm probably in registry.rs, and probably a few tests for "assert a good error message comes out"?

Tests look good! So just to make sure I understand, something like this will be required to provide a better error message later on? (trying to catch up on the context of how we'll use this if we shift to primarily-better-error-messagse)

I think these test should go in even if we don't add the exponential search, to document the current behavior. I'd like to add test that insure that one can not publish as well, also as documentation. Additionally a test for what happens if we add an error to the index, before can not resolve now it works.
It looked to me like #2775 agreed this is the first step. I liked the implementation idea of using an int as a bit mask so much that I just had to try it. But,
Yes, as mentioned "It's elsewhere in Cargo's crate graph resolver that the mapping would need to happen" so I thought this would be a safe move.

Attempted to add matching tests in publish.rs. There are no existing tests for how publish interacts with already published crates! Am I just looking in the wrong place! Adding a Package::new("init", "0.0.1").publish(); led to an error
thread 'publish::wrong_case' panicked at 'self.repo.commit(Some("HEAD"), &sig, &sig, "Initial commit", &tree, &[]) failed with failed to create commit: current tip is not the first parent; class=Object (11); code=Modified (-15)', tests\testsuite\cargotest\support\git.rs:61:13

Hm I'm not sure what's up with that error, that's odd!
If the eventual goal here is #2775 though I think though this may not be the best place to solve it? This'll help provide support for crates in the registry but not for crates in places like git repositories or path dependencies. In that sense I wonder if it's better to place this logic in the resolver (and query multiple times) instead of searching the index?

There are a lot of moving parts. It would be reasonable to decide not to make changes until we see the big picture and how it all fits together. If we decide that then I will remove the search from this PR and just leave the tests. (Although we should add test for publish.)
Not that I see all the parts but hear is why I think this makes the index more like path/git dependencies. But feel free to explain how I am wrong.
If I put in my Cargo.toml serde-derive = { git = "https://github.com/serde-rs/serde"}
then cargo will look at that path and create a list of packages that can be found there, like
vec["serde", "serde_derive", ...] then it will filter to find the ones that matche serde-derive. None match so we get an error. (OT, but what happens if a git dependency includes several projects by the same name?)
In pre-PR cargo if I put in my Cargo.toml serde-derive = "1.0" then cargo will look at the index for a list of packages but it will get vec[] and we get an error.
After this PR it gets back vec["serde_derive"] then it will filter to find the ones that matche serde-derive. None match so we get an error.

Aha I forgot about that behavior! In that case I'd agree that the index is the best place to put this specific logic.
In that case this I think is almost good to go! The idea is that next up, given these vectors of lots of crates, we'd do like lehvenstein distance searching to return "did you mean" ?

OT, but what happens if a git dependency includes several projects by the same name?

Sadness. 😿

I was trying to figure out how search actually work for path/git, and convince myself that this search is important to making implementing a "did you mean" suggestion. And well, the best way to prove it works is to do it.

Looking plausible! I might recommend though still using lehvenstein distance in the end just to make sure we don't print too many suggestions (and maybe cap to 5 or so?)

Do you have a preferred levenshtein sort library? fst, or something trie based, or strsim or edit-distance or role my own homework style?
Also fuzzy as an arg vs a separate fuzzy fn? Oddly I did one trait one way and the other the other. Thoughts?

@Eh2406 we have lev_distance here: https://github.com/rust-lang/cargo/blob/805fbebc830174ad34feb774e019769d6fe7bbe9/src/cargo/util/lev_distance.rs

Looks great! One final thing I'd recommend is to filter the final list by lev_distance as well. Right now it says "no package baz, did you mean foo?" which is a little silly in the sense that it's so far in distance it's probably not right.
It looks like subcommands uses a cap of 4, so perhaps the same can be done here?

Instead of returning only the first 3 or in addition? Also lots of sources will only return one, so maybe we could use it even if lev is over the filter. I.E.
Preference = { git = "https://github.com/Eh2406/preferences-rs", branch = "patch-1"} will have only one suggestion preferences and even though it is lev > 4 it is the only reasonable answer.

Hm I think let's probably start out with 3 (or maybe 4/5?) and go from there. In any case if you type Preference and it should be preferences then we should definitely have that recommended in our lev threshold filter!

Lol, my example did not make sense.  Updated to only show suggestions with lev  < 4.

:pushpin: Commit 95b4640b32b692629c353734aa906dd31ee54aec has been approved by alexcrichton

:hourglass: Testing commit 95b4640b32b692629c353734aa906dd31ee54aec with merge fefbb68f8949f5dc4c8ec6ca7e49e3f760c69b0a...

:sunny: Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing fefbb68f8949f5dc4c8ec6ca7e49e3f760c69b0a to master...


Update Readme.md

Summary by CodeRabbit

Documentation

Minor punctuation correction in the README file to improve clarity and readability.

Update Readme.md to correct typos and improve clarity

Correct typos

Change "truely" to "truly"
Change "docker compose" to "Docker Compose"
Change "kubernetes" to "Kubernetes"
Change "gitea" to "Gitea"

Improve clarity

Rephrase sentences for better readability
Replace "I'm giving you the chance to make your infrastructure grow as your project" with "this repository allows your infrastructure to grow with your project"


Integrate Pipeline CLI with new validation service

Fixes #1837
Run output with errors

────────────────────────────────────────────────────────────────
 Elyra Pipeline Local Run
────────────────────────────────────────────────────────────────

Pipeline validation FAILED:
- (Fatal - validating node 'producer.ipynb' property 'filename') - Property has an invalid path to a file/dir or the file/dir does not exist
- (Warning) - This node is not connected to any part of the pipeline

Error: Error validating pipeline.

Developer's Certificate of Origin 1.1
   By making a contribution to this project, I certify that:

   (a) The contribution was created in whole or in part by me and I
       have the right to submit it under the Apache License 2.0; or

   (b) The contribution is based upon previous work that, to the best
       of my knowledge, is covered under an appropriate open source
       license and I have the right under that license to submit that
       work with modifications, whether created in whole or in part
       by me, under the same open source license (unless I am
       permitted to submit under a different license), as indicated
       in the file; or

   (c) The contribution was provided directly to me by some other
       person who certified (a), (b) or (c) and I have not modified
       it.

   (d) I understand and agree that this project and the contribution
       are public and that a record of the contribution (including all
       personal information I submit with it, including my sign-off) is
       maintained indefinitely and may be redistributed consistent with
       this project or the open source license(s) involved.

@akchinSTC - it looks like this was merged at the same time I made my comments.


created attendance page

Description
Created attendance page as an offshoot of "index.html" next to "delete event"
Related Issues
Screenshots (if needed)

Notes
We need to add "late" and "on time" booleans to ATTENDEES table in db.

Looks amazing!


METRON-576 Stellar function resolution takes too long on running cluster

METRON-576
When running the Stellar REPL in a cluster on AWS, function resolution takes 50-60 seconds. The user is not able to execute any functions in the REPL until this process completes.
The default function resolver searches the entire classpath for Stellar functions.  This includes all library dependencies.  The delay is because there are just too many classes in the classpath to search on a running cluster. As more libraries are added as dependencies under /usr/metron/0.3.0/lib this problem just gets worse.
Testing
Tested on Quick Dev and showed definite performance improvement.  Before limiting the search path, the search takes roughly 18-20 seconds for me.  After adding a sensible "include" like org.apache.metron.*, the search takes roughly 2-3 seconds.
Have not yet deployed on AWS to compare the load time.
Changes

A global property allows the user to specify packages that should be searched for Stellar functions.  stellar.function.resolver.includes = org.apache.metron.*  This significantly reduces the delay when waiting for the Stellar REPL to be ready to execute a function.

Another global property allows the user to exclude specific packages from being searched for Stellar functions.  stellar.function.resolver.excludes = org.apache.metron.management.*

By default, the entire classpath is searched, which matches the previous behavior.  I'd be open to changing default behavior if there is interest.

All of the logic that was previously contained in SingletonFunctionResolver is now broken out across multiple classes.

The BaseFunctionResolver leverages Guava for lazy initialization and thread-safety, instead of the read/write locking scheme as before.  This is much simpler and I believe is effectively the same.
The ClasspathFunctionResolver uses the Reflections API to search the classpath for Stellar functions as before.  This functionality was enhanced to explicitly include or exclude specific packages from function resolution.
The SingletonFunctionResolver remains, but is really only a singleton that is used as the default function resolver.  Keeping this separate made testing simpler.
The SimpleFunctionResolver is a function resolver that allows single classes to be searched for Stellar functions.  This is useful when writing unit tests for Stellar functions.

FunctionResolver functionResolver = new SimpleFunctionResolver()
        .withClass(KafkaFunctions.KafkaGet.class)
        .withClass(KafkaFunctions.KafkaPut.class)
        .withClass(KafkaFunctions.KafkaProps.class)
        .withClass(KafkaFunctions.KafkaTail.class);

Added unit tests for the function resolvers.

Removed the clear() function from the FunctionResolver API.  This was only needed for testing. This was originally only a work-around since it was not easy to swap in another FunctionResolver at the time.

Instead of using the global properties, there is now a capability called STELLAR_CONFIG.  The includes/excludes are pulled from this.
In the context of the REPL, it attempts to load a file called stellar.properties from the classpath.  The values in this file become the STELLAR_CONFIG.
If none exists, it uses a default set of properties.  The default properties only includeorg.apache.metron.*.  This hopefully provides a better experience for casual users, but provides advanced users the ability to easily include additional packages in the function resolution process.

Great!  One minor thing; could we have the shell pull the properties file from a CLI argument first, then from the classpath and then with the default?

BTW, I also checked the Pcap Query tool to make sure there were no unintended side effects, since that also uses Stellar to some degree.  TL;DR;  I don't see any problems.
On Quick Dev, I started up Pcap Replay and Pycapa.  I then started the pcap topology to land data in HDFS.  I ran a basic query that leveraged Stellar to extract pcap.  I received the expected data and it was correctly filtered.  I was also able to open it up in Wireshark.
service pcap-replay start
service pycapa start
bin/start_pcap_topology.sh
bin/pcap_query.sh query -q "ip_src_addr == '<IP_ADDRESS>'" -st 500

Kicking

Is that failure legit?

I am trying to figure out why it is failing in Travis.  When I run it locally, it works just fine.

I will give it a try

were you planning on sync'ing with master?

Oops.  I thought I had pushed that out.  Maybe that is the problem.  Thanks

worked locally for me as well.

Needed sync'd with master.  Working now.  Yay.

Any other feedback guys?  Just waiting on +1s if you guys are happy with the change.

+1 by inspection
On Tue, Nov 29, 2016 at 08:49 Nick Allen<EMAIL_ADDRESS>wrote:

Any other feedback guys? Just waiting on +1s if you guys are happy with
the change.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/apache/incubator-metron/pull/366#issuecomment-263574416,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAg-xxUOaGFmpdUv4VZbMpuBckyeAf1bks5rDC1jgaJpZM4K41zJ
.


Hiding PlayerChecker

Problem
We're currently exposing the PlayerCheckerand AndroidMediaPlayerType which attempts to read the systems internal media player implementation.
Solution
The internal media player name is now exposed via the PlayerInformation.getName. If the internal type is required we can add multiple player information impls for each internal type.
Test(s) added
Yep around the PlayerInformation impls
Screenshots
no ui changes
Paired with
noone

Small comment, LGTM 👍


perf: benchmark new timeseriesflattener

@sarakolding

@MartinBernstorff do you want to keep this?

Nah, this is quite chaotic. It is probably a good idea for us to build a proper benchmark at some point, if we keep needing to optimise, but let's defer it once more.


Docker: Clarify node-ipc volume mount and add docker-compose with secrets examples

Aligns with changes presented in https://github.com/input-output-hk/cardano-node/pull/779/files

changes data to node-ipc for clarity on what is being mounted.
Use configuration over config to conform with style in cardano-node
Adds docker-compose as a getting started resource

WIP until https://github.com/input-output-hk/cardano-node/pull/779 is resolved

@erikd Assigning you for approval to add example secrets config and a docker-compose

bors r+


support php 5.3 T_GOTO

support T_GOTO.
correct T_FINALLY init version.

CodeFormatter updated to version 3.0.0
Maybe your problems solved
See Release Notes

@akalongman Yeah! phpfmt solved the T_GOTO problem. thank you for updating the php formatter!


Add receive property to PlayDtmfAction

This property was introduced in Asterisk 16.7.0, issue https://issues.asterisk.org/jira/browse/ASTERISK-28614

I think we should merge this

Merged. Many thanks @nbruning.


dhall-grafana: init at 0.1.

Motivation for this change
I would love to use dhall in a nix environment to configure grafana dashboards. This pacakge provides types and functions for such a purpose.
Things done

Built on platform(s)

[X] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] 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

[X] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
21.11 Release Notes (or backporting 21.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.

Thank you! 🙂


Recirculation feature no longer working?

Describe The Bug:
Can no longer turn recirculation on with the plug-in. The state of recirculation still appears to be read correctly (if I turn it on externally via the control-r app), but I can no longer turn on recirc via this plugin. This is a recent development, within the past 48 hours.
To Reproduce:
Try to turn on recirculation via the homebridge switch, nothing happens.
Expected behavior:
Recirculation should turn on.
Logs:
No logs produced.
Environment:

Plugin Version:
Homebridge Version:
Node.js Version:
NPM Version:
Operating System:

I just noticed this same thing last night..

I’m noticing this as well. I also cannot change temperature. Not sure if it’s related

I just noticed a firmware update on my control-r unit was available. Perhaps there were some breaking api changes?

No mention of what the fix is, but the Home Assistant forum seems to have identified same/similar issue, and may have a fix (last few comments).
https://community.home-assistant.io/t/rinnai-tankless-water-heater-control-r-module-integration/100646/38

Yeah Rinnai made a part of the API that was being utilized forbidden and changed it over to an authenticated request only. I hope everything is fixed and working as of now, but doesn't mean more changes are coming or a bug managed to be introduced.

@dustindclark do you think you'd be able to apply the fix above to the homebridge plugin?

I can verify that this fix works for me! Thanks so much @dustindclark!


Clarify the int param getter documentation

OSSL_PARAMs that are of type OSSL_PARAM_INTEGER or
OSSL_PARAM_UNSIGNED_INTEGER can be obtained using any of the functions
EVP_PKEY_get_int_param(), EVP_PKEY_get_size_t_param() or
EVP_PKEY_get_bn_param(). The former two will fail if the parameter is too
large to fit into the C variable. We clarify this in the documentation.

Nice, thanks!
Is there a way to guide the reader to which of the functions he should use to retrieve the param value?
I.e., is it always recommended to use EVP_PKEY_get_bn_param() if it's of "arbitrary length"? Or is there a function that would tell the size? Or should one try _get_int_param(), if it fails - proceed to _get_size_t_param(), and finally progress to _get_bn_param()???

Nice, thanks!
Is there a way to guide the reader to which of the functions he should use to retrieve the param value?
I.e., is it always recommended to use EVP_PKEY_get_bn_param() if it's of "arbitrary length"? Or is there a function that would tell the size? Or should one try _get_int_param(), if it fails - proceed to _get_size_t_param(), and finally progress to _get_bn_param()???

It's IMO always - apply your reason about what the meaning of the parameter actually is. If it is some kind of length parameter get_size_t should be used. If it is some small integer parameter, you can use get_int_param. For the rest, use get_bn_param. Of course there are border-line cases such as the RSA e value which usually fits into int but can be an arbitrary big number. For this you could use the fallback approach but going right away with get_bn_param() would of course work as well.

If you have the param, you can inspect the size directly.  It is a public structure.

Fixup pushed addressing the typo

It's IMO always - apply your reason about what the meaning of the parameter actually is. If it is some kind of length parameter get_size_t should be used. If it is some small integer parameter, you can use get_int_param. For the rest, use get_bn_param. Of course there are border-line cases such as the RSA e value which usually fits into int but can be an arbitrary big number. For this you could use the fallback approach but going right away with get_bn_param() would of course work as well.

Can we indicate this somehow in the documentation for each parameter (not in this PR)? The parameter documentation all has a standard form, e.g.
=item "p" (B<OSSL_PKEY_PARAM_EC_P>) <unsigned integer>

Could we change that to something like:
=item "p" (B<OSSL_PKEY_PARAM_EC_P>) <unsigned integer> (typically use a B<BIGNUM>)

or
=item "size" (B<OSSL_DIGEST_PARAM_SIZE>) <unsigned integer> (typically use a C B<size_t>)

This pull request is ready to merge

Merged to 3.0 and master.


solution.cpp

Looks good. Don't forget to star this repository and share on your social media about this repo for hacktoberfest. Thank you for the contribution.


feat: go implementation of the tenants api

Must Close #30
Added the implementation for the tenants api
@unicodeveloper

@Cliftonz please review this pr


Question about Async-FL

Hi,
I am writing to ask about a function you provide on GitHub.
Is the file in “async-FL/src/update/StepAsyncAvg.py” the implementation of “KAFL: Achieving High Training Efficiency for Fast-K Asynchronous Federated Learning” (ICDCS)?
Thank you.

yes, it is. This file contains the algorithm for the server update part. Please refer to the configuration file config/MSTEPAsync-config.json for the complete composition of the algorithm.

The workload has been quite heavy lately, and the README document is quite outdated. If there are any parts that you don't understand, feel free to discuss with me🤝.

OK!
Thank you for your reply.


App restyling - Edit app / bunker

Review of version 3.0.0-beta

[ ]  Improve the padding between elements
[ ] The list of permission should fill the main and eventually let it scroll, currently the user cannot understand that this sub-view has an inner scrolling
[ ] Make "Remove all permission" in orange, since it is a destructive action
[ ] "Remove all permission" is placed at the end of the list and scroll with it
[ ] Use a light gray for the border of the permissions
[ ] Remove the info icon so the text has more space (we can add it back later)
[ ] Disabling a permission doesn't work, it is reset re-entering the section
[ ] In the edit app view the Save button (to update the name) is missing
[ ] In the edit app view make the "Delete application" button orange

Review of version 3.0.0-beta4

[ ] Fix / uniform padding as explained here
[ ] Increase the font size of all buttons
[ ] Add more padding above the button "Remove all permissions"


Todo preset prints warnings related to commons-logging.jar

Describe the bug
Running the todo preset for the first time generates the following warning few times in the logs:
Standard Commons Logging discovery in action with spring-jcl: please remove commons-logging.jar from classpath in order to avoid potential conflicts

Expected-behavior
No response
Reproduction
Download and run https://start.vaadin.com/dl?preset=react-tutorial&projectName=hilla-todo
System Info
Windows, Hilla 2.2, IntelliJ IDEA, JDK 20.

Was this resolved in 2.3 alpha 6?

It seems so, yes.


Synthesis failed for java-billingbudgets

Hello! Autosynth couldn't regenerate java-billingbudgets. :broken_heart:
Here's the output from running synth.py:
2020-05-18 10:02:53,850 autosynth [INFO] > logs will be written to: /tmpfs/src/github/synthtool/logs/googleapis/java-billingbudgets
2020-05-18 10:02:54,359 autosynth [DEBUG] > Running: git config --global core.excludesfile /home/kbuilder/.autosynth-gitignore
2020-05-18 10:02:54,362 autosynth [DEBUG] > Running: git config user.name yoshi-automation
2020-05-18 10:02:54,365 autosynth [DEBUG] > Running: git config user.email<EMAIL_ADDRESS>2020-05-18 10:02:54,368 autosynth [DEBUG] > Running: git config push.default simple
2020-05-18 10:02:54,371 autosynth [DEBUG] > Running: git branch -f autosynth
2020-05-18 10:02:54,374 autosynth [DEBUG] > Running: git checkout autosynth
Switched to branch 'autosynth'
2020-05-18 10:02:54,384 autosynth [DEBUG] > Running: git rev-parse --show-toplevel
2020-05-18 10:02:54,387 autosynth [DEBUG] > Running: git log -1 --pretty=%H
2020-05-18 10:02:54,390 autosynth [DEBUG] > Running: git remote get-url origin
2020-05-18 10:02:54,406 synthtool [ERROR] > Failed executing git checkout master:

error: Your local changes to the following files would be overwritten by checkout:
	.bazelrc
Please commit your changes or stash them before you switch branches.
Aborting

2020-05-18 10:02:54,406 autosynth [DEBUG] > Running: git clean -fdx
Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 615, in <module>
    main()
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 476, in main
    return _inner_main(temp_dir)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 576, in _inner_main
    git_source.enumerate_versions(sources, pathlib.Path(temp_dir))
  File "/tmpfs/src/github/synthtool/autosynth/git_source.py", line 166, in enumerate_versions
    source_versions = enumerate_versions_for_source(git_source, temp_dir)
  File "/tmpfs/src/github/synthtool/autosynth/git_source.py", line 131, in enumerate_versions_for_source
    local_repo_dir = str(synthtool_git.clone(remote))
  File "/tmpfs/src/github/synthtool/synthtool/sources/git.py", line 85, in clone
    shell.run(["git", "checkout", "master"], cwd=str(dest), check=True)
  File "/tmpfs/src/github/synthtool/synthtool/shell.py", line 39, in run
    raise exc
  File "/tmpfs/src/github/synthtool/synthtool/shell.py", line 33, in run
    encoding="utf-8",
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['git', 'checkout', 'master']' returned non-zero exit status 1.

Google internal developers can see the full log here.

Autosynth is still having trouble generating java-billingbudgets. :sob:
Here's the output from running synth.py:
/billing/budgets/v1beta1:google-cloud-billing-budgets-v1beta1-java']' returned non-zero exit status 1.
2020-05-18 11:33:51,617 autosynth [ERROR] > Synthesis failed
2020-05-18 11:33:51,617 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at c4aee19 ci: enable GitHub Actions (#151)
2020-05-18 11:33:51,624 autosynth [DEBUG] > Running: git checkout autosynth-googleapis
Switched to branch 'autosynth-googleapis'
2020-05-18 11:33:51,629 autosynth [ERROR] > Command '['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'synth.metadata', 'synth.py', '--']' returned non-zero exit status 1.
2020-05-18 11:33:51,776 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at c4aee19 ci: enable GitHub Actions (#151)
2020-05-18 11:33:51,803 autosynth [DEBUG] > Running: git checkout c4aee195f252884c2ee2c36656c04eb15fd43f20
Note: checking out 'c4aee195f252884c2ee2c36656c04eb15fd43f20'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at c4aee19 ci: enable GitHub Actions (#151)
2020-05-18 11:33:51,822 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at e94ad376 fix: point artman at gapic v1 for monitoring/v3 API
2020-05-18 11:33:51,893 autosynth [DEBUG] > Running: git checkout e94ad376529fabdfd2fce00407926a0cefd38b9e
HEAD is now at e94ad376 fix: point artman at gapic v1 for monitoring/v3 API
2020-05-18 11:33:51,908 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at 98c5077 chore: move ci.yaml to workflows dir (#535)
2020-05-18 11:33:51,913 autosynth [DEBUG] > Running: git checkout 7136daa5687f2a5bdcbba2cb25457f56fdf85d59
Previous HEAD position was 98c5077 chore: move ci.yaml to workflows dir (#535)
HEAD is now at 7136daa fix: check for open PR before attemping single PR fallback with AUTOSYNTH_MULTIPLE_PRS (#562)
2020-05-18 11:33:51,923 autosynth [DEBUG] > Running: git branch -f autosynth-36
2020-05-18 11:33:51,926 autosynth [DEBUG] > Running: git checkout autosynth-36
Switched to branch 'autosynth-36'
2020-05-18 11:33:51,930 autosynth [INFO] > Running synthtool
2020-05-18 11:33:51,930 autosynth [INFO] > ['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'synth.metadata', 'synth.py', '--']
2020-05-18 11:33:51,932 autosynth [DEBUG] > Running: /tmpfs/src/github/synthtool/env/bin/python3 -m synthtool --metadata synth.metadata synth.py --
2020-05-18 11:33:52,119 synthtool [DEBUG] > Executing /home/kbuilder/.cache/synthtool/java-billingbudgets/synth.py.
On branch autosynth-36
nothing to commit, working tree clean
2020-05-18 11:33:52,251 synthtool [DEBUG] > Ensuring dependencies.
2020-05-18 11:33:52,256 synthtool [DEBUG] > Pulling artman image.
latest: Pulling from googleapis/artman
Digest: sha256:b3b47805231a305d0f40c4bf069df20f6a2635574e6d4259fac651d3f9f6e098
Status: Image is up to date for googleapis/artman:latest
2020-05-18 11:33:53,204 synthtool [DEBUG] > Ensuring dependencies.
2020-05-18 11:33:53,214 synthtool [DEBUG] > Cloning googleapis.
2020-05-18 11:33:53,215 synthtool [DEBUG] > Using precloned repo /home/kbuilder/.cache/synthtool/googleapis
2020-05-18 11:33:53,218 synthtool [DEBUG] > Add custom bazel config: /home/kbuilder/.cache/synthtool/googleapis/.kokoro/.bazelrc
2020-05-18 11:33:53,219 synthtool [DEBUG] > Generating code for: //google/cloud/billing/budgets/v1beta1:google-cloud-billing-budgets-v1beta1-java.
2020-05-18 11:33:53,377 synthtool [ERROR] > Failed executing bazel --max_idle_secs=60 build //google/cloud/billing/budgets/v1beta1:google-cloud-billing-budgets-v1beta1-java:

Loading:
Loading: 0 packages loaded
DEBUG: Rule 'com_google_api_codegen' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "251fd77a674041b5e47960d924633787e0fc691ac453a987680b52518ee39e33"
DEBUG: Call stack for the definition of repository 'com_google_api_codegen' which is a http_archive (rule definition at /tmpfs/tmp/bazel/external/bazel_tools/tools/build_defs/repo/http.bzl:296:16):
 - <builtin>
 - /home/kbuilder/.cache/synthtool/googleapis/WORKSPACE:70:1
Analyzing: target //google/cloud/billing/budgets/v1beta1:google-cloud-billing-budgets-v1beta1-java (0 packages loaded, 0 targets configured)
INFO: Analyzed target //google/cloud/billing/budgets/v1beta1:google-cloud-billing-budgets-v1beta1-java (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
[0 / 9] [Prepa] BazelWorkspaceStatusAction stable-status.txt
ERROR: /tmpfs/tmp/bazel/external/com_google_api_codegen/BUILD.bazel:96:1: Building Java resource jar failed (Exit 1) singlejar_local failed: error executing command external/remote_java_tools_linux/java_tools/src/tools/singlejar/singlejar_local --normalize --dont_change_compression --exclude_build_data --output ... (remaining 155 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
src/main/tools/linux-sandbox-pid1.cc:169: "mount(tmpfs, /tmpbuild, tmpfs, MS_NOSUID | MS_NODEV | MS_NOATIME, nullptr)": No such file or directory
Target //google/cloud/billing/budgets/v1beta1:google-cloud-billing-budgets-v1beta1-java failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.150s, Critical Path: 0.02s
INFO: 0 processes.

Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 102, in <module>
    main()
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 94, in main
    spec.loader.exec_module(synth_module)  # type: ignore
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/kbuilder/.cache/synthtool/java-billingbudgets/synth.py", line 33, in <module>
    destination_name='billingbudgets',
  File "/tmpfs/src/github/synthtool/synthtool/languages/java.py", line 309, in bazel_library
    library = gapic.java_library(service=service, version=version, **kwargs)
  File "/tmpfs/src/github/synthtool/synthtool/gcp/gapic_bazel.py", line 61, in java_library
    return self._generate_code(service, version, "java", **kwargs)
  File "/tmpfs/src/github/synthtool/synthtool/gcp/gapic_bazel.py", line 183, in _generate_code
    shell.run(bazel_run_args)
  File "/tmpfs/src/github/synthtool/synthtool/shell.py", line 39, in run
    raise exc
  File "/tmpfs/src/github/synthtool/synthtool/shell.py", line 33, in run
    encoding="utf-8",
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['bazel', '--max_idle_secs=60', 'build', '//google/cloud/billing/budgets/v1beta1:google-cloud-billing-budgets-v1beta1-java']' returned non-zero exit status 1.
2020-05-18 11:33:53,414 autosynth [ERROR] > Synthesis failed
2020-05-18 11:33:53,414 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at c4aee19 ci: enable GitHub Actions (#151)
2020-05-18 11:33:53,419 autosynth [DEBUG] > Running: git checkout autosynth
Switched to branch 'autosynth'
2020-05-18 11:33:53,424 autosynth [DEBUG] > Running: git clean -fdx
Removing __pycache__/
Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 615, in <module>
    main()
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 476, in main
    return _inner_main(temp_dir)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 595, in _inner_main
    commit_count = synthesize_loop(x, multiple_prs, change_pusher, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 371, in synthesize_loop
    synthesize_inner_loop(toolbox, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 381, in synthesize_inner_loop
    synthesizer, len(toolbox.versions) - 1
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 266, in synthesize_version_in_new_branch
    synthesizer.synthesize(synth_log_path, self.environ)
  File "/tmpfs/src/github/synthtool/autosynth/synthesizer.py", line 119, in synthesize
    synth_proc.check_returncode()  # Raise an exception.
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 389, in check_returncode
    self.stderr)
subprocess.CalledProcessError: Command '['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'synth.metadata', 'synth.py', '--']' returned non-zero exit status 1.

Google internal developers can see the full log here.

Autosynth passed, closing! :green_heart:


[FIX] Restructuring

[x] Put source files in src folder
[x] Restructure methods adding Sparse methods to docs
[x] Update CI to improve speed of tests
[x] Update model performance tests to test more models
[x] Docs only update on release or workflow dispatch, not on push to main
[x] Move Numba functions to utils, perform eager compilation and micro optimization of lasso function.
[x] Use double dtype everywhere; reconcilers are sensitive to low(er) precision, for now unify to double and maybe in the future turn everything to single

Lasso (ERM) micro optimization before and after (the method is still slow as **** ):

Test for lasso equivalence of methods (removed it from the code to keep it clean):
#| hide
# Lasso test old vs new
@njit
def _lasso_old(X: np.ndarray, y: np.ndarray,
          lambda_reg: float, max_iters: int = 1_000,
          tol: float = 1e-4):
    # lasso cyclic coordinate descent
    n, feats = X.shape
    norms = (X ** 2).sum(axis=0)
    beta = np.zeros(feats, dtype=np.float32)
    beta_changes = np.zeros(feats, dtype=np.float32)
    residuals = y.copy()

    for it in range(max_iters):
        for i, betai in enumerate(beta):
            # is feature is close to zero, we
            # continue to the next.
            # in this case is optimal betai= 0
            # print(beta)

            if abs(norms[i]) < 1e-8:
                continue
            xi = X[:, i]
            #we calculate the normalized derivative
            rho = betai + xi.flatten().dot(residuals) / norms[i] #(norms[i] + 1e-3)
            #soft threshold
            beta[i] = np.sign(rho) * max(np.abs(rho) - lambda_reg * n / norms[i], 0.)#(norms[i] + 1e-3), 0.)
            beta_changes[i] = np.abs(betai - beta[i])
            if beta[i] != betai:
                residuals += (betai - beta[i]) * xi
        if max(beta_changes) < tol:
            break
    #print(it)
    return beta

S = np.array([[1., 1., 1., 1.],
              [1., 1., 0., 0.],
              [0., 0., 1., 1.],
              [1., 0., 0., 0.],
              [0., 1., 0., 0.],
              [0., 0., 1., 0.],
              [0., 0., 0., 1.]])
h = 2
_y = np.array([10., 5., 4., 2., 1.])
y_bottom = np.vstack([i * _y for i in range(1, 5)])
y_hat_bottom_insample = np.roll(y_bottom, 1)
y_hat_bottom = np.vstack([i * np.ones(h) for i in range(1, 5)])
idx_bottom = [3, 4, 5, 6]

y_hat=S @ y_hat_bottom
y_insample=S @ y_bottom
idx_bottom=idx_bottom

n_hiers, n_bottom = S.shape

for method in ["reg", "reg_bu"]:
    for lambda_reg in [None, 0.1, 10, 1000]:
        for with_nans in [True, False]:
            y_hat_bottom_insample = np.roll(y_bottom, 1)
            if with_nans:
                y_hat_bottom_insample[:, 0] = np.nan
            y_hat_insample=S @ y_hat_bottom_insample
            y_insample=S @ y_bottom

            nan_idx = np.isnan(y_hat_insample).any(axis=0)
            y_insample = y_insample[:, ~nan_idx]
            y_hat_insample = y_hat_insample[:, ~nan_idx]
            h = min(y_hat.shape[1], y_hat_insample.shape[1])
            y_hat_insample = y_hat_insample[:, -h:] # shape (h, n_hiers)
            y_insample = y_insample[:, -h:]

            if method == 'reg':
                X = np.kron(S, y_hat_insample.T)
                z = y_hat_insample.reshape(-1)

                if lambda_reg is None:
                    lambda_reg = np.max(np.abs(X.T.dot(z)))
                else:
                    lambda_reg = lambda_reg

                beta_old = _lasso_old(X, z, lambda_reg)
                beta_new = _lasso(X, z, lambda_reg, max_iters=1000, tol=1e-4)
                np.testing.assert_allclose(beta_new, beta_old, atol=1e-5, rtol=1e-3)

            if method == 'reg_bu':
                X = np.kron(S, y_hat_insample.T)
                Pbu = np.zeros_like(S)
                Pbu[idx_bottom] = S[idx_bottom]
                z = y_hat_insample.reshape(-1) - X @ Pbu.reshape(-1)

                if lambda_reg is None:
                    lambda_reg = np.max(np.abs(X.T.dot(z)))
                else:
                    lambda_reg = lambda_reg

                beta_old = _lasso_old(X, z, lambda_reg)
                beta_new = _lasso(X, z, lambda_reg, max_iters=1000, tol=1e-4)
                np.testing.assert_allclose(beta_new, beta_old, atol=1e-5, rtol=1e-3)


Maps 3 beta and FusedLocationProviderClient

I've a code working with map sdk 2 and I'm trying to port it to v3 beta
I'm making use of FusedLocationProviderClient, LocationRequest/LocationCallback but I can't find these classes in the new package, are they not implemented yet?

Only maps-related classes were affected. So pretty much com.google.android.gms.maps and com.google.android.gms.maps.model were moved to com.google.android.libraries.maps and com.google.android.libraries.maps.model, respectively.
For location-related services like FusedLocationProviderClient etc., you will still need to integrate with Google Play Services.

ok so there isn't any plan about removing Google Play Services as a whole for maps usage?
thanks for clarification.

ok so there isn't any plan about removing Google Play Services as a whole for maps usage?
thanks for clarification.

These are still under consideration. As of now, the standalone maps is still in beta and the maps in Google Play Services is still the official distribution. In your case, if you are using Maps 3 beta and require other location services in Google Play Services, you'll have to include those additional dependencies.


[PE-D][Tester E] Not too sure who is on leave when using 'viewdepartment' command.

When using viewdepartment, it displays the total number of employees, available employees, and the number of employees on leave. It would be useful if I could see which employee is on leave as well, rather than having to find them individually.

Labels: severity.Medium type.FeatureFlaw
original: kangzongxian/ped#9

Good Suggestion. Unfortunately, we are unable to fix this due to the feature freeze.


License

Hey, please add a license so I can package it.

Hi @mrvik,
The license can be found at https://github.com/logdna/logdna-agent-v2/blob/master/docs/LICENSE.md

@mrvik Heads up, we moved the license into the root folder so Github would display the MIT watermark in #10.


MacOS Catalyst 13.0

Library setup method: file, CocoaPods
Version of the library: latest (17.0)
Xcode version. Example: 11.1 (11A1027)
OS version. iOS 12+

Hi, I'm trying to make my universal app to run on macOS Catalina with the new Catalyst feature. It runs fine (with some warnings of deprecated code) but when I'm trying to save the login credentials using KeychainSwift, nothing is getting saved. Everything works fine when using iOS but I would also like my app to run on macOS.
Please, let me know if I need to do something else to make it work in this scenario.
Thanks in advance!

Thanks for reporting @dcarriola. I have not tried Catalyst yet. Could you run the following code and see if it prints "My secretive bee 🐝" message to the debug console? This will show if Keychain works or not.
Swift
override func viewDidLoad() {
    super.viewDidLoad()

    let itemKey = "My key"
    let itemValue = "My secretive bee 🐝"
    deleteFromKeychain(itemKey: itemKey)
    addToKeychain(itemKey: itemKey, itemValue: itemValue)
    readFromKeychain(itemKey: itemKey)
  }

  func deleteFromKeychain(itemKey: String) {
    let queryDelete: [String: AnyObject] = [
      kSecClass as String: kSecClassGenericPassword,
      kSecAttrAccount as String: itemKey as AnyObject,
    ]

    let resultCodeDelete = SecItemDelete(queryDelete as CFDictionary)

    if resultCodeDelete != noErr {
      print("Error deleting from Keychain: \(resultCodeDelete)")
    }
  }

  func addToKeychain(itemKey: String, itemValue: String) {
    guard let valueData = itemValue.data(using: String.Encoding.utf8) else {
      print("Error saving text to Keychain")
      return
    }

    let queryAdd: [String: AnyObject] = [
      kSecClass as String: kSecClassGenericPassword,
      kSecAttrAccount as String: itemKey as AnyObject,
      kSecValueData as String: valueData as AnyObject,
      kSecAttrAccessible as String: kSecAttrAccessibleWhenUnlocked,
    ]

    let resultCode = SecItemAdd(queryAdd as CFDictionary, nil)

    if resultCode != noErr {
      print("Error saving to Keychain: \(resultCode)")
    }
  }

  func readFromKeychain(itemKey: String) {
    let queryLoad: [String: AnyObject] = [
      kSecClass as String: kSecClassGenericPassword,
      kSecAttrAccount as String: itemKey as AnyObject,
      kSecReturnData as String: kCFBooleanTrue,
      kSecMatchLimit as String: kSecMatchLimitOne,
    ]

    var result: AnyObject?

    let resultCodeLoad = withUnsafeMutablePointer(to: &result) {
      SecItemCopyMatching(queryLoad as CFDictionary, UnsafeMutablePointer($0))
    }

    if resultCodeLoad == noErr {
      if let result = result as? Data,
        let keyValue = NSString(data: result,
                                encoding: String.Encoding.utf8.rawValue) as? String {

        // Found successfully
        print(keyValue)
      }
    } else {
      print("Error loading from Keychain: \(resultCodeLoad)")
    }
  }

Hey there,
I ran your code snippet on Mac Catalyst with Deployment Target 13.1 and this is my output:

Error deleting from Keychain: -34018
Error saving to Keychain: -34018
Error loading from Keychain: -25300

Hopefully this issue will be resolved.. Thanks!

Thanks, I've asked on stackoveflow.

hey @evgenyneu, just saw your stackoverflow post and the answer works. I just added "keychain sharing" within the signing & capabilities (even if i leave the keychain group empty) and it works.
Thanks a lot!


Add an outlook on the upcoming high-level API

Mention - basic functionality for supporting consumer groups including partition dispatching, rebalancing, offset cursor management and event filtering.

done: http://zalando.github.io/nakadi-manual/index.html#roadmap-note-upcoming-features


Fix inheritance for ComponentException

Not inheriting through public inheritance means that this exception type can't be caught by the std::exception nor std::runtime_error types in a catch.
Signed-off-by: The MathWorks, Inc<EMAIL_ADDRESS>

Codecov Report

Merging #676 (9c68df7) into development (d9f4d5c) will increase coverage by 0.37%.
The diff coverage is n/a.

@@               Coverage Diff               @@
##           development     #676      +/-   ##
===============================================
+ Coverage        90.42%   90.79%   +0.37%
===============================================
  Files              249      188      -61
  Lines            13532    10071    -3461
===============================================
- Hits             12236     9144    -3092
+ Misses            1296      927     -369

Impacted Files
Coverage Δ

...endium/ServiceComponent/src/ComponentException.cpp
0.00% <0.00%> (-100.00%)
:arrow_down:

...m/ServiceComponent/src/ServiceComponentRuntime.cpp
0.00% <0.00%> (-100.00%)
:arrow_down:

framework/src/service/ServiceEvent.cpp
71.79% <0.00%> (-5.76%)
:arrow_down:

...mework/src/service/ServiceReferenceBasePrivate.cpp
86.45% <0.00%> (-5.64%)
:arrow_down:

...pendium/tools/SCRCodeGen/ManifestParserFactory.hpp
83.33% <0.00%> (-5.56%)
:arrow_down:

framework/src/service/ServiceRegistrationBase.cpp
77.66% <0.00%> (-4.24%)
:arrow_down:

framework/src/util/FrameworkEvent.cpp
61.81% <0.00%> (-3.94%)
:arrow_down:

framework/src/bundle/BundleResourceBuffer.cpp
67.34% <0.00%> (-3.86%)
:arrow_down:

framework/src/service/ServiceListeners.cpp
96.26% <0.00%> (-3.74%)
:arrow_down:

...iveServices/src/metadata/MetadataParserFactory.hpp
66.66% <0.00%> (-3.34%)
:arrow_down:

... and 197 more


Next/Previous Buttons submit form

Hello,
I am creating a form using redux-form and I have a custom survey where each page is displaying as a step. The next/previous buttons that are created do not have the type attribute set so when they are clicked within the form the default behavior for a button is to submit. Adding type="button" fixed my issue.

I found a similar problem, which I traced to the presence of an enclosing form - if the wizard is inside a form, then the buttons will do a submit. Removing the form fixed the problem (I already had type="button")

Thanks for the feedback guys. As @mikkelking suggested, is removing the enclosing form an acceptable option? Or @blanco217 did you say you forked the library and added your fix? Did it have other side effects?

@newbreedofgeek For my project I am using redux-form with a multi-step form so in my case it is not an option. The change I made so far has no side effects. I may make a pull request soon when I can test further

@blanco217 ok, so its as simple as adding type="button" to these 2 buttons right? https://github.com/newbreedofgeek/react-stepzilla/blob/master/src/main.js#L322-L335

@newbreedofgeek yea that is all that is needed

Came up with a workaround for this in the meantime:
import React from 'react';
import ReactDOM from 'react-dom';
import StepZilla from 'react-stepzilla';

// Workaround for https://github.com/newbreedofgeek/react-stepzilla/issues/54
class StepZillaPatched extends StepZilla {
    componentDidMount() {
        const node = ReactDOM.findDOMNode(this);
        const buttons = node.getElementsByTagName('button');
        for (let i = 0; i < buttons.length; ++i) {
            buttons[i].setAttribute('type', 'button');
        }
    }
}

export default StepZillaPatched;

Anyone working on this? If not can I make changes and submit PR?

@atiqueansari1987 I haven't made the change. If you can that would be great.

Added PR.

I encountered this error too. Using version react-stepzilla 4.7.2, redux-form version 7.3.0.
I solved the problem by implementing a workaround.
// somewhere on component
state = {
    readyForSubmit: false,
}

constructor(props) {
    super(props);
    this.handleStepZillaStepChange = this.handleStepZillaStepChange.bind(this);
    this.handleFormSubmit = this.handleFormSubmit.bind(this);
}

handleFormSubmit(value)  {
      if (this.state.readyForSubmit) {
          console.log("Submitting the form");
          this.props.onFormSubmit(value);  // this is the the method that actually triggers the call to the api
      }
}

handleStepZillaStepChange(step) {
      if (step === SUBMIT_STEP_NUMBER) { // check if we are on the step that should submit
          console.log('unlocking submit');
          this.setState({readyForSubmit: true});
      }
}

render() {
    const {handleSubmit} = this.props;
    const steps = [...];

    return (

                <form onSubmit={handleSubmit(this.handleFormSubmit)}>

                        <StepZilla
                            steps={steps}
                            stepsNavigation={false}
                            nextButtonText="Next"
                            backButtonText="Back"
                            nextTextOnFinalActionStep="Save"
                            preventEnterSubmission={true}
                            onStepChange={this.handleStepZillaStepChange}
                        />

                </form>

        );
}


[3.x] Expose String::path_to, and String::path_to_file to GDScript

3.x equivalent of #54105

I'm closing this PR since I already have my own GDScript equivalent implementation and I don't need it's C++ equivalent for any performance-critical scenario.


chore(main): release 0.12.2

:robot: I have created a release beep boop
0.12.2 (2022-11-07)
Bug Fixes

Time: Ignore hydration issues  with the Time component (bb2854b)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/BLSQ/openhexa-frontend/releases/tag/0.12.2 :sunflower:


Cleanup and Namespace missing from "Tasks"

All tasks should have cleanup instructions.
All tasks should mention namespaces

@frankbu: clean missing here:
https://istio.io/docs/tasks/request-routing.html
https://istio.io/docs/tasks/fault-injection.html#fault-injection


Added Pie-pdf crime chart on react creations

#59

update readme

@Kritika30032002 updated the readme file

Thanks for your valuable contribution.
Don't forget to star the repo.


Rename Beneficiary Mutation

Allow users to rename beneficiaries. This should move all records associated with the beneficiary and any config against the beneficiary.
For the time being, if the new name is already used the operation should fail.

 Edit Beneficiary Name

		"EditBeneficiaryID": &graphql.Field{
			Type:        ben,
			Description: "Change the beneficiary's ID",
			Args: graphql.FieldConfigArgument{
				"id": &graphql.ArgumentConfig{
					Description: "The ID of the beneficiary",
					Type:        graphql.NewNonNull(graphql.String),
				},
				"newID": &graphql.ArgumentConfig{
					Type:        graphql.NewNonNull(graphql.String),
					Description: "The new ID for the beneficiary",
				},
				"allowMerge": &graphql.ArgumentConfig{
					Type:        graphql.Boolean,
					Description: "When the newID belongs to an existing beneficiary, should it merge or fail",
				},
			},
			Resolve: userRestrictedResolver(func(p graphql.ResolveParams, u auth.User) (interface{}, error) {
				ben := p.Args["id"].(string)
				new := p.Args["newID"].(string)
				allowMerge := getFalseOrBoolean(p.Args, "allowMerge")
				return v.db.SetBeneficiaryTags(ben, tags, u)
			}),
		},


site: Mark marbles winner with 🪩 emoji

Mark marbles winner with 🪩 emoji (with a correct alt for a11y) to indicate who gain the 5 points of the month

Fixed by 429710fa1532423b1676ca11a49e2fa6c6073401


Login failed / Invalid auth token

I've got the correct API key and secret configured, but I'm getting the following with any API calls:
{ rsp:
   { stat: 'fail',
     err: { code: '98', msg: 'Login failed / Invalid auth token' } } }

Then I read https://www.rememberthemilk.com/services/api/authentication.rtm, and looking back at your code, I don't see any reference to auth or tokens. Seems like I need to do something with auth tokens to make this work.
Please advise, thanks.

You can authenticate by using the following code:
rtm.get('rtm.auth.getFrob', function(resp){
    frob = resp.rsp.frob;
    var authUrl = rtm.getAuthUrl(frob);
});

If you visit the auth url in your browser, you can authorize your application. After that, you can use the following code to get the auth token:
rtm.get('rtm.auth.getToken', {frob: frob}, function(resp){
    rtm.auth_token = resp.rsp.auth.token;
});

Once rtm.auth_token is set, it will be used for any future requests that use rtm.get.
rtm.get('rtm.lists.getList', function(resp){
    // ...
});

You can see the full working example for for node or web to get a better idea of how that all works together in practice.
I hope that helps. If that doesn't work, create a gist with your code in it and reopen this ticket. I'll take a look and try to help you out.

Great, thanks!


TD-482: Cashflow refactoring

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

74 of 76 (97.37%)  changed or added relevant lines in 6 files are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage increased (+0.02%) to 90.094%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

apps/hellgate/src/hg_cashflow_utils.erl
41
42
97.62%

apps/hellgate/src/hg_invoice_utils.erl
7
8
87.5%

Files with Coverage Reduction
New Missed Lines
%

apps/hellgate/src/hg_invoice.erl
1
91.45%

Totals

Change from base Build<PHONE_NUMBER>:
0.02%

Covered Lines:
4402

Relevant Lines:
4886

💛  - Coveralls


Cannot set percentage.yaml alert in elastalert

Hi Everyone, I am trying to setup elastalert rules with a new installed Kibana 7.6 version. I could successfully setup the frequency alert but having some issues while setting up the percentage alert. I get no query hits and matches when i run this rule.
Below is my percentage.yaml configuration file, can you guys take a look and let me know if there are any issues in it.

I tested the configuration and it did not show any errors. And i had an another question for doc_type should it be name of the field or the type of the doc itself, i did try both but to no luck.
Thanks

Yelp/elastalert is no longer maintained. Please use jertel/elastalert2.
https://github.com/jertel/elastalert2


Fledge check still gives Adventure pouch

It's probably tied to a storyflag of that event, also check if that breaks additional pouch slots

Storyflag changed, now it's not possible to open anymore, but still has 4 slots which can be filled


add "joins queries" as a new kind of query available from the dropbox list

The configuration of a join query would be to select what kind:

union
intersection
difference

And what are the two input queries to connect to it

covered by #171


[Feature] Support combination billing plans

WHY are these changes introduced?
Fixes #919

Because a combination of a recurring billing plan and a usage billing plan was not supported.
WHAT is this pull request doing?

Add billing interval type for combination (BillingInterval.Combination)
Support a combination of a recurring billing plan and a usage billing plan

Type of change

[ ] Patch: Bug (non-breaking change which fixes an issue)
[x] Minor: New feature (non-breaking change which adds functionality)
[ ] Major: Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

[x] I have used yarn changeset to create a draft changelog entry (do NOT update the CHANGELOG.md file manually)
[x] I have added/updated tests for this change
[x] I have documented new APIs/updated the documentation for modified APIs (for public APIs)

Hello @paulomarg,
After a long period without any updates, hearing that a different approach has been chosen instead of the one I proposed is deeply disheartening. The absence of communication and then learning about this decision has been a very saddening experience for me. I had high hopes for my contribution and its potential impact on the Shopify community.
Nevertheless, I appreciate the opportunity to have presented my ideas and I look forward to contributing in the future, hopefully with more engagement and feedback.


Add unified check_data_and_dim

Codecov Report
Patch coverage: 100.00% and no project coverage change.

Comparison is base (7c3fade) 100.00% compared to head (9f21ec7) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #332   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files           13        14    +1
  Lines         1389      1399   +10
  Branches       156       158    +2
=========================================
+ Hits          1389      1399   +10

Files Changed
Coverage Δ

src/redcat/utils/array.py
100.00% <100.00%> (ø)

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


Use version catalog for exoplayer test dependency

          Please replace with version catalog entries

Originally posted by @timothyfroehlich in https://github.com/google/automotive-design-compose/pull/859#discussion_r1532883887

It's pretty easy with a current Android Studio release, I can give you a demo.


Project status

How does the release of the new upbound aws provider affect this project?
The official docs now direct users to use the ubound provider, which means there will be less and less usage of this provider over time.
It is confusing for users to understand why there are two different aws providers (personally I had to dig in to figure this out) and which one they should choose.
What does the future hold for this project? Is there a reason for it to live side by side with the upbound provider instead of joining forces on a single provider?

The same question occured to me. Looking from the outside onto the project, this is really confusing. Additionally the community Azure provider and the community GCP provider don't seem to be in active development any more (last release +1 year ago).

A short statement to clarifiy the status and future of this repository:
Upbound has moved to its own Terraform-based set of providers. This means that https://github.com/crossplane-contrib/provider-aws is now only maintained by community volunteers since there is a number of people out there who are still using it.
It is kind of legacy but it will receive further updates as long as the community is willing to contribute to it. Due to the limited number of active maintainers - two at the time of writing - there is no capacity to implement new controllers. So all issues labeled as enhancement will most likely not be treated by us. However, we do accept PRs for new features or bug fixes.
Since the core resources (IAM, RDS, S3 etc.) are pretty much matured it should be safe to continue with this provider should your Crossplane platform already run with it. For new projects we recommend to use https://github.com/upbound/provider-aws as we project a better long-term support for it.
I hope that cleared things up a bit.
BTW: If someone is willing to become a maintainer for this repository, feel free to send me a PM on Crossplane Slack.

Thanks for the info @MisterMX.
I believe it would be beneficial to include this information in the repo's readme.


GH-1654 Implement dashboard

SJ PW 2022

Hi @dzikoysk wouldn't it be more accessible of the padding between resolved requests is smaller? It takes a lot of space.

I'm going to add one more chart, so I'll probably try to reduce  its height 🤔

@ThraaxSession

What do you think?

Nice :)

Thanks 💜 Yeah, I think it might be a good idea to release a next version with those charts.


Wrong profile swithcing in Profile manager

When I sort profiles in Profile Manager and then try to  enable/disable some of sorted profile -  BB switches non-selected profile, but some other profile (i suppose BB switch profile that was on selected place before sorting :) )

Hi @virusvfv !
Solved! At the moment not is possible sort profiles, in next version will be sortable.
Thanks!
PS: I would like to thank you in the github, could you give me the information you want to show? email, twitter, github ...

Hi @virusvfv !
I solved this question in version 2.3, as you can see in:
https://github.com/wagiro/BurpBounty/wiki/usage
Now in Profiles Manager, you can specified the twitter author, and sort, delete multiples profiles, etc.
Thanks :D


Detach for real

Hey team! Please add your planning poker estimate with Zenhub @aang114 @alebaffa @sinkingsugar

hmm what's this issue about anyway? I dont remember, can we expand before spending points?

@sinkingsugar At the moment we only emit a signature that's signed by EthereumAuthorities.
If there's nothing more to add, I can close this one.

We'll discuss it later on. I put it on new issues.


[Bug]: Need better documentation for python client configuration

What happened?
Today, there is no documentation solving issues with network connectivity and SSL requirements on the python client.
Expected Behavior
Expected Behavior:
Better documentation
lakeFS Version
104.0
Deplyoment
No response
Affected Clients
No response
Relevant logs output
No response
Contact Details
No response

That's done, right @iddoavn ?


Docker container version

Hello,
I apologise if this is the wrong place to post this, but I saw this announced on Reddit and I'm very excited to use it. Thank you so much for creating it!
I was wondering whether it would be a lot to ask for a docker container version? It might be easier for a lot of people rather than trying to set up a database and app separately.
Thank you so much!

I wrote a first pass of this:

https://github.com/ridv/spliit2/blob/main/Dockerfile
https://github.com/ridv/spliit2/blob/main/docker-compose.yml

I'm not too familiar with how NodeJS apps are packaged so there's some opportunities to package this app better.
@scastiel, some questions:
Is there a way to run the postinstall script without having the database running?
Is it possible to run npm run postinstall without needing to do npm run build again afterwards?
Also wanted to say thanks for writing this app!

+1 for the docker image

see: https://github.com/vercel/next.js/tree/canary/examples/with-docker

Copy Dockerfile to root of spliit2 repository - may also need to add lines to this to copy over prisma.schema
add the following to ./next.config.js:

const nextConfig = {
    output: 'standalone'
}

npm run build
docker build -t spliit2-docker .
docker run -p 3000:3000 spliit2-docker


General Issue: Establish Codeowners for admiral codebase

Background Information
Ensure stability of code by having dedicated admiral devs automatically tagged in PRs that change essential R code of admiral.

[ ] Identify relevant devs to be potential code owners
[ ] Establish protocol on being a codeowner for admiral and what that entails
[ ] Establish addition protocols for changing hands of CO, lack of time to be a COs, etc
[ ] Identify files that should have codeowner attached to it and who should be that owner

Definition of Done
Checklist completed and Codeownership established for admiral codebase

What do you want to achieve by establishing codeowner?
It seems to contradict the community approach. I.e., the code is developed and maintained by the community. I also wonder how it should work considering the high turnover in the admiral dev team.

That core code being modified is brought to our attention - basically anything in the R folder that is modified should have one of us tagged in it ( us being me, you, @thomas-neitmann, @zdz2101, @sadchla-codes )... maybe @millerg23 and @galachad  want in on the game as well.  Others are welcome as well.
I was hoping the group of codeowners would stick to function themes that they are familiar with to help balance the load.  I don't feel like it takes away the community feel - just lets us keep an eye on changes that folks propose.  @cicdguy does this on admiralci.  Basically, auto-assigns us as reviewers if our codeowner code is touched.
Helps also to let new and old developers find reviewers as we are already familiar with the code.

Happy medium - Try out with Lab and PK specific code.  For example, lab excel file for grading.
@zdz2101 can you come up with list of potential lab and pk specific files

@zdz2101 I'm fine with being added to help test this functionality.   Please also add ./inst/templates/ad_adpc.R

yes @zdz2101 thats fine by me. If you need to assign someone to templates, then I can cover the ADLB template (and ADVS/ADEG).

@pharmaverse/admiral do we want to re-visit this idea of codeowners

While I think this is a cool idea and was initially enthused about it - I now feel  like it is just more bureaucracy for us.  The risk of someone doing something untoward to our files is pretty minimal with all our infrastructure.
I think the most important takeaway is identifying people in our weekly meetings to do code review as this was one of the code owners original purposes.  I feel like if we stay on top of PRs and ask for reviewers the. We should be okay.
Any thought @pharmaverse/admiral ?

@bms63 you are very good at keeping on top of the PRs, and like you say, we can assign reviewers at the regular stand-ups. If you want to try it out with just labs and PK, I am fine with that also. I am not sure how much extra code is required to implement this, and how easy it it to maintain. I am all for less code to maintain in general, unless its really needed.

I think the code is minimal to implement.  It is just the documentation that is putting me off from wanting to implement it.
If @zdz2101 or someone else wants to make a brief mention of it in the PR docs in admiraldev then I am okay with proceeding.

I will update the docs on admiraldev and put in some language around codeownership expectations.


Greenhouse to Flight School device move staging and prod Phase 3

Type of Request
infra task
Infrastructure Environment
devicelab
What is happening?
Type of Request
infra task
Infrastructure Environment
devicelab
What is happening?
Move staging and prod pool bots to new Flight School lab:
Phase 3:
prod
flutter-devicelab-linux-10
flutter-devicelab-linux-11
flutter-devicelab-linux-13
flutter-devicelab-linux-15
flutter-devicelab-linux-21
flutter-devicelab-linux-32
flutter-devicelab-linux-33
flutter-devicelab-linux-34
flutter-devicelab-linux-38
flutter-devicelab-linux-39
flutter-devicelab-linux-40
flutter-devicelab-linux-41
flutter-devicelab-linux-42
flutter-devicelab-linux-43
flutter-devicelab-linux-44
flutter-devicelab-linux-9
flutter-devicelab-mac-24
flutter-devicelab-mac-25
flutter-devicelab-mac-27
flutter-devicelab-mac-28
flutter-devicelab-mac-29
flutter-devicelab-mac-30
flutter-devicelab-mac-31
flutter-devicelab-mac-35
flutter-win-12
flutter-win-13
flutter-win-2
flutter-win-3
For each above machines:

[ ] Create ticket to update hostadmin entry to point to new VLAN config (flightschool_2) (Similar to ticket t/225373886)
[ ] Connect to any network switches 2-5
[ ] Verify swarming bot is up and running
[ ] Verify that builds have run successfully after move
[ ] Verify DNS is correct and host is ssh'able
[ ] Verify salt states can be applied correctly

Steps to reproduce
Step 1:
Step 2:
..
Step n:
Expected results
I expect to see X when Y is finished.

ticket for vlan changes: t/226168129


feat: SQLALchemy 2.0 migration (newer)

Follow up on: #920
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

[X] Make sure to open an issue as a bug/issue before writing your code!  That way we can discuss the change, evaluate designs, and agree on the general idea
[X] Ensure the tests and linter pass
[X] Code coverage does not decrease (if any source code was changed)
[X] Appropriate docs were updated (if necessary)

Fixes #510  🦕

Seems this ticket is closed. Any idea on the future of SQLAlchemy 2.0 support?

@aczire Sorry, I did not notice this message, there is actually a pre-release of SQLA 2.0 support found here: https://pypi.org/project/sqlalchemy-bigquery/1.11.0.dev2/


Fix errors in readme

This tripped me over for about an hour today (as there was no clear error message, just saying the file-system backend was not found)—the README suggests importing the FileSystemBackend as a named import while the package exports it as default.
I've updated the code in the README and while I was at it, added syntax highlighting to the snippets :)
I'd also suggest using window.CMS_ENV = 'development_overrides'; instead of hardcoding everything in the cms.js—this way the config can stay in the expected location of config.yml, would you be open to such a change to the docs?
Cheers for a great package!

The readme changes are good. Thanks for these. I was only using this as a test example really.
For me, the config.yml is not the expected location. Putting code in the cms.js is not really hard coding when extending the cms using the gatsby-plugin-netlify-cms. If you want to open up another issue for discussion, I will think about it more.


[release] Fix, update superset docs process

CATEGORY

[ ] Bug Fix
[ ] Enhancement (new features, refinement)
[ ] Refactor
[ ] Add tests
[ ] Build / Development Environment
[X] Documentation

SUMMARY
Fixes release docs for updating superset documentation
ADDITIONAL INFORMATION

[ ] Has associated issue:
[ ] Changes UI
[ ] Requires DB Migration.
[ ] Confirm DB Migration upgrade and downgrade tested.
[ ] Introduces new feature or API
[ ] Removes existing feature or API

REVIEWERS

Codecov Report

Merging #8680 into master will decrease coverage by 0.26%.
The diff coverage is n/a.

@@            Coverage Diff            @@
##           master   #8680      +/-   ##
=========================================
- Coverage   65.77%   65.5%   -0.27%
=========================================
  Files         482     481       -1
  Lines       23834   24079     +245
  Branches     2594    2763     +169
=========================================
+ Hits        15676   15774      +98
- Misses       7985    8125     +140
- Partials      173     180       +7

Impacted Files
Coverage Δ

superset/db_engine_specs/postgres.py
55.55% <0%> (-27.78%)
:arrow_down:

superset/assets/src/utils/DebouncedMessageQueue.js
77.77% <0%> (-15.56%)
:arrow_down:

...perset/assets/src/profile/components/Favorites.jsx
86.66% <0%> (-13.34%)
:arrow_down:

...t/assets/src/profile/components/CreatedContent.jsx
86.66% <0%> (-13.34%)
:arrow_down:

...re/components/controls/TimeSeriesColumnControl.jsx
56.6% <0%> (-9.31%)
:arrow_down:

superset/connectors/druid/views.py
64% <0%> (-5.34%)
:arrow_down:

superset/assets/src/modules/utils.js
48.38% <0%> (-4.95%)
:arrow_down:

...plore/components/controls/FixedOrMetricControl.jsx
50.94% <0%> (-4.62%)
:arrow_down:

...rset/assets/src/SqlLab/components/LimitControl.jsx
87.17% <0%> (-4%)
:arrow_down:

...ets/src/SqlLab/components/RunQueryActionButton.jsx
77.77% <0%> (-3.48%)
:arrow_down:

... and 164 more

Continue to review full report at Codecov.

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


page : hide category

Before change

After change

The category will be hidden until new category implementation adopted.

Thanks!


Feature request: Add a openai base url so one can query custom compatible LLM servers

I don't know the javascript/typescript version of @langchain/openai, but would it be possible to add an api base url parameter alongside the openAIApiKey parameter so we could use AI Tagger with custom OpenAI compatible local LLM servers?

Just went ahead and added support for custom Base URLs. Thanks for the feature request! Let me know if there are any issues with the latest release.


UART on a Raspberry Pi 5 using GPIO 14/15.

After getting some help in the Raspberry Pi forums, on how to configure GPIO 14 & 15 for UART TX / RX, I was able to get the device talking to my Raspberry Pi 5 and confirm that the wiring was correct. When attempting to use rppal to talk to the device, I was unable to send or receive data. Any commands I issued did not produce any results on the device, and I did not receive any feedback from the device either. I read though #127 to see if I had a configuration issue, but it looks like it should just work?
When using minicom -b 57600 -o -D /dev/ttyAMA0 I can see 0x55 (ASCII U) from the device showing that it is talking over that port. It just doesn't look like rppal is picking up that connection. Is there something that I should be doing to configure rrpal to use the ttyAMA0 connection on the Raspberry Pi 5?
My Cargo.toml looks like this:
[package]
name = "rpi-r503"
version = "0.1.0"
edition = "2021"

[dependencies]
rppal = { version = "0.19.0", features = ["hal"] }
r503 = { path = "../r503" }
heapless = "0.8"

The rest of the code can be found on this repo.
https://github.com/Dygear/rpi-r503
The output of gpio_status may be helpful, so here it is:
dygear@MimoFPS-DEV:~/rppal $ cargo run --example gpio_status
    Updating crates.io index
     Locking 21 packages to latest compatible versions
      Adding embedded-hal v0.2.7 (latest: v1.0.0)
      Adding nb v0.1.3 (latest: v1.1.0)
  Downloaded lazy_static v1.5.0
  Downloaded simple-signal v1.1.1
  Downloaded 2 crates (17.2 KB) in 0.43s
   Compiling libc v0.2.161
   Compiling lazy_static v1.5.0
   Compiling rppal v0.19.0 (/home/dygear/rppal)
   Compiling simple-signal v1.1.1
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 6.76s
     Running `target/debug/examples/gpio_status`
+------+-------+---+---------+---+-------+------+
| GPIO | Mode  | L |   Pin   | L | Mode  | GPIO |
+------+-------+---+----+----+---+-------+------+
|      | 3.3 V |   |  1 |  2 |   | 5 V   |      |
|    2 | NULL  | 0 |  3 |  4 |   | 5 V   |      |
|    3 | NULL  | 0 |  5 |  6 |   | GND   |      |
|    4 | NULL  | 0 |  7 |  8 | 1 | ALT4  |   14 |
|      | GND   |   |  9 | 10 | 1 | ALT4  |   15 |
|   17 | NULL  | 0 | 11 | 12 | 1 | IN    |   18 |
|   27 | NULL  | 0 | 13 | 14 |   | GND   |      |
|   22 | NULL  | 0 | 15 | 16 | 0 | NULL  |   23 |
|      | 3.3 V |   | 17 | 18 | 0 | NULL  |   24 |
|   10 | NULL  | 0 | 19 | 20 |   | GND   |      |
|    9 | NULL  | 0 | 21 | 22 | 0 | NULL  |   25 |
|   11 | NULL  | 0 | 23 | 24 | 0 | NULL  |    8 |
|      | GND   |   | 25 | 26 | 0 | NULL  |    7 |
|    0 | IN    | 1 | 27 | 28 | 1 | IN    |    1 |
|    5 | NULL  | 0 | 29 | 30 |   | GND   |      |
|    6 | NULL  | 0 | 31 | 32 | 0 | NULL  |   12 |
|   13 | NULL  | 0 | 33 | 34 |   | GND   |      |
|   19 | NULL  | 0 | 35 | 36 | 0 | NULL  |   16 |
|   26 | NULL  | 0 | 37 | 38 | 0 | NULL  |   20 |
|      | GND   |   | 39 | 40 | 0 | NULL  |   21 |
+------+-------+---+----+----+---+-------+------+

Hi @Dygear. I'm not seeing any obvious problems in your code. There are a few things you could try to debug the issue:

new will use /dev/serial0 by default. Try calling with_path instead and specify /dev/ttyAMA0.
By default read (and write) are configured as non-blocking. Try set_read_mode(1, Duration::default()) to wait for at least 1 byte in the read buffer before returning.
Data sent using write is first copied to an internal output buffer and hasn't all been sent to the device yet when it returns. You can call output_len to make sure the output buffer has been emptied. Similarly, you can use input_len to check if any data is available in the input buffer.
Check the return value for read and write to see how many bytes were actually copied to/read from the buffers, if any.

Updated the uart section of the code to now read as follows:
    let mut uart = match Uart::with_path("/dev/ttyAMA0", 57600, Parity::None, 8, 1) {
        Ok(uart) => uart,
        Err(e) => panic!("UART Setup Error: {e}")
    };

I'm now able to talk to the device. Thanks for the help and putting me on the correct path.

For what it's worth, here's the output of ls -lha for the /dev/ directory.
Looks like /dev/serial0 points to /dev/ttyAMA10. But as you said I wanted /dev/ttyAMA0.
dygear@MimoFPS-DEV:~ $ ls -lha /dev/
total 4.0K
drwxr-xr-x 16 root root        4.1K Nov  5 09:40 .
drwxr-xr-x 18 root root        4.0K Oct 22 09:13 ..
crw-r--r--  1 root root     10, 235 Nov  5 09:40 autofs
drwxr-xr-x  2 root root         580 Nov  5 09:40 block
crw-------  1 root root     10, 234 Nov  5 09:40 btrfs-control
drwxr-xr-x  3 root root          60 Nov  5 09:40 bus
crw-------  1 root root     10, 126 Nov  5 09:40 cachefiles
crw-rw----  1 root video   511,   0 Nov  5 09:40 cec0
crw-rw----  1 root video   511,   1 Nov  5 09:40 cec1
drwxr-xr-x  2 root root        3.4K Nov  5 09:40 char
crw--w----  1 root tty       5,   1 Nov  5 09:40 console
crw-------  1 root root     10, 124 Nov  5 09:40 cpu_dma_latency
crw-------  1 root root     10, 203 Nov  5 09:40 cuse
drwxr-xr-x  8 root root         160 Nov  5 09:40 disk
drwxr-xr-x  2 root root         100 Nov  5 09:40 dma_heap
drwxr-xr-x  3 root root         120 Nov  5 09:40 dri
lrwxrwxrwx  1 root root          13 Nov  5 09:40 fd -> /proc/self/fd
crw-rw-rw-  1 root root      1,   7 Nov  5 09:40 full
crw-rw-rw-  1 root root     10, 229 Nov  5 09:40 fuse
crw-rw----  1 root gpio    254,   0 Nov  5 09:40 gpiochip0
crw-rw----  1 root gpio    254,  10 Nov  5 09:40 gpiochip10
crw-rw----  1 root gpio    254,  11 Nov  5 09:40 gpiochip11
crw-rw----  1 root gpio    254,  12 Nov  5 09:40 gpiochip12
crw-rw----  1 root gpio    254,  13 Nov  5 09:40 gpiochip13
lrwxrwxrwx  1 root root           9 Nov  5 09:40 gpiochip4 -> gpiochip0
crw-rw----  1 root gpio    235,   0 Nov  5 09:40 gpiomem0
crw-rw----  1 root gpio    239,   0 Nov  5 09:40 gpiomem1
crw-rw----  1 root gpio    238,   0 Nov  5 09:40 gpiomem2
crw-rw----  1 root gpio    237,   0 Nov  5 09:40 gpiomem3
crw-rw----  1 root gpio    236,   0 Nov  5 09:40 gpiomem4
crw-------  1 root root     10, 183 Nov  5 09:40 hwrng
lrwxrwxrwx  1 root root          12 Nov  5 09:40 initctl -> /run/initctl
drwxr-xr-x  3 root root         180 Nov  5 09:40 input
crw-r--r--  1 root root      1,  11 Nov  5 09:40 kmsg
crw-rw----  1 root kvm      10, 232 Nov  5 09:40 kvm
lrwxrwxrwx  1 root root          28 Nov  5 09:40 log -> /run/systemd/journal/dev-log
brw-rw----  1 root disk      7,   0 Nov  5 09:40 loop0
brw-rw----  1 root disk      7,   1 Nov  5 09:40 loop1
brw-rw----  1 root disk      7,   2 Nov  5 09:40 loop2
brw-rw----  1 root disk      7,   3 Nov  5 09:40 loop3
brw-rw----  1 root disk      7,   4 Nov  5 09:40 loop4
brw-rw----  1 root disk      7,   5 Nov  5 09:40 loop5
brw-rw----  1 root disk      7,   6 Nov  5 09:40 loop6
brw-rw----  1 root disk      7,   7 Nov  5 09:40 loop7
crw-rw----  1 root disk     10, 237 Nov  5 09:40 loop-control
drwxr-xr-x  2 root root          60 Nov  5 09:40 mapper
crw-rw----  1 root video   234,   0 Nov  5 09:40 media0
crw-rw----  1 root video   234,   1 Nov  5 09:40 media1
crw-rw----  1 root video   234,   2 Nov  5 09:40 media2
crw-r-----  1 root kmem      1,   1 Nov  5 09:40 mem
brw-rw----  1 root disk    179,   0 Nov  5 09:40 mmcblk0
brw-rw----  1 root disk    179,   1 Nov  5 09:40 mmcblk0p1
brw-rw----  1 root disk    179,   2 Nov  5 09:40 mmcblk0p2
drwxrwxrwt  2 root root          40 Dec 31  1969 mqueue
drwxr-xr-x  2 root root          60 Nov  5 09:40 net
crw-rw-rw-  1 root root      1,   3 Nov  5 09:40 null
crw-r-----  1 root kmem      1,   4 Nov  5 09:40 port
crw-------  1 root root    108,   0 Nov  5 09:40 ppp
crw-------  1 root root    250,   0 Nov  5 09:40 pps0
crw-rw-rw-  1 root tty       5,   2 Nov  5 16:28 ptmx
crw-------  1 root root    249,   0 Nov  5 09:40 ptp0
drwxr-xr-x  2 root root           0 Nov  5 09:40 pts
brw-rw----  1 root disk      1,   0 Nov  5 09:40 ram0
brw-rw----  1 root disk      1,   1 Nov  5 09:40 ram1
brw-rw----  1 root disk      1,  10 Nov  5 09:40 ram10
brw-rw----  1 root disk      1,  11 Nov  5 09:40 ram11
brw-rw----  1 root disk      1,  12 Nov  5 09:40 ram12
brw-rw----  1 root disk      1,  13 Nov  5 09:40 ram13
brw-rw----  1 root disk      1,  14 Nov  5 09:40 ram14
brw-rw----  1 root disk      1,  15 Nov  5 09:40 ram15
brw-rw----  1 root disk      1,   2 Nov  5 09:40 ram2
brw-rw----  1 root disk      1,   3 Nov  5 09:40 ram3
brw-rw----  1 root disk      1,   4 Nov  5 09:40 ram4
brw-rw----  1 root disk      1,   5 Nov  5 09:40 ram5
brw-rw----  1 root disk      1,   6 Nov  5 09:40 ram6
brw-rw----  1 root disk      1,   7 Nov  5 09:40 ram7
brw-rw----  1 root disk      1,   8 Nov  5 09:40 ram8
brw-rw----  1 root disk      1,   9 Nov  5 09:40 ram9
crw-rw-rw-  1 root root      1,   8 Nov  5 09:40 random
crw-rw-r--  1 root netdev   10, 242 Nov  5 09:40 rfkill
lrwxrwxrwx  1 root root           4 Nov  5 09:40 rtc -> rtc0
crw-------  1 root root    252,   0 Nov  5 09:40 rtc0
lrwxrwxrwx  1 root root           8 Nov  5 09:40 serial0 -> ttyAMA10
drwxrwxrwt  2 root root          40 Nov  5 09:40 shm
drwxr-xr-x  3 root root         180 Nov  5 09:40 snd
crw-rw----  1 root spi     153,   0 Nov  5 09:40 spidev10.0
lrwxrwxrwx  1 root root          15 Nov  5 09:40 stderr -> /proc/self/fd/2
lrwxrwxrwx  1 root root          15 Nov  5 09:40 stdin -> /proc/self/fd/0
lrwxrwxrwx  1 root root          15 Nov  5 09:40 stdout -> /proc/self/fd/1
crw-rw-rw-  1 root tty       5,   0 Nov  5 15:00 tty
crw--w----  1 root tty       4,   0 Nov  5 09:40 tty0
crw--w----  1 root tty       4,   1 Nov  5 09:40 tty1
crw--w----  1 root tty       4,  10 Nov  5 09:40 tty10
crw--w----  1 root tty       4,  11 Nov  5 09:40 tty11
crw--w----  1 root tty       4,  12 Nov  5 09:40 tty12
crw--w----  1 root tty       4,  13 Nov  5 09:40 tty13
crw--w----  1 root tty       4,  14 Nov  5 09:40 tty14
crw--w----  1 root tty       4,  15 Nov  5 09:40 tty15
crw--w----  1 root tty       4,  16 Nov  5 09:40 tty16
crw--w----  1 root tty       4,  17 Nov  5 09:40 tty17
crw--w----  1 root tty       4,  18 Nov  5 09:40 tty18
crw--w----  1 root tty       4,  19 Nov  5 09:40 tty19
crw--w----  1 root tty       4,   2 Nov  5 09:40 tty2
crw--w----  1 root tty       4,  20 Nov  5 09:40 tty20
crw--w----  1 root tty       4,  21 Nov  5 09:40 tty21
crw--w----  1 root tty       4,  22 Nov  5 09:40 tty22
crw--w----  1 root tty       4,  23 Nov  5 09:40 tty23
crw--w----  1 root tty       4,  24 Nov  5 09:40 tty24
crw--w----  1 root tty       4,  25 Nov  5 09:40 tty25
crw--w----  1 root tty       4,  26 Nov  5 09:40 tty26
crw--w----  1 root tty       4,  27 Nov  5 09:40 tty27
crw--w----  1 root tty       4,  28 Nov  5 09:40 tty28
crw--w----  1 root tty       4,  29 Nov  5 09:40 tty29
crw--w----  1 root tty       4,   3 Nov  5 09:40 tty3
crw--w----  1 root tty       4,  30 Nov  5 09:40 tty30
crw--w----  1 root tty       4,  31 Nov  5 09:40 tty31
crw--w----  1 root tty       4,  32 Nov  5 09:40 tty32
crw--w----  1 root tty       4,  33 Nov  5 09:40 tty33
crw--w----  1 root tty       4,  34 Nov  5 09:40 tty34
crw--w----  1 root tty       4,  35 Nov  5 09:40 tty35
crw--w----  1 root tty       4,  36 Nov  5 09:40 tty36
crw--w----  1 root tty       4,  37 Nov  5 09:40 tty37
crw--w----  1 root tty       4,  38 Nov  5 09:40 tty38
crw--w----  1 root tty       4,  39 Nov  5 09:40 tty39
crw--w----  1 root tty       4,   4 Nov  5 09:40 tty4
crw--w----  1 root tty       4,  40 Nov  5 09:40 tty40
crw--w----  1 root tty       4,  41 Nov  5 09:40 tty41
crw--w----  1 root tty       4,  42 Nov  5 09:40 tty42
crw--w----  1 root tty       4,  43 Nov  5 09:40 tty43
crw--w----  1 root tty       4,  44 Nov  5 09:40 tty44
crw--w----  1 root tty       4,  45 Nov  5 09:40 tty45
crw--w----  1 root tty       4,  46 Nov  5 09:40 tty46
crw--w----  1 root tty       4,  47 Nov  5 09:40 tty47
crw--w----  1 root tty       4,  48 Nov  5 09:40 tty48
crw--w----  1 root tty       4,  49 Nov  5 09:40 tty49
crw--w----  1 root tty       4,   5 Nov  5 09:40 tty5
crw--w----  1 root tty       4,  50 Nov  5 09:40 tty50
crw--w----  1 root tty       4,  51 Nov  5 09:40 tty51
crw--w----  1 root tty       4,  52 Nov  5 09:40 tty52
crw--w----  1 root tty       4,  53 Nov  5 09:40 tty53
crw--w----  1 root tty       4,  54 Nov  5 09:40 tty54
crw--w----  1 root tty       4,  55 Nov  5 09:40 tty55
crw--w----  1 root tty       4,  56 Nov  5 09:40 tty56
crw--w----  1 root tty       4,  57 Nov  5 09:40 tty57
crw--w----  1 root tty       4,  58 Nov  5 09:40 tty58
crw--w----  1 root tty       4,  59 Nov  5 09:40 tty59
crw--w----  1 root tty       4,   6 Nov  5 09:40 tty6
crw--w----  1 root tty       4,  60 Nov  5 09:40 tty60
crw--w----  1 root tty       4,  61 Nov  5 09:40 tty61
crw--w----  1 root tty       4,  62 Nov  5 09:40 tty62
crw--w----  1 root tty       4,  63 Nov  5 09:40 tty63
crw--w----  1 root tty       4,   7 Nov  5 09:40 tty7
crw--w----  1 root tty       4,   8 Nov  5 09:40 tty8
crw--w----  1 root tty       4,   9 Nov  5 09:40 tty9
crw-rw----  1 root dialout 204,  64 Nov  5 16:26 ttyAMA0
crw-rw----  1 root dialout 204,  74 Nov  5 15:18 ttyAMA10
crw-------  1 root root      5,   3 Nov  5 09:40 ttyprintk
crw-------  1 root root     10, 239 Nov  5 09:40 uhid
crw-------  1 root root     10, 223 Nov  5 09:40 uinput
crw-rw-rw-  1 root root      1,   9 Nov  5 09:40 urandom
drwxr-xr-x  3 root root          60 Nov  5 09:40 v4l
crw-rw----  1 root video    10, 125 Nov  5 09:40 vcio
crw-------  1 root root    246,   0 Nov  5 09:40 vc-mem
crw-rw----  1 root tty       7,   0 Nov  5 09:40 vcs
crw-rw----  1 root tty       7,   1 Nov  5 09:40 vcs1
crw-rw----  1 root tty       7,   2 Nov  5 09:40 vcs2
crw-rw----  1 root tty       7,   3 Nov  5 09:40 vcs3
crw-rw----  1 root tty       7,   4 Nov  5 09:40 vcs4
crw-rw----  1 root tty       7,   5 Nov  5 09:40 vcs5
crw-rw----  1 root tty       7,   6 Nov  5 09:40 vcs6
crw-rw----  1 root tty       7, 128 Nov  5 09:40 vcsa
crw-rw----  1 root tty       7, 129 Nov  5 09:40 vcsa1
crw-rw----  1 root tty       7, 130 Nov  5 09:40 vcsa2
crw-rw----  1 root tty       7, 131 Nov  5 09:40 vcsa3
crw-rw----  1 root tty       7, 132 Nov  5 09:40 vcsa4
crw-rw----  1 root tty       7, 133 Nov  5 09:40 vcsa5
crw-rw----  1 root tty       7, 134 Nov  5 09:40 vcsa6
crw-rw----  1 root tty       7,  64 Nov  5 09:40 vcsu
crw-rw----  1 root tty       7,  65 Nov  5 09:40 vcsu1
crw-rw----  1 root tty       7,  66 Nov  5 09:40 vcsu2
crw-rw----  1 root tty       7,  67 Nov  5 09:40 vcsu3
crw-rw----  1 root tty       7,  68 Nov  5 09:40 vcsu4
crw-rw----  1 root tty       7,  69 Nov  5 09:40 vcsu5
crw-rw----  1 root tty       7,  70 Nov  5 09:40 vcsu6
crw-------  1 root root     10, 127 Nov  5 09:40 vga_arbiter
crw-------  1 root root     10, 137 Nov  5 09:40 vhci
crw-rw----  1 root kvm      10, 238 Nov  5 09:40 vhost-net
crw-rw----  1 root kvm      10, 241 Nov  5 09:40 vhost-vsock
crw-rw----  1 root video    81,  16 Nov  5 09:40 video19
crw-rw----  1 root video    81,   0 Nov  5 09:40 video20
crw-rw----  1 root video    81,   1 Nov  5 09:40 video21
crw-rw----  1 root video    81,   2 Nov  5 09:40 video22
crw-rw----  1 root video    81,   3 Nov  5 09:40 video23
crw-rw----  1 root video    81,   4 Nov  5 09:40 video24
crw-rw----  1 root video    81,   5 Nov  5 09:40 video25
crw-rw----  1 root video    81,   6 Nov  5 09:40 video26
crw-rw----  1 root video    81,   7 Nov  5 09:40 video27
crw-rw----  1 root video    81,   8 Nov  5 09:40 video28
crw-rw----  1 root video    81,   9 Nov  5 09:40 video29
crw-rw----  1 root video    81,  10 Nov  5 09:40 video30
crw-rw----  1 root video    81,  11 Nov  5 09:40 video31
crw-rw----  1 root video    81,  12 Nov  5 09:40 video32
crw-rw----  1 root video    81,  13 Nov  5 09:40 video33
crw-rw----  1 root video    81,  14 Nov  5 09:40 video34
crw-rw----  1 root video    81,  15 Nov  5 09:40 video35
crw-------  1 root root     10, 130 Nov  5 09:40 watchdog
crw-------  1 root root    248,   0 Nov  5 09:40 watchdog0
crw-rw-rw-  1 root root      1,   5 Nov  5 09:40 zero

Did you ever get a Raspberry Pi 5 to use for testing?

Glad to hear that fixed the issue!

Looks like /dev/serial0 points to /dev/ttyAMA10. But as you said I wanted /dev/ttyAMA0.

Hmm interesting. Thanks for pointing that out. I haven't checked for UART issues on the Pi 5. I may have to change the default device depending on which Pi is used. Using /dev/serial0 seemed like a safe choice, but it seems to be pointing to the wrong device on the Pi 5. At least there's a workaround.

Did you ever get a Raspberry Pi 5 to use for testing?

I did. I'll have to look into what default options make sense for the Pi 5. Based on your forum post I should also update the documentation on how to configure UART since that seems to have changed.

Yeah, I had to kind of bend over backwards to get the GPIOs configured to allow the UART connection over GPIO 14/15. I think that the 3 pin UART connection is still active, and clearly you don't need to disable the Bluetooth connection. This is the only thing I have in my /boot/firmware/config.txt file at this point.
[all]
# Enable UART0 on GPIO 14/15.
dtoverlay=uart0-pi5

I did disable bluetooth services (with sudo systemctl disable hciuart), but I don't actually think that is needed. The raspberry pi 5 has like an extra 4 UART connections, so one is given to bluetooth and doesn't conflict with the GPIO headers being used anymore like they did on the Pi 4.


Prevent uploading multiple duplicates of exact same image in short time

This was commented by Revent in my grant proposal announcement at https://commons.wikimedia.org/wiki/Commons:Village_pump#IEG_proposal:_Improve_Upload_to_Commons_Android_app:

@Misaochan: I have no idea if it has even been addressed, but a minor issue in the past with the mobile apps was editors (presumably unintentionally) uploading 5, 6, or more duplicates of the same image within a couple of minutes, under a numbered series of filenames. A check, of some type, of if the person has previously uploaded the exact same image would be a good thing. (I can't point at an example offhand, since they get speedied quickly). Reventtalk 22:13, 5 March 2016 (UTC)

Do you think this could be fixable @nicolas-raoul ?

I often have the same problems with the desktop uploader as well: I don't remember whether I uploaded that historical picture that I took in 2003, and it is not always easy to find it via categories or upload date.
The best would be to have a API that says whether a picture (identified by its SHA1 hashcode for instance) is already in Commons or not.
Related: http://opendata.stackexchange.com/questions/5279/live-database-of-checksums-of-all-files-on-wikimedia-commons

Oh, that makes sense, thanks! It seems no appropriate API has been found for that yet though?. :( Maybe we could suggest the creation of such an API as a future Outreachy/GSoC project, haha.
Do you think there is any viable shorter-term fix for this? I was thinking of just checking for filepath, but that would not be good since selecting a file doesn't mean it's uploaded, it will only be uploaded if they pass the title/desc screen.

Yes, no API found. Asking on Commons would increase the chances of finding, though.
If no API is available, a local persistent database of checksums could be better than nothing.

I'll try to ask at the Village Pump. :)

@nicolas-raoul I received two answers from my post at the village pump https://commons.wikimedia.org/wiki/Commons:Village_pump#March_09 :

https://commons.wikimedia.org/w/api.php?action=query&list=allimages&aisha1=801957214aba50cb63bb6eb1b0effa50188900ba
https://commons.wikimedia.org/wiki/Commons:User_scripts/File_Analyzer

The first one seems fairly straightforward - we query the API for the hashcode and if it returns null then the picture is original, if it returns a result then the picture is a duplicate, right? What do you think of using the first one?
The second one might be good but I don't know if the browser-based tool can be used via API, I'd have to ask him.

Also, what would be the best response if a duplicate pic is detected? I'm thinking that when they try to proceed from the title/desc screen (upload only starts after you proceed to categorization screen), we warn them that this picture is a duplicate and ask if they want to continue?
Or should we not give them that option and say "Sorry, this pic already exists, try uploading a different one"? But that would depend on how failsafe the API above is. There might be some false positives, which would prevent uploading of original pics.

Ideally for time efficiency, we should start checking right after the title/description screen has loaded, and show a popup saying "Sorry this picture has already been uploaded".
There are no false positives.  3.4*10^−39 to be exact.

Ah, okay, so we want to interrupt as soon as we can, then? And the user should only be able to click 'OK' and go back to the main screen?
I think I might alter my proposal draft to include this functionality, do you think 40 hrs is sufficient for it?

The API already exists and a single toast+activity change are required, so with exception handling (skip the check if any exception happen) and testing 40 hours should be well enough, I think :-)

Great, thanks! :)

Done. I strongly feel that we should use a 'soft warning' first - the user is able to choose to proceed if they really want to. After this feature has been released for a while and there are no bugs found, then maybe we could switch to a 'hard warning' that doesn't allow the user to proceed. But I don't want to do this before it has been live tested for a while, because I worry that there might be bugs that label a file as 'existing' when it doesn't.