Skip to content

Conversation

@pushfoo
Copy link
Member

@pushfoo pushfoo commented Apr 25, 2023

Stacks onto #1725.

Changes

  • Add simple context manager wrapping cd behavior
  • Add helper constants
  • Modify run to accept an optional cd path
  • Add a helper run_doc function combining run with a constant
  • Remove top-level os.chdir
  • Remove brittle use of os.chdir('../') in command functions

This doesn't use a combined decorator function because typer interacts poorly with other decorators.

How to test

The important parts should be covered by this, run as a script or individually.

#!/bin/bash

python make.py html
python make.py clean
python make.py lint
python make.py test
python make.py serve
# Swap to your browser at this point per the in-terminal instructions.

@Cleptomania Cleptomania merged commit c24d930 into pythonarcade:development Apr 25, 2023
@pushfoo pushfoo deleted the make_script_context_manager branch May 7, 2023 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants