-
Notifications
You must be signed in to change notification settings - Fork 48
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
Move to Poetry for Python #1586
Open
taddes
wants to merge
13
commits into
master
Choose a base branch
from
SYNC-4293_poetry_deps_mgmt
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
d09f433
initial install of poetry and dev deps
taddes 12a8713
scoped pyproject.toml and lock files, given some dependencies are not…
taddes a73344e
base poetry make command and ref
taddes df3e402
individual commands for utility dependency install with poetry
taddes 56966f3
add individual lint commands for full project
taddes 31aff03
add flake8 config and update makefile for root dir
taddes 39be656
reformat tokenserver tools files
taddes 4b7582b
add user migration format
taddes 5668571
add spanner tool reformat
taddes 433b069
update format for integration tests
taddes 8cc8c05
update format for tokenserver-auth file and hawk token script
taddes 5fa41e9
update .flake8 config to ignore venv
taddes d2ff740
review comments
taddes 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[flake8] | ||
exclude = | ||
.git, | ||
__pycache__, | ||
venv/ | ||
# E203: Whitespace before ':'. Addresses a discrepancy with Black slice formatting. | ||
extend-ignore = E203 | ||
max-line-length = 99 |
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
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,69 @@ | ||
[tool.poetry] | ||
name = "syncstorage-rs" | ||
version = "0.1.0" | ||
description = "sync storage server in rust" | ||
authors = ["Mozilla Services Engineering <[email protected]>"] | ||
license = "Mozilla Public License Version 2.0" | ||
readme = "README.md" | ||
packages = [{include = "tools"}] | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.12" | ||
tokenlib = "2.0.0" | ||
pyfxa = "0.7.7" | ||
cryptography = "42.0.8" | ||
|
||
[tool.poetry.group.dev.dependencies] | ||
black = "^24.4.2" | ||
isort = "^5.13.2" | ||
flake8 = "^7.1.0" | ||
mypy = "^1.10.1" | ||
pydocstyle = "^6.3.0" | ||
bandit = "^1.7.9" | ||
|
||
[tool.black] | ||
line-length = 99 | ||
|
||
[tool.isort] | ||
profile = "black" | ||
skip_gitignore = true | ||
|
||
[tool.bandit] | ||
# skips asserts | ||
# B101: https://bandit.readthedocs.io/en/latest/plugins/b101_assert_used.html# | ||
# B104: https://bandit.readthedocs.io/en/latest/plugins/b104_hardcoded_bind_all_interfaces.html | ||
# B311: https://bandit.readthedocs.io/en/latest/blacklists/blacklist_calls.html#b311-random | ||
# B404: https://bandit.readthedocs.io/en/latest/blacklists/blacklist_imports.html#b404-import-subprocess | ||
skips = ["B101", "B104", "B311", "B404"] | ||
|
||
[tool.mypy] | ||
python_version = "3.12" | ||
disable_error_code = "attr-defined" | ||
disallow_untyped_calls = false | ||
follow_imports = "normal" | ||
ignore_missing_imports = true | ||
pretty = true | ||
show_error_codes = true | ||
strict_optional = true | ||
warn_no_return = true | ||
warn_redundant_casts = true | ||
warn_return_any = true | ||
warn_unused_ignores = true | ||
warn_unreachable = true | ||
|
||
[tool.pydocstyle] | ||
match = ".*\\.py" | ||
convention = "pep257" | ||
# Error Code Ref: https://www.pydocstyle.org/en/stable/error_codes.html | ||
# D212 Multi-line docstring summary should start at the first line | ||
add-select = ["D212"] | ||
# D105 Docstrings for magic methods | ||
# D107 Docstrings for __init__ | ||
# D203 as it conflicts with D211 https://github.com/PyCQA/pydocstyle/issues/141 | ||
# D205 1 blank line required between summary line and description, awkward spacing | ||
# D400 First line should end with a period, doesn't work when sentence spans 2 lines | ||
add-ignore = ["D105","D107","D203", "D205", "D400"] | ||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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,18 @@ | ||
[tool.poetry] | ||
name = "hawk" | ||
version = "0.1.0" | ||
description = "Hawk Auth Header Generation Tool" | ||
authors = ["Mozilla Services Engineering <[email protected]>"] | ||
license = "Mozilla Public License Version 2.0" | ||
readme = "README.md" | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.12" | ||
hawkauthlib = "^2.0.0" | ||
tokenlib = "^2.0.0" | ||
WebOb = "^1.8.7" | ||
|
||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" |
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.
There's a potential that folk might discover this package while looking for a stand-alone Sync storage server. Let's be exceptionally clear about what this is and how it's being used.