Skip to content

Commit 35615f6

Browse files
authored
Merge pull request #101 from effigies/doc/contributing-main-dev
chore/doc: Revert main to stable schema, update docs to explain branching
2 parents 7a9afae + da30ada commit 35615f6

File tree

4 files changed

+78
-2
lines changed

4 files changed

+78
-2
lines changed

.github/CONTRIBUTING.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,65 @@ consider:
102102
- first checkout your main: `git checkout main`
103103
- then run: `git reset --hard upstream/main`
104104

105+
## Developing for the validator
106+
107+
When proposing a feature or bug fix, you must decide which branch you will target:
108+
`main` or `dev`.
109+
In most cases you will want `main`, but read below to understand the purposes of
110+
the two branches.
111+
112+
### Branching policy
113+
114+
The BIDS Validator's `main` branch tracks the most recent release version of the specification:
115+
<https://bids-specification.readthedocs.io/en/stable/>.
116+
Pull requests made against the `main` branch should implement features or fix bugs in a way
117+
that preserves consistency with the stable specification.
118+
119+
The `dev` branch is for features that are not yet in the released version of the BIDS
120+
specification.
121+
The purpose of this branch is to verify that proposed rules can be validated and
122+
provide users with preview access to upcoming changes to the validator, increasing the chances
123+
of catching issues with the specification or the validator, prior to release.
124+
Changes to the `dev` branch may be reverted at any time.
125+
126+
### How to prepare a pull request for your target branch
127+
128+
If you're going to target `main`, then start as follows:
129+
130+
```console
131+
git fetch upstream
132+
git switch -c feat/short-desc upstream/main
133+
```
134+
135+
This will create a new branch named `feat/short-desc`
136+
(use `fix/...` for bug-fix branches, `doc/...` for documentation, etc.) starting
137+
from the current state of the `main` branch on the `upstream` remote.
138+
Instead of `short-desc`, use a few words to make the content of your branch
139+
easily identifiable.
140+
141+
Once you have changes committed and ready for review you can run:
142+
143+
```console
144+
git push -u origin feat/short-desc
145+
```
146+
147+
GitHub will then give you a link such as:
148+
<https://github.com/bids-standard/bids-validator/compare/master...username:bids-validator:feat/short-desc?expand=1>.
149+
Follow that link to create a pull request.
150+
151+
While you are creating the pull request, verify that the base branch is set to `main`.
152+
153+
For `dev`, the process is identical:
154+
155+
```console
156+
git fetch upstream
157+
git switch -c feat/short-desc upstream/dev
158+
# Add your feature
159+
git push -u origin feat/short-desc
160+
```
161+
162+
Open PR, set base branch to `dev`.
163+
105164
[link_git]: https://git-scm.com/
106165
[link_handbook]: https://guides.github.com/introduction/git-handbook/
107166
[link_swc_intro]: http://swcarpentry.github.io/git-novice/

.github/workflows/deno_tests.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,20 @@ concurrency:
1313
cancel-in-progress: true
1414

1515
jobs:
16+
debug_info:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
- run: git status
23+
- run: git describe
24+
- run: env
25+
- name: Dump github context
26+
run: echo $GITHUB_CONTEXT | jq .
27+
env:
28+
GITHUB_CONTEXT: ${{ toJson(github) }}
29+
1630
build:
1731
runs-on: ubuntu-latest
1832
steps:
@@ -60,6 +74,9 @@ jobs:
6074
- name: Disable example that requires network access
6175
run: touch tests/data/bids-examples/xeeg_hed_score/.SKIP_VALIDATION
6276
if: ${{ ! matrix.allow-net }}
77+
- name: Disable unreleased examples
78+
run: touch tests/data/bids-examples/dwi_deriv/.SKIP_VALIDATION
79+
if: github.ref_name != 'dev' && github.base_ref != 'dev'
6380
- run: deno test --node-modules-dir=auto $PERMS --coverage=cov/ src/
6481
- name: Collect coverage
6582
run: deno coverage cov/ --lcov --output=coverage.lcov

deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
},
2525
"imports": {
2626
"@ajv": "npm:[email protected]",
27-
"@bids/schema": "jsr:@bids/[email protected].4-dev.10+436d7cde",
27+
"@bids/schema": "jsr:@bids/[email protected].3+2",
2828
"@cliffy/command": "jsr:@effigies/[email protected]",
2929
"@cliffy/table": "jsr:@effigies/[email protected]",
3030
"@hed/validator": "npm:[email protected]",

0 commit comments

Comments
 (0)