-
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.
adjusted imports so pylint isn't complaining update CI - setup code-cov, pylint and build package fix linting issues, setup pre-commit fixed executer->executor typo
- Loading branch information
1 parent
15dc084
commit c9c0a73
Showing
128 changed files
with
2,144 additions
and
483 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,91 @@ | ||
name: build and release openstackquery package | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Version to release' | ||
required: true | ||
changelog: | ||
description: 'Release changelog description' | ||
required: false | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
if: github.ref == 'refs/heads/main' | ||
|
||
strategy: | ||
matrix: | ||
python-version: ['3.8', '3.x'] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Update version in setup.py | ||
run: | | ||
sed -i "s/version=.*,/version='${{ github.event.inputs.version }}',/" setup.py | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel build | ||
- name: Build package | ||
run: python -m build | ||
|
||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: dist-${{ matrix.python-version }} | ||
path: dist/ | ||
|
||
publish: | ||
needs: release | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Download all artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
path: dist | ||
|
||
- name: Generate Changelog | ||
id: changelog | ||
run: | | ||
if [ -z "${{ github.event.inputs.changelog }}" ]; then | ||
echo "changelog=Release version ${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT | ||
else | ||
echo "changelog=${{ github.event.inputs.changelog }}" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Create Git Tag | ||
run: | | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git add version.txt | ||
git commit -m "Bump version to ${{ github.event.inputs.version }}" | ||
git tag v${{ github.event.inputs.version }} | ||
git push origin main | ||
git push origin v${{ github.event.inputs.version }} | ||
- name: Create GitHub Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: v${{ github.event.inputs.version }} | ||
body: ${{ steps.changelog.outputs.changelog }} | ||
files: | | ||
dist/**/*.whl | ||
dist/**/*.tar.gz | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.2.0 | ||
hooks: | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- repo: https://github.com/psf/black | ||
rev: 22.3.0 | ||
hooks: | ||
- id: black |
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 @@ | ||
[FORMAT] | ||
# Black will enforce 88 chars on Python code | ||
# this will enforce 120 chars on docs / comments | ||
max-line-length=120 | ||
|
||
# Disable various warnings: | ||
# C0114: Missing module string - we don't need module strings for the small repo | ||
# C0115: Missing class doc string - a lot of the actions are self explanatory | ||
# W0511: TODOs they're well....to do later | ||
# R0801: Similar lines - Imports and method signatures will flag this, such as forwarding action args | ||
# C0116: Missing method docstring - Adds too much noise | ||
# R0913: Too many arguments - same as above | ||
|
||
disable=C0114,C0115,E0401,W0511,R0801,C0116,R0913 |
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
File renamed without changes.
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
File renamed without changes.
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
File renamed without changes.
6 changes: 4 additions & 2 deletions
6
...ck_query/enums/props/flavor_properties.py → ...ackquery/enums/props/flavor_properties.py
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
6 changes: 4 additions & 2 deletions
6
...uery/enums/props/hypervisor_properties.py → ...uery/enums/props/hypervisor_properties.py
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
6 changes: 4 additions & 2 deletions
6
...ack_query/enums/props/image_properties.py → ...tackquery/enums/props/image_properties.py
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
6 changes: 4 additions & 2 deletions
6
...k_query/enums/props/project_properties.py → ...ckquery/enums/props/project_properties.py
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
2 changes: 1 addition & 1 deletion
2
openstack_query/enums/props/prop_enum.py → openstackquery/enums/props/prop_enum.py
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
6 changes: 4 additions & 2 deletions
6
...ck_query/enums/props/server_properties.py → ...ackquery/enums/props/server_properties.py
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
6 changes: 4 additions & 2 deletions
6
...tack_query/enums/props/user_properties.py → ...stackquery/enums/props/user_properties.py
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
2 changes: 1 addition & 1 deletion
2
openstack_query/enums/query_output_types.py → openstackquery/enums/query_output_types.py
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
Oops, something went wrong.