From 858c9e6270ef40cd0b844a8d35a55e3129c52af3 Mon Sep 17 00:00:00 2001 From: Vitaliy Mysak Date: Tue, 14 Nov 2023 15:58:00 -0800 Subject: [PATCH 1/2] Mention devcontainers in CONTRIBUTING.md --- CONTRIBUTING.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8551084f5..b96a245f1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,6 +12,21 @@ you planning to submit your own fix in a pull request? [issues]: https://github.com/cfe-lab/MiCall/issues ## Development + +The easiest way to start developing MiCall is by using DevContainers. + +1. **Open Project**: Open the MiCall project folder in your editor, which should prompt to "Reopen in Container" or similar — click this to initialize the DevContainer environment. + +2. **Dependency Installation**: The DevContainer configuration will handle the installation of required dependencies within the Docker container, so you don't have to install them manually. + +3. **Interpreter Selection**: + - Watch out for dependency errors after setup. If they occur, manually switch to the correct Python interpreter version `3.8`, as the container includes two versions. + - This is an issue that we are tracking [here](https://github.com/cfe-lab/MiCall/issues/1033). + +4. **Verification**: Run `pytest` within the DevContainer to ensure all tests pass, confirming the environment is correctly configured. + +### Local install + To see how all the tools should be installed, follow the steps in `Dockerfile` and `dev.dockerfile`. If you prefer, you can run your development environment under docker, as described in `dev.dockerfile`. The same installation steps are @@ -286,4 +301,4 @@ similar steps to setting up a development workstation. Follow these steps: [parse_args]: https://github.com/cfe-lab/MiCall/blame/master/micall_watcher.py [Zenodo]: https://doi.org/10.5281/zenodo.2644171 [can't log in]: https://www.docker.com/blog/registry-v1-api-deprecation/ -[docker hub]: https://hub.docker.com/orgs/cfelab/members \ No newline at end of file +[docker hub]: https://hub.docker.com/orgs/cfelab/members From ff05ce34858f06c95ec223a505f7764f4bc8fb81 Mon Sep 17 00:00:00 2001 From: Vitaliy Mysak Date: Thu, 16 Nov 2023 09:04:04 -0800 Subject: [PATCH 2/2] Improve DevContainers section of CONTRIBUTING.md * Mention VS Code DevContainers extension * Mention the option to run MiCall in GitHub code spaces --- CONTRIBUTING.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b96a245f1..c3cf74388 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,15 +15,17 @@ you planning to submit your own fix in a pull request? The easiest way to start developing MiCall is by using DevContainers. -1. **Open Project**: Open the MiCall project folder in your editor, which should prompt to "Reopen in Container" or similar — click this to initialize the DevContainer environment. +1. **Open Project**: + - If you're using Visual Studio Code on your local machine, open the MiCall project folder and select the "Reopen in Container" prompt to initialize the DevContainer environment. Make sure you have the necessary DevContainer extension installed beforehand, available [here](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers). + - For a web-based development environment, you can develop directly on GitHub using GitHub Codespaces by navigating to the MiCall repository on GitHub and selecting "Code" > "Open with Codespaces" to launch a pre-configured environment. -2. **Dependency Installation**: The DevContainer configuration will handle the installation of required dependencies within the Docker container, so you don't have to install them manually. +2. **Dependency Installation**: All required dependencies will be automatically installed whether you are using a local DevContainer or GitHub Codespace. 3. **Interpreter Selection**: - - Watch out for dependency errors after setup. If they occur, manually switch to the correct Python interpreter version `3.8`, as the container includes two versions. - - This is an issue that we are tracking [here](https://github.com/cfe-lab/MiCall/issues/1033). + - Following the setup, if you encounter dependency errors, manually select the Python interpreter version `3.8`. This is necessary because the container includes multiple Python versions, and the default selection might not be appropriate. + - This issue is tracked and further details can be found [here](https://github.com/cfe-lab/MiCall/issues/1033). -4. **Verification**: Run `pytest` within the DevContainer to ensure all tests pass, confirming the environment is correctly configured. +4. **Verification**: To ensure that the environment is correctly configured, execute `pytest` within the DevContainer or Codespace. All tests should pass, indicating that the setup is successful. ### Local install