Skip to content

Commit

Permalink
Merge pull request #1 from bids-standard/master
Browse files Browse the repository at this point in the history
Upload changes
  • Loading branch information
josator2 authored Jun 10, 2019
2 parents ba9071f + 529a378 commit aae2be8
Show file tree
Hide file tree
Showing 44 changed files with 2,240 additions and 446 deletions.
118 changes: 118 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,121 @@ jobs:
command: pipenv run mkdocs build --clean --strict --verbose
- store_artifacts:
path: site

# Auto changelog collector
github-changelog-generator:
working_directory: ~/build
docker:
- image: ferrarimarco/github-changelog-generator:1.14.3
steps:
- setup_remote_docker:
version: 17.11.0-ce
- checkout
- run:
name: Build changelog
working_directory: ~/build
command: |
if (git log -1 --pretty=%s | grep Merge*) && (! git log -1 --pretty=%b | grep REL:) ; then
github_changelog_generator --user bids-standard --project bids-specification --token ${CHANGE_TOKEN} --output ~/build/CHANGES.md --base ~/build/src/pregh-changes.md --header-label Changelog --no-issues --no-issues-wo-labels --no-filter-by-milestone --no-compare-link --pr-label ""
cat ~/build/CHANGES.md
mv ~/build/CHANGES.md ~/build/src/CHANGES.md
else
echo "Commit or Release, do nothing"
fi
- persist_to_workspace:
root: .
paths: src

# Clear remark test
remark:
working_directory: ~
docker:
- image: node:latest
steps:
- checkout
- attach_workspace:
at: ~/build
- run:
name: update-npm
command: |
cd ~
npm install npm@latest
- run:
name: get remark
command: |
cd ~
npm install remark remark-cli
- run:
name: get remark styles
command: |
cd ~
npm install remark-cli@5.0.0 remark-lint@6.0.2 remark-preset-lint-recommended@3.0.2 remark-preset-lint-markdown-style-guide@2.1.2
- run: # remark the auto generated changes.md
name: remark on autogenerated CHANGES.md
command: |
cd ~/project
if (git log -1 --pretty=%s | grep Merge*) && (! git log -1 --pretty=%b | grep REL:) ; then
mkdir ~/project/src/tmp
cat ~/build/src/CHANGES.md
cp ~/build/src/CHANGES.md ~/project/src/CHANGES.md
~/node_modules/.bin/remark ~/project/src/CHANGES.md -o ~/project/src/tmp/CHANGES.md
~/node_modules/.bin/remark ~/project/src/tmp/CHANGES.md --frail
else
echo "Commit or Release, do nothing"
mkdir ~/project/src/tmp
touch ~/project/src/tmp/empty.txt
fi
- persist_to_workspace:
root: ~/project/src
paths: tmp

# Push built changelog to repo
Changelog-bot:
working_directory: ~/build
docker:
- image: circleci/openjdk:8-jdk
steps:
- setup_remote_docker:
version: 17.11.0-ce
- checkout
- attach_workspace:
at: ~/build
- deploy:
name: Changelog deployment
working_directory: ~/build
command: |
if (git log -1 --pretty=%s | grep Merge*) && (! git log -1 --pretty=%b | grep REL:) ; then
mv ~/build/tmp/CHANGES.md ~/build/src/CHANGES.md
merge_messsge=$(git log -1 | grep Merge | grep "pull")
PR_number=$(echo $merge_messsge | cut -d ' ' -f 4)
git config credential.helper 'cache --timeout=120'
git config user.email "franklin.feingold@gmail.com"
git config user.name "Changelog-bot"
git add ~/build/src/CHANGES.md
git commit -m "[DOC] Auto-generate changelog entry for PR ${PR_number}"
git push https://${CHANGE_TOKEN}@github.com/bids-standard/bids-specification.git master
else
echo "Commit or Release, do nothing"
fi
workflows:
version: 2
search_build:
jobs:
- build
- github-changelog-generator:
filters:
branches:
only: master
- remark:
requires:
- github-changelog-generator
filters:
branches:
only: master
- Changelog-bot:
requires:
- remark
filters:
branches:
only: master
5 changes: 4 additions & 1 deletion .remarkrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"plugins": [
"preset-lint-markdown-style-guide",
["lint-no-duplicate-headings", false]
["lint-no-duplicate-headings", false],
["lint-list-item-indent", "tab-size"],
["lint-emphasis-marker", "consistent"],
["lint-maximum-line-length", false]
]
}
16 changes: 16 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This files DOES NOT list people responsible for maintenance of different parts of
# the specification. It merely serves the purpose of notifying interested
# contributors when a new Pull Request that proposes changes to a particular file
# is submitted. If you would like to subscribe to such notifications (in a form of a
# Request for Review) please add your GitHub username next to the file you want to
# monitor below.

# Add your GitHub name below to get notified about proposed releases
/src/CHANGES.md @chrisgorgo @sappelhoff @CPernet

# Individual sections
/src/01-common-principles.md @chrisgorgo @DimitriPapadopoulos
/src/04-modality-specific-files/01-magnetic-resonance-imaging-data.md @chrisgorgo
/src/04-modality-specific-files/03-electroencephalography.md @sappelhoff @ezemikulan
/src/04-modality-specific-files/04-intracranial-electroencephalography.md @ezemikulan
/src/99-appendices/06-meg-file-formats.md @monkeyman192
26 changes: 23 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ The specification documents follow the [Markdown Style Guide](http://www.cirosan
You
can validate your changes against the guide using [remark](https://github.com/remarkjs/remark-lint) which works as a
[standalone command line tool](https://github.com/remarkjs/remark/tree/master/packages/remark-cli) as well as [a plugin for various text editors](https://github.com/remarkjs/remark-lint#editor-integrations). Remark preserves consistent markdown styling across the contributions. Please ensure before submitting a contribution that you do not have any linter errors in your text editor.
You can also use [prettier](https://github.com/prettier/prettier) to automatically correct some of the style issuse that might be found in the proposed changes.
You can also use [prettier](https://github.com/prettier/prettier) to automatically correct some of the style issues that might be found in the proposed changes.

We have deployed a continous integrator ([circle CI](https://circleci.com/)) to further allow for integrating changes continously. The CI is testing that the changes are inline with our standard styling.
We have deployed a continuous integrator ([circle CI](https://circleci.com/)) to further allow for integrating changes continuously. The CI is testing that the changes are inline with our standard styling.

GitHub has a helpful page on [getting started with writing and formatting on GitHub](https://help.github.com/articles/getting-started-with-writing-and-formatting-on-github).

Expand Down Expand Up @@ -95,9 +95,25 @@ Try to keep the changes focused. If you submit a large amount of work in all in

#### 4. Submit a [pull request](https://help.github.com/articles/about-pull-requests/)

Please keep the title of your pull request short but informative - it will
appear in the [changelog](src/CHANGES.md).

Use one of the following prefixes in the title of your pull request:
- `[ENH]` - enhancement of the specification that adds a new feature or
support for a new data type
- `[FIX]` - fix of a typo or language clarification
- `[INFRA]` - changes to the infrastructure automating the specification
release (for example building HTML docs etc.)
- `[MISC]` - everything else including changes to the file listing
contributors

If you are opening a pull request to obtain early feedback, but the changes
are not ready to be merged (a.k.a. Work in Progress pull request) please
use a [draft pull request](https://github.blog/2019-02-14-introducing-draft-pull-requests/).

A member of the BIDS Specification team will review your changes to confirm that they can be merged into the main codebase.

A [review](https://help.github.com/articles/about-pull-request-reviews/) will probably consist of a few questions to help clarify the work you've done. Keep an eye on your github notifications and be prepared to join in that conversation.
A [review](https://help.github.com/articles/about-pull-request-reviews/) will probably consist of a few questions to help clarify the work you've done. Keep an eye on your GitHub notifications and be prepared to join in that conversation.

You can update your [fork](https://help.github.com/articles/about-forks/) of the BIDS Specification and the pull request will automatically update with those commits. You don't need to submit a new pull request when you make a change in response to a review.

Expand All @@ -110,6 +126,10 @@ GitHub has a [nice introduction](https://help.github.com/articles/github-flow/)

<br>

## How the decision to merge a pull request is made?

The decision-making rules are outlined in [DECISION-MAKING.md](DECISION-MAKING.md).

## Recognizing contributions

BIDS follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification, so we welcome and recognize all contributions from documentation to testing to code development. You can see a list of current contributors in the [BIDS specification](https://github.com/bids-standard/bids-specification/blob/master/src/99-appendices/01-contributors.md).
Expand Down
106 changes: 106 additions & 0 deletions DECISION-MAKING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Decision-making rules

## Introduction

The Brain Imaging Data Structure (BIDS) community set out the following
decision-making rules with the intention to:

- Strive for consensus.
- Promote open discussions.
- Minimize the administrative burden.
- Provide a path for when consensus cannot be made.
- Grow the community.
- Maximize the [bus factor](https://en.wikipedia.org/wiki/Bus_factor) of the
project.

The rules outlined below are inspired by the [lazy consensus system used in the Apache Foundation](https://www.apache.org/foundation/voting.html)
and heavily depends on [GitHub Pull Request Review system](https://help.github.com/articles/about-pull-requests/).

## Definitions

**Repository** - [https://github.com/bids-standard/bids-specification](https://github.com/bids-standard/bids-specification)

**Contributor** - a person listed in the Appendix I: Contributors. The
community decides on the content of this file using the same process as any
other change to the Repository (see below) allowing the meaning of "Contributor"
to evolve independently of the Decision-making rules.

**Maintainer** - a Contributor responsible for the long term health of the
project and the community. Maintainers have additional rights (see Rules)
helping them to resolve conflicts and increase the pace of the development
when necessary. Current Maintainers:

| Name | Time commitment |
|-----------------------------------------------------------------|-----------------|
| Stefan Appelhoff ([@sappelhoff](https://github.com/sappelhoff)) | 5h/week |

## Rules

1. Every modification of the specification (including a correction of a typo,
adding a new Contributor, an extension adding support for a new data type, or
others) or proposal to release a new version needs to be done via a Pull
Request (PR) to the Repository.
1. Anyone can open a PR (this action is not limited to Contributors).
1. PRs adding new Contributors must also add their GitHub names to the
[CODEOWNERS](CODEOWNERS) file.
1. A PR is eligible to be merged if and only if these conditions are met:
1. The last commit is at least 5 working days old to allow the community to
evaluate it.
1. The PR features at least two [Reviews that Approve](https://help.github.com/articles/about-pull-request-reviews/#about-pull-request-reviews)
the PR from Contributors of which neither is the author of the PR. The reviews
need to be made after the last commit in the PR (equivalent to
[Stale review dismissal](https://help.github.com/articles/enabling-required-reviews-for-pull-requests/)
option on GitHub).
1. Does not feature any [Reviews that Request changes](https://help.github.com/articles/about-required-reviews-for-pull-requests/).
1. Does not feature "WIP" in the title (Work in Progress).
1. Passes all automated tests.
1. Is not proposing a new release or has been approved by at least one
Maintainer (i.e., PRs proposing new releases need to be approved by at
least one Maintainer).
1. A Maintainer can merge any PR - even if it's not eligible to merge according
to Rule 4.
1. Any Contributor can Review a PR and Request changes. If a Contributor
Request changes they need to provide an explanation what changes
should be added and justification of their importance. Reviews requesting
changes can also be used to request more time to review a PR.
1. A Contributor that Requested changes can Dismiss their own review or Approve
changes added by the Contributor who opened the PR.
1. If the author of a PR and Contributor who provided Review that Requests
changes cannot find a solution that would lead to the Contributor dismissing
their review or accepting the changes the Review can be Dismissed with a
vote or by a Maintainer. Rules governing voting:
1. A Vote can be triggered by any Contributor, but only after 5 working days
from the time a Review Requesting Changes has been raised and in case a
Vote has been triggered previously no sooner than 15 working days since
its conclusion.
1. Only Contributors can vote, each contributor gets one vote.
1. A Vote ends after 5 working days or when all Contributors have voted
(whichever comes first).
1. A Vote freezes the PR - no new commits or Reviews Requesting changes can
be added to it while a vote is ongoing. If a commit is accidentally made
during that period it should be reverted.
1. The quorum for a Vote is 30% of all Contributors.
1. The outcome of the vote is decided based on a simple majority.

## Comments

1. Researchers preparing academic manuscripts describing work that has been
merged into this repository are strongly encouraged to invite all
Maintainers as co-authors as a form of appreciation for their work.
1. There are no restrictions on how the content of the PR is prepared. For
example it is perfectly fine for a PR to consist of content developed by a
group of experts over an extended period of time via in person meetings and
online collaborations using a Google Document.
1. To facilitate triage of incoming PR you can subscribe to
notifications for new PRs proposing changes to specific files. To do this
add your GitHub name next to the file you want to subscribe to in the
[CODEOWNERS](CODEOWNERS). This way you will be ask to review each relevant
PR. Please mind that lack of your review will not prevent the PR from being
merged so if you think the PR needs your attention, please review it
promptly or request more time via Request changes.
1. Releases are triggered the same way as any other change - via a PR.
1. PRs MUST be merged using the "Create a merge commit" option in GitHub (i.e.,
the "merge pull request" option). This is necessary for our automatic
changelog generator to do its work reliably. See the [GitHub help page](https://help.github.com/en/articles/about-merge-methods-on-github)
for information on merge methods. See the changelog generator implementation
in our [circleci configuration file](./.circleci/config.yml).
Binary file added Logo-transparent-background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name = "pypi"

[packages]
mkdocs = "==1.0.4"
mkdocs-material = "==3.0.4"
mkdocs-material = "==4.1.2"

[dev-packages]

Expand Down
Loading

0 comments on commit aae2be8

Please sign in to comment.