diff --git a/.annotations_sample b/.annotations_sample index 1380632..d210942 100644 --- a/.annotations_sample +++ b/.annotations_sample @@ -5,7 +5,7 @@ coverage_target: 50.0 report_template_dir: code_annotations/report_templates/ rendered_report_dir: code_annotations/reports/ rendered_report_file_extension: .rst -rendered_report_source_link_prefix: https://github.com/edx/edx-platform/tree/master/ +rendered_report_source_link_prefix: https://github.com/openedx/edx-platform/tree/master/ annotations: ".. no_pii:": ".. ignored:": diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml index e2b0661..fec11d6 100644 --- a/.github/workflows/commitlint.yml +++ b/.github/workflows/commitlint.yml @@ -7,4 +7,4 @@ on: jobs: commitlint: - uses: edx/.github/.github/workflows/commitlint.yml@master + uses: openedx/.github/.github/workflows/commitlint.yml@master diff --git a/README.rst b/README.rst index ab4db9b..fb38ab5 100644 --- a/README.rst +++ b/README.rst @@ -35,16 +35,16 @@ How To Contribute Contributions are very welcome. -Please read `How To Contribute `_ for details. +Please read `How To Contribute `_ for details. Even though they were written with ``edx-platform`` in mind, the guidelines should be followed for Open edX code in general. PR description template should be automatically applied if you are sending PR from github interface; otherwise you -can find it it at `PULL_REQUEST_TEMPLATE.md `_ +can find it it at `PULL_REQUEST_TEMPLATE.md `_ Issue report template should be automatically applied if you are sending it from github UI as well; otherwise you -can find it at `ISSUE_TEMPLATE.md `_ +can find it at `ISSUE_TEMPLATE.md `_ Reporting Security Issues ------------------------- @@ -64,8 +64,8 @@ refer to this `list of resources`_ if you need any assistance. :target: https://pypi.python.org/pypi/code-annotations/ :alt: PyPI -.. |CI| image:: https://github.com/edx/code-annotations/workflows/Python%20CI/badge.svg?branch=master - :target: https://github.com/edx/code-annotations/actions?query=workflow%3A%22Python+CI%22 +.. |CI| image:: https://github.com/openedx/code-annotations/workflows/Python%20CI/badge.svg?branch=master + :target: https://github.com/openedx/code-annotations/actions?query=workflow%3A%22Python+CI%22 :alt: CI .. |codecov-badge| image:: http://codecov.io/github/edx/code-annotations/coverage.svg?branch=master @@ -81,5 +81,5 @@ refer to this `list of resources`_ if you need any assistance. :alt: Supported Python versions .. |license-badge| image:: https://img.shields.io/github/license/edx/code-annotations.svg - :target: https://github.com/edx/code-annotations/blob/master/LICENSE.txt + :target: https://github.com/openedx/code-annotations/blob/master/LICENSE.txt :alt: License diff --git a/code_annotations/contrib/sphinx/extensions/featuretoggles.py b/code_annotations/contrib/sphinx/extensions/featuretoggles.py index df5ae8f..d9bf531 100644 --- a/code_annotations/contrib/sphinx/extensions/featuretoggles.py +++ b/code_annotations/contrib/sphinx/extensions/featuretoggles.py @@ -39,7 +39,7 @@ class FeatureToggles(SphinxDirective): - ``featuretoggles_repo_url``: Github repository where the code is hosted. E.g: - featuretoggles_repo_url = "https://github.com/edx/myrepo" + featuretoggles_repo_url = "https://github.com/openedx/myrepo" - ``featuretoggles_repo_version``: current version of the git repository. E.g: diff --git a/code_annotations/contrib/sphinx/extensions/settings.py b/code_annotations/contrib/sphinx/extensions/settings.py index 9539920..44150bb 100644 --- a/code_annotations/contrib/sphinx/extensions/settings.py +++ b/code_annotations/contrib/sphinx/extensions/settings.py @@ -39,7 +39,7 @@ class Settings(SphinxDirective): - ``settings_repo_url``: Github repository where the code is hosted. E.g: - settings_repo_url = "https://github.com/edx/myrepo" + settings_repo_url = "https://github.com/openedx/myrepo" - ``settings_repo_version``: current version of the git repository. E.g: diff --git a/docs/contrib/how_to/add_new_annotations_and_extracted_docs.rst b/docs/contrib/how_to/add_new_annotations_and_extracted_docs.rst index 858d307..69b82f0 100644 --- a/docs/contrib/how_to/add_new_annotations_and_extracted_docs.rst +++ b/docs/contrib/how_to/add_new_annotations_and_extracted_docs.rst @@ -13,7 +13,7 @@ Annotations are a great way to keep documentation close to the code, but also be As an example, we have added `feature toggle annotations to the edx-platform codebase`_. A `Readthedocs document with the edx-platform feature toggles`_ has been generated from them. -.. _feature toggle annotations to the edx-platform codebase: https://github.com/edx/edx-platform/search?q=toggle_name +.. _feature toggle annotations to the edx-platform codebase: https://github.com/openedx/edx-platform/search?q=toggle_name .. _Readthedocs document with the edx-platform feature toggles: https://edx.readthedocs.io/projects/edx-platform-technical/en/latest/featuretoggles.html Add your own annotations and docs @@ -27,7 +27,7 @@ The following steps need to be performed to document new types of annotations in * Add a new documentation page in the `edx-platform technical docs that will use this Sphinx extension`_. Adapt this step as needed for other services. * As required, add `custom linting for the new annotations to edx-lint`_. Again, follow the toggle and setting checkers as examples. -.. _new annotation format in code_annotations/contrib/config: https://github.com/edx/code-annotations/tree/master/code_annotations/contrib/config -.. _Sphinx extension to collect these annotations: https://github.com/edx/code-annotations/tree/master/code_annotations/contrib/sphinx/extensions -.. _edx-platform technical docs that will use this Sphinx extension: https://github.com/edx/edx-platform/tree/master/docs/technical -.. _custom linting for the new annotations to edx-lint: https://github.com/edx/edx-lint/blob/master/edx_lint/pylint/annotations_check.py +.. _new annotation format in code_annotations/contrib/config: https://github.com/openedx/code-annotations/tree/master/code_annotations/contrib/config +.. _Sphinx extension to collect these annotations: https://github.com/openedx/code-annotations/tree/master/code_annotations/contrib/sphinx/extensions +.. _edx-platform technical docs that will use this Sphinx extension: https://github.com/openedx/edx-platform/tree/master/docs/technical +.. _custom linting for the new annotations to edx-lint: https://github.com/openedx/edx-lint/blob/master/edx_lint/pylint/annotations_check.py diff --git a/docs/contrib/how_to/documenting_django_settings.rst b/docs/contrib/how_to/documenting_django_settings.rst index 93ae80a..258ccfb 100644 --- a/docs/contrib/how_to/documenting_django_settings.rst +++ b/docs/contrib/how_to/documenting_django_settings.rst @@ -61,4 +61,4 @@ There are a variety of tips in `certain sections of the how-to for documenting f Additional resources ==================== -The documentation format used to annotate non-boolean Django settings is also available from code-annotations repository: `setting_annotations.yaml `__. +The documentation format used to annotate non-boolean Django settings is also available from code-annotations repository: `setting_annotations.yaml `__. diff --git a/docs/contrib/sphinx_extensions.rst b/docs/contrib/sphinx_extensions.rst index 351a195..e64a900 100644 --- a/docs/contrib/sphinx_extensions.rst +++ b/docs/contrib/sphinx_extensions.rst @@ -15,7 +15,7 @@ add the following to your ``conf.py``:: featuretoggles_source_path = os.path.abspath( os.path.join(os.path.dirname(__file__), "..") ) - featuretoggles_repo_url = "https://github.com/edx/yourrepo" + featuretoggles_repo_url = "https://github.com/openedx/yourrepo" try: featuretoggles_repo_version = git.Repo(search_parent_directories=True).head.object.hexsha except git.InvalidGitRepositoryError: diff --git a/docs/decisions/0001-config-and-tools.rst b/docs/decisions/0001-config-and-tools.rst index 4d65890..488b6f0 100644 --- a/docs/decisions/0001-config-and-tools.rst +++ b/docs/decisions/0001-config-and-tools.rst @@ -15,8 +15,8 @@ The original usage of this generic tool was for annotating PII in the Open edX p The new instances of annotation configs arose to support documenting Open edX feature toggles and non-toggle settings. Each of these will also have Sphinx extensions to support documentation. To start, the `feature toggles annotation config`_ was added to the ``edx-toggles`` repository, but there was no good home for the non-toggle settings annotation config, nor the documentation tools. -.. _PII annotations: https://github.com/edx/edx-cookiecutters/blob/7cf718093e7cca5c701a29fcbaa84660326b09ed/cookiecutter-django-app/%7B%7Bcookiecutter.repo_name%7D%7D/.pii_annotations.yml -.. _feature toggles annotation config: https://github.com/edx/edx-toggles/blob/0986b10a806944fd4d00847501ff4f7e3904a2cb/feature_toggle_annotations.yaml +.. _PII annotations: https://github.com/openedx/edx-cookiecutters/blob/7cf718093e7cca5c701a29fcbaa84660326b09ed/cookiecutter-django-app/%7B%7Bcookiecutter.repo_name%7D%7D/.pii_annotations.yml +.. _feature toggles annotation config: https://github.com/openedx/edx-toggles/blob/0986b10a806944fd4d00847501ff4f7e3904a2cb/feature_toggle_annotations.yaml Decision ======== diff --git a/pylintrc b/pylintrc index 9efca91..561027b 100644 --- a/pylintrc +++ b/pylintrc @@ -2,7 +2,7 @@ # ** DO NOT EDIT THIS FILE ** # *************************** # -# This file was generated by edx-lint: https://github.com/edx/edx-lint +# This file was generated by edx-lint: https://github.com/openedx/edx-lint # # If you want to change this file, you have two choices, depending on whether # you want to make a local change that applies only to this repo, or whether @@ -28,7 +28,7 @@ # CENTRAL CHANGE: # # 1. Edit the pylintrc file in the edx-lint repo at -# https://github.com/edx/edx-lint/blob/master/edx_lint/files/pylintrc +# https://github.com/openedx/edx-lint/blob/master/edx_lint/files/pylintrc # # 2. install the updated version of edx-lint (in edx-lint): # @@ -64,7 +64,7 @@ # SERIOUSLY. # # ------------------------------ -# Generated by edx-lint version: 5.2.1 +# Generated by edx-lint version: 5.2.5 # ------------------------------ [MASTER] ignore = ,migrations, settings, wsgi.py @@ -102,20 +102,12 @@ enable = cell-var-from-loop, confusing-with-statement, continue-in-finally, - cyclical-import, dangerous-default-value, - dict-items-not-iterating, - dict-keys-not-iterating, - dict-values-not-iterating, duplicate-argument-name, duplicate-bases, duplicate-except, duplicate-key, - eq-without-hash, - exception-escape, - exception-message-attribute, expression-not-assigned, - filter-builtin-not-iterating, format-combined-specification, format-needs-mapping, function-redefined, @@ -123,33 +115,26 @@ enable = import-error, import-self, inconsistent-mro, - indexing-exception, inherit-non-class, init-is-generator, invalid-all-object, - invalid-encoded-data, invalid-format-index, invalid-length-returned, invalid-sequence-index, invalid-slice-index, invalid-slots-object, invalid-slots, - invalid-str-codec, invalid-unary-operand-type, logging-too-few-args, logging-too-many-args, logging-unsupported-format, lost-exception, - map-builtin-not-iterating, method-hidden, misplaced-bare-raise, misplaced-future, missing-format-argument-key, missing-format-attribute, missing-format-string-key, - missing-super-argument, - mixed-fomat-string, - model-unicode-not-callable, no-member, no-method-argument, no-name-in-module, @@ -158,8 +143,6 @@ enable = non-iterator-returned, non-parent-method-called, nonexistent-operator, - nonimplemented-raised, - nonstandard-exception, not-a-mapping, not-an-iterable, not-callable, @@ -167,35 +150,25 @@ enable = not-in-loop, pointless-statement, pointless-string-statement, - property-on-old-class, raising-bad-type, raising-non-exception, - raising-string, - range-builtin-not-iterating, redefined-builtin, - redefined-in-handler, redefined-outer-name, - redefined-variable-type, redundant-keyword-arg, - relative-import, repeated-keyword, return-arg-in-generator, return-in-init, return-outside-function, signature-differs, - slots-on-old-class, super-init-not-called, super-method-not-called, - super-on-old-class, syntax-error, - sys-max-int, test-inherits-tests, too-few-format-args, too-many-format-args, too-many-function-args, translation-of-non-string, truncated-format-string, - unbalance-tuple-unpacking, undefined-all-variable, undefined-loop-variable, undefined-variable, @@ -211,11 +184,8 @@ enable = used-before-assignment, using-constant-test, yield-outside-function, - zip-builtin-not-iterating, astroid-error, - django-not-available-placeholder, - django-not-available, fatal, method-check-failed, parse-error, @@ -237,7 +207,6 @@ enable = bad-classmethod-argument, bad-mcs-classmethod-argument, bad-mcs-method-argument, - bad-whitespace, bare-except, broad-except, consider-iterating-dictionary, @@ -247,16 +216,10 @@ enable = literal-used-as-attribute, logging-format-interpolation, logging-not-lazy, - metaclass-assignment, - model-has-unicode, - model-missing-unicode, - model-no-explicit-unicode, multiple-imports, multiple-statements, no-classmethod-decorator, no-staticmethod-decorator, - old-raise-syntax, - old-style-class, protected-access, redundant-unittest-assert, reimported, @@ -284,7 +247,6 @@ enable = wrong-import-position, missing-final-newline, - mixed-indentation, mixed-line-endings, trailing-newlines, trailing-whitespace, @@ -295,25 +257,7 @@ enable = deprecated-pragma, unrecognized-inline-option, useless-suppression, - - cmp-method, - coerce-method, - delslice-method, - dict-iter-method, - dict-view-method, - div-method, - getslice-method, - hex-method, - idiv-method, - next-method-called, - next-method-defined, - nonzero-method, - oct-method, - rdiv-method, - setslice-method, - using-cmp-argument, disable = - bad-continuation, bad-indentation, consider-using-f-string, duplicate-code, @@ -322,12 +266,7 @@ disable = global-statement, invalid-name, locally-disabled, - locally-enabled, - lowercase-l-suffix, - misplaced-comparison-constant, no-else-return, - no-init, - no-self-use, suppressed-message, too-few-public-methods, too-many-ancestors, @@ -346,54 +285,14 @@ disable = feature-toggle-needs-doc, illegal-waffle-usage, - apply-builtin, - backtick, - bad-python3-import, - basestring-builtin, - buffer-builtin, - cmp-builtin, - coerce-builtin, - deprecated-itertools-function, - deprecated-operator-function, - deprecated-str-translate-call, - deprecated-string-function, - deprecated-sys-function, - deprecated-types-field, - deprecated-urllib-function, - execfile-builtin, - file-builtin, - import-star-module-level, - input-builtin, - intern-builtin, - long-builtin, - long-suffix, - no-absolute-import, - non-ascii-bytes-literal, - old-division, - old-ne-operator, - old-octal-literal, - parameter-unpacking, - print-statement, - raw_input-builtin, - reduce-builtin, - reload-builtin, - round-builtin, - standarderror-builtin, - unichr-builtin, - unicode-builtin, - unpacking-in-except, - xrange-builtin, - logging-fstring-interpolation,,invalid-name,useless-object-inheritance,django-not-configured,consider-using-dict-items,consider-using-with [REPORTS] output-format = text -files-output = no reports = no score = no [BASIC] -bad-functions = map,filter,apply,input module-rgx = (([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ const-rgx = (([A-Z_][A-Z0-9_]*)|(__.*__)|log|urlpatterns|logger|User)$ class-rgx = [A-Z_][a-zA-Z0-9]+$ @@ -413,7 +312,6 @@ docstring-min-length = 5 max-line-length = 120 ignore-long-lines = ^\s*(# )?((?)|(\.\. \w+: .*))$ single-line-if-stmt = no -no-space-check = trailing-comma,dict-separator max-module-lines = 1000 indent-string = ' ' @@ -484,4 +382,4 @@ int-import-graph = [EXCEPTIONS] overgeneral-exceptions = Exception -# 3fd87e519513f0a4e318643283ee1917ec197854 +# b74f2c15b5d64df07c4c2e83ccdb285a46f90e11 diff --git a/pylintrc_backup b/pylintrc_backup index da859b5..dff7f43 100644 --- a/pylintrc_backup +++ b/pylintrc_backup @@ -2,7 +2,7 @@ # ** DO NOT EDIT THIS FILE ** # *************************** # -# This file was generated by edx-lint: http://github.com/edx/edx-lint +# This file was generated by edx-lint: http://github.com/openedx/edx-lint # # If you want to change this file, you have two choices, depending on whether # you want to make a local change that applies only to this repo, or whether @@ -24,7 +24,7 @@ # CENTRAL CHANGE: # # 1. Edit the pylintrc file in the edx-lint repo at -# https://github.com/edx/edx-lint/blob/master/edx_lint/files/pylintrc +# https://github.com/openedx/edx-lint/blob/master/edx_lint/files/pylintrc # # 2. install the updated version of edx-lint (in edx-lint): # diff --git a/setup.py b/setup.py index 499eb0a..2d3063f 100644 --- a/setup.py +++ b/setup.py @@ -75,7 +75,7 @@ def is_requirement(line): long_description_content_type='text/x-rst', author='edX', author_email='oscm@edx.org', - url='https://github.com/edx/code-annotations', + url='https://github.com/openedx/code-annotations', packages=[ 'code_annotations', ], diff --git a/tests/test_configurations/.annotations_test_success_with_report_docs b/tests/test_configurations/.annotations_test_success_with_report_docs index b02afc5..946c852 100644 --- a/tests/test_configurations/.annotations_test_success_with_report_docs +++ b/tests/test_configurations/.annotations_test_success_with_report_docs @@ -4,7 +4,7 @@ safelist_path: .annotation_safe_list.yml report_template_dir: code_annotations/report_templates/ rendered_report_dir: test_reports/ rendered_report_file_extension: .rst -rendered_report_source_link_prefix: https://github.com/edx/edx-platform/tree/master/ +rendered_report_source_link_prefix: https://github.com/openedx/edx-platform/tree/master/ coverage_target: 50.0 annotations: ".. no_pii:":