-
Notifications
You must be signed in to change notification settings - Fork 35
docs: document "sample data" switch and function #2084
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
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR adds documentation for the new sample_data CLI switch in the Run struct and annotates the sample_data function with a descriptive doc comment. Class diagram for updated Run struct with sample_data switchclassDiagram
class Run {
+bool devmode
+bool sample_data
}
Class diagram for sample_data function documentationclassDiagram
class sample_data {
+sample_data(db: Database): Result
}
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey there - I've reviewed your changes and they look great!
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `server/src/sample_data.rs:173` </location>
<code_context>
.await
}
+/// Insert example importers, ignoring existing ones
pub async fn sample_data(db: trustify_common::db::Database) -> anyhow::Result<()> {
let importer = ImporterService::new(db);
</code_context>
<issue_to_address>
**suggestion:** The doc comment could clarify what 'ignoring existing ones' means.
Please clarify whether existing importers are skipped, updated, or left unchanged to improve the doc comment's precision.
```suggestion
/**
* Insert example importers.
*
* Existing importers are left unchanged; only new importers are inserted.
* Importers that already exist are skipped and not updated.
*/
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2084 +/- ##
==========================================
- Coverage 68.03% 68.02% -0.01%
==========================================
Files 367 367
Lines 20590 20590
Branches 20590 20590
==========================================
- Hits 14008 14007 -1
+ Misses 5746 5742 -4
- Partials 836 841 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Successfully created backport PR for |
Summary by Sourcery
Add and document a new
sample_dataflag in the profile API to enable injection of example importer configurations during startupNew Features:
sample_dataCLI flag to inject example importer configurations at startupDocumentation:
sample_dataflag in the Run structsample_datafunction explaining its behavior