django-project-checks


Namedjango-project-checks JSON
Version 0.3 PyPI version JSON
download
home_pagehttps://github.com/yunojuno/poetry-template
SummaryDjango management commands used to output useful project information.
upload_time2023-11-14 14:36:56
maintainerYunoJuno
docs_urlNone
authorYunoJuno
requires_python>=3.8,<4.0
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # Django Project Check

Django management command for monitoring file diffs.

## Background

With a large codebase, and a high velocity team making edits, it can be
difficult to keep track of how the codebase is changing over time. A
classic issue is people creating new modules / classes in unexpected
places, or ending up with a set of functions that should be in the same
place but are spread across multiple locations (often resulting in
`import` issues). In order to address this we build a small script to
parse the codebase and dump out a complete listing of all modules,
classes and functions. We commit this to the repo, and then run a CI
check to ensure that it's up to date. The net result is that each PR has
at least one file update which lists which functions have been edited,
and where. It's like a live update to the index.

This pattern - dump a text output and add a CI check to enforce its
correctness - turns out to be a really useful pattern for keeping
control of the codebase, and so we started adding new checks:

- Python functions
- Django URLs
- GraphQL schema
- FSM interactions

The original function check is a python script (using `ast`) and has no
requirement for the Django scaffolding, but the others do, and so they
run as management commands, which are then wrapped with a `git diff`
script:

```yaml
- name: Run freeze_django_urls and check for any uncommitted diff
  run: |
    python manage.py freeze_django_urls
    git diff --exit-code 'django_urls.txt'
```

This project wraps this pattern into a base management command that can
be subclassed for any such requirement. All you need to do is provide a
function that returns the contents to be written to the file.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/yunojuno/poetry-template",
    "name": "django-project-checks",
    "maintainer": "YunoJuno",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "code@yunojuno.com",
    "keywords": "",
    "author": "YunoJuno",
    "author_email": "code@yunojuno.com",
    "download_url": "https://files.pythonhosted.org/packages/c2/f3/61592f2f9a302bd8e2e7504687cb5a6ef4e6ed355c5b2defa4c66fe3921e/django_project_checks-0.3.tar.gz",
    "platform": null,
    "description": "# Django Project Check\n\nDjango management command for monitoring file diffs.\n\n## Background\n\nWith a large codebase, and a high velocity team making edits, it can be\ndifficult to keep track of how the codebase is changing over time. A\nclassic issue is people creating new modules / classes in unexpected\nplaces, or ending up with a set of functions that should be in the same\nplace but are spread across multiple locations (often resulting in\n`import` issues). In order to address this we build a small script to\nparse the codebase and dump out a complete listing of all modules,\nclasses and functions. We commit this to the repo, and then run a CI\ncheck to ensure that it's up to date. The net result is that each PR has\nat least one file update which lists which functions have been edited,\nand where. It's like a live update to the index.\n\nThis pattern - dump a text output and add a CI check to enforce its\ncorrectness - turns out to be a really useful pattern for keeping\ncontrol of the codebase, and so we started adding new checks:\n\n- Python functions\n- Django URLs\n- GraphQL schema\n- FSM interactions\n\nThe original function check is a python script (using `ast`) and has no\nrequirement for the Django scaffolding, but the others do, and so they\nrun as management commands, which are then wrapped with a `git diff`\nscript:\n\n```yaml\n- name: Run freeze_django_urls and check for any uncommitted diff\n  run: |\n    python manage.py freeze_django_urls\n    git diff --exit-code 'django_urls.txt'\n```\n\nThis project wraps this pattern into a base management command that can\nbe subclassed for any such requirement. All you need to do is provide a\nfunction that returns the contents to be written to the file.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Django management commands used to output useful project information.",
    "version": "0.3",
    "project_urls": {
        "Documentation": "https://github.com/yunojuno/poetry-template",
        "Homepage": "https://github.com/yunojuno/poetry-template",
        "Repository": "https://github.com/yunojuno/poetry-template"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4afb211164e0c4f05dccc0dfe1aa8cfa344a176a654a3df5b42e05830808cdbb",
                "md5": "e21140381675b174bc8e204b083940c7",
                "sha256": "bcafd2c96e35638fef8675a77b05dc4cb5f73dd8a12d4af40d17789ce33957b3"
            },
            "downloads": -1,
            "filename": "django_project_checks-0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e21140381675b174bc8e204b083940c7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 5390,
            "upload_time": "2023-11-14T14:36:54",
            "upload_time_iso_8601": "2023-11-14T14:36:54.882455Z",
            "url": "https://files.pythonhosted.org/packages/4a/fb/211164e0c4f05dccc0dfe1aa8cfa344a176a654a3df5b42e05830808cdbb/django_project_checks-0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c2f361592f2f9a302bd8e2e7504687cb5a6ef4e6ed355c5b2defa4c66fe3921e",
                "md5": "b53df90de744e43f42da65b6f2934401",
                "sha256": "31596cbcf183a5cef0c2b7af03f6ae81dc3cd8a7fa6a636fe41ab52ce1d50a26"
            },
            "downloads": -1,
            "filename": "django_project_checks-0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "b53df90de744e43f42da65b6f2934401",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 4330,
            "upload_time": "2023-11-14T14:36:56",
            "upload_time_iso_8601": "2023-11-14T14:36:56.382452Z",
            "url": "https://files.pythonhosted.org/packages/c2/f3/61592f2f9a302bd8e2e7504687cb5a6ef4e6ed355c5b2defa4c66fe3921e/django_project_checks-0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-14 14:36:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "yunojuno",
    "github_project": "poetry-template",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "tox": true,
    "lcname": "django-project-checks"
}
        
Elapsed time: 0.14363s