Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Part of a series of PRs incorporating Clippy checks into CI. Since the desired end behavior is a CI fail when cargo clippy checks fail or warn, existing clippy warns must first be resolved. This PR focuses on resolving semantically and structurally impactful changes in
/migrations
. Additional PRs will be created for logical changes to types and admin-event-handlers, as well as an additional PR for CI integration.This PR builds on changes from #441.
Note
This PR does not resolve all clippy warns nor does it implement clippy into CI.
Work completed:
validation
module. Discussed further below._
character. For example, seemigration/src/lexical.rs:385
.String
s tostr
s.Removing
validation
The
validation
module was added in #236 to reduce excessive SSH connection wait times. It was removed from GitHub Actions Workflows in #291 and #349. It has remained unused in the time since those PRs were merged. Based on this history, there is no compelling reason to preserve this unused code.Removing
validation
reduces needless duplication and helps developers. The code invalidation
seems to be largely copy-pasted frommigration/src/main.rs
. This duplicates some of our most terse and logically complex Rust code, adding a major hurdle to regular maintenance and developer education. Additionally, astypes
are updated,migration/main.rs
is updated regularly whilevalidation
is not, creating massive discrepancies in what should otherwise be similar programs.The DAILP Translation Interface (TI) makes aspects of
validation
obsolete.validation
andmigration/src/main.rs
were both written at a time where data migration was a regular step in DAILP's workflows. With the creation of DAILP TI, bulk ingestion from spreadsheets now only happens on particular occasions. As a result, all of migration is in need of restructuring and validation in its current form will only become more outdated. In place of validation, we may want to add a dry-run migration that reads from google sheets and writes to a preview file instead of the database.Structuring for grammatical references
Functions in
migration/src/early_vocab.rs
andmigration/src/lexical.rs
parse spreadsheets containing data from dictionaries and grammars of Cherokee and store that data in the database. Some of these functions triggered Clippy's too many arguments warning. Upon further inspection, it became clear that functions with too many arguments also had arguments whose function or meaning were unclear. To resolve both of these issues, I created theEarlyVocabMetadata
andDFSheetMetadata
structs to represent key information about early vocabularies spreadsheet structure and Durbin Feeling grammar/dictionary spreadsheet structure. Further documentation would be helpful in explaining what this metadata represents and how it is used.