Skip to content

Commit

Permalink
release 0.5.1
Browse files Browse the repository at this point in the history
    New definition attributes
    Support for Keepass and Ansible-vault source formats
    Support for auto-generated ANSIBLE_PASSWORD_FILE
    New input handling via STDIN and Python-getpass
    Better error handling
    Improved documentation
    Lots and lots of tests
    Migrate project to more recent version of slap-cli for appdev management
    Update previous changelog files
    Update build tests to include keepassxc
  • Loading branch information
ndejong committed Sep 21, 2024
1 parent c665e14 commit 2716ca5
Show file tree
Hide file tree
Showing 137 changed files with 2,697 additions and 1,951 deletions.
7 changes: 7 additions & 0 deletions .changelog/0.3.1.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
release-date = "2020-12-13"

[[entries]]
id = "c03537a1-23a1-4765-a0e1-76e8f851b375"
type = "feature"
description = "Major project rearrangement, with full documentation"
author = "ndejong@threatpatrols.com"
6 changes: 0 additions & 6 deletions .changelog/0.3.1.yml

This file was deleted.

7 changes: 7 additions & 0 deletions .changelog/0.3.3.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
release-date = "2020-12-13"

[[entries]]
id = "69de0ed6-ef5e-4137-bf24-cbfb911d81b5"
type = "fix"
description = "Fix typo in package entrypoint"
author = "ndejong@threatpatrols.com"
6 changes: 0 additions & 6 deletions .changelog/0.3.3.yml

This file was deleted.

7 changes: 7 additions & 0 deletions .changelog/0.3.4.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
release-date = "2020-12-14"

[[entries]]
id = "2a344d45-7195-4491-9e25-0a0631dbaf85"
type = "fix"
description = "Fixes bug with null/none return types from exec and re-arranges test input data files"
author = "ndejong@threatpatrols.com"
7 changes: 0 additions & 7 deletions .changelog/0.3.4.yml

This file was deleted.

7 changes: 7 additions & 0 deletions .changelog/0.3.5.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
release-date = "2020-12-14"

[[entries]]
id = "f38dbde7-4546-4373-b72b-9b5334c59e95"
type = "fix"
description = "fixes broken merge"
author = "ndejong@threatpatrols.com"
6 changes: 0 additions & 6 deletions .changelog/0.3.5.yml

This file was deleted.

7 changes: 7 additions & 0 deletions .changelog/0.3.6.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
release-date = "2021-06-05"

[[entries]]
id = "7a0b5694-27bb-45af-a6dd-bf043fe26184"
type = "fix"
description = "migration from TravisCI to Github actions"
author = "ndejong@threatpatrols.com"
6 changes: 0 additions & 6 deletions .changelog/0.3.6.yml

This file was deleted.

7 changes: 7 additions & 0 deletions .changelog/0.3.7.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
release-date = "2022-03-29"

[[entries]]
id = "ed680068-13b2-490d-8265-f524b84f194a"
type = "fix"
description = "Black code cleanup; Add pylint; fix various pylint warnings"
author = "ndejong@threatpatrols.com"
5 changes: 0 additions & 5 deletions .changelog/0.3.7.yml

This file was deleted.

7 changes: 7 additions & 0 deletions .changelog/0.3.8.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
release-date = "2022-03-29"

[[entries]]
id = "229aa4d2-73d2-4095-bb1e-03f72e6b857c"
type = "fix"
description = "Fixes bug with an early return preventing more than one env-alias setting; changes the old Logger class out for something a little more standard; move the readdocs-custom-steps file out of the way"
author = "ndejong@threatpatrols.com"
7 changes: 0 additions & 7 deletions .changelog/0.3.8.yml

This file was deleted.

7 changes: 7 additions & 0 deletions .changelog/0.4.0.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
release-date = "2022-03-29"

[[entries]]
id = "d6aa2f98-c752-46ac-a6ac-c1f0121d3973"
type = "fix"
description = "Adds minor feature to check which version of env-alias is installed"
author = "ndejong@threatpatrols.com"
5 changes: 0 additions & 5 deletions .changelog/0.4.0.yml

This file was deleted.

7 changes: 7 additions & 0 deletions .changelog/0.5.1.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
release-date = "2024-09-21"

[[entries]]
id = "21e601b7-bf89-4861-8c61-f7359aa43da0"
type = "refactor"
description = "Large upgrade and improvements to env-alias"
author = "ndejong@threatpatrols.com"
23 changes: 23 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[flake8]
max-line-length = 120

# Black can yield formatted code that triggers these Flake8 warnings.
ignore =

# Line break occurred before a binary operator (W503) - https://www.flake8rules.com/rules/W503.html
W503

# Line break occurred after a binary operator (W504) - https://www.flake8rules.com/rules/W504.html
W504

# E501 line too long (151 > 120 characters) - https://www.flake8rules.com/rules/E501.html
E501

per-file-ignores =

# Module imported but unused (F401) - https://www.flake8rules.com/rules/F401.html
tests/**.py: F401

# W293 blank line contains whitespace - https://www.flake8rules.com/rules/W293.html
# W291 trailing whitespace - https://www.flake8rules.com/rules/W291.html
src/env_alias/main.py: W293, W291
60 changes: 23 additions & 37 deletions .github/workflows/build-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,53 +4,39 @@ on: [push]

jobs:

build:
test:
name: "Test package"
runs-on: ubuntu-latest

strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]

python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: Install actions/checkout@v2
uses: actions/checkout@v2

- name: Install actions/setup-python@v2 for ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Python version
run: python -c "import sys; print(sys.version)"
- uses: actions/checkout@v4
- uses: NiklasRosenstein/slap@gha/install/v1
with: { version: "1.12.0" }

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade pyyaml
- name: flake8 lint
run: |
python -m pip install --upgrade flake8
# https://flake8.pycqa.org/en/latest/user/error-codes.html
# https://pycodestyle.pycqa.org/en/latest/intro.html#error-codes
flake8 ./src --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 ./src --count --exit-zero --max-complexity=20 --max-line-length=120 --statistics
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with: { python-version: "${{ matrix.python-version }}" }

- name: python setup.py clean build
- name: Install required keepassxc
run: |
python -m pip install --upgrade wheel setuptools
python setup.py clean build
sudo apt-get -y update
sudo apt-get install -y keepassxc
- name: pytest
- name: Create a venv to operate within using slap-cli
run: |
python -m pip install --upgrade pytest
pytest
slap venv --create tester
- name: python setup.py install
- name: Install, test and build a package to install
run: |
python setup.py install
slap release --validate
slap install --use-venv=tester
slap test --use-venv=tester
mkdir build-tester
slap publish --build-directory build-tester --dry
- name: which env-alias
- name: Install the package from whl and run the application
run: |
which env-alias
which env-alias-generator
pip install build-tester/*.whl
env-alias --version
138 changes: 21 additions & 117 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,126 +1,30 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.py[cod]
*.egg-info
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
venv*/
.venv*/
.idea/
.pytest_cache/
__pycache__/
.pytest*/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject
dev/
dev.py
samples/
docs/_site

# mkdocs documentation
/site
dist/
build/
packages/

# mypy
.mypy_cache/
/.vscode
/dist
/build
.venv/
*.egg-info/
poetry.lock
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

.idea
profiler.html
18 changes: 0 additions & 18 deletions .pylintrc

This file was deleted.

Loading

0 comments on commit 2716ca5

Please sign in to comment.