stdevel / katprep

Python toolkit for automating system maintenance and generating patch reports along with Foreman/Katello and Red Hat Satellite 6.x
GNU General Public License v3.0
35 stars 6 forks source link

changed dummy_call to is_authenticated #118

Closed philippfe closed 5 years ago

philippfe commented 5 years ago

Hi, I'm new here and hope that this issue was only about replacing the function-name and calls in html-files. It's my first pull request and working on this project, so if I haven't met the standards, please let me know how to improve my contribution. Please test the changes before merging THX

okin commented 5 years ago

This would fix #102.

One thing I find strange is that the docs have been changed. @stdevel aren't the docs automatically built?

philippfe commented 5 years ago

I think you're right - I changed it, but if I look at the function there is a comment which I guess is used to generate the docs. Wasn't sure, if it's generated new every time, so I changed it in the docs, too. Shouldn't be a problem, because it will get overwritten by next doc-rebuild.

stdevel commented 5 years ago

Hello @pfelwor! Sorry for the late reply - I've been busy.

Thanks a lot for your first contribution - really happy to see it! 👍

The documentation can be re-generated by running the doc/publish.sh script. But I'm looking forward to automate this in the future (e.g. using CI/CD).

You were renaming the function name in Icinga2APIClient and NagiosCGIClient, but there are still references in the unit tests:

pfelwor_katprep (feature-dummyCall-issue_102 -> origin)
λ grep dummy_call * -R|grep -v docs
tests/test_Icinga2APIClient.py:    client.dummy_call()
tests/test_Icinga2APIClient.py:        client.dummy_call()
tests/test_NagiosCompatibleCGIClient.py:    monitoringClient.dummy_call()
tests/test_NagiosCompatibleCGIClient.py:        client.dummy_call()

Could you fix these references, too?

Best regards and thanks for you support!

philippfe commented 5 years ago

Sure, thanks for your reply - I will take a look at it

philippfe commented 5 years ago

Got some warnings while generating the docs - think that is ok?:

OUTPUT:

sphinx-build -b html -d build/doctrees   source build/html
Running Sphinx v1.7.9
making output directory...
loading pickled environment... not yet created
loading intersphinx inventory from http://docs.python.org/objects.inv...
intersphinx inventory has moved: http://docs.python.org/objects.inv -> https://docs.python.org/3/objects.inv
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 22 source files that are out of date
updating environment: 22 added, 0 changed, 0 removed
reading sources... [100%] tested_setups                                                                                                                                         
/home/pfe/git/katprep/doc/source/index.rst:12: WARNING: toctree contains reference to nonexisting document 'modules'
WARNING: autodoc: failed to import module 'katprep'; the following exception was raised:
No module named 'katprep'
WARNING: autodoc: failed to import module 'katprep.authconfig'; the following exception was raised:
No module named 'katprep'
WARNING: autodoc: failed to import module 'exceptions'; the following exception was raised:
No module named 'exceptions'
WARNING: autodoc: failed to import module 'katprep.maintenance'; the following exception was raised:
No module named 'katprep'
WARNING: autodoc: failed to import module 'katprep.parameters'; the following exception was raised:
No module named 'katprep'
WARNING: autodoc: failed to import module 'katprep.populate'; the following exception was raised:
No module named 'katprep'
WARNING: autodoc: failed to import module 'katprep.report'; the following exception was raised:
No module named 'katprep'
WARNING: autodoc: failed to import module 'katprep.snapshot'; the following exception was raised:
No module named 'katprep'
WARNING: autodoc: failed to import module 'clients.ForemanAPIClient'; the following exception was raised:
No module named 'katprep'
WARNING: autodoc: failed to import module 'clients.SpacewalkAPIClient'; the following exception was raised:
No module named 'katprep'
WARNING: autodoc: failed to import module 'clients.Icinga2APIClient'; the following exception was raised:
No module named 'katprep'
WARNING: autodoc: failed to import module 'clients.LibvirtClient'; the following exception was raised:
No module named 'libvirt'
WARNING: autodoc: failed to import module 'clients.NagiosCGIClient'; the following exception was raised:
No module named 'lxml'
WARNING: autodoc: failed to import module 'clients.PyvmomiClient'; the following exception was raised:
No module named 'katprep'
/home/pfe/git/katprep/doc/source/man/katprep_populate.1.rst:125: WARNING: Line block ends without a blank line.
looking for now-outdated files... none found
pickling environment... done
checking consistency... /home/pfe/git/katprep/doc/source/katprep.rst: WARNING: document isn't included in any toctree
/home/pfe/git/katprep/doc/source/man/errata-diff.yml.5.rst: WARNING: document isn't included in any toctree
/home/pfe/git/katprep/doc/source/man/katprep.1.rst: WARNING: document isn't included in any toctree
/home/pfe/git/katprep/doc/source/man/katprep.auth.5.rst: WARNING: document isn't included in any toctree
/home/pfe/git/katprep/doc/source/man/katprep_authconfig.1.rst: WARNING: document isn't included in any toctree
/home/pfe/git/katprep/doc/source/man/katprep_maintenance.1.rst: WARNING: document isn't included in any toctree
/home/pfe/git/katprep/doc/source/man/katprep_parameters.1.rst: WARNING: document isn't included in any toctree
/home/pfe/git/katprep/doc/source/man/katprep_populate.1.rst: WARNING: document isn't included in any toctree
/home/pfe/git/katprep/doc/source/man/katprep_report.1.rst: WARNING: document isn't included in any toctree
/home/pfe/git/katprep/doc/source/man/katprep_snapshot.1.rst: WARNING: document isn't included in any toctree
done
preparing documents... done
writing output... [100%] tested_setups                                                                                                                                          
generating indices... genindex py-modindex
highlighting module code... [100%] logging                                                                                                                                      
writing additional pages... search
copying images... [100%] _static/example_2.png                                                                                                                                  
copying static files... done
copying extra files... done
dumping search index in English (code: en) ... done
dumping object inventory... done
build succeeded, 26 warnings.

The HTML pages are in build/html.

Build finished. The HTML pages are in build/html.
stdevel commented 5 years ago

Looks great, thanks for you work! You can safely ignore these warnings. 👍

Merging your pull request.