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
25 changes: 0 additions & 25 deletions .github/workflows/github_release.yml

This file was deleted.

21 changes: 21 additions & 0 deletions .github/workflows/lint-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "Lint PR"

on:
pull_request:
types:
- opened
- edited
- synchronize
- reopened

permissions:
pull-requests: read

jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5.5.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10 changes: 1 addition & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v4
Expand All @@ -36,10 +35,3 @@ jobs:
- name: Test with unittest and generates reports
run: |
make report

- name: Upload coverage results
uses: actions/upload-artifact@v3
with:
name: coverage.xml
path: ./coverage.xml
if: ${{ always() }}
47 changes: 25 additions & 22 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,39 @@
name: Release

on:
push:
# Sequence of patterns matched against refs/tags
tags:
- '\d+\.\d+\.\d+'
branches:
- main

name: Publish to Pypi
permissions:
contents: read

jobs:
deploy:
name: Deploy to PYPI
release:
name: Release
runs-on: ubuntu-latest
environment:
name: release
url: https://pypi.org/p/metar-taf-parser-mivek/
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
steps:
- uses: actions/checkout@v4

- name: Set up Python
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'npm'
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
make install_deploy

- name: Build the archives
run: |
python -m build --sdist --wheel --outdir dist/

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
run: npm install
- name: Run semantic-release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PYPI_TOKEN: ${{ secrets.PYPI_PASSWORD }}
23 changes: 23 additions & 0 deletions .github/workflows/validate-commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Lint commit

on: pull_request

jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: npm

- name: Install commitlint
run: |
npm install conventional-changelog-conventionalcommits
npm install commitlint@latest

- name: Validate PR commits with commitlint
run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
18 changes: 18 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"release": {
"branches": ["main"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/git",
[
"@semantic-release/changelog",
{
"changelogFile": "CHANGELOG.md"
}
],
"@semantic-release-pypi",
"@semantic-release/github",
]
}
}
85 changes: 84 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,87 @@
**Internationalization**
## Pull Request Naming Guidelines

To keep the repository organized and to make it easier to understand the purpose of each pull request, the project follows these pull request naming conventions:

### Format

Each pull request name should include a type and a short description:

`<type>: <short-description></type>`

### Types

Use one of the following types:

- **feat**: A new feature
- **fix**: A bug fix
- **docs**: Documentation only changes
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
- **refactor**: A code change that neither fixes a bug nor adds a feature
- **perf**: A code change that improves performance
- **test**: Adding missing or correcting existing tests
- **build**: Changes that affect the build system or external dependencies
- **ci**: Changes to the CI configuration files and scripts
- **chore**: Other changes that don't modify src or test files
- **revert**: Reverts a previous commit

### Examples

- `feat: add login feature`
- `fix: bug in authentication`
- `docs: update readme`
- `chore: cleanup dependencies`
- `refactor: improve parser`

By following these guidelines, you help ensure that the branches are easy to understand and manage.

## Commit Message Guidelines

This project follows the commit message conventions set by [Conventional Commits](https://www.conventionalcommits.org/).

### Commit Message Format

Each commit message should include a type, a scope (optional), and a subject:

`<type>(<scope>): <subject></subject></scope></type>`

#### Type

Must be one of the following:

- **feat**: A new feature
- **fix**: A bug fix
- **docs**: Documentation only changes
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
- **refactor**: A code change that neither fixes a bug nor adds a feature
- **perf**: A code change that improves performance
- **test**: Adding missing or correcting existing tests
- **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
- **ci**: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
- **chore**: Other changes that don't modify src or test files
- **revert**: Reverts a previous commit

#### Subject

The subject contains a succinct description of the change:

- Use the imperative, present tense: "change" not "changed" nor "changes"
- Do not capitalize the first letter
- Do not end the subject with a period

### Examples

```plaintext
feat(parser): add support for new weather condition

fix(translation): correct French translation for 'clear sky'

docs(contributing): add commit message guidelines
```

By following these guidelines, you help ensure that the project remains consistent and easy to understand.


## Internationalization

If you are willing to add a new language or complete an existing language, please use https://crwd.in/metarParser to register and contribute.
Once a language is complete at 100%, open an issue so the translation can be added to the project.
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default { extends: ['@commitlint/config-conventional'] };
Loading