Skip to content

Commit

Permalink
Make additional changes for use as a pdm template
Browse files Browse the repository at this point in the history
  • Loading branch information
bsweger committed Jan 28, 2024
1 parent 7de53f8 commit aff696d
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 21 deletions.
22 changes: 6 additions & 16 deletions .github/workflows/pythonapp-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
- name: Set up PDM
uses: pdm-project/setup-pdm@v4
with:
python-version: '3.10'
cache: 'pip'
- name: install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt -e .
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
cache: true
- name: Install dependencies
run: pdm install
- name: lint
run: |
ruff . --fix
Expand All @@ -26,10 +22,4 @@ jobs:
- name: run tests
run: |
pytest
check-requirements:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: compare requirements to pyproject dependencies
run: |
echo 'not implemented'
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,16 @@ ENV/
env.bak/
venv.bak/

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml
.pdm-python
.pdm-build/

# Spyder project settings
.spyderproject
.spyproject
Expand Down
1 change: 0 additions & 1 deletion .python-version

This file was deleted.

16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# Python App Template
# python_app

There are so many good Python app templates in the world, but this one is mine.
python_app is a template for use with PDM

To create a new PDM-based project that uses this template:

1. [Install PDM](https://pdm-project.org/latest/#installation)
2. Create a new project directory:
```
mkdir my_project && cd my_project
```
3. Initialize a PDM project, using this repo as a template:
```
pdm init https://github.com/bsweger/python-app-template
```
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ requires = ['setuptools', 'wheel']
[tools.setuptools]
packages = ['python_app']

[tool.python-app]
[tool.python_app]
# to write json-formatted logs to disk, uncomment the following line specify the file location
# log_file = '/Users/becky/logs/python_app.log'

Expand All @@ -47,4 +47,4 @@ extend-select = ['I']
quote-style = 'single'

[tool.setuptools.dynamic]
version = {attr = 'python_app.__version__'}
version = {attr = 'python_app.__version__'}
File renamed without changes.

0 comments on commit aff696d

Please sign in to comment.