-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Windows issue in conda-forge tests #10
Comments
Windows Errors! Don't we all love them so much? I don't know how many hours they cost us already in the development of PyScaffold. The problem seems to be that |
Not sure I completely understand the Azure CI/CD but this run seems to have worked. Also is there any difference to PyScaffold itself, as this has even way more Windows unit tests? |
Yay! I disabled |
Sorry guys, just seeing it now... Instead of running Some other thing we should do also is update the building process, i.e. replace |
Ah yes! I was having a lot of trouble with tox because of some of the assumptions that the tests seem to make: The conda-forge workflow is to install the package, copy the test files to a temp directory, and run the tests from there. At least in the pyscaffold tests, there seemed to be a lot of tests to ensure for example that It also means that I need to explicitly copy |
I see... Yes in the codebase of PyScaffold we added some of those tests because at somepoint we were testing things against the wrong installation/other versions... So they work like metatests/sanity checks. Please let me know when you find those, I think we could arrange some env vars and skip when running tests for conda-forge. I have a silly question (sorry not familiar with conda): in order to see if the changes in the pyscaffold-dsproject solve the problem in the feedstock, do we need to keep tagging new versions? |
Yes, I'm trying to dig up a list of those tests which were failing. (I got around them by adding not slow and not system so I wonder if we could simply add another pytest marker for For reference, here's how one copies |
Ok, this assertion fails because pyscaffold isn't installed in Finally, Those are all the references I wanted to find. And your very good and not at all silly question, conda-forge renders from PyPI releases. So to first order, you'd need to publish to PyPI. But there are some mechanisms to test locally via Docker. But in that case I don't think we have access to Windows (but I could be wrong). I also think conda-forge only tests against Linux for new versions. Let me see if I can find some feasible way to test conda-forge based on local source... |
Thank you very much @maresb. Later today I will try to replicate the tests from conda in a windows machine... let's see what I can find wrong about it... I wonder if adding |
Regarding the |
I think I have things straightened out on the Regarding tox in general, unfortunately I'm not so familiar with it, but from what I gathered, when running |
Hi @maresb, I just sat down to investigate these issues and saw the latest comment from Cris. Should we just do the: - imports
- pip check
- putup --help as suggested by him? I suppose these should speed up things and alleviate the load on their CI (PyScaffold tests are quite heavy... our Cirrus setup usually takes at least 30min). For the extensions, I suppose we could just check if the extension flag is amount the output of |
If we have problems (e.g. git not being installed on the CI env or not being available), we can also try to postpone the following command (that is currently running the first time the # Currently defined as a top-level var in `src/pyscaffold/shell.py`
git = get_git_cmd() |
I just published a potential fix which includes the tests. I am now including the setup.cfg in the testing directory, so maybe the Windows problem goes away. In case it doesn't, then let's fall back to the |
Ok, meanwhile I will try to run the recipe locally as suggested by him. Too bad conda just takes forever for installing/creating environemtns... |
Ya. Conda is really a PITA. Do you know about |
This tip is 🥇! I had no idea... |
Ya, it's truly amazing. It's quite new, which explains why nobody's heard of it. I'm really spoiled now to the point where I can't stand So Windows failed again. Maybe because you can't set environment variables like that? Whatever, we'll do it the simple way. I'll add a comment referring to the commit on the off-chance that someone wants to resurrect the effort. |
Ok, I also run in trouble when executing Thank you very much @maresb for the effort anyway. Ideally Cirrus should be catching all the errors including Windows. Let me just confirm: we are using the simple way for |
You're welcome. As for the most preferable way to structure the tests, I honestly have no idea. I have little experience in modern software development, and half of what I learned, I actually learned from using PyScaffold on a project. My first instinct was also to do things with environment variables. I was looking through the pytest documentation, and it looks to me like markers are the correct tool for being able to turn off tests. (i.e. I was thinking it would be clever to make the conda-forge test command |
Just to log my investigation: it seems the problem identified in conda-forge CI happens every time you try to use We can follow the issue on pypa/build#253 |
See pyscaffold/pyscaffoldext-markdown#10 for the context of this change
@maresb, I added both marks and envvars checks on pyscaffold/pyscaffold#416... |
`build` seems to rely by default in the stdlib's implementation of `venv` and unfortunately for a specific combination of Windows + conda env + virtualenv (as used by tox), that might be problematic as identified in pyscaffold/pyscaffoldext-markdown#10. According to the discussion in pypa/build#253, specifying `virtualenv` as an extra dependency of `build` seems to be a good workaround. Moreover I would expect some kind speed improvements (virtualenv is reported to be faster than venv).
See pyscaffold/pyscaffoldext-markdown#10 for the context of this change
`build` seems to rely by default in the stdlib's implementation of `venv` and unfortunately for a specific combination of Windows + conda env + virtualenv (as used by tox), that might be problematic as identified in pyscaffold/pyscaffoldext-markdown#10. According to the discussion in pypa/build#253, specifying `virtualenv` as an extra dependency of `build` seems to be a good workaround. Moreover I would expect some kind speed improvements (virtualenv is reported to be faster than venv).
Description of your problem
Hooray, a Windows issue!
On conda-forge build, the test succeeds in Linux and OSX, but fails in Windows.
Azure Pipeline logs
The relevant line is monolithic, containing lots of
\n
characters, but a simpleprint("""[paste here]""")
cleans things up:I don't know what's going on, and as a policy for my personal sanity, I don't do Windows. Any ideas?
The text was updated successfully, but these errors were encountered: