Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/intial-v initial code #1

Merged
merged 62 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
a3d55c4
feat/intial-v initial code
hminaee-tc Jun 12, 2024
9603a50
feat/intial-v initial code
hminaee-tc Jun 12, 2024
b529922
feat/intial-v initial code
hminaee-tc Jun 12, 2024
3f25857
feat/intial-v initial code
hminaee-tc Jun 12, 2024
7a082ad
feat/intial-v initial code
hminaee-tc Jun 12, 2024
818c988
feat/intial-v initial code
hminaee-tc Jun 12, 2024
0313659
feat/intial-v initial code
hminaee-tc Jun 12, 2024
77a40c1
feat/intial-v initial code
hminaee-tc Jun 12, 2024
a600786
feat/intial-v initial code
hminaee-tc Jun 12, 2024
e529f7d
feat/intial-v initial code
hminaee-tc Jun 12, 2024
122b152
feat/intial-v initial code
hminaee-tc Jun 12, 2024
18ba185
feat/intial-v initial code
hminaee-tc Jun 12, 2024
d108c05
feat/intial-v initial code
hminaee-tc Jun 12, 2024
073a227
feat/intial-v initial code
hminaee-tc Jun 12, 2024
1a43b34
feat/intial-v initial code
hminaee-tc Jun 12, 2024
7f2f564
feat/intial-v initial code
hminaee-tc Jun 12, 2024
644caf2
feat/intial-v initial code
hminaee-tc Jun 12, 2024
7353f8d
feat/intial-v initial code
hminaee-tc Jun 12, 2024
6c9a6c6
feat/intial-v initial code
hminaee-tc Jun 12, 2024
da5eadf
feat/intial-v initial code
hminaee-tc Jun 12, 2024
6cc413a
feat/intial-v initial code
hminaee-tc Jun 12, 2024
c69171b
feat/intial-v initial code
hminaee-tc Jun 12, 2024
f590033
feat/intial-v unit test
hminaee-tc Jun 13, 2024
8469058
feat/intial-v unit test
hminaee-tc Jun 13, 2024
dd3ffd5
feat/intial-v unit test
hminaee-tc Jun 13, 2024
315b947
feat/initial-v-update-usability-and-readability-setup-cfg-metadata
andreouellet Jun 13, 2024
c57f89f
feat/intial-v fix publishing
hminaee-tc Jun 13, 2024
8427546
feat/intial-v fix tests
hminaee-tc Jun 13, 2024
128f5b2
feat/intial-v update the hook
hminaee-tc Jun 13, 2024
2edcfaa
feat/intial-v update the hook
hminaee-tc Jun 13, 2024
e305ae4
feat/intial-v update readme
hminaee-tc Jun 13, 2024
b35548f
feat/intial-v version update
hminaee-tc Jun 13, 2024
8559e60
feat/intial-v update names
hminaee-tc Jun 13, 2024
1ef5339
test toml file
hminaee-tc Jun 13, 2024
84b9376
add toml file
hminaee-tc Jun 13, 2024
4c8c282
fix exclusion
hminaee-tc Jun 13, 2024
074c57c
merge conflicct
hminaee-tc Jun 13, 2024
24ac255
feat/intial-v-update-publish-pypi-ghactions-only-run-on-merged-pr
andreouellet Jun 13, 2024
e06bf97
feat/intial-v rename folder
hminaee-tc Jun 13, 2024
d6fb84f
feat/intial-v clean up
hminaee-tc Jun 13, 2024
67e3d56
feat/intial-v clean up
hminaee-tc Jun 13, 2024
faa5dd9
feat/intial-v add commit hook
hminaee-tc Jun 14, 2024
1dcd360
feat/intial-v add commit hook
hminaee-tc Jun 14, 2024
d5b1927
feat/intial-v publishing the package
hminaee-tc Jun 14, 2024
3165ed1
feat/intial-v add long desc to avoid issue in pyblishing
hminaee-tc Jun 14, 2024
39bfbe8
feat/intial-v cleanup
hminaee-tc Jun 14, 2024
031aa9a
feat/intial-v cleanup
hminaee-tc Jun 14, 2024
c613c13
feat/intial-v cleanup
hminaee-tc Jun 14, 2024
0407de3
feat/intial-v version hook
hminaee-tc Jun 14, 2024
9a98349
feat/intial-v v bumped but not committed error
hminaee-tc Jun 14, 2024
c1d2b74
feat/intial-v update e2e
hminaee-tc Jun 14, 2024
857f4ae
feat/intial-v add e2e workflow
hminaee-tc Jun 14, 2024
1197e40
feat/intial-v update the package for pip
hminaee-tc Jun 17, 2024
df1fbd1
feat/intial-v update the package for pip
hminaee-tc Jun 17, 2024
cdcdd67
feat/intial-v update tomb
hminaee-tc Jun 17, 2024
905c724
feat/intial-v update the git flow
hminaee-tc Jun 18, 2024
a96f777
feat/intial-v fix the test
hminaee-tc Jun 18, 2024
3521521
feat/intial-v fix the test
hminaee-tc Jun 18, 2024
fe65bc7
feat/intial-v extra features
hminaee-tc Jun 18, 2024
9b47f15
feat/intial-v clean up
hminaee-tc Jun 18, 2024
084cce5
feat/intial-v-updates-to-tests-and-ghaction-workflows
andreouellet Jun 19, 2024
d750e88
feat/intial-v-fix-ghaction-workflow-tests
andreouellet Jun 19, 2024
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
24 changes: 24 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: pre-commit

on:
pull_request:
push:
branches: [main]

