Skip to content

Commit

Permalink
Merge branch 'develop' into add-types-to-api-in-journalist-app
Browse files Browse the repository at this point in the history
# Conflicts:
#	mypy.ini
#	securedrop/journalist_app/utils.py
  • Loading branch information
nabla-c0d3 committed Sep 4, 2020
2 parents 87bf356 + 6013c5e commit a041434
Show file tree
Hide file tree
Showing 50 changed files with 526 additions and 3,177 deletions.
19 changes: 12 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -318,23 +318,28 @@ update-user-guides: ## Run the page layout tests to regenerate screenshots.
###########

.PHONY: build-debs
build-debs: ## Build and test SecureDrop Debian packages.
@echo "Building SecureDrop Debian packages..."
build-debs: ## Build and test SecureDrop Debian packages (for Xenial)
@echo "Building SecureDrop Debian packages for Xenial..."
@$(SDROOT)/devops/scripts/build-debs.sh
@echo

.PHONY: build-debs-notest
build-debs-notest: ## Build SecureDrop Debian packages without running tests.
@echo "Building SecureDrop Debian packages; skipping tests..."
build-debs-notest: ## Build SecureDrop Debian packages (for Xenial) without running tests.
@echo "Building SecureDrop Debian packages for Xenial; skipping tests..."
@$(SDROOT)/devops/scripts/build-debs.sh notest
@echo

.PHONY: build-debs-focal
build-debs-focal: ## Build and test SecureDrop Debian packages.
@echo "Building SecureDrop Debian packages..."
@$(SDROOT)/devops/scripts/build-debs.sh notest focal
build-debs-focal: ## Build and test SecureDrop Debian packages (for Focal)
@echo "Building SecureDrop Debian packages for Focal..."
@$(SDROOT)/devops/scripts/build-debs.sh test focal
@echo

.PHONY: build-debs-notest-focal
build-debs-notest-focal: ## Build SecureDrop Debian packages (for Focal) without running tests.
@echo "Building SecureDrop Debian packages for Focal; skipping tests..."
@$(SDROOT)/devops/scripts/build-debs.sh notest focal
@echo


