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

feat(pip): Prepare for PyPI #1531

Merged
merged 15 commits into from
Dec 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 6 additions & 6 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,30 @@ PROTIP: record your screen and attach it as a gif to showcase the issue.
- How to record and attach gif: https://bit.ly/2Mi8T6K
-->

**What happened?**
**What happened?**
A clear and concise description of what the bug is or what is not working as expected


**How to reproduce it**
**How to reproduce it**
Steps to reproduce the behavior:
1. What command are you running?
2. Environment you have, like single account, multi-account, organizations, etc.
3. See error


**Expected behavior**
**Expected behavior**
A clear and concise description of what you expected to happen.


**Screenshots or Logs**
**Screenshots or Logs**
If applicable, add screenshots to help explain your problem.
Also, you can add logs (anonymize them first!). Here a command that may help to share a log
`bash -x ./prowler -options > debug.log 2>&1` then attach here `debug.log`


**From where are you running Prowler?**
**From where are you running Prowler?**
Please, complete the following information:
- Resource: [e.g. EC2 instance, Fargate task, Docker container manually, EKS, Cloud9, CodeBuild, workstation, etc.)
- Resource: [e.g. EC2 instance, Fargate task, Docker container manually, EKS, Cloud9, CodeBuild, workstation, etc.)
- OS: [e.g. Amazon Linux 2, Mac, Alpine, Windows, etc. ]
- AWS-CLI Version [`aws --version`]:
- Prowler Version [`./prowler -V`]:
Expand Down
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### Context
### Context

Please include relevant motivation and context for this PR.

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-lint-push-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
paths-ignore:
- '.github/**'
- 'README.md'

release:
types: [published]

Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ name: Lint & Test
on:
push:
branches:
- 'prowler-3.0-dev'
- "prowler-3.0-dev"
pull_request:
branches:
- 'prowler-3.0-dev'
- "prowler-3.0-dev"

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -36,7 +35,7 @@ jobs:
pipenv run black --check .
- name: Lint with pylint
run: |
pipenv run pylint --disable=W,C,R,E -j 0 providers lib util config
pipenv run pylint --disable=W,C,R,E -j 0 -rn -sn prowler/
- name: Bandit
run: |
pipenv run bandit -q -lll -x '*_test.py,./contrib/' -r .
Expand All @@ -48,4 +47,4 @@ jobs:
pipenv run vulture --exclude "contrib" --min-confidence 100 .
- name: Test with pytest
run: |
pipenv run pytest -n auto
pipenv run pytest tests -n auto
2 changes: 1 addition & 1 deletion .github/workflows/refresh_aws_services_regions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
### Description

This PR updates the regions for AWS services.

### License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
# Python code
__pycache__
venv/
build/
dist/
*.egg-info/

# Session
Session.vim
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ repos:
hooks:
- id: pylint
name: pylint
entry: bash -c 'pylint --disable=W,C,R,E -j 0 -rn -sn providers lib util config'
entry: bash -c 'pylint --disable=W,C,R,E -j 0 -rn -sn prowler/'
language: system

- id: pytest-check
name: pytest-check
entry: bash -c 'pytest -n auto'
entry: bash -c 'pytest tests -n auto'
language: system

- id: bandit
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,4 @@ Copyright 2018 Netflix, Inc.
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,18 @@ lint: ## Lint Code
@echo "Running pylint..."
pylint --disable=W,C,R,E -j 0 providers lib util config

##@ PyPI
pypi-clean: ## Delete the distribution files
rm -rf ./dist && rm -rf ./build && rm -rf prowler_cloud.egg-info

pypi-build: ## Build package
$(MAKE) pypi-clean && \
python3 -m build

pypi-upload: ## Upload package
python3 -m twine upload --repository pypi dist/*


##@ Help
help: ## Show this help.
@echo "Prowler Makefile"
Expand Down
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ flake8 = "5.0.4"
bandit = "1.7.4"
safety = "2.3.1"
vulture = "2.6"
moto = "4.0.9"
moto = "4.0.11"
docker = "6.0.0"
openapi-spec-validator = "0.5.1"
pytest = "7.1.2"
Expand Down
Loading