Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jpfleischer committed Dec 24, 2023
2 parents 8f4eb45 + 21e2473 commit f989d10
Show file tree
Hide file tree
Showing 126 changed files with 4,904 additions and 4,952 deletions.
12 changes: 0 additions & 12 deletions .bumpversion.cfg

This file was deleted.

99 changes: 99 additions & 0 deletions .github/workflows/python-package-conda.yml
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.tmp
.DS*
.report.html
.idea
Expand Down
26 changes: 26 additions & 0 deletions .mailmap
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]>
Expand Down
32 changes: 26 additions & 6 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -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]>
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,38 @@
# Changelog

## Changes so far in version 5

## 5.0.26

Summary of changes till 5.0.26

* add calculate disk space
* fix make pip
* Merge branch 'main' of github.com:cloudmesh/cloudmesh-common
* improve the printer
* update project urls
* add check for sudo
* add pip uninstall from package
* Merge branch 'main' of github.com:cloudmesh/cloudmesh-common
* the delete tag for github is now in cloudmesh-git
* update makefile
* Add strict editable mode to pip installation
* update docstring
* update docstrings
* Refactor Default class to include documentation
* add v5 files
* improve documentation
* convert docstrings to google format
* update bumpversion.yaml
* add strict install
* move the docker file test to future
* do for now ignore the verbose test
* print location of var file in verbose test
* improve verbose test
* improve verbose test
* change install.sh to e.sh
* moving towards toml

## 4.3.2

Intermediate releases: 4.3.1, 4.3.0
Expand Down
21 changes: 21 additions & 0 deletions Dockerfile
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"]
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
http://www.apache.org/licenses/

Copyright 2017-2021 Gregor von Laszewski, Indiana University
Copyright 2021,2022 Gregor von Laszewski, University of Virginia
Copyright 2021-2023 Gregor von Laszewski, University of Virginia

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ include VERSION
include *.md
include LICENSE
include requirements-dev.txt
graft cloudmesh/common/bin
136 changes: 9 additions & 127 deletions Makefile
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

Loading

0 comments on commit f989d10

Please sign in to comment.