Skip to content

Commit

Permalink
fix docs path
Browse files Browse the repository at this point in the history
  • Loading branch information
aceisace committed Jun 3, 2023
1 parent 375f152 commit 2bf47c8
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 44 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 '[email protected]'
git add docs
Expand Down
50 changes: 21 additions & 29 deletions inkycal/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,35 +26,27 @@
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')

# 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

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
)
]
)


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=[

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
)
]
)

# Show less logging for PIL module
logging.getLogger("PIL").setLevel(logging.WARNING)
Expand Down
13 changes: 0 additions & 13 deletions readthedocs.yml

This file was deleted.

0 comments on commit 2bf47c8

Please sign in to comment.