diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..769d3c5 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,19 @@ +.github + +*.pyc + +env + +**/__pycache__ +**/.pytest_cache + +.idea/** + +**/dist +**/build +**/*.egg-info* + +tests/* +paper + +.DS_Store \ No newline at end of file diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..43e2629 --- /dev/null +++ b/.flake8 @@ -0,0 +1,10 @@ +[flake8] +exclude = + .git, + __pycache__, + build, + dist, + env, + venv, +max-line-length = 127 +max-complexity=10 \ No newline at end of file diff --git a/.github/workflows/autotest.yml b/.github/workflows/autotest.yml index bbca626..e69c11e 100644 --- a/.github/workflows/autotest.yml +++ b/.github/workflows/autotest.yml @@ -1,4 +1,4 @@ -name: CI workflow +name: test on: # this workflow triggered on below condition [push, pull_request] diff --git a/.github/workflows/main.yml b/.github/workflows/flake8.yml similarity index 65% rename from .github/workflows/main.yml rename to .github/workflows/flake8.yml index bbca626..10069d2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/flake8.yml @@ -1,31 +1,32 @@ -name: CI workflow +name: flake8 on: # this workflow triggered on below condition [push, pull_request] push: - branches: [ master ] + branches: [ main ] pull_request: - branches: [ master ] + branches: [ '*' ] + +# cancel previous similar workflow runs +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: build: runs-on: ubuntu-latest - strategy: - matrix: - python-version: [3.5, 3.6, 3.7, 3.8] 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 }} + python-version: "3.11" - name: Install dependencies run: | python -m pip install --upgrade pip - pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + pip install flake8 - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml new file mode 100644 index 0000000..e986788 --- /dev/null +++ b/.github/workflows/validation.yml @@ -0,0 +1,24 @@ +--- +name: validation + +on: + push: + branches: [main] + pull_request: + branches: [main] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + + validate_cff: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Check whether the citation metadata from CITATION.cff is valid + uses: citation-file-format/cffconvert-github-action@2.0.0 + with: + args: --validate + diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 0000000..00551eb --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,49 @@ +cff-version: 1.2.0 + +title: "brkraw" + +version: "0.3.10" + +abstract: Bruker PvDataset Loader + +message: "If you use this software, please cite it as below." + +repository-code: "https://github.com/BrkRaw/brkraw" + +identifiers: + - description: This is the collection of archived snapshots of all releases + type: doi + value: "10.5281/zenodo.245546149" + +contact: + - email: shlee@unc.edu + family-names: SungHo + given-names: Lee + +authors: + - email: shlee@unc.edu + family-names: SungHo + given-names: Lee + + - email: banwoomi@unc.edu + family-names: Woomi + given-names: Ban + + - family-names: Dumas + given-names: Jaiden + + - family-names: Devenyi + given-names: Gabriel A. + + - email: shihy@neurology.unc.edu + family-names: Yen-Yu + given-names: Ian Shih + +license: GPL-3.0 + +keywords: + - bruker + - data_handler + - converter + - administrator_tool + - brain imaging data structure diff --git a/CODE_OF_CONDUCT b/CODE_OF_CONDUCT.md similarity index 100% rename from CODE_OF_CONDUCT rename to CODE_OF_CONDUCT.md diff --git a/CONTRIBUTING b/CONTRIBUTING deleted file mode 100644 index 3fa4da1..0000000 --- a/CONTRIBUTING +++ /dev/null @@ -1,17 +0,0 @@ -# Contributing - -When contributing to this repository, please first discuss the change you wish to make via issue, -email, or any other method with the owners of this repository before making a change. - -Please note we have a code of conduct, please follow it in all your interactions with the project. - -## Pull Request Process - -1. Ensure any install or build dependencies are removed before the end of the layer when doing a - build. -2. Update the README.md with details of changes to the interface, this includes new environment - variables, exposed ports, useful file locations and container parameters. -3. Increase the version numbers in any examples files and the README.md to the new version that this - Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/). -4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you - do not have permission to do that, you may request the second reviewer to merge it for you. \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bdfaf10..3fa4da1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,3 +1,17 @@ -Here is how to contribute. +# Contributing -TODO: +When contributing to this repository, please first discuss the change you wish to make via issue, +email, or any other method with the owners of this repository before making a change. + +Please note we have a code of conduct, please follow it in all your interactions with the project. + +## Pull Request Process + +1. Ensure any install or build dependencies are removed before the end of the layer when doing a + build. +2. Update the README.md with details of changes to the interface, this includes new environment + variables, exposed ports, useful file locations and container parameters. +3. Increase the version numbers in any examples files and the README.md to the new version that this + Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/). +4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you + do not have permission to do that, you may request the second reviewer to merge it for you. \ No newline at end of file diff --git a/Dockerfile.dev b/Dockerfile.dev index debd4b9..f4bb431 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -1,12 +1,12 @@ # This docker file build a editable image. # You could directly edit the source code at `/home/brkraw to make changes. Or you could mount your brkraw code folder to /home/brkraw -FROM python:3.7 +FROM python:3.11 WORKDIR /home RUN mkdir ./brkraw WORKDIR /home/brkraw COPY . . -RUN python -m pip install -e /home/brkraw +RUN python -m pip install --editable /home/brkraw RUN mkdir /data WORKDIR /data