Skip to content

Commit

Permalink
Merge pull request #101 from effigies/doc/contributing-main-dev
Browse files Browse the repository at this point in the history
chore/doc: Revert main to stable schema, update docs to explain branching
  • Loading branch information
effigies authored Nov 11, 2024
2 parents 7a9afae + da30ada commit 35615f6
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 2 deletions.
59 changes: 59 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,65 @@ consider:
- first checkout your main: `git checkout main`
- then run: `git reset --hard upstream/main`

## Developing for the validator

When proposing a feature or bug fix, you must decide which branch you will target:
`main` or `dev`.
In most cases you will want `main`, but read below to understand the purposes of
the two branches.

### Branching policy

The BIDS Validator's `main` branch tracks the most recent release version of the specification:
<https://bids-specification.readthedocs.io/en/stable/>.
Pull requests made against the `main` branch should implement features or fix bugs in a way
that preserves consistency with the stable specification.

The `dev` branch is for features that are not yet in the released version of the BIDS
specification.
The purpose of this branch is to verify that proposed rules can be validated and
provide users with preview access to upcoming changes to the validator, increasing the chances
of catching issues with the specification or the validator, prior to release.
Changes to the `dev` branch may be reverted at any time.

### How to prepare a pull request for your target branch

If you're going to target `main`, then start as follows:

```console
git fetch upstream
git switch -c feat/short-desc upstream/main
```

This will create a new branch named `feat/short-desc`
(use `fix/...` for bug-fix branches, `doc/...` for documentation, etc.) starting
from the current state of the `main` branch on the `upstream` remote.
Instead of `short-desc`, use a few words to make the content of your branch
easily identifiable.

Once you have changes committed and ready for review you can run:

```console
git push -u origin feat/short-desc
```

GitHub will then give you a link such as:
<https://github.com/bids-standard/bids-validator/compare/master...username:bids-validator:feat/short-desc?expand=1>.
Follow that link to create a pull request.

While you are creating the pull request, verify that the base branch is set to `main`.

For `dev`, the process is identical:

```console
git fetch upstream
git switch -c feat/short-desc upstream/dev
# Add your feature
git push -u origin feat/short-desc
```

Open PR, set base branch to `dev`.

[link_git]: https://git-scm.com/
[link_handbook]: https://guides.github.com/introduction/git-handbook/
[link_swc_intro]: http://swcarpentry.github.io/git-novice/
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/deno_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@ concurrency:
cancel-in-progress: true

jobs:
debug_info:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: git status
- run: git describe
- run: env
- name: Dump github context
run: echo $GITHUB_CONTEXT | jq .
env:
GITHUB_CONTEXT: ${{ toJson(github) }}

build:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -60,6 +74,9 @@ jobs:
- name: Disable example that requires network access
run: touch tests/data/bids-examples/xeeg_hed_score/.SKIP_VALIDATION
if: ${{ ! matrix.allow-net }}
- name: Disable unreleased examples
run: touch tests/data/bids-examples/dwi_deriv/.SKIP_VALIDATION
if: github.ref_name != 'dev' && github.base_ref != 'dev'
- run: deno test --node-modules-dir=auto $PERMS --coverage=cov/ src/
- name: Collect coverage
run: deno coverage cov/ --lcov --output=coverage.lcov
Expand Down
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
"imports": {
"@ajv": "npm:[email protected]",
"@bids/schema": "jsr:@bids/[email protected].4-dev.10+436d7cde",
"@bids/schema": "jsr:@bids/[email protected].3+2",
"@cliffy/command": "jsr:@effigies/[email protected]",
"@cliffy/table": "jsr:@effigies/[email protected]",
"@hed/validator": "npm:[email protected]",
Expand Down

0 comments on commit 35615f6

Please sign in to comment.