Skip to content

Commit

Permalink
Merge pull request #88 from MassimoCimmino/issue86_fixDocumentation
Browse files Browse the repository at this point in the history
Issue86 fix documentation
  • Loading branch information
MassimoCimmino authored Apr 14, 2021
2 parents d48f310 + 3f41599 commit 09e251e
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 9 deletions.
20 changes: 20 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: doc/source/conf.py

# Optionally build your docs in additional formats such as PDF
formats:
- pdf

# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.7
install:
- requirements: doc/requirements.txt
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
* [Issue 47](https://github.com/MassimoCimmino/pygfunction/issues/47) - Added verification of the validity of pipe geometry to pipe classes. Extended visualization of the borehole cross-section.
* [Issue 66](https://github.com/MassimoCimmino/pygfunction/issues/66) - Added a class method to the Claesson & Javed load aggregation method to retrieve the thermal response factor increment.

### Bug fixes

* [Issue 86](https://github.com/MassimoCimmino/pygfunction/issues/86) - Documentation is now built using Python 3 to support Python 3 features in the code.

### Enhancements

* [Issue 59](https://github.com/MassimoCimmino/pygfunction/issues/59) - Use a relative tolerance instead of an absolute tolerance in the identification of borehole pair similarities. This provides faster execution times and similar accuracy.
Expand Down
6 changes: 5 additions & 1 deletion doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
numpydoc
numpydoc
numpy
scipy
matplotlib
CoolProp
9 changes: 2 additions & 7 deletions pygfunction/boreholes.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,7 @@ def find_duplicates(boreField, disp=False):
if abs(dist - borehole_1.r_b) < borehole_1.r_b:
duplicate_pairs.append((i, j))
if disp:
# pad with '-' align in center
output = f"{ '*gt.boreholes.find_duplicates()*' :-^50}"
# keep a space between the function name
print(output.replace('*', ' '))
print(' gt.boreholes.find_duplicates() '.center(50, '-'))
print('The duplicate pairs of boreholes found: {}'\
.format(duplicate_pairs))
return duplicate_pairs
Expand Down Expand Up @@ -182,9 +179,7 @@ def remove_duplicates(boreField, disp=False):
else:
new_boreField.append(boreField[i])
if disp:
# pad with '-' align in center
print(f"{'*gt.boreholes.remove_duplicates()*' :-^50}".\
replace('*', ' ')) # keep a space between the function name
print(' gt.boreholes.find_duplicates() '.center(50, '-'))
n_duplicates = len(boreField) - len(new_boreField)
print('The number of duplicates removed: {}'.format(n_duplicates))

Expand Down
2 changes: 1 addition & 1 deletion pygfunction/media.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class Fluid:
>>> print(fluid)
"""
def __init__(self, mixer: str, percent: float,
T: float = 20., P: float = 101325.,):
T: float = 20., P: float = 101325.):
if mixer == 'Water':
self.fluid_mix = mixer
elif mixer in ['MEG', 'MPG', 'MMA', 'MEA']: # Expected brines
Expand Down

0 comments on commit 09e251e

Please sign in to comment.