Skip to content

Commit 9805108

Browse files
authored
Feature/project setup (#1)
* feat: Project has been setup * feat: Project has been setup * feat: README.md file and .github folder added * feat: Changes in pakages and imports name
1 parent 945eaf0 commit 9805108

24 files changed

Lines changed: 883 additions & 0 deletions

File tree

‎.github/dependabot.yml‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "pip" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "daily"
12+
- package-ecosystem: "github-actions"
13+
directory: "/"
14+
schedule:
15+
interval: "daily"

‎.github/workflows/build.yml‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Build PyPI
2+
on:
3+
workflow_call:
4+
5+
jobs:
6+
linting:
7+
name: Reuse linting job
8+
uses: ./.github/workflows/linting.yml
9+
10+
build:
11+
needs: linting
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Check out source repository
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0 #full history
18+
- name: Set up Python
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: "3.10"
22+
- name: Install dependencies
23+
run: |
24+
pip install hatch
25+
- name: Build project
26+
run: hatch build
27+
# Upload artifacts for later use
28+
- name: Upload Artifacts
29+
uses: actions/upload-artifact@v3
30+
with:
31+
name: dist
32+
path: dist/

‎.github/workflows/linting.yml‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Linting (black and flake8)
2+
on:
3+
workflow_call:
4+
5+
jobs:
6+
linting:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Check out source repository
10+
uses: actions/checkout@v4
11+
- name: Set up Python
12+
uses: actions/setup-python@v4
13+
with:
14+
python-version: "3.10"
15+
- name: Install pip package(s)
16+
run: pip install hatch
17+
- name: Run black formatter check
18+
run: hatch run lint:black --check --verbose src tests
19+
- name: Run flake8 linter
20+
run: hatch run lint:flake8
21+
- name: Run unit and integrations tests
22+
run: hatch run test:pytest --cov=reqstool-python-decorators --cov-report=xml --cov-report=html
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Build and publish to Test PyPI
2+
3+
on:
4+
push:
5+
branches-ignore:
6+
- main
7+
pull_request:
8+
types:
9+
- opened
10+
- reopened
11+
- synchronize
12+
13+
jobs:
14+
build:
15+
name: Reuse build
16+
uses: ./.github/workflows/build.yml
17+
18+
publish-to-test-pypi:
19+
needs: build
20+
runs-on: ubuntu-latest
21+
# Specifying a GitHub environment is optional, but strongly encouraged
22+
environment:
23+
name: development
24+
url: https://test.pypi.org/p/reqstool-python-decorators
25+
permissions:
26+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
27+
steps:
28+
# Download artifacts from the build job
29+
- name: Download Artifacts
30+
uses: actions/download-artifact@v3
31+
with:
32+
name: dist
33+
path: dist
34+
- name: Publish distribution 📦 to Test PyPI
35+
uses: pypa/gh-action-pypi-publish@release/v1
36+
with:
37+
repository-url: https://test.pypi.org/legacy/
38+
sign-artifacts: true
39+
skip-existing: true
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Build and publish to PyPI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- "v*.*.*"
9+
10+
jobs:
11+
build:
12+
name: Reuse build
13+
uses: ./.github/workflows/build.yml
14+
15+
publish-to-pypi:
16+
needs: build
17+
runs-on: ubuntu-latest
18+
environment:
19+
name: production
20+
url: https://pypi.org/p/reqstool-python-decorators
21+
permissions:
22+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
23+
steps:
24+
# Download artifacts from the build job
25+
- name: Download Artifacts
26+
uses: actions/download-artifact@v3
27+
with:
28+
name: dist
29+
path: dist
30+
- name: Publish distribution 📦 to PyPI
31+
# if: startsWith(github.ref, 'refs/tags')
32+
uses: pypa/gh-action-pypi-publish@release/v1
33+
with:
34+
sign-artifacts: true

‎.gitignore‎

Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
*.egg-info/
24+
.installed.cfg
25+
*.egg
26+
27+
# Installer logs
28+
pip-log.txt
29+
pip-delete-this-directory.txt
30+
31+
# Unit test / coverage reports
32+
htmlcov/
33+
.tox/
34+
.coverage
35+
.coverage.*
36+
.cache
37+
nosetests.xml
38+
coverage.xml
39+
*,cover
40+
.hypothesis/
41+
42+
# Translations
43+
*.mo
44+
45+
# IDEs
46+
.idea/
47+
.vscode/
48+
*.sublime-project
49+
*.sublime-workspace
50+
*.komodoproject
51+
.komodotools/
52+
.kate-swp/
53+
54+
# PyCharm
55+
*.iml
56+
.idea/workspace.xml
57+
.idea/tasks.xml
58+
.idea/dictionaries
59+
60+
# Jupyter Notebook
61+
.ipynb_checkpoints
62+
63+
# Environments
64+
.env
65+
.venv
66+
env/
67+
venv/
68+
ENV/
69+
env.bak/
70+
venv.bak/
71+
pythonenv*
72+
73+
# macOS
74+
.DS_Store
75+
76+
# Windows
77+
Thumbs.db
78+
ehthumbs.db
79+
80+
# Python Installer
81+
*.msi
82+
*.exe
83+
*.zip
84+
*.tar.gz
85+
*.whl
86+
*.tgz
87+
*.tz
88+
89+
# Sublime Text
90+
*.tmlanguage.cache
91+
*.tmPreferences.cache
92+
*.stTheme.cache
93+
94+
# Node.js
95+
node_modules/
96+
npm-debug.log*
97+
98+
# TypeScript
99+
*.tsbuildinfo
100+
101+
# Yarn
102+
yarn-error.log
103+
104+
# Flutter/Dart
105+
.dart_tool/
106+
.flutter-plugins
107+
.packages
108+
.pub-cache/
109+
/build/
110+
111+
# Android/Android Studio
112+
*.apk
113+
*.aab
114+
*.ap_
115+
116+
# Gradle
117+
build/
118+
119+
# IntelliJ
120+
out/
121+
122+
# Compiled Python bytecode
123+
__pycache__/
124+
125+
# Compiled Java bytecode
126+
*.class
127+
128+
# Compiled Ruby bytecode
129+
*.class
130+
131+
# Compiled C++ extensions
132+
*.so
133+
134+
# Compiled SQLite database files
135+
*.sqlite3
136+
137+
# Compiled fonts
138+
*.ttf
139+
*.otf
140+
141+
# Compiled images
142+
*.jpg
143+
*.jpeg
144+
*.png
145+
*.gif
146+
*.webp
147+
148+
# Compiled audio files
149+
*.mp3
150+
*.ogg
151+
*.flac
152+
*.wav
153+
154+
# Compiled video files
155+
*.mp4
156+
*.mov
157+
*.avi
158+
159+
# Compiled archives and packages
160+
*.zip
161+
*.rar
162+
*.tar
163+
*.gz
164+
*.7z
165+
*.xz
166+
*.bz2
167+
*.iso
168+
*.dmg
169+
*.pkg
170+
*.deb
171+
*.rpm
172+
173+
# Compiled documents
174+
*.pdf
175+
*.doc
176+
*.docx
177+
*.xls
178+
*.xlsx
179+
*.ppt
180+
*.pptx
181+
*.odt
182+
*.ods
183+
*.odp

0 commit comments

Comments
 (0)