diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index d6f942f..746991f 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -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 diff --git a/README.md b/README.md index 7d8d242..d4d2c34 100644 --- a/README.md +++ b/README.md @@ -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 template 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 @@ -44,7 +44,7 @@ Please ensure you are logged in on [GitHub](https://github.com) and have permiss The template 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 --- @@ -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 template 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 template 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} @@ -135,7 +135,7 @@ Please ensure you are logged in on [GitHub](https://github.com) and have permiss For example, see this template 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 @@ -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 template 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 template 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: @@ -191,7 +191,11 @@ dependencies: - requests==2.28.1 ``` -By default, the template 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 template uses [Python 3.9](https://www.python.org). + +``` +conda env create -n -f environment.yml +``` ```{seealso} [Conda Managing Environments](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html) diff --git a/docs/_config.yml b/docs/_config.yml index 7158b7d..f954883 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -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: @@ -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 \ No newline at end of file diff --git a/notebooks/world-bank-api.ipynb b/notebooks/world-bank-api.ipynb index 3a6980a..2137597 100644 --- a/notebooks/world-bank-api.ipynb +++ b/notebooks/world-bank-api.ipynb @@ -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). " ] }, { @@ -193,7 +193,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.13" + "version": "3.9.12" }, "vscode": { "interpreter": { diff --git a/notebooks/world-bank-package.ipynb b/notebooks/world-bank-package.ipynb index 9effe3b..04c7057 100644 --- a/notebooks/world-bank-package.ipynb +++ b/notebooks/world-bank-package.ipynb @@ -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)." ] @@ -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." ] }, { @@ -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 `template` 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", diff --git a/setup.cfg b/setup.cfg index 1186f47..50f88ad 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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