Skip to content

Commit 39ee480

Browse files
authored
Merge pull request #2 from highcharts-for-python/enhancement/cicd-pipelines
Enhancement/cicd pipelines
2 parents 748f6f8 + 4bfe2ed commit 39ee480

39 files changed

+1311
-255
lines changed

.github/workflows/pypi-publish.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
# GitHub recommends pinning actions to a commit SHA.
7+
# To get a newer version, you will need to update the SHA.
8+
# You can also reference a tag or branch, but the action may change without warning.
9+
10+
name: Release Library to PyPi
11+
12+
on:
13+
release:
14+
types: [published]
15+
16+
env:
17+
HATCH_INDEX_USER: __token__
18+
HATCH_INDEX_AUTH: ${{ secrets.PYPI_API_TOKEN }}
19+
HATCH_INDEX_REPO: main
20+
21+
jobs:
22+
deploy:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v3
26+
- name: Set up Python
27+
uses: actions/setup-python@v4
28+
with:
29+
python-version: '3.x'
30+
- name: Install dependencies
31+
run: |
32+
python -m pip install --upgrade pip
33+
pip install hatch
34+
- name: Build package
35+
run: hatch build
36+
- name: Publish package
37+
run: hatch publish
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
# GitHub recommends pinning actions to a commit SHA.
7+
# To get a newer version, you will need to update the SHA.
8+
# You can also reference a tag or branch, but the action may change without warning.
9+
10+
name: Upload Python Package
11+
12+
on:
13+
pull_request:
14+
branches:
15+
- master
16+
17+
env:
18+
HATCH_INDEX_USER: __token__
19+
HATCH_INDEX_AUTH: ${{ secrets.TEST_PYPI_API_TOKEN }}
20+
HATCH_INDEX_REPO: test
21+
22+
jobs:
23+
deploy:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v3
27+
- name: Set up Python
28+
uses: actions/setup-python@v4
29+
with:
30+
python-version: '3.x'
31+
- name: Install dependencies
32+
run: |
33+
python -m pip install --upgrade pip
34+
pip install hatch
35+
- name: Build package
36+
run: hatch build
37+
- name: Publish package
38+
run: hatch publish

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ coverage.xml
5050
*.py,cover
5151
.hypothesis/
5252
.pytest_cache/
53+
tests/pytest.ini
5354

5455
# Translations
5556
*.mo
@@ -133,4 +134,4 @@ dmypy.json
133134

134135
# temp files
135136
~$*.*
136-
tests/input_files/headless_export/output/
137+
# tests/input_files/headless_export/output/

.readthedocs.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# .readthedocs.yaml
2+
# Read the Docs configuration file
3+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4+
5+
# Required
6+
version: 2
7+
8+
# Set the version of Python and other tools you might need
9+
build:
10+
os: ubuntu-22.04
11+
tools:
12+
python: "3.11"
13+
# You can also specify other tool versions:
14+
# nodejs: "19"
15+
# rust: "1.64"
16+
# golang: "1.19"
17+
18+
# Build documentation in the docs/ directory with Sphinx
19+
sphinx:
20+
configuration: docs/conf.py
21+
22+
# If using Sphinx, optionally build your docs in additional formats such as PDF
23+
# formats:
24+
# - pdf
25+
26+
# Optionally declare the Python requirements required to build your docs
27+
python:
28+
install:
29+
- requirements: requirements.dev.txt

