From 4355b7732a97ad78055fb59c6905c243415665bb Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 13 Apr 2020 15:37:11 +0200 Subject: [PATCH] prepare documentation generation --- CHANGELOG.md | 1 + Makefile | 26 +++++++++++++++++++ corenetworks/__init__.py | 1 - corenetworks/authenticators.py | 2 +- corenetworks/exceptions.py | 2 +- docs/content/usage/.keep | 0 .../_index.md => templates/usage_index.md} | 0 setup.py | 1 + 8 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 Makefile create mode 100644 docs/content/usage/.keep rename docs/{content/usage/_index.md => templates/usage_index.md} (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..de4f062 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1 @@ +* initial release diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..52b073b --- /dev/null +++ b/Makefile @@ -0,0 +1,26 @@ +export GEEKDOC_VERSION ?= latest +BASE_DIR := docs +THEME := hugo-geekdoc +THEME_DIR := $(BASE_DIR)/themes + +.PHONY: all +all: doc + +.PHONY: doc +doc: doc-assets doc-generate + +.PHONY: doc-assets +doc-assets: + mkdir -p $(THEME_DIR)/$(THEME)/; \ + curl -sSL https://github.com/xoxys/$(THEME)/releases/$${GEEKDOC_VERSION}/download/$(THEME).tar.gz | tar -xz -C $(THEME_DIR)/$(THEME)/ --strip-components=1 + +.PHONY: doc-generate +doc-generate: + cd $(BASE_DIR); \ + cp templates/usage_index.md content/usage/_index.md; \ + pydocmd simple corenetworks+ corenetworks.authenticators++ corenetworks.client++ corenetworks.exceptions++ >> content/usage/_index.md + +.PHONY: clean +clean: + rm -rf $(THEME_DIR) && \ + rm -f content/usage/_index.md diff --git a/corenetworks/__init__.py b/corenetworks/__init__.py index 634ff89..f9fdb67 100644 --- a/corenetworks/__init__.py +++ b/corenetworks/__init__.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- """Default package.""" diff --git a/corenetworks/authenticators.py b/corenetworks/authenticators.py index d6fe771..a09dd16 100644 --- a/corenetworks/authenticators.py +++ b/corenetworks/authenticators.py @@ -13,7 +13,7 @@ from .exceptions import AuthError class CoreNetworksBasicAuth(AuthBase): - """Define token based auth.""" + """Define login based auth.""" def __init__(self, user, password, endpoint): self.user = user diff --git a/corenetworks/exceptions.py b/corenetworks/exceptions.py index 46a0195..32077a2 100644 --- a/corenetworks/exceptions.py +++ b/corenetworks/exceptions.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +# -*- coding: utf-8 -*- """Custom package exceptions.""" diff --git a/docs/content/usage/.keep b/docs/content/usage/.keep new file mode 100644 index 0000000..e69de29 diff --git a/docs/content/usage/_index.md b/docs/templates/usage_index.md similarity index 100% rename from docs/content/usage/_index.md rename to docs/templates/usage_index.md diff --git a/setup.py b/setup.py index 8c04efb..2f9ced0 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +# -*- coding: utf-8 -*- """Setup script for the package.""" import io