Skip to content

Migrate Convert methods to Adapter, change Engine.Lusas namespace to Adapters.Lusas, add formatting to all documents and implement local versioning #240

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

Merged
merged 12 commits into from
May 15, 2020

Conversation

peterjamesnugent
Copy link
Member

@peterjamesnugent peterjamesnugent commented Apr 2, 2020

Issues addressed by this PR

Closes #236
Closes #239
Closes #247

Test files

https://burohappold.sharepoint.com/:f:/s/BHoM/EjHwiuHBSGpJgmezKPl-UrAB2j6dvBUAkXNDrzl1qDcv9g?e=Zx7Wkw

Additional Comments

@calumlockhart-bh when reviewing there are a few things to check:

  • Make sure you're on the latest branches for BHoM, BHoM_Engine, BHoM_Adapter, and BHoM_UI
  • Make sure you clone the Versioning_Toolkit too
  • When you open the VersioningComponents.gh all the components on the canvas should work, there should not be any error messages and all constructors should produce objects
  • Can you also test a push and pull of the simple truss model in PushPullTest.cs, I just want to make sure in the porting of methods and changing of namespaces nothing has fallen through the cracks
  • You can check the CreateObject, Compute, Modify and Query components and their respective dropdown lists to see that all the methods fall under the Lusas heading (and not the Adapters heading)
  • This will fall under the External heading once it has been fixed in the UI, see BHoM_UI: External subnamespace is explicitly culled out from method tree for components BHoM_UI#223
  • Happy for you to just do a few spot checks on the formatting, it's more for our benefit than anything else

Changelog

  • Moved methods in .Lusas namespace to .Adapters.Lusas namespace
  • Implemented localised versioning for Lusas_Engine stored in Versioning_32.json
  • Ported all Convert methods that use the LPI from Lusas_Engine to Lusas_Adapter
  • Added formatting (i.e. headers, line breaks etc.) to all document files

@peterjamesnugent peterjamesnugent added severity:low Doesn't stop/slow current workflow size:S Measured in minutes type:compliance Non-conforming to code guidelines labels Apr 2, 2020
@peterjamesnugent peterjamesnugent added this to the BHoM 3.2 β MVP milestone Apr 2, 2020
@peterjamesnugent peterjamesnugent requested a review from alelom April 2, 2020 13:33
@peterjamesnugent peterjamesnugent self-assigned this Apr 2, 2020
@peterjamesnugent
Copy link
Member Author

/azp run Lusas_Toolkit.CheckCompliance

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@IsakNaslundBh
Copy link
Contributor

@peterjamesnugent Would you mind raising a PR on Versioning_Toolkit, covering the changes to Midas and Lusas. Can then either merge that one as is, or wait for others to join in with the external changes if needed.

@FraserGreenroyd
Copy link
Contributor

Now the versioning can be done locally on this toolkit, @peterjamesnugent , same as we did on XML_Toolkit? 😄

@peterjamesnugent
Copy link
Member Author

/azp run Lusas_Toolkit.CheckCompliance

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@peterjamesnugent peterjamesnugent changed the title Change Lusas namespace to External.Lusas in oM and Engine Various compliance issues May 12, 2020
@peterjamesnugent peterjamesnugent requested review from a user and removed request for alelom May 12, 2020 20:31
@peterjamesnugent peterjamesnugent changed the title Various compliance issues Migrate Convert methods to Adapter, change Adapters.Lusas namespace to External.Lusas, add formatting to all documents and implement local versioning May 12, 2020
@peterjamesnugent
Copy link
Member Author

/azp run Lusas_Toolkit.CheckCompliance

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@peterjamesnugent
Copy link
Member Author

/azp run Lusas_Toolkit.CheckCompliance

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ghost
Copy link

ghost commented May 13, 2020

Versioning works for changing the components to the latest versions. Potential accidental causes of incorrectly identifying modules as older than they are don't appear to lead to infinite looping. Considerations for future updates may include skipping version numbers where applicable. Some cells in JSON files left intentionally blank, may lead to slower processing, shouldn't be a problem at the current stage of development, but worth considering streamlining for the future.

@ghost ghost closed this May 13, 2020
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

All functions tested with versioning perform adequately.

Versioning works for changing the components to the latest versions.

Potential accidental causes of incorrectly identifying modules as older than they are don't appear to lead to infinite looping of functions. (Deliberate forcing of errors was picked up by components.)

Considerations for future updates may include skipping version numbers where applicable. If no changes are made, or if changes are subsequently changed later, this will help speed up the processes especially with larger files.

Some of the cells in the JSON files are left intentionally blank, this may lead to slower processing than if they weren't included. However, they shouldn't be a problem at the current stage of development. (worth considering streamlining for the future.)

ghost
ghost previously approved these changes May 13, 2020
@peterjamesnugent peterjamesnugent requested a review from a user May 14, 2020 15:50
@peterjamesnugent
Copy link
Member Author

@calumlockhart-bh please review again, the namespaces have changed from External to Adapter as per: BHoM/BHoM_Adapter#213

It should be a case of just opening the script with the new build of Lusas_Toolkit and BHoM_UI.

@peterjamesnugent
Copy link
Member Author

/azp run Lusas_Toolkit.CheckCompliance

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@peterjamesnugent peterjamesnugent changed the title Migrate Convert methods to Adapter, change Adapters.Lusas namespace to External.Lusas, add formatting to all documents and implement local versioning Migrate Convert methods to Adapter, change Engine.Lusas namespace to Adapters.Lusas, add formatting to all documents and implement local versioning May 14, 2020
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

A few instances of inefficient use of namespaces, but nothing to worry about.
Consider where changing "internal" to "private", what it is that you want to be accessible inside the assembly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity:low Doesn't stop/slow current workflow size:S Measured in minutes type:compliance Non-conforming to code guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add correct headers and formatting to all documents Change Adapter oM and Engine namespaces to External Migrate all Convert methods to the Adapter
3 participants