Skip to content

Conversation

@jsiirola
Copy link
Member

@jsiirola jsiirola commented Feb 1, 2019

Fixes #46.

Summary/Motivation:

This updates the Jenkins builds to use the same coverage approach/configuration as is used by Travis and Appveyor. Separately, the Jenkins builds have been updated to push coverage results to Codecov.

Note that implementing this requires a patched version of codecov, see codecov/codecov-python#187.

Changes proposed in this PR:

  • Update Jenkins driver touse the .coveragerc file to configure coverage
  • Update the Jenkins driver to enable collecting coverage statistics for subprocesses
  • Update the Appveyor driver to get coverage for the pyomo downloaders
  • Clean up the Appveyor driver to reduce the number of calls to "conda install"

Legal Acknowledgement

By contributing to this software project, I agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the BSD license.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

- Collecting all conda-forge packages into a single "conda install" call
- Moving the coverage setup so that teh downloaders will be covered
This brings the Jenkins driver in line with the Travis and Appveyor
drivers:
 - coverage is configured through the .coveragerc file
 - we set up coverage to capture code run by subprocesses
@codecov-io
Copy link

codecov-io commented Feb 1, 2019

Codecov Report

Merging #842 into master will decrease coverage by 0.55%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #842      +/-   ##
==========================================
- Coverage   66.92%   66.37%   -0.56%     
==========================================
  Files         422      461      +39     
  Lines       67457    71638    +4181     
==========================================
+ Hits        45148    47547    +2399     
- Misses      22309    24091    +1782
Impacted Files Coverage Δ
pyomo/network/foqus_graph.py 90.37% <0%> (-0.24%) ⬇️
pyomo/contrib/pynumero/examples/feasibility.py 0% <0%> (ø)
pyomo/pysp/scenariotree/server_pyro_utils.py 0% <0%> (ø)
...t/examples/semibatch/semibatch_parmest_parallel.py 0% <0%> (ø)
pyomo/solvers/plugins/testdriver/model.py 0% <0%> (ø)
pyomo/contrib/pynumero/examples/sensitivity.py 0% <0%> (ø)
pyomo/pysp/plugins/interscenario.py 0% <0%> (ø)
pyomo/util/diagnostics.py 0% <0%> (ø)
.../examples/reactor_design/reactor_design_parmest.py 0% <0%> (ø)
pyomo/contrib/pynumero/examples/derivatives_gas.py 0% <0%> (ø)
... and 84 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fa06a92...547e38b. Read the comment docs.

@jsiirola jsiirola changed the title [WIP] Enable publication of coverage results from Jenkins Enable publication of coverage results from Jenkins Feb 1, 2019
@jsiirola
Copy link
Member Author

jsiirola commented Feb 1, 2019

This is ready to review. The apparent drop in coverage is because codecov found several new files (totaling 4400 lines) that previously had been completely skipped. hat increased outweighed the additional 2500 lines of code that were exercised.

Copy link
Member

@blnicho blnicho 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 this looks pretty good but you left in quite a few commented lines of code which I think should either be removed or explained for future reference.

os.sep.join([os.environ['WORKSPACE'], 'src', 'pyutilib.*']),
'pyutilib.*',
])
#coverage_omit=','.join([
Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason you left these commented lines in?

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 mostly left them in as breadcrumbs for "future me" / @whart222, when we are going through and trying to remember how things "used to work", especially if we find that this change breaks other Jenkins builds (apart from the ones supporting PR/master testing). I added a comment to this effect.

Copy link
Member

@blnicho blnicho 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 this looks fine.

@jsiirola jsiirola merged commit 62d4c24 into Pyomo:master Feb 2, 2019
@jsiirola jsiirola deleted the jenkins-coverage branch February 2, 2019 04:39
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