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

Commits on May 7, 2024

  1. Clarify developer docs (#1777)

    Clarify that the call to `_print` is only necessary for a `PyccelAstNode`.
    EmilyBourne committed May 7, 2024
    Configuration menu
    Copy the full SHA
    0ef29ba View commit details
    Browse the repository at this point in the history
  2. Mark the failing Intel test (#1784)

    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.
    EmilyBourne committed May 7, 2024
    Configuration menu
    Copy the full SHA
    573d9e7 View commit details
    Browse the repository at this point in the history
  3. Clean up unnecessary arguments in the codegen stage (#1791)

    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.
    EmilyBourne committed May 7, 2024
    Configuration menu
    Copy the full SHA
    688d633 View commit details
    Browse the repository at this point in the history
  4. Fix array unpacking (#1793)

    Add missing `PythonTuple` cast to fix array unpacking. Fixes #1792.
    Add tests including tests returning slices. Fix C bug returning slices.
    Fixes #1795.
    EmilyBourne committed May 7, 2024
    Configuration menu
    Copy the full SHA
    450383e View commit details
    Browse the repository at this point in the history
  5. Support array copy between different datatypes (#1641) (#1762)

    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.
    VaradRengaraj authored and EmilyBourne committed May 7, 2024
    Configuration menu
    Copy the full SHA
    7d14f69 View commit details
    Browse the repository at this point in the history
  6. Improve Windows install (#1817)

    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.
    EmilyBourne committed May 7, 2024
    Configuration menu
    Copy the full SHA
    8b537a1 View commit details
    Browse the repository at this point in the history
  7. Use yaml file instead of deprecated .docstr_coverage file (#1816)

    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
    EmilyBourne committed May 7, 2024
    Configuration menu
    Copy the full SHA
    3cd3e24 View commit details
    Browse the repository at this point in the history
  8. Fix fstring errors in pyccel.ast (#1822)

    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
    EmilyBourne committed May 7, 2024
    Configuration menu
    Copy the full SHA
    ee8395a View commit details
    Browse the repository at this point in the history
  9. Fix array to slice assignment (#1810)

    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>
    EmilyBourne and yguclu committed May 7, 2024
    Configuration menu
    Copy the full SHA
    618a796 View commit details
    Browse the repository at this point in the history
  10. Filter out cast warnings in cast tests (#1824)

    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 yguclu committed May 7, 2024
    Configuration menu
    Copy the full SHA
    2fbd8c4 View commit details
    Browse the repository at this point in the history
  11. Fix missing allocation when returning an annotated array expression (#…

    …1831)
    
    Fix missing allocation when returning an annotated array expression by
    ensuring a syntactic expression is passed to `_visit_Assign`. Fixes
    #1830.
    EmilyBourne committed May 7, 2024
    Configuration menu
    Copy the full SHA
    4135d58 View commit details
    Browse the repository at this point in the history
  12. Add a pyccel.lambdify function with similar functionality to `sympy…

    ….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.
    EmilyBourne committed May 7, 2024
    Configuration menu
    Copy the full SHA
    59a066d View commit details
    Browse the repository at this point in the history
  13. Deprecating lambdify decorator (#1823)

    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>
    elizasorber and EmilyBourne committed May 7, 2024
    Configuration menu
    Copy the full SHA
    8a9d337 View commit details
    Browse the repository at this point in the history
  14. Fix macOS gfortran installation (#1857)

    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>
    EmilyBourne and yguclu committed May 7, 2024
    Configuration menu
    Copy the full SHA
    c9f0d4d View commit details
    Browse the repository at this point in the history
  15. Fix translation for conflicting module name (#1854)

    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 yguclu committed May 7, 2024
    Configuration menu
    Copy the full SHA
    0ade72e View commit details
    Browse the repository at this point in the history
  16. Ensure workflows run on main branch (#1860)

    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.
    EmilyBourne committed May 7, 2024
    Configuration menu
    Copy the full SHA
    779740f View commit details
    Browse the repository at this point in the history
  17. Create deploy workflow (#1862)

    - 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)
    EmilyBourne committed May 7, 2024
    Configuration menu
    Copy the full SHA
    2fbb563 View commit details
    Browse the repository at this point in the history

Commits on May 8, 2024

  1. Link and mention devel branch, not master (#1863)

    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>
    yguclu and EmilyBourne committed May 8, 2024
    Configuration menu
    Copy the full SHA
    7000472 View commit details
    Browse the repository at this point in the history

Commits on May 13, 2024

  1. Fix comment bot (#1865)

    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>
    EmilyBourne and yguclu committed May 13, 2024
    Configuration menu
    Copy the full SHA
    72e055f View commit details
    Browse the repository at this point in the history
  2. Raise an error for issue #1339 (#1866)

    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>
    EmilyBourne and yguclu committed May 13, 2024
    Configuration menu
    Copy the full SHA
    c5cf08d View commit details
    Browse the repository at this point in the history
  3. Allow lambdify to generate functions with out arguments (#1867)

    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`.
    EmilyBourne committed May 13, 2024
    Configuration menu
    Copy the full SHA
    a89774d View commit details
    Browse the repository at this point in the history
  4. Fix Wrapper Documentation. (#1870)

    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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>
    mustapha-belbiad authored and EmilyBourne committed May 13, 2024
    Configuration menu
    Copy the full SHA
    9ef22ae View commit details
    Browse the repository at this point in the history
  5. Hide traceback for epyccel and lambdify errors (#1869)

    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.
    EmilyBourne committed May 13, 2024
    Configuration menu
    Copy the full SHA
    19c2025 View commit details
    Browse the repository at this point in the history
  6. Update version and CHANGELOG for v1.12.0 (#1859)

    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 committed May 13, 2024
    Configuration menu
    Copy the full SHA
    3f9b4a2 View commit details
    Browse the repository at this point in the history