PyKubeGrader 0.0.8__tar.gz → 0.0.9__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. {pykubegrader-0.0.8 → pykubegrader-0.0.9}/.github/workflows/main.yml +3 -1
  2. {pykubegrader-0.0.8 → pykubegrader-0.0.9}/.gitignore +3 -0
  3. {pykubegrader-0.0.8 → pykubegrader-0.0.9}/.readthedocs.yml +1 -1
  4. {pykubegrader-0.0.8/src/PyKubeGrader.egg-info → pykubegrader-0.0.9}/PKG-INFO +13 -6
  5. {pykubegrader-0.0.8 → pykubegrader-0.0.9}/docs/conf.py +3 -5
  6. {pykubegrader-0.0.8 → pykubegrader-0.0.9}/setup.cfg +12 -5
  7. {pykubegrader-0.0.8 → pykubegrader-0.0.9}/setup.py +5 -5
  8. {pykubegrader-0.0.8 → pykubegrader-0.0.9/src/PyKubeGrader.egg-info}/PKG-INFO +13 -6
  9. {pykubegrader-0.0.8 → pykubegrader-0.0.9}/src/PyKubeGrader.egg-info/SOURCES.txt +1 -5
  10. pykubegrader-0.0.9/src/PyKubeGrader.egg-info/requires.txt +20 -0
  11. pykubegrader-0.0.9/src/pykubegrader/__init__.py +10 -0
  12. pykubegrader-0.0.9/src/pykubegrader/initialize.py +18 -0
  13. {pykubegrader-0.0.8 → pykubegrader-0.0.9}/src/pykubegrader/select_base.py +4 -1
  14. pykubegrader-0.0.9/tests/conftest.py +10 -0
  15. pykubegrader-0.0.8/README.md +0 -3
  16. pykubegrader-0.0.8/docs/_static/.gitignore +0 -1
  17. pykubegrader-0.0.8/src/PyKubeGrader.egg-info/requires.txt +0 -13
  18. pykubegrader-0.0.8/src/pykubegrader/__init__.py +0 -16
  19. pykubegrader-0.0.8/src/pykubegrader/seed/__init__.py +0 -5
  20. pykubegrader-0.0.8/src/pykubegrader/seed/hash_seed.py +0 -25
  21. pykubegrader-0.0.8/tests/conftest.py +0 -10
  22. pykubegrader-0.0.8/uv.lock +0 -979
  23. {pykubegrader-0.0.8 → pykubegrader-0.0.9}/.coveragerc +0 -0
  24. {pykubegrader-0.0.8 → pykubegrader-0.0.9}/AUTHORS.rst +0 -0
  25. {pykubegrader-0.0.8 → pykubegrader-0.0.9}/CHANGELOG.rst +0 -0
  26. {pykubegrader-0.0.8 → pykubegrader-0.0.9}/CONTRIBUTING.rst +0 -0
  27. {pykubegrader-0.0.8 → pykubegrader-0.0.9}/LICENSE.txt +0 -0
  28. {pykubegrader-0.0.8 → pykubegrader-0.0.9}/README.rst +0 -0
  29. {pykubegrader-0.0.8 → pykubegrader-0.0.9}/docs/Makefile +0 -0
  30. {pykubegrader-0.0.8 → pykubegrader-0.0.9}/docs/_static/Drexel_blue_Logo_square_Dark.png +0 -0
  31. {pykubegrader-0.0.8 → pykubegrader-0.0.9}/docs/_static/Drexel_blue_Logo_square_Light.png +0 -0
  32. {pykubegrader-0.0.8 → pykubegrader-0.0.9}/docs/_static/custom.css +0 -0
  33. {pykubegrader-0.0.8 → pykubegrader-0.0.9}/docs/authors.rst +0 -0
  34. {pykubegrader-0.0.8 → pykubegrader-0.0.9}/docs/changelog.rst +0 -0
  35. {pykubegrader-0.0.8 → pykubegrader-0.0.9}/docs/contributing.rst +0 -0
  36. {pykubegrader-0.0.8 → pykubegrader-0.0.9}/docs/index.rst +0 -0
  37. {pykubegrader-0.0.8 → pykubegrader-0.0.9}/docs/license.rst +0 -0
  38. {pykubegrader-0.0.8 → pykubegrader-0.0.9}/docs/readme.rst +0 -0
  39. {pykubegrader-0.0.8 → pykubegrader-0.0.9}/docs/requirements.txt +0 -0
  40. {pykubegrader-0.0.8 → pykubegrader-0.0.9}/pyproject.toml +0 -0
  41. {pykubegrader-0.0.8 → pykubegrader-0.0.9}/src/PyKubeGrader.egg-info/dependency_links.txt +0 -0
  42. {pykubegrader-0.0.8 → pykubegrader-0.0.9}/src/PyKubeGrader.egg-info/not-zip-safe +0 -0
  43. {pykubegrader-0.0.8 → pykubegrader-0.0.9}/src/PyKubeGrader.egg-info/top_level.txt +0 -0
  44. {pykubegrader-0.0.8 → pykubegrader-0.0.9}/src/pykubegrader/info_widget.py +0 -0
  45. {pykubegrader-0.0.8 → pykubegrader-0.0.9}/src/pykubegrader/mc_widget.py +0 -0
  46. {pykubegrader-0.0.8 → pykubegrader-0.0.9}/src/pykubegrader/misc.py +0 -0
  47. {pykubegrader-0.0.8 → pykubegrader-0.0.9}/src/pykubegrader/multi_select_base.py +0 -0
  48. {pykubegrader-0.0.8 → pykubegrader-0.0.9}/src/pykubegrader/reading_base.py +0 -0
  49. {pykubegrader-0.0.8 → pykubegrader-0.0.9}/src/pykubegrader/reading_widget.py +0 -0
  50. {pykubegrader-0.0.8 → pykubegrader-0.0.9}/src/pykubegrader/select_many_widget.py +0 -0
  51. {pykubegrader-0.0.8 → pykubegrader-0.0.9}/src/pykubegrader/telemetry.py +0 -0
  52. {pykubegrader-0.0.8 → pykubegrader-0.0.9}/src/pykubegrader/types_widget.py +0 -0
  53. {pykubegrader-0.0.8 → pykubegrader-0.0.9}/src/pykubegrader/validate.py +0 -0
  54. {pykubegrader-0.0.8 → pykubegrader-0.0.9}/tests/import_test.py +0 -0
  55. {pykubegrader-0.0.8 → pykubegrader-0.0.9}/tox.ini +0 -0
@@ -49,7 +49,7 @@ jobs:
49
49
 
50
50
  - name: Publish to PyPI
51
51
  if: |
52
- contains(github.event.head_commit.message, '#patch') ||
52
+ contains(github.event.head_commit.message, '#patch') ||
53
53
  contains(github.event.head_commit.message, '#minor') ||
54
54
  contains(github.event.head_commit.message, '#major')
55
55
  env:
@@ -60,6 +60,8 @@ jobs:
60
60
  twine upload dist/*
61
61
 
62
62
  - name: Deploy to GitHub Pages
63
+ env:
64
+ HOME: "${{ github.workspace }}/../" # Because self-hosted runner is root
63
65
  uses: peaceiris/actions-gh-pages@v3
64
66
  with:
65
67
  github_token: ${{ secrets.GH_TOKEN }}
@@ -52,3 +52,6 @@ MANIFEST
52
52
  .venv*/
53
53
  .conda*/
54
54
  .python-version
55
+
56
+ .mypy_cache/
57
+ .ruff_cache/
@@ -24,4 +24,4 @@ build:
24
24
  python:
25
25
  install:
26
26
  - requirements: docs/requirements.txt
27
- - {path: ., method: pip}
27
+ - { path: ., method: pip }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PyKubeGrader
3
- Version: 0.0.8
3
+ Version: 0.0.9
4
4
  Summary: Add a short description here!
5
5
  Home-page: https://github.com/pyscaffold/pyscaffold/
6
6
  Author: jagar2
@@ -13,11 +13,18 @@ Classifier: Programming Language :: Python
13
13
  Description-Content-Type: text/x-rst; charset=UTF-8
14
14
  License-File: LICENSE.txt
15
15
  Requires-Dist: importlib-metadata; python_version < "3.8"
16
- Requires-Dist: ipython>=8.30.0
17
- Requires-Dist: numpy>=2.1.3
18
- Requires-Dist: panel>=1.5.4
19
- Requires-Dist: pynacl>=1.5.0
20
- Requires-Dist: requests>=2.32.3
16
+ Requires-Dist: ipython
17
+ Requires-Dist: mypy
18
+ Requires-Dist: numpy
19
+ Requires-Dist: panel
20
+ Requires-Dist: pynacl
21
+ Requires-Dist: pytest
22
+ Requires-Dist: requests
23
+ Requires-Dist: ruff
24
+ Requires-Dist: setuptools
25
+ Requires-Dist: sphinx
26
+ Requires-Dist: types-requests
27
+ Requires-Dist: types-setuptools
21
28
  Provides-Extra: testing
22
29
  Requires-Dist: setuptools; extra == "testing"
23
30
  Requires-Dist: pytest; extra == "testing"
@@ -28,10 +28,8 @@ sys.path.insert(0, os.path.join(__location__, "../src"))
28
28
  # setup.py install" in the RTD Advanced Settings.
29
29
  # Additionally it helps us to avoid running apidoc manually
30
30
 
31
- try: # for Sphinx >= 1.7
32
- from sphinx.ext import apidoc
33
- except ImportError:
34
- from sphinx import apidoc
31
+
32
+ from sphinx.ext import apidoc
35
33
 
36
34
  output_dir = os.path.join(__location__, "api")
37
35
  module_dir = os.path.join(__location__, "../src/pykubegrader")
@@ -252,7 +250,7 @@ htmlhelp_basename = "PyKubeGrader-doc"
252
250
 
253
251
  # -- Options for LaTeX output ------------------------------------------------
254
252
 
255
- latex_elements = {
253
+ latex_elements: dict[str, str] = {
256
254
  # The paper size ("letterpaper" or "a4paper").
257
255
  # "papersize": "letterpaper",
258
256
  # The font size ("10pt", "11pt" or "12pt").
@@ -23,11 +23,18 @@ package_dir =
23
23
  =src
24
24
  install_requires =
25
25
  importlib-metadata; python_version<"3.8"
26
- ipython>=8.30.0
27
- numpy>=2.1.3
28
- panel>=1.5.4
29
- pynacl>=1.5.0
30
- requests>=2.32.3
26
+ ipython
27
+ mypy
28
+ numpy
29
+ panel
30
+ pynacl
31
+ pytest
32
+ requests
33
+ ruff
34
+ setuptools
35
+ sphinx
36
+ types-requests
37
+ types-setuptools
31
38
 
32
39
  [options.packages.find]
33
40
  where = src
@@ -1,10 +1,10 @@
1
1
  """
2
- Setup file for PyKubeGrader.
3
- Use setup.cfg to configure your project.
2
+ Setup file for PyKubeGrader.
3
+ Use setup.cfg to configure your project.
4
4
 
5
- This file was generated with PyScaffold 4.6.
6
- PyScaffold helps you to put up the scaffold of your new Python project.
7
- Learn more under: https://pyscaffold.org/
5
+ This file was generated with PyScaffold 4.6.
6
+ PyScaffold helps you to put up the scaffold of your new Python project.
7
+ Learn more under: https://pyscaffold.org/
8
8
  """
9
9
 
10
10
  from setuptools import setup
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PyKubeGrader
3
- Version: 0.0.8
3
+ Version: 0.0.9
4
4
  Summary: Add a short description here!
5
5
  Home-page: https://github.com/pyscaffold/pyscaffold/
6
6
  Author: jagar2
@@ -13,11 +13,18 @@ Classifier: Programming Language :: Python
13
13
  Description-Content-Type: text/x-rst; charset=UTF-8
14
14
  License-File: LICENSE.txt
15
15
  Requires-Dist: importlib-metadata; python_version < "3.8"
16
- Requires-Dist: ipython>=8.30.0
17
- Requires-Dist: numpy>=2.1.3
18
- Requires-Dist: panel>=1.5.4
19
- Requires-Dist: pynacl>=1.5.0
20
- Requires-Dist: requests>=2.32.3
16
+ Requires-Dist: ipython
17
+ Requires-Dist: mypy
18
+ Requires-Dist: numpy
19
+ Requires-Dist: panel
20
+ Requires-Dist: pynacl
21
+ Requires-Dist: pytest
22
+ Requires-Dist: requests
23
+ Requires-Dist: ruff
24
+ Requires-Dist: setuptools
25
+ Requires-Dist: sphinx
26
+ Requires-Dist: types-requests
27
+ Requires-Dist: types-setuptools
21
28
  Provides-Extra: testing
22
29
  Requires-Dist: setuptools; extra == "testing"
23
30
  Requires-Dist: pytest; extra == "testing"
@@ -5,13 +5,11 @@ AUTHORS.rst
5
5
  CHANGELOG.rst
6
6
  CONTRIBUTING.rst
7
7
  LICENSE.txt
8
- README.md
9
8
  README.rst
10
9
  pyproject.toml
11
10
  setup.cfg
12
11
  setup.py
13
12
  tox.ini
14
- uv.lock
15
13
  .github/workflows/main.yml
16
14
  docs/Makefile
17
15
  docs/authors.rst
@@ -22,7 +20,6 @@ docs/index.rst
22
20
  docs/license.rst
23
21
  docs/readme.rst
24
22
  docs/requirements.txt
25
- docs/_static/.gitignore
26
23
  docs/_static/Drexel_blue_Logo_square_Dark.png
27
24
  docs/_static/Drexel_blue_Logo_square_Light.png
28
25
  docs/_static/custom.css
@@ -34,6 +31,7 @@ src/PyKubeGrader.egg-info/requires.txt
34
31
  src/PyKubeGrader.egg-info/top_level.txt
35
32
  src/pykubegrader/__init__.py
36
33
  src/pykubegrader/info_widget.py
34
+ src/pykubegrader/initialize.py
37
35
  src/pykubegrader/mc_widget.py
38
36
  src/pykubegrader/misc.py
39
37
  src/pykubegrader/multi_select_base.py
@@ -44,7 +42,5 @@ src/pykubegrader/select_many_widget.py
44
42
  src/pykubegrader/telemetry.py
45
43
  src/pykubegrader/types_widget.py
46
44
  src/pykubegrader/validate.py
47
- src/pykubegrader/seed/__init__.py
48
- src/pykubegrader/seed/hash_seed.py
49
45
  tests/conftest.py
50
46
  tests/import_test.py
@@ -0,0 +1,20 @@
1
+ ipython
2
+ mypy
3
+ numpy
4
+ panel
5
+ pynacl
6
+ pytest
7
+ requests
8
+ ruff
9
+ setuptools
10
+ sphinx
11
+ types-requests
12
+ types-setuptools
13
+
14
+ [:python_version < "3.8"]
15
+ importlib-metadata
16
+
17
+ [testing]
18
+ setuptools
19
+ pytest
20
+ pytest-cov
@@ -0,0 +1,10 @@
1
+ from importlib.metadata import PackageNotFoundError, version # pragma: no cover
2
+
3
+ try:
4
+ # Change here if project is renamed and does not equal the package name
5
+ dist_name = "PyKubeGrader"
6
+ __version__ = version(dist_name)
7
+ except PackageNotFoundError: # pragma: no cover
8
+ __version__ = "unknown"
9
+ finally:
10
+ del version, PackageNotFoundError
@@ -0,0 +1,18 @@
1
+ import panel as pn
2
+ from IPython import get_ipython
3
+
4
+ from .telemetry import telemetry
5
+
6
+ # Check if in a Jupyter environment
7
+ ipython = get_ipython()
8
+
9
+ if ipython is not None:
10
+ # Initialize Panel extension
11
+ pn.extension()
12
+
13
+ # Register telemetry with pre_run_cell event
14
+ ipython.events.register("pre_run_cell", telemetry)
15
+
16
+ print("Setup completed successfully")
17
+ else:
18
+ print("Setup unsuccessful. Are you in a Jupyter environment?")
@@ -49,7 +49,10 @@ class SelectQuestion:
49
49
 
50
50
  self.layout = pn.Column(
51
51
  f"# Question {self.question_number}: {title}",
52
- *(pn.Column(desc_widget, pn.Row(dropdown)) for desc_widget, dropdown in widget_pairs),
52
+ *(
53
+ pn.Column(desc_widget, pn.Row(dropdown))
54
+ for desc_widget, dropdown in widget_pairs
55
+ ),
53
56
  self.submit_button,
54
57
  )
55
58
 
@@ -0,0 +1,10 @@
1
+ """
2
+ Dummy conftest.py for pykubegrader.
3
+
4
+ If you don't know what this is for, just leave it empty.
5
+ Read more about conftest.py under:
6
+ - https://docs.pytest.org/en/stable/fixture.html
7
+ - https://docs.pytest.org/en/stable/writing_plugins.html
8
+ """
9
+
10
+ import pytest # noqa: F401
@@ -1,3 +0,0 @@
1
- # pygrader-utils
2
-
3
- To be documented…
@@ -1 +0,0 @@
1
- # Empty directory
@@ -1,13 +0,0 @@
1
- ipython>=8.30.0
2
- numpy>=2.1.3
3
- panel>=1.5.4
4
- pynacl>=1.5.0
5
- requests>=2.32.3
6
-
7
- [:python_version < "3.8"]
8
- importlib-metadata
9
-
10
- [testing]
11
- setuptools
12
- pytest
13
- pytest-cov
@@ -1,16 +0,0 @@
1
- import sys
2
-
3
- if sys.version_info[:2] >= (3, 8):
4
- # TODO: Import directly (no need for conditional) when `python_requires = >= 3.8`
5
- from importlib.metadata import PackageNotFoundError, version # pragma: no cover
6
- else:
7
- from importlib_metadata import PackageNotFoundError, version # pragma: no cover
8
-
9
- try:
10
- # Change here if project is renamed and does not equal the package name
11
- dist_name = "PyKubeGrader"
12
- __version__ = version(dist_name)
13
- except PackageNotFoundError: # pragma: no cover
14
- __version__ = "unknown"
15
- finally:
16
- del version, PackageNotFoundError
@@ -1,5 +0,0 @@
1
- # Auto-generated __init__.py
2
-
3
- from . import hash_seed
4
-
5
- __all__ = ['hash_seed']
@@ -1,25 +0,0 @@
1
- import hashlib
2
-
3
- def hash_to_seed(input_string):
4
- """
5
- Hash a string into a small integer seed less than 500.
6
-
7
- Parameters:
8
- input_string (str): The string to hash.
9
-
10
- Returns:
11
- int: A seed value (0 <= seed < 500).
12
- """
13
- # Ensure the input is a string
14
- input_string = str(input_string)
15
-
16
- # Create a SHA-256 hash of the string
17
- hash_object = hashlib.sha256(input_string.encode())
18
-
19
- # Convert the hash to an integer
20
- large_number = int.from_bytes(hash_object.digest(), 'big')
21
-
22
- # Reduce the number to a value less than 500
23
- small_seed = large_number % 500
24
-
25
- return small_seed
@@ -1,10 +0,0 @@
1
- """
2
- Dummy conftest.py for pykubegrader.
3
-
4
- If you don't know what this is for, just leave it empty.
5
- Read more about conftest.py under:
6
- - https://docs.pytest.org/en/stable/fixture.html
7
- - https://docs.pytest.org/en/stable/writing_plugins.html
8
- """
9
-
10
- import pytest