BriefFiniteElementNet / BriefFiniteElement.Net

BriefFiniteElementDotNET (BFE.NET) is a library for linear-static Finite Element Method (FEM) analysis of solids and structures in .NET
GNU Lesser General Public License v3.0
154 stars 57 forks source link

Project Code Cleanup - Improve Code Quality #74

Open epsi1on opened 4 years ago

epsi1on commented 4 years ago

EDIT:

Milestone 1

discussion continued from comment number 673732028 of #36 (link)

  1. I think having a good coverage is crucial to ensure that people contributing code do not unintentionally break anything. OpenCover reports the following code coverage, which is (expectedly) low: Line coverage: 13.4% (2266 of 16832) Branch coverage: 13.0% ( 494 of 3788)

Yes i also think that unit tests are not enough yet, only some element helpers have unit tests, others do not. So is it necessary to increase the unit tests? i think there is need for it

  1. When building the solution, Visual Studio reports 345 warnings, some of them warning about obsolete code usage, which should easily be fixed, but also many obsolete warnings, telling a feature is incomplete/not working. Such code should not be distributed via nuget (meaning not be part of the main project or master branch).

I've used [Obsolete()] attribute for both deprecated codes and new codes which are under development and not tested yet. As you stated, I'm also waiting to get an stable version then publish that version in nuget.org.

  1. Building the solution with enabled generation of documentation, 1185 warnings are reported. So there's also a massive lack of documentation, which might discourage people to contribute code (because they don't understand the intention of the code that's already there).

You mean XML documentation for methods and fields and property ?

Thanks

wo80 commented 4 years ago

EDIT: removed task list.

wo80 commented 4 years ago

You can either remove Milestone 3 or add some specific tasks (one addition - with rather low priority - could be to inspect the TODOs scattered across the projects).

I think you should put the heading Plan towards BriefFiniteElementNet version 2 and a nuget release back in place (or change the title of the issue). All the tasks should be addressed before publishing a final nuget package. Of course you can publish prerelease packages - as you might have noticed, I added <Version>2.0.0-pre</Version> when converting the project files. The pre means nuget will handle it as a prerelease.

epsi1on commented 4 years ago

Maybe need to make a new project with title Plan towards BriefFiniteElementNet version 2 and a nuget release? First we should address stuff that need to be done before release nuget package...

wo80 commented 4 years ago
epsi1on commented 4 years ago

I rather to move obsolete classes into another namespace, and remove them in next version, what you think about it? For integration tests, you mean it should be automatically tested by visual studio? currently it is a console application...

epsi1on commented 4 years ago

https://github.com/BriefFiniteElementNet/BriefFiniteElement.Net/projects/4

wo80 commented 4 years ago

I rather to move obsolete classes into another namespace, and remove them in next version, what you think about it?

If you think that the obsolete code is still widely used, that would be a fair compromise. Alternatively, you could add another project BriefFiniteElementNet.Compatibility, which could even be distributed via nuget, if anybody feels the need.

For integration tests, you mean it should be automatically tested by visual studio? currently it is a console application...

If I'm correct, at the moment it's a loose collection of tests, which must be run manually. Just add a class TestRunner (or the like) which calls all those tests and gives a hint if anything doesn't work as expected. I will start working on the Matrix class, once we have this.

rubsy92 commented 3 years ago

Hi,

I'm going through the todo-list and I noticed item "complete TriangleElement codes that support all 3 types of loads.": https://github.com/BriefFiniteElementNet/BriefFiniteElement.Net/projects/4#card-44141482. What do you mean with all 3 types of loads?

epsi1on commented 3 years ago

There are 3 type of elemental loads, Uniform, Concentrated and PartialNonUniform. I think currently only uniform load is supported by triangle element. At least IElementHelper.GetLocalEquivalentNodalLoads() method should be implemented for both DkqHelper and CstHelper and the code should support ConcentratedLoad and PartialNonUniformLoad .