.travis.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
language: python
2+
job:
3+
include:
4+
#- python: "3.8"
5+
# env:
6+
# - TOXENV=py39
7+
# - HCP_BASIC_PYTEST=true
8+
#- python: "3.9"
9+
# env:
10+
# - TOXENV=py39
11+
# - HCP_BASIC_PYTEST=true
12+
- python: "3.10"
13+
dist: focal
14+
env: TOXENV=py310
15+
- python: "3.11"
16+
dist: bionic
17+
env: TOXENV=py311
18+
- python: "3.10"
19+
dist: focal
20+
env: TOXENV=coverage
21+
- python: "3.10"
22+
dist: focal
23+
env: TOXENV=docs
24+
os:
25+
- linux
26+
git:
27+
quiet: true
28+
29+
install:
30+
- pip install -r requirements.dev.txt
31+
before_script:
32+
- curl -Os --retry 5 https://uploader.codecov.io/latest/linux/codecov
33+
- chmod +x codecov
34+
script: tox -- -v -nauto
35+
after_success:
36+
- if [[ -e .coverage ]]; then ./codecov -t $CODECOV_TOKEN; fi

CHANGES.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
Release 0.1.0
1+
Release 1.0.0-rc1
22
=========================================
33

4-
* First public release
4+
* First public release: **Release Candidate 1**
5+

LICENSE

Lines changed: 227 additions & 1 deletion
Large diffs are not rendered by default.

README.rst

Lines changed: 55 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ Highcharts Maps for Python
55
**High-end data and map visualizations for the Python ecosystem**
66

77
**Highcharts Maps for Python** is an extension to the
8-
`Highcharts for Python <https://highcharts-core.readthedocs.io>`__ library, and provides
8+
`Highcharts Core for Python <https://core-docs.highchartspython.com>`__ library, and provides
99
a Python wrapper for the fantastic
1010
`Highcharts Maps <https://www.highcharts.com/products/maps/>`__
1111
JavaScript data visualization library. **Highcharts Maps for Python** also supports
1212

13-
* **Highcharts JS** - the core Highcharts data visualization library
13+
* **Highcharts Core (JS)** - the core Highcharts data visualization library
1414
* The **Highcharts Export Server** - enabling the programmatic creation of static
1515
(downloadable) data visualizations
1616

@@ -24,11 +24,11 @@ library features native integration with:
2424
dataframe.
2525
* **GeoPandas**. Automatically incorporate GIS / map visualizations with data from your
2626
GeoPandas GeoDataFrames.
27-
* **Topojson**. Automatically visualizes :term:`TopoJSON` :term:`map geometries <map geometry>`.
28-
* **Geojson**. Automatically visualizes :term:`GeoJSON` :term:`map geometries <map geometry>`.
27+
* **Topojson**. Automatically visualizes TopoJSON map geometries.
28+
* **Geojson**. Automatically visualizes GeoJSON map geometries.
2929

3030

31-
**COMPLETE DOCUMENTATION:** http://highcharts-maps.readthedocs.org/en/latest/index.html
31+
**COMPLETE DOCUMENTATION:** https://maps-docs.highchartspython.com/en/latest/index.html
3232

3333
--------------------
3434

@@ -75,7 +75,7 @@ capabilities to simplify integration with Javascript frontend frameworks (React,
7575
VueJS, etc.). But facilitating that with Highcharts has historically been very difficult.
7676
Part of this difficulty is because the Highcharts JavaScript suite - while supporting JSON
7777
as a serialization/deserialization format - leverages
78-
:term:`JavaScript object literals <JavaScript Object Literal Notation>` to expose the
78+
JavaScript object literals to expose the
7979
full power and interactivity of its data visualizations. And while it's easy to serialize
8080
JSON from Python, serializing and deserializing to/from JavaScript object literal notation
8181
is much more complicated. This means that Python developers looking to integrate with
@@ -89,19 +89,19 @@ So I wrote the **Highcharts for Python** toolkit to bridge that gap, and
8989
**Highcharts Maps for Python** provides support for
9090
the `Highcharts Maps <https://www.highcharts.com/products/maps/>`__ extension, which is
9191
designed to provide extensive time series data visualization capabilities optimized for
92-
:iabbr:`GIS (Geographic Information System)` data visualization, with
92+
GIS (Geographic Information System) data visualization, with
9393
robust interactivity. For ease of use, it also includes the full functionality of
94-
**Highcharts for Python** as well.
94+
**Highcharts Core for Python** as well.
9595

