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 more typing to the codebase and various fixes. #285

Merged
merged 1 commit into from
Feb 1, 2024

Conversation

sodul
Copy link
Collaborator

@sodul sodul commented Jan 31, 2024

  • ensure the Makefile will behave more consistently across machines by setting the shell to Bash.
  • update the coverage.py configuration in pyproject.toml to exclude if TYPE_CHECKING: blocks.
  • fix potential bugs in the loader.
  • fix default global kwargs dict in process.py.

@sodul
Copy link
Collaborator Author

sodul commented Jan 31, 2024

The coverage reports are broken somehow (reported as zero coverage), but only over GH Actions. Locally it seems to work fine either on macOS or through a Linux container:

> ./g -rv -s 9 ./green
...................................................................................................................s....................................................................................................................s

Skipped green.test.test_output.TestGreenStream.testDisableWindowsFalse - Colorama won't strip ANSI unless running on Windows

Skipped green.test.test_windows.TestWindows.test_colorOutput - This test is for windows-specific behavior.

Name                     Stmts   Miss  Cover   Missing
------------------------------------------------------
green/__init__.py            2      2     0%   1-3
green/__main__.py            3      3     0%   1-5
green/cmdline.py            59     12    80%   87-101
green/command.py            39      0   100%
green/config.py              2      2     0%   4-8
green/djangorunner.py       61      0   100%
green/examples.py           26     26     0%   1-68
green/exceptions.py          3      0   100%
green/junit.py             120      0   100%
green/loader.py            264      0   100%
green/output.py            101      0   100%
green/process.py            55      0   100%
green/result.py            405      1    99%   333
green/runner.py             73      0   100%
green/suite.py             122     13    89%   96, 100-103, 115-120, 126-129
green/test/__init__.py       0      0   100%
green/version.py             0      0   100%
------------------------------------------------------
TOTAL                     1335     59    96%

Ran 233 tests in 5.606s using 9 processes

OK (passes=231, skips=2)

I'll try to get that fixed as a separate issue.

- ensure the Makefile will behave more consistently across machines by setting the shell to Bash.
- update the coverage.py configuration in pyproject.toml to exclude `if TYPE_CHECKING:` blocks.
- fix potential bugs in the loader.
- fix default global kwargs dict in process.py.
@coveralls
Copy link

Coverage Status

coverage: 0.0%. remained the same
when pulling 842242b on clumio-oss:typing
into 2301a7f on CleanCut:main.

targets = [targets]

# Make sure there are no duplicate entries, preserving order
target_dict = OrderedDict()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

OrderedDict has more features but if they are not used, a regular dict is good enough.

Copy link
Collaborator

@IanFoertsch-clumio IanFoertsch-clumio left a comment

Choose a reason for hiding this comment

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

👍 LGTM

@sodul sodul merged commit 24927c6 into CleanCut:main Feb 1, 2024
24 checks passed
@sodul sodul deleted the typing branch February 3, 2024 00:16
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.

3 participants