chore: move python code to /scripts
This commit is contained in:
parent
df637aa453
commit
ef9f9cd5e3
6
.github/workflows/main.yml
vendored
6
.github/workflows/main.yml
vendored
|
|
@ -16,7 +16,7 @@ jobs:
|
|||
with:
|
||||
python-version: '3.8'
|
||||
- name: Install dependencies
|
||||
run: pip install -r requirements.txt -r dev-requirements.txt
|
||||
run: pip install -r dev-requirements.txt
|
||||
- name: Setup git user
|
||||
run: |
|
||||
git config user.name "GitHub Actions"
|
||||
|
|
@ -29,10 +29,10 @@ jobs:
|
|||
if: ${{ github.ref == 'refs/heads/master' && github.event_name != 'pull_request' }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
||||
run: coverage run -a ./update.py --release
|
||||
run: coverage run -a ./scripts/update.py --release
|
||||
- name: Update
|
||||
if: ${{ !(github.ref == 'refs/heads/master' && github.event_name != 'pull_request') }}
|
||||
run: coverage run -a ./update.py
|
||||
run: coverage run -a ./scripts/update.py
|
||||
# FIXME
|
||||
#- name: Report coverage
|
||||
# env:
|
||||
|
|
|
|||
4
Makefile
4
Makefile
|
|
@ -13,3 +13,7 @@ lint:
|
|||
|
||||
format:
|
||||
$(PYTHON) -m black -t py38 .
|
||||
|
||||
.PHONY: test
|
||||
test:
|
||||
$(PYTHON) -m pytest
|
||||
|
|
|
|||
|
|
@ -1,3 +1,10 @@
|
|||
# main
|
||||
requests==2.28.1
|
||||
beautifulsoup4==4.11.1
|
||||
tqdm==4.64.1
|
||||
icalendar==4.1.0
|
||||
|
||||
# test
|
||||
pytest==7.2.0
|
||||
coverage==6.5.0
|
||||
black==22.10.0
|
||||
|
|
|
|||
|
|
@ -1,4 +0,0 @@
|
|||
requests==2.28.1
|
||||
beautifulsoup4==4.11.1
|
||||
tqdm==4.64.1
|
||||
icalendar==4.1.0
|
||||
0
fetch_holidays.py → scripts/fetch.py
Executable file → Normal file
0
fetch_holidays.py → scripts/fetch.py
Executable file → Normal file
|
|
@ -3,7 +3,7 @@ import json
|
|||
|
||||
import pytest
|
||||
|
||||
from fetch_holidays import (
|
||||
from fetch import (
|
||||
CustomJSONEncoder,
|
||||
DescriptionParser,
|
||||
get_paper,
|
||||
|
|
@ -11,7 +11,7 @@ from fetch_holidays import (
|
|||
get_rules,
|
||||
)
|
||||
|
||||
from .filetools import _file_path
|
||||
from filetools import _file_path
|
||||
|
||||
|
||||
def test_get_paper_urls():
|
||||
2
update.py → scripts/update.py
Executable file → Normal file
2
update.py → scripts/update.py
Executable file → Normal file
|
|
@ -13,7 +13,7 @@ from zipfile import ZipFile
|
|||
|
||||
from tqdm import tqdm
|
||||
|
||||
from fetch_holidays import CustomJSONEncoder, fetch_holiday
|
||||
from fetch import CustomJSONEncoder, fetch_holiday
|
||||
from generate_ics import generate_ics
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user