Skip to content

Reactivate Travis-CI #86

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

Merged
merged 14 commits into from
Jul 6, 2017
Merged

Reactivate Travis-CI #86

merged 14 commits into from
Jul 6, 2017

Conversation

ocefpaf
Copy link
Member

@ocefpaf ocefpaf commented Jul 4, 2017

This is a substitute for #74

I made several small commits to make it easier to review.
It should be easier for the reviewer to navigate the commits in order.

Note that the tests are now running, but not passing.
Most of them no longer make sense b/c they are outdated and disconnected from the latest code.

We should not only write new meaningful tests, but also write them together with the new code.

Copy link
Member Author

@ocefpaf ocefpaf left a comment

Choose a reason for hiding this comment

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

I made some inline comments to help the reviewer.

@@ -1,67 +1,71 @@
git blanguage: python
Copy link
Member Author

Choose a reason for hiding this comment

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

Probably a typo that prevented Travis-CI from running all this time.

@@ -1,67 +1,71 @@
git blanguage: python
sudo: required
# if the https://travis-ci.org/ODM2/ODM2PythonAPI/requests ever says: missing config
Copy link
Member Author

Choose a reason for hiding this comment

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

We don't really need sudo and without it Travis-CI can run in a faster using the container infrastructure.

PS: I removed all the unnecessary comments.

sudo: required
# if the https://travis-ci.org/ODM2/ODM2PythonAPI/requests ever says: missing config
# validate at: http://lint.travis-ci.org/
python:
Copy link
Member Author

Choose a reason for hiding this comment

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

Changed this to a test matrix definition with only Python 2.7 and 3.6.
Python 3.6 is unsupported now but I aim to change that soon.

# - "3.5-dev" # 3.5 development branch
# - "nightly" # currently points to 3.6-dev
# command to install dependencies
cache:
Copy link
Member Author

Choose a reason for hiding this comment

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

To avoid a big PR I will add a caching mechanism in another PR as soon as this is merged.

- mysql-client
# FIXME: I don't see the need for these anywhere.
Copy link
Member Author

Choose a reason for hiding this comment

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

I don't really think we need any of these packages from the package manager.
Can someone with a more intimate knowledge of odm2api comment on this?

Copy link
Member

Choose a reason for hiding this comment

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

Which packages? If it's libproj-dev, libgeos-dev and libspatialiate-dev, I agree, they're not needed. I can't comment on cmake.

script:
- if [[ $TEST_TARGET == 'default' ]]; then
cp -r tests /tmp && cd /tmp ;
py.test -vv tests ;
Copy link
Member Author

Choose a reason for hiding this comment

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

This ensure that we are running the tests from the installed version and not the source code tree.

- py.test

- if [[ $TEST_TARGET == 'coding_standards' ]]; then
find . -type f -name "*.py" ! -name 'conf.py' | xargs flake8 --max-line-length=100 ;
Copy link
Member Author

Choose a reason for hiding this comment

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

The coding standards tests, together with the Python 3 tests, are in the allow_failures section at the moment.
I plan to send small PRs to fix that and make these tests first class citizens here.

pymssql
psycopg2
flake8
# FIXME: I am not sure these are needed.
Copy link
Member Author

Choose a reason for hiding this comment

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

This needs a careful review.
I see packages dependencies all over the place and they don't really seems to be used.
I do know that, like for the wofpy case, people expected these to be installed even when the module in question is not using them directly.

If that is the case we should create an integration test env to add and test those and the expected functionality.

Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like you have left in all of the dependencies that I usually install when running the API, so this looks good to me.

Copy link
Member

Choose a reason for hiding this comment

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

👍

Except, you have pymssql and psycopg2 listed twice

@@ -1,15 +0,0 @@
-r requirements.txt
Copy link
Member Author

Choose a reason for hiding this comment

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

Renamed to a more common name and removed the pip-ism syntax to make it package manager agnostic.

# 'console_scripts': [
# 'sample=sample:main',
# ],
# },
Copy link
Member Author

Choose a reason for hiding this comment

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

Mostly cleanups. The comments are not really helpful and get in the way of reading the code here.

@emiliom
Copy link
Member

emiliom commented Jul 5, 2017

@sreeder and @lsetiawan, can you review this PR from @ocefpaf? I suspect some areas may be outside your individual expertise, but we can work together on this with @ocefpaf's guidance. I won't be able to provide input until tomorrow (Thursday), and then @ocefpaf will be traveling starting on Friday.

Thanks!

@emiliom emiliom requested review from lsetiawan and sreeder July 5, 2017 17:07
setup.py Outdated
version=versioneer.get_version(),

description='A Python-based application programmers interface for the Observations Data converter 2 (ODM2) ',
description='Python interface for the Observations Data converter 2 (ODM2)',
Copy link
Member

Choose a reason for hiding this comment

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

Isn't ODM2 stands for Observations Data Model 2?

Copy link
Member Author

Choose a reason for hiding this comment

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

I only reduced the description that was already there, but I guess that we should also fix it to Model, right @emiliom?

setup.py Outdated
'Programming Language :: Python :: 2.7',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Scientific/Engineering'
],

# What does your project relate to?
keywords='Observations Data converter ODM2',
Copy link
Member

Choose a reason for hiding this comment

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

Again, Observations Data Model 2 instead?

Copy link
Member

@lsetiawan lsetiawan left a comment

Choose a reason for hiding this comment

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

I think that @ocefpaf changes looks good and heading in the right direction. I don't know enough about the package dependencies for odm2api to comment what are needed. Otherwise, I approve. Though some questions about Observations Data Model 2 instead of Observations Data Converter 2?

Copy link
Contributor

@sreeder sreeder left a comment

Choose a reason for hiding this comment

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

This looks good! Thanks for taking the time to clean this up!

@emiliom
Copy link
Member

emiliom commented Jul 6, 2017

Everything looks good to me, except for the duplicated listing of pymssql and psycopg2 in requirements-dev.txt

@ocefpaf
Copy link
Member Author

ocefpaf commented Jul 6, 2017

Everything looks good to me, except for the duplicated listing of pymssql and psycopg2 in requirements-dev.txt

Probably leftovers from a bad rebase. Latest commit should fix it.

@emiliom emiliom merged commit 6c4a4f5 into ODM2:master Jul 6, 2017
@ocefpaf ocefpaf deleted the reactivate_travis branch July 6, 2017 14:05
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.

4 participants