diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 124ca5c7..6a970111 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -57,7 +57,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Download HTML documentation from job 'test' - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4.1.7 with: name: html-doc path: example/_build/html diff --git a/MANIFEST.in b/MANIFEST.in index db37a39d..344d5316 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -4,27 +4,17 @@ include README.rst # added by check_manifest.py include LICENSE include NOTICE -include tox.ini -recursive-include mlx/coverity *.py -exclude mlx/coverity/__coverity_version__.py -recursive-include example *.bat -recursive-include example *.py -recursive-include example *.rst -recursive-include example Makefile -recursive-include tests *.py -recursive-include tests *.rst -recursive-include tests *.txt -recursive-include tests *.json - -exclude example/.env.example +exclude tox.ini exclude .pylintrc -recursive-exclude example _build * - -# added by check_manifest.py -recursive-include example *.css +exclude .gitignore +exclude .codeclimate.yml +exclude codecov.yml +exclude warnings_config.yml -# added by check_manifest.py -recursive-include tests *.xml - -# added by check-manifest -include *.json +recursive-include mlx/coverity *.py +exclude mlx/coverity/__coverity_version__.py +recursive-exclude .github * +recursive-exclude build * +recursive-exclude example * +recursive-exclude tests * +global-exclude *.py[co] diff --git a/README.rst b/README.rst index 0f8a6e5b..daa34a56 100644 --- a/README.rst +++ b/README.rst @@ -92,8 +92,8 @@ Example of custom credentials for the plugin: coverity_credentials = { 'hostname': 'scan.coverity.com', - 'username': 'reporter', - 'password': 'coverity', + 'username': 'myusername', + 'password': 'mypassword', 'stream': 'some_coverity_stream', 'snapshot': '1', } @@ -290,7 +290,10 @@ nice gesture and considered as contribution, even if you do not have development Development setup ----------------- -To run tests and checks we use tox. +To contribute to the code or documentation, you may want to run tests and build the documentation. Firstly, clone +the repository. + +To run tests and checks we use tox_. .. code-block:: bash @@ -300,18 +303,23 @@ To run tests and checks we use tox. # to run tests tox -To build example locally you will need to install some dependencies and set your environment. +To build the example documentation locally, you will need to install the package and set your environment, see help_. .. code-block:: bash # install current package locally and its dependencies - pip3 install -e . + pip3 install --editable . - # copy example .env to your .env - cp example/.env.example .env + # define environment variables, needed by example/conf.py + # or store them in a .env file for a more permanent solution + export COVERITY_USERNAME='yourusername' + export COVERITY_PASSWORD='yourpassword' + export COVERITY_STREAM='yourstream' + export COVERITY_SNAPSHOT='' - # add env variables, adjust the values in .env - # build - make -C example/ html + # build documentation with Sphinx in a Tox environment + tox -e html .. _`Traceability extension`: https://github.com/melexis/sphinx-traceability-extension/ +.. _tox: https://tox.wiki/ +.. _help: https://pypi.org/project/python-decouple/#where-is-the-settings-data-stored diff --git a/example/.env.example b/example/.env.example deleted file mode 100644 index c8cea9fe..00000000 --- a/example/.env.example +++ /dev/null @@ -1,5 +0,0 @@ -COVERITY_USERNAME = 'yourusername' -COVERITY_PASSWORD = 'yourpassword' -COVERITY_STREAM = 'yourstream' -COVERITY_SNAPSHOT = '' - diff --git a/setup.py b/setup.py index 17ba81dc..4aa459e6 100644 --- a/setup.py +++ b/setup.py @@ -43,9 +43,9 @@ 'Topic :: Utilities', ], platforms="any", - packages=find_namespace_packages(where="."), + packages=find_namespace_packages(where=".", exclude=("example.*", "example", "tests.*", "tests", "build*")), package_dir={"": "."}, - include_package_data=True, + include_package_data=False, install_requires=requires, python_requires='>=3.8', namespace_packages=['mlx'],