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

Configure with meta/config. #243

Merged
merged 10 commits into from
Jun 2, 2021
Merged

Configure with meta/config. #243

merged 10 commits into from
Jun 2, 2021

Conversation

icemac
Copy link
Member

@icemac icemac commented May 5, 2021

Add support for Python 3.9.

See zopefoundation/meta#94 for the needed changes in meta/config.

Add support for Python 3.9.
Copy link
Member

@jamadden jamadden left a comment

Choose a reason for hiding this comment

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

The tests are crashing because coverage can't find a plugin:

Run coverage run -p -m unittest discover -s src
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.6.13/x64/bin/coverage", line 8, in <module>
    sys.exit(main())
  File "/opt/hostedtoolcache/Python/3.6.13/x64/lib/python3.6/site-packages/coverage/cmdline.py", line 871, in main
    status = CoverageScript().command_line(argv)
  File "/opt/hostedtoolcache/Python/3.6.13/x64/lib/python3.6/site-packages/coverage/cmdline.py", line 588, in command_line
    return self.do_run(options, args)
  File "/opt/hostedtoolcache/Python/3.6.13/x64/lib/python3.6/site-packages/coverage/cmdline.py", line 743, in do_run
    self.coverage.start()
  File "/opt/hostedtoolcache/Python/3.6.13/x64/lib/python3.6/site-packages/coverage/control.py", line 532, in start
    self._init()
  File "/opt/hostedtoolcache/Python/3.6.13/x64/lib/python3.6/site-packages/coverage/control.py", line 275, in _init
    self._plugins = Plugins.load_plugins(self.config.plugins, self.config, self._debug)
  File "/opt/hostedtoolcache/Python/3.6.13/x64/lib/python3.6/site-packages/coverage/plugin_support.py", line 41, in load_plugins
    __import__(module)
ModuleNotFoundError: No module named 'coverage_python_version'

CHANGES.rst Outdated Show resolved Hide resolved
@icemac
Copy link
Member Author

icemac commented May 6, 2021

Now CI fails at pushing data to coveralls.io because coverage-python-version is needed there too. (See https://github.com/zopefoundation/zope.interface/pull/243/checks?check_run_id=2515733925)

This step is done via the GitHub action https://github.com/AndreMiras/coveralls-python-action and I do not see a chance there to install coverage-python-version beforehand.

It seems that we either have to remove coverage-python-version or find another way to publish to coveralls.io. @jamadden Do you know why this GitHub action is used instead of installing the Python package and publishing via calling its script?

@mgedmin
Copy link
Member

mgedmin commented May 6, 2021

It seems that we either have to remove coverage-python-version or find another way to publish to coveralls.io.

I wonder that nobody else complained about this problem in https://github.com/AndreMiras/coveralls-python-action/issues. Do people rarely use coverage plugins?

For my personal projects I've been uploading to coveralls.io by using the usual pip install coveralls && coveralls in the build script, e.g. https://github.com/mgedmin/check-python-versions/blob/57aa8665d74fee20a56c179608a1c0d79d8b13c0/.github/workflows/build.yml#L60-L65

One issue with that approach is that you need a recent enough version of https://pypi.org/p/coveralls to support GITHUB_TOKEN, and that version no longer supports Python 2.

@jamadden
Copy link
Member

jamadden commented May 6, 2021

One issue with that approach is that you need a recent enough version of https://pypi.org/p/coveralls to support GITHUB_TOKEN, and that version no longer supports Python 2.

That's one of the major reasons I've been using the docker version everywhere.

Do people rarely use coverage plugins?

I think that's right too.

@mgedmin
Copy link
Member

mgedmin commented May 6, 2021

I've filed an issue: AndreMiras/coveralls-python-action#17

@icemac
Copy link
Member Author

icemac commented May 7, 2021

Let's see if there will be a reaction to AndreMiras/coveralls-python-action#17. Otherwise I'd drop the usage of coverage-python-version as it is not used here in zope.interface.

@mgedmin
Copy link
Member

mgedmin commented May 9, 2021

Oh, we're not actually using the coverage-python-version plugin here? Then let's by all means drop it.

@icemac
Copy link
Member Author

icemac commented May 10, 2021

Dropped coverage-python-version, let's see if GHA gets green now.

Michael Howitz added 4 commits May 10, 2021 09:01
@icemac icemac requested review from mgedmin and jamadden May 11, 2021 05:52
Copy link
Member

@mgedmin mgedmin left a comment

Choose a reason for hiding this comment

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

The tox.ini setup for -pure environments doesn't work; the rest LGTM.

pragma: no cover
class I[A-Z]\w+\((Interface|I[A-Z].*)\):
Copy link
Member

Choose a reason for hiding this comment

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

How much coverage are we losing by dropping this from exclude_lines?

Copy link
Member Author

Choose a reason for hiding this comment

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

I hopefully fixed all the places where this line ignored methods by changing pass to a docstring.

There is still https://coveralls.io/builds/39516428/source?filename=src%2Fzope%2Finterface%2Fcommon%2Fcollections.py#L221 which I do not understand as I thought we have coverage for all Python versions. (There are some other cases which look the same.)

.meta.toml Outdated Show resolved Hide resolved
.meta.toml Outdated Show resolved Hide resolved
setup.cfg Show resolved Hide resolved
tox.ini Outdated Show resolved Hide resolved
tox.ini Show resolved Hide resolved
@mgedmin mgedmin self-requested a review May 12, 2021 08:10
@icemac icemac requested a review from mgedmin May 27, 2021 06:45
@icemac
Copy link
Member Author

icemac commented Jun 2, 2021

@mgedmin You requested changes to this PR. I think I fixed them. Are you okay with them?

Copy link
Member

@mgedmin mgedmin left a comment

Choose a reason for hiding this comment

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

lgtm

@icemac icemac merged commit d18b547 into master Jun 2, 2021
@icemac icemac deleted the config-with-meta-config branch June 2, 2021 12:35
@icemac
Copy link
Member Author

icemac commented Jun 2, 2021

Thank you for reviewing this PR. 😃

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