diff --git a/.github/ISSUE_TEMPLATE/test_coverage.md b/.github/ISSUE_TEMPLATE/test_coverage.md new file mode 100644 index 00000000..6627f0a1 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/test_coverage.md @@ -0,0 +1,21 @@ +--- + +name: Test Coverage +about: A test is missing +title: "" +labels: "testing, medium" + +--- + +- [ ] I have reviewed the test coverage on [Codecov](https://codecov.io/gh/AguaClara/aguaclara) + +--- + +## Describe the Missing Coverage +*What code isn't currently tested but definitely should be? Is a new `test_<>.py` file needed or can these tests be added to an existing one?* + +## Expected Behavior +*A clear and concise description of what you expected to happen (or code).* + +## Recommended Fix +*What is the most straightforward way to fully and appropriately test the feature.* diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..0cd4e3e5 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +**Pull request recommendations:** +- [ ] Name your pull request _your-development-type/short-description_. Ex: _feature/validate_floc_ +- [ ] Link to any relevant issue in the PR description. Ex: _Resolves [gh-12], adds flocculator validation_ +- [ ] Provide context of changes. +- [ ] Provide relevant tests for your feature or bug fix. +- [ ] Provide or update documentation for any feature added by your pull request. + +Thanks for contributing! diff --git a/aguaclara/__init__.py b/aguaclara/__init__.py index d01eaac7..e7013279 100644 --- a/aguaclara/__init__.py +++ b/aguaclara/__init__.py @@ -1,27 +1,28 @@ -from aguaclara.core.constants import * -from aguaclara.core.drills import * -from aguaclara.core.head_loss import * -from aguaclara.core.materials import * -from aguaclara.core.physchem import * -from aguaclara.core.pipes import * -from aguaclara.core.units import * -from aguaclara.core.utility import * - -from aguaclara.design.cdc import CDC -from aguaclara.design.component import Component -from aguaclara.design.ent_floc import EntTankFloc -from aguaclara.design.ent import EntranceTank -from aguaclara.design.filter import Filter -from aguaclara.design.floc import Flocculator -import aguaclara.design.human_access as ha -from aguaclara.design.lfom import LFOM -from aguaclara.design.plant import Plant -from aguaclara.design.sed_chan import SedimentationChannel -from aguaclara.design.sed_tank import SedimentationTank -from aguaclara.design.sed import Sedimentor - -from aguaclara.research.environmental_processes_analysis import * -from aguaclara.research.floc_model import * -from aguaclara.research.procoda_parser import * -from aguaclara.research.peristaltic_pump import * -from aguaclara.research.stock_qc import * +from aguaclara.core.constants import * +from aguaclara.core.drills import * +from aguaclara.core.head_loss import * +from aguaclara.core.materials import * +from aguaclara.core.physchem import * +from aguaclara.core.pipes import * +from aguaclara.core.units import * +from aguaclara.core.utility import * +from aguaclara.core.onshape_parser import * + +from aguaclara.design.cdc import CDC +from aguaclara.design.component import Component +from aguaclara.design.ent_floc import EntTankFloc +from aguaclara.design.ent import EntranceTank +from aguaclara.design.filter import Filter +from aguaclara.design.floc import Flocculator +import aguaclara.design.human_access as ha +from aguaclara.design.lfom import LFOM +from aguaclara.design.plant import Plant +from aguaclara.design.sed_chan import SedimentationChannel +from aguaclara.design.sed_tank import SedimentationTank +from aguaclara.design.sed import Sedimentor + +from aguaclara.research.environmental_processes_analysis import * +from aguaclara.research.floc_model import * +from aguaclara.research.procoda_parser import * +from aguaclara.research.peristaltic_pump import * +from aguaclara.research.stock_qc import * diff --git a/aguaclara/core/onshape_parser.py b/aguaclara/core/onshape_parser.py index 359f3146..a07db2d8 100644 --- a/aguaclara/core/onshape_parser.py +++ b/aguaclara/core/onshape_parser.py @@ -122,7 +122,7 @@ def copy_to_docs(file_path, new_name=None, base="doc_files"): try: copyfile(os.path.join(basepath, file_path), new_path) except IOError as io_err: - os.makedirs(os.path.dirname(file_path)) + os.makedirs(os.path.dirname(new_path)) copyfile(os.path.join(basepath, file_path), new_path) def parse_variables_from_list(unparsed, for_docs=True): diff --git a/aguaclara/play.py b/aguaclara/play.py index 9aba232f..59cd45a0 100644 --- a/aguaclara/play.py +++ b/aguaclara/play.py @@ -1,60 +1,61 @@ -"""``aguaclara`` package playground setup - -Provide easy setup for using the ``aguaclara`` package and all of its modules, -classes, and functions. - -Note: this module should not be used for development. Instead, individually -import only necessary modules. - -Example: - >>> from aguaclara.play import * -""" -import math -import numpy as np -import pandas as pd -import matplotlib -import matplotlib.style -import matplotlib.pyplot as plt - -import aguaclara.core.constants as con -from aguaclara.core import drills -import aguaclara.core.head_loss as k -import aguaclara.core.materials as mat -from aguaclara.core import physchem as pc -import aguaclara.core.pipes as pipe -from aguaclara.core.units import u -import aguaclara.core.utility as ut - -from aguaclara.design.cdc import CDC -from aguaclara.design.component import Component -from aguaclara.design.ent_floc import EntTankFloc -from aguaclara.design.ent import EntranceTank -from aguaclara.design.filter import Filter -from aguaclara.design.floc import Flocculator -import aguaclara.design.human_access as ha -from aguaclara.design.lfom import LFOM -from aguaclara.design.plant import Plant -from aguaclara.design.sed_chan import SedimentationChannel -from aguaclara.design.sed_tank import SedimentationTank -from aguaclara.design.sed import Sedimentor - -import aguaclara.research.environmental_processes_analysis as epa -import aguaclara.research.floc_model as fm -import aguaclara.research.procoda_parser as procoda_parser -import aguaclara.research.peristaltic_pump as peristaltic_pump -import aguaclara.research.stock_qc as stock_qc - -import aguaclara as ac - -def set_sig_figs(n=4): - """Set the number of significant figures used to print Pint, Pandas, and - NumPy quantities. - - Args: - n (int): Number of significant figures to display. - """ - u.default_format = '.' + str(n) + 'g' - pd.options.display.float_format = ('{:,.' + str(n) + '}').format - -set_sig_figs() -matplotlib.style.use('ggplot') +"""``aguaclara`` package playground setup + +Provide easy setup for using the ``aguaclara`` package and all of its modules, +classes, and functions. + +Note: this module should not be used for development. Instead, individually +import only necessary modules. + +Example: + >>> from aguaclara.play import * +""" +import math +import numpy as np +import pandas as pd +import matplotlib +import matplotlib.style +import matplotlib.pyplot as plt + +import aguaclara.core.constants as con +from aguaclara.core import drills +import aguaclara.core.head_loss as k +import aguaclara.core.materials as mat +from aguaclara.core import physchem as pc +import aguaclara.core.pipes as pipe +from aguaclara.core.units import u +import aguaclara.core.utility as ut +import aguaclara.core.onshape_parser as par + +from aguaclara.design.cdc import CDC +from aguaclara.design.component import Component +from aguaclara.design.ent_floc import EntTankFloc +from aguaclara.design.ent import EntranceTank +from aguaclara.design.filter import Filter +from aguaclara.design.floc import Flocculator +import aguaclara.design.human_access as ha +from aguaclara.design.lfom import LFOM +from aguaclara.design.plant import Plant +from aguaclara.design.sed_chan import SedimentationChannel +from aguaclara.design.sed_tank import SedimentationTank +from aguaclara.design.sed import Sedimentor + +import aguaclara.research.environmental_processes_analysis as epa +import aguaclara.research.floc_model as fm +import aguaclara.research.procoda_parser as procoda_parser +import aguaclara.research.peristaltic_pump as peristaltic_pump +import aguaclara.research.stock_qc as stock_qc + +import aguaclara as ac + +def set_sig_figs(n=4): + """Set the number of significant figures used to print Pint, Pandas, and + NumPy quantities. + + Args: + n (int): Number of significant figures to display. + """ + u.default_format = '.' + str(n) + 'g' + pd.options.display.float_format = ('{:,.' + str(n) + '}').format + +set_sig_figs() +matplotlib.style.use('ggplot') diff --git a/setup.py b/setup.py index 6ea5d3ad..89325379 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name = 'aguaclara', - version = '0.2.8', + version = '0.2.9', description = ( 'An open-source Python package for designing and performing research ' 'on AguaClara water treatment plants.'