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

override slimPatterns instead of appending #276

Merged
merged 19 commits into from
Nov 17, 2018

Conversation

bweigel
Copy link
Contributor

@bweigel bweigel commented Nov 7, 2018

closes #216

dschep
dschep previously requested changes Nov 7, 2018
Copy link
Collaborator

@dschep dschep left a comment

Choose a reason for hiding this comment

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

Update the documentation to reflect that this option no longer adds, but overrides the slim pattern https://github.com/UnitedIncome/serverless-python-requirements#custom-removal-patterns

@bweigel
Copy link
Contributor Author

bweigel commented Nov 8, 2018

@dschep I added a new option slimPatternsAppendDefaults, which defaults to true. This keeps backwards compatibility and when set to false adds the possibility to overwrite the default patterns with just the custom patterns.

Copy link
Collaborator

@dschep dschep left a comment

Choose a reason for hiding this comment

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

Looks great! Think you could add some test coverage too? Probably easiest to add to the node tests in test.js rather than dealing with bats. run node test.js to run them.

@dschep dschep dismissed their stale review November 8, 2018 00:01

i like the new way of doing it

@bweigel
Copy link
Contributor Author

bweigel commented Nov 8, 2018

I'll look into the tests later. I am not very knowledgable when it comes to node & testing, so I'll have to look into it.

@dschep
Copy link
Collaborator

dschep commented Nov 8, 2018

don't worry if you can't figure it out. just let me know and i'll take care of it.

@dschep
Copy link
Collaborator

dschep commented Nov 8, 2018

one more thing, could you run npm run format and commit the changes & push. Thanks :)

@bweigel
Copy link
Contributor Author

bweigel commented Nov 9, 2018

I have migrated the tests from bats to test.js. However, I have not implemented checks for Docker and I guess some of these tests fail, because docker is missing in the AppVeyor CI system.

@bweigel
Copy link
Contributor Author

bweigel commented Nov 15, 2018

@dschep do you have some clue or hints on how to deal with the failing tests (i.e. docker is missing in the AppVeyor CI system)?

I am guessing in bats these tests are always skipped via docker &> /dev/null || skip "docker not present". I don't know how to deal with that in the test.js-tests.

Copy link
Collaborator

@dschep dschep left a comment

Choose a reason for hiding this comment

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

Here's a function to check if Docker can be used in JS & how to use it. Tthis should actually cover all the use cases that bats was checking for (meaning, docker is usable, not just present)

test.js Outdated Show resolved Hide resolved
test.js Show resolved Hide resolved
dschep and others added 2 commits November 16, 2018 19:40
add function to check for working docker

Co-Authored-By: bweigel <bweigel@users.noreply.github.com>
skip test if docker isn't available

Co-Authored-By: bweigel <bweigel@users.noreply.github.com>
@bweigel
Copy link
Contributor Author

bweigel commented Nov 16, 2018

sweet. thanks!

Copy link
Collaborator

@dschep dschep left a comment

Choose a reason for hiding this comment

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

Looks great! :shipit:

@dschep dschep merged commit 8551233 into serverless:master Nov 17, 2018
@bweigel bweigel deleted the 216_override_slimpattern branch November 17, 2018 07:59
bweigel added a commit to bweigel/serverless-python-requirements that referenced this pull request Nov 17, 2018
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.

Allow ability to override slim defaults
2 participants