Skip to content

Major rework to improve code quality, add automation checks and self hosted autogenerated documetnation website#543

Merged
kvedala merged 396 commits intoTheAlgorithms:masterfrom
kvedala:master
Jun 28, 2020
Merged

Major rework to improve code quality, add automation checks and self hosted autogenerated documetnation website#543
kvedala merged 396 commits intoTheAlgorithms:masterfrom
kvedala:master

Conversation

@kvedala
Copy link
Collaborator

@kvedala kvedala commented Jun 8, 2020

Description of Change

  • Add cmake based structure
  • Include documentation building
  • Add GitHub Actions using cmake to check code compilation on linux (ubuntu), Mac OS and Windows (using MS Visual C/C++ compiler)
  • Add GitHub action to auto-generate documentation and push to repo's respective GitHub Pages -> this will create the website https://thealgorithms.github.io/C similar to https://kvedala.github.io/C
  • add documentations to various source codes including mathematical formulations where possible
  • fix code formatting issues with existing files
  • fix source codes so they compile on all operating systems
  • github actions workflow improved by
    • adding auto format code and file name
    • stage-by-stage actions for efficient checks

This documentation approach will also enable other contributors to add documentation in their respective languages or use google translate to do so.

Checklist

  • Added description of change
  • Added file name normalization - all small letters and no spaces
  • Added tests and example, test must pass - wherever possible
  • Relevant documentation/comments is changed or added
  • PR title follows semantic commit guidelines
  • Search previous suggestions before making a new one, as yours may be a duplicate.
  • Sort by alphabetical order
  • I acknowledge that all my contributions will be made under the project's license.

Note

Before merging, the parent repository branch structure would need to be improved (Adding images branch, adding gh-pages branch). Unless existing maintainers are up for the challenge, I,d like to volunteer to maintain the structure of the repo and the documentation of the same. It’d allow us to have graphs and files for a much better documentation.

kvedala and others added 30 commits April 23, 2020 20:59
# Conflicts:
#	.travis.yml
#	DIRECTORY.md
#	README.md
* commit '0538404f8652bb8f80d362eab2bf988a3eb545bd':
  added link to compile and run code online
  Gist to run and test the Durand-Kerner Algorithm online and view the roots convergence
  better formatting of root values
  updating DIRECTORY.md
  another shell-sort implementation
  updating DIRECTORY.md
  remove timing calculation
  compute real eigen values of a square matrix using shit and deflate QR decomposition algorithm
  QR decomposition of any matrix with real elements
  Durand Kramer method for roots of any polynomial

# Conflicts:
#	DIRECTORY.md
#	numerical_methods/durand_kerner_roots.c
#	numerical_methods/qr_decomposition.c
#	numerical_methods/qr_eigen_values.c
@kvedala kvedala mentioned this pull request Jun 18, 2020
@ayaankhan98
Copy link
Member

what's the status of this pull request?

@kvedala
Copy link
Collaborator Author

kvedala commented Jun 19, 2020

what's the status of this pull request?

This is exactly identical to the we closed at C++ repo.

@ayaankhan98
Copy link
Member

ayaankhan98 commented Jun 19, 2020

oh i mean if anyone of the reviewer has reviewed some of the files or not, if not then i will start from the very first file. @deadshotsb

