Skip to content

Commit

Permalink
Merge pull request #17 from byuccl/fix_versioning
Browse files Browse the repository at this point in the history
check versioning
  • Loading branch information
jgoeders authored Feb 12, 2024
2 parents 6ed3c87 + a58acd1 commit 4cb8709
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 16 deletions.
1 change: 1 addition & 0 deletions .github/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ IN_ENV := . .venv/bin/activate;

env:
python3 -m venv .venv
$(IN_ENV) pip install packaging

check_version_increase:
$(IN_ENV) pip uninstall -y yinstruments
Expand Down
2 changes: 1 addition & 1 deletion .github/print_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import pkg_resources # part of setuptools

version = pkg_resources.require("yaccounts")[0].version
version = pkg_resources.require("yinstruments")[0].version
print(version)
26 changes: 26 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Publish

on:
push:
branches:
- main

jobs:
package:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Environment
run: make env

- name: Pypi credentials
run: |
echo "[pypi]" > ~/.pypirc
echo "username = __token__" >> ~/.pypirc
echo "password = ${{ secrets.PYPI_TOKEN }}" >> ~/.pypirc
- name: Package
run: make package

4 changes: 2 additions & 2 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Get Diff Action
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
pip3 install black
pip3 install -r requirements.txt
- name: Run format
run: |
make format
Expand Down
10 changes: 3 additions & 7 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
{
"python.pythonPath": "/usr/bin/python3",
"python.formatting.blackPath": "/home/nathanmain20/.local/lib/python3.8/site-packages",
"python.formatting.blackArgs": [
"--line-length",
"100"
],
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
},
"python.formatting.provider": "none"
"black-formatter.args": [
"--line-length", "100"
]
}
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ format:
pylint:
pylint $$(git ls-files '*.py')

env:
env: .venv/bin/activate

.venv/bin/activate: requirements.txt
python3 -m venv .venv
$(IN_ENV) pip install -r requirements.txt
$(IN_ENV) pip install -e .


.PHONY: test doc
.PHONY: test doc env format pylint
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
twine
black
black==24.1.1
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
setup(
name="yinstruments",
packages=find_packages(),
version="1.3.2",
version="1.3.3",
description="Experiment device control scripts for BYU's Configurable Computing Lab (https://ccl.byu.edu/)",
author="Jeff Goeders",
author_email="jeff.goeders@gmail.com",
Expand Down
1 change: 1 addition & 0 deletions yinstruments/pdu/cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""This the file that will run to execute calls on your PDU"""

import argparse
from .netbooter import Netbooter
from .lindy import Lindy
Expand Down
1 change: 0 additions & 1 deletion yinstruments/pdu/pdu.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ class PDUType(Enum):


class PDU:

"""Generic class for PDU"""

# initializes your PDU with callable characteristics
Expand Down

0 comments on commit 4cb8709

Please sign in to comment.