forked from fluxnet/ONEFlux
-
Notifications
You must be signed in to change notification settings - Fork 0
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
[WIP] Implement Matlab to Python Translator #17
Closed
Closed
Conversation
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
Further comment: an automatic workflow of translating matlab code to python might be useful if we want to work on the matlab code to add tests, etc. like in PR #15. |
This also updates from Python 2 to 3 using the |
…ure `matlab_engine`
…d update variable handling for xc2
…-except for Stats initialization; update import statements in smop modules
commit e94a521 Author: tztsai <[email protected]> Date: Thu Nov 14 13:45:28 2024 +0000 Merge branch '27-generate-unit-tests-for-cpdassignustar' into test_and_refactor_cpdFmax2pCp3 commit 87e2526 Author: James Emberton <[email protected]> Date: Thu Nov 14 09:34:58 2024 +0000 convert matlab to python commit e72d639 Author: James Emberton <[email protected]> Date: Thu Nov 14 09:19:29 2024 +0000 modified tests commit 2cd15d3 Author: James Emberton <[email protected]> Date: Mon Nov 11 11:59:54 2024 +0000 modularised function commit 1e69989 Author: James Emberton <[email protected]> Date: Mon Nov 11 11:46:48 2024 +0000 added initial tests commit 44bfb80 Author: James Emberton <[email protected]> Date: Mon Oct 28 10:30:47 2024 +0000 setup stats reset to original code logic commit 69afcbb Merge: 65aaafb 4d83e33 Author: Dominic Orchard <[email protected]> Date: Thu Oct 24 15:52:10 2024 +0100 Merge pull request #41 from Cambridge-ICCS/change_ustar_cp_scope Change ustar_cp scope to 'session' commit 4d83e33 Author: isaac <[email protected]> Date: Tue Oct 22 10:58:15 2024 +0100 Change ustar_cp scope to 'session'
commit e94a521 Author: tztsai <[email protected]> Date: Thu Nov 14 13:45:28 2024 +0000 Merge branch '27-generate-unit-tests-for-cpdassignustar' into test_and_refactor_cpdFmax2pCp3 commit 87e2526 Author: James Emberton <[email protected]> Date: Thu Nov 14 09:34:58 2024 +0000 convert matlab to python commit e72d639 Author: James Emberton <[email protected]> Date: Thu Nov 14 09:19:29 2024 +0000 modified tests commit 2cd15d3 Author: James Emberton <[email protected]> Date: Mon Nov 11 11:59:54 2024 +0000 modularised function commit 1e69989 Author: James Emberton <[email protected]> Date: Mon Nov 11 11:46:48 2024 +0000 added initial tests commit 44bfb80 Author: James Emberton <[email protected]> Date: Mon Oct 28 10:30:47 2024 +0000 setup stats reset to original code logic commit 69afcbb Merge: 65aaafb 4d83e33 Author: Dominic Orchard <[email protected]> Date: Thu Oct 24 15:52:10 2024 +0100 Merge pull request #41 from Cambridge-ICCS/change_matlab_engine_scope Change matlab_engine scope to 'session' commit 4d83e33 Author: isaac <[email protected]> Date: Tue Oct 22 10:58:15 2024 +0100 Change matlab_engine scope to 'session'
…`function` decorator
…ns for consistency
… rename compare_matlab_arrays
TODO: We will split off the generate Python into its own branch. |
Closing this PR as this work has already been merged as #97 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
A translator from matlab code to python 2 code is implemented in the
smop/
folder, adopted from the smop repository. A bash scriptm2py.sh
is also added to automate the translation process and save the translated files inoneflux_steps/ustar_cp_py/
. It will also run all the current pytest suit against the translated code.To run the translation and testing, simply run
bash m2py.sh
.