Skip to content

Commit

Permalink
Merge pull request #252 from os-climate/cleanup-build-env
Browse files Browse the repository at this point in the history
Chore: Remove redundant build parameters
  • Loading branch information
ModeSevenIndustrialSolutions authored Sep 20, 2023
2 parents e39ddbf + 18825df commit 8f1c753
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 3,124 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
if: github.event.pull_request.merged == true
name: "Rebuild documentation"
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
python-version: ['3.11']
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-notebooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
build:
name: "Build and test"
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11']
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/linting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,17 @@ jobs:
uses: actions/checkout@v3

- name: "Checking YAML files (yamllint)"
if: always()
run: |
pip install yamllint
yamllint .
- name: "Checking TOML files (gh-action-toml-linter)"
if: always()
uses: yisonPylkita/gh-action-toml-linter@0.1.3

- name: "Checking GitHub Actions (actionlint)"
if: always()
id: actionlint
uses: raven-actions/actionlint@v1
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-builds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
# Don't run if pull request is NOT merged
if: github.event.pull_request.merged == true
runs-on: "ubuntu-latest"
continue-on-error: true
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11']
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ __pycache__/
*.so

# Distribution / packaging
pdm.lock
.Python
.pdm-python
build/
Expand Down
3,063 changes: 0 additions & 3,063 deletions pdm.lock

This file was deleted.

19 changes: 1 addition & 18 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,6 @@ Downloads = "https://github.com/os-climate/ITR/releases"
Documentation = "https://github.com/os-climate/ITR/tree/main/docs"
"Source Code" = "https://github.com/os-climate/ITR"

[project.optional-dependencies]
dev = [ "nose2" ]

[build-system]
requires = [
# "setuptools>=65.7.0",
# "setuptools-scm",
"pdm-backend"
]
# build-backend = "setuptools.build_meta"
build-backend = "pdm.backend"

[tool.pdm.build]
dependencies = { file = [ "requirements-dev.txt" ] }
# source-includes = [ "ITR" ]
run-setuptools = true

[tool.setuptools.dynamic]
dependencies = { file = [ "requirements.txt" ] }
optional-dependencies = { dev = { file = [ "requirements-dev.txt" ] } }
requires = [ "pdm-backend" ]
10 changes: 0 additions & 10 deletions requirements-dev.txt

This file was deleted.

50 changes: 17 additions & 33 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,65 +17,49 @@ isolated_build = True
description = Invoke pytest to run automated tests
deps = pdm
setenv =
TOXINIDIR = {toxinidir}
PDM_IGNORE_SAVED_PYTHON="1"
TOXINIDIR = {toxinidir}
PDM_IGNORE_SAVED_PYTHON="1"
passenv =
HOME
SETUPTOOLS_*
HOME
extras =
testing
testing
commands =
pdm install --dev
pytest test
pdm install --dev
pytest test

[testenv:lint]
deps = pdm
commands =
pdm install -G lint
actionlint
yamllint .


# # To run `tox -e lint` you need to make sure you have a
# # `.pre-commit-config.yaml` file. See https://pre-commit.com
# [testenv:lint]
# description = Perform static analysis and style checks
# skip_install = True
# deps = pre-commit
# passenv =
# HOMEPATH
# PROGRAMDATA
# SETUPTOOLS_*
# commands =
# pre-commit run --all-files {posargs:--show-diff-on-failure}
# To run `tox -e lint` you need to make sure you have a
# `.pre-commit-config.yaml` file. See https://pre-commit.com
description = Perform static analysis and style checks
passenv =
HOMEPATH
PROGRAMDATA
deps =
pre-commit
pdm
allowlist_externals = pre-commit
commands = pre-commit run --all-files {posargs:--show-diff-on-failure}


[testenv:{build,clean}]
description =
build: Build the package in isolation according to PEP517, see https://github.com/pypa/build
clean: Remove old distribution files and temporary build artifacts (./build and ./dist)
# https://setuptools.pypa.io/en/stable/build_meta.html#how-to-use-it
skip_install = True
changedir = {toxinidir}
deps =
build: build[virtualenv]
passenv =
SETUPTOOLS_*
commands =
clean: python -c 'import shutil; [shutil.rmtree(p, True) for p in ("build", "dist", "docs/_build")]'
clean: python -c 'import pathlib, shutil; [shutil.rmtree(p, True) for p in pathlib.Path("src").glob("*.egg-info")]'
build: python -m build {posargs}
# By default, both `sdist` and `wheel` are built. If your sdist is too big or you don't want
# to make it available, consider running: `tox -e build -- --wheel`


[testenv:{docs,doctests,linkcheck}]
description =
docs: Invoke sphinx-build to build the docs
doctests: Invoke sphinx-build to run doctests
linkcheck: Check for broken links in the documentation
passenv =
SETUPTOOLS_*
setenv =
DOCSDIR = {toxinidir}/docs
BUILDDIR = {toxinidir}/docs/_build
Expand Down

0 comments on commit 8f1c753

Please sign in to comment.