diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e7ffba24..063acacc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -114,7 +114,7 @@ jobs: shell: bash run: | echo "Attempting to build docs..." - make build_docs + make docs_build test_datasets: timeout-minutes: 5 runs-on: ubuntu-latest diff --git a/.github/workflows/doc_publish.yaml b/.github/workflows/doc_publish.yaml index 019aafea..5d6fb979 100644 --- a/.github/workflows/doc_publish.yaml +++ b/.github/workflows/doc_publish.yaml @@ -34,7 +34,7 @@ jobs: - name: Sphinx build shell: bash run: | - make build_docs + make docs_build - name: Publish Docs uses: peaceiris/actions-gh-pages@v3 with: diff --git a/Makefile b/Makefile index fd62b3af..c7344157 100644 --- a/Makefile +++ b/Makefile @@ -3,32 +3,7 @@ # Default target executed when no arguments are given to make. all: help -###################### -# TESTING AND COVERAGE -###################### - -# Define a variable for the test file path. -TEST_FILE ?= tests/unit_tests/ - -test: - poetry run pytest --disable-socket --allow-unix-socket $(TEST_FILE) - -test_watch: - poetry run ptw . -- $(TEST_FILE) - -build_docs: - # Copy README.md to docs/index.md - cp README.md ./docs/source/index.md - # Append to the table of contents the contents of the file - cat ./docs/source/toc.segment >> ./docs/source/index.md - poetry run sphinx-build "./docs/source" "./docs/build" - -clean_docs: - rm -rf ./docs/build - -###################### -# LINTING AND FORMATTING -###################### +# LINTING AND FORMATTING: # Define a variable for Python and notebook files. lint format: PYTHON_FILES=. @@ -48,19 +23,45 @@ spell_check: spell_fix: poetry run codespell --toml pyproject.toml -w -###################### -# HELP -###################### +# TESTING AND COVERAGE: + +# Define a variable for the test file path. +TEST_FILE ?= tests/unit_tests/ + +test: + poetry run pytest --disable-socket --allow-unix-socket $(TEST_FILE) + +test_watch: + poetry run ptw . -- $(TEST_FILE) + + +# DOCUMENTATION: + +docs_clean: + rm -rf ./docs/build + +docs_build: + # Copy README.md to docs/index.md + cp README.md ./docs/source/index.md + # Append to the table of contents the contents of the file + cat ./docs/source/toc.segment >> ./docs/source/index.md + poetry run sphinx-build "./docs/source" "./docs/build" + + +# HELP: help: - @echo '====================' - @echo '-- LINTING --' - @echo 'format - run code formatters' - @echo 'lint - run linters' - @echo 'spell_check - run codespell on the project' - @echo 'spell_fix - run codespell on the project and fix the errors' - @echo '-- TESTS --' - @echo 'coverage - run unit tests and generate coverage report' - @echo 'test - run unit tests' - @echo 'test TEST_FILE= - run all tests in file' - @echo '-- DOCUMENTATION tasks are from the top-level Makefile --' + @echo '' + @echo 'LINTING:' + @echo ' format - run code formatters' + @echo ' lint - run linters' + @echo ' spell_check - run codespell' + @echo ' spell_fix - run codespell and fix the errors' + @echo 'TESTS:' + @echo ' test - run unit tests' + @echo ' test TEST_FILE= - run tests in ' + @echo ' coverage - run unit tests and generate coverage report' + @echo 'DOCUMENTATION:' + @echo ' docs_clean - delete the docs/build directory' + @echo ' docs_build - build the documentation' + @echo ''