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

add coverage for subprocesses #578

Merged
merged 8 commits into from
Oct 11, 2018
Merged

add coverage for subprocesses #578

merged 8 commits into from
Oct 11, 2018

Conversation

muryanto1
Copy link
Contributor

adding coverage for subprocesses.
This PR depends on CDAT/TestsRunner#12

@@ -1,3 +1,4 @@
{
"include": ["pcmdi_metrics", "pcmdi_metrics/pcmdi"]
"include": ["pcmdi_metrics"],
"subprocess": ["bin/mean_climate_driver.py", "bin/pcmdi_compute_climatologies.py"]
Copy link
Contributor

Choose a reason for hiding this comment

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

There's more:

computeStdDailyMeansWrapped.py
fourierDiurnalAllGridWrapped.py
compositeDiurnalStatisticsWrapped.py
std_of_hourlyvaluesWrappedInOut.py
std_of_meandiurnalcycWrappedInOut.py
savg_fourierWrappedInOut.py
fourierDiurnalGridpoints.py
std_of_dailymeansWrappedInOut.py
mpindex_compute.py
driver_monsoon_sperber.py
check_available_models.py

@doutriaux1
Copy link
Contributor

@muryanto1 in setup.py we have:
cripts = ['src/python/pcmdi/scripts/mean_climate_driver.py',
'src/python/pcmdi/scripts/pcmdi_compute_climatologies.py',
'src/python/misc/scripts/parallelize_driver.py',
'src/python/monsoon_wang/scripts/mpindex_compute.py',
'src/python/monsoon_sperber/scripts/driver_monsoon_sperber.py',
]
scripts += glob.glob("src/python/diurnal/scripts/*.py")

Maybe we can use this to write the coverage.json file?

@doutriaux1
Copy link
Contributor

That way when we add scripts to test suite they would be automatically picked up?

@coveralls
Copy link

Pull Request Test Coverage Report for Build 580

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+9.6%) to 44.898%

Totals Coverage Status
Change from base Build 560: 9.6%
Covered Lines: 1805
Relevant Lines: 3691

💛 - Coveralls

@muryanto1
Copy link
Contributor Author

I added the binaries to tests/coverage.json.
Coverage went up from 35% to 44.898%.

@doutriaux1
Copy link
Contributor

Nice! Thanks @muryanto1

@doutriaux1
Copy link
Contributor

@muryanto1 is it expected to fail?

@muryanto1
Copy link
Contributor Author

Charles, no, it is not expected to fail.
Tests passed before merged to master.
macos_pmp_py3: https://circleci.com/gh/PCMDI/pcmdi_metrics/581
linux_pmp_py3: https://circleci.com/gh/PCMDI/pcmdi_metrics/580
macos_pmp_py2: https://circleci.com/gh/PCMDI/pcmdi_metrics/579
linux_pmp_py2: https://circleci.com/gh/PCMDI/pcmdi_metrics/578

failed when merged to 'master' -- looks like flake8 related
https://circleci.com/gh/PCMDI/pcmdi_metrics/583

@doutriaux1
Copy link
Contributor

@muryanto1 I'll take a look, it doesnt seem to be in master, the PR is still opened

@doutriaux1 doutriaux1 merged commit 4b2c179 into master Oct 11, 2018
@doutriaux1 doutriaux1 deleted the add_coverage_subprocess2 branch October 11, 2018 14:32
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.

None yet

3 participants