-
-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: printer integration #359
base: main
Are you sure you want to change the base?
feat: printer integration #359
Conversation
Ideally we would like to integrate this with signals #160 |
Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information |
Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information |
Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information |
openadapt/tools/printer.py
Outdated
subprocess.run(["lp", "-d", printer_name, file_path], capture_output=True) | ||
|
||
|
||
# Get available printers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move to tests.
Also please use @pytest.mark.skipif(!get_available_printers())
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addressed in 7e97f47
printer_name = printer.get_available_printers()[0] | ||
file_path = os.path.join(current_dir, "resources", "test_print_document.pdf") | ||
printer.print_document(printer_name, file_path) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please assert something about the result of printer_jobs = printer.get_printer_jobs(printer_name)
here
import subprocess | ||
import platform | ||
|
||
def get_available_printers(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please run black
on this PR, and set up your pre-commit hooks as described in the README so it happens automatically in the future?
(There should be two newlines before a function definition)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addressed in e0a82e4
What kind of change does this PR introduce?
Summary
Checklist
How can your code be run and tested?
Other information