Skip to content

Commit

Permalink
🔧 MAINTAIN: Bump release v0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
g4brielvs committed Aug 25, 2022
1 parent b17a4ad commit 96ec3b9
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 19 deletions.
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ representative at an online or offline event.

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[datalab@worldbank.org](mailto:datalab@worldbank.org)
[github@worldbank.org](mailto:github@worldbank.org)
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
Expand Down
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Inspired by [literate programming](http://www.literateprogramming.com) and the [
```{important}
Admittedly, even the best of the templates would never be perfect; the <span style="color:#3EACAD">template</span> aims to encourage teams to start thinking and assimilate **best practices**, **collaborative coding**, **documentation**​, **reproducibility​** as an integral part of the project. *In a standardized way*.
In this spirit, in case you have feedback, please [open an issue](https://github.com/worldbank/DECAT_Data_Science_Template/issues) or [submit a pull request](https://github.com/worldbank/DECAT_Data_Science_Template/pulls) to share your ideas and suggestions. See [CONTRIBUTING](CONTRIBUTING).
In this spirit, in case you have feedback, please [open an issue](https://github.com/worldbank/template/issues) or [submit a pull request](https://github.com/worldbank/template/pulls) to share your ideas and suggestions.
```

## Usage
Expand All @@ -44,7 +44,7 @@ Please ensure you are logged in on [GitHub](https://github.com) and have permiss

The <span style="color:#3EACAD">template</span> is a [GitHub template repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template); in other words, you can generate a new GitHub repository with the same files and folders to use as the starting point for your project.

> 🌟 [Create new repository from **template**](https://github.com/datapartnership/template/generate)
> 🌟 [Create new repository from **template**](https://github.com/worldbank/template/generate)
```{figure} docs/images/github-template.png
---
Expand Down Expand Up @@ -90,14 +90,14 @@ Please ensure you are logged in on [GitHub](https://github.com) and have permiss
```
repository:
url: https://github.com/datapartnership/template
url: https://github.com/worldbank/template
branch: main
```
In case your project makes use of Python source code, it is *strongly* recommended distributing and maintaining it as a [Python package](https://packaging.python.org/).
```{tip}
The <span style="color:#3EACAD">template</span> contains an example - the [datalab](https://github.com/worldbank/DECAT_Data_Science_Template/tree/main/src/datalab) Python package - and will automatically find and install any `src` packages as long as `setup.cfg` is kept up-to-date.
The <span style="color:#3EACAD">template</span> contains an example - the [datalab](https://github.com/worldbank/template/tree/main/src/datalab) Python package - and will automatically find and install any `src` packages as long as `setup.cfg` is kept up-to-date.
```
```{seealso}
Expand Down Expand Up @@ -135,7 +135,7 @@ Please ensure you are logged in on [GitHub](https://github.com) and have permiss
For example, see this <span style="color:#3EACAD">template</span> as a live demo.
> 🌟 [datapartnership.github.io](https://datapartnership.org/template) (Live Demo)
> 🌟 [worldbank.github.io/template](http://worldbank.github.io/template) (Live Demo)
### Adding Content
Expand Down Expand Up @@ -175,9 +175,9 @@ parts:
The next step is ensure your code is maintainable, realiable and reproducible by including
any dependencies and requirements, such as packages, configurations, secrets and addtional instructions.

The <span style="color:#3EACAD">template</span> uses [conda](https://docs.conda.io/) as environment manager and, as [conventional](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html), the environment is controlled by the `environment.yml` file. The `environment.yml` file is where you specify any packages available on the [Anaconda repository](https://anaconda.org) as well as from the Anaconda Cloud (including [conda-forge](https://conda-forge.org)).
The <span style="color:#3EACAD">template</span> uses [conda](https://docs.conda.io/) as environment manager and, as [conventional](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html), the environment is controlled by the `environment.yml` file.

When using dependencies, make sure to include the pinned version of packages required by your project (including by Jupyter notebooks) as shown below. This will guarantee whoever tries to use your code has the necessary packages (and correct versions).
The `environment.yml` file is where you specify any packages available on the [Anaconda repository](https://anaconda.org) as well as from the Anaconda Cloud (including [conda-forge](https://conda-forge.org)) to install for your project. Ensure to include the pinned version of packages required by your project (including by Jupyter notebooks).

```
channels:
Expand All @@ -191,7 +191,11 @@ dependencies:
- requests==2.28.1
```

By default, the <span style="color:#3EACAD">template</span> runs on [Python 3.9](https://www.python.org).
To (re)create the environment on your installation of [conda](https://conda.io) via [anaconda](https://docs.anaconda.com/anaconda/install/), [miniconda](https://docs.conda.io/projects/continuumio-conda/en/latest/user-guide/install/) or preferably [miniforge](https://github.com/conda-forge/miniforge), you only need to pass the `enviroment.yml` file, which will install requirements and guarantee that whoever uses your code has the necessary packages (and correct versions). By default, the <span style="color:#3EACAD">template</span> uses [Python 3.9](https://www.python.org).

```
conda env create -n <your-environment-name> -f environment.yml
```

```{seealso}
[Conda Managing Environments](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html)
Expand Down
4 changes: 2 additions & 2 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ author: World Bank Development Data Group
logo: docs/images/logo.png

repository:
url: https://github.com/worldbank/DECAT_Data_Science_Template
url: https://github.com/worldbank/template
branch: main

html:
Expand All @@ -13,6 +13,6 @@ html:
use_edit_page_button: true
use_repository_button: true
use_issues_button: true
baseurl: https://datapartnership.org/template
baseurl: https://worldbank.github.io/template

only_build_toc_files: true
4 changes: 2 additions & 2 deletions notebooks/world-bank-api.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"source": [
"# Indicators Example\n",
"\n",
"> The following is an example of a [Jupyter notebook](https://jupyter.org) - a tutorial of how to retrieve data from the [World Bank Indicators API](https://datahelpdesk.worldbank.org/knowledgebase/articles/889392-about-the-indicators-api-documentation) - that illustrates how to use computational content with the [template](https://datapartnership.org/template). "
"> The following is an example of a [Jupyter notebook](https://jupyter.org) - a tutorial of how to retrieve data from the [World Bank Indicators API](https://datahelpdesk.worldbank.org/knowledgebase/articles/889392-about-the-indicators-api-documentation) - that illustrates how to use computational content with the [template](https://worldbank.github.io/template). "
]
},
{
Expand Down Expand Up @@ -193,7 +193,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.13"
"version": "3.9.12"
},
"vscode": {
"interpreter": {
Expand Down
10 changes: 5 additions & 5 deletions notebooks/world-bank-package.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"id": "b4c0f3e8-7756-41bb-aa21-cc2eee5ff67f",
"metadata": {},
"source": [
"Unlike the [previous example](https://datapartnership.org/template/notebooks/world-bank-api.html), where the source code was contained on the Jupyter notebok itself, we (re)use a Python package - the [datalab](https://github.com/worldbank/DECAT_Data_Science_Template/tree/main/src/datalab) Python package - which will let us (re)use any attributes and methods in the following example.\n",
"Unlike the [previous example](https://worldbank.github.io/template/notebooks/world-bank-api.html), where the source code was contained on the Jupyter notebok itself, we (re)use a Python package - the [datalab](https://github.com/worldbank/template/tree/main/src/datalab) Python package - which will let us (re)use any attributes and methods in the following example.\n",
"\n",
"Let's start by importing `WorldBankIndicatorsAPI`, a Pyhton API wrapper class created to faciliate the usage of the [World Bank Indicators API](https://datahelpdesk.worldbank.org/knowledgebase/articles/889392-about-the-indicators-api-documentation)."
]
Expand Down Expand Up @@ -83,7 +83,7 @@
"id": "e82fc342-165d-42d6-b3dc-7534c215ca1f",
"metadata": {},
"source": [
"The `query` method allows us to select an **indicator** (e.g, [World Development Indicators](https://datatopics.worldbank.org/world-development-indicators)), a list of countries and [query parameters](https://datahelpdesk.worldbank.org/knowledgebase/articles/898581#query-strings). Note that contrary to the [previous example](https://datapartnership.org/template/notebooks/world-bank-api.html), the method expets a list of country names and converts them to [ISO 3166-1 alpha-3](https://www.iso.org/iso-3166-country-codes.html) automatically."
"The `query` method allows us to select an **indicator** (e.g, [World Development Indicators](https://datatopics.worldbank.org/world-development-indicators)), a list of countries and [query parameters](https://datahelpdesk.worldbank.org/knowledgebase/articles/898581#query-strings). Note that contrary to the [previous example](https://worldbank.github.io/template/notebooks/world-bank-api.html), the method expets a list of country names and converts them to [ISO 3166-1 alpha-3](https://www.iso.org/iso-3166-country-codes.html) automatically."
]
},
{
Expand Down Expand Up @@ -111,18 +111,18 @@
"id": "46662c1b-4c19-424b-8a61-f651cb486c5b",
"metadata": {},
"source": [
"**Voilà!** We just (re)used the [datalab](https://github.com/worldbank/DECAT_Data_Science_Template/tree/main/src/datalab) Python package in our example delegating the maintenance and logic, making the notebook easier to understand and reproduce. \n",
"**Voilà!** We just (re)used the [datalab](https://github.com/worldbank/template/tree/main/src/datalab) Python package in our example delegating the maintenance and logic, making the notebook easier to understand and reproduce. \n",
"\n",
"```{tip}\n",
"In addition, the `<span style=\"color:#3EACAD\">template</span>` makes any Python package automatically [pip installable](https://packaging.python.org/en/latest/tutorials/installing-packages/) and acessible to *anyone* and from *anywhere*!\n",
"\n",
"To install from source:\n",
"\n",
"\tpip install git+https://github.com/datapartnership/template.git\n",
"\tpip install git+https://github.com/worldbank/template.git\n",
"\n",
"To install from version:\n",
"\n",
"\tpip install git+https://github.com/datapartnership/template.git@v0.1.0\n",
"\tpip install git+https://github.com/worldbank/template.git@v0.1.0\n",
"\t\n",
"\n",
"When distributing a project release, it is strongly recommended to adhere to release management good practices. It is recommended to create checklists, adopt versioning (e.g, [semantic versioning](https://semver.org/) and to release on [Python Package Index](https://pypi.org/) (instead of GitHub).\n",
Expand Down
6 changes: 5 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
[metadata]
name = datalab
author = World Bank Data Lab
author_email = datalab@worldbank.org
maintainer = Gabriel Stefanini Vicente
maintainer_email = gvicente@worldbank.org
version = 0.1.0
description = An Python package example from the World Bank Data Lab
long_description = file: README.md, LICENSE
keywords = World Bank Data Lab
license = Apache 2.0
license = World Bank Master Community License Agreement
classifiers =
Programming Language :: Python :: 3
License :: World Bank Master Community License Agreement
Expand Down

0 comments on commit 96ec3b9

Please sign in to comment.