From 2bf47c8f2d154e2c7e200ed99b4172ffc4b386a6 Mon Sep 17 00:00:00 2001 From: Ace Date: Sat, 3 Jun 2023 21:56:01 +0200 Subject: [PATCH] fix docs path --- .github/workflows/tests.yml | 5 +++-- inkycal/main.py | 40 +++++++++++++++---------------------- readthedocs.yml | 13 ------------ 3 files changed, 19 insertions(+), 39 deletions(-) delete mode 100644 readthedocs.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 91d8868..c823824 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -109,8 +109,9 @@ jobs: echo "$PWD" ls source venv/bin/activate - cd docsource - make github && cd .. + cd docsource && make github && cd .. + echo "$PWD" + ls git config --global user.name 'GitHub Actions' git config --global user.email 'actions@github.com' git add docs diff --git a/inkycal/main.py b/inkycal/main.py index 41515f9..122a817 100644 --- a/inkycal/main.py +++ b/inkycal/main.py @@ -26,35 +26,27 @@ from PIL import Image stream_handler = logging.StreamHandler() stream_handler.setLevel(logging.ERROR) -on_rtd = os.environ.get('READTHEDOCS') == 'True' -if on_rtd: - logging.basicConfig( - level=logging.INFO, - format='%(asctime)s | %(name)s | %(levelname)s: %(message)s', - datefmt='%d-%m-%Y %H:%M:%S', - handlers=[stream_handler]) -else: - if not os.path.exists(f'{top_level}/logs'): - os.mkdir(f'{top_level}/logs') +if not os.path.exists(f'{top_level}/logs'): + os.mkdir(f'{top_level}/logs') - # Save all logs to a file, which contains more detailed output - logging.basicConfig( - level=logging.INFO, - format='%(asctime)s | %(name)s | %(levelname)s: %(message)s', - datefmt='%d-%m-%Y %H:%M:%S', - handlers=[ +# Save all logs to a file, which contains more detailed output +logging.basicConfig( + level=logging.INFO, + format='%(asctime)s | %(name)s | %(levelname)s: %(message)s', + datefmt='%d-%m-%Y %H:%M:%S', + handlers=[ - stream_handler, # add stream handler from above + stream_handler, # add stream handler from above - RotatingFileHandler( # log to a file too - f'{top_level}/logs/inkycal.log', # file to log - maxBytes=2097152, # 2MB max filesize - backupCount=5 # create max 5 log files - ) - ] - ) + RotatingFileHandler( # log to a file too + f'{top_level}/logs/inkycal.log', # file to log + maxBytes=2097152, # 2MB max filesize + backupCount=5 # create max 5 log files + ) + ] +) # Show less logging for PIL module logging.getLogger("PIL").setLevel(logging.WARNING) diff --git a/readthedocs.yml b/readthedocs.yml deleted file mode 100644 index 2c4c07a..0000000 --- a/readthedocs.yml +++ /dev/null @@ -1,13 +0,0 @@ -version: 2 - -python: - version: 3.7 - install: - - requirements: requirements.txt - - requirements: docs/requirements.txt - - method: pip - path: . -sphinx: - builder: html - configuration: docs/conf.py - fail_on_warning: false