datalad_setup.yaml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. name: datalad set up
  2. on:
  3. pull_request:
  4. push:
  5. branches: [main]
  6. tags: ['v*']
  7. jobs:
  8. download:
  9. runs-on: ubuntu-22.04
  10. steps:
  11. - name: install datalad
  12. uses: awalsh128/cache-apt-pkgs-action@v1.4.2
  13. with:
  14. packages: datalad
  15. version: 1.0
  16. - name: Install poetry
  17. shell: bash
  18. run: |
  19. pipx install poetry
  20. which poetry
  21. poetry --version # Check poetry installation
  22. - name: configure git email
  23. run: git config --global user.email "daniel.busch@climate-resource.com"
  24. - name: configure git user
  25. run: git config --global user.name "Daniel Busch (via github actions)"
  26. - name: clone repo
  27. run: datalad clone -b doit https://github.com/primap-community/FAOSTAT_data_primap.git
  28. - name: setup Python
  29. uses: actions/setup-python@v5
  30. with:
  31. python-version: '3.11'
  32. - name: Set Poetry environment
  33. shell: bash
  34. run: |
  35. cd FAOSTAT_data_primap/
  36. poetry config virtualenvs.create true
  37. poetry config virtualenvs.in-project true
  38. poetry install --no-interaction --all-extras --only 'main,dev'
  39. poetry run python --version # Check python version just in case
  40. - name: download data
  41. run: |
  42. cd FAOSTAT_data_primap/
  43. poetry run doit download