olx-utils 0.3.4__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 (143) hide show
  1. {olx-utils-0.3.4 → olx-utils-0.4.0}/.bumpversion.cfg +1 -1
  2. {olx-utils-0.3.4 → olx-utils-0.4.0}/.github/workflows/tox.yml +3 -3
  3. olx-utils-0.4.0/PKG-INFO +88 -0
  4. olx-utils-0.4.0/olx_utils.egg-info/PKG-INFO +88 -0
  5. {olx-utils-0.3.4 → olx-utils-0.4.0}/olxutils/__init__.py +2 -2
  6. {olx-utils-0.3.4 → olx-utils-0.4.0}/olxutils/helpers.py +3 -3
  7. {olx-utils-0.3.4 → olx-utils-0.4.0}/setup.py +4 -4
  8. olx-utils-0.4.0/tests/fenced-code-blocks.html +20 -0
  9. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/test_git.py +13 -5
  10. {olx-utils-0.3.4 → olx-utils-0.4.0}/tox.ini +3 -1
  11. olx-utils-0.3.4/PKG-INFO +0 -85
  12. olx-utils-0.3.4/olx_utils.egg-info/PKG-INFO +0 -85
  13. olx-utils-0.3.4/tests/fenced-code-blocks.html +0 -16
  14. {olx-utils-0.3.4 → olx-utils-0.4.0}/.githooks/pre-commit +0 -0
  15. {olx-utils-0.3.4 → olx-utils-0.4.0}/.githooks/pre-push +0 -0
  16. {olx-utils-0.3.4 → olx-utils-0.4.0}/.gitignore +0 -0
  17. {olx-utils-0.3.4 → olx-utils-0.4.0}/.gitlab-ci.yml +0 -0
  18. {olx-utils-0.3.4 → olx-utils-0.4.0}/HACKING.md +0 -0
  19. {olx-utils-0.3.4 → olx-utils-0.4.0}/LICENSE +0 -0
  20. {olx-utils-0.3.4 → olx-utils-0.4.0}/README.rst +0 -0
  21. {olx-utils-0.3.4 → olx-utils-0.4.0}/olx_utils.egg-info/SOURCES.txt +0 -0
  22. {olx-utils-0.3.4 → olx-utils-0.4.0}/olx_utils.egg-info/dependency_links.txt +0 -0
  23. {olx-utils-0.3.4 → olx-utils-0.4.0}/olx_utils.egg-info/entry_points.txt +0 -0
  24. {olx-utils-0.3.4 → olx-utils-0.4.0}/olx_utils.egg-info/requires.txt +0 -0
  25. {olx-utils-0.3.4 → olx-utils-0.4.0}/olx_utils.egg-info/top_level.txt +0 -0
  26. {olx-utils-0.3.4 → olx-utils-0.4.0}/olxutils/__main__.py +0 -0
  27. {olx-utils-0.3.4 → olx-utils-0.4.0}/olxutils/archive.py +0 -0
  28. {olx-utils-0.3.4 → olx-utils-0.4.0}/olxutils/cli.py +0 -0
  29. {olx-utils-0.3.4 → olx-utils-0.4.0}/olxutils/git.py +0 -0
  30. {olx-utils-0.3.4 → olx-utils-0.4.0}/olxutils/templates/olx_partials.xml +0 -0
  31. {olx-utils-0.3.4 → olx-utils-0.4.0}/olxutils/templates.py +0 -0
  32. {olx-utils-0.3.4 → olx-utils-0.4.0}/olxutils/token.py +0 -0
  33. {olx-utils-0.3.4 → olx-utils-0.4.0}/olxutils/upload.py +0 -0
  34. {olx-utils-0.3.4 → olx-utils-0.4.0}/requirements/base.txt +0 -0
  35. {olx-utils-0.3.4 → olx-utils-0.4.0}/requirements/flake8.txt +0 -0
  36. {olx-utils-0.3.4 → olx-utils-0.4.0}/requirements/setup.txt +0 -0
  37. {olx-utils-0.3.4 → olx-utils-0.4.0}/requirements/test.txt +0 -0
  38. {olx-utils-0.3.4 → olx-utils-0.4.0}/requirements.txt +0 -0
  39. {olx-utils-0.3.4 → olx-utils-0.4.0}/setup.cfg +0 -0
  40. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/__init__.py +0 -0
  41. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/README.md +0 -0
  42. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/about/overview.html +0 -0
  43. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/chapter/conclusion.xml +0 -0
  44. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/chapter/introduction.xml +0 -0
  45. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/course.xml +0 -0
  46. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/html/README.md +0 -0
  47. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/html/introduction_unit_01.html +0 -0
  48. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/html/introduction_unit_02.html +0 -0
  49. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/html/introduction_unit_03.html +0 -0
  50. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/include/course.xml +0 -0
  51. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/include/html/content.html +0 -0
  52. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/include/html/lab.html +0 -0
  53. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/include/sequential/content.xml +0 -0
  54. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/include/sequential/lab.xml +0 -0
  55. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/info/handouts.html +0 -0
  56. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/info/updates.html +0 -0
  57. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/markdown/README.md +0 -0
  58. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/markdown/introduction_unit_01.md +0 -0
  59. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/markdown/introduction_unit_02.md +0 -0
  60. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/markdown/introduction_unit_03.md +0 -0
  61. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/policies/_base/grading_policy.json +0 -0
  62. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/policies/_base/policy.json +0 -0
  63. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/policies/assets.json +0 -0
  64. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/sequential/README.md +0 -0
  65. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/sequential/introduction.xml +0 -0
  66. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/static/hot/README.md +0 -0
  67. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/static/images/README.md +0 -0
  68. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/static/markdown/README.md +0 -0
  69. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/static/markdown/introduction_unit_01.md +0 -0
  70. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/static/markdown/introduction_unit_02.md +0 -0
  71. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/static/markdown/introduction_unit_03.md +0 -0
  72. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/static/presentation/css/reveal-override.css +0 -0
  73. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/static/presentation/css/reveal-override.css.map +0 -0
  74. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/static/presentation/css/reveal-override.scss +0 -0
  75. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/static/presentation/css/reveal.css +0 -0
  76. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/static/presentation/css/white.css +0 -0
  77. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/static/presentation/css/zenburn.css +0 -0
  78. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/static/presentation/index.html +0 -0
  79. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/static/presentation/js/classList.js +0 -0
  80. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/static/presentation/js/head.min.js +0 -0
  81. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/static/presentation/js/highlight.js +0 -0
  82. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/static/presentation/js/markdown.js +0 -0
  83. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/static/presentation/js/marked.js +0 -0
  84. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/static/presentation/js/notes.html +0 -0
  85. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/static/presentation/js/notes.js +0 -0
  86. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/static/presentation/js/reveal.js +0 -0
  87. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/result/static/presentation/js/zoom.js +0 -0
  88. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/README.md +0 -0
  89. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/about/overview.html +0 -0
  90. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/chapter/conclusion.xml +0 -0
  91. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/chapter/introduction.xml +0 -0
  92. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/course.xml +0 -0
  93. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/html/README.md +0 -0
  94. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/html/introduction_unit_01.html +0 -0
  95. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/html/introduction_unit_02.html +0 -0
  96. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/html/introduction_unit_03.html +0 -0
  97. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/include/course.xml +0 -0
  98. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/include/html/content.html +0 -0
  99. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/include/html/lab.html +0 -0
  100. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/include/sequential/content.xml +0 -0
  101. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/include/sequential/lab.xml +0 -0
  102. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/info/handouts.html +0 -0
  103. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/info/updates.html +0 -0
  104. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/markdown/README.md +0 -0
  105. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/markdown/introduction_unit_01.md +0 -0
  106. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/markdown/introduction_unit_02.md +0 -0
  107. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/markdown/introduction_unit_03.md +0 -0
  108. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/policies/_base/grading_policy.json +0 -0
  109. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/policies/_base/policy.json +0 -0
  110. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/policies/assets.json +0 -0
  111. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/sequential/README.md +0 -0
  112. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/sequential/introduction.xml +0 -0
  113. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/static/hot/README.md +0 -0
  114. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/static/images/README.md +0 -0
  115. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/static/markdown/README.md +0 -0
  116. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/static/markdown/introduction_unit_01.md +0 -0
  117. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/static/markdown/introduction_unit_02.md +0 -0
  118. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/static/markdown/introduction_unit_03.md +0 -0
  119. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/static/presentation/css/reveal-override.css +0 -0
  120. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/static/presentation/css/reveal-override.css.map +0 -0
  121. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/static/presentation/css/reveal-override.scss +0 -0
  122. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/static/presentation/css/reveal.css +0 -0
  123. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/static/presentation/css/white.css +0 -0
  124. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/static/presentation/css/zenburn.css +0 -0
  125. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/static/presentation/index.html +0 -0
  126. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/static/presentation/js/classList.js +0 -0
  127. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/static/presentation/js/head.min.js +0 -0
  128. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/static/presentation/js/highlight.js +0 -0
  129. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/static/presentation/js/markdown.js +0 -0
  130. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/static/presentation/js/marked.js +0 -0
  131. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/static/presentation/js/notes.html +0 -0
  132. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/static/presentation/js/notes.js +0 -0
  133. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/static/presentation/js/reveal.js +0 -0
  134. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/course/source/static/presentation/js/zoom.js +0 -0
  135. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/fenced-code-blocks.md +0 -0
  136. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/footnotes.html +0 -0
  137. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/footnotes.md +0 -0
  138. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/tasks.py +0 -0
  139. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/test_cli.py +0 -0
  140. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/test_full_course.py +0 -0
  141. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/test_helpers.py +0 -0
  142. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/test_token.py +0 -0
  143. {olx-utils-0.3.4 → olx-utils-0.4.0}/tests/test_upload.py +0 -0
@@ -1,7 +1,7 @@
1
1
  [bumpversion]
2
2
  commit = True
3
3
  tag = True
4
- current_version = 0.3.4
4
+ current_version = 0.4.0
5
5
  parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(rc(?P<rc>\d+))?
6
6
  serialize =
7
7
  {major}.{minor}.{patch}rc{rc}
@@ -13,6 +13,8 @@ jobs:
13
13
  - '3.8'
14
14
  - '3.9'
15
15
  - '3.10'
16
+ - '3.11'
17
+ - '3.12'
16
18
 
17
19
  steps:
18
20
  - name: Check out code
@@ -23,10 +25,8 @@ jobs:
23
25
  python-version: ${{ matrix.python-version }}
24
26
  - name: Install dependencies
25
27
  run: |
26
- pip install tox tox-gh-actions tox-pip-version 'setuptools_scm<6'
28
+ pip install tox tox-gh-actions setuptools_scm
27
29
  - name: Test with tox
28
- env:
29
- TOX_PIP_VERSION: '20.2.4'
30
30
  run: tox
31
31
  - name: Upload coverage data
32
32
  uses: actions/upload-artifact@v2
@@ -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
+
@@ -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,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')
@@ -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"))
@@ -32,11 +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',
39
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',
40
40
  'Topic :: Education :: Computer Aided Instruction (CAI)',
41
41
  'Topic :: Education',
42
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
@@ -1,11 +1,13 @@
1
1
  [tox]
2
- envlist = py{38,39},flake8
2
+ envlist = py{38,39,310,311,312},flake8
3
3
 
4
4
  [gh-actions]
5
5
  python =
6
6
  3.8: py38,flake8
7
7
  3.9: py39,flake8
8
8
  3.10: py310,flake8
9
+ 3.11: py311,flake8
10
+ 3.12: py312,flake8
9
11
 
10
12
  [flake8]
11
13
 
olx-utils-0.3.4/PKG-INFO DELETED
@@ -1,85 +0,0 @@
1
- Metadata-Version: 1.1
2
- Name: olx-utils
3
- Version: 0.3.4
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|
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://github.com/hastexo/hastexo-xblock/workflows/Python%20package/badge.svg
72
- :target: https://github.com/hastexo/hastexo-xblock/actions?query=workflow%3A%22Python+package%22
73
-
74
- Platform: UNKNOWN
75
- Classifier: Development Status :: 3 - Alpha
76
- Classifier: Intended Audience :: Education
77
- Classifier: License :: OSI Approved :: GNU Affero General Public License v3
78
- Classifier: Operating System :: POSIX :: Linux
79
- Classifier: Programming Language :: Python :: 2.7
80
- Classifier: Programming Language :: Python :: 3.5
81
- Classifier: Programming Language :: Python :: 3.6
82
- Classifier: Programming Language :: Python :: 3.7
83
- Classifier: Programming Language :: Python :: 3.8
84
- Classifier: Topic :: Education :: Computer Aided Instruction (CAI)
85
- Classifier: Topic :: Education
@@ -1,85 +0,0 @@
1
- Metadata-Version: 1.1
2
- Name: olx-utils
3
- Version: 0.3.4
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|
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://github.com/hastexo/hastexo-xblock/workflows/Python%20package/badge.svg
72
- :target: https://github.com/hastexo/hastexo-xblock/actions?query=workflow%3A%22Python+package%22
73
-
74
- Platform: UNKNOWN
75
- Classifier: Development Status :: 3 - Alpha
76
- Classifier: Intended Audience :: Education
77
- Classifier: License :: OSI Approved :: GNU Affero General Public License v3
78
- Classifier: Operating System :: POSIX :: Linux
79
- Classifier: Programming Language :: Python :: 2.7
80
- Classifier: Programming Language :: Python :: 3.5
81
- Classifier: Programming Language :: Python :: 3.6
82
- Classifier: Programming Language :: Python :: 3.7
83
- Classifier: Programming Language :: Python :: 3.8
84
- Classifier: Topic :: Education :: Computer Aided Instruction (CAI)
85
- Classifier: Topic :: Education
@@ -1,16 +0,0 @@
1
- <pre><code>This is some
2
- preformatted
3
- code.
4
- </code></pre>
5
-
6
- <div class="codehilite"><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>
7
- <span class="k">pass</span>
8
- </code></pre></div>
9
-
10
- <div class="codehilite"><pre><span></span><code><span class="ch">#!/bin/bash</span>
11
-
12
- <span class="nb">echo</span> -n <span class="s2">&quot;Here is&quot;</span>
13
- cat <span class="s">&lt;&lt;EOF</span>
14
- <span class="s">some bash</span>
15
- <span class="s">EOF</span>
16
- </code></pre></div>
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes