Skip to content

Use local black and isort option#65

Open
dmitchell-mintel wants to merge 2 commits into
mintel:masterfrom
dmitchell-mintel:use_local_black_and_isort_option
Open

Use local black and isort option#65
dmitchell-mintel wants to merge 2 commits into
mintel:masterfrom
dmitchell-mintel:use_local_black_and_isort_option

Conversation

@dmitchell-mintel

Copy link
Copy Markdown

Check for black and isort in the pipenv and use them if found

@dmitchell-mintel dmitchell-mintel force-pushed the use_local_black_and_isort_option branch from a5e8f75 to b96788f Compare September 24, 2020 17:43
Comment thread modules/python/Makefile.style Outdated
.PHONY: python/black/check/docker
python/black/check/docker:
@$(DOCKER) pull alphachai/black
$(DOCKER) run -i --rm --user $$(id -u):$$(id -g) --mount type=bind,src=$$(pwd),dst=/app alphachai/black --check $(PYTHON_LINT_TARGETS)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could usecytopia/black:latest which gets built regularly or I can setup mintel/black

@dmitchell-mintel dmitchell-mintel Oct 7, 2020

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cytopia/black looks fine, we would need to change the workdir to /data in the script

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

orrrr, we could upgrade alphachai/black to build every day :P

@nabadger

Copy link
Copy Markdown

Let's put this on hold until we figure out some direction from the meeting on Friday.

Regarding build-harness there's a few options for handling dependencies.

1 - Install packages locally. This actually works really well (see https://github.com/cloudposse/packages ), and essentially means you can re-use this in CI and local (via make package/install/$package). These are most often static-bins so fairly portable.

2 - Alpine Linux Packages ( https://github.com/cloudposse/packages ) also supports ALP, which gives us another route (i.e. add the repo and apk-add). This could be bundled into a base image.

3 - Docker - either a common image bundle (which could just be the pipeline image itself), or calling out to specific docker-images (like we're doing here). There's pros and cons of each

There's a couple variants of docker still, such as using COPY FROM against upstream, vs cURL and install locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants