-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* include optional deps, remove requirements file * add command shortcuts for each namespace * update pyproject to include new script shortcuts * fix failing entrypoint test * add types to all cli sub-commands * add more utility tests * update ci and pyproject tool configuration * add test * add type hint * add more cli entrypoint tests for each subcommand * final test
- Loading branch information
Showing
13 changed files
with
349 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,10 +4,10 @@ build-backend = "setuptools.build_meta" | |
|
||
[project] | ||
name = "fred-py-api" | ||
version = "1.1.1" | ||
version = "1.1.2" | ||
authors = [ | ||
{ name="Zachary Spar", email="[email protected]" }, | ||
{ name="Prasiddha Parthsarthy", email="[email protected]" }, | ||
{ name="Zachary Spar", email="[email protected]" }, | ||
{ name="Prasiddha Parthsarthy", email="[email protected]" }, | ||
] | ||
description = "A fully featured FRED Command Line Interface & Python API client library." | ||
readme = "README.md" | ||
|
@@ -26,13 +26,44 @@ classifiers = [ | |
"Operating System :: OS Independent", | ||
] | ||
dependencies = [ | ||
"requests>=2.17.3", | ||
"click>=7.0", | ||
"requests>=2.17.3", | ||
"click>=7.0", | ||
] | ||
|
||
[project.optional-dependencies] | ||
ci = [ | ||
"black==22.6.0", | ||
"coverage==6.4.2", | ||
] | ||
dev = [ | ||
"black==22.6.0", | ||
"coverage==6.4.2", | ||
"tox==3.25.1", | ||
] | ||
|
||
[project.scripts] | ||
fred = "fred.cli:__main__.run_cli" | ||
fred = "fred.cli:__main__.run_fred_cli" | ||
categories = "fred.cli:categories.run_categories_cli" | ||
releases = "fred.cli:releases.run_releases_cli" | ||
series = "fred.cli:series.run_series_cli" | ||
sources = "fred.cli:sources.run_sources_cli" | ||
tags = "fred.cli:tags.run_tags_cli" | ||
|
||
[project.urls] | ||
"Homepage" = "https://github.com/zachspar/fred_py_api" | ||
"Bug Tracker" = "https://github.com/zachspar/fred_py_api/issues" | ||
|
||
[tool.coverage.run] | ||
branch = true | ||
source = ["src"] | ||
|
||
[tool.coverage.report] | ||
exclude_lines = [ | ||
"if __name__ == .__main__.:", | ||
] | ||
|
||
[tool.coverage.html] | ||
directory = "coverage_html_report" | ||
|
||
[tool.black] | ||
line-length = 120 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
#!/usr/bin/env python3 | ||
import click | ||
|
||
from . import fred_cli | ||
from .._util import run_cli_callable | ||
|
||
|
||
__all__ = [ | ||
"run_fred_cli", | ||
] | ||
|
||
|
||
def run_cli(): | ||
"""Run the FRED CLI.""" | ||
try: | ||
fred_cli(auto_envvar_prefix="FRED") | ||
except AssertionError: | ||
click.echo(click.style("Error: FRED_API_KEY is not set!", fg="red")) | ||
def run_fred_cli(): | ||
"""Run the CLI.""" | ||
run_cli_callable(cli_callable=fred_cli) | ||
|
||
|
||
if __name__ == "__main__": | ||
run_cli() | ||
run_fred_cli() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.