Skip to content

Commit

Permalink
Merge pull request #95 from displague/release-1.43.0
Browse files Browse the repository at this point in the history
v1.43.0 changelog updates
  • Loading branch information
displague authored Jul 16, 2020
2 parents f32e551 + 0a912ae commit 6a5d56c
Show file tree
Hide file tree
Showing 4 changed files with 104 additions and 42 deletions.
20 changes: 16 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,28 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [1.43.0] - 2020-02-24
## [1.44.0] - Unreleased
### Added
### Changed
### Fixed

## [1.43.0] - 2020-07-14
### Added
- Support for reinstalling the operating system to a device, including changing the operating system.
- `Manager.create_vlan` now includes a description argument
### Changed
- `ResponseError` will now be raised when an API call results in an error
### Fixed
- `Manager.validate_capacity` now considers availability
- `Manager.create_project_ssh_key` will retry when it encounters 404 responses following a successful creation.
- API responses with `{"error":""}` keys were not handled well, and will now be handled just like `{"errors":[""]}` keys.

## [1.42.0] - 2020-02-14
### Added
- Capturing of available_in to Plan
- Capturing of hardware_reservation, spot_price_max, termination_time, and provisioning_percentage to Device
- Capturing of `available_in` to Plan
- Capturing of `hardware_reservation`, `spot_price_max`, `termination_time`, and `provisioning_percentage` to `Device`
- Support for creating project ssh keys
- Support for passing custom_data when creating a device
- Support for passing `custom_data` when creating a device
### Fixed
- Black not building for CI and thus failing

Expand Down
69 changes: 69 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Release Instructions

These build and release instructions are intended for the maintainers and future maintainers of this project.

## Preparing a new version

* a version update in `packet/__init__.py`
* Update CHANGELOG.md with the new release notes
* Add a stub for the next set of Unreleased changes
* Create a PR with these changes
* Merge

## Tagging and Building

Pull down the merged changes:

```bash
git fetch origin
git checkout origin/master
```

Tag the commit:

```bash
git tag -a vAA.BB.CC origin/master -m vAA.BB.CC
```

Build the package using `setuptools`:

```bash
python setup.py sdist bdist_wheel
```

## Publishing

Make sure you have `~/.pypirc` correctly populated, as of today should look something like:

```
[distutils]
index-servers =
pypi
testpypi
[pypi]
username: username-here
password: password-here
[testpypi]
repository: https://test.pypi.org/legacy/
username: username-here (not necessarily same as real pypi)
password: password-here (not necessarily same as real pypi)
```

Then upload using twine to testpypi first:

```bash
twine upload -r testpypi dist/*
```

If everything looks good, push the tag to GH, and then push to the real
pypi:

```bash
git push origin --tags vAA.BB.CC
twine upload dist/*
```

Congratulations, you published `packet-python`, :raised_hands:!

4 changes: 2 additions & 2 deletions packet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

"""library to interact with the Packet API"""

__version__ = "1.42.0"
__version__ = "1.43.0"
__author__ = "Packet Engineers"
__author_email__ = "help@packet.net"
__license__ = "LGPL v3"
__copyright__ = "Copyright (c) 2019, Packet"
__copyright__ = "Copyright (c) 2020, Packet"

from .Device import Device # noqa
from .Email import Email # noqa
Expand Down
53 changes: 17 additions & 36 deletions setup.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,54 +1,35 @@
#!/usr/bin/env python
# SPDX-License-Identifier: LGPL-3.0-only

# Notes for the not-an-everyday-python-dev for package distribution on pypi
#
# Build the package using `setuptools`:
#
# python setup.py sdist bdist_wheel
#
# Make sure you have ~/.pypirc correctly populated, as of today should look something like:
#
# [distutils]
# index-servers =
# pypi
# testpypi
#
# [pypi]
# username: username-here
# password: password-here
#
# [testpypi]
# repository: https://test.pypi.org/legacy/
# username: username-here (not necessarily same as real pypi)
# password: password-here (not necessarily same as real pypi)
#
# Then upload using twine to testpypi first:
#
# twine upload -r testpypi dist/*
#
# If all looks good go ahead and tag the repo, push to GH, and then push to real
# pypi:
#
# twine upload dist/*
#
# Congratulations to me, I've just condensed so many webpages into 30 lines,
# :raised_hands:!
import codecs
import os.path

try:
from setuptools import setup
except ImportError:
from ez_setup import use_setuptools

use_setuptools()
from setuptools import setup


with open("README.md") as readme, open("CHANGELOG.md") as changelog:
long_description = readme.read() + "\n" + changelog.read()

def read(rel_path):
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, rel_path), 'r') as fp:
return fp.read()

def get_version(rel_path):
for line in read(rel_path).splitlines():
if line.startswith('__version__'):
delim = '"' if '"' in line else "'"
return line.split(delim)[1]
else:
raise RuntimeError("Unable to find version string.")

setup(
name="packet-python",
version="1.42.0",
version=get_version("packet/__init__.py"),
description="Packet API client",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 6a5d56c

Please sign in to comment.