type str doesn't define round method[Bug]

Describe the bug
Running the COlab vs,
To Reproduce
Steps to reproduce the behavior:

run code and go to browser
GUI loads properly
try promps or use tool and outpaint
type str doesn't define round method

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):

OS: [e.g. windows]
Browser [e.g. chrome]

Additional context
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/gradio/routes.py", line 299, in run_predict
fn_index, raw_input, username, session_state, iterators
File "/usr/local/lib/python3.7/dist-packages/gradio/blocks.py", line 787, in process_api
inputs = self.preprocess_data(fn_index, inputs, state)
File "/usr/local/lib/python3.7/dist-packages/gradio/blocks.py", line 682, in preprocess_data
processed_input.append(block.preprocess(raw_input[i]))
File "/usr/local/lib/python3.7/dist-packages/gradio/components.py", line 530, in preprocess
return self._round_to_precision(x, self.precision)
File "/usr/local/lib/python3.7/dist-packages/gradio/components.py", line 494, in _round_to_precision
return int(round(num, precision))
TypeError: type str doesn't define round method
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/gradio/routes.py", line 299, in run_predict
fn_index, raw_input, username, session_state, iterators
File "/usr/local/lib/python3.7/dist-packages/gradio/blocks.py", line 787, in process_api
inputs = self.preprocess_data(fn_index, inputs, state)
File "/usr/local/lib/python3.7/dist-packages/gradio/blocks.py", line 682, in preprocess_data
processed_input.append(block.preprocess(raw_input[i]))
File "/usr/local/lib/python3.7/dist-packages/gradio/components.py", line 530, in preprocess
return self._round_to_precision(x, self.precision)
File "/usr/local/lib/python3.7/dist-packages/gradio/components.py", line 494, in _round_to_precision
return int(round(num, precision))
TypeError: type str doesn't define round method
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/gradio/routes.py", line 299, in run_predict
fn_index, raw_input, username, session_state, iterators
File "/usr/local/lib/python3.7/dist-packages/gradio/blocks.py", line 787, in process_api
inputs = self.preprocess_data(fn_index, inputs, state)
File "/usr/local/lib/python3.7/dist-packages/gradio/blocks.py", line 682, in preprocess_data
processed_input.append(block.preprocess(raw_input[i]))
File "/usr/local/lib/python3.7/dist-packages/gradio/components.py", line 530, in preprocess
return self._round_to_precision(x, self.precision)
File "/usr/local/lib/python3.7/dist-packages/gradio/components.py", line 494, in _round_to_precision
return int(round(num, precision))
TypeError: type str doesn't define round method
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/gradio/routes.py", line 299, in run_predict
fn_index, raw_input, username, session_state, iterators
File "/usr/local/lib/python3.7/dist-packages/gradio/blocks.py", line 787, in process_api
inputs = self.preprocess_data(fn_index, inputs, state)
File "/usr/local/lib/python3.7/dist-packages/gradio/blocks.py", line 682, in preprocess_data
processed_input.append(block.preprocess(raw_input[i]))
File "/usr/local/lib/python3.7/dist-packages/gradio/components.py", line 530, in preprocess
return self._round_to_precision(x, self.precision)
File "/usr/local/lib/python3.7/dist-packages/gradio/components.py", line 494, in _round_to_precision
return int(round(num, precision))
TypeError: type str doesn't define round method
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/gradio/routes.py", line 299, in run_predict
fn_index, raw_input, username, session_state, iterators
File "/usr/local/lib/python3.7/dist-packages/gradio/blocks.py", line 787, in process_api
inputs = self.preprocess_data(fn_index, inputs, state)
File "/usr/local/lib/python3.7/dist-packages/gradio/blocks.py", line 682, in preprocess_data
processed_input.append(block.preprocess(raw_input[i]))
File "/usr/local/lib/python3.7/dist-packages/gradio/components.py", line 530, in preprocess
return self._round_to_precision(x, self.precision)
File "/usr/local/lib/python3.7/dist-packages/gradio/components.py", line 494, in _round_to_precision
return int(round(num, precision))
TypeError: type str doesn't define round method
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/gradio/routes.py", line 299, in run_predict
fn_index, raw_input, username, session_state, iterators
File "/usr/local/lib/python3.7/dist-packages/gradio/blocks.py", line 787, in process_api
inputs = self.preprocess_data(fn_index, inputs, state)
File "/usr/local/lib/python3.7/dist-packages/gradio/blocks.py", line 682, in preprocess_data
processed_input.append(block.preprocess(raw_input[i]))
File "/usr/local/lib/python3.7/dist-packages/gradio/components.py", line 530, in preprocess
return self._round_to_precision(x, self.precision)
File "/usr/local/lib/python3.7/dist-packages/gradio/components.py", line 494, in _round_to_precision
return int(round(num, precision))
TypeError: type str doesn't define round method

same issue

Also encountering the same issue.  Using the local version on Windows 10.


Add docker network command

Reference: https://docs.docker.com/engine/reference/commandline/network/
Proposed initial syntax (more can be added in future):

Command: docker network create networkName

docker:
  description: "Create a network"
  network:
    name: networkName

Command: docker network rm networkName

docker:
  description: "Delete a network"
  network:
    name: networkName
    absent: false

Command: docker network connect networkName containerA containerB

docker:
  description: "Add container to a network"
  network:
    name: networkName
    connected:
    - containerA
    - containerB

Command: docker network disconnect networkName containerA containerB

docker:
  description: "Disconnect container from a network"
  network:
    name: networkName
    disconnected:
    - containerA
    - containerB

Command: docker network disconnect -f networkName containerA containerB

docker:
  description: "Force container disconnect on a network"
  network:
    name: networkName
    disconnected:
    - containerA
    - containerB
    force: true

The network command can be useful to create/delete a network and associated them with containers.

