-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor codebase into installable "reprostim" Python module (+ reprostim-videocapture) package #124
Open
yarikoptic
wants to merge
26
commits into
master
Choose a base branch
from
rf-library
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Refactor codebase into installable "reprostim" Python module (+ reprostim-videocapture) package #124
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
e4433a8
Initial doc sketch for how to RF codebase
yarikoptic baf9691
ReproStim library empty project with hatch, #116.
vmdocua 9e51900
ReproStim library empty project with hatch, #116.
vmdocua 85db7ca
Move Capture to reprostim-videocapture, #116.
vmdocua 6a53de5
Move Capture to reprostim-videocapture, #116.
vmdocua 92d6a7e
Move Capture to reprostim-videocapture, #116.
vmdocua d6b89c6
Restrict python package distribution only to src/reprostim and related
yarikoptic 6178449
Added base files for intuit auto release
yarikoptic e54ab28
Added codespell action, #124.
vmdocua 0515d43
Fixed codespell issues, #124.
vmdocua d43b4af
Fixed codespell issues, #124.
vmdocua 6643b2b
Turned on pre-commit hook, #124.
vmdocua 7bd75d1
Stick to python 3.10 version (as the best for psychopy), and add pyte…
vmdocua 58af70e
Turned on pre-commit hook, #124.
vmdocua c00d785
License placeholder, #124.
vmdocua 35e64d9
Hatch reprostim cli stub, #124.
vmdocua 32d9188
Hatch reprostim cli stub, #124.
vmdocua 553c852
Hatch reprostim cli stub, #124.
vmdocua 91ee2bb
Update authors and basic dependencies, #124.
vmdocua bd121c4
Update dependencies and added optional ones like: test, audio, psycho…
vmdocua be4d726
Update LICENSE.txt
vmdocua 31c0a9e
Update docs/design/rf-library.md
vmdocua a7d224c
Created stub/placeholder for commands like qr-parse, timesync-stimuli…
vmdocua a071c88
Created stub/placeholder for commands like qr-parse, timesync-stimuli…
vmdocua 9719819
Normalize code with pre-commit hooks, #124.
vmdocua 32e8994
Reworked parse_qQR.py to "reprostim qr-parse" command, setup logging …
vmdocua File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"onlyPublishWithReleaseLabel": true, | ||
"baseBranch": "master", | ||
"author": "DANDI Bot <[email protected]>", | ||
"noVersionPrefix": true, | ||
"plugins": [ | ||
"git-tag", | ||
[ | ||
"exec", | ||
{ | ||
"afterRelease": "python -m build && twine upload dist/*" | ||
} | ||
], | ||
"released" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
acend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[codespell] | ||
ignore-words = .codespell-ignore | ||
skip = venv,reprostim-capture,build,cmake-build-debug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
name: Codespell | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
codespell: | ||
name: Check for spelling errors | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Codespell | ||
uses: codespell-project/actions-codespell@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
--- | ||
name: Test with pytest and hatch | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
pytest: | ||
name: Test with pytest | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python: | ||
- '3.10' | ||
steps: | ||
- name: Configure environment | ||
run: | | ||
git config --global user.name "reprostim-test" | ||
git config --global user.email "[email protected]" | ||
uname -a | ||
date -Is | ||
date -u | ||
- name: Checkout source code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
|
||
- name: Install hatch and virtual environment | ||
run: | | ||
pwd | ||
ls -l | ||
pip install --upgrade pip | ||
pip install hatch | ||
hatch env create | ||
shell: bash | ||
|
||
- name: Run pytest | ||
run: | | ||
hatch run pytest --cov=. --cov-report=xml | ||
shell: bash | ||
|
||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v3 | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Auto-release on PR merge | ||
|
||
on: | ||
# ATM, this is the closest trigger to a PR merging | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
auto-release: | ||
runs-on: ubuntu-latest | ||
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')" | ||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Download latest auto | ||
run: | | ||
auto_download_url="$(curl -fsSL https://api.github.com/repos/intuit/auto/releases/latest | jq -r '.assets[] | select(.name == "auto-linux.gz") | .browser_download_url')" | ||
wget -O- "$auto_download_url" | gunzip > ~/auto | ||
chmod a+x ~/auto | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Install build & twine | ||
run: python -m pip install build twine | ||
|
||
- name: Create release | ||
run: ~/auto shipit -vv | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | ||
|
||
# vim:set sts=2: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.6.0 | ||
hooks: | ||
- id: check-added-large-files | ||
- id: check-json | ||
- id: check-toml | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
|
||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.13.2 | ||
hooks: | ||
- id: isort | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 24.4.2 | ||
hooks: | ||
- id: black | ||
|
||
- repo: https://github.com/pycqa/flake8 | ||
rev: 7.0.0 | ||
hooks: | ||
- id: flake8 | ||
# B008 Do not perform function calls in argument defaults. | ||
# A003 class attribute "id" is shadowing a python builtin | ||
args: ["-j8", "--ignore=B008,A003", "--max-line-length=89"] | ||
additional_dependencies: | ||
- flake8-bugbear | ||
- flake8-builtins | ||
# - flake8-unused-arguments | ||
|
||
exclude: '^src/reprostim-capture/.*|.codespellrc' | ||
|
||
default_language_version: | ||
python: python3.10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2020-2024 ReproNim Team | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall -- let's follow the https://reuse.software/spec-3.3/ so there would be
LICENSES/
folder.