Skip to content

Commit

Permalink
Merge pull request numenta#34 from htm-community/numenta_update
Browse files Browse the repository at this point in the history
Numenta update
  • Loading branch information
breznak authored Jul 30, 2018
2 parents 4a9c8a2 + 69b9c79 commit 444b0b8
Show file tree
Hide file tree
Showing 285 changed files with 60,633 additions and 67,479 deletions.
142 changes: 142 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
version: 2
jobs:
build-and-test:
macos:
xcode: '9.0.1'
working_directory: ~/numenta/nupic.core
parallelism: 1
environment:
XCODE_SCHEME: nupic
XCODE_WORKSPACE: nupic
ARCHFLAGS: -arch x86_64
PYTHONPATH: ~/Library/Python/2.7/lib/python/site-packages
PYBIN: ~/Library/Python/2.7/bin
steps:
# Machine Setup
- run:
name: Make sure to use OS X in CircleCI Web UI
command: |
if [[ "$OSTYPE" != "darwin"* ]]; then
echo "Must set option to use OS X in CircleCI Web UI" && exit 1;
fi
- run: sudo systemsetup -settimezone 'GMT'
- run:
name: Restoring system python
command: |
brew uninstall python
curl https://bootstrap.pypa.io/get-pip.py | python - --user
echo 'export PATH=$HOME/Library/Python/2.7/bin:$PATH' >> $BASH_ENV
- run:
name: Installing cmake
command: brew install cmake

- checkout

# Dependencies
# Restore the dependency cache
- restore_cache:
keys:
# This branch if available
- v1-dep-{{ .Branch }}-
# Default branch if not
- v1-dep-master-
# Any branch if there are none on the default branch - this should be
# unnecessary if you have your default branch configured correctly
- v1-dep-

- run:
name: Installing dependencies
command: |
pip install --user --upgrade --verbose pip setuptools setuptools-scm
pip install --no-cache-dir --user -r bindings/py/requirements.txt --verbose || exit
# Save dependency cache
- save_cache:
key: v1-dep-{{ .Branch }}-{{ epoch }}
paths:
# This is a broad list of cache paths to include many possible
# development environments.
- vendor/bundle
- ~/virtualenvs
- ~/.m2
- ~/.ivy2
- ~/.bundle
- ~/.go_workspace
- ~/.gradle
- ~/.cache/bower

