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

Reportengine CI #65

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

Reportengine CI #65

wants to merge 14 commits into from

Conversation

comane
Copy link
Member

@comane comane commented Jul 11, 2024

run pytest on creation of pulll request

Copy link
Member

@RoyStegeman RoyStegeman left a comment

Choose a reason for hiding this comment

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

Thanks, I just had a very quick look but have a few comments/questions

Comment on lines 18 to 27
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: test
use-mamba: true
Copy link
Member

Choose a reason for hiding this comment

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

Why do you need both of these?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hi @RoyStegeman, thanks for the comments.

The conda environment is needed because of pandoc. Does that answer your question?

Copy link
Member

Choose a reason for hiding this comment

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

That I understood, but why do you need the python one?

Copy link
Member Author

Choose a reason for hiding this comment

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

Right now the first step is needed to fix the python version.
But I guess we could do it directly in the miniconda env.

I can try to do so if you prefer it

Copy link
Member

Choose a reason for hiding this comment

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

Yes it supports a python-version key, so I guess it makes sense to use that

.github/workflows/tests.yml Outdated Show resolved Hide resolved
.github/workflows/tests.yml Outdated Show resolved Hide resolved
Comment on lines 29 to 32
- name: Update Environment
shell: bash -l {0}
run: |
conda env update -n test -f environment.yml
Copy link
Member

Choose a reason for hiding this comment

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

Oh I thought I wrote a comment on this as well. Anyway, why do you not just do conda install pandoc followed by pip install . instead of declaring the dependencies in an evironment.yml?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hi Roy, sorry for the very late reply. I somehow forgot about this PR.

I think that having the environment.yml has the advantage of allowing the user to install reportengine and creating a conda env at the same time:

conda env create -f environment.yml

If we agree on keeping the env file, then why not using it directly in the CI?

Copy link
Member

Choose a reason for hiding this comment

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

Also a long time ago for me...

Anyway, the dependencies are already defined in meta.yaml for installing with conda and pyproject.toml for python. In the test you already build the conda package, so you could create an env using the local package and run the test on that. That way you don't have to define the dependencies in yet another place.

Also conda install --only-deps exists, so people could use that to install deps instead of environment.yaml.

Copy link
Member Author

Choose a reason for hiding this comment

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

Can you be a bit more specific please?
I am not sure the conda package is built in this test. I am only setting up miniconda.

@RoyStegeman
Copy link
Member

As I was cleaning up my github notifications I came across this again, apologies about that.

Looking at this now, I'm not so sure this PR is actually necessary. The conda-recipe/meta.yaml file already runs the tests upon building the package with conda-build. See here:

test:
requires:
- pytest
- hypothesis
commands:
- py.test --pyargs reportengine

Did we miss this before, or is there another reason for this PR that I forgot about?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants