Skip to content

Commit

Permalink
merge with main
Browse files Browse the repository at this point in the history
  • Loading branch information
themousepotato committed Jul 15, 2021
2 parents daabd19 + c11c2f8 commit 67b81b0
Show file tree
Hide file tree
Showing 197 changed files with 2,424 additions and 2,866 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/bleeding-edge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: CI (bleeding edge)
# this workflow is heavily inspired from pandas, see
# https://github.com/pandas-dev/pandas/blob/master/.github/workflows/python-dev.yml

# goals: check stability against
# - dev version of Python, numpy, and matplotlib
# - building with future pip default options

on:
push:
branches:
- main
schedule:
# run this every day at 3 am UTC
- cron: '0 3 * * *'

jobs:
build:
runs-on: ubuntu-latest
name: Python3.10-dev
timeout-minutes: 60

concurrency:
group: ${{ github.ref }}-dev
cancel-in-progress: true

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Python Dev Version
uses: actions/setup-python@v2
with:
python-version: '3.10-dev'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools wheel
python -m pip install git+https://github.com/numpy/numpy.git
python -m pip install git+https://github.com/matplotlib/matplotlib.git
python -m pip install cython
- name: Build yt
# --no-build-isolation is used to guarantee that build time dependencies
# are not installed by pip as specified from pyproject.toml, hence we get
# to use the dev version of numpy at build time.
run: |
python setup.py build_ext -q -j2
python -m pip install -e .[test] --no-build-isolation
- name: Run Tests
run: pytest -vvv
9 changes: 8 additions & 1 deletion .github/workflows/build-test-pytest.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: Build and Test

on: [push, pull_request]
on:
push:
branches:
- main
pull_request:
paths-ignore:
- "doc/**"
- README.md

defaults:
run:
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: Build and Test

on: [push, pull_request]
on:
push:
branches:
- main
pull_request:
paths-ignore:
- "doc/**"
- README.md

defaults:
run:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/rules-checks.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# FUTURE: this file can be deleted at condition that warnings are treated
# as errors in all CI jobs covering h5py.
# In practice, this will only be possible when we're done transitioning to pytest.
name: Auto review bad practice
on: [pull_request]

Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/wheels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Build CI Wheels

on:
push:
branches:
- main
- stable
tags:
- 'yt-*'

jobs:
build_wheels:
name: Wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, windows-latest, macos-latest]
fail-fast: false

steps:
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: 3.9

- uses: s-weigand/setup-conda@v1
if: matrix.os == 'windows-latest'
with:
update-conda: true
conda-channels: conda-forge
activate-conda: true
python-version: 3.9

- uses: actions/checkout@v2
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==1.9.0

- name: Install dependencies and yt
shell: bash
env:
dependencies: "full"
LDFLAGS: "-static-libstdc++"
run: source ./tests/ci_install.sh

- name: Build wheels for CPython
run: |
python -m cibuildwheel --output-dir dist
env:
CIBW_BUILD: "cp36-* cp37-* cp38-* cp39-*"
CIBW_ARCHS_LINUX: "x86_64"
CIBW_ARCHS_MACOS: "x86_64"
CIBW_ARCHS_WINDOWS: "auto"
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_MANYLINUX_I686_IMAGE: manylinux2014
CIBW_ENVIRONMENT: "LDFLAGS='-static-libstdc++'"

