diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 5e132bc..9f4803d 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -4,32 +4,31 @@ name: Python tests on: - push: - branches: [ master ] - pull_request: - branches: [ master ] + push: + branches: [master] + pull_request: + branches: [master] jobs: - build: + build: + runs-on: ubuntu-latest - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.8 - uses: actions/setup-python@v2 - with: - python-version: 3.8 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi -# - name: Lint with flake8 -# run: | -# # stop the build if there are Python syntax errors or undefined names -# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics -# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide -# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest - run: | - python -m unittest discover -s ./src/tests -p '*_test.py' + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + # - name: Lint with flake8 + # run: | + # # stop the build if there are Python syntax errors or undefined names + # flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Test with pytest + run: | + python -m unittest discover -s ./enigma/tests -p '*_test.py' diff --git a/src/__init__.py b/enigma/__init__.py similarity index 100% rename from src/__init__.py rename to enigma/__init__.py diff --git a/src/builtin_rotors.py b/enigma/builtin_rotors.py similarity index 100% rename from src/builtin_rotors.py rename to enigma/builtin_rotors.py diff --git a/src/machine.py b/enigma/machine.py similarity index 100% rename from src/machine.py rename to enigma/machine.py diff --git a/src/plug_board.py b/enigma/plug_board.py similarity index 100% rename from src/plug_board.py rename to enigma/plug_board.py diff --git a/src/plug_lead.py b/enigma/plug_lead.py similarity index 100% rename from src/plug_lead.py rename to enigma/plug_lead.py diff --git a/src/rotor.py b/enigma/rotor.py similarity index 100% rename from src/rotor.py rename to enigma/rotor.py diff --git a/src/tests/__init__.py b/enigma/tests/__init__.py similarity index 100% rename from src/tests/__init__.py rename to enigma/tests/__init__.py diff --git a/src/tests/data/__init__.py b/enigma/tests/data/__init__.py similarity index 100% rename from src/tests/data/__init__.py rename to enigma/tests/data/__init__.py diff --git a/src/tests/data/sample.py b/enigma/tests/data/sample.py similarity index 100% rename from src/tests/data/sample.py rename to enigma/tests/data/sample.py diff --git a/src/tests/machine_test.py b/enigma/tests/machine_test.py similarity index 100% rename from src/tests/machine_test.py rename to enigma/tests/machine_test.py diff --git a/src/tests/plug_board_test.py b/enigma/tests/plug_board_test.py similarity index 100% rename from src/tests/plug_board_test.py rename to enigma/tests/plug_board_test.py diff --git a/src/tests/plug_lead_test.py b/enigma/tests/plug_lead_test.py similarity index 100% rename from src/tests/plug_lead_test.py rename to enigma/tests/plug_lead_test.py diff --git a/src/tests/rotor_test.py b/enigma/tests/rotor_test.py similarity index 100% rename from src/tests/rotor_test.py rename to enigma/tests/rotor_test.py diff --git a/src/version.py b/enigma/version.py similarity index 100% rename from src/version.py rename to enigma/version.py diff --git a/setup.py b/setup.py index c4648e7..fedcec3 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ long_description = f.read() version = {} -with open(os.path.join(_here, 'src', 'version.py')) as f: +with open(os.path.join(_here, 'enigma', 'version.py')) as f: exec(f.read(), version) setup(