summaryrefslogtreecommitdiff
path: root/docker-compose.yml
diff options
context:
space:
mode:
authorJeffrey C. Lerman <Jeffrey.Lerman@gmail.com>2023-01-17 13:33:44 -0800
committerGitHub <noreply@github.com>2023-01-17 22:33:44 +0100
commitbfcc54bbb98a1298d5ca55f781e315cd785b225a (patch)
tree424bd5ec39aa26263c9016224a4cac4a83eb14de /docker-compose.yml
parent9b778b39a7759a9c94d5437e1d5f02196bdc9c51 (diff)
downloadrdflib-bfcc54bbb98a1298d5ca55f781e315cd785b225a.tar.gz
build: move to poetry for dependency management; consolidate more settings into pyproject.toml (#2187)
Replaced setuptools with poetry which provides simpler dependency management, dependency locking and virtual environment management. This makes it easier for new developers to get a sane development environment (i.e. just `poetry install`) and also makes our CI pipeline more reproducable as now most development tools and libraries will only change through dependabot which will reduce the build failures on main and make breaking changes in dependencies more visible with dependabot PRs. Other changes: - moved isort, mypy and coverage config from setup.cfg to pyproject.toml - Changes in the generated rdflib wheel: - removed wheel extras related to development (i.e. `tests`, `docs`, `dev`) as poetry dependency groups should be used instead. - Added an extra group `lxml` with a dependency on lxml. - Added version ranges to dependencies, and tests to ensure these version ranges are valid. - Changes to tests: - Change pyparsing related tests so they work with older pyparsing. - Made the html5lib related tests conditional on html5lib existing. - Runtime changes: - Use importlib.metadata to set `__version__`. - Changed the devcontainer and related config to avoid contamination and interference with the host environment. Co-authored-by: Iwan Aucamp <aucampia@gmail.com> Co-authored-by: Edmond Chuc <edmond.chuc@outlook.com>
Diffstat (limited to 'docker-compose.yml')
-rw-r--r--docker-compose.yml31
1 files changed, 21 insertions, 10 deletions
diff --git a/docker-compose.yml b/docker-compose.yml
index efe63700..c8c19e0d 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -6,22 +6,33 @@ services:
context: .
dockerfile: Dockerfile.devcontainer
working_dir: /srv/workspace
+ environment:
+ - XDG_CACHE_HOME=/srv/workspace/.var/devcontainer/cache
+ - MYPY_CACHE_DIR=/srv/workspace/.var/devcontainer/mypy_cache
+ - TOX_WORK_DIR=/srv/workspace/.var/devcontainer/tox
+ - PYTEST_ADDOPTS=-o cache_dir=/srv/workspace/.var/devcontainer/pytest_cache
+ - PRE_COMMIT_HOME=/srv/workspace/.var/devcontainer/pre-commit
volumes:
- .:/srv/workspace:z,cached
- - xdg-cache-home:/root/.cache
- - dot-venv:/srv/workspace/.venv
- - dot-tox:/srv/workspace/.tox
- - dot-mypy-cache:/srv/workspace/.mypy_cache
- - dot-pytest-cache:/srv/workspace/.pytest_cache
command:
- /bin/sh
- -c
- |
echo Waiting for shutdown... override the command if this is not what you want. 1>&2
while sleep 1000; do :; done
+ run:
+ build:
+ context: .
+ dockerfile: Dockerfile.devcontainer
+ working_dir: /srv/workspace
+ environment:
+ - XDG_CACHE_HOME=/srv/workspace-var/cache
+ - MYPY_CACHE_DIR=/srv/workspace-var/mypy_cache
+ - TOX_WORK_DIR=/srv/workspace-var/tox
+ - PYTEST_ADDOPTS=-o cache_dir=/srv/workspace-var/pytest_cache
+ - PRE_COMMIT_HOME=/srv/workspace-var/pre-commit
+ volumes:
+ - .:/srv/workspace:z,cached
+ - workspace-var:/srv/workspace-var
volumes:
- xdg-cache-home: {}
- dot-venv: {}
- dot-tox: {}
- dot-mypy-cache: {}
- dot-pytest-cache: {}
+ workspace-var: {}