11 Commits

Author SHA1 Message Date
0x5c d33dad9f89 Bump version to 2.7.6 2022-06-13 12:58:18 -04:00
0x5c be083d2cc8 Merge pull request #446 from miaowware/muf-fof2-bug
Fix aiohttp/apache http2 bug in ?muf and ?fof2
2022-06-13 09:00:52 -04:00
0x5c e2d1d1fc87 Fix aiohttp/apache http2 bug in ?muf and ?fof2
For more info, https://github.com/aio-libs/aiohttp/issues/3904
It is not possible to fix it by bumping aiohttp since it is pinned by another
dependency.
2022-06-13 08:45:17 -04:00
classabbyamp 68eaeff476 update to 2.7.5 2022-06-08 21:16:14 -07:00
0x5c f690ebb357 Merge pull request #444 from miaowware/ci-lint
[CI/linting]: Change trigger and flake8 output
2022-05-17 21:23:46 -04:00
0x5c 51e571b97d [CI/linting]: Change trigger and flake8 output
Fixes #443
2022-05-17 21:20:10 -04:00
classabbyamp 85ac05c337 Merge pull request #438 from miaowware/clog-enforce-workflow
CI updates
2021-11-06 00:22:55 -04:00
classabbyamp 718b2a7a80 add python 3.10 to linting checks 2021-11-05 23:34:26 -04:00
classabbyamp 0189db8792 add workflow to enforce changelog updating before merge 2021-11-05 23:31:14 -04:00
classabbyamp 80d6a989cc move to new void docker image, clean up dockerfile (#436)
Co-authored-by: 0x5c <dev@0x5c.io>
2021-11-05 17:51:46 -04:00
classabbyamp 8f1782dcc0 ensure docker image id is lowercase (#437)
fixes #413
2021-11-05 17:31:45 -04:00
8 changed files with 60 additions and 57 deletions
+12
View File
@@ -0,0 +1,12 @@
name: "Checks"
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]
jobs:
changelog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dangoslen/changelog-enforcer@v2
+9 -4
View File
@@ -27,7 +27,9 @@ jobs:
- name: Build image - name: Build image
id: build_image id: build_image
run: | run: |
IMAGE_NAME=${GITHUB_REPOSITORY#*/} IMAGE_ID=${GITHUB_REPOSITORY,,}
IMAGE_NAME=${IMAGE_ID#*/}
echo ::set-output name=image_id::$IMAGE_ID
echo ::set-output name=image_name::$IMAGE_NAME echo ::set-output name=image_name::$IMAGE_NAME
docker build . --file Dockerfile -t $IMAGE_NAME docker build . --file Dockerfile -t $IMAGE_NAME
@@ -42,7 +44,7 @@ jobs:
id: tag_image id: tag_image
run: | run: |
IMAGE_NAME=${{ steps.build_image.outputs.image_name }} IMAGE_NAME=${{ steps.build_image.outputs.image_name }}
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME IMAGE_ID=ghcr.io/${{ steps.build_image.outputs.image_id }}
echo IMAGE_ID=$IMAGE_ID echo IMAGE_ID=$IMAGE_ID
echo ::set-output name=image_id::$IMAGE_ID echo ::set-output name=image_id::$IMAGE_ID
@@ -62,8 +64,11 @@ jobs:
- name: Push images to registry - name: Push images to registry
run: | run: |
[[ "${{ steps.tag_image.outputs.version }}" != "dev" ]] && docker push ${{ steps.tag_image.outputs.image_id }}:latest || true VERSION=${{ steps.tag_image.outputs.version }}
docker push ${{ steps.tag_image.outputs.image_id }}:${{ steps.tag_image.outputs.version }} IMAGE_ID=${{ steps.tag_image.outputs.image_id }}
[[ "$VERSION" != "dev" ]] && docker push $IMAGE_ID:latest || true
docker push $IMAGE_ID:$VERSION
- name: Deploy official images - name: Deploy official images
id: deploy_images id: deploy_images
+9 -31
View File
@@ -1,44 +1,22 @@
name: Linting name: Linting
on: [push,pull_request] on:
push:
branches:
- master
pull_request:
jobs: jobs:
precheck:
runs-on: ubuntu-20.04
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
# skip concurrent jobs if they are on the same thing
concurrent_skipping: 'same_content'
# never skip PR + manual/scheduled runs
do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]'
flake8: flake8:
needs: precheck runs-on: ubuntu-latest
if: ${{ needs.precheck.outputs.should_skip != 'true' }}
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.9]
steps: steps:
- uses: actions/checkout@master - uses: actions/checkout@master
- name: Setup Python ${{ matrix.python-version }} - name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v1 uses: actions/setup-python@v3
with: with:
python-version: ${{ matrix.python-version }} python-version: "3.9"
architecture: x64 architecture: x64
- name: Install flake8 - name: Install flake8
run: pip install flake8 run: pip install flake8
- name: Run flake8 - name: Run flake8
uses: suo/flake8-github-action@releases/v1 run: flake8 --format='::error title=flake8,file=%(path)s,line=%(row)d,col=%(col)d::[%(code)s] %(text)s'
with:
checkName: 'flake8' # NOTE: this needs to be the same as the job name
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+13 -1
View File
@@ -7,6 +7,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [Unreleased] ## [Unreleased]
## [2.7.6] - 2022-06-13
### Fixed
- Issue where `?muf` and `?fof2` would fail with an aiohttp error.
## [2.7.5] - 2022-06-08
### Changed
- Bumped ctyparser to 2.2.1.
## [2.7.4] - 2021-10-07 ## [2.7.4] - 2021-10-07
### Added ### Added
- a new way to support qrm's development. - a new way to support qrm's development.
@@ -214,7 +224,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## 1.0.0 - 2019-07-31 [YANKED] ## 1.0.0 - 2019-07-31 [YANKED]
[Unreleased]: https://github.com/miaowware/qrm2/compare/v2.7.4...HEAD [Unreleased]: https://github.com/miaowware/qrm2/compare/v2.7.6...HEAD
[2.7.6]: https://github.com/miaowware/qrm2/releases/tag/v2.7.6
[2.7.5]: https://github.com/miaowware/qrm2/releases/tag/v2.7.5
[2.7.4]: https://github.com/miaowware/qrm2/releases/tag/v2.7.4 [2.7.4]: https://github.com/miaowware/qrm2/releases/tag/v2.7.4
[2.7.3]: https://github.com/miaowware/qrm2/releases/tag/v2.7.3 [2.7.3]: https://github.com/miaowware/qrm2/releases/tag/v2.7.3
[2.7.2]: https://github.com/miaowware/qrm2/releases/tag/v2.7.2 [2.7.2]: https://github.com/miaowware/qrm2/releases/tag/v2.7.2
+12 -11
View File
@@ -1,17 +1,19 @@
FROM voidlinux/voidlinux FROM ghcr.io/void-linux/void-linux:latest-mini-x86_64
LABEL org.opencontainers.image.source https://github.com/miaowware/qrm2
COPY . /app COPY . /app
WORKDIR /app WORKDIR /app
ENV PYTHON_BIN python3 ARG REPOSITORY=https://repo-us.voidlinux.org/current
ARG PKGS="cairo libjpeg-turbo"
ARG UID 1000
ARG GID 1000
RUN \ RUN \
echo "**** update packages ****" && \ echo "**** update system ****" && \
xbps-install -Suy && \ xbps-install -SuyM -R ${REPOSITORY} && \
echo "**** install system packages ****" && \ echo "**** install system packages ****" && \
export runtime_deps='cairo libjpeg-turbo' && \ xbps-install -yM -R ${REPOSITORY} ${PKGS} python3 python3-pip && \
export runtime_pkgs="${runtime_deps} python3-pip python3" && \
xbps-install -y $runtime_pkgs && \
echo "**** install pip packages ****" && \ echo "**** install pip packages ****" && \
pip3 install -U pip setuptools wheel && \ pip3 install -U pip setuptools wheel && \
pip3 install -r requirements.txt && \ pip3 install -r requirements.txt && \
@@ -21,10 +23,9 @@ RUN \
/tmp/* \ /tmp/* \
/var/cache/xbps/* /var/cache/xbps/*
ARG UID ENV PYTHON_BIN python3
ENV UID=${UID:-1000} ENV PYTHONUNBUFFERED 1
ARG GID
ENV GID=${GID:-1000}
USER $UID:$GID USER $UID:$GID
CMD ["/bin/sh", "run.sh", "--pass-errors", "--no-botenv"] CMD ["/bin/sh", "run.sh", "--pass-errors", "--no-botenv"]
+2 -7
View File
@@ -23,14 +23,11 @@ This is the easiest method for running the bot without any modifications.
version: '3' version: '3'
services: services:
qrm2: qrm2:
image: "docker.pkg.github.com/miaowware/qrm2/qrm2:latest" image: "ghcr.io/miaowware/qrm2:latest"
restart: on-failure restart: on-failure
volumes: volumes:
- "./data:/app/data:rw" - "./data:/app/data:rw"
environment:
- PYTHONUNBUFFERED=1
``` ```
*Note that Github's registry requires [a few extra steps](https://docs.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-docker-for-use-with-github-packages) during the initial setup.*
3. Create a subdirectory named `data`. 3. Create a subdirectory named `data`.
@@ -64,8 +61,6 @@ This is the easiest method to run the bot with modifications.
restart: on-failure restart: on-failure
volumes: volumes:
- "./data:/app/data:rw" - "./data:/app/data:rw"
environment:
- PYTHONUNBUFFERED=1
``` ```
3. Create a subdirectory named `data`. 3. Create a subdirectory named `data`.
@@ -112,4 +107,4 @@ This methods is not very nice to use.
Where `[image]` is either of: Where `[image]` is either of:
- `qrm2:local-latest` if you are building your own. - `qrm2:local-latest` if you are building your own.
- `docker.pkg.github.com/miaowware/qrm2/qrm2:latest` if you want to use the prebuilt image. - `ghcr.io/miaowware/qrm2:latest` if you want to use the prebuilt image.
+2 -2
View File
@@ -33,7 +33,7 @@ class PropagationCog(commands.Cog):
async def mufmap(self, ctx: commands.Context): async def mufmap(self, ctx: commands.Context):
"""Shows a world map of the Maximum Usable Frequency (MUF).""" """Shows a world map of the Maximum Usable Frequency (MUF)."""
async with ctx.typing(): async with ctx.typing():
async with self.session.get(self.muf_url) as r: async with self.session.get(self.muf_url, headers={"Connection": "Upgrade", "Upgrade": "http/1.1"}) as r:
svg = await r.read() svg = await r.read()
out = BytesIO(cairosvg.svg2png(bytestring=svg)) out = BytesIO(cairosvg.svg2png(bytestring=svg))
file = discord.File(out, "muf_map.png") file = discord.File(out, "muf_map.png")
@@ -47,7 +47,7 @@ class PropagationCog(commands.Cog):
async def fof2map(self, ctx: commands.Context): async def fof2map(self, ctx: commands.Context):
"""Shows a world map of the Critical Frequency (foF2).""" """Shows a world map of the Critical Frequency (foF2)."""
async with ctx.typing(): async with ctx.typing():
async with self.session.get(self.fof2_url) as r: async with self.session.get(self.fof2_url, headers={"Connection": "Upgrade", "Upgrade": "http/1.1"}) as r:
svg = await r.read() svg = await r.read()
out = BytesIO(cairosvg.svg2png(bytestring=svg)) out = BytesIO(cairosvg.svg2png(bytestring=svg))
file = discord.File(out, "fof2_map.png") file = discord.File(out, "fof2_map.png")
+1 -1
View File
@@ -14,5 +14,5 @@ contributing = """Check out the [source on GitHub](https://github.com/miaowware/
All issues and requests related to resources (including maps, band charts, data) should be added \ All issues and requests related to resources (including maps, band charts, data) should be added \
in [miaowware/qrm-resources](https://github.com/miaowware/qrm-resources).""" in [miaowware/qrm-resources](https://github.com/miaowware/qrm-resources)."""
release = "2.7.4" release = "2.7.6"
bot_server = "https://discord.gg/Ntbg3J4" bot_server = "https://discord.gg/Ntbg3J4"