This repository has been archived by the owner on Aug 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Switch to poetry
for dependency management
#48
Merged
Merged
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
5b5fcef
Switch to Poetry for dependency management
eloquence 0132f79
Update CI config
eloquence 6065a1b
Use --no-ansi workaround
eloquence a49b136
Specify language as required by recent versions of Sphinx
eloquence a656df2
Explain Sphinx version constraint
eloquence 21c08a3
Config tweaks
eloquence f40322f
Pin poetry
eloquence 599c26b
Run Makefile targets under poetry
eloquence febcfe3
Don't upgrade pip; always pin; remove outdated docs
eloquence File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.vscode | ||
docs/_build/* | ||
docs/_templates/* | ||
docs/_static/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,25 @@ | ||
# All targets are run under poetry, so the activation of the virtual environment | ||
# is not necessary. | ||
.PHONY: docs | ||
docs: ## Build project documentation with live reload for editing. | ||
@echo "███ Building docs and watching for changes..." | ||
make clean && sphinx-autobuild docs docs/_build/html | ||
@poetry run make clean && poetry run sphinx-autobuild docs docs/_build/html | ||
@echo | ||
|
||
.PHONY: docs-lint | ||
docs-lint: ## Check documentation for common syntax errors. | ||
@echo "███ Linting documentation..." | ||
# The `-W` option converts warnings to errors. | ||
# The `-n` option enables "nit-picky" mode. | ||
@make clean && sphinx-build -Wn docs docs/_build/html | ||
@make clean && poetry run sphinx-build -Wn docs docs/_build/html | ||
@echo | ||
|
||
.PHONY: docs-linkcheck | ||
docs-linkcheck: ## Check documentation for broken links. | ||
@make clean && sphinx-build -b linkcheck -Wn docs docs/_build/html | ||
@make clean && poetry run sphinx-build -b linkcheck -Wn docs docs/_build/html | ||
@echo | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: | ||
@sphinx-build -M $@ docs docs/_build | ||
@poetry run sphinx-build -M $@ docs docs/_build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
# sha256 as of 2021-11-09 | ||
FROM python:3.9-slim-bullseye@sha256:408de0cf1a057f5501ee6642ad24a4762738f63bacf09fb4c8d861669260b01e AS sphinx | ||
# sha256 as of 2023-01-17 | ||
FROM python:3.9-slim-bullseye@sha256:8b0502fe3a8ae9d26567f66e217223595ff6abe901cba64fd8b1b58176311b27 AS sphinx | ||
|
||
ARG GIT_BRANCH=main | ||
RUN apt-get -q update && apt-get -qy upgrade && apt-get -qy install git make latexmk texlive-latex-extra | ||
COPY ./ . | ||
RUN pip install -r requirements/requirements.txt | ||
RUN pip install --upgrade pip | ||
legoktm marked this conversation as resolved.
Show resolved
Hide resolved
|
||
RUN pip install poetry | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should pin poetry here too. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch, done! |
||
RUN poetry install | ||
RUN deploy/build $GIT_BRANCH | ||
|
||
# sha256 as of 2021-11-09 | ||
FROM nginx:mainline-alpine@sha256:af466e4f12e3abe41fcfb59ca0573a3a5c640573b389d5287207a49d1324abd8 | ||
# sha256 as of 2023-01-09 | ||
|
||
FROM nginx:mainline-alpine@sha256:c1b9fe3c0c015486cf1e4a0ecabe78d05864475e279638e9713eb55f013f907f | ||
COPY deploy/nginx.conf /etc/nginx | ||
RUN mkdir -p /opt/nginx/run /opt/nginx/webroot/en/latest && chown -R nginx:nginx /opt/nginx | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[tool.poetry] | ||
name = "redmine-docs" | ||
version = "0.1.0" | ||
description = "" | ||
authors = ["SecureDrop team <[email protected]>"] | ||
readme = "README.md" | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.9" | ||
# The RTD theme does not yet support Sphinx >=6.0.0. | ||
# See https://github.com/readthedocs/sphinx_rtd_theme/issues/1323 | ||
sphinx = "<6.0.0" | ||
sphinx-autobuild = "^2021.3.14" | ||
sphinx-rtd-theme = "^1.1.1" |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
--no-ansi
argument is necessary due to a bug in CircleCI: python-poetry/poetry#7184 (and harmless once that bug is fixed).