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

Move from PDM to Rye for project management #361

Merged
merged 8 commits into from
Feb 13, 2024
Merged
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
15 changes: 5 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,13 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: pdm-project/setup-pdm@main
name: Setup PDM
with:
python-version: "3.10"
architecture: x64
prerelease: true
enable-pep582: false
- name: Setup Rye
uses: eifinger/setup-rye@v1

- name: Build wheels
run: |
pdm build
rye build

- name: Test build
run: |
python3 -m venv fresh_env
Expand All @@ -34,4 +29,4 @@ jobs:

- name: Upload to PyPI
run: |
pdm publish --no-build -r pypi --username __token__ --password ${{ secrets.PYPI_TOKEN }}
rye publish --token ${{ secrets.PYPI_TOKEN }} --yes
17 changes: 7 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ jobs:
strategy:
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
Expand All @@ -33,19 +32,17 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PDM
uses: pdm-project/setup-pdm@main
with:
python-version: ${{ matrix.python-version }}
- name: Setup Rye
uses: eifinger/setup-rye@v1

- name: Setup Nox
uses: wntrblm/nox@2022.11.21
- name: Pin active Python
run: rye pin ${{ matrix.python-version }}

- name: Install dependencies
run: pdm sync
run: rye sync

- name: Run Tests
run: nox --no-venv -s test
run: rye run coverage run -m pytest

- name: Upload coverage data
uses: actions/upload-artifact@v3
Expand All @@ -72,7 +69,7 @@ jobs:
with:
name: coverage-data

- name: Combine coverage & fail if it's <100%
- name: Combine coverage & fail if it's <95%
run: |
python -m coverage combine
python -m coverage html --skip-covered --skip-empty
Expand Down
146 changes: 3 additions & 143 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,160 +1,20 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
# Coverage
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject
.venv/

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
site/
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.10.13
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ Reference atmospheric thermophysical profiles for radiative transfer
applications in Earth's atmosphere.

[![License: LGPLv3](https://img.shields.io/badge/License-LGPLv3-yellow.svg)](https://opensource.org/license/lgpl-3-0/)
[![pdm-managed](https://img.shields.io/badge/pdm-managed-blueviolet)](https://pdm.fming.dev)
[![Rye](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/mitsuhiko/rye/main/artwork/badge.json)](https://rye-up.com)
[![code-style-black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![PyPI](https://img.shields.io/pypi/v/joseki)](https://pypi.python.org/pypi/joseki/)
[![Conda](https://img.shields.io/conda/vn/conda-forge/joseki)](https://anaconda.org/conda-forge/joseki)

Expand Down
80 changes: 80 additions & 0 deletions docs/assets/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

* Various documentation tweaks for improved quality of life (search, logo, etc.).
* Move from PDM to [Rye](https://rye-up.com/) for project management.

### Fixed

* Added missing tests to bring coverage metric to 100%.
Expand Down
40 changes: 0 additions & 40 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,43 +8,3 @@ The documentation consists of four separate parts:
* [Explanation](explanation.md)
* [Tutorials](tutorials.md)
* [Reference](reference.md)

## Project layout

??? abstract "Project layout"

```
docs/
bibliography.bib # BibTeX file
bibliography.md # Bibliography
changelog.md # Changelog
explanation.md # Understanding-oriented documentation
how-to-guides.md # Task-oriented documentation
index.md # The documentation homepage.
reference.md # Information-oriented
tutorials.md # Learning-oriented documentation
CITATION.cff # Citation file
codecov.yml # Code coverage configuration file
LICENSE # License file
maintainers.md # Maintainers guide
mkdocs.yml # The configuration file.
pdm.lock # PDM lock file
noxfile.py # Nox sessions
pyproject.toml # Build system requirements
README.md # README file
src/
joseki/ # Source code
tests/
data/ # Test data
profiles/
test_afgl_1986.py # AFGL (1986) profiles tests
test_core.py # Profile core module tests
test_factory.py # Profile factory tests
test_mipas_2007.py # MIPAS (2007) profiles tests
test_ussa_1976.py # U.S.S.A. 1976 profile tests
test_util.py # Profile utilities tests
test_accessor.py # Accessor module tests
test_core.py # Core module tests
test_main.py # CLI test module
test_units.py # Units module tests
```
Loading
Loading