Low hanging fruits

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Low hanging fruits

Post by Kunda1 »

PrzemoF wrote:Another easy task: add material properties from sculpteo webpage [1] to FreeCAD library.

[1] https://www.sculpteo.com/en/materials/m ... fications/
It's hard to understand this thread. I think the suggestions you and others give are great but they are difficult to grok:
1) Where the suggestions are located in the thread?
2) Which have been completed?
3) Which are remaining?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
PrzemoF
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: Low hanging fruits

Post by PrzemoF »

I guess we need to make a review what has been finished and prepare a new list. I agree that is' no longer easy to figure out what needs to be done. The thread is 2 years old.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Low hanging fruits

Post by Kunda1 »

PrzemoF wrote:I guess we need to make a review what has been finished and prepare a new list. I agree that is' no longer easy to figure out what needs to be done. The thread is 2 years old.
we could open tagged #lowhangingfruit tickets ?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Low hanging fruits

Post by Kunda1 »

Kunda1 wrote:
PrzemoF wrote:I guess we need to make a review what has been finished and prepare a new list. I agree that is' no longer easy to figure out what needs to be done. The thread is 2 years old.
we could open tagged #lowhangingfruit tickets ?
It could be good practice for outside devs wanting to jump in to the code and get familiar with it. Especially since GSOC is starting soon.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Low hanging fruits

Post by Kunda1 »

Kunda1 wrote:
Kunda1 wrote:
PrzemoF wrote:I guess we need to make a review what has been finished and prepare a new list. I agree that is' no longer easy to figure out what needs to be done. The thread is 2 years old.
we could open tagged #lowhangingfruit tickets ?
It could be good practice for outside devs wanting to jump in to the code and get familiar with it. Especially since GSOC is starting soon.
For example: https://forum.freecadweb.org/viewtopic. ... 55#p156755
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Low hanging fruits

Post by Kunda1 »

Another idea for Low Hanging Fruit:
https://github.com/FreeCAD/FreeCAD/sear ... &type=Code
This search request finds all the 'TODO' strings within the FreeCAD codebase. Devs could have a look to see what part of the code could be expanded or improved. Of course, it would be a good idea to make a proposal on the Developer forum to raise the odds of a PR being accepted.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Low hanging fruits

Post by Kunda1 »

https://github.com/FreeCAD/FreeCAD/sear ... =%E2%9C%93
This search request finds all the 'FIXME' strings within the FreeCAD codebase.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
CADennis
Posts: 31
Joined: Tue Apr 18, 2017 10:12 am

Re: Low hanging fruits

Post by CADennis »

PrzemoF wrote:I'm going to post here things that probably should be changed in the source code, but I might not be able to do it on my own soon. It also may be a hint for a new developer what he/she might do [...]
An idea for pure Python programmers who want to create a dead-serious workbench, to be used by endusers and developers alike to stress and prioritize important features of FreeCAD.

Will your skills match the challenge? Have a look what technology is involved: Here is the feature: similar to the macro recorder a "regression test recorder workbench".

It could offer three GUI buttons: "start", "stop", "cancel". And a textfield: "testname". It records user interactions in the same way as the macro recorder does, whatever users do on the GUI. Finally, when the user presses stop, it loops over all effective items in the tree and saves their transformations. All is saved as a Python unittest file, which when executed, will replay the recorded interaction and compare the recorded transformations against the actual transformations when replayed.

So instead of having a macro and no comparison against any expected result, your tool builds up a regression test. We then motivate other users to record model creations that are important to them. Experts know how to model things that bring FreeCAD close to its limits of what it can do. The recordings will be great for automated regression testing. We can execute them on our continuous integration after every single build. Builds and tests are triggered by every commit to the GitHub repository by any developer. They get executed on all operating systems.

You do not write tests! You create your own GUI workbench with its own GUI menu that offers record-replay functionality similar to the MacroRecorder. End users who want to make sure certain functionality is found again in future FreeCAD releases will use it "to manifest their interests". Developers who must modify or maintain code will use the test results as daily feedback.

Here is an official example what Python unittests look like. With assertions test bots compare expected against actual values, that means recorded transformations against actual transformations as effectively found during replay.

Code: Select all

import unittest

class TestStringMethods(unittest.TestCase):

    def test_upper(self):
        self.assertEqual('foo'.upper(), 'FOO')

    def test_isupper(self):
        self.assertTrue('FOO'.isupper())
        self.assertFalse('Foo'.isupper())

    def test_split(self):
        s = 'hello world'
        self.assertEqual(s.split(), ['hello', 'world'])
        # check that s.split fails when the separator is not a string
        with self.assertRaises(TypeError):
            s.split(2)

if __name__ == '__main__':
    unittest.main()
(https://docs.python.org/3.5/library/uni ... ic-example)
User avatar
PrzemoF
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: Low hanging fruits

Post by PrzemoF »

Interesting idea - I think it deserves it's own thread on the forum. And it's not "a low hanging fruit" :D
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: Low hanging fruits

Post by ickby »

There is also a GSoC project which covers this, unfortunately noone ever applied. Seems extending the test framework is as unloved as writing tests :) But it would be awesome if someone could improve this stuff: https://www.freecadweb.org/wiki/Advance ... est_system
Post Reply