-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added README - Added ISSUE_TEMPLATES - Added CIs for linting, publishing, and building test - Refactored code to separate logic and cli code - Added pre-commit config and hooks
- Loading branch information
Showing
15 changed files
with
406 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: bug | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
<!-- A clear and concise description of what the bug is. --> | ||
|
||
**To Reproduce** | ||
<!-- | ||
Steps to reproduce the behavior | ||
You can paste your code snippet here. Please enclose them | ||
``` | ||
like so | ||
``` | ||
--> | ||
|
||
**Expected behavior** | ||
<!-- A clear and concise description of what you expected to happen. --> | ||
|
||
**Screenshots** | ||
<!-- If applicable, add screenshots to help explain your problem. --> | ||
|
||
**Additional context** | ||
<!-- Add any other context about the problem here. --> | ||
|
||
**System Information** | ||
- Operating System: | ||
- Python Version: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: enhancement | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the solution you'd like** | ||
<!-- A clear and concise description of what you want to happen. --> | ||
|
||
**Additional context** | ||
<!-- Add any other context or screenshots about the feature request here. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: CI Workflow | ||
|
||
on: | ||
push: | ||
branches: ["main", "develop"] | ||
pull_request: | ||
branches: ["main", "develop"] | ||
|
||
jobs: | ||
build: | ||
name: CI Workflow | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.8.13"] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Setup dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install poetry | ||
poetry install | ||
# - name: Run tests | ||
# run: | | ||
# poetry run pytest | ||
- name: Build wheels | ||
run: | | ||
poetry build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Linting | ||
|
||
on: | ||
push: | ||
branches: ["main", "develop"] | ||
pull_request: | ||
branches: ["main", "develop"] | ||
|
||
jobs: | ||
lint: | ||
name: Lint everything | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.8.13"] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install poetry | ||
poetry install | ||
- name: Check with black | ||
run: poetry run black --check pyreqpp/ | ||
- name: Check with pycln | ||
run: poetry run pycln --check pyreqpp/ | ||
- name: Check with isort | ||
run: poetry run isort --check pyreqpp/ | ||
- name: Mypy analysis | ||
run: poetry run mypy pyreqpp/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Publish to PyPI | ||
|
||
on: | ||
push: | ||
branches: ['main'] | ||
|
||
jobs: | ||
publish: | ||
name: Publish to PyPI | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.8.13"] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Setup dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install poetry | ||
poetry install | ||
# - name: Run tests | ||
# run: | | ||
# poetry run pytest | ||
- name: Build wheels | ||
run: | | ||
poetry build | ||
- name: Publish Package | ||
run: | | ||
python -m poetry publish --username=${{ secrets.PYPIUSERNAME }} --password=${{ secrets.PYPIPASSWORD }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
# development | ||
.hypothesis | ||
.vscode | ||
.pytest | ||
.pytest_cache | ||
__pycache__ | ||
poetry.lock | ||
.mypy_cache | ||
|
||
poetry.lock | ||
.secrets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.0.1 | ||
hooks: | ||
- id: check-ast | ||
- id: check-builtin-literals | ||
- id: check-case-conflict | ||
- id: check-docstring-first | ||
- id: check-merge-conflict | ||
- id: check-json | ||
- id: check-toml | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: mixed-line-ending | ||
- id: trailing-whitespace | ||
- id: check-vcs-permalinks | ||
- id: check-shebang-scripts-are-executable | ||
- repo: https://github.com/pre-commit/pygrep-hooks | ||
rev: v1.9.0 | ||
hooks: | ||
- id: python-check-mock-methods | ||
- id: python-no-log-warn | ||
- id: python-use-type-annotations | ||
- repo: https://github.com/hadialqattan/pycln | ||
rev: v1.2.5 | ||
hooks: | ||
- id: pycln | ||
args: [--all] | ||
- repo: https://github.com/psf/black | ||
rev: 22.3.0 | ||
hooks: | ||
- id: black | ||
additional_dependencies: ['click==8.0.4'] | ||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.10.1 | ||
hooks: | ||
- id: isort | ||
args: ["--profile", "black"] | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v0.800 | ||
hooks: | ||
- id: mypy | ||
name: mypy | ||
files: ^pyreqpp/ | ||
exclude: (/tests/)|(/docs/)|(/examples/) | ||
args: ["--ignore-missing-imports"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
- id: pyrqpp | ||
name: pyrqpp | ||
description: "A requirements.txt checker and modifier" | ||
entry: pyrqpp | ||
language: python | ||
language_version: python3 | ||
types: [python] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<div align="center"> | ||
<p align="center"> | ||
<h1>PyReqPP</h1> | ||
</p> | ||
|
||
--- | ||
|
||
<!-- prettier-ignore --> | ||
|
||
[![PyPI python](https://img.shields.io/pypi/pyversions/pyreqpp)](https://pypi.org/project/pyreqpp) | ||
[![PyPI version](https://badge.fury.io/py/pyreqpp.svg)](https://pypi.org/project/pyreqpp) | ||
[![Downloads](https://static.pepy.tech/badge/pyreqpp)](https://pepy.tech/project/pyreqpp) | ||
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENCE) | ||
|
||
</div> | ||
|
||
## Installation | ||
|
||
```bash | ||
pip install pyreqpp | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
from . import __name__ | ||
from .cli import app | ||
|
||
app(prog_name=__name__) | ||
app(prog_name=__name__) |
Oops, something went wrong.