Merge pull request #61 from glyn/improve-naming

Rename Python code
This commit is contained in:
Cory Dransfeldt 2025-01-06 08:10:47 -08:00 committed by GitHub
commit 8e98cc6049
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 5 additions and 4 deletions

View file

@ -16,13 +16,14 @@ jobs:
git config --global user.name "dark-visitors" git config --global user.name "dark-visitors"
git config --global user.email "dark-visitors@users.noreply.github.com" git config --global user.email "dark-visitors@users.noreply.github.com"
echo "Updating robots.json with data from darkvisitor.com ..." echo "Updating robots.json with data from darkvisitor.com ..."
python code/dark_visitors.py --update python code/robots.py --update
echo "... done." echo "... done."
git --no-pager diff git --no-pager diff
git add -A git add -A
git diff --quiet && git diff --staged --quiet || (git commit -m "Update from Dark Visitors" && git push) git diff --quiet && git diff --staged --quiet || (git commit -m "Update from Dark Visitors" && git push)
shell: bash shell: bash
call-main: convert:
name: convert
needs: dark-visitors needs: dark-visitors
uses: ./.github/workflows/main.yml uses: ./.github/workflows/main.yml
secrets: inherit secrets: inherit

View file

@ -28,7 +28,7 @@ jobs:
git log -1 git log -1
git status git status
echo "Updating robots.txt and table-of-bot-metrics.md if necessary ..." echo "Updating robots.txt and table-of-bot-metrics.md if necessary ..."
python code/dark_visitors.py --convert python code/robots.py --convert
echo "... done." echo "... done."
git --no-pager diff git --no-pager diff
git add -A git add -A

View file

@ -6,7 +6,7 @@ cd to the `code` directory and run `pytest`
import json import json
from pathlib import Path from pathlib import Path
from dark_visitors import json_to_txt, json_to_table from robots import json_to_txt, json_to_table
def test_robots_txt_creation(): def test_robots_txt_creation():