Skip to content

Fix backward compatibility for Configuration.from_data#867

Merged
beverlylytle merged 3 commits into
compas-dev:mainfrom
yijiangh:fix-conf-backward-compat
Jun 22, 2021
Merged

Fix backward compatibility for Configuration.from_data#867
beverlylytle merged 3 commits into
compas-dev:mainfrom
yijiangh:fix-conf-backward-compat

Conversation

@yijiangh
Copy link
Copy Markdown
Contributor

@yijiangh yijiangh commented Jun 21, 2021

What type of change is this?

  • Bug fix in a backwards-compatible manner.
  • New feature in a backwards-compatible manner.
  • Breaking change: bug fix or new feature that involve incompatible API changes.
  • Other (e.g. doc update, configuration, etc)

This PR includes a small fix to make compas.robots.Configuration's from_data compatible with json data generated from compas 1.0, before the Configuration class attributes values and types are changed to joint_values and joint_types.

While I am very eager to try out all the exciting features introduced in compas 1.7, I found upgrading the version turned all of my previously saved configuration data unparsable. I understand that we cannot keep compatible with everything in the past, but I found being backward-compatible for a longer time period can be very beneficial.

This PR is related to compas-dev/compas_fab#311.

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I added a line to the CHANGELOG.md file in the Unreleased section under the most fitting heading (e.g. Added, Changed, Removed).
  • I ran all tests on my computer and it's all green (i.e. invoke test).
  • I ran lint on my computer and there are no errors (i.e. invoke lint).
  • I added new functions/classes and made them available on a second-level import, e.g. compas.datastructures.Mesh.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added necessary documentation (if appropriate)

@yijiangh yijiangh changed the title Backward compatibility for Configuration.from_data Fix backward compatibility for Configuration.from_data Jun 22, 2021
@yijiangh yijiangh force-pushed the fix-conf-backward-compat branch from c168ffc to 73813c0 Compare June 22, 2021 02:39
Copy link
Copy Markdown
Member

@beverlylytle beverlylytle left a comment

Choose a reason for hiding this comment

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

Looks good!

@beverlylytle beverlylytle merged commit 2ab1303 into compas-dev:main Jun 22, 2021
@yijiangh yijiangh deleted the fix-conf-backward-compat branch June 22, 2021 14:14
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.

2 participants