Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dist to pypi as pavics-magpie #518

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,26 @@ jobs:
files: ./reports/coverage.xml
fail_ci_if_error: true
verbose: true

deploy_pypi:
needs: tests
if: ${{ success() && (contains(github.ref, 'refs/tags') || github.ref == 'refs/heads/master') }}
runs-on: ubuntu-latest
env:
# override make command to install directly in active python
CONDA_COMMAND: ""
steps:
- uses: actions/checkout@v2
with:
fetch-depth: "0"
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.7"
- name: Build Distribution Package
run: make install-dev dist
- name: Push Package to PyPi
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
2 changes: 1 addition & 1 deletion config/magpie.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use = egg:Paste#urlmap
#/magpie/api = api_app

[app:magpie_app]
use = egg:magpie
use = egg:pavics-magpie
filter-with = urlprefix

pyramid.reload_templates = false
Expand Down
8 changes: 7 additions & 1 deletion docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ with it directly.

pip install git+https://github.com/Ouranosinc/Magpie.git

To use the PyPI package, employ the following command instead:

.. code-block:: console

pip install pavics-magpie

If you desire to develop code features or fixes with `Magpie`, consider using the ``-e`` option to install a reference
to your local installation, avoiding distinct instances locally and in ``site-packages``. For example:

Expand All @@ -42,7 +48,7 @@ If you have ``conda`` installed, you can create an environment and activate it a

conda create -n magpie
conda activate magpie
pip install magpie
pip install -e <local-magpie-directory>

All above operations is done automatically with the following command executed from within a local `Magpie` directory:

Expand Down
1 change: 1 addition & 0 deletions magpie/__meta__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
__version__ = "3.24.0"
__title__ = "Magpie"
__package__ = "magpie" # pylint: disable=W0622
__distribution__ = "pavics-magpie" # name for pypi
__author__ = "Francois-Xavier Derue, Francis Charette-Migneault"
__maintainer__ = "Francis Charette-Migneault"
__email__ = "francis.charette-migneault@crim.ca"
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@ pytest
python2-secrets; python_version <= "3.5"
safety
tox>=3.0
twine
webtest
waitress
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def _extra_requirements(base_requirements, other_requirements):

setup(
# -- meta information --------------------------------------------------
name=__meta__.__package__,
name=__meta__.__distribution__,
version=__meta__.__version__,
description=__meta__.__description__,
long_description=README + "\n\n" + CHANGES,
Expand Down