Skip to content

Development guidelines

MP edited this page Mar 1, 2024 · 38 revisions

Branches

Master branch

Master branch should only be merged into, never committed to directly.

Milestone branch

When starting work on a new milestone a new branch should be created from master for this specific milestone. Then name should be relatable to the milestone such that other contributors can identify it. When the milestone is finished and tested the master branch can be rebased (https://github.com/strusoft/femdesign-api/issues/378) and the milestone branch can be deleted.

Issue branch

When starting work on a specific issue in this milestone a new branch should be created for the specific issue. The name of the branch should be relatable to the issue by adding issue number and maybe a short description. When the issue is closed and tested the issue branch can be merged into the milestone branch and the issue branch can be deleted.

Answering issues

Freshdesk

  1. if you solve an issue

    edit the status to Closed

  2. if an issue needs some development

    edit the status to Waiting on Programmer

    open a github issue and notify the user linking the github link in the freshdesk thread. Update the properties panel with the github link

    github issue should have a link to freshdesk to notify the user

  3. Issue that are on Waiting on Customer for more than 2 month can be closed

Discourse

  1. if you solve an issue

    edit the title adding [SOLVED]

    add the optional tag solved

  2. if an issue needs some development

    add the optional tag waiting

    open a github issue and notify the user linking the github link to the discourse thread

    github issue should have a link to discourse to notify the user

Github issue related to freshdesk/discourse

The aim is to help the user within a time frame of maximum 2 month but the goal is to try to solve the issue within the current milestone. However, there are issues which requires Budapest to do some development. In such cases, we set the milestone to Waiting for fd-developers

Grasshopper

Updating existing components

Updating existing Grasshopper components can be tricky - if not done properly even small changes will break component graphs that users have invested a lot of time creating. Note that even when only changing code inside the component the component might break user component graphs.

If your updates might break existing component graphs follow these steps:

  • Mark old component with postfix OBSOLETE in class name and file name.
  • Hide old component with public override GH_Exposure Exposure => GH_Exposure.hidden;
  • Create a new Component with a new Guid and the new input/output parameters

Removing obsolete components

When updating the major version all obsolete components should be removed.

Check-List for release

  1. Run Unit Tests in VS

  2. Run the files in GLOBAL MODEL

  3. Make sure to update GlobalAssemblyInfo.cs with the right Version Information

    // GlobalAssemblyInfo.cs
    [assembly: AssemblyVersion("21.5.0.0")]
    [assembly: AssemblyFileVersion("21.5.0.0")]
  4. Add Resources such as Sections/Materials to the project

  5. Open Configuration Manager in Visual Studio Build -> Configuration Manager and select Release

  6. Build Solution

    The assemblies are now ready to be publish on Github and Food4Rhino.

    ⚠️ Dynamo Package will not be add on Dynamo Package Manager but the assembly will be available on Github!

  7. Merge the milestone-branch to master

  8. Navigate to https://github.com/strusoft/femdesign-api/releases and create a new draft release

  9. Specify a tag number (usually the Milestone version. i.e. 21.5.0)

  10. Specify Target with Master as we have already merged the pull request

  11. Click Generate Release Notes

  12. Attach Grasshopper

  13. Attach C#

  14. Publish to Package Manager

  15. Publish to Nuget

  16. Send NewsLetter

Publishing

Publish to Package Manager

Collect the .dll, .gha, manifest.yml and icon.png in a folder and run the following command. Update manifest.yml

  1. yak build (Requires yak.exe in PATH)

  2. Update the distribution tag part of the filename

    rh6_35 => rh7 rh6_35 => rh8

  3. yak push <filename>.yak

Publish to Nuget

Open a terminal within FemDesign.Core folder and run the following:

  1. Run nuget pack (Requires nuget.exe in PATH)
  2. Run nuget push <NUPKG>.nupkg <API_KEY> -Source https://api.nuget.org/v3/index.json

NOTE <API_KEY> should be generated for FemDesign.core from nuget.org