This commit is contained in:
Ian Bell
2014-12-09 09:50:48 -05:00
17 changed files with 108 additions and 81 deletions

View File

@@ -10,7 +10,7 @@ It was originally developed by Ian Bell, currently a post-doc at the University
* For Python, you can get the latest release via ``pip install coolprop``. Currently |downloads| of |version|
* ... other binaries can be downloaded here: `latest release <http://sourceforge.net/projects/coolprop/files>`_ and `development version <http://www.coolprop.dreamhosters.com:8010/binaries>`_
* ... other binaries can be downloaded here: `latest release <http://sourceforge.net/projects/coolprop/files>`_ and `development version <http://sourceforge.net/projects/coolprop/files/CoolProp/nightly>`_
* The documentation is available for the `latest release <http://www.coolprop.org>`_ and the `development version <http://www.coolprop.dreamhosters.com:8010/sphinx>`_

20
dev/Tickets/321.py Normal file
View File

@@ -0,0 +1,20 @@
import CoolProp
import CoolProp.CoolProp as CP
fluids = [
["R50", "Methane"],
["R170", "Ethane"],
["R600", "n-Butane"],
["R704", "Helium"],
["R718", "Water"],
["R720", "Neon"],
["R728", "Nitrogen"],
["R729", "Air"],
["R732", "Oxygen"],
["R740", "Argon"],
["R1150", "Ethylene"],
["R1270", "Propylene"]]
for f in fluids:
print "{0}:{1} - {2}:{3}".format(f[0],CP.PropsSI('Tcrit','T',0,'D',0,f[0]),CP.PropsSI('Tcrit','T',0,'D',0,f[1]),f[1])

View File

@@ -665,22 +665,6 @@ def SWIG_scilab_bin_builder(platform, gitMode = 'incremental', windows = False):
compress="bz2"))
return factory
def sourcezip_builder(gitMode = 'incremental', cmake_args = [], cmake_env = None):
""" Zip up all the sources (including externals) and upload """
# Create the factory to add the actions to
factory = getBaseFactory(gitMode=gitMode)
factory.addStep(MakeDirectory(dir='install_root/source', haltOnFailure = True))
factory.addStep(ShellCommand(command='chmod +x git-archive-all',
workdir= "build/dev/scripts",
haltOnFailure = True))
factory.addStep(ShellCommand(command='dev/scripts/git-archive-all ../install_root/source/coolpropsource.zip',
workdir= "build",
haltOnFailure = True))
# Upload the files
factory.addStep(DirectoryUpload(slavesrc="../install_root",masterdest="public_html/binaries",url="binaries",compress="bz2"))
return factory
def memory_sanitizer_builder():
""" Run clang's memory sanitizer on the Catch tests to check for memory leaks """
@@ -861,13 +845,6 @@ c['builders'].append(
factory = fortranFactory(platform=platformID["windows"],bitness=bitnessID["32bit"])
)
)
c['builders'].append(
BuilderConfig(
name="source zipfile",
slavenames=["OSX-slave"],
factory = sourcezip_builder()
)
)
c['builders'].append(
BuilderConfig(
name="Fortran-executable-linux-32bit-GCC-ExternC",

View File

@@ -1,7 +1,8 @@
{
"ALIASES": [
"air",
"AIR"
"AIR",
"R729"
],
"ANCILLARIES": {
"hL": {

View File

@@ -1,7 +1,8 @@
{
"ALIASES": [
"argon",
"ARGON"
"ARGON",
"R740"
],
"ANCILLARIES": {
"hL": {

View File

@@ -1,7 +1,8 @@
{
"ALIASES": [
"ethane",
"ETHANE"
"ETHANE",
"R170"
],
"ANCILLARIES": {
"hL": {

View File

@@ -1,7 +1,8 @@
{
"ALIASES": [
"ethylene",
"ETHYLENE"
"ETHYLENE",
"R1150"
],
"ANCILLARIES": {
"hL": {

View File

@@ -2,7 +2,8 @@
"ALIASES": [
"helium",
"HELIUM",
"He"
"He",
"R704"
],
"ANCILLARIES": {
"hL": {

View File

@@ -2,7 +2,8 @@
"ALIASES": [
"CH4",
"methane",
"METHANE"
"METHANE",
"R50"
],
"ANCILLARIES": {
"hL": {

View File

@@ -1,7 +1,8 @@
{
"ALIASES": [
"neon",
"NEON"
"NEON",
"R720"
],
"ANCILLARIES": {
"hL": {

View File

@@ -2,7 +2,8 @@
"ALIASES": [
"nitrogen",
"NITROGEN",
"N2"
"N2",
"R728"
],
"ANCILLARIES": {
"hL": {

View File

@@ -2,7 +2,8 @@
"ALIASES": [
"oxygen",
"OXYGEN",
"O2"
"O2",
"R732"
],
"ANCILLARIES": {
"hL": {

View File

@@ -2,7 +2,8 @@
"ALIASES": [
"propylene",
"PROPYLENE",
"PROPYLEN"
"PROPYLEN",
"R1270"
],
"ANCILLARIES": {
"hL": {

View File

@@ -3,7 +3,8 @@
"water",
"WATER",
"H2O",
"h2o"
"h2o",
"R718"
],
"ANCILLARIES": {
"hL": {

View File

@@ -3,7 +3,8 @@
"nButane",
"butane",
"BUTANE",
"N-BUTANE"
"N-BUTANE",
"R600"
],
"ANCILLARIES": {
"hL": {

View File

@@ -1,30 +1,41 @@
#!/bin/bash
#
# This script relys on a modified ~/.ssh/config to specify the
# This script relys on a modified ~/.ssh/config to specify the
# correct identity files to be used with the host aliases
# git.code.sf.net-ibell and git.code.sf.net-jorritw
# git.code.sf.net-ibell and git.code.sf.net-jorritw
#
# Work around for Cron:
USER=coolprop
source /home/$USER/.bash_profile
#
FOLDER="/home/$USER/src/CoolProp.git"
ORIGIN="https://github.com/CoolProp/CoolProp.git"
MIRROR="ssh://git.code.sf.net-jorritw/p/coolprop/git"
#
if [ ! -d $FOLDER ]; then # repo does not exist, clone it
BASEFOLDER=${FOLDER%/*}
REPOFOLDER=${FOLDER##*/}
mkdir -p $BASEFOLDER
pushd $BASEFOLDER
git clone --mirror $ORIGIN $REPOFOLDER
#pushd $REPOFOLDER
#git remote add sfmirror $MIRROR
#popd
popd
fi
pushd $FOLDER
git fetch --force $ORIGIN
function createRepo {
local GITOPT="$1"
local FOLDER="$2"
if [ ! -d $FOLDER ]; then # repo does not exist, clone it
local BASEFOLDER=${FOLDER%/*}
local REPOFOLDER=${FOLDER##*/}
mkdir -p $BASEFOLDER
pushd $BASEFOLDER
git clone $GITOPT $ORIGIN $REPOFOLDER
popd
fi
return 0
}
#
CURFOLDER="/home/$USER/src/CoolProp.git"
createRepo "--mirror" "$CURFOLDER"
pushd $CURFOLDER
git fetch --force --all # $ORIGIN
git push --force --mirror $MIRROR
popd
#
CURFOLDER="/home/$USER/src/CoolPropFull.git"
createRepo "--recursive" "$CURFOLDER"
pushd $CURFOLDER
git pull
popd
#
exit 0

View File

@@ -1,23 +1,32 @@
#!/bin/bash
#
# Make sure that only one argument is passed to this script - the version that will be released
# Make sure that only two arguments are passed to this script - the version that
# will be released and the dryrun vs. release option.
if [ $# != 2 ]; then
echo "Only two arguments should be passed to this script - the version that will be released and if you would like a dry run or a release; like \"release.bsh 5.0.0 dryrun\" or \"release.bsh nightly release\"."
exit 1
echo "Only two arguments should be passed to this script: "
echo "The version that will be released and if you would like a dry run or a release."
echo "for example: \"release.bsh 5.0.0 dryrun\" or \"release.bsh nightly release\" "
exit 1
fi
#
CPVERSION="$1"
BASEDIR="$HOME/buildbot/server-master/public_html"
REPODIR="$HOME/src/CoolPropFull.git"
BINFOLDER="binaries"
DOCFOLDER="sphinx"
SRCFOLDER="$BASEDIR/$BINFOLDER/source"
SEPARATOR="----------------------------------"
#
SFUSER="jorritw" # ibell or jorritw
SFUSER="jorritw" # ibell or jorritw
#
function printMessage {
echo " "
echo $SEPARATOR
echo "$1"
return 0
}
#
echo " "
echo $SEPARATOR
echo "Processing the input variables: "
printMessage "Processing the input variables: "
#
CPVERSION="$1"
if [[ $CPVERSION == +([0-9]).+([0-9]).+([0-9]) ]]; then
@@ -31,56 +40,54 @@ fi
#
if [ "$2" == "release" ]; then
DRYRUN=false
else
else
DRYRUN=true
fi
echo "DRYRUN = $DRYRUN"
#
# Change the folder
pushd ${BASEDIR}
#echo "Fixing the permissions of directories and files" # This is not needed, just ignore the perms in rsync
#find . -type d ! -perm 0775 -exec chmod 0775 {} \;
#find . -type f ! -perm 0664 -exec chmod 0664 {} \;
#
pushd ${BASEDIR} # Change the folder
if [ "$DRYRUN" != "false" ]; then
echo " "
echo $SEPARATOR
printMessage "Dry run detected"
echo "Dry run; no zipping of the sources"
echo "Dry run; no zipping of the docs"
echo "Dry run; skipping python upload"
echo "Dry run; skipping folder date"
RSYNC_DRY_RUN=--dry-run
else
pushd "$REPODIR"
git pull
python dev/scripts/git-archive-all $SRCFOLDER/CoolProp_sources.zip
popd
rm -f "$BINFOLDER/README.rst.txt"
if [ "$CPVERSION" = "nightly" ]; then
RSYNC_OPTS="-a --no-perms -z --stats --delete"
rm -rf "$BINFOLDER/docs"
CPVERSION="$CPVERSION"/ #$(date +%F)
echo "CoolProp nightly binaries" > "$BINFOLDER/README.rst.txt"
echo "-------------------------" >> "$BINFOLDER/README.rst.txt"
echo -n "Development binaries of the" >> "$BINFOLDER/README.rst.txt"
echo -n " \`CoolProp project <http://coolprop.sourceforge.net>\`_ " >> "$BINFOLDER/README.rst.txt"
echo "updated on $(date +%F) at $(date +%X) $(date +%Z)." >> "$BINFOLDER/README.rst.txt"
else
RSYNC_OPTS="-a --no-perms -z --stats"
echo " "
echo $SEPARATOR
echo "Zipping up the docs and moving them into the $BINFOLDER folder for staging"
printMessage "Zipping up the docs and moving them into the $BINFOLDER folder for staging"
rm -f documentation.zip
zip -rq documentation.zip $DOCFOLDER/*
mkdir -p "$BINFOLDER/docs"
cp documentation.zip "$BINFOLDER/docs"
echo "Uploading the python binaries to pypi"
twine upload $BINFOLDER/Python/*.whl $BINFOLDER/Python/*.tar.gz
fi
fi
RSYNC_DRY_RUN=
fi
#
echo " "
echo $SEPARATOR
echo "Copying the binaries to SourceForge"
printMessage "Copying the binaries to SourceForge"
rsync $RSYNC_DRY_RUN $RSYNC_OPTS "$BINFOLDER/" frs.sf.net-$SFUSER:/home/frs/project/coolprop/CoolProp/$CPVERSION
if [ ${CPVERSION:0:7} != "nightly" ]; then
echo " "
echo $SEPARATOR
echo "Publishing the docs on SourceForge"
printMessage "Publishing the docs on SourceForge"
rsync $RSYNC_DRY_RUN $RSYNC_OPTS "$DOCFOLDER/" frs.sf.net-$SFUSER:/home/project-web/coolprop/htdocs
fi
# Change back to where we came from
popd
echo " "
echo "All done, goodbye."
printMessage "All done, goodbye."
exit 0