Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use local black and isort option #65

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dmitchell-mintel
Copy link

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
modules/python/Makefile.style Outdated Show resolved Hide resolved
.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

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

Copy link
Author

@dmitchell-mintel dmitchell-mintel Oct 7, 2020

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

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

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