diff --git a/.github/workflows/policy_docs.yml b/.github/workflows/policy_docs.yml deleted file mode 100644 index dc25c23..0000000 --- a/.github/workflows/policy_docs.yml +++ /dev/null @@ -1,123 +0,0 @@ -################################# -## DOCS STATIC SITE Build/Test ## -## Reusable Workflow ## -################################# - -### TOOLS ### -# - mkdocs -# - sphinx - -## AUTONOMOUS JOB ## - -# 0. Never run -# 1. Always run -# 2. Run Docs on conditions -# - Triggered on a Long-living branch (ie main) -# - Triggered on a v* tag (ie v1.0.0) -# - Docs Source Files (ie docs/) changed, compared to previous commit -# 3. Run Docs, if Source Files changed, compared to previous commit - -on: - workflow_call: - inputs: - # Defaults to Policy 2 (CI/CD) - run_policy: - required: false - type: string - default: '2' - dedicated_branches: - required: false - type: string - default: 'main, master dev' - source_code_targets: - required: false - type: string - description: 'Comma separated list of folders to watch for changes' - default: 'docs/' - ## Parametrizing Runtime Environment (ie py version) - python_version: - required: false - type: string - default: '3.10' - -jobs: - docs_policy: - name: "Run Docs Workflow/Job?" - runs-on: ubuntu-latest - if: always() && inputs.run_policy != 0 - steps: - - if: ${{ !contains('1, 2, 3', inputs.run_policy) }} - run: 'echo "Invalid run_policy: ${{ inputs.run_policy }}. Must be >0 and <4" && exit 1' - - - if: inputs.run_policy == 1 - name: 'POLICY: 1 -> Trigger' - run: echo "SHOULD_RUN_DOCS=true" >> $GITHUB_ENV - - - if: inputs.run_policy == 2 && contains(inputs.dedicated_branches, github.ref_name) - name: 'POLICY: 2 & Branch: ${{ github.ref_name }} -> Trigger' - run: echo "SHOULD_RUN_DOCS=true" >> $GITHUB_ENV - - - if: inputs.run_policy == 2 && startsWith(github.ref, 'refs/tags/v') - name: 'POLICY: 2 & Tag: ${{ github.ref_name }} -> Trigger' - run: echo "SHOULD_RUN_DOCS=true" >> $GITHUB_ENV - - - if: ${{ env.SHOULD_RUN_DOCS != 'true' && contains('2, 3', inputs.run_policy) }} - name: 'POLICY: 2, 3 -> Derive from DIFF' - run: echo "SHOULD_DERIVE_FROM_DIFF=true" >> $GITHUB_ENV - - - if: ${{ env.SHOULD_DERIVE_FROM_DIFF }} - name: 'POLICY: 2, 3 -> Checkout Code to compute DIFF' - uses: actions/checkout@v4 - with: - fetch-depth: 2 - - - if: ${{ env.SHOULD_DERIVE_FROM_DIFF }} - name: 'POLICY: 2, 3 -> Check Docs Source Files DIFF' - run: | - echo "============ List Modified Files ============" - git diff --name-only HEAD^ HEAD - CHANGED_FILES=$(git diff --name-only HEAD^ HEAD) - - # Read Folders we 'Watch' for changes - TARGETS=$(echo "${{ inputs.source_code_targets }}" | tr ',' '\n') - - # Loop through the Watched Folders - for TARGET in $TARGETS; do - # if rel path of changed file matches glob pattern - if [[ $CHANGED_FILES == *"$TARGET"* ]]; then - echo "SHOULD_RUN_DOCS=true" >> $GITHUB_ENV - echo " --> DOCS Change, from previous commit, found: $TARGET" - break - fi - done - - ### OUTPUT of JOB ### - - name: "Set 'Run Docs' Signal to ${{ env.SHOULD_RUN_DOCS }}" - id: set_docs_signal - run: echo "RUN_DOCS=${{ env.SHOULD_RUN_DOCS }}" >> $GITHUB_OUTPUT - outputs: - RUN_DOCS: ${{ steps.set_docs_signal.outputs.RUN_DOCS }} - - docs: - name: "Docs: Build & Test" - runs-on: ubuntu-latest - needs: docs_policy - if: always() && needs.docs_policy.outputs.RUN_DOCS == 'true' - steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ inputs.python_version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ inputs.python_version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install tox==3.28 - - - name: Install documentation test dependencies - if: ${{ matrix.platform == 'macos-latest' && matrix.python-version != '3.6' }} - run: brew install enchant - - - name: Run Documentation Tests - if: ${{ matrix.platform == 'ubuntu-latest' || matrix.python-version != '3.6' }} - run: tox -e docs --sitepackages -vv -s false diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 05c497a..1f5bc0c 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,7 +2,7 @@ Changelog ========= -0.0.1 (2024-02-19) +0.0.1 (2024-02-20) ======================================= | This is the first ever release of the **biskotaki** Python Package. diff --git a/docs/cicd_mermaid.md b/docs/cicd_mermaid.md deleted file mode 100644 index effc9c3..0000000 --- a/docs/cicd_mermaid.md +++ /dev/null @@ -1,13 +0,0 @@ -```mermaid -graph LR; - set_github_outputs --> test_suite - test_suite --> codecov_coverage_host - set_github_outputs --> docker_build - test_suite --> docker_build - set_github_outputs --> check_which_git_branch_we_are_on - test_suite --> pypi_publish - check_which_git_branch_we_are_on --> pypi_publish - set_github_outputs --> lint - set_github_outputs --> docs - set_github_outputs --> code_visualization -``` diff --git a/docs/dockerfile_mermaid.md b/docs/dockerfile_mermaid.md deleted file mode 100644 index 11982a1..0000000 --- a/docs/dockerfile_mermaid.md +++ /dev/null @@ -1,10 +0,0 @@ -## Dockerfile Flow Chart - -**Dockerfile: Dockerfile** - -```mermaid -graph TB; - python:3.9.16-slim-bullseye --> builder - python:3.9.16-slim-bullseye --> install - builder -. "COPY" .-> install -``` diff --git a/tox.ini b/tox.ini index 9eb45b8..a8da1ca 100644 --- a/tox.ini +++ b/tox.ini @@ -402,22 +402,22 @@ commands_post = [testenv:pydeps] description = Visualise the dependency graphs (roughly which module imports which), by examining the Python code. The dependency graph(s) are rendered in .svg file(s) and saved on the disk. By default, the generated - files are stored in the 'pydoer-graphs' directory, inside the project's root folder. You can use the PYDOER_GRAPHS + files are stored in the 'pydoer-graphs' directory, inside the project's root folder. You can use the PYDEPS_DIR environment variable to determine the directory location to store the files. If the directory does not exist it gets created. Requires that the 'dot' executable is in your PATH. Installing the graphviz library should make the dot executable available in your PATH. Installing 'graphviz': * For Linux users using Debian-based distributions (ie Ubuntu, Debian, Mint), please run "sudo apt install graphviz" * For MacOS users with Homebrew, please run "brew install graphviz" -basepython = {env:TOXPYTHON:python3.8} +basepython = {env:TOXPYTHON:python3} passenv = HOME - PYDOER_GRAPHS + PYDEPS_DIR deps = pydeps==1.9.13 usedevelop = true changedir = {toxinidir} commands_pre = - python -c 'import os; p = "{env:PYDOER_GRAPHS:pydoer-graphs}"; exec("if not os.path.exists(p):\n os.mkdir(p)");' + python -c 'import os; p = "{env:PYDEPS_DIR:pydoer-graphs}"; exec("if not os.path.exists(p):\n os.mkdir(p)");' commands = pydeps --version @@ -430,18 +430,18 @@ commands = # --keep-target-cluster : draw target module as a cluster # Draw only the source code package inner dependencies - pydeps src{/}{env:PY_PACKAGE} --only {env:PY_PACKAGE} --noshow -o {env:PYDOER_GRAPHS:pydoer-graphs}{/}deps_inner.svg + pydeps src{/}{env:PY_PACKAGE} --only {env:PY_PACKAGE} --noshow -o {env:PYDEPS_DIR:pydoer-graphs}{/}deps_inner.svg # Draw the source code package inner and external dependencies - pydeps src{/}{env:PY_PACKAGE} --cluster --noshow -o {env:PYDOER_GRAPHS:pydoer-graphs}{/}deps_all.svg + pydeps src{/}{env:PY_PACKAGE} --cluster --noshow -o {env:PYDEPS_DIR:pydoer-graphs}{/}deps_all.svg # Visualize the package inner dependencies and abstract the external (eg with numpy, pandas, etc) ones # Draw the source code package inner and minimum external dependencies - pydeps src{/}{env:PY_PACKAGE} --max-cluster-size=2 --keep-target-cluster --noshow -o {env:PYDOER_GRAPHS:pydoer-graphs}{/}deps_ktc-mcs_2.svg + pydeps src{/}{env:PY_PACKAGE} --max-cluster-size=2 --keep-target-cluster --noshow -o {env:PYDEPS_DIR:pydoer-graphs}{/}deps_ktc-mcs_2.svg # Draw the source code package inner and all external dependencies - pydeps src{/}{env:PY_PACKAGE} --keep-target-cluster --noshow -o {env:PYDOER_GRAPHS:pydoer-graphs}{/}deps_ktc.svg + pydeps src{/}{env:PY_PACKAGE} --keep-target-cluster --noshow -o {env:PYDEPS_DIR:pydoer-graphs}{/}deps_ktc.svg - python -c 'import os; print("\nGenerated dependency graph(s), as .svg files."); print("The graph(s) reside in the \"" + os.path.join("{toxinidir}", "{env:PYDOER_GRAPHS:pydoer-graphs}") + "\" directory and you can now view them ie in your browser.\n")' + python -c 'import os; print("\nGenerated dependency graph(s), as .svg files."); print("The graph(s) reside in the \"" + os.path.join("{toxinidir}", "{env:PYDEPS_DIR:pydoer-graphs}") + "\" directory and you can now view them ie in your browser.\n")' [testenv:dev-env]