Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make docs is broken on django-ida cookiecutter #339

Open
1 task
timmc-edx opened this issue May 12, 2023 · 0 comments
Open
1 task

make docs is broken on django-ida cookiecutter #339

timmc-edx opened this issue May 12, 2023 · 0 comments

Comments

@timmc-edx
Copy link
Contributor

If you use cookiecutter-django-ida and complete all of the setup steps, then run make requirements docs, the docs build fails. There are a number of things that need to be fixed before it succeeds.

Acceptance criteria:

  • make docs is added to the tests for cookiecutter-django-ida. Currently this would need to be added as a new step in the ci.yml GitHub workflow under the run_ida_tests job, but it's possible that these tests will have been moved to the actual Python unit tests by the time this ticket has been picked up. The test should run make doc_requirements docs or similar.

Known issues that will need fixing:

  • cookiecutter-django-ida/hooks/post_gen_project.py needs to include extra_context["requires_django"] = "yes" just like the django-app cookiecutter does, otherwise there will be a failure when autodoc imports urls.py
  • The template will need to be expanded to allow layered cookiecutters to specify what the Django settings module is; django-app uses test_settings and that is hardcoded into python-template's docs/conf.py, but django-ida will need to use {{ repo_name }}.settings.test or similar.
  • There's some kind of issue with a logo reference (have lost the details, but just mentioning this because it will come up)
timmc-edx added a commit that referenced this issue May 12, 2023
Filed #339 for fixing
this later.
timmc-edx added a commit that referenced this issue May 16, 2023
…int (#332)

Remove unused files from root of each cookiecutter. These were not actually
used as they were not inside the `{{cookiecutter.repo_name}}` dir that
would lead to them being included.

More information on removals:

- `openedx.yaml` removed from xblock cookiecutter root and
  #334 filed to cover
  actually adding that tag. (The rest of the file was either redundant
  with what's in python-template, or obsolete.)
- `requirements.txt` was not used in CI or baking
- Makefiles were not used. This is unfortunate because the IDA one actually
  had some useful tests in it. I've moved those to the ci.yml workflow for
  expediency but they should really be put into the unit tests at some
  point so that they can be run locally. A lot of the django-app Makefile
  seemed to have been written while the repo was still in development, and
  relied on packages that are not installed.

For the moved tests to pass, I had to make some fixes to the IDA template:

- Add missing `docs` target to Makefile, although it doesn't quite work yet;
  filed #339 for fixing
  this later. (Excluded from testing for now.)
- Add some long-line lint suppression where needed

Other improvements:

- Remove unused `BAKE_OPTIONS` from root Makefile
- Use short version of `BROWSER` script in django-ida Makefile to
  match other Makefiles
- Fix root Makefile so that it actually uses pip-sync rather than just
  installing it
- Update `JWT_PUBLIC_SIGNING_JWK_SET` to be readable and copyable as JSON
  (as is likely to be done for edx-platform in the ongoing JWK work)
- Made `fake_translations` Makefile target actually do something.
@jristau1984 jristau1984 moved this to Backlog in Arch-BOM Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant