Skip to content

Commit f1dc987

Browse files
authored
Initial features (#1)
* Add bumpversion config * Add CircleCI config * Add linting configs (`.flake8`, `.pylintrc`, `.yamllint`, `pylama.ini`) * Update TravisCI config * Add a `Dockerfile` and the `dev.sh` script for spinning up a test environment * Fix the LICENSE * Add Pipenv support * Updated the README * Reorganized all the code and created the following classes under `cert_manager`: * Certificates * Endpoint * Client * Organization * Person * SMIME * SSL * Added a `_helpers.py` file with several helper functions and exceptions * Updated `setup.py` and added a `setup.cfg` for packaging * Add unit tests for most of the code
1 parent d2c8e5d commit f1dc987

40 files changed

+4097
-230
lines changed

.bumpversion.cfg

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[bumpversion]
2+
commit = True
3+
current_version = 0.1.0
4+
files = cert_manager/__init__.py
5+
tag = True
6+
tag_name = {new_version}

.circleci/config.yml

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
version: 2
3+
workflows:
4+
version: 2
5+
preflight:
6+
jobs:
7+
- preflight-3.6
8+
test:
9+
jobs:
10+
- test-3.6
11+
- test-3.5
12+
- test-3.4
13+
- test-2.7
14+
jobs:
15+
preflight-3.6:
16+
docker:
17+
- image: circleci/python:3.6-stretch
18+
working_directory: ~/repo
19+
environment:
20+
PIPENV_COLORBLIND: 1
21+
PIPENV_HIDE_EMOJIS: 1
22+
PIPENV_NOSPIN: 1
23+
steps:
24+
- checkout
25+
- run:
26+
name: Install dependencies
27+
command: |
28+
pip install pipenv
29+
rm -f Pipfile.lock
30+
pipenv lock
31+
pipenv sync --dev
32+
- run:
33+
name: Run linting
34+
command: |
35+
pipenv run yamllint . -s
36+
pipenv run pylama -v --skip '.venv/*'
37+
test-3.6: &test-template
38+
docker:
39+
- image: circleci/python:3.6-stretch
40+
working_directory: ~/repo
41+
environment:
42+
PIPENV_COLORBLIND: 1
43+
PIPENV_HIDE_EMOJIS: 1
44+
PIPENV_NOSPIN: 1
45+
steps:
46+
- checkout
47+
- run:
48+
name: Install dependencies
49+
command: |
50+
pip install pipenv
51+
rm -f Pipfile.lock
52+
pipenv lock
53+
pipenv sync --dev
54+
- run:
55+
name: Run tests
56+
command: |
57+
pipenv run green -r -vvv
58+
test-3.4:
59+
<<: *test-template
60+
docker:
61+
- image: circleci/python:3.4-stretch
62+
test-3.5:
63+
<<: *test-template
64+
docker:
65+
- image: circleci/python:3.5-stretch
66+
test-2.7:
67+
<<: *test-template
68+
docker:
69+
- image: circleci/python:2.7-stretch

.flake8

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[flake8]
2+
max-line-length = 120
3+
exclude = tests/*
4+
max-complexity = 18

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
# Temporary Python files
55
*.pyc
66
__pycache__/
7+
.coverage
8+
/tmp/
79

810
# Generated project
11+
/build/*
12+
/dist
13+
/.eggs/
14+
/*.egg-info
915
/TemplateDemo/

.green

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
verbose = 3
2+
run-coverage = True

.pre-commit-config.yaml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
repos:
3+
- repo: https://github.com/pre-commit/pre-commit-hooks
4+
rev: v2.1.0
5+
hooks:
6+
- id: trailing-whitespace
7+
- id: check-ast
8+
- id: check-case-conflict
9+
- id: check-docstring-first
10+
- id: check-executables-have-shebangs
11+
- id: check-json
12+
- id: check-merge-conflict
13+
- id: debug-statements
14+
- id: detect-aws-credentials
15+
args:
16+
- --allow-missing-credentials
17+
- id: detect-private-key
18+
- id: end-of-file-fixer
19+
- id: mixed-line-ending
20+
# - id: no-commit-to-branch
21+
# args:
22+
# - -b master
23+
# - -b prod
24+
- id: trailing-whitespace
25+
- repo: https://github.com/broadinstitute/mirrors-pylama.git
26+
rev: v1.0.1
27+
hooks:
28+
- id: pylama
29+
- repo: https://github.com/adrienverge/yamllint.git
30+
rev: v1.15.0
31+
hooks:
32+
- id: yamllint
33+
args:
34+
- -s

0 commit comments

Comments
 (0)