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

number type should no longer differentiate between integer and decima… #6800

Closed
wants to merge 2 commits into from

Conversation

FloLey
Copy link
Contributor

@FloLey FloLey commented Dec 2, 2023

…l notation when used in indexes. (Issue #6526, PR #6772)

Description

  1. create the float type which is like a float in python. Update documentation to mention number will be deprecated

  2. add testcases for following scenario and fix it

entity A:
    float x
end

implement A using std::none

index A(x)

std::print(A(x=0) == A(x=0.0))

This will still not work with the number type

  1. index lookup on float with int should work

closes #6526

Self Check:

Strike through any lines that are not applicable (~~line~~) then check the box

  • Attached issue to pull request
  • Changelog entry
  • Type annotations are present
  • Code is clear and sufficiently documented
  • No (preventable) type errors (check using make mypy or make mypy-diff)
  • Sufficient test cases (reproduces the bug/tests the requested feature)
  • Correct, in line with design
  • End user documentation is included or an issue is created for end-user documentation (add ref to issue here: )
  • If this PR fixes a race condition in the test suite, also push the fix to the relevant stable branche(s) (see test-fixes for more info)

…l notation when used in indexes. (Issue #6526, PR #6772)

# Description

1. create the float type which is like a float in python. Update documentation to mention number will be deprecated

2. add testcases for following scenario and fix it

```
entity A:
    float x
end

implement A using std::none

index A(x)

std::print(A(x=0) == A(x=0.0))
```
This will still not work with the number type

3. index lookup on float with int should work

closes #6526

# Self Check:

Strike through any lines that are not applicable (`~~line~~`) then check the box

- [x] Attached issue to pull request
- [x] Changelog entry
- [x] Type annotations are present
- [x] Code is clear and sufficiently documented
- [x] No (preventable) type errors (check using make mypy or make mypy-diff)
- [x] Sufficient test cases (reproduces the bug/tests the requested feature)
- [x] Correct, in line with design
- [x] End user documentation is included or an issue is created for end-user documentation (add ref to issue here: )
- [ ] If this PR fixes a race condition in the test suite, also push the fix to the relevant stable branche(s) (see [test-fixes](https://internal.inmanta.com/development/core/tasks/build-master.html#test-fixes) for more info)
@FloLey FloLey requested a review from sanderr December 4, 2023 08:17
@FloLey FloLey added the merge-tool-ready This ticket is ready to be merged in label Dec 4, 2023
@inmantaci
Copy link
Contributor

Processing this pull request

@inmantaci
Copy link
Contributor

Merged into branches iso6 in 26d8f2e

inmantaci pushed a commit that referenced this pull request Dec 4, 2023
…l notation when used in indexes. (Issue #6526, PR #6800)

…l notation when used in indexes. (Issue #6526, PR #6772)

# Description

1. create the float type which is like a float in python. Update documentation to mention number will be deprecated

2. add testcases for following scenario and fix it

```
entity A:
    float x
end

implement A using std::none

index A(x)

std::print(A(x=0) == A(x=0.0))
```
This will still not work with the number type

3. index lookup on float with int should work

closes #6526

# Self Check:

Strike through any lines that are not applicable (`~~line~~`) then check the box

- [x] Attached issue to pull request
- [x] Changelog entry
- [x] Type annotations are present
- [x] Code is clear and sufficiently documented
- [x] No (preventable) type errors (check using make mypy or make mypy-diff)
- [x] Sufficient test cases (reproduces the bug/tests the requested feature)
- [x] Correct, in line with design
- [x] End user documentation is included or an issue is created for end-user documentation (add ref to issue here: )
- [ ] If this PR fixes a race condition in the test suite, also push the fix to the relevant stable branche(s) (see [test-fixes](https://internal.inmanta.com/development/core/tasks/build-master.html#test-fixes) for more info)
@inmantaci inmantaci closed this Dec 4, 2023
@inmantaci inmantaci deleted the issue-index-float-int branch December 4, 2023 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge-tool-ready This ticket is ready to be merged in
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants