-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from it-goats/develop
Release 0.1.0
- Loading branch information
Showing
72 changed files
with
2,636 additions
and
197 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,10 @@ | ||
<!-- | ||
- [ ] Provide a summary of the features and changes | ||
- [ ] Assign one or more reviewers | ||
--> | ||
|
||
--- | ||
|
||
#### Resources | ||
|
||
<!-- Include links to relevant Jira stories or visual resources. --> |
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,45 @@ | ||
name: "Bode CI" | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "bode/**" | ||
push: | ||
paths: | ||
- "bode/**" | ||
branches: | ||
- develop | ||
- master | ||
|
||
jobs: | ||
ci: | ||
name: "Bode CI - linting & formatting" | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./bode | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.10.4" | ||
- uses: abatilo/actions-poetry@v2.0.0 | ||
with: | ||
poetry-version: "1.1.13" | ||
|
||
- run: poetry config virtualenvs.in-project true | ||
|
||
- name: Install dependencies | ||
run: | | ||
poetry config virtualenvs.in-project true | ||
poetry install | ||
- name: Check formatting | ||
run: poetry run black bode migrations --check --verbose | ||
|
||
- name: Lint | ||
run: poetry run flake8 bode migrations --verbose | ||
|
||
- name: Check sorting | ||
run: poetry run isort bode migrations --check |
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,38 @@ | ||
name: "Cabra CI" | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "cabra/**" | ||
push: | ||
paths: | ||
- "cabra/**" | ||
branches: | ||
- develop | ||
- master | ||
|
||
jobs: | ||
ci: | ||
name: "Cabra CI - linting, formatting & type checking" | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./cabra | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: "16.14.2" | ||
|
||
- name: Install Dependencies | ||
run: npm ci | ||
|
||
- name: Check formatting | ||
run: npm run format:check | ||
|
||
- name: Check types | ||
run: npm run types:check | ||
|
||
- name: Lint | ||
run: npm run lint:check |
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,15 @@ | ||
name: "PR Jira check" | ||
on: | ||
pull_request: | ||
branches: | ||
- develop | ||
types: [opened, edited, reopened, synchronize] | ||
|
||
jobs: | ||
check-jira-presence: | ||
name: "Verify PR title starts with [NOJIRA] or [PROJECT-123]" | ||
runs-on: ubuntu-latest | ||
env: | ||
PR_TITLE: ${{ github.event.pull_request.title }} | ||
steps: | ||
- run: egrep '^\[(NOJIRA|([[:upper:]]{3,}\-[[:digit:]]+[[:blank:],]+)*[[:upper:]]{3,}\-[[:digit:]]+)\]' <<< ${PR_TITLE} |
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,2 +1,5 @@ | ||
.vscode/ | ||
node_modules/ | ||
.vscode/* | ||
!.vscode/extensions.json | ||
|
||
node_modules/ | ||
.env |
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,17 @@ | ||
{ | ||
"recommendations": [ | ||
"esbenp.prettier-vscode", | ||
"dbaeumer.vscode-eslint", | ||
"amatiasq.sort-imports", | ||
"bradlc.vscode-tailwindcss", | ||
"dsznajder.es7-react-js-snippets", | ||
"wix.glean", | ||
"ms-python.python", | ||
"ms-python.vscode-pylance", | ||
"ms-azuretools.vscode-docker", | ||
"ms-vscode-remote.remote-containers", | ||
"mhutchie.git-graph", | ||
"eamodio.gitlens", | ||
"oderwat.indent-rainbow" | ||
] | ||
} |
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,2 @@ | ||
[flake8] | ||
max-line-length = 120 |
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,37 @@ | ||
import uuid | ||
|
||
from sqlalchemy.dialects.postgresql import UUID | ||
|
||
from bode.app import db | ||
from bode.models.task_tag import task_tag | ||
|
||
|
||
class Tag(db.Model): | ||
__tablename__ = "tags" | ||
|
||
id = db.Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4) | ||
name = db.Column(db.String(80), unique=True, nullable=False) | ||
|
||
task = db.relationship("Task", secondary=task_tag, back_populates="tags") | ||
|
||
def create(tag_name): | ||
tag = Tag(name=tag_name) | ||
|
||
db.session.add(tag) | ||
db.session.commit() | ||
|
||
return tag | ||
|
||
def delete(tag_id): | ||
tag = Tag.query.get_or_404(tag_id) | ||
|
||
db.session.delete(tag) | ||
db.session.commit() | ||
|
||
return tag | ||
|
||
def get_by_name(tag_name): | ||
return Tag.query.filter(Tag.name == tag_name).first() | ||
|
||
def __repr__(self): | ||
return f'<Tag {self.id} \n name="{self.name}">' |
Oops, something went wrong.