Skip to content

dat and npy files required to run examples have not been deployed #705

Closed
@degawa

Description

@degawa

Description

Two example programs of stdlib_io, example_loadnpy and example loadtxt, terminated with an error.

>fpm run --example example_loadtxt
Project is up to date
At line 979 of file .\src\stdlib_io.f90
Fortran runtime error: Cannot open file 'example.dat': No such file or directory

>fpm run --example example_loadnpy
Project is up to date
 Failed to read array from file 'example.npy'
ERROR STOP 

Expected Behaviour

I expected the examples to run and finish without any errors.

Version of stdlib

31f5a8b

Platform and Architecture

Windows 10 22H2 64bit, gfortran 11.2 bundled with quickstart Fortran on Windows, fpm 0.7.0 alpha

Additional Information

This problem occurs only on the stdlib-fpm branch.
example.dat and example.npy do not exist in this branch, suggesting some need for more configuration during deployment.

In fpm-deployment.sh, *.dat files and *.npy files in the example directory are not copied; contrary to *.dat files in the test directory are copied.

find test -name "test_*.f90" -exec cp {} "$destdir/test/" \;
find test -name "*.dat" -exec cp {} "$destdir/" \;
find example -name "example_*.f90" -exec cp {} "$destdir/example/" \;

I'm not familiar with Linux or bash scripts, but thanks to the similarity of the process for the test directory, adding commands to copy the *.dat files and *.npy files may solve this problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions