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

Make developer dependencies optional #42

Open
banksJeremy opened this issue Apr 30, 2014 · 5 comments
Open

Make developer dependencies optional #42

banksJeremy opened this issue Apr 30, 2014 · 5 comments

Comments

@banksJeremy
Copy link
Collaborator

As discussed in chat here, pytest eventually shouldn't be a strict dependency for this project. It should still be defined in setup.py, but as optional, either as an extra or through some other mechanism.

banksJeremy pushed a commit to jeremyBanks/stack.chat that referenced this issue Apr 30, 2014
…th#42.

Updates Makefile so that dev dependencies are not installed when running
the example, but are installed when running the tests.

This leaves us without any automatic testing ensuring that the standard
dependencies are correct, but under manual testing (of the example) this
setup is working as intended.
@banksJeremy
Copy link
Collaborator Author

It doesn't look like there's any specific way of indicating dev dependencies as with Node, so a [dev] extra as implemented in fc8d339 seems like the appropriate approach.

It might be nice if we could have a second, distinct, Travis test build, which tries installing the non-dev dependencies and running a simple example script, but I worry that that's a slippery slope to lots of disorganized testing so I probably won't pursue it.

@banksJeremy
Copy link
Collaborator Author

(Although if we did want to go down that road, I think it might just take something like this (docs):)

matrix:
  include:
    - install: 'pip install .'
    - script: 'python examples/something.py'
  include:
    - install: 'pip install .[dev]'
    - script: 'python -m pytest'

@banksJeremy
Copy link
Collaborator Author

The build of fc8d339 failed on Travis. I am guessing there might be an issue with using extras with a non-editable installation of a local path:

(from .travis.yml, doesn't work, it thinks I want a packaged name ".[dev]")
pip install .[dev]

as opposed to calling

(works locally, as make install-dev-dependencies)
pip install -e .[dev]

or

(well-documented usage)
pip install ChatExchange[dev]

@banksJeremy
Copy link
Collaborator Author

I've filed a ticket about this behaviour at pypa/pip#1780, which should clear up whether this is a bug or expected.

@banksJeremy banksJeremy self-assigned this Apr 30, 2014
@banksJeremy banksJeremy removed their assignment May 6, 2014
@tripleee
Copy link
Contributor

Is this still relevant? I don't understand the distinction between "extra" and "optional" here. It should be easy to build a Github Action which tests without the dev dependencies (other than pytest, but how would you avoid importing that?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants