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

Report location where the value is empty in mobanfile #139

Merged
merged 1 commit into from Dec 10, 2018

Conversation

seeeturtle
Copy link
Collaborator

If empty value is found in mobanfile, moban will report the
line number of that.

Closes #37

Before raising the PR, here is a check list:

  1. have you written unit tests for your code changes?
  2. have you run "make format"?
  3. are you requesting to "dev"?
  4. have you updated the change log?
  5. do you think that you can understand your changes after 6 month?
    5.1) can someone else understand your changes without your explanation?
  6. are you pround of your code changes?
    6.1) do you have the feeling of achievement?

@codecov-io
Copy link

codecov-io commented Dec 2, 2018

Codecov Report

Merging #139 into dev will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #139      +/-   ##
==========================================
+ Coverage   98.44%   98.46%   +0.02%     
==========================================
  Files          39       39              
  Lines        1801     1825      +24     
==========================================
+ Hits         1773     1797      +24     
  Misses         28       28
Impacted Files Coverage Δ
moban/constants.py 100% <100%> (ø) ⬆️
moban/main.py 100% <100%> (ø) ⬆️
moban/utils.py 95.13% <100%> (ø) ⬆️
tests/test_main.py 95.06% <100%> (+0.69%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f4b7570...d0540fd. Read the comment docs.

moban/main.py Outdated Show resolved Hide resolved
CHANGELOG.rst Outdated
@@ -1,6 +1,15 @@
Change log
================================================================================

0.3.5.1 - 02-12-2018
Copy link
Member

Choose a reason for hiding this comment

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

0.3.5 has not been released yet. So, your change will go with 0.3.5

@chfw
Copy link
Member

chfw commented Dec 2, 2018

Please update change log. Otherwise, all is good to merge!

Copy link
Collaborator

@CLiu13 CLiu13 left a comment

Choose a reason for hiding this comment

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

Please update the changelog by doing the following:

  1. Update the changelog by editing this file: .moban.cd/changelog.yml
  2. Then, run make update, which will auto-generate CHANGELOG.rst based on your changes in step 1

By doing it this way, when someone runs make update in the future, it won't overwrite your updates to the changelog. I also made this mistake on my first try, so reference my PR if needed :)

Feel free to update the docs if this wasn't clear enough!

import moban.reporter as reporter
import moban.constants as constants
import moban.exceptions as exceptions
from ruamel.yaml import YAML
Copy link
Member

Choose a reason for hiding this comment

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

Just a little improvement here. Since ruamel.yaml is a third party dependency, it should be placed in between import errno and import moban.reporter import YAML. (ref)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

hmm... make format put the import at that position. which should i follow?

Copy link
Member

Choose a reason for hiding this comment

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

.isort.cfg needs updating.

here is the isort docs: https://isort.readthedocs.io

@chfw
Copy link
Member

chfw commented Dec 3, 2018

Call 'make format' will change coding style to confirm existing ones.

If empty value is found in mobanfile, moban will report the
line number of that and the name of the file.

Closes moremoban#37
@chfw
Copy link
Member

chfw commented Dec 4, 2018

https://github.com/moremoban/moban/blob/dev/.isort.cfg defines the import order. You may want to put ruemal.yaml at the end of known first party.

@chfw
Copy link
Member

chfw commented Dec 4, 2018

And please mention the issue number in change log, which will be rendered by moban as a link to github.

@@ -5,6 +5,7 @@ releases:
- action: Updated
details:
- "`#37`: switch from pyyaml to ruamel.yaml"
- "moban will report line number where the value is empty and the name of mobanfile"
Copy link
Member

Choose a reason for hiding this comment

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

this line is essentially part of #37. in order to get line number, we switch from pyyaml to ruamel.yaml

@chfw chfw merged commit b417826 into moremoban:dev Dec 10, 2018
chfw added a commit that referenced this pull request Dec 10, 2018
chfw added a commit that referenced this pull request Dec 10, 2018
ayan-b pushed a commit to ayan-b/moban that referenced this pull request Jan 15, 2019
ayan-b pushed a commit to ayan-b/moban that referenced this pull request Jan 15, 2019
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.

None yet

6 participants