Skip to content

Commit

Permalink
Replace setuptools/setup.py with PEP621 metadata and flit (#14)
Browse files Browse the repository at this point in the history
Summary:
- Replace setuptools/setup.py with PEP621 metadata and flit
- Test on macos

Pull Request resolved: #14

Test Plan: ci

Reviewed By: cxxxs

Differential Revision: D51734315

Pulled By: fried

fbshipit-source-id: d660885596e2a8c34641587ffbd0a074184e7b7c
  • Loading branch information
amyreese authored and facebook-github-bot committed Dec 1, 2023
1 parent cf7b2bb commit 6334071
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 94 deletions.
8 changes: 6 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
version: 2
updates:
- package-ecosystem: "github-actions"
- package-ecosystem: github-actions
# Workflow files in .github/workflows will be checked
directory: "/"
schedule:
interval: "daily"
interval: daily
- package-ecosystem: pip
directory: "/"
schedule:
interval: daily
19 changes: 8 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
name: later_ci
name: later

on: [push, pull_request]

jobs:
build:
name: Running python ${{ matrix.python-version }} on ${{matrix.os}}
name: test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9, '3.10', 3.11]
os: [ubuntu-latest]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-latest, macos-latest]

steps:
- uses: actions/checkout@v4
Expand All @@ -19,17 +20,13 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: update pip + setuptools
- name: update pip
run: |
python -m pip install --upgrade coverage pip setuptools
- name: pip install requirements
run: |
python -m pip install -r requirements.txt
python -m pip install --upgrade pip
- name: pip install later
run: |
python -m pip install -e .
python -m pip install -e .[dev]
- name: Run Unitests via coverage
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ target/
#Ipython Notebook
.ipynb_checkpoints

.python-version
.venv
.venv37
.mypy_cache
4 changes: 3 additions & 1 deletion later/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@
# License for the specific language governing permissions and limitations
# under the License.

"""A toolbox for asyncio services"""

from async_timeout import timeout

from .event import BiDirectionalEvent
from .task import as_task, cancel, herd, START_TASK, Watcher, WatcherError


__version__ = "23.11.29"
__version__ = "23.11.30"
__all__ = [
"BiDirectionalEvent",
"START_TASK",
Expand Down
39 changes: 39 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[build-system]
requires = ["flit-core >= 3.8"]
build-backend = "flit_core.buildapi"

[project]
name = "later"
dynamic = ["version", "description"]
readme = "README.rst"
authors = [
{name="Meta Platforms, Inc"},
{name="Jason Fried", email="fried@meta.com"},
]
license = {file="LICENSE"}
keywords = ["asyncio", "later"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Framework :: AsyncIO",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"License :: OSI Approved :: Apache Software License",
"Operating System :: POSIX",
"Operating System :: MacOS :: MacOS X",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Testing",
]

requires-python = ">=3.7"
dependencies = [
"async-timeout >= 2.0.0, < 5.0.0",
]

[project.optional-dependencies]
dev = [
"async-timeout==3.0.1",
"coverage==4.5.4",
]

[project.urls]
Github = "https://github.com/facebookincubator/later"
2 changes: 0 additions & 2 deletions requirements-dev.txt

This file was deleted.

1 change: 0 additions & 1 deletion requirements.txt

This file was deleted.

3 changes: 0 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[metadata]
license_file = LICENSE

[tox:tox]
envlist = py37, py37-minimal, py38

Expand Down
74 changes: 0 additions & 74 deletions setup.py

This file was deleted.

0 comments on commit 6334071

Please sign in to comment.