Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
colinsl committed Apr 5, 2024
1 parent 7362d86 commit 22c08ce
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 25 deletions.
43 changes: 35 additions & 8 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup python 3.8
- name: Setup python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.10
- name: Install pre-commit
run: pip install pre-commit
- name: Run pre-commit
Expand All @@ -26,28 +26,55 @@ jobs:
run: gem install license_finder
- name: Allow gevent Zope license
run: license_finder permitted_licenses add "Zope Public License"
- name: Setup python 3.8
- name: Setup python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.10
- name: Install apt dependencies
run: sudo apt-get update -y && sudo apt-get install -y python3-dev openssl libssl-dev gcc pkg-config libffi-dev libxml2-dev libxmlsec1-dev
- name: Install dependencies
run: pip install -r piptools_requirements3.txt && pip install -r requirements3.txt
run: pip install -r piptools_requirements.txt && pip install -r requirements.txt
- name: Run license finder
run: license_finder
build-docs:
name: Build and publish docs
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.10
- name: Install virtualenv
run: pip install virtualenv
- name: Build docs
run: make build_docs
- name: Remove docs folder, so github will ignore it
run: rm -rf docs
build--docker-image:
name: Build and publish docker image
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Publish to Registry
uses: elgohr/[email protected]
with:
name: lyft/omnibot
no_push: true
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup python 3.8
- name: Setup python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.10
- name: Install apt dependencies
run: sudo apt-get update -y && sudo apt-get install -y python3-dev openssl libssl-dev gcc pkg-config libffi-dev libxml2-dev libxmlsec1-dev
- name: Install dependencies
run: pip install -r piptools_requirements3.txt && pip install -r requirements3.txt
run: pip install -r piptools_requirements.txt && pip install -r requirements.txt
- name: Run tests
run: make test
8 changes: 4 additions & 4 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup python 3.8
- name: Setup python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.10
- name: Install virtualenv
run: pip install virtualenv
- name: Build docs
Expand All @@ -35,10 +35,10 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup python 3.8
- name: Setup python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.10
- name: Add wheel dependency
run: pip install wheel
- name: Generate dist
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM ubuntu:bionic
LABEL maintainer="[email protected]"

COPY ./piptools_requirements3.txt /srv/omnibot/piptools_requirements3.txt
COPY ./requirements3.txt /srv/omnibot/requirements3.txt
COPY ./piptools_requirements.txt /srv/omnibot/piptools_requirements.txt
COPY ./requirements.txt /srv/omnibot/requirements.txt

WORKDIR /srv/omnibot

Expand All @@ -11,7 +11,7 @@ RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends python3-dev python3-pip openssl libssl-dev gcc pkg-config libffi-dev libxml2-dev libxmlsec1-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN pip3 install -r piptools_requirements3.txt && \
pip3 install -r requirements3.txt
RUN pip3 install -r piptools_requirements.txt && \
pip3 install -r requirements.txt

COPY . /srv/omnibot
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# we use the pipefail option below, which is bash specific.
SHELL := /bin/bash

.PHONY: compile_deps # freeze requirements.in to requirements3.txt
.PHONY: compile_deps # freeze requirements.in to requirements.txt
compile_deps:
./pip-compile.sh

Expand Down
2 changes: 1 addition & 1 deletion config/license_finder.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
decisions_file: './config/license_finder_decisions.yml'
python_version: '3'
pip_requirements_path: './requirements3.txt'
pip_requirements_path: './requirements.txt'
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-r ../requirements3.txt
-r ../requirements.txt
GitPython==3.1.32
Jinja2==2.11.3
MarkupSafe==1.1.1
Expand Down
4 changes: 2 additions & 2 deletions docs/root/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Adding new dependencies to requirements
=======================================

We freeze python dependencies from direct dependencies (from ``requirements.in``),
to diamond dependencies (in ``requirements3.txt``). Doing so ensures a consistent installation
to diamond dependencies (in ``requirements.txt``). Doing so ensures a consistent installation
with well known versions in test environments, out to production environments.

If you need to add a dependency, or update the version of a dependency, you should modify
Expand All @@ -56,7 +56,7 @@ Approving licenses or dependencies

We run a `license scanner/approver <https://github.com/pivotal/LicenseFinder>`_ for third-party
dependencies used by omnibot. If you add or upgrade dependencies in ``requirements.in`` or
``requirements3.txt``, the license scanner tests may fail, outputing the failed requirement, and
``requirements.txt``, the license scanner tests may fail, outputing the failed requirement, and
its associated license. As long as the license is acceptable, a project owner will approve the
license for use.

Expand Down
4 changes: 2 additions & 2 deletions docs/root/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ Make a virtualenv and install pip requirements
virtualenv venv
source venv/bin/activate
pip install -U pip
pip install -r piptools_requirements3.txt
pip install -r requirements3.txt
pip install -r piptools_requirements.txt
pip install -r requirements.txt
deactivate
Run omnibot
Expand Down
4 changes: 2 additions & 2 deletions pip-compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ source_venv() {
SCRIPT_DIR=$(dirname "$0")

source_venv piptools_venv
pip install -r "${SCRIPT_DIR}"/piptools_requirements3.txt
pip install -r "${SCRIPT_DIR}"/piptools_requirements.txt
pip install pip-tools
pip-compile --output-file "${SCRIPT_DIR}"/requirements3.txt "${SCRIPT_DIR}"/requirements.in
pip-compile --output-file "${SCRIPT_DIR}"/requirements.txt "${SCRIPT_DIR}"/requirements.in

0 comments on commit 22c08ce

Please sign in to comment.