Skip to content

Commit

Permalink
Merge pull request #26 from saraedum/rever
Browse files Browse the repository at this point in the history
Add rever.xsh deployment script and some minor cleanup
  • Loading branch information
videlec authored Nov 7, 2023
2 parents b98a959 + e98266e commit 19d86ab
Show file tree
Hide file tree
Showing 11 changed files with 114 additions and 52 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ jobs:
sleep 1
# We ignore _modules since sphinx puts all modules in the module
# overview but does not generate pages for .pyx modules.
linkchecker --check-extern --ignore-url=_modules/ http://localhost:8880
# We ignore Vaibhav's home page. It works but somehow our check reports an SSL error.
linkchecker --check-extern --no-warnings --ignore-url=_modules/ --ignore-url=https://www.maths.gla.ac.uk/~vgadre/ http://localhost:8880
- uses: JamesIves/github-pages-deploy-action@3.7.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

23 changes: 8 additions & 15 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
# -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
from veerer.version import version

# -- Path setup --------------------------------------------------------------

Expand All @@ -21,20 +15,17 @@
except ImportError:
raise RuntimeError("to build the documentation you need to be inside a Sage shell (run first the command 'sage -sh' in a shell")

from sage.env import SAGE_DOC_SRC, SAGE_DOC, SAGE_SRC
from sage.env import SAGE_DOC_SRC, SAGE_SRC

sys.path.append(os.path.join(SAGE_SRC, "sage_setup", "docbuild", "ext"))

# -- Project information -----------------------------------------------------

project = u'veerer'
copyright = u'2018, Mark Bell, Vincent Delecroix, Saul Schleimer'
author = u'Mark Bell, Vincent Delecroix, Saul Schleimer'
project = 'veerer'
copyright = '2018-2023, Mark Bell, Vincent Delecroix, Saul Schleimer'
author = 'Mark Bell, Vincent Delecroix, Saul Schleimer'

# The short X.Y version
version = u''
# The full version, including alpha/beta/rc tags
release = u''
release = version


# -- General configuration ---------------------------------------------------
Expand Down Expand Up @@ -75,6 +66,8 @@
# This pattern also affects html_static_path and html_extra_path .
exclude_patterns = []

html_extra_path = ["robots.txt"]

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'

Expand Down
5 changes: 0 additions & 5 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
.. veerer documentation master file, created by
sphinx-quickstart on Fri Sep 28 09:12:01 2018.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to veerer's documentation!
==================================

Expand Down
2 changes: 1 addition & 1 deletion doc/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Install Veerer
To install the module you need Python (version 2 or 3).

Additional features are available if used inside
`SageMath <http://www.sagemath.org/>`_.
`SageMath <https://www.sagemath.org/>`_.

Computations involving polytopes are only available if the Python module
`pplpy <https://github.com/sagemath/pplpy>`_ is available.
Expand Down
2 changes: 2 additions & 0 deletions doc/source/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
User-agent: *
Allow: /
8 changes: 4 additions & 4 deletions doc/source/veerer_demo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ Veering triangulation demo
``veerer`` is a Python and SageMath library for exploration of veering
triangulations. It is written by
`Mark Bell <https://markcbell.github.io>`_,
`Vincent Delecroix <http://www.labri.fr/perso/vdelecro/>`_ and
`Saul Schleimer <http://homepages.warwick.ac.uk/~masgar/>`_. It is
`Vincent Delecroix <https://www.labri.fr/perso/vdelecro/>`_ and
`Saul Schleimer <https://homepages.warwick.ac.uk/~masgar/>`_. It is
part of a project that also involve
`Vaibhav Gadre <http://www.maths.gla.ac.uk/~vgadre/>`_ and
`Rodolfo Gutiérrez-Romo <http://rodol.fo>`_, see
`Vaibhav Gadre <https://www.maths.gla.ac.uk/~vgadre/>`_ and
`Rodolfo Gutiérrez-Romo <http://www.dim.uchile.cl/~rgutierrez/>`_, see
`arXiv:1909.00890 [math.DS] <https://arxiv.org/abs/1909.00890>`_.

