Skip to content

Commit

Permalink
Use main as Primary Branch (#367)
Browse files Browse the repository at this point in the history
This PR updates our git workflow to use `main` as the MHKiT default
branch :
- Many modern projects use `main` as the default branch, aligning with
the GitHub recommendation and broader conventions.
- There is some non-linear history in the previous rebase causing issues
between `develop` & `master`
- `main` was created from the current `develop` branch creating a 1-to-1
liner history between `develop` and the new `main` branch
  • Loading branch information
ssolson authored Dec 9, 2024
1 parent eb360a0 commit 8c54773
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 23 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: Py 3.10, 3.11, 3.12 | Windows Mac Linux
on:
push:
branches:
- master
- main
- develop
pull_request:
branches:
- master
- main
- develop

jobs:
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:

- id: hindcast-logic
run: |
if [[ "${{ github.event.pull_request.base.ref }}" == "master" || "${{ steps.changes.outputs.wave_io_hindcast }}" == "true" ]]; then
if [[ "${{ github.event.pull_request.base.ref }}" == "main" || "${{ steps.changes.outputs.wave_io_hindcast }}" == "true" ]]; then
echo "should-run-hindcast=true" >> "$GITHUB_OUTPUT"
else
echo "should-run-hindcast=false" >> "$GITHUB_OUTPUT"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Builds mhkit and publishes to testpypi.org on every commit to master. On tagged commits, also publishes to pypi.org.
# Builds mhkit and publishes to testpypi.org on every commit to main. On tagged commits, also publishes to pypi.org.
# https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/

name: Build and release 🐍 📦

on:
push:
branches:
- master
- main
release:
types: [published]

Expand Down
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<a href=https://github.com/MHKiT-Software/MHKiT-Python/actions/workflows/main.yml>
<img src="https://github.com/MHKiT-Software/MHKiT-Python/actions/workflows/main.yml/badge.svg">
</a>
<a href=https://coveralls.io/github/MHKiT-Software/MHKiT-Python?branch=master>
<img src="https://coveralls.io/repos/github/MHKiT-Software/MHKiT-Python/badge.svg?branch=master">
<a href=https://coveralls.io/github/MHKiT-Software/MHKiT-Python?branch=main>
<img src="https://coveralls.io/repos/github/MHKiT-Software/MHKiT-Python/badge.svg?branch=main">
</a>
<a href=https://pepy.tech/project/mhkit>
<img src="https://pepy.tech/badge/mhkit">
Expand Down Expand Up @@ -33,14 +33,16 @@ See the [MHKiT documentation](https://mhkit-software.github.io/MHKiT) for more i
## Installation

MHKiT-Python requires Python (3.10, 3.11, 3.12) along with several Python
package dependencies. MHKiT-Python can be installed from PyPI using the command:
package dependencies. MHKiT-Python can be installed using the Conda package manager:

`pip install mhkit`
```bash
conda install -c conda-forge mhkit
```

MHKiT can alternatively be installed using conda:
MHKiT can alternatively be installed from PyPi using pip:

```bash
conda install -c conda-forge mhkit
pip install mhkit
```

See [installation instructions](https://mhkit-software.github.io/MHKiT/installation.html) for more information.
Expand Down Expand Up @@ -82,7 +84,7 @@ The GitHub platform has the branch feature that facilitates code contributions a
1. Navigate to your fork of MHKiT-Python (see instructions above)
2. Above the list of files, click **Branches**.
3. Click **New Branch**.
4. Enter a name for the branch. Be sure to select **MHKiT-Software/MHKiT-Python:master** as the source.
4. Enter a name for the branch. Be sure to select **MHKiT-Software/MHKiT-Python:main** as the source.
5. Click **Create branch**. You will now have a branch on your fork of MHKiT-Python that you can use to work with the code base.

## Creating a pull request
Expand Down
4 changes: 2 additions & 2 deletions examples/qc_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"metadata": {},
"source": [
"# MHKiT Quality Control Module\n",
"The following example runs a simple quality control analysis on wave elevation data using the [MHKiT QC module](https://mhkit-software.github.io/MHKiT/mhkit-python/api.qc.html). The data file used in this example is stored in the [\\\\\\\\MHKiT\\\\\\\\examples\\\\\\\\data](https://github.com/MHKiT-Software/MHKiT-Python/tree/master/examples/data) directory.\n",
"The following example runs a simple quality control analysis on wave elevation data using the [MHKiT QC module](https://mhkit-software.github.io/MHKiT/mhkit-python/api.qc.html). The data file used in this example is stored in the [\\\\\\\\MHKiT\\\\\\\\examples\\\\\\\\data](https://github.com/MHKiT-Software/MHKiT-Python/tree/main/examples/data) directory.\n",
"\n",
"Start by importing the necessary Python packages and MHKiT modules."
]
Expand Down Expand Up @@ -438,7 +438,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "base",
"language": "python",
"name": "python3"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/river_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"source": [
"# MHKiT River Module\n",
"\n",
"The following example will familiarize the user with the [MHKIT river module](https://mhkit-software.github.io/MHKiT/mhkit-python/api.river.html) by stepping through the calculation of annual energy produced for one turbine in the Tanana River near Nenana, Alaska. The data file used in this example is retrieved from the USGS website, a local version of the data is stored in the [\\\\\\\\MHKiT\\\\\\\\examples\\\\\\\\data](https://github.com/MHKiT-Software/MHKiT-Python/tree/master/examples/data) directory.\n",
"The following example will familiarize the user with the [MHKIT river module](https://mhkit-software.github.io/MHKiT/mhkit-python/api.river.html) by stepping through the calculation of annual energy produced for one turbine in the Tanana River near Nenana, Alaska. The data file used in this example is retrieved from the USGS website, a local version of the data is stored in the [\\\\\\\\MHKiT\\\\\\\\examples\\\\\\\\data](https://github.com/MHKiT-Software/MHKiT-Python/tree/main/examples/data) directory.\n",
"\n",
"Start by importing the necessary python packages and MHKiT module."
]
Expand Down Expand Up @@ -357,7 +357,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "base",
"language": "python",
"name": "python3"
},
Expand Down
9 changes: 2 additions & 7 deletions examples/tidal_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"source": [
"# MHKiT Tidal Module\n",
"\n",
"The following example will familiarize the user with the [MHKiT tidal module](https://mhkit-software.github.io/MHKiT/mhkit-python/api.tidal.html) by stepping through the calculation of the velocity duration curve. The data file used in this example is stored in the [\\\\\\\\MHKiT\\\\\\\\examples\\\\\\\\data](https://github.com/MHKiT-Software/MHKiT-Python/tree/master/examples/data) directory.\n",
"The following example will familiarize the user with the [MHKiT tidal module](https://mhkit-software.github.io/MHKiT/mhkit-python/api.tidal.html) by stepping through the calculation of the velocity duration curve. The data file used in this example is stored in the [\\\\\\\\MHKiT\\\\\\\\examples\\\\\\\\data](https://github.com/MHKiT-Software/MHKiT-Python/tree/main/examples/data) directory.\n",
"\n",
"Start by importing the necessary MHKiT module."
]
Expand Down Expand Up @@ -376,7 +376,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "base",
"language": "python",
"name": "python3"
},
Expand All @@ -391,11 +391,6 @@
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.7"
},
"vscode": {
"interpreter": {
"hash": "1b38577481a8c337d860514619746143ecc67292e11e5807b52b737c5351e332"
}
}
},
"nbformat": 4,
Expand Down

0 comments on commit 8c54773

Please sign in to comment.