-
Notifications
You must be signed in to change notification settings - Fork 0
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 #32 from soup-bowl/edge
Release
- Loading branch information
Showing
14 changed files
with
595 additions
and
720 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,15 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "pip" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" | ||
groups: | ||
dev-dependencies: | ||
patterns: | ||
- "*" |
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,7 @@ | ||
{ | ||
"python.testing.pytestArgs": [ | ||
"tests" | ||
], | ||
"python.testing.unittestEnabled": false, | ||
"python.testing.pytestEnabled": true | ||
} |
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,18 +1,18 @@ | ||
FROM python:3.8-slim | ||
|
||
LABEL org.opencontainers.image.title="Soup-bowl's Hot this Week" | ||
LABEL org.opencontainers.image.authors="code@soupbowl.io" | ||
LABEL org.opencontainers.image.source="https://github.com/soup-bowl/hot-this-week" | ||
LABEL org.opencontainers.image.licenses="MIT" | ||
FROM python:3-slim | ||
|
||
WORKDIR /opt/app | ||
|
||
COPY htw htw | ||
COPY assets assets | ||
COPY pyproject.toml pyproject.toml | ||
COPY poetry.lock poetry.lock | ||
COPY pyproject.toml poetry.lock ./ | ||
|
||
RUN pip install --no-cache-dir poetry | ||
RUN poetry install --no-dev --no-interaction --no-ansi | ||
|
||
COPY htw htw | ||
COPY assets assets | ||
|
||
ENTRYPOINT [ "poetry", "run", "python", "-m", "htw" ] | ||
|
||
LABEL org.opencontainers.image.title="Soup-bowl's Hot this Week" | ||
LABEL org.opencontainers.image.authors="code@soupbowl.io" | ||
LABEL org.opencontainers.image.source="https://github.com/soup-bowl/hot-this-week" | ||
LABEL org.opencontainers.image.licenses="MIT" |
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
version: '3.6' | ||
services: | ||
bot: | ||
build: | ||
|
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,23 @@ | ||
""" | ||
Contains the communication class for composing messages. | ||
""" | ||
|
||
class Compose(): | ||
"""Contains the communication class for composing messages. | ||
""" | ||
|
||
def compose_tweet(self, lfm_collection, name): | ||
"""Compose tweet message contents. | ||
Args: | ||
lfm_collection ([type]): Last.fm user data collection. | ||
name (str): Last.fm username. | ||
Returns: | ||
[str]: Message contents. | ||
""" | ||
message = "\U0001F4BF my week with #lastfm:\n" | ||
for artist in lfm_collection: | ||
message = message + f"{artist['name']} ({artist['plays']})\n" | ||
message = message + f"https://www.last.fm/user/{name}" | ||
return message |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.