9696
Key Highcharts Maps for Python Features
9797
==============================================
9898

99-
* **Clean and consistent API**. No reliance on "hacky" code, :class:`dict <python:dict>`
99+
* **Clean and consistent API**. No reliance on "hacky" code, ``dict``
100100
and JSON serialization, or impossible to maintain / copy-pasted "spaghetti code".
101101
* **Comprehensive Highcharts support**. Every single Highcharts chart type and every
102102
single configuration option is supported in **Highcharts Maps for Python**. This
103103
includes the over 70 data visualization types supported by
104-
`Highcharts JS <https://www.highcharts.com/product/highcharts/>`__ and the
104+
`Highcharts Core <https://www.highcharts.com/product/highcharts/>`__ and the
105105
four core map visualizations available in
106106
`Highcharts Maps <https://www.highcharts.com/product/maps/>`__, with full support for
107107
the rich JavaScript formatter (JS callback functions)
@@ -110,15 +110,14 @@ Key Highcharts Maps for Python Features
110110

111111
.. seealso::
112112

113-
* :doc:`Supported Visualizations <visualizations>`
113+
* `Supported Visualizations <https://maps-docs.highchartspython.com/en/latest/visualizations.html>`__
114114

115115
* **Simple JavaScript Code Generation**. With one method call, produce production-ready
116116
JavaScript code to render your interactive visualizations using Highcharts' rich
117117
capabilities.
118118
* **Easy Chart Download**. With one method call, produce high-end static
119119
visualizations that can be downloaded or shared as files with your audience. Produce
120-
static charts using the Highsoft-provided
121-
:term:`Highcharts Export Server <Export Server>`, or using your own private export
120+
static charts using the Highsoft-provided **Highcharts Export Server**, or using your own private export
122121
server as needed.
123122
* **Asynchronous Map Data Retrieval**. To minimize the amount of data transferred over
124123
the wire, **Highcharts Maps for Python** has built-in support for the configuration of
@@ -140,7 +139,7 @@ Key Highcharts Maps for Python Features
140139
===================================================
141140

142141
For a discussion of **Highcharts Maps for Python** in comparison to alternatives, please see
143-
the **COMPLETE DOCUMENTATION:** http://highcharts-maps.readthedocs.org/en/latest/index.html
142+
the **COMPLETE DOCUMENTATION:** https://maps-docs.highchartspython.com/en/latest/index.html
144143

145144
---------------------
146145

@@ -151,47 +150,35 @@ Hello World, and Basic Usage
151150
1. Import Highcharts Maps for Python
152151
==========================================
153152

