From 7ed2ce59738a1127375ca25a2f8b2c7437514478 Mon Sep 17 00:00:00 2001 From: Joshua Bronson Date: Wed, 1 Nov 2023 17:23:10 -0400 Subject: [PATCH] Minor improvements to .envrc and CONTRIBUTING.rst --- .envrc | 3 +++ CONTRIBUTING.rst | 16 ++++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.envrc b/.envrc index 3550a30..e73477a 100644 --- a/.envrc +++ b/.envrc @@ -1 +1,4 @@ +if ! has nix_direnv_version || ! nix_direnv_version 2.4.0; then + source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.4.0/direnvrc" "sha256-XQzUAvL6pysIJnRJyR7uVpmUSZfc7LSgWQwq/4mBr1U=" +fi use flake diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 26746ce..b5f268a 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -40,21 +40,27 @@ Getting Started Making Changes -------------- -- Recommended: You can work on bidict in a Visual Studio Code +- You can work on bidict in a Visual Studio Code `devcontainer environment `__, where development dependencies and some helpful VS Code extensions are installed inside the dev container environment for you. Try ``Remote-Containers: Clone Repository in Container Volume...`` on this repository. You may need to reload your VS Code window after it finishes - cloning and installing extensions, which it should prompt you to do. + cloning and installing extensions, which it should automatically prompt you to do + when you open your clone in VS Code. + + - Note that `pre-commit `__ + is used to help achieve uniform style and quality standards. - If not using a VSCode devcontainer, you can try the following to set up a development environment manually: ``./init_dev_env`` -- Note that `pre-commit `__ - is used to help achieve uniform style and quality standards. + This requires you to either already have Python and pre-commit on your PATH, + or to just have Nix and direnv, in which case all development dependencies + will be auto-installed and added to your PATH in an isolated development environment + every time you cd into your clone (and auto-removed when you cd out of it). - Create a topic branch off of ``main`` for your changes: ``git checkout -b main`` @@ -73,6 +79,8 @@ Making Changes to automatically trigger a new `GitHub Actions `__ build, which should run the tests for all supported Python versions. + Testing your changes with GitHub Actions will require approval + from a project admin the first time you submit a PR. - Create a concise but comprehensive commit message in the following style::