edx-api-doc-tools 2.1.2__tar.gz → 3.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. edx_api_doc_tools-3.1.0/.editorconfig +100 -0
  2. edx_api_doc_tools-3.1.0/.github/ISSUE_TEMPLATE.md +16 -0
  3. edx_api_doc_tools-3.1.0/.github/PULL_REQUEST_TEMPLATE.md +39 -0
  4. edx_api_doc_tools-3.1.0/.github/dependabot.yml +10 -0
  5. edx_api_doc_tools-3.1.0/.github/workflows/add-depr-ticket-to-depr-board.yml +19 -0
  6. edx_api_doc_tools-3.1.0/.github/workflows/add-remove-label-on-comment.yml +20 -0
  7. edx_api_doc_tools-3.1.0/.github/workflows/ci.yml +41 -0
  8. edx_api_doc_tools-3.1.0/.github/workflows/commitlint.yml +10 -0
  9. edx_api_doc_tools-3.1.0/.github/workflows/release.yml +117 -0
  10. edx_api_doc_tools-3.1.0/.github/workflows/self-assign-issue.yml +12 -0
  11. edx_api_doc_tools-3.1.0/.github/workflows/upgrade-python-requirements.yml +22 -0
  12. edx_api_doc_tools-3.1.0/.gitignore +79 -0
  13. edx_api_doc_tools-3.1.0/.tx/config +15 -0
  14. edx_api_doc_tools-3.1.0/MANIFEST.in +3 -0
  15. edx_api_doc_tools-3.1.0/Makefile +103 -0
  16. {edx_api_doc_tools-2.1.2/edx_api_doc_tools.egg-info → edx_api_doc_tools-3.1.0}/PKG-INFO +7 -139
  17. {edx_api_doc_tools-2.1.2 → edx_api_doc_tools-3.1.0}/README.rst +2 -2
  18. edx_api_doc_tools-3.1.0/codecov.yml +12 -0
  19. edx_api_doc_tools-3.1.0/docs/Makefile +230 -0
  20. edx_api_doc_tools-3.1.0/docs/_static/theme_overrides.css +10 -0
  21. edx_api_doc_tools-3.1.0/docs/adding.rst +63 -0
  22. edx_api_doc_tools-3.1.0/docs/api.rst +8 -0
  23. edx_api_doc_tools-3.1.0/docs/changelog.rst +1 -0
  24. edx_api_doc_tools-3.1.0/docs/conf.py +492 -0
  25. edx_api_doc_tools-3.1.0/docs/development.rst +61 -0
  26. edx_api_doc_tools-3.1.0/docs/excluding.rst +120 -0
  27. edx_api_doc_tools-3.1.0/docs/index.rst +17 -0
  28. edx_api_doc_tools-3.1.0/docs/make.bat +281 -0
  29. edx_api_doc_tools-3.1.0/docs/writing.rst +103 -0
  30. edx_api_doc_tools-3.1.0/example/__init__.py +5 -0
  31. edx_api_doc_tools-3.1.0/example/data.py +39 -0
  32. edx_api_doc_tools-3.1.0/example/serializers.py +35 -0
  33. edx_api_doc_tools-3.1.0/example/urls.py +35 -0
  34. edx_api_doc_tools-3.1.0/example/urls_with_pattern.py +33 -0
  35. edx_api_doc_tools-3.1.0/example/views.py +226 -0
  36. edx_api_doc_tools-3.1.0/locale/config.yaml +72 -0
  37. edx_api_doc_tools-3.1.0/manage.py +30 -0
  38. edx_api_doc_tools-3.1.0/openedx.yaml +47 -0
  39. edx_api_doc_tools-3.1.0/pylintrc +385 -0
  40. edx_api_doc_tools-3.1.0/pylintrc_tweaks +4 -0
  41. edx_api_doc_tools-3.1.0/pyproject.toml +140 -0
  42. edx_api_doc_tools-3.1.0/setup.cfg +4 -0
  43. {edx_api_doc_tools-2.1.2 → edx_api_doc_tools-3.1.0/src}/edx_api_doc_tools/__init__.py +3 -1
  44. edx_api_doc_tools-3.1.0/src/edx_api_doc_tools/conf/locale/config.yaml +85 -0
  45. {edx_api_doc_tools-2.1.2 → edx_api_doc_tools-3.1.0/src/edx_api_doc_tools.egg-info}/PKG-INFO +7 -139
  46. edx_api_doc_tools-3.1.0/src/edx_api_doc_tools.egg-info/SOURCES.txt +65 -0
  47. edx_api_doc_tools-3.1.0/src/edx_api_doc_tools.egg-info/scm_file_list.json +63 -0
  48. edx_api_doc_tools-3.1.0/test_settings.py +52 -0
  49. edx_api_doc_tools-3.1.0/test_utils/__init__.py +9 -0
  50. edx_api_doc_tools-3.1.0/tests/.gitignore +2 -0
  51. edx_api_doc_tools-3.1.0/tests/expected_schema.json +307 -0
  52. edx_api_doc_tools-3.1.0/tests/expected_schema_with_patterns.json +145 -0
  53. edx_api_doc_tools-3.1.0/tox.ini +67 -0
  54. edx_api_doc_tools-3.1.0/uv.lock +1758 -0
  55. edx_api_doc_tools-2.1.2/MANIFEST.in +0 -5
  56. edx_api_doc_tools-2.1.2/edx_api_doc_tools.egg-info/SOURCES.txt +0 -23
  57. edx_api_doc_tools-2.1.2/edx_api_doc_tools.egg-info/not-zip-safe +0 -1
  58. edx_api_doc_tools-2.1.2/requirements/base.in +0 -7
  59. edx_api_doc_tools-2.1.2/requirements/constraints.txt +0 -14
  60. edx_api_doc_tools-2.1.2/setup.cfg +0 -25
  61. edx_api_doc_tools-2.1.2/setup.py +0 -183
  62. {edx_api_doc_tools-2.1.2 → edx_api_doc_tools-3.1.0}/CHANGELOG.rst +0 -0
  63. {edx_api_doc_tools-2.1.2 → edx_api_doc_tools-3.1.0}/LICENSE.txt +0 -0
  64. {edx_api_doc_tools-2.1.2 → edx_api_doc_tools-3.1.0/src}/edx_api_doc_tools/apps.py +0 -0
  65. {edx_api_doc_tools-2.1.2 → edx_api_doc_tools-3.1.0/src}/edx_api_doc_tools/conf_utils.py +0 -0
  66. {edx_api_doc_tools-2.1.2 → edx_api_doc_tools-3.1.0/src}/edx_api_doc_tools/data.py +0 -0
  67. {edx_api_doc_tools-2.1.2 → edx_api_doc_tools-3.1.0/src}/edx_api_doc_tools/internal_utils.py +0 -0
  68. {edx_api_doc_tools-2.1.2 → edx_api_doc_tools-3.1.0/src}/edx_api_doc_tools/urls.py +0 -0
  69. {edx_api_doc_tools-2.1.2 → edx_api_doc_tools-3.1.0/src}/edx_api_doc_tools/view_utils.py +0 -0
  70. {edx_api_doc_tools-2.1.2 → edx_api_doc_tools-3.1.0/src}/edx_api_doc_tools.egg-info/dependency_links.txt +0 -0
  71. {edx_api_doc_tools-2.1.2 → edx_api_doc_tools-3.1.0/src}/edx_api_doc_tools.egg-info/requires.txt +0 -0
  72. {edx_api_doc_tools-2.1.2 → edx_api_doc_tools-3.1.0/src}/edx_api_doc_tools.egg-info/top_level.txt +0 -0
  73. {edx_api_doc_tools-2.1.2 → edx_api_doc_tools-3.1.0}/tests/test_doc_tools.py +0 -0
  74. {edx_api_doc_tools-2.1.2 → edx_api_doc_tools-3.1.0}/tests/test_example.py +0 -0
