Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated package infrastructure #73

Merged
merged 2 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,37 @@ name: CI
on:
push:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:

tests:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
with:
envs: |
- linux: py39-test-psutil56
- linux: py310-test-psutil57
- linux: py311-test-psutil58
- linux: py312-test-psutil59

- macos: py39-test-psutil56
- macos: py310-test-psutil57
- macos: py311-test-psutil58
- macos: py312-test-psutil59

- windows: py39-test-psutil56
- windows: py310-test-psutil57
- windows: py311-test-psutil58
- windows: py312-test-psutil59

publish:
needs: tests
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v1
with:
test_extras: 'test'
test_command: pytest --pyargs psrecord
secrets:
pypi_token: ${{ secrets.pypi_token }}
33 changes: 33 additions & 0 deletions .github/workflows/update-changelog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This workflow takes the GitHub release notes an updates the changelog on the
# main branch with the body of the release notes, thereby keeping a log in
# the git repo of the changes.

name: "Update Changelog"

on:
release:
types: [released]

jobs:
update:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: main

- name: Update Changelog
uses: stefanzweifel/changelog-updater-action@v1
with:
release-notes: ${{ github.event.release.body }}
latest-version: ${{ github.event.release.name }}
path-to-changelog: CHANGES.md

- name: Commit updated CHANGELOG
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: main
commit_message: Update CHANGELOG
file_pattern: CHANGES.md
33 changes: 0 additions & 33 deletions .travis.yml

This file was deleted.

43 changes: 43 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
[build-system]
requires = [
"setuptools>=61.2",
]
build-backend = "setuptools.build_meta"

[project]
name = "psrecord"
version = "1.3.dev0"
authors = [
{ name = "Thomas Robitaille", email = "thomas.robitaille@gmail.com" },
]
classifiers = [
"Development Status :: 3 - Alpha",
"Programming Language :: Python",
"License :: OSI Approved :: BSD License",
]
description = "Python package to record activity from processes"
readme = "README.rst"
dependencies = [
"psutil>=5.6",
]

[project.optional-dependencies]
test = [
"pytest>=7.0",
]

[project.license]
text = "Simplified BSD License"

[project.urls]
Homepage = "https://github.com/astrofrog/psrecord"

[tool.setuptools]
zip-safe = true
provides = [
"psrecord",
]
include-package-data = false

[tool.setuptools.packages.find]
namespaces = false
54 changes: 0 additions & 54 deletions setup.py

This file was deleted.

23 changes: 23 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[tox]
envlist =
py{39,310,311,312}-test{-psutil56,-psutil57,-psutil58,-psutil59}
requires =
setuptools >= 30.3.0
pip >= 19.3.1
isolated_build = true

[testenv]
changedir =
test: .tmp/{envname}
description =
test: run tests with pytest
deps =
psutil56: psutil==5.6.*
psutil57: psutil==5.7.*
psutil58: psutil==5.8.*
psutil59: psutil==5.9.*
extras =
test
commands =
pip freeze
pytest --pyargs psrecord {posargs}
Loading