diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..ee2a3bc --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,44 @@ +name: Test + +on: + push: + branches: ["dev", "main"] + pull_request: + branches: ["dev", "main"] + +concurrency: + group: ${{ github.ref }} + cancel-in-progress: true + +jobs: + + # Test building the package + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Install dependencies + shell: bash + run: | + python -m pip install --upgrade pip build + + - name: Build package + shell: bash + run: | + python -m build --sdist --wheel + + - name: Install tarball + shell: bash + run: | + python -m pip install dist/*.gz + + - name: Test installation + shell: bash + run: | + timefed diff --git a/.github/workflows/mkdocs.yml b/.github/workflows/mkdocs.yml new file mode 100644 index 0000000..ecd21a2 --- /dev/null +++ b/.github/workflows/mkdocs.yml @@ -0,0 +1,31 @@ +name: MkDocs + +on: + push: + branches: + - main + +permissions: + contents: write + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Configure Git Credentials + run: | + git config user.name github-actions[bot] + git config user.email 41898282+github-actions[bot]@users.noreply.github.com + - uses: actions/setup-python@v5 + with: + python-version: 3.x + - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV + - uses: actions/cache@v4 + with: + key: mkdocs-${{ env.cache_id }} + path: .cache + restore-keys: | + mkdocs- + - run: pip install mkdocs mkapi + - run: mkdocs gh-deploy --force diff --git a/pyproject.toml b/pyproject.toml index 096e0d1..b7595fb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,15 +1,8 @@ -[build-system] -requires = ["setuptools"] -build-backend = "setuptools.build_meta" - -[tool.setuptools.packages.find] -include = ["timefed"] - [project] name = "timefed" version = "2.2.0" description = "Timeseries Forecasting, Evaluation, and Deployment" -readme = "README.rst" +readme = "README.md" requires-python = ">=3.10" license = {file = "LICENSE"} keywords = ["timefed", "TimeFED", "Time-FED"] @@ -56,3 +49,10 @@ repository = "https://github.jpl.nasa.gov/jamesmo/TimeFED" [project.scripts] timefed = "timefed.__main__:cli" + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.hatch.version] +path = "timefed/__init__.py"