Skip to content
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
4 changes: 2 additions & 2 deletions .cz.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ version_scheme = "pep440"
version = "17.25.0b5"
update_changelog_on_bump = true
version_files = [
"java-api/setup.cfg:version",
"java-api-stubs/pyproject.toml:version"
"setup.cfg:version",
"stubs/pyproject.toml:version"
]
2 changes: 1 addition & 1 deletion .devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
}
},
"onCreateCommand": "pre-commit install --hook-type pre-commit --hook-type commit-msg --hook-type pre-push",
"postCreateCommand": "python2 -m pip install --requirement java-api/requirements.txt"
"postCreateCommand": "python2 -m pip install --requirement requirements.txt"
}
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ jobs:
uses: coatl-dev/workflows/.github/workflows/pylint.yml@v6
with:
path: src
working-directory: java-api
14 changes: 6 additions & 8 deletions .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,16 @@ on:
- '**/pyproject.toml'
- '**/requirements.txt'
- '**/tox.ini'
- java-api/src/**
- java-api/setup.cfg
- java-api/setup.py
- java-api/tests/**
- java-api-stubs/stubs/**
- src/**
- setup.cfg
- setup.py
- tests/**
- stubs/stubs/**
workflow_call:

jobs:
tox-java-api:
uses: coatl-dev/workflows/.github/workflows/tox-docker.yml@v6
with:
working-directory: java-api

tox-java-api-stubs:
uses: coatl-dev/workflows/.github/workflows/tox.yml@v6
Expand All @@ -30,4 +28,4 @@ jobs:
3.10
3.11
3.12
working-directory: java-api-stubs
working-directory: stubs
3 changes: 1 addition & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,10 @@ jobs:
uses: coatl-dev/actions/pypi-upload@v5
with:
password: ${{ secrets.PYPI_API_TOKEN_JAVA_API_PKG }}
working-directory: java-api

- name: Upload java-api-stubs to PyPI
uses: coatl-dev/actions/pypi-upload@v5
with:
python-version: '3.12'
password: ${{ secrets.PYPI_API_TOKEN_JAVA_API_STUBS }}
working-directory: java-api-stubs
working-directory: stubs
File renamed without changes.
31 changes: 15 additions & 16 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ repos:
rev: v1.3.0
hooks:
- id: sort-all
files: ^java-api/src/
files: ^src/
- repo: https://github.com/bwhmather/ssort
rev: 0.16.0
hooks:
- id: ssort
files: ^java-api/src/
files: ^src/
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 25.12.0
hooks:
Expand All @@ -23,36 +23,36 @@ repos:
rev: 1.3.0
hooks:
- id: unimport
files: ^java-api/src/
files: ^src/
language_version: python3.12
- repo: https://github.com/PyCQA/isort
rev: 7.0.0
hooks:
- id: isort
name: isort-java-api
files: ^java-api/src/
args: [--settings-file, java-api/tox.ini]
files: ^src/
args: [--settings-file, tox.ini]
- repo: https://github.com/PyCQA/isort
rev: 7.0.0
hooks:
- id: isort
name: isort-java-api-stubs
files: ^java-api-stubs/stubs/
args: [--settings-file, java-api-stubs/tox.ini]
files: ^stubs/stubs/
args: [--settings-file, stubs/tox.ini]
- repo: https://github.com/PyCQA/docformatter
rev: v1.7.7
hooks:
- id: docformatter
files: ^java-api/src/
args: [--config, java-api/tox.ini]
files: ^src/
args: [--config, tox.ini]
language_version: python3.12
- repo: https://github.com/coatl-dev/flake8
rev: 5.0.4
hooks:
- id: flake8
name: flake8-java-api
files: ^java-api/src/
args: [--config, java-api/tox.ini]
files: ^src/
args: [--config, tox.ini]
additional_dependencies: [pydoclint]
language_version: python3.12
- repo: https://github.com/PyCQA/flake8
Expand All @@ -63,13 +63,13 @@ repos:
types: [file]
files: \.(pyi)$
additional_dependencies: [flake8-pyi]
args: [--config, java-api-stubs/tox.ini]
args: [--config, stubs/tox.ini]
- repo: https://github.com/PyCQA/pydocstyle
rev: 6.3.0
hooks:
- id: pydocstyle
files: ^java-api/src/
args: [--config, java-api/tox.ini]
files: ^src/
args: [--config, tox.ini]
- repo: https://github.com/commitizen-tools/commitizen
rev: v4.10.0
hooks:
Expand All @@ -82,6 +82,5 @@ repos:
name: pylint
entry: pylint
language: system
files: ^java-api/src/
files: ^src/
types: [python]
args: [--rcfile, java-api/.pylintrc]
File renamed without changes.
File renamed without changes.
118 changes: 110 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,117 @@
# java-api: Python 2 package and Python 3 stubs
# java-api

<!--- Badges --->
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/java-api)](https://pypi.org/project/java-api/)
[![PyPI - Version](https://img.shields.io/pypi/v/java-api)](https://pypi.org/project/java-api/)
[![PyPI - Downloads](https://static.pepy.tech/badge/java-api)](https://pepy.tech/projects/java-api)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/ignition-devs/java-api-17/main.svg)](https://results.pre-commit.ci/latest/github/ignition-devs/java-api-17/main)
[![ci](https://github.com/ignition-devs/java-api-17/actions/workflows/ci.yml/badge.svg)](https://github.com/ignition-devs/java-api-17/actions/workflows/ci.yml)
[![Join us on GitHub discussions](https://img.shields.io/badge/github-discussions-informational)](https://github.com/orgs/ignition-devs/discussions)

This repository contains the following projects:
java-api is a Python package that allows developers to get code completion
for Java 17 API Specification functions and classes in their IDE of choice.

- [java-api]: Java Version 17 API Specification for [`ignition-api`].
- [java-api-stubs]: This package contains a collection of stubs for the
`java-api` package.
## Table of contents

[`ignition-api`]: https://pypi.org/project/ignition-api
[java-api]: https://github.com/ignition-devs/java-api-17/tree/main/java-api
[java-api-stubs]: https://github.com/ignition-devs/java-api/tree/main/java-api-stubs
- [Prerequisites](#prerequisites)
- [Installation and usage](#installation-and-usage)
- [Installing with pip](#installing-with-pip)
- [Project structure](#project-structure)
- [Packages](#packages)
- [Contributing](#contributing)
- [Discussions](#discussions)
- [Contributors](#contributors)
- [License](#license)
- [Code of conduct](#code-of-conduct)

## Prerequisites

Before you begin, ensure you have met the following requirements:

- You have installed [Python 2.7.18]

## Installation and usage

To use java-api, you may install it using the following method.

### Installing with `pip`

> [!NOTE]
> For stub files for this package, look for [`java-api-stubs`].

The preferred method is to install it by running `pip`. It requires Python
2.7.18.

```bash
python2 -m pip install java-api
```

This will install it as package to your Python installation, which will allow
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (typo): Improve grammar in description of installation result.

Consider rephrasing to: “This will install it as a package in your Python installation,” to correct the article and preposition.

Suggested change
This will install it as package to your Python installation, which will allow
This will install it as a package in your Python installation, which will allow

you to call Ignition Scripting functions from Python's REPL, and get code
completion using an IDE such as PyCharm and Visual Studio Code.

```bash
$ python2
Python 2.7.18 (default, Sep 23 2024, 13:23:35)
[GCC Apple LLVM 16.0.0 (clang-1600.0.26.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from __future__ import print_function
>>> import java.lang
>>> print(java.lang.__doc__)
Provides classes that are fundamental to the design of the Java
programming language.

>>> quit()
```

And to uninstall:

```bash
python2 -m pip uninstall java-api
```

## Project structure

### Packages

This project consists of the following packages:

- [java](#javajavax)
- [javax](#javajavax)

#### java/javax

These packages include supporting Java classes and interfaces. For more
information, see documentation here:
<https://docs.oracle.com/en/java/javase/17/docs/api/index.html>.

## Contributing

See [CONTRIBUTING.md].

## Discussions

Feel free to post your questions and/or ideas at [Discussions].

## Contributors

Thanks to everyone who has contributed to this project.

Up-to-date list of contributors can be found here: [CONTRIBUTORS].

## License

See the [LICENSE].

## Code of conduct

This project has adopted the [Microsoft Open Source Code of Conduct].

<!-- Links -->
[CONTRIBUTING.md]: https://github.com/ignition-devs/java-api-17/blob/main/CONTRIBUTING.md#contributing-to-java-api
[CONTRIBUTORS]: https://github.com/ignition-devs/java-api-17/graphs/contributors
[Discussions]: https://github.com/orgs/ignition-devs/discussions
[`java-api-stubs`]: https://pypi.org/project/java-api-stubs/
[LICENSE]: https://github.com/ignition-devs/java-api-17/blob/main/LICENSE
[Microsoft Open Source Code of Conduct]: https://opensource.microsoft.com/codeofconduct/
[Python 2.7.18]: https://www.python.org/downloads/release/python-2718/
1 change: 0 additions & 1 deletion java-api/CHANGELOG.md

This file was deleted.

1 change: 0 additions & 1 deletion java-api/LICENSE

This file was deleted.

105 changes: 0 additions & 105 deletions java-api/README.md

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading