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

Set up reproducible Python environments with conda-lock #2968

Merged
merged 8 commits into from
Nov 14, 2023

Commits on Nov 14, 2023

  1. Set up reproducible Python environments with conda-lock (#2901)

    * Add a conda-lock setup for discussion.
    * Move python-snappy into project.dependencies in pyproject.toml
    * Remove sphinx-autoapi from pypi deps, and no longer required snappy-python
    * Switch to using conda-forge version of recordlinkage v0.16
    * Update conda-lock.yml now that all dependencies are available on conda-forge
    * Consolidate conda env files under environments/ dir
    * Add a GitHub action to relock dependencies
    * Quote the pip install command
    * Remove pip install of pudl from environment.yml
    * Rename workflow
    * Only build lockfile from pyproject.toml, don't install extras.
    * Just install conda-lock, not pudl, before running conda-lock.
    * install conda-lock with pip
    * Move all remaining dev-environment.yml deps to pyproject.toml
    * Add other platforms; make draft PR against dev.
    * Comment out dev base branch for now.
    * Remove pandas extras and recordlinkage deps from pyproject.toml
    * Use conda-lock --micromamba rather than --mamba
    * Don't specify grpcio, or specific recordlinkage version
    * Render platform-specific environment files in github action
    * Fix paths relative to environments directory
    * Add some comment notes to workflow
    * Render environment for Read The Docs.
    * Use environment not explicit rendered lockfile
    * Add readthedocs specific sphinx extension
    * Don't render explicit conda env for RTD since it can't read it.
    * Build linux-aarch64 lockfile. Use conda-lock.yml in workflows.
    * Comment out non-working linux-aarch64 platform for now.
    * Switch to using rendered lockfiles.
    * Remove deprecated environment files
    * Switch to using a micromamba docker image
    * Install git into the docker image.
    * Use micromamba and unrendered multi-platform lockfile.
    * Add main category to micromamba environment creation.
    * Use conda-lock not base as env name
    * Add a conda-lock setup for discussion.
    * Move python-snappy into project.dependencies in pyproject.toml
    * Remove sphinx-autoapi from pypi deps, and no longer required snappy-python
    * Add linux-aarch64 platform back into conda-lock settings.
    zaneselvans committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    95a855c View commit details
    Browse the repository at this point in the history
  2. Move tox.ini and update-lockfile logic to Makefile

    - Remove deprecated API_KEY_EIA envvar
    - Add .gitignore in new environments directory
    - Create Makefile and migrat tox.ini logic into it
    - Replace spaces in Makefile with tabs
    - Install pudl via pip install --no-deps to avoid contaminating
      the locked environment
    - Move pip install and coverage XML logic from GHA workflow into
      the Makefile
    - Increase the minimum versions of some dependencies.
    - Move update-lockfile GHA workflow logic into Makefile
    - Attempt to run slow tests in parallel using "wait" to prevent
      premature exit of the shell
    zaneselvans committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    ad464a2 View commit details
    Browse the repository at this point in the history
  3. Adjust Dockerfile & deployment use micromamba

    * Use micromamba not conda in Dockerfile CMD, also use pip install --no-deps
    * Use micromamba not conda in command passed to build container
    * Use default mambauser rather than catalyst in docker container
    * Remove --no-capture-output which isn't supported by micromamba. Is this a problem?
    * Remove uninterpolated vars in .env and more --no-capture-output
    * Separate ETL and pytest commands.
    * Stop trying to run tests in parallel. Sigh.
    * Add google cloud sdk to conda environment.
    * Install Google Cloud SDK from conda-forge.
    * Add back in the making of required directories. Oops.
    * Attempt to have micromamba run pass through output
    * Use prettier to standardize formatting of lockfiles.
    * Add dagster (server startup) target to Makefile
    * Update conda lockfile and rerender environment files
    * Attempt to trigger update-lockfile when pyproject.toml is changed.
    * Remove non-required upper bounds on dependency versions.
    * Use correct branch name for update-lockfile trigger.
    * Fix incorrect nbformat minimum version
    * Update Makefile in response to PR feedback
    zaneselvans committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    c9784d4 View commit details
    Browse the repository at this point in the history
  4. Set up triggers to automate updating of conda lockfiles

    * Remove dagster-postgres version to avoid PyPI conda-forge conflict.
    * Break up and distribute the nuke target.
    * Resolve issues with pandera dependency. Reorganize makefile.
    * Add triggers and commit/PR for workflow_dispatch, pull_request, schedule
      and set appropriate GITHUB_REF values for each case.
    * Use push instead of pull_request to trigger on path. This avoids re-locking
      the dependencies every single time you push to a PR that had a change
      to pyproject.toml *somewhere* in it.
    * Also trigger based on path if .github/workflows/update-lockfile.yml changes.
    * Update conda-lock.yml and rendered conda environment files.
    zaneselvans committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    d8dd9e3 View commit details
    Browse the repository at this point in the history
  5. Consolidate optional dependencies; test nuke; parallelize tests

    * Move previous dev, test, and datasette optional dependencies into
      the required dependencies to simplify application installation.
    * Test make nuke; parallelize --live-dbs tests
    * Move prettier into conda-only dependencies
    * Update conda-lock.yml and rendered conda environment files.
    * Remove action test file hashlog
    * Remove merge markers.
    * Remove transitive astroid dependency that's now correctly included in solve.
    * Use the real immature library version of dagster-postgres (0.21.6)
      rather than the accidentally packaged 1.5.6 version found in conda.
      We'll need to keep an eye out for when dagster-postgres graduates
      to the stable versioning and update it. This is a bit of a mess
      because of some broken automation in the conda packaging for dagster
      which has now been fixed.
    * Update "make pudl" to remove the old PUDL DB and reinitialize with
      alembic, rather than writing to the DB that already exists.
    * Fixed some groupby.agg() deprecation warnings.
    * Fix dagster-postgres version (again).
    * Update username in path to settings file
    * Avoid bugs in ferc_to_sqlite --clobber; don't use cache_dir for pip install.
    * Make FERC extraction output removal more specific.
    * Bump numpy and numba minimum versions.
    * Bump black version in pre-commit
    * Bump ruff pre-commit hook version
    zaneselvans committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    e86a9e7 View commit details
    Browse the repository at this point in the history
  6. Update docs to reflect swapping Make in for Tox, application packaging.

    * Rename tox-pytest and update-lockfile workflows.
    * Make scheduled PRs against dev rather than conda-lockfile branch.
    * Update to pyarrow 14 and grpcio 1.59 b/c security
    * Update release notes
    zaneselvans committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    ff20c66 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    08f318f View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    240b99e View commit details
    Browse the repository at this point in the history