@@ -0,0 +1,100 @@
1
+ # ***************************
2
+ # ** DO NOT EDIT THIS FILE **
3
+ # ***************************
4
+ #
5
+ # This file was generated by edx-lint: https://github.com/openedx/edx-lint
6
+ #
7
+ # If you want to change this file, you have two choices, depending on whether
8
+ # you want to make a local change that applies only to this repo, or whether
9
+ # you want to make a central change that applies to all repos using edx-lint.
10
+ #
11
+ # Note: If your .editorconfig file is simply out-of-date relative to the latest
12
+ # .editorconfig in edx-lint, ensure you have the latest edx-lint installed
13
+ # and then follow the steps for a "LOCAL CHANGE".
14
+ #
15
+ # LOCAL CHANGE:
16
+ #
17
+ # 1. Edit the local .editorconfig_tweaks file to add changes just to this
18
+ # repo's file.
19
+ #
20
+ # 2. Run:
21
+ #
22
+ # $ edx_lint write .editorconfig
23
+ #
24
+ # 3. This will modify the local file. Submit a pull request to get it
25
+ # checked in so that others will benefit.
26
+ #
27
+ #
28
+ # CENTRAL CHANGE:
29
+ #
30
+ # 1. Edit the .editorconfig file in the edx-lint repo at
31
+ # https://github.com/openedx/edx-lint/blob/master/edx_lint/files/.editorconfig
32
+ #
33
+ # 2. install the updated version of edx-lint (in edx-lint):
34
+ #
35
+ # $ pip install .
36
+ #
37
+ # 3. Run (in edx-lint):
38
+ #
39
+ # $ edx_lint write .editorconfig
40
+ #
41
+ # 4. Make a new version of edx_lint, submit and review a pull request with the
42
+ # .editorconfig update, and after merging, update the edx-lint version and
43
+ # publish the new version.
44
+ #
45
+ # 5. In your local repo, install the newer version of edx-lint.
46
+ #
47
+ # 6. Run:
48
+ #
49
+ # $ edx_lint write .editorconfig
50
+ #
51
+ # 7. This will modify the local file. Submit a pull request to get it
52
+ # checked in so that others will benefit.
53
+ #
54
+ #
55
+ #
56
+ #
57
+ #
58
+ # STAY AWAY FROM THIS FILE!
59
+ #
60
+ #
61
+ #
62
+ #
63
+ #
64
+ # SERIOUSLY.
65
+ #
66
+ # ------------------------------
67
+ # Generated by edx-lint version: 5.2.5
68
+ # ------------------------------
69
+ [*]
70
+ end_of_line = lf
71
+ insert_final_newline = true
72
+ charset = utf-8
73
+ indent_style = space
74
+ indent_size = 4
75
+ max_line_length = 120
76
+ trim_trailing_whitespace = true
77
+
78
+ [{Makefile, *.mk}]
79
+ indent_style = tab
80
+ indent_size = 8
81
+
82
+ [*.{yml,yaml,json}]
83
+ indent_size = 2
84
+
85
+ [*.js]
86
+ indent_size = 2
87
+
88
+ [*.diff]
89
+ trim_trailing_whitespace = false
90
+
91
+ [.git/*]
92
+ trim_trailing_whitespace = false
93
+
94
+ [COMMIT_EDITMSG]
95
+ max_line_length = 72
96
+
97
+ [*.rst]
98
+ max_line_length = 79
99
+
100
+ # f2f02689fced7a2e0c62c2f9803184114dc2ae4b
@@ -0,0 +1,16 @@
1
+ * edx-api-doc-tools version:
2
+ * Django version:
3
+ * Python version:
4
+ * Operating System:
5
+
6
+ ### Description
7
+
8
+ Describe what you were trying to get done.
9
+ Tell us what happened, what went wrong, and what you expected to happen.
10
+
11
+ ### What I Did
12
+
13
+ ```
14
+ Paste the command(s) you ran and the output.
15
+ If there was a crash, please include the traceback here.
16
+ ```
@@ -0,0 +1,39 @@
1
+ **Description:** Describe in a couple of sentences what this PR adds
2
+
3
+ **JIRA:** Link to JIRA ticket
4
+
5
+ **Dependencies:** dependencies on other outstanding PRs, issues, etc.
6
+
7
+ **Merge deadline:** List merge deadline (if any)
8
+
9
+ **Installation instructions:** List any non-trivial installation
10
+ instructions.
11
+
12
+ **Testing instructions:**
13
+
14
+ 1. Open page A
15
+ 2. Do thing B
16
+ 3. Expect C to happen
17
+ 4. If D happened instead - check failed.
18
+
19
+ **Reviewers:**
20
+ - [ ] tag reviewer
21
+ - [ ] tag reviewer
22
+
23
+ **Merge checklist:**
24
+ - [ ] All reviewers approved
25
+ - [ ] CI build is green
26
+ - [ ] Version bumped
27
+ - [ ] Changelog record added
28
+ - [ ] Documentation updated (not only docstrings)
29
+ - [ ] Commits are squashed
30
+
31
+ **Post merge:**
32
+ - [ ] Create a tag
33
+ - [ ] Check new version is pushed to PyPI after tag-triggered build is
34
+ finished.
35
+ - [ ] Delete working branch (if not needed anymore)
36
+
37
+ **Author concerns:** List any concerns about this PR - inelegant
38
+ solutions, hacks, quick-and-dirty implementations, concerns about
39
+ migrations, etc.
@@ -0,0 +1,10 @@
1
+ version: 2
2
+ updates:
3
+ # Adding new check for github-actions
4
+ - package-ecosystem: "github-actions"
5
+ directory: "/"
6
+ schedule:
7
+ interval: "weekly"
8
+ # Optional: specify reviewers to automatically request review on Dependabot PRs
9
+ # reviewers:
10
+ # - "openedx/xxx"
@@ -0,0 +1,19 @@
1
+ # Run the workflow that adds new tickets that are either:
2
+ # - labelled "DEPR"
3
+ # - title starts with "[DEPR]"
4
+ # - body starts with "Proposal Date" (this is the first template field)
5
+ # to the org-wide DEPR project board
6
+
7
+ name: Add newly created DEPR issues to the DEPR project board
8
+
9
+ on:
10
+ issues:
11
+ types: [opened]
12
+
13
+ jobs:
14
+ routeissue:
15
+ uses: openedx/.github/.github/workflows/add-depr-ticket-to-depr-board.yml@master
16
+ secrets:
17
+ GITHUB_APP_ID: ${{ secrets.GRAPHQL_AUTH_APP_ID }}
18
+ GITHUB_APP_PRIVATE_KEY: ${{ secrets.GRAPHQL_AUTH_APP_PEM }}
19
+ SLACK_BOT_TOKEN: ${{ secrets.SLACK_ISSUE_BOT_TOKEN }}
@@ -0,0 +1,20 @@
1
+ # This workflow runs when a comment is made on the ticket
2
+ # If the comment starts with "label: " it tries to apply
3
+ # the label indicated in rest of comment.
4
+ # If the comment starts with "remove label: ", it tries
5
+ # to remove the indicated label.
6
+ # Note: Labels are allowed to have spaces and this script does
7
+ # not parse spaces (as often a space is legitimate), so the command
8
+ # "label: really long lots of words label" will apply the
9
+ # label "really long lots of words label"
10
+
11
+ name: Allows for the adding and removing of labels via comment
12
+
13
+ on:
14
+ issue_comment:
15
+ types: [created]
16
+
17
+ jobs:
18
+ add_remove_labels:
19
+ uses: openedx/.github/.github/workflows/add-remove-label-on-comment.yml@master
20
+
@@ -0,0 +1,41 @@
1
+ name: Python CI
2
+
3
+ on:
4
+ pull_request:
5
+ branches:
6
+ - "**"
7
+ workflow_call:
8
+
9
+ jobs:
10
+ run_tests:
11
+ name: ${{ matrix.toxenv }}
12
+ runs-on: ${{ matrix.os }}
13
+ permissions:
14
+ contents: read
15
+ strategy:
16
+ matrix:
17
+ os: [ubuntu-latest]
18
+ python-version: ["3.12"]
19
+ toxenv: [django52, quality]
20
+
21
+ steps:
22
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
23
+ - name: Setup uv
24
+ uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
25
+ with:
26
+ enable-cache: true
27
+ python-version: ${{ matrix.python-version }}
28
+
29
+ - name: Install CI dependencies
30
+ run: uv sync --group ci --locked
31
+
32
+ - name: Run Tests
33
+ run: uv run --locked tox -e ${{ matrix.toxenv }}
34
+
35
+ - name: Run Coverage
36
+ if: matrix.python-version == '3.12' && matrix.toxenv=='django52'
37
+ uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1
38
+ with:
39
+ token: ${{ secrets.CODECOV_TOKEN }}
40
+ flags: unittests
41
+ fail_ci_if_error: true
@@ -0,0 +1,10 @@
1
+ # Run commitlint on the commit messages in a pull request.
2
+
3
+ name: Lint Commit Messages
4
+
5
+ on:
6
+ - pull_request
7
+
8
+ jobs:
9
+ commitlint:
10
+ uses: openedx/.github/.github/workflows/commitlint.yml@master
@@ -0,0 +1,117 @@
1
+ name: Semantic Release
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+
7
+ jobs:
8
+ # The same aggregate a pull request has to pass, so the release runs exactly
9
+ # the checks that were required to merge -- and picks up any package added to
10
+ # ci.yml later without needing a change here.
11
+ run_ci:
12
+ uses: ./.github/workflows/ci.yml
13
+
14
+ release:
15
+ # Every package this workflow publishes has to build before we tag
16
+ # anything. The GitHub release and the PyPI uploads cannot be taken back,
17
+ # so a package that only fails to build in its publish job would leave the
18
+ # release half-finished.
19
+ needs: [run_ci]
20
+ runs-on: ubuntu-latest
21
+ if: github.ref_name == 'master'
22
+ concurrency:
23
+ group: ${{ github.workflow }}-release-${{ github.ref_name }}
24
+ cancel-in-progress: false
25
+
26
+ permissions:
27
+ contents: write
28
+
29
+ steps:
30
+ # Note: We checkout the repository at the branch that triggered the workflow.
31
+ # Python Semantic Release will automatically convert shallow clones to full clones
32
+ # if needed to ensure proper history evaluation. However, we forcefully reset the
33
+ # branch to the workflow sha because it is possible that the branch was updated
34
+ # while the workflow was running, which prevents accidentally releasing un-evaluated
35
+ # changes.
36
+ - name: Setup | Checkout Repository on Release Branch
37
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
38
+ with:
39
+ ref: ${{ github.ref_name }}
40
+
41
+ - name: Setup | Force release branch to be at workflow sha
42
+ run: |
43
+ git reset --hard ${{ github.sha }}
44
+
45
+ - name: Action | Semantic Version Release
46
+ id: release
47
+ # Adjust tag with desired version if applicable.
48
+ uses: python-semantic-release/python-semantic-release@b700dbeb1f431a0fcc30a79f3f0869407fe07278 # v10.7.0
49
+ with:
50
+ github_token: ${{ secrets.GITHUB_TOKEN }}
51
+ git_committer_name: "github-actions"
52
+ git_committer_email: "actions@users.noreply.github.com"
53
+ changelog: "false"
54
+ # Commit, tag, push and build, but don't create the GitHub release.
55
+ # We create it ourselves in the next step so that the distributions
56
+ # are attached before the release is published. See that step for why.
57
+ vcs_release: "false"
58
+
59
+ # This repo has immutable releases enabled, which freezes a release's
60
+ # assets the moment it is published, so assets cannot be attached
61
+ # afterwards. Everything we want on the release has to be built by now
62
+ # and passed to this one command, which creates the release as a draft,
63
+ # uploads the assets, and only then publishes it:
64
+ # https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/immutable-releases
65
+ - name: Publish | Create GitHub Release with Assets
66
+ if: steps.release.outputs.released == 'true'
67
+ env:
68
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69
+ # Reuse the release notes python-semantic-release generated for us.
70
+ RELEASE_NOTES: ${{ steps.release.outputs.release_notes }}
71
+ TAG: ${{ steps.release.outputs.tag }}
72
+ run: |
73
+ # Output the release notes to a file
74
+ printf '%s' "$RELEASE_NOTES" > "$RUNNER_TEMP/release_notes.md"
75
+ # Creates the release as a draft, uploads the assets, and then
76
+ # publishes it -- all within this one command.
77
+ gh release create "$TAG" \
78
+ --verify-tag \
79
+ --title "$TAG" \
80
+ --notes-file "$RUNNER_TEMP/release_notes.md" \
81
+ dist/*
82
+
83
+ - name: Upload | Distribution Artifacts
84
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
85
+ if: steps.release.outputs.released == 'true'
86
+ with:
87
+ name: distribution-artifacts
88
+ path: dist
89
+ if-no-files-found: error
90
+
91
+ outputs:
92
+ released: ${{ steps.release.outputs.released || 'false' }}
93
+ version: ${{ steps.release.outputs.version }}
94
+
95
+ publish_to_pypi:
96
+ # 1. Separate out the publish step from the github release step to run each step at
97
+ # the least amount of token privilege
98
+ # 2. Also, publishing can fail, and its better to have a separate job if you need to retry
99
+ # and it won't require reversing the release.
100
+ runs-on: ubuntu-latest
101
+ needs: release
102
+ if: github.ref_name == 'master' && needs.release.outputs.released == 'true'
103
+
104
+ permissions:
105
+ contents: read
106
+ id-token: write
107
+
108
+ steps:
109
+ - name: Setup | Download Build Artifacts
110
+ uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
111
+ id: artifact-download
112
+ with:
113
+ name: distribution-artifacts
114
+ path: dist
115
+
116
+ - name: Publish to PyPi
117
+ uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
@@ -0,0 +1,12 @@
1
+ # This workflow runs when a comment is made on the ticket
2
+ # If the comment starts with "assign me" it assigns the author to the
3
+ # ticket (case insensitive)
4
+
5
+ name: Assign comment author to ticket if they say "assign me"
6
+ on:
7
+ issue_comment:
8
+ types: [created]
9
+
10
+ jobs:
11
+ self_assign_by_comment:
12
+ uses: openedx/.github/.github/workflows/self-assign-issue.yml@master
@@ -0,0 +1,22 @@
1
+ name: Upgrade Requirements
2
+
3
+ on:
4
+ schedule:
5
+ - cron: "15 4 * * 4"
6
+ workflow_dispatch:
7
+ inputs:
8
+ branch:
9
+ description: 'Target branch to create requirements PR against'
10
+ required: true
11
+ default: 'master'
12
+ jobs:
13
+ call-upgrade-python-requirements-workflow:
14
+ with:
15
+ branch: ${{ github.event.inputs.branch }}
16
+ send_success_notification: false
17
+ secrets:
18
+ requirements_bot_github_token: ${{ secrets.REQUIREMENTS_BOT_GITHUB_TOKEN }}
19
+ requirements_bot_github_email: ${{ secrets.REQUIREMENTS_BOT_GITHUB_EMAIL }}
20
+ edx_smtp_username: ${{ secrets.EDX_SMTP_USERNAME }}
21
+ edx_smtp_password: ${{ secrets.EDX_SMTP_PASSWORD }}
22
+ uses: openedx/.github/.github/workflows/upgrade-python-requirements.yml@master
@@ -0,0 +1,79 @@
1
+ *.py[cod]
2
+ __pycache__
3
+ .pytest_cache
4
+
5
+ # C extensions
6
+ *.so
7
+
8
+ # Packages
9
+ *.egg
10
+ *.egg-info
11
+ dist
12
+ build
13
+ eggs
14
+ parts
15
+ bin
16
+ var
17
+ sdist
18
+ develop-eggs
19
+ .installed.cfg
20
+ lib
21
+ lib64
22
+
23
+ # Installer logs
24
+ pip-log.txt
25
+
26
+ # Unit test / coverage reports
27
+ .cache/
28
+ .pytest_cache/
29
+ .coverage
30
+ .coverage.*
31
+ .tox
32
+ coverage.xml
33
+ htmlcov/
34
+
35
+ # PII annotation reports
36
+ pii_report
37
+
38
+ # Translations
39
+ *.mo
40
+
41
+ # IDEs and text editors
42
+ *~
43
+ *.swp
44
+ .idea/
45
+ .project
46
+ .pycharm_helpers/
47
+ .pydevproject
48
+
49
+ # The Silver Searcher
50
+ .agignore
51
+
52
+ # OS X artifacts
53
+ *.DS_Store
54
+
55
+ # Logging
56
+ log/
57
+ logs/
58
+ chromedriver.log
59
+ ghostdriver.log
60
+
61
+ # Complexity
62
+ output/*.html
63
+ output/*/index.html
64
+
65
+ # Sphinx
66
+ docs/_build
67
+
68
+ # Private requirements
69
+ requirements/private.in
70
+ requirements/private.txt
71
+
72
+ # tox environment temporary artifacts
73
+ tests/__init__.py
74
+
75
+ # Development task artifacts
76
+ default.db
77
+
78
+ # Common virtualenv directory
79
+ .venv*
@@ -0,0 +1,15 @@
1
+ [main]
2
+ host = https://www.transifex.com
3
+
4
+ [o:open-edx:p:edx-platform:r:api-doc-tools]
5
+ file_filter = src/edx_api_doc_tools/conf/locale/<lang>/LC_MESSAGES/django.po
6
+ source_file = src/edx_api_doc_tools/conf/locale/en/LC_MESSAGES/django.po
7
+ source_lang = en
8
+ type = PO
9
+
10
+ [o:open-edx:p:edx-platform:r:api-doc-tools-js]
11
+ file_filter = src/edx_api_doc_tools/conf/locale/<lang>/LC_MESSAGES/djangojs.po
12
+ source_file = src/edx_api_doc_tools/conf/locale/en/LC_MESSAGES/djangojs.po
13
+ source_lang = en
14
+ type = PO
15
+
@@ -0,0 +1,3 @@
1
+ include CHANGELOG.rst
2
+ include LICENSE.txt
3
+ include README.rst
@@ -0,0 +1,103 @@
1
+ .PHONY: build_docs build_dummy_translations clean compile_translations \
2
+ coverage detect_changed_source_translations diff_cover docs \
3
+ dummy_translations extract_translations help isort isort_check \
4
+ pull_translations push_translations pylint quality \
5
+ requirements selfcheck style test upgrade \
6
+ validate validate_translations
7
+
8
+ .DEFAULT_GOAL := help
9
+
10
+ # For opening files in a browser. Use like: $(BROWSER)relative/path/to/file.html
11
+ BROWSER := python -m webbrowser file://$(CURDIR)/
12
+
13
+ help: ## display this help message
14
+ @echo "Please use \`make <target>' where <target> is one of"
15
+ @awk -F ':.*?## ' '/^[a-zA-Z]/ && NF==2 {printf "\033[36m %-25s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) | sort
16
+
17
+ clean: ## remove generated byte code, coverage reports, and build artifacts
18
+ find . -name '__pycache__' -exec rm -rf {} +
19
+ find . -name '*.pyc' -exec rm -f {} +
20
+ find . -name '*.pyo' -exec rm -f {} +
21
+ find . -name '*~' -exec rm -f {} +
22
+ coverage erase
23
+ rm -fr build/
24
+ rm -fr dist/
25
+ rm -fr *.egg-info
26
+
27
+ coverage: clean ## generate and view HTML coverage report
28
+ pytest --cov-report html
29
+ $(BROWSER)htmlcov/index.html
30
+
31
+ build_docs:
32
+ doc8 --ignore-path docs/_build README.rst docs
33
+ make -C docs clean
34
+ make -C docs html
35
+ python -m build --sdist
36
+ twine check dist/*.tar.gz
37
+
38
+ docs: build_docs ## generate and show Sphinx HTML documentation, including API docs
39
+ $(BROWSER)docs/_build/html/index.html
40
+
41
+ upgrade: ## update the requirements in pyproject.toml (uv.lock)
42
+ uv run --with 'edx-lint>=6.2' edx_lint write_uv_constraints pyproject.toml
43
+ uv lock --upgrade
44
+
45
+ CHECKABLE_PYTHON=tests test_utils example src/edx_api_doc_tools manage.py test_settings.py
46
+
47
+ style:
48
+ pycodestyle $(CHECKABLE_PYTHON)
49
+ pydocstyle $(CHECKABLE_PYTHON)
50
+
51
+ isort: ## sort all imports
52
+ isort --recursive $(CHECKABLE_PYTHON)
53
+
54
+ isort_check:
55
+ isort --check-only --diff $(CHECKABLE_PYTHON)
56
+
57
+ pylint:
58
+ echo '"""This file exists only to satisify pylint; it is not committed."""' > tests/__init__.py
59
+ pylint --django-settings-module=test_settings $(CHECKABLE_PYTHON)
60
+ rm tests/__init__.py
61
+
62
+ quality: style isort_check pylint ## check code style, import ordering, linting, and this makefile
63
+ make selfcheck
64
+
65
+ requirements: ## install development environment requirements
66
+ uv sync --group dev
67
+
68
+ test: clean ## run tests in the current virtualenv
69
+ pytest
70
+
71
+ diff_cover: test ## find diff lines that need test coverage
72
+ diff-cover coverage.xml
73
+
74
+ validate: quality test ## run tests and quality checks
75
+
76
+ selfcheck: ## check that the Makefile is well-formed
77
+ @echo "The Makefile is well-formed."
78
+
79
+ ## Localization targets
80
+
81
+ extract_translations: ## extract strings to be translated, outputting .mo files
82
+ rm -rf docs/_build
83
+ cd src/edx_api_doc_tools && python ../../manage.py makemessages -l en -v1 -d django
84
+ cd src/edx_api_doc_tools && python ../../manage.py makemessages -l en -v1 -d djangojs
85
+
86
+ compile_translations: ## compile translation files, outputting .po files for each supported language
87
+ cd src/edx_api_doc_tools && python ../../manage.py compilemessages
88
+
89
+ detect_changed_source_translations:
90
+ cd src/edx_api_doc_tools && i18n_tool changed
91
+
92
+ pull_translations: ## pull translations from Transifex
93
+ tx pull -t -a -f --mode reviewed
94
+
95
+ push_translations: ## push source translation files (.po) from Transifex
96
+ tx push -s
97
+
98
+ dummy_translations: ## generate dummy translation (.po) files
99
+ cd src/edx_api_doc_tools && i18n_tool dummy
100
+
101
+ build_dummy_translations: extract_translations dummy_translations compile_translations ## generate and compile dummy translation files
102
+
103
+ validate_translations: build_dummy_translations detect_changed_source_translations ## validate translations