Skip to content

Commit

Permalink
chore: add updates information for move to new org (#35)
Browse files Browse the repository at this point in the history
* docs: updates README and setup.cfg with new organization

Signed-off-by: Jennifer Power <barnabei.jennifer@gmail.com>

* docs: updates CODE OF CONDUCT to match compliance-trestle

Signed-off-by: Jennifer Power <barnabei.jennifer@gmail.com>

* docs: updates issue templates with new organization and repo information

Signed-off-by: Jennifer Power <barnabei.jennifer@gmail.com>

* ci: updates workflow files with correct organization information

Signed-off-by: Jennifer Power <barnabei.jennifer@gmail.com>

* docs: updates MAINTAINER.md

* docs: updates CONTRIBUTING.md with trestle guidance

Signed-off-by: Jennifer Power <barnabei.jennifer@gmail.com>

* docs: fixes grammatical errors in contributing doc

Signed-off-by: Jennifer Power <barnabei.jennifer@gmail.com>

---------

Signed-off-by: Jennifer Power <barnabei.jennifer@gmail.com>
  • Loading branch information
jpower432 authored Apr 8, 2024
1 parent bffa6ed commit 9556b6d
Show file tree
Hide file tree
Showing 9 changed files with 97 additions and 53 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/new_collaborator.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ I would like collaborator (write) access to this repository.
- help make & test releases
- help promote the project

[contributing]: https://github.com/IBM/compliance-trestle/blob/main/CONTRIBUTING.md
[contributing]: https://github.com/oscal-compass/compliance-trestle-fedramp/blob/main/CONTRIBUTING.md
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@

## Key links:

- [Sonar coverage](https://sonarcloud.io/dashboard?id=compliance-trestle)
- [Sonar coverage](https://sonarcloud.io/dashboard?id=compliance-trestle-fedramp)
2 changes: 1 addition & 1 deletion .github/workflows/python-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
deploy:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/main' && github.repository == 'IBM/compliance-trestle-fedramp'
if: github.ref == 'refs/heads/main' && github.repository == 'oscal-compass/compliance-trestle-fedramp'
steps:
- uses: actions/checkout@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ jobs:
path: coverage.xml

sonar:
if: github.repository == 'IBM/compliance-trestle-fedramp'
if: github.repository == 'oscal-compass/compliance-trestle-fedramp'
runs-on: ubuntu-latest
needs: test
steps:
Expand Down
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at chris.butler@au1.ibm.com. All
reported by contacting the project team at avikas@in.ibm.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Expand Down
132 changes: 88 additions & 44 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,87 +3,131 @@
Our project welcomes external contributions. If you have an itch, please feel
free to scratch it.

To contribute code or documentation, please submit a **FIXME** [pull request](https://github.com/ibm/repo-template/pulls).
To contribute code or documentation, please submit a [pull request](https://github.com/oscal-compass/compliance-trestle-fedramp/pulls).

A good way to familiarize yourself with the codebase and contribution process is
to look for and tackle low-hanging fruit in the **FIXME** [issue tracker](https://github.com/ibm/repo-template/issues).
Before embarking on a more ambitious contribution, please quickly [get in touch](#communication) with us.
to look for and tackle low-hanging fruit in the [issue tracker](https://github.com/oscal-compass/compliance-trestle-fedramp/issues).
Before embarking on a more ambitious contribution, please quickly [get in touch](https://github.com/oscal-compass/compliance-trestle-fedramp/blob/develop/MAINTAINERS.md) with us.

**Note: We appreciate your effort, and want to avoid a situation where a contribution
requires extensive rework (by you or by us), sits in backlog for a long time, or
cannot be accepted at all!**

We have also adopted [Contributor Covenant Code of Conduct](https://oscal-compass.github.io/compliance-trestle/mkdocs_code_of_conduct/).

### Proposing new features

If you would like to implement a new feature, please **FIXME** [raise an issue](https://github.com/ibm/repo-template/issues)
before sending a pull request so the feature can be discussed. This is to avoid
If you would like to implement a new feature, please [raise an issue](https://github.com/oscal-compass/compliance-trestle-fedramp/issues)
labelled `enhancement` before sending a pull request so the feature can be discussed. This is to avoid
you wasting your valuable time working on a feature that the project developers
are not interested in accepting into the code base.

### Fixing bugs

If you would like to fix a bug, please **FIXME** [raise an issue](https://github.com/ibm/repo-template/issues) before sending a
If you would like to fix a bug, please [raise an issue](https://github.com/oscal-compass/compliance-trestle-fedramp/issues) labelled `bug` before sending a
pull request so it can be tracked.

### Merge approval

The project maintainers use LGTM (Looks Good To Me) in comments on the code
review to indicate acceptance. A change requires LGTMs from two of the
maintainers of each component affected.
review to indicate acceptance. A change requires LGTMs from one of the maintainers.

For a list of the maintainers, see the [maintainers](https://github.com/oscal-compass/compliance-trestle-fedramp/blob/develop/MAINTAINERS.md) page.

### Merging and release workflow

The `compliance-trestle-fedramp` project follows the same release and merging workflow `trestle` follows. Please refer to the [trestle release and merging workflow](https://github.com/oscal-compass/compliance-trestle/blob/develop/CONTRIBUTING.md#trestle-merging-and-release-workflow).

For a list of the maintainers, see the [MAINTAINERS.md](MAINTAINERS.md) page.
## Typing, docstrings and documentation

The `compliance-trestle-fedramp` project uses type hints and docstrings to improve code readability and maintainability. Please refer to the [trestle typing, docstrings and documentation](https://github.com/oscal-compass/compliance-trestle/blob/develop/CONTRIBUTING.md#typing-docstrings-and-documentation) for more details.

## Legal

Each source file must include a license header for the Apache
Software License 2.0. Using the SPDX format is the simplest approach.
e.g.
By contributing to this project, you agree to license your contribution under the \[Apache 2.0 License\]. For more detailed requirements, please refer to the `trestle` Legal section in the [CONTRIBUTING.md](https://github.com/oscal-compass/compliance-trestle/blob/develop/CONTRIBUTING.md#legal).

```
/*
Copyright <holder> All Rights Reserved.
## Setup - Developing `compliance-trestle-fedramp`

SPDX-License-Identifier: Apache-2.0
*/
```
### Does `compliance-trestle-fedramp` run correctly on my platform

We have tried to make it as easy as possible to make contributions. This
applies to how we handle the legal aspects of contribution. We use the
same approach - the [Developer's Certificate of Origin 1.1 (DCO)](https://github.com/hyperledger/fabric/blob/master/docs/source/DCO1.1.txt) - that the Linux® Kernel [community](https://elinux.org/Developer_Certificate_Of_Origin)
uses to manage code contributions.
- (Optional) setup a venv for python
- Run `make develop`
- This will install all python dependencies
- It will also checkout the submodules required for testing.
- Run `make test`
- This *should* run on all platforms, except Windows (currently).

We simply ask that when submitting a patch for review, the developer
must include a sign-off statement in the commit message.
### Setting up `vscode` for python.

Here is an example Signed-off-by line, which indicates that the
submitter accepts the DCO:
- Use the following commands to setup python:

```
Signed-off-by: John Doe <john.doe@example.com>
```bash
python3 -m venv venv
. ./venv/bin/activate
# for zsh put .[dev] in quotes as below
pip install -q -e ".[dev]" --upgrade --upgrade-strategy eager
```

You can include this automatically when you commit a change to your
local git repository using the following command:
- Install vscode plugin `Python extension for Visual Studio Code`

```
git commit -s
```
- Enable `yapf` for code formatting

- Enable `flake8` for code linting

### Testing python in `vscode`

Tests should be in the test subdirectory. Each file should be named test\_\*.py and each test function should be named \*\_test().

Note that with Python3 there should be no need for __init__.py in directories.

Test discovery should be automatic when you select a .py file for editing. After tests are discovered a flask icon will appear on the left and you can select it to see a panel listing of your tests. In addition your test functions will be annotated with Run/Debug so they can be launched directly from the editor. When everything is set up properly you should be able to step through your test code - which is important.

## Communication
Sometimes the discovery fails - and you may need to resort to uninstalling the python extension and reinstalling it - perhaps also shutting down code and restarting. This is a lightweight operation and seems to be safe and usually fixes any problems.

**FIXME** Please feel free to connect with us on our [Slack channel](link).
Test discovery will fail or stop if any of the tests have errors in them - so be sure to monitor the Problems panel at the bottom for problems in the code.

## Setup
Note that there are many panels available in Output - so be sure to check `Python Test Log` for errors and output from the tests.

**FIXME** Please add any special setup instructions for your project to help the developer
become productive quickly.
pytest fixtures are available to allow provision of common functionality. See conftest.py and tmp_dir for an example.

## Testing
#### FedRAMP sources for development and testing

**FIXME** Please provide information that helps the developer test any changes they make
before submitting.
The `trestle` FedRAMP plugin relies on reference data from the FedRAMP automation repository for testing and development purposes. The FedRAMP automation repository is a submodule in the trestle project. The FedRAMP automation repository is located at: https://github.com/GSA/fedramp-automation

## Coding style guidelines
In order to develop/test, the submodule must be checked out with `git submodule update --init` or `make submodules`.

**FIXME** Optional, but recommended: please share any specific style guidelines you might
have for your project.
To copy required files from the submodule to the trestle-fedramp plugin, run `make fedramp-copy`.

#### NIST OSCAL sources for development and testing

To perform conversions from JSON to XML and vice versa, the `trestle` FedRAMP plugin relies on the NIST OSCAL schema and examples. There are available as release artifacts in the NIST OSCAL repository. The NIST OSCAL repository is located at: https://github.com/usnistgov/OSCAL

To retrieve these artifacts, run `make download-release-artifacts`.

### Code style and formatting

The `trestle` FedRAMP plugin uses [yapf](https://github.com/google/yapf) for code formatting and [flake8](https://flake8.pycqa.org/en/latest/) for code styling. It also uses [pre-commit](https://pre-commit.com/) hooks that are integrated into the development process and the CI. When you run `make develop` you are ensuring that the pre-commit hooks are installed and updated to their latest versions for this repository. This ensures that all delivered code has been properly formatted
and passes the linter rules. See the [pre-commit configuration file](https://github.com/oscal-compass/compliance-trestle-fedramp/blob/develop/.pre-commit-config.yaml) for details on
`yapf` and `flake8` configurations.

Since `yapf` and `flake8` are installed as part of the `pre-commit` hooks, running `yapf` and `flake8`
manually must be done through `pre-commit`. See examples below:

```bash
make code-format
make code-lint
```

...will run `yapf` and `flake8` on the entire repo and is equivalent to:

```bash
pre-commit run yapf --all-files
pre-commit run flake8 --all-files
```

...and when looking to limit execution to a subset of files do similar to:

```bash
pre-commit run yapf --files trestle_fedramp/*
pre-commit run flake8 --files trestle_fedramp/*
```
2 changes: 1 addition & 1 deletion MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

Vikas Agarwal - [vikas-agarwal76](https://github.com/vikas-agarwal76)

Christopher Butler - [butler54](https://github.com/butler54)
Jennifer Power [jpower432](https://github.com/jpower432)
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# compliance-trestle-fedramp

A plugin for [compliance-trestle](https://github.com/IBM/compliance-trestle) to provide functionality specifically for FedRAMP.
A plugin for [compliance-trestle](https://github.com/oscal-compass/compliance-trestle) to provide functionality specifically for FedRAMP.

This plugin provides APIs and commands for validating a FedRAMP compliant SSP (in JSON or YAML format). In future it will also provide utilities for converting various OSCAL models from XML to JSON format and vice-versa.

Expand All @@ -23,7 +23,7 @@ Our project welcomes external contributions. Please consult [contributing](CONTR
## License & Authors

If you would like to see the detailed LICENSE click [here](LICENSE).
Consult [contributors](https://github.com/IBM/compliance-trestle-fedramp/graphs/contributors) for a list of authors and [maintainers](MAINTAINERS.md) for the core team.
Consult [contributors](https://github.com/oscal-compass/compliance-trestle-fedramp/graphs/contributors) for a list of authors and [maintainers](MAINTAINERS.md) for the core team.

```text
# Copyright (c) 2020 IBM Corp. All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = Trestle plugin for FedRAMP validation and format conversion
author = IBM
author_email = avikas@in.ibm.com
license = Apache Software License v2
url = https://github.com/IBM/compliance-trestle-fedramp
url = https://github.com/oscal-compass/compliance-trestle-fedramp
classifiers =
Development Status :: 4 - Beta
Environment :: Console
Expand Down

0 comments on commit 9556b6d

Please sign in to comment.