Skip to content
This repository was archived by the owner on Dec 2, 2024. It is now read-only.
Open
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
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@
- modify setup.py to compile lbfgsb.f directly
- added chrg_scorpion_wrap.cpp to interface with chrg_scorpion.f
- shortened test for reduce scorpion --cgopt

25-26 July 2017 CHR
- renamed 69 method names (.py, .pyx, .cpp, .h) to lowercase with underscores, except Print.
- Complete list in NAMES_TXN
5 changes: 3 additions & 2 deletions INSTALL.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Quick setup guide

This is the very minimal set of instructions required to install Ptools
in a Python virtual environment.
It assumes all Ptools dependencies have been duly installed::
It assumes python 2.7 and all Ptools dependencies have been duly installed::

$ virtualenv ptools-env
$ source ptools-env/bin/activate
Expand All @@ -29,6 +29,7 @@ Building and installing Ptools

The Ptools library has few dependencies namely :

- python 2.7.xx
- a C++ compiler (e.g. the `GNU Compiler`_),
- a developers version of the Python_ interpreter,
- the Boost_ library,
Expand Down Expand Up @@ -185,4 +186,4 @@ location as described in `f2c.h: No such file or directory`_.
.. _GNU Compiler: http://gcc.gnu.org/
.. _Python: http://www.python.org/
.. _Git: http://git-scm.com/
.. _pip: https://pypi.python.org/pypi/pip
.. _pip: https://pypi.python.org/pypi/pip
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ clean-build:
rm -fr dist/
rm -fr .eggs/
rm -f bindings/_ptools.cpp
rm -f bindings/_cgopt.c
rm -f bindings/_cgopt.cpp
rm -f $(MANIFEST_OUT)
rm -f headers/gitrev.h
find . -name '*.egg-info' -exec rm -fr {} +
Expand Down Expand Up @@ -84,6 +84,11 @@ build: clean
install:
python setup.py install --record $(MANIFEST_OUT)

undo:
git checkout -- "*.py" "*.pyx" "*.cpp" "*.h"

rename:
python names.py rename NAMES_TXN

uninstall:
cat $(MANIFEST_OUT) | xargs rm -f
Expand Down
4 changes: 2 additions & 2 deletions Tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

# ---------------------------------------------------------------------------
#
# Reduce test files
# reduce test files
#
# ---------------------------------------------------------------------------
TEST_REDUCE_DATA_DIR = os.path.join(TEST_DATA_DIR, 'reduce')
Expand Down Expand Up @@ -95,7 +95,7 @@

# ---------------------------------------------------------------------------
#
# Translate test files
# translate test files
#
# ---------------------------------------------------------------------------

Expand Down
10 changes: 5 additions & 5 deletions Tests/cpp/cxxtest/ErrorFormatter.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,15 +252,15 @@ namespace CxxTest

void dumpBuffer( const void *buffer, unsigned size )
{
unsigned dumpSize = size;
if ( maxDumpSize() && dumpSize > maxDumpSize() )
dumpSize = maxDumpSize();
unsigned dumpsize = size;
if ( maxDumpsize() && dumpsize > maxDumpsize() )
dumpsize = maxDumpsize();

const unsigned char *p = (const unsigned char *)buffer;
(*_o) << " { ";
for ( unsigned i = 0; i < dumpSize; ++ i )
for ( unsigned i = 0; i < dumpsize; ++ i )
(*_o) << byteToHex( *p++ ) << " ";
if ( dumpSize < size )
if ( dumpsize < size )
(*_o) << "... ";
(*_o) << "}" << endl;
}
Expand Down
8 changes: 4 additions & 4 deletions Tests/cpp/cxxtest/TestRunner.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,23 +82,23 @@ namespace CxxTest
#ifdef _CXXTEST_HAVE_EH
bool _abortTestOnFail;
#endif // _CXXTEST_HAVE_EH
unsigned _maxDumpSize;
unsigned _maxDumpsize;

public:
StateGuard()
{
#ifdef _CXXTEST_HAVE_EH
_abortTestOnFail = abortTestOnFail();
#endif // _CXXTEST_HAVE_EH
_maxDumpSize = maxDumpSize();
_maxDumpsize = maxDumpsize();
}

~StateGuard()
{
#ifdef _CXXTEST_HAVE_EH
setAbortTestOnFail( _abortTestOnFail );
#endif // _CXXTEST_HAVE_EH
setMaxDumpSize( _maxDumpSize );
setMaxDumpsize( _maxDumpsize );
}
};