Comment on lines +4 to +8
[![contributions welcome](https://img.shields.io/static/v1.svg?label=Contributions&message=Welcome&color=0059b3&style=flat-square)](https://github.com/kvedala/C-Plus-Plus/blob/master/CONTRIBUTING.md) 
![GitHub repo size](https://img.shields.io/github/repo-size/kvedala/C-Plus-Plus?color=red&style=flat-square)
![GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed/kvedala/C?color=green&style=flat-square)
![Doxygen CI](https://github.com/kvedala/C/workflows/Doxygen%20CI/badge.svg)
![Awesome CI Workflow](https://github.com/kvedala/C/workflows/Awesome%20CI%20Workflow/badge.svg)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All these badges are pointing to your repository.
Shouldn't it point to the TheAlgorithms?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I will change them once the PR is ready to be merged. Thats what I did in the C++ repository as well

@kvedala
Copy link
Collaborator Author

kvedala commented Jun 25, 2020

Any update here?

@tjgurwara99
Copy link
Member

Sorry, I haven't looked at all the files but I think a lot of the files are not using the Doxygen commenting style, is that okay? It may be that we may need to write comments ourselves to improve the documentation

@kvedala
Copy link
Collaborator Author

kvedala commented Jun 26, 2020

Sorry, I haven't looked at all the files but I think a lot of the files are not using the Doxygen commenting style, is that okay? It may be that we may need to write comments ourselves to improve the documentation

No worries, take your time. @ayaankhan98 and I think @deadshotsb are also reviewing.

Regarding documentations, yes, almost none of the existing files had documentations. I added to a few. But it would require a collaborative effort to update the documentations on the existing code. This was the same approach we used for the C++ repo where contributors like yourself, @ayaankhan98, @Panquesito7 and others have helped improve the code documentation.

@tjgurwara99
Copy link
Member

Sorry, I haven't looked at all the files but I think a lot of the files are not using the Doxygen commenting style, is that okay? It may be that we may need to write comments ourselves to improve the documentation

No worries, take your time. @ayaankhan98 and I think @deadshotsb are also reviewing.

Regarding documentations, yes, almost none of the existing files had documentations. I added to a few. But it would require a collaborative effort to update the documentations on the existing code. This was the same approach we used for the C++ repo where contributors like yourself, @ayaankhan98, @Panquesito7 and others have helped improve the code documentation.

Brilliant, once this PR is merged then we can start doing that😄

@kvedala
Copy link
Collaborator Author

kvedala commented Jun 26, 2020

Moreover, the LGTM like checks cannot be implemented properly until this merge comes through. The CMake tool for the repo provides with that cross-platform cohesion required.

In fact, there were (and some still exist) codes that do not even compile. In one on the repo folders, all C code is just functions and without a main() invoking them, none can be tested or compiled. They can be compiled to a library and then invoked from a single main.c file. But this would also require much effort.

@ayaankhan98
Copy link
Member

Moreover, the LGTM like checks cannot be implemented properly until this merge comes through. The CMake tool for the repo provides with that cross-platform cohesion required.

In fact, there were (and some still exist) codes that do not even compile. In one on the repo folders, all C code is just functions and without a main() invoking them, none can be tested or compiled. They can be compiled to a library and then invoked from a single main.c file. But this would also require much effort.

yes i observed, i think this is the common practice of this repository people pushes the code without main function, i don't know how they even test their code. i think they just type some code and push without even testing.

@kvedala
Copy link
Collaborator Author

kvedala commented Jun 26, 2020

In fact, looking at the repo, even I got lazy and my initial commits were without much documentation either 😏 and then the epiphany to see if the repo can be resuscitated. I made a few changes on my fork and got some good feedback from viewers. Then came this pull-request

@kvedala
Copy link
Collaborator Author

kvedala commented Jun 28, 2020

Thank you @ayaankhan98
Shall I proceed with the merge?

@kvedala
Copy link
Collaborator Author

kvedala commented Jun 28, 2020

Checklist:

  • create a stub gh-pages branch
  • create a stub docs/images branch - Pushed main branch from my fork
  • complete the merge - awaiting confirmation from the reviewers - @ayaankhan98 @deadshotsb @StepfenShawn

@ayaankhan98
Copy link
Member

Thank you @ayaankhan98
Shall I proceed with the merge?

yes i think we can merge this now, further improvement in code quality can be done after merging this. (same as we done in C++ repo)

@kvedala kvedala merged commit d5d68d5 into TheAlgorithms:master Jun 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants