Skip to content

Commit

Permalink
added files for packaging capability
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Bay authored and Benjamin Bay committed Oct 10, 2018
1 parent 76786a3 commit 092edbd
Show file tree
Hide file tree
Showing 12 changed files with 66 additions and 4 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) [year] [fullname]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,24 +1,32 @@

.PHONY : clean-pyc
clean-pyc:
find . -name '*.pyc' -exec rm '{}' +
find . -name '*.pyo' -exec rm '{}' +
#name '*~' -exec rm '{}'

.PHONY : install
install:
( \
python3 -m virtualenv venv; \
source venv/bin/activate; \
pip3 install -r requirements.txt; \
)

.PHONY : test
test: clean-pyc
py.test

.PHONY : lint
lint:
( \
source venv/bin/activate; \
flake8 src; \
)

update:
git pull; install
.PHONY : pull
pull:
git pull

.PHONY: update
update: pull install
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 7 additions & 0 deletions ndmaze/tests/context.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from __future__ import absolute_import

import os
import sys
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))

import ndmaze
8 changes: 6 additions & 2 deletions tests/test_ndmaze.py → ndmaze/tests/test_ndmaze.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#import pytest
import sys
sys.path.insert(0, '../')
sys.path.insert(0, '../src/')
from .context import ndmaze as n
print(sys.path)

import numpy as np

import ndmaze as n

def test_fillBorders():
maze = n.matrix(2, np.zeros(10,10))
Expand Down
22 changes: 22 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import setuptools

with open("README.md", "r") as fh:
long_description = fh.read()

setuptools.setup(
name="ndmaze",
version="0.0.1",
author="Benjamin Bay",
author_email="[email protected]",
description="Package for generating and traversing mazes of 2 to n dimensions.",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/BayBenj/ndmaze",
packages=setuptools.find_packages(),
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
)

Binary file removed tests/__pycache__/__init__.cpython-36.pyc
Binary file not shown.
Binary file removed tests/__pycache__/test_ndmaze.cpython-36-PYTEST.pyc
Binary file not shown.

0 comments on commit 092edbd

Please sign in to comment.