-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:HeliumEdu/template-project
- Loading branch information
Showing
5 changed files
with
112 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Auto-Merge Dependabot PRs | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
automerge: | ||
name: Auto-Merge Dependabot PRs | ||
|
||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: write | ||
|
||
if: github.actor == 'dependabot[bot]' | ||
steps: | ||
- name: Get Dependabot metadata | ||
uses: dependabot/fetch-metadata@v2 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Enable auto-merge | ||
run: | | ||
gh pr review --approve "$PR_URL" | ||
gh pr merge --squash --auto "$PR_URL" | ||
env: | ||
PR_URL: ${{ github.event.pull_request.html_url }} | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
![Python Versions](https://img.shields.io/badge/python-%203.8%20|%203.9%20|%203.10%20|%203.11%20-blue) | ||
[![Coverage](https://img.shields.io/codecov/c/github/{%PROJECT_GITHUB_USER%}/{%PROJECT_ID%})](https://codecov.io/gh/{%PROJECT_GITHUB_USER%}/{%PROJECT_ID%}) | ||
[![Build](https://img.shields.io/github/actions/workflow/status/{%PROJECT_GITHUB_USER%}/{%PROJECT_ID%}/build.yml)](https://github.com/{%PROJECT_GITHUB_USER%}/{%PROJECT_ID%}/actions/workflows/build.yml) | ||
![GitHub License](https://img.shields.io/github/license/{%PROJECT_GITHUB_USER%}/{%PROJECT_ID%}) | ||
|
||
# {%PROJECT_NAME%} | ||
|
||
## Getting Started | ||
|
||
The project is developed using Python and [Django](https://www.djangoproject.com). | ||
|
||
This repository contains the source code for the {%PROJECT_NAME%} project. | ||
|
||
### Project Setup | ||
|
||
To setup the Python/Django build environment, execute: | ||
|
||
```sh | ||
make install | ||
``` | ||
|
||
This project is configured to work with a Virtualenv which has now been setup in the `venv` folder. If you're | ||
unfamiliar with how this works, [read up on Virtualenv here](https://virtualenv.pypa.io/en/stable). The short version | ||
is, virtualenv creates isolated environments for each project's dependencies. To activate and use this environment when | ||
developing, execute: | ||
|
||
```sh | ||
source venv/bin/activate | ||
``` | ||
|
||
All commands below will now be run within the virtualenv (though `make` commands will always automatically enter the | ||
virtualenv before executing). | ||
|
||
To ensure the database is in sync with the latest schema, database migrations are generated and run with Django. To run | ||
migrations, execute: | ||
|
||
```sh | ||
make migrate | ||
``` | ||
|
||
Once migrations have been run, you can create a super user, which is a standard user that also has access to the /admin | ||
site. | ||
|
||
```sh | ||
python manage.py createsuperuser | ||
``` | ||
|
||
Before commits are made, be sure to run tests and check the generated coverage report. | ||
|
||
```sh | ||
make test | ||
``` | ||
|
||
Now you're all set! To start the development server, execute: | ||
|
||
```sh | ||
bin/runserver | ||
``` | ||
|
||
A development server will be started at <http://localhost:8000>, though there is no mounted root URL—visit | ||
<http://localhost:8000/admin> or <http://localhost:8000/info> to see the project serve a request. | ||
|
||
If the `USE_NGROK` environment variable is set when a dev server is started (using `runserver`), | ||
[pyngrok](https://github.com/alexdlaird/pyngrok) will be used to open a `ngrok` tunnel. This is especially useful when | ||
using webhooks. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
django==4.2.10 | ||
djangorestframework==3.15.1 | ||
django-pipeline==3.0.0 | ||
django-pipeline==3.1.0 | ||
django-dotenv==1.4.2 | ||
django-redis==5.4.0 | ||
coreapi==2.3.3 | ||
mysqlclient==2.2.4 | ||
pytz==2024.1 | ||
python-dateutil==2.9.0.post0 | ||
schedule==1.2.1 | ||
schedule==1.2.2 | ||
-e git+https://github.com/alexdlaird/[email protected]#egg=django-health-check |