Skip to content
This repository has been archived by the owner on Dec 8, 2024. It is now read-only.

Commit

Permalink
Going back to old formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
dimkauzh committed Jan 14, 2024
1 parent f48cb29 commit 01b213c
Show file tree
Hide file tree
Showing 5 changed files with 200 additions and 36 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/ci_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: CI Check

on:
push:
branches:
- main
- dev
pull_request:
branches:
- main
- dev

permissions:
contents: read

jobs:
install:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"

- name: Update PIP
run: python -m pip install --upgrade pip

- name: Install packages
run: python -m pip install --user pdm

- name: Install module (pdm)
run: python -m pdm install


build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"

- name: Update PIP
run: python -m pip install --upgrade pip

- name: Install packages
run: python -m pip install --user pdm

- name: Build module (pdm)
run: python -m pdm build
29 changes: 3 additions & 26 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,10 @@
name: Lint

on:
push:
branches:
- main
- dev
pull_request:
branches:
- main
- dev

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on: [push, pull_request]

jobs:
lint:
name: Lint
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup PDM
uses: pdm-project/setup-pdm@v3

- name: Install dependencies
run: pdm install

- name: Lint
run: pdm run lint
- uses: actions/checkout@v3
- uses: psf/black@stable
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Contributing
We are happy and welcome if you want to contribute to fusion engine. But please consider a few details before continuing:
- Branch: Please when working on your fork, work in the dev branch, because we only will accept commits to the dev branch. It will later be released with the next version of fusion.
- Explain: Please explain why this should be considered and merged.
- Explain: Please explain why this should be considered and merged. That will make our life easier.
- Test: Please test your code before even opening a new pull request.
- Documentation: Please, if your adding something new, like a feature, please document everything.
- Format: Please, run black for formatting of the code.

## Not following these rules
If we see a pull request that doesn't follow these rules, we will tell you that, and close the pull request.
Expand All @@ -13,3 +14,4 @@ We allow you to re-open a new pull request, but we expect you to have your code
- PDM: We are using pdm for our main interaction with the library.
- pyproject.toml: Pythons way for setting up a project. A replacement for setup.py
- pygame-ce, pygame_gui and pymunk: We are using all three of these libraries to develop fusion engine.
- black: We are using black to format code
138 changes: 136 additions & 2 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 2 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,12 @@ source = "file"
path = "src/fusionengine/__init__.py"

[tool.pdm.dev-dependencies]
lint = ["ruff"]
lint = ["black"]

[tool.pdm.scripts]
example1 = "python src/fusionengine/examples/example1.py"
example2 = "python src/fusionengine/examples/example2.py"
example3 = "python src/fusionengine/examples/example3.py"
example4 = "python src/fusionengine/examples/example4.py"
example5 = "python src/fusionengine/examples/example5.py"
lint = { cmd = "ruff check" }

[tool.ruff]
extend-exclude = ["tests"]
select = ["ALL"]
ignore = ["D1", "D203", "D212", "E402", "F403", "S", "T20"]
lint = "black ."

0 comments on commit 01b213c

Please sign in to comment.