Skip to content

Commit

Permalink
Initial Version
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasvieirasilva committed Feb 17, 2022
0 parents commit 1093e58
Show file tree
Hide file tree
Showing 47 changed files with 3,266 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Editor configuration, see http://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.py]
charset = utf-8
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false
12 changes: 12 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[flake8]
exclude =
.git,
__pycache__,
build,
dist,
.tox,
venv,
.venv,
packages/*/imports,
.pytest_cache
max-line-length = 120
15 changes: 15 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

#### Description

<Replace with Description>

#### Resolved Issues

<Replace with resolved issues>

#### Checklist

- [ ] Update Documentation
- [ ] Update CHANGELOG
- [ ] Update Functions/Classes Docstrings
- [ ] Update unit tests
30 changes: 30 additions & 0 deletions .github/workflows/lint.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 variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Lint

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
flake8:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Run flake8
uses: TrueBrain/actions-flake8@v2
with:
flake8_version: 3.9.2
22 changes: 22 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Python package

on:
push:
tags:
- "v*.*.*"

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Build and publish to pypi
uses: JRubics/poetry-publish@v1.8
with:
pypi_token: ${{ secrets.PYPI_TOKEN }}
poetry_version: "==1.2.0a2"
46 changes: 46 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Unit Tests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Set up Poetry
uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: 1.2.0a2

- name: Install dependencies
run: |
poetry install -v
- name: Run unit tests
env:
AWS_REGION: us-east-1
run: |
poetry run pytest tests/
- name: Coverage Report
uses: 5monkeys/cobertura-action@master
with:
path: coverage/coverage.xml
repo_token: ${{ secrets.GITHUB_TOKEN }}
minimum_coverage: 100
fail_below_threshold: true
55 changes: 55 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# These are some examples of commonly ignored file patterns.
# You should customize this list as applicable to your project.
# Learn more about .gitignore:
# https://www.atlassian.com/git/tutorials/saving-changes/gitignore

# Node artifact files
node_modules/
dist/

# Compiled Java class files
*.class

# Compiled Python bytecode
*.py[cod]

# Log files
*.log

# Package files
*.jar

# Maven
target/
dist/

# JetBrains IDE
.idea/

# Unit test reports
TEST*.xml

# Generated by MacOS
.DS_Store

# Generated by Windows
Thumbs.db

# Applications
*.app
*.exe
*.war

# Large media files
*.mp4
*.tiff
*.avi
*.flv
*.mov
*.wmv

build/
_build

reports/
__pycache__
16 changes: 16 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://gitlab.com/pycqa/flake8
rev: "3.9.2"
hooks:
- id: flake8
- repo: https://github.com/pycqa/isort
rev: 5.8.0
hooks:
- id: isort
name: isort (python)
8 changes: 8 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
mkdocs: {}
python:
version: 3.8
install:
- method: pip
path: .
- requirements: docs/.readthedocs-requirements.txt
6 changes: 6 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
"esbenp.prettier-vscode",
"SonarSource.sonarlint-vscode"
]
}
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

## [1.0.0] - 2022-02-17

### Added

- Add `aws-codeartifact-poetry login` CLI.
58 changes: 58 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# How to Contribute

## Requirements

- [poetry](https://pypi.org/project/poetry/1.2.0a2/)
> Please install poetry version `1.2.0a2`
- [mkdocs](https://pypi.org/project/mkdocs/1.2.3/)

## Contributing Code

A good pull request:

- Is clear.
- Complies with the existing codebase style
([pre-commit](https://pre-commit.com/))
- Includes [docstrings](https://www.python.org/dev/peps/pep-0257/) and comments
for unintuitive sections of code.
- Includes documentation for new features.

## Get Started

### Install dependencies

```shell
poetry install -vv
```

After the dependencies being installed, run the command above to activate the virtualenv in your terminal

```shell
poetry shell
```

### Unit tests

```shell
poetry run pytest
```

### Linting

```shell
poetry run flake8
```

### Serve documentation

```shell
pydoc-markdown --server --open
```

As a pre-deployment step we syntatically validate files with
[pre-commit](https://pre-commit.com).

Please [install pre-commit](https://pre-commit.com/#install) then run
`pre-commit install` to setup the git hooks. Once configured the pre-commit
linters will automatically run on every git commit. Alternatively you
can manually execute the validations by running `pre-commit run --all-files`.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 Lucas Vieira

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# AWS CodeArtifact Poetry

AWS CodeArtifact Poetry CLI is a CLI designed to perform Poetry login with AWS CodeArtifact Private PyPi.

## Install

`pip install aws-codeartifact-poetry`

## Documentation

- See our [Documentation](https://aws-codeartifact-poetry.readthedocs.io/)

## Contributing

- See our [Contributing Guide](CONTRIBUTING.md)

## CLI Documentation

- See our [CLI Documentation](docs/CLI.md)

## Change Log

- See our [Change Log](CHANGELOG.md)
1 change: 1 addition & 0 deletions aws_codeartifact_poetry/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""AWS CodeArtifact Poetry CLI."""
1 change: 1 addition & 0 deletions aws_codeartifact_poetry/aws/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""AWS CodeArtifact Poetry CLI AWS Helper module."""
Loading

0 comments on commit 1093e58

Please sign in to comment.