diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index ae485e863f..48a3ccc899 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -141,7 +141,7 @@ body: description: | Read the [`pyhf` Code of Conduct][CoC] first. - [CoC]: https://github.com/scikit-hep/pyhf/blob/master/CODE_OF_CONDUCT.md + [CoC]: https://github.com/scikit-hep/pyhf/blob/main/CODE_OF_CONDUCT.md options: - label: I agree to follow the Code of Conduct required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index b8743e39c0..81319c27e7 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -11,5 +11,5 @@ contact_links: The pyhf tutorial is continually updated and provides an in depth walkthrough of how to use the latest release of pyhf. - name: 📝 pyhf Code of Conduct - url: https://github.com/scikit-hep/pyhf/blob/master/CODE_OF_CONDUCT.md + url: https://github.com/scikit-hep/pyhf/blob/main/CODE_OF_CONDUCT.md about: Expectations for how people will interact with each other on pyhf's GitHub. diff --git a/.github/ISSUE_TEMPLATE/documentation-report.yml b/.github/ISSUE_TEMPLATE/documentation-report.yml index 16ef04c98b..bc54d0966e 100644 --- a/.github/ISSUE_TEMPLATE/documentation-report.yml +++ b/.github/ISSUE_TEMPLATE/documentation-report.yml @@ -45,7 +45,7 @@ body: description: | Read the [`pyhf` Code of Conduct][CoC] first. - [CoC]: https://github.com/scikit-hep/pyhf/blob/master/CODE_OF_CONDUCT.md + [CoC]: https://github.com/scikit-hep/pyhf/blob/main/CODE_OF_CONDUCT.md options: - label: I agree to follow the Code of Conduct required: true diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml index b4284da2f5..2e3095a1a4 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.yml +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -73,7 +73,7 @@ body: description: | Read the [`pyhf` Code of Conduct][CoC] first. - [CoC]: https://github.com/scikit-hep/pyhf/blob/master/CODE_OF_CONDUCT.md + [CoC]: https://github.com/scikit-hep/pyhf/blob/main/CODE_OF_CONDUCT.md options: - label: I agree to follow the Code of Conduct required: true diff --git a/.github/ISSUE_TEMPLATE/~release-checklist.md b/.github/ISSUE_TEMPLATE/~release-checklist.md index fcab12d244..7c706fe497 100644 --- a/.github/ISSUE_TEMPLATE/~release-checklist.md +++ b/.github/ISSUE_TEMPLATE/~release-checklist.md @@ -8,10 +8,10 @@ about: Checklist for core developers to complete as part of making a release ## Before Release * [ ] Migrate any unresolved Issues or PRs from the [release GitHub project board](https://github.com/scikit-hep/pyhf/projects/) to a new project board. -* [ ] Verify that there is a release notes file for the release under [``docs/release-notes``](https://github.com/scikit-hep/pyhf/tree/master/docs/release-notes). +* [ ] Verify that there is a release notes file for the release under [``docs/release-notes``](https://github.com/scikit-hep/pyhf/tree/main/docs/release-notes). * [ ] Verify that the release notes files correctly summarize all development changes since the last release. * [ ] Draft email to [``pyhf-announcements`` mailing list](https://groups.google.com/group/pyhf-announcements/subscribe) that summarizes the main points of the release notes and circulate it for development team approval. -* [ ] Update the checklist Issue template in the [``.github/ISSUE_TEMPLATE``](https://github.com/scikit-hep/pyhf/tree/master/.github/ISSUE_TEMPLATE) directory if there are revisions. +* [ ] Update the checklist Issue template in the [``.github/ISSUE_TEMPLATE``](https://github.com/scikit-hep/pyhf/tree/main/.github/ISSUE_TEMPLATE) directory if there are revisions. * [ ] Make a release to [TestPyPI][TestPyPI_pyhf] using the [workflow dispatch event trigger](https://github.com/scikit-hep/pyhf/actions/workflows/publish-package.yml). * [ ] Verify that the project README is displaying correctly on [TestPyPI][TestPyPI_pyhf]. * [ ] Add any new use citations or published statistical models to the [Use and Citations page][citations_page]. @@ -28,7 +28,7 @@ about: Checklist for core developers to complete as part of making a release * [ ] Create a [GitHub release](https://github.com/scikit-hep/pyhf/releases) from the generated PR tag and copy the release notes published to the GitHub release page. The creation of the GitHub release triggers all other release related activities. - [ ] Before pasting in the release notes copy the changes that the GitHub bot has already queued up and pasted into the tag and place them in the "Changes" section of the release notes. If the release notes are published before these are copied then they will be overwritten and you'll have to add them back in by hand. * [ ] Verify there is a new [Zenodo DOI](https://doi.org/10.5281/zenodo.1169739) minted for the release. - - [ ] Verify that the new release archive metadata on Zenodo matches is being picked up as expected from [`CITATION.cff`](https://github.com/scikit-hep/pyhf/blob/master/CITATION.cff). + - [ ] Verify that the new release archive metadata on Zenodo matches is being picked up as expected from [`CITATION.cff`](https://github.com/scikit-hep/pyhf/blob/main/CITATION.cff). * [ ] Verify that a Binder has properly built for the new release. * [ ] Watch for a GitHub notification that there is an automatic PR to the [Conda-forge feedstock](https://github.com/conda-forge/pyhf-feedstock). This may take multiple hours to happen. If there are any changes needed to the Conda-forge release make them **from a personal account** and not from an organization account to have workflows properly trigger. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 9628dcfae8..3d1d57be21 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,6 +1,6 @@ # Description -Please first read [CONTRIBUTING.md](https://github.com/scikit-hep/pyhf/tree/master/CONTRIBUTING.md). +Please first read [CONTRIBUTING.md](https://github.com/scikit-hep/pyhf/tree/main/CONTRIBUTING.md). Please describe the purpose of this pull request in some detail. Reference and link to any relevant issues or pull requests. diff --git a/.github/PULL_REQUEST_TEMPLATE/Bug-Fix.md b/.github/PULL_REQUEST_TEMPLATE/Bug-Fix.md index 6a61f964d4..31220f5b3e 100644 --- a/.github/PULL_REQUEST_TEMPLATE/Bug-Fix.md +++ b/.github/PULL_REQUEST_TEMPLATE/Bug-Fix.md @@ -1,6 +1,6 @@ # Pull Request Description -Please first read [CONTRIBUTING.md](https://github.com/scikit-hep/pyhf/tree/master/CONTRIBUTING.md). +Please first read [CONTRIBUTING.md](https://github.com/scikit-hep/pyhf/tree/main/CONTRIBUTING.md). Please describe the purpose of this pull request in some detail and what bug it fixes. Reference and link to any relevant issues or pull requests (such as the issue in which this bug was first discussed). diff --git a/.github/PULL_REQUEST_TEMPLATE/Feature.md b/.github/PULL_REQUEST_TEMPLATE/Feature.md index cf6d1d8ccc..6ebfb00fe2 100644 --- a/.github/PULL_REQUEST_TEMPLATE/Feature.md +++ b/.github/PULL_REQUEST_TEMPLATE/Feature.md @@ -1,6 +1,6 @@ # Pull Request Description -Please first read [CONTRIBUTING.md](https://github.com/scikit-hep/pyhf/tree/master/CONTRIBUTING.md). +Please first read [CONTRIBUTING.md](https://github.com/scikit-hep/pyhf/tree/main/CONTRIBUTING.md). Please describe the purpose of this pull request in some detail and what the specific feature being added will do. Reference and link to any relevant issues or pull requests (such as the issue in which this feature was first suggested). diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index ef8d0488f9..326df4c9b1 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -240,5 +240,5 @@ jobs: if [ ${{ github.event.inputs.dry_run }} == 'true' ]; then echo "# DRY RUN" else - git push origin master --tags + git push origin main --tags fi diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 71ab409c3a..699a9a517e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,7 +4,7 @@ on: push: pull_request: branches: - - master + - main # Run daily at 0:01 UTC schedule: - cron: '1 0 * * *' @@ -18,11 +18,11 @@ jobs: test: runs-on: ${{ matrix.os }} - # On push events run the CI only on master by default, but run on any branch if the commit message contains '[ci all]' + # On push events run the CI only on main by default, but run on any branch if the commit message contains '[ci all]' if: >- github.event_name != 'push' - || (github.event_name == 'push' && github.ref == 'refs/heads/master') - || (github.event_name == 'push' && github.ref != 'refs/heads/master' && contains(github.event.head_commit.message, '[ci all]')) + || (github.event_name == 'push' && github.ref == 'refs/heads/main') + || (github.event_name == 'push' && github.ref != 'refs/heads/main' && contains(github.event.head_commit.message, '[ci all]')) strategy: matrix: os: [ubuntu-latest] diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 267c1dcf0d..110ca0eb2a 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -2,10 +2,10 @@ name: "CodeQL" on: push: - branches: [master] + branches: [main] pull_request: # branches must be a subset of push branches - branches: [master] + branches: [main] # Run weekly on Sundays at 0:01 UTC schedule: - cron: '1 0 * * 0' diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 26ee073e49..4a680788e3 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -3,12 +3,12 @@ name: Docker Images on: push: branches: - - master + - main tags: - v* pull_request: branches: - - master + - main schedule: - cron: '1 0 * * *' release: @@ -107,8 +107,8 @@ jobs: -c "which curl; which tar" - name: Build and publish to registry - # every PR will trigger a push event on master, so check the push event is actually coming from master - if: github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'scikit-hep/pyhf' + # every PR will trigger a push event on main, so check the push event is actually coming from main + if: github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'scikit-hep/pyhf' id: docker_build_latest uses: docker/build-push-action@v3 with: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 768cd32c9b..cb6fef5e3b 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -3,7 +3,7 @@ name: Docs on: push: branches: - - master + - main pull_request: workflow_dispatch: @@ -86,7 +86,7 @@ jobs: deploy: name: Deploy docs to GitHub Pages - if: github.event_name == 'push' && github.ref == 'refs/heads/master' + if: github.event_name == 'push' && github.ref == 'refs/heads/main' needs: build # Set permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: diff --git a/.github/workflows/merged.yml b/.github/workflows/merged.yml index d3422bc8ad..2f6342cf1e 100644 --- a/.github/workflows/merged.yml +++ b/.github/workflows/merged.yml @@ -15,5 +15,5 @@ jobs: - name: Trigger Binder build run: | # Use Binder build API to trigger repo2docker to build image on Google Cloud and Turing Institute Binder Federation clusters - bash binder/trigger_binder.sh https://gke.mybinder.org/build/gh/scikit-hep/pyhf/master - bash binder/trigger_binder.sh https://turing.mybinder.org/build/gh/scikit-hep/pyhf/master + bash binder/trigger_binder.sh https://gke.mybinder.org/build/gh/scikit-hep/pyhf/main + bash binder/trigger_binder.sh https://turing.mybinder.org/build/gh/scikit-hep/pyhf/main diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml index 33d78c1e7a..c9050ffe48 100644 --- a/.github/workflows/publish-package.yml +++ b/.github/workflows/publish-package.yml @@ -2,12 +2,12 @@ name: publish distributions on: push: branches: - - master + - main tags: - v* pull_request: branches: - - master + - main release: types: [published] workflow_dispatch: @@ -56,9 +56,9 @@ jobs: run: | latest_tag=$(git describe --tags) latest_tag_revlist_SHA=$(git rev-list -n 1 ${latest_tag}) - master_SHA="$(git rev-parse --verify origin/master)" + main_SHA="$(git rev-parse --verify origin/main)" wheel_name=$(find dist/ -iname "*.whl" -printf "%f\n") - if [[ "${latest_tag_revlist_SHA}" != "${master_SHA}" ]]; then # don't check master push events coming from tags + if [[ "${latest_tag_revlist_SHA}" != "${main_SHA}" ]]; then # don't check main push events coming from tags if [[ "${wheel_name}" == *"pyhf-0.1.dev"* || "${wheel_name}" != *"dev"* ]]; then echo "python-build incorrectly named built distribution: ${wheel_name}" echo "python-build is lacking the history and tags required to determine version number" @@ -66,7 +66,7 @@ jobs: return 1 fi else - echo "Push event to origin/master was triggered by push of tag ${latest_tag}" + echo "Push event to origin/main was triggered by push of tag ${latest_tag}" fi echo "python-build named built distribution: ${wheel_name}" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b1a07322ea..69216c270c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -38,7 +38,7 @@ If you would like to make a pull request please: 3. Commit your changes to a feature branch on your fork and push to your branch. 4. Start a pull request to let the project maintainers know you're working on it. 5. Test your changes with `pytest`. -6. Update your fork to make sure your changes don't conflict with the current state of the master branch. +6. Update your fork to make sure your changes don't conflict with the current state of the main branch. 7. Make sure that you've added your name to `docs/contributors.rst`. If you haven't **please** do so by simply appending your name to the bottom of the list. We are thankful for and value your contributions to `pyhf`, not matter the size. diff --git a/README.rst b/README.rst index e0a793aa5b..90facea70e 100644 --- a/README.rst +++ b/README.rst @@ -1,4 +1,4 @@ -.. image:: https://raw.githubusercontent.com/scikit-hep/pyhf/master/docs/_static/img/pyhf-logo-small.png +.. image:: https://raw.githubusercontent.com/scikit-hep/pyhf/main/docs/_static/img/pyhf-logo-small.png :alt: pyhf logo :width: 320 :align: center @@ -8,7 +8,7 @@ pure-python fitting/limit-setting/interval estimation HistFactory-style |GitHub Project| |DOI| |JOSS DOI| |Scikit-HEP| |NSF Award Number| -|Docs from latest| |Docs from master| |Jupyter Book tutorial| |Binder| +|Docs from latest| |Docs from main| |Jupyter Book tutorial| |Binder| |PyPI version| |Conda-forge version| |Supported Python versions| |Docker Hub pyhf| |Docker Hub pyhf CUDA| @@ -70,7 +70,7 @@ Alternatively the statistical model and observational data can be read from its >>> import pyhf >>> import requests >>> pyhf.set_backend("numpy") - >>> url = "https://raw.githubusercontent.com/scikit-hep/pyhf/master/docs/examples/json/2-bin_1-channel.json" + >>> url = "https://raw.githubusercontent.com/scikit-hep/pyhf/main/docs/examples/json/2-bin_1-channel.json" >>> wspace = pyhf.Workspace(requests.get(url).json()) >>> model = wspace.model() >>> data = wspace.data(model) @@ -194,14 +194,14 @@ A one bin example **pyhf** -.. image:: https://raw.githubusercontent.com/scikit-hep/pyhf/master/docs/_static/img/README_1bin_example.png +.. image:: https://raw.githubusercontent.com/scikit-hep/pyhf/main/docs/_static/img/README_1bin_example.png :alt: manual :width: 500 :align: center **ROOT** -.. image:: https://raw.githubusercontent.com/scikit-hep/pyhf/master/docs/_static/img/hfh_1bin_55_50_7.png +.. image:: https://raw.githubusercontent.com/scikit-hep/pyhf/main/docs/_static/img/hfh_1bin_55_50_7.png :alt: manual :width: 500 :align: center @@ -238,14 +238,14 @@ A two bin example **pyhf** -.. image:: https://raw.githubusercontent.com/scikit-hep/pyhf/master/docs/_static/img/README_2bin_example.png +.. image:: https://raw.githubusercontent.com/scikit-hep/pyhf/main/docs/_static/img/README_2bin_example.png :alt: manual :width: 500 :align: center **ROOT** -.. image:: https://raw.githubusercontent.com/scikit-hep/pyhf/master/docs/_static/img/hfh_2_bin_100.0_145.0_100.0_150.0_15.0_20.0_30.0_45.0.png +.. image:: https://raw.githubusercontent.com/scikit-hep/pyhf/main/docs/_static/img/hfh_2_bin_100.0_145.0_100.0_150.0_15.0_20.0_30.0_45.0.png :alt: manual :width: 500 :align: center @@ -363,12 +363,12 @@ and grant `OAC-1450377 `__ and the ``pyhf`` `bump version GitHub Actions workflow -`__. +`__. Release Checklist ~~~~~~~~~~~~~~~~~ @@ -131,8 +131,8 @@ The maintainer needs to: The maintainer **should do a dry run first to make sure everything looks reasonable**. Once they have done that, they can run the `bump version GitHub Actions workflow`_ which will produce a new tag, bump the version of all files defined in `tbump.toml -`__, and then commit and -push these changes and the tag back to the ``master`` branch. +`__, and then commit and +push these changes and the tag back to the ``main`` branch. Deployment ~~~~~~~~~~ diff --git a/docs/examples.rst b/docs/examples.rst index 5579636fc5..8a9cfa19e8 100644 --- a/docs/examples.rst +++ b/docs/examples.rst @@ -4,7 +4,7 @@ Examples Try out in Binder! |Binder| .. |Binder| image:: https://mybinder.org/badge_logo.svg - :target: https://mybinder.org/v2/gh/scikit-hep/pyhf/master?filepath=docs%2Fexamples%2Fnotebooks%2Fbinderexample%2FStatisticalAnalysis.ipynb + :target: https://mybinder.org/v2/gh/scikit-hep/pyhf/main?filepath=docs%2Fexamples%2Fnotebooks%2Fbinderexample%2FStatisticalAnalysis.ipynb Notebooks: diff --git a/src/pyhf/cli/infer.py b/src/pyhf/cli/infer.py index 05894be405..a877469efc 100644 --- a/src/pyhf/cli/infer.py +++ b/src/pyhf/cli/infer.py @@ -63,7 +63,7 @@ def fit( .. code-block:: shell - $ curl -sL https://raw.githubusercontent.com/scikit-hep/pyhf/master/docs/examples/json/2-bin_1-channel.json | pyhf fit --value + $ curl -sL https://raw.githubusercontent.com/scikit-hep/pyhf/main/docs/examples/json/2-bin_1-channel.json | pyhf fit --value \b { @@ -179,7 +179,7 @@ def cls( .. code-block:: shell - $ curl -sL https://raw.githubusercontent.com/scikit-hep/pyhf/master/docs/examples/json/2-bin_1-channel.json | pyhf cls + $ curl -sL https://raw.githubusercontent.com/scikit-hep/pyhf/main/docs/examples/json/2-bin_1-channel.json | pyhf cls \b { diff --git a/src/pyhf/cli/spec.py b/src/pyhf/cli/spec.py index ad335851b8..a39176670f 100644 --- a/src/pyhf/cli/spec.py +++ b/src/pyhf/cli/spec.py @@ -33,7 +33,7 @@ def inspect(workspace, output_file, measurement): .. code-block:: shell - $ curl -sL https://raw.githubusercontent.com/scikit-hep/pyhf/master/docs/examples/json/2-bin_1-channel.json | pyhf inspect + $ curl -sL https://raw.githubusercontent.com/scikit-hep/pyhf/main/docs/examples/json/2-bin_1-channel.json | pyhf inspect Summary ------------------ channels 1 @@ -344,7 +344,7 @@ def digest(workspace, algorithm, output_json): .. code-block:: shell - $ curl -sL https://raw.githubusercontent.com/scikit-hep/pyhf/master/docs/examples/json/2-bin_1-channel.json | pyhf digest + $ curl -sL https://raw.githubusercontent.com/scikit-hep/pyhf/main/docs/examples/json/2-bin_1-channel.json | pyhf digest sha256:dad8822af55205d60152cbe4303929042dbd9d4839012e055e7c6b6459d68d73 """ with click.open_file(workspace, "r", encoding="utf-8") as specstream: @@ -383,12 +383,12 @@ def sort(workspace, output_file): .. code-block:: shell - $ curl -sL https://raw.githubusercontent.com/scikit-hep/pyhf/master/docs/examples/json/2-bin_1-channel.json | pyhf sort | jq '.' | md5 + $ curl -sL https://raw.githubusercontent.com/scikit-hep/pyhf/main/docs/examples/json/2-bin_1-channel.json | pyhf sort | jq '.' | md5 8be5186ec249d2704e14dd29ef05ffb0 .. code-block:: shell - $ curl -sL https://raw.githubusercontent.com/scikit-hep/pyhf/master/docs/examples/json/2-bin_1-channel.json | jq -S '.channels|=sort_by(.name)|.channels[].samples|=sort_by(.name)|.channels[].samples[].modifiers|=sort_by(.name,.type)|.observations|=sort_by(.name)' | md5 + $ curl -sL https://raw.githubusercontent.com/scikit-hep/pyhf/main/docs/examples/json/2-bin_1-channel.json | jq -S '.channels|=sort_by(.name)|.channels[].samples|=sort_by(.name)|.channels[].samples[].modifiers|=sort_by(.name,.type)|.observations|=sort_by(.name)' | md5 8be5186ec249d2704e14dd29ef05ffb0