From 7670bd067622358623d3bf02ba4225e081d4354e Mon Sep 17 00:00:00 2001 From: Tim McCormack Date: Mon, 11 Jul 2022 15:59:10 -0400 Subject: [PATCH] fix: Various (variables, metadata, versions, etc.) - Fix or remove ``tags`` repo metadata in several templates; remove deprecated ``nick`` from openedx.yaml (see OEP-2) - Remove extraneous period after short description - Move short description to top of readme - Use project name, not repo name, for package name in setup.py - Change Django documentation and setup.py references from 2.2 to 3.2 --- CHANGELOG.rst | 12 ++++++++++++ cookiecutter-django-app/cookiecutter.json | 2 +- .../{{cookiecutter.repo_name}}/docs/conf.py | 2 +- .../{{cookiecutter.app_name}}/__init__.py | 2 +- cookiecutter-django-ida/README.rst | 2 +- cookiecutter-django-ida/cookiecutter.json | 2 +- .../{{cookiecutter.project_name}}/settings/base.py | 2 +- .../{{cookiecutter.project_name}}/urls.py | 2 +- .../{{cookiecutter.project_name}}/wsgi.py | 2 +- cookiecutter-python-library/cookiecutter.json | 2 +- cookiecutter-xblock/openedx.yaml | 2 +- .../{{cookiecutter.repo_name}}/README.rst | 6 +++--- .../{{cookiecutter.package_name}}/locale/settings.py | 8 ++++---- openedx.yaml | 1 - python-template/cookiecutter.json | 2 +- .../README.rst | 4 ++-- .../openedx.yaml | 3 --- .../{{cookiecutter.placeholder_repo_name}}/setup.py | 4 ++-- 18 files changed, 34 insertions(+), 26 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 00218d7b..9c45e62e 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,6 +5,18 @@ Change Log This file loosely adheres to the structure of https://keepachangelog.com/, but in reStructuredText instead of Markdown. +2022-07-11 +---------- + +Fixed +~~~~~ + +- Fix or remove ``tags`` repo metadata in several templates; remove deprecated ``nick`` from openedx.yaml (see OEP-2) +- Remove extraneous period after short description +- Move short description to top of readme +- Use project name, not repo name, for package name in setup.py +- Change Django documentation and setup.py references from 2.2 to 3.2 + 2022-07-05 ---------- diff --git a/cookiecutter-django-app/cookiecutter.json b/cookiecutter-django-app/cookiecutter.json index da05847b..f04466ce 100644 --- a/cookiecutter-django-app/cookiecutter.json +++ b/cookiecutter-django-app/cookiecutter.json @@ -3,7 +3,7 @@ "app_name": "{{ cookiecutter.repo_name.lower()|replace(' ', '_')|replace('-', '_')|replace('.', '_') }}", "project_name": "{{ cookiecutter.repo_name }}", "project_title": "{{ cookiecutter.project_name }}", - "project_short_description": "What is this project?", + "project_short_description": "One-line description for README and other doc files.", "version": "0.1.0", "author_name": "edX", "author_email": "you@edx.org", diff --git a/cookiecutter-django-app/{{cookiecutter.repo_name}}/docs/conf.py b/cookiecutter-django-app/{{cookiecutter.repo_name}}/docs/conf.py index d0df9469..6f1feaf4 100644 --- a/cookiecutter-django-app/{{cookiecutter.repo_name}}/docs/conf.py +++ b/cookiecutter-django-app/{{cookiecutter.repo_name}}/docs/conf.py @@ -470,7 +470,7 @@ def get_version(*file_paths): # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = { 'python': ('https://docs.python.org/3.8', None), - 'django': ('https://docs.djangoproject.com/en/2.2/', 'https://docs.djangoproject.com/en/2.2/_objects/'), + 'django': ('https://docs.djangoproject.com/en/3.2/', 'https://docs.djangoproject.com/en/3.2/_objects/'), 'model_utils': ('https://django-model-utils.readthedocs.io/en/latest/', None), } diff --git a/cookiecutter-django-app/{{cookiecutter.repo_name}}/{{cookiecutter.app_name}}/__init__.py b/cookiecutter-django-app/{{cookiecutter.repo_name}}/{{cookiecutter.app_name}}/__init__.py index 94e0a76f..5747e0c1 100644 --- a/cookiecutter-django-app/{{cookiecutter.repo_name}}/{{cookiecutter.app_name}}/__init__.py +++ b/cookiecutter-django-app/{{cookiecutter.repo_name}}/{{cookiecutter.app_name}}/__init__.py @@ -1,5 +1,5 @@ """ -{{ cookiecutter.project_short_description }}. +{{ cookiecutter.project_short_description }} """ __version__ = '{{ cookiecutter.version }}' diff --git a/cookiecutter-django-ida/README.rst b/cookiecutter-django-ida/README.rst index 2d280244..fc58d775 100644 --- a/cookiecutter-django-ida/README.rst +++ b/cookiecutter-django-ida/README.rst @@ -9,7 +9,7 @@ A cookiecutter_ template for edX Django projects. This cookiecutter template is intended for new edX independently deployable apps (IDAs). It includes the following packages: -* Django 2.2 +* Django 3.2 * Django REST Framework * Django Waffle diff --git a/cookiecutter-django-ida/cookiecutter.json b/cookiecutter-django-ida/cookiecutter.json index e9cd1086..9812b80f 100644 --- a/cookiecutter-django-ida/cookiecutter.json +++ b/cookiecutter-django-ida/cookiecutter.json @@ -1,7 +1,7 @@ { "repo_name": "repo_name", "project_name": "{{ cookiecutter.repo_name.lower()|replace(' ', '_')|replace('-', '_')|replace('.', '_')|trim() }}", - "project_short_description": "What is this project?", + "project_short_description": "One-line description for README and other doc files.", "version": "0.1.0", "author_name": "edX", "author_email": "you@edx.org", diff --git a/cookiecutter-django-ida/{{cookiecutter.repo_name}}/{{cookiecutter.project_name}}/settings/base.py b/cookiecutter-django-ida/{{cookiecutter.repo_name}}/{{cookiecutter.project_name}}/settings/base.py index b670aea6..14fcc211 100644 --- a/cookiecutter-django-ida/{{cookiecutter.repo_name}}/{{cookiecutter.project_name}}/settings/base.py +++ b/cookiecutter-django-ida/{{cookiecutter.repo_name}}/{{cookiecutter.project_name}}/settings/base.py @@ -92,7 +92,7 @@ def root(*path_fragments): WSGI_APPLICATION = '{{cookiecutter.project_name}}.wsgi.application' # Database -# https://docs.djangoproject.com/en/2.2/ref/settings/#databases +# https://docs.djangoproject.com/en/3.2/ref/settings/#databases # Set this value in the environment-specific files (e.g. local.py, production.py, test.py) DATABASES = { 'default': { diff --git a/cookiecutter-django-ida/{{cookiecutter.repo_name}}/{{cookiecutter.project_name}}/urls.py b/cookiecutter-django-ida/{{cookiecutter.repo_name}}/{{cookiecutter.project_name}}/urls.py index 567d6fa1..08a92cc7 100644 --- a/cookiecutter-django-ida/{{cookiecutter.repo_name}}/{{cookiecutter.project_name}}/urls.py +++ b/cookiecutter-django-ida/{{cookiecutter.repo_name}}/{{cookiecutter.project_name}}/urls.py @@ -2,7 +2,7 @@ {{ cookiecutter.project_name }} URL Configuration. The `urlpatterns` list routes URLs to views. For more information please see: - https://docs.djangoproject.com/en/2.2/topics/http/urls/ + https://docs.djangoproject.com/en/3.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views diff --git a/cookiecutter-django-ida/{{cookiecutter.repo_name}}/{{cookiecutter.project_name}}/wsgi.py b/cookiecutter-django-ida/{{cookiecutter.repo_name}}/{{cookiecutter.project_name}}/wsgi.py index 66ab4cb1..ea7ad1c6 100644 --- a/cookiecutter-django-ida/{{cookiecutter.repo_name}}/{{cookiecutter.project_name}}/wsgi.py +++ b/cookiecutter-django-ida/{{cookiecutter.repo_name}}/{{cookiecutter.project_name}}/wsgi.py @@ -4,7 +4,7 @@ It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see -https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/ +https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/ """ import os from os.path import abspath, dirname diff --git a/cookiecutter-python-library/cookiecutter.json b/cookiecutter-python-library/cookiecutter.json index 18d71fe7..70e7b96a 100644 --- a/cookiecutter-python-library/cookiecutter.json +++ b/cookiecutter-python-library/cookiecutter.json @@ -2,7 +2,7 @@ "repo_name": "repo_name", "library_name": "{{ cookiecutter.repo_name.lower()|replace(' ', '_')|replace('-', '_')|replace('.', '_') }}", "project_name": "{{ cookiecutter.repo_name }}", - "project_short_description": "What is this project?", + "project_short_description": "One-line description for README and other doc files.", "version": "0.1.0", "author_name": "edX", "author_email": "you@edx.org", diff --git a/cookiecutter-xblock/openedx.yaml b/cookiecutter-xblock/openedx.yaml index b7d62a84..069a1493 100644 --- a/cookiecutter-xblock/openedx.yaml +++ b/cookiecutter-xblock/openedx.yaml @@ -5,4 +5,4 @@ oeps: oep-2: true oep-7: false tags: - - backend-tooling + - xblock diff --git a/cookiecutter-xblock/{{cookiecutter.repo_name}}/README.rst b/cookiecutter-xblock/{{cookiecutter.repo_name}}/README.rst index 0f6f096a..896dbf50 100644 --- a/cookiecutter-xblock/{{cookiecutter.repo_name}}/README.rst +++ b/cookiecutter-xblock/{{cookiecutter.repo_name}}/README.rst @@ -71,7 +71,7 @@ These catalogs can be created by running:: The previous command will create the necessary ``.po`` files under ``{{cookiecutter.repo_name}}/{{cookiecutter.package_name}}/locale/en/LC_MESSAGES/text.po``. The ``text.po`` file is created from the ``django-partial.po`` file created by -``django-admin makemessages`` (`makemessages documentation `_), +``django-admin makemessages`` (`makemessages documentation `_), this is why you will not see a ``django-partial.po`` file. 3. Create language specific translations @@ -114,7 +114,7 @@ Once translations are in place, use the following Make target to compile the tra $ make compile_translations The previous command will compile ``.po`` files using -``django-admin compilemessages`` (`compilemessages documentation `_). +``django-admin compilemessages`` (`compilemessages documentation `_). After compiling the ``.po`` file(s), ``django-statici18n`` is used to create language specific catalogs. See ``django-statici18n`` `documentation `_ for more information. @@ -147,5 +147,5 @@ If there are any errors compiling ``.po`` files run the following command to val $ make validate See `django's i18n troubleshooting documentation -`_ +`_ for more information. diff --git a/cookiecutter-xblock/{{cookiecutter.repo_name}}/{{cookiecutter.package_name}}/locale/settings.py b/cookiecutter-xblock/{{cookiecutter.repo_name}}/{{cookiecutter.package_name}}/locale/settings.py index 74dd20f1..cba1a0cd 100644 --- a/cookiecutter-xblock/{{cookiecutter.repo_name}}/{{cookiecutter.package_name}}/locale/settings.py +++ b/cookiecutter-xblock/{{cookiecutter.repo_name}}/{{cookiecutter.package_name}}/locale/settings.py @@ -1,9 +1,9 @@ """ Django settings for {{cookiecutter.package_name}} project. For more information on this file, see -https://docs.djangoproject.com/en/2.2/topics/settings/ +https://docs.djangoproject.com/en/3.2/topics/settings/ For the full list of settings and their values, see -https://docs.djangoproject.com/en/2.2/ref/settings/ +https://docs.djangoproject.com/en/3.2/ref/settings/ """ import os @@ -17,7 +17,7 @@ ) # Internationalization -# https://docs.djangoproject.com/en/2.2/topics/i18n/ +# https://docs.djangoproject.com/en/3.2/topics/i18n/ LANGUAGE_CODE = 'en-us' @@ -31,7 +31,7 @@ # Static files (CSS, JavaScript, Images) -# https://docs.djangoproject.com/en/2.2/howto/static-files/ +# https://docs.djangoproject.com/en/3.2/howto/static-files/ STATIC_URL = '/static/' diff --git a/openedx.yaml b/openedx.yaml index e602ea07..fb23c7c7 100644 --- a/openedx.yaml +++ b/openedx.yaml @@ -1,4 +1,3 @@ -nick: edx-cookiecutters tags: - tools oeps: diff --git a/python-template/cookiecutter.json b/python-template/cookiecutter.json index f762f727..b91c833f 100644 --- a/python-template/cookiecutter.json +++ b/python-template/cookiecutter.json @@ -2,7 +2,7 @@ "repo_name": "repo_name", "sub_dir_name": "{{ cookiecutter.repo_name }}", "project_name": "{{ cookiecutter.repo_name }}", - "project_short_description": "What is this project?", + "project_short_description": "One-line description for README and other doc files.", "version": "0.1.0", "author_name": "edX", "author_email": "you@edx.org", diff --git a/python-template/{{cookiecutter.placeholder_repo_name}}/README.rst b/python-template/{{cookiecutter.placeholder_repo_name}}/README.rst index 547cd289..8e0107b9 100644 --- a/python-template/{{cookiecutter.placeholder_repo_name}}/README.rst +++ b/python-template/{{cookiecutter.placeholder_repo_name}}/README.rst @@ -4,13 +4,13 @@ |pypi-badge| |ci-badge| |codecov-badge| |doc-badge| |pyversions-badge| |license-badge| +{{ cookiecutter.project_short_description}} + The ``README.rst`` file should start with a brief description of the repository, which sets it in the context of other repositories under the ``edx`` organization. It should make clear where this fits in to the overall edX codebase. -{{ cookiecutter.project_short_description}} - Overview (please modify) ------------------------ diff --git a/python-template/{{cookiecutter.placeholder_repo_name}}/openedx.yaml b/python-template/{{cookiecutter.placeholder_repo_name}}/openedx.yaml index d56f7343..1000a6c8 100644 --- a/python-template/{{cookiecutter.placeholder_repo_name}}/openedx.yaml +++ b/python-template/{{cookiecutter.placeholder_repo_name}}/openedx.yaml @@ -2,9 +2,6 @@ # https://open-edx-proposals.readthedocs.io/en/latest/oep-0002-bp-repo-metadata.html#specification --- -nick: {{ cookiecutter.repo_name }} -tags: - - tools oeps: oep-2: true oep-3: diff --git a/python-template/{{cookiecutter.placeholder_repo_name}}/setup.py b/python-template/{{cookiecutter.placeholder_repo_name}}/setup.py index e333ecce..5e730c49 100755 --- a/python-template/{{cookiecutter.placeholder_repo_name}}/setup.py +++ b/python-template/{{cookiecutter.placeholder_repo_name}}/setup.py @@ -119,7 +119,7 @@ def package_data(pkg, roots): CHANGELOG = open(os.path.join(os.path.dirname(__file__), 'CHANGELOG.rst'), encoding="utf8").read() setup( - name='{{ cookiecutter.repo_name }}', + name='{{ cookiecutter.project_name }}', version=VERSION, description="""{{ cookiecutter.project_short_description }}""", long_description=README + '\n\n' + CHANGELOG, @@ -141,7 +141,7 @@ def package_data(pkg, roots): 'Development Status :: 3 - Alpha', {%- if cookiecutter.requires_django == "yes" %} 'Framework :: Django', - 'Framework :: Django :: 2.2', + 'Framework :: Django :: 3.2', {%- endif %} 'Intended Audience :: Developers', {%- if cookiecutter.open_source_license == "AGPL 3.0" %}