-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
Updated recipe/meta.yaml to version 3.36.0 #19
Conversation
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( |
@DRMacIver - here is a link to the log for 3.6 on linux: Would you care to take a look? Start at the end - it fails to import hypothesis.searchstrategy : Even better is the last build: |
Hi! This is the friendly automated conda-forge-linting service. I wanted to let you know that I linted all conda-recipes in your PR ( Here's what I've got... For recipe:
|
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( |
@jochym I really can't see anything obviously wrong here. In particular it's very strange for hypothesis and hypothesis.extra to import correctly and hypothesis.searchstrategy not. My guess is that this problem must be somewhere in your build setup rather than Hypothesis because I've never seen this problem outside of conda (including a bunch of other downstream packagers), but I've no idea what that could be! Can you give me any pointers on how to reproduce this problem locally to debug? |
Ok. This at least means that I am not doing something obviously wrong. I'll try to make a local version of the build/error for you to test. |
At least not obvious to me. I want to reemphasise that I know remarkably little about conda packaging! |
I have found at least one problem - the build dependence on attrs is circular. I think the package for attrs should move hypothesis dependency to testin requirements. I have submitted the PR to this effect (conda-forge/attrs-feedstock#6), but it will take some time to get accepted. |
recipe/meta.yaml
Outdated
# - cd git_src | ||
# - python -m pytest tests/cover | ||
- hypothesis.searchstrategy | ||
# - hypothesis.tools |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW this package is actually gone, so any failures to import it are genuine.
recipe/meta.yaml
Outdated
commands: | ||
- git clone https://github.com/HypothesisWorks/hypothesis-python.git src | ||
- cd src | ||
- bash scripts/basic-test.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might want to not use this - it has a lot of reliance on pip to manage installs as it runs the tests.
recipe/meta.yaml
Outdated
# - python -m pytest tests/cover | ||
# - python -m pytest tests/datetime | ||
# - python -m pytest tests/fakefactory | ||
# - python -m pytest tests/pytest -p pytester --runpytest subprocess |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you restore these it might be worth adding tests for the tests/numpy and tests/pandas sections too, given conda's user demographics! Both of those would then have to be added as testing dependencies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. I switched the tests and made it to:
- python -m pytest tests/cover
- python -m pytest tests/datetime
- python -m pytest tests/fakefactory
- python -m pytest tests/numpy
- python -m pytest tests/pandas
- python -m pytest tests/py2 # [py2k]
- python -m pytest tests/py3 # [py3k]
- python -m pytest tests/pytest -p pytester --runpytest subprocess
Is this supposed to work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that should work (except for comment about pytest-xdist elsewhere)
recipe/meta.yaml
Outdated
# requires: | ||
# - pytest | ||
requires: | ||
- pytest | ||
imports: | ||
- hypothesis | ||
- hypothesis.extra |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not totally clear on what the imports tests are for, but might it be worth switching these to correspond more to which ones are in the public API? That would probably be:
- hypothesis
- hypothesis.extra
- hypothesis.strategies (note: not the same as hypothesis.searchstrategy)
- hypothesis.stateful
The others that are currently there are mostly internal packages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done all above. Thanks - let us wait for the results of CI.
recipe/meta.yaml
Outdated
# requires: | ||
# - pytest | ||
requires: | ||
- pytest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you move away from using the basic-test.sh then the following are probably also useful testing requirements:
- pytz
- numpy
- pandas
- faker
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry a thing that I've just noticed will probably give you trouble: I think pytest-xdist should also be a testing dependency - otherwise when you run pytest in the testing section it will pick up the "-n 2" flag from the tox.ini and won't recognise it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(If you want to disable it running in parallel you can then pass "-n 0" to pytest to override)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://circleci.com/gh/jochym/hypothesis-feedstock/152
- python -m pytest tests/cover
usage: pytest.py [options] [file_or_dir] [file_or_dir] [...]
pytest.py: error: unrecognized arguments: -n
inifile: /feedstock_root/build_artefacts/hypothesis_1510330029786/test_tmp/src/tox.ini
rootdir: /feedstock_root/build_artefacts/hypothesis_1510330029786/test_tmp/src
TESTS FAILED: hypothesis-3.36.0-py36_0.tar.bz2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added pytest-xdist to the dependencies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I forgot about flaky. That also needs to be in the testing dependencies.
@@ -12,34 +12,39 @@ source: | |||
sha256: {{ sha256 }} | |||
|
|||
build: | |||
skip: True # [py<34] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Depending on which versions of Python are currently supported in conda you may need to restrict this further (all of the ones in your actual CI are fine though)
Looking at your failing tests:
|
OK, Thanks @DRMacIver - it looks like we have done it. |
- faker | ||
- mock | ||
- flaky | ||
- ipaddress # [py2k] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm is this a workaround? Because really this should be installed as part of the faker dependency.
No, this looks good to me. |
Thanks @DRMacIver for your help! |
No description provided.