Skip to content

Commit

Permalink
Merge pull request #5 from sinhaharsh/master
Browse files Browse the repository at this point in the history
Changes necessary for protocol for release of MRdataset
  • Loading branch information
raamana authored Nov 29, 2023
2 parents 7cd9df3 + 6a7f153 commit 211795a
Show file tree
Hide file tree
Showing 12 changed files with 943 additions and 370 deletions.
21 changes: 21 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[flake8]
# If you feel that flake8 is not reading these settings, update the
# flake8 section in setup.cfg
basepython = python
deps = flake8
commands = flake8 protocol
# E203 - whitespace before ':'
ignore =
E203,
exclude =
docs,
*/_version.py,
*/tests/*.py,
__init__.py,
filename = *.py
max-line-length = 100
max-complexity = 12
accept-encodings = utf-8
inline-quotes = single
multiline-quotes = double
docstring-quotes = double
39 changes: 39 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: tests

on:
push:
branches:
- master

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ "3.8" ]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements_dev.txt ]; then pip install -r requirements_dev.txt; fi
pip install .
- 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: |
pytest
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,6 @@ ENV/

# mypy
.mypy_cache/

# protocol
*.xml
17 changes: 13 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ clean-test: ## remove test and coverage artifacts
rm -fr .pytest_cache

lint: ## check style with flake8
flake8 protocol tests
flake8 protocol

test: ## run tests quickly with the default Python
py.test
Expand All @@ -66,13 +66,13 @@ coverage: ## check code coverage quickly with the default Python
$(BROWSER) htmlcov/index.html

docs: ## generate Sphinx HTML documentation, including API docs
rm -f docs/protocol.rst
rm -f docs/modules.rst
sphinx-apidoc -o docs/ protocol
$(MAKE) -C docs clean
$(MAKE) -C docs html
$(BROWSER) docs/_build/html/index.html

gh-pages: ## copy to gh-pages folder
cp -r docs/_build/html/* ../protocol-gh-pages/

servedocs: docs ## compile the docs watching for changes
watchmedo shell-command -p '*.rst' -c '$(MAKE) -C docs html' -R -D .

Expand All @@ -86,3 +86,12 @@ dist: clean ## builds source and wheel package

install: clean ## install the package to the active Python's site-packages
python setup.py install

merge:
git switch mrdsv2
git push
git switch master
git merge mrdsv2
git push origin master
git switch mrdsv2

Loading

0 comments on commit 211795a

Please sign in to comment.