From b3a66bef5683f54c74a58f6ac4257beafc0c0fb6 Mon Sep 17 00:00:00 2001 From: Jake Jackson Date: Tue, 7 Sep 2021 11:37:41 -0400 Subject: [PATCH 1/3] add alisonlhart to namespace requests --- .github/ISSUE_TEMPLATE/New_namespace.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/New_namespace.md b/.github/ISSUE_TEMPLATE/New_namespace.md index 65d0ca5db..95484fd6b 100644 --- a/.github/ISSUE_TEMPLATE/New_namespace.md +++ b/.github/ISSUE_TEMPLATE/New_namespace.md @@ -3,7 +3,7 @@ name: Request a Namespace about: Request a new namespace for one of your GitHub Orgs title: 'namespace: FIXME' labels: area/namespace -assignees: JohnLieske, thedoubl3j +assignees: JohnLieske, thedoubl3j, alisonlhart --- From f204635ac6288f502d52c8d74793114187744171 Mon Sep 17 00:00:00 2001 From: jctanner Date: Mon, 19 Dec 2022 15:12:06 -0500 Subject: [PATCH 2/3] Handle role repositories that do not have a provider_namespace.namespace (#3062) * Handle role repositories that do not have a provider_namespace.namespace. * Fix flake8 error. No-Issue Signed-off-by: James Tanner --- galaxy/api/serializers/roles.py | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/galaxy/api/serializers/roles.py b/galaxy/api/serializers/roles.py index eb89c8f5c..b309216de 100644 --- a/galaxy/api/serializers/roles.py +++ b/galaxy/api/serializers/roles.py @@ -108,15 +108,29 @@ def get_summary_fields(self, obj): name=obj.content_type.name, description=obj.content_type.description) d['dependencies'] = [str(g) for g in obj.dependencies.all()] - d['namespace'] = dict( - id=obj.repository.provider_namespace.namespace.pk, - name=obj.repository.provider_namespace.namespace.name, - avatar_url=obj.repository.provider_namespace.namespace.avatar_url, - location=obj.repository.provider_namespace.namespace.location, - company=obj.repository.provider_namespace.namespace.company, - email=obj.repository.provider_namespace.namespace.email, - html_url=obj.repository.provider_namespace.namespace.html_url, - is_vendor=obj.repository.provider_namespace.namespace.is_vendor) + if obj.repository.provider_namespace.namespace is not None: + a_url = obj.repository.provider_namespace.namespace.avatar_url, + d['namespace'] = dict( + id=obj.repository.provider_namespace.namespace.pk, + name=obj.repository.provider_namespace.namespace.name, + avatar_url=a_url, + location=obj.repository.provider_namespace.namespace.location, + company=obj.repository.provider_namespace.namespace.company, + email=obj.repository.provider_namespace.namespace.email, + html_url=obj.repository.provider_namespace.namespace.html_url, + is_vendor=obj.repository.provider_namespace.namespace.is_vendor + ) + else: + d['namespace'] = dict( + id=None, + name=None, + avatar_url=None, + location=None, + company=None, + email=None, + html_url=None, + is_vendor=None + ) d['platforms'] = [ dict(name=g.name, release=g.release) for g in obj.platforms.all()] d['provider_namespace'] = dict( From 360fab7d0f649aed92e729b6c4711d4e0f191dc7 Mon Sep 17 00:00:00 2001 From: jctanner Date: Tue, 20 Dec 2022 22:20:39 -0500 Subject: [PATCH 3/3] Initial CI implementation with github actions (#3065) * Start CI files. * Use older ubuntu, python and setuptools * Run the unit(?) tests. * Disable tty allocation for tests. Signed-off-by: James Tanner --- .github/workflows/ci_lint.yml | 39 ++++++++++++++++++++++++++++++ .github/workflows/ci_unit.yml | 45 +++++++++++++++++++++++++++++++++++ .yamllint | 1 + Makefile | 2 +- 4 files changed, 86 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci_lint.yml create mode 100644 .github/workflows/ci_unit.yml diff --git a/.github/workflows/ci_lint.yml b/.github/workflows/ci_lint.yml new file mode 100644 index 000000000..3629aa7fe --- /dev/null +++ b/.github/workflows/ci_lint.yml @@ -0,0 +1,39 @@ +--- +name: Lint +on: + pull_request: + branches: + - '**' + paths-ignore: + - 'docs/**' + push: + branches: + - '**' + workflow_dispatch: + +jobs: + + linters: + + # https://github.com/actions/setup-python/issues/355#issuecomment-1335042510 + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-python@v2 + with: + python-version: "3.6" + + # https://stackoverflow.com/a/72611356 + - name: downgrade setuptools + run: pip install setuptools~=57.5.0 + + - name: install requirements + run: pip install -r requirements/dev-requirements.txt + + - name: python lint + run: make test/flake8 + + - name: yaml lint + run: make test/yamllint diff --git a/.github/workflows/ci_unit.yml b/.github/workflows/ci_unit.yml new file mode 100644 index 000000000..198b7585b --- /dev/null +++ b/.github/workflows/ci_unit.yml @@ -0,0 +1,45 @@ +--- +name: Unit +on: + pull_request: + branches: + - '**' + paths-ignore: + - 'docs/**' + push: + branches: + - '**' + workflow_dispatch: + +jobs: + + pytest: + + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-python@v2 + with: + python-version: "3.10" + + # - name: Update apt + # run: sudo apt -y update + + # - name: Install LDAP requirements + # run: sudo apt-get install -y libsasl2-dev python3 libldap2-dev libssl-dev build-essential + + - name: Install docker-compose + run: pip3 install --upgrade docker-compose + + - name: build the image + run: make dev/build + + - name: start the containers + run: make dev/up_detached + + - name: wait for stack to settle + run: sleep 360 + + - name: start the tests + run: make dev/test diff --git a/.yamllint b/.yamllint index 29d6c1cf7..86d7a5105 100644 --- a/.yamllint +++ b/.yamllint @@ -6,3 +6,4 @@ ignore: | rules: line-length: disable + truthy: disable diff --git a/Makefile b/Makefile index a514f01b9..cf810e59e 100644 --- a/Makefile +++ b/Makefile @@ -199,7 +199,7 @@ dev/test: # Other option are: # - install side packages globally or # - call tools using python api instead of shell commands. - @$(DOCKER_COMPOSE) exec galaxy bash -c '\ + @$(DOCKER_COMPOSE) exec -T galaxy bash -c '\ source $(GALAXY_VENV)/bin/activate; \ export DJANGO_SETTINGS_MODULE=galaxy.settings.testing; \ pytest galaxy \