Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(dev): changes for developer ergonomics (pypi#10816)
* chore(dev): set web to depend on db When running `make tests`, the current expectation is that the user has executed `make serve` and the database container is running in already. This brings in all the other runtime dependencies, when all the tests need is a running database instance. Setting the `depends_on` flag tells docker-compose to start the db container first, any time we run a `web` container, and saves us the step of starting it ourselves in another shell. Signed-off-by: Mike Fiedler <miketheman@gmail.com> * chore(dev): set elasticsearch to single-node The current settings for the elasticsearch container place the started node in "production, single node cluster" mode. This performs boostrap tests, one of which tests for virtual memory via the `sysctl` setting of `vm.max_map_count`. In certain Docker-in-Docker development environments, the end user may not have access to the underlying host settings, and cannot modify this setting. An alternative is to set the `discovery-type` to a single node, placing the service in "development mode", turning any bootstrap checks from errors to warnings. Refs: https://www.elastic.co/guide/en/elasticsearch/reference/7.10/system-config.html#dev-vs-prod Refs: https://www.elastic.co/guide/en/elasticsearch/reference/7.10/bootstrap-checks.html Originally reported in pypi#1511, related to pypi#4370 Signed-off-by: Mike Fiedler <miketheman@gmail.com> * chore: enable context reporting in coverage coverage.py version 5.0 introduced the notion of measurement contexts. This adds details to the report to show: - how many times a given line was executed - which context executed a given line Enabling dynamic context measurement during the test execution adds test class/function contexts to the coverage data to be displayed on a given report output. Refs: https://coverage.readthedocs.io/en/6.3.2/contexts.html#dynamic-contexts Signed-off-by: Mike Fiedler <miketheman@gmail.com> * chore(dev): enable web port to be set via env var Creating a port under 1024 often requires superuser privileges. In some environments this is disallowed. By using the built-in behavior from Docker Compose, a user can now set: WEB_PORT=8080 make serve and the web application will be made availabel on port 8080. The default remains port 80. Signed-off-by: Mike Fiedler <miketheman@gmail.com>
- Loading branch information