Skip to content

Commit

Permalink
Update docs (#271)
Browse files Browse the repository at this point in the history
* virtual envs

* remove poetry and automation files

* add license

* update README based off simonw/python-lib's

* add setup.py

* remove unnecessary files

* move to utils module

* Move to simple test and publish actions

* DS_Store

* typed file

* add tqdm dependency

* add httpx and pandas

* extract funcs

* move to using utils module

* move to httpx and black code

* move to utils module

* refactor ACS class

* initial restructure, working

* drop docker for now

* drop docker for now

* update CONTRIBUTING

* clean PR template

* dropping unnecessary files

* pandas 1.1 for py36

* add mkdocs

* minimal mkdocs

* don't test on 3.10 yet

* doesn't have to be google format

* set up mkdocs

* minimal working docs

* clean docs folder

* add basic requirements

* add typer for cli

* Add CLI with 2 basic commands

* add version flag

* add test for cli

* black

* test instantiated ACS

* rename _download

* check local before downloading

* update docs to include CLI usage

* switch to Options

* Add basic docstring

* change method name to just .download()

* mvp docs

* dropped tqdm

* minor change

* Drop mypy config

* release candidate for version 0.1

* create app_dir

* black

* extract folder is in lowercase

* create app_dir at installation

* sort imports and black code

* doesnt work

* Update utils.py

* DS STORE

* update actions

* exists = true

* clean up docs and use mkdocs-typer
  • Loading branch information
Sergio Sánchez Zavala authored Feb 18, 2022
1 parent 63ef6ba commit f92bcee
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 9 deletions.
Binary file removed .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion .github/workflows/greetings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
greeting:
runs-on: ubuntu-latest
steps:
- uses: actions/first-interaction@v1
- uses: actions/first-interaction@v1.1.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
pr-message: 'Hello @${{ github.actor }}, thank you for submitting a PR! We will respond as soon as possible.'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ jobs:
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v5.12.1
- uses: release-drafter/release-drafter@v5.18.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 6 additions & 0 deletions docs/reference/cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# CLI

::: mkdocs-typer
:module: pypums.cli
:command: cli
:prog_name: pypums-cli
8 changes: 8 additions & 0 deletions docs/reference/surveys.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Surveys (ACS)

::: pypums.ACS
selection:
members:
- download
- as_dataframe

28 changes: 23 additions & 5 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,29 @@
site_name: PyPUMS
theme: readthedocs

nav:
- PyPUMS: index.md
- User guide:
- Installation: user-guide/installation.md
- Usage: user-guide/usage.md
- API reference:
- Surveys (ACS): reference/surveys.md
- CLI: reference/cli.md
- About:
- Authors: about/authors.md
- Contributing: about/contributing.md
- Changelog: about/history.md

plugins:
- search
- autorefs
- mkdocstrings:
default_handler: python
handlers:
python:
rendering:
show_source: false
show_root_heading: true

markdown_extensions:
- smarty
Expand All @@ -10,7 +32,6 @@ markdown_extensions:
- sane_lists
- admonition
- codehilite
- mkautodoc
- pymdownx.superfences:
custom_fences:
- name: mermaid
Expand All @@ -19,7 +40,4 @@ markdown_extensions:
- pymdownx.tabbed:
alternate_style: true
- mdx_include


extra_css:
- css/custom.css
- mkdocs-typer
2 changes: 1 addition & 1 deletion pypums/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

app_dir = Path(get_app_dir(__app_name__))
data_dir = app_dir.joinpath("data")
data_dir.mkdir(parents = True)
data_dir.mkdir(parents = True, exist_ok=True)

SURVEYS_BASE_URL = "https://www2.census.gov/programs-surveys/"

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def get_long_description():
],
extras_require={
"test": ["pytest"],
"docs": ["mkdocs", "mdx_include", "mkautodoc", "pymdown-extensions"],
"docs": ["mkdocs", "mdx_include", "mkdocstrings", "mkdocs-typer", "pymdown-extensions"],
},
python_requires=">=3.6",
entry_points="""
Expand Down

0 comments on commit f92bcee

Please sign in to comment.