Skip to content

Commit

Permalink
applied pre-commit run-all files for end-of-file-fixer & trailing-whi…
Browse files Browse the repository at this point in the history
…tespace
  • Loading branch information
mahesh-naxa committed May 3, 2024
1 parent 703053f commit 0b54581
Show file tree
Hide file tree
Showing 95 changed files with 227 additions and 239 deletions.
6 changes: 2 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- checkout
- run:
name: flake8 tests
command: |
command: |
pip install flake8
flake8 manage.py backend tests migrations
Expand All @@ -53,7 +53,7 @@ jobs:
- checkout
- run:
name: black tests
command: |
command: |
pip install 'black==23.12.1' ## TODO: Update to version 24
black --check manage.py backend tests migrations
Expand Down Expand Up @@ -509,5 +509,3 @@ workflows:
- backend-code-check-PEP8
- backend-code-check-Black
- backend-functional-tests


2 changes: 1 addition & 1 deletion .circleci/rdsid.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ for line in $ARNS; do
if [[ ! -z $MATCHES ]]; then
echo $MATCHES
fi
done
done
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ exclude_lines =

# Don't complain if tests don't hit defensive assertion code:
except Exception as e:


ignore_errors = True

Expand Down
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ frontend/package-lock.json
frontend/.env
frontend/.eslintcache
frontend/coverage/

28 changes: 14 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
# - id: trailing-whitespace
# name: trim trailing whitespace
# description: trims trailing whitespace.
# entry: trailing-whitespace-fixer
# language: python
# types: [text]
# stages: [commit, push, manual]
- id: trailing-whitespace
name: trim trailing whitespace
description: trims trailing whitespace.
entry: trailing-whitespace-fixer
language: python
types: [text]
stages: [commit, push, manual]

# - id: end-of-file-fixer
# name: fix end of files
# description: ensures that a file is either empty, or ends with one newline.
# entry: end-of-file-fixer
# language: python
# types: [text]
# stages: [commit, push, manual]
- id: end-of-file-fixer
name: fix end of files
description: ensures that a file is either empty, or ends with one newline.
entry: end-of-file-fixer
language: python
types: [text]
stages: [commit, push, manual]

- id: detect-aws-credentials
name: detect aws credentials
Expand Down
1 change: 0 additions & 1 deletion .tx/config
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,3 @@ trans.el = frontend/src/locales/el.json
trans.it = frontend/src/locales/it.json
trans.ja = frontend/src/locales/ja.json
trans.zh_TW = frontend/src/locales/zh_TW.json

