Skip to content

introduce workflow for releasing new version #291

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
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
52 changes: 52 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Release version

on:
workflow_dispatch:
inputs:
newversion:
description: 'New version'
required: true

jobs:
release-version:
runs-on: ubuntu-latest
steps:
- name: Repository checkout
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.6"

- name: Install dependencies
run: |
pip install --upgrade pip tox bump2version

- name: Test latest version
run: |
make test

- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: 'Get Previous version tag'
id: previousversion
uses: "WyriHaximus/github-action-get-previous-tag@v1"

- name: Bump setup.py version
run: |
bump2version --current-version ${previousversion} --new-version ${newversion} setup.py

- name: Tag latest version
uses: EndBug/latest-tag@latest
with:
tag-name: ${newversion}

- name: Update docs
run: /
make docs-to-github

- name: Upload to pypi
run: /
make upload
4 changes: 0 additions & 4 deletions maas/client/flesh/tables.py
Original file line number Diff line number Diff line change
@@ -11,7 +11,6 @@


class NodeTypeColumn(Column):

nice_names = {
NodeType.MACHINE: "Machine",
NodeType.DEVICE: "Device",
@@ -68,7 +67,6 @@ def render(self, target, memory):


class NodeStatusNameColumn(Column):

colours = {
# "New": "", # White.
"Commissioning": "autoyellow",
@@ -100,7 +98,6 @@ def render(self, target, datum):


class NodePowerColumn(Column):

colours = {
PowerState.ON: "autogreen",
# PowerState.OFF: "", # White.
@@ -387,7 +384,6 @@ def get_rows(self, target, files):


class UserIsAdminColumn(Column):

yes, no = "Yes", "Np"
yes_pretty = Color("{autogreen}Yes{/autogreen}")

1 change: 0 additions & 1 deletion maas/client/flesh/tabular.py
Original file line number Diff line number Diff line change
@@ -17,7 +17,6 @@


class RenderTarget(enum.Enum):

# Human-readable tabluar output.
plain = "plain"
pretty = "pretty"
1 change: 0 additions & 1 deletion maas/client/utils/tests/test_async.py
Original file line number Diff line number Diff line change
@@ -73,7 +73,6 @@ def test_callable_attributes_are_wrapped(self):
# `Asynchronous` groks class- and static-methods.

class Class(metaclass=maas_async.Asynchronous):

attribute = 123

def imethod(self):
1 change: 0 additions & 1 deletion maas/client/viscera/__init__.py
Original file line number Diff line number Diff line change
@@ -158,7 +158,6 @@ def bind(cls, origin, handler, handlers, *, name=None):


class ObjectBasics:

__slots__ = ()

def __dir__(self):
1 change: 0 additions & 1 deletion maas/client/viscera/boot_resources.py
Original file line number Diff line number Diff line change
@@ -38,7 +38,6 @@ def calc_size_and_sha265(content: io.IOBase, chunk_size: int):


class BootResourceFileType(enum.Enum):

TGZ = "tgz"
DDTGZ = "ddtgz"

1 change: 0 additions & 1 deletion maas/client/viscera/maas.py
Original file line number Diff line number Diff line change
@@ -252,7 +252,6 @@ async def set_ntp_server(cls, server: str):
await cls.set_config("ntp_server", server)

class StorageLayout(DescriptiveEnum):

FLAT = "flat", "Flat layout"
LVM = "lvm", "LVM layout"
BCACHE = "bcache", "Bcache layout"
1 change: 0 additions & 1 deletion maas/client/viscera/spaces.py
Original file line number Diff line number Diff line change
@@ -37,7 +37,6 @@ class Spaces(ObjectSet, metaclass=SpacesType):


class SpaceType(ObjectType):

_default_space_id = 0

async def get_default(cls):
1 change: 0 additions & 1 deletion maas/client/viscera/tests/test.py
Original file line number Diff line number Diff line change
@@ -1051,7 +1051,6 @@ def test__overrides_value_to_daturm(self):
self.assertThat(field.value_to_datum(None, 1), Equals(2))

def test__works_in_place(self):

# Deltas to apply to datums and values.
datum_to_value_delta = 2
value_to_datum_delta = 3
1 change: 0 additions & 1 deletion maas/client/viscera/tests/test_machines.py
Original file line number Diff line number Diff line change
@@ -866,7 +866,6 @@ def test__unlock(self):


class TestMachine_APIVersion(TestCase):

scenarios = tuple(
(name, dict(version=version, description=description))
for name, version, description in api_descriptions
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -40,7 +40,6 @@ def read(filename):
'Programming Language :: Python :: 3.9',
'Topic :: Software Development :: Libraries',
],
namespace_packages=['maas'],
packages=find_packages(
include={"maas", "maas.*"},
exclude={"*.tests", "*.testing"},
@@ -58,13 +57,14 @@ def read(filename):
"pymongo >= 3.5.1", # for bson
"pytz >= 2014.10",
"PyYAML >= 3.11",
"setuptools >= 58.2.0",
"terminaltables >= 2.1.0",
],
test_suite="maas.client",
tests_require=[
"django >= 2.2.4, < 3.0",
"fixtures >= 1.0.0",
"setuptools",
"setuptools >= 58.2.0",
"testscenarios",
"testtools",
"Twisted<23.0.0",
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -28,6 +28,7 @@ skip_install = True
deps = black

[testenv:imports]
allowlist_externals = {toxinidir}/scripts/check-imports
commands = {toxinidir}/scripts/check-imports
setenv = PYTHONPATH={toxinidir}
sitepackages = False