``veerer`` works in conjunction with
Expand Down
54 changes: 54 additions & 0 deletions rever.xsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# ********************************************************************
# This file is part of veerer
#
# Copyright (C) 2023 Julian Rüth
#
# 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:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# ********************************************************************

try:
input("Are you sure you are on the master branch which is identical to origin/master? [ENTER]")
except KeyboardInterrupt:
sys.exit(1)

$PROJECT = 'veerer'

$ACTIVITIES = [
'version_bump',
'tag',
'push_tag',
'pypi',
'ghrelease',
]

$RELEASE_YEAR = $RELEASE_DATE.year

$VERSION_BUMP_PATTERNS = [
('veerer/version.py', r"version =", "version = \"$VERSION\""),
('setup.py', r" version=", " version=\"$VERSION\","),
('doc/conf.py', r'copyright = ', "copyright = \"2016-$RELEASE_YEAR, Mark Bell, Vincent Delecroix, Saul Schleimer\""),
]

$PUSH_TAG_REMOTE = 'git@github.com:flatsurf/veerer.git'

$PYPI_BUILD_COMMANDS = ['sdist']
$PYPI_NAME = "veerer"

$GITHUB_ORG = 'flatsurf'
$GITHUB_REPO = 'veerer'
65 changes: 41 additions & 24 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,34 +1,51 @@
# -*- coding: utf-8 -*-
import codecs
# ****************************************************************************
# This file is part of veerer
#
# Copyright (C) 2019-2023 Vincent Delecroix
# 2023 Julian Rüth
#
# veerer is free software: you can redistribute it and/or modify it under the
# terms of the GNU General Public License version 3 as published by the Free
# Software Foundation.
#
# veerer is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with veerer. If not, see <https://www.gnu.org/licenses/>.
# ****************************************************************************
from setuptools import setup, Extension
from Cython.Build import cythonize

def readfile(filename):
with codecs.open(filename, encoding='utf-8') as f:
return f.read()

with open("README.rst") as f:
long_description = f.read()

extensions = [
Extension('veerer.permutation', sources=['veerer/permutation.pyx'])
]

extensions = [Extension("veerer.permutation", sources=["veerer/permutation.pyx"])]

setup(
name='veerer',
version=readfile("VERSION"),
description='A Python module to manipulate Veering triangulations and their associated flat structures',
long_description=readfile("README.rst"),
author='Mark Bell, Vincent Delecroix and Saul Schleimer',
author_email='vincent.delecroix@u-bordeaux.fr',
url='https://github.com/flatsurf/veerer',
packages=['veerer/', 'veerer/polyhedron'],
name="veerer",
version="0.1.0",
description="A Python module to manipulate Veering triangulations and their associated flat structures",
long_description=long_description,
author="Mark Bell, Vincent Delecroix, and Saul Schleimer",
author_email="contact@flatsurf.org",
url="https://github.com/flatsurf/veerer",
packages=["veerer", "veerer.polyhedron"],
license="GNU General Public License, version 3",
ext_modules=cythonize(extensions),
install_requires=[],
setup_requires=["Cython"],
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Scientific/Engineering :: Mathematics',
]
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Topic :: Scientific/Engineering :: Mathematics",
],
)
2 changes: 1 addition & 1 deletion veerer/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def rich_to_bool(op, c):
error_msg = {
'curver': 'the function {} can only be called when the package curver is installed.',

'sage': 'the function {} can only be called when running inside of Sage. See http://www.sagemath.org/',
'sage': 'the function {} can only be called when running inside of Sage. See https://www.sagemath.org/',

'surface_dynamics': 'the function {} only works when the package surface_dynamics is installed. See https://pypi.org/project/surface_dynamics/ for instructions.',

Expand Down
1 change: 1 addition & 0 deletions veerer/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
version = "0.1.0"

0 comments on commit 19d86ab

Please sign in to comment.