Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish to conda #43

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open

Publish to conda #43

wants to merge 15 commits into from

Conversation

benoit-cty
Copy link
Contributor

@benoit-cty benoit-cty commented Feb 15, 2022

  • Technical improvement.
  • Details:
    • Publish to conda in CI
    • Move CI from Circle CI to Github Action as it is the case for others OpenFisca projects

These changes change non-functional parts of this repository : CI.

@benoit-cty
Copy link
Contributor Author

@sandcha
Copy link
Contributor

sandcha commented Apr 7, 2022

Hello @benoit-cty, Thank you for this new feature(s)!
This PR does more than publishing to conda, it also migrates the CI checks from CircleCI to GitHub Actions. Could you explicit why you made this choice? And the list of credentials/rights to activate on this repository? 🙂

@benoit-cty
Copy link
Contributor Author

benoit-cty commented Apr 7, 2022

I move CI from Circle CI to Github Action as it is the CI used for others OpenFisca projects.
And, honestly, also because I already have the code for Conda in Github Action.

The credential is already on the organization level, it is secrets.ANACONDA_TOKEN

Copy link
Contributor

@sandcha sandcha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @benoit-cty for this new conda installation! Tested and it woks 🙌
The main requests are:

  • remove the old circleci configuration as we are migrating the CI to GitHub Action here,
  • fix some typo.

@@ -0,0 +1,32 @@
# Publish to conda

There is two way of publishing to conda:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation is similar to conda documentation in openfisca-core. You might find some similar comments/this review not entirely original 😅

Suggested change
There is two way of publishing to conda:
There are two ways of publishing to conda:

# Publish to conda

There is two way of publishing to conda:
- A fully automatic in CI that publish to an "openfisca" channel. See below for more information.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo and standardization of style:

Suggested change
- A fully automatic in CI that publish to an "openfisca" channel. See below for more information.
- A fully automatic in CI that publishes to an `openfisca` channel. See below for more information.


There is two way of publishing to conda:
- A fully automatic in CI that publish to an "openfisca" channel. See below for more information.
- A more complex for Conda-Forge.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add link to help the reader and remove any ambiguity?

Suggested change
- A more complex for Conda-Forge.
- A more complex for [Conda-Forge](https://conda-forge.org).

- A fully automatic in CI that publish to an "openfisca" channel. See below for more information.
- A more complex for Conda-Forge.

We use both for openfisca-core but only _openfisca channel_ for _extension-template_.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor suggestion:

Suggested change
We use both for openfisca-core but only _openfisca channel_ for _extension-template_.
We use both for openfisca-core but only `openfisca` channel for `extension-template`.


## Automatic upload

The CI automaticaly upload the PyPi package, see the `.github/workflow.yml`, step `publish-to-conda`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explicit which package as the next steps will depend on it?

Suggested change
The CI automaticaly upload the PyPi package, see the `.github/workflow.yml`, step `publish-to-conda`.
The CI automaticaly upload the [PyPi package](https://pypi.org/project/OpenFisca-Extension-Template/), see the `.github/workflow.yml`, step `publish-to-conda`.

- `conda activate openfisca-ext-tplt` to use your new environment.
- `conda install -c openfisca openfisca-extension-template` to install the package and all dependencies.

Conda is the easiest way to use OpenFisca under Windows as by installing Anaconda you will get:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just after ## Installing section, add a sentence to help the user chose between the installation options? Use a part of the sentence above?

## Installing

[conda](https://docs.conda.io) is the easiest way to use OpenFisca under Windows.
On other OS systems, the default installation is based on [pip](https://pip.pypa.io/en/stable/) Python package installer. 

- A virtual environment manager : [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html)
- A GUI [Anaconda Navigator](https://docs.anaconda.com/anaconda/navigator/index.html) if you choose to install the full [Anaconda](https://www.anaconda.com/products/individual)

If you are familiar with command line you could use [Miniconda](https://docs.conda.io/projects/conda/en/latest/user-guide/install/windows.html), wich need very much less disk space than Anaconda.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If you are familiar with command line you could use [Miniconda](https://docs.conda.io/projects/conda/en/latest/user-guide/install/windows.html), wich need very much less disk space than Anaconda.
If you are familiar with command line you could use [Miniconda](https://docs.conda.io/projects/conda/en/latest/user-guide/install/windows.html), which needs very much less disk space than Anaconda.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add explicit that the commands given above will then work in a shell terminal?


If you are familiar with command line you could use [Miniconda](https://docs.conda.io/projects/conda/en/latest/user-guide/install/windows.html), wich need very much less disk space than Anaconda.

For informations on how we publish to conda-forge, see [README](.conda/README.md).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion:

Suggested change
For informations on how we publish to conda-forge, see [README](.conda/README.md).
For informations on how we publish to [conda-forge](https://conda-forge.org), see [README](.conda/README.md).

### Installing with conda

Since version [1.3.11](https://anaconda.org/openfisca/openfisca-extension-template), you could use conda to install OpenFisca-Extension-Template with these commands to run in `Anaconda Powershell Prompt` :
- `conda create --name openfisca-ext-tplt python=3.7` to create an openfisca environment.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `conda create --name openfisca-ext-tplt python=3.7` to create an openfisca environment.
- `conda create --name openfisca-ext-tplt python=3.7` to create an `openfisca-ext-tplt` virtual environment.

Comment on lines +24 to +26
- `conda create --name openfisca-ext-tplt python=3.7` to create an openfisca environment.
- `conda activate openfisca-ext-tplt` to use your new environment.
- `conda install -c openfisca openfisca-extension-template` to install the package and all dependencies.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Tested without error on local environment by following these steps and then, running openfisca test openfisca_extension_template/tests/local_benefit.yaml -e openfisca_extension_template.

@sandcha
Copy link
Contributor

sandcha commented May 24, 2022

@benoit-cty Juste a reminder to us both: upon this PR merge, we will need:

  • to update this repository settings to remove the circleci check. 🙂
  • check if there is something to remove from CircleCI configuration.

As said before ANACONDA_TOKEN secret is already set for this repository.

@MattiSG
Copy link
Member

MattiSG commented Dec 12, 2022

Following #51, the Github Actions migration has been handled. This changeset can (and should) thus be updated to remove that part 🙂

@bonjourmauko bonjourmauko added the kind:ci Changes to our CI configuration files and scripts label Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:ci Changes to our CI configuration files and scripts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants