Skip to content

Commit

Permalink
Merge pull request #16 from EasyPost/v1.6.0
Browse files Browse the repository at this point in the history
chore: prepare v1.6.0 for release
  • Loading branch information
Justintime50 authored Jun 9, 2023
2 parents 28b8835 + 5f16360 commit 9701ab0
Show file tree
Hide file tree
Showing 6 changed files with 92 additions and 30 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 'CI'

on:
push:
branches: [ master ]
branches: [master]
pull_request:

jobs:
Expand All @@ -12,16 +12,14 @@ jobs:
matrix:
pythonversion: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: set up python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.pythonversion }}
- name: install dependencies
run: |
python -m pip install -r test_requirements.txt
python -m pip install -e .
run: make install
- name: lint with flake8
run: flake8 ssh_certificate_parser/ tests/
run: make lint
- name: test with pytest
run: pytest --cov=ssh_certificate_parser --cov-report=term-missing --cov-fail-under=60 tests/
run: make coverage
36 changes: 18 additions & 18 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
ChangeLog
=========
# CHANGELOG

1.5.0
-----
## v1.6.0

- Adds support for certs that last forever
- Adds support for `ed25519` certs

## v1.5.0

- Adds proper support for `ecdsa-sha2-nistp256`

1.4.0
-----
## v1.4.0

- Adds proper support for `ecdsa-sha2-nistp384`

1.3.3
-----
## v1.3.3

- Fix RtD link issue

1.3.2
-----
## v1.3.2

- Fix PyPI project URLs

1.3.1
-----
## v1.3.1

- Fix `setup.py` issues

1.3.0
-----
## v1.3.0

- Can now parse ECDSA keys (if they're signed with an RSA CA)
- Add `.from_file` constructor on `SSHCertificate`
- Add a bunch of type hints
- Improve documentation a bit

1.2.0
-----
## v1.2.0

- Can now parse DSA and Ed25519 keys (although they still have to have been signed by an RSA CA)
- Unit tests
- `key_type` is now in the `SSHCertificate` object
- `pubkey_parts` is a dictionary containing the appropriate parts for that key (e.g., `n` and `e` for RSA)
- Now raises subclasses of `ssh_certificate_parser.errors.SSHCertificateParserError` instead of just `ValueError` with a string description

1.1.0
-----
## v1.1.0

- CA certificate fingerprint (equivalent to `ssh-keygen -l -f /path/to/key.pub`) is now parsed for ssh-rsa CAs. I don't have any ECDSA/Ed25519 CAs so I haven't tested them!

## v1.0.0

- Initial release
47 changes: 47 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
PYTHON_BINARY := python3
VIRTUAL_ENV := venv
VIRTUAL_BIN := $(VIRTUAL_ENV)/bin
PROJECT_NAME := ssh_certificate_parser
TEST_DIR := tests

## help - Display help about make targets for this Makefile
help:
@cat Makefile | grep '^## ' --color=never | cut -c4- | sed -e "`printf 's/ - /\t- /;'`" | column -s "`printf '\t'`" -t

## build - Builds the project in preparation for release
build:
$(VIRTUAL_BIN)/python -m build

## clean - Remove the virtual environment and clear out .pyc files
clean:
rm -rf $(VIRTUAL_ENV) dist/ build/ *.egg-info/ .pytest_cache .mypy_cache
find . -name '*.pyc' -delete

## coverage - Test the project and generate an HTML coverage report
coverage:
$(VIRTUAL_BIN)/pytest --cov=$(PROJECT_NAME) --cov-branch --cov-report=html --cov-report=term-missing --cov-fail-under=80

## install - Install the project locally
install:
$(PYTHON_BINARY) -m venv $(VIRTUAL_ENV)
$(VIRTUAL_BIN)/pip install -e .
$(VIRTUAL_BIN)/pip install -r test_requirements.txt

## lint - Lint the project
lint:
$(VIRTUAL_BIN)/flake8 $(PROJECT_NAME)/ $(TEST_DIR)/

## publish - Publish the project to PyPI
publish:
$(VIRTUAL_BIN)/twine upload dist/*

## release - Cuts a release for the project on GitHub (requires GitHub CLI)
# tag = The associated tag title of the release
release:
gh release create ${tag} dist/*

## test - Test the project
test:
$(VIRTUAL_BIN)/pytest

.PHONY: help build clean coverage install lint publish release test
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,17 @@ remaining_seconds_of_validity = cert.remaining_validity
```

Full documentation is at <https://ssh-certificate-parser.readthedocs.io/en/latest/>.

## Development

```sh
# Install dependencies
make install

# Lint project
make lint

# Test project
make test
make coverage
```
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

setup(
name="ssh_certificate_parser",
version="1.5.0",
version="1.6.0",
author="James Brown",
author_email="[email protected]",
url="https://github.com/easypost/ssh_certificate_parser",
Expand Down
9 changes: 6 additions & 3 deletions test_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
flake8==3.9.*
importlib_metadata<5
pytest-cov==2.*
build==0.9.*
flake8==5.*
importlib_metadata==4.*
pytest-cov==3.*
pytest-mock==3.*
pytest==6.*
twine==3.*
wheel==0.37.*

0 comments on commit 9701ab0

Please sign in to comment.