-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Add CI #13
Comments
Hi @vil02 |
How about using pFUnit for the unit tests? It provides a more formal framework for unit testing, including assertions, test suites, and detailed reporting, much like popular testing frameworks in other languages (e.g., JUnit for Java, pytest for Python) |
@Ramy-Badr-Ahmed I am not sure here... I think pFUnit should not be a requirement for Fortran Contributors. Our goal is to keep everything simple to every Fortran algorithm learner. Requiring pFUnit increases people's cost of learning. Also, if a learner struggles with installing pFUnit in their environment, then he or she is not able to contribute, and I don't want that to happen. |
Good point! it can probably be mentioned like an option in the contribution guidelines. |
At the moment the things in Using some testing framework is always a good idea. I would suggest to use something standard - not only to have some old school FORTRAN vibe but because of the fact that people learning FORTRAN today most likely will work with some legacy stuffy. Which one to use? I have no idea... I do not have enough knowledge about FORTRAN. The most important thing is to make these tests actually check something, even using plain FORTRAN. Regarding the CI: I think I will setup this project using CMake - @Ramy-Badr-Ahmed, @SatinWukerORIG any thoughts on that? |
Ok, we should go with pFTest then, unless I find a better alternative within 2 days lol. Regarding CI, CMake is great! |
Indeed, the current tests are set up to display the original and sorted arrays for manual visual inspection. It’s a good idea to automate these checks using a testing framework. I agree that using a standard framework would be beneficial for consistency and practicality. However, setting up the pFUnit environment might not be straightforward and could require some additional configuration. CMake is a suitable choice for setting up CI, and I’m currently using it in CLion. It should work well for managing the build and testing process. @SatinWukerORIG , for your reference: https://fortran-lang.discourse.group/t/unit-testing-frameworks-for-fortran/6944/4 |
I suggest the following CI as startring point with CMake:
Including |
The official Fortran community on GitHub offers test-drive for testing and fprettify for code styling. Perhaps it can be integrated into the CI? |
This repository needs some CI. Before adding a corresponding workflow, I would like to understand what is the intended structure. The contributing guidelines suggest to use modules, but currently there is only one module:
merge_sort.f90
.Would it make sense to have the directory structure like:
where:
modules
has a correspondingtest_*.f90
file intests
,modules
might have a correspondingexample_*.f90
file inexamples
.tests
are the basic unit tests for given module,examples
should also have assert statements, but they should not be included into the coverage reports.The currently existing files, which are not modules could be temporary moved to a directory like
other
and moved over time to the correct place.@SatinWukerORIG if you agree on such approach, feel free to assign me to this issue.
The text was updated successfully, but these errors were encountered: