Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
cutoffthetop committed Mar 12, 2024
1 parent 5e7ffe9 commit c88215f
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cve-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
cache-name: cache-trivy
with:
path: ~/.cache/trivy
key: ${{ env.cache-name }}-${{ hashFiles('*.lock') }}
key: ${{ env.cache-name }}-${{ hashFiles('poetry.lock') }}
restore-keys: |
${{ env.cache-name }}-
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ jobs:
restore-keys: |
${{ env.cache-name }}-
- name: Cache environment
- name: Cache poetry
uses: actions/cache@v4
env:
cache-name: cache-environment
cache-name: cache-poetry
with:
path: ~/.cache/pip
key: ${{ env.cache-name }}-${{ hashFiles('*.lock') }}
key: ${{ env.cache-name }}-${{ hashFiles('poetry.lock') }}
restore-keys: |
${{ env.cache-name }}-
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ jobs:
restore-keys: |
${{ env.cache-name }}-
- name: Cache environment
- name: Cache poetry
uses: actions/cache@v4
env:
cache-name: cache-environment
cache-name: cache-poetry
with:
path: ~/.cache/pip
key: ${{ env.cache-name }}-${{ hashFiles('*.lock') }}
key: ${{ env.cache-name }}-${{ hashFiles('poetry.lock') }}
restore-keys: |
${{ env.cache-name }}-
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ jobs:
restore-keys: |
${{ env.cache-name }}-
- name: Cache environment
- name: Cache poetry
uses: actions/cache@v4
env:
cache-name: cache-environment
cache-name: cache-poetry
with:
path: ~/.cache/pip
key: ${{ env.cache-name }}-${{ hashFiles('*.lock') }}
key: ${{ env.cache-name }}-${{ hashFiles('poetry.lock') }}
restore-keys: |
${{ env.cache-name }}-
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ dist/
downloads/
eggs/
.eggs/
.pdm-python
lib/
lib64/
parts/
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ hooks:
fi; \

install: setup hooks
# install packages from lock file in local virtual environment
# run the poetry installation with embedded virtual environment
@ echo installing package; \
pdm sync --clean --group dev; \

Expand Down
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,13 @@ components of the MEx project are open-sourced under the same license as well.
- on unix, consider using pyenv https://github.com/pyenv/pyenv
- get pyenv `curl https://pyenv.run | bash`
- install 3.11 `pyenv install 3.11`
- switch version `pyenv global 3.11`
- create env `pyenv virtualenv 3.11 mex`
- go to repo root
- use env `pyenv local mex`
- run `make install`
- on windows, consider using pyenv-win https://pyenv-win.github.io/pyenv-win/
- follow https://pyenv-win.github.io/pyenv-win/#quick-start
- install 3.11 `pyenv install 3.11`
- switch version `pyenv global 3.11`
- on windows, see https://python-poetry.org/docs/managing-environments
- install `python3.11` in your preferred way
- go to repo root
- run `.\mex.bat install`

### linting and testing
Expand All @@ -74,14 +75,14 @@ components of the MEx project are open-sourced under the same license as well.
### updating dependencies

- update boilerplate files with `cruft update`
- update global requirements in `requirements.txt` manually
- update global dependencies in `requirements.txt` manually
- update git hooks with `pre-commit autoupdate`
- update package dependencies using `pdm autoupdate`
- update github actions in `.github/workflows/*.yml` manually
- update github actions manually in `.github/workflows/*.yml`

### creating release

- update version in `pyproject.toml` and `CHANGELOG.md`
- commit update `git commit --message "..."`
- update version, eg `poetry version minor`
- commit update `git commit --message "..." pyproject.toml`
- create a tag `git tag ...`
- push `git push --follow-tags`
2 changes: 1 addition & 1 deletion mex.bat
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if "%CI%"=="" (
if %errorlevel% neq 0 exit /b %errorlevel%
)

@REM install packages from lock file in local virtual environment
@REM run the poetry installation with embedded virtual environment
echo installing package
pdm sync --clean --group dev
exit /b %errorlevel%
Expand Down

0 comments on commit c88215f

Please sign in to comment.