Skip to content

Add auto git hash update. Correct branch to main.#8

Merged
toftul merged 3 commits into
toftul:mainfrom
matt8s:master
Jun 19, 2026
Merged

Add auto git hash update. Correct branch to main.#8
toftul merged 3 commits into
toftul:mainfrom
matt8s:master

Conversation

@matt8s

@matt8s matt8s commented Jun 17, 2026

Copy link
Copy Markdown

Changes Made:

  1. Updated the default branch of polyanskiy/refractiveindex.info-database from master to main, per the change made in that repo on 2026/01/07.
  2. Automatic Database Hash Detection:
    • Added _get_latest_commit_hash() function that fetches the latest commit SHA from GitHub API
    • Modified _download_database() to automatically use the latest hash when needed
    • Added fallback to a known good commit if API fetch fails
  3. Database Update System:
    • Added _check_for_updates() function that compares current database version with latest
    • Implemented version tracking with .version file in database directory
    • Added update_database=True parameter to trigger update checks
    • Added new test class TestDatabaseUpdates with test for version file functionality

@matt8s matt8s marked this pull request as draft June 17, 2026 04:18
Matthew Emerson Spotnitz, PhD added 2 commits June 16, 2026 22:31
Changes Made:
1. Updated the default branch of
`polyanskiy/refractiveindex.info-database` from `master `to `main`, per
the change made in that repo on 2026/01/07.
2. Automatic Database Hash Detection:
    - Added `_get_latest_commit_hash()` function that fetches the latest
    commit SHA from GitHub API
    - Modified `_download_database()` to automatically use the latest
    hash when needed
    - Added fallback to a known good commit if API fetch fails
3. Database Update System:
    - Added `_check_for_updates()` function that compares current
    database version with latest
    - Implemented version tracking with `.version` file in database
    directory
    - Added `update_database=True` parameter to trigger update checks
    - Added new test class `TestDatabaseUpdates `with test for version
    file functionality
@matt8s matt8s marked this pull request as ready for review June 17, 2026 04:39
@toftul toftul merged commit 96974b6 into toftul:main Jun 19, 2026
1 check passed
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