Skip to content

v2.3.0 New Add Chemical Feature, Streamlined Versioning

Latest
Compare
Choose a tag to compare
@github-actions github-actions released this 25 Dec 22:02
· 3 commits to main since this release
v2.3.0
d8ec1af

Highlights

  1. Add Chemical Method Fully Implemented & Tested

    • A new AddChemical workflow to handle the creation of chemical entries, including CAS number validation and alias insertions.
    • A dedicated API endpoint (/api/get-cas) that checks the database for existing chemical records, reducing data duplication.
    • Enhanced error handling and user feedback for chemical creation and lookups.
  2. Improved CAS Number Validation

    • CAS validation logic has been relocated from input-validators.js to a dedicated module (cas-api.js), ensuring cleaner separation of concerns and easier maintainability.
    • JavaScript validation checks and in-application checks help prevent invalid CAS entries.
  3. GitHub Actions & Workflow Updates

    • Updated the GitHub Action (.github/workflows/build-and-release.yml) to automatically use TAG: "v2.3.0" for consistent versioning in releases.
    • Streamlined binary release creation: the final artifact’s tag and name are automatically updated to the new version.
    • Improved instructions for creating new Git tags and triggering the build using gh api.
  4. Documentation Enhancements

    • README.md now includes clearer instructions for:
      • Creating new tags and triggering binary compilation via GitHub Actions.
      • Understanding the general usage flow of the Waste Tagging System.
  5. Under-the-Hood Improvements

    • New SQL scripts (insert_chemical.sql and insert_alias.sql) to handle chemical and alias insertions more reliably.
    • Code cleanup to reduce redundancy and improve overall system stability.

Detailed Changelog

Added

  • InsertNewChemical Function
    Inserts new chemical entries along with a corresponding alias into the database.
  • /api/get-cas Endpoint
    Checks if a chemical entry already exists by CAS number. Returns detailed JSON feedback on success or failure.

Changed

  • GitHub Action (build-and-release.yml)
    • Now references an environment variable TAG: "v2.3.0" for versioning.
    • Updated release artifacts to use name: ${{ env.TAG }} and tag: ${{ env.TAG }}.
  • JavaScript CAS Validation
    • Removed old CAS validation logic in input-validators.js and replaced it with the new cas-api.js module for improved accuracy and maintainability.
  • README.md
    • Added a new “Github Action” section with usage and tagging instructions.
    • Updated usage flow details to reflect the new chemical-add workflow.

Fixed

  • Minor bugs in CAS validation that previously allowed incorrect numbers to pass.
  • Potential edge cases in adding a new chemical where aliases were not always inserted correctly.

Removed

  • Redundant CAS validation logic from input-validators.js, superseded by the new cas-api.js.

Upgrade Notes

  1. Pull the Latest Code: Ensure you have the latest main or master branch which includes the new tags and updated workflows.
  2. Use New Tagging Approach: Follow the updated instructions in the README for creating new tags and triggering binary builds via GitHub Actions.
  3. Check CAS-Related Logic: If you had custom CAS validation or used the old input-validators.js approach, update your references to the new cas-api.js module.