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:
|
with:
|
||||||
python-version: '3.8'
|
python-version: '3.8'
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pip install -r requirements.txt -r dev-requirements.txt
|
run: pip install -r dev-requirements.txt
|
||||||
- name: Setup git user
|
- name: Setup git user
|
||||||
run: |
|
run: |
|
||||||
git config user.name "GitHub Actions"
|
git config user.name "GitHub Actions"
|
||||||
|
|
@ -29,10 +29,10 @@ jobs:
|
||||||
if: ${{ github.ref == 'refs/heads/master' && github.event_name != 'pull_request' }}
|
if: ${{ github.ref == 'refs/heads/master' && github.event_name != 'pull_request' }}
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
||||||
run: coverage run -a ./update.py --release
|
run: coverage run -a ./scripts/update.py --release
|
||||||
- name: Update
|
- name: Update
|
||||||
if: ${{ !(github.ref == 'refs/heads/master' && github.event_name != 'pull_request') }}
|
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
|
# FIXME
|
||||||
#- name: Report coverage
|
#- name: Report coverage
|
||||||
# env:
|
# env:
|
||||||
|
|
|
||||||
4
Makefile
4
Makefile
|
|
@ -13,3 +13,7 @@ lint:
|
||||||
|
|
||||||
format:
|
format:
|
||||||
$(PYTHON) -m black -t py38 .
|
$(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
|
pytest==7.2.0
|
||||||
coverage==6.5.0
|
coverage==6.5.0
|
||||||
black==22.10.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
|
import pytest
|
||||||
|
|
||||||
from fetch_holidays import (
|
from fetch import (
|
||||||
CustomJSONEncoder,
|
CustomJSONEncoder,
|
||||||
DescriptionParser,
|
DescriptionParser,
|
||||||
get_paper,
|
get_paper,
|
||||||
|
|
@ -11,7 +11,7 @@ from fetch_holidays import (
|
||||||
get_rules,
|
get_rules,
|
||||||
)
|
)
|
||||||
|
|
||||||
from .filetools import _file_path
|
from filetools import _file_path
|
||||||
|
|
||||||
|
|
||||||
def test_get_paper_urls():
|
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 tqdm import tqdm
|
||||||
|
|
||||||
from fetch_holidays import CustomJSONEncoder, fetch_holiday
|
from fetch import CustomJSONEncoder, fetch_holiday
|
||||||
from generate_ics import generate_ics
|
from generate_ics import generate_ics
|
||||||
|
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user