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

ENH: Add Activity for Travis CI #107

Closed
wants to merge 2 commits into from
Closed

Conversation

Sasaank
Copy link

@Sasaank Sasaank commented Jan 8, 2018

First pass at Travis more to come.
Closes #106

- conda update conda

# Install dependencies
- conda install {conda_deps} -c (conda_channels)
Copy link
Member

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.

Copy link
Author

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?

Copy link
Collaborator

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.

Copy link
Member

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.

"""

class TravisCI(Activity):
"""Manages keeping a changelog up-to-date.
Copy link
Member

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.


# script:
# - set -e
# - # Command to build your docs
Copy link
Member

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or none at all

# script:
# - set -e
# - # Command to build your docs
# - pip install doctr
Copy link
Member

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
Copy link
Member

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?

super().__init__(name='changelog', deps=deps,
desc="Manages keeping a changelog up-to-date.",
setup=self.setup_func)
self._re_cache = {}
Copy link
Member

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.


def __init__(self, *, deps=frozenset()):
super().__init__(name='changelog', deps=deps,
desc="Manages keeping a changelog up-to-date.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the description



def setup_func(self):
"""Initializes the changelog activity by starting a news dir, making
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update docs

pip_deps=$DOCKER_PIP_DEPS,
conda_channels=$DOCKER_CONDA_CHANNELS)
f.write(s)
return True
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add newline

@scopatz
Copy link
Collaborator

scopatz commented Jan 10, 2018

Thanks for putting this in @Sasaank!

@@ -0,0 +1,99 @@
"""Activity for keeping a changelog from news entries."""
Copy link
Collaborator

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

"""
Copy link
Collaborator

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.

Copy link
Member

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).

in the current environment.
:$CHANGELOG_TEMPLATE: str, filename of the template file in the
news directory. The default is ``'TEMPLATE'``.
"""
Copy link
Collaborator

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

@scopatz scopatz closed this Jan 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants