Compare commits
8 Commits
dsheraz/fi
...
release
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
be36969dce | ||
|
|
25fa14e030 | ||
|
|
8b682f0902 | ||
|
|
a539ca2693 | ||
|
|
cfee151f6b | ||
|
|
78b29f1ec6 | ||
|
|
7b4af1f15c | ||
|
|
c2ba1b57fd |
@ -18,5 +18,5 @@ def load_about() -> dict[str, str]:
|
||||
with open(
|
||||
os.path.join(HERE, "tutorandroid", "__about__.py"), "rt", encoding="utf-8"
|
||||
) as f:
|
||||
exec(f.read(), about) # pylint: disable=exec-used
|
||||
exec(f.read(), about)
|
||||
return about
|
||||
|
||||
10
CHANGELOG.md
10
CHANGELOG.md
@ -19,6 +19,16 @@ instructions, because git commits are used to generate release notes:
|
||||
|
||||
<!-- scriv-insert-here -->
|
||||
|
||||
<a id='changelog-20.0.0'></a>
|
||||
## v20.0.0 (2025-06-10)
|
||||
|
||||
- [Improvement] Migrate packaging from setup.py/setuptools to pyproject.toml/hatch. (by @Abdul-Muqadim-Arbisoft)
|
||||
- For more details view tutor core PR: https://github.com/overhangio/tutor/pull/1163
|
||||
|
||||
- [Improvement] Add hatch_build.py in sdist target to fix the installation issues (by @dawoudsheraz)
|
||||
|
||||
- 💥[Feature] Upgrade to teak. (by @Abdul-Muqadim-Arbisoft)
|
||||
|
||||
<a id='changelog-19.0.0'></a>
|
||||
## v19.0.0 (2024-12-09)
|
||||
|
||||
|
||||
24
Makefile
24
Makefile
@ -1,25 +1,30 @@
|
||||
.DEFAULT_GOAL := help
|
||||
.PHONY: docs
|
||||
SRC_DIRS = ./tutorandroid
|
||||
BLACK_OPTS = --exclude templates ${SRC_DIRS}
|
||||
|
||||
# Warning: These checks are not necessarily run on every PR.
|
||||
test: test-lint test-types test-format # Run some static checks.
|
||||
test: test-lint test-types test-format test-pythonpackage # Run some static checks.
|
||||
|
||||
test-format: ## Run code formatting tests
|
||||
black --check --diff $(BLACK_OPTS)
|
||||
ruff format --check --diff ${SRC_DIRS}
|
||||
|
||||
test-lint: ## Run code linting tests
|
||||
pylint --errors-only --enable=unused-import,unused-argument --ignore=templates --ignore=docs/_ext ${SRC_DIRS}
|
||||
ruff check ${SRC_DIRS}
|
||||
|
||||
test-types: ## Run type checks.
|
||||
mypy --exclude=templates --ignore-missing-imports --implicit-reexport --strict ${SRC_DIRS}
|
||||
|
||||
format: ## Format code automatically
|
||||
black $(BLACK_OPTS)
|
||||
build-pythonpackage: ## Build the "tutor-android" python package for upload to pypi
|
||||
python -m build --sdist
|
||||
|
||||
isort: ## Sort imports. This target is not mandatory because the output may be incompatible with black formatting. Provided for convenience purposes.
|
||||
isort --skip=templates ${SRC_DIRS}
|
||||
test-pythonpackage: build-pythonpackage ## Test that package can be uploaded to pypi
|
||||
twine check dist/tutor_android-$(shell make version).tar.gz
|
||||
|
||||
format: ## Format code automatically
|
||||
ruff format ${SRC_DIRS}
|
||||
|
||||
fix-lint: ## Fix lint errors automatically
|
||||
ruff check --fix ${SRC_DIRS}
|
||||
|
||||
changelog-entry: ## Create a new changelog entry.
|
||||
scriv create
|
||||
@ -27,6 +32,9 @@ changelog-entry: ## Create a new changelog entry.
|
||||
changelog: ## Collect changelog entries in the CHANGELOG.md file.
|
||||
scriv collect
|
||||
|
||||
version: ## Print the current tutor-android version
|
||||
@python -c 'import io, os; about = {}; exec(io.open(os.path.join("tutorandroid", "__about__.py"), "rt", encoding="utf-8").read(), about); print(about["__version__"])'
|
||||
|
||||
ESCAPE =
|
||||
help: ## Print this help
|
||||
@grep -E '^([a-zA-Z_-]+:.*?## .*|######* .+)$$' Makefile \
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
|
||||
- [Improvement] Migrate packaging from setup.py/setuptools to pyproject.toml/hatch. (by @Abdul-Muqadim-Arbisoft)
|
||||
- For more details view tutor core PR: https://github.com/overhangio/tutor/pull/1163
|
||||
@ -0,0 +1,2 @@
|
||||
- [Improvement] Migrate from pylint and black to ruff. (by @Abdul-Muqadim-Arbisoft)
|
||||
- [Improvement] Test python package distribution build when running make test. (by @Abdul-Muqadim-Arbisoft)
|
||||
@ -27,16 +27,15 @@ classifiers = [
|
||||
"Programming Language :: Python :: 3.12",
|
||||
]
|
||||
dependencies = [
|
||||
"tutor>=19.0.0,<20.0.0"
|
||||
"tutor>=20.0.0,<21.0.0"
|
||||
]
|
||||
# Version will be dynamically loaded from __about__.py
|
||||
dynamic = ["version"]
|
||||
|
||||
[project.optional-dependencies]
|
||||
dev = [
|
||||
"tutor[dev]>=19.0.0,<20.0.0",
|
||||
"pylint",
|
||||
"black"
|
||||
"tutor[dev]>=20.0.0,<21.0.0",
|
||||
"ruff",
|
||||
]
|
||||
|
||||
[project.entry-points."tutor.plugin.v1"]
|
||||
@ -61,8 +60,24 @@ build-backend = "hatchling.build"
|
||||
[tool.hatch.build.targets.sdist]
|
||||
# Disable strict naming for twine compatibility
|
||||
strict-naming = false
|
||||
include = [ "/tutorandroid" ]
|
||||
include = [ "/tutorandroid", '.hatch_build.py' ]
|
||||
exclude = [ "tests*" ]
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["tutorandroid"]
|
||||
|
||||
[tool.ruff]
|
||||
exclude = ["templates", "docs/_ext"]
|
||||
|
||||
[tool.ruff.lint]
|
||||
# E: pycodestyle errors
|
||||
# I: isort
|
||||
# N: pep8-naming
|
||||
select = ["E", "I", "N"]
|
||||
|
||||
# F401: unused-import
|
||||
# F841: unused-variable
|
||||
# W292: missing-newline-at-end-of-file
|
||||
extend-select = ["F401", "F841", "W292"]
|
||||
|
||||
[tool.ruff.format]
|
||||
|
||||
@ -1 +1 @@
|
||||
__version__ = "19.0.0"
|
||||
__version__ = "20.0.0"
|
||||
|
||||
@ -15,8 +15,8 @@ spec:
|
||||
app.kubernetes.io/name: android-app
|
||||
spec:
|
||||
securityContext:
|
||||
runAsUser: 1000
|
||||
runAsGroup: 1000
|
||||
runAsUser: {{ APP_USER_ID }}
|
||||
runAsGroup: {{ APP_USER_ID }}
|
||||
containers:
|
||||
- name: android-app
|
||||
image: {{ ANDROID_APP_DOCKER_IMAGE }}
|
||||
|
||||
@ -23,8 +23,8 @@ config: t.Dict[str, t.Dict[str, t.Any]] = {
|
||||
# Version 4.0.0 is not working:
|
||||
# https://github.com/overhangio/tutor-android/pull/6#issuecomment-1541510489
|
||||
"APP_VERSION": "3.1.4",
|
||||
"DOCKER_IMAGE": "{{ DOCKER_REGISTRY }}overhangio/openedx-android:{{ ANDROID_VERSION }}",
|
||||
"APP_DOCKER_IMAGE": "{{ DOCKER_REGISTRY }}overhangio/openedx-android-app:{{ ANDROID_VERSION }}",
|
||||
"DOCKER_IMAGE": "{{ DOCKER_REGISTRY }}overhangio/openedx-android:{{ ANDROID_VERSION }}", # noqa: E501
|
||||
"APP_DOCKER_IMAGE": "{{ DOCKER_REGISTRY }}overhangio/openedx-android-app:{{ ANDROID_VERSION }}", # noqa: E501
|
||||
"ENABLE_RELEASE_MODE": False,
|
||||
"RELEASE_STORE_PASSWORD": "android store password",
|
||||
"RELEASE_KEY_PASSWORD": "android release key password",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user