-
Notifications
You must be signed in to change notification settings - Fork 6
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
Amend Documents #10
Amend Documents #10
Conversation
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.
Thank you for your Pull Request! It looks good to me.
During the code review, I noticed something we can fix, so let me leave some comments.
README.md
Outdated
@@ -11,16 +11,16 @@ | |||
|
|||
cder (_see-der_) is a database seeding tool to help you import fixure data in your local environment. | |||
|
|||
Generating seeds programmatically is a easy task, but maintaining them is not. | |||
Generating seeds programmatically is an easy task, but maintaining them is not. | |||
Everytime when your schema is changed, your seed can be broken. |
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.
Everytime when your schema is changed, your seed can be broken. | |
Every time when your schema is changed, your seed can be broken. |
README.md
Outdated
@@ -11,16 +11,16 @@ | |||
|
|||
cder (_see-der_) is a database seeding tool to help you import fixure data in your local environment. | |||
|
|||
Generating seeds programmatically is a easy task, but maintaining them is not. | |||
Generating seeds programmatically is an easy task, but maintaining them is not. | |||
Everytime when your schema is changed, your seed can be broken. | |||
It costs your team extra efforts to keep them updated. |
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.
It costs your team extra efforts to keep them updated. | |
It costs your team extra effort to keep them updated. |
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.
I fixed as suggested, but may I ask for an explanation in detail for future reference, if you would not mind?
For clarity, just let me tell what I thought: efforts
here referred to humans' 'actions' required to update seeds, that is, rewriting or adding seeds data and keeping them new, and therefore [countable] an attempt to do something especially when it is difficult to do
[1] sounded suited to me.
[1] https://www.oxfordlearnersdictionaries.com/definition/english/effort
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.
That makes sense to me (actually my initial intention).
Having said that, it's not a critical point in terms of usage of this crate, so I'd accept either way (please correct if you will!) Thanks again for the detailed review 👍
README.md
Outdated
Everytime when your schema is changed, your seed can be broken. | ||
It costs your team extra efforts to keep them updated. | ||
|
||
#### with cder you can: | ||
- maintain your data in a readable format, separated from the seeding program | ||
- handle reference integrities on-the-fly, using **embedded tags** | ||
- reuse existing struct and insert function, with only a little glue code is needed | ||
- reuse existing structs and insert function, with only a little glue code is needed |
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.
- reuse existing structs and insert function, with only a little glue code is needed | |
- reuse existing structs and insert function,s with only a little glue code is needed |
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.
@kenkoooo perhaps you meant s
comes into before comma, right?
- reuse existing structs and insert function, with only a little glue code is needed | |
- reuse existing structs and insert functions, with only a little glue code is needed |
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.
Thanks! Good catch!
README.md
Outdated
@@ -250,12 +250,12 @@ Dev: | |||
email: ${{ ENV(DEVELOPER_EMAIL:-"[email protected]") }} | |||
``` | |||
|
|||
Without specifying the defalut value, all the tags that points to undefined environment vars are simply replaced by empty string "". | |||
Without specifying the defalut value, all the tags that point to undefined environment vars are simply replaced by empty string "". |
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.
Without specifying the defalut value, all the tags that point to undefined environment vars are simply replaced by empty string "". | |
Without specifying the default value, all the tags that point to undefined environment vars are simply replaced by empty string "". |
README.md
Outdated
|
||
### Data representation | ||
cder deserializes yaml data based on [serde-yaml](https://github.com/dtolnay/serde-yaml), that supports powerful [serde serialization framework](https://serde.rs/). With serde, you can deserialize pretty much any struct. You can see a few [sample structs](tests/test_utils/types.rs) with various types of attributes and [the yaml files](tests/fixtures) that can be used as their seeds. | ||
|
||
Below shows a few basics of required YAML format. | ||
Shown below are a few basics of required YAML format. |
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.
Shown below are a few basics of required YAML format. | |
Below are a few basics of required YAML format. |
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.
Okay, let us keep things simple here.
README.md
Outdated
Everytime when your schema is changed, your seed can be broken. | ||
It costs your team extra efforts to keep them updated. | ||
|
||
#### with cder you can: | ||
- maintain your data in a readable format, separated from the seeding program | ||
- handle reference integrities on-the-fly, using **embedded tags** | ||
- reuse existing struct and insert function, with only a little glue code is needed | ||
- reuse existing structs and insert function, with only a little glue code is needed |
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.
@kenkoooo perhaps you meant s
comes into before comma, right?
- reuse existing structs and insert function, with only a little glue code is needed | |
- reuse existing structs and insert functions, with only a little glue code is needed |
Thank you two for taking a look and @kenkoooo -san for pointing out what I overlooked. I have fixed those as suggested. While I was reworking I just found a few more I regrettably overlooked to fix. May I ask you to review these too?
|
@kenkoooo @fursich pub use mock_database::{sort_records_by_ids, MockTable}; but There may be some ways to resolve the issue by like allowing unused imports or removing the above line and specifying only used identities in |
Thanks for the analysis on CI failure - yes, apparently it's nothing to do with this change (sorry for that..!) My view on this:
So my suggestion is to specify all the required imports instead of |
Thank you for the reply. In order to avoid my misinterpretation, may I request you to make a pull request to resolve the problem? I am grateful for your help. |
Looks like it's a false positive (possibly a bug with latest rustc ??) - and I ended up add a workaround. |
@fursich |
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.
@mtshr All looks great! thanks a lot for contributing to cder 🎉
Thank you for kind supports! |
The pull request fixes some typos.