olx-utils 0.3.3__tar.gz → 0.4.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 (146) hide show
  1. olx-utils-0.4.0/.bumpversion.cfg +10 -0
  2. olx-utils-0.4.0/.githooks/pre-commit +2 -0
  3. olx-utils-0.4.0/.githooks/pre-push +2 -0
  4. olx-utils-0.4.0/.github/workflows/tox.yml +65 -0
  5. olx-utils-0.4.0/HACKING.md +80 -0
  6. olx-utils-0.4.0/PKG-INFO +88 -0
  7. {olx-utils-0.3.3 → olx-utils-0.4.0}/README.rst +3 -5
  8. olx-utils-0.4.0/olx_utils.egg-info/PKG-INFO +88 -0
  9. {olx-utils-0.3.3 → olx-utils-0.4.0}/olx_utils.egg-info/SOURCES.txt +5 -1
  10. {olx-utils-0.3.3 → olx-utils-0.4.0}/olxutils/__init__.py +2 -2
  11. {olx-utils-0.3.3 → olx-utils-0.4.0}/olxutils/archive.py +1 -0
  12. {olx-utils-0.3.3 → olx-utils-0.4.0}/olxutils/helpers.py +3 -3
  13. olx-utils-0.4.0/requirements/flake8.txt +1 -0
  14. {olx-utils-0.3.3 → olx-utils-0.4.0}/setup.py +5 -4
  15. olx-utils-0.4.0/tests/fenced-code-blocks.html +20 -0
  16. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/test_git.py +13 -5
  17. olx-utils-0.4.0/tox.ini +55 -0
  18. olx-utils-0.3.3/.travis.yml +0 -27
  19. olx-utils-0.3.3/PKG-INFO +0 -86
  20. olx-utils-0.3.3/olx_utils.egg-info/PKG-INFO +0 -86
  21. olx-utils-0.3.3/requirements/flake8.txt +0 -2
  22. olx-utils-0.3.3/tests/fenced-code-blocks.html +0 -16
  23. olx-utils-0.3.3/tox.ini +0 -33
  24. {olx-utils-0.3.3 → olx-utils-0.4.0}/.gitignore +0 -0
  25. {olx-utils-0.3.3 → olx-utils-0.4.0}/.gitlab-ci.yml +0 -0
  26. {olx-utils-0.3.3 → olx-utils-0.4.0}/LICENSE +0 -0
  27. {olx-utils-0.3.3 → olx-utils-0.4.0}/olx_utils.egg-info/dependency_links.txt +0 -0
  28. {olx-utils-0.3.3 → olx-utils-0.4.0}/olx_utils.egg-info/entry_points.txt +0 -0
  29. {olx-utils-0.3.3 → olx-utils-0.4.0}/olx_utils.egg-info/requires.txt +1 -1
  30. {olx-utils-0.3.3 → olx-utils-0.4.0}/olx_utils.egg-info/top_level.txt +0 -0
  31. {olx-utils-0.3.3 → olx-utils-0.4.0}/olxutils/__main__.py +0 -0
  32. {olx-utils-0.3.3 → olx-utils-0.4.0}/olxutils/cli.py +0 -0
  33. {olx-utils-0.3.3 → olx-utils-0.4.0}/olxutils/git.py +0 -0
  34. {olx-utils-0.3.3 → olx-utils-0.4.0}/olxutils/templates/olx_partials.xml +0 -0
  35. {olx-utils-0.3.3 → olx-utils-0.4.0}/olxutils/templates.py +0 -0
  36. {olx-utils-0.3.3 → olx-utils-0.4.0}/olxutils/token.py +0 -0
  37. {olx-utils-0.3.3 → olx-utils-0.4.0}/olxutils/upload.py +0 -0
  38. {olx-utils-0.3.3 → olx-utils-0.4.0}/requirements/base.txt +0 -0
  39. {olx-utils-0.3.3 → olx-utils-0.4.0}/requirements/setup.txt +0 -0
  40. {olx-utils-0.3.3 → olx-utils-0.4.0}/requirements/test.txt +0 -0
  41. {olx-utils-0.3.3 → olx-utils-0.4.0}/requirements.txt +0 -0
  42. {olx-utils-0.3.3 → olx-utils-0.4.0}/setup.cfg +0 -0
  43. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/__init__.py +0 -0
  44. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/README.md +0 -0
  45. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/about/overview.html +0 -0
  46. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/chapter/conclusion.xml +0 -0
  47. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/chapter/introduction.xml +0 -0
  48. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/course.xml +0 -0
  49. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/html/README.md +0 -0
  50. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/html/introduction_unit_01.html +0 -0
  51. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/html/introduction_unit_02.html +0 -0
  52. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/html/introduction_unit_03.html +0 -0
  53. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/include/course.xml +0 -0
  54. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/include/html/content.html +0 -0
  55. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/include/html/lab.html +0 -0
  56. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/include/sequential/content.xml +0 -0
  57. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/include/sequential/lab.xml +0 -0
  58. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/info/handouts.html +0 -0
  59. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/info/updates.html +0 -0
  60. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/markdown/README.md +0 -0
  61. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/markdown/introduction_unit_01.md +0 -0
  62. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/markdown/introduction_unit_02.md +0 -0
  63. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/markdown/introduction_unit_03.md +0 -0
  64. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/policies/_base/grading_policy.json +0 -0
  65. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/policies/_base/policy.json +0 -0
  66. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/policies/assets.json +0 -0
  67. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/sequential/README.md +0 -0
  68. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/sequential/introduction.xml +0 -0
  69. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/static/hot/README.md +0 -0
  70. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/static/images/README.md +0 -0
  71. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/static/markdown/README.md +0 -0
  72. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/static/markdown/introduction_unit_01.md +0 -0
  73. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/static/markdown/introduction_unit_02.md +0 -0
  74. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/static/markdown/introduction_unit_03.md +0 -0
  75. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/static/presentation/css/reveal-override.css +0 -0
  76. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/static/presentation/css/reveal-override.css.map +0 -0
  77. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/static/presentation/css/reveal-override.scss +0 -0
  78. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/static/presentation/css/reveal.css +0 -0
  79. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/static/presentation/css/white.css +0 -0
  80. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/static/presentation/css/zenburn.css +0 -0
  81. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/static/presentation/index.html +0 -0
  82. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/static/presentation/js/classList.js +0 -0
  83. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/static/presentation/js/head.min.js +0 -0
  84. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/static/presentation/js/highlight.js +0 -0
  85. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/static/presentation/js/markdown.js +0 -0
  86. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/static/presentation/js/marked.js +0 -0
  87. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/static/presentation/js/notes.html +0 -0
  88. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/static/presentation/js/notes.js +0 -0
  89. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/static/presentation/js/reveal.js +0 -0
  90. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/result/static/presentation/js/zoom.js +0 -0
  91. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/README.md +0 -0
  92. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/about/overview.html +0 -0
  93. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/chapter/conclusion.xml +0 -0
  94. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/chapter/introduction.xml +0 -0
  95. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/course.xml +0 -0
  96. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/html/README.md +0 -0
  97. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/html/introduction_unit_01.html +0 -0
  98. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/html/introduction_unit_02.html +0 -0
  99. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/html/introduction_unit_03.html +0 -0
  100. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/include/course.xml +0 -0
  101. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/include/html/content.html +0 -0
  102. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/include/html/lab.html +0 -0
  103. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/include/sequential/content.xml +0 -0
  104. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/include/sequential/lab.xml +0 -0
  105. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/info/handouts.html +0 -0
  106. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/info/updates.html +0 -0
  107. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/markdown/README.md +0 -0
  108. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/markdown/introduction_unit_01.md +0 -0
  109. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/markdown/introduction_unit_02.md +0 -0
  110. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/markdown/introduction_unit_03.md +0 -0
  111. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/policies/_base/grading_policy.json +0 -0
  112. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/policies/_base/policy.json +0 -0
  113. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/policies/assets.json +0 -0
  114. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/sequential/README.md +0 -0
  115. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/sequential/introduction.xml +0 -0
  116. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/static/hot/README.md +0 -0
  117. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/static/images/README.md +0 -0
  118. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/static/markdown/README.md +0 -0
  119. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/static/markdown/introduction_unit_01.md +0 -0
  120. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/static/markdown/introduction_unit_02.md +0 -0
  121. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/static/markdown/introduction_unit_03.md +0 -0
  122. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/static/presentation/css/reveal-override.css +0 -0
  123. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/static/presentation/css/reveal-override.css.map +0 -0
  124. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/static/presentation/css/reveal-override.scss +0 -0
  125. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/static/presentation/css/reveal.css +0 -0
  126. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/static/presentation/css/white.css +0 -0
  127. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/static/presentation/css/zenburn.css +0 -0
  128. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/static/presentation/index.html +0 -0
  129. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/static/presentation/js/classList.js +0 -0
  130. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/static/presentation/js/head.min.js +0 -0
  131. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/static/presentation/js/highlight.js +0 -0
  132. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/static/presentation/js/markdown.js +0 -0
  133. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/static/presentation/js/marked.js +0 -0
  134. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/static/presentation/js/notes.html +0 -0
  135. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/static/presentation/js/notes.js +0 -0
  136. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/static/presentation/js/reveal.js +0 -0
  137. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/course/source/static/presentation/js/zoom.js +0 -0
  138. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/fenced-code-blocks.md +0 -0
  139. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/footnotes.html +0 -0
  140. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/footnotes.md +0 -0
  141. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/tasks.py +0 -0
  142. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/test_cli.py +0 -0
  143. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/test_full_course.py +0 -0
  144. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/test_helpers.py +0 -0
  145. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/test_token.py +0 -0
  146. {olx-utils-0.3.3 → olx-utils-0.4.0}/tests/test_upload.py +0 -0
