Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build sphinx docs #25

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
/build
/dist
/Dockerfile
/docs
15 changes: 15 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,21 @@ jobs:
- name: Lint and Type Checking
run: docker run --rm --entrypoint="" amp pipenv run lint

doc:
name: Documentation Building Test
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get Docker Image
uses: actions/download-artifact@v2
with:
name: image
- name: Load Docker Image
run: docker load < docker-image.tar
- name: Build Documentation
run: docker run --rm --entrypoint="" --user=0:0 amp pipenv run doc -nW --keep-going

push:
name: Upload the Docker image to Docker Hub
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fixing your issue as quickly as possible.

The tools required to work on the Azafea metrics proxy are the following:

* Python >= 3.7, with Pip
* Python >= 3.8, with Pip
* [pipenv](https://docs.pipenv.org/)

Pipenv is not strictly mandatory to contribute to the Azafea metrics proxy, you
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.7-alpine
FROM python:3.8-alpine

RUN pip install --no-cache-dir pipenv template && \
apk add --update --no-cache git build-base
Expand Down
11 changes: 8 additions & 3 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
[requires]
python_version = "3.8"

[dev-packages]
flake8-bugbear = "*"
freezegun = "*"
mypy = ">=0.720"
pytest = "*"
pytest-aiohttp = "*"
pytest = "~= 6.2"
pytest-aiohttp = "~= 0.3"
pytest-cov = "*"
pytest-flake8 = "*"
pytest-mypy = ">=0.3.3"
sphinx = "*"

[packages]
aiohttp = ">= 3.5.0"
aioredis = "~= 1.3"
pydantic = ">= 1.1"
pydantic = "~= 1.1"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran into this in my failed attempt to upgrade Azafea proper to a modern Python. I should learn from you and just pin the last working version!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The obvious downside is that you end up pinning to something that's no longer supported. Unless you have a plan to come back and handle the migration, you might just be using an insecure package.

toml = "*"

[scripts]
doc = "sphinx-build -b html docs/source docs/build/html"
lint = "py.test --flake8 --mypy -m 'flake8 or mypy'"
proxy = "python -m azafea_metrics_proxy"
test = "py.test --cov=azafea_metrics_proxy --cov-fail-under=99 --no-cov-on-fail -m 'not integration'"
Expand Down
1,882 changes: 1,356 additions & 526 deletions Pipfile.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ license_file = COPYING

[options]
packages = find:
python_requires = >= 3.7
python_requires = >= 3.8

[options.package_data]
azafea_metrics_proxy = py.typed
Expand Down
Loading