Skip to content

Commit

Permalink
Merge pull request #4 from dreamalligator/tom/2024-upkeep
Browse files Browse the repository at this point in the history
Migrate from Travis-CI to GH and other upkeep
  • Loading branch information
dreamalligator authored Feb 25, 2024
2 parents 9e80337 + afa0522 commit 85f10d8
Show file tree
Hide file tree
Showing 14 changed files with 86 additions and 22 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CI
on:
- push
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- '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:
if: false
runs-on: ubuntu-latest
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ build
__pycache__
.cache
.eggs

# assuming virtual env name is .venv via `python -m venv .venv`
.venv
4 changes: 0 additions & 4 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -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:

Expand Down
10 changes: 5 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ The only dependency is `numpy <https://github.com/numpy/numpy>`_.
Install
=======

To install the `Vondrak Python package <https://pypi.python.org/pypi/vondrak>`_ via `PyPI <https://pypi.python.org/pypi>`_, simply ``pip3 install vondrak``. For Python 2, use ``pip``. All code is hosted at `github.com/digitalvapor/vondrak <https://github.com/digitalvapor/vondrak>`_.
To install the `Vondrak Python package <https://pypi.python.org/pypi/vondrak>`_ via `PyPI <https://pypi.python.org/pypi>`_, simply ``pip3 install vondrak``. For Python 2, use ``pip``. All code is hosted at `github.com/dreamalligator/vondrak <https://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 <https://digitalvapor.github.io/vondrak>`_, or generate with ``make html`` in the ``docs`` folder.
View the docs at `dreamalligator.github.io/vondrak <https://dreamalligator.github.io/vondrak>`_, or generate with ``make html`` in the ``docs`` folder.

Development
=====
Expand All @@ -42,9 +42,9 @@ Setup a conda environment by simply running ``conda env create --file environmen
Tests
=====

Tests use the `pyttest <https://github.com/pytest-dev/pytest>`_ framework. Simply run ``py.test``.
Tests use the `pyttest <https://github.com/pytest-dev/pytest>`_ framework. Simply run ``pytest``.

License
=======

This work is licensed under a `Creative Commons Attribution-ShareAlike 4.0 International License <http://creativecommons.org/licenses/by-sa/4.0/>`_.
MIT
13 changes: 13 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# required
numpy

# tests
pytest

# docs
sphinx
jupyterlab

# vondrak dev mode
# https://setuptools.pypa.io/en/latest/userguide/development_mode.html
--editable .
21 changes: 21 additions & 0 deletions scripts/setup_dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

# https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/#create-and-use-virtual-environments

#
# 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
#
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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=[
Expand All @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion vondrak/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from numpy import array, sin, cos, sqrt, append
import math

__version__ = '1.0.0'
__version__ = '1.1.0'

# 2Pi
TAU = 6.283185307179586476925287e0
Expand Down
3 changes: 3 additions & 0 deletions vondrak/docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* `pip install -r requirements.txt`
* `jupyter nbconvert examples.ipynb --to rst`
* `make html`
2 changes: 1 addition & 1 deletion vondrak/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions vondrak/docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ You can also visit:

* Official `Python Package Index <https://pypi.python.org/pypi/vondrak>`_
entry
* GitHub `project page <https://github.com/digitalvapor/vondrak/>`_
* GitHub `issue tracker <https://github.com/digitalvapor/vondrak/issues>`_
* GitHub `project page <https://github.com/dreamalligator/vondrak/>`_
* GitHub `issue tracker <https://github.com/dreamalligator/vondrak/issues>`_

Table of Contents
=================
Expand Down
4 changes: 2 additions & 2 deletions vondrak/docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ There is only one dependency for Vondrak, `NumPy <http://www.numpy.org/>`_. 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!
2 changes: 0 additions & 2 deletions vondrak/docs/readme.md

This file was deleted.

0 comments on commit 85f10d8

Please sign in to comment.