Skip to content

Commit

Permalink
Merge pull request #2 from datasciencecampus/1-initial-update-of-docs
Browse files Browse the repository at this point in the history
1 initial update of docs
  • Loading branch information
Edward-Jackson-ONS authored Aug 15, 2024
2 parents ec05ccc + fc4f6d3 commit f539642
Show file tree
Hide file tree
Showing 6 changed files with 145 additions and 32 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
### Project structure ###
data/*
outputs/*
.vscode

### Contentious file types (can be removed at user discretion) ###

Expand Down
49 changes: 30 additions & 19 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,34 @@
repos:
# exclude: ^vendor/
# exclude: ^vendor/

# ---- Pre-commit hooks ---- : Standard hook library
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: trailing-whitespace # strip out white spaces at end of lines
- id: end-of-file-fixer # ensure newline present at end of file
- id: check-yaml # checks yaml files for parseable syntax.
- id: check-json # checks json files for parseable syntax
- id: check-added-large-files # check for files above certain size (as likely to be data files)
args: ['--maxkb=500']
- id: detect-private-key # detects the presence of private keys.
- id: check-case-conflict # check for files that would conflict in case-insensitive file systems.
- id: check-merge-conflict # check for files that contain merge conflict strings.
# ---- Pre-commit hooks ---- : Standard hook library
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: trailing-whitespace # strip out white spaces at end of lines
- id: end-of-file-fixer # ensure newline present at end of file
- id: check-yaml # checks yaml files for parseable syntax.
- id: check-json # checks json files for parseable syntax
- id: check-added-large-files # check for files above certain size (as likely to be data files)
args: ['--maxkb=500']
- id: detect-private-key # detects the presence of private keys.
- id: check-case-conflict # check for files that would conflict in case-insensitive file systems.
- id: check-merge-conflict # check for files that contain merge conflict strings.

# ----- Detect-secrets - Detects high entropy strings that are likely to be passwords.
- repo: https://github.com/Yelp/detect-secrets
rev: v1.4.0
hooks:
- id: detect-secrets
exclude: package.lock.json

# ----- Detect-secrets - Detects high entropy strings that are likely to be passwords.
- repo: https://github.com/Yelp/detect-secrets
rev: v1.4.0
# ---- Ruff ---- A *very* fast formatter and linter.
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.3.0
hooks:
- id: detect-secrets
exclude: package.lock.json
# Run the linter.
- id: ruff
args: [ --fix ]
# Run the formatter.
- id: ruff-format
76 changes: 76 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
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 [email protected]. 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.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
27 changes: 27 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Contributing

## Code of Conduct

Please read [`CODE_OF_CONDUCT.md`](CODE_OF_CONDUCT.md) before contributing.

## Getting started

### How to submit a Contribution

1. Create your own fork of the code
2. Do the changes in your fork
3. If you like the change and think the project could use it:
* Be sure you have followed the code style for the project.
* Send a pull request.

### Set-up

Set-up expectations:

| | |
| --- | --- |
| Env manager: | conda |
| Os: | macOS |
| Package manager: | pip |

**Further information will follow as we begin to push code.**
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Data Science Campus
Copyright (c) 2024 Data Science Campus

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
22 changes: 10 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
<!--- Badges start --->
<img src="https://img.shields.io/badge/repo%20status-in%20development%20(caution)-red" alt="Repository status is still in development (caution required)"/>

<!--- Badges end --->

<img src="https://github.com/datasciencecampus/awesome-campus/blob/master/ons_dsc_logo.png">

# Repository name

# Introduction
## About
*Describe what this repo contains and what the project is.*
This is the open-source code repository for the internal ParliAI project, allowing other developers to replicate non-sensitive features of the project and to encourage future collaboration and development in this space. Please do contact us at [[email protected]]([email protected]) to discuss this or any of our other projects.

## Installation
*Describe technical set-up. Such as the required dependencies.*
Details to follow...

### Pre-commit actions
This repository contains a configuration of pre-commit hooks. These are language agnostic and focussed on repository security (such as detection of passwords and API keys). If approaching this project as a developer, you are encouraged to install and enable `pre-commits` by running the following in your shell:
Expand All @@ -21,22 +26,15 @@ This repository contains a configuration of pre-commit hooks. These are language
```
pre-commit install
```
Once pre-commits are activated, whenever you commit to this repository a series of checks will be executed. The pre-commits include checking for security keys, large files and unresolved merge conflict headers. The use of active pre-commits are highly encouraged and the given hooks can be expanded with Python or R specific hooks that can automate the code style and linting. For example, the `flake8` and `black` hooks are useful for maintaining consistent Python code formatting.
Once pre-commits are activated, whenever you commit to this repository a series of checks will be executed. The pre-commits include checking for security keys, large files and unresolved merge conflict headers. The use of active pre-commits are highly encouraged and the given hooks can be expanded with Python or R specific hooks that can automate the code style and linting. We are using `ruff` to ensure consistent Python code formatting.
**NOTE:** Pre-commit hooks execute Python, so it expects a working Python build.
## Usage
*Explain how to use the things in the repo.*
Details to follow...
### Workflow
*You may wish to consider generating a graph to show your project workflow. GitHub markdown provides native support for [mermaid](https://mermaid.js.org/syntax/flowchart.html), an example of which is provided below:*
```mermaid
flowchart TD
id1[(Some data)] --> id2(Some processing)
id3[(More data)] --> id2
id2 --> id4[Some output]
```
Details to follow...
# Data Science Campus
Expand Down

0 comments on commit f539642

Please sign in to comment.