Dev healthcareapis microsoft.healthcare apis 2021 06 01 preview changes

MSFT employees can try out our new experience at OpenAPI Hub  - one location for using our validation tools and finding your workflow.

Changelog
Please ensure to add changelog with this PR by answering the following questions.

What's the purpose of the update?

[ ] new service onboarding
[x] new API version
[ ] update existing version for new feature
[ ] update existing version to fix swagger quality issue in s360
[ ] Other, please clarify

When you are targeting to deploy new service/feature to public regions? Please provide date, or month to public if date is not available yet.
When you expect to publish swagger? Please provide date, or month to public if date is not available yet.
If it's an update to existing version,  please select SDKs of specific language and CLIs that require refresh after swagger is published.

[ ] SDK of .NET (need service team to ensure code readiness)
[x] SDK of Python
[ ] SDK of Java
[ ] SDK of Js
[ ] SDK of Go
[ ] PowerShell
[ ] CLI
[ ] Terraform
[ ] No, no need to refresh for updates in this PR

Contribution checklist:

[x] I commit to follow the Breaking Change Policy of "no breaking changes"
[x] I have reviewed the documentation for the workflow.
[x] Validation tools were run on swagger spec(s) and errors have all been fixed in this PR. How to fix?

If any further question about AME onboarding or validation tools, please view the FAQ.
ARM API Review Checklist

[x] Ensure to check this box if one of the following scenarios meet updates in the PR, so that label “WaitForARMFeedback” will be added automatically to involve ARM API Review. Failure to comply may result in delays for manifest application. Note this does not apply to data plane APIs, all “removals” and “adding a new property” no more require ARM API review.

Adding new API(s)
Adding a new API version
[x] Ensure to copy the existing version into new directory structure for first commit (including refactoring) and then push new changes including version updates in separate commits. This is required to review the changes efficiently.
Adding a new service

[x] Please ensure you've reviewed following guidelines including ARM resource provider contract and REST guidelines. Estimated time (4 hours). This is required before you can request review from ARM API Review board.

[ ] If you are blocked on ARM review and want to get the PR merged with urgency, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.

Breaking Change Review Checklist
If there are following updates in the PR, ensure to request an approval from Breaking Change Review Board as defined in the Breaking Change Policy.

[ ] Removing API(s) in stable version
[ ] Removing properties in stable version
[ ] Removing API version(s) in stable version
[ ] Updating API in stable or public preview version with Breaking Change Validation errors
[ ] Updating API(s) in public preview over 1 year (refer to Retirement of Previews)

Action: to initiate an evaluation of the breaking change, create a new intake using the template for breaking changes. Addition details on the process and office hours are on the Breaking change Wiki.
Please follow the link to find more details on PR review process.

For the Cross Version Breaking changes, these are all differences between original service preview version 2018-08-20-preview and the GA version, 2021-01-01.  This is our first published preview version since we went GA hence the validation errors.  Requesting to ignore these errors for the old preview version since addressing them will cause breaking changes with our GA version.

    }

This was deprecated in 2021-01-11 version, but no longer? Looks like there are a bunch of these: why is that?

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:76 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

        "Deprovisioned"

What does this state mean? How is it different from Deleted?

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:2043 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

        "description": "Created - Put request accepted and an existing resource is being created asynchronously.",