########################
Expand Down
4 changes: 2 additions & 2 deletions admin/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# debian:stretch 2019-01-22
FROM debian@sha256:21ac5961a3038a839f6fa92ec4583c90f9eb6ca8f580598cde19d35d0f4d8fa6
# debian:buster 2020-08-04
FROM debian@sha256:1e74c92df240634a39d050a5e23fb18f45df30846bb222f543414da180b47a5d
ARG USER_NAME
ENV USER_NAME ${USER_NAME:-root}
ARG USER_ID
Expand Down
18 changes: 16 additions & 2 deletions admin/bin/dev-shell
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ function docker_image() {
local out
out="$(mktemp)"
cd "${TOPLEVEL}"
if ! docker build ${DOCKER_BUILD_ARGUMENTS:-} -t securedrop-admin -f admin/Dockerfile . >& "$out" ; then
if ! docker build \
--build-arg=USER_ID="$(id -u)" \
--build-arg=USER_NAME="${USER:-root}" \
${DOCKER_BUILD_ARGUMENTS:-} -t securedrop-admin -f admin/Dockerfile . >& "$out" ; then
cat "$out"
status=1
else
Expand All @@ -23,7 +26,18 @@ function docker_image() {
}

function docker_run() {
docker run --rm -ti ${DOCKER_RUN_ARGUMENTS:-} securedrop-admin "$@"
if [ -z "${CIRCLECI-}" ]
then
docker run \
--rm \
--user "${USER:-root}" \
--volume "${TOPLEVEL}:/sd-root" \
--workdir "/sd-root/admin" \
-ti ${DOCKER_RUN_ARGUMENTS:-} securedrop-admin "$@"
else
docker run --rm -ti ${DOCKER_RUN_ARGUMENTS:-} securedrop-admin "$@"
fi

}

docker_image
Expand Down
6 changes: 4 additions & 2 deletions admin/requirements-dev.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ flake8
flaky
mock
pbr
pip==19.1
pip-tools>=4.0.0
pylint
pytest
pylint==2.5.0
pytest==3.2.0
requests>=2.22.0
tox
pexpect
urllib3>=1.25.8
pytest-catchlog
129 changes: 75 additions & 54 deletions admin/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,10 @@
#
# pip-compile --allow-unsafe --generate-hashes --output-file=requirements-dev.txt requirements-dev.in
#
astroid==1.6.0 \
--hash=sha256:71dadba2110008e2c03f9fde662ddd2053db3c0489d0e03c94e828a0399edd4f \
--hash=sha256:badf6917ef7eb0ade0ea6eae347aed1e3f8f4c9375a02916f5cc450b3c8a64c0 \
astroid==2.4.2 \
--hash=sha256:2f4078c2a41bf377eea06d71c9d2ba4eb8f6b1af2135bec27bbbb7d8f12bb703 \
--hash=sha256:bc58d83eb610252fd8de6363e39d4f1d0619c894b0ed24603b881c02e64c7386 \
# via pylint
attrs==17.3.0 \
--hash=sha256:c78f53e32d7cf36d8597c8a2c7e3c0ad210f97b9509e152e4c37fa80869f823c \
--hash=sha256:e7d51b70f19a4da5fe6b3c9938983e0af3b91e230edc504bd73c443d98037063 \
# via pytest
certifi==2018.4.16 \
--hash=sha256:13e698f54293db9f89122b0581843a782ad0934a4fe0172d2a980ba77fc61bb7 \
--hash=sha256:9fa520c1bacfb634fa7af20a76bcbd3d5fb390481724c597da32c719a7dca4b0 \
Expand Down Expand Up @@ -73,36 +69,28 @@ isort==4.2.15 \
--hash=sha256:79f46172d3a4e2e53e7016e663cc7a8b538bec525c36675fcfd2767df30b3983 \
--hash=sha256:cd5d3fc2c16006b567a17193edf4ed9830d9454cbeb5a42ac80b36ea00c23db4 \
# via pylint
lazy-object-proxy==1.3.1 \
--hash=sha256:0ce34342b419bd8f018e6666bfef729aec3edf62345a53b537a4dcc115746a33 \
--hash=sha256:1b668120716eb7ee21d8a38815e5eb3bb8211117d9a90b0f8e21722c0758cc39 \
--hash=sha256:209615b0fe4624d79e50220ce3310ca1a9445fd8e6d3572a896e7f9146bbf019 \
--hash=sha256:27bf62cb2b1a2068d443ff7097ee33393f8483b570b475db8ebf7e1cba64f088 \
--hash=sha256:27ea6fd1c02dcc78172a82fc37fcc0992a94e4cecf53cb6d73f11749825bd98b \
--hash=sha256:2c1b21b44ac9beb0fc848d3993924147ba45c4ebc24be19825e57aabbe74a99e \
--hash=sha256:2df72ab12046a3496a92476020a1a0abf78b2a7db9ff4dc2036b8dd980203ae6 \
--hash=sha256:320ffd3de9699d3892048baee45ebfbbf9388a7d65d832d7e580243ade426d2b \
--hash=sha256:50e3b9a464d5d08cc5227413db0d1c4707b6172e4d4d915c1c70e4de0bbff1f5 \
--hash=sha256:5276db7ff62bb7b52f77f1f51ed58850e315154249aceb42e7f4c611f0f847ff \
--hash=sha256:61a6cf00dcb1a7f0c773ed4acc509cb636af2d6337a08f362413c76b2b47a8dd \
--hash=sha256:6ae6c4cb59f199d8827c5a07546b2ab7e85d262acaccaacd49b62f53f7c456f7 \
--hash=sha256:7661d401d60d8bf15bb5da39e4dd72f5d764c5aff5a86ef52a042506e3e970ff \
--hash=sha256:7bd527f36a605c914efca5d3d014170b2cb184723e423d26b1fb2fd9108e264d \
--hash=sha256:7cb54db3535c8686ea12e9535eb087d32421184eacc6939ef15ef50f83a5e7e2 \
--hash=sha256:7f3a2d740291f7f2c111d86a1c4851b70fb000a6c8883a59660d95ad57b9df35 \
--hash=sha256:81304b7d8e9c824d058087dcb89144842c8e0dea6d281c031f59f0acf66963d4 \
--hash=sha256:933947e8b4fbe617a51528b09851685138b49d511af0b6c0da2539115d6d4514 \
--hash=sha256:94223d7f060301b3a8c09c9b3bc3294b56b2188e7d8179c762a1cda72c979252 \
--hash=sha256:ab3ca49afcb47058393b0122428358d2fbe0408cf99f1b58b295cfeb4ed39109 \
--hash=sha256:bd6292f565ca46dee4e737ebcc20742e3b5be2b01556dafe169f6c65d088875f \
--hash=sha256:cb924aa3e4a3fb644d0c463cad5bc2572649a6a3f68a7f8e4fbe44aaa6d77e4c \
--hash=sha256:d0fc7a286feac9077ec52a927fc9fe8fe2fabab95426722be4c953c9a8bede92 \
--hash=sha256:ddc34786490a6e4ec0a855d401034cbd1242ef186c20d79d2166d6a4bd449577 \
--hash=sha256:e34b155e36fa9da7e1b7c738ed7767fc9491a62ec6af70fe9da4a057759edc2d \
--hash=sha256:e5b9e8f6bda48460b7b143c3821b21b452cb3a835e6bbd5dd33aa0c8d3f5137d \
--hash=sha256:e81ebf6c5ee9684be8f2c87563880f93eedd56dd2b6146d8a725b50b7e5adb0f \
--hash=sha256:eb91be369f945f10d3a49f5f9be8b3d0b93a4c2be8f8a5b83b0571b8123e0a7a \
--hash=sha256:f460d1ceb0e4a5dcb2a652db0904224f367c9b3c1470d5a7683c0480e582468b \
lazy-object-proxy==1.4.3 \
--hash=sha256:0c4b206227a8097f05c4dbdd323c50edf81f15db3b8dc064d08c62d37e1a504d \
--hash=sha256:194d092e6f246b906e8f70884e620e459fc54db3259e60cf69a4d66c3fda3449 \
--hash=sha256:1be7e4c9f96948003609aa6c974ae59830a6baecc5376c25c92d7d697e684c08 \
--hash=sha256:4677f594e474c91da97f489fea5b7daa17b5517190899cf213697e48d3902f5a \
--hash=sha256:48dab84ebd4831077b150572aec802f303117c8cc5c871e182447281ebf3ac50 \
--hash=sha256:5541cada25cd173702dbd99f8e22434105456314462326f06dba3e180f203dfd \
--hash=sha256:59f79fef100b09564bc2df42ea2d8d21a64fdcda64979c0fa3db7bdaabaf6239 \
--hash=sha256:8d859b89baf8ef7f8bc6b00aa20316483d67f0b1cbf422f5b4dc56701c8f2ffb \
--hash=sha256:9254f4358b9b541e3441b007a0ea0764b9d056afdeafc1a5569eee1cc6c1b9ea \
--hash=sha256:9651375199045a358eb6741df3e02a651e0330be090b3bc79f6d0de31a80ec3e \
--hash=sha256:97bb5884f6f1cdce0099f86b907aa41c970c3c672ac8b9c8352789e103cf3156 \
--hash=sha256:9b15f3f4c0f35727d3a0fba4b770b3c4ebbb1fa907dbcc046a1d2799f3edd142 \
--hash=sha256:a2238e9d1bb71a56cd710611a1614d1194dc10a175c1e08d75e1a7bcc250d442 \
--hash=sha256:a6ae12d08c0bf9909ce12385803a543bfe99b95fe01e752536a60af2b7797c62 \
--hash=sha256:ca0a928a3ddbc5725be2dd1cf895ec0a254798915fb3a36af0964a0a4149e3db \
--hash=sha256:cb2c7c57005a6804ab66f106ceb8482da55f5314b7fcb06551db1edae4ad1531 \
--hash=sha256:d74bb8693bf9cf75ac3b47a54d716bbb1a92648d5f781fc799347cfc95952383 \
--hash=sha256:d945239a5639b3ff35b70a88c5f2f491913eb94871780ebfabb2568bd58afc5a \
--hash=sha256:eba7011090323c1dadf18b3b689845fd96a61ba0a1dfbd7f24b921398affc357 \
--hash=sha256:efa1909120ce98bbb3777e8b6f92237f5d5c8ea6758efea36a473e1d38f7d3e4 \
--hash=sha256:f3900e8a5de27447acbf900b4750b0ddfd7ec1ea7fbaf11dfa911141bc522af0 \
# via astroid
mccabe==0.6.1 \
--hash=sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42 \
Expand All @@ -124,15 +112,15 @@ pluggy==0.6.0 \
--hash=sha256:7f8ae7f5bdf75671a718d2daf0a64b7885f74510bcd98b1a0bb420eb9a9d0cff \
--hash=sha256:d345c8fe681115900d6da8d048ba67c25df42973bda370783cd58826442dcd7c \
--hash=sha256:e160a7fcf25762bb60efc7e171d4497ff1d8d2d75a3d0df7a21b76821ecbf5c5 \
# via pytest, tox
# via tox
ptyprocess==0.5.2 \
--hash=sha256:e64193f0047ad603b71f202332ab5527c5e52aa7c8b609704fc28c0dc20c4365 \
--hash=sha256:e8c43b5eee76b2083a9badde89fd1bbce6c8942d1045146e100b7b5e014f4f1a \
# via pexpect
py==1.5.2 \
--hash=sha256:8cca5c229d225f8c1e3085be4fcf306090b00850fefad892f9d96c7b6e2f310f \
--hash=sha256:ca18943e28235417756316bfada6cd96b23ce60dd532642690dcfdaba988a76d \
# via pytest, tox
py==1.9.0 \
--hash=sha256:366389d1db726cd2fcfc79732e75410e5fe4d31db13692115529d34069a043c2 \
--hash=sha256:9ca6883ce56b4e8da7e79ac18787889fa5206c79dcc67fb065376cd2fe03f342 \
# via pytest, pytest-catchlog, tox
pycodestyle==2.3.1 \
--hash=sha256:682256a5b318149ca0d2a9185d365d8864a768a28db66a84a2ea946bcc426766 \
--hash=sha256:6c4245ade1edfad79c3446fadfc96b0de2759662dc29d07d80a6f27ad1ca6ba9 \
Expand All @@ -141,34 +129,67 @@ pyflakes==1.6.0 \
--hash=sha256:08bd6a50edf8cffa9fa09a463063c425ecaaf10d1eb0335a7e8b1401aef89e6f \
--hash=sha256:8d616a382f243dbf19b54743f280b80198be0bca3a5396f1d2e1fca6223e8805 \
# via flake8
pylint==1.8.1 \
--hash=sha256:3035e44e37cd09919e9edad5573af01d7c6b9c52a0ebb4781185ae7ab690458b \
--hash=sha256:c8e59da0f2f9990eb00aad1c1de16cd7809315842ebccc3f65ca9df46213df3b
pytest==3.3.1 \
--hash=sha256:ae4a2d0bae1098bbe938ecd6c20a526d5d47a94dc42ad7331c9ad06d0efe4962 \
--hash=sha256:cf8436dc59d8695346fcd3ab296de46425ecab00d64096cebe79fb51ecb2eb93
pylint==2.5.0 \
--hash=sha256:588e114e3f9a1630428c35b7dd1c82c1c93e1b0e78ee312ae4724c5e1a1e0245 \
--hash=sha256:bd556ba95a4cf55a1fc0004c00cf4560b1e70598a54a74c6904d933c8f3bd5a8
pytest-catchlog==1.2.2 \
--hash=sha256:4be15dc5ac1750f83960897f591453040dff044b5966fe24a91c2f7d04ecfcf0 \
--hash=sha256:a692966da726b918197cabd20dc0ad4da5503fbdc99baaa192e62579c8a45773
pytest==3.2.0 \
--hash=sha256:0225cf10b9e173f84729d5f4648211458a222c6e53a77a85e104bc5f31c244ee \
--hash=sha256:d994b4f28c6d449a467ad3d336544945a0dcf350e3b7b301219547ef5aa8125e
requests==2.22.0 \
--hash=sha256:11e007a8a2aa0323f5a921e9e6a2d7e4e67d9877e85773fba9ba6419025cbeb4 \
--hash=sha256:9cf5292fcd0f598c671cfc1e0d7d1a7f13bb8085e9a590f48c010551dc6c4b31
six==1.11.0 \
--hash=sha256:70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9 \
--hash=sha256:832dc0e10feb1aa2c68dcc57dbb658f1c7e65b9b61af69048abc87a2db00a0eb \
# via astroid, mock, pip-tools, pylint, pytest, tox
six==1.15.0 \
--hash=sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259 \
--hash=sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced \
# via astroid, mock, pip-tools, tox
toml==0.10.1 \
--hash=sha256:926b612be1e5ce0634a2ca03470f95169cf16f939018233a670519cb4ac58b0f \
--hash=sha256:bda89d5935c2eac546d648028b9901107a595863cb36bae0c73ac804a9b4ce88 \
# via pylint
tox==2.9.1 \
--hash=sha256:752f5ec561c6c08c5ecb167d3b20f4f4ffc158c0ab78855701a75f5cef05f4b8 \
--hash=sha256:8af30fd835a11f3ff8e95176ccba5a4e60779df4d96a9dfefa1a1704af263225
typed-ast==1.4.1 \
--hash=sha256:0666aa36131496aed8f7be0410ff974562ab7eeac11ef351def9ea6fa28f6355 \
--hash=sha256:0c2c07682d61a629b68433afb159376e24e5b2fd4641d35424e462169c0a7919 \
--hash=sha256:249862707802d40f7f29f6e1aad8d84b5aa9e44552d2cc17384b209f091276aa \
--hash=sha256:24995c843eb0ad11a4527b026b4dde3da70e1f2d8806c99b7b4a7cf491612652 \
--hash=sha256:269151951236b0f9a6f04015a9004084a5ab0d5f19b57de779f908621e7d8b75 \
--hash=sha256:4083861b0aa07990b619bd7ddc365eb7fa4b817e99cf5f8d9cf21a42780f6e01 \
--hash=sha256:498b0f36cc7054c1fead3d7fc59d2150f4d5c6c56ba7fb150c013fbc683a8d2d \
--hash=sha256:4e3e5da80ccbebfff202a67bf900d081906c358ccc3d5e3c8aea42fdfdfd51c1 \
--hash=sha256:6daac9731f172c2a22ade6ed0c00197ee7cc1221aa84cfdf9c31defeb059a907 \
--hash=sha256:715ff2f2df46121071622063fc7543d9b1fd19ebfc4f5c8895af64a77a8c852c \
--hash=sha256:73d785a950fc82dd2a25897d525d003f6378d1cb23ab305578394694202a58c3 \
--hash=sha256:8c8aaad94455178e3187ab22c8b01a3837f8ee50e09cf31f1ba129eb293ec30b \
--hash=sha256:8ce678dbaf790dbdb3eba24056d5364fb45944f33553dd5869b7580cdbb83614 \
--hash=sha256:aaee9905aee35ba5905cfb3c62f3e83b3bec7b39413f0a7f19be4e547ea01ebb \
--hash=sha256:bcd3b13b56ea479b3650b82cabd6b5343a625b0ced5429e4ccad28a8973f301b \
--hash=sha256:c9e348e02e4d2b4a8b2eedb48210430658df6951fa484e59de33ff773fbd4b41 \
--hash=sha256:d205b1b46085271b4e15f670058ce182bd1199e56b317bf2ec004b6a44f911f6 \
--hash=sha256:d43943ef777f9a1c42bf4e552ba23ac77a6351de620aa9acf64ad54933ad4d34 \
--hash=sha256:d5d33e9e7af3b34a40dc05f498939f0ebf187f07c385fd58d591c533ad8562fe \
--hash=sha256:fc0fea399acb12edbf8a628ba8d2312f583bdbdb3335635db062fa98cf71fca4 \
--hash=sha256:fe460b922ec15dd205595c9b5b99e2f056fd98ae8f9f56b888e7a17dc2b757e7 \
# via astroid
urllib3==1.25.8 \
--hash=sha256:2f3db8b19923a873b3e5256dc9c2dedfa883e33d87c690d9c7913e1f40673cdc \
--hash=sha256:87716c2d2a7121198ebcb7ce7cccf6ce5e9ba539041cfbaeecfb641dc0bf6acc
virtualenv==15.1.0 \
--hash=sha256:02f8102c2436bb03b3ee6dede1919d1dac8a427541652e5ec95171ec8adbc93a \
--hash=sha256:39d88b533b422825d644087a21e78c45cf5af0ef7a99a1fc9fbb7b481e5c85b0 \
# via tox
wrapt==1.10.11 \
--hash=sha256:d4d560d479f2c21e1b5443bbd15fe7ec4b37fe7e53d335d3b9b0a7b1226fe3c6 \
wrapt==1.12.1 \
--hash=sha256:b62ffa81fb85f4332a4f609cab4ac40709470da05643a082ec1eb88e6d9b97d7 \
# via astroid

# The following packages are considered to be unsafe in a requirements file:
pip==19.1 \
--hash=sha256:8f59b6cf84584d7962d79fd1be7a8ec0eb198aa52ea864896551736b3614eee9 \
--hash=sha256:d9137cb543d8a4d73140a3282f6d777b2e786bb6abb8add3ac5b6539c82cd624
setuptools==46.0.0 \
--hash=sha256:2f00f25b780fbfd0787e46891dcccd805b08d007621f24629025f48afef444b5 \
--hash=sha256:693e0504490ed8420522bf6bc3aa4b0da6a9f1c80c68acfb4e959275fd04cd82 \
Expand Down
1 change: 1 addition & 0 deletions admin/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ markupsafe>=1.1
prompt_toolkit==2.0.9
pyyaml>=5.3.1
setuptools>=46.0.0
six==1.15.0
7 changes: 3 additions & 4 deletions admin/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,9 @@ pyyaml==5.3.1 \
--hash=sha256:b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d \
--hash=sha256:cc8955cfbfc7a115fa81d85284ee61147059a753344bc51098f3ccd69b0d7e0c \
--hash=sha256:d13155f591e6fcc1ec3b30685d50bf0711574e2c0dfffd7644babf8b5102ca1a
six==1.11.0 \
--hash=sha256:70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9 \
--hash=sha256:832dc0e10feb1aa2c68dcc57dbb658f1c7e65b9b61af69048abc87a2db00a0eb \
# via cryptography, prompt-toolkit
six==1.15.0 \
--hash=sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259 \
--hash=sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced
wcwidth==0.1.7 \
--hash=sha256:3df37372226d6e63e1b1e1eda15c594bca98a22d33a23832a90998faa96bc65e \
--hash=sha256:f4ebe71925af7b40a864553f761ed559b43544f8f71746c2d756c7fe788ade7c \
Expand Down
8 changes: 4 additions & 4 deletions admin/tests/test_securedrop-admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -945,8 +945,8 @@ def test_find_or_generate_new_torv3_keys_first_run(tmpdir, capsys):

return_code = securedrop_admin.find_or_generate_new_torv3_keys(args)

captured = capsys.readouterr()
assert 'Tor v3 onion service keys generated' in captured.out
out, err = capsys.readouterr()
assert 'Tor v3 onion service keys generated' in out
assert return_code == 0

secret_key_path = os.path.join(args.ansible_path,
Expand Down Expand Up @@ -976,8 +976,8 @@ def test_find_or_generate_new_torv3_keys_subsequent_run(tmpdir, capsys):

return_code = securedrop_admin.find_or_generate_new_torv3_keys(args)

captured = capsys.readouterr()
assert 'Tor v3 onion service keys already exist' in captured.out
out, err = capsys.readouterr()
assert 'Tor v3 onion service keys already exist' in out
assert return_code == 0

with open(secret_key_path) as f:
Expand Down
18 changes: 10 additions & 8 deletions docs/development/documentation_guidelines.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,21 @@ To get started editing the docs:

.. _clone_the_rep:

#. Clone the SecureDrop repository:
1. Clone the SecureDrop repository:

.. code:: sh
git clone https://github.com/freedomofpress/securedrop.git
#. Install the dependencies:
2. Install the dependencies:

.. code:: sh
pip install --no-deps --require-hashes -r securedrop/requirements/python3/develop-requirements.txt
#. Build the docs for viewing in your web browser:
.. include:: ../includes/virtualenv.txt

3. Build the docs for viewing in your web browser:

.. code:: sh
Expand Down Expand Up @@ -150,10 +152,10 @@ called ``securedrop``. This ``securedrop`` directory also contains a
.
├── securedrop
  
  ...
   ├── securedrop
... ...
...
├── securedrop
... ...
To avoid confusion, paths to files anywhere inside the SecureDrop git repository
should be written as ``./some_dir/file``, where ``.`` is the top level directory
Expand Down Expand Up @@ -188,4 +190,4 @@ Capitalize all section headings in title case:
================
Read the docs
-------------
-------------
7 changes: 6 additions & 1 deletion docs/development/i18n.rst
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,10 @@ generate using this command in the base directory:
$ LOCALES=en_US make translation-test
Inspect the screenshots in the directory ``securedrop/tests/pageslayout/screenshots/en_US``
and make sure that their content corresponds to the expected version of the
codebase.

`Obtain your API key <https://weblate.securedrop.org/accounts/profile/#api>`__
in Weblate. Export the token to the environment variable ``WEBLATE_API_TOKEN``.
You can now run this command to perform an upload:
Expand All @@ -376,6 +380,7 @@ Two weeks before the release: string freeze
When features for a new SecureDrop release are frozen, the localization manager for the release will:

* :ref:`merge_develop_to_weblate`.
* `Update Weblate screenshots`_ so translators can see new or modified source strings in context.
* Update the `i18n timeline`_ in the translation section of the forum.
* Post an announcement `to the translation section of the forum <https://forum.securedrop.org/c/translations>`__ (see `an example <https://forum.securedrop.org/t/4-securedrop-strings-need-work-march-2018-string-freeze/461>`__).
* Remind all developers about the string freeze in `Gitter <https://gitter.im/freedomofpress/securedrop>`__.
Expand All @@ -386,7 +391,7 @@ Release day
^^^^^^^^^^^

* :ref:`merge_weblate_to_develop`.
* :ref:`Update the screenshots <updating_screenshots>`.
* :ref:`Update the documentation screenshots <updating_screenshots>`.
* Remove the `Weblate announcement`_ about this release's translation timeline.
* Provide translator credits to add to the SecureDrop release announcement.
* Update the `i18n timeline`_ in the forum.
Expand Down
Loading

0 comments on commit a041434

Please sign in to comment.