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

#55 - Chapter line formatting - authors #74

Open
wants to merge 53 commits into
base: master
Choose a base branch
from

Conversation

miroslavpojer
Copy link
Collaborator

@miroslavpojer miroslavpojer commented Sep 25, 2024

  • Add limitation to avoid of usage black to tests.
  • Removed workflow copying Release notes from PR to Issue as no more supported.
  • Updated README.md to show example of row formatting as build-in feature and provide list of supported keywords.

Closes #55
Closes #56

@miroslavpojer miroslavpojer self-assigned this Oct 8, 2024
@miroslavpojer miroslavpojer marked this pull request as ready for review October 8, 2024 08:06
@miroslavpojer
Copy link
Collaborator Author

Release notes:

  • add support for formatted row types - Issue, PR and Commit
  • add support for several placeholders usable in row types
  • improved doc in README.md
  • cleanup of code

@MobiTikula MobiTikula self-requested a review October 8, 2024 08:18
Copy link
Collaborator

@MobiTikula MobiTikula left a comment

Choose a reason for hiding this comment

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

This is part of a partial review. Please comment or implement suggestions mentioned in the comments. During my work on liv-doc, I found as well one more issue.

  • in a test.yml workflow, there is an issue in unit-test. You check cov with pytest. There is no need to have an html report. You can look at liv-doc for inspiration. After pytest cov check, you check cov again with coverage tool and export it to xml. This is not needed at all, since we just check if cov is above or below 80 %.
  • if we agree on the point above, you should also remove coverage==7.5.2 from your requirements.txt

README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
- [Handling Issue Mentioned By Multiple PRs](#handling-issue-mentioned-by-multiple-prs)
- [No Release Notes Found](#no-release-notes-found)
- [Issue, Pull Request or Commit Row formatting](#issue-pull-request-or-commit-row-formatting)
- [Supported row format keywords](#supported-row-format-keywords)
Copy link
Collaborator

Choose a reason for hiding this comment

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

There are some bugs, I found during review (README.md), that are already merged. Please find this comment as a block of suggestions, that may occur on more than just one place.

  • Please reconsider and make a statement about what levels of headers you want to visualize in POC. In my opinion here you go too deep visualizing h5. There are many h3 in inputs section, which are not seen in PoC. It doesn't look compact.
  • This h5 doesn't really have to be extra header at all. Because there is just one header in the section at the time.
  • I think that best practice is to have a new header level only, whenever you need @ or more lower level of headings. Easier to see in practice. You have h2 (## Outputs) and then you have just one h3 (### Supported Row Types) and after 3 times h4. I don't see a reason to have this one h3. There is not a single sentence anyway.
  • The same issue in h5 (##### Supported row format keywords). It is not needed IMHO.
  • look at line 99 = ### Feature controls, it should be higher level of a header based on the context around.
  • look at line 150 = #### Default. I am suggesting to change it to Default, since there is no need to have it as a header. Same at line 167.
  • after Black Expected Output example there is an extra blank line
  • add information, that pylint and black tool exclude tests/ file

Copy link
Collaborator Author

@miroslavpojer miroslavpojer Oct 16, 2024

Choose a reason for hiding this comment

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

This part will be reworked, including a change of chapter meaning.
This text will not be reused.

Keeping not Resolved to check again after new data structure will be implemented.

README.md Show resolved Hide resolved
self.chapters[MERGED_PRS_LINKED_TO_NOT_CLOSED_ISSUES].add_row(nr, records[nr].to_chapter_row())
self.used_record_numbers.append(nr)
else:
self.chapters[OTHERS_NO_TOPIC].add_row(nr, records[nr].to_chapter_row())
self.used_record_numbers.append(nr)

def __populate_closed_issues(self, record: Record, nr: int) -> None:
def __populate_isolated_commits(self, r: Record, nr: str) -> None:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Missing method docstring.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Present only in this branch.

self.used_record_numbers.append(nr)

def __is_row_present(self, nr: int) -> bool:
def __is_row_present(self, nr: int | str) -> bool:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Missing method docstring.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added.


def create_record_for_issue(r: Repository, i: Issue):
records[i.number] = Record(r, i)
def create_record_for_issue(i: Issue):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Check missing method docstrings.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed.

@@ -23,7 +23,7 @@
from functools import wraps
from typing import Callable, Optional, Any
from github import GithubException
from requests.exceptions import Timeout, RequestException, ConnectionError as RequestsConnectionError
from requests.exceptions import Timeout, RequestException, ConnectionError
Copy link
Collaborator

Choose a reason for hiding this comment

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

ConnectionError is a built in exception, you don't have to import it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed.

@@ -0,0 +1,2 @@
class NotSupportedException(Exception):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add all the documentation needed for this new module.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This class is present only this branch.

@miroslavpojer
Copy link
Collaborator Author

This branch will not be used in future.
Review comments will be mined and resolved in time by developer doing the fixed in another branched - with comments here.

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.

Chapter line formatting - contributors Chapter line formatting - authors
2 participants