2 changes: 1 addition & 1 deletion backend/services/messaging/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ <h1 style="font-family: sans-serif; font-weight: 500; margin: 0 0 20px 0; font-s
</td>
</tr>
</table>
</div>
</div>
</div>
</td>
</tr>
Expand Down
22 changes: 11 additions & 11 deletions backend/services/messaging/templates/encourage_mapper_en.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
Hi {{ values["USERNAME"] }}
</h1>
<p style="margin-bottom: 1.714rem; line-height: 1.5;">
you recently participated in the mapping project -
<a style="color: #d73f3f; font-weight: 700" href="{{values['APP_BASE_URL']}}/projects/{{values['PROJECT_ID']}}">{{values['PROJECT_NAME']}}</a> - on the
you recently participated in the mapping project -
<a style="color: #d73f3f; font-weight: 700" href="{{values['APP_BASE_URL']}}/projects/{{values['PROJECT_ID']}}">{{values['PROJECT_NAME']}}</a> - on the
<a style="color: #d73f3f; font-weight: 700" href="{{values['APP_BASE_URL']}}">{{values["ORG_CODE"]}} Tasking Manager</a>.
We want to inform you the project has reached <span style=" font-weight: 700">{{ values["PROJECT_COMPLETION"] }}% </span> of completeness.
<br> <br>
Expand All @@ -37,10 +37,10 @@
Hi {{ values["USERNAME"] }}
</h1>
<p style="margin-bottom: 1.714rem; line-height: 1.5;">
you recently participated in the mapping project -
<a style="color: #d73f3f; font-weight: 700" href="{{values['APP_BASE_URL']}}/projects/{{values['PROJECT_ID']}}">{{values['PROJECT_NAME']}}</a> - on the
you recently participated in the mapping project -
<a style="color: #d73f3f; font-weight: 700" href="{{values['APP_BASE_URL']}}/projects/{{values['PROJECT_ID']}}">{{values['PROJECT_NAME']}}</a> - on the
<a style="color: #d73f3f; font-weight: 700" href="{{values['APP_BASE_URL']}}">{{values["ORG_CODE"]}} Tasking Manager</a>.
We want to inform you the project has been completed. It is time to celebrate!
We want to inform you the project has been completed. It is time to celebrate!
<br>
Do you want to continue? Find the suitable project for you here: <a style="color: #d73f3f" href="{{values['APP_BASE_URL']}}/explore">{{values['APP_BASE_URL']}}/explore</a>
</p>
Expand Down Expand Up @@ -92,7 +92,7 @@
aria-label=""
style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%; margin-bottom:2.285rem;"> <!-- Noncompliant -->
<th style="width:60%;">
<img style="text-decoration: none; font-weight: normal;"
<img style="text-decoration: none; font-weight: normal;"
src={{ project.org_logo }}
alt="logo of the organization" height="32"/>
</th>
Expand All @@ -109,19 +109,19 @@
<p style="
padding: 5px 8px;
border-radius: 2px;
border: 1px solid #faa71e;
border: 1px solid #faa71e;
color: #faa71e;">
{% elif project.priority == "MEDIUM" %}
<p style="
padding: 5px 8px;
border-radius: 2px;
border: 1px solid #929DB3;
border: 1px solid #929DB3;
color: #929DB3;">
{% elif project.priority == "LOW" %}
<p style="
padding: 5px 8px;
border-radius: 2px;
border: 1px solid #68707f;
border: 1px solid #68707f;
color: #68707f;">
{% endif %}
{{ project.priority }}
Expand Down Expand Up @@ -189,8 +189,8 @@
</div>
</div>
</div>
<table
aria-label=""
<table
aria-label=""
style="
margin-top: 4px;
align-items: center;
Expand Down
10 changes: 5 additions & 5 deletions backend/services/messaging/templates/profile-progress.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@
<tbody>
<tr>
<td style=" padding: 11px 24px; border: #d73f3f; border-radius:2px;" bgcolor="#d73f3f">
<a
href="{{values['APP_BASE_URL']}}/settings"
<a
href="{{values['APP_BASE_URL']}}/settings"
style="
font-size:1.142rem;
color: #ffffff;
font-size:1.142rem;
color: #ffffff;
text-decoration: none;
display: inline-block;
"
Expand All @@ -137,4 +137,4 @@
</table>
<!-- button component ends -->
</div>
{% endblock %}
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
<br>
<div style="padding: 0 2.357rem">
<p>
Project
Project
<a style="color: #d73f3f" href="{{values['APP_BASE_URL']}}/projects/{{values['PROJECT_ID']}}">{{values['PROJECT_NAME']}}</a>
associated with your organisation
associated with your organisation
<a style="color: #d73f3f" href="{{values['APP_BASE_URL']}}/organisations/{{values['PROJECT_ORG_ID']}}">{{values['PROJECT_ORG_NAME']}}</a>
has been transferred to
has been transferred to
<a style="color: #d73f3f" href="{{values['APP_BASE_URL']}}/users/{{values['TRANSFERRED_TO']}}">{{values['TRANSFERRED_TO']}}</a>
by
<a style="color: #d73f3f" href="{{values['APP_BASE_URL']}}/users/{{values['TRANSFERRED_BY']}}">{{values['TRANSFERRED_BY']}}</a>
on
<a style="color: #d73f3f" href="{{values['APP_BASE_URL']}}/users/{{values['TRANSFERRED_BY']}}">{{values['TRANSFERRED_BY']}}</a>
on
<a style="color: #d73f3f; font-weight: 700" href="{{values['APP_BASE_URL']}}">{{values["ORG_CODE"]}} Tasking Manager</a>.
</p>
<br><br>
Please ignore this email if you have received it by mistake.<br>
Many thanks,<br>
{{values['ORG_NAME']}}<br>
</div>
{% endblock %}
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
Validated
</td>
</tr>
</table>
</table>
<p
style="
font-size: 14px;
Expand Down Expand Up @@ -101,11 +101,11 @@
<tbody>
<tr>
<td style=" padding: 11px 24px; border: #d73f3f; border-radius:2px;" bgcolor="#d73f3f">
<a
href="{{values['APP_BASE_URL']}}/learn"
<a
href="{{values['APP_BASE_URL']}}/learn"
style="
font-size:1.142rem;
color: #ffffff;
font-size:1.142rem;
color: #ffffff;
text-decoration: none;
display: inline-block;
"
Expand Down
10 changes: 5 additions & 5 deletions backend/services/messaging/templates/welcome.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@
<tbody>
<tr>
<td style=" padding: 11px 24px; border: #d73f3f; border-radius:2px;" bgcolor="#d73f3f">
<a
href="{{values['APP_BASE_URL']}}"
<a
href="{{values['APP_BASE_URL']}}"
style="
font-size:1.142rem;
color: #ffffff;
font-size:1.142rem;
color: #ffffff;
text-decoration: none;
display: inline-block;
"
Expand All @@ -69,4 +69,4 @@
</table>
<!-- table component ends -->
</div>
{% endblock %}
{% endblock %}
2 changes: 1 addition & 1 deletion docker-compose.override.sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ services:
- 3000:3000
volumes:
- ./frontend:/usr/src/app
- /usr/src/app/node_modules
- /usr/src/app/node_modules
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ volumes:
name: tm-db-data-main

