Skip to content

Commit c3fa765

Browse files
authored
fix docs again (#622)
* move to mkdocs * install uv on build machine
1 parent 8921503 commit c3fa765

15 files changed

Lines changed: 377 additions & 519 deletions

.readthedocs.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
version: 2
2-
sphinx:
3-
configuration: docs/source/conf.py
2+
mkdocs:
3+
configuration: mkdocs.yml
4+
fail_on_warning: false
45
build:
56
os: ubuntu-lts-latest
67
tools:
7-
python: "3.11"
8+
python: "3.13"
9+
jobs:
10+
pre_install:
11+
- python -m pip install --upgrade pip
12+
- python -m pip install uv
13+
- uv export --group docs --format requirements.txt --frozen --no-hashes --output-file /tmp/requirements-docs.txt
14+
- python -m pip install -r /tmp/requirements-docs.txt
815
formats: all
9-
python:
10-
install:
11-
- requirements: docs/requirements.txt
12-
- path: .

README.md

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,48 @@
55
[![PyPI version](https://badge.fury.io/py/stats-can.svg)](https://badge.fury.io/py/stats-can)
66
[![Anaconda-Server Badge](https://anaconda.org/conda-forge/stats_can/badges/version.svg)](https://anaconda.org/conda-forge/stats_can)
77

8-
API documentation for StatsCan can be found here: https://www.statcan.gc.ca/eng/developers/wds
8+
API documentation for StatsCan can be found on the [web data service docs](https://www.statcan.gc.ca/eng/developers/wds)
99

10-
If you're looking for Table/Vector IDs to use in the app you can find them through this:
11-
https://www150.statcan.gc.ca/n1/en/type/data
10+
If you're looking for Table/Vector IDs to use in the app you can find them through [the StatCan data page](https://www150.statcan.gc.ca/n1/en/type/data)
1211

13-
Anaconda package here:
14-
https://anaconda.org/conda-forge/stats_can
12+
[Anaconda package](https://anaconda.org/conda-forge/stats_can)
1513

14+
[Read the docs](https://stats-can.readthedocs.io/en/latest/)
1615

17-
Documentation here:
18-
https://stats-can.readthedocs.io/en/latest/
16+
# Introduction
17+
18+
This library implements most of the functions defined by the Statistics Canada
19+
[Web Data Service](https://www.statcan.gc.ca/eng/developers/wds).
20+
It also has a number of helper functions that make it easy to read Statistics
21+
Canada tables or vectors into pandas dataframes.
22+
23+
# Installation
24+
25+
The package can either be installed with pip or conda:
26+
27+
```bash
28+
conda install -c conda-forge stats_can
29+
```
30+
31+
Or:
32+
33+
```bash
34+
pip install stats-can
35+
```
36+
37+
The code is also available on
38+
39+
[github](https://github.com/ianepreston/stats_can).
40+
41+
# Contributing
42+
43+
Contributions to this project are welcome. Fork the repository from
44+
[github](https://github.com/ianepreston/stats_can).
45+
46+
You'll need a python environment with poetry installed. A good guide for setting
47+
up an environment and project (that I used for this library) is [hypermodern python](https://cjolowicz.github.io/posts/hypermodern-python-01-setup/).
48+
49+
I've configured the project to use nix for environment creation. If you use nix then the makefile in the root of the project will let you create
50+
development environments and run tests. However you like to configure a uv project should work though.
51+
52+
I'd also welcome contributions to the docs, or anything else that would make this tool better for you or others.

docs/Makefile

Lines changed: 0 additions & 20 deletions
This file was deleted.

docs/api/sc.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# `stats_can.sc`
2+
3+
::: stats_can.sc
4+
options:
5+
members_order: source
6+
docstring_style: numpy
7+
group_by_category: true # Group Classes / Functions / Variables
8+
show_symbol_type_heading: true # Add category headings
9+
heading_level: 2
10+
show_source: true

docs/api/scwds.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# `stats_can.scwds`
2+
3+
::: stats_can.scwds
4+
options:
5+
members_order: source
6+
docstring_style: numpy
7+
group_by_category: true # Group Classes / Functions / Variables
8+
show_symbol_type_heading: true # Add category headings
9+
heading_level: 2
10+
show_source: true

docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{! ./README.md !}

docs/requirements.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

docs/source/conf.py

Lines changed: 0 additions & 174 deletions
This file was deleted.

docs/source/index.rst

Lines changed: 0 additions & 78 deletions
This file was deleted.

docs/source/modules.rst

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)