Skip to content

Commit

Permalink
Fiat Lux
Browse files Browse the repository at this point in the history
  • Loading branch information
pablogsal committed Sep 21, 2020
0 parents commit d02af79
Show file tree
Hide file tree
Showing 13 changed files with 212 additions and 0 deletions.
165 changes: 165 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
# IDE stuff

.idea/*

# Cmake stuff

CMakeLists.txt.user
CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
Makefile
cmake_install.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake
_deps
*.cbp
cmake-build-*/

# pip stuff
pip-wheel-metadata/

# Cython specific files
src/bloomberg/pensieve/*.cpp
src/bloomberg/pensieve/_pensieve_api.h

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/
9 changes: 9 additions & 0 deletions requirements-extra.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
black
flake8
isort
mypy
recommonmark
sphinx
sphinx-rtd-theme
bump2version
towncrier
2 changes: 2 additions & 0 deletions requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pytest
pytest-cov
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[flake8]
max-line-length = 95
7 changes: 7 additions & 0 deletions src/bloomberg/pensieve/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from ._pensieve import test
from ._version import __version__

__all__ = [
"test",
"__version__",
]
4 changes: 4 additions & 0 deletions src/bloomberg/pensieve/_pensieve.pyx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from _pensieve.test cimport test as native_test

def test():
return native_test()
Empty file.
5 changes: 5 additions & 0 deletions src/bloomberg/pensieve/_pensieve/test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace pensieve::python {

int test() { return 42; }

} // namespace pensieve::python
10 changes: 10 additions & 0 deletions src/bloomberg/pensieve/_pensieve/test.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#ifndef _PENSIEVE_TEST
#define _PENSIEVE_TEST

namespace pensieve::python {

int test();

} // namespace pensieve::python

#endif // _PENSIEVE_TEST
2 changes: 2 additions & 0 deletions src/bloomberg/pensieve/_pensieve/test.pxd
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cdef extern from "test.h" namespace "pensieve::python":
int test()
1 change: 1 addition & 0 deletions src/bloomberg/pensieve/_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "0.0.1"
Empty file added tests/__init__.py
Empty file.
5 changes: 5 additions & 0 deletions tests/integration/test_smoke.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from bloomberg.pensieve import test


def test_smoke():
assert test() == 42

0 comments on commit d02af79

Please sign in to comment.