- uses: actions/upload-artifact@v2
with:
name: wheels
path: ./dist/*.whl
16 changes: 10 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,34 +28,38 @@ repos:
- id: no-commit-to-branch
args: [--branch, main]
- repo: https://github.com/asottile/pyupgrade
rev: v2.19.1
rev: v2.21.0
hooks:
- id: pyupgrade
args: [--py36-plus]
- repo: https://github.com/psf/black
rev: 21.5b2
rev: 21.6b0
hooks:
- id: black
language_version: python3
- repo: https://github.com/PyCQA/isort
rev: '5.8.0'
rev: '5.9.2'
hooks:
- id: isort
additional_dependencies: [toml]
name: isort (python)
- id: isort
name: isort (cython)
types: [cython]
- repo: https://github.com/PyCQA/flake8
rev: '3.9.2'
hooks:
- id: flake8
additional_dependencies: [
flake8-bugbear>=20.3.2, # GH PR 2851
flake8-logging-format
flake8-logging-format,
flake8-2020==1.6.0,
]
- repo: https://github.com/asottile/blacken-docs
rev: v1.10.0
hooks:
- id: blacken-docs
additional_dependencies: [black==20.8b1]
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.8.0
rev: v1.9.0
hooks:
- id: rst-backticks
55 changes: 11 additions & 44 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -118,17 +118,11 @@ Feel free to `blog <https://blog.yt-project.org/>`_ about, `tweet
Long-Term Projects
------------------

There are some wild-eyed, out-there ideas that have been bandied about for the
future directions of yt -- some of them even written into the mission
statement. The ultimate goal is to move past simple analysis and visualization
of data and begin to approach it from the other side, of generating data,
running solvers. We also hope to increase its ability to act as an in situ
analysis code, by presenting a unified protocol. Other projects include
interfacing with ParaView and VisIt, creating a web GUI for running
simulations, creating a run-tracker that follows simulations in progress, a
federated database for simulation outputs, and so on and so forth.

yt is an ambitious project. Let's be ambitious together.
There are some out-there ideas that have been bandied about for the
future directions of yt -- stuff like fun new types of visualization, remapping
of coordinates, new ways of accessing data, and even new APIs to make life easier.

yt is an ambitious project. Let's be ambitious together!

yt Community Code of Conduct
----------------------------
Expand Down Expand Up @@ -362,7 +356,7 @@ How To Read The Source Code

If you just want to *look* at the source code, you may already have it on your
computer. If you build yt using the install script, the source is available at
``$YT_DEST/src/yt-git``. See :ref:`source-installation` for more details about
``$YT_DEST/src/yt-git``. See :ref:`install-from-source` for more details about
to obtain the yt source code if you did not build yt using the install
script.

Expand Down Expand Up @@ -401,10 +395,9 @@ the following subdirectories:
classes for data regions, covering grids, time series, and so on. This
also includes derived fields and derived quantities.

``gui``
This is where all GUI components go. Typically this will be some small
tool used for one or two things, which contains a launching mechanism on
the command line.
``units``
This used to be where all the unit-handling code resided, but as of now it's
mostly just a thin wrapper around unyt.

``utilities``
All broadly useful code that doesn't clearly fit in one of the other
Expand Down Expand Up @@ -434,33 +427,7 @@ Building yt
+++++++++++

If you have made changes to any C or Cython (``.pyx``) modules, you have to
rebuild yt. If your changes have exclusively been to Python modules, you will
not need to re-build, but (see below) you may need to re-install.

Note that you will need a functioning compilation environment to build yt. On
linux this typically means installing the package that sets up a basic build
environment (e.g. ``build-essential`` on Debian and Ubuntu). On MacOS this means
installing the XCode command line tools. On Windows this means installing the
version of the Microsoft Visual C++ compiler that is appropriate for your
version of Python. See `the Python wiki
<https://wiki.python.org/moin/WindowsCompilers>`_ for more details.

If you are running from a clone that is executable in-place (i.e., has been
installed via the installation script or you have run ``setup.py develop``) you
can rebuild these modules by executing:

.. code-block:: bash
$ python setup.py develop
If you have previously "installed" via ``setup.py install`` you have to
re-install:

.. code-block:: bash
$ python setup.py install
Only one of these two options is needed.
rebuild yt before your changes are usable. See :ref:`install-from-source`.

.. _requirements-for-code-submission:

Expand Down Expand Up @@ -585,7 +552,7 @@ Here's a more detailed flowchart of how to submit changes.
this at: https://github.com/yt-project/yt/fork.
#. If you have used the installation script, the source code for yt can be
found in ``$YT_DEST/src/yt-git``. Alternatively see
:ref:`source-installation` for instructions on how to build yt from the
:ref:`install-from-source` for instructions on how to build yt from the
git repository. (Below, in :ref:`reading-source`, we describe how to
find items of interest.) If you have already forked the repository then
you can clone your fork locally::
Expand Down
11 changes: 10 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
include README* CREDITS COPYING.txt CITATION setupext.py CONTRIBUTING.rst
include yt/visualization/mapserver/html/map.js
include yt/visualization/mapserver/html/map_index.html
include yt/visualization/mapserver/html/Leaflet.Coordinates-0.1.5.css
include yt/visualization/mapserver/html/Leaflet.Coordinates-0.1.5.src.js
include yt/utilities/tests/cosmology_answers.yml
include yt/utilities/mesh_types.yaml
exclude scripts/pr_backport.py
recursive-include yt *.py *.pyx *.pxd *.h *.hpp README* *.txt LICENSE* *.cu
exclude yt/utilities/lib/cykdtree/c_kdtree.cpp
prune tests
prune docker
prune answer-store
recursive-include yt *.py *.pyx *.pxi *.pxd *.h *.hpp README* *.txt LICENSE* *.cu
recursive-include doc *.rst *.txt *.py *.ipynb *.png *.jpg *.css *.html
recursive-include doc *.h *.c *.sh *.svgz *.pdf *.svg *.pyx
include doc/README doc/activate doc/activate.csh doc/cheatsheet.tex
Expand All @@ -13,5 +19,8 @@ prune doc/source/reference/api/generated
prune doc/build
recursive-include yt/visualization/volume_rendering/shaders *.fragmentshader *.vertexshader
include yt/sample_data_registry.json
include conftest.py
prune yt/frontends/_skeleton
recursive-include yt/frontends/amrvac *.par
exclude .codecov.yml .coveragerc .git-blame-ignore-revs .gitmodules .hgchurn .mailmap
exclude .pre-commit-config.yaml clean.sh nose_answer.cfg nose_unit.cfg
57 changes: 8 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# The yt Project

![Supported Python Version](https://img.shields.io/badge/python%20version-≥%203.6-important)
[![PyPI](https://img.shields.io/pypi/v/yt)](https://pypi.org/project/yt)
[![Supported Python Versions](https://img.shields.io/pypi/pyversions/yt)](https://pypi.org/project/yt/)
[![Latest Documentation](https://img.shields.io/badge/docs-latest-brightgreen.svg)](http://yt-project.org/docs/dev/)
[![Users' Mailing List](https://img.shields.io/badge/Users-List-lightgrey.svg)](https://mail.python.org/archives/list/yt-users@python.org//)
[![Devel Mailing List](https://img.shields.io/badge/Devel-List-lightgrey.svg)](https://mail.python.org/archives/list/yt-dev@python.org//)
Expand All @@ -10,14 +11,15 @@

<!--- Tests and style --->
![Build and Test](https://github.com/yt-project/yt/workflows/Build%20and%20Test/badge.svg?branch=main)
[![CI (bleeding edge)](https://github.com/yt-project/yt/actions/workflows/bleeding-edge.yaml/badge.svg)](https://github.com/yt-project/yt/actions/workflows/bleeding-edge.yaml)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/yt-project/yt/main.svg)](https://results.pre-commit.ci/latest/github/yt-project/yt/main)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
<!--- [![codecov](https://codecov.io/gh/yt-project/yt/branch/main/graph/badge.svg)](https://codecov.io/gh/yt-project/yt) --->

<a href="http://yt-project.org"><img src="doc/source/_static/yt_logo.png" width="300"></a>
<a href="http://yt-project.org"><img src="https://raw.githubusercontent.com/yt-project/yt/main/doc/source/_static/yt_logo.png" width="300"></a>

yt is an open-source, permissively-licensed python package for analyzing and
yt is an open-source, permissively-licensed Python library for analyzing and
visualizing volumetric data.

yt supports structured, variable-resolution meshes, unstructured meshes, and
Expand Down Expand Up @@ -50,54 +52,11 @@ conda install -c conda-forge yt
or with pip:

```shell
pip install yt
python -m pip install yt
```

To get set up with a development version, you want to clone this repository:

```shell
git clone https://github.com/yt-project/yt yt-git
cd yt-git
```

and work within a conda environment:

```shell
# Create a conda environment named yt-git
$ conda create -n yt-git python=3.6
# Activate it
$ source activate yt-git
# Make sure you run the latest version of conda
$ conda update conda
# Install yt's runtime dependencies
$ conda install -c conda-forge yt --only-deps
# Install yt's build dependencies
$ conda install -c conda-forge cython
# Make sure you run the latest version of pip
$ pip install --upgrade pip
$ pip install -v -e .
# Output installed packages
$ conda env export
```

Alternatively, you can install yt in a
[virtualenv](https://packaging.python.org/installing/#creating-virtual-environments):

```shell
# It is conventional to create virtualenvs at ~/.virtualenv/
$ mkdir -p ~/.virtualenv
# Assuming your version of Python 3 meets the minimal requirement
# create a virtualenv named yt-git
$ python3 -m venv ~/.virtualenv/yt-git
# Activate it
$ source ~/.virtualenv/yt-git/bin/activate
# Make sure you run the latest version of pip
$ pip install --upgrade pip
# Assuming you have cd'd into yt-git
$ pip install -e .
# Output installed packages
$ pip freeze
```
More information on the various ways to install yt, and in particular to install from source,
can be found on [the project's website](https://yt-project.org/docs/dev/installing.html).

## Getting Started

Expand Down
Loading

0 comments on commit 67b81b0

Please sign in to comment.