201 is returned when the resource was created (synchronously).

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:801 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

      "202": {

Add the x-ms-long-running-operation: true tag to this operation.

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:806 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

      "202": {

Add the x-ms-long-running-operation: true tag to this operation.

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:862 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

      "202": {

Add the x-ms-long-running-operation: true tag to this operation.

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:909 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

          "$ref": "#/definitions/Workspace"

Delete response should be empty.

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:906 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

          "$ref": "#/definitions/Workspace"

Delete response should be empty.

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:912 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

          "$ref": "#/definitions/DicomService"

Delete response should be empty.

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:1173 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

    "description": "Lists all DICOM Services for the given workspace",

If there's a non-abbreviated version of "dicom" it's worth considering switching to it. If this is a standard name that everyone uses, then it's fine. Generally ARM recommends not using acroynms or abbreviations, except for really well-known ones (e.g. Url).

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:932 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

        "description": "Created - Put request accepted and an existing resource is being created asynchronously.",

201 means the resource has already been created.

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:1062 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

      "202": {

Add the x-ms-long-running-operation: true tag to this operation.

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:1067 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

      "202": {

Add the x-ms-long-running-operation: true tag to this operation.

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:1126 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

        "description": "Updated - Patch request accepted and an existing resource is updated.",

completed/succeeded

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:1121 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

          "$ref": "#/definitions/DicomService"

Delete response should be empty.

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:1179 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

      "202": {

Add the x-ms-long-running-operation: true tag to this operation.

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:1334 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

        "description": "Created - Put request accepted and an existing resource is being created asynchronously.",

201 means the resource has already been created.

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:1329 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

        "description": "Updated - Put request accepted and an existing resource is updated.",

Better to use "completed" or "succeeded" to avoid confusion with async responses.

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:1323 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

        "description": "Updated - Patch request accepted and an existing resource is updated.",

Better to use "completed" or "succeeded" to avoid confusion with async responses.

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:1388 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

      "202": {

Add the x-ms-long-running-operation: true tag to this operation.

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:1393 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

          "$ref": "#/definitions/IotConnector"

Delete response should be empty.

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:1440 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

          "$ref": "#/definitions/IotConnector"

Delete response should be empty.

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:1446 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

      "202": {

Add the x-ms-long-running-operation: true tag to this operation.

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:1443 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

    "description": "Lists all FHIR destinations for the given IoT Connector",

Similar question about possible other names for this that aren't acronyms or abbreviations.

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:1466 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

    "acrConfiguration": {

Consider spelling out whatever ACR stands for.

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:3188 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

        "modelAsString": false

Generally modelAsString: true is recommended. Any reason this is false?

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:3150 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

    "smartProxyEnabled": {

ARM generally recommends against booleans in favor of string enums. Best option is to choose a better property (e.g. proxyType: { "Smart", "Fhir" }). This type of property is easier for customers to understand and use and more extensible. Next best option if you really want a True/False value is to use a string enum, e.g. "smartProxyEnabled": { "True", "False" }. Enums allow adding values later without requiring a new API version.

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:3255 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

    "allowCredentials": {

Consider a string enum, e.g. credentialPolicy: { "Allowed", "Disallowed" }

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:3298 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

    "content": {

Empty objects are not recommended. Can this object be spec'd?

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:3014 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

Nothing was flagged for ARM breaking changes, and I didn't see anything. Looks clean from that perspective, AFAICT.

    "content": {

We discussed this at length as a team and decided we want to treat these objects as opaque in the API.  The mapping templates themselves are complex
We received CVP approval for an exemption on PLCY005 and have submitted to Gina Pultorak who is handling our PLR record for Public Preview.

In reply to: 879614043

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:3014 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

    "allowCredentials": {

See answer for the enable smart on fhir proxy.  For compatibility with definitions being migrated from the legacy services resource type.

In reply to: 879612876

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:3298 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

        "Deprovisioned"

Currently this is a final state our resources can go into before the metadata record is completely removed.

In reply to: 879589874

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:2043 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

    }

It wasn't deprecated.  The 2021-01-11 version had "deprecated": false on a few resources which didn't seem necessary since it is the default.  I can add it back in if desired.

In reply to: 879579461

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:76 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

    "acrConfiguration": {

Mirrors configuration in the legacy service.  It refers to the product, azure container repository.  I will update the description.

In reply to: 879609614

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:3188 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

    "acrConfiguration": {

Discussed with team, for our public preview we would like to keep as is for the 3 items pointed out (acr name and 2 bools that should be enum).  I will create work item for us to consider the change as part of our GA.

In reply to: 879959129

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:3188 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

          "$ref": "#/definitions/Workspace"

Removed

In reply to: 879594224

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:906 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

    "description": "Lists all DICOM Services for the given workspace",

This is a standard healthcare term, same for FHIR

In reply to: 879598857

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:932 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

          "$ref": "#/definitions/Workspace"

Removed

In reply to: 879596570

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:912 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

          "$ref": "#/definitions/IotConnector"

Removed

In reply to: 879606123

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:1446 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

          "$ref": "#/definitions/IotConnector"

Removed

In reply to: 879605983

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:1440 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

      "202": {

The entire operation is marked with "x-ms-long-running-operation": true, (under operationId) do the individual responses need to annonated too?

In reply to: 879606225

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:1443 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

        "description": "Updated - Put request accepted and an existing resource is updated.",

Updated

In reply to: 879605377

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:1323 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

      "202": {

The operation has it, under the operationId property further up.  Line 1289 in this iteration.

In reply to: 879604582

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:1334 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

        "description": "Updated - Patch request accepted and an existing resource is updated.",

Updated

In reply to: 879605638

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:1388 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

      "202": {

It is above under the operation id.

In reply to: 879593322

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:806 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

        "description": "Created - Put request accepted and an existing resource is being created asynchronously.",

Right now we are using 200 for updates and 201 per create.  We use the RP SDK and the logic is dicated here:
https://msazure.visualstudio.com/One/_git/AzureUX-ResourceProviderSDK?path=%2Fsrc%2FResourceProvider%2FRouting%2FRouting%2FResourceManagement%2FOperationStatus.cs
I was including 202 for future use since introducing a new response code for a new version is a backwards breaking change.  But if the logic in the RP SDK is still sound I can drop it.

In reply to: 879592690

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:801 in f0b1bdb. [](commit_id = f0b1bdb1d4c962a6bec64617863333b86ee958d3, deletion_comment = False)

        "description": "Updated - Put request accepted and an existing resource is updated.",

Actually after further review I reverted this change.  200 is returned during an update and 201 is returned during a create currently.  This is due to the RP SDK we use today https://msazure.visualstudio.com/One/_git/AzureUX-ResourceProviderSDK?path=%2Fsrc%2FResourceProvider%2FRouting%2FRouting%2FResourceManagement%2FOperationStatus.cs The 202 are there for future use with out triggering a breaking change if we add them in the future.  I can remove if prefered.

In reply to: 880227535

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:1323 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

@mentat9 I addressed or replied to the comments you made.  Please let me know if you have further questions/changes.

        "modelAsString": false

Fixed.  It looks like it was that way in the services defintion, I am not sure why

In reply to: 879610008

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:3150 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

      "202": {

Ah, missed it.

In reply to: 880229073

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:806 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

        "description": "Updated - Put request accepted and an existing resource is updated.",

Right, I just meant replace the word "accepted" with "completed" or "succeeded" to avoid confusion with sync vs. async response.

In reply to: 880296294

Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:1323 in 32eea04. [](commit_id = 32eea0431e249ed0fd62feea6b5f0526c10da292, deletion_comment = False)

    }

It wasn't deprecated. The 2021-01-11 version had "deprecated": false on a few resources which didn't seem necessary since it is the default. I can add it back in if desired.
In reply to: 879579461
Refers to: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2021-06-01-preview/healthcare-apis.json:76 in 32eea04. [](commit_id = 32eea04, deletion_comment = False)

Ugh. I've been reading too many PRs: no change needed.

Left clarifying comment about my suggestion for description changes that I think still applies, but I'm not holding approval on it. Consider updating the descriptions in a future commit.


usbhost sample program not working

I'm running the usbhost sample program from the SDK on M1s dock, and I'm unable to enumerate any USB Mass Storage devices.
I've compiled the sample with  "make CHIP=bl808 BOARD=bl808dk CPU_ID=m0" and used Dev Cube to flash it to group0 slot.  The sample runs and prints this in a loop:
[00:18:46.261] - do not find /dev/sda
[00:18:46.262] - do not find /dev/input0
[00:18:47.258] - do not find /dev/ttyACM0
When I plug in a USB Mass Storage device (USB flash stick) I get the following error:
[00:18:50.513] - [E/USB] Failed to enable port 1
I've tried many different USB flash drives, and they all fail the same way.  Plugging in a USB mouse does work, and I get the following messages:
[00:20:02.686] - [I/USB] New full-speed device on Hub 1, Port 1 connected
[00:20:02.692] - [I/USB] New device found,idVendor:045e,idProduct:0745,bcdDevice:0634
[00:20:02.696] - [I/USB] The device has 3 interfaces
[00:20:02.697] - [I/USB] Enumeration success, start loading class driver
[00:20:02.698] - [I/USB] Loading hid class driver
[00:20:02.699] - [I/USB] Ep=81 Attr=03 Mps=8 Interval=04 Mult=00
[00:20:02.700] - [I/USB] Register HID Class:/dev/input0
[00:20:02.700] - [I/USB] Loading hid class driver
[00:20:02.702] - [I/USB] Ep=82 Attr=03 Mps=10 Interval=01 Mult=00
[00:20:02.703] - [I/USB] Register HID Class:/dev/input1
[00:20:02.704] - [I/USB] Loading hid class driver
[00:20:02.705] - [I/USB] Ep=83 Attr=03 Mps=32 Interval=01 Mult=00
[00:20:02.706] - [I/USB] Register HID Class:/dev/input2

Works ok, please make sure your power is good.
[I/USB] New full-speed device on Hub 1, Port 1 connected
[I/USB] New device found,idVendor:31b6,idProduct:0118,bcdDevice:0200
[I/USB] The device has 2 interfaces
[I/USB] Enumeration success, start loading class driver
[I/USB] Loading cdc_acm class driver
[I/USB] Ep=01 Attr=02 Mps=64 Interval=00 Mult=00
[I/USB] Ep=81 Attr=02 Mps=64 Interval=00 Mult=00
[I/USB] Register CDC ACM Class:/dev/ttyACM0
[I/USB] Loading cdc_data class driver
recv over:20
0xfe 0x03 0x03 0x00 0x00 0x40 0x04 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
send over:8
0x00 0x00 0x00 0x00 0x36 0x36 0x08 0x14 0x4a 0x32 0x1a 0x30 0x0a 0x12 0x31 0x31 0x39 0x39 0x31 0x35 0x30 0x30 0x30 0x37 0x31 0x31 0x32 0x44 0x35 0x43 0x30 0x42 0x12 0x0a 0x33 0x52 0x4e 0x4c 0x30 0x34 0x30 0x55 0x5f 0x31 0x22 0x0e 0x41 0x32 0x42 0x5a 0x42 0x51 0x56 0x36 0x34 0x35 0x58 0x47 0x35 0x44 nbytes:60

Just check your power, thanks.

I tried as you said and and connected to my DC bench power supply, it still fails in the same way.  All USB Mass Storage devices fail to be detected with "Failed to enable port 1" error
https://drive.google.com/file/d/1Mw2h0y8q-A81zrDW_sotAS62tHtPhiqh/view?usp=sharing

Maybe m1s dock usb circuit has some issue. Use our own board is ok.
[I/USB] New high-speed device on Hub 1, Port 1 connected
[I/USB] New device found,idVendor:0781,idProduct:5591,bcdDevice:0100
[I/USB] The device has 1 interfaces
[I/USB] Enumeration success, start loading class driver
[I/USB] Loading msc class driver
[I/USB] Get max LUN:1
[I/USB] Ep=81 Attr=02 Mps=512 Interval=00 Mult=00
[I/USB] Ep=02 Attr=02 Mps=512 Interval=00 Mult=00
[I/USB] Capacity info:
[I/USB] Block num:60062500,block size:512
[I/USB] Register MSC Class:/dev/sda
do not find /dev/ttyACM0

fa 31 c0 8e d8 8e c0 8e d0 bc 00 7c fb fc 89 e6
bf 00 06 b9 00 01 f3 a5 ea dc 06 00 00 10 00 01
00 00 7c 00 00 00 00 00 00 00 00 00 00 80 3f 00
ff 00 ff 03 1e 0e 1f 3a 16 10 00 74 06 1f ea 36
e7 00 f0 3d fb 54 75 05 8c d8 fb eb 1d 80 fc 08
75 1b e8 81 00 8a 36 13 00 fe ce 8b 0e 15 00 86
cd c0 e1 06 0a 0e 11 00 31 c0 f8 eb 65 80 fc 02
72 cb 80 fc 04 77 c6 60 80 cc 40 50 be 00 00 c7
04 10 00 30 e4 89 44 02 89 5c 04 8c 44 06 66 31
c0 66 89 44 0c 88 f0 f6 26 11 00 88 cf 88 eb c0
ef 06 81 e1 3f 00 01 c8 48 89 c7 a1 13 00 f7 26
11 00 f7 e3 01 f8 81 d2 00 00 89 44 08 89 54 0a
58 30 c0 8a 16 10 00 e8 0c 00 88 26 03 00 61 a1
02 00 1f ca 02 00 9c ff 1e 22 00 c3 80 fa 8f 7f
04 88 16 2d 06 be 87 07 e8 8d 00 be be 07 31 c0
b9 04 00 f6 04 80 74 03 40 89 f5 81 c6 10 00 e2
f2 48 74 02 cd 18 bf 05 00 be 1d 06 c7 44 02 01
00 66 8b 46 08 66 89 44 08 b8 00 42 8a 16 2d 06
cd 13 73 0d 4f 74 49 30 e4 8a 16 2d 06 cd 13 eb
d8 a1 fe 7d 3d 55 aa 75 37 fa 66 a1 4c 00 66 a3
3f 06 be 13 04 8b 04 48 89 04 c1 e0 06 8e c0 31
ff be 1d 06 b9 60 00 fc f3 a5 c7 06 4c 00 17 00
a3 4e 00 fb 8a 16 2d 06 89 ee fa ea 00 7c 00 00
be aa 07 e8 02 00 eb fe ac 20 c0 74 09 b4 0e bb
07 00 cd 10 eb f2 c3 53 74 61 72 74 20 62 6f 6f
74 69 6e 67 20 66 72 6f 6d 20 55 53 42 20 64 65
76 69 63 65 2e 2e 2e 0d 0a 00 42 6f 6f 74 20 66
61 69 6c 65 64 00 00 00 ea eb d4 ca 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 04
05 00 0c fe ff ff 00 01 00 00 24 7a 94 03 55 aa

Failed to enable port 1 means your power is not good or your usb circuit is not well.

I also have some Ox64 boards, and I've confirmed it also fails the same way on both USB power and bench power.  I tried 2 units of each board type to rule out any defect specific to a particular board or board instance.
I did notice that occasionally I get this error message instead, but most of the time it's the "Failed to enable port 1" error:
[I/USB] New full-speed device on Hub 1, Port 1 connected
[E/USB] Failed to get device descriptor,errorcode:-116
[E/USB] Port 1 enumerate fail

Is there a schematic of the devkit available? We could compare to see if any necessary components etc are missing from the ox64

From the schematic, it is too simple in ox64 and M1s. Diff  90OHM and others, this need to contact pin64 and then contact us to check.

@sakumisu any update on this? I noticed you deleted your comment about the circuit not being correct? Is the pine64 and m1s circuitry OK or is there a design issue?

What I am seeing here. I have 3 devices, two fail and one works. If I plug them all in to a full PC, the two failing devices identify as USB 1.1 devices. The one that works is a 2.0 device. The device version can be found by running lsusb -v and looking at the bcdUSB field.

Correction. The FAILING devices are 2.0. The SUCCESSFUL devices are 1.1.

Apologies for so many messages. Actually I'm getting a combination of results. Its inconclusive.


23 Database CQRS Functionality

Description
Added create, update, and delete functionality that is generic across entities, with the following features:

Closes #23 - Rather than a sync function that reads from the write DB and writes to the read DB, the CQRS functions write simulataneously to each database, whilst keeping a log of Events in the write DB that can be applied in reverse order to recreate the state of the registry at any time in the past (the functionality to do this will come in a later PR)
Closes #43 - table models have an is_deleted field that defaults to False and can only be mutated to True through the delete_database_entity function (i.e. Update models do not have an is_deleted field that can be passed)
Errors in the CQRS functions trigger a rollback of both the read and write DBs, so there will never be a situation where something is partially written to one and not the other.
Unit tests included for each function. Conftest fixtures had to be modified slightly to handle the more complex situtation of two database instances and managing objects that are linked over multiple sessions.

TODO

These CQRS functions need to be integrated into the CRUD operations for each entity - coming up next once we've sorted seeding for each table.

Has This Been Tested?

[x] Yes

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.
Please also list any relevant details for your test configuration
Checklist:

[x] I have performed a self-review of my own code
[ ] I have made corresponding changes to the documentation
[x] I have added tests that prove my fix is effective or that my feature works
[x] I have checked my code and corrected any misspellings

These unit tests pass locally, can't understand why we're getting an Event cannot be subscripted.

Looks like a good start. From what I've seen on event sourcing and CQRS, we are still missing some of the components in the way events are used to interact with domain models. It seems that for our use case the event sourcing is probably the more important part and somewhat independent of the CQRS element.
Did you see this python event sourcing library. It has out of the box implementations of repository and domain applications. https://eventsourcing.readthedocs.io/en/stable/topics/introduction.html it also has some good code examples for the design pattern.
Probably worth going through on a call. I think it might be easier to work up from a basic example than try and convert the current approach.

Here is a rough code to acheive the following improvements:

Database Operations Moved to cqrs.py:
The create, update, and delete operations are now encapsulated within the cqrs.py module.
The route handlers in routes.py focus solely on HTTP logic, improving code separation and maintainability.

Asynchronous Operations:
All functions interacting with the database and MongoDB are asynchronous. This ensures non-blocking I/O operations, improving application performance.

Better Logging and Exception Handling

Event Sourcing Logic:
The event_sourcing.py module contains the Event model and functions to store and retrieve events from MongoDB.
Events are stored asynchronously using motor, an async MongoDB driver.

Event Replay Functionality:
The replay_events function in cqrs.py can rebuild the read database by replaying events from MongoDB.
An endpoint /replay-events in routes.py allows triggering event replay.

Separated Read and Write Models

mongodb_connection.py:
from motor.motor_asyncio import AsyncIOMotorClient

MONGODB_URI = "mongodb://localhost:27017"
DATABASE_NAME = "event_store"

mongo_client = AsyncIOMotorClient(MONGODB_URI)
event_db = mongo_client[DATABASE_NAME]

def get_event_collection():
    return event_db["events"]

event_sourcing.py:
from datetime import datetime
from enum import Enum
from typing import Dict, Any, List

from bson import ObjectId
from pydantic import BaseModel, Field

from mongodb_connection import get_event_collection

event_collection = get_event_collection()

class EventTypes(str, Enum):
    CREATE = "CREATE"
    UPDATE = "UPDATE"
    DELETE = "DELETE"

class Event(BaseModel):
    id: str = Field(default_factory=lambda: str(ObjectId()))
    entity_id: int
    entity_name: str
    event_type: EventTypes
    attributes_before: Dict[str, Any] | None = None
    attributes_after: Dict[str, Any] | None = None
    timestamp: datetime = Field(default_factory=datetime.utcnow)

async def store_event(event: Event):
    await event_collection.insert_one(event.dict())

async def get_events_for_entity(entity_id: int, entity_name: str) -> List[Event]:
    cursor = event_collection.find({"entity_id": entity_id, "entity_name": entity_name})
    events = await cursor.to_list(length=None)
    return [Event(**event) for event in events]

async def get_all_events() -> List[Event]:
    cursor = event_collection.find().sort("timestamp", 1)
    events = await cursor.to_list(length=None)
    return [Event(**event) for event in events]

CQRS.py:
import logging
from typing import Dict, Any

from sqlalchemy.ext.asyncio import AsyncSession
from sqlalchemy import select

from models import WriteMeasurementReport, ReadMeasurementReport
from event_sourcing import Event, EventTypes, store_event, get_all_events
from utils import entity_to_dict, transform_to_read_model

logger = logging.getLogger(__name__)

class CQRSException(Exception):
    pass

async def write_to_database(
    entity: WriteMeasurementReport,
    write_session: AsyncSession,
    read_session: AsyncSession,
) -> WriteMeasurementReport:
    try:
        write_session.add(entity)
        await write_session.flush()

        event = Event(
            entity_id=entity.id,
            entity_name=entity.__class__.__name__,
            event_type=EventTypes.CREATE,
            attributes_after=entity_to_dict(entity),
        )
        await store_event(event)

        # Transform and write to read database
        read_entity = transform_to_read_model(entity)
        read_session.add(read_entity)
        await read_session.flush()

        await write_session.commit()
        await read_session.commit()
    except Exception as e:
        await write_session.rollback()
        await read_session.rollback()
        logger.error(f"Error during database write: {str(e)}")
        raise CQRSException(f"Failed to write entity: {str(e)}")

    return entity

async def update_database_entity(
    entity: WriteMeasurementReport,
    update_data: Dict[str, Any],
    write_session: AsyncSession,
    read_session: AsyncSession,
) -> WriteMeasurementReport:
    try:
        attributes_before = entity_to_dict(entity)

        for key, value in update_data.items():
            setattr(entity, key, value)

        write_session.add(entity)
        await write_session.flush()

        event = Event(
            entity_id=entity.id,
            entity_name=entity.__class__.__name__,
            event_type=EventTypes.UPDATE,
            attributes_before=attributes_before,
            attributes_after=update_data,
        )
        await store_event(event)

        # Update read database
        result = await read_session.execute(
            select(ReadMeasurementReport).where(ReadMeasurementReport.id == entity.id)
        )
        read_entity = result.scalar_one_or_none()
        if read_entity:
            for key, value in update_data.items():
                setattr(read_entity, key, value)
            read_session.add(read_entity)
            await read_session.flush()

        await write_session.commit()
        await read_session.commit()
    except Exception as e:
        await write_session.rollback()
        await read_session.rollback()
        logger.error(f"Error during entity update: {str(e)}")
        raise CQRSException(f"Failed to update entity: {str(e)}")

    return entity

async def delete_database_entity(
    entity: WriteMeasurementReport,
    write_session: AsyncSession,
    read_session: AsyncSession,
) -> WriteMeasurementReport:
    try:
        entity.is_deleted = True
        write_session.add(entity)
        await write_session.flush()

        event = Event(
            entity_id=entity.id,
            entity_name=entity.__class__.__name__,
            event_type=EventTypes.DELETE,
            attributes_before=entity_to_dict(entity),
        )
        await store_event(event)

        # Update read database
        result = await read_session.execute(
            select(ReadMeasurementReport).where(ReadMeasurementReport.id == entity.id)
        )
        read_entity = result.scalar_one_or_none()
        if read_entity:
            read_entity.is_deleted = True
            read_session.add(read_entity)
            await read_session.flush()

        await write_session.commit()
        await read_session.commit()
    except Exception as e:
        await write_session.rollback()
        await read_session.rollback()
        logger.error(f"Error during entity deletion: {str(e)}")
        raise CQRSException(f"Failed to delete entity: {str(e)}")

    return entity

async def replay_events(read_session: AsyncSession):
    events = await get_all_events()
    # Clear read database
    async with read_session.begin():
        await read_session.execute("DELETE FROM measurement_reports_read")

    for event in events:
        if event.event_type == EventTypes.CREATE:
            entity_data = event.attributes_after
            read_entity = ReadMeasurementReport(**entity_data)
            read_session.add(read_entity)
            await read_session.commit()
        elif event.event_type == EventTypes.UPDATE:
            entity_id = event.entity_id
            result = await read_session.execute(
                select(ReadMeasurementReport).where(ReadMeasurementReport.id == entity_id)
            )
            read_entity = result.scalar_one_or_none()
            if read_entity:
                for key, value in event.attributes_after.items():
                    setattr(read_entity, key, value)
                read_session.add(read_entity)
                await read_session.commit()
        elif event.event_type == EventTypes.DELETE:
            entity_id = event.entity_id
            result = await read_session.execute(
                select(ReadMeasurementReport).where(ReadMeasurementReport.id == entity_id)
            )
            read_entity = result.scalar_one_or_none()
            if read_entity:
                read_entity.is_deleted = True
                read_session.add(read_entity)
                await read_session.commit()

routes.py:
from fastapi import APIRouter, Depends, HTTPException
from sqlalchemy.ext.asyncio import AsyncSession
from sqlalchemy import select

from models import (
    MeasurementReportCreate,
    MeasurementReportUpdate,
    MeasurementReportRead,
    WriteMeasurementReport,
    ReadMeasurementReport,
)
from write_database import get_write_session
from read_database import get_read_session
from cqrs import (
    write_to_database,
    update_database_entity,
    delete_database_entity,
    replay_events,
    CQRSException,
)

router = APIRouter(tags=["Measurements"])

@router.post("/measurement", response_model=MeasurementReportRead)
async def create_measurement(
    measurement_create: MeasurementReportCreate,
    write_session: AsyncSession = Depends(get_write_session),
    read_session: AsyncSession = Depends(get_read_session),
):
    try:
        measurement = WriteMeasurementReport(**measurement_create.dict())
        await write_to_database(measurement, write_session, read_session)
        return MeasurementReportRead.from_orm(measurement)
    except CQRSException as e:
        raise HTTPException(status_code=500, detail=str(e))

@router.get("/measurement/{measurement_id}", response_model=MeasurementReportRead)
async def read_measurement(
    measurement_id: int,
    read_session: AsyncSession = Depends(get_read_session),
):
    result = await read_session.execute(
        select(ReadMeasurementReport).where(ReadMeasurementReport.id == measurement_id)
    )
    measurement = result.scalar_one_or_none()
    if measurement is None or measurement.is_deleted:
        raise HTTPException(status_code=404, detail="Measurement not found")
    return MeasurementReportRead.from_orm(measurement)

@router.patch("/measurement/{measurement_id}", response_model=MeasurementReportRead)
async def update_measurement(
    measurement_id: int,
    measurement_update: MeasurementReportUpdate,
    write_session: AsyncSession = Depends(get_write_session),
    read_session: AsyncSession = Depends(get_read_session),
):
    result = await write_session.execute(
        select(WriteMeasurementReport).where(WriteMeasurementReport.id == measurement_id)
    )
    measurement = result.scalar_one_or_none()
    if measurement is None or measurement.is_deleted:
        raise HTTPException(status_code=404, detail="Measurement not found")
    update_data = measurement_update.dict(exclude_unset=True)
    try:
        await update_database_entity(measurement, update_data, write_session, read_session)
        return MeasurementReportRead.from_orm(measurement)
    except CQRSException as e:
        raise HTTPException(status_code=500, detail=str(e))

@router.delete("/measurement/{measurement_id}", response_model=MeasurementReportRead)
async def delete_measurement(
    measurement_id: int,
    write_session: AsyncSession = Depends(get_write_session),
    read_session: AsyncSession = Depends(get_read_session),
):
    result = await write_session.execute(
        select(WriteMeasurementReport).where(WriteMeasurementReport.id == measurement_id)
    )
    measurement = result.scalar_one_or_none()
    if measurement is None or measurement.is_deleted:
        raise HTTPException(status_code=404, detail="Measurement not found")
    try:
        await delete_database_entity(measurement, write_session, read_session)
        return MeasurementReportRead.from_orm(measurement)
    except CQRSException as e:
        raise HTTPException(status_code=500, detail=str(e))

@router.post("/replay-events")
async def replay_events_endpoint(
    read_session: AsyncSession = Depends(get_read_session),
):
    try:
        await replay_events(read_session)
        return {"status": "Replayed events successfully"}
    except Exception as e:
        raise HTTPException(status_code=500, detail=str(e))

Let me know if prefer going through it together.

Superceded by #52


License

I'm interested to use your library in a project.
However it is not clear whether this project is or is not copyleft? Without a license file, the default of any GitHub project is to be under default copyright laws (see https://help.github.com/articles/open-source-licensing/). Is it the case here?

Hi,
Sorry, I forgot to add a license... You can consider the project to be under the Apache 2.0 license. I'll add it as soon as I can.

Done: https://github.com/XamlAnimatedGif/WpfAnimatedGif/blob/master/LICENSE.txt


use API cannot work after echarts.init called.

Version
5.0.1
Reproduction link
https://codesandbox.io/s/echarts-tooltip-richtext-dispose-forked-rh0cf
Steps to reproduce
click button to render chart
What is expected?
render as expected
What is actually happening?
throw an error

This kind of demand exists in the scenario of dynamically selecting charts to be loaded on demand, so as to achieve the miniest first screen load time.

Try with 5.0 version. I cannot reproduce it.

Try with 5.0 version. I cannot reproduce it.

I understand the usage, and it may not be a bug. But in some scenarios, such as dynamically selecting a chart to load on demand at runtime, we must put use after echarts.init.

I understand the usage, and it may not be a bug. But in some scenarios, such as dynamically selecting a chart to load on demand at runtime, we must put use after echarts.init.

Imagine that there were no line-chart in the first render, but a line-chart will be rendered after  button is clicked.
Then it is a waste of time to load the relevant bundle of the line lib during the first rendering.

Imagine that there were no line-chart in the first render, but a line-chart will be rendered after  button is clicked.
Then it is a waste of time to load the relevant bundle of the line lib during the first rendering.

Imagine that only a line-chart will be rendered during the first render, and the bar-chart will be rendered after clicking a button.
Then it is a waste of time to load the relevant bundle of bar's lib during the first rendering.
At present, if we want to achieve this optimization, we can only destroy the echarts instance first, and then re-instantiate it

Imagine that only a line-chart will be rendered during the first render, and the bar-chart will be rendered after clicking a button.
Then it is a waste of time to load the relevant bundle of bar's lib during the first rendering.
At present, if we want to achieve this optimization, we can only destroy the echarts instance first, and then re-instantiate it

I think this has no help to the bundle size because it's too dynamic for bundler to analyze

I think this has no help to the bundle size because it's too dynamic for bundler to analyze

I appreciate your help very much, the cost is indeed not much.

I appreciate your help very much, the cost is indeed not much.

By the way, there is no black magic, just dynamic import.

By the way, there is no black magic, just dynamic import.


withRouter not working if inside redux connect

Thank you for great library
Steps to reproduce

create-react-app bug
cd bug
yarn add react-router react-redux redux
yarn start
open index.js and add

const App = () => <Router>
<Swtich>
  <route path="/a' component={()=><Link to="/b"}>B</Link>} />
  <route  component={()=><Link to="/a"}>A</Link>} />
</Switch>
<Router>
export const AppContainer =  connect(state, props)(withRouter(App));
ReactDOM.render(
      <Provider store={store}>
        <Router>
          <AppContainer store={store} />
        </Router>
      </Provider>,
    rootEl
  );

run application, click on any link the address bar will change but route will not change
edit index.js replace

// export const AppContainer =  connect(state, props)(withRouter(App));
//with
export const AppContainer =  withRouter(connect(state, props)(App));

now every thing will work as expected.
Version
4.0.0
Expected Behavior
withRoute should work regardless of HOC

You have your withRouter and connect in the wrong order: https://reacttraining.com/react-router/core/api/Prompt

yp, thats the issue, it shouldn't be (order sensetive)

It should be a real component and force update. Then in react 16 it wouldn't even have to make an element.

I think it has to do with this


Make this an official homebridge plugin?

Hi JFarmer08 -
Thanks for adopting this plug-in. Would you be interested in nominating it to be a verified homebridge plug-in?
thank you

This is in progress. As of Version 0.5.22 the plugin is Verified.


update dependency wpapi-extensions to fix #7

Codecov Report

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

@@           Coverage Diff           @@
##           master     #115   +/-   ##
=======================================
  Coverage   36.92%   36.92%
=======================================
  Files           5        5
  Lines          65       65
  Branches        7        7
=======================================
  Hits           24       24
  Misses         38       38
  Partials        3        3

Continue to review full report at Codecov.

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


Add a 'synthwave' theme and donator color

This adds a synthwave/neon-styled theme and a donator gradient color to go with it.
It uses dark background colors and bright blue/pink colors for the text with some glow effects using CSS shadow properties. It also adds colors to the chat role badges.
It's probably easier to show all the changes with screenshots:
main interface:

"Donator Synthwave" color gradient:

some settings:

chat lookup:

panel trigger with a notification + ping:

colored role badges:

I was thinking of making CSS variables for the shadows but there aren't that many shadows that are re-used and it would add more lines to this already way-to-big theme, tho it would make things a little easier to read and configure.
And for the colored badges, I wasn't sure either, another way to make them would be to add a "color" parameter to the role.conf but I wasn't sure how to do that so I went the easy way.

add a "color" parameter to the roles.conf

This was my thought too. It's something that can be done later though, so I can see this being accepted first.
On the whole, this looks good to me 👍.


Fix for RTL4g

#485

The test for RTL4b for the SUSPENDED state is not passing.

Thanks, interesting, yesterday it was green and today after 2 attempts to run tests got green too http://take.ms/tzjsx.
Will try to find out the reason.


Adding missing DependencyGraph top relation label code.

Somehow this code got lost.

Sorry about that. Thanks @dimazest


Improve type hints

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

Project coverage is 100.00%. Comparing base (4cc1ba9) to head (64b4819).

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #63   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files           37        37
  Lines          793       793
  Branches        56        56
=========================================
  Hits           793       793

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


Extend configuration for "configaccesslist" under the key "restricted_user_access"

Problem:
When using the authenticatedEmailsFile's configaccesslist option stored either as a configmap or a secret, the key under which the values are stored is hard coded to restricted_user_access.
Applications that is already built and uses another key to store the email list can not access the values.
Solution:
Configure the key restricted_user_access in the deployment and in the configmap/secret to be retrieved from the values.
The default value should still be restricted_user_access for backward compatibility, however if the end user wants to change it, the chart can allow it through a new property in the values.

The change is quite minor, will not take too much to change the helm chart.
I can push a PR in the next days.

@morarucostel can this ticket be closed now?

@morarucostel so?

Closed with #45


Rewrite assembly

Assembly is expecting square matrices and it has some performance issues too. It needs some redesign to make it possible to build "boundary" equations like multi-point constraints, mortar interfaces etc. things.

Ok tests are probably a bit broken at the moment but I think now we should have a good and efficient approach for assembling large matrices. It's still a bit naive and using push! but not indexing anymore.


fixed relative upload date

resolves #987

Oops! Sorry I totally missed this PR. Thanks a lot for this ✨


Bogus color blocks in navigation mode on termux

Hi, let me know if this seems to be a bug with the terminal emulation in Termux!

@fornwall Sure. Nice to see you here :)

Termux bug: https://github.com/termux/termux-app/issues/51

Not termux bug. Should use '\e[0m' before erasing.


Please provide support for LLama3 or provide example on how to serve it using Easydel

with similar configurations as llama2, we are getting some garbage responses from llama3
s[/S]

The above code will output:
Hello

The `INST` tag is used to indicate that the text should be displayed in an instance of the `Hello` class. The `S` tag is used to indicate that the text should be displayed in a sentence.
              [INST]  [INST]  [INST]  [INST]  will be the  [INST]  [INST]  and [INST]  and [INST]  and [INST]  and [INST]  C
```[INST]  and [INST]  and the  and [INST
``
[INST]  and the  and the  and the  and the  and the `s
``
``
[S] [INST]s[/S] and the [S][[INST]s[INST[/S][
``s[INST[/S
``
INST[/S]s[INST[/S][S][S][S][s[/S][s][s[/s[/INST[/S][s[/S][[INST[INST[s`<``s[INST[/S][S][S][S[INST[INST[/S][S][S][S][S
S

The real issue is that in order to run llama3, eos_token_id need to be array of integers.
        eos_token_id (`Union[int, List[int]]`, *optional*):
            The id of the *end-of-sequence* token. Optionally, use a list to set multiple *end-of-sequence* tokens.

As per hugging face examples
terminators = [
    tokenizer.eos_token_id,
    tokenizer.convert_tokens_to_ids("<|eot_id|>")
]

outputs = model.generate(
    input_ids,
    max_new_tokens=256,
    eos_token_id=terminators,
    do_sample=True,
    temperature=0.6,
    top_p=0.9,
)

@jchauhan hi, actually you can use JAXSrever since that's faster and safer option and support dynamic prompt template

here's example of using llama3 model on Kaggle GPU T4x2
server_config = JAXServerConfig(
    max_sequence_length = 3072,
    max_new_tokens = 2048,
    max_compile_tokens = 512,
    pre_compile=False,
    eos_token_id=128009,
    temperature=0.3,
    top_p=0.95,
    top_k=10
)
server = JAXServer.from_torch_pretrained(
    pretrained_model_name_or_path="meta-llama/Meta-Llama-3-8B-Instruct",
    server_config=server_config,
    sharding_axis_dims=(1, 1, 1, -1),
    model_config_kwargs=dict(
        gradient_checkpointing="",
        use_scan_mlp=False,
        shard_attention_computation=False,
        use_sharded_kv_caching=True,
        attn_mechanism="local_ring"
    ),
    dtype=jnp.float16,
    param_dtype=jnp.float16,
    auto_shard_params=True,
    load_in_8bit=True,
    input_shape=(1,2048),
    torch_dtype=torch.float16,
    device_map="cpu" # this one will be passed to transformers.AutoModelForCausalLM
)

prompt = server.format_chat(
    prompt="write a poem about stars",
    history=[],
    system="",
)

pl = 0
for response, used_tokens in server.sample(prompt):
    print(response[pl:], end="")
    pl = len(response)

# Here's a poem about stars:

# The stars shine bright in the midnight sky,
# A celestial show, beyond the eye,
# Their twinkling light, a beacon in the night,
# Guiding us through the darkness, a guiding light.

# Their beauty is a wonder, a celestial display,
# A reminder of the magic, that's always in.swing,
# A reminder of the mystery, of the stars up high,
# A reminder of the wonder, of the stars that twinkle bright,
# A reminder of the magic, of the stars that shine with a gentle light.

# So let us cherish the stars, and the magic that they bring to our lives.

I wanted to run it on TPU v4 instance. Finally I could do it. I had to change the prompter.
Thanks. It was easy.


[BUG]

Describe the bug
While addition I found if you try to put any alphabet as an answer you can actually put  alphabet 'E ' as an answer
it's an another thing whether it is right or wrong but , the issue here is the normal answer submission feature doesn't work and you answer will not get submitted.
Normally it should be submitted as an wrong answer but it is not getting submitted even by pressing enter multiple time .
To Reproduce
Steps to reproduce the behavior:

Go to addition
Click on E alphabet on your keyboard
Answer will be not submitted
No dialogue box or prompt for informing about this issue
Done button got jammed too

Screenshots

@prakhartiwari0
Desktop (please complete the following information):

OS: Windows 11
Browser Brave

Hey @Dragon-stack , thanks for raising this issue. Actually, I should tell you that we are not supposed to allow non-number answers, like alphabets or signs, so it is a feature and not a bug. I hope I was able to explain.

Happy Contributing!


Session or temporary cache / persistence?

Hi guys,
Is there a way to have store some items in a temporary persistence say while the app is running / loaded but disappears upon the app closing?
This is so that upon opening the app, I can re-fetch but after re-fetching I can for optimisations sake keep in in some fast local memory.
I currently use AsyncStorage for long-term persistence but was wondering if there was anything for fast short-term temporary persistence? Sort of like having a singleton being passed around.

Could you simply use a global singleton as you mentioned?

Not currently, but it's an interesting idea. Obviously you can store stuff in JS memory, but it can't be shared between RootViews.
A generic key-value store BridgeModule that wraps a dictionary would be very simple to write. In fact, here's all the native code you'd need if you feel like making one for yourself (completely untested of course) :-)
RCTKeyValueStore.h file
#import <RCTBridgeModule.h>
@interface RCTKeyValueStore : NSObject
@end
RCTKeyValueStore.m file
#import "RCTKeyValueStore.h"
#import "RCTConvert.h"
@implementation RCTKeyValueStore
{
NSMutableDictionary *_store;
}
RCT_EXPORT_MODULE()

(instancetype)init
{
if ((self = [super init])) {
_store = [[NSMutableDictionary alloc] init];
}
return self;
}

RCT_EXPORT_METHOD(setValues:(NSDictionary *)values)
{
[_store addEntriesFromDictionary:values];
}
RCT_EXPORT_METHOD(getValues:(NSStringArray *)keys callback:(RCTResponseSenderBlock)callback)
{
NSDictionary *values = [_store dictionaryWithValuesForKeys:keys];
callback(@[values]);
}
RCT_EXPORT_METHOD(deleteValues:(NSStringArray *)keys)
{
[_store removeObjectsForKeys:keys];
}
@end
It (and the data in it) would persist for the lifetime of the bridge, but would not survive a cold app restart or a Cmd-R. Hope that helps!

@nicklockwood - couldn't you achieve the same with a global JS object, which has the same scope and life cycle as a bridge module? You'd then get a synchronous API and skip marshalling data across the bridge. I could be missing something. The entire DataStore.js could be /** @providesModule DataStore */, no code at all maybe.

@ide, yeah I guess so. Mine was more fun to write though ¯_(ツ)_/¯

A js solution would be great but what I have tried gave me no luck with
persistence lost on view change.

@iq-dot could you explain what you mean when you say "view change"?

As in for example I have a TabBar view and I switch tabs to which re-renders part of the view, which re-requires a module that I tried to use to hold a value in memory, which works as long as I am in the same view and it hasn't been replaced.
Could you show me an example @ide on what you are proposing? Do you mean something like this:
var DataStore = {
}

module.exports = DataStore

@iq-dot I've used flux to solve what I think is a similar problem to what you are describing.
Basically, I had a component on the parent level who was always alive and would need to get updates from a component deep in the route stack. I have the parent level component listening to a flux Store which is alive for life of the app. So when I am deep into the stack, I can send an action to update the store and notify my parent-level component of the changes.

Flux does sound appealing, I was actually unsure of integrating it with react-native in the beginning so it is nice to see someone using it.
Although for me not sure if I am able to integrate that into my app at this stage, I may have to delay that with more time in hand.

@iq-dot that DataStore module is what I had in mind. Two different components in the same React app will get the same copy of the module so they can use it to share data with each other.
It sounds like you are using a UITabBarController and multiple RCTRootViews if you are unable to share data between screens. In this case you could make all the root views share the same bridge, and then the RCTRootViews will share modules.

Yeah I had another go and I can solve it with a pure JS solution in my case.
Nicks idea is good for when you are dealing with multiple root views and flux I guess will be similar to the JS solution talked about here.
For now I could close this ticket and perhaps looking at a bridging module as part of a future extension? I am sure it would be useful not to touch AsyncStorage all the time.


pyzn/frontend add

User description
Notes for Reviewers
This PR fixes #
Signed commits

[*] Yes, I signed my commits.

PR Type
Enhancement, Documentation, Tests, Configuration changes, Styling, Formatting, Error handling

Description

Implemented numerous frontend components, including PackageStats, VersionDropdown, StatsControls, BadgeConfigurator, and more, enhancing the user interface and functionality.
Added comprehensive API documentation for accessing package download statistics.
Developed various pages such as the homepage, user profile, login, signup, and error pages, improving navigation and user experience.
Configured Sentry for error tracking and monitoring across client-side, server-side, and edge features.
Added extensive Cypress and Jest tests for ensuring functionality and reliability of the application.
Configured TypeScript, Tailwind CSS, PostCSS, ESLint, and Prettier for improved development workflow and code quality.
Introduced global CSS variables and styles for theming, along with specific styles for components like ads and tooltips.
Implemented error handling components and logic, including GlobalError and Sentry integration.

Changes walkthrough 📝
Relevant filesEnhancement77 files

population.tsAdd population data for various countries.

frontend/app/projects/[project]/components/population.ts
Added a new file containing a constant POPULATION with an array of country data.  Each country object includes name, code, and pop (population).

+742/-0

package-stats.tsxImplement package statistics component with data fetching.

frontend/app/projects/[project]/components/package-stats.tsx
Introduced a new component PackageStats for displaying package statistics.  Implemented functions to fetch download data and PyPI information.  Utilized various UI components like Tabs, Card, and Badge.

+258/-0

version-dropdown.tsxAdd version dropdown component with pattern matching.

frontend/app/projects/[project]/components/version-dropdown.tsx
Created a VersionDropdown component for selecting package versions.  Supports version pattern matching and multiple selections.  Integrated with UI components for better user interaction.

+276/-0

dropdown-menu.tsxAdd customizable dropdown menu component.

frontend/components/ui/dropdown-menu.tsx
Implemented a customizable dropdown menu component using Radix UI.  Supports various menu items like checkbox, radio, and submenus.

+200/-0

price.tsxCreate pricing component with subscription options.

frontend/app/pricing/components/price.tsx
Developed a pricing component displaying subscription plans.  Included subscription buttons with conditional rendering based on user status.

+179/-0

footer.tsxAdd footer component with social media links.

frontend/components/footer.tsx
Added a footer component with social media links and branding.  Included external links to GitHub and other platforms.

+74/-0

page.tsxAdd Sentry example page for error tracking.

frontend/app/sentry-example-page/page.tsx
Introduced a Sentry example page for testing error tracking.  Includes a button to trigger a sample error for demonstration.

+85/-0

stats-controls.tsxImplement stats controls component for display settings.

frontend/app/projects/[project]/components/stats-controls.tsx
Created StatsControls component for managing statistics display settings.  Includes options for category, view type, time range, and granularity.

+171/-0

select.tsxAdd select component for dropdown selections.

frontend/components/ui/select.tsx
Added a select component using Radix UI for dropdown selections.  Supports custom styling and various select options.

+160/-0

page.tsxCreate payment success page with verification.

frontend/app/payment/success/page.tsx
Developed a payment success page with verification logic.  Displays success message and options to navigate post-purchase.

+150/-0

api-keys.tsxAdd API keys management component for user profiles.

frontend/app/user/components/api-keys.tsx
Implemented API keys management component for user profiles.  Allows creation and display of API keys with copy functionality.

+158/-0

project-subscriptions.tsxImplement project subscriptions management component.

frontend/app/user/components/project-subscriptions.tsx
Added component for managing project subscriptions.  Supports unsubscribing from projects with confirmation dialog.

+150/-0

package-info.tsxAdd package info component with detailed information.

frontend/app/projects/[project]/components/package-info.tsx
Created PackageInfo component to display detailed package information.  Includes links to homepage, source code, and PyPI page.

+129/-0

page.tsxCreate user profile page with tabs and user data.

frontend/app/user/page.tsx
Developed user profile page with tabs for API keys, subscriptions, and projects.  Integrated user context for loading user data.

+51/-0

compute_downloads.tsxAdd functions for computing and aggregating download data

frontend/app/projects/[project]/helper/compute_downloads.tsx
Introduced functions to compute and aggregate download data.  Added logic to handle version-specific download data.  Implemented utility functions for date-based aggregation.

+163/-0

alert-dialog.tsxImplement alert dialog components with Radix UI

frontend/components/ui/alert-dialog.tsx
Added alert dialog components using Radix UI.  Implemented overlay, content, header, footer, and action components.

+141/-0

badge-configurator.tsxAdd badge configurator for package downloads

frontend/app/projects/[project]/components/badge-configurator.tsx
Created a badge configurator component for package downloads.  Added options for period and format selection.  Implemented clipboard copy functionality.

+128/-0

country-downloads-chart.tsxCreate D3 chart for country-specific download data

frontend/app/projects/[project]/components/country-downloads-chart.tsx
Implemented a D3-based chart for country-specific downloads.  Added tooltip functionality for displaying download percentages.

+116/-0

dialog.tsxImplement dialog components with Radix UI

frontend/components/ui/dialog.tsx
Added dialog components using Radix UI.  Included overlay, content, header, footer, and close button.

+123/-0

subscribe-button.tsxAdd subscribe button with API integration

frontend/components/subscribe-button.tsx
Added a subscribe button with loading and error states.  Implemented subscription logic with API integration.

+144/-0

page.tsxCreate login page with form and alerts

frontend/app/user/login/page.tsx
Implemented login page with form handling.  Added success and error alerts for user feedback.

+116/-0

ads.tsxAdd ad rendering component with fallback messaging

frontend/app/projects/[project]/components/ads.tsx
Added component to render ads with fallback messaging.  Implemented logic to handle ad loading and error states.

+117/-0

header.tsxAdd responsive header component with navigation

frontend/components/header.tsx
Created a header component with navigation links.  Implemented responsive design for mobile and desktop views.

+98/-0

verification-form.tsxCreate email verification form with error handling

frontend/app/user/signup/components/verification-form.tsx
Implemented email verification form with code input.  Added error handling and resend code functionality.

+106/-0

table.tsxAdd responsive table components

frontend/components/ui/table.tsx
Added table components with headers, body, and footer.  Implemented responsive design for table elements.

+117/-0

confirm-password-form.tsxCreate confirm password form with alerts

frontend/app/user/forgot-password/components/confirm-password-form.tsx
Implemented form for confirming password change.  Added error handling and success alerts.

+104/-0

logo.tsxAdd customizable logo component with SVG

frontend/components/logo.tsx
Added a logo component with customizable colors and size.  Implemented SVG rendering for the logo.

+30/-0

error.tsxCreate error page with suggestions and actions

frontend/app/projects/[project]/error.tsx
Implemented error page for project-related issues.  Added suggestions and actions for error resolution.

+86/-0

downloads-chart.tsxAdd line chart for download data visualization

frontend/app/projects/[project]/components/downloads-chart.tsx
Added a line chart for visualizing download data.  Implemented tooltip and legend for data representation.

+100/-0

subscriptions.tsxCreate subscription management component with billing

frontend/app/user/components/subscriptions.tsx
Implemented subscription management component.  Added billing management and plan details display.

+92/-0

UserContext.tsxAdd user context and reducer for authentication

frontend/app/user/UserContext.tsx
Added user context for managing authentication state.  Implemented reducer and actions for user state management.

+92/-0

signup-form.tsxCreate signup form with validation and alerts

frontend/app/user/signup/components/signup-form.tsx
Implemented signup form with input validation.  Added error handling and success alerts.

+100/-0

profile-header.tsxCreate profile header with sign-out functionality

frontend/app/user/components/profile-header.tsx
Implemented profile header with user information.  Added sign-out functionality with confirmation dialog.

+88/-0

page.tsxAdd newsletter subscription page with features

frontend/app/newsletter/page.tsx
Created newsletter subscription page with features.  Added subscription form and feature highlights.

+65/-0

app-bar-user-options..tsxAdd user options component for app bar

frontend/components/app-bar-user-options..tsx
Added user options component for app bar.  Implemented conditional rendering based on user state.

+82/-0

not-found.tsxCreate not-found page for missing packages

frontend/app/projects/[project]/not-found.tsx
Implemented not-found page for missing packages.  Added suggestions and actions for user navigation.

+60/-0

country-downloads.tsxAdd component for country-specific download data

frontend/app/projects/[project]/components/country-downloads.tsx
Added component to display country-specific download data.  Implemented data fetching and transformation logic.

+68/-0

search-bar.tsxAdd search bar with validation and tooltips

frontend/components/search-bar.tsx
Implemented search bar with validation and error handling.  Added tooltip for invalid package name input.

+77/-0

page.tsxAdd homepage with search and statistics

frontend/app/page.tsx
Created homepage with search and popular packages.  Added statistics and introductory content.

+54/-0

card.tsxAdd responsive card components

frontend/components/ui/card.tsx
Added card components with header, content, and footer.  Implemented responsive design for card elements.

+86/-0

app-bar-search-component.tsxAdd app bar search component with validation

frontend/components/app-bar-search-component.tsx
Implemented search component for app bar.  Added validation and error handling for search input.

+68/-0

recover-password-form.tsxCreate password recovery form with alerts

frontend/app/user/forgot-password/components/recover-password-form.tsx
Implemented form for password recovery.  Added error handling and success alerts.

+70/-0

page.tsxAdd project page for package statistics

frontend/app/projects/[project]/page.tsx
Implemented project page for displaying package stats.  Added data fetching and validation logic.

+71/-0

button.tsxAdd button component with variants and sizes

frontend/components/ui/button.tsx
Added button component with variant and size options.  Implemented utility for class variance authority.

+56/-0

alert.tsxAdd alert component with variants and subcomponents

frontend/components/ui/alert.tsx
Added alert component with variants for different states.  Implemented title and description subcomponents.

+60/-0

tabs.tsxAdd tabs component with list and content

frontend/components/ui/tabs.tsx
Added tabs component with list, trigger, and content.  Implemented responsive design for tab elements.

+55/-0

toggle-group.tsxAdd toggle group component with context

frontend/components/ui/toggle-group.tsx
Added toggle group component with item variants.  Implemented context for managing toggle state.

+61/-0

pro-dialog.tsxAdd Pro dialog with feature promotion

frontend/components/pro-dialog.tsx
Implemented dialog for promoting Pro features.  Added navigation to pricing page from dialog.

+52/-0

toggle.tsxAdd toggle component with variants and sizes

frontend/components/ui/toggle.tsx
Added toggle component with variant and size options.  Implemented utility for class variance authority.

+45/-0

interactive-tooltip.tsxAdd interactive tooltip component with state management

frontend/components/ui/interactive-tooltip.tsx
Added interactive tooltip component with state management.  Implemented customizable content and trigger.

+37/-0

radio-group.tsxImplement RadioGroup component with custom styling.

frontend/components/ui/radio-group.tsx
Added a RadioGroup component using Radix UI primitives.  Implemented a RadioGroupItem component with custom styling.  Utilized React.forwardRef for both components.

+44/-0

downloads-table.tsxAdd DownloadsTable component for displaying download data.

frontend/app/projects/[project]/components/downloads-table.tsx
Created DownloadsTable component to display download data.  Utilized table components for structured data representation.  Implemented dynamic table headers based on selected versions.

+47/-0

country-downloads-table.tsxCreate CountryDownloadsTable component for country-specific data.

frontend/app/projects/[project]/components/country-downloads-table.tsx
Introduced CountryDownloadsTable component for country-specific data.  Sorted country data by download count.  Rendered table with country and download information.

+46/-0

page.tsxAdd LoginPage for user password recovery process.

frontend/app/user/forgot-password/page.tsx
Implemented LoginPage for password recovery process.  Managed state transitions between recovery and verification steps.  Added logic for resending verification code.

+39/-0

page.tsxImplement SignupPage with signup and verification steps.

frontend/app/user/signup/page.tsx
Developed SignupPage with signup and verification steps.  Managed state transitions between signup and verification.  Included logic for resending verification code.

+40/-0

tooltip.tsxAdd Tooltip components with custom styling.

frontend/components/ui/tooltip.tsx
Created Tooltip components using Radix UI primitives.  Added TooltipContent with custom styling and animations.

+30/-0

switch.tsxImplement Switch component with custom styling.

frontend/components/ui/switch.tsx
Added Switch component using Radix UI primitives.  Implemented custom styling for switch states.

+29/-0

sign-in-to-subscribe-dialog.tsxAdd SignInToSubscribeDialog component for user prompts.

frontend/components/sign-in-to-subscribe-dialog.tsx
Created SignInToSubscribeDialog component for user prompts.  Included dialog with sign-in and cancel options.

+37/-0

badge.tsxAdd Badge component with variant styling.

frontend/components/ui/badge.tsx
Introduced Badge component with variant styling.  Utilized class-variance-authority for styling variants.

+37/-0

popular-packages.tsxAdd PopularPackages component for package navigation.

frontend/components/popular-packages.tsx
Implemented PopularPackages component for navigation.  Added buttons to navigate to popular package pages.

+39/-0

useDimension.tsAdd useDimensions hook for element size tracking.

frontend/components/useDimension.ts
Created useDimensions hook for element size tracking.  Implemented resize event listener for dynamic updates.

+36/-0

layout.tsxImplement RootLayout component for consistent page structure.

frontend/app/layout.tsx
Developed RootLayout component for consistent page structure.  Included Header, Footer, and analytics components.

+32/-0

subscribe-form.tsxAdd SubscribeForm component for user subscriptions.

frontend/components/subscribe-form.tsx
Added SubscribeForm component for user subscriptions.  Included input field and subscribe button.

+30/-0

versions_helper.tsAdd helper functions for version selection.

frontend/app/projects/[project]/helper/versions_helper.ts
Added helper functions for version selection.  Implemented logic to select stable versions.

+28/-0

input.tsxAdd Input component with custom styling.

frontend/components/ui/input.tsx
Created Input component with custom styling.  Utilized React.forwardRef for input element.

+26/-0

number_format.tsxAdd formatDownloads function for download formatting.

frontend/app/projects/[project]/helper/number_format.tsx
Implemented formatDownloads function for download formatting.  Added logic for formatting numbers with suffixes.

+24/-0

middleware.tsAdd middleware for handling API requests.

frontend/middleware.ts
Added middleware for handling API requests.  Configured request headers and authentication.

+28/-0

separator.tsxAdd Separator component with custom styling.

frontend/components/ui/separator.tsx
Introduced Separator component using Radix UI primitives.  Implemented custom styling for horizontal and vertical orientations.

+31/-0

label.tsxAdd Label component with variant styling.

frontend/components/ui/label.tsx
Created Label component with variant styling.  Utilized class-variance-authority for styling variants.

+26/-0

model.tsxDefine TypeScript interfaces for project data models.

frontend/app/projects/[project]/model.tsx
Defined TypeScript interfaces for project data models.  Included interfaces for version downloads and project details.

+39/-0

tooltip.tsxAdd Tooltip component with custom positioning.

frontend/app/projects/[project]/components/tooltip.tsx
Created Tooltip component with custom positioning.  Implemented tooltip visibility based on props.

+21/-0

downloads-color.tsAdd getDownloadColor function for color coding.

frontend/app/projects/[project]/helper/downloads-color.ts
Implemented getDownloadColor function for color coding.  Added logic to assign colors based on download count.

+10/-0

emoji.tsxAdd Emoji component for rendering emojis.

frontend/components/emoji.tsx
Created Emoji component for rendering emojis.  Included accessibility attributes for emojis.

+19/-0

utils.tsAdd utility function to load Stripe.

frontend/app/pricing/utils.ts
Implemented utility function to load Stripe.  Managed Stripe instance with a promise.

+11/-0

skeleton.tsxAdd Skeleton component for loading states.

frontend/components/ui/skeleton.tsx
Created Skeleton component for loading states.  Implemented pulse animation for skeleton effect.

+15/-0

route.tsAdd example API route to test Sentry error monitoring.

frontend/app/api/sentry-example-api/route.ts
Added example API route to test Sentry error monitoring.  Threw an error to trigger Sentry capture.

+9/-0

page.tsxAdd Home component for pricing page.

frontend/app/pricing/page.tsx
Implemented Home component for pricing page.  Rendered PublicPriceComponent for pricing details.

+12/-0

Documentation2 files

page.tsxCreate API documentation page for download statistics.

frontend/app/pyzn-api/page.tsx
Added API documentation page for accessing package download statistics.  Included details on authentication, rate limits, and example usage.

+229/-0

README.mdAdd README with Next.js project setup instructions.

frontend/README.md
Added initial setup instructions for a Next.js project.  Included commands for starting the development server.  Provided links to Next.js documentation and resources.

+34/-0

Tests6 files

compute_downloads.test.tsxAdd unit tests for download computation functions.

frontend/app/projects/[project]/helper/compute_downloads.test.tsx
Added unit tests for download computation functions.  Tests cover scenarios for retrieving total and specific downloads.

+107/-0

commands.tsAdd example custom commands for Cypress testing.

frontend/cypress/support/commands.ts
Added example custom commands for Cypress testing.  Provided structure for extending Cypress commands.

+37/-0

e2e.tsAdd support file for Cypress end-to-end tests.

frontend/cypress/support/e2e.ts
Added support file for Cypress end-to-end tests.  Imported custom commands for Cypress testing.

+20/-0

login.cy.tsAdd Cypress test for user login functionality.

frontend/cypress/e2e/login.cy.ts
Added Cypress test for user login functionality.  Tested login with valid credentials.

+13/-0

search_project.cy.tsAdd Cypress test for project search functionality.

frontend/cypress/e2e/search_project.cy.ts
Added Cypress test for project search functionality.  Tested navigation to project page after search.

+8/-0

example.jsonAdd fixture data for Cypress tests.

frontend/cypress/fixtures/example.json
Added fixture data for Cypress tests.  Included example data for mocking responses.

+5/-0

Dependencies1 files

package.jsonAdd package.json with dependencies and scripts.

frontend/package.json
Added package.json with project dependencies and scripts.  Includes various libraries for UI, testing, and development.

+83/-0

Styling2 files

globals.cssDefine global CSS variables and base styles

frontend/app/globals.css
Defined global CSS variables for theming.  Added base styles for light and dark modes.

+84/-0

ads.cssAdd CSS styles for ad components with dark mode

frontend/app/projects/[project]/components/ads.css
Added CSS styles for ad components.  Implemented dark mode support for ads.

+85/-0

Configuration changes14 files

tailwind.config.tsConfigure Tailwind CSS with custom themes and plugins

frontend/tailwind.config.ts
Configured Tailwind CSS with custom themes and plugins.  Added support for dark mode and animations.

+90/-0

next.config.jsConfigure Next.js with redirects and Sentry integration

frontend/next.config.js
Configured Next.js with custom redirects and rewrites.  Integrated Sentry for error tracking and monitoring.

+70/-0

sentry.client.config.tsConfigure Sentry for client-side error tracking.

frontend/sentry.client.config.ts
Configured Sentry for client-side error tracking.  Set up Sentry initialization with DSN and integrations.

+31/-0

tsconfig.jsonConfigure TypeScript settings for the project.

frontend/tsconfig.json
Configured TypeScript settings for the project.  Set compiler options and module resolution paths.

+28/-0

sentry.edge.config.tsConfigure Sentry for edge features in the project.

frontend/sentry.edge.config.ts
Configured Sentry for edge features in the project.  Set up Sentry initialization with DSN and sampling rate.

+16/-0

sentry.server.config.tsConfigure Sentry for server-side error tracking.

frontend/sentry.server.config.ts
Configured Sentry for server-side error tracking.  Set up Sentry initialization with DSN and sampling rate.

+15/-0

jest.config.mjsConfigure Jest for testing in Next.js environment.

frontend/jest.config.mjs
Configured Jest for testing in a Next.js environment.  Set up Jest configuration with Next.js integration.

+17/-0

components.jsonAdd configuration for UI components and aliases.

frontend/components.json
Added configuration for UI components and aliases.  Defined Tailwind CSS settings and component paths.

+20/-0

cypress.config.tsConfigure Cypress for end-to-end testing.

frontend/cypress.config.ts
Configured Cypress for end-to-end testing.  Set up environment variable loading with dotenv.

+15/-0

instrumentation.tsAdd instrumentation setup for Sentry.

frontend/instrumentation.ts
Added instrumentation setup for Sentry.  Configured Sentry registration for different runtimes.

+13/-0

constants.tsDefine constant for API host URL.

frontend/app/constants.ts
Defined constant for API host URL.  Included commented alternative local URL.

+2/-0

postcss.config.jsConfigure PostCSS with autoprefixer and Tailwind CSS.

frontend/postcss.config.js
Configured PostCSS with autoprefixer and Tailwind CSS.  Set up plugins for CSS processing.

+6/-0

.eslintrc.jsonAdd ESLint configuration for Next.js.

frontend/.eslintrc.json
Added ESLint configuration for Next.js.  Extended core web vitals rules.

+3/-0

.prettierrcAdd empty Prettier configuration file.

frontend/.prettierrc

Added empty Prettier configuration file.

+1/-0

Error handling1 files

global-error.tsxAdd GlobalError component for error handling.

frontend/app/global-error.tsx
Implemented GlobalError component for error handling.  Integrated Sentry for capturing exceptions.

+27/-0

Formatting4 files

footer.module.cssAdd CSS styles for footer component.

frontend/components/footer.module.css
Added CSS styles for footer component.  Included responsive image styling.

+25/-0

tooltip.module.cssAdd CSS styles for tooltip component.

frontend/app/projects/[project]/components/tooltip.module.css
Added CSS styles for tooltip component.  Defined tooltip positioning and background color.

+6/-0

page.module.cssAdd CSS styles for page layout.

frontend/app/page.module.css
Added CSS styles for page layout.  Defined header and main section styling.

+13/-0

ads.module.cssAdd CSS styles for advertisement container.

frontend/app/projects/[project]/components/ads.module.css
Added CSS styles for advertisement container.  Defined dimensions and centering for ads.

+6/-0

Additional files (token-limit)2 files

package-lock.json...

frontend/package-lock.json
...

+21432/-1

world.ts...

frontend/app/projects/[project]/components/world.ts
...

+1383/-1

💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

Summary by CodeRabbit
Release Notes

New Features

Introduced a new ESLint configuration for improved code quality.
Added a .gitignore file to maintain a clean repository by excluding unnecessary files.
Created a README.md file providing essential project setup and usage information.
Implemented a global error handling component for better user experience during errors.
Added a newsletter subscription component to engage users.
Introduced a payment success page to enhance user feedback post-transaction.
Developed a pricing component to display subscription options.
Launched a tooltip component for enhanced user guidance.
Added a profile page for user account management.

Bug Fixes

Resolved issues related to user state management and error handling.

Documentation

Updated README for better clarity on project setup and usage.
Enhanced API documentation for improved user understanding.

Style

Improved styling for various components to enhance user experience and responsiveness.

Tests

Added unit tests for new components and functionality to ensure reliability.

Size Change: 0 B 🆕
Total Size: 0 B
compressed-size-action

It looks like this PR is very large (over 1000 lines). Try to avoid addressing multiple issues in a single PR, and in the future consider breaking large tasks down into smaller steps. This it to make reviewing, testing, reverting and general quality management easier.

It looks like this PR is very large (over 1000 lines). Try to avoid addressing multiple issues in a single PR, and in the future consider breaking large tasks down into smaller steps. This it to make reviewing, testing, reverting and general quality management easier.

It looks like this PR is very large (over 1000 lines). Try to avoid addressing multiple issues in a single PR, and in the future consider breaking large tasks down into smaller steps. This it to make reviewing, testing, reverting and general quality management easier.

It looks like this PR is very large (over 1000 lines). Try to avoid addressing multiple issues in a single PR, and in the future consider breaking large tasks down into smaller steps. This it to make reviewing, testing, reverting and general quality management easier.

It looks like this PR is very large (over 1000 lines). Try to avoid addressing multiple issues in a single PR, and in the future consider breaking large tasks down into smaller steps. This it to make reviewing, testing, reverting and general quality management easier.

It looks like this PR is very large (over 1000 lines). Try to avoid addressing multiple issues in a single PR, and in the future consider breaking large tasks down into smaller steps. This it to make reviewing, testing, reverting and general quality management easier.

It looks like this PR is very large (over 1000 lines). Try to avoid addressing multiple issues in a single PR, and in the future consider breaking large tasks down into smaller steps. This it to make reviewing, testing, reverting and general quality management easier.


[DOC] - How to deploy Nebari on an existing Kubernetes cluster

Preliminary Checks

[X] This issue is not a question, feature request, RFC, or anything other than a bug report. Please post those things in GitHub Discussions: https://github.com/nebari-dev/nebari/discussions

Summary
Create a new how-to-guide. We can take relevant sections from: https://github.com/nebari-dev/nebari-docs/pull/113
Steps to Resolve this Issue

...

This looks like a duplicate of https://github.com/nebari-dev/nebari-docs/issues/108

Thanks for the cross-ref!
#108 was the original issue, and we decided to narrow its scope to this to make it a "good-first-issue". The issue we're on (#256) can then track actually writing the how-to page.
I think we can update the title in #108 to make this clear. :)


Streams over single values do not emit null values

As mentioned in #320, Streams over a single value like the one in the following example do not update if it returns no result:
@Query('SELECT * FROM Person WHERE id = :id')
Stream<Person> findPersonById(int id);

So if the person with the matching id is deleted, the Stream will re-execute the query but will not propagate the null result.
As this is this way to emulate Rooms behaviour then there are three actions we can take (and I think we should take at least one of them):

Document the current behaviour (streams over single events only appear in examples but not in the section about streams
Add an option to the @Query annotation which enables null propagation/emission
Emit null values by default.

Currently I'm leaning towards 1+2 for having backwards compatibility and the option to return empty entries.

Your first point sounds great. I'll open a PR in a bit to add proper documentation. About the second and third, I would prefer to wait until Dart's non-nullable types arrive as the feature doesn't seem to be too urgent. This way, we can make use of the type system to infer if nulls should be propagated. Nullable types will have to be marked with ? whereas non-nullable types will stay the same.
What are your thoughts about this?
@Query('SELECT * FROM Person WHERE id = :id')
Stream<Person?> findPersonById(int id); // emits null when no person found

@Query('SELECT * FROM Person WHERE id = :id')
Stream<Person> findPersonById(int id); // never emits null


Redis cluster client fix

JeidsCluser is broken in the current versions of the conductor. JedisCluster client can be used instead of Jedis pool in case of Redis cluster persistence.

@apanicker-nflx Can you please review this pull request. We use the Redis cluster.


Add test_util.cluster.TestCluster

This is a series of refactors and fixups in support of #648.

You me and @mellenburg should probably have a meeting with this. These wrappers are in the process of being rewritten / replaced: https://github.com/dcos/dcos/pull/240

:+1: This layer of abstraction just covers the essential scripting of getting the installer to work automatically and won't cause terrible conflicts. I don't see any friction between this and the provider API changes.

Great, thanks for taking a look @mellenburg. LMK of course if you run into any problems trying to merge your changes in #240 (and related) with this. You might end up flushing out some bad design decisions that I didn't consider closely enough.
@cmaloney PTAL

Overall looking good, #240 is landing in the next train, I'd like to if we're formalizing up the "Cluster" interface vs. the "CCM VPC" interface a bit more try and solidify that (There's a VPC class which has a certain assumed API, including things like the "get Host() objects", "delete()") so that this is drawing that line more clearly. Also makes it easier to do things like #310 (that just provides an alternate Vpc implementation)

@cmaloney I'm still ushering this through the vagrant test, but it's ready for another look.

@cmaloney Ready for review.

🚢 . Please squash into one big commit and then we'll land it


Crafter Terminal Dupe Glitch

Hello, I love this mod but I've had one problem with it! But first I would like to mention this is being used in the modpack Create Above and Beyond. The problem is when two players are looking in a crafting terminal and someone requests to pull something into it, if both players try to take it out around the same time, both players will get the item! I don't know if this is becuase of the mod itself of the mod pack but either way I figured its important for both parties to be aware of this issue. This is quite concerning becuase I am a server Admin and short of banning crafting terminals, theres really nothing I can do to prevent this glitch from being used aside from my urging to destroy any items made by it! I hope to see the issue fixed soon and I thank you in advance for your help!

Uuuh, this issue should have been fixed in 1.9.6. What version of the mod are you using?

Oh! I apologise for the bug report then, I am not aware of the exact version but it is apart of the Create Above and Beyond Modpack which hasn't had a significant update in a while due to the extensive modding of mods that they have done! At this point I guess I am just waiting for them to update it then, unfortunetly I don't know if that will come becuase with the way the mod pack words that would be a decent amount of work.

Just checking the CurseForge page:
Create Above and Beyond v1.3 is the most recent file.
Checking the manifest, it looks like it's using file ID 3472990.

{"projectID":376737,"fileID":3472990,"required":true}

That matches up with PrettyPipes-1.9.5.jar.

Strange I'm still having the problem, I will check my version but I think thats what I have installed!

Hi! Can you try to reproduce this issue in the 1.18 or 1.19 versions of the mod? I thought I'd backported the fix, but maybe the original fix also doesn't actually work.

I can check, I have to get a server running and a friend to test it but I can do that!

I'm sorry I have been very busy but I havn't forgotten, I will check this soon!


Separate VM from Hint Execution: Phase 3 (Refactor ExecScopes into HashMap of Any)

[x] Refactor ExecScopes to hold Any instead of PyValueType
[x] Remove all instances of PyValueType
[x] Make genericinsert_valuefor ExecScopeProxy (replacing insert_int and insert_list)
[x] Fix affected functions & Tests
This PR depends on #359

Codecov Report

Merging #361 (43f00bd) into exec-scopes-proxy (7c164c0) will decrease coverage by 0.12%.
The diff coverage is 90.16%.

@@                  Coverage Diff                  @@
##           exec-scopes-proxy     #361      +/-   ##
=====================================================
- Coverage              97.83%   97.70%   -0.13%
=====================================================
  Files                     43       43
  Lines                  12041    12028      -13
=====================================================
- Hits                   11780    11752      -28
- Misses                   261      276      +15

Impacted Files
Coverage Δ

src/utils.rs
97.91% <ø> (ø)

src/types/exec_scope.rs
80.58% <72.63%> (-4.76%)
:arrow_down:

src/vm/hints/usort.rs
95.12% <77.77%> (-3.69%)
:arrow_down:

src/vm/hints/dict_hint_utils.rs
100.00% <100.00%> (ø)

src/vm/hints/execute_hint.rs
100.00% <100.00%> (ø)

src/vm/hints/find_element_hint.rs
98.66% <100.00%> (-0.02%)
:arrow_down:

src/vm/hints/hint_utils.rs
90.66% <100.00%> (-0.13%)
:arrow_down:

src/vm/hints/memset_utils.rs
100.00% <100.00%> (ø)

src/vm/hints/secp/bigint_utils.rs
100.00% <100.00%> (ø)

src/vm/hints/secp/ec_utils.rs
100.00% <100.00%> (ø)

... and 4 more

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