Skip to content

Switch to new CI/CD configuration

We need to adapt this package to the new CI/CD and package format using citools:

  • Modify pyproject.toml:
    • Add information from setup.py,
    • Add version from version.txt,
    • Add requirements from requirements.txt and conda/meta.yaml,
  • Empty setup.py:
    • Leave the call to setup() for compatibility,
  • Remove version.txt,
  • Remove requirements.txt,
  • Modify conda/meta.yaml,
    • Import data from pyproject.toml (name, version, ...),
    • Add the source.path field with value ..,
    • Add the build.noarch field with value python,
    • Edit the build.script to only contain "{{ PYTHON }} -m pip install {{ SRC_DIR }} -vv",
    • Remove test and documentation commands and comments,
  • Modify .gitlab-ci.yml to point to citools' python.yml,
    • Use the fields format instead of the URL,
  • Move files to follow the src layout:
    • the whole bob folder to src/bob/,
    • all the tests in tests/,
    • the test data files in tests/data,
    • Edit the tests to load the data correctly, either with os.path.join(os.path.basename(__file__), "data/xxx.txt") or pkg_resources.resource_filename(__name__, "data/xxx.txt"),
  • Activate the packages option in settings -> general -> visibility in the Gitlab project,
  • Edit the latest doc badges to point to the sphinx directory in doc/[...]/master:
    • in README.md,
    • in the GitLab project settings,
  • Edit the coverage badges to point to the doc's coverage directory:
    • in README.md,
    • in the GitLab project settings,
  • Ensure the CI pipeline passes.

You can look at bob.learn.em for an example of a ported package.

Edited by André MAYORAZ