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

Move testfixtures requirement to test-requirements.txt #5335

Closed
Makman2 opened this issue Apr 7, 2018 · 14 comments · Fixed by #5583
Closed

Move testfixtures requirement to test-requirements.txt #5335

Makman2 opened this issue Apr 7, 2018 · 14 comments · Fixed by #5583

Comments

@Makman2
Copy link
Member

Makman2 commented Apr 7, 2018

No description provided.

@jayvdb
Copy link
Member

jayvdb commented Apr 7, 2018

I was wondering about this.
It was introduced in b502ad6.

But the problem is

$ git grep testfixtures coalib
coalib/misc/DeprecationUtilities.py:    >>> from testfixtures import LogCapture

@jayvdb
Copy link
Member

jayvdb commented Apr 7, 2018

@shreyans800755 might have some ideas on how we might be able to fix this.

@Makman2
Copy link
Member Author

Makman2 commented Apr 7, 2018

Ahhh... sorry I missed that one.

However this is fixable by moving the test to an actual test file. This is not very elegant, but the easiest.

@jayvdb
Copy link
Member

jayvdb commented Apr 11, 2018

cripes; textfixtures is also a dependency of coala_utils
see https://gitlab.com/coala/coala-utils/commit/04a470cceba30dedafdc19539424df9a5e73ca14

@Makman2
Copy link
Member Author

Makman2 commented Apr 12, 2018

Ugh okay that's uncool... Maybe we create a coala-testing repo or coala-testing-utils?

@jayvdb
Copy link
Member

jayvdb commented Apr 12, 2018

a new repo sounds good, but the fundamental problem is that coalib has test helpers in it, so all that needs to be moved out also.

@alphadose
Copy link
Member

alphadose commented Apr 12, 2018

@jayvdb how about we add the source code of logcapture itself to the coala_utils repo https://github.com/Simplistix/testfixtures/blob/master/testfixtures/logcapture.py ? That would remove the dependency on testfixtures in the production build. Not a very elegant solution but the easiest one.

@jayvdb
Copy link
Member

jayvdb commented Apr 13, 2018

No. Then we have to maintain it, and we still have to worry about its deps.

@Makman2 Makman2 changed the title Move testfixtures requirement do test-requirements.txt Move testfixtures requirement to test-requirements.txt Apr 15, 2018
@jayvdb
Copy link
Member

jayvdb commented Apr 16, 2018

Note that this is occurred before the 0.12 branch.
https://github.com/coala/coala/blob/release/0.12/requirements.txt#L12

And happened only in the coala_utils 0.7.0, which is not installed by the currently released 0.11.0.

@jayvdb
Copy link
Member

jayvdb commented Apr 16, 2018

The use of textfixtures via coala_utils is only exposed via a check_logs, and so far it is only used in the tests, so no 'core' functionality will be broken if it is removed from coala_utils.

tests/output/ConsoleInteractionTest.py:from coala_utils.decorators import check_logs
tests/output/ConsoleInteractionTest.py:    @check_logs(*deprecation_messages)
tests/output/ConsoleInteractionTest.py:    @check_logs(*deprecation_messages)
tests/output/ConsoleInteractionTest.py:    @check_logs(*deprecation_messages)
tests/output/ConsoleInteractionTest.py:    @check_logs(*deprecation_messages)
tests/output/ConsoleInteractionTest.py:    @check_logs(*deprecation_messages)
tests/output/ConsoleInteractionTest.py:    @check_logs(*deprecation_messages)
tests/output/ConsoleInteractionTest.py:    @check_logs(*deprecation_messages)
tests/output/ConsoleInteractionTest.py:    @check_logs(*deprecation_messages)
tests/output/ConsoleInteractionTest.py:    @check_logs(*deprecation_messages)
tests/output/ConsoleInteractionTest.py:    @check_logs(*(deprecation_messages*5))

@jayvdb
Copy link
Member