154-
.. tabs::
153+
.. code-block:: python
155154
156-
.. tab:: from Precise Location
155+
# PRECISE IMPORT PATTERN
156+
# This method of importing Highcharts Maps for Python objects yields the fastest
157+
# performance for the import statement. However, it is more verbose and requires
158+
# you to navigate the extensive Highcharts Maps for Python API.
157159
158-
.. tip::
160+
# Import classes using precise module indications. For example:
161+
from highcharts_maps.chart import Chart
162+
from highcharts_maps.global_options.shared_options import SharedMapsOptions
163+
from highcharts_maps.options import HighchartsMapsOptions
164+
from highcharts_maps.options.plot_options.map import MapOptions
165+
from highcharts_maps.options.series.map import MapSeries
159166
160-
**Best Practice!**
167+
# CATCH-ALL IMPORT PATTERN
168+
# This method of importing Highcharts Maps for Python classes has relatively slow
169+
# performance because it imports hundreds of different classes from across the entire
170+
# library. This is also a known anti-pattern, as it obscures the namespace within the
171+
# library. Both may be acceptable to you in your use-case, but do use at your own risk.
161172
162-
This method of importing **Highcharts Maps for Python** objects yields the fastest
163-
performance for the ``import`` statement. However, it is more verbose and requires
164-
you to navigate the extensive :doc:`Highcharts Maps for Python API </api>`.
173+
# Import objects from the catch-all ".highcharts" module.
174+
from highcharts_maps import highcharts
165175
166-
.. code-block:: python
167-
168-
# Import classes using precise module indications. For example:
169-
from highcharts_maps.chart import Chart
170-
from highcharts_maps.global_options.shared_options import SharedMapsOptions
171-
from highcharts_maps.options import HighchartsMapsOptions
172-
from highcharts_maps.options.plot_options.map import MapOptions
173-
from highcharts_maps.options.series.map import MapSeries
174-
175-
.. tab:: from ``.highcharts``
176-
177-
.. caution::
178-
179-
This method of importing **Highcharts Maps for Python** classes has relatively slow
180-
performance because it imports hundreds of different classes from across the entire
181-
library. This is also a known anti-pattern, as it obscures the namespace within the
182-
library. Both may be acceptable to you in your use-case, but do use at your own risk.
183-
184-
.. code-block:: python
185-
186-
# Import objects from the catch-all ".highcharts" module.
187-
from highcharts_stock import highcharts
188-
189-
# You can now access specific classes without individual import statements.
190-
highcharts.Chart
191-
highcharts.SharedMapsOptions
192-
highcharts.HighchartsMapsOptions
193-
highcharts.MapOptions
194-
highcharts.MapSeries
176+
# You can now access specific classes without individual import statements.
177+
highcharts.Chart
178+
highcharts.SharedMapsOptions
179+
highcharts.HighchartsMapsOptions
180+
highcharts.MapOptions
181+
highcharts.MapSeries
195182
196183
197184
2. Create Your Chart
@@ -356,12 +343,23 @@ that will render the chart wherever it is you want it to go:
356343
357344
--------------
358345

359-
*********************
360-
Questions and Issues
361-
*********************
346+
***********************
347+
Getting Help/Support
348+
***********************
362349

363-
You can ask questions and report issues on the project's
364-
`Github Issues Page <https://github.com/hcpllc/highcharts-maps/issues>`_
350+
The **Highcharts for Python** toolkit comes with all of the great support that you are used to from working with the
351+
Highcharts JavaScript libraries. When you license the toolkit, you are welcome to use any of the following tools to get
352+
help using the toolkit. In particular, you can:
353+
354+
* Use the `Highcharts Forums <https://highcharts.com/forum>`__
355+
* Use `Stack Overflow <https://stackoverflow.com/questions/tagged/highcharts-for-python>`__ with the
356+
``highcharts-for-python`` tag
357+
* `Report bugs or request features <https://github.com/highcharts-for-python/highcharts-maps/issues>`__ in the
358+
library's Github repository
359+
* `File a support ticket <https://www.highchartspython.com/get-help>`__ with us
360+
* `Schedule a live chat or video call <https://www.highchartspython.com/get-help>`__ with us
361+
362+
**FOR MORE INFORMATION:** https://www.highchartspython.com/get-help
365363

366364
-----------------
367365

@@ -370,18 +368,15 @@ Contributing
370368
*********************
371369

372370
We welcome contributions and pull requests! For more information, please see the
373-
:doc:`Contributor Guide <contributing>`. And thanks to all those who've already
374-
contributed:
375-
376-
.. include:: _contributors.rst
371+
`Contributor Guide <https://maps-docs.highchartspython.com/en/latest/contributing.html>`__. And thanks to all those who've already contributed!
377372

378373
-------------------
379374

380375
*********************
381376
Testing
382377
*********************
383378

384-
We use `TravisCI <http://travisci.org>`_ for our build automation and
379+
We use `TravisCI <https://travisci.org>`_ for our build automation and
385380
`ReadTheDocs <https://readthedocs.org>`_ for our documentation.
386381

387382
Detailed information about our test suite and how to run tests locally can be

0 commit comments

Comments
 (0)