diff --git a/DISTRIBUTING.txt b/DISTRIBUTING.txt new file mode 100644 index 0000000..b037fa9 --- /dev/null +++ b/DISTRIBUTING.txt @@ -0,0 +1,49 @@ +# Distributing + +## Setup + +Distribution requires setuptools, wheel, and twine. While setuptools is mostly likely already installed, you will probably need to install wheel and twine: + +```bash +pip install twine wheel +``` + +The .gitignore file should include: + +```text +*.egg-info +build +dist +``` + +## Notes + +For convenience, the Makefile contains two targets: + +- dist: To create and test the distribution. +- publish: To publish to PYPI. + +After `make dist`, It's a good idea to publish to the PYPI test site first: + +```bash +twine upload --repository-url https://test.pypi.org/legacy/ dist/* +``` + +You can test the install (in a virtual env) using: + +```bash +pip install -i https://test.pypi.org/simple/ python-commonkit +``` + +> Note: The PYPI test site may not have all of the required dependencies for the package. + +Checklist: + +1. Make sure the master branch is checked out. +2. Make sure all tests are passing. +3. Make sure documentation is built and published. +4. Bump the version if it hasn't been done already. The version must always be bumped to avoid a "file already exists" error. Also, be sure to update the Development Status classifier in `setup.py` if appropriate. +5. Run: `make dist` +6. Upload to test: `twine upload --repository-url https://test.pypi.org/legacy/ dist/*` +7. Run: `make publish` +8. Satisfaction. diff --git a/docs/generate_command_signatures.py b/docs/generate_command_signatures.py index 38eb9d2..540b693 100755 --- a/docs/generate_command_signatures.py +++ b/docs/generate_command_signatures.py @@ -115,7 +115,7 @@ print_description("Postgres commands.") print_mapping(PGSQL_MAPPINGS) print_heading("POSIX") -print_description("Posix commands form the basis of overlays for nix platforms.") +print_description("Posix commands form the basis of overlays for *nix platforms.") print_mapping(POSIX_MAPPINGS, excludes=["func"]) exclude_from_centos = COMMON_MAPPINGS.copy() diff --git a/docs/source/_data/cloc.csv b/docs/source/_data/cloc.csv index a28a7b4..fccd4f2 100644 --- a/docs/source/_data/cloc.csv +++ b/docs/source/_data/cloc.csv @@ -1,3 +1,3 @@ files,language,blank,comment,code -22,Python,1123,979,1844 -22,SUM,1123,979,1844 +22,Python,1124,981,1847 +22,SUM,1124,981,1847 diff --git a/docs/source/_includes/overlays.rst b/docs/source/_includes/overlays.rst index ff9dba4..bd92d29 100644 --- a/docs/source/_includes/overlays.rst +++ b/docs/source/_includes/overlays.rst @@ -528,7 +528,7 @@ Work with a PostgreSQL user. POSIX ===== -Posix commands form the basis of overlays for nix platforms. +Posix commands form the basis of overlays for *nix platforms. append ------ @@ -736,6 +736,36 @@ Prompt the user for input. help_text: None label: None +push +---- + +Synchronize a directory structure. + +- source (str): The source directory. +- target (str): The target directory. +- delete (bool): Indicates target files that exist in source but not in target should be removed. +- exclude (str): The path to an exclude file. +- host (str): The host name or IP address. This causes the command to run over SSH. +- key_file (str): The privacy SSH key (path) for remote connections. User expansion is automatically applied. +- links (bool): Include symlinks in the sync. +- port (int): The SSH port to use for remote connections. +- recursive (bool): Indicates source contents should be recursively synchronized. +- user (str): The user name to use for remote connections. + + +.. code-block:: ini + + [run push command] + push: source target + delete: False + exclude: None + host: None + key_file: None + links: True + port: 22 + recursive: True + user: None + remove ------ diff --git a/scripttease/library/overlays/centos.py b/scripttease/library/overlays/centos.py index 8c4af5c..50b21bc 100644 --- a/scripttease/library/overlays/centos.py +++ b/scripttease/library/overlays/centos.py @@ -36,7 +36,7 @@ __all__ = ( def command_exists(name): - """Indicates whether a given command exists in this overaly. + """Indicates whether a given command exists in this overlay. :param name: The name of the command. :type name: str diff --git a/scripttease/library/overlays/ubuntu.py b/scripttease/library/overlays/ubuntu.py index 093ab05..57d3a05 100644 --- a/scripttease/library/overlays/ubuntu.py +++ b/scripttease/library/overlays/ubuntu.py @@ -40,7 +40,7 @@ __all__ = ( def command_exists(name): - """Indicates whether a given command exists in this overaly. + """Indicates whether a given command exists in this overlay. :param name: The name of the command. :type name: str