jayvdb commented Apr 16, 2018

coala_utils dependency added in https://gitlab.com/coala/coala-utils/merge_requests/52

There does not appear to have been an issue for it.

@jayvdb
Copy link
Member

jayvdb commented Apr 16, 2018

d56cc7e shows that this also caused our dependency on setuptools to be bumped higher, so we might be able to revert that also after we've fixed this.

@jayvdb
Copy link
Member

jayvdb commented Apr 16, 2018

I have one approach to solve part of the problem.
It depends on chadrosenquist/logging-test-case#1 and chadrosenquist/logging-test-case#3 , then we can use that tool to do the log capturing.
jayvdb@b52983a

There is an unrelated error in the build, due to using my own fork of that package.
https://travis-ci.org/jayvdb/coala/builds/367002980
If the PRs are merged and a new version released, that should be green.

That only removes on of the explicit dependencies.
The other is check_deprecation docstring using testfixtures directly.
That is easily solved as the doctest can be simply removed: jayvdb@f0e84c1 ; test coverage still passes. (phew) I suspect that this isnt even necessary. doctest relying on test requirements is probably ok.

jayvdb added a commit to jayvdb/coala that referenced this issue Apr 16, 2018
``coala_utils`` decorator ``check_logs`` relies on
``textfixtures``, a dependency it shoul not have.
Inlining the decorator will allow it to be removed.

Related to coala#5335
jayvdb added a commit to jayvdb/coala that referenced this issue Apr 16, 2018
``coala_utils`` decorator ``check_logs`` relies on
``textfixtures``, a dependency it shoul not have.
Inlining the decorator will allow it to be removed.

Related to coala#5335
jayvdb added a commit to jayvdb/coala that referenced this issue Apr 16, 2018
``coala_utils`` decorator ``check_logs`` relies on
``textfixtures``, a dependency it shoul not have.
Inlining the decorator will allow it to be removed.

Related to coala#5335
jayvdb added a commit to jayvdb/coala that referenced this issue Apr 16, 2018
``coala_utils`` decorator ``check_logs`` relies on
``textfixtures``, a dependency it shoul not have.
Inlining the decorator will allow it to be removed.

Related to coala#5335
@jayvdb
Copy link
Member

jayvdb commented Apr 16, 2018

Easiest path forward:

  1. ConsoleInteractionTest: Remove check_logs usage #5393
  2. https://gitlab.com/coala/coala-utils/issues/47 - Revert from coala_utils and release 0.8.0
  3. bump coala_utils dependency here
  4. jayvdb/coala@f0e84c1 or similar
  5. move testfixtures to test-requirements.txt

jayvdb added a commit to jayvdb/coala that referenced this issue Apr 16, 2018
``coala_utils`` decorator ``check_logs`` relies on
``textfixtures``, a dependency it shoul not have.
Inlining the decorator will allow it to be removed.

Related to coala#5335
jayvdb added a commit to jayvdb/coala that referenced this issue Jul 1, 2018
testfixtures is move to test-requirement.txt
so that coala does not depend on testing libraries.

Fixes coala#5335
jayvdb added a commit to jayvdb/coala that referenced this issue Jul 1, 2018
testfixtures is moved to test-requirement.txt
so that coala does not depend on specific versions
of testing libraries which may conflict with versions
coala users need installed for their own project.

Fixes coala#5335
gitmate-bot pushed a commit to jayvdb/coala that referenced this issue Jul 16, 2018
testfixtures is moved to test-requirement.txt
so that coala does not depend on specific versions
of testing libraries which may conflict with versions
coala users need installed for their own project.

Fixes coala#5335
jayvdb added a commit to jayvdb/coala that referenced this issue Jul 16, 2018
testfixtures is moved to test-requirement.txt
so that coala does not depend on specific versions
of testing libraries which may conflict with versions
coala users need installed for their own project.

Fixes coala#5335
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

5 participants