Fortpy

Latest version: v1.7.7

Safety actively analyzes 681866 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 12

1.5.0

This minor version increment presents an additional interoperability tool call `ftypes` to the fortpy suite. It automatically:
- generates wrapper subroutines for fortran code including for output parameters that are `pointer` or `allocatable`.
- generates library archives `*.a` for entire code directories containing modules that are dependencies for those being wrapped.
- compiles a shared library for the wrapper modules.
- generates python modules with ctypes to interact with the shared libraries.
- cleans up the allocated fortran arrays using `__del__` via another ctypes call to the shared library's `ftypes_dealloc` module that has handlers for freeing the `allocatable` and `pointer` variables.

The interface for using these features is a new `scripts/ftypes.py` that ships with fortpy and is installed to the `bin` during setup. It allows modules for an entire library to be created all at once and automatically handles the dependency modules by compiling `*.a` libraries from all included code directories in the fortpy `config.xml` as needed.

There are a few cases that `ftypes` will not be able to handle:
- user-derived types are not currently handled, but will be sometime in the future.
- if any of the parameters in a subroutine or function don't have `intent` specified, no wrappers will be created for them.

1.4.7

------

- Fixed a bug where test level `<global>` tags were being overridden by the `regular="true"` parameter tag declarations.
- Related: the _ignore_ attribute of the `<global>` tags was being checked against the *group's* variables first and then skipping a test-level specification when the tests should have priority.

1.4.6

------

- Added support for the _runchecks_ and _execute_ attributes on `<test>` tags so that fortpy can be used to generate drivers without breaking the unit tests that *do* have model output.
- Fixed a bug whereby `MethodFinder` instances were only returning the group-level variables for writing the executable, but not the test-specification variables, even though the test-spec variables are the most general ones.
- Fixed a bug that had the model output check reports giving more than 100% success if multiple targets were being checked.

1.4.5

------

- Fixed a bug for `<global>` tags being parsed in a test specification context.
- Fixed a bug for ignored variables; previously, only variables declared at the test group level would be ignored by the ignore directive. Now test-level variables are also acknowledged.

1.4.4

------

- Added a script `parse.py` that gives easy access to parse arbitrary fortran `.f90` files with the option of overwriting the file cache for a specific module. Useful for debugging specific code to figure out why fortpy isn't doing what the user thinks it is being told to do. Usually the problem is with some stray syntax (e.g. `!!` that is special to fortpy) and can be remedied easily.
- Debugged a hard-coded value for copying group-level tags to test specifications that was causing duplication.

1.4.3

------

- Fixed a bug where derived-type variable instances with `allocate="true"` were not being allocated if their type was set as `type` instead of `class`.
- Added `None`-type checks for the `MethodFinder` testing group because of the allowances made in Revision 1.4.2.

Page 4 of 12

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.