Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MARP-637: Cells with "wrong" numbers should not be reconized as numbers #59

Conversation

linhpd-axonivy
Copy link
Contributor

No description provided.

@linhpd-axonivy linhpd-axonivy force-pushed the feature/MARP-637-Excel-Importer-Cells-with-wrong-numbers-should-not-be-reconized-as-numbers branch from 77d2093 to fa0d78a Compare August 8, 2024 09:43
Copy link
Contributor

github-actions bot commented Aug 8, 2024

Test Results

9 tests  +9   9 ✅ +9   9s ⏱️ +9s
6 suites +6   0 💤 ±0 
6 files   +6   0 ❌ ±0 

Results for commit c76ce8c. ± Comparison against base commit 3eabbec.

♻️ This comment has been updated with latest results.

@linhpd-axonivy linhpd-axonivy force-pushed the feature/MARP-637-Excel-Importer-Cells-with-wrong-numbers-should-not-be-reconized-as-numbers branch from fa0d78a to 731aa5a Compare August 8, 2024 09:47
Copy link

@ntqdinh-axonivy ntqdinh-axonivy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@linhpd-axonivy
Copy link
Contributor Author

Hi @ivy-rew ,
I made some enhancements to this one regarding datatype recognition. Could you help me take a look at it?

Copy link
Member

@ivy-rew ivy-rew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please cover the new functionality with tests;

@ivy-rew
Copy link
Member

ivy-rew commented Aug 12, 2024

LGTM

No, I disagree ... that doesn't look good to me. @ntqdinh-axonivy
I'd really keep the ivy market a place where professional development culture can be seen by everyone.

there are several reasons why such changes should come with a test:

  • this repository has tests, it's quality should be kept and not declined 📉
  • we extended a simple utility class, it's perfectly testable with simple fast executing unit tests ✔️
  • having tests would it make much easier for me as reviewer, to see what you are trying to change here 🤔
  • it seems as if you fixed a bug, bugs always scream for being covered with a test, unless you want the same functionality to be broken again in the near future without being noticed -> big frustration for the customer 🐞 😠
  • this is product development; not project work ... products stay much longer on the market and will be used by a wider user base, so acting professional becomes way more important. 🥇

@linhpd-axonivy
Copy link
Contributor Author

LGTM

No, I disagree ... that doesn't look good to me. @ntqdinh-axonivy I'd really keep the ivy market a place where professional development culture can be seen by everyone.

there are several reasons why such changes should come with a test:

  • this repository has tests, it's quality should be kept and not declined 📉
  • we extended a simple utility class, it's perfectly testable with simple fast executing unit tests ✔️
  • having tests would it make much easier for me as reviewer, to see what you are trying to change here 🤔
  • it seems as if you fixed a bug, bugs always scream for being covered with a test, unless you want the same functionality to be broken again in the near future without being noticed -> big frustration for the customer 🐞 😠
  • this is product development; not project work ... products stay much longer on the market and will be user by a wider user base, so acting professional becomes way more important. 🥇

Thank you for your feedback. I'll update the test soon

@linhpd-axonivy linhpd-axonivy force-pushed the feature/MARP-637-Excel-Importer-Cells-with-wrong-numbers-should-not-be-reconized-as-numbers branch from cde1341 to c735e7d Compare August 12, 2024 08:30
@linhpd-axonivy
Copy link
Contributor Author

Hi @ivy-rew ,
I have adapted the test for my updated code.

Comment on lines 32 to 33
new Column("Wrong number format with dot should be String", String.class, 255),
new Column("Wrong number format with comma should be String", String.class, 255),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this not interpreted as numeric value, just like excel does? I think this is what the customer was asking for 🤔
this-is-anumber

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please check with @ivy-sgi if we really got the customers requirements right; I think numbers that excel treat as numbers, should be numeric in ivy as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the linked issue, the customer wants '15024.00.00' to be treated as text, and I checked that in my Excel, '15024.00.00' is recognized as text by default. Numeric values are right-aligned, while text is left-aligned.
image

Copy link
Member

@ivy-rew ivy-rew Aug 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I see, the customers sample file doesn't match the expectations written in prose. And I agree with you on the left/right alignment. Please check the customers file and you will see exactly such numbers as in your example ... but not left aligned ... as these are numbers.

I think we should cover the customers example sheet in a anonymized way: in his example, he has such numbers which are recognized as being 'numeric' by excel. And IMHO these numeric values should remain numeric in ivy too. Otherwise that feature request may makes sense to one customer, but not to the rest of the world.
🤷

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated the tests for 2 cases.

  • Column contains texts that look like numbers but in incorrect format should be determined as String
  • Column contains both text and numeric values should be determined as String

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the update; the intention is now very clear.
It seems like libre-office calc, made me think that these "incorrect numbers" are totally normal normal numeric values. However; if I try to use them in a function they do not work as numbers ... so I finally understood the problem and agree on the direction to go 😅
its-numeric

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your feedbacks

@linhpd-axonivy linhpd-axonivy merged commit 62669b4 into master Aug 13, 2024
2 of 3 checks passed
@linhpd-axonivy linhpd-axonivy deleted the feature/MARP-637-Excel-Importer-Cells-with-wrong-numbers-should-not-be-reconized-as-numbers branch August 13, 2024 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Import error: Cannot get a STRING value from a NUMERIC cell
3 participants