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

Issue86 fix documentation #88

Merged
merged 5 commits into from
Apr 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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