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

Activate Github Actions for the Jupytext repository #487

Closed
mwouts opened this issue Apr 11, 2020 · 3 comments · Fixed by #488
Closed

Activate Github Actions for the Jupytext repository #487

mwouts opened this issue Apr 11, 2020 · 3 comments · Fixed by #488
Milestone

Comments

@mwouts
Copy link
Owner

mwouts commented Apr 11, 2020

Travis-CI is off for maintenance. Maybe it's a good time to give a try to Github actions?

Useful documentation:

I'd like to test both the install with pip (requirements.txt and requirements-dev.txt) and with conda (environment.yml), at least on a linux worker.

@mwouts
Copy link
Owner Author

mwouts commented Apr 11, 2020

With 27e916c I have the following issues:

  • Python 3.4 is not available (I will drop it)
  • Flake 8 fails on the pip CI:

Lint with flake8
4s
##[error]Process completed with exit code 2.
Run # stop the build if there are Python syntax errors or undefined names
  # stop the build if there are Python syntax errors or undefined names
  flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
  all Python files should follow PEP8 (except some notebooks, see setup.cfg)
  flake8 jupytext tests
  # exit-zero treats all errors as warnings.  The GitHub editor is 127 chars wide
  flake8 . --count --exit-zero --max-complexity=10 --statistics
  shell: /bin/bash -e {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.6.10/x64
0
/home/runner/work/_temp/98d1db20-f0af-4eba-af95-cb39421c77b0.sh: line 3: syntax error near unexpected token `('
##[error]Process completed with exit code 2.
  • conda env create fails on the conda CI:

Run conda env create --file environment.yml
  conda env create --file environment.yml
  shell: /usr/bin/pwsh -command ". '{0}'"

EnvironmentFileNotFound: '/home/runner/work/jupytext/jupytext/environment.yml' file not found

##[error]Process completed with exit code 1.

Maybe the last two issues are a sign that I am not running these commands at the root of the jupytext repo?

@mwouts
Copy link
Owner Author

mwouts commented Apr 11, 2020

The error /home/runner/work/_temp/98d1db20-f0af-4eba-af95-cb39421c77b0.sh: line 3: syntax error near unexpected token "('" for the pip CI was caused by a missing comment char on the line all Python files should follow PEP8 (except some notebooks, see setup.cfg)

Now the pip CI is almost working - only the test for using Jupytext in a pre-commit hook fails with the following message:

*** Please tell me who you are.

Run

  git config --global user.email "[email protected]"
  git config --global user.name "Your Name"

Also, I am trying to fix the conda CI by passing the environment file and name to the goanpeca/setup-miniconda@v1 macro, cf. b31156d

@mwouts mwouts added this to the 1.5.0 milestone Apr 11, 2020
@mwouts
Copy link
Owner Author

mwouts commented Apr 13, 2020

Based on this issue, I wrote a quick post on how to use GitHub actions - it's available here: https://github.com/mwouts/github_actions_python .

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 a pull request may close this issue.

1 participant