From 8abc47fc968bd72f165c06925741538541955e7c Mon Sep 17 00:00:00 2001 From: Tom Date: Fri, 16 Feb 2024 18:29:14 +0700 Subject: [PATCH 1/4] some sed upkeep replacements --- README.rst | 6 +++--- setup.py | 6 +++--- vondrak/__init__.py | 2 +- vondrak/docs/index.rst | 4 ++-- vondrak/docs/installation.rst | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.rst b/README.rst index f1dbf43..459b030 100644 --- a/README.rst +++ b/README.rst @@ -26,14 +26,14 @@ The only dependency is `numpy `_. Install ======= -To install the `Vondrak Python package `_ via `PyPI `_, simply ``pip3 install vondrak``. For Python 2, use ``pip``. All code is hosted at `github.com/digitalvapor/vondrak `_. +To install the `Vondrak Python package `_ via `PyPI `_, simply ``pip3 install vondrak``. For Python 2, use ``pip``. All code is hosted at `github.com/dreamalligator/vondrak `_. -Alternatively, clone the repo ``git clone https://github.com/digitalvapor/vondrak``, and install from source with ``python3 setup.py install``. +Alternatively, clone the repo ``git clone https://github.com/dreamalligator/vondrak``, and install from source with ``python3 setup.py install``. Documentation ============= -View the docs at `digitalvapor.github.io/vondrak `_, or generate with ``make html`` in the ``docs`` folder. +View the docs at `dreamalligator.github.io/vondrak `_, or generate with ``make html`` in the ``docs`` folder. Development ===== diff --git a/setup.py b/setup.py index 3234b30..ccb3e76 100644 --- a/setup.py +++ b/setup.py @@ -18,11 +18,11 @@ description=("A Python implementation of Vondrák's long term precession " "model and Fortran code."), long_description=long_description_readme, - url='https://github.com/digitalvapor/vondrak', - download_url='https://github.com/digitalvapor/vondrak/tarball/{0}' + url='https://github.com/dreamalligator/vondrak', + download_url='https://github.com/dreamalligator/vondrak/tarball/{0}' .format(__version__), author='Tom Spalding', - author_email='tom@antivapor.net', + author_email='tom@blackforestbotanics.com', keywords=['astronomy', 'precession', 'vondrak', 'space', 'proper motion'], license='MIT', packages=[ diff --git a/vondrak/__init__.py b/vondrak/__init__.py index c566fd1..adac38f 100644 --- a/vondrak/__init__.py +++ b/vondrak/__init__.py @@ -2,7 +2,7 @@ from numpy import array, sin, cos, sqrt, append import math -__version__ = '1.0.0' +__version__ = '1.0.1' # 2Pi TAU = 6.283185307179586476925287e0 diff --git a/vondrak/docs/index.rst b/vondrak/docs/index.rst index a8de4b0..3484d79 100644 --- a/vondrak/docs/index.rst +++ b/vondrak/docs/index.rst @@ -13,8 +13,8 @@ You can also visit: * Official `Python Package Index `_ entry -* GitHub `project page `_ -* GitHub `issue tracker `_ +* GitHub `project page `_ +* GitHub `issue tracker `_ Table of Contents ================= diff --git a/vondrak/docs/installation.rst b/vondrak/docs/installation.rst index d9ccdd1..2f9256e 100644 --- a/vondrak/docs/installation.rst +++ b/vondrak/docs/installation.rst @@ -5,10 +5,10 @@ There is only one dependency for Vondrak, `NumPy `_. You ``pip3 install vondrak`` -Alternatively, clone the repo ``git clone https://github.com/digitalvapor/vondrak``, and install from source with ``python3 setup.py install``. +Alternatively, clone the repo ``git clone https://github.com/dreamalligator/vondrak``, and install from source with ``python3 setup.py install``. If you have any problems with installation, or would like to suggest an improvement, simply create an issue on the project's Github page: - https://github.com/digitalvapor/vondrak + https://github.com/dreamalligator/vondrak Cheers! From 42f08eabcf5a828cb3a9193a7072fc4797396c90 Mon Sep 17 00:00:00 2001 From: Tom Date: Thu, 22 Feb 2024 20:14:24 +0700 Subject: [PATCH 2/4] begin migration from travis-ci to github docs --- .github/workflows/ci.yml | 37 +++++++++++++++++++++++++++++++++++++ .gitignore | 3 +++ .travis.yml | 4 ---- LICENSE | 2 +- README.rst | 4 ++-- requirements.txt | 9 +++++++++ scripts/setup_dev | 6 ++++++ setup.py | 2 +- vondrak/__init__.py | 2 +- vondrak/docs/README.md | 3 +++ vondrak/docs/conf.py | 2 +- vondrak/docs/readme.md | 2 -- 12 files changed, 64 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml create mode 100644 requirements.txt create mode 100755 scripts/setup_dev create mode 100644 vondrak/docs/README.md delete mode 100644 vondrak/docs/readme.md diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..f2b7f4a --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,37 @@ +name: CI +on: + - push +jobs: + tests: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + # - '2.6' + # - '2.7' + # - '3.2' + # - '3.3' + # - '3.4' + # - '3.5' + # - '3.6' + # - '3.7' + # - '3.8' + # - '3.9' + # - '3.10' + - '3.11' + # - '3.12' + # - '3.13' + steps: + - uses: actions/checkout@v4 + - run: pip install numpy pytest + - run: pytest + docs: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./vondrak/docs + steps: + - uses: actions/checkout@v4 + - run: pip install -r requirements.txt + - run: jupyter nbconvert examples.ipynb --to rst + - run: make html diff --git a/.gitignore b/.gitignore index 6d054a5..32077d0 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,6 @@ build __pycache__ .cache .eggs + +# assuming virtual env name is .venv via `python -m venv .venv` +.venv diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9eab313..0000000 --- a/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: python -python: ['2.6','2.7','3.2','3.3','3.4', '3.5'] -install: pip install -q -e . -script: py.test diff --git a/LICENSE b/LICENSE index e5a6f26..ce97106 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2016 Tom Spalding and available under the MIT license: +Copyright (c) 2024 Tom Spalding and available under the MIT license: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/README.rst b/README.rst index 459b030..bebcba5 100644 --- a/README.rst +++ b/README.rst @@ -42,9 +42,9 @@ Setup a conda environment by simply running ``conda env create --file environmen Tests ===== -Tests use the `pyttest `_ framework. Simply run ``py.test``. +Tests use the `pyttest `_ framework. Simply run ``pytest``. License ======= -This work is licensed under a `Creative Commons Attribution-ShareAlike 4.0 International License `_. +MIT diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..6d0856f --- /dev/null +++ b/requirements.txt @@ -0,0 +1,9 @@ +# required +numpy + +# tests +pytest + +# docs +sphinx +jupyterlab diff --git a/scripts/setup_dev b/scripts/setup_dev new file mode 100755 index 0000000..75d6480 --- /dev/null +++ b/scripts/setup_dev @@ -0,0 +1,6 @@ +#!/bin/bash + +# https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/#create-and-use-virtual-environments + +sudo apt install \ + python3-venv diff --git a/setup.py b/setup.py index ccb3e76..41fcee6 100644 --- a/setup.py +++ b/setup.py @@ -34,7 +34,7 @@ }, install_requires=['numpy'], classifiers=[ - 'Development Status :: 4 - Beta', + 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'Intended Audience :: Education', 'Intended Audience :: Science/Research', diff --git a/vondrak/__init__.py b/vondrak/__init__.py index adac38f..2e283cd 100644 --- a/vondrak/__init__.py +++ b/vondrak/__init__.py @@ -2,7 +2,7 @@ from numpy import array, sin, cos, sqrt, append import math -__version__ = '1.0.1' +__version__ = '1.1.0' # 2Pi TAU = 6.283185307179586476925287e0 diff --git a/vondrak/docs/README.md b/vondrak/docs/README.md new file mode 100644 index 0000000..718ebe3 --- /dev/null +++ b/vondrak/docs/README.md @@ -0,0 +1,3 @@ +* `pip install -r requirements.txt` +* `jupyter nbconvert examples.ipynb --to rst` +* `make html` diff --git a/vondrak/docs/conf.py b/vondrak/docs/conf.py index 7fbcbd0..2ee8deb 100644 --- a/vondrak/docs/conf.py +++ b/vondrak/docs/conf.py @@ -50,7 +50,7 @@ # General information about the project. project = u'vondrak' -copyright = u'2014, Tom Spalding' +copyright = u'2024, Tom Spalding' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the diff --git a/vondrak/docs/readme.md b/vondrak/docs/readme.md deleted file mode 100644 index 2834ead..0000000 --- a/vondrak/docs/readme.md +++ /dev/null @@ -1,2 +0,0 @@ -* `ipython nbconvert examples.ipynb --to rst` -* `make html` From 990d4f91279ad81e28ac1db9db3a2697e46b0c53 Mon Sep 17 00:00:00 2001 From: Tom Date: Sun, 25 Feb 2024 18:38:37 +0700 Subject: [PATCH 3/4] adds pip editable mode into requirements.txt --- .github/workflows/ci.yml | 6 +++--- requirements.txt | 4 ++++ scripts/setup_dev | 17 ++++++++++++++++- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f2b7f4a..819d9af 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,11 +27,11 @@ jobs: - run: pytest docs: runs-on: ubuntu-latest - defaults: - run: - working-directory: ./vondrak/docs steps: - uses: actions/checkout@v4 - run: pip install -r requirements.txt + - run: sudo apt install pandoc - run: jupyter nbconvert examples.ipynb --to rst + working-directory: ./vondrak/docs - run: make html + working-directory: ./vondrak/docs diff --git a/requirements.txt b/requirements.txt index 6d0856f..7bc6e93 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,3 +7,7 @@ pytest # docs sphinx jupyterlab + +# vondrak dev mode +# https://setuptools.pypa.io/en/latest/userguide/development_mode.html +--editable . diff --git a/scripts/setup_dev b/scripts/setup_dev index 75d6480..70b2eef 100755 --- a/scripts/setup_dev +++ b/scripts/setup_dev @@ -2,5 +2,20 @@ # https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/#create-and-use-virtual-environments -sudo apt install \ +# +# 1. install dev deps +# + +sudo apt install -y \ + pandoc \ python3-venv + +# +# 2. create virtual env +# +# python -m venv .venv +# +# 3. activate virtual env +# +# source .venv/bin/activate +# From afa0522f22b0ca15e2221444e7c2e4c8eb828970 Mon Sep 17 00:00:00 2001 From: Tom Date: Sun, 25 Feb 2024 18:50:22 +0700 Subject: [PATCH 4/4] update tests to match support --- .github/workflows/ci.yml | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 819d9af..b1248e1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,25 +7,18 @@ jobs: strategy: matrix: python-version: - # - '2.6' - # - '2.7' - # - '3.2' - # - '3.3' - # - '3.4' - # - '3.5' - # - '3.6' - # - '3.7' - # - '3.8' - # - '3.9' - # - '3.10' + - '3.8' + - '3.9' + - '3.10' - '3.11' - # - '3.12' - # - '3.13' + - '3.12' + - '3.13' steps: - uses: actions/checkout@v4 - run: pip install numpy pytest - run: pytest docs: + if: false runs-on: ubuntu-latest steps: - uses: actions/checkout@v4