Nice!  In each section/example above, can we add the corresponding docker cli command that the syntax would translate into?  It would help me comprehend :)
The network command and the volume command (https://github.com/getporter/docker-mixin/issues/35) are tricky in that they both have sub-commands, unlike, say, docker pull, etc.
Would we want to support the full suite of docker network actions/sub-commands besides create/delete/connect?  Such as prune, inspect, rm, etc.?
If so, thoughts on how to represent in syntax?  Should we have a dedicated section for command (or something similar)?  E.g.,
docker:
  description: "Remove all unused networks"
  network:
    command: prune
    force: true

(Similar thoughts apply to https://github.com/getporter/docker-mixin/issues/35)

Nice! In each section/example above, can we add the corresponding docker cli command that the syntax would translate into? It would help me comprehend :)

I added the commands.

Would we want to support the full suite of docker network actions/sub-commands besides create/delete/connect? Such as prune, inspect, rm, etc.?

If we want to support all the possible commands, well, I guess, we should have another approach to handle them without too much complexity for the end-user. I created those issues to talk about the correct design. And what you suggested could go in this direction, let me try to adapt the above examples with your approach. Like that, we'll have examples for both designs:

Command: docker network create networkName

docker:
  description: "Create a network"
  network:
    command: create
    name: networkName

Command: docker network rm networkName

docker:
  description: "Delete a network"
  network:
    command: rm
    name: networkName

Command: docker network connect networkName containerA containerB

docker:
  description: "Add container to a network"
  network:
    command: connect
    name: networkName
    containers:
   - containerA
   - containerB

Command: docker network disconnect networkName containerA containerB

docker:
  description: "Disconnect container from a network"
  network:
    command: disconnect
    name: networkName
    containers:
   - containerA
   - containerB

Command: docker network disconnect -f networkName containerA containerB

docker:
  description: "Force container disconnect on a network"
  network:
    command: disconnect
    name: networkName
    containers:
   - containerA
   - containerB
    force: true

@jaudiger thanks for adding the commands in-line -- super helpful.
I do think, even if we don't implement all of the network sub-commands in a first PR, we design things such that more could be added.  Somehow my initial suggestion of command: <command> doesn't feel perfect... I wonder if we just make it top-level, e.g.
docker:
  description: "Force container disconnect on a network"
  network:
    disconnect:
      name: networkName
      containers:
      - containerA
      - containerB
      force: true

I have a feeling that doing so might help keep each (sub-)command's schema distinct from others... though that's just a hunch as I haven't looked at what the updated schema is like.
These are just thoughts/suggestions, though.  Happy to learn about what you're leaning towards as well.

My feedbacks about the three approaches (list in the same order as inside this issue):

Pros: The command is hidden, it can help people who don't know how the CLI of docker is working. They don't need to be aware of the subcommands. But in my opinion, the persons that will use this mixin will not be new to the docker world.
Cons: If we need to add more commands in the future, it could be painful. And since we don't have a specific schema for a subcommand, we will have to check the arguments provided and if they are correct for the current "pattern".

Pros: Here we have the sub-commands, and I think for people already knowing Docker, it will not look like as magic as in the first option. If we want to support a new subcommand, it will be much easier.
Cons: As the first option, since we don't have a specific schema for a subcommand, we will have to check the arguments provided and if they are correct for the current command.

Pros: This time, we can have a specific schema for the subcommand. And arguments checking will just be a question of checking if we are able to deserialize the yaml. Adding a new command is just a matter of adding a new structure.
Cons: Should we allow multiple subcommands? I would tend to say no, but it's just my personal opinion. Since we will have to check it when we will deserialize the yaml.

Example:
docker:
  description: "Force container disconnect on a network"
  network:
    connect:
      name: networkName
      containers:
      - containerA
      - containerB
    disconnect:
      name: networkName
      containers:
      - containerA
      - containerB
      force: true

Should we allow multiple subcommands?

I agree, I don't think we should allow multiple subcommands under one network invocation.
I'm still leaning towards 3, with direct mapping of yaml fields to docker network subcommands/args, for clarity/easy comprehension.  I find the approach in 1, employing a bit more magic, as well as yaml fields that don't map directly to docker command flags, less immediately clear.

I'm still leaning towards 3, with direct mapping of yaml fields to docker network subcommands/args, for clarity/easy comprehension. I find the approach in 1, employing a bit more magic, as well as yaml fields that don't map directly to docker command flags, less immediately clear.

I tend to the same conclusion. My favorite approach is the last one. Since it's easier to understand and to expand for future commands.


the java generator is generating bad maven coordinates in gradle

What happened?
A customer reported:

Haven’t dug too much into this yet but the java generator is generating bad maven coordinates in gradle:
implementation("com.pulumi:pulumi:v0.2.1")

Steps to reproduce
wip
Expected Behavior
valid maven coordinate in gradle
Actual Behavior
INVALID maven coordinate in gradle
Versions used
No response
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

Thank you for the report. I'm trying to reproduce.
running pulumi new java-gradle gives me this in app/build.gradle
dependencies {
    implementation 'com.pulumi:pulumi:(,1.0]'
}

and it makes sense, since it is using templates/java-gradle/app/build.gradle
It appears that the bug is localized to code using pkg/codegen/java/build.gradle.template
and the fix might be:

I'll try to find a way to reproduce this and test the patch against it.

Here is a repro.
Download 0.2.1 from GitHub releases.
Extract pulumi-java-gen from the release.
Generate some code:
pulumi-java-gen generate \
    --schema https://raw.githubusercontent.com/pulumi/pulumi-random/v4.6.0/provider/cmd/pulumi-resource-random/schema.json --out o --version 1.2.3

Observe
$ cat o/build.gradle | grep 2.1
implementation("com.pulumi:pulumi:v0.2.1")

Desired:
implementation("com.pulumi:pulumi:0.2.1")

This is coming from the feature where if not given --sdk it assumes it should link to an SDK that matches the version of pulumi-java-gen itself, but it must strip the v.

I'd like to see further testing, I don't believe the patch fixes it as it's off the affected code path. You need to generate a binary that responds with v0.2.2 or similar to version not one that responds with 0.2.2 without a v, because that's what's happening in release builds (and seems correct, pulumi version also has a v).

Ah never mind, I tested and it works somehow.

pulumi version

From what I've observed, pulumictl get version is not returning v (at least the one I have):
$ pulumictl get version --tag-pattern '^pkg'
0.2.2-alpha.1653557926+6086b126

$ pulumictl version
0.0.31

To test the patch I've modified Makefile to add the v to see if the patch works and it worked.
Not sure when and why the v got dropped but unpatched main at the time of testing yday also worked correctly.
The merged patch will guard us against any changes in the future because it normalizes the input.

Interestingly, when I go back to the commit tagged with pkg/v0.2.1 the version from pulumi-java-gen version, I can't repro:
$ git status
HEAD detached at 024a09f7dfe
nothing to commit, working tree clean
$ make bin/pulumi-java-gen; bin/pulumi-java-gen version
make: `bin/pulumi-java-gen' is up to date.
0.2.1

There must be something special about the binary we release vs the binary we build locally.
I suspect the goreleaser change introduced at ab602d77:
  ldflags:
    - -X github.com/pulumi/pulumi-java/pkg/version.Version={{.Tag}}

It does not use pulumictl.
The Makefile uses:
	-ldflags "-X github.com/pulumi/pulumi-java/pkg/version.Version=$(shell pulumictl get version --tag-pattern '^pkg')" github.com/pulumi/pulumi-java/pkg/cmd/pulumi-java-gen

It looks like gorelease introduces at least one significant difference between what we test and what we release.


Code Quality Sub Par

The email validation code quality is sub par. There are return statements strewn all throughout the code. The methods IsValidEmail() and DomainMapper() are both modifying a single private variable. They kind of have to, because DomainMapper() is passed as a function to Regex.Replace().
I was looking for some ready-made email validation, but I'm not about to copypaste this into my project. If I do, then that means I'll have to maintain it. I tried to refactor it, but it's too much effort already. This is one can of worms I'm not about to open up.
Microsoft needs to realize that some people will use this in production code. And this is what creates a world of messy, unmaintainable code, which in turn leads to failed projects.
You guys need to start setting better examples.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 202e3f9f-a12a-53de-9069-fd469e3dbebc
Version Independent ID: fd3699bb-4881-b6b4-1275-43eed3d5f626
Content: How to: Verify that Strings Are in Valid Email Format
Content Source: docs/standard/base-types/how-to-verify-that-strings-are-in-valid-email-format.md
Product: dotnet
GitHub Login: @rpetrusha
Microsoft Alias: ronpet

Hi! Thanks for the feedback. I agree with you. This could should be tightened up and redesigned perhaps using more modern C# approaches that eliminate the need for that extra variable and make it more portable.
As you can see from the other comments, this article has been talked about a lot. The point of the article is to teach about RegEx and not necessarily about parsing email addresses. Although, since this is an example of that, it should do it well and clean.
Again, thank you for the feedback. I feel like changing this would be a fun diversion for me, unless you wanted to do it yourself. This code is taken from a snippet located here:
https://github.com/dotnet/samples/blob/master/snippets/csharp/VS_Snippets_CLR/RegularExpressions.Examples.Email/cs/example4.cs

@jwbats Hi! Would you like to review the code change? https://github.com/dotnet/samples/pull/504


ZCL_EXCEL_WRITER_XLSM - Does not handle charts built dynamically

I have created an ABAP report, which does the following:-

Reads data from SAP.
Opens a blank Macro enabled (*.xlsm) spreadsheet with some VBA code.
Adds a sheet to the spreadsheet from the data read from SAP.
Builds a chart based on the data just added.
Saves the spreadsheet.

The class ZCL_EXCEL_WRITER_XLSM does not seem to be able handle create charts created dynamically by my code, whereas ZCL_EXCEL_WRITER_2007 does work (when creating *.xlsx files).
This issue occurs when processing a document that creates charts, during the “CREATE” step 12, the lv_content = lo_drawing->get_media() returns a blank XString.
The coding is slightly different in the two classes. The code from ZCL_EXCEL_WRITER_2007 needs porting to ZCL_EXCEL_WRITER_XLSM.
I have manually done this in my system, and it corrects the problem.
ZCL_EXCEL_WRITER_XLSM
**********************************************************************
* STEP 12: Add charts
  lo_iterator = me->excel->get_drawings_iterator( zcl_excel_drawing=>type_chart ).
  WHILE lo_iterator->if_object_collection_iterator~has_next( ) EQ abap_true.
    lo_drawing ?= lo_iterator->if_object_collection_iterator~get_next( ).

    lv_content = lo_drawing->get_media( ).
    lv_value = lo_drawing->get_media_name( ).
    CONCATENATE 'xl/charts/' lv_value INTO lv_value.
    lo_zip->add( name    = lv_value
                 content = lv_content ).
  ENDWHILE.

ZCL_EXCEL_WRITER_2007
**********************************************************************
* STEP 12: Add charts
  lo_iterator = me->excel->get_drawings_iterator( zcl_excel_drawing=>type_chart ).
  while lo_iterator->if_object_collection_iterator~has_next( ) eq abap_true.
    lo_drawing ?= lo_iterator->if_object_collection_iterator~get_next( ).

    lv_content = lo_drawing->get_media( ).

    "-------------Added by Alessandro Iannacci - Only if template exist
    if lv_content is not initial and me->excel->use_template eq abap_true.
      lv_value = lo_drawing->get_media_name( ).
      concatenate 'xl/charts/' lv_value into lv_value.
      lo_zip->add( name    = lv_value
                   content = lv_content ).
    else. "ADD CUSTOM CHART!!!!
      lv_content = me->create_xl_charts( lo_drawing ).
      lv_value = lo_drawing->get_media_name( ).
      concatenate 'xl/charts/' lv_value into lv_value.
      lo_zip->add( name    = lv_value
                   content = lv_content ).
    endif.
    "-------------------------------------------------
  endwhile.

Example Code:-
Works:
lcl_output=>output( cl_excel = lo_excel ).

Does Not Work
 lcl_output=>output( cl_excel = lo_excel iv_writerclass_name = 'ZCL_EXCEL_WRITER_XLSM' ).

Where lcl_output is the one contained in the ZDEMO_EXCEL_OUTPUTOPT_INCL include.

I'll handle this in the near future.
I've been aligning XLSM and 2007-Writers in the past already - but I didn't touch the method "CREATE" yet.
Basically I'm going to change the code to first call the super->create( ) and then do all the stuff necessary for the xlsm-creation.
@Paul:  Are you able to provide your ( or a slightly modified version that runs on any system ) demoprogram that causes the error?  I just set my emailaddress to public for this and will set it to private again if I receive a mail from you - thank you in advance

Hi Stefan,
I’ll knock up a demo program as soon as I get a chance and email it over to you.
Regards
Paul
From: Stefan Schmöcker<EMAIL_ADDRESS>Sent: 01 August 2015 08:25
To: ivanfemia/abap2xlsx
Cc: Paul Graylish
Subject: Re: [abap2xlsx] ZCL_EXCEL_WRITER_XLSM - Does not handle charts built dynamically (#392)
I'll handle this in the near future.
I've been aligning XLSM and 2007-Writers in the past already - but I didn't touch the method "CREATE" yet.
Basically I'm going to change the code to first call the super->create( ) and then do all the stuff necessary for the xlsm-creation.
@Paulhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Paul&d=AwMCaQ&c=Gg3N3vg0GEGCJtCwojHcbnJ9Qbwk-lEDmU3R1kelhJ0&r=XYmgzDI3xZIJimt8YTZYYolRx-KFPD0lY-Ead8O-FQg&m=EWCd2tNQl1FY-mPKtEppIM4K4SZpk1v2_CtFHZlQYuQ&s=mjRn17mbS0ugRZoVvQ_0h1V8-nnNjONIL_n56fovvxg&e=: Are you able to provide your ( or a slightly modified version that runs on any system ) demoprogram that causes the error? I just set my emailaddress to public for this and will set it to private again if I receive a mail from you - thank you in advance
—
Reply to this email directly or view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_ivanfemia_abap2xlsx_issues_392-23issuecomment-2D126877899&d=AwMCaQ&c=Gg3N3vg0GEGCJtCwojHcbnJ9Qbwk-lEDmU3R1kelhJ0&r=XYmgzDI3xZIJimt8YTZYYolRx-KFPD0lY-Ead8O-FQg&m=EWCd2tNQl1FY-mPKtEppIM4K4SZpk1v2_CtFHZlQYuQ&s=U8Or9khJp8NvrBZ2Ec8R1CYNFhS9Lc0J3iaP8se17IY&e=.
============================================================================================================================================
This Email together with any attachments is confidential and intended solely for the Person to whom it is addressed. The unauthorised use, distribution, copying or alteration of the Email is forbidden and may be unlawful. If you have received this in error, please advise the sender immediately by returning the Email and then delete it from your system.
As Internet communications are not secure, Martin-Baker Aircraft Company Limited does not accept legal responsibility for the contents of this Email or attachments. Furthermore, you should carry out such Virus and other checks as considered appropriate to ensure that the opening and/or use of this Email and any attachments do not adversely affect other systems or data, for which Martin-Baker Aircraft Company Limited can accept no legal responsibility.
Martin-Baker Aircraft Company Ltd, Registered No. (England) 868042, Registered Office Lower Road, Higher Denham, near Uxbridge, Middlesex, UB9 5AJ.

Hi Stefan,
Here’s a quick sample.
For this to work you will need a copy of the TestMacro.xlsm (or any other macro enabled workbook).
Part of the reason why I need to be able to do this is because I need to build charts in Excel with multiple data series and different scales. ABAP2XLSX currently only supports one scale, so I’ll be creating a macro enabled workbook with the required code to add the extra series/scales.
Regards
Paul
From: Paul Graylish
Sent: 03 August 2015 08:20
To: 'ivanfemia/abap2xlsx'; ivanfemia/abap2xlsx
Subject: RE: [abap2xlsx] ZCL_EXCEL_WRITER_XLSM - Does not handle charts built dynamically (#392)
Hi Stefan,
I’ll knock up a demo program as soon as I get a chance and email it over to you.
Regards
Paul
From: Stefan Schmöcker<EMAIL_ADDRESS>Sent: 01 August 2015 08:25
To: ivanfemia/abap2xlsx
Cc: Paul Graylish
Subject: Re: [abap2xlsx] ZCL_EXCEL_WRITER_XLSM - Does not handle charts built dynamically (#392)
I'll handle this in the near future.
I've been aligning XLSM and 2007-Writers in the past already - but I didn't touch the method "CREATE" yet.
Basically I'm going to change the code to first call the super->create( ) and then do all the stuff necessary for the xlsm-creation.
@Paulhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Paul&d=AwMCaQ&c=Gg3N3vg0GEGCJtCwojHcbnJ9Qbwk-lEDmU3R1kelhJ0&r=XYmgzDI3xZIJimt8YTZYYolRx-KFPD0lY-Ead8O-FQg&m=EWCd2tNQl1FY-mPKtEppIM4K4SZpk1v2_CtFHZlQYuQ&s=mjRn17mbS0ugRZoVvQ_0h1V8-nnNjONIL_n56fovvxg&e=: Are you able to provide your ( or a slightly modified version that runs on any system ) demoprogram that causes the error? I just set my emailaddress to public for this and will set it to private again if I receive a mail from you - thank you in advance
—
Reply to this email directly or view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_ivanfemia_abap2xlsx_issues_392-23issuecomment-2D126877899&d=AwMCaQ&c=Gg3N3vg0GEGCJtCwojHcbnJ9Qbwk-lEDmU3R1kelhJ0&r=XYmgzDI3xZIJimt8YTZYYolRx-KFPD0lY-Ead8O-FQg&m=EWCd2tNQl1FY-mPKtEppIM4K4SZpk1v2_CtFHZlQYuQ&s=U8Or9khJp8NvrBZ2Ec8R1CYNFhS9Lc0J3iaP8se17IY&e=.
============================================================================================================================================
This Email together with any attachments is confidential and intended solely for the Person to whom it is addressed. The unauthorised use, distribution, copying or alteration of the Email is forbidden and may be unlawful. If you have received this in error, please advise the sender immediately by returning the Email and then delete it from your system.
As Internet communications are not secure, Martin-Baker Aircraft Company Limited does not accept legal responsibility for the contents of this Email or attachments. Furthermore, you should carry out such Virus and other checks as considered appropriate to ensure that the opening and/or use of this Email and any attachments do not adversely affect other systems or data, for which Martin-Baker Aircraft Company Limited can accept no legal responsibility.
Martin-Baker Aircraft Company Ltd, Registered No. (England) 868042, Registered Office Lower Road, Higher Denham, near Uxbridge, Middlesex, UB9 5AJ.
&---------------------------------------------------------------------
*& Report  ZDEMO_EXCEL42
&---------------------------------------------------------------------
*& Using the demo (or any other Macro Enabled Workbook), this program:-
*& 1. Reads data from the table MARC.
*& 2. Opens the Macro Enabled Workbook.
*& 3. Adds a worksheet containing the data from MARC.
*& 4. Adds a worksheet containing a Chart linked to the MARC data.
*& 5. Saves/Displays/Emails the final Macro Enabled Workbook.
&---------------------------------------------------------------------
REPORT  zdemo_excel42.
CONSTANTS c_template          TYPE string VALUE 'G:\SAP\Basis\ABAP2XLSX\TestMacro.xlsm'.
DATA: lo_excel                TYPE REF TO zcl_excel,
lo_worksheet            TYPE REF TO zcl_excel_worksheet,
lo_excel_writer         TYPE REF TO zif_excel_writer,
lo_excel_reader         TYPE REF TO zif_excel_reader,
lo_line                 TYPE REF TO zcl_excel_graph_line,
lo_drawing              TYPE REF TO zcl_excel_drawing,
column_dimension        TYPE REF TO zcl_excel_worksheet_columndime,
row_dimension           TYPE REF TO zcl_excel_worksheet_rowdimensi,
lv_bold_center_guid     TYPE zexcel_cell_style,
lo_bold_center          TYPE REF TO zcl_excel_style.
DATA: ls_upper                TYPE zexcel_drawing_location,
ls_lower                TYPE zexcel_drawing_location.
DATA: ls_table_settings       TYPE zexcel_s_table_settings.
DATA: lv_file                 TYPE xstring,
lv_bytecount            TYPE i,
lt_file_tab             TYPE solix_tab.
DATA: lv_full_path            TYPE string,
lv_filename             TYPE string,
lv_workdir              TYPE string,
lv_file_separator       TYPE c.
DATA: llbl                    TYPE string,
lref                    TYPE string,
i_lines                 TYPE i,
l_lines                 TYPE string.
TYPES: BEGIN OF ty_test,
matnr                TYPE marc-matnr,
werks                TYPE marc-werks,
plifz                TYPE marc-plifz,
END OF ty_test.
DATA:  lt_test                TYPE TABLE OF ty_test.
CONSTANTS: gc_save_file_name TYPE string VALUE '42_Macro_Charts.xlsm'.
PARAMETERS: p_macro          TYPE zexcel_export_dir OBLIGATORY.
INCLUDE zdemo_excel_outputopt_incl.
INITIALIZATION.
p_macro = c_template.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_macro.
DATA: lt_filetable TYPE filetable,
lv_rc TYPE i.
cl_gui_frontend_services=>get_sapgui_workdir( CHANGING sapworkdir = lv_workdir ).
cl_gui_cfw=>flush( ).
p_path = lv_workdir.
CALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
window_title            = 'Select Macro-Enabled Workbook template'
default_extension       = '.xlsm'
file_filter             = 'Excel Macro-Enabled Workbook (.xlsm)|*.xlsm'
initial_directory       = lv_workdir
CHANGING
file_table              = lt_filetable
rc                      = lv_rc
EXCEPTIONS
file_open_dialog_failed = 1
cntl_error              = 2
error_no_gui            = 3
not_supported_by_gui    = 4
OTHERS                  = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
READ TABLE lt_filetable INTO lv_filename INDEX 1.
p_macro = lv_filename.
START-OF-SELECTION.
SELECT * FROM marc INTO CORRESPONDING FIELDS OF TABLE lt_test
WHERE werks = '0001'
AND plifz NE 0.
CHECK sy-subrc = 0.
lv_full_path = p_path.
CREATE OBJECT lo_excel_reader TYPE zcl_excel_reader_xlsm.
CLEAR lo_excel.

lo_excel = lo_excel_reader->load_file( c_template ).
lo_excel = lo_excel_reader->load_file( p_macro ).

"Add a new worksheet
lo_worksheet = lo_excel->add_new_worksheet( ).
"Set the tab name
TRY.
lo_worksheet->set_title( ip_title = 'Data' ).
CATCH zcx_excel.
RAISE e_title.
ENDTRY.
ls_table_settings-table_style         = zcl_excel_table=>builtinstyle_medium2.
ls_table_settings-show_row_stripes    = abap_false.
ls_table_settings-show_column_stripes = abap_false.
ls_table_settings-nofilters           = abap_false.
ls_table_settings-top_left_column     = 'A'.
ls_table_settings-top_left_row        = '1'.
TRY.
lo_worksheet->bind_table( ip_table          = lt_test
is_table_settings = ls_table_settings ).
CATCH zcx_excel.
RAISE e_bind.
ENDTRY.
TRY.
lo_worksheet->freeze_panes( ip_num_rows = 1 ). "freeze column headers when scrolling
CATCH zcx_excel.
ENDTRY.
"Create Chart Series
DESCRIBE TABLE lt_test LINES i_lines.
l_lines = i_lines.
CONCATENATE 'Data!$A$2:$A' l_lines INTO llbl.
CONCATENATE 'Data!$C$2:$C' l_lines INTO lref.
"Create a line chart, series and axes
CREATE OBJECT lo_line.
CALL METHOD lo_line->create_serie
EXPORTING
ip_order   = 0
ip_symbol  = zcl_excel_graph_line=>c_symbol_auto
ip_smooth  = zcl_excel_graph_line=>c_show_false
ip_lbl     = llbl
ip_ref     = lref
ip_sername = 'Pl. Deliv. Time'.
CALL METHOD lo_line->create_ax
EXPORTING
ip_type = zcl_excel_graph_line=>c_catax.
CALL METHOD lo_line->create_ax
EXPORTING
ip_type = zcl_excel_graph_line=>c_valax.
lo_line->set_show_legend_key( zcl_excel_graph_bars=>c_show_true ).
"LineChart sheet
lo_worksheet = lo_excel->add_new_worksheet( ).
lo_worksheet->set_title( ip_title = 'Chart' ).
" Create global drawing, set type as line chart, assign chart, set position and media type
lo_drawing = lo_worksheet->excel->add_new_drawing(
ip_type  = zcl_excel_drawing=>type_chart
ip_title = 'Chart' ).
lo_drawing->graph = lo_line.
lo_drawing->graph_type = zcl_excel_drawing=>c_graph_line.
lo_bold_center = lo_excel->add_new_style( ).
lo_bold_center->font->bold = abap_true.
lo_bold_center->font->italic = abap_false.
lo_bold_center->font->color-rgb = zcl_excel_style_color=>c_black.
lo_bold_center->font->size = 16.
lo_bold_center->alignment->horizontal = zcl_excel_style_alignment=>c_horizontal_center.
lv_bold_center_guid = lo_bold_center->get_guid( ).
lo_worksheet->set_cell( ip_row = 1 ip_column = 'A' ip_value = 'Title' ip_style = lv_bold_center_guid ).
lo_worksheet->set_merge( ip_row = 1 ip_column_start = 'A' ip_column_end = 'P' ).
"Set chart position (anchor 2 cells)
ls_upper-row = 1.
ls_upper-col = 0.
ls_lower-row = 30.
ls_lower-col = 16.
lo_drawing->set_position2(
EXPORTING
ip_from   = ls_upper
ip_to     = ls_lower ).
lo_drawing->set_media(
EXPORTING
ip_media_type = zcl_excel_drawing=>c_media_type_xml ).
lo_worksheet->add_drawing( lo_drawing ).
lo_worksheet->sheet_setup->orientation         = zcl_excel_sheet_setup=>c_orientation_landscape.
lo_worksheet->sheet_setup->fit_to_page         = abap_true.
lo_worksheet->sheet_setup->fit_to_width        = 1.
lo_worksheet->sheet_setup->vertical_centered   = abap_true.
lo_worksheet->sheet_setup->horizontal_centered = abap_true.
lo_worksheet->sheet_setup->margin_bottom = zcl_excel_common=>excel_string_to_number( '0.4' ).
lo_worksheet->sheet_setup->margin_footer = zcl_excel_common=>excel_string_to_number( '0.1' ).
lo_worksheet->sheet_setup->margin_header = zcl_excel_common=>excel_string_to_number( '0.1' ).
lo_worksheet->sheet_setup->margin_left   = zcl_excel_common=>excel_string_to_number( '0.4' ).
lo_worksheet->sheet_setup->margin_right  = zcl_excel_common=>excel_string_to_number( '0.4' ).
lo_worksheet->sheet_setup->margin_top    = zcl_excel_common=>excel_string_to_number( '0.4' ).
lo_excel->set_active_sheet_index( '1' ).
lcl_output=>output( cl_excel = lo_excel iv_writerclass_name = 'ZCL_EXCEL_WRITER_XLSM' ).

Hello Paul,
I fear that your last postings are a bit extensive - the include information from Emails that shouldn't be seen here I guess.
But I have been able to get your errormessage with the demoreport + a simple macro-workbook as template.   Thank you - I'll get back to you as soon as I see how to fix this.

Hello Paul,
I think a prepared the 2007-Writer for this already some commits before and forgot to adjust the XLSM-Writer.
Please download the latest versions of these two classes from the subversion directory but make a copy of them before updating.
If you find that there have been quite some changes in the previous month and you don't know which classes to update and if you don't update from the svn-directory but from the daily-build nugget please wait a few days until I create a complete new daily-build of ABAP2XLSX

Hi Paul,
I just added a new daily build to the svn.
Maybe you could check if your problem is solved by this - then I'd close this issue

Hi Stefan,
I can confirm that the latest daily build has fixed this issue.
Thank you for your assistance!
Regards
Paul


Fixes 963: Possibly allow custom mapping for map of values

ImportJson --> has mapping through nodePropertyMappings, relPropertyMappings (so not implemented)
importGraphml --> leverage on attr.type (so not implemented)
importCsv leverage on optionalParam, e.g header with myProp:time{timezone:+02:00} (so not implemented)
Remaining procs:

import.xml
every load procedure

Notes: CREATE EXTENSION pgcrypto; to generate uuid

core issue, chiudo per ora


Non-Interactive Installation with Meaningful Output?

vim +PluginInstall +qall will install the plugins and exit, but the process opens the normal vim UI and gives feedback in that UI. Is there a way to have each installation printed to stdout, so as to make an automated installation workflow sane? Currently i'm just muting Vim, which is less than optimal. Thoughts?

This would be awesome, but a bit hairy to implement, considering the aforementioned tight integration between interface and install logic :(
For myself, to speed up the first install, I ended up writing a simple script that reads the bundles and clones them in parallel, but I still open Vim to load the vimrc and get the bundle list. I had to do this because I was including extra files with Plugin lines conditionally.
So in any case, maybe Vundle is not really the tool for this kind of scenario, is what I'm saying. If your vimrc is a simple one, then you could potentially parse it to get the plugins and just clone them in place, so when Vim loads with Vundle, they will be loaded.

@jdevera do you mind having a look at some of my old PRs (#450 and #468 for example). I did start some work to remove the tight connection between interface and logic at that time but never went any further with it because you stopped merging things.

So sorry I let you down @lucc,  my focus on Vundle is really intermittent.

Seems to me that a simple vim +PluginInstall +qall &>/dev/null would work in many cases. YMMV

@mafrosis The problem has to do with TTY. I ran into a problem where Docker wasn't allocating a TTY during it's image compilation phase (e.g. docker build). However, I believe this is fixed in Docker. Although it would still be nice to decouple the UI from the logic.

Ah I see. I'm not familiar with docker yet (haven't joined the cool gang!)

Would love this/

I'm in terrible need of this.

If you are in terrible need you can implement it yourself or use a short shell script. Something like this might do the trick:
for dir in ~/.vim/bundle/*; do
  git -C "$dir" pull # maybe add ">/dev/null 2>&1" and/or "&" here
done

I managed to get it going this way:
echo | echo | vim +PluginInstall +qall &>/dev/null

The 2 echo's send newline's to any confirmation prompts that might come up, then i pipe the output to devnull.

@breerly what plugins require confirmation?

theoretically @lucc suggestion should work as well, though i have not tested

@razic I think it was YCM warning... don't remember

Might be overkill, but if you want to do it asynchronously to go faster:
#!/bin/bash
BUNDLE_PATH="$HOME/.vim/bundle"
declare -a pids
declare -a plugins
for dir in $BUNDLE_PATH/*/; do
  if [ -d "$dir" ]; then
    git -C "$dir" pull &>/dev/null &
    pids+=($!)
    plugins+=($dir)
  fi
done
ret=0
# Wait for processes to finish and output something useful
for k in ${!pids[@]}; do
  plugin_path=${plugins[k]}
  plugin="${plugin_path##$BUNDLE_PATH/}"
  plugin="${plugin%/}"
  wait ${pids[k]}
  if [ $? -eq 0 ]; then
    echo "Success: $plugin is up to date!"
  else
    echo "Error updating $plugin" >&2
    ret=1
  fi
done
echo "Your plugins have been updated"; exit $ret

I wrote this a while ago, might help:
https://github.com/jdevera/parallel-vundle-installer

@breerly excellent!!!!!

@unhashable's answer worked for me but with single echo!
echo | vim +PluginInstall +qall

Also, got rid of the dev null as I want to see the output.


Android: quickstart refresh all items

Hi,
I created an Easy Table called ToDoItem and  I run the quickstart mobile app in Android Studio
The app seems to be working OK  with Azure Easy Table, except for the fact that does not filter any data when I try to query data from the table.
It seems the where clause is simple ignored even though I've data in the Easy table with rows set to true in field completed .
Any idea? Is it necessary to edit the script of the easy tables in azure?
return mToDoTable.where().field("complete").
eq(val(false)).execute().get();
Thank you in advance.
Fátima Pereira

Hi @ProfFatimaPereira, thanks for reaching out. So in the API doc there is no val() would that solve the issue:
List<ToDoItem> result = mToDoTable
    .where()
    .field("complete").eq(false)
    .execute()
    .get();

Hi @ProfFatimaPereira,
we haven't heard from you in a while so I'm closing this issue.
Feel free to reopen this issue if it isn't resolved or you have additional questions.


Flatten transform generates not-very-user-friendly Module names.

Type of issue:feature request

What is the current behavior?

If I make a trait as follows:
trait FlattenInstance { self: chisel3.experimental.BaseModule =>
  chisel3.experimental.annotate(
    new chisel3.experimental.ChiselAnnotation {
      def toFirrtl: firrtl.annotations.Annotation = firrtl.transforms.FlattenAnnotation(self.toNamed) } )
}

And then use it as follows:
class myModuleA extends Module {
  val b = Module(new myModuleB extends FlattenInstance)
}

The resulting Verilog yields:
myModuleAanon1 b(...)

What is the expected behavior?

myModuleB b(...)

The current behavior is not very user-friendly, especially for handing off the Verilog to another team; the current work-around is to manually add with InlineInstance to all submodules which yields the desired behavior.

Please tell us about your environment:

firrtl version: 50ba95fe05cc348496425733554be5fc7d797de1
chisel3 version: https://github.com/freechipsproject/chisel3/commit/9a0ce2272c9d5d0a8bdc90e84269749ce054664d

Impact: no functional change

The difficulty is that this is an anonymous module and it really isn't a myModuleB anymore -- it's some anonymous child created inside of myModuleA. This is one issue that didn't occur to me with the FlattenInstance trait API as opposed to using a more explicit annotator method which wouldn't have this problem.
This is annoying because I like the mixin API, but this is creating anonymous children. I think this may motivate a better desiredName API that will generate names based on the mixins (or optionally, keep the name of the parent). Obviously, this turns into a mess with multiple mixins, but I think we can think of something here.
In the meantime, how about overriding desiredName? Something like the following should do the trick:
val b = Module(new myModuleB extends FlattenInstance { override val desiredName = "myModuleB" })

The recommended solution of overriding desiredName appears to work, which is an acceptable solution.
Feel free to close if desired.


Create additional info blocks

You can make your resume less official by adding more entertaining info, like your hobbies and interest, or what do you like, some interactive content or joke, easter egg, etc.

hello binary studio academy


Insider version of vscode shows blank window

I reported the same issue in https://github.com/microsoft/vscode/issues/98354. The issue cured by itself for unknown reasons. Now it happens again.
Because vscode does not launch normally. So I can't copy/paste the information in "About". However, the issue is quite simple and you don't need more information:

if I use "https://az764295.vo.msecnd.net/insider/8cd3fe080bee38d28ba01d0d71713d6ec22b254e/code-insider-1592545553.tar.gz" (released last Friday), then everything works normally.

if I use "https://az764295.vo.msecnd.net/insider/0913b1aa43191d8af0ccb4a133d9a8d7c1a81d69/code-insider-1592906035.tar.gz" (released today) then vscode only shows a blank window.

I don't know if the version released yesterday works or not as I didn't download it.

The following is from the version mentioned in 1):
=======================================================
Version: 1.47.0-insider
Commit: 8cd3fe080bee38d28ba01d0d71713d6ec22b254e
Date: 2020-06-19T05:31:16.748Z
Electron: 7.3.1
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Linux x64 3.10.0-693.17.1.el7.x86_64
=======================================================

Does this issue occur when all extensions are disabled?: Yes

VSCode Version:
OS Version:

Steps to Reproduce:

Does this issue occur when all extensions are disabled?: Yes/No

Please see the snapshots of what I have after launching vscode.

Thanks for creating the issue, merging this to https://github.com/microsoft/vscode/issues/100846. Please follow that issue for updates.


chore: monitor code complexity with xenon

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

Project coverage is 100.00%. Comparing base (f6658cf) to head (69c1631).

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #161   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files           14        14
  Lines          247       247
  Branches        19        19
=========================================
  Hits           247       247

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


Add support to python 3.11

Fixes #307.
Description
For the moment I've just upgraded all the setup.py and the workflows.
I will remove this PR from draft mode as soon as I'm finished with the changes. In particular, I want to check that the code is all compatible with python3.11 or if modifications are required.
I've yet to check the correctness of the dependencies in the opeqaoa-core: they may be outdated or require changes with the python version
Checklist

[x] I have performed a self-review of my code.
[x] I have made corresponding updates to the documentation.
[ ] My changes generate no new warnings
[ ] I have added/updated tests to make sure bugfix/feature works.
[x] New and existing unit tests pass locally with my changes.

Type of change
Please delete options that are not relevant.

[ ] New feature (non-breaking change which adds functionality)
[ ] This change requires a documentation update

Hi, locally all the testes pass correctly (or fail because they are using connections I cannot access) so I would say it is all working. We should check with the workflows if everything is truly good.
Tbh, I think this project could benefit of some modification in the setup.py / pyproject / version / dependencies organization. It seems to me that there is some duplication in the versioning and that the setup.py could be completely removed in favor of the pyproject. Moreover, having something like poetry to manage dependency could help automatize some of the things I did today :-)

Hi @rodolfocarobene , thanks for filing a PR to solve this issue.
I have a few comments/questions:

First, can you merge your branch into dev rather than main, this allows us to control the release version more carefully and make sure no bug spreads to the pip version of the package. I approve the workflow run after this step.
Is there anything preventing the use of python 3.12? If not, can you also add support for this more recent version of python. I believe most of the packages associated with plugins also support it.
Finally, I think the main roadblock when we first tried to upgrade python was the removal of setuptools from the main python library. Can you directly install your version of openqaoa in a fresh python 3.12 environment like we're doing it in the .yml?

If you want to contribute further and reorganise setup.py / pyproject / version / dependencies, feel free to do so. I would be happy to help you integrate these changes as well.
Since this is a Unitary Hack related PR, you may as well tackle this cleaning task after we approve this PR. Let me know what you think!

Sorry @KilianPoirier , I think I had slightly misunderstood the issue.
I've now removed all the setup.py files and the requirements.txt, moving everything to the pyproject.toml as it is advised (I believe). Since "setuptools" is in the build-system requirements, it should be installed correctly when installing the packages.
I've tried it on a new environment and the installation of every specific package seemed to work. Please let me know if it is ok for you r if there are still modification required.
(Sorry for the useless line diffs, my editor removes automatically leading spaces... If you want I can remove them)

Hey @rodolfocarobene thank you for revisiting your PR and migrating all of the setup instructions to pyproject.toml. It looks good at first glance.
I have approved the test workflow but it seemed like it fails at installation.
I think it is due to the requirements on the version of ipython that is not compatible with the lowest versions of python we are supporting.

Hi, I was trying to fix the errors, but I noticed that mitiq is at the moment not compatible with Python 3.12...
https://github.com/unitaryfund/mitiq/blob/d35b7aad59b393aa539ceb2cb52244e84c19c1ee/setup.py#L70
Since openqaoa-core requires it (in dev) I'm afraid that Python3.12 cannot be fully supported

Alright, then I think it's fair to keep it to python 3.11, I also noticed that they recently dropped support for python 3.8.
Maybe we can change our minimum requirements to >=3.9 too.

Alright, then I think it's fair to keep it to python 3.11, I also noticed that they recently dropped support for python 3.8. Maybe we can change our minimum requirements to >=3.9 too.

I think it makes sense, python 3.8 is a bit outdated right now. I'm working on the updates :-)

Now the installation should work both for python3.9 and python3.11.
Some tests are failing locally, but I think it's just because I don't have the "right hardware" (api.QVMError: Could not communicate with QVM at http://<IP_ADDRESS>:5000)

Fixing dependencies once again (maybe one of the last time? :-)). For the moment I limited the version of some libraries, while I think we should instead modify the code to support higher versions of those libraries, but maybe in another PR.
In particular I limited:

matplotlib to 3.8 because matplotlib.cm.get_cmap is deprecated in 3.9
mitiq to 0.35 because fold_gates_from_left is deprecated in 0.36 (addressed in #310)

Locally the installation works fine, some tests of pyquil fail. In general because of connections, a couple for some other reason that I am having some trouble understanding:
from openqaoa.backends.qaoa_device import create_device
device = create_device(location="qcs", name="7q-noisy-qvm")

>>>ValueError: Invalid device location, Choose from: dict_keys(['local', 'azure', 'aws', 'ibmq'])

Also in the workflow the same error is being raised, is it a version thing or something else?

Nice! Let's see how the workflow runs this time.
I'm currently pushing some changes for the mitiq issue as you have noticed but other problems arose when fixing this, it may take a bit more time than expected. No worries though if the only error is this one on your side, I'll approve your PR and fix it myself.
Concerning the QVM issue it may be due to a problem with pyquil, if you don't have the qvm installed separately, the tests won't pass locally. This should be caught by the GH workflow.

There is still some problem with the pyquil tests...

Hey @rodolfocarobene , the error seems to come from a faulty install of pyquil since the pyquil backends are not resolved in the list of backends in the tests.
I also tried to branch out from your changes and test locally but the make command doesn't resolve. Have you tried looking into this? The makefile only runs an install of the  pip install -e ./openqaoa-*/.
Here is what happens when I try installing locally using your modified pyproject.toml

What version of python are you using? I don't see the see behavior... quite weird.
I'm gonna work on this, if I cannot do it I will revert to the setup.py and split this in half :-)

Hey, @KilianPoirier, I've added the explicit location of the packages (for some reason it was required for me, but I suppose it doesn't hurt).
While for the pyquil plugin I had written "braket" instead "pyquil" so it made sense that it wasn't working... it should be fixed

Good news, the tests seem to pass! Nice job fixing all of the issues
I will have a proper review of the code but it should be pretty quick at this point.

Sorry, I had forgot to check some stuff (mainly docs and workflows) that had some outdated stuff. At the same time, with the introduction of the pyproject.toml the _version.py and some other configuration files became obsolete, I should have updated everything in a reasonable manner.
Therefore, the last commit is touching many files, but is mostly redundant/not important things.
Maybe in the future could be convenient a script to update the version (both of python and the packages) in all the repository at once. :-)

I just approved the PR and assigned you to the issue and bounty!
Good job tackling this issue and glad to count you as an openqaoa contributor :)

Thanks @KilianPoirier ! It was a pleasure for me :-) .
Maybe for the hackaton the issue should be closed? Since it seems to me that it still not "resolved" (link)


Error: Task git-clone(0.9) requires Tekton Pipelines min version v0.38.0 but found v0.37.5

Two labs :

Hands-on Lab: Integrating Unit Test Automation
Hands-on Lab: Use Tekton Continuous Delivery (CD) Catalog
have some dependency issue for tekton cli.
When running this -
tkn hub install task git-clone
it gives this error:
Error: Task git-clone(0.9) requires Tekton Pipelines min version v0.38.0 but found v0.37.5
I tried get new update using this cmd:
kubectl apply --filename https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml

but still gives error I guess due to permission issue/codespace
So I used prev version (0.8) of the required task.. and then it was able to install the required task...hope that helps me to complete the lab.

@snp116 Thanks for bringing this to our attention. We've looked into this and the problem is that the support team updated the Tekton CLI (tkn) but did not, and cannot, update Tekton Pipelines to match due to a problem with the OpenShift Operator not offering the latest version.
The workaround we suggest is to install git-clone manually from the Tekton Hub without using tkn by applying the yaml manifest yourself using kubectl or oc. This will bypass the version check:
kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/main/task/git-clone/0.9/git-clone.yaml

We have updated the lab instructions to add this workaround while we work on a more final solution.
Alternately you can downgrade the Tekton client. Either will work.

Thank you so much for the response Sir.  Successfully completed it with the above kubectl cmd.


Intrinsic gas too low Error while deploying the contract

intrinsic gas too low Error while deploying the contract
Description
Getting an error using hardhat contract deployment procedure.  I followed the steps in Getting Started Guide, and was able to start all nodes without any errors, however, I am not able to deploy a simple contract.
Contract code:
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;

contract Greeter {
  string greeting;

  constructor(string memory _greeting) {
    greeting = _greeting;
  }

  function greet() public view returns (string memory) {
    return greeting;
  }

  function setGreeting(string memory _greeting) public {
    greeting = _greeting;
  }
}

hardhat.config.js section with network:
module.exports = {
  solidity: "0.8.0",
  defaultNetwork: "polygon",
  networks: {
    polygon: {
      chainId: 100,
      url: 'http://localhost:30002',
      accounts: ['0x${private-key-hardcoded}'],
      gas: "auto",
      gasPrice: "auto",
      timeout: 20000
    }
  }
};

deploy.js script:
async function main() {
  // We get the contract to deploy
  const [deployer] = await ethers.getSigners();

  console.log("Deploying contracts with the account:", deployer.address);

  console.log("Account balance:", (await deployer.getBalance()).toString());

  const Greeter = await ethers.getContractFactory("Greeter");
  const greeter = await Greeter.deploy("Hello, Hardhat!");

  console.log("Greeter deployed to:", greeter.address);
}

main()
  .then(() => process.exit(0))
  .catch((error) => {
    console.error(error);
    process.exit(1);
  });

Your environment

macOS Catalina
version of the Polygon SDK
current develop branch

Steps to reproduce

Tell us how to reproduce this issue

Follow the steps  in Getting Started Guide to configure and run polygon-sdk locally
Configure  sample hardhat project (see hardhat.config.js code above)
Create sample contract (see provided source above)
Run npx hardhat run scripts/deploy.js --network polygon

Where the issue is, if you know

Which commands triggered the issue, if any

attempt to deploy the contract

Expected behaviour
Contract deployed and address returned
Actual behaviour
"intrinsic gas too low"
Logs
2021-09-09T16:21:30.670-0400 [ERROR] polygon.dispatcher: failed to dispatch: method=eth_sendRawTransaction err="intrinsic gas too low"
2021-09-09T16:25:22.933-0400 [ERROR] polygon.txpool: Discarding invalid transaction: hash=0x5e171beb08bfe8b6c5d645a5cec28c9f65bd19feda5212e12fd97f167ed04743 err="intrinsic gas too low"
2021-09-09T16:25:22.933-0400 [ERROR] polygon.dispatcher: failed to dispatch: method=eth_sendRawTransaction err="intrinsic gas too low"

Proposed solution
If you have an idea of how to fix this issue, please write it down here, so we can begin discussing it

Hey @poprygun ,
Thank you for reaching out and for bringing this to our attention.
We've been able to reproduce the issue, and narrow it down to the root of it.
Currently, we're working on fixing it as soon as possible. I will update this issue when the fix PR is up so that you are in sync.

One more thing, just so you can get up an running in the meantime while we sort this issue out:
You can bypass this issue and deploy your smart contract if you change your deploy params in the deploy.js file to be:
const greeter = await Greeter.deploy("Hello, Hardhat!", {
    gasLimit: "0x100000",
  });

Notice that we specified the gasLimit here.

Just to confirm here as well, this issue has been fixed now, and is awaiting PR approval 🚀

Hi Milos,
I pulled latest develop and noticed few updates to server.go file, so I am assuming you merged the PR?
Adding below section causes script to hang indefinitely with no feedback from validator logs.
const greeter = await Greeter.deploy("Hello, Hardhat!", {
gasLimit: "0x100000",
});

On Sep 14, 2021, at 7:49 AM, Miloš Živković @.***> wrote:
Just to confirm here as well, this issue has been fixed now, and is awaiting PR https://github.com/0xPolygon/polygon-sdk/pull/154 approval 🚀
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/0xPolygon/polygon-sdk/issues/150#issuecomment-919075593, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABZQ6GUIBQASLBDGF2GD7LUB4ZGHANCNFSM5DX6BHHA.
Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Not sure if it is related, but creation of the contract using Remix/Metamask also hangs.

On Sep 14, 2021, at 7:49 AM, Miloš Živković @.***> wrote:
Just to confirm here as well, this issue has been fixed now, and is awaiting PR https://github.com/0xPolygon/polygon-sdk/pull/154 approval 🚀
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/0xPolygon/polygon-sdk/issues/150#issuecomment-919075593, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABZQ6GUIBQASLBDGF2GD7LUB4ZGHANCNFSM5DX6BHHA.
Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Hey @poprygun ,
This fix still hasn't been merged into develop. Once the PR is merged (turns purple), you can pull the latest changes and the fix will be live.
Can you please share your entire hardhat project so I can see why it's hanging?
I have tested this out locally with both Hardhat and remix (with MM) and it works fine.

Thanks, Milos,
Here is my hardhat project https://github.com/poprygun/oxy/tree/master/oxygenchain https://github.com/poprygun/oxy/tree/master/oxygenchain
Contract is hanging when I try to deploy from Remix IDE too...

On Sep 15, 2021, at 5:14 AM, Miloš Živković @.***> wrote:
Hey @poprygun https://github.com/poprygun ,
This fix still hasn't been merged into develop. Once the PR is merged (turns purple), you can pull the latest changes and the fix will be live.
Can you please share your entire hardhat project so I can see why it's hanging?
I have tested this out locally with both Hardhat and remix (with MM) and it works fine.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/0xPolygon/polygon-sdk/issues/150#issuecomment-919844418, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABZQ6AFCXUNTO4IPGOZGZLUCBPVTANCNFSM5DX6BHHA.
Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Thank you @poprygun for sharing the repo. I'll check to see if I can reproduce these issues you're facing and get back to you soon 🙂

I've figured out what the issue is with your configuration.
You can safely omit the gasPrice and gas from the hardhat config, as they default to auto.
The polygon SDK (currently) has a max block limit of 0x500000 gas. You're setting the gasLimit value in your deploy.js to be 0x9000000, which is way above what the actual block limit is. When you deploy the contract, the deployment transaction gets added to the transaction pool, but it doesn't get applied since you're hitting that gas limit. Because it was added to the txpool, hardhat got a returned txHash, which it uses to query the receipt with, causing the deploy script to hang until it eventually times out.
Simply setting this value to for example 0x100000 instead of 0x9000000 in deploy.js, and removing the gasPrice and gas params from the hardhat config should solve your issue and get you up and running.

Hi Milos,
I started the validator node in debug node, and captured this log output while attempting to deploy a contract - there are no errors, but node just cycles this output while hardhat is hanging deploying the contract.
Is there anything else we could try to troubleshot the deployment?
2021-09-18T10:42:07.994-0400 [DEBUG] polygon.dispatcher: request: method=eth_chainId id=513
2021-09-18T10:42:07.994-0400 [DEBUG] polygon.jsonrpc: handle: response={"jsonrpc":"2.0","id":513,"result":"0x64"}
2021-09-18T10:42:07.996-0400 [DEBUG] polygon.jsonrpc: handle: request={"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["0x73083785ffc1d90b41b3be9cf4ab090aeb54bb9744678cb7c87e95b305616e91"],"id":514}
2021-09-18T10:42:07.996-0400 [DEBUG] polygon.dispatcher: request: method=eth_getTransactionByHash id=514
2021-09-18T10:42:07.996-0400 [DEBUG] polygon.jsonrpc: handle: response={"jsonrpc":"2.0","id":514,"result":null}
2021-09-18T10:42:08.000-0400 [DEBUG] polygon.jsonrpc: handle: request={"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":515}
2021-09-18T10:42:08.000-0400 [DEBUG] polygon.dispatcher: request: method=eth_chainId id=515
2021-09-18T10:42:08.000-0400 [DEBUG] polygon.jsonrpc: handle: response={"jsonrpc":"2.0","id":515,"result":"0x64"}
2021-09-18T10:42:08.002-0400 [DEBUG] polygon.jsonrpc: handle: request={"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["0x73083785ffc1d90b41b3be9cf4ab090aeb54bb9744678cb7c87e95b305616e91"],"id":516}
2021-09-18T10:42:08.002-0400 [DEBUG] polygon.dispatcher: request: method=eth_getTransactionByHash id=516
2021-09-18T10:42:08.002-0400 [DEBUG] polygon.jsonrpc: handle: response={"jsonrpc":"2.0","id":516,"result":null}
2021-09-18T10:42:12.006-0400 [DEBUG] polygon.jsonrpc: handle: request={"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":517}
2021-09-18T10:42:12.006-0400 [DEBUG] polygon.dispatcher: request: method=eth_blockNumber id=517
2021-09-18T10:42:12.006-0400 [DEBUG] polygon.jsonrpc: handle: response={"jsonrpc":"2.0","id":517,"result":"0x0"}
2021-09-18T10:42:12.007-0400 [DEBUG] polygon.jsonrpc: handle: request={"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":518}
2021-09-18T10:42:12.007-0400 [DEBUG] polygon.dispatcher: request: method=eth_chainId id=518
2021-09-18T10:42:12.007-0400 [DEBUG] polygon.jsonrpc: handle: response={"jsonrpc":"2.0","id":518,"result":"0x64"}
2021-09-18T10:42:12.010-0400 [DEBUG] polygon.jsonrpc: handle: request={"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":519}
2021-09-18T10:42:12.010-0400 [DEBUG] polygon.dispatcher: request: method=eth_chainId id=519
2021-09-18T10:42:12.010-0400 [DEBUG] polygon.jsonrpc: handle: response={"jsonrpc":"2.0","id":519,"result":"0x64"}
2021-09-18T10:42:12.012-0400 [DEBUG] polygon.jsonrpc: handle: request={"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["0x73083785ffc1d90b41b3be9cf4ab090aeb54bb9744678cb7c87e95b305616e91"],"id":520}
2021-09-18T10:42:12.012-0400 [DEBUG] polygon.dispatcher: request: method=eth_getTransactionByHash id=520
2021-09-18T10:42:12.012-0400 [DEBUG] polygon.jsonrpc: handle: response={"jsonrpc":"2.0","id":520,"result":null}
2021-09-18T10:42:12.018-0400 [DEBUG] polygon.jsonrpc: handle: request={"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":521}

On Sep 16, 2021, at 9:17 AM, Alex Shumilov @.***> wrote:
Thanks Milos,
I made suggested changes, however, still experiencing the same behavior.
Observation - And any value above ~ 0x13000 hangs the deploy process.
lowering gas limit in deploy.js to 0x13000 causes following log output on the node:
2021-09-16T08:57:12.734-0400 [ERROR] polygon.txpool: Discarding invalid transaction: hash=0x350bfa3f52fea52d8139a4662872b674161d31de06ab2cc9501d12db2895fed1 err="intrinsic gas too low"
2021-09-16T08:57:12.734-0400 [ERROR] polygon.dispatcher: failed to dispatch: method=eth_sendRawTransaction err="intrinsic gas too low”
I experience the somewhat similar behavior using remix/metamask with addition of this stack trace:
2021/09/16 09:13:21 http: panic serving <IP_ADDRESS>:59138: runtime error: index out of range [-1]
goroutine 752 [running]:
net/http.(*conn).serve.func1()
/usr/local/go/src/net/http/server.go:1801 +0xb9
panic({0x1962920, 0xc00277dbd8})
/usr/local/go/src/runtime/panic.go:1047 +0x266
github.com/0xPolygon/polygon-sdk/crypto.RecoverPubkey http://github.com/0xPolygon/polygon-sdk/crypto.RecoverPubkey({0x0, 0x1, 0xc0000328f0}, {0xc000569ce0, 0x0, 0xc000569ca0})
/Users/ashumilov/projects/oxygenchain/polygon-sdk/crypto/crypto.go:128 +0x135
github.com/0xPolygon/polygon-sdk/consensus/ibft.ecrecoverImpl http://github.com/0xPolygon/polygon-sdk/consensus/ibft.ecrecoverImpl({0x0, 0x0, 0x0}, {0xc000569ca0, 0x138b4fe, 0xc001722450})
/Users/ashumilov/projects/oxygenchain/polygon-sdk/consensus/ibft/sign.go:22 +0xa5
github.com/0xPolygon/polygon-sdk/consensus/ibft.ecrecoverFromHeader http://github.com/0xPolygon/polygon-sdk/consensus/ibft.ecrecoverFromHeader(0x6d072f62c0cbfb31)
/Users/ashumilov/projects/oxygenchain/polygon-sdk/consensus/ibft/sign.go:42 +0xc5
github.com/0xPolygon/polygon-sdk/consensus/ibft http://github.com/0xPolygon/polygon-sdk/consensus/ibft.(*Ibft).GetBlockCreator(0x7af5df61d56f1a33, 0xd92d2c3afaf35153)
/Users/ashumilov/projects/oxygenchain/polygon-sdk/consensus/ibft/ibft.go:923 +0x2e
github.com/0xPolygon/polygon-sdk/server http://github.com/0xPolygon/polygon-sdk/server.(*jsonRPCHub).ApplyTxn(0xc001722c00, 0xc0021c8000, 0x4)
/Users/ashumilov/projects/oxygenchain/polygon-sdk/server/server.go:302 +0x53
github.com/0xPolygon/polygon-sdk/jsonrpc http://github.com/0xPolygon/polygon-sdk/jsonrpc.(*Eth).Call(0xc00057e248, 0xc00146e2b0, 0xc00001f638)
/Users/ashumilov/projects/oxygenchain/polygon-sdk/jsonrpc/eth_endpoint.go:242 +0xa2
reflect.Value.call({0xc000246600, 0xc00057e2e8, 0x1976aa0}, {0x19c1503, 0x4}, {0xc002409f40, 0x3, 0x1842860})
/usr/local/go/src/reflect/value.go:543 +0x814
reflect.Value.Call({0xc000246600, 0xc00057e2e8, 0xc000c0dce0}, {0xc002409f40, 0x3, 0x3})
/usr/local/go/src/reflect/value.go:339 +0xc5
github.com/0xPolygon/polygon-sdk/jsonrpc http://github.com/0xPolygon/polygon-sdk/jsonrpc.(*Dispatcher).handleReq(0xc001720720, {{0x18710c0, 0xc000c0dce0}, {0xc00001f5f8, 0x8}, {0xc00256ec60, 0x8f, 0x90}})
/Users/ashumilov/projects/oxygenchain/polygon-sdk/jsonrpc/dispatcher.go:295 +0x309
github.com/0xPolygon/polygon-sdk/jsonrpc http://github.com/0xPolygon/polygon-sdk/jsonrpc.(*Dispatcher).Handle(0xc000c4c3c0, {0xc000c76000, 0xea, 0x200})
/Users/ashumilov/projects/oxygenchain/polygon-sdk/jsonrpc/dispatcher.go:242 +0x165
github.com/0xPolygon/polygon-sdk/jsonrpc http://github.com/0xPolygon/polygon-sdk/jsonrpc.(*JSONRPC).handle(0xc001723140, {0x1cedf90, 0xc000b348c0}, 0xc00064b600)
/Users/ashumilov/projects/oxygenchain/polygon-sdk/jsonrpc/jsonrpc.go:218 +0x564
net/http.HandlerFunc.ServeHTTP(0x0, {0x1cedf90, 0xc000b348c0}, 0x10654a2)
/usr/local/go/src/net/http/server.go:2046 +0x2f
net/http.(*ServeMux).ServeHTTP(0x0, {0x1cedf90, 0xc000b348c0}, 0xc00064b600)
/usr/local/go/src/net/http/server.go:2424 +0x149
net/http.serverHandler.ServeHTTP({0x1ceae08}, {0x1cedf90, 0xc000b348c0}, 0xc00064b600)
/usr/local/go/src/net/http/server.go:2878 +0x43b
net/http.(*conn).serve(0xc00214c280, {0x1cf6000, 0xc000a340c0})
/usr/local/go/src/net/http/server.go:1929 +0xb08
created by net/http.(*Server).Serve
/usr/local/go/src/net/http/server.go:3033 +0x4e8
Also attached my genesis.json configuration
<genesis.json>

On Sep 16, 2021, at 6:16 AM, Miloš Živković @.*** @.***>> wrote:
I've figured out what the issue is with your configuration.
You can safely omit the gasPrice and gas from the hardhat config, as they default to auto.
The polygon SDK (currently) has a max block limit of 0x500000 gas. You're setting the gasLimit value in your deploy.js to be 0x9000000, which is way above what the actual block limit is. When you deploy the contract, the deployment transaction gets added to the transaction pool, but it doesn't get applied since you're hitting that gas limit. Because it was added to the txpool, hardhat got a returned txHash, which it uses to query the receipt with, causing the deploy script to hang until it eventually times out.
Simply setting this value to for example 0x100000 instead of 0x9000000 in deploy.js, and removing the gasPrice and gas params from the hardhat config should solve your issue and get you up and running.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/0xPolygon/polygon-sdk/issues/150#issuecomment-920772992, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABZQ6HQLA53SGLUCFSCCPDUCG7XFANCNFSM5DX6BHHA.
Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

+1 also getting the same issue

Hey @poprygun ,
I've merged out this fix into the develop branch.
Please pull the latest changes, and clean up any leftover files from the previous runs (any genesis.jsons, test-chain folders etc).
Let me know if the issue is still present after following these steps 🙂

Hi Milos,
Unfortunately, latest change did not address my problem - contract deployment is still hanging from both - hardhat and remix.
However, deploying from Remix, I was able to capture this error on the node that is supposed to process transaction.
2021-09-20T10:20:26.350-0400 [DEBUG] polygon.jsonrpc: handle: request={"id":924458456,"jsonrpc":"2.0","method":"eth_estimateGas","params":[{"from":"0x5e51889cac47fecc328bf2f32229035a037f04d3","data":"0x608060405234801561001057600080fd5b5060405161072c38038061072c8339818101604052810190610032919061015a565b806000908051906020019061004892919061004f565b50506102bf565b82805461005b9061022f565b90600052602060002090601f01602090048101928261007d57600085556100c4565b82601f1061009657805160ff19168380011785556100c4565b828001600101855582156100c4579182015b828111156100c35782518255916020019190600101906100a8565b5b5090506100d191906100d5565b5090565b5b808211156100ee5760008160009055506001016100d6565b5090565b6000610105610100846101cc565b61019b565b90508281526020810184848401111561011d57600080fd5b6101288482856101fc565b509392505050565b600082601f83011261014157600080fd5b81516101518482602086016100f2565b91505092915050565b60006020828403121561016c57600080fd5b600082015167ffffffffffffffff81111561018657600080fd5b61019284828501610130565b91505092915050565b6000604051905081810181811067ffffffffffffffff821117156101c2576101c1610290565b5b8060405250919050565b600067ffffffffffffffff8211156101e7576101e6610290565b5b601f19601f8301169050602081019050919050565b60005b8381101561021a5780820151818401526020810190506101ff565b83811115610229576000848401525b50505050565b6000600282049050600182168061024757607f821691505b6020821081141561025b5761025a610261565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61045e806102ce6000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063a41368621461003b578063cfae321714610057575b600080fd5b6100556004803603810190610050919061022c565b610075565b005b61005f61008f565b60405161006c91906102a6565b60405180910390f35b806000908051906020019061008b929190610121565b5050565b60606000805461009e90610387565b80601f01602080910402602001604051908101604052809291908181526020018280546100ca90610387565b80156101175780601f106100ec57610100808354040283529160200191610117565b820191906000526020600020905b8154815290600101906020018083116100fa57829003601f168201915b5050505050905090565b82805461012d90610387565b90600052602060002090601f01602090048101928261014f5760008555610196565b82601f1061016857805160ff1916838001178555610196565b82800160010185558215610196579182015b8281111561019557825182559160200191906001019061017a565b5b5090506101a391906101a7565b5090565b5b808211156101c05760008160009055506001016101a8565b5090565b60006101d76101d2846102f9565b6102c8565b9050828152602081018484840111156101ef57600080fd5b6101fa848285610345565b509392505050565b600082601f83011261021357600080fd5b81356102238482602086016101c4565b91505092915050565b60006020828403121561023e57600080fd5b600082013567ffffffffffffffff81111561025857600080fd5b61026484828501610202565b91505092915050565b600061027882610329565b6102828185610334565b9350610292818560208601610354565b61029b81610417565b840191505092915050565b600060208201905081810360008301526102c0818461026d565b905092915050565b6000604051905081810181811067ffffffffffffffff821117156102ef576102ee6103e8565b5b8060405250919050565b600067ffffffffffffffff821115610314576103136103e8565b5b601f19601f8301169050602081019050919050565b600081519050919050565b600082825260208201905092915050565b82818337600083830152505050565b60005b83811015610372578082015181840152602081019050610357565b83811115610381576000848401525b50505050565b6000600282049050600182168061039f57607f821691505b602082108114156103b3576103b26103b9565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f830116905091905056fea26469706673582212208c46b4a63bd9f426d83da8e4dcb69a8633659806f130d7a7ff99679dd5f5565b64736f6c6343000800003300000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000","value":"0x0"}]}
2021-09-20T10:20:26.350-0400 [DEBUG] polygon.dispatcher: request: method=eth_estimateGas id=9.24458456e+08
2021/09/20 10:20:26 http: panic serving <IP_ADDRESS>:64966: runtime error: index out of range [-1]
goroutine 246 [running]:
net/http.(*conn).serve.func1()
/usr/local/go/src/net/http/server.go:1801 +0xb9
panic({0x1962d80, 0xc001c84480})
/usr/local/go/src/runtime/panic.go:1047 +0x266
github.com/0xPolygon/polygon-sdk/crypto.RecoverPubkey({0x0, 0x1, 0x8}, {0xc001d93300, 0x0, 0xc001d932c0})
/Users/ashumilov/projects/oxygenchain/polygon-sdk/crypto/crypto.go:128 +0x135
github.com/0xPolygon/polygon-sdk/consensus/ibft.ecrecoverImpl({0x0, 0x0, 0x0}, {0xc001d932c0, 0xc00052ed10, 0x100e454})
/Users/ashumilov/projects/oxygenchain/polygon-sdk/consensus/ibft/sign.go:22 +0xa5
github.com/0xPolygon/polygon-sdk/consensus/ibft.ecrecoverFromHeader(0x0)
/Users/ashumilov/projects/oxygenchain/polygon-sdk/consensus/ibft/sign.go:42 +0xc5
github.com/0xPolygon/polygon-sdk/consensus/ibft.(*Ibft).GetBlockCreator(0x0, 0x20)
/Users/ashumilov/projects/oxygenchain/polygon-sdk/consensus/ibft/ibft.go:923 +0x2e
github.com/0xPolygon/polygon-sdk/server.(*jsonRPCHub).ApplyTxn(0xc000a41d40, 0xc000a706c0, 0x101010101010101)
/Users/ashumilov/projects/oxygenchain/polygon-sdk/server/server.go:307 +0x53
github.com/0xPolygon/polygon-sdk/jsonrpc.(*Eth).EstimateGas.func1(0x268d24)
/Users/ashumilov/projects/oxygenchain/polygon-sdk/jsonrpc/eth_endpoint.go:348 +0x68
github.com/0xPolygon/polygon-sdk/jsonrpc.(*Eth).EstimateGas(0xc00027c2c0, 0xc001d980b0, 0x0)
/Users/ashumilov/projects/oxygenchain/polygon-sdk/jsonrpc/eth_endpoint.go:361 +0x9be
reflect.Value.call({0xc00043e980, 0xc00027c328, 0x1976f00}, {0x19c1963, 0x4}, {0xc000b0c5a0, 0x3, 0x1842cc0})
/usr/local/go/src/reflect/value.go:543 +0x814
reflect.Value.Call({0xc00043e980, 0xc00027c328, 0xc001982748}, {0xc000b0c5a0, 0x3, 0x3})
/usr/local/go/src/reflect/value.go:339 +0xc5
github.com/0xPolygon/polygon-sdk/jsonrpc.(*Dispatcher).handleReq(0xc000a3d320, {{0x18658a0, 0xc001982748}, {0xc001982770, 0xf}, {0xc000d46000, 0xf29, 0x1000}})
/Users/ashumilov/projects/oxygenchain/polygon-sdk/jsonrpc/dispatcher.go:295 +0x485
github.com/0xPolygon/polygon-sdk/jsonrpc.(*Dispatcher).Handle(0xc000d3d000, {0xc000d3c000, 0xf6e, 0x1000})
/Users/ashumilov/projects/oxygenchain/polygon-sdk/jsonrpc/dispatcher.go:242 +0x165
github.com/0xPolygon/polygon-sdk/jsonrpc.(*JSONRPC).handle(0xc000a722a0, {0x1cee4d0, 0xc0019782a0}, 0xc00050e800)
/Users/ashumilov/projects/oxygenchain/polygon-sdk/jsonrpc/jsonrpc.go:218 +0x564
net/http.HandlerFunc.ServeHTTP(0x0, {0x1cee4d0, 0xc0019782a0}, 0x10654a2)
/usr/local/go/src/net/http/server.go:2046 +0x2f
net/http.(*ServeMux).ServeHTTP(0x0, {0x1cee4d0, 0xc0019782a0}, 0xc00050e800)
/usr/local/go/src/net/http/server.go:2424 +0x149
net/http.serverHandler.ServeHTTP({0x1ceb348}, {0x1cee4d0, 0xc0019782a0}, 0xc00050e800)
/usr/local/go/src/net/http/server.go:2878 +0x43b
net/http.(*conn).serve(0xc000ce4280, {0x1cf6540, 0xc0014ea0c0})
/usr/local/go/src/net/http/server.go:1929 +0xb08
created by net/http.(*Server).Serve
/usr/local/go/src/net/http/server.go:3033 +0x4e8
2021-09-20T10:20:26.546-0400 [DEBUG] polygon.jsonrpc: handle: request={"id":924458477,"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params":["0x5b344c92f814a89c4a1c7aaeb025700c52de9eb62b26d449ae8d589402b28b22"]}

On Sep 20, 2021, at 4:21 AM, Miloš Živković @.***> wrote:
Hey @poprygun https://github.com/poprygun ,
I've merged out this fix into the develop branch.
Please pull the latest changes, and clean up any leftover files from the previous runs (any genesis.jsons, test-chain folders etc).
Let me know if the issue is still present after following these steps 🙂
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/0xPolygon/polygon-sdk/issues/150#issuecomment-922720902, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABZQ6EYDNFB6JKTN3HUNMTUC3VG7ANCNFSM5DX6BHHA.
Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Hi Milos, any progress on this?
Were you able to replicate the issue on your environment?
Thanks,
Alex

On Sep 20, 2021, at 4:21 AM, Miloš Živković @.***> wrote:
Hey @poprygun https://github.com/poprygun ,
I've merged out this fix into the develop branch.
Please pull the latest changes, and clean up any leftover files from the previous runs (any genesis.jsons, test-chain folders etc).
Let me know if the issue is still present after following these steps 🙂
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/0xPolygon/polygon-sdk/issues/150#issuecomment-922720902, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABZQ6EYDNFB6JKTN3HUNMTUC3VG7ANCNFSM5DX6BHHA.
Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

One more note - I was able to deploy the contract when polygon was started in dev mode using polygon-sdk dev command, so something seems different in how cluster works vs “dev” mode.

On Sep 20, 2021, at 4:21 AM, Miloš Živković @.***> wrote:
Hey @poprygun https://github.com/poprygun ,
I've merged out this fix into the develop branch.
Please pull the latest changes, and clean up any leftover files from the previous runs (any genesis.jsons, test-chain folders etc).
Let me know if the issue is still present after following these steps 🙂
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/0xPolygon/polygon-sdk/issues/150#issuecomment-922720902, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABZQ6EYDNFB6JKTN3HUNMTUC3VG7ANCNFSM5DX6BHHA.
Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Hey @poprygun ,
I wasn't able to replicate this issue on my local setup, as well as other team members.
Could you please provide a detailed step by step guide as to how you're attempting this deployment?
Please note which configurations you use, what parameters you pass in, etc.

I added the detailed description of the steps here https://github.com/poprygun/oxy/tree/master/oxygenchain https://github.com/poprygun/oxy/tree/master/oxygenchain
Note that I don’t have problem deploying when I start polygon with polygon-sdk dev command.
Thanks!

On Sep 22, 2021, at 5:51 PM, Miloš Živković @.***> wrote:
Hey @poprygun https://github.com/poprygun ,
I wasn't able to replicate this issue on my local setup, as well as other team members.
Could you please provide a detailed step by step guide as to how you're attempting this deployment?
Please note which configurations you use, what parameters you pass in, etc.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/0xPolygon/polygon-sdk/issues/150#issuecomment-925356410, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABZQ6CZJIKR3CTBJ5E3CPLUDJFWFANCNFSM5DX6BHHA.
Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Hello, @poprygun. Please note that you need run 4 validator nodes at least in IBFT. I couldn't see panic when I run 4 validator nodes, but saw such error you reported above when I run only 3 validator nodes.

That was it!  Needed to spin up a fourth node!
Thank you!

On Sep 23, 2021, at 11:24 AM, kourin @.***> wrote:
Hello, @poprygun https://github.com/poprygun. Please note that you need run 4 validator nodes at least in IBFT. I couldn't see panic when I run 4 validator nodes, but saw such error you reported above when I run only 3 validator nodes.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/0xPolygon/polygon-sdk/issues/150#issuecomment-925918079, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABZQ6GT7IKNATIV2223RI3UDNBCPANCNFSM5DX6BHHA.
Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.


chore: create empty ingest package

Description

Creates an empty package for the ingest service
Adds graphql query for Oak lessons
Adds functions (largely copied from OWA) for fetching captions

:tada: This PR is included in version 1.9.1 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Adding new community call invite

Description

The .ics file that serves as a calendar blocker for the WinUI Community Call was very out of date, so I'm uploading an updated one.
Motivation and Context

Solves #5205

/azp run


Add more examples of Cadence abstract type encoding

Specification has example of Cadence abstract type encoding.  More examples can always be added but it's no longer an open issue.


How to Run - not in parallel - quick and dirty

Dear developers
What does "dirty" mean?

Hi Sergey
I think this is the most fitting link I can provide to answer your question 😁
https://dictionary.cambridge.org/dictionary/english/quick-and-dirty


Add possibility to also run clang static analyzers

This is the equivalent of the "-checks=" command, a list of different checks can be found here http://clang.llvm.org/extra/clang-tidy/

Not require anymore


Creating a new service specifying an existing volume by volume id fails

Rancher Versions:
Server:1.6.0-rc2
Docker Version:: 17.04.0-ce
**OS and where are the hosts located? (cloud, bare metal, etc):**Ubuntu, Cloud
**Setup Details: (single node rancher vs. HA rancher, internal DB vs. external DB)**Single node
**Environment Type: (Cattle/Kubernetes/Swarm/Mesos)**Cattle
Steps to Reproduce:

Deploy rancher-ebs catalog on a setup with AWS hosts
Add a volume volume1 through UI
Create a service to use volume1 and ensure you can access the volume for read and write
Create another service by specifying the volume id of volume1 using the yaml file below:

version: '2'
services:
  coo:
    image: ubuntu
    stdin_open: true
    scale: 2
    volumes:
    - newvolume:/mydata
volumes:
  newvolume:
    driver: rancher-ebs
    driver_opts:
      volumeID: 'vol-03d9b99c199b16b67'

Results:
Creation of the new service fails as below:
Expected state running but got error: /VolumeDriver.Attach 'myvolidtest1_newvolume_fa3f3' (driver 'rancher-ebs') returned status 500: 500 Internal Server Error

EBS Driver logs:
5/1/2017 11:36:48 AMtime="2017-05-01T18:36:48Z" level=info msg=attach.request name="myvolidtest1_newvolume_fa3f3"
5/1/2017 11:36:48 AMtime="2017-05-01T18:36:48Z" level=error msg=attach.response error="No such volume"
5/1/2017 11:36:49 AMtime="2017-05-01T18:36:49Z" level=info msg=attach.request name="myvolidtest1_newvolume_fa3f3"
5/1/2017 11:36:49 AMtime="2017-05-01T18:36:49Z" level=error msg=attach.response error="No such volume"
5/1/2017 11:36:49 AMtime="2017-05-01T18:36:49Z" level=info msg=attach.request name="myvolidtest1_newvolume_fa3f3"
5/1/2017 11:36:49 AMtime="2017-05-01T18:36:49Z" level=error msg=attach.response error="No such volume"

@soumyalj this is fixed in master now.

Tested with v1.6.0-rc4.

Created a volume volume1 and created a service "ser1" to use this volume and data was written to the volume. Created a new service "ser2" pointing to the existing volume1 using the volumeid as allocated in AWS.  The new service "ser2" is on the same host as "ser1" and volume1. A new volume entry is created on the rancher side, but a new volume is not created in AWS as expected. This use case is functional.

Created a volume volume1 and created a service "ser1" to use this volume and data was NOT written to the volume. Created a new service "ser2" pointing to the existing volume1 using the volumeid as allocated in AWS. The new service "ser2" is not on the same host as "ser1" and volume1. Data written in the volume from "ser2" is not accessible from "ser1" and vice-versa.

This is because we use two different rancher volumes to reference the same EBS volume. This will lose the cattle scheduling ability because cattle will think those two volumes are separated and will not schedule the container to the same host. Once the same EBS volume gets scheduled on two different hosts, crazy things could happen.🙂

CLosing as this works as expected.


Enable Gor in Bouncer Staging

Upgrading Gor broke traffic replay for Bouncer previously, so we should
enable it in Staging replaying to Integration to see if we can spot
these problems before any upgrades in Production.

🎉  thanks!

Merge away.


zero_method 'wilcox' and 'pratt' do not work if the x - y is zero for all elements.

ValueError: zero_method 'wilcox' and 'pratt' do not work if the x - y is zero for all elements.

@DennisShaw Were you able to solve this issue?

@DennisShaw Were you able to solve this issue?

The error means that either wilcoxon or pratt is having as an input two identical lists : For a given list=List1, wilcoxon(List1,List1) returns error; in other words, x-y is zero for all elements which points out the erreur.
In order to avoid it, we'll have to make sure that repo[i]!=repo[j] (the inputs of wilcox). So we need to apply the following adjustements (mentionned in bold):
[267] for i in range(type_size-1):
print ("repo ",i, ": ",repo[i],type(repo[i]))
for j in range(i+1, type_size):
if evaluation_metric == 1:
etc..
This way, 'i' will always be different from 'j' and so repo[i] and repo[j] won't be identical.

I just wanted to check in regarding this issue, if the above comment is the verified solution to the issue and should be implemented? Or was there another method that the authors intended and that is why this comment status is left on 'Open'. Thanks!


read_buffers: ValueError: could not broadcast input array from shape (500,3) into shape (1000,3)

> python examples/ray_2_boxes_example.py
...
Exiting the loop
Converting buffers to contiguous arrays
Exiting the function
tot_time=82.16
Traceback (most recent call last):
  File "/home/krza/code/building3d/examples/ray_2_boxes_example.py", line 52, in <module>
    pos_buf, vel_buf, enr_buf, hit_buf = read_buffers("tmp")
  File "/home/krza/code/building3d/building3d/simulators/rays/dump_buffers.py", line 121, in read_buffers
    pos_buf[step_num, :, :] = pos
ValueError: could not broadcast input array from shape (500,3) into shape (1000,3)

I believe this commit fixes this issue: 371f9c1b3d55dd068256f8d19fa7c6d1e4497e06
Not sure why, but Numba cannot guess the shape of the array when using :. It works in Python.
Specifying the sizes of each dimension works in Numba.


Type '(payload: Partial) => Pokemon' is not assignable to type 'OnAddedFn'

Hi @mesqueeb,
First of all, thanks a lot for the great work you have done here ! It is much appreciated 🙇♂
I am trying to configure magnetar in a project I recently started with Vue 3. However, I am having trouble to make it work with TypeScript. To simplify my description, I am going to use the example provided in your documentation.
When I try to transpile this snippet :
export type Pokemon = { name: string, nickName?: string, id: string, level: number }

export function pokemonDefaults(payload: Partial<Pokemon>): Pokemon {
  const defaults: Pokemon = { name: '', nickName: '', id: '', level: 0 }

  return { ...defaults, ...payload }
}

// here is how you inject the Type: collection<Pokemon>
export const pokedexModule = magnetar.collection<Pokemon>('pokedex', {
  modifyPayloadOn: { insert: pokemonDefaults },
  modifyReadResponseOn: { added: pokemonDefaults },
})

I get this error:
ERROR in src/services/pokemon.ts:18:27
TS2322: Type '(payload: Partial<Pokemon>) => Pokemon' is not assignable to type 'OnAddedFn'.
  Types of parameters 'payload' and 'docData' are incompatible.
    Type 'Record<string, any> | undefined' is not assignable to type 'Partial<Pokemon>'.
      Type 'undefined' is not assignable to type 'Partial<Pokemon>'.
    16 | export const pokedexModule = magnetar.collection<Pokemon>('pokedex', {
    17 |   modifyPayloadOn: { insert: pokemonDefaults },
  > 18 |   modifyReadResponseOn: { added: pokemonDefaults },
       |                           ^^^^^
    19 | })
    20 |

Do you have an idea what could have gone wrong?
Here is my config
node 16.13.1
magnetar 0.5.4
typescript 4.6.2

@vdsbenoit thanks for finding this!
So I have typed the modifyReadResponseOn.added function kind of weirdly:
/**
 * Can be used to modify docs that come in from 'stream' or 'fetch' actions, before they are added to your store data. When returning `undefined` they will be discarded & won't be added to the store data.
 */
export type OnAddedFn = (docData: Record<string, any> | undefined, docMetadata: DocMetadata) => Record<string, any> | void

see source code at:

https://github.com/cycraft/magnetar/blob/production/packages/core/src/types/modifyReadResponse.ts/#L3-L7

But I don't think we should ever execute the modifyReadResponseOn.added fn when the payload is undefined.
Changing my underlying type to this will fix the issue:
/**
 * Can be used to modify docs that come in from 'stream' or 'fetch' actions, before they are added to your store data. When returning `undefined` they will be discarded & won't be added to the store data.
 */
export type OnAddedFn = (docData: Record<string, any>, docMetadata: DocMetadata) => Record<string, any> | void

So I will do this somewhere this week after checking this won't cause issues.
In the meanwhile you can fix the issue on your end with a workaround of adding a simple ? in the defaults fn payload like so:
export function pokemonDefaults(payload?: Partial<Pokemon>): Pokemon {
  const defaults: Pokemon = { name: '', nickName: '', id: '', level: 0 }

  return { ...defaults, ...payload }
}

see the payload?:  : ) that's the workaround that should work for now

Thanks a lot for your quick reply ! I'll try that

@vdsbenoit you can now define the type of your document when inserting separately from the type of your module doc.
 const pokedexModule = magnetar.collection<Pokemon, { insert: Partial<Pokemon> }>('pokedex',
  modifyPayloadOn: { insert: pokemonDefaults },
  modifyReadResponseOn: { added: pokemonDefaults },
})

this will make it so executing pokedexModule.insert({ name: 'bulbasaur' }) won't cause any issue if this is only a partial of your document.
Does this help you further?

@vdsbenoit on<EMAIL_ADDRESS>I have changed the logic so modifyReadResponseOn.added is no longer executed when a fetch call returns no document.
This means that there is no possibility that the payload of modifyReadResponseOn.added is undefined anymore.
This means that the documentation example is now possible without type issues.
workaround: pokemonDefaults(payload?: Partial<Pokemon>): is no longer needed, you can use pokemonDefaults(payload: Partial<Pokemon>): without the ? again! 🎉
let me know if you have any further issues.

Hi,
I'm diving into my side project again (it's for an event that takes place once a year). I upgraded magnetar from 0.5.4 to 0.11.4. I confirm the issue is resolved! Thanks again for your support !


BugFix  if there extension has only one mime type (string)

in_array() expects parameter 2 to be array, string given
APPPATH/Config/Mimes.php at line 316
Each pull request should address a single issue, and have a meaningful title.

The resultig if statement is a bit of a mouthful, but valid :-/

You are correct  I was wondering if I should change all extension  values (mimes array) from strings to arrays... but this option was faster and there is literally no change in performance :)


vite_hanami in hanami 2.1

Discussed in https://github.com/ElMassimo/vite_ruby/discussions/445

Originally posted by krzykamil March 26, 2024
Hey
So currently the vite_hanami is broken to my understanding. It is probably meant for hanami pre 2.0, and now we have 2.1 which has its own, default way of doing views and assets.
However if someone wants to use hanami views, but not assets and wants to use vite, the current state of this gem, does not work for this purpose.
The tag helpers use non-existing methods, need to be included in a different way, in a different place, the vite-dev folder in public does not get generated etc.
In general for hanami, the gem is severely out-of-date. I was wondering if there are any plans/work in progress, to get it working again for hanami 2.1? If not, would you accept PR's that try to make it work with the newer hanami? It would be aimed for integrations that use hanami-views but skip hanami-assets I guess, although I am not sure. Without hanami-assets there are no tag halpers like javascript_tag etc. but everything else would be obsolete from that gem if using vite.

I'm in the same boat. We'll start building a Hanami 2.1 app next month and another one in September. Our front-end devs want to use Vite for convenience, familiarity, and because Hanami's default setup is lacking features (HMR being the most important one).
I was also wondering if vite_hanami could just build on esbuild since hanami-assets is using it. I'm not sure if that makes sense, though.

Since hanami-assets is just a gem that is optional, you can just start your project without it, and add vite separately, this will however include doing your own asset helpers for the views and all.
Right now all solutions I saw were kinda workarounds, maybe not really suitable for real production projects, but if someone comes up with something I'll gladly help. However now, the problem I've outlined in the linked discussion is making most solutions pointless due to how strongly hanami-assets is connected to esbuild.
Making a sensible vite integration would probably require changes to hanami lib itself

Yeah, we can't have workarounds. I don't mind creating a PR. I've done it before with lucky_vite, so it's not new to me. But I'll need to look at both ends (Hanami and vite_ruby) to see how it all fits together while staying as close as possible to Hanami's API.