GET http://localhost:8090/v2/network/information returns 500 on mainnet while wallet is syncing through Byron era.

Context

Information
-

Version
2020.7.6 (git revision: 93c177b179fc4fc500858ebfbbf4ed7ecfc2c6bc)

Platform
Linux

Installation
From source

Steps to Reproduce

Start cardano-wallet-shelley on mainnet. (https://hydra.iohk.io/build/3627080/download/1/index.html)
While it is syncing (and also after it is synced, but still before HF) query

GET http://localhost:8090/v2/network/information

Expected behavior
Information is available.
Actual behavior
The response was:
Code = 500,
Message = Something went wrong

in the log there is:
[cardano-wallet.network:Critical:206] [2020-07-27 13:54:16.34 UTC] Time interpreter queried past the horizon. This should not have happened.
Query is:
sqBind qBind QBind QBind QBind QAbsToRelEpoch EpochNo {unEpochNo = 208}
tHorizon [("runQuery",SrcLocEras are:
EraSummary {eraStart = Bound {boundTime = RelativeTime {getRelativeTime = 0s}, boundSlot = SlotNo {unSlotNo = 0}, boundEpoch = EpochNo {unEpochNo = 0}}, eraEnd = EraEnd (Bound {boundTime = RelativeTime {getRelativeTime = 89856000s}, boundSlot = SlotNo {unSlotNo = 4492800}, boundEpoch = EpochNo {unEpochNo = 208}}), eraParams = EraParams {eraEpochSize = EpochSize {unEpochSize = 21600}, eraSlotLength = SlotLength {getSlotLength = 20s}, eraSafeZone = StandardSafeZone 4320 NoLowerBound}}
CallStack (from HasCallStack):
  runQuery, called at src/Ouroboros/Consensus/HardFork/History/Qry.hs:302:44 in ouroboros-consensus-<IP_ADDRESS>-GJeJBwzkEl7AcixwXFgXER:Ouroboros.Consensus.HardFork.History.Qry
  interpretQuery, called at src/Cardano/Wallet/Primitive/Slotting.hs:309:26 in cardano-wallet-core-2020.7.6-AamOEQSEhy42ld6T94mTEW:Cardano.Wallet.Primitive.Slotting
  runQuery, called at src/Cardano/Wallet/Primitive/Slotting.hs:275:27 in cardano-wallet-core-2020.7.6-AamOEQSEhy42ld6T94mTEW:Cardano.Wallet.Primitive.Slotting
  mkTimeInterpreter, called at src/Cardano/Wallet/Shelley/Network.hs:456:60 in cardano-wallet-shelley-2020.7.6-2hcgUDLMQFX1xdHvgaYBva:Cardano.Wallet.Shelley.Network
  _timeInterpreterQuery, called at src/Cardano/Wallet/Shelley/Network.hs:307:33 in cardano-wallet-shelley-2020.7.6-2hcgUDLMQFX1xdHvgaYBva:Cardano.Wallet.Shelley.Network
  timeInterpreter, called at src/Cardano/Wallet/Network.hs:153:7 in cardano-wallet-core-2020.7.6-AamOEQSEhy42ld6T94mTEW:Cardano.Wallet.Network

Resolution

Two separate problems:

Even when synced, in Byron, it returns 500
When un-synced it returns 500

Explanation:

We use startTime =<< firstSlotInEpoch (e + 1) to get the time of the next epoch. This is just outside the horizon.
We throw if we can't get the network_tip or next_epoch.

Solution:

Get the end time of the current epoch, instead of the start time of the next one
Don't throw. Make network_tip and next_epoch optional

QA
Tested manually on mainnet.
When not in sync:
$ cardano-wallet-shelley network information
Ok.
{
    "node_tip": {
        "height": {
            "quantity": 2298589,
            "unit": "block"
        },
        "epoch_number": 106,
        "slot_number": 10480
    },
    "sync_progress": {
        "status": "syncing",
        "progress": {
            "quantity": 51.26,
            "unit": "percent"
        }
    }
}

When in sync:
{
    "network_tip": {
        "epoch_number": 207,
        "slot_number": 15728
    },
    "node_tip": {
        "height": {
            "quantity": 4484639,
            "unit": "block"
        },
        "epoch_number": 207,
        "slot_number": 15728
    },
    "sync_progress": {
        "status": "ready"
    },
    "next_epoch": {
        "epoch_start_time": "2020-07-29T21:44:51Z",
        "epoch_number": 208
    }

Should be solved by #1943

lgtm


Docker Build Task 1.181.0 Fails

Question, Bug, or Feature?
Type: Bug
Enter Task Name: Docker
specifically Docker V1
Environment

Server - Azure Pipelines or TFS on-premises?

Azure Pipelines

Agent - Hosted or Private:

Private
Issue Description
Starting: Build an image
==============================================================================
Task         : Docker
Description  : Build, tag, push, or run Docker images, or run a Docker command
Version      : 1.181.0
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/build/docker
==============================================================================
/usr/bin/docker build -f /builds/agent1/88/s/Dockerfile --label com.azure.dev.image.system.teamfoundationcollectionuri=https://dev.azure.com/redacted/ --label com.azure.dev.image.build.sourceversion=853b29c5907238a26f07bbabbb1656ea11fb5d13  -t redacted.azurecr.io/redacted/redacted-web:1.0.2-165822 /builds/agent1/88/s
"docker build" requires exactly 1 argument.
See 'docker build --help'.

Usage:  docker build [OPTIONS] PATH | URL | -

Build an image from a Dockerfile
##[error]"docker build" requires exactly 1 argument.
##[error]See 'docker build --help'.
##[error]Usage:  docker build [OPTIONS] PATH | URL | -
##[error]Build an image from a Dockerfile
##[error]The process '/usr/bin/docker' failed with exit code 1
Finishing: Build an image

Note that we are using version 1.181.0 of the task.  A few hours ago we were using version 1.177.0 of the task and it worked fine.
Here's the successful build from 6 hours ago:
Starting: Build an image
==============================================================================
Task         : Docker
Description  : Build, tag, push, or run Docker images, or run a Docker command
Version      : 1.177.0
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/build/docker
==============================================================================
/usr/bin/docker build -f /builds/agent1/27/s/Dockerfile --label com.azure.dev.image.system.teamfoundationcollectionuri=https://dev.azure.com/redacted/ --label com.azure.dev.image.build.sourceversion=ee1c000f6fcb80a9611a6e654c0b3b4612ed1251 -t redacted.azurecr.io/redacted/redacted-notifications:0.0.1-165737 /builds/agent1/27/s
Sending build context to Docker daemon  72.28MB

Step 1/7 : FROM mcr.microsoft.com/dotnet/core/aspnet:3.1
3.1: Pulling from dotnet/core/aspnet
.....

1.177.0 seemed to be working fine.
If I manually run the docker build command as shown in the failed task, it runs fine.
I've switched to Docker@2 and everything is fine now.

This may be related to an issue I'm having.  It appears that the tag source is injecting a tag for the working path of the build, which is adding a space to the tag, and causing docker to choke.
Take, for example:
/usr/bin/docker build -f /home/vsts/work/1/s/Dockerfile --label com.azure.dev.image.system.teamfoundationcollectionuri=https://dev.azure.com/CertifID/ --label com.azure.dev.image.build.sourceversion=b1e056b8fcbcff87e398b1b05581b405a6aa9561 --build-arg CERTIFID_GIT_USER=ipointer-certifid --build-arg CERTIFID_GIT_PAT=*** -t ***/certifidhomeroom:185 -t ***/certifidhomeroom:latest -t ***/certifidhomeroom: /home/vsts/work/1/s
##[error]invalid argument "***/certifidhomeroom:" for "-t, --tag" flag: invalid reference format

Notice the space between that last tag's prefix, and the work location ☝ .
For reference, the relevant part of my YML:
    - task: Docker@2
      displayName: Build HR & Vnts Img
      inputs:
        containerRegistry: '$(dockerRegistryServiceConnection)'
        repository: '$(imageRepository)'
        command: 'build'
        Dockerfile: '**/Dockerfile'
        tags: '$(tag)'
        arguments: '--build-arg CERTIFID_GIT_USER=$(CERTIFID_GIT_USER) --build-arg CERTIFID_GIT_PAT=$(CERTIFID_GIT_PAT)'

This may be related to an issue I'm having.  It appears that the tag source is injecting a tag for the working path of the build, which is adding a space to the tag, and causing docker to choke.
Take, for example:
/usr/bin/docker build -f /home/vsts/work/1/s/Dockerfile --label com.azure.dev.image.system.teamfoundationcollectionuri=https://dev.azure.com/CertifID/ --label com.azure.dev.image.build.sourceversion=b1e056b8fcbcff87e398b1b05581b405a6aa9561 --build-arg CERTIFID_GIT_USER=ipointer-certifid --build-arg CERTIFID_GIT_PAT=*** -t ***/certifidhomeroom:185 -t ***/certifidhomeroom:latest -t ***/certifidhomeroom: /home/vsts/work/1/s
##[error]invalid argument "***/certifidhomeroom:" for "-t, --tag" flag: invalid reference format

Notice the space between that last tag's prefix, and the work location ☝ .
For reference, the relevant part of my YML:
    - task: Docker@2
      displayName: Build HR & Vnts Img
      inputs:
        containerRegistry: '$(dockerRegistryServiceConnection)'
        repository: '$(imageRepository)'
        command: 'build'
        Dockerfile: '**/Dockerfile'
        tags: '$(tag)'
        arguments: '--build-arg CERTIFID_GIT_USER=$(CERTIFID_GIT_USER) --build-arg CERTIFID_GIT_PAT=$(CERTIFID_GIT_PAT)'

@bitva77 Can you share that part of the pipeline which is using DockerV1?

@bitva77 Can you share that part of the pipeline which is using DockerV1?

steps:
- task: Docker@1
  displayName: 'Build an image copy'
  inputs:
    azureSubscriptionEndpoint: 'redacted'
    azureContainerRegistry: redacted.azurecr.io
    command: build
    arguments: '$(docker-build-arguments)'
    imageName: 'web/$(app-name):$(version)-$(BUILD.BUILDNUMBER)'
  enabled: false

steps:
- task: Docker@1
  displayName: 'Build an image copy'
  inputs:
    azureSubscriptionEndpoint: 'redacted'
    azureContainerRegistry: redacted.azurecr.io
    command: build
    arguments: '$(docker-build-arguments)'
    imageName: 'web/$(app-name):$(version)-$(BUILD.BUILDNUMBER)'
  enabled: false

Thanks, could you also share the debug logs? From the command in failure and success scenarios I don't see any difference at all. Also, can you confirm if any of the inputs given to the task as variable are null? (This includes $(docker-build-arguments), $(app-name) etc.)

Thanks, could you also share the debug logs? From the command in failure and success scenarios I don't see any difference at all. Also, can you confirm if any of the inputs given to the task as variable are null? (This includes $(docker-build-arguments), $(app-name) etc.)

Closing stale issue. Feel free to reopen the issue if the problem is still there. (We have fixed the issue in DockerV2)


router with redux

should i connect every smart component  that applying with route, i'm not clear about redux with react-router,   how i handle every component using redux

Could you clarify the question?

yeah, i have modify the issue! it just i am not clear about using redux in react-router!

It certainly can make sense to connect your handler components for React Router routes. you can also perhaps connect a component or multiple components further down the route handler component tree, it's really up to you in terms of where the proper factoring is.

Please see https://github.com/rackt/redux/tree/master/examples/real-world for a Redux example with React Router.


merge from arlac77/npm-package-template

package.json

chore(package<EMAIL_ADDRESS>chore(scripts): cover@#overwrite c8 -x 'tests/**/*.mjs' --temp-directory build/tmp ava && c8 report -r lcov -o build/coverage --temp-directory build/tmp
chore(engines<EMAIL_ADDRESS>chore(package): set $.ava.require='esm' as in template
chore(package): set $.ava.files='tests/*-test.mjs' as in template
chore(package): set $.ava.extensions='mjs' as in template

.travis.yml

chore(travis): remove node versions 10.16.1,12.7.0
chore(travis): add node versions -10,-11,-12,10.16.2,12.8.0

Coverage decreased (-0.05%) to 61.432% when pulling fccf22d11f3512e63ebf58300fe171a984d6c8db on npm-template-sync/1 into 8bde2d3e10aa71f859d2597d58c29f3bb6f264f2 on master.

:tada: This PR is included in version 8.1.85 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


0.13.0 breaks react-hot-loader

I'm using React.createClass, Radium and<EMAIL_ADDRESS>like follows:
var React = require("react");
var Radium = require("radium");

var SearchInput = React.createClass({

    getStyles: function() {
        const styles = {
            base: {
                backgroundColor: "red",
            },
        };

        return [
            styles.base,
        ];
    },

    render: function() {
        return (
            <div style={this.getStyles()}>
                Hello Radium
            </div>
        );
    }

});

module.exports = Radium(SearchInput);

When I updated to v0.13.0, hot updates to components using Radium stopped working. It was working with v0.12.1 before. This is a pretty big as all my styles are done with Radium and this now stops me from seeing the effect of my code changes.

Hmm, react-hot-loader seems to work fine when using decorators and ES2015 class syntax. Might be something specific to createClass?

I was not aware of the fact that it was Radium's implementation broke hot reloader. But I can confirm that our hot reloading is no longer working either.

@epsitec, are you using createClass or classes?

As another anecdote-- hot-loader is working fine for me on a current project using decorator syntax with ES2015 classes.

Hotloader + ES5 + Radium 0.13.0 is a no-go for me right now... downgraded to 0.12.2 and things are peachy again.

We are using createClass but the issue might not be related to Radium. I still have to nail it down, as we have another layer also wrapping the React classes before passing them down to Radium.

could it be when combining Radium and PureRenderMixin? @epsitec is that what your extra wrapping layer does?

No PureRenderMixin in our case. We are using the code found here

@ianobermiller I'm using my master branch and this no longer seems to be an issue.

Hmm, maybe I was a little hasty there, updates to styles works, but adding new functions and calling them in render doesn't work.

OK, so that seems to be the issue, any change in a function other than render doesn't get picked up. @epsitec, @reinman are you using functions to retrieve your styles?
As soon as I put styles in object literals straight into the JSX, the hot loading works again

This might be a general issue with Higher Order Components and hot
reloading then. @gaearon, have you seen any issues in this realm?
On Wed, Jul 8, 2015 at 1:40 PM Bob Renwick<EMAIL_ADDRESS>wrote:

OK, so that seems to be the issue, any change in a function other than
render doesn't get picked up. @epsitec https://github.com/epsitec,
@reinman https://github.com/reinman are you using functions to retrieve
your styles?
As soon as I put styles in object literals straight into the JSX, the hot
loading works again
—
Reply to this email directly or view it on GitHub
https://github.com/FormidableLabs/radium/issues/219#issuecomment-119562971
.

Components wrapped in HOCs will lose their state on hot reload with the current implementation. I plan to solve this eventually with a Babel plugin.
However hot reloading should still generally work with HOCs—it's just that the state is lost. If it does not work, I'd appreciate somebody forking https://github.com/gaearon/react-hot-boilerplate and adding Radium there so I can reproduce the issue and take a look.

@gaearon great talk at ReactEurope by the way. It was easily the most exciting thing I've seen since I started playing around with React!
I've forked your hot boilerplate, added Radium and converted App to use React.createClass here https://github.com/bobbyrenwick/react-hot-boilerplate/tree/test-radium-hoc. If you change the color from 'red' to 'blue' you'll notice no change. But if you remove the Radium wrapper it will work.

@bobbyrenwick :trophy:

Hey, thanks so much. I'll look into this soon.

I looked into this.
React Hot Loader does not support replacing inherited methods. It only works with “top-level” prototype methods. The use case was so rare (people rarely inherit components and then change inherited methods) so I never implemented that.
It is also very hard to implement correctly. Inherited components need to maintain correct super method references, so now we need to proxy each prototype in chain and remember which proxied methods correspond to which prototype. Much more difficult than what RHL normally does.
So, the issue is that, instead of wrapping the inner component as a higher-order component, Radium actually inherits from it and thus hides its methods. Some possible ways to fix it:

Make Radium a real HOC
Change Radium to manually copy user-defined methods to the exported prototype
Export the unwrapped class manually in every file using Radium

I'm not sure there's anything I can do in RHL to help fix this.

The third one is an ugly (but totally usable) work around for now: you can replace
module.exports = Radium(App);

with
module.exports = Radium(App);
module.exports.App = App;

and be happy for now.
Even moreso, if you're not using ES6, you can actually put the original component in statics of the Radium-generated wrapper, and it will “just work” for ES5 code.

@gaearon thanks greatly for looking into this!
Option 2 ("Change Radium to manually copy user-defined methods to the exported prototype") isn't so bad, and we could only do it dev mode in the presence of hot loading if we wanted.
Not sure if Radium can be a true HOC (rendering the inner) since it depends on mucking with the rendered elements.

I think it should also work if instead of subclassing you do something like
let { componentWillReceiveProps } = ComposedComponent.prototype;
ComposedComponent.prototype.componentWillReceiveProps = function () {
  if (componentWillReceiveProps) {
    componentWillReceiveProps.apply(this, arguments);
  }
  // ...
}

// other methods same way

This final option looks pretty clean to me @gaearon! @ianobermiller that way we can remove the IE < 10 __proto__ hacks too.

Funny enough that is basically what the old createClass code did. I think hot loading is important enough that I'd be ok with this implementation. Should be slightly faster as well.
One downside is that Radium would mutate the class you pass into it instead of returning a new class. This may not be a real problem, but something to keep in mind. Definitely a breaking change, since Radium(MyComponent) now has a different meaning.

Fixed in #255


radvd: Fix ar not found when cross-compiling

Motivation for this change
Makefile of radvd assumes that AR is ar, but it is not the case when cross compiling. Using a make flag of AR=$AR to fix this.
Not using makeFlags because this $AR comes from an environment variable.
Things done

[X] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[X] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[ ] Fits CONTRIBUTING.md.

Could you instead set it using the Nix syntax?
  makeFlags = [
    "AR=$AR"
  ];

Could you instead set it using the Nix syntax?
  makeFlags = [
    "AR=$AR"
  ];

This usually works in Nix:
  makeFlags = [ "AR=$(AR)" ];

I have updated the patch to use what @SuperSandro2000 suggested.


Desktop notifications

https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API
Could emit desktop notifications for events:

EC2 Cluster

provisioned, running, or error

Cluster

error

Simulation/Taskflow

running, error

duplicate of #76


Beta-test feedback: meaning of GSS

what is the definition of GSS?

FWIW GSS stands for Government Statistical Services. ONS documentation of the structure and allocation of GSS geography codes and related policies can be found at:
https://geoportal.statistics.gov.uk/Docs/Coding_and_Naming_Policy_for_UK_Statistical_Geographies.zip
and
https://geoportal.statistics.gov.uk/Docs/GSS_Geography_Policy_V2_(Mar_2015).zip
The former is probably a more useful read.
HTH

@MalcolmShazell to add the appropriate documentation to the help page

Thanks @skwlilac. It wasn't that we didn't know the answer: the feedback from the user was that the column on the download spreadsheet doens't explain what a GSS code is. The resolution is that we're going to make it clear in the help file. Sorry for not adding more context!

We have a help file now, but there wasn't time to document all of the features. So specifically the meaning of a GSS code in the CSV download is not explained.

No one has complained - I suspect users are more likely to google 'gss code' than look in our help file


add new card for prescriber forms

crd will now return two cards for turalio, with one specifically for prescriber enrollment/knowledge assessment forms.

@KeeyanGhoreshi @smalho01 hey guys, I left the Mcode team on GitHub so not sure if that’s where autobot is pulling from but it’s still assigning me PRs so if there is anything else you have to do to update the bot I would greatly appreciate it ❤

@kierk Sorry about that, I'll go through the repositories and remove you so you dont get spammed with auto assigns


fix: text disappear before modal closure

Details

Text disappears before modal closure when scanning an invalid file
Fixed Issues

$ https://github.com/Expensify/App/issues/27274
PROPOSAL: https://github.com/Expensify/App/issues/27274#issuecomment-1716125003
Tests

Open a chat
Navigate to "Request money" > "Scan"
Attempt to upload a text file or incorrect file
Click on the "Close" button
Verify that the modal closes without any text briefly disappearing first

[x] Verify that no errors appear in the JS console

Offline tests

QA Steps

Open a chat
Navigate to "Request money" > "Scan"
Attempt to upload a text file or incorrect file
Click on the "Close" button
Verify that the modal closes without any text briefly disappearing first

[x] Verify that no errors appear in the JS console

PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[x] Android / native
[x] Android / Chrome
[x] iOS / native
[x] iOS / Safari
[x] MacOS / Chrome / Safari
[x] MacOS / Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If a new component is created I verified that:

[x] A similar component doesn't exist in the codebase
[x] All props are defined accurately and each prop has a /** comment above it */
[x] The file is named correctly
[x] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[x] The only data being stored in the state is data necessary for rendering and nothing else
[x] If we are not using the full Onyx data that we loaded, I've added the proper selector in order to ensure the component only re-renders when the data it is using changes
[x] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[x] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[x] All JSX used for rendering exists in the render method
[x] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
[x] I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos

Web
https://github.com/Expensify/App/assets/129500732/2ce834a2-e251-40f6-97da-286f17cdff6a

Mobile Web - Chrome
https://github.com/Expensify/App/assets/129500732/253c622f-d81d-47fd-9436-bee942646e5f

Mobile Web - Safari
https://github.com/Expensify/App/assets/129500732/1b1f9f9e-5bdc-4662-8b4e-21c75ccee180

Desktop
https://github.com/Expensify/App/assets/129500732/99b41d30-18e2-46ed-8bd3-c6f9508449fc

iOS

Android

Reviewer Checklist

[ ] I have verified the author checklist is complete (all boxes are checked off).
[ ] I verified the correct issue is linked in the ### Fixed Issues section above
[ ] I verified testing steps are clear and they cover the changes made in this PR

[ ] I verified the steps for local testing are in the Tests section
[ ] I verified the steps for Staging and/or Production testing are in the QA steps section
[ ] I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[ ] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)

[ ] I checked that screenshots or videos are included for tests on all platforms
[ ] I included screenshots or videos for tests on all platforms
[ ] I verified tests pass on all platforms & I tested again on:

[ ] Android / native
[ ] Android / Chrome
[ ] iOS / native
[ ] iOS / Safari
[ ] MacOS / Chrome / Safari
[ ] MacOS / Desktop

[ ] If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
[ ] I verified proper code patterns were followed (see Reviewing the code)

[ ] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
[ ] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[ ] I verified that comments were added to code that is not self explanatory
[ ] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[ ] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
[ ] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[ ] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[ ] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[ ] I verified the JSDocs style guidelines (in STYLE.md) were followed

[ ] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[ ] I verified that this PR follows the guidelines as stated in the Review Guidelines
[ ] I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
[ ] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[ ] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[ ] If a new component is created I verified that:

[ ] A similar component doesn't exist in the codebase
[ ] All props are defined accurately and each prop has a /** comment above it */
[ ] The file is named correctly
[ ] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[ ] The only data being stored in the state is data necessary for rendering and nothing else
[ ] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[ ] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[ ] All JSX used for rendering exists in the render method
[ ] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[ ] If any new file was added I verified that:

[ ] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[ ] If a new CSS style is added I verified that:

[ ] A similar style doesn't already exist
[ ] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)

[ ] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[ ] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[ ] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[ ] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[ ] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[ ] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
[ ] I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Web

Mobile Web - Chrome

Mobile Web - Safari

Desktop

iOS

Android

@dukenv0307 Please clarify the third test step Attempt to upload a text file or incorrect file to state that it should be smaller than 240 bytes. Thanks!

Just noting here too that I've tested on iOS native by selecting a tiny PNG (<240 bytes) from the gallery, but no file size validation seemed to run. I don't think that's related to the changes here and think adding validation would be OOS for this PR.
Since there's no validation running for native, I've just done a basic test of taking a photo/scan and submitting it.

@dukenv0307 For native can you just make a recording showing the normal flow (take a picture to scan)? This just validates that nothing in your changes breaks native behaviour.
Also can you update the test steps according to this comment. Thanks!

@dukenv0307 Great, thanks! Can you also update the test steps according to https://github.com/Expensify/App/pull/27635#issuecomment-1723633247.

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

🚀 Deployed to production by https://github.com/thienlnam in version: 1.3.72-11 🚀

platform
result

🤖 android 🤖
failure ❌

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


Create an API for a NoSQL Database

#User Story
AS A social media startup
I WANT an API for my social network that uses a NoSQL database
SO THAT my website can handle large amounts of unstructured data
##Acceptance Criteria
GIVEN a social network API
WHEN I enter the command to invoke the application
THEN my server is started and the Mongoose models are synced to the MongoDB database
WHEN I open API GET routes in Insomnia for users and thoughts
THEN the data for each of these routes is displayed in a formatted JSON
WHEN I test API POST, PUT, and DELETE routes in Insomnia
THEN I am able to successfully create, update, and delete users and thoughts in my database
WHEN I test API POST and DELETE routes in Insomnia
THEN I am able to successfully create and delete reactions to thoughts and add and remove friends to a user’s friend list

completed


Cleanup doc folder

The doc folder contains a seemingly (to me only?) random collection of files, that are a bit hard to get the hang of without a README.md in that folder.

True. I guess I can remove them from the repository and keep them locally on my machine. Will do that.


Address/respond to StackOverflow questions

Relevant questions (https://stackoverflow.com/questions/tagged/sdmx) include:

[x] How can i access ECB Dataflow? TooManyRedirects: Exceeded 30 redirects
[x] Creating a file containing SDMX
[x] python parse xml files from eurostat sdmx
[x] SDMX-Json Parsing - No Time_Period problem - OECD Dataset python extract —requires #83/2.5.0
[ ] Using Python / pandaSDMX to process & upload to Postgresql
[x] pandasdmx: sdmx.Request leading to SSL Error - bad handshake

[ ] Formulating correct API call to retrieve WITS data in R
[ ] How to transform JSON International Financial Statistics into pandas data frame


Fixed broken link to DevTest Labs in the enterprise

Before selecting the "Create pull request" button:

Enter a meaningful title above^, using a prefix if necessary and keywords "New" or "Update" indicating the nature of changes.

Describe the summary, scope, and intent of this PR:
Fixed a broken link in the Related Resources section.

Insert links(s) to any related work item(s) or supporting detail:
NA

AFTER YOUR PR HAS BEEN CREATED, expand this section for tips and additional instructions.
These are common guidelines for contributions across the repos managed by the Cloud Architecture Content Team (CACT). Some repositories may have additional specific requirements that are not listed here.
Guidance for all contributors

Topic
Guidance

Draft PR
If your PR will be a work-in-progress for more than a day or two, select the Convert to draft link in the upper right of the page (under Reviewers) to change it to a draft. For future reference, you can also do this using the Create pull request button drop-down during PR creation.

ms.date metadata
Don't update an article's "ms.date" metadata property unless you've done a full freshness review of the content. A full freshness review includes changes required to correct or improve the full technical accuracy of the article.Don't update "ms.date" if you're doing targeted changes to improve non-technical aspects of the article, such as editorial quality, art improvements, article template alignment, etc.If you've changed any "ms.date" properties for work that wasn't part of full review for freshness, please reset them to their previous value.

Placement and linking
If you're creating a new article or articles, include updates to the related TOC.yml file to propose where the article(s) should be placed. Also consider other places within the document set where it would be beneficial to cross-reference and link to your new article(s).

PR build
After you open your PR, and for each successive commit that you push to your branch, the publishing platform will run validation on the files in your pull request. A summary of the build results for each file will be inserted inline into your pull request, which includes any build suggestions/warnings/errors. PRs cannot be merged until all build errors and most warnings are resolved.

Publishing
Following a successful merge, most repos publish to the live site at least once per (business) day, usually around 10am Pacific.

Additional resources
Learn.Microsoft.Com contributor guide

Additional guidance for private repos and internal contributors

Topic
Guidance

PR size
If your PR is more than ~5 lines of changes, or you'd like for the changes to go through editorial or larger review, open a contribution request at https://aka.ms/Contribution and include a link to the PR in response #8. Once it's processed, you'll be notified of the next steps.

PR title prefix
Select the Edit button to the right of the PR title if you need to revise it. The following prefixes are reserved for specific contribution types:[Quality Check] - maintenance work related to content quality (edit passes, art improvements, template alignment)[LinkFix] - recurring/adhoc PRs to correct link URLs[Pipeline] - new/updated contributor success pipeline content[WIP] - a work-in-progress draft requiring several days/weeks

PR preview
Following successful build of your PR, publishable files will also include Preview URL links to staged previews of your new/updated articles. Be sure to review these for verification of your intended contributions, or to send to other internal contributors for review.

PR sign-off (public repo)
If an article you own is updated in a public repo PR, you are responsible for sign-off. You will be automatically notified via email. The PR will not be merged until you've had a chance to review and sign-off.

PR sign-off (private repo)
After you've completed your proposed changes, addressed build warnings, and completed all review work, you can begin the sign-off process for review and merge:If your PR is in draft mode, remove "[WIP]" from the title and select Ready for review button at the bottom of the PR.Enter "#sign-off" in a new comment. This comment indicates that you're confident the work meets or exceeds Microsoft's standards for publication, and will trigger the review process.Your PR may be selected for initial review by the CACT. Following CACT review, you may receive questions or requests for additional changes. You should have initial feedback from CACT review within a few business days. If you have an urgent request or need to contact the team, please mention @MicrosoftDocs/cloud-architecture-content-team-pr-reviewers in your PR and someone will get back to you. After CACT review is complete, a CACT #sign-off will be added.Final review/merge is done by the PR review team. The PR team may also respond with feedback, categorized as "Blocking" (requires action from you), or "Non-blocking" (to be addressed in a future PR).

Additional resources
Learn.Microsoft.Com internal contributor guideAuthoring templates: architecture-center-pr, well-architected-prTo contact the CACT use e-mail, or @mention our GitHub team in your PR comments using: @MicrosoftDocs/cloud-architecture-content-team-pr-reviewers

@martinekuan - This PR was opened in the public repo. Did you mean to open this PR in the private repo (architecture-center-pr) instead?

@martinekuan - This PR was opened in the public repo. Did you mean to open this PR in the private repo (architecture-center-pr) instead?

Closing and making the change in the private repo.


Issue with iOS 11

It seems that on iOS 11 beta there is a problem with scrolling through photos. After the first photo, every other is presented on half of the screen, plus with the half of the next one. This occurs most of the time.

Any ideas on how to fix this?

A bit more info:
It seems to me that there is some really strange problem with updateContentOffset function. I'm not sure whether i am doing something wrong or is it a bug, but while trying to debug i print in the console values for let pagewidth and bounds.size.width and this is what i get back:
(lldb) po pageWidth
error: :3:1: error: use of unresolved identifier 'pageWidth'
pageWidth
^~~~~~~~~
(lldb) po bounds.size.width
395.0


Handle cancel signal in case it came on the previous stage

What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #1782
Does this PR introduce a user-facing change?:

NONE

No wonder.
/lgtm

Nice catch!
/approve


"lang" attribute always set to "en" on first page load

We have actually done a lot of things right here. We have included a lang tag on our <html> element, and we are changing it between "en" and "fr" as we change the language using the link at the top of the page.
However, if we load the landing page in French (https://alphasite-main.dev.dts-stn.com/fr), it defaults to lang="en", which is wrong. It should say lang="fr" when we request a french version of the site.
This was also flagged by the HTML validator.

Ok yeah I see what you mean.
My PR here makes it so that when you visit the page, regardless of the locale in the URL you enter, it will check the language you have in localstorage and navigate you to the page with the appropriate locale as well as set the locale for the whole application, which changes the html lang attribute to match.

#86 may address this issue if you would like to confirm it meets our needs @pcraig3. I believe it does.

Closing since #86 is merged

Yup, all good here. Tried the validator again and the error is gone. Thanks @will0684!


Bump cache and delete old caches

@huston007 and @BarryThePenguin, do you mind giving this a look? I'm not sure how to test this... Still feeling pretty noobish on testing service workers...
cc @mxstbr & @jakearchibald - thanks for your help on #1, maybe you can tell me if I'm doing something obviously wrong here...

Note, this is intended to solve #11


Add time zone conversion flag for receivers

This PR centralizes all of the date time logic in the application into a single helper singleton, as well as adds a series of extension methods that allow us to easily convert dates and date times between types and formats as needed.
There are two new fields added to the receiver control date time presentation:

timeZone - which is the receiver's time zone. this is being treated as separate from the batch's time zone since that reflects when batches run, not where the receiver is
dateTimeFormat - which is the format of date time values for the receivers. Valid values include OFFSET, which includes the date time offset, LOCAL, which date and time down to seconds with no offset, HIGH_PRECISION_OFFSET which includes fractional seconds and an offset, and DATE_ONLY which is just the date value with no time output at all

There is also the following flag added to the translation configuration: convertDateTimesToReceiverLocalTime which tells the translator to coerce the date time to the receiver's local time (or UTC if they don't have a time zone assigned).
So if you wanted to have your receiver (say CT) receive data in their local time zone, and the date and date times to be in their local format (meaning not offset):
- name: CT_LOCAL_NO_OFFSET
   externalName: For testing. Local to CT, date times with no offsets.
   organizationName: ignore
   topic: covid-19
   customerStatus: active
   timeZone: EASTERN
   dateTimeFormat: LOCAL
   jurisdictionalFilter: [ "matches(ordering_facility_county, CT_LOCAL_NO_OFFSET)" ]
   translation:
       type: HL7
       useBatchHeaders: true
       convertDateTimesToReceiverLocalTime: true

The reason I added this data to the receiver instead of the organization was one of pragmatism: the receiver is passed into the serializers as the destination which means it is easy to access. Grabbing the information off of the organization would more problematic. The rationale behind putting the convert date time to receiver local time into the translation as a flag is to not have this be the default behavior until we've vetted which jurisdictions want it, and are ready to have it turned on.
Test Steps:

First and foremost you should run gradle test and gradle testIntegration. They should pass
Run Docker and do the complete test suite. Make sure you've updated your settings in the DB to the latest version because the receiver and translation objects have new values
Create a test file for the organizations: ./prime data --input-fake 50 --input-schema primedatainput/pdi-covid-19 --target-states IG --target-counties HL7_BATCH --output-format CSV --output build/datetime-test-file.csv
Submit the file to your local container running ReportStream
Examine the three HL7 batch files created. There will be four, but the fourth one is for a different test. Each file will have a different date time format. One will be converted to Pacific time, and in a local time format with no offset. Another is converted to Pacific time with an offset included. The last one is converted to UTC and uses offset.

Test Files:
Input File is a SimpleReport CSV file for the organizations with date time settings.
datetime-test-file.csv.txt
Result Files have extension .txt to be uploaded but are hl7 files, one for each of the receivers I added.

covid-19-1d63e434-b979-47f5-a44f-9871668b723f-20220329133413.hl7.txt
covid-19-67ffbaba-5778-4bb3-a34f-bae648d5b296-20220329133413.hl7.txt
covid-19-441406de-7893-4b84-8ca7-3054406ffb41-20220329133413.hl7.txt

Changes

Adds the singleton class for date and date time parsing and formatting logic
Refactored or replaced most of the date time logic from other classes into the singleton
Refreshed all the test files to use the newer date time formats
Lots of bug fixes in and around date and date time logic
Lots of tests

Checklist
Testing

[x] Tested locally?
[x] Ran ./prime test or ./gradlew testSmoke against local Docker ReportStream container?
[ ] (For Changes to /frontend-react/...) Ran npm run lint:write?
[x] Added tests?

Fixes

Closes #3677
Closes #3112
Closes #3379
Closes #3518
Closes #4802

Pull reviewers stats
Stats for the last 30 days:

User
Total reviews
Median time to review
Total comments

MauriceReeves-usds
51
51m
19

carlosfelix2
18
7h 43m
35

cwinters-usds
16
4h 41m
11

ahay-agile6
15
3h 56m
7

jimduff-usds
13
11h 32m
15

TomNUSDS
13
1h 34m
36

oslynn
10
1h 3m
4

jorg3lopez
9
1h 18m
5

kevinhaube
8
50m
5

whytheplatypus
7
1h 28m
10

sethdarragile6
7
4h 3m
0

meckila
5
2h 38m
9

rhood23699
5
49m
0

bgantick
4
2h 23m
3

JosiahSiegel
4
16m
1

jbiskie
4
3m
0

TurkeyFried
3
21h 48m
3

brick-green-agile6
3
14h 47m
0

RickHawesUSDS
2
2h 45m
0

jeremy-page
2
18h 53m
1

snesm
2
12h 35m
0

acoushawk
1
16h 10m
0

clediggins-usds
1
17h 4m
2

Pull reviewers stats
Stats for the last 30 days:

User
Total reviews
Median time to review
Total comments

MauriceReeves-usds
58
1h 24m
27

carlosfelix2
22
11h 50m
51

cwinters-usds
20
3h 42m
8

jimduff-usds
19
11h 35m
17

ahay-agile6
16
3h 2m
7

TomNUSDS
16
1h 21m
45

jorg3lopez
12
1h 19m
9

whytheplatypus
11
14h 44m
25

oslynn
11
1h 2m
4

kevinhaube
10
1h 6m
7

sethdarragile6
7
4h 3m
0

brick-green-agile6
6
16h 35m
2

meckila
5
2h 38m
9

jbiskie
5
4m
0

rhood23699
5
47m
0

bgantick
4
2h 23m
3

TurkeyFried
4
22h 56m
2

JosiahSiegel
4
16m
1

snesm
3
22h 43m
0

RickHawesUSDS
2
2h 45m
0

jeremy-page
2
18h 53m
1

acoushawk
1
16h 10m
0

clediggins-usds
1
17h 4m
1

Pull reviewers stats
Stats for the last 30 days:

User
Total reviews
Median time to review
Total comments

carlosfelix2
24
3h 37m
65

MauriceReeves-usds
23
2h 24m
12

whytheplatypus
16
18h 25m
23

jimduff-usds
15
4h 29m
9

kevinhaube
11
50m
7

jorg3lopez
10
1h 19m
5

TomNUSDS
10
1h 30m
78

cwinters-usds
10
1h 39m
5

TurkeyFried
9
1h 26m
2

ahay-agile6
9
1h 8m
0

jbiskie
9
1h 2m
3

sethdarragile6
8
3h 49m
1

oslynn
6
37m
1

brick-green-agile6
6
2h 15m
7

rhood23699
4
1d 15h 28m
0

clediggins-usds
4
7m
0

bgantick
3
2h 27m
3

snesm
3
22h 43m
0

JosiahSiegel
2
43m
0

acoushawk
2
39m
0

meckila
2
8h 26m
9

jh765
2
10h 42m
4

jeremy-page
1
18h 23m
0

Pull reviewers stats
Stats for the last 30 days:

User
Total reviews
Median time to review
Total comments

carlosfelix2
24
3h 38m
65

MauriceReeves-usds
24
2h 11m
12

whytheplatypus
16
18h 25m
23

jimduff-usds
15
4h 29m
9

kevinhaube
12
50m
9

cwinters-usds
11
1h 46m
5

TurkeyFried
10
1h 32m
3

jorg3lopez
10
1h 19m
5

TomNUSDS
10
44m
46

ahay-agile6
9
1h 7m
0

jbiskie
9
1h 2m
3

sethdarragile6
9
3h 4m
2

clediggins-usds
8
16m
0

oslynn
6
37m
1

brick-green-agile6
6
2h 15m
5

rhood23699
4
1d 15h 28m
0

bgantick
3
2h 27m
3

snesm
3
22h 43m
0

jh765
3
2h 41m
8

JosiahSiegel
2
43m
0

acoushawk
2
39m
0

meckila
2
8h 26m
9

jeremy-page
1
18h 23m
0

Pull reviewers stats
Stats for the last 30 days:

User
Total reviews
Time to review
Total comments

TomNUSDS
14
2h 32m
51

cwinters-usds
14
5h 23m
15

carlosfelix2
13
3h 33m
7

MauriceReeves-usds
10
11h 9m
0

brick-green-agile6
9
10h 4m
6

kevinhaube
8
23m
3

jimduff-usds
8
44m
14

jbiskie
8
1h 25m
0

TurkeyFried
7
3h 35m
2

clediggins-usds
7
3h 38m
8

sethdarragile6
6
59m
0

ahay-agile6
5
9m
0

jeremy-page
4
19m
0

oslynn
3
1d 14h 10m
0

RickHawesUSDS
3
3d 8h 47m
4

rhood23699
3
15m
0

snesm
3
16h 35m
3

jh765
3
1h 49m
7

bgantick
2
16m
1

whytheplatypus
1
13m
2

JosiahSiegel
1
2m
0

acoushawk
1
4m
0

Will the Unit test failure affect any other feature that uses DateTime?

I reviewed and tested the PR.  It works well.  Thanks Mo.


Fix disk mapping

Fix matlab mapping in disk example;  add routine to read in plotting parameters.

This PR and the filament example will be combined into a single PR.


[Bug]: privacy approval checkbox missing on registration of new users

What happened?
privacy approval checkbox missing on registration of new users
What did you expect to happen?
system is giving error user needs to approve privacy before registering but there is no checkbox.
Version
3.2.x
What browser are you seeing the problem on?
Chrome
Relevant log output
No response

Hi Guys, any updates on this topic ?
thanks :)

Works fine for me

its missing see screenshot or check for your self->
https://webshop.defrituurhal.nl/register

@sampoyigi

Check you have a page selected under the component settings "Registration Terms"

thanks that did the trick


Alignment Issue in Cloud Storage page

Actions before raising this issue

[X] I searched the existing issues and did not find anything similar.
[X] I read/searched the docs

Steps to Reproduce

The component should be centered from both x axis and y axis, but it is centered only in x axis.
Expected Behavior
The empty component should be center in the center from both the axis
Possible Solution
No response
Context
No response
Environment
No response

Actions before raising this issue

[x]  I searched the existing issues and did not find anything similar.
[x]  I read/searched the docs

Steps to Reproduce

The component should be centered from both x axis and y axis, but it is centered only in x axis.
Expected Behavior
The empty component should be center in the center from both the axis
Possible Solution
No response
Context
No response
Environment
No response

I have a pr for this and it is big I am refactoring the code and will push it just to make sure that both of us dont make the same changes.

@syedbarimanjan did you not create issue?

@syedbarimanjan did you not create issue?

I was about to create it. sorry.

@syedbarimanjan can you please allow me to work on, I have very less pr though

Well I am already done with it i have made other changes also to the emptylist components.

@syedbarimanjan nvm, if you have already done with it, make a pr on this issue itself

@syedbarimanjan but make sure to create issue first and then work on it

@syedbarimanjan nvm, if you have already done with it, make a pr on this issue itself

Yeah i am creating a draft pr as i just found some other problems.

@syedbarimanjan but make sure to create issue first and then work on it

I found some bug In the projects page and will make an issue you can work on that.

@syedbarimanjan sure, thanks

@syedbarimanjan please tag me on those issues


Add a text comment

Hi,
How can I add a text block under the graphic and take it into account in created images ?
Example :

Thanks a lot

@paglop that's not currently possible. It would require a number of features to be implemented to let the chart use less than the full canvas area and then you would need to draw your extra text manually

Best done using the annotation plugin. Tracked in https://github.com/chartjs/chartjs-plugin-annotation/issues/26


Some Open Data Canada item URLs aren't coming out right

Saw one of the gmeta.json dicts keyed as "http://www.cbsa-asfc.gc.ca/menu-eng.html" (title is "Historical Border Wait Times").

This issue has been cleaned up in the source


⚠ Bofrost.es has degraded performance

In 0d9757a, Bofrost.es (https://www.bofrost.es) experienced degraded performance:

HTTP code: 200
Response time: 1694 ms

Resolved: Bofrost.es performance has improved in 0d8c6f6 after 21 minutes.


[stdlib] Ignore argc when setting up CommandLine.arguments

Unfortunately argc and argv are globally accessible and mutable so in some cases these values may be out of sync with each other. This can result in a crash when accessing CommandLine.arguments because if someone stomps on argv and inserts a null within 0 ..< argc but doesn't update argc, we will attempt to read 0 ..< argc number of strings and crash when trying to unwrap one of the c string pointers in the argv array. Lets just ignore argc and manually iterate argv to find argc for ourselves.
Resolves: rdar://130346225 and rdar://129708138

@swift-ci please smoke test

@swift-ci please smoke test

@swift-ci please smoke test Windows

Wait, is unsafeArgv actually mutable? It looks read-only to me—so it should be safe to use argc from the C function. (That said, it's also probably fine for us to stop trying to compute it in the first place since we now guarantee a trailing NULL value, which we didn't historically but which C also guarantees.)

@grynspan not the Swift interface, the actual underlying argc and argv (at least on Darwin)

Oh, right, the underlying pointer isn't owned by Swift. I wonder if we should change that given the inherent concurrency unsafety of it, or perhaps offer a withUnsafeArgvArgc() function that provides a locally stable pointer and count (suitable for passing to posix_spawn() etc.)

C99 §<IP_ADDRESS>.1 ¶2:

The parameters argc and argv and the strings pointed to by the argv array shall be modifiable by the program, and retain their last-stored values between program startup and program termination.

One thing it doesn't mention is that a traditional use of this on UNIX is the ability to change what ps shows for a process by overwriting the string stored at argv[0], and somewhat more unpleasantly, this often runs off the end of the original string and overwrites subsequent argument storage as well.

That's required for C, but I'm talking about Swift API. We can do better!

True, though we need to bear in mind what the underlying situation is, which is why I mention it. Particularly if we're going to try to lazily capture the argument vector, the fact that C code is free to randomly overwrite it as it sees fit is problematic.

I think the crux of what I'm saying is that our API surface should be as reliable as is practical. I don't know if we can do much about somebody smashing argv before Swift can read off a copy (and, short of adding an ultra-high-priority constructor function in the runtime, we probably can't guarantee it.)
But, assuming that modifying argv is rare in library code, and assuming that the main binary is written in Swift, it's probably then safe to assume that the first time CommandLine is used is as good a time as any to clone the current state of argc and argv into immutable memory, at which point it is safe for us to vend that copy out to Swift code. (If some other thread comes in and smashes argv while we're copying it, well, them's the breaks.)


Nodejs project alignment cleanup

first commit moves the "lib" files to an actual lib directory which sort of better aligns with how other nodejs projects do it.
the second commit fixes a jshint error during grunt .
@abstractj mind :eyes:

@lholmquist landed, thank you


Backend for "book exchange hub"

Describe the feature
i can design backend api for submission of book exchance hub form
with proper folder structure
Add ScreenShots

Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSOC'24 contributor
[X] I want to work on this issue

ok , work on the issue . use firebase .


Control the BMS via serial interface

Follow-up: https://github.com/syssi/esphome-jk-bms/issues/19
@diybateriaslifepo4 @rem72

I am in contact with a JK engineer through WECHAT, but they are hard to extract information ... but he told me that the GPS module
they have is capable of controlling the BMS remotely, as a remote control for robberies, from what I understand that it should be
possible to change parameters through the serial port.

@diybateriaslifepo4 We are talking about this value:
https://github.com/syssi/esphome-jk-bms/blob/main/components/jk_modbus/jk_modbus.cpp#L135
If we change the value from 0x03 to 0x02 we simulate a communication between the BMS and a GPS device. It's possible to BMS response differs a bit in this case. In best case the response is the same and commands we issue are executed properly (if the frame source is GPS).

I am trying to get jk me information about this communication, but they insist that I must use their adapter to rs485 and their documentation for communication by rs485, I do not know if you already have it, how could I send it to you?

You could attach the docs here by drag&drop.

BMS CAN instruction.pdf
BMS 485 instruction.pdf

The "BMS 485 instruction.pdf" describes the implemented protocol and doesn't contain new details.

hi, how to write settings via serial? Thanks

This compoent doesn't support write operations right now. It's also unconfirmed it's possible or not.

in the protocol it says RW

@diybateriaslifepo4 We are talking about this value:
https://github.com/syssi/esphome-jk-bms/blob/main/components/jk_modbus/jk_modbus.cpp#L135
If we change the value from 0x03 to 0x02 we simulate a communication between the BMS and a GPS device. It's possible to BMS response differs a bit in this case. In best case the response is the same and commands we issue are executed properly (if the frame source is GPS).

have you been able to try this? I would do it but I don't have much idea about programming... Thanks for your job

I will give it a try but my powerwall isn't assembled at the moment so my feedback / testing will take a few weeks.

ok, there is no rush, in case you don't know you can turn on the bms with a power supply, with about 40v, only putting the negative in b0 & B- and positive in b+, without cells

Any update for such control ? :) ... .Now my JK BMS runs like a charm thanks your component, I would like to see these switch really working.... would be also amazing :)

Any update for such control ? :) ... .Now my JK BMS runs like a charm thanks your component, I would like to see these switch really working.... would be also amazing :)

I have tried to do it and it has not worked, I have tried creating an external component, changing the value to bms, bluetooth, gps and computer, and not able to change values in any way
But maybe I haven't done it correctly, let's hope that Sysssi can test it one of these days.

The switch entities are now able to send some instructions to the BMS:
[switch:017]: 'jk-bms charging' Turning OFF.
[uart_debug:114]: >>> 4E:57:00:14:00:00:00:00:02:02:02:AB:00:00:00:00:00:68:00:00:01:6A
[switch:013]: 'jk-bms charging' Turning ON.
[uart_debug:114]: >>> 4E:57:00:14:00:00:00:00:02:02:02:AB:01:00:00:00:00:68:00:00:01:6B

[switch:017]: 'jk-bms discharging' Turning OFF.
[uart_debug:114]: >>> 4E:57:00:14:00:00:00:00:02:02:02:AC:00:00:00:00:00:68:00:00:01:6B
[switch:013]: 'jk-bms discharging' Turning ON.
[uart_debug:114]: >>> 4E:57:00:14:00:00:00:00:02:02:02:AC:01:00:00:00:00:68:00:00:01:6C

[switch:017]: 'jk-bms balancing' Turning OFF.
[uart_debug:114]: >>> 4E:57:00:14:00:00:00:00:02:02:02:9D:00:00:00:00:00:68:00:00:01:5C
[switch:013]: 'jk-bms balancing' Turning ON.
[uart_debug:114]: >>> 4E:57:00:14:00:00:00:00:02:02:02:9D:01:00:00:00:00:68:00:00:01:5D

[switch:013]: 'jk-bms dedicated charger' Turning ON.
[uart_debug:114]: >>> 4E:57:00:14:00:00:00:00:02:02:02:B3:01:00:00:00:00:68:00:00:01:73
[switch:017]: 'jk-bms dedicated charger' Turning OFF.
[uart_debug:114]: >>> 4E:57:00:14:00:00:00:00:02:02:02:B3:00:00:00:00:00:68:00:00:01:72

Is somebody willing to test the new feature?

Sure I wil ltest right now

Ok ... seems to not working for me :( .... I can see the OFF command sent ... but the switch is returning to its initial state (ON)

Same for me.

I tried whatever the password is entered before or not .... switch control does not work for me...

I talked to the seller of my BMS and he told me the serial interface is read only. :-( I fear it is the truth.

I talked to the seller of my BMS and he told me the serial interface is read only. :-( I fear it is the truth.

Damned :(

I just checked the protocol pdf I got, effectively, we car read
R 0 X 84 The current data 2 Hex 10000 (10000-11000) * 0.01 = 10.00), a (discharge)
(10000-9500) *0.01= 5.00A (charging) P r e c i s i o n 1 0 mAunit:0 1 A
Note: C 0:0 x 01 redefines the 0 x 84 current data in 10 mA, with the highest bit being0"1" means "discharge" and "1" means charge
If the discharge is 20 A, the transmitted data is 2000 (0x 07 D0)
If the charge is 20 A, the transmission data is 34768 (0x 87 D0
in Read only :( :( .... what's a pity. Maybe time to change them into binary sensor so ?

I cannot follow / I didn't understand. Could you rephrase your statement? :-)

I mean if it's only in read only .... no need to define them in switch but more in binary sensors ?

Yes. I will convert the switches into binary sensors soon and yes the sign of the current sensor is inverted for my BMS software/hardware version too. If we are doing breaking changes we can fix/improve this as well.

FYI: https://github.com/syssi/esphome-jk-bms/pull/50

The strange thing is that they told me that the mosfets could be controlled from the gps, and the gps uses the same serial interface...

Do you know the exact product (GPS) I've to buy? As soon we have to devices talking to each other the communication can be captured easily. I've captured the traffic between the bluetooth module and the MCU already. I had the hope the same protocol is used here but it looks like this isn't the case: https://github.com/syssi/esphome-jk-bms/issues/49
Funny thing: The bluetooth password (123456) isn't passed to the MCU at all. It's used to unlock the bluetooth module but it's not part of the traffic between the bluetooth module and the MCU of the BMS.

Do you know the exact product (GPS) I've to buy? As soon we have two devices talking to each other the communication can be captured easily. I've captured the traffic between the bluetooth module and the MCU already. I had the hope the same protocol is used here but it looks like this isn't the case: #49
Funny thing: The bluetooth password (123456) isn't passed to the MCU at all. It's used to unlock the bluetooth module but it's not part of the traffic between the bluetooth module and the MCU of the BMS.

tomorrow I ask the distributor, to see if I can ensure the functions of the GPS, I was going to send one pars test, but he told me that not all the functions would work in Spain, because it is designed to work in China

I asked my seller (HankzorBMS Store) about connecting an GPS/GSM device and he told me I need a customized version of the BMS.

I asked my seller (HankzorBMS Store) about connecting an GPS/GSM device and he told me I need a customized version of the BMS.

Custom firmware ? or also hardware modified ?

In general the seller wants to sell 1000 pieces of a special BMS version. The difference will be the firmware only. I don't think we will receive an alternative/updated firmware ever.

Do you know the exact product (GPS) I've to buy? As soon we have two devices talking to each other the communication can be captured easily. I've captured the traffic between the bluetooth module and the MCU already. I had the hope the same protocol is used here but it looks like this isn't the case: #49
Funny thing: The bluetooth password (123456) isn't passed to the MCU at all. It's used to unlock the bluetooth module but it's not part of the traffic between the bluetooth module and the MCU of the BMS.

sure enough, my dealer is now telling me that the port is read only, sorry 😭

The minimum quantity for customized devices is 100.

The minimum quantity for customized devices is 100.

It's 99 more that I need :) :)  ... Any way are the UVP? UVPR, LVP, LVPR writable ? Coz we could fake  charging/discharging by this way ?

I think UVP, UVPR, LVP and LVPR can be written/controlled via BLE. Whats the goal of faking charging/discharging? I think I didn't get the point.

By setting UVP=UVPR=LVP=LVPR is disabling charging/discharing de facto

No write operations are possible via the serial interface. We have to use BLE to control the device.

Hello Sebastian, will you try to connect the Voltronic inverter to an esp32
that in turn speaks via bluetooth with the jk? Perhaps it's the way to talk
between them.
El jue, 3 mar 2022 a las 19:24, Sebastian Muszynski (<
@.***>) escribió:

No write operations are possible via the serial interface. We have to use
BLE to control the device.
—
Reply to this email directly, view it on GitHub
https://github.com/syssi/esphome-jk-bms/issues/20#issuecomment-1058353364,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AMSOX356EXPMXIPB7VMD72DU6D7WBANCNFSM5IERCEYQ
.
You are receiving this because you were mentioned.Message ID:
@.***>

I've implemented a BLE verison of this component a few days ago:
https://github.com/syssi/esphome-jk-bms/blob/main/esp32-ble-example.yaml
The switches (charging, discharging, balancer) can be controlled already.

I will close this issue because it cannot be solved. I assume we must accept the serial connection is "read-only".

The switch entities are now able to send some instructions to the BMS:
[switch:017]: 'jk-bms charging' Turning OFF.
[uart_debug:114]: >>> 4E:57:00:14:00:00:00:00:02:02:02:AB:00:00:00:00:00:68:00:00:01:6A
[switch:013]: 'jk-bms charging' Turning ON.
[uart_debug:114]: >>> 4E:57:00:14:00:00:00:00:02:02:02:AB:01:00:00:00:00:68:00:00:01:6B

[switch:017]: 'jk-bms discharging' Turning OFF.
[uart_debug:114]: >>> 4E:57:00:14:00:00:00:00:02:02:02:AC:00:00:00:00:00:68:00:00:01:6B
[switch:013]: 'jk-bms discharging' Turning ON.
[uart_debug:114]: >>> 4E:57:00:14:00:00:00:00:02:02:02:AC:01:00:00:00:00:68:00:00:01:6C

[switch:017]: 'jk-bms balancing' Turning OFF.
[uart_debug:114]: >>> 4E:57:00:14:00:00:00:00:02:02:02:9D:00:00:00:00:00:68:00:00:01:5C
[switch:013]: 'jk-bms balancing' Turning ON.
[uart_debug:114]: >>> 4E:57:00:14:00:00:00:00:02:02:02:9D:01:00:00:00:00:68:00:00:01:5D

[switch:013]: 'jk-bms dedicated charger' Turning ON.
[uart_debug:114]: >>> 4E:57:00:14:00:00:00:00:02:02:02:B3:01:00:00:00:00:68:00:00:01:73
[switch:017]: 'jk-bms dedicated charger' Turning OFF.
[uart_debug:114]: >>> 4E:57:00:14:00:00:00:00:02:02:02:B3:00:00:00:00:00:68:00:00:01:72

Is somebody willing to test the new feature?
The CRC is calculated wrong...

@Wiebo Why do you think so? :-)

The checksum of this line:
4E:57:00:14:00:00:00:00:02:02:02:9D:00:00:00:00:00:68:00:00:01:5C
does not give me a response from the BMS. Also adding the END marker 0x68 gives checksum 0x01 0xC4
So,
4E:57:00:14:00:00:00:00:02:02:02:9D:00:00:00:00:00:68:00:00:01:C4
does give me a response from the BMS

Thanks for your feedback! Too bad it's not working anyway. Did you try different frame sources (f.e. GPS)?

Yes, but also looking into command code 0x5, but don't really understand what they mean with that chinglish that's put into the manual...
"Pair code instruction - To modify the parameters, the first command is correct before the change"
If i make any progress i'll post it here. The manual clearly states these registers as R/W

I've implemented a BLE verison of this component a few days ago:
https://github.com/syssi/esphome-jk-bms/blob/main/esp32-ble-example.yaml
The switches (charging, discharging, balancer) can be controlled already.

Hi and sorry for bringing this up again. Reading this thread I understand that JKBMS (not inverter versions) cannot be controlled by RS485 but via Bluetooth only. Correct?
The mentioned switches mean switching Charging / Discharging and Emergency mode on / off, correct? Why does it named "balancer" then? There are two more functions (set_emergency_switch and set_heating_switch) defined but not used (yet)?
And after checking the code ... I see the switch-script sends 00 or 01. But how does it differ between the three switches? Please advise.

The mentioned switches mean switching Charging / Discharging and Emergency mode on / off, correct?

There is not much known about write instructions via the GPS port (UART-TTL). charging and discharging are the only well tested registers. AFAIK the balancing switch cannot be changed via the GPS port.
https://github.com/syssi/esphome-jk-bms/blob/main/esp32-example.yaml#L244-L249
Here you can find the different registers of the different switches wich gets disabled/enabled (0/1).
https://github.com/syssi/esphome-jk-bms/blob/main/components/jk_bms/switch/__init__.py#L17-L22
May be there are more writable registers. However, trying them out blindly is too dangerous for me.
Do these details provide some clarity? Feel free to ask more questions.

Thank you for the quick reply!
Yes indeed it sheds some light. I just didn't know that the BLE code makes use of the BMS code as well and therefor didn't check the init file.
So basically sending these bytes will ask for info reply:
AA
55
90
EB
97 <—
...
And to switch discharging ON/OFF it needs to send AC instead of the 97 followed by 0 or 1, right?
I am not eager to try values blindly either, just want to remotely turn on / off discharging via Bluetooth without having to fumble around with the app all the time.


Add support for env vars from a file

Closes #385
Closes #234

What happens if i have both env_vars and env_vars_file? Can we add a test and document?

What happens if i have both env_vars and env_vars_file? Can we add a test and document?

Done and done. Basically, they combine (like deploy-cloud-functions), and env_vars takes precedence over conflicting keys in env_vars_file.


Add optional thread-safety

In a multi-threaded application, it would be nice to have some guarantee that the action queue is thread-safe.  I haven't analyzed the queue algorithm closely, but I believe there could be a race condition if a thread tries to dispatch an action while the main Cedux run thread is popping the action queue and running reducers.  This might result in actions being missed.
I propose adding a new void *lock member to the store object, and a lock registration function to Cedux that lets the user set three function pointers on the store: void lock_init(void *lock), void lock_acquire(void *lock), and void lock_release(void *lock).  For portability purposes, the user would be responsible for implementing these functions (for instance, as wrappers around the pthread_mutex_* family).  These new members would all be NULL by default, and when performing operations involving the queue, Cedux would check these function pointers and only run them if not NULL.
The end result would be that users who want thread-safety guarantees can get them, and users who aren't worried about thread safety can simply skip the lock registration and Cedux will continue to function the way it does now (albeit with a tiny bit more overhead in the dispatch and run calls, and a slightly larger store object).
I'm happy to tackle this if you like.

Sounds awesome! This is something I've been thinking about adding as well but never got around to it. If you have time feel free! I like idea of the init, acquire and release methods. Do you think it's necessary/helpful for the store the store to keep the handle to the lock object?


Suppress error messages

This plugin is super noisy, complaining about the vast majority of non-serializable object literals in my apps.
I think running into a non serializable object literal should not be considered an error, and that the message should be removed.

Thank you for comments!
I suppress error messages by #19


Fixed typographical error, changed accross to across in README.

@wongzigii, I've corrected a typographical error in the documentation of the Butterfly project. You should be able to merge this pull request automatically. However, if this was intentional or if you enjoy living in linguistic squalor, please let me know and create an issue on my home repository.

Thanks guy！ :+1:


Deprecate project when chrome ships fix to stable

So this little lib was only useful for Chrome which was the only browser that didn't disable mouse events while the user was scrolling causing the paint storms and janky scrolling.
They have since fixed this issue and have shipped it to canary, see status.
Once it reaches stable I'll retire this project by updating the readme to make sure people don't use it. I'll keep it around the code for historical reasons.
I'll also update my blog posts, or even post a new one.
cc @paulirish

Thanks!

You may state this out on front page.....

Done

@ryanseddon this package is cross-browser, right? So fixing this in chrome only should not mark it as deprecated, since it is still usefull in other browsers?

@qodeboy no this fix was only targeting chrome. Safari, IE and FF didn't need it.

@qodeboy what @paulirish said this is here for historical reasons now, no need to use anymore.


V4 Sections

[x] Any template or child can define a section.
[x] Sections will be merged up with parent templates
[x] Sections should be defined in order of definition. (this item needs to be clearly defined and documented)

#143 #47 are currently working now in the v4-dev branch.

I think for the alternative syntax, we should introduce a new func named block, this will just have different semantics than the section func.
It'll work something like:
<?php if ($v->block('section-name')): ?>
// define the default block here
<?php endif; ?>

See #175


Openni2 not compatible with visual studio 2015

Open NI is a very hard to install and takes time like anything. I am using VS 2015 and I think Openni is not compatible with it I think. Error when opening OpenNI.sln in VS2015. It says not compatible.  I am not able to install it at all. Please help..
Thanks,
Mritula

Change the Toolset to V121 in all the projects it will build after that. It worked that way for me.


Investigate use of PCA9685 servo driver in place of Pimoroni custom servo driver

rpi-deep-pantilt version: 1.0.1
Python version: 3
TensorFlow version: 2.0
Operating System: Raspbian Buster Desktop

Description
Trying to purchase the designated hardware, however Pimoroni Pan/Tilt HAT is out of stock and no ETA. Also to be able to run the Rpi 4B+ without it throttling back, it takes a good size heat sink and fan that the Pimoroni Servo Driver HAT will physically interfere with.
What I Did
Investigated alternate servo drivers. The Pimoroni Pan/Tilt HAT uses a custom, proprietary IC chip to generate the servo PWM signals unlike most other servo drivers modules/HATs that use the PCA9685 servo driver IC. Pimoroni originally used the Adafruit PCA9685 library for the pantilthat function, before switching to the proprietary IC chip servo driver, as can be found here: https://github.com/RogueM/PanTiltFacetracker
The PCA9685 will also allow the use of bigger servos, in place of the Pimoroni Servo Driver HAT/Pan-Tilt Gimbal, to drive bigger gimbals that may include other equipment than just the pi V2 camera!
Recommend that you create a branch that allows the use of the PCA9865 servo driver board and Adafruit PCA9685 library in place of the Pimoroni proprietary IC servo driver and library. I believe that this will require minor modifications to the rpi-deep-pantilt/control/manager.py and hardware_test.py code.
Regards,
Thomas Coyle System Engineer

After reviewing the differences between the servo commands available with the PCA9685 servo controller as compared to those available with the Pimoroni custom IC servo controller, it is not going to be feasible to attempt to convert the Pimoroni servo controller library to the Adafruit PCA9685 library.
Fortunately I was able to get the Pimoroni Pan/Tilt HAT from Adafruit and the Pan/Tilt Servo Assembly from Amazon prime. I also purchased serveral Rpi GPIO bus extenders to be able to mount the Pimoroni Pan/Tilt HAT on the top of my fan cooled Rpi 4B+ case. Being able to run the Rpi 4B+ without it throttling back due to overheating will definitely improve the projects tracking performance.
Also I plan to just pull the two servo control PWM signals and grounds off of the Pimoroni servo controller and power the servos separately from a 5vdc source. Once I get the project working correctly I plan to build a bigger Pan/Tilt Servo Assembly, but will have to adjust the PID values to comply with the bigger servos' dynamic performance.
Regards,
Thomas Coyle System Engineer

I want to use a regular PCA9685 with my custom pan tilt head. Any hints on where I have to change what?

@arminf'
Until Leigh updates her code to allow the use of the PCA9685 servo driver module, I recommend purchasing a Pimoroni servo controller HAT without the gimbals if you want to drive bigger servos. Then all you have to do is take the PWM signal and the GND line for each servo from the Pimoroni HAT to provide the control signal/common ground and add a separate 5 vdc power supply to the servo PWR and GND wires. I think that this is a good interim solution instead of trying to find and replace all of the Pimoroni servo commands embedded in Leigh's code.

@arminf https://github.com/arminf'
Until Leigh updates her code to allow the use of the PCA9685 servo driver
module, I recommend purchasing a Pimoroni servo controller HAT without the
gimbals if you want to drive bigger servos. Then all you have to do is take
the PWM signal and the GND line for each servo from the Pimoroni HAT to
provide the control signal/common ground and add a separate 5 vdc power
supply to the servo PWR and GND wires. I think that this is a good interim
solution instead of trying to find and replace all of the Pimoroni servo
commands embedded in Leigh's code.
Regards,
TCIII
On Wed, Aug 12, 2020 at 11:48 AM arminf<EMAIL_ADDRESS>wrote:

I want to use a regular PCA9685 with my custom pan tilt head. Any hints on
where I have to change what?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/leigh-johnson/rpi-deep-pantilt/issues/23#issuecomment-672955467,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAJO2HDHWB4RIALUZ777FWLSAK2UBANCNFSM4LRDOZ5Q
.

@TCIII Thank you. I just found some code that I wrote for Adrian Rosebrock's PanTilt Tracker to make it work with my PCA9685 and custom servos. It is very quick and dirty but it seems to work. I still have to figure out the correct PID values.
I made the changes in the pip installation directory:
/home/pi/.local/lib/python3.7/site-packages/rpi_deep_pantilt/control
hardware_test.py
# ORI import pantilthat
from rpi_deep_pantilt.control import myCamMount as cm
servoChannelTilt = 0
servoChannelBase = 3

# ORI pantilthat.pan(a)
# ORI pantilthat.tilt(a)
cm.moveToPosition(servoChannelBase, a, "pan")
cm.moveToPosition(servoChannelTilt, a, "tilt")

manager.py
# ORI import pantilthat as pth
from rpi_deep_pantilt.control import myCamMount as cm
servoChannelTilt = 0
servoChannelBase = 3

# ORI pth.servo_enable(1, False)
# ORI pth.servo_enable(2, False)
setHome_y_x()

def setHome_y_x():
    # set servos to 0, 0 coordinates and disable them
    cm.moveToPosition(channelPan, 0, "pan")
    cm.moveToPosition(channelTilt, 0, "tilt")
    time.sleep(1)
    cm.resetServo(channelPan)
    cm.resetServo(channelTilt)

# Inside def set_servos(pan, tilt):
# ORI pth.pan(pan_angle)
cm.moveToPosition(servoChannelBase, pan_angle, "pan")

# ORI pth.tilt(tilt_angle)
cm.moveToPosition(servoChannelTilt, tilt_angle, "tilt")

# Inside def pantilt_process_manager:**
# ORI pth.servo_enable(1, True)
# ORI pth.servo_enable(2, True)

And I added a new file inside the pip control folder: myCamMount.py

import Adafruit_PCA9685
import time
global pwm

pwmHz = 50

if pwmHz == 50:
    print("Servos running on 50 Hz")
    # pan settings
    convertTominRangePan = 90
    convertTomaxRangePan = -90
    originalMinPan = 500
    originalMaxPan = 250
    # tilt settings
    convertTominRangeTilt = 90
    convertTomaxRangeTilt = -90
    originalMinTilt = 270
    originalMaxTilt = 550

pwm = Adafruit_PCA9685.PCA9685(address=0x40)
pwm.set_pwm_freq(pwmHz)

def translate(toPosition, convertTominRange, convertTomaxRange, originalMin, originalMax):
    leftSpan = convertTomaxRange - convertTominRange
    rightSpan = originalMax - originalMin
    valueScaled = float(toPosition - convertTominRange) / float(leftSpan)
    return int(originalMin + (valueScaled * rightSpan))

def moveToPosition(channel, position, panOrTilt):
    if panOrTilt == "pan":
        pwm.set_pwm(channel, 0, translate(position, convertTominRangePan, convertTomaxRangePan, originalMinPan, originalMaxPan))
    if panOrTilt == "tilt":
        pwm.set_pwm(channel, 0, translate(position, convertTominRangeTilt, convertTomaxRangeTilt, originalMinTilt, originalMaxTilt))

def resetServo(channel):
    pwm.set_pwm(channel, 0, 0)

@arminf https://github.com/arminf'

This is not my repository ;-).
Mine is: https://github.com/arminf82


conflict access modifier

createTransport() is public, but return class Transport is package access.
public Transport createTransport() throws IOException {
        return new Transport(new Socket(host, port));
    }

A quick comment on this issue:
I think that ITransportFactory must be package local at least.
I would also remove the implements ITransportFactory from JadbConnection and add a ITransportFactory getTransportFactory() in JadbConnection (package private)
What do you think about it ?

@bcallebaut You are right. Transport is package access, so its factory method should be package access.
Factory method should be placed in indivudal class rather implement it in JadbConnection.

Could you have a look at the commit in my fork : bcallebaut/jadb with id bb7006a before I do a Pull Request
Any comment is welcome (blame too btw)

Nice! But what's the point of the extra class? 🤔 Who is actually using the createTransport method outside the class? Let's look at that first. Then fixing this issue can be a single line - Just changing the access modifier to package (or private) for createTransport.

To be honest, I don't remember why I added the ITransportFactory interface. But it should be easy to check how it's used, and go from there. If it's only used by the JadbConnection then I feel we can drop the interface actually.

@vidstige Yeah, It is better to remove it.
@bcallebaut Can you remove ITransportFactory and its Implementation in your pull request?

Hi @bcallebaut ,
You forgot to change access modifier of createTransport() to package
https://github.com/bcallebaut/jadb/blob/2d24394233a951e9ff0a8235488be7c054e256a4/src/se/vidstige/jadb/JadbConnection.java#L26

Everything seems to be in order here.


[Bug] SideNav does not check if it has already been created

Due to the limits of my current situation, I am doing a lot of front end routing with Angular. This means that (as far as I have figured out) I can only initiate the SideNav when someone first accesses the web page. This means if someone access the page through a #/ the SideNav won't be initiated (because angular routing is only called when the website is hit directly). So to get around this, I could initiate the SideNav creation at ever route I take, which is linked to a controller. This issue here is that this will create:

a memory leak
multiple overlays.

For each route I take it will create a new sideNav without killing the prior one, and leave it there. The more routes I take, the more that are created, and as a result the more sidenav-overlays that are created. Since the sidenav only removes one overlay at a time, this causes the extras to pile up and make the page unusable.
I'd like to propose two fixes:

calling .sideNav() will kill any existing sideNav processes if any already exist
closing a sidenav should go through and remove all the sidenav-overlays. Not just the first one.

setTimeout(function () {
            $('.button-collapse').remove();
            $('', {
                'href': "/",
                'data-activates': 'slide-out',
                'class': 'button-collapse'
            }).insertBefore('.side-nav.fixed');
            $('', {
                'class': 'mdi-navigation-menu'
            }).appendTo('.button-collapse');
            activateSideNav('.button-collapse');
    }, 100);

I made a temporary fix for now. Until this is fixed, blow away the old dom node, and create a new one and add the sideNav to it ( activateSideNav() does that for me).

@einlaiq I out this code in a function I call every time I load a page. I'm not sure how you structured your project, but for me I have an Angular controller for each page that I load that calls some setup functions.

Aghassi, thanks for response!
Well, I'm using Yii and I have some more "problems":
— my init.js:
(function($){
  $(function(){
    $('.button-collapse').sideNav();
  });
})(jQuery);

— what I need:
page with 2 side-nav but not on every page in my case, there are different layouts and views.
Your code works for me only once, because of beforeAction.
activateSideNav('.button-collapse'); not working for me, instead: $('.button-collapse').sideNav();
'data-activates': 'slide-out' not working for me, instead 'data-activates': 'nav-mobile'

@einlaiq I don't know much about Yii, I have never used it. In the case you are describing, with one page needing it, and another page not, is there a way to just check what the current path is?
Also, please bear in mind my code is specific to my project, and that you would have to adapt it to yours. So for me, I called my nav slide-out, but you named yours nav-mobile which is why it didn't work.

@Aghassi Did you solve the problem?
Closed due inactivity, feel free to reopen it if it is still necessary.


Add a new Operational Plugin: Application Configuration

This changes make available a new operational plugin. This plugin is disabled by default and must be explicitely enabled in the API configuration.
The API implementor must also provide two other configuration parameters:

#definitions : including a list of configuration definitions
#provider : a valuable that will provide the current application configuration, this configuration must be queryable by definition name to get
the current value.

Two output formats are implemented:

Plain Text
Vendored Json

(See the upcoming documentation for more details)
Fixes #42

Coverage increased (+0.02%) to 99.542% when pulling 5be09e2f03478bb81218d5b43089c48a3982429a on 42-Operational-Plugin-Configuration into 46d823503d4439bcb761a19dfaa2f2afdbd444c7 on release-candidate.


Allow to check Grafana alerts and annotate wasp runs

This enables to run wasp tests with WithGrafana() that allows to specify alerts to check and annotations to make during the wasp run. What's important, the test will fail when alerts were fired during the run 🎉

[ ] Requires https://github.com/smartcontractkit/chainlink-testing-framework/pull/838 to be merged first

Examples

Example test annotations on Grafana https://grafana.ops.prod.cldev.sh/d/e9aa2e74-cd4c-4985-9ccc-5e701f2e7d27/mercury-load-tests-staging-testnet?orgId=1&from=1708698828070&to=1708699151485
Example of test results with list of alerts fired:

3:38PM INF Alerts found
Time                  PrevState  NewState  AlertID  Alert
2024-02-23T14:35:30Z  Normal     Alerting  242172   Total Requests, 1 Min Rate, Retrieval Timestamp Server | staging testnet {alertname=Total Requests, 1 Min Rate, Retrieval Timestamp Server | staging testnet, grafana_folder=DebugLoadTests, owner=lukasz-fryc, test=true} - _alert_condition_0=90.766667
2024-02-23T14:35:30Z  Normal     Alerting  242171   Total Requests, 1 Min Rate, Retrieval Timestamp Server | staging testnet {alertname=Total Requests, 1 Min Rate, Retrieval Timestamp Server | staging testnet, grafana_folder=DebugLoadTests, owner=lukasz-fryc, test=true} - _alert_condition_0=90.766667
2024-02-23T14:37:30Z  Alerting   Normal    242174   Total Requests, 1 Min Rate, Retrieval Timestamp Server | staging testnet {alertname=Total Requests, 1 Min Rate, Retrieval Timestamp Server | staging testnet, grafana_folder=DebugLoadTests, owner=lukasz-fryc, test=true} -
2024-02-23T14:37:30Z  Alerting   Normal    242175   Total Requests, 1 Min Rate, Retrieval Timestamp Server | staging testnet {alertname=Total Requests, 1 Min Rate, Retrieval Timestamp Server | staging testnet, grafana_folder=DebugLoadTests, owner=lukasz-fryc, test=true} -

    alerts_test.go:46:
        	Error Trace:	/Users/lukasz/Documents/smartcontractkit/mercury-pipeline-2/e2e_tests/staging_prod/tests/load/alerts_test.go:46
        	Error:      	Received unexpected error:
        	            	at least one alert was firing
        	            	github.com/smartcontractkit/wasp.CheckDashboardAlerts
        	            		/Users/lukasz/.asdf/installs/golang/1.21.4/packages/pkg/mod/github.com/smartcontractkit/wasp@v0.4.6-0.20240223142807-d82ead941d17/alert.go:102
        	            	github.com/smartcontractkit/wasp.(*Profile).Run
        	            		/Users/lukasz/.asdf/installs/golang/1.21.4/packages/pkg/mod/github.com/smartcontractkit/wasp@v0.4.6-0.20240223142807-d82ead941d17/profile.go:55
        	            	github.com/smartcontractkit/mercury-pipeline/e2e_tests/staging_prod/tests/load.TestAlertsLoad
        	            		/Users/lukasz/Documents/smartcontractkit/mercury-pipeline-2/e2e_tests/staging_prod/tests/load/alerts_test.go:45
        	            	testing.tRunner
        	            		/Users/lukasz/.asdf/installs/golang/1.21.4/go/src/testing/testing.go:1595
        	            	runtime.goexit
        	            		/Users/lukasz/.asdf/installs/golang/1.21.4/go/src/runtime/asm_arm64.s:1197
        	Test:       	TestAlertsLoad
--- FAIL: TestAlertsLoad (244.55s)

How to integrate it in your wasp tests
	_, err = wasp.NewProfile().
		WithGrafana(grafanaOpts).
		Add(wasp.NewGenerator(getLatestReportByTimestampCfg)).
		Run(true)
	require.NoError(t, err)

Where grafanaOpts is:
type GrafanaOpts struct {
	GrafanaURL                   string        `toml:"grafana_url"`
	GrafanaToken                 string        `toml:"grafana_token_secret"`
	WaitBeforeAlertCheck         time.Duration `toml:"grafana_wait_before_alert_check"`                  // Cooldown period to wait before checking for alerts
	AnnotateDashboardUIDs        []string      `toml:"grafana_annotate_dashboard_uids"`                  // Grafana dashboardUIDs to annotate start and end of the run
	CheckDashboardAlertsAfterRun []string      `toml:"grafana_check_alerts_after_run_on_dashboard_uids"` // Grafana dashboardIds to check for alerts after run
}

@skudasov I don't want to move https://github.com/smartcontractkit/chainlink-testing-framework/pull/838 to the Wasp repo as Grafana client can/will be used in many places. For instance to create a dashboard or update dashboard with annotations.
I'm not sure why you don't like wasp to rely on CTF to reuse Grafana client (and probably more code in the future)


Copy should be able to take local file to cloud

path = AnyPath(<some-local-path>)
path.copy(<some-cloud-path>

Fails, because path has already been resolved to a posixpath, would be nice if you could copy from cloud to local, and back.

It would be nice, but this is a Python issue (they should add a copy method that supports any library that implements the pathlib interface).
For technical and maintenance reasons, we won't create and maintain a wrapper class for local paths.
There's currently no generic copy(A, B) method that just works with any kind of path it gets called with. https://github.com/drivendataorg/cloudpathlib/issues/189 Tracks implementing something like that, or you can implement in the meantime with some code that does subclass checks.

Great answer, and thanks for being so fast!


[dotnetCore] Update 3.1 series ( NET Core 3.1.28 )

@captn3m0 looks like the automation is not working any more here, please have a look...

The automation (latest.py in this repo) uses releaseCycle to check, which didn't match in this case (Core XX).
Splitting this to releaseCycle and releaseLabel like how we've been doing elsewhere will fix this.

I think we dont need to do anything ralated because within 3 months core
parts will be reach eol and wont be any more new core releases.
On Thu, Aug 11, 2022, 12:53 Nemo @.***> wrote:

The automation (latest.py in this repo) uses releaseCycle to check, which
didn't match in this case (Core XX).
Splitting this to releaseCycle and releaseLabel like how we've been doing
elsewhere will fix this.
—
Reply to this email directly, view it on GitHub
https://github.com/endoflife-date/endoflife.date/pull/1477#issuecomment-1211771054,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAA3R4RDXGH6A6ZE4JEVS7TVYTETHANCNFSM56HJXXTQ
.
You are receiving this because you were assigned.Message ID:
@.***>