networks:
tm-net:
tm-net:
name: tm-net

services:
Expand Down
11 changes: 5 additions & 6 deletions docs/developers/contributing-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Currently, HOT has been collaborating with the developers at
[Naxa](https://www.naxa.com.np/) to help maintain and support
community development on the project. Their role as leaders on the
project and in the development community has greatly benefitted the
Tasking Manager development and sustainability of the project.
Tasking Manager development and sustainability of the project.
Previously [Kathmandu Living Labs](https://kathmandulivinglabs.org/)
has been maintained the Tasking Manager.

Expand Down Expand Up @@ -42,7 +42,7 @@ we work on shall be related to and documented in issues of the related
[cheatsheet](https://danielkummer.github.io/git-flow-cheatsheet/) if
you aren’t familiar with it yet. You probably want to install a
[helper application](https://github.com/nvie/gitflow/wiki/Installation) to
facilitate the flow a bit.*
facilitate the flow a bit.*

* Use branches in the tasking-manager project. This allows others to
rebase your branch when they are reviewing or to continue started
Expand All @@ -57,16 +57,16 @@ facilitate the flow a bit.*
release. (e.g. for a normal feature
feature/893-restrict-available-editors).
* Make sure your PR is always up to date and rebased with the latest
develop branch.
develop branch.
* Try to build a nice and understandable commit history of the
project. Please use [meaningful commit
messages](https://medium.com/@nawarpianist/git-commit-best-practices-dab8d722de99)
and try to unite/squash related work into one commit. Eventually we
will squash commits before merging a new feature or hotfix into the
main branches (develop and master).
main branches (develop and master).
* Give meaningful and understandable testing instructions in your
PR. Highlight important preconditions and try to make life easier
for the reviewer.
for the reviewer.

### Comments

Expand Down Expand Up @@ -157,4 +157,3 @@ it's much easier to read.
We welcome community members to review Pull Request. The process to
review a PR is by adding a comment if already reviewed and everything
looks good, or specifying what change is needed.

18 changes: 9 additions & 9 deletions docs/developers/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ committed to making sure your participation in our tech collective is
inclusive, enjoyable and rewarding. If you have never contributed to
an open-source project before, we are a good place to start and will
make sure you are supported every step of the way. If you have **any**
questions, please ask!
questions, please ask!

We are collaborating with [Naxa](https://www.naxa.com.np/) on the
maintenance of the Tasking Manager - expect to hear a lot from all of
Expand All @@ -25,27 +25,27 @@ The [issue queue](https://github.com/hotosm/tasking-manager/issues) is
the best way to get started. There are issue templates for BUGs and
FEATURES that you can use, or you can create your own. Once you have
submitted an issue, it will be assigned one label out of the following
[label categories](https://github.com/hotosm/tasking-manager/labels):
[label categories](https://github.com/hotosm/tasking-manager/labels):

- **Backlog**: Backlog=triage will first be assigned to any new issues
- **Component**

On a monthly basis, we will collaboratively triage issues from the
*backlog=triage* and assign one of the below labels:
*backlog=triage* and assign one of the below labels:

- **Assigned**: once reviewed the issue will be assigned either to
hot_tech OR tm_collective. Issues assigned to tm_collective are
where we really need your help!
where we really need your help!
- **Type**: specifying whether the issue is a bug or feature/enhancement
- **Priority**: specifying the priority level for each issue. We want
to collaboratively agree on the criteria for prioritisation.
to collaboratively agree on the criteria for prioritisation.
- **Status**: specifying whether the issue is in progress or done.
- **Experience**: we have added a beginner label for good first
issues. We will work with the community to update the labels in this
category and make them suitable.
category and make them suitable.

Note: Issues older than 6 months from the point of raising the issue
with no engagement will be labelled as *archived*.
with no engagement will be labelled as *archived*.

## Testing

Expand Down Expand Up @@ -84,10 +84,10 @@ languages.

Thank you very much in advance for your contributions!! Please ensure
you refer to our [Code of
Conduct](code_of_conduct.md) when you contribute!
Conduct](code_of_conduct.md) when you contribute!

If you've read the guidelines, but you are still not sure how to
contribute on Github, please reach out to us via our [ HOT Tech
Support
page]([https://hotosm.atlassian.net/servicedesk/customer/portal/4](https://hotosm.atlassian.net/servicedesk/customer/portal/4/group/5/create/51)
and we will be happy to help!
and we will be happy to help!
Loading

0 comments on commit 0b54581

Please sign in to comment.