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

Add support for cmath #1511

Merged
merged 33 commits into from
Sep 16, 2023
Merged

Add support for cmath #1511

merged 33 commits into from
Sep 16, 2023

Conversation

EmilyBourne
Copy link
Member

@EmilyBourne EmilyBourne commented Sep 14, 2023

Add support for the cmath library using similar methods to those used for the math library. Fixes #1422

@EmilyBourne
Copy link
Member Author

/bot run coverage docs pylint pyccel_lint

@pyccel-bot
Copy link

pyccel-bot bot commented Sep 14, 2023

Hello again! Thank you for this new pull request 🤩.

Here is your checklist. Please tick items off when you have completed them or determined that they are not necessary for this pull request:

  • Write a clear PR description
  • Add tests to check your code works as expected
  • Update documentation if necessary
  • Update Changelog
  • Ensure any relevant issues are linked
  • Ensure new tests are passing

@EmilyBourne EmilyBourne linked an issue Sep 14, 2023 that may be closed by this pull request
@EmilyBourne
Copy link
Member Author

/bot run docs pylint

Copy link

@pyccel-bot pyccel-bot bot left a comment

Choose a reason for hiding this comment

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

There seems to be lines in this PR which aren't tested. Please take a look at my comments and add tests which cover the new code.

If this is modified code which cannot be easily tested in this PR please open an issue to request that this code be either removed or tested. Once you have done that please leave a message on the relevant conversation beginning with the line /bot accept and referencing the issue.

Similarly if the new code cannot be tested for some reason, please leave a comment beginning with the line /bot accept on the relevant conversation explaining why the code can't be tested.

pyccel/ast/cmathext.py Show resolved Hide resolved
pyccel/ast/cmathext.py Show resolved Hide resolved
pyccel/ast/cmathext.py Show resolved Hide resolved
pyccel/ast/cmathext.py Outdated Show resolved Hide resolved
Comment on lines +427 to +428
super().__init__(z)

Copy link

Choose a reason for hiding this comment

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

This code isn't tested. Please can you take a look

Copy link
Member Author

Choose a reason for hiding this comment

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

/bot accept
Code is only provided to ensure the docstrings are aware of the parameter names

Comment on lines +450 to +455
super().__init__(r, phi)

#==============================================================================
# Dictionary to map cmath functions to classes above
#==============================================================================

Copy link

Choose a reason for hiding this comment

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

This code isn't tested. Please can you take a look

Copy link
Member Author

Choose a reason for hiding this comment

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

/bot accept
Code is only provided to ensure the docstrings are aware of the parameter names

@EmilyBourne
Copy link
Member Author

/bot run coverage

@EmilyBourne EmilyBourne marked this pull request as ready for review September 14, 2023 13:01
@github-actions github-actions bot marked this pull request as draft September 14, 2023 13:01
@pyccel-bot
Copy link

pyccel-bot bot commented Sep 14, 2023

Unfortunately your PR is not passing the tests so it is not quite ready for review yet. Let me know when it is fixed with /bot mark as ready.

Copy link

@pyccel-bot pyccel-bot bot left a comment

Choose a reason for hiding this comment

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

Good job ! Your PR is using all the code it added/changed.

@EmilyBourne EmilyBourne marked this pull request as ready for review September 14, 2023 13:05
@pyccel-bot
Copy link

pyccel-bot bot commented Sep 14, 2023

Hey @pyccel/pyccel-dev ! @EmilyBourne has just created this great new pull request! Check it out and let me know what you think!

@pyccel-bot
Copy link

pyccel-bot bot commented Sep 14, 2023

Hey @pyccel/pyccel-dev ! @EmilyBourne has just created this great new pull request! Check it out and let me know what you think!

pyccel/ast/mathext.py Outdated Show resolved Hide resolved
@EmilyBourne
Copy link
Member Author

/bot run docs

@EmilyBourne
Copy link
Member Author

/bot run pr_tests

pyccel/codegen/printing/ccode.py Outdated Show resolved Hide resolved
pyccel/ast/mathext.py Outdated Show resolved Hide resolved
@pyccel-bot pyccel-bot bot added Ready_to_merge Approved by senior developer. Ready for final approval and merge and removed needs_initial_review labels Sep 15, 2023
@github-actions github-actions bot marked this pull request as draft September 15, 2023 13:13
@pyccel-bot pyccel-bot bot removed the Ready_to_merge Approved by senior developer. Ready for final approval and merge label Sep 15, 2023
@EmilyBourne EmilyBourne marked this pull request as ready for review September 15, 2023 13:13
Copy link

@pyccel-bot pyccel-bot bot left a comment

Choose a reason for hiding this comment

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

Good job ! Your PR is using all the code it added/changed.

@pyccel-bot pyccel-bot bot added the Ready_to_merge Approved by senior developer. Ready for final approval and merge label Sep 15, 2023
@yguclu yguclu merged commit 41a5bfe into devel Sep 16, 2023
13 checks passed
@yguclu yguclu deleted the devel-issue1422 branch September 16, 2023 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready_to_merge Approved by senior developer. Ready for final approval and merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pyccelisation of a cmath function
2 participants