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

sphobjinv-textconv #301

Closed
wants to merge 0 commits into from
Closed

Conversation

msftcangoblowm
Copy link

@msftcangoblowm msftcangoblowm commented Dec 12, 2024

Is the PR a fix or a feature?
feature

Describe the changes in the PR
Adds entrypoint sphobjinv-textconv

Does this PR close any issues?
Closes #295

Does the PR change/update the following, if relevant?

  • azure-pipelines adjust coverage fail under reduced 100% --> 90%. Purposefully in a separate commit, for later easy adjustment via git rebase

  • No CHANGELOG entry. No adjustment to version

  • pyproject.toml reformatted by pre-commit

  • Unit tests. No integration test. Some fixtures added to conftest.py

  • Minimal adjustments to doc/conf.py to pass linkcheck.

  • # pragma: no cover used within the entrypoint, not for non soi-textconv modules. In non soi-textconv modules, using # pragma: no cover would return coverage to ~99%.

  • [*] Documentation

  • [*] Tests

  • [ ] CHANGELOG

@bskinn bskinn added type: enhancement ✨ Something to add area: cli 💻 function: convert 🧪 bump: minor 🐒 Backward-compatible feature adds (x.y.0) labels Dec 28, 2024
@bskinn
Copy link
Owner

bskinn commented Dec 28, 2024

Sorry for the delay here, needed to release #299 to make the package play nicer with Debian's build process, and then the holidays hit.

First thing -- your fork's main still isn't current with upstream, which might be the cause of the merge conflict:

image

It's possible you didn't push your updated main to your fork? If git diff origin/main..upstream/main shows any changes, then something's off.

Copy link
Owner

@bskinn bskinn left a comment

Choose a reason for hiding this comment

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

Incomplete review; couple of high-level comments/questions for you.

conftest.py Outdated
@@ -82,6 +82,51 @@ def res_dec(res_path, misc_info):
return res_path / (misc_info.FNames.RES.value + misc_info.Extensions.DEC.value)


@pytest.fixture(scope="session")
def res_cmp_plus_one_line(res_path, misc_info):
Copy link
Owner

Choose a reason for hiding this comment

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

Is this fixture needed any more, since this PR will only be adding the sphobjinv-textconv endpoint and not actually doing anything with git diffs?

conftest.py Outdated
@@ -264,6 +303,68 @@ def func(arglist, *, expect=0): # , suffix=None):
return func


@pytest.fixture() # Must be function scope since uses monkeypatch
def run_cmdline_textconv(monkeypatch):
Copy link
Owner

Choose a reason for hiding this comment

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

Instead of duplicating this fixture with a different hard-coded command, I would rather generalize the existing run_cmdline_test() by having it not assume what the command is, and have all of the points-of-use of the fixture just pass in the command along with the other arguments.

(It's possible that this isn't feasible, I haven't looked closely. Interested in your thoughts.)

conftest.py Outdated

@pytest.fixture() # Must be function scope since uses monkeypatch
def run_cmdline_no_checks(monkeypatch):
"""Return function to perform command line. So as to debug issues no tests."""
Copy link
Owner

Choose a reason for hiding this comment

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

Is this still needed?

conftest.py Outdated
@@ -152,19 +197,13 @@ def scratch_path(tmp_path, res_path, misc_info, is_win, unix2dos):
# With the conversion of resources/objects_attrs.txt to Unix EOLs in order to
# provide for a Unix-testable sdist, on Windows systems this resource needs
# to be converted to DOS EOLs for consistency.
if is_win:
if is_win: # pragma: no cover
Copy link
Owner

Choose a reason for hiding this comment

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

I'm confused as to why these lines started showing up in any of the coverage testing. My pipelines don't show either setup.py or conftest.py, in either the GH Action for testing the main code or the Azure Pipeline for checking execution of all the test code.

These pragmas shouldn't be necessary.

Copy link
Owner

Choose a reason for hiding this comment

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

Is this file needed if we're not directly testing git diff with textconv?

Copy link
Owner

Choose a reason for hiding this comment

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

Is this file needed if we're not directly testing git diff with textconv?

@msftcangoblowm
Copy link
Author

msftcangoblowm commented Dec 30, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: cli 💻 bump: minor 🐒 Backward-compatible feature adds (x.y.0) function: convert 🧪 type: enhancement ✨ Something to add
Projects
None yet
Development

Successfully merging this pull request may close these issues.

act as textconv so can git diff inventory
2 participants