forked from LorenFrankLab/spyglass
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master'
- Loading branch information
Showing
295 changed files
with
60,010 additions
and
26,559 deletions.
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,4 @@ | ||
node: $Format:%H$ | ||
node-date: $Format:%cI$ | ||
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$ | ||
ref-names: $Format:%D$ |
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 |
---|---|---|
@@ -1,2 +1,4 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto | ||
|
||
.git_archival.txt export-subst |
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,19 @@ | ||
# Description | ||
|
||
Please include a summary of the changes and the related issue. Please also | ||
include relevant motivation and context. Please list issues fixed or closed by | ||
This PR. | ||
|
||
- Fixes #000: How this PR fixes the issue | ||
- `path/file.py`: Description of the change | ||
- `path/file.py`: Description of the change | ||
- Fixes #000: How this PR fixes the issue | ||
- `path/file.py`: Description of the change | ||
- `path/file.py`: Description of the change | ||
|
||
# Checklist: | ||
|
||
- [ ] This PR should be accompanied by a release: (yes/no/unsure) | ||
- [ ] (If release) I have updated the `CITATION.cff` | ||
- [ ] I have updated the `CHANGELOG.md` | ||
- [ ] I have added/edited docs/notebooks to reflect the changes |
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,47 @@ | ||
name: Publish docs | ||
on: | ||
push: | ||
tags: # See PEP 440 for valid version format | ||
- "*.*.*" # For docs bump, use X.X.XaX | ||
branches: | ||
- test_branch | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
issues: write | ||
repository-projects: write | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
env: | ||
REPO_OWNER: ${{ github.repository_owner }} | ||
permissions: | ||
contents: write | ||
issues: write | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python runtime | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.9 | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Setup - pip & config | ||
run: | | ||
pip install .[docs] | ||
git config user.name 'github-actions[bot]' && git config user.email 'github-actions[bot]@users.noreply.github.com' | ||
- name: Deploy | ||
run: | | ||
echo "OWNER: ${REPO_OWNER}" | ||
bash ./docs/build-docs.sh push $REPO_OWNER | ||
env: | ||
USERNAME: github-actions[bot] | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Run tests | ||
name: Test conda env and run tests | ||
|
||
on: | ||
push: | ||
|
@@ -17,16 +17,6 @@ jobs: | |
env: | ||
OS: ${{ matrix.os }} | ||
PYTHON: '3.8' | ||
# SPYGLASS_BASE_DIR: ./data | ||
# KACHERY_STORAGE_DIR: ./data/kachery-storage | ||
# DJ_SUPPORT_FILEPATH_MANAGEMENT: True | ||
# services: | ||
# datajoint_test_server: | ||
# image: datajoint/mysql | ||
# ports: | ||
# - 3306:3306 | ||
# options: >- | ||
# -e MYSQL_ROOT_PASSWORD=tutorial | ||
steps: | ||
- name: Cancel Workflow Action | ||
uses: styfle/[email protected] | ||
|
@@ -46,12 +36,20 @@ jobs: | |
environment-file: environment.yml | ||
miniforge-variant: Mambaforge | ||
miniforge-version: latest | ||
- name: Install test requirements | ||
run: | | ||
pip install -r requirements-dev.txt | ||
- name: Install spyglass | ||
run: | | ||
pip install -e . | ||
pip install -e .[test] | ||
- name: Download data | ||
env: | ||
UCSF_BOX_TOKEN: ${{ secrets.UCSF_BOX_TOKEN }} | ||
UCSF_BOX_USER: ${{ secrets.UCSF_BOX_USER }} | ||
WEBSITE: ftps://ftp.box.com/trodes_to_nwb_test_data/minirec20230622.nwb | ||
RAW_DIR: /home/runner/work/spyglass/spyglass/tests/_data/raw/ | ||
run: | | ||
mkdir -p $RAW_DIR | ||
wget --recursive --no-verbose --no-host-directories --no-directories \ | ||
--user $UCSF_BOX_USER --password $UCSF_BOX_TOKEN \ | ||
-P $RAW_DIR $WEBSITE | ||
- name: Run tests | ||
run: | | ||
pytest -rP # env vars are set within certain tests |
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,98 @@ | ||
name: Test package building | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- maint/* | ||
tags: | ||
- "*" | ||
pull_request: | ||
branches: | ||
- master | ||
- maint/* | ||
defaults: | ||
run: | ||
shell: bash | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.9 | ||
- run: pip install --upgrade build twine | ||
- name: Build sdist and wheel | ||
run: python -m build | ||
- run: twine check dist/* | ||
- name: Upload sdist and wheel artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: dist | ||
path: dist/ | ||
- name: Build git archive | ||
run: mkdir archive && git archive -v -o archive/archive.tgz HEAD | ||
- name: Upload git archive artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: archive | ||
path: archive/ | ||
test-package: | ||
runs-on: ubuntu-latest | ||
needs: [build] | ||
strategy: | ||
matrix: | ||
package: ['wheel', 'sdist', 'archive'] | ||
steps: | ||
- name: Download sdist and wheel artifacts | ||
if: matrix.package != 'archive' | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: dist | ||
path: dist/ | ||
- name: Download git archive artifact | ||
if: matrix.package == 'archive' | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: archive | ||
path: archive/ | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.9 | ||
- name: Display Python version | ||
run: python -c "import sys; print(sys.version)" | ||
- name: Update pip | ||
run: pip install --upgrade pip | ||
- name: Install wheel | ||
if: matrix.package == 'wheel' | ||
run: pip install dist/*.whl | ||
- name: Install sdist | ||
if: matrix.package == 'sdist' | ||
run: pip install dist/*.tar.gz | ||
- name: Install archive | ||
if: matrix.package == 'archive' | ||
run: pip install archive/archive.tgz | ||
# - name: Install test extras | ||
# run: pip install spyglass[test] | ||
# - name: Run tests | ||
# run: pytest --doctest-modules -v --pyargs spyglass | ||
publish: | ||
name: Upload release to PyPI | ||
runs-on: ubuntu-latest | ||
needs: [test-package] | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/spyglass-neuro | ||
permissions: | ||
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: dist | ||
path: dist/ | ||
- name: Publish package distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
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,13 @@ | ||
# https://github.com/DavidAnson/markdownlint | ||
# https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md | ||
MD007: false # permit indenting 4 spaces instead of 2 | ||
MD013: | ||
line_length: "80" # Line length limits | ||
tables: false # disable for tables | ||
code_blocks: false # disable for code blocks | ||
MD025: false # permit adjacent headings | ||
MD026: false # permit trailing punctuation in headings | ||
MD033: # HTML elements allowed | ||
allowed_elements: | ||
- "img" | ||
MD034: false # Bare URLs OK |
Oops, something went wrong.