Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

compatibility with Conda #102

Closed
joaomcteixeira opened this issue Nov 25, 2021 · 4 comments
Closed

compatibility with Conda #102

joaomcteixeira opened this issue Nov 25, 2021 · 4 comments
Labels
documentation Improvements or additions to documentation question Asks a question about tox-gh-actions

Comments

@joaomcteixeira
Copy link

Question
Is tox-gh-actions compatible with tox-conda?

Context
I have a project where I use tox and tox-conda. I use tox-conda because the project has dependencies that exist only in conda. However. I could never make tox-gh-actions work properly. I tried last year and now. Currently, tox runs all environments despite tox-gh-actions being installed and configured in tox.ini. I provide the links below:

Additional context
The changes I am trying to apply are in joaomcteixeira/taurenmd#59

@ymyzk
Copy link
Owner

ymyzk commented Dec 29, 2021

Hi, thanks for filing a ticket. I haven't think about using tox-gh-actions with Conda. As far as I checked, it seems tox-gh-actions is not loaded by tox. I'll investigate a bit deeper and share the result with you.

(base) root@36187653ed99:/tmp/taurenmd# GITHUB_ACTIONS=true tox -l -vv
using tox.ini: /tmp/taurenmd/tox.ini (pid 1867)
  removing /tmp/taurenmd/.tox/log
could not satisfy requires PackageNotFoundError('tox-conda')
using tox-3.24.5 from /opt/conda/lib/python3.9/site-packages/tox/__init__.py (pid 1867)
/opt/conda/bin/python (/opt/conda/bin/python) is {'executable': '/opt/conda/bin/python', 'implementation': 'CPython', 'version_info': [3, 9, 7, 'final', 0], 'version': '3.9.7 (default, Sep 16 2021, 13:09:58) \n[GCC 7.5.0]', 'is_64': True, 'sysplatform': 'linux', 'os_sep': '/', 'extra_version_info': None}
.tox uses /opt/conda/bin/python
.tox start: getenv /tmp/taurenmd/.tox/.tox
.tox reusing: /tmp/taurenmd/.tox/.tox
.tox finish: getenv /tmp/taurenmd/.tox/.tox after 0.05 seconds
.tox start: finishvenv 
.tox finish: finishvenv  after 0.01 seconds
.tox start: provision 
[1870] /tmp/taurenmd$ /tmp/taurenmd/.tox/.tox/bin/python -m tox -l -vv
using tox.ini: /tmp/taurenmd/tox.ini (pid 1870)
using tox-3.24.5 from /tmp/taurenmd/.tox/.tox/lib/python3.9/site-packages/tox/__init__.py (pid 1870)
default environments:
build -> [no description]
docs  -> [no description]
lint  -> [no description]
py36  -> [no description]
py37  -> [no description]
py38  -> [no description]
py39  -> [no description]
.tox finish: provision  after 0.28 seconds

@ymyzk
Copy link
Owner

ymyzk commented Dec 29, 2021

Okay, when we specify requires in tox.ini, tox-gh-actions should be specified in requires as well. Could you give it a try? If this solution works, I'll add this to our documentation as well.

diff --git a/tox.ini b/tox.ini
index e7b7b14..4c8e14e 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,6 +1,8 @@
 [tox]
 minversion = 3.14.0
-requires=tox-conda
+requires=
+    tox-conda
+    tox-gh-actions
 envlist =
     build
     docs
(base) root@36187653ed99:/tmp/taurenmd# GITHUB_ACTIONS=true tox -l -vv
using tox.ini: /tmp/taurenmd/tox.ini (pid 2348)
  removing /tmp/taurenmd/.tox/log
could not satisfy requires PackageNotFoundError('tox-conda')
using tox-3.24.5 from /opt/conda/lib/python3.9/site-packages/tox/__init__.py (pid 2348)
/opt/conda/bin/python (/opt/conda/bin/python) is {'executable': '/opt/conda/bin/python', 'implementation': 'CPython', 'version_info': [3, 9, 7, 'final', 0], 'version': '3.9.7 (default, Sep 16 2021, 13:09:58) \n[GCC 7.5.0]', 'is_64': True, 'sysplatform': 'linux', 'os_sep': '/', 'extra_version_info': None}
.tox uses /opt/conda/bin/python
.tox start: getenv /tmp/taurenmd/.tox/.tox
.tox reusing: /tmp/taurenmd/.tox/.tox
.tox finish: getenv /tmp/taurenmd/.tox/.tox after 0.05 seconds
.tox start: finishvenv 
.tox finish: finishvenv  after 0.01 seconds
.tox start: provision 
[2351] /tmp/taurenmd$ /tmp/taurenmd/.tox/.tox/bin/python -m tox -l -vv
using tox.ini: /tmp/taurenmd/tox.ini (pid 2351)
running tox-gh-actions
original envconfigs: ['build', 'docs', 'lint', 'py36', 'py37', 'py38', 'py39', 'prreqs', 'radon']
original envlist_default: ['build', 'docs', 'lint', 'py36', 'py37', 'py38', 'py39']
original envlist: ['build', 'docs', 'lint', 'py36', 'py37', 'py38', 'py39']
Python versions: ['3.9', '3']
tox-gh-actions config: {'python': {'3.6': ['py36'], '3.7': ['py37'], '3.8': ['py38'], '3.9': ['py39']}, 'env': {}}
got factors for Python version: 3.9
using the following factors to decide envlist: ['py39']
overriding envlist with: ['py39']
using tox-3.24.5 from /tmp/taurenmd/.tox/.tox/lib/python3.9/site-packages/tox/__init__.py (pid 2351)
default environments:
py39 -> [no description]
.tox finish: provision  after 0.26 seconds

@joaomcteixeira
Copy link
Author

Thanks so much @ymyzk. I will have a look asap and let you know. cheers.

@ymyzk ymyzk added the question Asks a question about tox-gh-actions label Dec 31, 2021
@ymyzk ymyzk added the documentation Improvements or additions to documentation label Jan 8, 2022
lmmx added a commit to lmmx/importopoi that referenced this issue May 9, 2022
@ymyzk ymyzk closed this as completed Jul 3, 2022
@joaomcteixeira
Copy link
Author

Thanks for addressing this issue, and sorry for my abscense! Cheers,

Repository owner locked and limited conversation to collaborators Apr 5, 2023
@ymyzk ymyzk converted this issue into discussion #169 Apr 5, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
documentation Improvements or additions to documentation question Asks a question about tox-gh-actions
Projects
None yet
Development

No branches or pull requests

2 participants