From b137b9212fcfefb40df6f0ee50e3143b6b2cc300 Mon Sep 17 00:00:00 2001 From: Joe DeCapo Date: Wed, 6 May 2020 21:31:45 -0500 Subject: [PATCH 1/2] Add GitHub Actions workflow --- .github/workflows/main.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..1fe9cb4bd --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,30 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the action will run. Triggers the workflow on push or pull request events +on: [push, pull_request] + +defaults: + run: + shell: bash + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: '3.x' + # - name: Install Clowder + # run: pip install clowder-repo + - run: script/update + - run: script/test + - run: clowder init https://github.com/jrgoodle/cats.git + working-directory: examples/cats From b96465faf1f1bc9534e748c73a9deae4258d8ece Mon Sep 17 00:00:00 2001 From: Joe DeCapo Date: Wed, 6 May 2020 21:41:17 -0500 Subject: [PATCH 2/2] Always close process pool https://bugs.python.org/issue38501 --- src/clowder/clowder_app.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/clowder/clowder_app.py b/src/clowder/clowder_app.py index b34a068ba..cd0b8b7c5 100644 --- a/src/clowder/clowder_app.py +++ b/src/clowder/clowder_app.py @@ -13,6 +13,7 @@ import clowder.cli as cmd from clowder.error.clowder_exit import ClowderExit +from clowder.util.parallel_commands import __clowder_pool__ class ClowderApp(App): @@ -86,6 +87,13 @@ def main() -> None: import traceback traceback.print_exc() + # Make sure mp pool is closed + try: + __clowder_pool__.close() + __clowder_pool__.join() + except: # noqa + __clowder_pool__.terminate() + if __name__ == '__main__': freeze_support()