@@ -4,7 +4,6 @@ This is a Python library for accessing data in the Data Commons Graph.
44
55> See also: [ Data Commons Pandas API] ( datacommons_pandas/README.md ) .
66
7-
87To get started, install this package from pip.
98
109 pip install datacommons
@@ -13,28 +12,19 @@ Once the package is installed, import `datacommons`.
1312
1413 import datacommons as dc
1514
16- If you would like to provide an API key, follow the steps in
17- [ Setting up access to the Data Commons API] ( https://docs.datacommons.org/api/setup.html ) ,
18- add the following line to your code:
19-
20- dc.set_api_key('YOUR-API-KEY')
21-
22- Data Commons * does not charge* users, but uses the API key for
23- understanding API usage.
24-
2515For more detail on getting started with the API, please visit our
26- [ API Overview] ( http ://docs.datacommons.org/api/) .
16+ [ API Overview] ( https ://docs.datacommons.org/api/) .
2717
2818When you are ready to use the API, you can refer to ` datacommons/examples ` for
2919examples on how to use this package to perform various tasks. More tutorials and
30- documentation can be found on our [ tutorials page] ( https://datacommons.org/colab ) !
20+ documentation can be found on our [ tutorials page] ( https://docs. datacommons.org/tutorials/ ) !
3121
3222## About Data Commons
3323
3424[ Data Commons] ( https://datacommons.org/ ) is an open knowledge repository that
3525provides a unified view across multiple public data sets and statistics. You can
3626view what [ datasets] ( https://datacommons.org/datasets ) are currently ingested
37- and browse the graph using our [ browser] ( https://browser. datacommons.org/ ) .
27+ and browse the graph using our [ browser] ( https://datacommons.org/browser ) .
3828
3929## License
4030
@@ -46,22 +36,22 @@ The Python API currently supports `python>=2.7`.
4636
4737To test, run:
4838
49- ```
50- $ ./run_tests_local.sh
39+ ``` bash
40+ ./run_tests_local.sh
5141```
5242
5343To debug the continuous integration tests, run:
5444
55- ```
56- $ cloud-build-local --config=cloudbuild.yaml --dryrun=false .
45+ ``` bash
46+ cloud-build-local --config=cloudbuild.yaml --dryrun=false .
5747```
5848
5949Both commands will run the same set of tests.
6050
6151To run the examples:
6252
63- ```
64- $ python -m datacommons.examples.XXX
53+ ``` bash
54+ python -m datacommons.examples.XXX
6555```
6656
6757where XXX is the module you want to run.
@@ -76,44 +66,54 @@ starting from the
7666
7767### Release to Test PyPI
7868
79- 1 . In [ setup_datacommons.py] ( setup_datacommons.py ) and
80- [ setup_datacommons_pandas.py ] ( setup_datacommons_pandas.py ) :
81- - Append "-USERNAME" to the package "NAME". For example,
82- ` NAME = 'foo_package-janedoe123' ` .
83- - Increment the "VERSION" codes to something that has not been used in your
69+ 1 . In [ setup_datacommons.py] ( setup_datacommons.py ) and [ setup_datacommons_pandas.py ] ( setup_datacommons_pandas.py ) :
70+
71+ - Append "-USERNAME" to the package "NAME". For example,
72+ ` NAME = 'foo_package-janedoe123' ` .
73+ - Increment the "VERSION" codes to something that has not been used in your
8474 test project. This will not affect the production PyPI versioning.
75+
85761 . Build the dists:
86- ``` bash
87- rm dist/*
88- python3 -m pip install --user --upgrade setuptools wheel
89- python3 setup_datacommons.py sdist bdist_wheel
90- python3 setup_datacommons_pandas.py sdist bdist_wheel
91- ```
77+
78+ ``` bash
79+ rm dist/*
80+ python3 -m pip install --user --upgrade setuptools wheel
81+ python3 setup_datacommons.py sdist bdist_wheel
82+ python3 setup_datacommons_pandas.py sdist bdist_wheel
83+ ```
84+
92851 . Release the dists to TestPyPI:
93- ` ` ` bash
94- python3 -m pip install --user --upgrade twine
95- python3 -m twine upload --repository testpypi dist/*
96- ` ` `
86+
87+ ``` bash
88+ python3 -m pip install --user --upgrade twine
89+ python3 -m twine upload --repository testpypi dist/*
90+ ```
9791
9892### Release to Production PyPI
93+
99941 . In [ setup_datacommons.py] ( setup_datacommons.py ) and
100- [setup_datacommons_pandas.py](setup_datacommons_pandas.py):
101- - Revert the package name to ` datacommons` and ` datacommons_pandas`
102- - Update and double check " VERSION"
103- 1. Update [CHANGELOG.md](CHANGELOG.md) and
104- [datacommons_pandas/CHANGELOG.md](datacommons_pandas/CHANGELOG.md)
95+ [ setup_datacommons_pandas.py] ( setup_datacommons_pandas.py ) :
96+
97+ - Revert the package name to ` datacommons ` and ` datacommons_pandas `
98+ - Update and double check "VERSION"
99+
100+ 1 . Update [ CHANGELOG.md] ( CHANGELOG.md ) and [ datacommons_pandas/CHANGELOG.md] ( datacommons_pandas/CHANGELOG.md )
101+
1051021 . Build the dists:
106- ` ` ` bash
107- rm dist/*
108- python3 -m pip install --user --upgrade setuptools wheel
109- python3 setup_datacommons.py sdist bdist_wheel
110- python3 setup_datacommons_pandas.py sdist bdist_wheel
111- ` ` `
103+
104+ ``` bash
105+ rm dist/*
106+ python3 -m pip install --user --upgrade setuptools wheel
107+ python3 setup_datacommons.py sdist bdist_wheel
108+ python3 setup_datacommons_pandas.py sdist bdist_wheel
109+ ```
110+
1121111 . Release the dists to PyPI:
113- ` ` ` bash
114- python3 -m pip install --user --upgrade twine
115- twine upload dist/*
116- ` ` `
112+
113+ ``` bash
114+ python3 -m pip install --user --upgrade twine
115+ twine upload dist/*
116+ ```
117117
118118## Support
119119
0 commit comments