Skip to content

Commit

Permalink
Merge branch 'development' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhrisca authored Dec 5, 2021
2 parents b0b56d3 + a1a5d05 commit 2d75772
Show file tree
Hide file tree
Showing 112 changed files with 24,094 additions and 16,588 deletions.
5 changes: 4 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
[run]
omit = asammdf/gui/*
source =
asammdf
omit =
asammdf/gui/*
2 changes: 0 additions & 2 deletions .coveralls.yml

This file was deleted.

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

on:
push:
# see: https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
tags:
- "[0-9]+.[0-9]+.[0-9]+" # stable releases
- "[0-9]+.[0-9]+.[0-9]+.dev[0-9]+" # dev releases

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.7", "3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install packages
run: |
pip install build pyinstaller==4.5.1 numpy wheel
pip install -r requirements_exe_build.txt
python setup.py bdist_wheel
pip install -e . --no-deps
pip install cmerg
- name: Build a source tarball
if: ${{ matrix.python-version == '3.9' && matrix.os == 'ubuntu-latest' }}
run: python -m build --sdist

- name: Build a binary wheel
run: python -m build --wheel

- name: Build an executable
if: ${{ matrix.python-version == '3.8' }}
run: pyinstaller asammdf.spec --distpath dist/${RUNNER_OS} --onefile

# see: https://docs.github.com/en/actions/advanced-guides/storing-workflow-data-as-artifacts
- name: Archive dist artifacts
uses: actions/upload-artifact@v2
with:
name: dist
path: dist/**
if-no-files-found: error

# see: https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
# - name: Publish distribution 📦 to Test PyPI
# uses: pypa/gh-action-pypi-publish@master
# with:
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
# repository_url: https://test.pypi.org/legacy/
# - name: Publish distribution 📦 to PyPI
# if: startsWith(github.ref, 'refs/tags')
# uses: pypa/gh-action-pypi-publish@master
# with:
# password: ${{ secrets.PYPI_API_TOKEN }}
31 changes: 31 additions & 0 deletions .github/workflows/coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: coveralls

on:
push:
branches: [master, development]
pull_request:
branches: [master, development]

jobs:
coveralls:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.7"

- name: Install packages
run: pip install tox coveralls

- name: Run coverage
run: tox -e py37

# see: https://coveralls-python.readthedocs.io/en/latest/usage/configuration.html#github-actions-support
- name: Upload coverage data to coveralls.io
run: coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36 changes: 15 additions & 21 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,26 @@
name: asammdf package
name: continuous integration

on: [push]
on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.6, 3.9]
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.7", "3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r test/requirements.txt
pip install -r doc/requirements.txt pytest pytest-cov coveralls
- name: Running tests
run: |
set -e
python --version
python -m pytest -vv --color=yes --disable-pytest-warnings --cov-config=.coveragerc --cov-report xml:coverage.xml --cov=asammdf/ test/
python -m sphinx -nW -b html doc doc/_build/html

- name: Install packages
run: pip install tox tox-gh-actions

# see: https://github.com/ymyzk/tox-gh-actions
- name: Run tests
run: tox
16 changes: 0 additions & 16 deletions .travis.yml

This file was deleted.

58 changes: 31 additions & 27 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,31 @@
# The basics

Your help is appreciated and welcome!

The _master_ branch is meant to hold the release code. At any time this should be
identical to the code available on PyPI.

PR's will be pushed on the _development_ branch if the actual package code is changed. When the time comes this branch
will be merged to the _master_ branch and a new release will be issued.

PR's that deal with documentation, and other adjacent files (README for example) can be pushed to the _master_ branch.

When submitting PR's please take into account:
* the project's goals
* PEP8 and the style guide below

# Testing
Travis CI is enabled for this project. It is really helpful for quality assurance
and Python 2 and 3 compatibility check. It is advised to run the tests on both
Python 3 and 2 before pushing the PR (Python 3.6 64 bit and Python 2.7 32 bit would be
a very good combination to test).

# Style guide

Just run [*black*](https://black.readthedocs.io) on modified files before sending the PR. There is no need to reinvent the wheel here!

**Tip**: Add a pre-commit hook with `pip install pre-commit && pre-commit install`
# The basics

Your help is appreciated and welcome!

The _master_ branch is meant to hold the release code. At any time this should be
identical to the code available on PyPI.

PR's will be pushed on the _development_ branch if the actual package code is changed. When the time comes this branch
will be merged to the _master_ branch and a new release will be issued.

PR's that deal with documentation, and other adjacent files (README for example) can be pushed to the _master_ branch.

When submitting PR's please take into account:
* the project's goals
* PEP8 and the style guide below

# Testing

You can use tox to run tests locally. Example for the unit tests with Python version 3.7:

```console
tox -e py27
```

Otherwise, you can just push and the tests will be run by GitHub Actions.

# Style guide

Just run [*black*](https://black.readthedocs.io) on modified files before sending the PR. There is no need to reinvent the wheel here!

**Tip**: Add a pre-commit hook with `pip install pre-commit && pre-commit install`
18 changes: 8 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,21 @@

*asammdf* supports MDF versions 2 (.dat), 3 (.mdf) and 4 (.mf4).

*asammdf* works on Python >= 3.6 (for Python 2.7, 3.4 and 3.5 see the 4.x.y releases)

*asammdf* works on Python >= 3.7 (for Python 2.7, 3.4 and 3.5 see the 4.x.y releases)

</p>

<img align=left src="https://raw.githubusercontent.com/danielhrisca/asammdf/master/gui.png"/>


# Status

! | Travis CI | Appveyor | CoverAlls | Codacy | ReadTheDocs
--|--|--|--|--|--
master | [![Build Status](https://travis-ci.org/danielhrisca/asammdf.svg?branch=)](https://travis-ci.org/danielhrisca/asammdf) | [![Build status](https://ci.appveyor.com/api/projects/status/racx048r4cnwa2lg/branch/master?svg=true)](https://ci.appveyor.com/project/danielhrisca/asammdf/branch/master) | [![Coverage Status](https://coveralls.io/repos/github/danielhrisca/asammdf/badge.svg?branch=master)](https://coveralls.io/github/danielhrisca/asammdf?branch=master) | [![Codacy Badge](https://api.codacy.com/project/badge/Grade/a3da21da90ca43a5b72fc24b56880c99?branch=master)](https://www.codacy.com/app/danielhrisca/asammdf?utm_source=github.com&utm_medium=referral&utm_content=danielhrisca/asammdf&utm_campaign=badger) | [![Documentation Status](http://readthedocs.org/projects/asammdf/badge/?version=master)](http://asammdf.readthedocs.io/en/master/?badge=stable) |

PyPI| conda-forge
--|--
[![PyPI version](https://badge.fury.io/py/asammdf.svg)](https://badge.fury.io/py/asammdf) | [![conda-forge version](https://anaconda.org/conda-forge/asammdf/badges/version.svg)](https://anaconda.org/conda-forge/asammdf)
| Continuous Integration | Coveralls | Codacy | ReadTheDocs |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| [![continuous integration](https://github.com/danielhrisca/asammdf/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/danielhrisca/asammdf/actions/workflows/main.yml) | [![Coverage Status](https://coveralls.io/repos/github/danielhrisca/asammdf/badge.svg?branch=master)](https://coveralls.io/github/danielhrisca/asammdf?branch=master) | [![Codacy Badge](https://api.codacy.com/project/badge/Grade/a3da21da90ca43a5b72fc24b56880c99?branch=master)](https://www.codacy.com/app/danielhrisca/asammdf?utm_source=github.com&utm_medium=referral&utm_content=danielhrisca/asammdf&utm_campaign=badger) | [![Documentation Status](http://readthedocs.org/projects/asammdf/badge/?version=master)](http://asammdf.readthedocs.io/en/master/?badge=stable) |

| PyPI | conda-forge |
| ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| [![PyPI version](https://badge.fury.io/py/asammdf.svg)](https://badge.fury.io/py/asammdf) | [![conda-forge version](https://anaconda.org/conda-forge/asammdf/badges/version.svg)](https://anaconda.org/conda-forge/asammdf) |

# Project goals
The main goals for this library are:
Expand Down Expand Up @@ -198,6 +195,7 @@ other optional dependencies
* cChardet : to detect non-standard Unicode encodings
* chardet : to detect non-standard Unicode encodings
* pyqtlet : for GPS window
* isal : for faster zlib compression/decompression

# Benchmarks

Expand Down
6 changes: 0 additions & 6 deletions app.bat

This file was deleted.

Loading

0 comments on commit 2d75772

Please sign in to comment.