index.rst 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. Contributing
  2. ============
  3. Developing and testing coderedcms
  4. ---------------------------------
  5. To create a test project locally:
  6. #. Clone the code from https://github.com/coderedcorp/coderedcms.
  7. #. Run ``pip install -e ./[dev]`` from the root coderedcms directory. The -e flag makes the install editable,
  8. which is relevant when running makemigrations in test project to actually generate the migration
  9. files in the coderedcms pip package. The ``[dev]`` installs extras such as sphinx for generating docs.
  10. #. Follow the steps in :doc:`/getting_started/install`. Use "testproject" for
  11. your project name to ensure it is ignored by git.
  12. #. When making model or block changes within coderedcms, run ``makemigrations coderedcms`` in the
  13. test project to generate the relevant migration files for the pip package. ALWAYS follow steps
  14. 4 and 5 in :doc:`/getting_started/install` with a fresh database before making migrations.
  15. #. When model or block changes affect the local test project (i.e. the "website" app), run
  16. ``makemigrations website`` in the test project to generate the relevant migration files locally.
  17. Apply and test the migrations. When satisfied, copy the new migration files to the
  18. ``project_template/website/migrations/`` directory.
  19. When making changes that are potentially destructive or backwards incompatible, increment the minor
  20. version number until coderedcms reaches a stable 1.0 release. Each production project that uses
  21. coderedcms should specify the appropriate version in its requirements.txt to prevent breakage.
  22. .. note:
  23. When testing existing projects with coderedcms installed from the master or development branches,
  24. be sure to use a disposable database, as it is likely that the migrations in master will
  25. not be the same migrations that get released.
  26. Contributor guidelines
  27. ----------------------
  28. We are happy to accept pull requests from the community if it aligns with our vision for coderedcms.
  29. When creating a pull request, please make sure you include the following:
  30. * A description in the pull request of what this change does and how it works.
  31. * Reference to an issue if the change is related to one of the issues on our GitHub page.
  32. * Documentation updates in the ``docs/`` directory describing your change.
  33. Following submission of your pull request, a CodeRed member will review and test your change.
  34. **All changes, even by CodeRed members, must go through a pull request process to ensure quality.**
  35. Building pip packages
  36. ---------------------
  37. To build a publicly consumable pip package, run::
  38. python setup.py sdist bdist_wheel
  39. Building documentation
  40. ----------------------
  41. For every code or feature change, be sure to update the docs in the repository. To build and publish
  42. the documentation run::
  43. cd docs/
  44. make clean
  45. make html
  46. Output will be in ``docs/_build/html/`` directory.
  47. Publishing a new release
  48. ------------------------
  49. First checkout the code/branch for release.
  50. Next build a pip package::
  51. python setup.py sdist bdist_wheel
  52. Then upload the pip package to pypi::
  53. twine upload dist/*
  54. Finally build and update docs::
  55. cd docs/
  56. make clean
  57. make html
  58. If updating docs for an existing minor version release:
  59. #. Copy the contents of ``docs/_build/html/`` to the CodeRed docs server under the existing version directory.
  60. If this is a new major or minor version release:
  61. #. Create a new major.minor directory on the CodeRed docs server.
  62. #. Update the ``stable`` symlink to point to the new version directory.
  63. #. Add the new version to the ``versions.txt`` file on the docs server.
  64. #. Copy the contents of ``docs/_build/html/`` to the CodeRed docs server under the new version directory.
  65. Note that we do not release separate documentation versions for maintenance releases. Update the existing minor
  66. version docs with release notes and other changes.