Skip to content

Commit

Permalink
Updates on requirements packaging, publishing, CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
kavvkon committed Feb 5, 2024
1 parent 66797ed commit 10e5a6d
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 9 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/publish.yml
@@ -0,0 +1,29 @@
# Build the package and publish it to PyPI after tests pass.
name: Publish to PyPI
on:
release:
types: ["published"]

jobs:
tests:
uses: ./.github/workflows/tests.yml
publish:
name: publish
needs: [tests] # require tests to pass before deploy runs
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Build package
run: |
python -m pip install -U pip build
python -m build
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_KEY }}
@@ -1,6 +1,9 @@
name: enlopy-tests

on: [push]
on:
push:
pull_request:
workflow_call:

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
@@ -1 +1 @@
include *.rst *.txt *.yml LICENSE .travis.yml
include *.rst *.txt *.yml LICENSE
6 changes: 3 additions & 3 deletions binder/environment.yml
Expand Up @@ -3,10 +3,10 @@ channels:
- conda-forge
- defaults
dependencies:
- python=3.7
- python=3.11
- numpy>=1.12
- matplotlib>=2.0
- pandas>=0.22
- scipy>=1.0
- pandas>=2.0
- scipy>=1.10
- enlopy
- rise
2 changes: 1 addition & 1 deletion environment.yml
@@ -1,6 +1,6 @@
name: enlopy
dependencies:
- python=3.9
- python=3.11
- numpy>=1.10
- scipy>=1.10
- matplotlib>=2.0
Expand Down
6 changes: 3 additions & 3 deletions setup.cfg
@@ -1,6 +1,6 @@
[bdist_wheel]
universal = 1
universal = 0

[metadata]
license_file = LICENSE
description-file = README.rst
license_files = LICENSE
description_file = README.rst
2 changes: 2 additions & 0 deletions setup.py
Expand Up @@ -40,6 +40,7 @@ def find_version(*file_paths):
long_description=read('README.rst'),
license="BSD-3-Clause",
version=find_version("enlopy", "__init__.py"),
python_requires = ">=3.9",
install_requires=requirements,
keywords=['energy','timeseries','statistics','profile','demand'],
packages=find_packages(),
Expand Down Expand Up @@ -68,6 +69,7 @@ def find_version(*file_paths):
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',

# distclass=distutils.command.bdist_conda.CondaDistribution,
# conda_buildnum=1,
Expand Down

0 comments on commit 10e5a6d

Please sign in to comment.