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

Adding back in README, License and making cli optional #52

Merged
merged 6 commits into from
Jan 7, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/mkdoc-gh-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ jobs:
- name: Validate package
run: |
ls dist
pip3 install dist/jsf-*.tar.gz
PACKAGE=`ls dist/jsf-*.tar.gz`
pip3 install $PACKAGE\[cli\]
jsf --help
- name: Deploy docs
run: |
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/python-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ jobs:
- name: Validate package
run: |
ls dist
pip3 install dist/jsf-*.tar.gz
PACKAGE=`ls dist/jsf-*.tar.gz`
pip3 install $PACKAGE\[cli\]
jsf --help
- name: Upload coverage
uses: codecov/codecov-action@v1
Expand Down
10 changes: 8 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
FROM python:3.8
FROM python:3.8 AS builder

WORKDIR /opt/working
COPY . .
RUN pip install .
RUN make build

FROM python:3.8.16-alpine3.17
WORKDIR /root/
COPY --from=builder /opt/working/dist/jsf-*.tar.gz ./
RUN pip install /root/jsf-*.tar.gz
CMD ["jsf"]
23 changes: 0 additions & 23 deletions LICENSE

This file was deleted.

1 change: 1 addition & 0 deletions LICENSE
156 changes: 0 additions & 156 deletions README.md

This file was deleted.

1 change: 1 addition & 0 deletions README.md
7 changes: 7 additions & 0 deletions pants.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ config = ".flake8"
[test]
use_coverage = true

[pytest]
extra_requirements = [
"typer>=0.7.0",
"pytest-cov"
]
lockfile = "<none>"

[coverage-py]
report = ["xml", "html"]

Expand Down
12 changes: 10 additions & 2 deletions src/jsf/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,27 @@ python_sources(name="src")

python_requirements(name="reqs")

resources(
name="build_resources",
sources=["README.md", "LICENSE"],
)

python_distribution(
name="jsf-dist",
entry_points={
"console_scripts": {
"jsf": "jsf.cli:app"
},
},
dependencies=[":src"],
dependencies=[":src", ":build_resources"],
long_description_path="README.md",
provides=python_artifact(
name="jsf",
version="0.5.2",
version="0.5.3",
author="ghandic",
description="Creates fake JSON files from a JSON schema",
url="https://github.com/ghandic/jsf",
long_description_content_type="text/markdown",
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
Expand All @@ -34,6 +41,7 @@ python_distribution(
],
zip_safe=True,
python_requires=">=3.7",
extras_require={"cli": ["typer>=0.7.0"]}
),
)

Expand Down
23 changes: 23 additions & 0 deletions src/jsf/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
The MIT License (MIT)
==================================

Copyright (c) 2020 Andy Challis
-------------------------------

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.