Expand All @@ -110,7 +110,7 @@ namespace CxxTest
#ifdef _CXXTEST_HAVE_EH
setAbortTestOnFail( CXXTEST_DEFAULT_ABORT );
#endif // _CXXTEST_HAVE_EH
setMaxDumpSize( CXXTEST_MAX_DUMP_SIZE );
setMaxDumpsize( CXXTEST_MAX_DUMP_SIZE );
}
};
};
Expand Down
10 changes: 5 additions & 5 deletions Tests/cpp/cxxtest/TestSuite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,16 @@ namespace CxxTest
//
// Max dump size
//
static unsigned currentMaxDumpSize = CXXTEST_MAX_DUMP_SIZE;
static unsigned currentMaxDumpsize = CXXTEST_MAX_DUMP_SIZE;

unsigned maxDumpSize()
unsigned maxDumpsize()
{
return currentMaxDumpSize;
return currentMaxDumpsize;
}

void setMaxDumpSize( unsigned value )
void setMaxDumpsize( unsigned value )
{
currentMaxDumpSize = value;
currentMaxDumpsize = value;
}

//
Expand Down
4 changes: 2 additions & 2 deletions Tests/cpp/cxxtest/TestSuite.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ namespace CxxTest
bool abortTestOnFail();
void setAbortTestOnFail( bool value = CXXTEST_DEFAULT_ABORT );

unsigned maxDumpSize();
void setMaxDumpSize( unsigned value = CXXTEST_MAX_DUMP_SIZE );
unsigned maxDumpsize();
void setMaxDumpsize( unsigned value = CXXTEST_MAX_DUMP_SIZE );

void doTrace( const char *file, unsigned line, const char *message );
void doWarn( const char *file, unsigned line, const char *message );
Expand Down
4 changes: 2 additions & 2 deletions Tests/cpp/cxxtest/Win32Gui.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ namespace CxxTest

void registerWindowClass()
{
_windowClass.cbSize = sizeof(_windowClass);
_windowClass.cbsize = sizeof(_windowClass);
_windowClass.style = CS_HREDRAW | CS_VREDRAW;
_windowClass.lpfnWndProc = &(Win32Gui::windowProcedure);
_windowClass.cbClsExtra = 0;
Expand Down Expand Up @@ -189,7 +189,7 @@ namespace CxxTest
return;

typedef void (WINAPI *FUNC)( void );
FUNC func = (FUNC)GetProcAddress( dll, "InitCommonControls" );
FUNC func = (FUNC)GetProcaddress( dll, "InitCommonControls" );
if ( !func )
return;

Expand Down
4 changes: 2 additions & 2 deletions Tests/cpp/cxxtest/X11Gui.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,14 +251,14 @@ namespace CxxTest

void redraw()
{
getWindowSize();
getWindowsize();
drawSolidBar();
drawDividers();
drawPercentage();
flush();
}

void getWindowSize()
void getWindowsize()
{
XWindowAttributes attributes;
XGetWindowAttributes( _display, _window, &attributes );
Expand Down
8 changes: 4 additions & 4 deletions Tests/cpp/cxxtestgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ def scanLineForTest(suite, lineNo, line):


def addTest(suite, name, line):
'''Add a test function to the current suite'''
'''add a test function to the current suite'''
test = {'name': name,
'suite': suite,
'class': 'TestDescription_%s_%s' % (suite['name'], name),
Expand Down Expand Up @@ -356,7 +356,7 @@ def cstr(str):


def addSuiteCreateDestroy(suite, which, line):
'''Add createSuite()/destroySuite() to current suite'''
'''add createSuite()/destroySuite() to current suite'''
if which in suite:
abort('%s:%s: %sSuite() already declared' % (suite['file'], str(line), which))
suite[which] = line
Expand All @@ -383,7 +383,7 @@ def verifySuite(suite):


def rememberSuite(suite):
'''Add current suite to list'''
'''add current suite to list'''
global suites
suites.append(suite)

Expand Down Expand Up @@ -539,7 +539,7 @@ def isDynamic(suite):


def writeInclude(output, file):
'''Add #include "file" statement'''
'''add #include "file" statement'''
global lastIncluded
if file == lastIncluded:
return
Expand Down
Loading