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

Version 1.12.0 #1858

Merged
merged 24 commits into from May 13, 2024
Merged

Version 1.12.0 #1858

merged 24 commits into from May 13, 2024

Conversation

EmilyBourne
Copy link
Member

@EmilyBourne EmilyBourne commented May 6, 2024

TODO:

@pyccel pyccel deleted a comment from pyccel-bot bot May 6, 2024
@EmilyBourne EmilyBourne added the next release This PR must be merged before the next release label May 6, 2024
Clarify that the call to `_print` is only necessary for a `PyccelAstNode`.
This is a small PR to mark the failing Intel test `test_numpy_isfinite`,
which fails when passing `np.inf`. It seems likely that this could be
due to a difference in how the Intel and GNU compilers handle infinity.
Flagging this test as `xfail` will ensure that the other tests are still
run so other errors can be detected.
The codegen stage contains lots of old code which sometimes refers to
parameters which no longer exist. Here we clean up some of that code
and remove commented dead code which refers to it. Specifically the
functions `fcode`, `ccode` and `pycode` are removed as well as
`Codegen.doprint` and `Codegen.set_printer`. An instance of `Codegen`
must now be created with the language passed as argument.
Add missing `PythonTuple` cast to fix array unpacking. Fixes #1792.
Add tests including tests returning slices. Fix C bug returning slices.
Fixes #1795.
VaradRengaraj and others added 6 commits May 7, 2024 10:44
Fixes #1641:

- Add functions to support array copy between different data types.
- Add tests covering all possible scenarios of data type conversion.
- Add separate tests with source and destination arrays of non-matching sizes.
- Add separate tests with Fortran ordering.
In the Windows installation, do not use the `sleep` command to wait for
an executable to finish, as this leads to random crashes. Instead, use
the proper Windows commands (taken from PR #1180) to wait for the
execution.
According to the docstring of `docstr-coverage`, the flag
`--docstr-ignore-file` is deprecated. A json config file should be used
instead. This PR updates our methodology to use that flag
Apply some more Pylint fixes. Namely:
- Fix fstring errors in pyccel.ast
- Fix several unused-import errors

Docstrings are also added to satisfy CI. Some deprecated code is
removed:
- `get_function_from_ast` which was unused
Fix assigning an array to a slice and add tests. Fixes #1218

This is achieved by fixing the indexing in the case where the variable
on the left-hand side of the assignment has a higher rank than the
variable on the right hand side.

---------

Co-authored-by: Yaman Güçlü <yaman.guclu@gmail.com>
Mac in particular is bad at handling warnings in pytest. #1762
introduced lots of warnings as it is testing casting between types. Such
behaviour often raises warnings in NumPy. This PR deactivates those
warnings for these specific tests thus speeding up the mac tests by ~x2

---------

Co-authored-by: Yaman Güçlü <yaman.guclu@gmail.com>
EmilyBourne and others added 4 commits May 7, 2024 11:33
…1831)

Fix missing allocation when returning an annotated array expression by
ensuring a syntactic expression is passed to `_visit_Assign`. Fixes
#1830.
….lambdify` (#1829)

Given a SymPy expression `f` and type annotations, `lambdify` returns
a "pyccelised" function `f_fast` that can be used in the same Python
session. Fixes #1827.
Deprecated `lambdify` decorator. The decorator is removed from
`pyccel/decorators.py` and the tests that use it are removed
(`tests/symbolic/scripts/lambdas.py`, and
`tests/symbolic/scripts/neural_net.py`)

---------

Co-authored-by: EmilyBourne <louise.bourne@gmail.com>
Determine the location of the gfortran executable programatically.
This fixes a CI failure on macOS caused by a change in HomeBrew's
default installation directory. This solution should prevent a similar
problem arising again in the future. Fixes #1856.

**Additional changes**

- Increase tolerance on symbolic tests to avoid failures.
- Use isclose to compare floats instead of ==, which was causing
failures in a single unit test.

---------

Co-authored-by: Yaman Güçlü <yaman.guclu@gmail.com>
Fix the translation of a file whose name conflicts with Fortran keywords
by ensuring that the original name is correctly extracted from the
scope. Fixes #1853.

**Commit Summary**

- Ensure Python name of module exists in the scope by adding it in the
syntactic stage.
- Don't use `AsName` for module name
- Save the Python name of a module as the name of the `PyModule`
- Ensure Python names are used for imports
- Remove hacky `set_name` function.
- Remove unused `assign_to` argument of `CodePrinter.doprint`.

---------

Co-authored-by: Yaman Güçlü <yaman.guclu@gmail.com>
EmilyBourne and others added 7 commits May 7, 2024 16:58
Change the workflow configuration so the tests are also run
on the `main` branch (in addition to `devel`).

Further, make sure that the bot reporting is only run on
`workflow_dispatch` events. This avoids the results being
reported twice when the workflow is triggered by pushes.
- Update `actions/checkout` and `actions/setup-python` to remove Node.js
version deprecation warnings
- Add a `deploy` workflow which uses
`ci_tools/wait_for_main_workflows.py` to wait until all the workflows
for `main` have completed and succeeded and then updates the repo by:
    1. Building the distribution
    2. Shipping the distribution to PyPI
    3. Adding a tag to the commit with the version
- Allow the GitHub API tools to be used for get operations without
authenticating as the bot
- Correct the files included in the wheel to only include source files
(fixes #1436)
Replace `master` with `devel`, and remove references to the old
`tutorials` folder:

- Update link to LICENSE in the header of every file
- Update links in bot welcome message
- Update links and text in documentation files
- Update link in module docstring of pyccel/ast/omp.py
- Update links in error messages

---------

Co-authored-by: EmilyBourne <louise.bourne@gmail.com>
The comment bot is broken because the authentification test is slightly
wrong. For several tests the authentification is carried out in a
separate stage which adds `installation_token` to the environment as a
variable. This PR fixes the logic so this value is collected if it is
available

Co-authored-by: Yaman Güçlü <yaman.guclu@gmail.com>
Raise an error indicating that C should be used to mix scalar and array
return types (see #1339).

---------

Co-authored-by: Yaman Güçlü <yaman.guclu@gmail.com>
Add a `use_out` parameter to `pyccel.lambdify` to avoid unnecessary
memory allocation. Auto-generate a docstring for functions generated via
calls to `pyccel.lambdify`.
Correct a small issue in the wrapper documentation : 
From : 
```python
def _print_ClassName(self, stmt):
    ...
    return Y
