File tree Expand file tree Collapse file tree 9 files changed +48
-36
lines changed
Expand file tree Collapse file tree 9 files changed +48
-36
lines changed Original file line number Diff line number Diff line change 11name : Build PyPI
22on :
3- workflow_call :
3+ workflow_call :
4+ workflow_dispatch :
5+ push :
6+ pull_request :
7+ types :
8+ - opened
9+ - reopened
10+ - synchronize
411
512jobs :
613 linting :
2027 with :
2128 python-version : " 3.10"
2229 - name : Install dependencies
23- run : |
24- pip install hatch
30+ run : pip install hatch
31+ - name : Run unit and integrations tests
32+ run : hatch run test:pytest --cov=reqstool-python-decorators --cov-report=xml --cov-report=html
2533 - name : Build project
2634 run : hatch build
2735 # Upload artifacts for later use
Original file line number Diff line number Diff line change 1+ name : Lint (black and flake8)
2+ on :
3+ workflow_call :
4+
5+ jobs :
6+ check-release :
7+ runs-on : ubuntu-latest
8+ steps :
9+ - name : Check branch and tag
10+ if : github.event_name == 'push' && !(github.ref == 'refs/heads/main' && startsWith(github.ref, 'refs/tags/v'))
11+ run : exit 1
Original file line number Diff line number Diff line change 1- name : Linting (black and flake8)
1+ name : Lint (black and flake8)
22on :
3+ workflow_dispatch :
34 workflow_call :
45
56jobs :
1718 - name : Run black formatter check
1819 run : hatch run lint:black --check --verbose src tests
1920 - 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
21+ run : hatch run lint:flake8
Original file line number Diff line number Diff line change 11name : Publish to GitHub Pages
22on :
3+ workflow_dispatch :
4+ release :
5+ types : [created]
36 push :
47 branches :
58 - main
6- pull_request :
7- branches :
8- - main
99
10- # Allows you to run this workflow manually from the Actions tab
11- workflow_dispatch :
1210concurrency :
1311 group : github-pages
1412 cancel-in-progress : false
@@ -18,7 +16,7 @@ permissions:
1816 pages : write
1917 id-token : write
2018jobs :
21- build :
19+ publish-gh-pages :
2220 runs-on : ubuntu-latest
2321 environment :
2422 name : github-pages
Original file line number Diff line number Diff line change 11name : Build and publish to PyPI
22
33on :
4- push :
5- branches :
6- - main
7- tags :
8- - " v*.*.*"
4+ release :
5+ types : [created]
96
107jobs :
8+ check-release :
9+ name : Reuse check release
10+ uses : ./.github/workflows/check_release.yml
1111 build :
1212 name : Reuse build
1313 uses : ./.github/workflows/build.yml
14+
1415
1516 publish-to-pypi :
16- needs : build
17+ needs :
18+ - check-release
19+ - build
1720 runs-on : ubuntu-latest
1821 environment :
19- name : production
22+ name : prod
2023 url : https://pypi.org/p/reqstool-python-decorators
2124 permissions :
2225 id-token : write # IMPORTANT: this permission is mandatory for trusted publishing
Original file line number Diff line number Diff line change 11name : Build and publish to Test PyPI
22
33on :
4- push :
5- branches-ignore :
6- - main
7- pull_request :
8- types :
9- - opened
10- - reopened
11- - synchronize
4+ workflow_dispatch :
125
136jobs :
147 build :
2013 runs-on : ubuntu-latest
2114 # Specifying a GitHub environment is optional, but strongly encouraged
2215 environment :
23- name : development
16+ name : test
2417 url : https://test.pypi.org/p/reqstool-python-decorators
2518 permissions :
2619 id-token : write # IMPORTANT: this permission is mandatory for trusted publishing
Original file line number Diff line number Diff line change 11# yaml-language-server: $schema=https://raw.githubusercontent.com/asciidoctor/asciidoctor-intellij-plugin/main/src/main/resources/jsonSchemas/antoraPlaybookSchema.json
22
33site :
4- title : Requirements Tool Documentation
4+ title : Reqstool Python Decorators Documentation
55 url : https://github.com/Luftfartsverket/reqstool-python-decorators.git
66 start_page : reqstool-python-decorators::index.adoc
77
Original file line number Diff line number Diff line change 11== Installation
22
3- The package name is `reqstool-decorators` .
3+ The package name is `reqstool-python- decorators` .
44
55* Using pip install:
66
77```
8- $pip install reqstool-decorators
8+ $pip install reqstool-python- decorators
99```
Original file line number Diff line number Diff line change 66
77```
88dependencies = [
9- "reqstool-decorators == <version>"
9+ "reqstool-python- decorators == <version>"
1010]
1111```
1212
1313* Poetry
1414
1515```
1616[tool.poetry.dependencies]
17- reqstool-decorators = "<version>"
17+ reqstool-python- decorators = "<version>"
1818```
1919
2020=== Decorators
2121
2222Import decorators:
2323
2424```
25- from reqstool-decorators .decorators.decorators import Requirements, SVCs
25+ from reqstool_python_decorators .decorators.decorators import Requirements, SVCs
2626```
2727
2828Example usage of the decorators:
@@ -42,7 +42,7 @@ def test_somefunction():
4242Import processor:
4343
4444```
45- from reqstool .processors.decorator_processor import ProcessDecorator
45+ from reqstool_python_decorators .processors.decorator_processor import ProcessDecorator
4646```
4747
4848Main function to collect decorators data and generate yaml file:
You can’t perform that action at this time.
0 commit comments