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

Move WeightedField calculations and weights to Config #15

Closed
8 tasks done
andygello555 opened this issue Feb 6, 2023 · 0 comments · Fixed by #37
Closed
8 tasks done

Move WeightedField calculations and weights to Config #15

andygello555 opened this issue Feb 6, 2023 · 0 comments · Fixed by #37
Assignees
Labels
enhancement New feature or request

Comments

@andygello555
Copy link
Owner

andygello555 commented Feb 6, 2023

The calculations can be stored as strings and then evaluated using this library.

  • DeveloperSnapshot weights and calculations
    • New weights from Reddit scraping
  • Game weights and calculations
  • SteamApp weights and calculations
  • Need to merge in Scraping indie game subreddits for developers and games #2 at some point to consolidate the changes there
  • Refactor implementations of ComputedFieldsModel.UpdateComputedFields using the new way of calculating weighted scores
  • Remove all the weighted field and weight constants as well as all the methods that use them (such as db/models/fields.go)
  • Add explanation of configuration variables to README

Monday.com Item ID: #3935245767

@andygello555 andygello555 added the enhancement New feature or request label Feb 6, 2023
@andygello555 andygello555 self-assigned this Feb 6, 2023
@andygello555 andygello555 mentioned this issue Feb 6, 2023
51 tasks
@andygello555 andygello555 added enhancement New feature or request and removed enhancement New feature or request labels Feb 6, 2023
andygello555 added a commit that referenced this issue Feb 27, 2023
- Added the db.GetModelByName function that allows us to retrieve models by name (27/02/2023 - 13:22:15)
- Added the WeightedModelExpressions field to the ScrapeConfig that will contain the calculation expressions for the weighted fields for each weighted model. This is a mapping of WeightedModelFieldEvaluator that are compileable (27/02/2023 - 13:23:36)
- Wrote the weightedModelEvaluatorFunctions map which contains all functions that are passed to the expressions that evaluate the weighted values for each field in each weighted model instance (27/02/2023 - 19:12:37)
- Added the WeightedModelFieldEvaluator.Env method returns the environment which contains the variables that are passed to the weighted field expressions (27/02/2023 - 19:14:44)
- WeightedModelFieldEvaluator.Compile will compile the string source code contained in .Expression and store the compiled version within .expression (27/02/2023 - 19:16:43)
- WeightedModelFieldEvaluator.Eval runs the compiled weighted field evaluator and returns a list of float64s (27/02/2023 - 19:17:26)
- Updated the models.ScrapeConfig interface to include all the new methods used to do with weighted models and fields (27/02/2023 - 19:18:38)
- Also added the models.EvaluatorConfig type to be the interface for the WeightedModelFieldEvaluator struct (27/02/2023 - 19:19:09)
- Added the ContextAnnotationSet.ToSlice method which returns the slice representation of the given ContextAnnotationSet. This was added to make the calculation of the ContextAnnotationSet weighted field within DeveloperSnapshot easier (27/02/2023 - 19:20:35)
- Added the snapshots flag to the developer subcommand in the CLI which will recalculate and compare the weighted scores of the related snapshots for a developer to the existing scores within each snapshot (27/02/2023 - 19:21:27)
andygello555 added a commit that referenced this issue Apr 11, 2023
- Fixed merge conflicts in db/models/scrape.go (11/04/2023 - 11:12:12)
andygello555 added a commit that referenced this issue Apr 11, 2023
- Didn't add PostPublicMetrics and RedditPublicMetrics to developerSnapshotWeightedField.Fields for some reason but I have now (11/04/2023 - 13:39:05)
- Added the package private global variable scrapeConfig to the models package to allow models with weighted scores to be able to calculate them (11/04/2023 - 14:44:06)
- main.LoadConfig now also sets the scrapeConfig mentioned above (11/04/2023 - 14:44:27)
- Removed all the weighted score field and weight constants from models (11/04/2023 - 14:49:55)
@andygello555 andygello555 linked a pull request Apr 11, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant