-
Notifications
You must be signed in to change notification settings - Fork 34
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
ENH: Add Activity for Travis CI #107
Conversation
rever/activities/travis_ci.xsh
Outdated
- conda update conda | ||
|
||
# Install dependencies | ||
- conda install {conda_deps} -c (conda_channels) |
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.
Maybe also add a {conda_extra}
so that users can add extra stuff to their conda install.
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.
What would be the environmental variable that determines that? Since the $DOCKER_CONDA_DEPS is an array wouldn't the user already add whatever they wanted to install into here?
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.
Yeah, so I am suggesting something a little more sophisticated. Basically we could add new global env vars CONDA_DEPS
, APT_DEPS
, PIP_DEPS
, etc. and then if DOCKER_*_DEPS
or the TRAVIS_*_DEPS
are not found, they fall back to the value set in the global env vars.
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 could make an env var if you wanted. It might be better to separate those since you might be interested in the deps for something else.
rever/activities/travis_ci.xsh
Outdated
""" | ||
|
||
class TravisCI(Activity): | ||
"""Manages keeping a changelog up-to-date. |
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.
Need to change docs over to TravisCI
.
rever/activities/travis_ci.xsh
Outdated
|
||
# script: | ||
# - set -e | ||
# - # Command to build your docs |
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.
Pull test command from the Nose
or Pytest
activities.
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.
Or none at all
rever/activities/travis_ci.xsh
Outdated
# script: | ||
# - set -e | ||
# - # Command to build your docs | ||
# - pip install doctr |
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.
We may want to remove doctr from this for now, although it would be nice to have a doctr setup activity which we could depend on.
|
||
matrix: | ||
include: | ||
- python: 3.6 |
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.
@scopatz any suggestions on how to handle the different python versions?
rever/activities/travis_ci.xsh
Outdated
super().__init__(name='changelog', deps=deps, | ||
desc="Manages keeping a changelog up-to-date.", | ||
setup=self.setup_func) | ||
self._re_cache = {} |
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 think we can remove this.
rever/activities/travis_ci.xsh
Outdated
|
||
def __init__(self, *, deps=frozenset()): | ||
super().__init__(name='changelog', deps=deps, | ||
desc="Manages keeping a changelog up-to-date.", |
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.
Please update the description
rever/activities/travis_ci.xsh
Outdated
|
||
|
||
def setup_func(self): | ||
"""Initializes the changelog activity by starting a news dir, making |
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.
Please update docs
rever/activities/travis_ci.xsh
Outdated
pip_deps=$DOCKER_PIP_DEPS, | ||
conda_channels=$DOCKER_CONDA_CHANNELS) | ||
f.write(s) | ||
return True |
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.
Please add newline
Thanks for putting this in @Sasaank! |
rever/activities/travis_ci.xsh
Outdated
@@ -0,0 +1,99 @@ | |||
"""Activity for keeping a changelog from news entries.""" |
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.
Docstring should be updated.
notifications: | ||
email: false | ||
|
||
""" |
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 don't think that this is anywhere near general enough. There is nothing in rever that states the project has to be python oriented. I suggest taking a look at how the Docker containers are built. Basically the user provides depenendcy lists (for different potential package managers) and an install command / script. For CI, we'd want a test line/script as well. You may also want a flag for enabling doctr, since that seems to be here too.
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, that's fair (I was the one doing the copy-paste from rever's travis).
rever/activities/travis_ci.xsh
Outdated
in the current environment. | ||
:$CHANGELOG_TEMPLATE: str, filename of the template file in the | ||
news directory. The default is ``'TEMPLATE'``. | ||
""" |
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.
docs need to be updated
First pass at Travis more to come.
Closes #106