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

Add --disable-timestamp #324

Merged
merged 4 commits into from
Feb 15, 2023
Merged

Add --disable-timestamp #324

merged 4 commits into from
Feb 15, 2023

Conversation

ytoml
Copy link
Contributor

@ytoml ytoml commented Feb 13, 2023

Hello, I want this CLI to have --disable-timestamp option like datamodel-codegen does thus implemented.
I'll be grad if this PR is accepted! Thank you.

@ytoml
Copy link
Contributor Author

ytoml commented Feb 14, 2023

@koxudaxi
Please review it 🙏

# timestamp: {timestamp}"""
# filename: {Path(input_name).name}"""
if not disable_timestamp:
header += f"timestamp: {timestamp}"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ytoml
The first position needs a new line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, thank you!

Copy link
Owner

@koxudaxi koxudaxi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ytoml
Thank you for creating the PR.
Could please add the unittest for the option?

@ytoml
Copy link
Contributor Author

ytoml commented Feb 15, 2023

@koxudaxi
I fixed above and added tests.
Please re-run CI 🙏

@codecov
Copy link

codecov bot commented Feb 15, 2023

Codecov Report

Base: 91.01% // Head: 91.09% // Increases project coverage by +0.07% 🎉

Coverage data is based on head (95867a7) compared to base (20e40b5).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #324      +/-   ##
==========================================
+ Coverage   91.01%   91.09%   +0.07%     
==========================================
  Files           5        5              
  Lines         345      348       +3     
==========================================
+ Hits          314      317       +3     
  Misses         31       31              
Flag Coverage Δ
unittests 91.09% <100.00%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
fastapi_code_generator/__main__.py 78.89% <100.00%> (+0.59%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@koxudaxi koxudaxi merged commit e1667f6 into koxudaxi:master Feb 15, 2023
@ytoml ytoml deleted the disable-timestamp branch February 15, 2023 15:24
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