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

Fix #466 projex generates pyproject.toml #488

Merged
merged 5 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
python-ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: curl -LsS https://radia.run | bash -s python-ci
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.eggs/
MANIFEST.in
pytest.ini
tox.ini
Expand Down
12 changes: 12 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Read The Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
version: 2
build:
os: ubuntu-22.04
tools:
python: "3.9"
jobs:
pre_build:
- curl https://radia.run | bash -s readthedocs
sphinx:
configuration: docs/conf.py
4 changes: 4 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Python programs and servers.

PyKern defines policies, which make it easy to eliminate boiler-plate.

.. autosummary::
:toctree: _autosummary
:recursive:

.. toctree::
:maxdepth: 2

Expand Down
4 changes: 2 additions & 2 deletions pykern/fconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
PKDict. FConf is not a replacement for `pykern.pkconfig`. Rather it is
for complex configuration input files to programs that often require
programmatic generation. FConf was written for
RSConf <https://git.radiasoft.org/rsconf>.
`RSConf <https://git.radiasoft.org/rsconf>`_.

The Basic YAML configuration look like this::

Expand Down Expand Up @@ -306,7 +306,7 @@ def parse_all(path, base_vars=None):
YAML files next. YAML file evaluation happens in that same order.

Args:
path (py.path): directory that *.py and *.yml files
path (py.path): directory that ``*.py`` and ``*.yml`` files
base_vars (PKDict): initial variable state. May be hierarchical. [None]
Returns:
PKDict: evaluated and merged files plus base_vars
Expand Down
3 changes: 1 addition & 2 deletions pykern/package_data/projex-licenses/proprietary.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ PROPRIETARY AND CONFIDENTIAL

Copyright (C) {{ author }}. All Rights Reserved

Unauthorized copying of the contents of the contents of
this repository via any medium is strictly prohibited.
Unauthorized copying of the contents of this repository via any medium is strictly prohibited.
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ jobs:
python-ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: curl -LsS https://radia.run | bash -s python-ci
4 changes: 4 additions & 0 deletions pykern/package_data/projex/docs/index.rst.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ Welcome to {{ name }}

{{ description }}

.. autosummary::
:toctree: _autosummary
:recursive:

.. toctree::
:maxdepth: 2

Expand Down
3 changes: 1 addition & 2 deletions pykern/package_data/projex/dot-gitignore.jinja
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
MANIFEST.in
tox.ini
pytest.ini
pykern_setup.yaml
tox.ini
.python-version
.#*
\#*
Expand Down
12 changes: 12 additions & 0 deletions pykern/package_data/projex/dot-readthedocs.yml.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Read The Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
version: 2
build:
os: ubuntu-22.04
tools:
python: "3.9"
jobs:
pre_build:
- curl https://radia.run | bash -s readthedocs
sphinx:
configuration: docs/conf.py
1 change: 0 additions & 1 deletion pykern/package_data/projex/projex/__init__.py.jinja
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
""":mod:`{{ name }}` package

{{ copyright_license_rst }}
Expand Down
1 change: 0 additions & 1 deletion pykern/package_data/projex/projex/projex_console.py.jinja
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""Front-end command line for :mod:`{{ name }}`.

See :mod:`pykern.pkcli` for how this module is used.
Expand Down
36 changes: 36 additions & 0 deletions pykern/package_data/projex/pyproject.toml.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[build-system]
requires = ["chronver", "setuptools>=66"]
build-backend = "setuptools.build_meta"

[project]
authors = [
{ name = "{{ author }}", email = "{{ author_email }}" },
]
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Environment :: Console",
"Intended Audience :: Developers",
"{{ classifier_license }}",
"Natural Language :: English",
"Programming Language :: Python",
"Topic :: Utilities",
]
dependencies = [
"pykern",
]
description = "{{ description }}"
dynamic = ["version"]
name = "{{ name }}"
readme = "README.md"

[project.scripts]
{{ name }} = "{{ name }}.{{ name }}_console:main"

[project.urls]
Homepage = "http://git.radiasoft.org/{{ name }}"

[tool.setuptools.package-data]
{{ name }} = ["package_data/**"]

[tool.setuptools.packages.find]
include = ["{{ name }}*"]
25 changes: 0 additions & 25 deletions pykern/package_data/projex/setup.py.jinja

This file was deleted.

7 changes: 2 additions & 5 deletions pykern/package_data/projex/tests/import_test.py.jinja
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
# -*- coding: utf-8 -*-
"""Test that module imports.

You should delete the test once you have real tests.
Only necessary if you have no other tests so that
tox will work.
pykern.pkcli.test passes.
"""
import pytest


def test_1():
def test_import():
import {{ name }}
Loading