The aswfdocker command line tool is available to help with package and
image builds.
Clone this repository and run the setup:
git clone https://github.com/AcademySoftwareFoundation/aswf-docker
cd aswf-docker
python3 setup.py installInstall pipenv for Python 3 first:
pip3 install pipenvThen clone this repository, start the pipenv shell and install the dev dependencies:
git clone https://github.com/AcademySoftwareFoundation/aswf-docker
cd aswf-docker
pipenv shell
pipenv install --devYou should now be in a Python virtualenv shell where the aswfdocker
command is available.
You should check the command is working:
aswfdocker --helpList all known packages:
aswfdocker packagesList all known images:
aswfdocker imagesOnce in the pipenv shell you should first install the
pre-commit hooks by running pre-commit install.
The pre-commit hooks will run the following commands, which can be run individually as well:
- Run Black on the code to ensure formatting
is okay:
black python - Run the tests to ensure everything is okay:
pytest python/aswfdocker - Run mypy to ensure static types are okay:
mypy python/aswfdocker - Run PyLint on the code to ensure
linting is okay:
pylint python/aswfdocker
To run them all manually use pre-commit run --all-files.
- Run
pipenv install xyz - Run
pipenv-setup syncto updatesetup.pywith added dependency (pipenv-setupis a "dev" dependency already declared inPipfile)