Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ platform: x64
configuration:
- '3.10'

# only build on 'master' and pull requests targeting it
# only build on 'master' / 'main' and pull requests targeting it

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we keep master here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we need it for CI on this PR to still be triggered.

So it could be removed as soon as this is merged and the default branch switches to main.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've put up a follow-up removing these: #7353

branches:
only:
- master
- main

environment:
matrix:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ name: Build
on:
push:
branches:
- master
- main
pull_request:
branches:
- main
- master

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar question: aren't all PRs immediately rebased after rename?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@guolinke asked that we preserve master indefinitely (but just not update it any more), so I was thinking of doing this as changing the default branch not "renaming" master to main.

GitHub handles a lot with renaming (https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository/renaming-a-branch), but the renaming does not extend to SSH-base git clones

$ git clone --branch master git@github.com:dask/distributed.git
Cloning into 'distributed'...
fatal: Remote branch master not found in upstream origin

But thinking about it some more, renaming via GitHub's feature for that (https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository/renaming-a-branch) would be easier and seems like it's handle most redirections.

And I guess anyone directly trying to clone from master probably really wants "latest" and it'd be better to alert them to the need to update to main than for them to silently keep getting a frozen-in-time-branch.

@guolinke could you read that link and let me know if it'd be ok to rename master to main instead of preserving master?

I guess this is what other projects have done, e.g. if you go to https://github.com/dask/distributed/tree/master you'll be redirected to https://github.com/dask/distributed/tree/main.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'd be strongly in favor of renaming via GitHub's dedicated feature 😅

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've asked @guolinke for his opinion in the private maintainer chat too. Hoping we can come to an agreement here and resolve this to make it part of the v4.7.0 release.

I know he's busy with other things and may be hard to reach.

If we don't hear back by July 25 (that'll have been 2 months), I'm comfortable moving forward with the "renaming" option and with the release. I always want to defer to Guolin's opinion on major things like this affecting the project, but we also need to keep the project moving forward and he already approved making the default branch main (it's only the exact mechanism that's a question here).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @borchero , Guolin approved doing the rename privately, so I'm ready to move forward with that approach. Thanks for the nudge!

I still think we need these master lines in GitHub Actions configurations temporarily to keep CI running on this PR (and then a follow-up PR to remove them).

I've also updated the plan in the "Approach" section of #7034

Could you take another look here and approve if you think the PR has all the changes we'd want on the default branch before making the switch?

Once you approve this, I'll merge it and work on all the other steps. And then we could hopefully be ready to do the release as soon as this week 😁


# automatically cancel in-progress builds if another commit is pushed
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ name: C++
on:
push:
branches:
- master
- main
pull_request:
branches:
- main
- master

# automatically cancel in-progress builds if another commit is pushed
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/optional_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Optional checks
on:
pull_request:
branches:
- main
- master

# automatically cancel in-progress builds if another commit is pushed
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/python_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ name: Python-package
on:
push:
branches:
- master
- main
pull_request:
branches:
- main
- master

# automatically cancel in-progress builds if another commit is pushed
Expand Down Expand Up @@ -477,8 +478,8 @@ jobs:
- test
- test-linux-aarch64
runs-on: ubuntu-latest
# publish whenever a new commit is pushed to 'master'
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
# publish whenever a new commit is pushed to 'main'
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
environment:
name: nightly-python-uploads
url: https://anaconda.org/lightgbm-packages/lightgbm
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/r_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ name: R-package
on:
push:
branches:
- master
- main
pull_request:
branches:
- main
- master

# automatically cancel in-progress builds if another commit is pushed
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Release Drafter
on:
push:
branches:
- master
- main

# only 1 job running in the repo at any time
concurrency:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/static_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ name: Static Analysis
on:
push:
branches:
- master
- main
pull_request:
branches:
- main
- master

# automatically cancel in-progress builds if another commit is pushed
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/swig.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ name: SWIG
on:
push:
branches:
- master
- main
pull_request:
branches:
- main
- master

# automatically cancel in-progress builds if another commit is pushed
Expand Down
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ Your help is very valuable to make it better for everyone.

## How to Contribute

