Skip to content

Commit

Permalink
Drop python 3.9 and more CI fixes (#230)
Browse files Browse the repository at this point in the history
  • Loading branch information
noemifrisina authored Apr 22, 2024
1 parent aad7c10 commit 6201755
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.9.1
current_version = 0.9.0
commit = True
tag = True

Expand Down
10 changes: 5 additions & 5 deletions .github/actions/install_requirements/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ runs:

steps:
- name: Setup python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python_version }}

Expand All @@ -26,19 +26,19 @@ runs:
# -c uses requirements.txt as constraints, see 'Validate requirements file'
pip install -c ${{ inputs.requirements_file }} ${{ inputs.install_options }}
shell: bash

- name: Create lockfile
run: |
mkdir -p lockfiles
pip freeze --exclude-editable > lockfiles/${{ inputs.requirements_file }}
# delete the self referencing line and make sure it isn't blank
sed -i '/file:/d' lockfiles/${{ inputs.requirements_file }}
sed -i'' -e '/file:/d' lockfiles/${{ inputs.requirements_file }}
shell: bash

- name: Upload lockfiles
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4.0.0
with:
name: lockfiles
name: lockfiles-${{ inputs.python_version }}-${{ inputs.artifact_name }}-${{ github.sha }}
path: lockfiles

# This eliminates the class of problems where the requirements being given no
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest"] # can add windows-latest, macos-latest
python: ["3.10", "3.11"]
python: ["3.11"]
install: ["-e .[dev]"]
# Make one version be non-editable to test both paths of version code
include:
- os: "ubuntu-latest"
python: "3.9"
python: "3.10"
install: ".[dev]"

runs-on: ${{ matrix.os }}
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
### Changed
- Small CI updates

### Removed
- Dropped Python 3.9 support


## 0.9.0

Expand Down
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@ build-backend = "setuptools.build_meta"

[project]
name = "nexgen"
version = "0.9.1"
version = "0.9.0"
description = "Next Generation Nexus Generator"
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
Expand All @@ -29,7 +28,7 @@ dependencies = [
]
license.file = "LICENSE"
readme = "README.rst"
requires-python = ">=3.8"
requires-python = ">=3.10"

[project.optional-dependencies]
dev = [
Expand Down
2 changes: 1 addition & 1 deletion src/nexgen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@

__author__ = "Diamond Light Source - Scientific Software"
__email__ = "data_analysis@diamond.ac.uk"
__version__ = "0.9.1"
__version__ = "0.9.0"
__version_tuple__ = tuple(int(x) for x in __version__.split("."))
8 changes: 1 addition & 7 deletions src/nexgen/command_line/phil_files_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,14 @@
import logging
import shutil
import sys
from importlib.resources import files
from pathlib import Path

import freephil

from .. import log, templates
from . import config_parser, nexus_parser, version_parser

try:
from importlib.resources import files
except ImportError:
# Python < 3.9 compatibility
from importlib_resources import files


# Define a logger object
logger = logging.getLogger("nexgen.NeXusGenerator")

Expand Down

0 comments on commit 6201755

Please sign in to comment.