-
-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from nekokatt/staging
Removing staging branch and merging all changes since v0 into master to use tag-based deployment approach instead.
- Loading branch information
Showing
255 changed files
with
53,737 additions
and
16,734 deletions.
There are no files selected for viewing
This file was deleted.
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
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,40 @@ | ||
[flake8] | ||
count = true | ||
|
||
ignore = | ||
A002, # Argument is shadowing a python builtin. | ||
A003, # Class attribute is shadowing a python builtin. | ||
CFQ002, # Function has too many arguments. | ||
D102, # Missing docstring in public method. | ||
D105, # Magic methods not having a docstring. | ||
D412, # No blank lines allowed between a section header and its content | ||
E402, # Module level import not at top of file (isn't compatible with our import style). | ||
IFSTMT001 # "use a oneliner here". | ||
T101, # TO-DO comment detection (T102 is FIX-ME and T103 is XXX). | ||
W503, # line break before binary operator. | ||
W504, # line break before binary operator (again, I guess). | ||
S101, # Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. | ||
|
||
# F401: unused import. | ||
# F403: cannot detect unused vars if we use starred import | ||
# FS003: f-string missing prefix. | ||
# R102: unnecessary parenthesis on raised exception (raises false positives in places) | ||
per-file-ignores = | ||
hikari/__init__.py: F401,F403 | ||
hikari/events/__init__.py: F401,F403 | ||
hikari/events/new/__init__.py: F401,F403 | ||
hikari/models/__init__.py: F401,F403 | ||
hikari/utilities/routes.py: FS003 | ||
hikari/utilities/date.py: FS003 | ||
hikari/impl/stateless_cache.py: R102 | ||
|
||
max-complexity = 20 | ||
# TODO reset to 100 again if possible. | ||
max-function-length = 130 | ||
# Technically this is 120, but black has a policy of "1 or 2 over is fine if it is tidier", so we have to raise this. | ||
max-line-length = 130 | ||
show_source = False | ||
statistics = False | ||
|
||
accept-encodings = utf-8 | ||
docstring-convention = numpy |
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 was deleted.
Oops, something went wrong.
Empty file.
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,3 @@ | ||
[settings] | ||
profile = black | ||
force_single_line = true |
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 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="Unit Tests" type="tests" factoryName="py.test"> | ||
<module name="hikari" /> | ||
<option name="INTERPRETER_OPTIONS" value="" /> | ||
<option name="PARENT_ENVS" value="true" /> | ||
<option name="SDK_HOME" value="" /> | ||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/tests" /> | ||
<option name="IS_MODULE_SDK" value="true" /> | ||
<option name="ADD_CONTENT_ROOTS" value="true" /> | ||
<option name="ADD_SOURCE_ROOTS" value="true" /> | ||
<option name="_new_keywords" value="""" /> | ||
<option name="_new_parameters" value="""" /> | ||
<option name="_new_additionalArguments" value="""" /> | ||
<option name="_new_target" value=""$PROJECT_DIR$/tests"" /> | ||
<option name="_new_targetType" value=""PATH"" /> | ||
<method v="2" /> | ||
</configuration> | ||
</component> |
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,134 @@ | ||
stages: | ||
- test | ||
- deploy | ||
- webhooks | ||
|
||
cache: pip | ||
|
||
_test_job: &test_job | ||
install: | ||
- ${PYTHON_COMMAND} -m pip install nox | ||
before_script: | ||
- mkdir public > /dev/null 2>&1 || true | ||
- ${PYTHON_COMMAND} -V | ||
script: | ||
- ${PYTHON_COMMAND} -m nox --sessions pytest | ||
- bash <(curl -s https://codecov.io/bash) | ||
|
||
_windows_test_job: &windows_test_job | ||
os: windows | ||
language: shell | ||
before_install: | ||
- choco install --no-progress python --version=${PYTHON_VERSION} -y | ||
env: | ||
- PYTHON_COMMAND="py -3" | ||
<<: *test_job | ||
|
||
_linux_test_job: &linux_test_job | ||
os: linux | ||
language: python | ||
env: | ||
- PYTHON_COMMAND=python | ||
<<: *test_job | ||
|
||
env: | ||
global: | ||
secure: "TDaw6Ryljomk6NwuoHCtuV4PGlvBFM/GjEmhXGFTXOn32ENrh14oXWaWIw6ZmKLtekccs2kQpnN+8l5kuzqr9aHvalJzwm05RYfu3wCw09rOeXXWX0GacnCrIh2yBfYXWq/pIS0CSPO+7IRnwwLaVSqUHGXfQV5mEHNbuJTU3tAlgOqrN/L4ZWdlPiclwvKStV4VGRSqxNGEj1G10VEq0+dn6KjrhkQMpDuhQ/3o+8F0vjMNb8rQeKwogeHP3tmwEiCUoxwekjzZU9Oevc75d836/ys2hvsStF8mMtQsd4QgTMYwSWQtKHmKyqgW21nXw8TE1HcnJnc3ahfueOFMbhplJ32h7svTPuPFTaVl99+z2TG8OBbFTQEkQakc5HO7lRH0AGLmhlyXkhYIGxWCS1h266VEzVkcNAliLR/auSFKQ4XKISPZQo6ee0Cx+FkRSKm2OgLw+Nzax8AQQd89C0+hibFq3kdOx0nORpWApjz1vIyCTTEl60UtWf/wkW5o/wTiPFwoHk3k6GxHZDkXCsUb8AjxpjIt9qxo53Yu7bv3msrGLmBScxdLeDs6qdCXXWJWI1D17nhNCclXgzLrZKf5n1zBqOAQjyeoJEOTnVUCQvIHSZYErVv8s0gCArv9ONtaIfq1Vmz+E234/K+IWOYDayvcDjFna7ySgK60W9I=" | ||
|
||
jobs: | ||
include: | ||
# Linting | ||
- name: "Linting" | ||
language: python | ||
python: "3.8.5" | ||
os: linux | ||
arch: amd64 | ||
install: "pip install nox" | ||
stage: test | ||
script: | ||
- python -m nox --sessions safety mypy flake8 | ||
|
||
- name: "Twemoji Mapping Verification" | ||
language: python | ||
python: "3.8.5" | ||
os: linux | ||
arch: amd64 | ||
install: "pip install nox" | ||
stage: test | ||
script: | ||
- python -m nox --sessions twemoji-test | ||
|
||
- name: "Windows 10 Python 3.8.5 AMD64 Tests" | ||
env: PYTHON_VERSION="3.8.5" | ||
arch: amd64 | ||
stage: test | ||
<<: *windows_test_job | ||
|
||
- name: "Windows 10 Python 3.9 Dev AMD64 Tests" | ||
env: PYTHON_VERSION="3.9.0-rc1 --pre" | ||
arch: amd64 | ||
stage: test | ||
<<: *windows_test_job | ||
|
||
- name: "Linux Python 3.8.5 AMD64 Tests" | ||
python: "3.8.5" | ||
arch: amd64 | ||
stage: test | ||
<<: *linux_test_job | ||
|
||
- name: "Linux Python 3.9 Dev AMD64 Tests" | ||
python: "3.9-dev" | ||
arch: amd64 | ||
stage: test | ||
<<: *linux_test_job | ||
|
||
- name: "Linux Python 3.8.5 ARM64 Tests" | ||
python: "3.8.5" | ||
arch: arm64 | ||
stage: test | ||
<<: *linux_test_job | ||
|
||
- name: "Linux Python 3.9 Dev ARM64 Tests" | ||
python: "3.9-dev" | ||
arch: arm64 | ||
stage: test | ||
<<: *linux_test_job | ||
|
||
- name: "Deploy new release" | ||
if: tag IS present AND tag =~ /^\d+\.\d+\.\d+(\..*)?$/ | ||
script: | ||
- echo "Will deploy ${TRAVIS_TAG}" | ||
stage: deploy | ||
language: python | ||
python: "3.8.5" | ||
arch: amd64 | ||
os: linux | ||
env: | ||
secure: "hRjbVk8VicGkEbv/AmEJMQmWNmkC7amaPpGdaJtDC/RrfvxDXMrPFZChwi8QN42Jy28sFN0om3Fw3AQfp85ddH2itcMFeJerKOpQ2QnjOECLlgL0+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JD392vhfVUMoiGQg5tKUIukdeKI/+GUgylZiObpTyM2/D3YjIg8hfjmfgVizPiMatfThplXm22alIZ3I1726T5O65Kv0wShl/gzZXDoKNwaMy9PT3LoXCjm091+y7gErkoStnkxt6JbzDqvaeM/itSb5knwYXgMfmo6hQpAG4xPL4S1/COoRgIy7B6Jp4VFNoRTzV5o7sLYOjWR1LrB4dhMccamzEw6Crk1QZiipUw=" | ||
on: | ||
tags: true | ||
repo: nekokatt/hikari | ||
distributions: "sdist bdist_wheel" | ||
cleanup: "true" | ||
edge: "true" | ||
after_deploy: | ||
- bash scripts/post-deploy.sh | ||
|
||
- name: Build Webhook | ||
stage: webhooks | ||
language: python | ||
python: "3.8.5" | ||
arch: amd64 | ||
os: linux | ||
install: pip install requests | ||
script: python scripts/build_succeeded_webhook.py | ||
|
||
|
||
after_failure: | ||
- ${PYTHON_COMMAND-python} -m pip install requests | ||
- ${PYTHON_COMMAND-python} scripts/job_failed_webhook.py |
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
Oops, something went wrong.