Skip to content

Commit

Permalink
Fix #60
Browse files Browse the repository at this point in the history
  • Loading branch information
cmutel committed May 20, 2024
1 parent 19a6aeb commit 3185f0c
Show file tree
Hide file tree
Showing 11 changed files with 142 additions and 129 deletions.
Binary file added .DS_Store
Binary file not shown.
9 changes: 5 additions & 4 deletions .github/workflows/python-package-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
permissions:
id-token: write
steps:
- uses: actions/checkout@master
- name: Set up Python 3.10
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"
- name: Install pypa/build
run: >-
python -m
Expand All @@ -33,7 +33,8 @@ jobs:
- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip_existing: true
repository-url: https://test.pypi.org/legacy/
skip-existing: true
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
6 changes: 2 additions & 4 deletions .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ on:
- "**.ya?ml" # captures both .yml and .yaml
- "LICENSE"
- ".gitignore"
- "README.md"
pull_request:
branches: [main, develop]
types: [opened, reopened] # excludes syncronize to avoid redundant trigger from commits on PRs
Expand All @@ -25,7 +24,6 @@ on:
- "**.ya?ml"
- "LICENSE"
- ".gitignore"
- "README.md"
workflow_dispatch: # also allow manual trigger, for testing purposes

jobs:
Expand All @@ -34,8 +32,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
py-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-latest, windows-latest, macos-13, ubuntu-20.04, macos-latest, windows-2019]
py-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 0 additions & 2 deletions .isort.cfg

This file was deleted.

34 changes: 27 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ exclude: '^docs/conf.py'

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: check-added-large-files
Expand All @@ -28,16 +28,23 @@ repos:
# --remove-unused-variables,
# ]

# https://github.com/PyCQA/flake8/issues/234
- repo: https://github.com/john-hen/Flake8-pyproject
rev: 1.2.3
hooks:
- id: Flake8-pyproject

- repo: https://github.com/pycqa/isort
rev: 5.11.5
rev: 5.13.2
hooks:
- id: isort
args: [--settings-path=pyproject.toml]

- repo: https://github.com/psf/black
rev: 22.12.0
rev: 24.1.1
hooks:
- id: black
language_version: python3
args: [--config=pyproject.toml]

## If like to embrace black styles even in the docs:
# - repo: https://github.com/asottile/blacken-docs
Expand All @@ -47,9 +54,22 @@ repos:
# additional_dependencies: [black]

- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
rev: 7.0.0
hooks:
- id: flake8
args: ["--ignore=E501"]
## You can add flake8 plugins via `additional_dependencies`:
additional_dependencies: [Flake8-pyproject]
# You can add flake8 plugins via `additional_dependencies`:
# additional_dependencies: [flake8-bugbear]

- repo: local
hooks:
- id: pylint
name: pylint
entry: pylint
language: system
types: [python]
args:
[
"-rn", # Only display messages
"-sn", # Don't display the score
]
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
version: 2

conda:
environment: docs/environment.yaml
environment: environment.yaml

sphinx:
configuration: docs/conf.py
Expand Down
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# `bw_processing` Changelog

## DEV

* Changed packaging

### [0.9.3] - 2024-05-12

* Fix compatibility function for datetime utcnow for older Python versions
Expand Down
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
include bw_processing/VERSION
include bw_processing/examples/simple.zip
recursive-exclude dev *
104 changes: 103 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,105 @@
[build-system]
requires = ["setuptools>=61.0"]
requires = ["setuptools>=68.0"]
build-backend = "setuptools.build_meta"

[project]
name = "bw_processing"
authors = [
{ name="Chris Mutel", email="[email protected]" }
]
maintainers = [
{ name="Chris Mutel", email="[email protected]" }
]
description = "Foo"
readme = "README.md"
dynamic = ["version"]
# Add here all kinds of additional classifiers as defined under
# https://pypi.org/classifiers/
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Natural Language :: English",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering"
]
requires-python = ">=3.9"
dependencies = [
# dependencies as strings with quotes, e.g. "foo"
# You can add version requirements
"fs",
"numpy",
"pandas",

]

[project.urls]
source = "https://github.com/brightway-lca/bw_processing"
homepage = "https://github.com/brightway-lca/bw_processing"
tracker = "https://github.com/brightway-lca/bw_processing/issues"

[project.optional-dependencies]
# Getting recursive dependencies to work is a pain, this
# seems to work, at least for now
testing = [
"bw_processing",
"pytest",
"pytest-cov",
"python-coveralls"
]
dev = [
"build",
"pre-commit",
"pylint",
"pytest",
"pytest-cov",
"pytest-randomly",
"setuptools",
]

[tool.setuptools]
license-files = ["LICENSE"]
include-package-data = true
packages = ["bw_processing"]

[tool.setuptools.dynamic]
version = {attr = "bw_processing.__version__"}

[tool.pytest.ini_options]
addopts = "--cov bw_processing --cov-report term-missing --verbose"
norecursedirs = [
"dist",
"build",
".tox"
]
testpaths = ["tests/*.py"]

[tool.flake8]
# Some sane defaults for the code style checker flake8
max_line_length = 100
extend_ignore = ["E203", "W503"]
# ^ Black-compatible
# E203 and W503 have edge cases handled by black
exclude = [
".tox",
"build",
"dist",
".eggs",
"docs/conf.py",
]

[tool.black]
line-length = 100

[tool.isort]
profile = "black"
line_length = 100
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
ensure_newline_before_comments = true
4 changes: 0 additions & 4 deletions pytest.ini

This file was deleted.

105 changes: 0 additions & 105 deletions setup.cfg

This file was deleted.

0 comments on commit 3185f0c

Please sign in to comment.