```
To : 
```python
def _wrap_ClassName(self, stmt):
    ...
    return Y
```

Co-authored-by: mustapha-belbiad <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>
Add a `try/except` around internal Pyccel calls to catch all
`PyccelError`s. This allows the shortest possible traceback to be shown
to the user when the error is recognised, handled and reported by
Pyccel. Fixes #1868.
yguclu pushed a commit that referenced this pull request May 13, 2024
Update the version in `version.py` to 1.12.0. Update the CHANGELOG to
move the changes in #1858 to a new section for version 1.12.0.
Update the version in `version.py` to 1.12.0. Update the CHANGELOG to
move the changes in #1858 to a new section for version 1.12.0.
@EmilyBourne
Copy link
Member Author

/bot run linux macos windows

@EmilyBourne
Copy link
Member Author

/bot show tests

@pyccel-bot
Copy link

pyccel-bot bot commented May 13, 2024

There are unrecognised tests.
The following is a list of keywords which can be used to run tests. Tests in bold are run by pull requests when they are marked as ready for review:

  • linux : Runs the unit tests on a Linux system.
  • windows : Runs the unit tests on a Windows system.
  • macosx : Runs the unit tests on a MacOS X system.
  • coverage : Runs the unit tests on a Linux system and checks the coverage of the tests.
  • docs : Checks if the documentation follows the numpydoc format.
  • pylint : Runs pylint on files which are too big to be handled by codacy.
  • pyccel_lint : Runs a linter to check that Pyccel's best practices are followed.
  • spelling : Checks if everything in the documentation is spelled (and capitalised) correctly.
  • pr_tests : Runs all the tests marked in bold.
  • pickle : Checks that .pyccel files have been correctly generated and installed by the installation process.
  • editable_pickle : Checks that .pyccel files have been correctly generated and installed by the editable installation process.
  • pickle_wheel : Checks that .pyccel files have been correctly generated and packaged into the wheel.
  • anaconda_linux : Runs the unit tests on a linux system using anaconda for python.
  • anaconda_windows : Runs the unit tests on a windows system using anaconda for python.
  • intel : Runs the unit tests on a linux system using the intel compiler.

These tests can be run with the command /bot run X (multiple tests can be specified separated by spaces), or with try V X to test on Python version V.

@pyccel-bot
Copy link

pyccel-bot bot commented May 13, 2024

The following is a list of keywords which can be used to run tests. Tests in bold are run by pull requests when they are marked as ready for review:

  • linux : Runs the unit tests on a Linux system.
  • windows : Runs the unit tests on a Windows system.
  • macosx : Runs the unit tests on a MacOS X system.
  • coverage : Runs the unit tests on a Linux system and checks the coverage of the tests.
  • docs : Checks if the documentation follows the numpydoc format.
  • pylint : Runs pylint on files which are too big to be handled by codacy.
  • pyccel_lint : Runs a linter to check that Pyccel's best practices are followed.
  • spelling : Checks if everything in the documentation is spelled (and capitalised) correctly.
  • pr_tests : Runs all the tests marked in bold.
  • pickle : Checks that .pyccel files have been correctly generated and installed by the installation process.
  • editable_pickle : Checks that .pyccel files have been correctly generated and installed by the editable installation process.
  • pickle_wheel : Checks that .pyccel files have been correctly generated and packaged into the wheel.
  • anaconda_linux : Runs the unit tests on a linux system using anaconda for python.
  • anaconda_windows : Runs the unit tests on a windows system using anaconda for python.
  • intel : Runs the unit tests on a linux system using the intel compiler.

These tests can be run with the command /bot run X (multiple tests can be specified separated by spaces), or with try V X to test on Python version V.

@EmilyBourne
Copy link
Member Author

/bot run anaconda_linux anaconda_windows intel pickle editable_pickle pickle_wheel

@EmilyBourne
Copy link
Member Author

/bot run linux macosx windows

@EmilyBourne EmilyBourne marked this pull request as ready for review May 13, 2024 14:54
@EmilyBourne EmilyBourne added the Ready_to_merge Approved by senior developer. Ready for final approval and merge label May 13, 2024
@EmilyBourne EmilyBourne requested a review from yguclu May 13, 2024 14:54
@pyccel-bot pyccel-bot bot added Ready_to_merge Approved by senior developer. Ready for final approval and merge and removed Ready_to_merge Approved by senior developer. Ready for final approval and merge labels May 13, 2024
@yguclu yguclu merged commit 52d2371 into main May 13, 2024
17 checks passed
@yguclu yguclu deleted the release branch May 13, 2024 15:06
EmilyBourne added a commit to pyccel/pyccel-cuda that referenced this pull request May 14, 2024
Update the version in `version.py` to 1.12.0. Update the CHANGELOG to
move the changes in pyccel#1858 to a new section for version 1.12.0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
next release This PR must be merged before the next release 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.

None yet

5 participants