Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

POC: restructure app#2573

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
JacobCoffee wants to merge17 commits intomain
base:main
Choose a base branch
Loading
fromapp-restructure
Draft
Show file tree
Hide file tree
Changes from1 commit
Commits
Show all changes
17 commits
Select commitHold shift + click to select a range
284b2c3
feat: restructure app
JacobCoffeeSep 17, 2024
9238572
fix: use new path
JacobCoffeeSep 19, 2024
3773a6a
fix: use new path
JacobCoffeeSep 19, 2024
197b9c2
fix: use new path ?
JacobCoffeeSep 19, 2024
4695fc6
fix: use new path ?
JacobCoffeeSep 19, 2024
6acdf76
fix: use new path ?
JacobCoffeeSep 19, 2024
8d23ba2
fix: use new path ?
JacobCoffeeSep 19, 2024
d3b4eda
fix: use new path ???????
JacobCoffeeSep 19, 2024
5d21205
fix: attempt to make wurk
JacobCoffeeSep 19, 2024
a4597ab
fix: attempt to make wurk
JacobCoffeeSep 19, 2024
970fbc4
fix(attempt): attempt 47
JacobCoffeeSep 19, 2024
b2e2210
fix(attempt): attempt 89
JacobCoffeeSep 19, 2024
d8c61f8
fix(ci): fix tests ci
JacobCoffeeSep 19, 2024
8565afe
chore(ci): clean up debug stuff from static ci, fix test ci
JacobCoffeeSep 19, 2024
d8ce82c
chore(ci): attempt to fix test ci
JacobCoffeeSep 19, 2024
32b66c2
chore(ci): attempt to fix test ci again...
JacobCoffeeSep 19, 2024
a31abae
fix(ci): i should find a new trade
JacobCoffeeSep 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
NextNext commit
feat: restructure app
  • Loading branch information
@JacobCoffee
JacobCoffee committedSep 19, 2024
commit284b2c3326ac954713f4b9d5008cbfd83299912d
4 changes: 2 additions & 2 deletions.github/workflows/ci.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -38,15 +38,15 @@ jobs:
cache-name: pythondotorg-cache-pip
with:
path: ~/.cache/pip
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('requirements.txt', '*-requirements.txt') }}
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('requirements/requirements.txt', 'requirements/*-requirements.txt') }}
restore-keys: |
${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-
${{ runner.os }}-${{ github.job }}-
${{ runner.os }}-
- name: Install Python dependencies
run: |
pip install -U pip setuptools wheel
pip install -r dev-requirements.txt
pip install -rrequirements/dev-requirements.txt
- name: Check for ungenerated database migrations
run: |
python manage.py makemigrations --check --dry-run
Expand Down
4 changes: 2 additions & 2 deletions.github/workflows/static.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,15 +15,15 @@ jobs:
cache-name:pythondotorg-cache-pip
with:
path:~/.cache/pip
key:${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('requirements.txt', '*-requirements.txt') }}
key:${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('requirements/requirements.txt', 'requirements/*-requirements.txt') }}
restore-keys:|
${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-
${{ runner.os }}-${{ github.job }}-
${{ runner.os }}-
-name:Install Python dependencies
run:|
pip install -U pip setuptools wheel
pip install -r requirements.txt -r prod-requirements.txt
pip install -r requirements/requirements.txt -rrequirements/prod-requirements.txt
-name:Run Tests
run:|
DJANGO_SETTINGS_MODULE=pydotorg.settings.static python manage.py collectstatic --noinput
2 changes: 1 addition & 1 deletion.gitignore
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,7 +11,7 @@

.sass-cache/
docs/build
media/*
app/media/*
static-root/
static/stylesheets/mq.css
static/stylesheets/no-mq.css
Expand Down
2 changes: 1 addition & 1 deletion.readthedocs.yaml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,6 +10,6 @@ build:
python: "3"

commands:
- python -m pip install -r docs-requirements.txt
- python -m pip install -rrequirements/docs-requirements.txt
- make -C docs html JOBS=$(nproc) BUILDDIR=_readthedocs
- mv docs/_readthedocs _readthedocs
8 changes: 4 additions & 4 deletionsDockerfile
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -32,10 +32,10 @@ RUN case $(uname -m) in \
RUN mkdir /code
WORKDIR /code

COPY dev-requirements.txt /code/
COPY base-requirements.txt /code/
COPY prod-requirements.txt /code/
COPY requirements.txt /code/
COPYrequirements/dev-requirements.txt /code/
COPYrequirements/base-requirements.txt /code/
COPYrequirements/prod-requirements.txt /code/
COPY requirements/requirements.txt /code/

RUN pip --no-cache-dir --disable-pip-version-check install --upgrade pip setuptools wheel

Expand Down
10 changes: 5 additions & 5 deletionsDockerfile.cabotage
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -33,10 +33,10 @@ RUN case $(uname -m) in \
RUN mkdir /code
WORKDIR /code

COPY dev-requirements.txt /code/
COPY base-requirements.txt /code/
COPY prod-requirements.txt /code/
COPY requirements.txt /code/
COPYrequirements/dev-requirements.txt /code/
COPYrequirements/base-requirements.txt /code/
COPYrequirements/prod-requirements.txt /code/
COPY requirements/requirements.txt /code/

RUN pip --no-cache-dir --disable-pip-version-check install --upgrade pip setuptools wheel

Expand All@@ -46,4 +46,4 @@ RUN --mount=type=cache,target=/root/.cache/pip \
install \
-r requirements.txt -r prod-requirements.txt
COPY . /code/
RUN DJANGO_SETTINGS_MODULE=pydotorg.settings.static python manage.py collectstatic --noinput
RUN DJANGO_SETTINGS_MODULE=pydotorg.settings.static pythonapp/manage.py collectstatic --noinput
14 changes: 7 additions & 7 deletionsMakefile
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,7 +8,7 @@ default:
@echo
@exit 1

.state/docker-build-web: Dockerfile dev-requirements.txt base-requirements.txt
.state/docker-build-web: Dockerfilerequirements/dev-requirements.txtrequirements/base-requirements.txt
# Build web container for this project
docker compose build --force-rm web

Expand All@@ -24,7 +24,7 @@ default:

.state/db-initialized: .state/docker-build-web .state/db-migrated
# Load all fixtures
docker compose run --rm web ./manage.py loaddata fixtures/*.json
docker compose run --rm web ./app/manage.py loaddata fixtures/*.json

# Mark the state so we don't rebuild this needlessly.
mkdir -p .state && touch .state/db-initialized
Expand All@@ -34,25 +34,25 @@ serve: .state/db-initialized

migrations: .state/db-initialized
# Run Django makemigrations
docker compose run --rm web ./manage.py makemigrations
docker compose run --rm web ./app/manage.py makemigrations

migrate: .state/docker-build-web
# Run Django migrate
docker compose run --rm web ./manage.py migrate
docker compose run --rm web ./app/manage.py migrate

manage: .state/db-initialized
# Run Django manage to accept arbitrary arguments
docker compose run --rm web ./manage.py $(filter-out $@,$(MAKECMDGOALS))
docker compose run --rm web ./app/manage.py $(filter-out $@,$(MAKECMDGOALS))

shell: .state/db-initialized
docker compose run --rm web ./manage.py shell
docker compose run --rm web ./app/manage.py shell

clean:
docker compose down -v
rm -f .state/docker-build-web .state/db-initialized .state/db-migrated

test: .state/db-initialized
docker compose run --rm web ./manage.py test
docker compose run --rm web ./app/manage.py test

docker_shell: .state/db-initialized
docker compose run --rm web /bin/bash
4 changes: 2 additions & 2 deletionsProcfile
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
release: python manage.py migrate --noinput
release: pythonapp/manage.py migrate --noinput
web: bin/start-nginx gunicorn -c gunicorn.conf pydotorg.wsgi
worker: celery -A pydotorg worker -l INFO
worker: celery -Aapp.pydotorg worker -l INFO
worker-beat: celery -A pydotorg beat -l INFO --scheduler django_celery_beat.schedulers:DatabaseScheduler
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletionbanners/admin.py → app/banners/admin.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
from django.contrib import admin

from banners.models import Banner
fromapp.banners.models import Banner


@admin.register(Banner)
Expand Down
2 changes: 1 addition & 1 deletionbanners/apps.py → app/banners/apps.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,4 +3,4 @@

class BannersAppConfig(AppConfig):

name = 'banners'
name = 'app.banners'
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
from django import template
from django.template.loader import render_to_string

from banners.models import Banner
fromapp.banners.models import Banner

register = template.Library()

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletionblogs/admin.py → app/blogs/admin.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
from django.contrib import admin
from django.core.management import call_command

from .models import BlogEntry, Feed, FeedAggregate
fromapp.blogs.models import BlogEntry, Feed, FeedAggregate


@admin.register(BlogEntry)
Expand Down
2 changes: 1 addition & 1 deletionblogs/apps.py → app/blogs/apps.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,4 +3,4 @@

class BlogsAppConfig(AppConfig):

name = 'blogs'
name = 'app.blogs'
2 changes: 1 addition & 1 deletionblogs/factories.py → app/blogs/factories.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
from django.conf import settings

from .models import Feed
fromapp.blogs.models import Feed


def initial_data():
Expand Down
File renamed without changes.
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
from django.core.management.base import BaseCommand
from django.utils.timezone import now

from...models import BlogEntry, RelatedBlog, Feed
from...parser import get_all_entries, update_blog_supernav
fromapp.blogs..models import BlogEntry, RelatedBlog, Feed
fromapp.blogs..parser import get_all_entries, update_blog_supernav


class Command(BaseCommand):
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletionblogs/models.py → app/blogs/models.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,7 +5,7 @@

from django.db import models

from cms.models import ContentManageable
fromapp.cms.models import ContentManageable


def tag_visible(element):
Expand Down
4 changes: 2 additions & 2 deletionsblogs/parser.py → app/blogs/parser.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,8 +5,8 @@
from django.template.loader import render_to_string
from django.utils.timezone import make_aware

from boxes.models import Box
from .models import BlogEntry, Feed
fromapp.boxes.models import Box
fromapp.blogs.models import BlogEntry, Feed


def get_all_entries(feed_url):
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
from django import template

from..models import BlogEntry
fromapp.blogs.models import BlogEntry

register = template.Library()

Expand Down
File renamed without changes.
Loading

[8]ページ先頭

©2009-2025 Movatter.jp