-
Notifications
You must be signed in to change notification settings - Fork 173
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
Handle npz
files
#865
Open
minhqdao
wants to merge
147
commits into
fortran-lang:master
Choose a base branch
from
minhqdao:handle-npz-files
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Handle npz
files
#865
Changes from all commits
Commits
Show all changes
147 commits
Select commit
Hold shift + click to select a range
c74a30e
Format windows ci file
minhqdao 39df36b
Install fypp from msys2 package, clean up file
minhqdao ca8fc47
Only run on push
minhqdao abcd256
Clean up CI, run all on push only
minhqdao cf1cfe1
Bump to macos and intel-classic version
minhqdao 557e65e
Revert to macos-12
minhqdao cefec39
Fix typos
minhqdao 6eb9f3d
Reorder modules
minhqdao f556f18
Rename argument to avoid name clash
minhqdao b65f164
Remove whitespace
minhqdao bc3c551
Not use generics but a submodule instead to hopefully make all compil…
minhqdao 9ae364c
Only allocate once
minhqdao 21eee02
Commenting out a bit, it should build
minhqdao 9aec6d0
Comment out even more
minhqdao 30e20bf
Comment out the entire thing
minhqdao f59956b
Revert "Comment out the entire thing"
minhqdao 9dfee6f
Revert "Comment out even more"
minhqdao d36ef05
Revert "Commenting out a bit, it should build"
minhqdao 1353893
Revert "Only allocate once"
minhqdao be3603b
Revert "Not use generics but a submodule instead to hopefully make al…
minhqdao ad534b8
Just comment out that call
minhqdao 7ad213b
Comment out the generics
minhqdao 5ea9739
Reenable type-bound method
minhqdao 1c19820
Remove msys, re-enable both push and pull_request and comment out met…
minhqdao 070fc19
Remove on pull_request otherwise it runs twice
minhqdao 9deca6c
Just inline the process
minhqdao 4195544
Revert some changes
minhqdao 597721c
Add unzip command
minhqdao 60b116e
Allocate cmdmsg
minhqdao d4e6618
Add tests for non-zip and empty zip files
minhqdao 5f6ccb8
Remove unnecessary code
minhqdao 22f5f37
Add list files in zip and add tests
minhqdao 8d3fee2
Fix list_files_in_zip and add test for zip file containing an empty file
minhqdao 0682b82
Add test for zip file containing file empty.txt
minhqdao 44946cc
Use textfile with sth in it
minhqdao 540e8d5
Add simple npz file
minhqdao 00d3d75
Add unzip msys dependency
minhqdao b9d19fc
Try identify error
minhqdao fd33fbf
Remove /
minhqdao 58ab58e
Remove prints
minhqdao 66d959d
Try adding shell
minhqdao 08abff8
Remove again because it default exists
minhqdao aee5712
Try adding some script
minhqdao acab595
Use shell script
minhqdao b0e42cb
Try cpp variant
minhqdao 95e979d
Remove list_files
minhqdao c703175
Use fypp
minhqdao b2f2b95
Revert "Use fypp"
minhqdao 37be446
Add compiler options
minhqdao b2489ac
Add test for zip file that contains two files
minhqdao a966602
Apply compiler properties to indiviual files only to hopefully reduce…
minhqdao 2a301f4
Extract methods to stdlib_filesystem.f90
minhqdao 292e1af
Extract list_files into stdlib_filesystem
minhqdao 1dbb325
Start adding tests for stdlib_filesystem
minhqdao 762cbc4
Add tests for run
minhqdao 8a08ec2
Rename to list_dir_contents and add tests
minhqdao acd89f7
Use test_failed
minhqdao e822047
Improve naming
minhqdao 0d9b7c1
Only have single level of directories
minhqdao 4777c75
Fix procedure name
minhqdao 34a3ae6
Create temp file if it not exists
minhqdao 94061fd
Fix error handling and define api for array loading
minhqdao bb6108f
Rename npy tests to np
minhqdao 2c95d85
Only use custom error bc it's currently gibberish, not use error_stop…
minhqdao 9c2e691
Add more tests
minhqdao 625f59b
Add forgotten file
minhqdao 2cd0144
Try redirected import to satisfy compiler
minhqdao 98bd3d4
Use preprocessor to set the correct path to the test files
minhqdao 7533cb2
Add first test, configure cpp and fix some errors
minhqdao cb1fa2f
Uncomment code and actually test it
minhqdao 9acd33e
Add test that contains values
minhqdao b446715
Add int example
minhqdao cb63bab
Add example including complex numbers
minhqdao 53d2036
Use complex64 to satisfy MinGW32
minhqdao 31d54b8
Use test for npz file containing two arrays
minhqdao dbf5e7b
Add test for a compressed npz file
minhqdao 46acdb9
Inject tmp folder so tests don't use the same one
minhqdao a91f083
Add zip compression with tests
minhqdao 5fcd7d9
Add zip as msys2 package
minhqdao cc633e0
Implement save_npz
minhqdao 1133a59
Use redirected import to satisfy intel once more
minhqdao ad6e96e
Improve tests by checking error, add a test for npz_write
minhqdao b6f2f69
Implement add_array
minhqdao 1aacaa9
Extract arr_size to satisfy Intel
minhqdao aece66a
Make array name optional such as in np
minhqdao d5fa8ab
Finish first proper test for add_array
minhqdao 6cbf989
Remove redundant interface
minhqdao fdae839
Not reallocate array
minhqdao 7354010
Finish seconds test
minhqdao 0854521
Add more tests for add_arr
minhqdao ecbb349
Add option to either compress zip file or not
minhqdao 1403359
Finalize all tests
minhqdao 9c56d6d
Fix rank
minhqdao 6cf0960
Try fixing errors
minhqdao 20ab3aa
Fix paths, print expected values
minhqdao c803c48
Add prints
minhqdao bd3a93e
Try allocate differently, run zip quietly
minhqdao 53cf786
Fix typo
minhqdao c3d370a
Run unzip quietly
minhqdao e0057fc
Add some more prints
minhqdao 7b1e1dc
Where is the comma
minhqdao 4803954
Remove prints, initialize stat to 0
minhqdao 6e6fa4b
Print stuff
minhqdao 5035d21
Properly read value
minhqdao 3beff30
Print
minhqdao 36b7ad7
Use other array notation
minhqdao 0c0c4a1
Maybe it needs allocation
minhqdao c5134f2
Use another notation
minhqdao bdbd9c9
Let's use a constant literal
minhqdao ded2c3c
Use proper allocates in add_array
minhqdao a8d1181
Print in add_array
minhqdao 473f193
Print properly
minhqdao feb93f5
Print the most important part
minhqdao ac91b2f
Print before and after adding wrapper to array
minhqdao fd426c7
Invert addition and allocation
minhqdao 666bd51
Use tmp_array for allocation instead
minhqdao d538078
Add examples
minhqdao 96a49a2
Relocate add_array to stdlib_array bc that's where it belongs
minhqdao 5b3506d
Set working directory directly in cmake
minhqdao 751d495
Print pwd
minhqdao 9e9c76d
Fix unzip and check for file existence
minhqdao eb4db69
Create temp dir
minhqdao 69d4798
Move example npz file to io
minhqdao acea2a3
Revert ci changes
minhqdao d0cbbbc
Revert CI changes all the way
minhqdao b2ac7de
Indent correctly
minhqdao e91d25f
Try venv
minhqdao 7f599e3
Use -m
minhqdao cfcfe96
Use correct pipe symbol
minhqdao cb2bbf3
Source
minhqdao aeacc54
Do in one go
minhqdao 4c39f57
Align with current state of master
minhqdao c873d1b
Install unzip and zip dependencies
minhqdao ca38bef
Revert "Revert to macos-12"
minhqdao 239a670
Revert "Bump to macos and intel-classic version"
minhqdao dec06a4
Revert "Clean up CI, run all on push only"
minhqdao 9b17ae1
Merge branch 'main' into load-npz
minhqdao 619b655
Remove file that was added by accident
minhqdao 78e7b9f
Actually use values in example instead of just printing them
minhqdao d41ee29
Add get_values for better user experience
minhqdao 5d7789a
Simplify example
minhqdao a22f401
Rename types and add some documentation
minhqdao 92aca11
Add some docs
minhqdao 99bbef0
Change stdlib_filesystem to stdlib_io_filesystem
minhqdao 6aa19aa
Add documentation for stdlib_array
minhqdao 7b76756
Add documentation
minhqdao b4e7c3a
Change stat to iostat
minhqdao File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
program example_load_npz | ||
use stdlib_array, only: array_wrapper_type | ||
use stdlib_kinds, only: int32, sp | ||
use stdlib_io_np, only: load_npz | ||
implicit none | ||
|
||
type(array_wrapper_type), allocatable :: arrays(:) | ||
real(sp), allocatable :: array_1(:,:) | ||
integer(int32), allocatable :: array_2(:,:) | ||
|
||
call load_npz('example_load.npz', arrays) | ||
|
||
call arrays(1)%get_values(array_1) | ||
call arrays(2)%get_values(array_2) | ||
|
||
print *, array_1 | ||
print *, array_2 | ||
end |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this PR. Could you open a PR specific for the additions related to
stdlib_array
, please? It will make the review of this PR easier. Let me know if you need help.