Skip to content

Commit

Permalink
Release 1.4.1
Browse files Browse the repository at this point in the history
Added Circle CI support
Fixed test-units to work with CI
Fixed database initialization issue [1]

[1]: git push --set-upstream github release-commit
  • Loading branch information
ClaymorePT committed Nov 30, 2019
2 parents 68c99f0 + 1ccdfd4 commit 5e6d841
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 4 deletions.
44 changes: 44 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Python CircleCI 2.1 configuration file
#

version: 2.1

executors:
python_executor:
docker:
- image: python:3.6.9


jobs:
execute-test-units:
executor: python_executor
working_directory: ~/repo

steps:
- checkout
- run:
name: install dependencies
command: |
pip install -r requirements.txt
# run tests!
- run:
name: run tests
command: |
cd ~/repo
python setup.py test &> ./complete-test-report.txt
- store_artifacts:
path: complete-test-report.txt
destination: complete-test-report.txt


workflows:
version: 2.1
workflows-run-test-units:
jobs:
- execute-test-units:
filters:
branches:
ignore:
- master
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# By default, ignore everything...
/*
**__pycache__/

# ... except these directories
!/src/
!/.circleci/

# ... except these specific files
!/.gitignore
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# ArchSDN Central Manager

[![CircleCI](https://circleci.com/gh/ClaymorePT/ArchSDN-Central-Manager.svg?style=svg)](https://circleci.com/gh/ClaymorePT/ArchSDN-Central-Manager)

### Introduction

This is the source code for the ArchSDN Central Manager.
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def requirements_file_to_list(fn='requirements.txt'):

setup(
name='archsdn_central',
version='1.4.0',
version='1.4.1',
packages=find_packages('src'),
package_dir={'': 'src'},
package_data={'': ['*.sql']},
Expand All @@ -38,7 +38,7 @@ def requirements_file_to_list(fn='requirements.txt'):
maintainer='Carlos Miguel Ferreira',
maintainer_email='[email protected]',
description='Minimal centralized manager for OpenFlow enabled networks',
long_description=open('README.rst').read(),
long_description=open('README.md').read(),
keywords='SDN OpenFlow Management',
license='GPLv3',
classifiers=[
Expand Down
4 changes: 4 additions & 0 deletions src/archsdn_central/database/internals/generics.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ def init_database(
if location.exists():
location = str(location.absolute())
__log.info("Database file exists at {:s}. Loading it...".format(location))
else:
location = str(location.absolute())
__log.info("Database file does not exist. It will be created at location {:s}. Loading it...".format(location))


elif location == ":memory:":
__log.info("Database will be instantiated in memory.")
Expand Down
4 changes: 2 additions & 2 deletions src/tests/test_central.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
def openPuppetProcess():
if Path("../archsdn_central/main.py").exists():
return subprocess.Popen(
("../archsdn_central/main.py", "-l", "DEBUG", "-s", str(database_location))
("python", "../archsdn_central/main.py", "-l", "CRITICAL", "-s", str(database_location))
)
if Path("./src/archsdn_central/main.py").exists():
return subprocess.Popen(
("./src/archsdn_central/main.py", "-l", "DEBUG", "-s", str(database_location))
("python", "./src/archsdn_central/main.py", "-l", "CRITICAL", "-s", str(database_location))
)
raise SystemExit("archsdn_central.main.py not found.")

Expand Down

0 comments on commit 5e6d841

Please sign in to comment.