permissions: read-all

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup-python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: install-dependencies
run: pip install -r pypi_bumpversion_check/requirements.txt
- name: pre-commit-run
uses: pre-commit/action@v3.0.0
35 changes: 35 additions & 0 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Publish Python 🐍 distributions 📦 to PyPI

on:
pull_request:
branches:
- main
types: [closed]

jobs:
build-n-publish:
if: ${{ github.event.pull_request.merged }}
name: Build and publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest
permissions:
id-token: write

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v5.1.0
with:
python-version: 3.11

- name: Install pip packages
run: pip install twine build setuptools

- name: Build the package
run: python -m build

- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
74 changes: 74 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
name: tests

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
# ----------------------
# JOB 1: Run unit tests
# ----------------------
tests-unit:
name: tests-unit
runs-on: ubuntu-latest
permissions:
id-token: write

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v5.1.0
with:
python-version: 3.11

- name: Run tests
run: python3 -m unittest tests/test_main.py
# ----------------------
# JOB 2: Run python package end to end test
# ----------------------
test-package-e2e:
name: test-package-e2e
runs-on: ubuntu-latest
permissions:
id-token: write

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v5.1.0
with:
python-version: 3.11

- name: Run test-package-e2e.sh
run: |
cd tests-package-e2e
./test-package-e2e.sh
# ----------------------
# JOB 3: Run pre-commit hook test
# ----------------------
test-pre-commit-hook:
name: test-pre-commit-hook
runs-on: ubuntu-latest
permissions:
id-token: write

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v5.1.0
with:
python-version: 3.11

- name: Run test-pre-commit-hook.sh
run: |
pip install pre-commit
cd tests-pre-commit-hook
./test-pre-commit-hook.sh
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# Byte-compiled / optimized / DLL files
__pycache__/
**/__pycache__/
*.py[cod]
*$py.class

.DS_Store
**/.DS_Store

**/precommit-e2e.test

# C extensions
*.so

Expand Down Expand Up @@ -85,7 +91,7 @@ ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
Expand Down
92 changes: 92 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
---
# 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.6.0
hooks:
- id: check-merge-conflict
- id: check-added-large-files
args: [--maxkb=500]
- id: trailing-whitespace
- id: detect-private-key
- id: end-of-file-fixer
- id: fix-encoding-pragma
- id: file-contents-sorter
- id: check-case-conflict
- id: mixed-line-ending
args: [--fix=lf]
# -----------------------------
# Checkov is a static code analysis tool for scanning infrastructure as code (IaC) files for misconfigurations
# that may lead to security or compliance problems.
# -----------------------------
# Checkov includes more than 750 predefined policies to check for common misconfiguration issues.
# Checkov also supports the creation and contribution of custom policies.
# https://www.checkov.io/4.Integrations/pre-commit.html
# -----------------------------
- repo: https://github.com/bridgecrewio/checkov.git
rev: 3.2.141
hooks:
- id: checkov
# -----------------------------
# Gitleaks SAST tool for detecting and preventing hardcoded secrets like passwords, api keys, and tokens in git repos
# -----------------------------
# If you are knowingly committing something that is not a secret and gitleaks is catching it,
# you can add an inline comment of '# gitleaks:allow' to the end of that line in your file.
# This will instructs gitleaks to ignore that secret - example:
# some_non_secret_value = a1b2c3d4e5f6g7h8i9j0 # gitleaks:allow
# -----------------------------
- repo: https://github.com/gitleaks/gitleaks
rev: v8.18.4
hooks:
- id: gitleaks
# -----------------------------
# Generates Table of Contents in Markdown files
# -----------------------------
- repo: https://github.com/frnmst/md-toc
rev: 9.0.0
hooks:
- id: md-toc
args: [-p, github] # CLI options
# -----------------------------
# YAML Linting on yaml files for pre-commit and github actions
# -----------------------------
- repo: https://github.com/adrienverge/yamllint
rev: v1.35.1
hooks:
- id: yamllint
name: Check YAML syntax with yamllint
args: [--strict, -c=.yamllint.yaml, '.']
always_run: true
pass_filenames: true
# -----------------------------
# Install PYPI bumpversion check requirements
# -----------------------------
- repo: local
hooks:
- id: install-pypi_bumpversion_check-requirements
name: Install PYPI bumpversion check requirements
entry: pip install -r pypi_bumpversion_check/requirements.txt
language: system
files: pyproject.toml
# -----------------------------
# PYPI bumpversion check
# -----------------------------
- repo: local
hooks:
- id: pypi_bumpversion_check
name: Check version
entry: python pypi_bumpversion_check/check_version.py
language: system
files: pyproject.toml
# -----------------------------
# Unit Tests
# -----------------------------
- repo: local
hooks:
- id: unittest
name: Run unit tests
entry: python -m unittest tests.test_main
language: system
pass_filenames: false
always_run: true
6 changes: 6 additions & 0 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
- id: find-and-replace-strings
name: find-and-replace-strings
description: Finds strings in files and replaces them with other strings.
entry: find-and-replace-strings
language: python
35 changes: 35 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
yaml-files:
- '*.yaml'
- '*.yml'
- '.yamllint'

rules:
anchors: enable
braces: enable
brackets: enable
colons: enable
commas: enable
comments:
level: warning
comments-indentation:
level: warning
document-end: disable
document-start:
level: warning
empty-lines: enable
empty-values: disable
float-values: disable
hyphens: enable
indentation: enable
key-duplicates: enable
key-ordering: disable
line-length:
max: 120
level: warning
new-line-at-end-of-file: enable
new-lines: enable
octal-values: disable
quoted-strings: disable
trailing-spaces: enable
truthy: disable
Loading
Loading