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

[EXP] Enable CI #45

Merged
merged 11 commits into from
Mar 30, 2018
Merged

[EXP] Enable CI #45

merged 11 commits into from
Mar 30, 2018

Conversation

pllim
Copy link
Contributor

@pllim pllim commented Feb 28, 2018

For better or worse...
Fix #42
Fix #44

  • Use Jenkins with proper IRAF installation?

  • Make sure they are not skipped. Need Joe's Docker magic.

  • Add tests from Ole

  • Move "embedded" tests in lib/pyraf/*.py modules to tests properly? After talking to Chris S., need to keep duplicate of these and deleted modules in a new dir lib/pyraf/old_files so he can run them his way.

  • Port over from pandokia (strike-through means those tests are now redundant and thus not ported over):

    • pyraf/cli/division/test
    • pyraf/cli/sscanf/test
    • pyraf/cli/whereis/test
    • pyraf/cli/which/test
    • pyraf/core/graphics_checks/checks
    • pyraf/core/graphics_checks/checks.test_dumpspecs
    • pyraf/core/irafparlist/test
    • pyraf/core/subproc/test
    • pyraf/gki_misc/decode/test
    • pyraf/gki_misc/psikern/test
    • pyraf/gki_misc/sys/test
    • pyraf/invoke_redo/invoke
    • pyraf/invoke_redo/invoke.test_cl_redir
    • pyraf/invoke_redo/invoke.test_dashcommand
    • pyraf/invoke_redo/invoke.test_dashcommand_simple
    • pyraf/invoke_redo/invoke.test_dashi
    • pyraf/invoke_redo/invoke.test_dashy
    • pyraf/invoke_redo/invoke.test_get_status_and_output_of
    • pyraf/invoke_redo/invoke.test_has_latest_testcode
    • pyraf/invoke_redo/invoke.test_nows_get_status_and_output_of
    • pyraf/invoke_redo/invoke.test_usage
    • pyraf/using_tasks/207/test207
    • pyraf/using_tasks/207/test207.test
    • pyraf/using_tasks/pset_as_func_arg/arg2msstat
    • pyraf/using_tasks/pset_as_func_arg/arg2msstat.test
    • pyraf/using_tasks/pset_as_retval/msstat2egstp
    • pyraf/using_tasks/pset_as_retval/msstat2egstp.test

Follow up after merging this:

  • Open issue about addressing bugs found in some xfail ported tests (grep for "BUG" and "TODO"). See TST: Revisit skipped and xfailed tests #48
  • Disable pandokia tests for pyraf.
  • Setup Jenkins nightly cron. We can skip cron if there has been a run on master in the past 24 hours (e.g., from push or merge commit). (To be continued in TST: Jenkins nightly cron #47)

@pllim pllim changed the title [EXP] Enable Travis CI [EXP] Enable CI Feb 28, 2018
Jenkinsfile Outdated
PIP_INST = "pip install"
CONDA_INST = "conda install -y -q"
PY_SETUP = "python setup.py"
PYTEST_ARGS = "--basetemp=tests_output --junitxml results.xml"
Copy link
Collaborator

Choose a reason for hiding this comment

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

How do you feel about adding --capture=sys or --capture=fd to PYTEST_ARGS? I'm noticing that IRAF tasks are inconsistently verbose, and PyRAF doesn't always redirect stdout and stderr streams correctly when instructed to.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jhunkeler , wait a minute. Now I remember that I already have addopts = --capture=no in setup.cfg. Is that not sufficient? Won't Jenkins be smart enough to pick up pytest options from there?

@@ -4,8 +4,11 @@
from astropy.utils.data import get_pkg_data_contents

IS_PY2 = sys.version_info < (3, 0)
DATA_DIR = os.path.join(os.path.dirname(__file__), 'data')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why is this necessary? Can't you just use get_pkg_data_filename from astropy.utils.data? See L4.


@pytest.mark.skipif(not HAS_IRAF, reason='Need IRAF to run')
def test_subproc():
pass
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note: This is just a placeholder right now. I didn't get around to it yet.

pllim and others added 11 commits March 29, 2018 17:10
Cannot add conda channel on Travis
Run real tests on Jenkins [skip travis]
Add graphics test. Need six now. Move gen stuff to utils. [skip travis]
Clean up matrix

Fix invalid redirection
…now. Attempt to fix failures.

Add badge. Fix which test.

Fix manifest
Add pset_msstat data

Initial commit of test_pset_msstat.py

Define common data directory

Cleanup

Move tests up to top-level

Include tests in sdist

Fix permissions

Add module comment

Initial commit of test_core_nongraphics.py

Initial commit of core_irafparlist_output.ref

Initial commit of conftest.py

Fix line endings

Remove PYRAF_ environment variables

Check for login.cl

Port remainder of msstat2egstp.py into test_pset_msstat.py

Initial commit of test_dqbits.py (originally test_207.py)

Let pytest do its thing

Rename test_pset_msstat.py -> test_using_tasks.py; Consolidate test_dqbits.py into it

Redirect streams

Cleanup and consolidation

PEP8 changes

Initial commit of test_invocation.py

Add HAS_PYRAF_EXEC, remove SCRIPTS_DIR, silence iraf.imhead

Ignore generated cmd_* files.

Fix invalid import of StringIO

Add python3 compat, even though adding it makes no sense given the context here.

Test in develop mode

ipython is a dependency

Remove global print statement

install_requires here or there, not but both places

Require ipython, because it is a command-line option

Import spacing

Test various invocations

Add missing skipif(s)

Import spacing

Pyraf develop mode is broken. Just install.

Re-order assertion

Due to hybrid testing style, we still need local extensions

Normalize test name

Consolidate cases, fix subprocess stdin usage, redirect stderr correctly

Add no command wrapper tests

Inherit from object

Strip subprocess test

Add subproc tests

Partial irafparlist implementation

Finish irafparlist implementation

Add skipif decorators

Delete reference file

Add some gki system tests

Remove gki system tests

Add gki psikern suite, and mark as xfail

Update Jenkinsfile
Move old tests to old_files. Find and port hidden tests in modules.
@pllim
Copy link
Contributor Author

pllim commented Mar 30, 2018

Hey, hey, it's green. Merging.

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

Successfully merging this pull request may close these issues.

None yet

3 participants