Skip to content

Commit

Permalink
Update script for Python3, PyYAML 5.1.2
Browse files Browse the repository at this point in the history
-Update to use argparse.ArgumentParser() for command line args
-Use tempfile library to create tmp work directory

-Remove shutil.rmtree because it was throwing permission errors and
not deleting the directory. Also no longer needed after switching
to tempfile.

-Enchance error handling
-Add check for Go installation
-Enhance check for PyYAML installation
-Change deprecated PyYAML load function to full_load
-Add comments at top of file
-Modify to comply with PEP8
-Update kubernetes-components.md with software versions to match script

Signed-off-by: Aimee Ukasick <[email protected]>
  • Loading branch information
aimeeu committed Oct 22, 2019
1 parent 07431dd commit 82572a7
Show file tree
Hide file tree
Showing 3 changed files with 267 additions and 192 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,17 @@ reference documentation for tools and components in the

* You need a machine that is running Linux or macOS.

* You need to have this software installed:
* Install the following:

* [Python 2.7.16](https://www.python.org/downloads/)
* [Python](https://www.python.org/downloads/) v3.7.x
* [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
* [Golang](https://golang.org/doc/install) version 1.12 for Kubernetes 1.14+; Go 1.13 [is not supported](https://github.com/kubernetes/community/blob/master/contributors/devel/development.md#go)
* [PyYAML](https://pyyaml.org/) v3.13
* [Pip](https://pypi.org/project/pip/) used to install PyYAML
* [PyYAML](https://pyyaml.org/) v5.1.2
* [make](https://www.gnu.org/software/make/)
* [gcc compiler/linker](https://gcc.gnu.org/)

* The Go binary must be in your path; **do not** set your `$GOPATH`. The `update-imported-docs` tool sets your GOPATH.
* The `Go` binary must be in your path. The `update-imported-docs` tool sets your GOPATH.

* You need to know how to create a pull request to a GitHub repository.
This involves creating your own fork of the repository. For more
Expand All @@ -46,11 +47,11 @@ git clone [email protected]:<your_github_username>/website.git

Determine the base directory of your clone. For example, if you followed the
preceding step to get the repository, your base directory is
`$github.com/website.` The remaining steps refer to your base directory as
`github.com/website.` The remaining steps refer to your base directory as
`<web-base>`.

The reference documentation for the Kubernetes components and tools is generated
from the Kubernetes source code. The `update-imported-docs` tool automatically
The `update-imported-docs` tool generates the reference documentation for the
Kubernetes components from the Kubernetes source code. The tool automatically
clones the `kubernetes/kubernetes` repository. If you want to change the
reference documentation, please follow [this
guide](/docs/contribute/generate-ref-docs/contribute-upstream).
Expand All @@ -75,9 +76,10 @@ to `kubernetes/website`.

## Configuration file format

Each config file may contain multiple repos that will be imported together.
When necessary, you can customize the configuration file by manually editing
it. You may create new config files for importing other groups of documents. Imported documents must follow these guidelines:
Each config file may contain multiple repos that will be imported together. When
necessary, you can customize the configuration file by manually editing it. You
may create new config files for importing other groups of documents. Imported
documents must follow these guidelines:

1. Adhere to the [Documentation Style Guide](/docs/contribute/style/style-guide/).

Expand Down
182 changes: 0 additions & 182 deletions update-imported-docs/update-imported-docs

This file was deleted.

Loading

0 comments on commit 82572a7

Please sign in to comment.