diff --git a/.github/workflows/conda_build.yml b/.github/workflows/conda_build.yml deleted file mode 100644 index 21101fa..0000000 --- a/.github/workflows/conda_build.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Conda Build and Upload - -on: - release: - types: [published] - -jobs: - build: - name: Conda - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: conda-incubator/setup-miniconda@v2 - with: - auto-update-conda: true - python-version: 3.8 - - name: Build and upload conda package - shell: bash -l {0} - env: - ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }} - run: | - conda install --yes --quiet conda-build conda-verify anaconda-client - conda build conda.recipe/ --channel=nrel - anaconda -t $ANACONDA_TOKEN upload -u nrel $(conda build conda.recipe/ --channel=nrel --output) diff --git a/.github/workflows/pull_request_tests.yml b/.github/workflows/pull_request_tests.yml index 5c36b87..377b20e 100644 --- a/.github/workflows/pull_request_tests.yml +++ b/.github/workflows/pull_request_tests.yml @@ -20,10 +20,11 @@ jobs: python-version: '3.9' steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.ref }} - fetch-depth: 1 + fetch-depth: 0 + fetch-tags: true - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: diff --git a/README.rst b/README.rst index fcfc42d..2d5aa5d 100644 --- a/README.rst +++ b/README.rst @@ -2,29 +2,23 @@ Welcome to the Fast All-sky Radiation Model for Solar applications (FARMS)! *************************************************************************** -.. image:: https://github.com/NREL/farms/workflows/Documentation/badge.svg +.. image:: https://github.com/NatLabRockies/farms/workflows/Documentation/badge.svg :target: https://nrel.github.io/farms/ -.. image:: https://github.com/NREL/farms/workflows/Pytests/badge.svg - :target: https://github.com/NREL/farms/actions?query=workflow%3A%22Pytests%22 +.. image:: https://github.com/NatLabRockies/farms/workflows/Pytests/badge.svg + :target: https://github.com/NatLabRockies/farms/actions?query=workflow%3A%22Pytests%22 -.. image:: https://github.com/NREL/farms/workflows/Lint%20Code%20Base/badge.svg - :target: https://github.com/NREL/farms/actions?query=workflow%3A%22Lint+Code+Base%22 +.. image:: https://github.com/NatLabRockies/farms/workflows/Lint%20Code%20Base/badge.svg + :target: https://github.com/NatLabRockies/farms/actions?query=workflow%3A%22Lint+Code+Base%22 -.. image:: https://img.shields.io/pypi/pyversions/NREL-farms.svg - :target: https://pypi.org/project/NREL-farms/ +.. image:: https://img.shields.io/pypi/pyversions/NLR-farms.svg + :target: https://pypi.org/project/NLR-farms/ -.. image:: https://badge.fury.io/py/NREL-farms.svg - :target: https://badge.fury.io/py/NREL-farms +.. image:: https://badge.fury.io/py/NLR-farms.svg + :target: https://badge.fury.io/py/NLR-farms -.. image:: https://anaconda.org/nrel/nrel-farms/badges/version.svg - :target: https://anaconda.org/nrel/nrel-farms - -.. image:: https://anaconda.org/nrel/nrel-farms/badges/license.svg - :target: https://anaconda.org/nrel/nrel-farms - -.. image:: https://codecov.io/gh/nrel/farms/branch/master/graph/badge.svg?token=WQ95L11SRS - :target: https://codecov.io/gh/nrel/farms +.. image:: https://codecov.io/gh/NatLabRockies/farms/branch/master/graph/badge.svg?token=WQ95L11SRS + :target: https://codecov.io/gh/NatLabRockies/farms The Fast All-sky Radiation Model for Solar applications (FARMS) is used to @@ -35,26 +29,25 @@ compute cloudy irradiance. Installing farms ================ -Option 1: Install from PIP or Conda (recommended for analysts): ---------------------------------------------------------------- +Option 1: Install from PyPI (recommended for analysts): +------------------------------------------------------- 1. Create a new environment: ``conda create --name farms`` -2. Activate directory: +2. Activate the environment: ``conda activate farms`` 3. Install farms: - 1) ``pip install NREL-farms`` or - 2) ``conda install nrel-farms --channel=nrel`` + ``pip install NLR-farms`` Option 2: Clone repo (recommended for developers) ------------------------------------------------- -1. Create ``farms`` environment and install package +1. Create an environment and install package 1) Create a conda env: ``conda create -n farms`` 2) Run the command: ``conda activate farms`` - 3) cd into the repo cloned in 1. + 3) Clone the repository and ``cd`` into it. 4) prior to running ``pip`` below, make sure the branch is correct (install from master!) 5) Install ``farms`` and its dependencies by running: diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml deleted file mode 100644 index 060236c..0000000 --- a/conda.recipe/meta.yaml +++ /dev/null @@ -1,31 +0,0 @@ -package: - name: nrel-farms - version: {{ environ.get('GIT_DESCRIBE_TAG','').replace('v', '', 1) }} - -source: - git_url: ../ - -build: - number: 0 - noarch: python - script: python setup.py install --single-version-externally-managed --record=record.txt - -requirements: - host: - - python - - pip - - setuptools - - numpy>=1.16 - - pandas - run: - - python - - pip - - {{ pin_compatible('numpy') }} - - pandas - -about: - home: "https://github.com/NREL/farms" - license: BSD 3-Clause - summary: "The Fast All-sky Radiation Model for Solar applications (FARMS) is used to compute cloudy irradiance." - doc_url: "https://nrel.github.io/farms" - dev_url: "https://github.com/NREL/farms" diff --git a/conda_build.sh b/conda_build.sh deleted file mode 100644 index 7f93f4f..0000000 --- a/conda_build.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -set -e - -export CONDA_BLD_PATH=~/conda-bld - -conda build conda.recipe/ - -anaconda upload -u nrel $(conda build conda.recipe/ --output) - -echo "Building and uploading conda package done!" -rm -rf $CONDA_BLD_PATH/* -ls $CONDA_BLD_PATH diff --git a/docs/README.md b/docs/README.md index d98a43c..377e9ba 100644 --- a/docs/README.md +++ b/docs/README.md @@ -8,11 +8,7 @@ See their documentation for (a lot) more details. To generate the docs yourself, you'll need the appropriate package: ``` -conda install sphinx -conda install sphinx_rtd_theme - -pip install ghp-import -pip install sphinx-click +python -m pip install sphinx sphinx_rtd_theme ghp-import sphinx-click ``` ## Refreshing the API Documentation diff --git a/docs/source/conf.py b/docs/source/conf.py index e8e5aeb..e12625e 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -28,7 +28,7 @@ pkg = os.path.dirname(pkg) sys.path.append(pkg) -with open(os.path.join(pkg, "farms", "version.py"), encoding="utf-8") as f: +with open(os.path.join(pkg, "farms", "_version.py"), encoding="utf-8") as f: v = f.read() v = v.split("=")[-1].strip().strip('"').strip("'") @@ -109,7 +109,7 @@ html_context = { "display_github": True, - "github_user": "nrel", + "github_user": "NatLabRockies", "github_repo": "farms", "github_version": "main", "conf_py_path": "/docs/source/", diff --git a/farms/__init__.py b/farms/__init__.py index 393f7b0..e22ac28 100644 --- a/farms/__init__.py +++ b/farms/__init__.py @@ -25,7 +25,7 @@ import pandas as pd -from .version import __version__ +from ._version import __version__ FARMSDIR = os.path.dirname(os.path.realpath(__file__)) diff --git a/farms/farms.py b/farms/farms.py index b989459..195d58c 100644 --- a/farms/farms.py +++ b/farms/farms.py @@ -5,7 +5,7 @@ @author: Anthony Lopez This Fast All-sky Radiation Model for Solar applications (FARMS) was developed -by Yu Xie (Yu.Xie@nrel.gov). Please contact him for more information. +by Yu Xie (Yu.Xie@nlr.gov). Please contact him for more information. Literature ---------- diff --git a/farms/version.py b/farms/version.py deleted file mode 100644 index 05c881e..0000000 --- a/farms/version.py +++ /dev/null @@ -1,5 +0,0 @@ -""" -FARMS version number -""" - -__version__ = "1.0.6" diff --git a/pyproject.toml b/pyproject.toml index 7b6c371..c75b2d0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,14 +6,14 @@ requires = [ build-backend = "setuptools.build_meta" [project] -name = "NREL-farms" +name = "NLR-farms" dynamic = ["version"] description = "The Fast All-sky Radiation Model for Solar applications (FARMS)" keywords = ["farms", "NREL"] readme = "README.rst" authors = [ - {name = "Brandon Benton", email = "brandon.benton@nrel.gov"}, - {name = "Grant Buster", email = "grant.buster@nrel.gov"} + {name = "Brandon Benton", email = "brandon.benton@nlr.gov"}, + {name = "Grant Buster", email = "grant.buster@nlr.gov"} ] license = {text = "BSD-3-Clause"} requires-python = ">= 3.9" @@ -49,9 +49,9 @@ test = [ ] [project.urls] -homepage = "https://github.com/NREL/farms" +homepage = "https://github.com/NatLabRockies/farms" documentation = "https://nrel.github.io/farms/" -repository = "https://github.com/NREL/farms" +repository = "https://github.com/NatLabRockies/farms" [tool.ruff] line-length = 79 @@ -168,3 +168,4 @@ packages = ["farms"] [tool.setuptools_scm] version_file = "farms/_version.py" +version_scheme = "guess-next-dev"