generated from delphix/.github
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from delphix/develop
Develop to Main Merge - Release
- Loading branch information
Showing
11 changed files
with
420 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
venv/ | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,27 @@ | ||
## Contributing | ||
1. Fork the project. | ||
1. Make your bug fix or new feature. | ||
1. Add tests for your code. | ||
1. Send a pull request. | ||
# | ||
# Copyright (c) 2021, 2022 by Delphix. All rights reserved. | ||
# | ||
|
||
Contributions must be signed as `User Name <user@email.com>`. Make sure to [set up Git with user name and email address](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup). Bug fixes should branch from the current stable branch. New features should be based on the release branch. | ||
This project is currently not accepting external contributions. | ||
|
||
## Contributor Agreement | ||
All contributors are required to sign the Delphix Contributor agreement prior to contributing code to an open source repository. This process is handled automatically by [cla-assistant](https://cla-assistant.io/). Simply open a pull request and a bot will automatically check to see if you have signed the latest agreement. If not, you will be prompted to do so as part of the pull request process. | ||
<div style="display:none"> | ||
--- Hidden Block ---- | ||
|
||
## Contributing | ||
1. Fork the project. | ||
2. Refer to [README.md](README.md) for the setup, pre-configurations and running the project. | ||
3. Once you have run the script successfully using `make run` (Linux/MacOS) or `python src\main.py` (Windows) | ||
7. Make your bug fix or new feature. | ||
8. Add tests for your code. | ||
9. Send a pull request. | ||
|
||
Contributions must be signed as `User Name <user@email.com>`. Make sure to [set up Git with user name and email address](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup). Bug fixes should branch from the current stable branch. New features should be based on the release branch. | ||
|
||
## Contributor Agreement | ||
All contributors are required to sign the Delphix Contributor agreement prior to contributing code to an open source repository. This process is handled automatically by [cla-assistant](https://cla-assistant.io/). Simply open a pull request and a bot will automatically check to see if you have signed the latest agreement. If not, you will be prompted to do so as part of the pull request process. | ||
|
||
------------------------ | ||
</div> | ||
|
||
## Code of Conduct | ||
This project operates under the Delphix Code of Conduct. By participating in this project you agree to abide by its terms. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
# | ||
# Copyright (c) 2022 by Delphix. All rights reserved. | ||
# | ||
|
||
.PHONY: --check_python --check_env_exists run tests --create_virtual_env --install_dependencies env clean_build clean_env clean build | ||
|
||
ROOT_DIR := $(shell pwd) | ||
VENV := venv | ||
PYTHON := $(VENV)/bin/python | ||
PIP := $(VENV)/bin/pip | ||
DLPX_NR := $(ROOT_DIR)/dist/delphix-nr | ||
DEFAULT_PYTHON3_ALIAS := python3 | ||
|
||
define show_version | ||
@export LC_ALL=en_AU.UTF-8; $(DLPX_NR) --version | ||
endef | ||
|
||
define check_python_exists | ||
@if ! command -v $(DEFAULT_PYTHON3_ALIAS) -V >/dev/null 2>&1; then \ | ||
echo "Python 3 is NOT present on the system, Please install it"; \ | ||
echo "If it is installed, then change the "DEFAULT_PYTHON3_ALIAS" in Makefile";\ | ||
exit 1; \ | ||
fi | ||
endef | ||
|
||
|
||
--check_python: | ||
@# Help: Checks existence of python virtual environment | ||
$(call check_python_exists) | ||
|
||
--check_env_exists: --check_python | ||
@[ -f $(PYTHON) ] && echo $(PYTHON) exists || (echo $(PYTHON) does NOT exist, use \"make env\" to create a virtual env; exit 1) | ||
|
||
|
||
run: --check_env_exists | ||
@# Help: Takes care of checking the prequisites like python, virtual env, dependencies and at last shows the Python Version | ||
-@echo `$(PYTHON) -V` | ||
export PYTHONPATH=$(ROOT_DIR); $(PYTHON) src/main.py | ||
|
||
tests: | ||
@# Help: Runs the unit tests inside tests folder and create a report | ||
$(PYTHON) -m pytest tests -s -v | ||
|
||
--create_virtual_env: --check_python | ||
@# Help: Creates a virtual environment | ||
-@echo 'Creating Virtual environment' | ||
@$(DEFAULT_PYTHON3_ALIAS) -m venv venv || echo 'Python env already exists' | ||
|
||
--install_dependencies: requirements.txt | ||
@# Help: Installs the dependencies from requirements.txt | ||
-@echo 'Installing Dependencies...' | ||
@$(PYTHON) -m pip install --upgrade pip | ||
@$(PIP) install -r requirements.txt | ||
|
||
env: --create_virtual_env --install_dependencies | ||
@# Help: Creates a virtual environment with python 3 if not already present | ||
|
||
clean_env: | ||
@# Help: Clean the virtual env that was created | ||
-@rm -rf venv | ||
|
||
clean_build: | ||
@# Help: Cleans the build files | ||
-@rm -rf build/ | ||
-@rm -rf dist/ | ||
-@rm -rf delphix-nr.spec | ||
|
||
clean: clean_build | ||
@# Help: Cleans the pycache, coverage and build files | ||
-@rm -rf __pycache__ | ||
-@rm -f .coverage | ||
-@rm -rf .pytest_cache | ||
-@rm -rf tests/.pytest_cache | ||
-@rm -rf tests/plugin_operations/.pytest_cache | ||
-@rm -rf tests/CodeCoverage | ||
-@rm -rf tests/Report.html | ||
-@rm -rf .dvp-gen-output | ||
|
||
build: --check_env_exists clean_build | ||
@# Help: Makes the delphix-nr build | ||
$(VENV)/bin/pyinstaller --onefile src/main.py -n delphix-nr | ||
-@echo 'Build is present at $(ROOT_DIR)/dist/delphix-nr' | ||
$(call show_version) | ||
|
||
|
||
# A hidden target | ||
.hidden: | ||
help: | ||
@printf "%-20s %s\n" "Target" "Description" | ||
@printf "%-20s %s\n" "------" "-----------" | ||
@make -pqR : 2>/dev/null \ | ||
| awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' \ | ||
| sort \ | ||
| egrep -v -e '^[^[:alnum:]]' -e '^$@$$' \ | ||
| xargs -I _ sh -c 'printf "%-20s " _; make _ -nB | (grep -i "^# Help:" || echo "") | tail -1 | sed "s/^# Help: //g"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,12 @@ | ||
## Support | ||
This software is provided as-is, without warranty of any kind or commercial support through Delphix. See the associated license for additional details. Questions, issues, feature requests, and contributions should be directed to the community as outlined in the [Delphix Community Guidelines](https://delphix.github.io/community-guidelines.html). | ||
|
||
<hr> | ||
<h4> Supported Python Versions and OS </h4> | ||
<hr> | ||
|
||
- MacOS - Python3.7 and Python3.8 | ||
- Linux - Python3.7+ | ||
- Windows - Python3.7+ | ||
|
||
<hr> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[COMPONENTS] | ||
; This list holds the components for which | ||
; we send the data to new relic | ||
; refer to DCT API's for getting these components | ||
monitor = management/engines, sources, dsources, vdbs, environments | ||
|
||
[INTERVAL] | ||
seconds = 30 | ||
|
||
[LOGGING] | ||
LEVEL = INFO |
Oops, something went wrong.