@@ -0,0 +1,10 @@
1
+ [bumpversion]
2
+ commit = True
3
+ tag = True
4
+ current_version = 0.4.0
5
+ parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(rc(?P<rc>\d+))?
6
+ serialize =
7
+ {major}.{minor}.{patch}rc{rc}
8
+ {major}.{minor}.{patch}
9
+
10
+ [bumpversion:part:rc]
@@ -0,0 +1,2 @@
1
+ #!/bin/sh
2
+ exec tox -e flake8
@@ -0,0 +1,2 @@
1
+ #!/bin/sh
2
+ exec tox -r
@@ -0,0 +1,65 @@
1
+ name: Python package
2
+
3
+ on:
4
+ - push
5
+ - pull_request
6
+
7
+ jobs:
8
+ build:
9
+ runs-on: ubuntu-latest
10
+ strategy:
11
+ matrix:
12
+ python-version:
13
+ - '3.8'
14
+ - '3.9'
15
+ - '3.10'
16
+ - '3.11'
17
+ - '3.12'
18
+
19
+ steps:
20
+ - name: Check out code
21
+ uses: actions/checkout@v1
22
+ - name: Set up Python ${{ matrix.python-version }}
23
+ uses: actions/setup-python@v2
24
+ with:
25
+ python-version: ${{ matrix.python-version }}
26
+ - name: Install dependencies
27
+ run: |
28
+ pip install tox tox-gh-actions setuptools_scm
29
+ - name: Test with tox
30
+ run: tox
31
+ - name: Upload coverage data
32
+ uses: actions/upload-artifact@v2
33
+ with:
34
+ name: coverage-${{ matrix.python-version }}
35
+ path: .coverage*
36
+ retention-days: 1
37
+
38
+ report:
39
+ needs: build
40
+ runs-on: ubuntu-latest
41
+
42
+ steps:
43
+ - name: Check out code
44
+ uses: actions/checkout@v1
45
+ - name: Download artifacts
46
+ uses: actions/download-artifact@v2
47
+ - name: Set up Python 3.8
48
+ uses: actions/setup-python@v2
49
+ with:
50
+ python-version: 3.8
51
+ - name: Install dependencies
52
+ run: |
53
+ pip install coverage
54
+ - name: Compile coverage data
55
+ run: |
56
+ mv coverage-*/.coverage* .
57
+ coverage combine
58
+ coverage html
59
+ coverage report
60
+ - name: Upload coverage report
61
+ uses: actions/upload-artifact@v2
62
+ with:
63
+ name: htmlcov
64
+ path: htmlcov
65
+ retention-days: 7
@@ -0,0 +1,80 @@
1
+ Developer notes
2
+ ===============
3
+
4
+ This document is for people who maintain and contribute to this
5
+ repository.
6
+
7
+
8
+ How to run tests
9
+ ----------------
10
+
11
+ This repo uses [tox](https://tox.readthedocs.io/) for unit and
12
+ integration tests. It does not install `tox` for you, you should
13
+ follow [the installation
14
+ instructions](https://tox.readthedocs.io/en/latest/install.html) if
15
+ your local setup does not yet include `tox`.
16
+
17
+ You are encouraged to set up your checkout such
18
+ that the tests run on every commit, and on every push. To do so, run
19
+ the following command after checking out this repository:
20
+
21
+ ```bash
22
+ git config core.hooksPath .githooks
23
+ ```
24
+
25
+ Once your checkout is configured in this manner, every commit will run
26
+ a code style check (with [Flake8](https://flake8.pycqa.org/)), and
27
+ every push to a remote topic branch will result in a full `tox` run.
28
+
29
+ In addition, we use [GitHub
30
+ Actions](https://docs.github.com/en/actions) to run the same checks
31
+ on every push to GitHub.
32
+
33
+ *If you absolutely must,* you can use the `--no-verify` flag to `git
34
+ commit` and `git push` to bypass local checks, and rely on GitHub
35
+ Actions alone. But doing so is strongly discouraged.
36
+
37
+
38
+ How to cut a release
39
+ --------------------
40
+
41
+ This repository uses
42
+ [bump2version](https://pypi.org/project/bump2version/) (the maintained
43
+ fork of [bumpversion](https://github.com/peritus/bumpversion)) for
44
+ managing new releases.
45
+
46
+ Before cutting a new release, open `Changelog.md` and add a new
47
+ section like this:
48
+
49
+ ```markdown
50
+ Unreleased
51
+ ----------
52
+
53
+ * [Bug fix] Description of bug fix
54
+ * [Enhancement] Description of enhancement
55
+ ```
56
+
57
+ Commit these changes on `master` as you normally would.
58
+
59
+ Then, use `tox -e bumpversion` to increase the version number:
60
+
61
+ - `tox -e bumpversion patch`: creates a new point release (such as 3.6.1)
62
+ - `tox -e bumpversion minor`: creates a new minor release, with the patch level set to 0 (such as 3.7.0)
63
+ - `tox -e bumpversion major`: creates a new major release, with the minor and patch levels set to 0 (such as 4.0.0)
64
+
65
+ This creates a new commit, and also a new tag, named `v<num>`, where
66
+ `<num>` is the new version number.
67
+
68
+ Push these two commits (the one for the changelog, and the version
69
+ bump) to `origin`. Make sure you push the `v<num>` tag to `origin` as
70
+ well.
71
+
72
+ Then, build a new `sdist` package, and [upload it to
73
+ PyPI](https://packaging.python.org/tutorials/packaging-projects/#uploading-the-distribution-archives)
74
+ (with [twine](https://packaging.python.org/key_projects/#twine)):
75
+
76
+ ```bash
77
+ rm dist/* -f
78
+ ./setup.py sdist
79
+ twine upload dist/*
80
+ ```
@@ -0,0 +1,88 @@
1
+ Metadata-Version: 2.1
2
+ Name: olx-utils
3
+ Version: 0.4.0
4
+ Summary: Utilities for edX OLX courses
5
+ Home-page: https://github.com/hastexo/olx-utils
6
+ Author: hastexo
7
+ Author-email: pypi@hastexo.com
8
+ License: AGPL-3.0
9
+ Platform: UNKNOWN
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Education
12
+ Classifier: License :: OSI Approved :: GNU Affero General Public License v3
13
+ Classifier: Operating System :: POSIX :: Linux
14
+ Classifier: Programming Language :: Python :: 3.8
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Topic :: Education :: Computer Aided Instruction (CAI)
20
+ Classifier: Topic :: Education
21
+ License-File: LICENSE
22
+
23
+ |PyPI version| |Build Status|
24
+
25
+ OLX Utilities
26
+ =============
27
+
28
+ A set of tools to facilitate courseware development using the `Open
29
+ Learning
30
+ XML <http://edx.readthedocs.io/projects/edx-open-learning-xml/en/latest/>`__
31
+ (OLX) format.
32
+
33
+ OLX is sometimes tediously repetitive, and this package enables
34
+ courseware authors to apply the
35
+ `DRY <https://en.wikipedia.org/wiki/Don%27t_repeat_yourself>`__
36
+ principle when writing OLX content. It allows you to create templates
37
+ (using `Mako <http://www.makotemplates.org/>`__), which in turn enable
38
+ you to
39
+
40
+ - define OLX fragments only once, to reuse them as often as you want
41
+ (this comes in very handy in using the `hastexo
42
+ XBlock <https://github.com/hastexo/hastexo-xblock>`__),
43
+ - write courseware content in
44
+ `Markdown <https://en.wikipedia.org/wiki/Markdown>`__,
45
+ - do anything else you would like to do using your own plugins.
46
+
47
+ Install
48
+ -------
49
+
50
+ Install the ``olx-utils`` package from PyPI:
51
+
52
+ .. code:: bash
53
+
54
+ pip install olx-utils
55
+
56
+ Apply templates to a course
57
+ ---------------------------
58
+
59
+ In order to create a new course run named ``newrun``, starting on May 1,
60
+ 2017 and ending on October 31, 2017, simply change into your courseware
61
+ checkout and run:
62
+
63
+ .. code:: bash
64
+
65
+ olx new-run -b newrun 2019-01-01 2019-12-31
66
+
67
+ The ``-b`` option causes your rendered OLX to be added to a new Git
68
+ branch named ``run/newrun``, which you can then import into your Open
69
+ edX content store.
70
+
71
+ You can also invoke ``olx new-run`` as ``new_run.py``. However, this
72
+ is deprecated and its use is discouraged. ``new_run.py`` will go
73
+ away in a future release.
74
+
75
+ License
76
+ -------
77
+
78
+ This package is licensed under the `GNU Affero
79
+ GPL <https://tldrlegal.com/l/agpl3>`__; see
80
+ `LICENSE <https://www.gnu.org/licenses/agpl-3.0.txt>`__
81
+ for details.
82
+
83
+ .. |PyPI version| image:: https://img.shields.io/pypi/v/olx-utils.svg
84
+ :target: https://pypi.python.org/pypi/olx-utils
85
+ .. |Build Status| image:: https://github.com/hastexo/hastexo-xblock/workflows/Python%20package/badge.svg
86
+ :target: https://github.com/hastexo/hastexo-xblock/actions?query=workflow%3A%22Python+package%22
87
+
88
+
@@ -1,4 +1,4 @@
1
- |PyPI version| |Build Status| |codecov|
1
+ |PyPI version| |Build Status|
2
2
 
3
3
  OLX Utilities
4
4
  =============
@@ -60,7 +60,5 @@ for details.
60
60
 
61
61
  .. |PyPI version| image:: https://img.shields.io/pypi/v/olx-utils.svg
62
62
  :target: https://pypi.python.org/pypi/olx-utils
63
- .. |Build Status| image:: https://travis-ci.org/hastexo/olx-utils.svg?branch=master
64
- :target: https://travis-ci.org/hastexo/olx-utils
65
- .. |codecov| image:: https://codecov.io/gh/hastexo/olx-utils/branch/master/graph/badge.svg
66
- :target: https://codecov.io/gh/hastexo/olx-utils
63
+ .. |Build Status| image:: https://github.com/hastexo/hastexo-xblock/workflows/Python%20package/badge.svg
64
+ :target: https://github.com/hastexo/hastexo-xblock/actions?query=workflow%3A%22Python+package%22
@@ -0,0 +1,88 @@
1
+ Metadata-Version: 2.1
2
+ Name: olx-utils
3
+ Version: 0.4.0
4
+ Summary: Utilities for edX OLX courses
5
+ Home-page: https://github.com/hastexo/olx-utils
6
+ Author: hastexo
7
+ Author-email: pypi@hastexo.com
8
+ License: AGPL-3.0
9
+ Platform: UNKNOWN
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Education
12
+ Classifier: License :: OSI Approved :: GNU Affero General Public License v3
13
+ Classifier: Operating System :: POSIX :: Linux
14
+ Classifier: Programming Language :: Python :: 3.8
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Topic :: Education :: Computer Aided Instruction (CAI)
20
+ Classifier: Topic :: Education
21
+ License-File: LICENSE
22
+
23
+ |PyPI version| |Build Status|
24
+
25
+ OLX Utilities
26
+ =============
27
+
28
+ A set of tools to facilitate courseware development using the `Open
29
+ Learning
30
+ XML <http://edx.readthedocs.io/projects/edx-open-learning-xml/en/latest/>`__
31
+ (OLX) format.
32
+
33
+ OLX is sometimes tediously repetitive, and this package enables
34
+ courseware authors to apply the
35
+ `DRY <https://en.wikipedia.org/wiki/Don%27t_repeat_yourself>`__
36
+ principle when writing OLX content. It allows you to create templates
37
+ (using `Mako <http://www.makotemplates.org/>`__), which in turn enable
38
+ you to
39
+
40
+ - define OLX fragments only once, to reuse them as often as you want
41
+ (this comes in very handy in using the `hastexo
42
+ XBlock <https://github.com/hastexo/hastexo-xblock>`__),
43
+ - write courseware content in
44
+ `Markdown <https://en.wikipedia.org/wiki/Markdown>`__,
45
+ - do anything else you would like to do using your own plugins.
46
+
47
+ Install
48
+ -------
49
+
50
+ Install the ``olx-utils`` package from PyPI:
51
+
52
+ .. code:: bash
53
+
54
+ pip install olx-utils
55
+
56
+ Apply templates to a course
57
+ ---------------------------
58
+
59
+ In order to create a new course run named ``newrun``, starting on May 1,
60
+ 2017 and ending on October 31, 2017, simply change into your courseware
61
+ checkout and run:
62
+
63
+ .. code:: bash
64
+
65
+ olx new-run -b newrun 2019-01-01 2019-12-31
66
+
67
+ The ``-b`` option causes your rendered OLX to be added to a new Git
68
+ branch named ``run/newrun``, which you can then import into your Open
69
+ edX content store.
70
+
71
+ You can also invoke ``olx new-run`` as ``new_run.py``. However, this
72
+ is deprecated and its use is discouraged. ``new_run.py`` will go
73
+ away in a future release.
74
+
75
+ License
76
+ -------
77
+
78
+ This package is licensed under the `GNU Affero
79
+ GPL <https://tldrlegal.com/l/agpl3>`__; see
80
+ `LICENSE <https://www.gnu.org/licenses/agpl-3.0.txt>`__
81
+ for details.
82
+
83
+ .. |PyPI version| image:: https://img.shields.io/pypi/v/olx-utils.svg
84
+ :target: https://pypi.python.org/pypi/olx-utils
85
+ .. |Build Status| image:: https://github.com/hastexo/hastexo-xblock/workflows/Python%20package/badge.svg
86
+ :target: https://github.com/hastexo/hastexo-xblock/actions?query=workflow%3A%22Python+package%22
87
+
88
+
@@ -1,12 +1,16 @@
1
+ .bumpversion.cfg
1
2
  .gitignore
2
3
  .gitlab-ci.yml
3
- .travis.yml
4
+ HACKING.md
4
5
  LICENSE
5
6
  README.rst
6
7
  requirements.txt
7
8
  setup.cfg
8
9
  setup.py
9
10
  tox.ini
11
+ .githooks/pre-commit
12
+ .githooks/pre-push
13
+ .github/workflows/tox.yml
10
14
  olx_utils.egg-info/PKG-INFO
11
15
  olx_utils.egg-info/SOURCES.txt
12
16
  olx_utils.egg-info/dependency_links.txt
@@ -1,8 +1,8 @@
1
- import pkg_resources
1
+ from importlib import metadata
2
2
  # __version__ attribute as suggested by (deferred) PEP 396:
3
3
  # https://www.python.org/dev/peps/pep-0396/
4
4
  #
5
5
  # Single-source package definition as suggested (among several
6
6
  # options) by:
7
7
  # https://packaging.python.org/guides/single-sourcing-package-version/
8
- __version__ = pkg_resources.get_distribution('olx-utils').version
8
+ __version__ = metadata.version('olx-utils')
@@ -42,6 +42,7 @@ class ArchiveHelper(object):
42
42
  'library_content',
43
43
  'markdown',
44
44
  'problem',
45
+ 'split_test',
45
46
  'tabs',
46
47
  'vertical',
47
48
  'video',
@@ -57,9 +57,9 @@ class OLXHelpers(object):
57
57
  swift_path = environ.get('SWIFT_PATH')
58
58
  swift_tempurl_key = environ.get('SWIFT_TEMPURL_KEY')
59
59
 
60
- assert(swift_endpoint)
61
- assert(swift_path)
62
- assert(swift_tempurl_key)
60
+ assert (swift_endpoint)
61
+ assert (swift_path)
62
+ assert (swift_tempurl_key)
63
63
 
64
64
  path = "{}{}".format(swift_path, path)
65
65
  timestamp = int(date.strftime("%s"))
@@ -0,0 +1 @@
1
+ flake8
@@ -32,10 +32,11 @@ setup(
32
32
  'Intended Audience :: Education',
33
33
  'License :: OSI Approved :: GNU Affero General Public License v3',
34
34
  'Operating System :: POSIX :: Linux',
35
- 'Programming Language :: Python :: 2.7',
36
- 'Programming Language :: Python :: 3.5',
37
- 'Programming Language :: Python :: 3.6',
38
- 'Programming Language :: Python :: 3.7',
35
+ 'Programming Language :: Python :: 3.8',
36
+ 'Programming Language :: Python :: 3.9',
37
+ 'Programming Language :: Python :: 3.10',
38
+ 'Programming Language :: Python :: 3.11',
39
+ 'Programming Language :: Python :: 3.12',
39
40
  'Topic :: Education :: Computer Aided Instruction (CAI)',
40
41
  'Topic :: Education',
41
42
  ],
@@ -0,0 +1,20 @@
1
+ <pre><code>This is some
2
+ preformatted
3
+ code.
4
+ </code></pre>
5
+
6
+ <div class="codehilite">
7
+ <pre><span></span><code><span class="k">def</span> <span class="nf">this_is</span><span class="p">(</span><span class="n">some</span><span class="o">=</span><span class="s1">&#39;python&#39;</span><span class="p">):</span>
8
+ <span class="k">pass</span>
9
+ </code></pre>
10
+ </div>
11
+
12
+ <div class="codehilite">
13
+ <pre><span></span><code><span class="ch">#!/bin/bash</span>
14
+
15
+ <span class="nb">echo</span><span class="w"> </span>-n<span class="w"> </span><span class="s2">&quot;Here is&quot;</span>
16
+ cat<span class="w"> </span><span class="s">&lt;&lt;EOF</span>
17
+ <span class="s">some bash</span>
18
+ <span class="s">EOF</span>
19
+ </code></pre>
20
+ </div>
@@ -64,7 +64,9 @@ class GitHelperTestCase(TestCase):
64
64
  self.add_and_commit('Test 1')
65
65
 
66
66
  self.assertFalse(self.helper.branch_exists())
67
- self.assertIn('master', self.repo.branches)
67
+ self.assertTrue(
68
+ ('master' in self.repo.branches) or ('main' in self.repo.branches)
69
+ )
68
70
  self.helper.create_branch()
69
71
  self.assertIn('run/%s' % self.RUN_NAME,
70
72
  self.repo.branches)
@@ -79,7 +81,9 @@ class GitHelperTestCase(TestCase):
79
81
  self.add_and_commit('Test 1')
80
82
 
81
83
  self.assertFalse(self.helper.branch_exists())
82
- self.assertIn('master', self.repo.branches)
84
+ self.assertTrue(
85
+ ('master' in self.repo.branches) or ('main' in self.repo.branches)
86
+ )
83
87
 
84
88
  # Simulate an empty PATH, so a git command fails
85
89
  with patch.dict(os.environ,
@@ -113,11 +117,15 @@ class GitHelperTestCase(TestCase):
113
117
  # Should add all files create since the last commit
114
118
  self.helper.add_to_branch()
115
119
 
116
- # We should now have one commit on the master branch,
120
+ # We should now have one commit on the default branch,
117
121
  # and two on the run/foo branch
118
- master = self.repo.heads.master
122
+ default = None
123
+ try:
124
+ default = self.repo.heads.main
125
+ except AttributeError:
126
+ default = self.repo.heads.master
119
127
  run = self.repo.heads['run/%s' % self.RUN_NAME]
120
- self.assertEqual(len(master.commit.tree), 1)
128
+ self.assertEqual(len(default.commit.tree), 1)
121
129
  self.assertEqual(len(run.commit.tree), 2)
122
130
 
123
131
  # The commit message on the HEAD of the run/foo branch should
@@ -0,0 +1,55 @@
1
+ [tox]
2
+ envlist = py{38,39,310,311,312},flake8
3
+
4
+ [gh-actions]
5
+ python =
6
+ 3.8: py38,flake8
7
+ 3.9: py39,flake8
8
+ 3.10: py310,flake8
9
+ 3.11: py311,flake8
10
+ 3.12: py312,flake8
11
+
12
+ [flake8]
13
+
14
+ [coverage:run]
15
+ parallel = True
16
+ include =
17
+ bin/*
18
+ olxutils/*.py
19
+ tests/*.py
20
+
21
+ [coverage:report]
22
+ precision = 2
23
+
24
+ [testenv]
25
+ commands =
26
+ coverage run -m unittest discover tests {posargs}
27
+ deps =
28
+ -rrequirements/setup.txt
29
+ -rrequirements/test.txt
30
+
31
+ [testenv:flake8]
32
+ skip_install = True
33
+ deps = -rrequirements/flake8.txt
34
+ commands = flake8 {posargs}
35
+
36
+ [testenv:report]
37
+ deps = coverage
38
+ skip_install = true
39
+ commands =
40
+ coverage combine
41
+ coverage report
42
+ coverage html
43
+
44
+ [testenv:bumpversion]
45
+ skip_install = True
46
+ passenv =
47
+ # Git can only find its global configuration if it knows where the
48
+ # user's HOME is.
49
+ HOME
50
+ # We set sign_tags in .bumpversion.cfg, so pass in the GnuPG agent
51
+ # reference to avoid having to retype the passphrase for an
52
+ # already-cached private key.
53
+ GPG_AGENT_INFO
54
+ deps = bump2version
55
+ commands = bump2version {posargs}
@@ -1,27 +0,0 @@
1
- sudo: required
2
-
3
- language: python
4
-
5
- dist: xenial
6
-
7
- python:
8
- - "2.7"
9
- - "3.5"
10
- - "3.6"
11
- - "3.7"
12
- - "3.8"
13
-
14
- before_install:
15
- - pip install codecov
16
-
17
- install:
18
- - pip install tox-travis
19
-
20
- after_success:
21
- - codecov
22
-
23
- script:
24
- - tox
25
-
26
- notifications:
27
- email: true
olx-utils-0.3.3/PKG-INFO DELETED
@@ -1,86 +0,0 @@
1
- Metadata-Version: 1.1
2
- Name: olx-utils
3
- Version: 0.3.3
4
- Summary: Utilities for edX OLX courses
5
- Home-page: https://github.com/hastexo/olx-utils
6
- Author: hastexo
7
- Author-email: pypi@hastexo.com
8
- License: AGPL-3.0
9
- Description: |PyPI version| |Build Status| |codecov|
10
-
11
- OLX Utilities
12
- =============
13
-
14
- A set of tools to facilitate courseware development using the `Open
15
- Learning
16
- XML <http://edx.readthedocs.io/projects/edx-open-learning-xml/en/latest/>`__
17
- (OLX) format.
18
-
19
- OLX is sometimes tediously repetitive, and this package enables
20
- courseware authors to apply the
21
- `DRY <https://en.wikipedia.org/wiki/Don%27t_repeat_yourself>`__
22
- principle when writing OLX content. It allows you to create templates
23
- (using `Mako <http://www.makotemplates.org/>`__), which in turn enable
24
- you to
25
-
26
- - define OLX fragments only once, to reuse them as often as you want
27
- (this comes in very handy in using the `hastexo
28
- XBlock <https://github.com/hastexo/hastexo-xblock>`__),
29
- - write courseware content in
30
- `Markdown <https://en.wikipedia.org/wiki/Markdown>`__,
31
- - do anything else you would like to do using your own plugins.
32
-
33
- Install
34
- -------
35
-
36
- Install the ``olx-utils`` package from PyPI:
37
-
38
- .. code:: bash
39
-
40
- pip install olx-utils
41
-
42
- Apply templates to a course
43
- ---------------------------
44
-
45
- In order to create a new course run named ``newrun``, starting on May 1,
46
- 2017 and ending on October 31, 2017, simply change into your courseware
47
- checkout and run:
48
-
49
- .. code:: bash
50
-
51
- olx new-run -b newrun 2019-01-01 2019-12-31
52
-
53
- The ``-b`` option causes your rendered OLX to be added to a new Git
54
- branch named ``run/newrun``, which you can then import into your Open
55
- edX content store.
56
-
57
- You can also invoke ``olx new-run`` as ``new_run.py``. However, this
58
- is deprecated and its use is discouraged. ``new_run.py`` will go
59
- away in a future release.
60
-
61
- License
62
- -------
63
-
64
- This package is licensed under the `GNU Affero
65
- GPL <https://tldrlegal.com/l/agpl3>`__; see
66
- `LICENSE <https://www.gnu.org/licenses/agpl-3.0.txt>`__
67
- for details.
68
-
69
- .. |PyPI version| image:: https://img.shields.io/pypi/v/olx-utils.svg
70
- :target: https://pypi.python.org/pypi/olx-utils
71
- .. |Build Status| image:: https://travis-ci.org/hastexo/olx-utils.svg?branch=master
72
- :target: https://travis-ci.org/hastexo/olx-utils
73
- .. |codecov| image:: https://codecov.io/gh/hastexo/olx-utils/branch/master/graph/badge.svg
74
- :target: https://codecov.io/gh/hastexo/olx-utils
75
-
76
- Platform: UNKNOWN
77
- Classifier: Development Status :: 3 - Alpha
78
- Classifier: Intended Audience :: Education
79
- Classifier: License :: OSI Approved :: GNU Affero General Public License v3
80
- Classifier: Operating System :: POSIX :: Linux
81
- Classifier: Programming Language :: Python :: 2.7
82
- Classifier: Programming Language :: Python :: 3.5
83
- Classifier: Programming Language :: Python :: 3.6
84
- Classifier: Programming Language :: Python :: 3.7
85
- Classifier: Topic :: Education :: Computer Aided Instruction (CAI)
86
- Classifier: Topic :: Education