Skip to content

Commit

Permalink
Merge commit 'cdb8028001eaab91bcaf34a6d7b68fc1b318ea5d'
Browse files Browse the repository at this point in the history
* commit 'cdb8028001eaab91bcaf34a6d7b68fc1b318ea5d':
  chore: move repo references from lyft -> amundsen (amundsen-io#51)
  feat: add github action for test and pypi publish (amundsen-io#47)
  ci: add dependabot config (amundsen-io#50)
  ci: move stale yml file to correct dir (amundsen-io#49)
  ci: test pypi travis setting (amundsen-io#48)
  chore: apply license headers to all the source files (amundsen-io#41)
  Update version to pick up report url changes

# Conflicts:
#	setup.py
  • Loading branch information
Jerry Zhu committed Aug 20, 2020
2 parents 2131caf + cdb8028 commit f66023f
Show file tree
Hide file tree
Showing 27 changed files with 127 additions and 24 deletions.
5 changes: 5 additions & 0 deletions .dependabot/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: 1
update_configs:
- package_manager: "python"
directory: "/"
update_schedule: "weekly"
File renamed without changes.
30 changes: 30 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

on: pull_request
jobs:
pre-commit:
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup python 3.6
uses: actions/setup-python@v1
with:
python-version: 3.6
test-unit:
runs-on: ubuntu-18.04
strategy:
matrix:
python-version: ['3.6.x', '3.7.x']
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip3 install -r requirements.txt && pip3 install codecov
- name: Run python unit tests
run: make test
29 changes: 29 additions & 0 deletions .github/workflows/pypipublish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

name: Build and Deploy
on:
push:
branches:
- master
tags:
- '*'
jobs:
build-and-publish-python-module:
name: Build and publish python module to pypi
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup python 3.6
uses: actions/setup-python@v1
with:
python-version: 3.6
- name: Add wheel dependency
run: pip install wheel
- name: Generate dist
run: python setup.py sdist bdist_wheel
- name: Publish to PyPI
if: startsWith(github.event.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
This project is governed by [Lyft's code of conduct](https://github.com/lyft/code-of-conduct).
This project is governed by [Amundsen's code of conduct](https://github.com/amundsen-io/amundsen/blob/master/CODE_OF_CONDUCT.md).
All contributors and participants agree to abide by its terms.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
[![Slack Status](https://img.shields.io/badge/slack-join_chat-white.svg?logo=slack&style=social)](https://amundsenworkspace.slack.com/join/shared_invite/enQtNTk2ODQ1NDU1NDI0LTc3MzQyZmM0ZGFjNzg5MzY1MzJlZTg4YjQ4YTU0ZmMxYWU2MmVlMzhhY2MzMTc1MDg0MzRjNTA4MzRkMGE0Nzk)

Amundsen Common library holds common codes among micro services in Amundsen.
For information about Amundsen and our other services, visit the [main repository](https://github.com/lyft/amundsen). Please also see our instructions for a [quick start](https://github.com/lyft/amundsen/blob/master/docs/installation.md#bootstrap-a-default-version-of-amundsen-using-docker) setup of Amundsen with dummy data, and an [overview of the architecture](https://github.com/lyft/amundsen/blob/master/docs/architecture.md).
For information about Amundsen and our other services, visit the [main repository](https://github.com/amundsen-io/amundsen). Please also see our instructions for a [quick start](https://github.com/amundsen-io/amundsen/blob/master/docs/installation.md#bootstrap-a-default-version-of-amundsen-using-docker) setup of Amundsen with dummy data, and an [overview of the architecture](https://github.com/amundsen-io/amundsen/blob/master/docs/architecture.md#architecture).

## Requirements
- Python >= 3.6

## Doc
- https://lyft.github.io/amundsen/
- https://www.amundsen.io/amundsen/
3 changes: 3 additions & 0 deletions amundsen_common/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Copyright Contributors to the Amundsen project.
# SPDX-License-Identifier: Apache-2.0

3 changes: 3 additions & 0 deletions amundsen_common/log/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Copyright Contributors to the Amundsen project.
# SPDX-License-Identifier: Apache-2.0

3 changes: 3 additions & 0 deletions amundsen_common/log/action_log.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Contributors to the Amundsen project.
# SPDX-License-Identifier: Apache-2.0

import functools

import json
Expand Down
3 changes: 3 additions & 0 deletions amundsen_common/log/action_log_callback.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Contributors to the Amundsen project.
# SPDX-License-Identifier: Apache-2.0

"""
An Action Logger module. Singleton pattern has been applied into this module
so that registered callbacks can be used all through the same python process.
Expand Down
3 changes: 3 additions & 0 deletions amundsen_common/log/action_log_model.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Contributors to the Amundsen project.
# SPDX-License-Identifier: Apache-2.0

from typing import Any, Optional


Expand Down
3 changes: 3 additions & 0 deletions amundsen_common/log/auth_caller_retrieval.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Contributors to the Amundsen project.
# SPDX-License-Identifier: Apache-2.0

import getpass

from flask import current_app as flask_app
Expand Down
3 changes: 3 additions & 0 deletions amundsen_common/log/caller_retrieval.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Contributors to the Amundsen project.
# SPDX-License-Identifier: Apache-2.0

from abc import ABCMeta, abstractmethod


Expand Down
3 changes: 3 additions & 0 deletions amundsen_common/log/http_header_caller_retrieval.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Contributors to the Amundsen project.
# SPDX-License-Identifier: Apache-2.0

from flask import current_app as flask_app
from flask import request

Expand Down
3 changes: 3 additions & 0 deletions amundsen_common/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Copyright Contributors to the Amundsen project.
# SPDX-License-Identifier: Apache-2.0

3 changes: 3 additions & 0 deletions amundsen_common/models/dashboard.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Contributors to the Amundsen project.
# SPDX-License-Identifier: Apache-2.0

from typing import Optional

import attr
Expand Down
3 changes: 3 additions & 0 deletions amundsen_common/models/index_map.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Contributors to the Amundsen project.
# SPDX-License-Identifier: Apache-2.0

import textwrap

# Specifying default mapping for elasticsearch index
Expand Down
3 changes: 3 additions & 0 deletions amundsen_common/models/popular_table.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Contributors to the Amundsen project.
# SPDX-License-Identifier: Apache-2.0

from typing import Optional

import attr
Expand Down
3 changes: 3 additions & 0 deletions amundsen_common/models/table.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Contributors to the Amundsen project.
# SPDX-License-Identifier: Apache-2.0

from typing import List, Optional

import attr
Expand Down
3 changes: 3 additions & 0 deletions amundsen_common/models/user.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Contributors to the Amundsen project.
# SPDX-License-Identifier: Apache-2.0

from typing import Optional, Dict

import attr
Expand Down
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Contributors to the Amundsen project.
# SPDX-License-Identifier: Apache-2.0

from setuptools import setup, find_packages

setup(
Expand Down
3 changes: 3 additions & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Copyright Contributors to the Amundsen project.
# SPDX-License-Identifier: Apache-2.0

3 changes: 3 additions & 0 deletions tests/unit/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Copyright Contributors to the Amundsen project.
# SPDX-License-Identifier: Apache-2.0

3 changes: 3 additions & 0 deletions tests/unit/log/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Copyright Contributors to the Amundsen project.
# SPDX-License-Identifier: Apache-2.0

3 changes: 3 additions & 0 deletions tests/unit/log/test_action_log.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Contributors to the Amundsen project.
# SPDX-License-Identifier: Apache-2.0

import socket
import unittest
from contextlib import contextmanager
Expand Down
3 changes: 3 additions & 0 deletions tests/unit/log/test_http_header_caller_retrieval.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Contributors to the Amundsen project.
# SPDX-License-Identifier: Apache-2.0

import unittest

import flask
Expand Down

0 comments on commit f66023f

Please sign in to comment.