Closed annabel48lin closed 3 years ago
Merging #289 (aba5ece) into master (43dbd56) will increase coverage by
0.20%
. The diff coverage is97.59%
.
@@ Coverage Diff @@
## master #289 +/- ##
==========================================
+ Coverage 89.35% 89.56% +0.20%
==========================================
Files 29 29
Lines 2997 3047 +50
==========================================
+ Hits 2678 2729 +51
+ Misses 319 318 -1
Impacted Files | Coverage Δ | |
---|---|---|
aguaclara/core/pipes.py | 98.48% <97.53%> (+2.14%) |
:arrow_up: |
aguaclara/design/floc.py | 90.24% <100.00%> (ø) |
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 43dbd56...aba5ece. Read the comment docs.
See Issue #279
Created static methods to convert ID and SDR to the minimum available OD
OD_SDR
: Return the minimum OD that is available given ID and SDR.makePipe_minID_SDR(minID, SDR)
: Return a new pipe, given its minID (minimum inner diameter) and SDR (standard diameter ratio).makePipe_ND_SDR(ND, SDR)
: Return a Pipe object, given a ND (nominal diameter) and SDR (standard diameter ratio). Same thing as directly creating a Pipe object, mainly for consistency withmakePipe_minID_SDR
.Standardized method and method parameter names.
Wrote/added to documentations for methods and classes as needed.
Used conditional indexing to make
all_available
methods more efficient.SCH_all_available
can probably be made more efficient, if a future member would like to look at it.Asked Monroe if any other methods can be added to be more convenient to users:
pipe_database.csv
to include SCH80, SCH120, SCH120.class SCH(Enum)
Pipe.id_sch
, which takes in apipes.SCH
and returns the inner diameter of the pipe based on the pipe's ND and the schedule passed in.Pipe.id_sch40
Pipe.sch(self, NDarr, SCHarr)
: returns a nominal diameter and schedule that best fits the requirements of the pipe (i.e. has at least minID and has at most maxSDR), and whose ND and/or SCH are in NDarr and SCHarr respectively if provided.SCH_all_available(minID, maxSDR, NDar, SCHarr)
: Return a list of tuples (nominal diameter, schedule) representing schedule pipes that fit the requirements (i.e. has at least minID and has at most maxSDR, and whose ND and/or SCH are in NDarr and SCHarr respectively if provided).