Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dependabot, a github action and requirements.txt #3

Merged
merged 5 commits into from
Jan 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[flake8]
exclude =
venv/*
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "/" # Monitor all Python dependencies in the repository
schedule:
interval: "daily" # Check for updates daily
open-pull-requests-limit: 10 # Limit open pull requests to 10
reviewers:
- "zippy1981" # Optional: request review from a specific user
36 changes: 36 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Python with Virtual Environment

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Create and activate virtual environment
run: |
python -m venv venv
source venv/bin/activate

- name: Install dependencies
run: pip install -r requirements.txt

- name: Install linting tool
run: pip install flake8 # Install flake8 within the virtual environment

- name: Lint Python code
run: flake8 . # Lint all Python files in the current directory

- name: Run tests
run: python -m unittest
6 changes: 2 additions & 4 deletions get_display_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@

# Create a Mastodon API instance
mastodon = Mastodon(
# client_id = 'your_client_key',
# client_secret = 'your_client_secret',
access_token = settings.MASTODON_API.KEY,
api_base_url = f'https://{settings.MASTODON_API.SERVER or "mastadon.social"}'
access_token=settings.MASTODON_API.KEY,
api_base_url=f'https://{settings.MASTODON_API.SERVER or "mastadon.social"}'
)

# Get the display names
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dynaconf==3.2.4
Mastodon.py==1.8.1