Skip to content

Commit

Permalink
Merge pull request #50 from LBlend/dev
Browse files Browse the repository at this point in the history
Separate frontend & backend into different repos + rewrite
  • Loading branch information
LBlend authored Apr 3, 2022
2 parents 8368859 + f13dba6 commit 6efe799
Show file tree
Hide file tree
Showing 64 changed files with 637 additions and 17,954 deletions.
File renamed without changes.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
34 changes: 30 additions & 4 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,41 @@
# Norsk 🇳🇴

## Hva er galt?
Forklar hva som skjer. Inkluder gjerne bilder/videoer

Forklar hva som skjer. Inkluder gjerne bilder/videoer

## Hvordan oppstår feilen?

Forklar hvordan man kan reprodusere feilen.

## Systeminfo
- Enhet:
- Operativsystem:
- Nettleser (med versjonnummer):

- Enhet:
- Operativsystem:
- Nettleser (med versjonnummer):
- Tidspunkt:

## Annet

Skriv hva enn du føler er relevant her.

# English 🇬🇧

## What's the issue?

Try to explain what error or issue occurs. Pictures/Videos are appreciated

## Is the issue reproducible?

If so, explain how.

## Systeminfo

- Device:
- Operating System
- Web browser (including version number):
- Time of issue:

## Additional notes

If there's anything else that's relevant, let us know.
32 changes: 8 additions & 24 deletions .github/workflows/DockerPublish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish Docker images
name: Publish Docker image
on:
release:
types: [published]
Expand All @@ -17,36 +17,20 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GH_DOCKER }}

- name: Build and push frontend
- name: Build and push image
uses: docker/build-push-action@v2
with:
push: true
file: ./frontend/Dockerfile
file: ./Dockerfile
labels: |
org.opencontainers.image.source=https://github.com/${{ github.repository }}/tree/main/frontend
org.opencontainers.image.source=https://github.com/${{ github.repository }}
org.opencontainers.image.authors=${{ github.actor }}
org.opencontainers.image.url=https://github.com/${{ github.repository }}
org.opencontainers.image.documentation=https://github.com/${{ github.repository }}/blob/main/README.md
org.opencontainers.image.version=${{ github.event.release.tag_name }}
org.opencontainers.image.vendor=${{ github.actor }}
org.opencontainers.image.title=mann-eller-kvinne frontend
org.opencontainers.image.description=Frontend for mann-eller-kvinne
org.opencontainers.image.title=mann-eller-kvinne
org.opencontainers.image.description=The mann-eller-kvinne backend
tags: |
ghcr.io/lblend/mann-eller-kvinne:frontend-${{ github.event.release.tag_name }}
- name: Build and push backend
uses: docker/build-push-action@v2
with:
push: true
file: ./backend/Dockerfile
labels: |
org.opencontainers.image.source=https://github.com/${{ github.repository }}/tree/main/backend
org.opencontainers.image.authors=${{ github.actor }}
org.opencontainers.image.url=https://github.com/${{ github.repository }}
org.opencontainers.image.documentation=https://github.com/${{ github.repository }}/blob/main/README.md
org.opencontainers.image.version=${{ github.event.release.tag_name }}
org.opencontainers.image.vendor=${{ github.actor }}
org.opencontainers.image.title=mann-eller-kvinne backend
org.opencontainers.image.description=Backend for mann-eller-kvinne
tags: |
ghcr.io/lblend/mann-eller-kvinne:backend-${{ github.event.release.tag_name }}
ghcr.io/lblend/mann-eller-kvinne:latest
ghcr.io/lblend/mann-eller-kvinne:${{ github.event.release.tag_name }}
24 changes: 0 additions & 24 deletions .github/workflows/JavascriptLint.yml

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/PythonLint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Python Linting
on:
push:
paths:
- "backend/src/**"
- "src/**"

jobs:
tests:
Expand All @@ -15,13 +15,13 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.8'
python-version: "3.10"

- name: Install dependencies
run: |
python -m pip install -U pip
pip install -r ./backend/requirements.txt
pip install -r requirements.txt
- name: Flake8 Lint
run: |
pip install flake8
Expand Down
67 changes: 0 additions & 67 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

21 changes: 4 additions & 17 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Project specific
bin/
logs/

# General
.vscode/

Expand All @@ -6,19 +10,6 @@ __pycache__/
bayes_model.pkl
corpus/


# Frontend
# dependencies
node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
build/

# misc
.DS_Store
.env
Expand All @@ -27,8 +18,4 @@ build/
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

.ipynb_checkpoints
21 changes: 0 additions & 21 deletions CONTRIBUTING-en.md

This file was deleted.

32 changes: 12 additions & 20 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,17 @@
# Bidragsguide
# 🇳🇴 Norsk

[English](CONTRIBUTING-en.md)
## Bidragssguide

## Generelt
- Sorter imports i alfabetisk rekkefølge
- Følg pep8
- Autoformatér koden med black
- Om du legger til noen nye avhengigheter så skal disse fryses til nyeste støttede versjon

Snart™
# 🇬🇧 English

## Back-end
## Contribution guidelines

All python kode må følge følgende konvesjoner:

* PEP8, men hvor maks antall tegn per linje er 120.
* Alle strings skal bruke enkle anførselstegn, altså `'`. Unntaket er om det er en string inni en string.
* Filer, variabler og funksjonsnavn skal bruke snake_case.


## Front-end

* Følg [standardJS](https://standardjs.com/) sine konvensjoner.


## Annet

* Docker-relaterte filer skal bruke doble anførselstegn, altså `"`.
- Sort imports by alphabetical order
- Make sure your code falls in line with pep8
- Format your code with black
- Make sure to pin dependencies to the latest supported version if you add any
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM python:3.10

WORKDIR /code

COPY . /code

RUN chmod +x /code/build.sh

RUN /code/build.sh

CMD ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "5000", "--proxy-headers"]
Loading

0 comments on commit 6efe799

Please sign in to comment.