- Check the [Feature Requests Hub](https://github.com/lightgbm-org/LightGBM/issues/2302), and submit pull requests to address chosen issue. If you need development guideline, you can check the [Development Guide](https://github.com/lightgbm-org/LightGBM/blob/master/docs/Development-Guide.rst) or directly ask us in Issues/Pull Requests.
- Contribute to the [tests](https://github.com/lightgbm-org/LightGBM/tree/master/tests) to make it more reliable.
- Contribute to the [documentation](https://github.com/lightgbm-org/LightGBM/tree/master/docs) to make it clearer for everyone.
- Contribute to the [examples](https://github.com/lightgbm-org/LightGBM/tree/master/examples) to share your experience with other users.
- Add your stories and experience to [Awesome LightGBM](https://github.com/lightgbm-org/LightGBM/blob/master/examples/README.md). If LightGBM helped you in a machine learning competition or some research application, we want to hear about it!
- Check the [Feature Requests Hub](https://github.com/lightgbm-org/LightGBM/issues/2302), and submit pull requests to address chosen issue. If you need development guideline, you can check the [Development Guide](https://github.com/lightgbm-org/LightGBM/blob/main/docs/Development-Guide.rst) or directly ask us in Issues/Pull Requests.
- Contribute to the [tests](https://github.com/lightgbm-org/LightGBM/tree/main/tests) to make it more reliable.
- Contribute to the [documentation](https://github.com/lightgbm-org/LightGBM/tree/main/docs) to make it clearer for everyone.
- Contribute to the [examples](https://github.com/lightgbm-org/LightGBM/tree/main/examples) to share your experience with other users.
- Add your stories and experience to [Awesome LightGBM](https://github.com/lightgbm-org/LightGBM/blob/main/examples/README.md). If LightGBM helped you in a machine learning competition or some research application, we want to hear about it!
- [Open an issue](https://github.com/lightgbm-org/LightGBM/issues) to report problems or recommend new features.

## Development Guide
Expand Down
14 changes: 7 additions & 7 deletions MAINTAINING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ See https://pixi.prefix.dev/latest/ for more details.

### Step 1: Put up a Release PR

Create a pull request into `master` which prepares the source code for release.
Create a pull request into `main` which prepares the source code for release.

Copy the description and checklist from the previous release PR (for example: https://github.com/lightgbm-org/LightGBM/pull/6796).

Expand All @@ -41,11 +41,11 @@ and the PR should be used to discuss what makes it into the release.

Once the PR is approved, merge it.

Do not merge any other PRs into `master` until the rest of the release is complete.
Do not merge any other PRs into `main` until the rest of the release is complete.

### Step 3: Wait for a New CI Run on `master`
### Step 3: Wait for a New CI Run on `main`

Wait for all CI runs triggered by the merge to `master` to complete successfully.
Wait for all CI runs triggered by the merge to `main` to complete successfully.

These runs build and test the official artifacts that will be attached to the GitHub release and published to package managers.

Expand All @@ -56,7 +56,7 @@ Navigate to https://github.com/lightgbm-org/LightGBM/releases.
Click "edit" on the draft release that `release-drafter` has created there.

* update the tag and release title to match the version of LightGBM, in the format `v{major}.{minor}.{patch}`
* ensure that tag points at the commit on ``master`` created by merging the release PR
* ensure that tag points at the commit on `main` created by merging the release PR

When you're satisfied with the state of the release, click "Publish release".

Expand All @@ -77,7 +77,7 @@ gh release upload \

Where:

* `COMMIT_ID` = full commit hash of the commit on `master` corresponding to the release
* `COMMIT_ID` = full commit hash of the commit on `main` corresponding to the release
* `TAG` = the tag for the release (e.g. `v4.6.0`)

### Step 6: Complete All Other Post-merge Release Steps
Expand All @@ -88,7 +88,7 @@ See the release checklist on the PR for details.

## Nightly Packages

Nightly packages for the `lightgbm` Python package are uploaded to https://anaconda.org/lightgbm-packages on every merge to `master`.
Nightly packages for the `lightgbm` Python package are uploaded to https://anaconda.org/lightgbm-packages on every merge to `main`.

That's done using an upload token stored in a secret in CI.
Those tokens expire after 1 year.
Expand Down
2 changes: 1 addition & 1 deletion R-package/R/aliases.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
}

# [description]
# Per https://github.com/lightgbm-org/LightGBM/blob/master/docs/Parameters.rst#metric,
# Per https://github.com/lightgbm-org/LightGBM/blob/main/docs/Parameters.rst#metric,
# a few different strings can be used to indicate "no metrics".
# [returns]
# A character vector
Expand Down
20 changes: 10 additions & 10 deletions R-package/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ Rscript build_r.R --use-mingw

#### Mac OS Preparation

You can perform installation either with **Apple Clang** or **gcc**. In case you prefer **Apple Clang**, you should install **OpenMP** (details for installation can be found in [Installation Guide](https://github.com/lightgbm-org/LightGBM/blob/master/docs/Installation-Guide.rst#apple-clang)) first. In case you prefer **gcc**, you need to install it (details for installation can be found in [Installation Guide](https://github.com/lightgbm-org/LightGBM/blob/master/docs/Installation-Guide.rst#gcc)) and set some environment variables to tell R to use `gcc` and `g++`. If you install these from Homebrew, your versions of `g++` and `gcc` are most likely in `/usr/local/bin`, as shown below.
You can perform installation either with **Apple Clang** or **gcc**. In case you prefer **Apple Clang**, you should install **OpenMP** (details for installation can be found in [Installation Guide](https://github.com/lightgbm-org/LightGBM/blob/main/docs/Installation-Guide.rst#apple-clang)) first. In case you prefer **gcc**, you need to install it (details for installation can be found in [Installation Guide](https://github.com/lightgbm-org/LightGBM/blob/main/docs/Installation-Guide.rst#gcc)) and set some environment variables to tell R to use `gcc` and `g++`. If you install these from Homebrew, your versions of `g++` and `gcc` are most likely in `/usr/local/bin`, as shown below.

```
# replace 8 with version of gcc installed on your machine
Expand Down Expand Up @@ -176,7 +176,7 @@ Note: for the build with Visual Studio/VS Build Tools in Windows, you should use

### Installing a GPU-enabled Build

You will need to install Boost and OpenCL first: details for installation can be found in [Installation-Guide](https://github.com/lightgbm-org/LightGBM/blob/master/docs/Installation-Guide.rst#build-gpu-version).
You will need to install Boost and OpenCL first: details for installation can be found in [Installation-Guide](https://github.com/lightgbm-org/LightGBM/blob/main/docs/Installation-Guide.rst#build-gpu-version).

After installing these other libraries, follow the steps in ["Installing from Source with CMake"](#install). When you reach the step that mentions `build_r.R`, pass the flag `--use-gpu`.

Expand Down Expand Up @@ -230,15 +230,15 @@ As of version 3.0.0, this is no longer supported. If building from source is dif
Examples
--------

Please visit [demo](https://github.com/lightgbm-org/LightGBM/tree/master/R-package/demo):
Please visit [demo](https://github.com/lightgbm-org/LightGBM/tree/main/R-package/demo):

* [Basic walkthrough of wrappers](https://github.com/lightgbm-org/LightGBM/blob/master/R-package/demo/basic_walkthrough.R)
* [Boosting from existing prediction](https://github.com/lightgbm-org/LightGBM/blob/master/R-package/demo/boost_from_prediction.R)
* [Early Stopping](https://github.com/lightgbm-org/LightGBM/blob/master/R-package/demo/early_stopping.R)
* [Cross Validation](https://github.com/lightgbm-org/LightGBM/blob/master/R-package/demo/cross_validation.R)
* [Multiclass Training/Prediction](https://github.com/lightgbm-org/LightGBM/blob/master/R-package/demo/multiclass.R)
* [Leaf (in)Stability](https://github.com/lightgbm-org/LightGBM/blob/master/R-package/demo/leaf_stability.R)
* [Weight-Parameter Adjustment Relationship](https://github.com/lightgbm-org/LightGBM/blob/master/R-package/demo/weight_param.R)
* [Basic walkthrough of wrappers](https://github.com/lightgbm-org/LightGBM/blob/main/R-package/demo/basic_walkthrough.R)
* [Boosting from existing prediction](https://github.com/lightgbm-org/LightGBM/blob/main/R-package/demo/boost_from_prediction.R)
* [Early Stopping](https://github.com/lightgbm-org/LightGBM/blob/main/R-package/demo/early_stopping.R)
* [Cross Validation](https://github.com/lightgbm-org/LightGBM/blob/main/R-package/demo/cross_validation.R)
* [Multiclass Training/Prediction](https://github.com/lightgbm-org/LightGBM/blob/main/R-package/demo/multiclass.R)
* [Leaf (in)Stability](https://github.com/lightgbm-org/LightGBM/blob/main/R-package/demo/leaf_stability.R)
* [Weight-Parameter Adjustment Relationship](https://github.com/lightgbm-org/LightGBM/blob/main/R-package/demo/weight_param.R)

Testing
-------
Expand Down
4 changes: 2 additions & 2 deletions R-package/pkgdown/_pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ site:
repo:
url:
home: https://github.com/lightgbm-org/LightGBM/
source: https://github.com/lightgbm-org/LightGBM/tree/master/R-package/
source: https://github.com/lightgbm-org/LightGBM/tree/main/R-package/
issue: https://github.com/lightgbm-org/LightGBM/issues/
user: https://github.com/

Expand Down Expand Up @@ -48,7 +48,7 @@ navbar:
href: reference/index.html
right:
- icon: fa-github fa-lg
href: https://github.com/lightgbm-org/LightGBM/tree/master/R-package
href: https://github.com/lightgbm-org/LightGBM/tree/main/R-package

reference:
- title: Datasets
Expand Down
Loading
Loading