-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/cloudmesh/cloudmesh-common
- Loading branch information
Showing
126 changed files
with
4,904 additions
and
4,952 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,99 @@ | ||
name: Python Package using Conda | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build-linux: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 5 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python 3.12 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.12' | ||
- name: Add conda to system path | ||
run: | | ||
# $CONDA is an environment variable pointing to the root of the miniconda directory | ||
echo $CONDA/bin >> $GITHUB_PATH | ||
- name: Add extra channels | ||
run: | | ||
conda config --add channels conda-forge | ||
conda config --add channels defaults | ||
- name: Install dependencies | ||
run: | | ||
conda env update --file environment.yml --name base | ||
- name: Lint with flake8 | ||
run: | | ||
conda install flake8 | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 --exclude deprecated . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 --exclude deprecated . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- name: Install current Python library | ||
run: | | ||
source activate base # Activate the conda environment | ||
pip install -e . # Install the current Python library in editable mode | ||
pip install cloudmesh-vpn | ||
- name: Test with pytest | ||
run: | | ||
conda install pytest | ||
source activate base & pytest tests -rsx | ||
# build-windows: | ||
# runs-on: windows-latest | ||
# strategy: | ||
# max-parallel: 5 | ||
# | ||
# steps: | ||
# # - uses: actions/checkout@v3 | ||
# # - name: Set up Python 3.10 | ||
# # uses: conda-incubator/setup-miniconda@v2 | ||
# # with: | ||
# # miniconda-version: "latest" | ||
# - uses: actions/checkout@v3 | ||
# - name: Set up Python 3.12 | ||
# uses: actions/setup-python@v3 | ||
# with: | ||
# python-version: '3.12' | ||
# # - name: Add conda to system path | ||
# # run: | | ||
# # # $CONDA is an environment variable pointing to the root of the miniconda directory | ||
# # echo $CONDA/bin >> $GITHUB_PATH | ||
# # - name: Add extra channels | ||
# # run: | | ||
# # conda config --add channels conda-forge | ||
# # conda config --add channels defaults | ||
# | ||
# # - name: Install dependencies | ||
# # run: | | ||
# # conda env update --file environment.yml --name base | ||
# - name: set up env3 | ||
# run: | | ||
# python -m venv ENV3 | ||
# | ||
# - name: Lint with flake8 | ||
# run: | | ||
# .\ENV3\Scripts\activate.ps1 | ||
# pip install flake8 | ||
# # stop the build if there are Python syntax errors or undefined names | ||
# flake8 --exclude deprecated . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
# flake8 --exclude deprecated . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
# | ||
# - name: Install current Python library | ||
# run: | | ||
# .\ENV3\Scripts\activate.ps1 | ||
# pip install -e . # Install the current Python library in editable mode | ||
# pip install cloudmesh-vpn | ||
# - name: Test with pytest | ||
# run: | | ||
# .\ENV3\Scripts\activate.ps1 | ||
# pip install pytest | ||
# pytest tests -rsx |
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,3 +1,4 @@ | ||
.tmp | ||
.DS* | ||
.report.html | ||
.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,3 +1,29 @@ | ||
Gregor von Laszewski <[email protected]> | ||
J.P Fleischer <[email protected]> | ||
J.P Fleischer <[email protected]> | ||
Robert Knuuti <[email protected]> | ||
Fugang Wang <[email protected]> | ||
Badi Abdul-Wahid <[email protected]> | ||
Andrew Holland <[email protected]> | ||
J.P Fleisher <[email protected]> | ||
Rick Otten <[email protected]> | ||
Robert Knuuti <[email protected]> | ||
Dave DeMeulenaere <[email protected]> | ||
Lars Olson <[email protected]> | ||
Anthon van der Neut <[email protected]> | ||
Anthony Orlowski <[email protected]> | ||
Jackson Miskill <[email protected]> | ||
Toble007 <[email protected]> | ||
J.P. Fleischer <[email protected]> | ||
Ketan Pimparkar <[email protected]> | ||
Vafa Andalibi <[email protected]> | ||
Alex Beck <[email protected]> | ||
Anthony Orlowski <[email protected]> | ||
Anthony Orlowski <[email protected]> | ||
Ashok <[email protected]> | ||
Karthick <[email protected]> | ||
Rick Otten <[email protected]> | ||
Dhakshesh Kolli <[email protected]> | ||
Andrew Holland <[email protected]> | ||
Andrew Holland <[email protected]> | ||
Anthon van der Neut <[email protected]> | ||
|
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 |
---|---|---|
|
@@ -4,9 +4,29 @@ Author | |
|
||
Contributors | ||
|
||
fugangwang <[email protected]> | ||
Badi Abdul-Wahid <[email protected]> | ||
Anthon van der Neut <[email protected]> | ||
Dave DeMeulenaere <[email protected]> | ||
justbbusy <[email protected]> | ||
karthick <[email protected]> | ||
1768 Gregor von Laszewski <[email protected]> | ||
113 J.P <[email protected]> | ||
21 J.P <[email protected]> | ||
20 Robert Knuuti <[email protected]> | ||
17 Fugang Wang <[email protected]> | ||
16 Badi Abdul-Wahid <[email protected]> | ||
10 Andrew Holland <[email protected]> | ||
8 J.P <[email protected]> | ||
8 rickotten <[email protected]> | ||
7 Robert Knuuti <[email protected]> | ||
6 Dave DeMeulenaere <[email protected]> | ||
5 Lars Olson <[email protected]> | ||
4 Anthon van der Neut <[email protected]> | ||
4 Anthony Orlowski <[email protected]> | ||
4 Jackson Miskill <[email protected]> | ||
4 Toble007 <[email protected]> | ||
3 jpfleischer <[email protected]> | ||
2 Ketan Pimparkar <[email protected]> | ||
2 Vafa Andalibi <[email protected]> | ||
2 abeck14 <[email protected]> | ||
2 aporlowski <[email protected]> | ||
1 Anthony Orlowski <[email protected]> | ||
1 Ashok <[email protected]> | ||
1 Karthick <[email protected]> | ||
1 devrick <[email protected]> | ||
1 dkkolli <[email protected]> |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Use Ubuntu 22.04 as the base image | ||
FROM ubuntu:22.04 | ||
|
||
# Set the working directory to /app | ||
WORKDIR /app | ||
|
||
# Install system dependencies | ||
RUN apt-get update && \ | ||
apt-get install -y python3.12 python3.12-venv && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Copy the current directory contents into the container at /app | ||
COPY . /app | ||
|
||
# Install additional dependencies | ||
RUN python3.12 -m venv ENV3 && \ | ||
. ENV3/bin/activate && \ | ||
pip install -r requirements.txt | ||
|
||
# Specify the default command to run on container start | ||
CMD ["pytest", "tests", "-rsx"] |
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 |
---|---|---|
|
@@ -9,3 +9,4 @@ include VERSION | |
include *.md | ||
include LICENSE | ||
include requirements-dev.txt | ||
graft cloudmesh/common/bin |
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,131 +1,13 @@ | ||
package=sys | ||
UNAME=$(shell uname) | ||
VERSION=`head -1 VERSION` | ||
CURRENT_DIR := $(shell pwd) | ||
BASENAME := $(shell basename $(CURRENT_DIR)) | ||
package=$(BASENAME) | ||
|
||
.PHONY: conda | ||
include ../cloudmesh-common/makefile.mk | ||
|
||
define banner | ||
@echo | ||
@echo "############################################################" | ||
@echo "# $(1) " | ||
@echo "############################################################" | ||
endef | ||
|
||
source: | ||
$(call banner, "Install cloudmesh-common") | ||
pip install -e . -U | ||
|
||
flake8: | ||
cd ..; flake8 --max-line-length 124 --ignore=E722 cloudmesh-$(package)/cloudmesh | ||
cd ..; flake8 --max-line-length 124 --ignore=E722 cloudmesh-$(package)/tests | ||
|
||
pylint: | ||
cd ..; pylint --rcfile=cloudmesh-$(package)/.pylintrc cloudmesh-$(package)/cloudmesh | ||
cd ..; pylint --rcfile=cloudmesh-$(package)/.pylintrc --disable=F0010 cloudmesh-$(package)/tests | ||
|
||
requirements: | ||
echo "# cloudmesh-common requirements"> tmp.txt | ||
#echo "cloudmesh-common" > tmp.txt | ||
#echo "cloudmesh-cmd5" >> tmp.txt | ||
# pip-compile setup.py | ||
cat requirements.txt >> tmp.txt | ||
mv tmp.txt requirements.txt | ||
-git commit -m "update requirements" requirements.txt | ||
-git push | ||
|
||
test: | ||
pytest -v --html=.report.html | ||
open .report.html | ||
|
||
dtest: | ||
pytest -v --capture=no | ||
|
||
clean: | ||
$(call banner, "CLEAN") | ||
rm -rf *.zip | ||
rm -rf *.egg-info | ||
rm -rf *.eggs | ||
rm -rf docs/build | ||
rm -rf build | ||
rm -rf dist | ||
find . | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf | ||
rm -rf .tox | ||
rm -f *.whl | ||
|
||
|
||
###################################################################### | ||
# PYPI | ||
###################################################################### | ||
|
||
|
||
twine: | ||
pip install -U twine | ||
|
||
dist: | ||
python setup.py sdist bdist_wheel | ||
twine check dist/* | ||
.PHONY: help | ||
|
||
patch: clean twine | ||
$(call banner, "patch") | ||
bump2version --allow-dirty patch | ||
python setup.py sdist bdist_wheel | ||
git push origin main --tags | ||
twine check dist/* | ||
twine upload --repository testpypi dist/* | ||
# $(call banner, "install") | ||
# pip search "cloudmesh" | fgrep cloudmesh-$(package) | ||
# sleep 10 | ||
# pip install --index-url https://test.pypi.org/simple/ cloudmesh-$(package) -U | ||
|
||
minor: clean | ||
$(call banner, "minor") | ||
bump2version minor --allow-dirty | ||
@cat VERSION | ||
@echo | ||
|
||
release: clean | ||
$(call banner, "release") | ||
git tag "v$(VERSION)" | ||
git push origin main --tags | ||
python setup.py sdist bdist_wheel | ||
twine check dist/* | ||
twine upload --repository pypi dist/* | ||
$(call banner, "install") | ||
@cat VERSION | ||
help: | ||
@echo "Available targets:" | ||
@echo "------------------" | ||
@grep ": ##" ../cloudmesh-common/makefile.mk | awk 'BEGIN {FS=": ##"}; {printf "%-11s - %s\n", $$1, $$2}' | ||
@echo | ||
# sleep 10 | ||
# pip install -U cloudmesh-common | ||
|
||
|
||
dev: | ||
bump2version --new-version "$(VERSION)-dev0" part --allow-dirty | ||
bump2version patch --allow-dirty | ||
@cat VERSION | ||
@echo | ||
|
||
reset: | ||
bump2version --new-version "4.0.0-dev0" part --allow-dirty | ||
|
||
upload: | ||
twine check dist/* | ||
twine upload dist/* | ||
|
||
pip: | ||
pip install --index-url https://test.pypi.org/simple/ cloudmesh-$(package) -U | ||
|
||
# --extra-index-url https://test.pypi.org/simple | ||
|
||
log: | ||
$(call banner, log) | ||
gitchangelog | fgrep -v ":dev:" | fgrep -v ":new:" > ChangeLog | ||
git commit -m "chg: dev: Update ChangeLog" ChangeLog | ||
git push | ||
|
||
# bump: | ||
# git checkout main | ||
# git pull | ||
# tox | ||
# python setup.py sdist bdist_wheel upload | ||
# bumpversion --no-tag patch | ||
# git push origin main --tags | ||
|
Oops, something went wrong.