Skip to content
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

Replace units.yaml with new parameter definition logic #418

Merged
merged 65 commits into from
Feb 1, 2024

Conversation

jmcook1186
Copy link
Contributor

@jmcook1186 jmcook1186 commented Jan 30, 2024

Types of changes

  • Enhancement (project structure, spelling, grammar, formatting)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

A description of the changes proposed in the Pull Request

This PR removes all logic related to units.ts and untis.yml and instead:

  • uses parameters.ts to export canonical parameter definitions
  • allows users to add new parameters to the canonical set via the manifest file
  • allows users to override the canonical set by providing their own file (.ts, .js or .json)
  • provides necessary validation and warning logs
  • updates tests and fixes breakages caused by logic change

This does NOT yet pull the necessary file from an npm package - instead it uses a local param.ts file in place of the old units.yml. The user can append to that file via the manifest file or provide a completely separate one via the CLI.

closes #416 and #403

@jmcook1186 jmcook1186 marked this pull request as ready for review January 30, 2024 15:17
package.json Outdated Show resolved Hide resolved
src/index.ts Outdated Show resolved Hide resolved
@jmcook1186 jmcook1186 merged commit e9be9ff into dev Feb 1, 2024
2 checks passed
@jmcook1186 jmcook1186 deleted the units-logic-update branch February 1, 2024 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Remove reliance on Units.ts and UnitKeyName
2 participants