Skip to content

Commit

Permalink
Issue5 setup (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
MassimoCimmino authored Dec 1, 2017
1 parent f2fac5f commit 9d6572c
Show file tree
Hide file tree
Showing 38 changed files with 94 additions and 121 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ language: python

python:
- "2.7"
- "3.6"

notifications:
email: false
Expand All @@ -13,4 +14,4 @@ install:
- pip install -r requirements.txt

script:
python -m unittest discover tests
python -m unittest discover -s tests -p "*_test.py"
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* [Issue 16](https://github.com/MassimoCimmino/pygfunction/issues/16) - Added capability to import bore field from external text files.
* [Issue 18](https://github.com/MassimoCimmino/pygfunction/issues/18) - Added capability to visualize bore fields.
* [Issue 20](https://github.com/MassimoCimmino/pygfunction/issues/20) - Added utilities module.
* [Issue 5](https://github.com/MassimoCimmino/pygfunction/issues/5) - Added setup.py installation script using setuptools. *pygfunction* will now be available on [pypi](https://pypi.python.org/pypi/pygfunction).

### Bug fixes

Expand Down
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include LICENSE.md
include README.md
recursive-include pygfunction/examples/data *.txt
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ fluid temperatures in the boreholes for several U-tube pipe configurations.

## Requirements

*pygfunction* was developed and tested using Python 2.7. In addition, the
*pygfunction* was developed and tested using Python 2.7 and supports Python 3.6. In addition, the
following packages are needed to run *pygfunction* and its examples:
- matplotlib (>= 1.5.3), required for the examples
- numpy (>= 1.11.3)
Expand All @@ -51,7 +51,17 @@ following packages are needed to build the documentation:

## Quick start

**Users** - [Download the latest release](https://github.com/MassimoCimmino/pygfunction/releases).
**Users** - [Download pip](https://pip.pypa.io/en/latest/) and install the latest release:

```
pip install pygfunction
```

Alternatively, [download the latest release](https://github.com/MassimoCimmino/pygfunction/releases) and run the installation script:

```
python setup.py install
```

**Developers** - To get the latest version of the code, you can [download the
repository from github](https://github.com/MassimoCimmino/pygfunction) or clone
Expand Down
4 changes: 2 additions & 2 deletions doc/source/example_comparison_load_aggregation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ The following script validates the load aggregation schemes with the exact
solution obtained from convolution in the Fourier domain (see ref. [4]_).

The script is located in:
`./examples/comparison_load_aggregation.py`
`pygfunction/examples/comparison_load_aggregation.py`

.. literalinclude:: ../../examples/comparison_load_aggregation.py
.. literalinclude:: ../../pygfunction/examples/comparison_load_aggregation.py
:language: python
:linenos:

Expand Down
4 changes: 2 additions & 2 deletions doc/source/example_custom_bore_field.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ The following script generates a bore field with 5 boreholes. The field is
then plotted on a figure.

The script is located in:
`./examples/custom_bore_field.py`
`pygfunction/examples/custom_bore_field.py`

.. literalinclude:: ../../examples/custom_bore_field.py
.. literalinclude:: ../../pygfunction/examples/custom_bore_field.py
:language: python
:linenos:
4 changes: 2 additions & 2 deletions doc/source/example_custom_bore_field_from_file.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ The following script generates a bore field with 32 boreholes. The field is
then plotted on a figure.

The script is located in:
`./examples/custom_bore_field_from_file.py`
`./pygfunction/examples/custom_bore_field_from_file.py`

.. literalinclude:: ../../examples/custom_bore_field_from_file.py
.. literalinclude:: ../../pygfunction/examples/custom_bore_field_from_file.py
:language: python
:linenos:
4 changes: 2 additions & 2 deletions doc/source/example_equal_inlet_temperature.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ conditions of uniform heat extraction rate and of uniform borehole wall
temperature.

The script is located in:
`./examples/equal_inlet_temperature.py`
`pygfunction/examples/equal_inlet_temperature.py`

.. literalinclude:: ../../examples/equal_inlet_temperature.py
.. literalinclude:: ../../pygfunction/examples/equal_inlet_temperature.py
:language: python
:linenos:

Expand Down
4 changes: 2 additions & 2 deletions doc/source/example_fluid_temperature.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ compared: (1) a single U-tube, using the model of Eskilson and Claesson
a double U-tube in series, using the model of Cimmino [4]_.

The script is located in:
`./examples/fluid_temperature.py`
`pygfunction/examples/fluid_temperature.py`

.. literalinclude:: ../../examples/fluid_temperature.py
.. literalinclude:: ../../pygfunction/examples/fluid_temperature.py
:language: python
:linenos:

Expand Down
4 changes: 2 additions & 2 deletions doc/source/example_load_aggregation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ The following script validates the load aggregation scheme with the exact
solution obtained from convolution in the Fourier domain (see ref. [3]_).

The script is located in:
`./examples/load_aggregation.py`
`pygfunction/examples/load_aggregation.py`

.. literalinclude:: ../../examples/load_aggregation.py
.. literalinclude:: ../../pygfunction/examples/load_aggregation.py
:language: python
:linenos:

Expand Down
4 changes: 2 additions & 2 deletions doc/source/example_multiple_independent_Utubes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ fluid mass flow rates. The resulting fluid temperature profiles are verified
against the fluid temeprature profiles presented by Cimmino [1]_.

The script is located in:
`./examples/multiple_independent_Utubes.py`
`pygfunction/examples/multiple_independent_Utubes.py`

.. literalinclude:: ../../examples/multiple_independent_Utubes.py
.. literalinclude:: ../../pygfunction/examples/multiple_independent_Utubes.py
:language: python
:linenos:

Expand Down
4 changes: 2 additions & 2 deletions doc/source/example_multipole_temperature.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ borehole with 2 pipes are then calculated. Results are verified against the
results of Claesson and Hellstrom [1]_.

The script is located in:
`./examples/multipole_temperature.py`
`pygfunction/examples/multipole_temperature.py`

.. literalinclude:: ../../examples/multipole_temperature.py
.. literalinclude:: ../../pygfunction/examples/multipole_temperature.py
:language: python
:linenos:

Expand Down
4 changes: 2 additions & 2 deletions doc/source/example_regular_bore_field.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ bore fields in a 4 x 3 configuration as well as a circular field of 8
boreholes. Each field is then plotted on a separate figure.

The script is located in:
`./examples/regular_bore_field.py`
`pygfunction/examples/regular_bore_field.py`

.. literalinclude:: ../../examples/regular_bore_field.py
.. literalinclude:: ../../pygfunction/examples/regular_bore_field.py
:language: python
:linenos:
4 changes: 2 additions & 2 deletions doc/source/example_uniform_heat_extraction_rate.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ The following script generates the *g*-functions of rectangular fields of
*g*-functions presented by Cimmino and Bernier [1]_.

The script is located in:
`./examples/uniform_heat_extraction_rate.py`
`pygfunction/examples/uniform_heat_extraction_rate.py`

.. literalinclude:: ../../examples/uniform_heat_extraction_rate.py
.. literalinclude:: ../../pygfunction/examples/uniform_heat_extraction_rate.py
:language: python
:linenos:

Expand Down
4 changes: 2 additions & 2 deletions doc/source/example_uniform_temperature.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ The following script generates the *g*-functions of rectangular fields of
*g*-functions presented by Cimmino and Bernier [1]_.

The script is located in:
`./examples/uniform_temperature.py`
`pygfunction/examples/uniform_temperature.py`

.. literalinclude:: ../../examples/uniform_temperature.py
.. literalinclude:: ../../pygfunction/examples/uniform_temperature.py
:language: python
:linenos:

Expand Down
16 changes: 14 additions & 2 deletions doc/source/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,20 @@ Setting up pygfunction
- sphinx (>= 1.5.1)
- numpydoc (>= 0.6.0)

**Users** - `Download the latest release
<https://github.com/MassimoCimmino/pygfunction/releases>`_.
**Users** - `Download pip <https://pip.pypa.io/en/latest/>`_ and install the
latest release:

```
pip install pygfunction
```

Alternatively, `download the latest release
<https://github.com/MassimoCimmino/pygfunction/releases>`_ and run the
installation script:

```
python setup.py install
```

**Developers** - To get the latest version of the code, you can `download the
repository from github <https://github.com/MassimoCimmino/pygfunction>`_ or
Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,11 @@
import matplotlib.pyplot as plt
from matplotlib.ticker import AutoMinorLocator
import numpy as np
import os
from scipy.constants import pi
from scipy.interpolate import interp1d
from scipy.signal import fftconvolve
import sys
import time as tim

# Add path to pygfunction to Python path
packagePath = os.path.normpath(
os.path.join(os.path.normpath(os.path.dirname(__file__)),
'..'))
sys.path.append(packagePath)

import pygfunction as gt


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,6 @@
"""
from __future__ import division, print_function, absolute_import

import matplotlib.pyplot as plt
from matplotlib.ticker import AutoMinorLocator
import os
import sys

# Add path to pygfunction to Python path
packagePath = os.path.normpath(
os.path.join(os.path.normpath(os.path.dirname(__file__)),
'..'))
sys.path.append(packagePath)

import pygfunction as gt


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,6 @@
"""
from __future__ import division, print_function, absolute_import

import matplotlib.pyplot as plt
from matplotlib.ticker import AutoMinorLocator
import os
import sys

# Add path to pygfunction to Python path
packagePath = os.path.normpath(
os.path.join(os.path.normpath(os.path.dirname(__file__)),
'..'))
sys.path.append(packagePath)

import pygfunction as gt


Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,8 @@
import matplotlib.pyplot as plt
from matplotlib.ticker import AutoMinorLocator
import numpy as np
import os, sys
from scipy import pi

# Add path to pygfunction to Python path
packagePath = os.path.normpath(
os.path.join(os.path.normpath(os.path.dirname(__file__)),
'..'))
sys.path.append(packagePath)

import pygfunction as gt


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,7 @@
import matplotlib.pyplot as plt
from matplotlib.ticker import AutoMinorLocator
import numpy as np
import os
from scipy.constants import pi
import sys

# Add path to pygfunction to Python path
packagePath = os.path.normpath(
os.path.join(os.path.normpath(os.path.dirname(__file__)),
'..'))
sys.path.append(packagePath)

import pygfunction as gt

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,9 @@
import matplotlib.pyplot as plt
from matplotlib.ticker import AutoMinorLocator
import numpy as np
import os
from scipy.constants import pi
from scipy.interpolate import interp1d
from scipy.signal import fftconvolve
import sys

# Add path to pygfunction to Python path
packagePath = os.path.normpath(
os.path.join(os.path.normpath(os.path.dirname(__file__)),
'..'))
sys.path.append(packagePath)

import pygfunction as gt

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,8 @@
import matplotlib.lines as mlines
from matplotlib.ticker import AutoMinorLocator
import numpy as np
import os, sys
from scipy import pi

# Add path to pygfunction to Python path
packagePath = os.path.normpath(
os.path.join(os.path.normpath(os.path.dirname(__file__)),
'..'))
sys.path.append(packagePath)

import pygfunction as gt


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,8 @@
import matplotlib.pyplot as plt
from matplotlib.ticker import AutoMinorLocator
import numpy as np
import os, sys
from scipy import pi

# Add path to pygfunction to Python path
packagePath = os.path.normpath(
os.path.join(os.path.normpath(os.path.dirname(__file__)),
'..'))
sys.path.append(packagePath)

import pygfunction as gt


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,6 @@
"""
from __future__ import division, print_function, absolute_import

import matplotlib.pyplot as plt
from matplotlib.ticker import AutoMinorLocator
import os
import sys

# Add path to pygfunction to Python path
packagePath = os.path.normpath(
os.path.join(os.path.normpath(os.path.dirname(__file__)),
'..'))
sys.path.append(packagePath)

import pygfunction as gt


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@
import matplotlib.lines as mlines
from matplotlib.ticker import AutoMinorLocator
import numpy as np
import os
import sys

# Add path to pygfunction to Python path
packagePath = os.path.normpath(
os.path.join(os.path.normpath(os.path.dirname(__file__)),
'..'))
sys.path.append(packagePath)

import pygfunction as gt

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@
import matplotlib.lines as mlines
from matplotlib.ticker import AutoMinorLocator
import numpy as np
import os
import sys

# Add path to pygfunction to Python path
packagePath = os.path.normpath(
os.path.join(os.path.normpath(os.path.dirname(__file__)),
'..'))
sys.path.append(packagePath)

import pygfunction as gt

Expand Down
Loading

0 comments on commit 9d6572c

Please sign in to comment.