# Build
- run:
name: Compiling
environment:
VERBOSE: 1
command: |
mkdir -p build/scripts
cd build/scripts
cmake ../.. -DCMAKE_BUILD_TYPE=Release -DNTA_COV_ENABLED=ON -DCMAKE_INSTALL_PREFIX=../release -DPY_EXTENSIONS_DIR=../../bindings/py/src/nupic/bindings
make | grep -v -F '\\-\\- Installing:'
make install 2>&1 | grep -v -F 'Installing:'
- run:
name: Build distribution
command: |
python setup.py bdist_wheel
mkdir -p dist/include/nupic
mv bindings/py/dist/*.whl dist/
cp bindings/py/requirements.txt dist/
cp build/release/include/nupic/Version.hpp dist/include/nupic/
# Test
- run:
name: Running python tests
command: |
mkdir -p tests/py
pip install --user --no-index --find-links=$CIRCLE_WORKING_DIRECTORY/dist/ nupic.bindings
py.test --junitxml tests/py/junit-test-results.xml bindings/py/tests
- run:
name: Running C++ Tests
command: |
mkdir -p tests/cpp
pushd build/release/bin
./cpp_region_test
./py_region_test
./helloregion
./hello_sp_tp
./prototest
./unit_tests --gtest_output=xml:$CIRCLE_WORKING_DIRECTORY/tests/cpp/unit_tests_report.xml
- store_test_results:
path: tests

- store_artifacts:
path: dist/*.whl

- persist_to_workspace:
root: dist
paths:
- nupic.bindings*.whl
- requirements.txt
- include/nupic

deploy-s3:
machine: true
steps:
- attach_workspace:
at: dist
- run:
name: Deploying to S3
command: |
pip install awscli --upgrade --user
tar -zcv -f nupic_core-${CIRCLE_SHA1}-darwin64.tar.gz dist
aws s3 cp nupic_core-${CIRCLE_SHA1}-darwin64.tar.gz s3://artifacts.numenta.org/numenta/nupic.core/circle/
workflows:
version: 2
build-test-deploy:
jobs:
- build-and-test
- deploy-s3:
requires:
- build-and-test
filters:
branches:
only: master
67 changes: 3 additions & 64 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,66 +1,5 @@
---
Language: Cpp
# BasedOnStyle: LLVM
AccessModifierOffset: -2
AlignAfterOpenBracket: true
AlignEscapedNewlinesLeft: false
AlignOperands: true
AlignTrailingComments: true
AlignConsecutiveAssignments: false
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AlwaysBreakAfterDefinitionReturnType: false
AlwaysBreakTemplateDeclarations: false
AlwaysBreakBeforeMultilineStrings: false
BreakBeforeBinaryOperators: None
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BinPackParameters: true
BinPackArguments: true
ColumnLimit: 80
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
DerivePointerAlignment: false
ExperimentalAutoDetectBinPacking: false
IndentCaseLabels: false
IndentWrappedFunctionNames: false
IndentFunctionDeclarationAfterType: false
MaxEmptyLinesToKeep: 1
KeepEmptyLinesAtTheStartOfBlocks: true
NamespaceIndentation: None
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakString: 1000
PenaltyBreakFirstLessLess: 120
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Right
SpacesBeforeTrailingComments: 1
Cpp11BracedListStyle: true
Standard: Cpp11
IndentWidth: 2
TabWidth: 8
UseTab: Never
BreakBeforeBraces: Attach
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpacesInAngles: false
SpaceInEmptyParentheses: false
SpacesInCStyleCastParentheses: false
SpaceAfterCStyleCast: false
SpacesInContainerLiterals: true
SpaceBeforeAssignmentOperators: true
ContinuationIndentWidth: 4
CommentPragmas: '^ IWYU pragma:'
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
SpaceBeforeParens: ControlStatements
DisableFormat: false
Language: Cpp
BasedOnStyle: LLVM
DisableFormat: false
...

22 changes: 0 additions & 22 deletions .githooks/README.md

This file was deleted.

16 changes: 13 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,20 @@
*.DS_Store
*.swp
*.pyc
*.pkl

# Coverage files
.coverage
htmlcov/

# IDE project files
/nbproject/
.vscode
.ycm_extra_conf.py

# Build files
build/
junit-test-results.xml

# /
/.gdb_history
Expand All @@ -20,6 +28,8 @@ build/
html/

# SWIG
bindings/py/nupic/bindings/*.cxx
bindings/py/nupic/bindings/*.py
bindings/py/nupic/bindings/*.so
bindings/py/src/nupic/bindings/*.cxx
bindings/py/src/nupic/bindings/*.py
bindings/py/src/nupic/bindings/*.so
bindings/py/src/nupic/*.so
bindings/py/src/nupic.bindings.egg-info
42 changes: 42 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,47 @@
# Changelog

## 1.0.6

* This release was because of a deployment problem with 1.0.5 and issues with pypi.

## 1.0.5

* 58754cf7 NUP-2519: Upgrade pycapnp to 0.6.3
* 64fb803e DEVOPS-383: Move deploy to S3 job to circleci workflow
* 16dbf534 DEVOPS-383: Migrate CircleCI builds from 1.0 to 2.0
* ec14f2f5 pip install --use-wheel" was deprecated. See https://pip.pypa.io/en/stable/news/#deprecations-and-removals
* c2d31a95 ignore YCM configuration
* f7b86e0f "pip install --use-wheel" was deprecated. See https://pip.pypa.io/en/stable/news/#deprecations-and-removals
* 42df6caa NUP-2504: fix clang link optimization issue on private template function
* f5bc76b6 NUP-2504: Add unit test to softmax overflow
* 203493ed NUP-2506: Add missing state fields to serialization
* 5f1ddcbb NUP-2514: fix traversal limit
* 7e33ca44 NUP-2506: Add missing operator '==' to classes used in tests
* e5e48c8e fix accumulate
* b3513853 add softmax function
* 0032fbf5 Fix softmax overflow


## 1.0.4

* 860459cf NUP-2506: Add operator '==' to classes used in tests
* ac43320f NUP-2505: Remove win32 build from CI
* 6a580c06 Fix not include ClassifierResult.hpp error
* de567a4e NUP-2495: Update clang-format instructions
* 2f027a7b NUP-2475: Add sparse link validation
* 3071b8a5 DEVOPS-353: Update "setSparseOutput" documentation
* 7ae0d64f NUP-2495: Check style using clang-format
* 8a1d5eeb NUP-2475: Make sure Network API links use the same dtype at both ends
* 4e800a64 DEVOPS-353: Fix tests to run with nupic.core directly instead of nupic
* 9ae6155d DEVOPS-353: Implement sparse links
* de88baaa DEVOPS-353: Add 'isSparse' attribute to input/output
* 1e486fde DEVOPS-353: Allow element count to be smaller than buffer size
* c9377d52 Fix cmake version and project name
* f069c310 Add missing include required for NTA_ASSERT
* a6c186ae reformat code using clang-format
* 70d43da1 NUP-2492: Add constructor vs initialize test regarding Issue #1386
* dabd7f87 NUP-2491: Validate global inhibition parameters

## 1.0.3

* https://github.com/numenta/nupic.core/issues/1380 Added stronger type checking for SP compute input.
Expand Down
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@
# -----------------------------------------------------------------------------

cmake_minimum_required(VERSION 3.3)
project(nupic_core_main CXX)
project(nupic_core CXX)

set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}")

set(CMAKE_VERBOSE_MAKEFILE OFF)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

get_filename_component(REPOSITORY_DIR ${PROJECT_SOURCE_DIR} ABSOLUTE)

if( POLICY CMP0046 )
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ RUN pip install \
--cache-dir /usr/local/src/nupic.core/pip-cache \
--build /usr/local/src/nupic.core/pip-build \
--no-clean \
pycapnp==0.5.8 \
pycapnp==0.6.3 \
-r bindings/py/requirements.txt && \
python setup.py bdist bdist_dumb bdist_wheel sdist
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.4.dev0
1.0.7.dev0
14 changes: 7 additions & 7 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ init:
- git config --global core.autocrlf input

clone_folder: c:\projects\nupic-core
clone_depth: 50
clone_depth: 1

# Can't have a shallow clone because the CMake process will be
# calling into git to write the current SHA into the binaries.
Expand All @@ -51,12 +51,12 @@ environment:
wheel_name_suffix: "win_amd64"

# Win32-gcc
- PYTHON_VERSION: "2.7.9"
PYTHON_ARCH: "32"
PYTHONHOME: "C:\\Python27"
NC_CMAKE_GENERATOR: "MinGW Makefiles"
external_static_subdir: "windows32-gcc"
wheel_name_suffix: "win32"
# - PYTHON_VERSION: "2.7.9"
# PYTHON_ARCH: "32"
# PYTHONHOME: "C:\\Python27"
# NC_CMAKE_GENERATOR: "MinGW Makefiles"
# external_static_subdir: "windows32-gcc"
# wheel_name_suffix: "win32"

# # Win64-Visual Studio
# - PYTHON_VERSION: "2.7.9"
Expand Down
2 changes: 1 addition & 1 deletion bindings/py/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ numpy==1.12.1
pytest==3.0.7
pytest-cov==2.5.0
pytest-xdist==1.16.0
pycapnp==0.5.12
pycapnp==0.6.3
2 changes: 1 addition & 1 deletion bindings/py/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def generateExtensions():
"nupic.bindings": ["*.so", "*.pyd"],
"nupic.bindings.tools": ["*.capnp"],
},
extras_require = {"capnp": ["pycapnp==0.5.8"]},
extras_require = {"capnp": ["pycapnp==0.6.3"]},
zip_safe=False,
cmdclass={
"clean": CleanCommand,
Expand Down
Loading

0 comments on commit 444b0b8

Please sign in to comment.