Skip to content

Commit

Permalink
Merge pull request #40 from ppfeufer/development
Browse files Browse the repository at this point in the history
pushing v2.4.3
  • Loading branch information
ppfeufer authored Dec 10, 2020
2 parents dfe7553 + d9d79ba commit 21fee9d
Show file tree
Hide file tree
Showing 12 changed files with 216 additions and 89 deletions.
5 changes: 5 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[flake8]
exclude = .git, *migrations*, .tox, dist, htmlcov
select = C,E,F,W,B,B950
ignore = E203, E231, E501, W503, W291, W293
max-line-length = 120
64 changes: 64 additions & 0 deletions .github/workflows/automated-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Run Automated Checks

on:
push:
branches:
- '**'

tags-ignore:
- v*

jobs:
# pre-commit checks
pre-commit:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2

- name: Run Pre Commit Checks
uses: pre-commit/[email protected]

# black formatter
black-format:
needs: pre-commit
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Run Black Formatter Checks
uses: Ahuge/black-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BLACK_ARGS: "."

# pypi build test
build-test:
needs: black-format
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install Tools
run: |
python -m pip install --upgrade pip
pip install setuptools wheel
- name: Package Build
env:
STACKMANAGER_VERSION: 9999
run: |
python setup.py sdist bdist_wheel
22 changes: 0 additions & 22 deletions .github/workflows/black.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/pypi-package-build-test.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.3.0
hooks:
- id: check-case-conflict
- id: check-json
- id: check-xml
- id: check-yaml
- id: fix-byte-order-marker
- id: trailing-whitespace
exclude: \.(min\.css|min\.js|po|mo)$
- id: end-of-file-fixer
exclude: \.(min\.css|min\.js|po|mo)$
- id: mixed-line-ending
args: [ '--fix=lf' ]

- repo: https://github.com/psf/black
rev: 20.8b1
hooks:
- id: black
language_version: python3.6

- repo: https://gitlab.com/pycqa/flake8
rev: '3.8.4'
hooks:
- id: flake8
26 changes: 16 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).


## [2.4.3] - 2020-12-10

### Fixed

- An issue with quotes in the doctrines field (#38)


## [2.4.2] - 2020-11-08

### Fixed
Expand All @@ -32,7 +39,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Important!

Before updating to this version, make sure you have your Alliance Auth updated to version 2.8.0 (or newer).
This version of AA Fleetpings uses a JavaScript library that is introduced in Alliance Auth 2.8.0,
This version of AA Fleetpings uses a JavaScript library that is introduced in Alliance Auth 2.8.0,
so have your Auth updated before installing this version.

### Fixed
Expand Down Expand Up @@ -76,7 +83,7 @@ so have your Auth updated before installing this version.

### Added

- Option to use the fittings from the [Fittings and Doctrines](https://gitlab.com/colcrunch/fittings) module if you have it installed
- Option to use the fittings from the [Fittings and Doctrines](https://gitlab.com/colcrunch/fittings) module if you have it installed


## [2.1.0] - 2020-09-16
Expand All @@ -89,11 +96,11 @@ so have your Auth updated before installing this version.

## [2.0.0] - 2020-09-15

This is the official re-brand of AA Discord Ping Formatter, since the original name didn't fit anymore with
This is the official re-brand of AA Discord Ping Formatter, since the original name didn't fit anymore with
the new features, like automatic pings and now the new Slack implementation.

If you were testing one of the alpha versions of AA Discord Ping Formatter, make sure to migrate
discordpingformatter zero and deactivate the old app in your local.py before activating this one.
If you were testing one of the alpha versions of AA Discord Ping Formatter, make sure to migrate
discordpingformatter zero and deactivate the old app in your local.py before activating this one.
They will not run side by side.

This is how you do it:
Expand All @@ -102,7 +109,7 @@ python manage.py migrate discordpingformatter zero
```
Now remove the `'discordpingformatter',` line and add `'fleetpings',` instead.

Once done, run collectstatic and migrations again. You now have to re-do your settings in the admin
Once done, run collectstatic and migrations again. You now have to re-do your settings in the admin
backend, since we just nuked them from the old app.

### Added
Expand All @@ -111,15 +118,14 @@ backend, since we just nuked them from the old app.

### Changed

- **!! breaking change !!** Settings are no longer in your `local.py`. You find them now in your admin backend. Which means. after installing this version, you _have_ to re-do you setting in the admin backend of Auth. But trust me, it's worth the effort.
- **!! breaking change !!** Settings are no longer in your `local.py`. You find them now in your admin backend. Which means. after installing this version, you _have_ to re-do you setting in the admin backend of Auth. But trust me, it's worth the effort.
- Minimum AA version set to 2.7.4 since we use a feature that was introduced in this version. So make sure to update your Alliance Auth before testing this app.

### Fixed

- Several logic errors in the JavaScript



## From the discontinued AA Discord Ping Formatter (to keep the history alive)


Expand Down Expand Up @@ -171,7 +177,7 @@ backend, since we just nuked them from the old app.
- Set time selection steps to 15 minutes instead of 60 in te datepicker
- Set Monday as the beginning of the week in the datepicker

### Fixed
### Fixed

- Our Australian time travelers and everyone else who lives in the future (UTC+x) is now able to pre-ping fleets that are coming up in 2 hours Eve time, which might still be in their past local time, depending on how far in the future they live. (#19)

Expand Down Expand Up @@ -256,7 +262,7 @@ backend, since we just nuked them from the old app.

### Fixed

- sanitizing form field input
- sanitizing form field input


## [0.1.1] - 2020-06-13
Expand Down
37 changes: 37 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Contributing to AA Fleet Pings

## Code Formatting

This app is utilizing the [Black](https://black.readthedocs.io/en/stable/the_black_code_style.html)
code style. Every commit has to adhere to it.

This repository uses [pre-commit](https://github.com/pre-commit/pre-commit) to
verify compliance with formatting rules. To use:

1. Install `pre-commit`.
2. From inside the `aa-srp` root directory, run `pre-commit install`.
3. You're all done! Code will be checked automatically using git hooks.

You can check if your code to commit adheres to the given style by simply running:
```shell script
pre-commit
```
or to check all files:
```shell script
pre-commit run --all-files
```

The following will be checked by `pre-commit`:

- no trailing whitespaces (excluded are: minified js and css, .po and .mo files)
- one, and only one, empty line at the end of every file (excluded are: minified js and css, .po and .mo files)
- line ending is LF
- code formatted according to black code style
- code conforms with flake8


## Contributing via pull requests

To contribute code via pull request, make sure that you fork the repository and branch
your changes from the `development` branch. Only pull requests towards the development
branch will be considered.
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@
App for Alliance Auth that can format your fleet pings and also ping for you to Discord and Slack.

Formerly known as [AA Discord Ping Formatter](https://github.com/ppfeufer/aa-discord-ping-formatter).
Since the original app evolved and with the now added support to ping Slack as well,
I felt the name was no longer fitting, so I re-branded the app as "AA Fleet Pings". The old Discord ping

Since the original app evolved and with the now added support to ping Slack as well,
I felt the name was no longer fitting, so I re-branded the app as "AA Fleet Pings". The old Discord ping
formatter will be discontinued in favor of this one.

If you used the old app until now (not the alpha versions), don't worry, nothing is breaking. At least I hope so.
If you used the old app until now (not the alpha versions), don't worry, nothing is breaking. At least I hope so.
Since this app has a complete new code base and a different name it shouldn't interfere with the old one.
All you need to do is to set the new permission for the groups that need to have access to this app.

If you run into any trouble, feel free to shout at me on the [Alliance Auth Support Discord](https://discord.gg/fjnHAmk).
If you run into any trouble, feel free to shout at me on the [Alliance Auth Support Discord](https://discord.gg/fjnHAmk).
You find me there as Rounon Dax.

## Contents
Expand All @@ -31,8 +31,8 @@ You find me there as Rounon Dax.

## Installation

**Important**: This app is a plugin for Alliance Auth. If you don't have Alliance Auth running already,
please install it first before proceeding.
**Important**: This app is a plugin for Alliance Auth. If you don't have Alliance Auth running already,
please install it first before proceeding.
(see the official [AA installation guide](https://allianceauth.readthedocs.io/en/latest/installation/allianceauth.html) for details)

### Step 0 - Migrating from AA Discord Ping Formatter
Expand All @@ -54,7 +54,7 @@ Once done, feel free to install this app by following the steps above.

### Step 1 - Install the app

Make sure you are in the virtual environment (venv) of your Alliance Auth installation.
Make sure you are in the virtual environment (venv) of your Alliance Auth installation.
Then install the latest version:

```bash
Expand Down Expand Up @@ -84,15 +84,15 @@ Restart your supervisor services for AA

### Step 4 - Setup permission

Now you can setup permissions in Alliance Auth for your users.
Add ``fleetpings | aa fleet pings | Can access this app`` to the states and/or
Now you can setup permissions in Alliance Auth for your users.
Add ``fleetpings | aa fleet pings | Can access this app`` to the states and/or
groups you would like to have access.

### Step 5 - Setup the app

In your admin backend you'll find a new section called `Fleet Pings`.
This is where you set all your stuff up, like the webhooks you want to ping and who can ping them,
fleet types, comms, formup locations and so on. It's pretty straight forward,
In your admin backend you'll find a new section called `Fleet Pings`.
This is where you set all your stuff up, like the webhooks you want to ping and who can ping them,
fleet types, comms, formup locations and so on. It's pretty straight forward,
so you shouldn't have any issues. Go nuts!

## Updating
Expand Down Expand Up @@ -136,15 +136,15 @@ Finally restart your AA supervisor services.

### Using Slack instead of Discord?

Don't worry, I don't judge and you still can use this module. It supports also pings to Slack.
Simply add the following to your `local.py`.
Don't worry, I don't judge and you still can use this module. It supports also pings to Slack.
Simply add the following to your `local.py`.

```python
## AA Fleet Pings
AA_FLEETPINGS_USE_SLACK = True
```

Although you cannot use your Auth groups as targets for pings with Slack. Auth doesn't supprt Slack as of yet.
Although you cannot use your Auth groups as targets for pings with Slack. Auth doesn't supprt Slack as of yet.
(Maybe if someone writes a service?)

### Slack Ping Example
Expand All @@ -153,8 +153,8 @@ Although you cannot use your Auth groups as targets for pings with Slack. Auth d

### Use Doctrines from Fittings module

If you have the [Fittings and Doctrines](https://gitlab.com/colcrunch/fittings) module installed and your doctrines configured there,
you don't have to re-build your doctrine list for this module. You can simply use the doctrines you
If you have the [Fittings and Doctrines](https://gitlab.com/colcrunch/fittings) module installed and your doctrines configured there,
you don't have to re-build your doctrine list for this module. You can simply use the doctrines you
already have configured in the Fittings and Doctrines module.

To do so, add the following to your `local.py`:
Expand Down
2 changes: 1 addition & 1 deletion fleetpings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@

default_app_config: str = "fleetpings.apps.AaFleetpingsConfig"

__version__ = "2.4.2"
__version__ = "2.4.3"
__title__ = "Fleet Pings"
Loading

0 comments on commit 21fee9d

Please sign in to comment.