Skip to content

Commit

Permalink
Ilkbyte CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
bkayranci committed Dec 9, 2020
1 parent 5395319 commit d94e6a7
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 6 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/build-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build and Test Package

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.6', '3.7', '3.8', '3.9']

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
flake8 ilkbyte --count --show-source --statistics --ignore E501
flake8 ilkbyte --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# - name: Test with pytest
# run: |
# pytest
28 changes: 28 additions & 0 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Publish Package

on:
release:
types: [created]

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
3 changes: 1 addition & 2 deletions ilkbyte_cli/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,10 @@ def ip_logs(server_name: str):


@server_app.command()
def ip_logs(server_name: str, ip: str, rdns: str):
def ip_rdns(server_name: str, ip: str, rdns: str):
client = get_client()
typer.echo(client.get_ip_rdns(server_name, ip, rdns))



if __name__ == '__main__':
server_app()
3 changes: 0 additions & 3 deletions ilkbyte_cli/snapshot.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
from typing import Optional

import typer
from ilkbyte.utils import PowerAction

from ilkbyte_cli.utils import get_client

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setuptools.setup(
name="ilkbyte-cli",
version="1.0.0",
version="1.0.1",
author="Türkalp Burak Kayrancıoğlu",
author_email="bkayranci@gmail.com",
description="Ilkbyte python CLI",
Expand Down

0 comments on commit d94e6a7

Please sign in to comment.