Skip to content
  1. Dec 14, 2020
  2. Nov 07, 2020
    • Alexander Hess's avatar
      Adjust the branch reference fixer task's logic ... · 51bb7e82
      Alexander Hess authored
      ... to assume a feature branch if the branch name does not start with
      'release' or 'research' and change all references into 'develop'.
      51bb7e82
    • Alexander Hess's avatar
      Pin the dependencies ... · 03e498ca
      Alexander Hess authored
      ... after upgrading:
      - sqlalchemy
      - dev dependencies
        + darglint
        + flake8(-comprehensions)
        + pre-commit
        + pytest
        + sphinx(-autodoc-typehints)
      - reseach dependencies
        + jupyterlab
        + numpy
        + pandas
        + pytz
      - transient dependencies
        + attrs
        + colorama
        + gitpython
        + identify
        + iniconfig
        + ipython
        + nbclient
        + nbconvert
        + nbformat
        + nest-asyncio
        + notebook
        + pandocfilters
        + pbr
        + prompt-toolkit
        + pygments
        + regex
        + testfixtures
        + toml
        + tornado
        + traitlets
        + urllib3
        + virtualenv
      03e498ca
    • Alexander Hess's avatar
      Upgrade poetry to v1.1.0 · af5d54f1
      Alexander Hess authored
      The order of keys in the poetry.lock file is changed.
      af5d54f1
    • Alexander Hess's avatar
      f8fd9c83
  3. Sep 30, 2020
  4. Aug 11, 2020
    • Alexander Hess's avatar
      Add installation and contributing info · 79f0ddf0
      Alexander Hess authored
      79f0ddf0
    • Alexander Hess's avatar
      Add Jupyter Lab environment · ebf16b50
      Alexander Hess authored
      - dependencies used to run the Jupyter Lab environment that are not
        required by the `urban-meal-delivery` package itself are put into
        an installation extra called "research"
      - this allows to NOT install the requirements, for example, when
        testing the package in an isolated environment
      ebf16b50
    • Alexander Hess's avatar
      Simplify the pre-commit hooks · 4ee5a50f
      Alexander Hess authored
      - run "format" and "lint" separately
        => remove the nox session "pre-commit"
      - execute the entire "test-suite" before merges
        + rename "pre-merge" into "test-suite"
        + do not "format" and "lint" here any more
        + do not execute this before pushes
          * allow branches with <100% test coverage to exist on GitHub
            (they cannot be merged into 'main' until 100% coverage)
          * GitHub Actions executes the test suite
      4ee5a50f
    • Alexander Hess's avatar
      Add a branch reference fixer as a pre-commit hook · ac580417
      Alexander Hess authored
      - many *.py and *.ipynb files will contain links to resources on
        GitHub or nbviewer that have branch references in them
      - add a pre-commit hook implemented as the nox session
        "fix-branch-references" that goes through these files and
        changes all the branch labels to the current one
      ac580417
    • Alexander Hess's avatar
      Fix the "clean-pwd" command in nox · 49ba0c43
      Alexander Hess authored
      - some glob patterns in .gitignore were not correctly expanded
      - adapt the exclude logic to focus on the start of the excluded paths
      49ba0c43
    • Alexander Hess's avatar
      Add database migrations · a16c2605
      Alexander Hess authored
      - use Alembic to migrate the PostgreSQL database
        + create initial migration script to set up the database,
          as an alternative to db.Base.metadata.create_all()
        + integrate Alembic into the test suite; the db_engine fixture
          now has two modes:
          * create the latest version of tables all at once
          * invoke `alembic upgrade head`
          => the "e2e" tests are all run twice, once in each mode; this
             ensures that the migration scripts re-create the same database
             schema as db.Base.metadata.create_all() would
          * in both modes, a temporary PostgreSQL schema is used to create the
            tables in
          => could now run "e2e" tests against production database and still
             have isolation
      - make the configuration module public (to be used by Alembic)
      - adjust linting rules for Alembic
      a16c2605
    • Alexander Hess's avatar
      Add an ORM layer · fdcc93a1
      Alexander Hess authored
      - use SQLAlchemy (and PostgreSQL) to model the ORM layer
      - add the following models:
        + Address => modelling all kinds of addresses
        + City => model the three target cities
        + Courier => model the UDP's couriers
        + Customer => model the UDP's customers
        + Order => model the orders received by the UDP
        + Restaurant => model the restaurants active on the UDP
      - so far, the emphasis lies on expression the Foreign Key
        and Check Constraints that are used to validate the assumptions
        inherent to the cleanded data
      - provide database-independent unit tests with 100% coverage
      - provide additional integration tests ("e2e") that commit data to
        a PostgreSQL instance to validate that the constraints work
      - adapt linting rules a bit
      fdcc93a1
    • Alexander Hess's avatar
      Pin the dependencies ... · d219fa81
      Alexander Hess authored
      ... after upgrading:
      - flake8-plugin-utils
      - sphinx
      d219fa81
    • Alexander Hess's avatar
      Add a config object · 9456f86d
      Alexander Hess authored
      - add the following file:
        + src/urban_meal_delivery/_config.py
      - a config module is created holding two sets of configurations:
        + production => against the real database
        + testing => against a database with test data
      - the module is "protected" (i.e., underscore) and imported at the
        top level via a proxy-like object `config` that detects in which of
        the two environments the package is being run
      9456f86d
  5. Aug 05, 2020
  6. Aug 04, 2020
    • Alexander Hess's avatar
      Add security checks for the dependencies · 48fe2f68
      Alexander Hess authored
      - add a nox session "safety"
      48fe2f68
    • Alexander Hess's avatar
      Run type checks only against packaged *.py files · 8586db58
      Alexander Hess authored
      - for tests/ and the noxfile.py, type annotations are not strictly
        enforced any more
        + this simplifies the way test cases and nox sessions are written
        + for many pytest fixtures, no types are available via a public API
      - put fixtures inside the classes the corresponding test cases are
        grouped in
      8586db58
    • Alexander Hess's avatar
      Add CLI entry point `umd` · 97d714d9
      Alexander Hess authored
      - add the following file:
        + src/urban_meal_delivery/console.py => click-based CLI tools
        + tests/test_console.py => tests for the module above
      - add a CLI entry point `umd`:
        + implement the --version / -V option
          to show the installed package's version
        + rework to package's top-level:
          * add a __pkg_name__ variable to parameterize the package name
        + add unit and integration tests
      - fix that pylint cannot know the proper order of imports in the
        isolated nox session
      97d714d9
Loading