Skip to content

Commit

Permalink
Cleaned up the Makefile and changed version to 1.0.0
Browse files Browse the repository at this point in the history
Details:

* Changed version from 1.0.0.dev1 to 1.0.0 to allow for use of ansible-galaxy
  commands.

Note that most of the changes below caused changes to or removals of make
variables, but that is not described in detail.

* Changed the approach in setup.py for determining the collection version
  from using PyYAML to using regular expressions, in order to avoid the
  depenency on the PyYAML package. The version needs to bbe determined
  before any packages are installed.

* Added ignores to 2.9 ignore file.

* Removed the cloning of the ansible repo into ../ansible. This was possible
  since none of its tools is used any longer.

* Removed target 'check' and use of flake8, since that is now done in
  the Ansible sanity test via check 'pep8'. Removed the .flake8 config file.
  Removed 'make check' from the travis control file, and enabled 'make sanity'
  in the travis control file for all Python versions.

* Removed target 'doccheck' since its only value was to verify that the
  generated RST files are in sync with the checked in RST files. This can
  be done with git and is unlikely to be a comon issue that would need such
  a functionality.

* Separated the RST extraction using ansible-doc-extractor into a separate
  pattern rule. That is not really motivated by performance concerns but
  by following the general idea of generating only what is out of date.
  This also allowed getting rid of the need to rename
  plugins/modules/__init__.py to *.skip.

* Improved the invocation of the Ansible sanity test a little, by reusing
  the tar file and updating it instead of recreating it. The only downside
  is that when files are removed, 'make clobber' now needs to be invoked
  (or the tar file manually removed).

* Removed make variables SPHINXOPTS, SPHINXBUILD, SOURCEDIR, and BUILDDIR
  (or in case of SPHINXOPTS used a new internal variable sphinx_opts), because
  it is unlikely that there is a need to set them from the outside.

* Changed the 'test' target to no longer create a test log file, and thus
  the tests are now always executed even when 'make test' is re-run.

* Fixed the 'linkcheck' target and made it part of the 'all' target. For now,
  its reported errors are ignored, so we can fix them separately.

* Changed the 'install' target to use 'ansible-galaxy collection install' to
  install into the local collection search path. The distribution archive
  for that is again built in the 'dist' directory. Added '/dist' to .gitignore.

* Changed the 'upload' target to use 'ansible-galaxy collection publish' to
  publish the collection to Ansible Galaxy.

* Made the 'sanity' target part of the 'all' target.

* Added some temporary directories to the 'clobber' target.

* Removed extraeneous messages in rules.

* Changed the approach for raising an error from using 'echo' and 'false' to
  using '$(error ...)'.

Signed-off-by: Andreas Maier <maiera@de.ibm.com>
  • Loading branch information
andy-maier committed Oct 30, 2020
1 parent 5616963 commit 504a769
Show file tree
Hide file tree
Showing 13 changed files with 200 additions and 301 deletions.
17 changes: 0 additions & 17 deletions .flake8

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ env*
.coverage
/AUTHORS
/ChangeLog
/dist
*.egg
*.egg-info
/_mailinglist
Expand All @@ -25,6 +26,7 @@ tmp_*
*.tmp
*.log
*.retry
/*.done
vars.yml
vault.yml
/python-zhmcclient
Expand Down
15 changes: 3 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ install:
- which pip
- pip --version
- pip list
- python tools/remove_duplicate_setuptools.py
- make install
- pip list
- make develop
Expand All @@ -199,19 +200,9 @@ install:

# commands to run builds & tests
script:
- if [[ $TRAVIS_PYTHON_VERSION == 3.8 && $PACKAGE_LEVEL == latest ]]; then
make docs;
fi
- if [[ $TRAVIS_PYTHON_VERSION == 3.8 && $PACKAGE_LEVEL == latest ]]; then
make doccheck || true;
fi
- make check
- make docs
- make test
# sanity tests will run for all ansible-supported python versions in a
# docker container, so its enough to run them once
- if [[ $TRAVIS_PYTHON_VERSION == 3.8 && $PACKAGE_LEVEL == latest ]]; then
make sanity;
fi
- make sanity

after_success:
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_PYTHON_VERSION" == "3.8" && "$PACKAGE_LEVEL" == "latest" ]]; then
Expand Down
Loading

0 comments on commit 504a769

Please sign in to comment.