Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# see http://editorconfig.org
# see https://editorconfig.org
root = true

[*]
Expand All @@ -9,16 +9,12 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{html,css,js}]
insert_final_newline = false

[*.py]
max_line_length = 120
max_line_length = 119

[{Makefile,**.mk}]
indent_style = tab
insert_final_newline = false

[*.{yml}]
indent_style = space
[*.yml]
indent_size = 2
7 changes: 5 additions & 2 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#
# Move to pyproject.toml after: https://github.com/PyCQA/flake8/issues/234
#
[flake8]
exclude = .pytest_cache
ignore = E501
exclude = .*, dist, htmlcov
#ignore = E402
max-line-length = 119
74 changes: 0 additions & 74 deletions .github/workflows/pythonapp.yml

This file was deleted.

74 changes: 74 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@


name: tests

on:
push:
branches:
- main
pull_request:
schedule:
- cron: '0 8 * * *'

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.10"]
env:
PYTHONUNBUFFERED: 1
PYTHONWARNINGS: always
steps:
- name: Checkout
run: |
echo $GITHUB_REF $GITHUB_SHA
git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
git fetch origin $GITHUB_SHA:temporary-ci-branch
git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA)

- name: 'Set up Python ${{ matrix.python-version }}'
uses: actions/setup-python@v4
# https://github.com/marketplace/actions/setup-python
with:
python-version: '${{ matrix.python-version }}'
cache: 'pip' # caching pip dependencies
cache-dependency-path: '**/requirements.dev.txt'

- name: Cache ROMs
id: cache-roms
uses: actions/cache@v3
# https://github.com/marketplace/actions/cache
with:
path: roms
key: cache-roms

- name: 'Bootstrap'
# The first CLI call will create the .venv
run: |
./cli.py version

- name: 'CLI help'
run: |
./cli.py --help

- name: 'Download ROMs'
run: |
./cli.py download-roms

- name: 'Safety'
run: |
./cli.py safety

- name: 'Run tests with Python v${{ matrix.python-version }}'
run: |
./cli.py coverage

- name: 'Upload coverage report'
uses: codecov/codecov-action@v3
# https://github.com/marketplace/actions/codecov
with:
fail_ci_if_error: false
verbose: true

40 changes: 7 additions & 33 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,40 +1,14 @@
.*
*.egg-info
__pycache__
/dist/
/coverage.json
/coverage.xml

!.github
!.editorconfig
!.flake8
!.gitignore

*.rom
/roms/*

*.py[cod]
*~

# C extensions
*.so

# Packages
*.egg
*.egg-info/*
/dist/*
build
build.log
eggs
parts
bin
var
sdist
develop-eggs
lib
lib64

# Installer logs
pip-log.txt

# Unit test / coverage reports
/htmlcov/*

# Translations
*.mo

/publish.log
/coverage.xml
86 changes: 0 additions & 86 deletions Makefile

This file was deleted.

4 changes: 3 additions & 1 deletion PyDC/PyDC/CassetteObjects.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# flake8: noqa: E501

"""
PyDC - Cassette Objects
=======================
Expand All @@ -14,7 +16,7 @@
import sys

# own modules
from PyDC.utils import (
from PyDC.PyDC.utils import (
LOG_FORMATTER,
LOG_LEVEL_DICT,
codepoints2string,
Expand Down
3 changes: 1 addition & 2 deletions PyDC/PyDC/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
import os
import sys

from PyDC.wave2bitstream import Wave2Bitstream

from PyDC.PyDC.wave2bitstream import Wave2Bitstream
from .CassetteObjects import Cassette


Expand Down
Loading