Skip to content

Commit 6a5d56c

Browse files
authored
Merge pull request #95 from displague/release-1.43.0
v1.43.0 changelog updates
2 parents f32e551 + 0a912ae commit 6a5d56c

File tree

4 files changed

+104
-42
lines changed

4 files changed

+104
-42
lines changed

CHANGELOG.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,28 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
55
This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7-
## [1.43.0] - 2020-02-24
7+
## [1.44.0] - Unreleased
8+
### Added
9+
### Changed
10+
### Fixed
11+
12+
## [1.43.0] - 2020-07-14
813
### Added
914
- Support for reinstalling the operating system to a device, including changing the operating system.
15+
- `Manager.create_vlan` now includes a description argument
16+
### Changed
17+
- `ResponseError` will now be raised when an API call results in an error
18+
### Fixed
19+
- `Manager.validate_capacity` now considers availability
20+
- `Manager.create_project_ssh_key` will retry when it encounters 404 responses following a successful creation.
21+
- API responses with `{"error":""}` keys were not handled well, and will now be handled just like `{"errors":[""]}` keys.
1022

1123
## [1.42.0] - 2020-02-14
1224
### Added
13-
- Capturing of available_in to Plan
14-
- Capturing of hardware_reservation, spot_price_max, termination_time, and provisioning_percentage to Device
25+
- Capturing of `available_in` to Plan
26+
- Capturing of `hardware_reservation`, `spot_price_max`, `termination_time`, and `provisioning_percentage` to `Device`
1527
- Support for creating project ssh keys
16-
- Support for passing custom_data when creating a device
28+
- Support for passing `custom_data` when creating a device
1729
### Fixed
1830
- Black not building for CI and thus failing
1931

RELEASE.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Release Instructions
2+
3+
These build and release instructions are intended for the maintainers and future maintainers of this project.
4+
5+
## Preparing a new version
6+
7+
* a version update in `packet/__init__.py`
8+
* Update CHANGELOG.md with the new release notes
9+
* Add a stub for the next set of Unreleased changes
10+
* Create a PR with these changes
11+
* Merge
12+
13+
## Tagging and Building
14+
15+
Pull down the merged changes:
16+
17+
```bash
18+
git fetch origin
19+
git checkout origin/master
20+
```
21+
22+
Tag the commit:
23+
24+
```bash
25+
git tag -a vAA.BB.CC origin/master -m vAA.BB.CC
26+
```
27+
28+
Build the package using `setuptools`:
29+
30+
```bash
31+
python setup.py sdist bdist_wheel
32+
```
33+
34+
## Publishing
35+
36+
Make sure you have `~/.pypirc` correctly populated, as of today should look something like:
37+
38+
```
39+
[distutils]
40+
index-servers =
41+
pypi
42+
testpypi
43+
44+
[pypi]
45+
username: username-here
46+
password: password-here
47+
48+
[testpypi]
49+
repository: https://test.pypi.org/legacy/
50+
username: username-here (not necessarily same as real pypi)
51+
password: password-here (not necessarily same as real pypi)
52+
```
53+
54+
Then upload using twine to testpypi first:
55+
56+
```bash
57+
twine upload -r testpypi dist/*
58+
```
59+
60+
If everything looks good, push the tag to GH, and then push to the real
61+
pypi:
62+
63+
```bash
64+
git push origin --tags vAA.BB.CC
65+
twine upload dist/*
66+
```
67+
68+
Congratulations, you published `packet-python`, :raised_hands:!
69+

packet/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33

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

6-
__version__ = "1.42.0"
6+
__version__ = "1.43.0"
77
__author__ = "Packet Engineers"
88
__author_email__ = "[email protected]"
99
__license__ = "LGPL v3"
10-
__copyright__ = "Copyright (c) 2019, Packet"
10+
__copyright__ = "Copyright (c) 2020, Packet"
1111

1212
from .Device import Device # noqa
1313
from .Email import Email # noqa

setup.py

100644100755
Lines changed: 17 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,35 @@
11
#!/usr/bin/env python
22
# SPDX-License-Identifier: LGPL-3.0-only
3-
4-
# Notes for the not-an-everyday-python-dev for package distribution on pypi
5-
#
6-
# Build the package using `setuptools`:
7-
#
8-
# python setup.py sdist bdist_wheel
9-
#
10-
# Make sure you have ~/.pypirc correctly populated, as of today should look something like:
11-
#
12-
# [distutils]
13-
# index-servers =
14-
# pypi
15-
# testpypi
16-
#
17-
# [pypi]
18-
# username: username-here
19-
# password: password-here
20-
#
21-
# [testpypi]
22-
# repository: https://test.pypi.org/legacy/
23-
# username: username-here (not necessarily same as real pypi)
24-
# password: password-here (not necessarily same as real pypi)
25-
#
26-
# Then upload using twine to testpypi first:
27-
#
28-
# twine upload -r testpypi dist/*
29-
#
30-
# If all looks good go ahead and tag the repo, push to GH, and then push to real
31-
# pypi:
32-
#
33-
# twine upload dist/*
34-
#
35-
# Congratulations to me, I've just condensed so many webpages into 30 lines,
36-
# :raised_hands:!
3+
import codecs
4+
import os.path
375

386
try:
397
from setuptools import setup
408
except ImportError:
419
from ez_setup import use_setuptools
42-
4310
use_setuptools()
4411
from setuptools import setup
4512

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

17+
def read(rel_path):
18+
here = os.path.abspath(os.path.dirname(__file__))
19+
with codecs.open(os.path.join(here, rel_path), 'r') as fp:
20+
return fp.read()
21+
22+
def get_version(rel_path):
23+
for line in read(rel_path).splitlines():
24+
if line.startswith('__version__'):
25+
delim = '"' if '"' in line else "'"
26+
return line.split(delim)[1]
27+
else:
28+
raise RuntimeError("Unable to find version string.")
29+
4930
setup(
5031
name="packet-python",
51-
version="1.42.0",
32+
version=get_version("packet/__init__.py"),
5233
description="Packet API client",
5334
long_description=long_description,
5435
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)