Skip to content

Commit

Permalink
CICD: Clean up workflows and add workflow to build and release docs
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdouSeck committed Nov 15, 2023
1 parent 2b41998 commit 915f62d
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dockerize.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
tags: mitir/simeon:${{ env.SOURCE_TAG }}
-
name: Publish Latest Tag
id: docker_build_laest
id: docker_build_latest
uses: docker/build-push-action@v2
with:
push: true
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: documentation

on: [push, pull_request, workflow_dispatch]

permissions:
contents: write

jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- name: Install dependencies
run: |
pip install -r requirements_dev.txt
- name: Sphinx build
working-directory: ${{ github.workspace }}/docs
run: |
make html
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build/
force_orphan: true
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/run_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: [3.9, 3.10, 3.11]

steps:
- uses: actions/checkout@v3
Expand All @@ -24,6 +24,6 @@ jobs:
python -m pip install --upgrade pip
pip install wheel
pip install .[geoip,test]
- name: Test with pytest
- name: Test with tox
run: |
tox
2 changes: 1 addition & 1 deletion docs/source/api_intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The python API of this tool is divided into the following sections:

- upload: Handles the uploading of data to GCS and BigQuery. It matches up with the ``simeon push`` command

- report: Handles the generation of seconary tables in BigQuery. It matches up with the ``simeon report`` command
- report: Handles the generation of secondary tables in BigQuery. It matches up with the ``simeon report`` command


Components of the :class:`~simeon.download` package
Expand Down
20 changes: 9 additions & 11 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,17 @@
#
import os
import sys

sys.path.insert(
0,
os.path.dirname(
os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
)
0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
)


# -- Project information -----------------------------------------------------

project = 'simeon'
copyright = '2021, MIT Institutional Research'
author = 'MIT Institutional Research'
project = "simeon"
copyright = "2021, MIT Institutional Research"
author = "MIT Institutional Research"


# -- General configuration ---------------------------------------------------
Expand All @@ -33,11 +31,11 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
"sphinx.ext.autodoc",
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand All @@ -50,9 +48,9 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'
html_theme = "alabaster"

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = ["_static"]

0 comments on commit 915f62d

Please sign in to comment.